agilebuilder-ui 1.0.80 → 1.0.82-tmp1

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 (32) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.js +21688 -20318
  3. package/lib/super-ui.umd.cjs +74 -74
  4. package/package.json +1 -1
  5. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +61 -26
  6. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +64 -22
  7. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -6
  8. package/packages/department-user-tree-inline/src/group-user/group-input.vue +153 -0
  9. package/packages/department-user-tree-inline/src/group-user/group-list.vue +96 -0
  10. package/packages/department-user-tree-inline/src/group-user/group-user.vue +42 -0
  11. package/packages/department-user-tree-inline/src/group-user-multiple-tree.vue +304 -0
  12. package/packages/department-user-tree-inline/src/group-user-single-tree.vue +155 -0
  13. package/packages/department-user-tree-inline/src/group-user-tree-service.js +75 -0
  14. package/packages/dynamic-source-select/src/dynamic-source-select.vue +2 -2
  15. package/packages/rich-editor/index.vue +29 -0
  16. package/packages/secret-info/index.vue +2 -2
  17. package/packages/super-grid/src/dynamic-input.vue +15 -8
  18. package/packages/super-grid/src/formValidatorUtil.js +5 -0
  19. package/packages/super-grid/src/group-column.vue +5 -0
  20. package/packages/super-grid/src/normal-column.vue +23 -7
  21. package/packages/super-grid/src/row-operation.vue +19 -10
  22. package/packages/super-grid/src/super-grid-service.js +7 -4
  23. package/packages/super-grid/src/super-grid.vue +30 -3
  24. package/packages/super-grid/src/utils.js +36 -118
  25. package/packages/workflow-button/src/workflow-button.vue +6 -1
  26. package/src/i18n/langs/cn.js +7 -1
  27. package/src/i18n/langs/en.js +7 -1
  28. package/src/utils/calculator/calculator-util.js +14 -0
  29. package/src/utils/permission.js +7 -1
  30. package/src/utils/permissionAuth.js +47 -1
  31. package/src/views/layout/components/Menubar/SidebarItem.vue +1 -1
  32. package/src/views/layout/tab-content-index.vue +1 -1
@@ -20,6 +20,7 @@
20
20
  @refresPortsData="refresPortsData"
21
21
  @refresMainTableFields="refresMainTableFields"
22
22
  @prohibit-to-edit="prohibitToEdit"
23
+ @open-page="openPageDialog"
23
24
  />
24
25
  </template>
25
26
  <template v-else>
@@ -33,6 +34,7 @@
33
34
  :grid-data="gridData"
34
35
  :page-grid-data="gridData"
35
36
  @prohibit-to-edit="prohibitToEdit"
37
+ @open-page="openPageDialog"
36
38
  />
37
39
  </template>
38
40
  </el-table-column>
@@ -108,6 +110,9 @@ export default {
108
110
  },
109
111
  prohibitToEdit(entity) {
110
112
  this.$emit('prohibit-to-edit', entity)
113
+ },
114
+ openPageDialog(openPageParams) {
115
+ this.$emit('open-page', openPageParams)
111
116
  }
112
117
  }
113
118
  }
@@ -11,9 +11,17 @@
11
11
  :width="getColumnWidth()"
12
12
  >
13
13
  <template v-slot:header>
14
- <span :class="{ is_req: isFieldRequired() }"
15
- ><span :title="$escapeHtml(label)" class="cell--span required__label" v-html="$escapeHtml(label)"
16
- /></span>
14
+ <span v-if="!column.customHeader" :class="{is_req: isFieldRequired()}">
15
+ <span :title="$escapeHtml(label)" class="cell--span required__label" v-html="$escapeHtml(label)" />
16
+ </span>
17
+ <component
18
+ :is="column.customHeader"
19
+ v-else
20
+ :prop="column.prop"
21
+ :parent="parentFormData"
22
+ :grid-data="gridData"
23
+ :current-page="currentPage"
24
+ />
17
25
  <el-icon v-if="isShowAdd" style="font-size: 20px; color: #409eff" @click="createFormSubTableRow">
18
26
  <CirclePlus />
19
27
  </el-icon>
@@ -41,6 +49,7 @@
41
49
  @findIndex="findIndex(scope.$index)"
42
50
  @focus="onFocus(scope.$index)"
43
51
  @prohibit-to-edit="prohibitToEdit"
52
+ @refresh-list="refreshList"
44
53
  @refresData="refresData"
45
54
  @refresMainTableFields="refresMainTableFields"
46
55
  @refresPortData="refresPortData"
@@ -94,6 +103,8 @@
94
103
  :operation-index="operationIndex"
95
104
  :operation-setting="operation.props"
96
105
  :row-index="scope.$index"
106
+ :list-code="listCode"
107
+ :parent-form-data="parentFormData"
97
108
  />
98
109
  </span>
99
110
  </span>
@@ -147,6 +158,7 @@
147
158
  :component-id="componentId"
148
159
  :additional-settings="controlConfig"
149
160
  @prohibitToEdit="prohibitToEdit"
161
+ @refresh-list="refreshList"
150
162
  /></span>
151
163
  <span
152
164
  v-else-if="
@@ -444,12 +456,12 @@ export default {
444
456
  if (this.column.controlConfig) {
445
457
  controlConfig = JSON.parse(this.column.controlConfig)
446
458
  }
447
-
459
+
448
460
  let scanEnable = false
449
- if(controlConfig.scanEnable){
461
+ if (controlConfig.scanEnable) {
450
462
  scanEnable = true
451
463
  }
452
- const componentId = this.listCode+'_'+this.column.prop
464
+ const componentId = this.listCode + '_' + this.column.prop
453
465
  return {
454
466
  selectRow: null,
455
467
  that: this,
@@ -1036,6 +1048,9 @@ export default {
1036
1048
  changeDisabled(state) {
1037
1049
  this.disabled = state
1038
1050
  },
1051
+ refreshList() {
1052
+ this.$emit('refresh-list')
1053
+ },
1039
1054
  getFilesFormatter() {
1040
1055
  if (this.column.formatter.options?.fileSet) {
1041
1056
  return JSON.parse(this.column.formatter.options.fileSet)
@@ -1046,7 +1061,7 @@ export default {
1046
1061
  * 设置条码扫描解析规则
1047
1062
  */
1048
1063
  setScanRuleSets() {
1049
- if(this.scanEnable && this.controlConfig && this.controlConfig.scanRuleList) {
1064
+ if (this.scanEnable && this.controlConfig && this.controlConfig.scanRuleList) {
1050
1065
  formatScanRuleSets(this.controlConfig.scanRuleList).then((res) => {
1051
1066
  //扫描处理
1052
1067
  this.column._scanRuleSets = res
@@ -1068,6 +1083,7 @@ export default {
1068
1083
  .m-requried {
1069
1084
  float: left;
1070
1085
  white-space: nowrap;
1086
+ width: 100%;
1071
1087
  }
1072
1088
 
1073
1089
  .m-requried::after {
@@ -49,6 +49,7 @@
49
49
  import { mapGetters } from 'vuex'
50
50
  import customFormatter from './custom-formatter'
51
51
  import { analysisCondition } from '../../../src/utils/util'
52
+ import store from './store'
52
53
  export default {
53
54
  name: 'RowOperation',
54
55
  props: {
@@ -89,6 +90,14 @@ export default {
89
90
  type: Number,
90
91
  default: null,
91
92
  },
93
+ listCode: {
94
+ type: String,
95
+ default: null
96
+ },
97
+ parentFormData: {
98
+ type: Object,
99
+ default: null
100
+ }
92
101
  },
93
102
  data() {
94
103
  return {
@@ -152,6 +161,7 @@ export default {
152
161
  },
153
162
  isShowButton() {
154
163
  // const start = new Date().getTime()
164
+ const gridParams = store.get(this.listCode)
155
165
  const val = customFormatter.isShowButtonFun(
156
166
  this.entity,
157
167
  this.column,
@@ -162,16 +172,15 @@ export default {
162
172
  const displayJudgment = JSON.stringify(
163
173
  this.operationSetting.buttonDisplayConditionsList
164
174
  )
165
- return analysisCondition(
166
- displayJudgment,
167
- this.entity,
168
- {},
169
- {},
170
- true,
171
- null,
172
- null,
173
- null
174
- )
175
+ if (gridParams) {
176
+ let tableName = null
177
+ if (gridParams.basicInfo.tableName) {
178
+ tableName = gridParams.basicInfo.tableName
179
+ }
180
+ return analysisCondition(displayJudgment, this.entity, gridParams.additionalParamMap, gridParams.contextParameter, true, tableName, this.parentFormData)
181
+ } else {
182
+ return analysisCondition(displayJudgment, this.entity, {}, {}, true, null, null)
183
+ }
175
184
  }
176
185
 
177
186
  if (val) {
@@ -203,6 +203,7 @@ const superGridService = {
203
203
  configureObj: this.configureObj
204
204
  })
205
205
  }
206
+ // console.log('fetchData-----this.options.initSearch=', this.options.initSearch,'gridParams.basicInfo.initializationQuery=', gridParams.basicInfo.initializationQuery, '0000000')
206
207
  if (canFetchData === undefined || canFetchData === true) {
207
208
  // 表示初始化时查询记录
208
209
  if (this.options.isPageInfo) {
@@ -213,6 +214,7 @@ const superGridService = {
213
214
  'undefined' ||
214
215
  gridParams.basicInfo.initializationQuery
215
216
  ) {
217
+ // console.log('fetchData-----this.loadCompleteQuery=', this.loadCompleteQuery, '1111111')
216
218
  // 判断是否初始化完查询条件后再查询数据
217
219
  if (this.loadCompleteQuery) {
218
220
  this.isLoading = false
@@ -220,7 +222,7 @@ const superGridService = {
220
222
  this.fetchData()
221
223
  }
222
224
  }
223
- } else if (this.options.initSearch !== false) {
225
+ } else if (this.options.initSearch) {
224
226
  // 判断是否初始化完查询条件后再查询数据
225
227
  if (this.loadCompleteQuery) {
226
228
  this.isLoading = false
@@ -230,9 +232,9 @@ const superGridService = {
230
232
  }
231
233
  }
232
234
  this.createBackgroundColorMap()
233
- const p2 = new Date().getTime()
234
- console.log('拿到共享数据并存储p2-p1=', p2 - p1)
235
- console.log('拿到共享数据并存储p2-b=', p2 - b)
235
+ // const p2 = new Date().getTime()
236
+ // console.log('拿到共享数据并存储p2-p1=', p2 - p1)
237
+ // console.log('拿到共享数据并存储p2-b=', p2 - b)
236
238
  resolve()
237
239
  })
238
240
  .catch((error) => {
@@ -308,6 +310,7 @@ const superGridService = {
308
310
  if (queryParameterSize > 0) {
309
311
  this.loadCompleteQuery = true
310
312
  }
313
+ // console.log('isLoadCompleteQuery-----this.loadCompleteQuery=', this.loadCompleteQuery)
311
314
  }
312
315
  },
313
316
  packageColumnOptionMap(gridParams) {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div>
2
+ <div :style="subTableStyle">
3
3
  <search-form
4
4
  v-if="
5
5
  !isFormSubTable &&
@@ -102,6 +102,7 @@
102
102
  :page-grid-data="
103
103
  isSubTableShowPage ? getSubTableGridData(subTableData) : gridData
104
104
  "
105
+ @refresh-list="refreshList"
105
106
  @open-page="openPageDialog"
106
107
  @refresPortData="refresPortData"
107
108
  @refresPortsData="refresPortsData"
@@ -135,6 +136,7 @@
135
136
  "
136
137
  @open-page="openPageDialog"
137
138
  @refresData="refresData"
139
+ @refresh-list="refreshList"
138
140
  @refresPortData="refresPortData"
139
141
  @refresPortsData="refresPortsData"
140
142
  @refresMainTableFields="refresMainTableFields"
@@ -458,7 +460,8 @@ export default {
458
460
  pageContext, // 页面配置上下文
459
461
  configureObj, // 表格配置信息
460
462
  isMobile, // 是否是移动端
461
- isShowMobileSearch: false // 是否显示移动端查询区域
463
+ isShowMobileSearch: false, // 是否显示移动端查询区域
464
+ subTableStyle: {}
462
465
  }
463
466
  },
464
467
  computed: {
@@ -785,11 +788,21 @@ export default {
785
788
  pageGridData: this.isSubTableShowPage
786
789
  ? this.gridData
787
790
  : null,
791
+ listCode: this.code,
788
792
  additionalParamMap: gridParams.additionalParamMap,
789
793
  pageContext: this.pageContext,
790
794
  configureObj: this.configureObj
791
795
  })
792
796
  }
797
+ this.$emit('gridComplete', {
798
+ gridData: this.isSubTableShowPage ? this.subTableData : this.gridData,
799
+ columns: gridParams.columns,
800
+ superGrid: this.$refs.superGrid,
801
+ isMobile: false,
802
+ listCode: this.code,
803
+ pageGridData: this.isSubTableShowPage ? this.gridData : null,
804
+ additionalParamMap: gridParams.additionalParamMap
805
+ })
793
806
  })
794
807
  }
795
808
  },
@@ -1256,6 +1269,7 @@ export default {
1256
1269
  gridParams.options.isFormSubTable === true
1257
1270
  ) {
1258
1271
  this.isFormSubTable = true
1272
+ this.subTableStyle = { width: '100%' }
1259
1273
  }
1260
1274
  },
1261
1275
  /**
@@ -1651,6 +1665,7 @@ export default {
1651
1665
 
1652
1666
  this.isLoading = true
1653
1667
  this.hasLoadData = false
1668
+ // console.log('fetchData--isSearch--', isSearch)
1654
1669
  if (isSearch === undefined || isSearch === false) {
1655
1670
  // 如果不是查询时才需要从缓存中获得结果
1656
1671
  // 如果是刷新当前列表,则需要获得缓存中的window.sessionStorage
@@ -1743,11 +1758,13 @@ export default {
1743
1758
  configureObj: this.configureObj
1744
1759
  })
1745
1760
  }
1761
+ // console.log('fetchData--canFetchData--', canFetchData, 'requestUrl=', requestUrl)
1746
1762
  return new Promise((resolve, reject) => {
1747
1763
  if(isPromise(canFetchData)){
1748
1764
  canFetchData.then((result)=>{
1749
1765
  if(result === undefined || result) {
1750
1766
  if(!requestUrl){
1767
+ gridParams.loaded = true
1751
1768
  resolve()
1752
1769
  } else {
1753
1770
  this.doRequest(requestUrl, param, parentRowIds, gridParams, resove).then(()=>{
@@ -1758,24 +1775,30 @@ export default {
1758
1775
  }
1759
1776
  } else {
1760
1777
  console.error('beforeRequest result is false!!')
1778
+ gridParams.loaded = true
1761
1779
  resolve()
1762
1780
  }
1763
1781
  }).catch((error)=>{
1782
+ gridParams.loaded = true
1764
1783
  reject(error)
1765
1784
  })
1766
1785
  } else {
1767
1786
  if (canFetchData === undefined || canFetchData === true) {
1768
1787
  if(!requestUrl){
1788
+ gridParams.loaded = true
1769
1789
  resolve()
1770
1790
  } else {
1771
1791
  this.doRequest(requestUrl, param, parentRowIds, gridParams, resove).then(()=>{
1792
+ gridParams.loaded = true
1772
1793
  resolve()
1773
1794
  }).catch((error)=>{
1795
+ gridParams.loaded = true
1774
1796
  reject(error)
1775
1797
  })
1776
1798
  }
1777
1799
  } else {
1778
1800
  console.error('beforeRequest result is false!!')
1801
+ gridParams.loaded = true
1779
1802
  resolve()
1780
1803
  }
1781
1804
  }
@@ -1886,6 +1909,7 @@ export default {
1886
1909
  this.hasLoadData = true
1887
1910
  } else {
1888
1911
  // 对数据做序列化,比如:处理xss攻击
1912
+ gridParams.loaded = true
1889
1913
  if (isHasOptionFunction('gridDataLoaded', this.code)) {
1890
1914
  gridParams.options.gridDataLoaded.call(this, {
1891
1915
  gridData: data,
@@ -2902,7 +2926,7 @@ export default {
2902
2926
  if (index < 0) {
2903
2927
  index = 0
2904
2928
  }
2905
- this.editRow(index)
2929
+ this.editRow(index, this.code)
2906
2930
  }
2907
2931
  }
2908
2932
  }
@@ -3115,6 +3139,9 @@ export default {
3115
3139
  store.set(this.code, gridParams)
3116
3140
  this['subTableData'] = data
3117
3141
  },
3142
+ refreshList() {
3143
+ this.fetchData(this.getSearchParam())
3144
+ },
3118
3145
  // 选择记录
3119
3146
  selectRecord(selection, row){
3120
3147
  let selectRecordEventResult = true