agilebuilder-ui 1.1.40 → 1.1.41-sit1

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 (30) hide show
  1. package/lib/{401-7bd60242.js → 401-2fa0b20f.js} +1 -1
  2. package/lib/{404-d2daf8d0.js → 404-192f705f.js} +1 -1
  3. package/lib/{iframe-page-4c181c23.js → iframe-page-fc8be096.js} +1 -1
  4. package/lib/{index-e9efe5c2.js → index-c5435fac.js} +5220 -5170
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +75 -75
  8. package/lib/{tab-content-iframe-index-77bf55ca.js → tab-content-iframe-index-1ed76ef3.js} +1 -1
  9. package/lib/{tab-content-index-8157438c.js → tab-content-index-5ccb5f5d.js} +1 -1
  10. package/lib/{tache-subprocess-history-bc9f1bea.js → tache-subprocess-history-b2829b97.js} +1 -1
  11. package/package.json +1 -1
  12. package/packages/fs-preview/src/fs-preview.vue +194 -89
  13. package/packages/fs-upload-list/src/fs-upload-list.vue +60 -204
  14. package/packages/fs-upload-new/src/fs-upload-new.vue +1 -1
  15. package/packages/super-grid/src/custom-formatter.js +16 -10
  16. package/packages/super-grid/src/dynamic-input.vue +10 -28
  17. package/packages/super-grid/src/normal-column-content.vue +9 -6
  18. package/packages/super-grid/src/normal-column.vue +8 -4
  19. package/packages/super-grid/src/row-operation.vue +13 -9
  20. package/packages/super-grid/src/search-form-advancedQuery.vue +1 -1
  21. package/packages/super-grid/src/search-form-item.vue +23 -23
  22. package/packages/super-grid/src/search-form-open.vue +164 -158
  23. package/packages/super-grid/src/search-methods.js +489 -577
  24. package/packages/super-grid/src/super-grid-service.js +141 -153
  25. package/packages/super-grid/src/super-grid.vue +40 -14
  26. package/packages/super-nine-grid/src/search-form.vue +461 -659
  27. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +515 -539
  28. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +24 -44
  29. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +626 -665
  30. package/src/utils/permission.js +86 -9
@@ -1,133 +1,35 @@
1
1
  <template>
2
- <span>
2
+ <span style="width: 100%">
3
3
  <template v-if="!disabled">
4
4
  <template v-if="!isMobile">
5
- <el-input
6
- ref="item"
5
+ <fs-preview
6
+ :enable-delete="true"
7
+ :entity="row"
7
8
  :disabled="disabled"
8
- :model-value="value"
9
- :placeholder="$t('imatrixUIMessage.fileUpload')"
10
- :readonly="true"
9
+ :fileInfo="fileInfo"
10
+ :file-set-obj="fileSetObj"
11
+ :is-sql="isSql"
12
+ :label="value"
13
+ @delete-file="deleteRow"
11
14
  >
12
- <template v-slot:append>
13
- <div class="group-link-btn-main">
14
- <el-link v-if="!disabled" type="info" :underline="false" @click="openAnnexUpload">
15
- <template v-slot:icon>
16
- <el-icon :size="14"><Upload /></el-icon>
17
- </template>
18
- </el-link>
19
- <el-link size="default" type="info" :underline="false" @click="preview">
20
- <template v-slot:icon>
21
- <el-icon :size="14"><ZoomIn /></el-icon>
22
- </template>
23
- </el-link>
24
- </div>
15
+ <template #prefix>
16
+ <el-upload
17
+ :accept="fileSetObj.accept ? fileSetObj.accept : null"
18
+ :action="defaultAction"
19
+ :multiple="fileSetObj.multiple"
20
+ :before-upload="handleBeforeUpload"
21
+ :show-file-list="false"
22
+ :headers="headers"
23
+ :on-success="uploadOnSuccess"
24
+ :with-credentials="true"
25
+ name="file"
26
+ >
27
+ <el-button size="small" style="margin-right: 5px" bg>
28
+ <el-icon><UploadFilled /></el-icon>
29
+ </el-button>
30
+ </el-upload>
25
31
  </template>
26
- </el-input>
27
-
28
- <el-dialog
29
- v-model="annexUploadFlag"
30
- :append-to-body="true"
31
- :show-close="true"
32
- :title="$t('imatrixUIMessage.upload')"
33
- width="30%"
34
- >
35
- <el-upload
36
- v-if="annexUploadFlag"
37
- :accept="fileSetObj.accept ? fileSetObj.accept : null"
38
- :action="defaultAction"
39
- :multiple="fileSetObj.multiple"
40
- :before-upload="handleBeforeUpload"
41
- :headers="headers"
42
- :on-success="uploadOnSuccess"
43
- :with-credentials="true"
44
- name="file"
45
- >
46
- <el-button>{{ $t('imatrixUIMessage.upload') }}</el-button>
47
- </el-upload>
48
- </el-dialog>
49
- <el-dialog
50
- v-model="showPreviewSingleImage"
51
- :append-to-body="true"
52
- :show-close="true"
53
- :title="$t('imatrixUIPublicModel.previewImage')"
54
- @close="$emit('close')"
55
- >
56
- <template v-slot:title>
57
- <span
58
- >{{ $t('imatrixUIPublicModel.previewImage') }}
59
- <!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
60
- <!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
61
- </span>
62
- </template>
63
- <el-image
64
- v-if="previewImageInfo && previewImageInfo.isImg"
65
- :preview-src-list="[previewImageInfo.src]"
66
- :src="previewImageInfo.src"
67
- />
68
- </el-dialog>
69
- <el-dialog
70
- v-model="showPreviewMulti"
71
- :append-to-body="true"
72
- :show-close="true"
73
- :title="$t('imatrixUIPublicModel.preview')"
74
- width="30%"
75
- @close="$emit('close')"
76
- >
77
- <template v-slot:title>
78
- <span
79
- >{{ $t('imatrixUIPublicModel.preview') }}
80
- <!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
81
- <!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
82
- </span>
83
- </template>
84
- <el-table :show-header="false" :data="showFileList" max-height="60vh">
85
- <el-table-column prop="showName" show-overflow-tooltip>
86
- <template v-slot="scope">
87
- <div style="display: flex; align-items: center">
88
- <span>
89
- <super-icon :iconValue="getFileIconByName(scope.row.showName)" />
90
- </span>
91
- <span class="amb-list-preivew-name" @click="previewSingle(scope.row)">
92
- {{ scope.row.showName }}
93
- </span>
94
- </div>
95
- </template>
96
- </el-table-column>
97
- <el-table-column width="80" align="center">
98
- <template v-slot="scope">
99
- <div style="margin: -10px 0">
100
- <el-tooltip
101
- v-if="!fileSetObj.disabledNoPreview"
102
- :content="$t('imatrixUIPublicModel.preview')"
103
- class="item"
104
- effect="dark"
105
- placement="top"
106
- >
107
- <el-button type="text" @click="previewSingle(scope.row)">
108
- <el-icon style="cursor: pointer">
109
- <el-icon-view />
110
- </el-icon>
111
- </el-button>
112
- </el-tooltip>
113
- <el-tooltip
114
- v-if="!disabled"
115
- :content="$t('imatrixUIPublicModel.delete')"
116
- class="item"
117
- effect="dark"
118
- placement="top"
119
- >
120
- <el-button type="text" @click="deleteRow(scope.$index)">
121
- <el-icon style="cursor: pointer">
122
- <el-icon-delete />
123
- </el-icon>
124
- </el-button>
125
- </el-tooltip>
126
- </div>
127
- </template>
128
- </el-table-column>
129
- </el-table>
130
- </el-dialog>
32
+ </fs-preview>
131
33
  </template>
132
34
  <FileUploadInputMobile
133
35
  v-else
@@ -177,6 +79,7 @@ import { packageFile } from '../../super-grid/src/utils'
177
79
  import FileUploadInputMobile from '../../fs-upload-new/src/file-upload-mobile/file-upload-input.vue'
178
80
  import { Base64 } from 'js-base64'
179
81
  import { getFileIconByName } from '../../../src/utils/file-util'
82
+ import { ElMessage } from 'element-plus'
180
83
  export default {
181
84
  name: 'FsUploadList',
182
85
  props: {
@@ -278,9 +181,28 @@ export default {
278
181
  ElIconDelete,
279
182
  FileUploadInputMobile
280
183
  },
281
- created() {},
184
+ created() {
185
+ this.fileList.length = 0
186
+ this.fileList.push(...this.getFileList())
187
+ },
282
188
  mounted() {},
283
189
  methods: {
190
+ getFileList() {
191
+ const fileList = []
192
+ if (this.fileInfo?.serverPath) {
193
+ const uuids = this.fileInfo.serverPath.split(',')
194
+ const names = this.fileInfo.showName.split(',')
195
+ for (let i = 0; i < uuids.length; i++) {
196
+ if (uuids[i]) {
197
+ fileList.push({
198
+ serverPath: uuids[i],
199
+ showName: names[i]
200
+ })
201
+ }
202
+ }
203
+ }
204
+ return fileList
205
+ },
284
206
  openAnnexUpload() {
285
207
  if (this.openFsUpload) {
286
208
  this.annexUploadFlag = true
@@ -320,6 +242,7 @@ export default {
320
242
  // 上传成功
321
243
  uploadOnSuccess(response, file) {
322
244
  if (response) {
245
+ ElMessage.success(this.$t('fsUpload.uploadSucceeded'))
323
246
  $emit(this, 'upload-success', {
324
247
  showName: response.name,
325
248
  serverPath: response.serverPath
@@ -339,100 +262,33 @@ export default {
339
262
  }
340
263
  this.annexUploadFlag = false
341
264
  },
342
- preview() {
343
- this.fileList.length = 0
344
- const uuids = this.fileInfo.serverPath.split(',')
345
- const baseURL = window.$vueApp.config.globalProperties.baseURL
346
- const baseAPI = window.$vueApp.config.globalProperties.baseAPI
347
- let tempAction = baseURL + '/common/fs-upload/search-file-names'
348
- if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
349
- tempAction = baseAPI + '/api/search-file-names'
350
- }
351
- this.$http.post(tempAction, uuids).then((result) => {
352
- uuids.forEach((uuid) => {
353
- this.fileList.push({ showName: result[uuid], serverPath: uuid })
354
- })
355
- this.showFileList = this.fileList
356
- this.showPreviewMulti = true
357
- })
358
- },
359
- previewSingle(fileInfo) {
360
- fileInfo = packageFile(fileInfo.showName, fileInfo.serverPath)
361
- if (isImage(fileInfo.showName)) {
362
- this.previewImageInfo = fileInfo
363
- this.showPreviewSingleImage = true
364
- } else {
365
- this.previewDoc(fileInfo)
366
- }
367
- },
368
- previewDoc(file) {
369
- const showName = file.showName.replace('#', '~~').replace('?', '~$').replace('&', '$')
370
- const token = getToken()
371
- if (window.$vueApp.config.globalProperties.customPreviewUrl) {
372
- window.open(
373
- getSystemFrontendUrl(window.$vueApp.config.globalProperties.portalUrl) +
374
- '/#/file-service/preview?serverPath=' +
375
- file.serverPath +
376
- '&showName=' +
377
- encodeURI(showName),
378
- file.showName
379
- )
380
- } else {
381
- let previewUrl
382
- const myShowName = showName
383
- const uuid = file.serverPath
384
- let baseUrl = window.$vueApp.config.globalProperties.baseURL
385
- if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
386
- baseUrl = window.$vueApp.config.globalProperties.baseAPI
387
- }
388
- if (window.$vueApp.config.globalProperties.kkFileViewUrl) {
389
- const originUrl =
390
- baseUrl +
391
- '/common/super-form/downloads?jwt=' +
392
- token +
393
- '&showName=' +
394
- encodeURI(myShowName) +
395
- '&serverPath=' +
396
- uuid
397
- //要预览文件的访问地址
398
- const myPreviewUrl = originUrl + '&fullfilename=' + myShowName
399
- // http://127.0.0.1:8012/onlinePreview
400
- previewUrl =
401
- window.$vueApp.config.globalProperties.kkFileViewUrl +
402
- '?url=' +
403
- encodeURIComponent(Base64.encode(myPreviewUrl))
404
- } else {
405
- previewUrl = baseUrl + '/common/fs-upload/preview?jwt=' + token
406
- previewUrl = previewUrl + '&showName=' + encodeURI(myShowName) + '&serverPath=' + uuid
407
- }
408
- window.open(previewUrl, myShowName)
409
- }
410
- },
411
- deleteRow(index) {
412
- const deleteFile = this.showFileList[index]
265
+ deleteRow(deleteFile) {
413
266
  // this.fileList.splice(index, 1)
414
267
  const nameArr = []
415
268
  const pathArr = []
416
- for (let i = 0; i < this.showFileList.length; i++) {
417
- if (i !== index) {
418
- nameArr.push(this.showFileList[i].showName)
419
- pathArr.push(this.showFileList[i].serverPath)
269
+ let deleteFileIndex = -1
270
+ for (let i = 0; i < this.fileList.length; i++) {
271
+ if (this.fileList[i].serverPath !== deleteFile.serverPath) {
272
+ nameArr.push(this.fileList[i].showName)
273
+ pathArr.push(this.fileList[i].serverPath)
274
+ } else {
275
+ deleteFileIndex = i
420
276
  }
421
277
  }
422
278
  if (nameArr.length === 0) {
423
279
  this.fileInfo.showName = null
424
280
  this.fileInfo.serverPath = null
425
- this.showFileList = []
281
+ this.fileList.length = 0
426
282
  $emit(this, 'delete-success', { deleteFile: deleteFile, all: [] })
427
- $emit(this, 'delete', [], index)
283
+ $emit(this, 'delete', [], deleteFileIndex)
428
284
  } else {
429
285
  this.fileInfo.showName = nameArr.join(',')
430
286
  this.fileInfo.serverPath = pathArr.join(',')
431
287
  $emit(this, 'delete-success', {
432
288
  deleteFile: deleteFile,
433
- all: this.showFileList
289
+ all: this.fileList
434
290
  })
435
- $emit(this, 'delete', this.showFileList, index)
291
+ $emit(this, 'delete', this.fileList, deleteFileIndex)
436
292
  }
437
293
  },
438
294
  // 移动端上传成功
@@ -132,9 +132,9 @@ import FsDragUpload from './fs-drag-upload.vue'
132
132
  import FsButtonUpload from './fs-button-upload.vue'
133
133
  import FileUploadMobile from './file-upload-mobile/file-upload.vue'
134
134
  import FileUploadInputMobile from './file-upload-mobile/file-upload-input.vue'
135
+ import FsUploadList from '../../fs-upload-list/src/fs-upload-list.vue'
135
136
  import { ref, defineProps } from 'vue'
136
137
  import { getReplaceUrlDomain, isMobileBrowser, isPlateSys } from '../../../src/utils/common-util'
137
- import { Download } from '@element-plus/icons-vue'
138
138
  const props = defineProps({
139
139
  openFsUpload: {
140
140
  type: Object,
@@ -212,7 +212,7 @@ const customFormatter = {
212
212
  // console.log('getHyperLinkSetting--resut=', result)
213
213
  if (result && result.label && result.label !== '') {
214
214
  console.log('label存在')
215
- } else if(result && (result.displayTextJudge === undefined || result.displayTextJudge)){
215
+ } else if (result && (result.displayTextJudge === undefined || result.displayTextJudge)) {
216
216
  result.label = this.objectPropValueTwo(row, column)
217
217
  }
218
218
  if (result && result.title && result.title !== '') {
@@ -249,14 +249,8 @@ const customFormatter = {
249
249
  // 解析是否需要显示该超链接
250
250
  let canClick = true
251
251
  const gridParams = store.get(listCode)
252
- console.log('super-grid---jumpPageLink--jumpPageSetting=', jumpPageSetting)
253
252
  if (jumpPageSetting.beforeClick) {
254
253
  const funName = jumpPageSetting.beforeClick
255
- console.log('super-grid---jumpPageLink--jumpPageSetting.beforeClick=', funName)
256
- console.log(
257
- 'super-grid---jumpPageLink--gridParams.options[eventCallBack]=',
258
- gridParams.options['eventCallBack']
259
- )
260
254
  if (
261
255
  gridParams.options &&
262
256
  gridParams.options['eventCallBack'] &&
@@ -287,11 +281,23 @@ const customFormatter = {
287
281
  if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
288
282
  parentFormData = gridParams.options.extraParam.entityMap
289
283
  }
290
- console.log('gridParams.options.extraParam.entityMap', gridParams.options.extraParam)
291
-
284
+ if (gridParams.isSubTableShowPage && jumpPageSetting.jumpPageAdditional?.length > 0) {
285
+ // 如果是子表,则需要把配置的 ${data.字段} 改成 ${parent.字段}
286
+ jumpPageSetting.jumpPageAdditional.forEach((item, index) => {
287
+ if (item && item.paramValue) {
288
+ if (item.paramValue.startsWith('${data.')) {
289
+ item.paramValue = item.paramValue.replace('${data.', '${parent.')
290
+ }
291
+ }
292
+ })
293
+ }
292
294
  /// 把父页面的pageData传给弹出的页面或新页签
293
295
  const copyPageData = JSON.parse(
294
- JSON.stringify(gridParams.pageContext && gridParams.pageContext.entity && gridParams.pageContext.entity.page ? gridParams.pageContext.entity.page : {})
296
+ JSON.stringify(
297
+ gridParams.pageContext && gridParams.pageContext.entity && gridParams.pageContext.entity.page
298
+ ? gridParams.pageContext.entity.page
299
+ : {}
300
+ )
295
301
  )
296
302
  jumpPageSetting._pageData = copyPageData
297
303
  jumpToPage(
@@ -699,6 +699,10 @@ export default {
699
699
  const colConfigure = gridParams.colConfigureMap ? gridParams.colConfigureMap[this.column.prop] : null
700
700
  const runtimeInfo = colConfigure && colConfigure.runtime ? colConfigure.runtime : {}
701
701
  const designProperty = runtimeInfo.props ? runtimeInfo.props : {}
702
+ let systemCode
703
+ if (gridParams && gridParams.basicInfo && gridParams.basicInfo.systemCode) {
704
+ systemCode = gridParams.basicInfo.systemCode
705
+ }
702
706
  return {
703
707
  deptManTree: false, // 是否是部门人员树
704
708
  isMultiTree: false, // 是否是多选树
@@ -713,7 +717,6 @@ export default {
713
717
  annexUploadFlag: false,
714
718
  defaultAction,
715
719
  fileMultiple: false, // 文件是否多选
716
- lastFileName: '',
717
720
  fileList: [],
718
721
  lastServerName: '',
719
722
  fileSetObj: null,
@@ -764,7 +767,8 @@ export default {
764
767
  baseURL,
765
768
  colConfigure, // v10字段配置原信息
766
769
  designProperty, // 字段配置
767
- myCustomParams: {}
770
+ myCustomParams: {},
771
+ systemCode
768
772
  }
769
773
  },
770
774
  computed: {},
@@ -838,7 +842,6 @@ export default {
838
842
  this.fileMultiple = true
839
843
  }
840
844
  this.fileList = getFileList(this.row, this.column, this.isSql)
841
- this.packageFileNameWithFileList()
842
845
  }
843
846
 
844
847
  if (this.column.componentType === 'inputNumber') {
@@ -1323,6 +1326,7 @@ export default {
1323
1326
  this.radioStorageFile(fileSetObj, responseFile)
1324
1327
  }
1325
1328
  this.fileList = getFileList(this.row, this.column, this.isSql)
1329
+ console.log('superGrid---uploadOnSuccess----fileList=', this.fileList)
1326
1330
  }
1327
1331
  }
1328
1332
  }
@@ -1368,7 +1372,6 @@ export default {
1368
1372
  }
1369
1373
  }
1370
1374
  }
1371
- this.packageFileNameWithFileList([{ showName: responseFile.name, serverPath: responseFile.serverPath }])
1372
1375
  },
1373
1376
  // 多选上传完成后存储
1374
1377
  multiStorage(fileSetObj, responseFile) {
@@ -1453,7 +1456,6 @@ export default {
1453
1456
  serverPath: pathNameStr
1454
1457
  })
1455
1458
  }
1456
- this.packageFileNameWithFileList()
1457
1459
  },
1458
1460
  // 多选上传完成后存储 移动端时
1459
1461
  multiStorageMobile(fileSetObj, responseFiles) {
@@ -1545,7 +1547,6 @@ export default {
1545
1547
  serverPath: pathNameStr
1546
1548
  })
1547
1549
  }
1548
- this.packageFileNameWithFileList()
1549
1550
  },
1550
1551
  responseFileToFileObj(fileSetObj, responseFile) {
1551
1552
  const fileObj = {}
@@ -1601,11 +1602,12 @@ export default {
1601
1602
  }
1602
1603
  },
1603
1604
  deleteFile(fileList, index) {
1605
+ console.log(JSON.stringify(fileList))
1604
1606
  this.fileList = fileList
1605
1607
  if (index !== undefined && index !== -1) {
1606
1608
  this.fileList.splice(index, 1)
1607
1609
  }
1608
- this.packageFileNameWithFileList()
1610
+ console.log(JSON.stringify(this.fileList))
1609
1611
  if (this.column.fileSet && this.column.fileSet !== '') {
1610
1612
  const fileSetObj = JSON.parse(this.column.fileSet)
1611
1613
  if (fileSetObj) {
@@ -1620,26 +1622,6 @@ export default {
1620
1622
  }
1621
1623
  }
1622
1624
  },
1623
- packageFileNameWithFileList(fileList) {
1624
- if (!fileList) {
1625
- fileList = this.fileList
1626
- }
1627
- if (fileList && fileList.length > 0) {
1628
- let fileNames = ''
1629
- let fileServerName = ''
1630
- fileList.forEach((item) => {
1631
- fileNames += item.showName + ','
1632
- fileServerName += item.serverPath + ','
1633
- })
1634
- if (fileNames && fileNames.indexOf(',') > 0) {
1635
- this.lastFileName = fileNames.substring(0, fileNames.lastIndexOf(','))
1636
- this.lastServerName = fileServerName.substring(0, fileServerName.lastIndexOf(','))
1637
- }
1638
- } else {
1639
- this.lastFileName = null
1640
- this.lastServerName = null
1641
- }
1642
- },
1643
1625
  // fileList 赋值Row
1644
1626
  standardToOtherFiles(fileSetObj, keyValueParam) {
1645
1627
  if (fileSetObj.childAnnexDataTableCode) {
@@ -1966,7 +1948,7 @@ export default {
1966
1948
  const message = {
1967
1949
  type: 'scan',
1968
1950
  componentId: this.componentId,
1969
- systemCode: this.pageContext.systemCode,
1951
+ systemCode: this.systemCode,
1970
1952
  listCode: this.listCode
1971
1953
  }
1972
1954
  if (this.isDingTalk) {
@@ -107,6 +107,7 @@
107
107
  :is-show="operation.isShow"
108
108
  :label="operation.props.label ? operation.props.label : row[column.prop]"
109
109
  :on-click="operation.onClick"
110
+ :operation="operation"
110
111
  :operation-index="operationIndex"
111
112
  :operation-setting="operation.props"
112
113
  :event-name="operation.eventName"
@@ -199,7 +200,6 @@
199
200
  <span v-if="column.formatter && column.formatter.type === 'files'" type="primary">
200
201
  <span
201
202
  :id="column.prop + 'DomData' + rowIndex"
202
- :style="textOverflow === 'newline' ? {} : { width: cellWidth + 'px' }"
203
203
  :title="isShowOverflowTooltip ? $escapeHtml(getLabel(row)) : ''"
204
204
  :class="textOverflow === 'newline' ? 'wrap-text' : 'ellipsis cell--span'"
205
205
  >
@@ -264,15 +264,19 @@
264
264
  }}</span>
265
265
  </template>
266
266
  <template v-else>
267
- <span v-if="column.componentType === 'annex' || column.componentType === 'multipartUpload'" type="primary">
267
+ <span
268
+ v-if="column.componentType === 'annex' || column.componentType === 'multipartUpload'"
269
+ type="primary"
270
+ style="width: 100%"
271
+ >
268
272
  <span
269
273
  v-if="isShowOverflowTooltip"
270
274
  :id="column.prop + 'DomData' + rowIndex"
271
- :style="textOverflow === 'newline' ? {} : { width: cellWidth + 'px' }"
272
275
  :title="$escapeHtml(getLabel(row))"
273
276
  :class="textOverflow === 'newline' ? 'wrap-text' : 'ellipsis cell--span'"
274
277
  >
275
278
  <FsPreview
279
+ :width="cellWidth"
276
280
  :entity="row"
277
281
  :file-set-obj="getFileObj(column.fileSet)"
278
282
  :is-sql="isSql"
@@ -291,7 +295,6 @@
291
295
  <span v-else-if="column.formatter && column.formatter.type === 'files'">
292
296
  <span
293
297
  :id="column.prop + 'DomData' + rowIndex"
294
- :style="textOverflow === 'newline' ? {} : { width: cellWidth + 'px' }"
295
298
  :title="isShowOverflowTooltip ? $escapeHtml(getLabel(row)) : ''"
296
299
  :class="textOverflow === 'newline' ? 'wrap-text' : 'ellipsis cell--span'"
297
300
  >
@@ -704,7 +707,7 @@ export default {
704
707
  }
705
708
  }
706
709
  this.setScanRuleSets()
707
- this.requiredClass = this.isRequired(this.row.$editing) ? 'm-requried' : ''
710
+ this.requiredClass = this.isRequired(this.row.$editing) ? 'm-requried column-text-main' : ''
708
711
  },
709
712
  mounted() {
710
713
  if (this.controlConfig) {
@@ -1219,7 +1222,7 @@ export default {
1219
1222
  }
1220
1223
  },
1221
1224
  changeRequired(required) {
1222
- this.requiredClass = required ? 'm-requried' : ''
1225
+ this.requiredClass = required ? 'm-requried column-text-main' : ''
1223
1226
  },
1224
1227
  openPageEvent(openPageParams) {
1225
1228
  console.log('normalColumnContent----openPageEvent----', openPageParams)
@@ -151,7 +151,10 @@ export default {
151
151
  if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
152
152
  parentFormData = gridParams.options.extraParam.entityMap
153
153
  }
154
-
154
+ let controlConfig = {}
155
+ if (this.column.controlConfig) {
156
+ controlConfig = JSON.parse(this.column.controlConfig)
157
+ }
155
158
  return {
156
159
  selectRow: null,
157
160
  that: this,
@@ -162,7 +165,8 @@ export default {
162
165
  isShowAdd: false, // 是否显示表头的新增按钮
163
166
  cellWidth: null,
164
167
  parentFormData,
165
- options
168
+ options,
169
+ controlConfig
166
170
  }
167
171
  },
168
172
  computed: {
@@ -290,9 +294,9 @@ export default {
290
294
  gridParams.options.showOperationButton
291
295
  },
292
296
  mounted() {
293
- if(this.column.prop === 'operation'){
297
+ if (this.column.prop === 'operation') {
294
298
  const that = this
295
- eventBus.$on('change-add-state',(value)=>{
299
+ eventBus.$on('change-add-state', (value) => {
296
300
  that.isShowAdd = value
297
301
  })
298
302
  }
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <!--将@click改为@mousedown.native是因为操作列保存按钮时事件和input等组件的@blur冲突,导致保存需要保存两次,因为
3
3
  @blur先于@click执行的,所以只会执行@blur,@click就失效了,@mousedown是先于@blur执行的-->
4
- <span :style="myStyle">
4
+ <span class="table-operation-row-btn" :style="myStyle">
5
5
  <template v-if="isShowButton()">
6
6
  <el-tooltip :disabled="tooltipDisabled" :content="label" placement="top">
7
- <template v-if="operationSettingData.permission">
7
+ <template v-if="operationSettingData?.permission">
8
8
  <component
9
9
  v-bind="operationSettingData"
10
10
  :is="isElementType"
@@ -77,9 +77,13 @@ export default {
77
77
  type: String,
78
78
  default: null,
79
79
  },
80
+ operation: {
81
+ type: Object,
82
+ default: () => ({}),
83
+ },
80
84
  operationSetting: {
81
85
  type: Object,
82
- default: null,
86
+ default: () => ({}),
83
87
  },
84
88
  operationIndex: {
85
89
  type: Number,
@@ -148,16 +152,16 @@ export default {
148
152
  },
149
153
  // 后置图标
150
154
  suffixIcon() {
151
- if(['right'].includes(this.operationSettingData.iconPosition)) return this.operationSetting.iconValue
155
+ if(['right'].includes(this.operationSetting.iconPosition)) return this.operationSetting.iconValue
152
156
  return undefined
153
157
  },
154
158
  // 是否显示文字按钮 > 图标模式
155
159
  isTextIcon() {
156
160
  if (this.isTableBtnLinkShow) {
157
- if (this.operationSettingData.isTextIcon === undefined) {
161
+ if (this.operationSetting.isTextIcon === undefined) {
158
162
  return this.isSaveRow || this.isDeleteRow || this.isEditRow || this.isRestoreRow
159
163
  }
160
- return this.operationSettingData.isTextIcon
164
+ return this.operationSetting.isTextIcon
161
165
  } else {
162
166
  return false
163
167
  }
@@ -172,14 +176,14 @@ export default {
172
176
  },
173
177
  // 是否自动开启表格 按钮 转 文字按钮
174
178
  isTableBtnLinkShow() {
175
- if (this.operationSetting.text) return true
179
+ if (this.operationSetting?.text) return true
176
180
  if (this.isTableBtnLink && this.elementType === 'el-button') {
177
- return [this.operationSetting.text, this.operationSetting.plain, this.operationSetting.round].every(v => v === undefined)
181
+ return [this.operationSetting?.text, this.operationSetting?.plain, this.operationSetting?.round].every(v => v === undefined)
178
182
  }
179
183
  return false
180
184
  },
181
185
  operationSettingData() {
182
- const dataList = { ...this.operationSetting }
186
+ const dataList = { ...(this.operationSetting ?? {}) }
183
187
  if (this.isTableBtnLinkShow) {
184
188
  dataList.underline = false
185
189
  delete dataList.text
@@ -278,7 +278,7 @@
278
278
  @focus="selectRow(scope.row)"
279
279
  @input="setValueToModelProp(scope.$index, $event)"
280
280
  />
281
- <span v-else-if="customComponent(scope.row.prop) === true">
281
+ <span v-else-if="customComponent(scope.row.prop) === true" style="width: 100%">
282
282
  <component
283
283
  :is="scope.row.componentName"
284
284
  :ref="scope.row.componentName"