agilebuilder-ui 1.1.48 → 1.1.50-rc1

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 (58) hide show
  1. package/lib/{401-64e37702.js → 401-aaa4054d.js} +1 -1
  2. package/lib/{404-7d89180e.js → 404-ef3b10e9.js} +1 -1
  3. package/lib/{iframe-page-4c8bc1d5.js → iframe-page-28c30283.js} +1 -1
  4. package/lib/{index-5c1112e8.js → index-bece2c1c.js} +19139 -19078
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +99 -99
  8. package/lib/{tab-content-iframe-index-0a36be80.js → tab-content-iframe-index-87ac3b2b.js} +1 -1
  9. package/lib/{tab-content-index-9a271908.js → tab-content-index-956a0533.js} +1 -1
  10. package/lib/{tache-subprocess-history-93d013b2.js → tache-subprocess-history-2c4f98f2.js} +1 -1
  11. package/package.json +1 -1
  12. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +42 -34
  13. package/packages/department-tree-inline/src/department-single-tree-inline.vue +53 -42
  14. package/packages/department-tree-inline/src/department-tree-service.js +17 -11
  15. package/packages/department-tree-inline/src/search-result.vue +187 -219
  16. package/packages/department-tree-mobile/src/department-tree-inline-app.vue +17 -4
  17. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +52 -43
  18. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +52 -42
  19. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +23 -13
  20. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +9 -5
  21. package/packages/department-user-tree-inline/src/group-user-tree-service.js +17 -11
  22. package/packages/department-user-tree-inline/src/search-result.vue +207 -220
  23. package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +14 -3
  24. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +7 -2
  25. package/packages/empty-state/index.vue +28 -0
  26. package/packages/fs-preview/src/fs-preview.vue +10 -4
  27. package/packages/fs-upload/src/fs-upload-multi.vue +10 -6
  28. package/packages/fs-upload/src/fs-upload-single.vue +8 -7
  29. package/packages/fs-upload/src/fs-upload.vue +3 -1
  30. package/packages/fs-upload/src/see-big-picture.vue +3 -0
  31. package/packages/fs-upload-list/src/fs-upload-list.vue +2 -1
  32. package/packages/fs-upload-new/src/fs-button-upload.vue +3 -3
  33. package/packages/fs-upload-new/src/fs-drag-upload.vue +3 -3
  34. package/packages/fs-upload-new/src/fs-preview-new.vue +11 -7
  35. package/packages/multipart-upload/src/multipart-upload-form.vue +2 -1
  36. package/packages/multipart-upload/src/multipart-upload-list.vue +2 -1
  37. package/packages/plugins/export-data-new.js +2 -0
  38. package/packages/super-grid/src/components/grid-icon.vue +6 -3
  39. package/packages/super-grid/src/normal-column-content.vue +1 -1
  40. package/packages/super-grid/src/super-grid.vue +4 -4
  41. package/packages/super-grid/src/view-image-dialog.vue +2 -1
  42. package/packages/utils/utils.js +27 -9
  43. package/packages/workgroup-tree-inline/src/search-result.vue +2 -1
  44. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +50 -41
  45. package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +16 -5
  46. package/packages/workgroup-user-tree-inline/src/search-result.vue +2 -1
  47. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +30 -24
  48. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +49 -37
  49. package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue +281 -222
  50. package/src/i18n/langs/cn.js +3 -3
  51. package/src/i18n/langs/en.js +3 -3
  52. package/src/styles/index.scss +26 -0
  53. package/src/utils/auth.js +10 -7
  54. package/src/utils/chat-ai-util.ts +3 -3
  55. package/src/utils/common-util.js +44 -0
  56. package/src/utils/global-prop.js +17 -0
  57. package/src/views/dsc-component/Sidebar/SidebarItem.vue +6 -0
  58. package/src/views/dsc-component/tabs/tab-content.vue +6 -0
@@ -172,6 +172,8 @@ import {getToken} from '../../../src/utils/auth'
172
172
  import {
173
173
  isPlateSys,
174
174
  getSystemFrontendUrl,
175
+ getRelativeBaseUrl,
176
+ getKkFileBackendUrl,
175
177
  } from '../../../src//utils//common-util.js'
176
178
 
177
179
  export default {
@@ -276,7 +278,7 @@ export default {
276
278
  },
277
279
  },
278
280
  created() {
279
- this.baseURL = window.$vueApp.config.globalProperties.baseURL
281
+ this.baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
280
282
  if (this.data) {
281
283
  this.unifiedEnclosures = this.data
282
284
  }
@@ -332,7 +334,7 @@ export default {
332
334
  const http = this.$http
333
335
  http
334
336
  .post(
335
- window.$vueApp.config.globalProperties.baseURL +
337
+ this.baseURL +
336
338
  '/common/fs-upload/des-encrypt',
337
339
  map
338
340
  )
@@ -366,7 +368,7 @@ export default {
366
368
  } else {
367
369
  const myShowName = row.fileName
368
370
  const uuid = row.uuid
369
- let baseUrl = window.$vueApp.config.globalProperties.baseURL
371
+ let baseUrl = this.baseURL
370
372
  if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
371
373
  baseUrl = window.$vueApp.config.globalProperties.baseAPI
372
374
  }
@@ -380,7 +382,8 @@ export default {
380
382
  //要预览文件的访问地址
381
383
  const myPreviewUrl = originUrl + '&fullfilename='+myShowName
382
384
  // http://127.0.0.1:8012/onlinePreview
383
- previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
385
+ previewUrl = getKkFileBackendUrl()+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
386
+ window.open(previewUrl, showName)
384
387
  } else {
385
388
  previewUrl =
386
389
  baseUrl +
@@ -391,8 +394,9 @@ export default {
391
394
  encodeURI(myShowName) +
392
395
  '&serverPath=' +
393
396
  uuid
397
+ previewUrl = getRelativeBaseUrl(previewUrl)
398
+ window.open(previewUrl, showName)
394
399
  }
395
- window.open(previewUrl, showName)
396
400
  }
397
401
  }
398
402
  },
@@ -419,7 +423,7 @@ export default {
419
423
  http.headers = "'Content-Type': 'multipart/form-data'"
420
424
  http
421
425
  .post(
422
- window.$vueApp.config.globalProperties.baseURL +
426
+ this.baseURL +
423
427
  '/common/fs-upload/upload-template/' +
424
428
  this.systemCode,
425
429
  param,
@@ -112,7 +112,7 @@ import {
112
112
  import {$emit} from '../../utils/gogocodeTransfer'
113
113
  import Cookies from 'js-cookie'
114
114
  import seeBigPicture from './see-big-picture.vue'
115
- import {getSystemFrontendUrl, isPlateSys,} from '../../../src/utils/common-util.js'
115
+ import {getKkFileBackendUrl, getRelativeBaseUrl, getSystemFrontendUrl, isPlateSys,} from '../../../src/utils/common-util.js'
116
116
  import {getToken} from '../../../src/utils/auth'
117
117
 
118
118
  export default {
@@ -194,10 +194,11 @@ export default {
194
194
  data: {
195
195
  type: Array,
196
196
  default: null,
197
+ baseURL: null
197
198
  },
198
199
  },
199
200
  created() {
200
- this.baseURL = window.$vueApp.config.globalProperties.baseURL
201
+ this.baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
201
202
  if (this.data) {
202
203
  this.unifiedEnclosure = this.data[0]
203
204
  }
@@ -260,7 +261,7 @@ export default {
260
261
  const http = this.$http
261
262
  http
262
263
  .post(
263
- window.$vueApp.config.globalProperties.baseURL +
264
+ this.baseURL +
264
265
  '/common/fs-upload/des-encrypt',
265
266
  map
266
267
  )
@@ -294,9 +295,9 @@ export default {
294
295
  } else {
295
296
  const myShowName = this.unifiedEnclosure.fileName
296
297
  const uuid = this.unifiedEnclosure.uuid
297
- let baseUrl = window.$vueApp.config.globalProperties.baseURL
298
+ let baseUrl = this.baseURL
298
299
  if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
299
- baseUrl = window.$vueApp.config.globalProperties.baseAPI
300
+ baseUrl = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseAPI)
300
301
  }
301
302
  let previewUrl
302
303
  if (window.$vueApp.config.globalProperties.kkFileViewUrl) {
@@ -308,7 +309,7 @@ export default {
308
309
  //要预览文件的访问地址
309
310
  const myPreviewUrl = originUrl + '&fullfilename='+myShowName
310
311
  // http://127.0.0.1:8012/onlinePreview
311
- previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
312
+ previewUrl = getKkFileBackendUrl()+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
312
313
  } else {
313
314
  previewUrl =
314
315
  baseUrl +
@@ -335,7 +336,7 @@ export default {
335
336
  }
336
337
  http
337
338
  .post(
338
- window.$vueApp.config.globalProperties.baseURL +
339
+ this.baseURL +
339
340
  '/common/fs-upload/upload-template/' +
340
341
  this.systemCode,
341
342
  param,
@@ -38,6 +38,7 @@ import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
38
38
  import fsUploadMulti from './fs-upload-multi.vue'
39
39
  import fsUploadSingle from './fs-upload-single.vue'
40
40
  import * as Vue from 'vue'
41
+ import { getRelativeBaseUrl } from '../../../src/utils/common-util'
41
42
  export default {
42
43
  name: 'FsUpload',
43
44
  components: {
@@ -175,9 +176,10 @@ export default {
175
176
  deleteFile(deleteUuid) {
176
177
  const http = this.$http
177
178
  const list = [deleteUuid]
179
+ const baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
178
180
  http
179
181
  .delete(
180
- window.$vueApp.config.globalProperties.baseURL + '/common/fs-upload',
182
+ baseURL + '/common/fs-upload',
181
183
  { data: list }
182
184
  )
183
185
  .then((data) => {})
@@ -42,6 +42,7 @@
42
42
  </template>
43
43
 
44
44
  <script>
45
+ import { getRelativeBaseUrl } from '../../../src/utils/common-util'
45
46
  export default {
46
47
  props: {
47
48
  unifiedEnclosures: {
@@ -56,9 +57,11 @@ export default {
56
57
  data() {
57
58
  return {
58
59
  displayIndex: 0,
60
+ baseURL: null
59
61
  }
60
62
  },
61
63
  created() {
64
+ this.baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
62
65
  this.displayIndex = this.showIndex
63
66
  },
64
67
  methods: {},
@@ -74,7 +74,7 @@ import { $emit } from '../../utils/gogocodeTransfer'
74
74
 
75
75
  import { getToken } from '../../../src/utils/auth'
76
76
  import { isImage } from '../../../src/utils/util'
77
- import { getSystemFrontendUrl, isPlateSys, isMobileBrowser } from '../../../src/utils/common-util'
77
+ import { getSystemFrontendUrl, isPlateSys, isMobileBrowser, getRelativeBaseUrl } from '../../../src/utils/common-util'
78
78
  import FsPreview from '../../fs-preview/src/fs-preview.vue'
79
79
  import { packageFile } from '../../super-grid/src/utils'
80
80
  import FileUploadInputMobile from '../../fs-upload-new/src/file-upload-mobile/file-upload-input.vue'
@@ -160,6 +160,7 @@ export default {
160
160
  if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
161
161
  defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
162
162
  }
163
+ defaultAction = getRelativeBaseUrl(defaultAction)
163
164
  const isMobile = isMobileBrowser()
164
165
  const systemCode = this.pageContext && this.pageContext.systemCode ? this.pageContext.systemCode : null
165
166
  return {
@@ -42,7 +42,7 @@
42
42
 
43
43
  <script setup lang="ts">
44
44
  import { ref, defineProps, defineEmits } from 'vue'
45
- import { getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
45
+ import { getRelativeBaseUrl, getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
46
46
  import { getToken } from '../../../src/utils/auth'
47
47
  import type { UploadFile, UploadFiles } from 'element-plus'
48
48
  import fsPreviewNew from './fs-preview-new.vue'
@@ -141,8 +141,8 @@ const props = defineProps({
141
141
  default: 0
142
142
  }
143
143
  })
144
- const baseURL = window.$vueApp.config.globalProperties.baseURL
145
- const baseAPI = window.$vueApp.config.globalProperties.baseAPI
144
+ const baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
145
+ const baseAPI = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseAPI)
146
146
  const defaultAction = ref<string>('')
147
147
  const buttonUploadRef = ref()
148
148
  const innerLimitFileSize = ref(props.limitFileSize)
@@ -40,7 +40,7 @@
40
40
  <script setup lang="ts">
41
41
  import { UploadFilled } from '@element-plus/icons-vue'
42
42
  import { ref, defineProps, defineEmits } from 'vue'
43
- import { getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
43
+ import { getRelativeBaseUrl, getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
44
44
  import { getToken } from '../../../src/utils/auth'
45
45
  import type { UploadFile, UploadFiles } from 'element-plus'
46
46
  import fsPreviewNew from './fs-preview-new.vue'
@@ -139,8 +139,8 @@ const props = defineProps({
139
139
  default: 0
140
140
  }
141
141
  })
142
- const baseURL = window.$vueApp.config.globalProperties.baseURL
143
- const baseAPI = window.$vueApp.config.globalProperties.baseAPI
142
+ const baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
143
+ const baseAPI = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseAPI)
144
144
  const defaultAction = ref<string>('')
145
145
  const innerLimitFileSize = ref(props.limitFileSize)
146
146
  if (props.action) {
@@ -61,7 +61,7 @@
61
61
  <script setup lang="ts">
62
62
  import { Close, Paperclip, Download } from '@element-plus/icons-vue'
63
63
  import { ref, defineProps } from 'vue'
64
- import { getSystemFrontendUrl, isPlateSys, isMobileBrowser, getReplaceUrlDomain } from '../../../src/utils/common-util'
64
+ import { getSystemFrontendUrl, isPlateSys, isMobileBrowser, getReplaceUrlDomain, getRelativeBaseUrl, getKkFileBackendUrl } from '../../../src/utils/common-util'
65
65
  import { getToken } from '../../../src/utils/auth'
66
66
  import { isImage } from '../../../src/utils/util'
67
67
  import { Base64 } from 'js-base64'
@@ -125,8 +125,10 @@ const props = defineProps({
125
125
  default: false
126
126
  }
127
127
  })
128
- const baseURL = props.baseURL ? props.baseURL : window.$vueApp.config.globalProperties.baseURL
129
- const baseAPI = window.$vueApp.config.globalProperties.baseAPI
128
+ let baseURL = props.baseURL ? props.baseURL : window.$vueApp.config.globalProperties.baseURL
129
+ let baseAPI = window.$vueApp.config.globalProperties.baseAPI
130
+ baseURL = getRelativeBaseUrl(baseURL)
131
+ baseAPI = getRelativeBaseUrl(baseAPI)
130
132
 
131
133
  const dialogVisible = ref<boolean>(false)
132
134
  const previewImageInfo = ref<any>({})
@@ -233,9 +235,9 @@ const previweDoc = (showName: string, serverPath: string) => {
233
235
  showName
234
236
  )
235
237
  } else {
236
- let baseUrl = window.$vueApp.config.globalProperties.baseURL
238
+ let baseUrl = baseURL
237
239
  if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
238
- baseUrl = window.$vueApp.config.globalProperties.baseAPI
240
+ baseUrl = baseAPI
239
241
  }
240
242
  let previewUrl
241
243
  if (window.$vueApp.config.globalProperties.kkFileViewUrl) {
@@ -252,13 +254,15 @@ const previweDoc = (showName: string, serverPath: string) => {
252
254
  console.log('myPreviewUrl====', myPreviewUrl)
253
255
  // http://127.0.0.1:8012/onlinePreview
254
256
  previewUrl =
255
- window.$vueApp.config.globalProperties.kkFileViewUrl + '?url=' + encodeURIComponent(Base64.encode(myPreviewUrl))
257
+ getKkFileBackendUrl() + '?url=' + encodeURIComponent(Base64.encode(myPreviewUrl))
258
+ window.open(previewUrl, showName)
256
259
  console.log('previewUrl====', previewUrl)
257
260
  } else {
258
261
  previewUrl = baseUrl + '/common/fs-upload/preview?jwt=' + token
259
262
  previewUrl = previewUrl + '&showName=' + encodeURI(showName) + '&serverPath=' + serverPath
263
+ previewUrl = getRelativeBaseUrl(previewUrl)
264
+ window.open(previewUrl, showName)
260
265
  }
261
- window.open(previewUrl, showName)
262
266
  }
263
267
  }
264
268
  function getPreviewSrc(showName: string, serverPath: string) {
@@ -132,6 +132,7 @@ import {isImage} from '../../../src/utils/util'
132
132
  import {
133
133
  isPlateSys,
134
134
  getSystemFrontendUrl,
135
+ getKkFileBackendUrl,
135
136
  } from '../../../src/utils/common-util'
136
137
  import * as Vue from 'vue'
137
138
  import FsPreview from '../../fs-preview/src/fs-preview.vue'
@@ -349,7 +350,7 @@ export default {
349
350
  //要预览文件的访问地址
350
351
  const myPreviewUrl = originUrl + '&fullfilename='+myShowName
351
352
  // http://127.0.0.1:8012/onlinePreview
352
- previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
353
+ previewUrl = getKkFileBackendUrl() +'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
353
354
  } else {
354
355
  previewUrl =
355
356
  baseUrl +
@@ -170,6 +170,7 @@ import {isImage} from '../../../src/utils/util'
170
170
  import {
171
171
  isPlateSys,
172
172
  getSystemFrontendUrl,
173
+ getKkFileBackendUrl,
173
174
  } from '../../../src/utils/common-util'
174
175
  import * as Vue from 'vue'
175
176
  import FsPreview from '../../fs-preview/src/fs-preview.vue'
@@ -502,7 +503,7 @@ export default {
502
503
  //要预览文件的访问地址
503
504
  const myPreviewUrl = originUrl + '&fullfilename='+myShowName
504
505
  // http://127.0.0.1:8012/onlinePreview
505
- previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
506
+ previewUrl = getKkFileBackendUrl() +'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
506
507
  } else {
507
508
  previewUrl =
508
509
  baseUrl +
@@ -4,6 +4,7 @@ import store from '../super-grid/src/store'
4
4
  import {getExtraParam} from '../super-grid/src/utils'
5
5
  import nineGridStore from '../super-nine-grid/src/store'
6
6
  import {packageEnumAndBeanColumnValueSets} from '../utils/value-set'
7
+ import { getRelativeBaseUrl } from '../../src/utils/common-util'
7
8
 
8
9
  /**
9
10
  *
@@ -327,6 +328,7 @@ function exportListData(
327
328
  if(!baseUrl){
328
329
  baseUrl = window.$vueApp.config.globalProperties.baseURL
329
330
  }
331
+ baseUrl = getRelativeBaseUrl(baseUrl)
330
332
  window.$vueApp.config.globalProperties.$http
331
333
  .post(
332
334
  baseUrl +
@@ -3,11 +3,12 @@
3
3
  <span v-if="formatConfig.isTag">
4
4
  <el-tag
5
5
  v-if="displayText"
6
- :type="customStyle.type"
6
+ :type="customStyle.type || formatConfig.tagType"
7
7
  :color="customStyle.color"
8
- :effect="formatConfig.effect"
8
+ :effect="formatConfig.tagEffect"
9
9
  :size="formatConfig.size"
10
10
  :hit="formatConfig.hit"
11
+ :round="customStyle.round || formatConfig.round"
11
12
  >
12
13
  {{ displayText }}
13
14
  </el-tag>
@@ -144,7 +145,9 @@ export default {
144
145
  this.customStyle = result
145
146
  })
146
147
  } else {
147
- this.customStyle = customEventResult
148
+ if (customEventResult) {
149
+ this.customStyle = customEventResult
150
+ }
148
151
  }
149
152
  }
150
153
  }
@@ -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 &&
@@ -460,7 +460,7 @@ export default {
460
460
  // 限制高度最低值
461
461
  hasMaxHeight() {
462
462
  if (this.maxHeight) {
463
- return this.maxHeight <= 100 ? 100 : this.maxHeight + (this.heightOffset!==0?this.heightOffset:30)
463
+ return this.maxHeight <= 100 ? 100 : this.maxHeight + (this.heightOffset !== 0 ? this.heightOffset : 30)
464
464
  }
465
465
  return undefined
466
466
  },
@@ -468,7 +468,7 @@ export default {
468
468
  // 是指固定高度最低值
469
469
  hasTableHeight() {
470
470
  if (this.tableHeight) {
471
- return this.tableHeight <= 100 ? 100 : this.tableHeight + (this.heightOffset!==0?this.heightOffset:30)
471
+ return this.tableHeight <= 100 ? 100 : this.tableHeight + (this.heightOffset !== 0 ? this.heightOffset : 30)
472
472
  }
473
473
  return undefined
474
474
  },
@@ -925,7 +925,7 @@ export default {
925
925
  }
926
926
  )
927
927
  if (!this.isFormSubTable) {
928
- setPageInfoToChatStore(this.pageContext.menuCode, {
928
+ setPageInfoToChatStore(this.pageContext, {
929
929
  listRefs: [
930
930
  {
931
931
  ref: this
@@ -1666,7 +1666,7 @@ export default {
1666
1666
  // const subTableData = JSON.parse(JSON.stringify(this.subTableData))
1667
1667
  this.pagination.total = subTableData.length
1668
1668
  // 当前是第几页
1669
- let newCurrentPage = currentPage!== undefined && currentPage !== null ?currentPage: this.currentPage
1669
+ let newCurrentPage = currentPage !== undefined && currentPage !== null ? currentPage : this.currentPage
1670
1670
  if (newCurrentPage === undefined || newCurrentPage === null) {
1671
1671
  newCurrentPage = 1
1672
1672
  }
@@ -51,6 +51,7 @@ import * as Vue from 'vue'
51
51
  import {
52
52
  isPlateSys,
53
53
  getSystemFrontendUrl,
54
+ getKkFileBackendUrl,
54
55
  } from '../../../src/utils/common-util'
55
56
  import {getToken} from '../../../src/utils/auth'
56
57
 
@@ -154,7 +155,7 @@ export default {
154
155
  //要预览文件的访问地址
155
156
  const myPreviewUrl = originUrl + '&fullfilename='+myShowName
156
157
  // http://127.0.0.1:8012/onlinePreview
157
- previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
158
+ previewUrl = getKkFileBackendUrl() +'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
158
159
  } else {
159
160
  previewUrl =
160
161
  this.baseUrl +
@@ -1,30 +1,31 @@
1
1
  import { getI18n } from '../../src/utils/util'
2
2
  import * as Vue from 'vue'
3
+ import { cacheCanShowOrgTree, getCanShowOrgTree } from '../../src/utils/global-prop.js'
3
4
  const utils = {
4
5
  getSearchUserFields() {
5
6
  const i18n = getI18n()
6
7
  return [
7
8
  {
8
9
  value: 'name',
9
- label: i18n.t('departmentUserTree.searchFieldUserName'),
10
+ label: i18n.t('departmentUserTree.searchFieldUserName')
10
11
  },
11
12
  {
12
13
  value: 'loginName',
13
- label: i18n.t('departmentUserTree.searchFieldLoginName'),
14
+ label: i18n.t('departmentUserTree.searchFieldLoginName')
14
15
  },
15
16
  { value: 'email', label: i18n.t('departmentUserTree.searchFieldEmail') },
16
17
  {
17
18
  value: 'telephone',
18
- label: i18n.t('departmentUserTree.searchFieldTelephone'),
19
+ label: i18n.t('departmentUserTree.searchFieldTelephone')
19
20
  },
20
21
  {
21
22
  value: 'jobNumber',
22
- label: i18n.t('departmentUserTree.searchFieldJobNumber'),
23
+ label: i18n.t('departmentUserTree.searchFieldJobNumber')
23
24
  },
24
25
  {
25
26
  value: 'honorificName',
26
- label: i18n.t('departmentUserTree.searchFieldHonorificName'),
27
- },
27
+ label: i18n.t('departmentUserTree.searchFieldHonorificName')
28
+ }
28
29
  ]
29
30
  },
30
31
  removeRow(arr, row) {
@@ -70,9 +71,7 @@ const utils = {
70
71
  },
71
72
  createFilter(queryString) {
72
73
  return (restaurant) => {
73
- return (
74
- restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
75
- )
74
+ return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
76
75
  }
77
76
  },
78
77
  handleSelectUtil(item, localStorage) {
@@ -176,5 +175,24 @@ const utils = {
176
175
  }
177
176
  })
178
177
  },
178
+ canShowOrgTree() {
179
+ return new Promise((resolve, reject) => {
180
+ const cacheShowOrgTree = getCanShowOrgTree()
181
+ if (cacheShowOrgTree === 'false' || cacheShowOrgTree === 'true') {
182
+ let showOrgTree = cacheShowOrgTree === 'true'
183
+ resolve(showOrgTree)
184
+ } else {
185
+ window.$http
186
+ .get(window.$vueApp.config.globalProperties.baseAPI + '/component/organization-trees/show-org-tree')
187
+ .then((canshow) => {
188
+ cacheCanShowOrgTree(canshow)
189
+ resolve(canshow)
190
+ })
191
+ .catch((error) => {
192
+ resolve(false)
193
+ })
194
+ }
195
+ })
196
+ }
179
197
  }
180
198
  export default utils
@@ -162,7 +162,8 @@ export default {
162
162
  },
163
163
  // 添加工作组
164
164
  addWorkgroup(index, row) {
165
- $emit(this, 'addWorkgroup', index, row)
165
+ // JSON.parse(JSON.stringify(row)) 转换对象是为了解决添加数据时浏览器崩溃
166
+ $emit(this, 'addWorkgroup', index, JSON.parse(JSON.stringify(row)))
166
167
  },
167
168
  // 选中工作组
168
169
  selectWorkgroup(selectVal) {
@@ -3,7 +3,7 @@
3
3
  <el-container style="height: 395px">
4
4
  <el-aside width="430px">
5
5
  <el-container style="height: 390px">
6
- <el-header style="text-align: right; font-size: 12px">
6
+ <el-header style="text-align: right; font-size: 12px; height: 35px">
7
7
  <el-autocomplete
8
8
  v-model="filterText"
9
9
  :fetch-suggestions="querySearch"
@@ -20,44 +20,48 @@
20
20
  </el-autocomplete>
21
21
  </el-header>
22
22
  <el-main>
23
- <div
24
- v-if="!searchValue"
25
- style="padding-top: 5px; overflow: auto; width: auto; display: inline-block !important"
26
- >
27
- <el-tree
28
- ref="workgroupTree"
29
- :filter-node-method="filterNode"
30
- :load="loadNode"
31
- :props="defaultProps"
32
- :show-checkbox="multiple"
33
- lazy
34
- node-key="id"
35
- @check="handleCheckNode"
36
- @node-click="handleNodeClick"
23
+ <template v-if="!searchValue">
24
+ <div
25
+ v-if="canShowOrgTree"
26
+ style="padding-top: 5px; overflow: auto; width: auto; display: inline-block !important"
37
27
  >
38
- <template #default="{ node, data }">
39
- <span>
40
- <el-icon>
41
- <Menu v-if="node.data.id === -1" />
42
- <Calendar v-else />
43
- </el-icon>
44
- <span
45
- :class="
46
- data.nodeType &&
47
- data.nodeType === 'WORKGROUP' &&
48
- searchValue &&
49
- data.name.indexOf(searchValue) > -1
50
- ? 'searchResult'
51
- : ''
52
- "
53
- :title="node.label"
54
- >
55
- {{ node.label }}
28
+ <el-tree
29
+ ref="workgroupTree"
30
+ :filter-node-method="filterNode"
31
+ :load="loadNode"
32
+ :props="defaultProps"
33
+ :show-checkbox="multiple"
34
+ lazy
35
+ node-key="id"
36
+ @check="handleCheckNode"
37
+ @node-click="handleNodeClick"
38
+ >
39
+ <template #default="{ node, data }">
40
+ <span>
41
+ <el-icon>
42
+ <Menu v-if="node.data.id === -1" />
43
+ <Calendar v-else />
44
+ </el-icon>
45
+ <span
46
+ :class="
47
+ data.nodeType &&
48
+ data.nodeType === 'WORKGROUP' &&
49
+ searchValue &&
50
+ data.name.indexOf(searchValue) > -1
51
+ ? 'searchResult'
52
+ : ''
53
+ "
54
+ :title="node.label"
55
+ >
56
+ {{ node.label }}
57
+ </span>
56
58
  </span>
57
- </span>
58
- </template>
59
- </el-tree>
60
- </div>
59
+ </template>
60
+ </el-tree>
61
+ </div>
62
+ <!-- 暂无信息 -->
63
+ <EmptyState v-else style="width: 100%; height: 100%" />
64
+ </template>
61
65
  <div v-if="searchValue && searchValue.length > 0" style="height: 100%; overflow: hidden">
62
66
  <workgroup-result
63
67
  ref="workgroupResult"
@@ -116,7 +120,7 @@ import localStorage from '../../../src/utils/local-storage'
116
120
  import utils from '../../utils/utils'
117
121
  import workgroupTreeService from './workgroup-tree-service'
118
122
  import WorkgroupResult from './search-result.vue'
119
-
123
+ import EmptyState from '../../empty-state/index.vue'
120
124
  export default {
121
125
  data() {
122
126
  return {
@@ -145,12 +149,14 @@ export default {
145
149
  selectWorkgroupData: null,
146
150
  // 公司根节点信息
147
151
  tenantInfo: {},
148
- ElIconSearch
152
+ ElIconSearch,
153
+ canShowOrgTree: false
149
154
  }
150
155
  },
151
156
  name: 'InlineWorkgroupTree',
152
157
  components: {
153
- WorkgroupResult
158
+ WorkgroupResult,
159
+ EmptyState
154
160
  },
155
161
  props: {
156
162
  // 是否是多选树,默认是true
@@ -195,6 +201,9 @@ export default {
195
201
  }
196
202
  },
197
203
  created() {
204
+ utils.canShowOrgTree().then((showOrgTree) => {
205
+ this.canShowOrgTree = showOrgTree
206
+ })
198
207
  if (this.multiple) {
199
208
  this.initSelectGroups(this.searchField, this.selectGroupInfo, this.separator).then((selectGroups) => {
200
209
  if (selectGroups) {
@@ -537,7 +546,7 @@ export default {
537
546
  }
538
547
  </script>
539
548
 
540
- <style>
549
+ <style scoped>
541
550
  .searchResult {
542
551
  color: red;
543
552
  }