agilebuilder-ui 1.1.22 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/lib/{401-4a0b2ff3.js → 401-3aa5e355.js} +1 -1
  2. package/lib/{404-675a2b11.js → 404-aa4b2c13.js} +1 -1
  3. package/lib/{iframe-page-38a9c584.js → iframe-page-12433672.js} +1 -1
  4. package/lib/{index-e23f840f.js → index-4fa4df3f.js} +34463 -35111
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +93 -93
  8. package/lib/{tab-content-iframe-index-e6bc24b5.js → tab-content-iframe-index-911248d7.js} +1 -1
  9. package/lib/{tab-content-index-5a36eab4.js → tab-content-index-d82e9431.js} +11 -11
  10. package/lib/{tache-subprocess-history-59bda1ed.js → tache-subprocess-history-d52e150e.js} +1 -1
  11. package/package.json +1 -1
  12. package/packages/fs-upload-new/src/fs-upload-new.vue +0 -12
  13. package/packages/index.js +0 -11
  14. package/packages/row-form/operation.vue +2 -1
  15. package/packages/super-grid/src/apis.js +1 -55
  16. package/packages/super-grid/src/components/mobile-table-card.jsx +1 -1
  17. package/packages/super-grid/src/dynamic-input.vue +0 -1
  18. package/packages/super-grid/src/group-column.vue +1 -1
  19. package/packages/super-grid/src/index-column.vue +1 -1
  20. package/packages/super-grid/src/normal-column-content.vue +11 -175
  21. package/packages/super-grid/src/normal-column.vue +1 -1
  22. package/packages/super-grid/src/row-operation.vue +7 -7
  23. package/packages/super-grid/src/search-button.vue +2 -7
  24. package/packages/super-grid/src/search-form-advancedQuery.vue +4 -0
  25. package/packages/super-grid/src/search-form-item.vue +13 -6
  26. package/packages/super-grid/src/search-form-open.vue +83 -75
  27. package/packages/super-grid/src/search-form-ordinarySearch.vue +34 -28
  28. package/packages/super-grid/src/search-form.vue +7 -6
  29. package/packages/super-grid/src/selection-column.vue +1 -1
  30. package/packages/super-grid/src/super-grid.vue +8 -139
  31. package/packages/super-nine-grid/src/super-nine-grid.vue +0 -1
  32. package/src/i18n/langs/cn.js +0 -6
  33. package/src/i18n/langs/en.js +0 -6
  34. package/src/store/getters.js +0 -7
  35. package/src/store/index.js +0 -4
  36. package/src/styles/_layout-custom-properties.scss +3 -10
  37. package/src/styles/display-layout.scss +27 -76
  38. package/src/styles/index.scss +15 -44
  39. package/src/styles/theme/black/index.scss +34 -0
  40. package/src/styles/theme/blue/index.scss +21 -0
  41. package/src/styles/theme/blue2/index.scss +22 -0
  42. package/src/styles/theme/dark-blue/button.scss +12 -0
  43. package/src/styles/theme/dark-blue/index.scss +60 -0
  44. package/src/styles/theme/dark-blue/sidebar.scss +5 -0
  45. package/src/styles/theme/gray/index.scss +29 -0
  46. package/src/styles/theme/gray/sidebar.scss +5 -0
  47. package/src/styles/theme/green/button.scss +10 -0
  48. package/src/styles/theme/green/index.scss +60 -0
  49. package/src/styles/theme/green/sidebar.scss +5 -0
  50. package/src/styles/theme/ocean-blue/button.scss +10 -0
  51. package/src/styles/theme/ocean-blue/index.scss +60 -0
  52. package/src/styles/theme/ocean-blue/sidebar.scss +5 -0
  53. package/src/styles/theme/tiffany-blue-mobile/button.scss +10 -0
  54. package/src/styles/theme/tiffany-blue-mobile/index.scss +54 -0
  55. package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +5 -0
  56. package/src/views/dsc-component/tabs/tab-content.vue +37 -28
  57. package/src/views/layout/components/AppMain.vue +1 -1
  58. package/src/views/layout/components/tabs/tab-content.vue +37 -28
  59. package/src/components/Affix/index.vue +0 -265
  60. package/src/store/modules/system.js +0 -34
  61. package/src/store/modules/table.js +0 -76
  62. package/src/styles/page-list.scss +0 -75
  63. package/src/styles/theme/default.scss +0 -39
  64. package/src/utils/iframe-communicator.js +0 -234
  65. package/src/utils/insert_css.js +0 -33
  66. package/src/utils/resize.js +0 -19
@@ -1,5 +1,5 @@
1
1
  import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
2
- import { _ as s } from "./index-e23f840f.js";
2
+ import { _ as s } from "./index-4fa4df3f.js";
3
3
  const u = ["src"], f = s({ data: () => ({ src: null }), watch: { $route(n, c) {
4
4
  this.src = this.$route.query.src;
5
5
  } }, mounted() {
@@ -1,6 +1,6 @@
1
- import { _ as f, c as $, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-e23f840f.js";
2
- import { resolveComponent as u, openBlock as l, createBlock as b, withCtx as g, createVNode as v, TransitionGroup as L, createElementBlock as p, Fragment as T, renderList as C, createElementVNode as m, toDisplayString as w, normalizeClass as S, createCommentVNode as y } from "vue";
3
- const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
1
+ import { _ as v, c as $, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-4fa4df3f.js";
2
+ import { resolveComponent as m, openBlock as l, createBlock as b, withCtx as g, createVNode as w, TransitionGroup as L, createElementBlock as p, Fragment as T, renderList as C, createElementVNode as u, toDisplayString as y, createCommentVNode as f, normalizeClass as S } from "vue";
3
+ const A = { class: "no-redirect" }, k = v({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
4
4
  return this.levelList.filter((e) => e.meta.title !== void 0 && e.meta.title !== null);
5
5
  } }, watch: { $route() {
6
6
  this.getBreadcrumb();
@@ -35,8 +35,8 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
35
35
  }, isTitleNotEqual(e, t) {
36
36
  return !(!e || !t.meta || e === t.meta.title || e === this.$t(t.meta.title));
37
37
  }, isPathNotEqual: (e, t) => !(!e || !t.path || e === t.path) } }, [["render", function(e, t, a, r, o, s) {
38
- const d = u("el-breadcrumb-item"), n = u("el-breadcrumb");
39
- return l(), b(n, { class: "app-breadcrumb", separator: ">" }, { default: g(() => [v(L, { name: "breadcrumb", tag: "span" }, { default: g(() => [(l(!0), p(T, null, C(s.levelListWithTitle, (i, c) => (l(), b(d, { key: i.path + "-" + c }, { default: g(() => [m("span", k, w(e.$t(i.meta.title)), 1)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 });
38
+ const d = m("el-breadcrumb-item"), n = m("el-breadcrumb");
39
+ return l(), b(n, { class: "app-breadcrumb", separator: ">" }, { default: g(() => [w(L, { name: "breadcrumb", tag: "span" }, { default: g(() => [(l(!0), p(T, null, C(s.levelListWithTitle, (i, c) => (l(), b(d, { key: i.path + "-" + c }, { default: g(() => [u("span", A, y(e.$t(i.meta.title)), 1)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 });
40
40
  }], ["__scopeId", "data-v-768a430c"]]), { body: B } = document, E = { watch: { $route(e) {
41
41
  this.device === "mobile" && this.sidebar.opened && h.dispatch("closeSidebar", { withoutAnimation: !1 });
42
42
  } }, beforeMount() {
@@ -93,10 +93,10 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
93
93
  const a = window.sessionStorage.getItem(t);
94
94
  a !== void 0 && a === "true" ? this.$router.push({ path: "/mms/apps/list" }) : this.$router.push({ path: "/mms/systems/list" });
95
95
  }
96
- } } }, V = ["src"], Q = { key: 1, class: "default-page-tip" }, R = { class: "default-page-tip-msg" }, q = { class: "default-page-tip-item" }, z = { class: "default-page-tip-item" }, j = { class: "main-container" }, W = f({ name: "Layout", components: { Menubar: O, Breadcrumb: A, TabContent: f(N, [["render", function(e, t, a, r, o, s) {
97
- const d = u("el-tab-pane"), n = u("el-tabs");
98
- return e.openTab && e.openTab.length > 0 ? (l(), b(n, { key: 0, modelValue: s.activeIndex, "onUpdate:modelValue": t[0] || (t[0] = (i) => s.activeIndex = i), class: "nav-tab menu-tab-container", closable: "", onTabRemove: s.closeSelectedTag }, { default: g(() => [(l(!0), p(T, null, C(e.openTab, (i) => (l(), b(d, { key: i.code, label: i.name, name: i.code }, { default: g(() => [m("iframe", { ref_for: !0, ref: "tabMainContent", src: s.getFullPath(i), class: "tab-main-content", name: "tab-main-content", frameborder: "0" }, null, 8, V)]), _: 2 }, 1032, ["label", "name"]))), 128))]), _: 1 }, 8, ["modelValue", "onTabRemove"])) : (l(), p("div", Q, [m("div", R, [m("div", q, w(o.defaultPageTipCn), 1), m("div", z, w(o.defaultPageTipEn), 1)])]));
99
- }], ["__scopeId", "data-v-a5252a92"]]) }, mixins: [E], data: () => ({ showMenuRoute: I(), systemCode: null }), computed: { sidebar() {
96
+ } } }, V = ["src"], Q = { class: "default-page-tip" }, R = { class: "default-page-tip-msg" }, q = { class: "default-page-tip-item" }, z = { class: "default-page-tip-item" }, j = { class: "main-container" }, W = v({ name: "Layout", components: { Menubar: O, Breadcrumb: k, TabContent: v(N, [["render", function(e, t, a, r, o, s) {
97
+ const d = m("el-tab-pane"), n = m("el-tabs");
98
+ return l(), p("div", null, [e.openTab && e.openTab.length > 0 ? (l(), b(n, { key: 0, modelValue: s.activeIndex, "onUpdate:modelValue": t[0] || (t[0] = (i) => s.activeIndex = i), class: "nav-tab menu-tab-container", closable: "", onTabRemove: s.closeSelectedTag }, { default: g(() => [(l(!0), p(T, null, C(e.openTab, (i) => (l(), b(d, { key: i.code, label: i.name, name: i.code }, { default: g(() => [u("iframe", { ref_for: !0, ref: "tabMainContent", src: s.getFullPath(i), class: "tab-main-content", name: "tab-main-content", frameborder: "0" }, null, 8, V)]), _: 2 }, 1032, ["label", "name"]))), 128))]), _: 1 }, 8, ["modelValue", "onTabRemove"])) : f("", !0), u("div", Q, [u("div", R, [u("div", q, y(o.defaultPageTipCn), 1), u("div", z, y(o.defaultPageTipEn), 1)])])]);
99
+ }], ["__scopeId", "data-v-acb71e42"]]) }, mixins: [E], data: () => ({ showMenuRoute: I(), systemCode: null }), computed: { sidebar() {
100
100
  return this.$store.state.app.sidebar;
101
101
  }, device() {
102
102
  return this.$store.state.app.device;
@@ -107,8 +107,8 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
107
107
  }, methods: { handleClickOutside() {
108
108
  this.$store.dispatch("closeSidebar", { withoutAnimation: !1 });
109
109
  } } }, [["render", function(e, t, a, r, o, s) {
110
- const d = u("menubar"), n = u("breadcrumb"), i = u("tab-content");
111
- return l(), p("div", { class: S([s.classObj, "app-wrapper"]) }, [s.device === "mobile" && s.sidebar.opened ? (l(), p("div", { key: 0, class: "drawer-bg", onClick: t[0] || (t[0] = (...c) => s.handleClickOutside && s.handleClickOutside(...c)) })) : y("", !0), v(d, { "system-code": o.systemCode, collapse: !0, class: "sidebar-container" }, null, 8, ["system-code"]), m("div", j, [o.showMenuRoute ? (l(), b(n, { key: 0 })) : y("", !0), v(i)])], 2);
110
+ const d = m("menubar"), n = m("breadcrumb"), i = m("tab-content");
111
+ return l(), p("div", { class: S([s.classObj, "app-wrapper"]) }, [s.device === "mobile" && s.sidebar.opened ? (l(), p("div", { key: 0, class: "drawer-bg", onClick: t[0] || (t[0] = (...c) => s.handleClickOutside && s.handleClickOutside(...c)) })) : f("", !0), w(d, { "system-code": o.systemCode, collapse: !0, class: "sidebar-container" }, null, 8, ["system-code"]), u("div", j, [o.showMenuRoute ? (l(), b(n, { key: 0 })) : f("", !0), w(i)])], 2);
112
112
  }], ["__scopeId", "data-v-5c0a6bf6"]]);
113
113
  export {
114
114
  W as default
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent as t, openBlock as a, createElementBlock as s, createElementVNode as y, createVNode as l, withCtx as r, createTextVNode as n, toDisplayString as p, createCommentVNode as c, createBlock as h } from "vue";
2
- import { _ as I } from "./index-e23f840f.js";
2
+ import { _ as I } from "./index-4fa4df3f.js";
3
3
  const g = { style: { "padding-bottom": "10px" } }, k = { key: 0, class: "graphDiv" }, N = I({ name: "TacheSubprocessHistory", data: () => ({ type: "graph", workflowId: null }), created() {
4
4
  const o = this.$route.query.workflowId;
5
5
  o && (this.workflowId = parseInt(o));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.1.22",
3
+ "version": "1.1.23",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -136,22 +136,18 @@ const props = defineProps({
136
136
  return null
137
137
  }
138
138
  },
139
- // 兼容旧的fs-upload-list {showName: '文件名1,文件名2', serverPath: '文件uuid1,文件uuid2'}
140
139
  fileInfo: {
141
140
  type: Object,
142
141
  default: () => ({})
143
142
  },
144
- // 系统编码
145
143
  systemCode: {
146
144
  type: String,
147
145
  default: ''
148
146
  },
149
- // 上传控件显示类型, input / button / drag
150
147
  displayType: {
151
148
  type: String,
152
149
  default: 'input'
153
150
  },
154
- // 是否禁止编辑
155
151
  disabled: {
156
152
  type: Boolean,
157
153
  default: false
@@ -161,42 +157,34 @@ const props = defineProps({
161
157
  type: Boolean,
162
158
  default: true
163
159
  },
164
- // 允许上传的文件类型,默认不限制
165
160
  accept: {
166
161
  type: String,
167
162
  default: ''
168
163
  },
169
- // 是否多选,默认不多选
170
164
  multiple: {
171
165
  type: Boolean,
172
166
  default: false
173
167
  },
174
- // 限制文件个数,默认不限制
175
168
  limit: {
176
169
  type: Number,
177
170
  default: null
178
171
  },
179
- // 文件大小限制,单位是M,默认是30M
180
172
  limitFileSize: {
181
173
  type: Number,
182
174
  default: 30
183
175
  },
184
- // 占位符文字
185
176
  placeholder: {
186
177
  type: String,
187
178
  default: '拖拽文件 或 点击上传'
188
179
  },
189
- // 上传地址,可不传
190
180
  action: {
191
181
  type: String,
192
182
  default: ''
193
183
  },
194
- // 请求头部信息,默认可不传,可传入 { Authorization:‘token’ } 等信息
195
184
  headers: {
196
185
  type: Object,
197
186
  default: () => ({ Authorization: null })
198
187
  },
199
- // 已上传文件列表,格式:[{ name: '文件名', serverPath: '文件uuid' }]
200
188
  fileList: {
201
189
  type: Array<{ showName: string; serverPath: string }>,
202
190
  default: () => []
package/packages/index.js CHANGED
@@ -1,8 +1,4 @@
1
- import '../src/utils/insert_css' // 公共样式库
2
1
  // 依次导入组件库的各个组件
3
- import { resizeDirective } from '../src/utils/resize'
4
- import '../src/utils/iframe-communicator';
5
- import store from '../src/store';
6
2
  import Breadcrumb from './breadcrumb'
7
3
  import DepartmentTree from './department-tree'
8
4
  import Hamburger from './hamburger'
@@ -45,10 +41,8 @@ import ScanCodeInputBrowser from './scan-code-input-browser'
45
41
  import WorkgroupTreeMobile from './workgroup-tree-mobile'
46
42
  import RowForm from './row-form'
47
43
  import * as ElementPlusIconsVue from "@element-plus/icons-vue"
48
- import YxAffix from '../src/components/Affix';
49
44
  // 将所有组件都存储起来,方便后续统一注册
50
45
  const components = [
51
- YxAffix,
52
46
  Breadcrumb,
53
47
  DepartmentTree,
54
48
  Hamburger,
@@ -94,7 +88,6 @@ const install = function (Vue) {
94
88
  // customPlugin.install(Vue)
95
89
  Vue.use(customPlugin)
96
90
  if (install.installed) return
97
- Vue.directive('resize', resizeDirective)
98
91
  // components.map(component => Vue.component(component.name, component))
99
92
  components.forEach((component) => {
100
93
  Vue.component(component.name, component)
@@ -105,9 +98,6 @@ const install = function (Vue) {
105
98
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
106
99
  Vue.component(key, component)
107
100
  }
108
- // store挂载到Vue原型
109
- Vue.provide('$agilebuilderUIStore', store);
110
- if(Vue.config.globalProperties) Vue.config.globalProperties.$agilebuilderUIStore = store;
111
101
  }
112
102
 
113
103
  // 判断是否是直接引入vue的js文件,即全局引用可自动安装所有组件
@@ -156,6 +146,5 @@ export {
156
146
  export default {
157
147
  // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
158
148
  install,
159
- store,
160
149
  ...components,
161
150
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div v-if="column.operations" class="grid-operation-buttons">
2
+ <div v-if="column.operations" class="grid-operation-buttons operation-area">
3
3
  <span
4
4
  v-for="(operation, operationIndex) in column.operations"
5
5
  :key="operationIndex"
@@ -9,6 +9,7 @@
9
9
  v-if="operation.isGroup"
10
10
  :size="operation.buttons && operation.buttons.length > 0 ? operation.buttons[0].props.size : 'small'"
11
11
  split-button
12
+ style="padding-left: 10px"
12
13
  @command="handleCommand"
13
14
  >
14
15
  {{ $escapeHtml(operation.label) }}
@@ -22,7 +22,6 @@ import eventBus from './eventBus'
22
22
  import { isPromise } from '../../../src/utils/common-util'
23
23
  import { updateWithPageValue } from '../../../src/utils/jump-page-utils'
24
24
  import { getGuId } from '../../../src/utils/guid.js';
25
- import { ElMessageBox } from 'element-plus';
26
25
 
27
26
  const apis = {
28
27
  // 列表工具栏控件刷新列表数据。添加该方法解决工具栏值清空后,列表内容没有还原问题
@@ -136,6 +135,7 @@ const apis = {
136
135
  // 新建行
137
136
  createRow(listCode, row, options) {
138
137
  return new Promise((resolve, reject) => {
138
+ debugger;
139
139
  if (!listCode) {
140
140
  listCode = store.get('_list_code')
141
141
  }
@@ -420,60 +420,6 @@ const apis = {
420
420
  }
421
421
  }
422
422
  },
423
- isLastEditRowSaveMessage(listCode) {
424
- if (!listCode) {
425
- listCode = store.get('_list_code')
426
- }
427
- const gridParams = store.get(listCode)
428
- if (!isLastEditRowSave(listCode)) {
429
- // 最后编辑的一行没有保存,则提示
430
- window.$vueApp.config.globalProperties.$message({
431
- showClose: true,
432
- message: getI18n().t('superGrid.pleaseSaveLine', {
433
- row: gridParams.$rowIndex + 1
434
- }),
435
- type: 'warning'
436
- })
437
- return false
438
- }
439
- return true
440
- },
441
- // 切换行编辑时候提示
442
- confirmBeforeSwitchingRow(listCode, callback) {
443
- if (!listCode) {
444
- listCode = store.get('_list_code')
445
- }
446
- const { t } = getI18n()
447
- const gridParams = store.get(listCode)
448
- const rowIndex = gridParams.$rowIndex
449
- if (!isLastEditRowSave(listCode)) {
450
- ElMessageBox.confirm(
451
- t('superGrid.rowEditMessageBox.content'), // 当前行有未保存的修改,你是否要切换编辑行?
452
- t('superGrid.rowEditMessageBox.title'), // 操作确认
453
- {
454
- distinguishCancelAndClose: true,
455
- confirmButtonText: t('superGrid.rowEditMessageBox.confirmButton'), // 提交修改
456
- cancelButtonText: t('superGrid.rowEditMessageBox.cancelButton'), // 放弃修改
457
- showClose: true,
458
- beforeClose: (action, instance, done) => {
459
- if (action === 'confirm') {
460
- this.saveRow(rowIndex, listCode).then((res) => {
461
- // this.editRow(rowIndex, listCode, true)
462
- callback?.('confirm');
463
- done();
464
- })
465
- } else if (action === 'cancel') {
466
- this.restoreCurrentRow(rowIndex, listCode)
467
- callback?.('cancel');
468
- done();
469
- } else if (action === 'close') {
470
- done();
471
- }
472
- },
473
- }
474
- )
475
- }
476
- },
477
423
  // 编辑行
478
424
  editRow(rowIndex, listCode, isSaveCallback) {
479
425
  if (!listCode) {
@@ -334,7 +334,7 @@ export default defineComponent({
334
334
  renderDom: (AddBtn) => (
335
335
  <Scrollbar onScrollToBottom={scrollLoad} flex-auto set-max-height={data => {
336
336
  if (data?.windowHeight) {
337
- const height = data?.windowHeight - 70
337
+ const height = data?.windowHeight - 160
338
338
  return height > 400 ? height : 400
339
339
  }
340
340
  }}>
@@ -902,7 +902,6 @@ export default {
902
902
  )
903
903
  that.innerValue = data.result
904
904
  that.blurEvent()
905
- this.callCustomEvent('afterScanDone')
906
905
  })
907
906
  },
908
907
  destroyed() {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-table-column :min-width="column.width ? column.width : 150" :align="column.groupHeader ? 'center' : ''">
2
+ <el-table-column :width="column.width ? column.width : 150" :align="column.groupHeader ? 'center' : ''">
3
3
  <template v-slot:header>
4
4
  <span class="cell--span" :title="label" v-html="label" />
5
5
  </template>
@@ -2,7 +2,7 @@
2
2
  <el-table-column
3
3
  align="center"
4
4
  :fixed="fixed"
5
- :width="70"
5
+ :width="column.width ? column.width : '80'"
6
6
  >
7
7
  <template v-slot:header>
8
8
  <span class="cell--span">{{ $t('superGrid.index') }}</span>
@@ -1,9 +1,8 @@
1
1
  <template>
2
- <div class="normal-column-content-view">
2
+ <div style="width: 100%">
3
3
  <!--添加:key="column.prop+'_'+rowIndex"是为了解决多行是行编辑状态时新建的记录的文本框内有值的问题-->
4
4
  <dynamic-input
5
- v-if="isEditing || isShowForm"
6
- ref="dynamicRef"
5
+ v-if="(lineEdit.editable && isEditable && row.$editing && !isContentViewText) || isShowForm"
7
6
  v-model:value="row[column.prop]"
8
7
  :class="requiredClass"
9
8
  :column="column"
@@ -21,7 +20,6 @@
21
20
  :row="row"
22
21
  :row-index="rowIndex"
23
22
  :type="column.componentType"
24
- @keyup.enter="clearAllEditing"
25
23
  @findIndex="findIndex(rowIndex)"
26
24
  @focus="onFocus(rowIndex)"
27
25
  @prohibit-to-edit="prohibitToEdit"
@@ -34,11 +32,7 @@
34
32
  @change-required="changeRequired"
35
33
  @open-page="openPageEvent"
36
34
  />
37
- <div v-else class="column-text-main">
38
- <div v-if="lineEdit.editable && isEditable && !isHideEdit && !isContentViewText" class="column-text-edit-main" @click="onEditing">
39
- <el-icon :size="14" color="#409eff"><Edit /></el-icon>
40
- <span v-if="[undefined, null, ''].includes(row[column.prop])" table-column-placeholder>请点击输入</span>
41
- </div>
35
+ <span v-else>
42
36
  <span v-if="column.operations" class="grid-operation-buttons">
43
37
  <span
44
38
  v-for="(operation, operationIndex) in column.operations"
@@ -49,6 +43,7 @@
49
43
  v-if="operation.isGroup"
50
44
  :size="operation.buttons && operation.buttons.length > 0 ? operation.buttons[0].props.size : 'small'"
51
45
  split-button
46
+ style="padding-left: 10px"
52
47
  @command="handleCommand"
53
48
  >
54
49
  {{ $escapeHtml(operation.label) }}
@@ -178,7 +173,7 @@
178
173
  :value="getCellValue(row)"
179
174
  />
180
175
  </span>
181
- <template v-else-if="isObjectProp(column.prop)">
176
+ <span v-else-if="isObjectProp(column.prop)">
182
177
  <!-- isObjectProp => prop.indexOf('.') > 0 -->
183
178
  <span v-if="column.formatter && column.formatter.type === 'files'" type="primary">
184
179
  <span
@@ -244,8 +239,8 @@
244
239
  <span v-else :id="column.prop + 'DomData' + rowIndex" :class="isShowForm ? '' : 'cell--span'">{{
245
240
  $escapeHtml(getLabel(row, rowIndex))
246
241
  }}</span>
247
- </template>
248
- <template v-else>
242
+ </span>
243
+ <span v-else>
249
244
  <span v-if="column.componentType === 'annex' || column.componentType === 'multipartUpload'" type="primary">
250
245
  <span
251
246
  v-if="isShowOverflowTooltip"
@@ -315,11 +310,11 @@
315
310
  </span>
316
311
  </el-link>
317
312
  <!-- 富文本 -->
318
- <template v-else-if="column.formatter && column.formatter.type === 'richEditor'">
313
+ <span v-else-if="column.formatter && column.formatter.type === 'richEditor'">
319
314
  <el-tooltip :content="$t('superGrid.show')" class="item" effect="dark" placement="top">
320
315
  <em class="fa fa-info-circle annex-cell" @click="showRichEditorContent(row, column, getHeader())" />
321
316
  </el-tooltip>
322
- </template>
317
+ </span>
323
318
  <GridIcon
324
319
  v-else-if="column.formatter && column.formatter.type === 'icon'"
325
320
  :id="column.prop + 'DomData' + rowIndex"
@@ -341,8 +336,8 @@
341
336
  <span v-else :id="column.prop + 'DomData' + rowIndex" :class="isShowForm ? '' : 'cell--span'">{{
342
337
  $escapeHtml(getLabel(row, rowIndex))
343
338
  }}</span>
344
- </template>
345
- </div>
339
+ </span>
340
+ </span>
346
341
  <view-image-dialog v-if="showSingleImgFlag" :file-list="fileList" @close="showSingleImgFlag = false" />
347
342
  <rich-editor-viewer
348
343
  v-if="showRichEditorViewer"
@@ -380,8 +375,6 @@ import FsPreview from '../../fs-preview'
380
375
  import RichEditorViewer from '../../rich-editor/viewer.vue'
381
376
  import GridIcon from './components/grid-icon.vue'
382
377
  import { formatScanRuleSets } from './scan-util.ts'
383
- import storeVuex from '../../../src/store';
384
-
385
378
  export default {
386
379
  components: {
387
380
  DynamicInput,
@@ -525,43 +518,6 @@ export default {
525
518
  }
526
519
  },
527
520
  computed: {
528
- isHideEdit() {
529
- if (this.disabled) return true
530
- // if (['customControl'].includes(this.columnFormatter?.type) && this.columnFormatter?.options?.format) return true
531
- // if (this.column?.operations?.some(operation => operation?.props?.customControl)) return true
532
- return false
533
- },
534
- $rowGuId() {
535
- return `${this.row.$rowDataGuId ?? this.row.id ?? this.rowIndex}`
536
- },
537
- // 字段唯一标识
538
- $rowColumnDataGuId() {
539
- return `${this.$rowGuId}_${this.column.prop}`
540
- },
541
- // 手动触发编辑状态
542
- isEditing() {
543
- try {
544
- // 没权限
545
- if (!this.hasEditPermission) return
546
- // 检测到单选修改模式
547
- if (storeVuex.getters.isEditing(this.$rowColumnDataGuId)) return true
548
- // 判定不是子表情况
549
- if (!this.isFormSubTable) {
550
- if (this.row.$editing) {
551
- // 检测是否是单元格同一行
552
- if (storeVuex.getters.isRowEditing(this.$rowGuId)) return false
553
- return true
554
- }
555
- }
556
- return this.row.$editing;
557
- } catch (error) {
558
- return false
559
- }
560
- },
561
- // 基础编辑权限
562
- hasEditPermission() {
563
- return this.lineEdit.editable && this.isEditable && !this.isContentViewText
564
- },
565
521
  // lineEdit() {
566
522
  // let isLineEdit = false
567
523
  // if (this.listCode) {
@@ -578,15 +534,6 @@ export default {
578
534
  ...mapGetters(['preventReclick'])
579
535
  },
580
536
  watch: {
581
- // 取消行时候
582
- 'row.$editing': {
583
- deep: true,
584
- handler(newValue) {
585
- if([false].includes(newValue)) {
586
- this.clearAllEditing()
587
- }
588
- }
589
- },
590
537
  isSql: {
591
538
  deep: true,
592
539
 
@@ -763,85 +710,6 @@ export default {
763
710
  methods: {
764
711
  ...customFormatter,
765
712
  ...apis,
766
- // 清理所有手动编辑
767
- clearAllEditing() {
768
- if (this.hasEditPermission) {
769
- storeVuex?.dispatch?.('clearAllEditing')
770
- }
771
- },
772
- // 手动编辑触发
773
- onEditing(event) {
774
- if (this.hasEditPermission && !this.isEditing) {
775
- event.stopPropagation()
776
-
777
- const onEditing = () => {
778
- this.clearAllEditing()
779
- storeVuex?.dispatch?.('setRowEditing', {
780
- $rowDataGuId: this.$rowColumnDataGuId,
781
- isEditing: true
782
- })
783
- setTimeout(this.focusBottomInput, 400)
784
- }
785
-
786
- if(!this.isFormSubTable) {
787
- // 非子表
788
- if (storeVuex.getters.isConfigEditing) {
789
- if (storeVuex.getters.isRowEditing(this.$rowGuId)) {
790
- onEditing()
791
- } else {
792
- const isNext = this.isLastEditRowSaveMessage(this.listCode)
793
- if (!isNext) return
794
- }
795
- // else {
796
- // // this.isLastEditRowSaveMessage(this.listCode)
797
- // // this.confirmBeforeSwitchingRow(this.listCode, () => { })
798
- // }
799
- } else {
800
- const isNext = this.isLastEditRowSaveMessage(this.listCode)
801
- if (!isNext) return
802
- // 如果不是子表 则 开启 编辑模式
803
- this.editRow(this.rowIndex, this.listCode, true)
804
- onEditing()
805
- }
806
- } else {
807
- // 取消所有列编辑状态
808
- this.restoreGridEdit(this.listCode)
809
- // 子表
810
- onEditing()
811
- }
812
- }
813
- },
814
- // 默认聚焦渲染组件
815
- focusBottomInput() {
816
- this.$nextTick(() => {
817
- try {
818
- const getOffsetParent = (selectorAll) => {
819
- return selectorAll ? Array.from(this.$refs.dynamicRef.$el.querySelectorAll(selectorAll)).filter(control => !!control.offsetParent) : [];
820
- }
821
-
822
- let visibleFormControls = getOffsetParent('.el-select, .el-date-picker, .el-upload');
823
- if (visibleFormControls.length) {
824
- visibleFormControls[0].click()
825
- } else {
826
- visibleFormControls = getOffsetParent('input, textarea');
827
- if (visibleFormControls.length > 0) {
828
- const bottomControl = visibleFormControls.reduce((prev, current) => {
829
- return current.getBoundingClientRect().bottom > prev.getBoundingClientRect().bottom
830
- ? current
831
- : prev;
832
- });
833
- if (['INPUT', 'TEXTAREA'].includes(bottomControl.tagName)) {
834
- bottomControl.focus();
835
- bottomControl.select();
836
- }
837
- }
838
-
839
- }
840
- } catch (error) {
841
- console.error(error)
842
- }
843
- })
844
- },
845
713
  getFileObj(fileSet) {
846
714
  if (fileSet) {
847
715
  return JSON.parse(fileSet)
@@ -1188,36 +1056,4 @@ export default {
1188
1056
  content: '*';
1189
1057
  color: #f56c6c;
1190
1058
  }
1191
-
1192
- .column-text-main {
1193
- display: flex;
1194
- align-items: center;
1195
- gap: 10px;
1196
-
1197
- .column-text-edit-main {
1198
- display: flex;
1199
- align-items: center;
1200
- gap: 10px;
1201
-
1202
- &::after {
1203
- content: ' ';
1204
- position: absolute;
1205
- left: 0;
1206
- top: 0;
1207
- right: 0;
1208
- bottom: 0;
1209
- cursor: pointer;
1210
- }
1211
-
1212
- & ~ span {
1213
- text-align: left;
1214
- &:empty {
1215
- display: none;
1216
- }
1217
- }
1218
- }
1219
- }
1220
- .normal-column-content-view {
1221
- display: inline;
1222
- }
1223
1059
  </style>
@@ -9,7 +9,7 @@
9
9
  :header-align="headerAlign"
10
10
  :prop="column.prop"
11
11
  :sortable="sortable"
12
- :min-width="getColumnWidth()"
12
+ :width="getColumnWidth()"
13
13
  >
14
14
  <template v-slot:header>
15
15
  <span v-if="!column.customHeader" :class="{ is_req: isFieldRequired() }">
@@ -2,8 +2,8 @@
2
2
  <!--将@click改为@mousedown.native是因为操作列保存按钮时事件和input等组件的@blur冲突,导致保存需要保存两次,因为
3
3
  @blur先于@click执行的,所以只会执行@blur,@click就失效了,@mousedown是先于@blur执行的-->
4
4
  <span :style="myStyle">
5
- <template v-if="isShowButton()">
6
- <template v-if="label">
5
+ <span v-if="isShowButton()">
6
+ <span v-if="label">
7
7
  <!-- <el-tooltip :content="label" class="item" effect="dark" placement="top-start"> -->
8
8
  <component
9
9
  v-bind="operationSetting"
@@ -23,8 +23,8 @@
23
23
  >{{ label }}</component
24
24
  >
25
25
  <!-- </el-tooltip> -->
26
- </template>
27
- <template v-else>
26
+ </span>
27
+ <span v-else>
28
28
  <component
29
29
  v-bind="operationSetting"
30
30
  :is="elementType"
@@ -40,8 +40,8 @@
40
40
  :disabled="preventReclick"
41
41
  @mousedown="onClickFun(operationSetting)"
42
42
  />
43
- </template>
44
- </template>
43
+ </span>
44
+ </span>
45
45
  </span>
46
46
  </template>
47
47
 
@@ -130,7 +130,7 @@ export default {
130
130
  this.operationSetting.elementType === 'el-button')
131
131
  ) {
132
132
  // 如果不是第0个元素,且是按钮时,添加左边距10px,使按钮不紧挨着
133
- // this.myStyle = { marginLeft: '10px' } // 不适合固定,建议结构样式默认
133
+ this.myStyle = { marginLeft: '10px' }
134
134
  }
135
135
  if (this.operationSetting.elementType) {
136
136
  this.elementType = this.operationSetting.elementType
@@ -16,7 +16,7 @@
16
16
  {{ $t('superGrid.saveCondition') }}
17
17
  </el-button>
18
18
  <el-button
19
- v-if="isShowOpen ?? !isMobile"
19
+ v-if="!isMobile"
20
20
  :icon="isMyOpen ? CaretTop : CaretBottom"
21
21
  link
22
22
  size="default"
@@ -47,12 +47,7 @@ export default {
47
47
  isOpen: {
48
48
  type: Boolean,
49
49
  default: false,
50
- },
51
- // 是否手动开启与管理
52
- isShowOpen: {
53
- type: Boolean,
54
- default: undefined,
55
- },
50
+ }
56
51
  },
57
52
  data() {
58
53
  const isMobile = isMobileBrowser()