agilebuilder-ui 1.1.45 → 1.1.46-sit2

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 (68) hide show
  1. package/lib/{401-1bde8dc9.js → 401-75472dcd.js} +1 -1
  2. package/lib/{404-48d76996.js → 404-e5ce8455.js} +1 -1
  3. package/lib/{iframe-page-77e184a0.js → iframe-page-9d5ce6b0.js} +1 -1
  4. package/lib/index-789fbe10.js +92825 -0
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +33 -32
  7. package/lib/super-ui.umd.cjs +172 -133
  8. package/lib/{tab-content-iframe-index-39745d49.js → tab-content-iframe-index-47fae8cf.js} +1 -1
  9. package/lib/{tab-content-index-65696e56.js → tab-content-index-6e5f5717.js} +1 -1
  10. package/lib/{tache-subprocess-history-ef943f95.js → tache-subprocess-history-1ed95cee.js} +1 -1
  11. package/package.json +7 -2
  12. package/packages/chat-embed/index.ts +6 -0
  13. package/packages/chat-embed/src/chat-embed-message.ts +79 -0
  14. package/packages/chat-embed/src/chat-embed.css +117 -0
  15. package/packages/chat-embed/src/chat-sender.vue +240 -0
  16. package/packages/chat-embed/src/header.vue +50 -0
  17. package/packages/chat-embed/src/index.vue +425 -0
  18. package/packages/chat-embed/src/recommendation-message.vue +37 -0
  19. package/packages/chat-embed/src/util.ts +33 -0
  20. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +42 -34
  21. package/packages/department-tree-inline/src/department-single-tree-inline.vue +53 -42
  22. package/packages/department-tree-inline/src/search-result.vue +187 -219
  23. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +52 -43
  24. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +52 -42
  25. package/packages/department-user-tree-inline/src/search-result.vue +207 -220
  26. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +7 -2
  27. package/packages/empty-state/index.vue +28 -0
  28. package/packages/fs-preview/src/fs-preview.vue +12 -3
  29. package/packages/fs-upload/src/fs-upload-multi.vue +6 -4
  30. package/packages/fs-upload/src/fs-upload-single.vue +7 -6
  31. package/packages/fs-upload/src/fs-upload.vue +3 -1
  32. package/packages/fs-upload/src/see-big-picture.vue +3 -0
  33. package/packages/fs-upload-list/src/fs-upload-list.vue +8 -2
  34. package/packages/fs-upload-new/src/fs-button-upload.vue +11 -4
  35. package/packages/fs-upload-new/src/fs-drag-upload.vue +11 -4
  36. package/packages/fs-upload-new/src/fs-preview-new.vue +8 -5
  37. package/packages/fs-upload-new/src/fs-upload-new.vue +17 -0
  38. package/packages/index.js +16 -13
  39. package/packages/json-view/index.ts +3 -0
  40. package/packages/json-view/json-view-dialog.vue +53 -0
  41. package/packages/json-view/json-view.vue +126 -0
  42. package/packages/plugins/export-data-new.js +2 -0
  43. package/packages/super-grid/src/apis.js +11 -0
  44. package/packages/super-grid/src/components/grid-icon.vue +6 -3
  45. package/packages/super-grid/src/custom-formatter.js +15 -2
  46. package/packages/super-grid/src/dynamic-input.vue +46 -4
  47. package/packages/super-grid/src/formatter.js +5 -1
  48. package/packages/super-grid/src/normal-column-content.vue +31 -38
  49. package/packages/super-grid/src/normal-column.vue +8 -1
  50. package/packages/super-grid/src/row-operation.vue +13 -9
  51. package/packages/super-grid/src/super-grid.vue +21 -8
  52. package/packages/utils/utils.js +26 -9
  53. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +50 -41
  54. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +45 -36
  55. package/src/assets/chat-embed/avatar.png +0 -0
  56. package/src/i18n/langs/cn.js +20 -6
  57. package/src/i18n/langs/en.js +19 -5
  58. package/src/store/modules/chat-ai-store.ts +78 -0
  59. package/src/store/modules/tab-content.js +9 -3
  60. package/src/styles/element-ui.scss +8 -7
  61. package/src/styles/index.scss +45 -0
  62. package/src/utils/chat-ai-util.ts +31 -0
  63. package/src/utils/common-util.js +78 -8
  64. package/src/utils/insert_css.js +14 -1
  65. package/src/utils/jump-page-utils.js +8 -4
  66. package/src/views/dsc-component/Sidebar/SidebarItem.vue +6 -0
  67. package/src/views/dsc-component/tabs/tab-content.vue +6 -0
  68. package/lib/index-465b0d69.js +0 -73558
@@ -1,7 +1,9 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="type && type.indexOf('custom:') >= 0 && componentName != ''"
4
- :style="row.validateErrorField && row.validateErrorField === column.prop ? 'border:1px solid red' : ''"
4
+ :class="
5
+ !this.isFormSubTable && row.validateErrorField && row.validateErrorField === column.prop ? 'required_bg' : ''
6
+ "
5
7
  >
6
8
  <component
7
9
  :is="componentName"
@@ -26,7 +28,12 @@
26
28
  @input="cellEvent('input', $event)"
27
29
  />
28
30
  </div>
29
- <div v-else :style="row.validateErrorField && row.validateErrorField === column.prop ? 'border:1px solid red' : ''">
31
+ <div
32
+ v-else
33
+ :class="
34
+ !this.isFormSubTable && row.validateErrorField && row.validateErrorField === column.prop ? 'required_bg' : ''
35
+ "
36
+ >
30
37
  <!--必须有@input ,否则无法输入值-->
31
38
  <el-date-picker
32
39
  v-if="type === 'year' || type === 'month' || type === 'week'"
@@ -293,6 +300,7 @@
293
300
  @delete="deleteFile"
294
301
  @delete-success="deleteSuccess"
295
302
  @upload-success="uploadOnSuccess"
303
+ @on-error="onError"
296
304
  />
297
305
  <multipart-upload
298
306
  v-else-if="type === 'multipartUpload'"
@@ -713,7 +721,6 @@ export default {
713
721
  newValue: null,
714
722
  // disabled, // 当前用户是否禁止编辑该字段/ 是否新增行
715
723
  componentName: '',
716
- validateErrorField: '', // 保存行记录时,验证失败的字段名
717
724
  annexUploadFlag: false,
718
725
  defaultAction,
719
726
  fileMultiple: false, // 文件是否多选
@@ -768,7 +775,8 @@ export default {
768
775
  colConfigure, // v10字段配置原信息
769
776
  designProperty, // 字段配置
770
777
  myCustomParams: {},
771
- systemCode
778
+ systemCode,
779
+ isFormSubTable: false // 是否是表单子表
772
780
  }
773
781
  },
774
782
  computed: {},
@@ -816,6 +824,9 @@ export default {
816
824
  },
817
825
  created() {
818
826
  const gridParams = store.get(this.listCode)
827
+ if (gridParams && gridParams.options && gridParams.options.isFormSubTable) {
828
+ this.isFormSubTable = gridParams.options.isFormSubTable
829
+ }
819
830
  if (this.controlConfig?.customParams) {
820
831
  if (!this.pageContext) {
821
832
  this.pageContext = gridParams.options.pageContext
@@ -1111,6 +1122,7 @@ export default {
1111
1122
  val = null
1112
1123
  }
1113
1124
  $emit(this, 'update:value', val)
1125
+ this.clearValidateErrorField()
1114
1126
  isInputVal = true
1115
1127
  // 在callCustomEvent方法中使用了innerValue属性
1116
1128
  this.innerValue = val
@@ -1127,9 +1139,11 @@ export default {
1127
1139
  if (this.innerValue.indexOf(saveAll) < 0) {
1128
1140
  // 不包含“全选”时才走input,全选是在multiselectchange中特殊处理的
1129
1141
  $emit(this, 'update:value', this.innerValue.join(','))
1142
+ this.clearValidateErrorField()
1130
1143
  }
1131
1144
  } else {
1132
1145
  $emit(this, 'update:value', this.innerValue)
1146
+ this.clearValidateErrorField()
1133
1147
  }
1134
1148
  isInputVal = true
1135
1149
  } else if (eventName === 'input' && isInputEventUpdateValue !== undefined && isInputEventUpdateValue === true) {
@@ -1137,6 +1151,7 @@ export default {
1137
1151
  // 在callCustomEvent方法中使用了innerValue属性
1138
1152
  this.innerValue = event
1139
1153
  $emit(this, 'update:value', event)
1154
+ this.clearValidateErrorField()
1140
1155
  isInputVal = true
1141
1156
  } else if (eventName === 'blur' && !this.isSelectControll()) {
1142
1157
  // 为了使输入时流畅,所以在blur时调用input,更改组件的数据
@@ -1193,9 +1208,16 @@ export default {
1193
1208
  }
1194
1209
  // 必须这样调用input事件 ,否则组件无法输入值
1195
1210
  $emit(this, 'update:value', this.innerValue) // 现在的用法
1211
+ this.clearValidateErrorField()
1196
1212
  // 扫描组件时监控值变化
1197
1213
  this.watchScanValueChange(this.innerValue)
1198
1214
  },
1215
+ // 清空单元格必填样式
1216
+ clearValidateErrorField() {
1217
+ if (this.row.validateErrorField) {
1218
+ this.row.validateErrorField = undefined
1219
+ }
1220
+ },
1199
1221
  // 是否是输入框
1200
1222
  isInputControl() {
1201
1223
  return this.type === 'input' || this.type === 'textarea'
@@ -2075,6 +2097,26 @@ export default {
2075
2097
  } else {
2076
2098
  this.departmentInfo = []
2077
2099
  }
2100
+ },
2101
+ onError(error) {
2102
+ console.error('Upload error:', error)
2103
+ if (error.message) {
2104
+ let message = JSON.parse(error.message)
2105
+ if (message && message.message) {
2106
+ message = JSON.parse(message.message)
2107
+ }
2108
+ this.$message({
2109
+ type: 'error',
2110
+ message: message,
2111
+ showClose: true
2112
+ })
2113
+ } else {
2114
+ this.$message({
2115
+ type: 'error',
2116
+ message: this.$t('fsUpload.uploadFailed'),
2117
+ showClose: true
2118
+ })
2119
+ }
2078
2120
  }
2079
2121
  }
2080
2122
  }
@@ -179,7 +179,7 @@ export function doFormatWithValueSet(column, value) {
179
179
  label.push(item[0].label)
180
180
  }
181
181
  })
182
- if(label.length > 0){
182
+ if (label.length > 0) {
183
183
  value = label.join(',')
184
184
  }
185
185
  } else {
@@ -194,3 +194,7 @@ export function doFormatWithValueSet(column, value) {
194
194
  }
195
195
  return value
196
196
  }
197
+
198
+ export function formatDateTime(type, value, format) {
199
+ return formatter[type](value, { format: format })
200
+ }
@@ -34,7 +34,7 @@
34
34
  @change-required="changeRequired"
35
35
  @open-page="openPageEvent"
36
36
  />
37
- <div v-else class="column-text-main">
37
+ <div v-else :class=" (options?.configureObj?.props?.base?.columnEditable ?? false) ? 'column-text-main' : ''">
38
38
  <div
39
39
  v-if="
40
40
  lineEdit.editable &&
@@ -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"
@@ -147,7 +148,7 @@
147
148
  columnFormatter.options.format &&
148
149
  columnFormatter.options.format !== ''
149
150
  "
150
- :class="isShowForm ? '' : 'cell--span'"
151
+ :class="textOverflow === 'newline' ? 'wrap-text' : 'ellipsis cell--span'"
151
152
  >
152
153
  <!--:key="column.prop+'_'+rowIndex+'_'+currentPage" 为了解决子表分页时,新增自动跳转到下一页,第一条记录的自定义控件被复用,导致业务逻辑没执行 -->
153
154
  <component
@@ -172,7 +173,7 @@
172
173
  :component-id="componentId"
173
174
  :additional-settings="additionalSettings"
174
175
  :page-context="options?.pageContext"
175
- :custom-params="controlConfig ? controlConfig.customParams : null"
176
+ :custom-params="getCustomParams()"
176
177
  @prohibitToEdit="prohibitToEdit"
177
178
  @refresh-list="refreshList"
178
179
  /></span>
@@ -221,12 +222,7 @@
221
222
  @click="clickHyperLink(column, row, listCode, rowIndex)"
222
223
  > -->
223
224
  <el-link
224
- v-else-if="
225
- columnFormatter !== undefined &&
226
- columnFormatter.type !== undefined &&
227
- columnFormatter.type === 'hyperlinks' &&
228
- getMyHyperLinkSetting(row, rowIndex).visible === true
229
- "
225
+ v-else-if="columnFormatter?.type === 'hyperlinks' && linkObject.visible === true"
230
226
  :type="getLinkType(row)"
231
227
  @click="clickHyperLink(column, row, listCode, rowIndex)"
232
228
  >
@@ -234,20 +230,14 @@
234
230
  v-if="isShowOverflowTooltip"
235
231
  :id="column.prop + 'DomData' + rowIndex"
236
232
  :style="textOverflow === 'newline' ? {} : { width: cellWidth + 'px' }"
237
- :title="getMyHyperLinkSetting(row, rowIndex).title"
233
+ :title="linkObject.title"
238
234
  :class="textOverflow === 'newline' ? 'wrap-text' : 'ellipsis cell--span'"
239
- >{{ getMyHyperLinkSetting(row, rowIndex).label }}
240
- <SuperIcon
241
- v-if="getMyHyperLinkSetting(row, rowIndex).icon"
242
- :iconValue="getMyHyperLinkSetting(row, rowIndex).icon"
243
- ></SuperIcon>
235
+ >{{ linkObject.label }}
236
+ <SuperIcon v-if="linkObject.icon" :iconValue="linkObject.icon"></SuperIcon>
244
237
  </span>
245
238
  <span v-else :id="column.prop + 'DomData' + rowIndex" :class="isShowForm ? '' : 'cell--span'"
246
- >{{ getMyHyperLinkSetting(row, rowIndex).label }}
247
- <SuperIcon
248
- v-if="getMyHyperLinkSetting(row, rowIndex).icon"
249
- :iconValue="getMyHyperLinkSetting(row, rowIndex).icon"
250
- ></SuperIcon>
239
+ >{{ linkObject.label }}
240
+ <SuperIcon v-if="linkObject.icon" :iconValue="linkObject.icon"></SuperIcon>
251
241
  </span>
252
242
  </el-link>
253
243
  <span
@@ -307,12 +297,7 @@
307
297
  </span>
308
298
  <!-- 超链接 -->
309
299
  <el-link
310
- v-else-if="
311
- columnFormatter !== undefined &&
312
- columnFormatter.type !== undefined &&
313
- columnFormatter.type === 'hyperlinks' &&
314
- getMyHyperLinkSetting(row, rowIndex).visible === true
315
- "
300
+ v-else-if="columnFormatter?.type === 'hyperlinks' && linkObject.visible"
316
301
  type="primary"
317
302
  @click="clickHyperLink(column, row, listCode, rowIndex)"
318
303
  >
@@ -320,20 +305,14 @@
320
305
  v-if="isShowOverflowTooltip"
321
306
  :id="column.prop + 'DomData' + rowIndex"
322
307
  :style="textOverflow === 'newline' ? {} : { width: cellWidth + 'px' }"
323
- :title="$escapeHtml(getMyHyperLinkSetting(row, rowIndex).title)"
308
+ :title="$escapeHtml(linkObject.title)"
324
309
  :class="textOverflow === 'newline' ? 'wrap-text' : 'ellipsis cell--span'"
325
- >{{ $escapeHtml(getMyHyperLinkSetting(row, rowIndex).label) }}
326
- <SuperIcon
327
- v-if="getMyHyperLinkSetting(row, rowIndex).icon"
328
- :iconValue="getMyHyperLinkSetting(row, rowIndex).icon"
329
- ></SuperIcon>
310
+ >{{ $escapeHtml(linkObject.label) }}
311
+ <SuperIcon v-if="linkObject.icon" :iconValue="linkObject.icon"></SuperIcon>
330
312
  </span>
331
313
  <span v-else :id="column.prop + 'DomData' + rowIndex" :class="isShowForm ? '' : 'cell--span'"
332
- >{{ $escapeHtml(getMyHyperLinkSetting(row, rowIndex).label) }}
333
- <SuperIcon
334
- v-if="getMyHyperLinkSetting(row, rowIndex).icon"
335
- :iconValue="getMyHyperLinkSetting(row, rowIndex).icon"
336
- ></SuperIcon>
314
+ >{{ $escapeHtml(linkObject.label) }}
315
+ <SuperIcon v-if="linkObject.icon" :iconValue="linkObject.icon"></SuperIcon>
337
316
  </span>
338
317
  </el-link>
339
318
  <!-- 富文本 -->
@@ -554,7 +533,8 @@ export default {
554
533
  requiredClass: '',
555
534
  lineEdit,
556
535
  options,
557
- textOverflow
536
+ textOverflow,
537
+ linkObject: {}
558
538
  }
559
539
  },
560
540
  computed: {
@@ -707,6 +687,9 @@ export default {
707
687
  }
708
688
  this.setScanRuleSets()
709
689
  this.requiredClass = this.isRequired(this.row.$editing) ? 'm-requried column-text-main' : ''
690
+ if (this.columnFormatter?.type === 'hyperlinks') {
691
+ this.linkObject = this.getMyHyperLinkSetting(this.row, this.rowIndex)
692
+ }
710
693
  },
711
694
  mounted() {
712
695
  if (this.controlConfig) {
@@ -1280,6 +1263,16 @@ export default {
1280
1263
  }
1281
1264
  }
1282
1265
  return true
1266
+ },
1267
+ getCustomParams() {
1268
+ if (this.column.formatter.type === 'customControl') {
1269
+ if (this.column.formatter?.options?.controlConfig) {
1270
+ const controlConfig = JSON.parse(this.column.formatter.options.controlConfig)
1271
+ if (controlConfig && controlConfig.customParams) {
1272
+ return formatCustomParams(controlConfig.customParams, this.options?.pageContext, this.row)
1273
+ }
1274
+ }
1275
+ }
1283
1276
  }
1284
1277
  },
1285
1278
  emits: ['refresData', 'refresPortData', 'refresPortsData', 'refresMainTableFields', 'prohibitToEdit']
@@ -49,6 +49,8 @@
49
49
  :row-index="scope.$index"
50
50
  :line-edit="lineEdit"
51
51
  :custom-format="customFormat"
52
+ :class="isValidateError(scope.row,scope.$index)?'required_bg required-corner':''"
53
+ :style="isValidateError(scope.row,scope.$index)?'display:block;':''"
52
54
  @open-page="openPageEvent"
53
55
  @refresData="refresData"
54
56
  @refresh-list="refreshList"
@@ -60,7 +62,6 @@
60
62
  </template>
61
63
  </el-table-column>
62
64
  </template>
63
-
64
65
  <script>
65
66
  import { CirclePlus, ZoomIn as ElIconZoomIn } from '@element-plus/icons-vue'
66
67
  import { $emit, $off, $on } from '../../utils/gogocodeTransfer'
@@ -77,6 +78,7 @@ import RichEditorViewer from '../../rich-editor/viewer.vue'
77
78
  import GridIcon from './components/grid-icon.vue'
78
79
  import NormalColumnContent from './normal-column-content.vue'
79
80
  import eventBus from './eventBus'
81
+ // border:1px solid red;padding: 10px;
80
82
  export default {
81
83
  components: {
82
84
  DynamicInput,
@@ -359,6 +361,11 @@ export default {
359
361
  openPageEvent(openPageParams) {
360
362
  console.log('normalColumn----openPageEvent----', openPageParams)
361
363
  this.$emit('open-page', openPageParams)
364
+ },
365
+ isValidateError(row,rowIndex) {
366
+ // const gridParams = store.get(this.listCode)
367
+ console.log('row.validateErrorField-----',row)
368
+ return this.isFormSubTable && row && row['validateErrorField'] && row['validateErrorField'] === this.column.prop
362
369
  }
363
370
  },
364
371
  emits: ['refresData', 'refresPortData', 'refresPortsData', 'refresMainTableFields', 'prohibitToEdit']
@@ -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
@@ -226,7 +226,7 @@ import { checkPermission } from '../../../src/utils/permission'
226
226
  import { getGuId } from '../../../src/utils/guid.js'
227
227
  // import resizeMixin from '../../../src/mixins/resizeMixin.js';
228
228
  import storeVuex from '../../../src/store'
229
-
229
+ import { setPageDataToChatAiStore, setPageInfoToChatStore } from '../../../src/utils/chat-ai-util.ts'
230
230
  export default {
231
231
  components: {
232
232
  IndexColumn,
@@ -924,6 +924,16 @@ export default {
924
924
  deep: true
925
925
  }
926
926
  )
927
+ if (!this.isFormSubTable) {
928
+ setPageInfoToChatStore(this.pageContext.menuCode, {
929
+ listRefs: [
930
+ {
931
+ ref: this
932
+ }
933
+ ],
934
+ pageType: 'list'
935
+ })
936
+ }
927
937
  })
928
938
  },
929
939
  beforeDestroy() {
@@ -1649,16 +1659,16 @@ export default {
1649
1659
  }
1650
1660
  return isCanRefreshTableData
1651
1661
  },
1652
- getSubTableGridData(subTableData) {
1662
+ getSubTableGridData(subTableData, currentPage) {
1653
1663
  let gridData = subTableData
1654
1664
  if (this.isSubTableShowPage === true) {
1655
1665
  if (subTableData && subTableData.length > 0) {
1656
1666
  // const subTableData = JSON.parse(JSON.stringify(this.subTableData))
1657
1667
  this.pagination.total = subTableData.length
1658
1668
  // 当前是第几页
1659
- let currentPage = this.currentPage
1660
- if (currentPage === undefined || currentPage === null) {
1661
- currentPage = 1
1669
+ let newCurrentPage = currentPage!== undefined && currentPage !== null ?currentPage: this.currentPage
1670
+ if (newCurrentPage === undefined || newCurrentPage === null) {
1671
+ newCurrentPage = 1
1662
1672
  }
1663
1673
  // 每页显示多少条记录
1664
1674
  let pageSize = this.pageSize
@@ -1669,7 +1679,7 @@ export default {
1669
1679
  pageSize = 20
1670
1680
  }
1671
1681
  // 当前页的第一条记录的数组下标
1672
- const startRowIndex = (currentPage - 1) * pageSize
1682
+ const startRowIndex = (newCurrentPage - 1) * pageSize
1673
1683
  // 当前页的最后一条记录的数组下标
1674
1684
  let lastRowIndex = startRowIndex + pageSize
1675
1685
  if (subTableData.length > startRowIndex) {
@@ -2380,13 +2390,13 @@ export default {
2380
2390
  this.changePage()
2381
2391
  }
2382
2392
  },
2383
- changePage() {
2393
+ changePage(currentPage) {
2384
2394
  console.log('点击了分页')
2385
2395
  // 翻页操作会导致筛选项发生变化,所以需要清空已有的
2386
2396
  this.$refs.superGrid?.clearFilter()
2387
2397
  // TODO: 把当前页数、每页条数、查询条件、排序信息传回后台
2388
2398
  if (this.isSubTableShowPage) {
2389
- this.gridData = this.getSubTableGridData(this.subTableData)
2399
+ this.gridData = this.getSubTableGridData(this.subTableData, currentPage)
2390
2400
  const gridParams = store.get(this.code)
2391
2401
  gridParams.gridData = this.gridData
2392
2402
  // 完成深拷贝,复制一份对象,行编辑时使用
@@ -3222,6 +3232,9 @@ export default {
3222
3232
  // this.$refs.superGrid?.toggleRowSelection(newSelection[newSelection.length - 1], false)
3223
3233
  // }
3224
3234
  }
3235
+ if (!this.isFormSubTable) {
3236
+ setPageDataToChatAiStore(newSelection)
3237
+ }
3225
3238
  this.selectionChange(newSelection)
3226
3239
  },
3227
3240
  // 显示移动端查询区域
@@ -6,25 +6,25 @@ const utils = {
6
6
  return [
7
7
  {
8
8
  value: 'name',
9
- label: i18n.t('departmentUserTree.searchFieldUserName'),
9
+ label: i18n.t('departmentUserTree.searchFieldUserName')
10
10
  },
11
11
  {
12
12
  value: 'loginName',
13
- label: i18n.t('departmentUserTree.searchFieldLoginName'),
13
+ label: i18n.t('departmentUserTree.searchFieldLoginName')
14
14
  },
15
15
  { value: 'email', label: i18n.t('departmentUserTree.searchFieldEmail') },
16
16
  {
17
17
  value: 'telephone',
18
- label: i18n.t('departmentUserTree.searchFieldTelephone'),
18
+ label: i18n.t('departmentUserTree.searchFieldTelephone')
19
19
  },
20
20
  {
21
21
  value: 'jobNumber',
22
- label: i18n.t('departmentUserTree.searchFieldJobNumber'),
22
+ label: i18n.t('departmentUserTree.searchFieldJobNumber')
23
23
  },
24
24
  {
25
25
  value: 'honorificName',
26
- label: i18n.t('departmentUserTree.searchFieldHonorificName'),
27
- },
26
+ label: i18n.t('departmentUserTree.searchFieldHonorificName')
27
+ }
28
28
  ]
29
29
  },
30
30
  removeRow(arr, row) {
@@ -70,9 +70,7 @@ const utils = {
70
70
  },
71
71
  createFilter(queryString) {
72
72
  return (restaurant) => {
73
- return (
74
- restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
75
- )
73
+ return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
76
74
  }
77
75
  },
78
76
  handleSelectUtil(item, localStorage) {
@@ -176,5 +174,24 @@ const utils = {
176
174
  }
177
175
  })
178
176
  },
177
+ canShowOrgTree() {
178
+ return new Promise((resolve, reject) => {
179
+ const cacheShowOrgTree = localStorage.getItem('canShowOrgTree')
180
+ if (cacheShowOrgTree === 'false' || cacheShowOrgTree === 'true') {
181
+ let showOrgTree = cacheShowOrgTree === 'true'
182
+ resolve(showOrgTree)
183
+ } else {
184
+ window.$http
185
+ .get(window.$vueApp.config.globalProperties.baseAPI + '/component/organization-trees/show-org-tree')
186
+ .then((canshow) => {
187
+ localStorage.setItem('canShowOrgTree', canshow)
188
+ resolve(canshow)
189
+ })
190
+ .catch((error) => {
191
+ resolve(false)
192
+ })
193
+ }
194
+ })
195
+ }
179
196
  }
180
197
  export default utils