agilebuilder-ui 1.1.46-sit1 → 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 (40) hide show
  1. package/lib/{401-17c1ba58.js → 401-75472dcd.js} +1 -1
  2. package/lib/{404-0bb0c21e.js → 404-e5ce8455.js} +1 -1
  3. package/lib/{iframe-page-200e9f78.js → iframe-page-9d5ce6b0.js} +1 -1
  4. package/lib/{index-fbc950ca.js → index-789fbe10.js} +11058 -11021
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +88 -88
  8. package/lib/{tab-content-iframe-index-23a2150d.js → tab-content-iframe-index-47fae8cf.js} +1 -1
  9. package/lib/{tab-content-index-55c47eb2.js → tab-content-index-6e5f5717.js} +1 -1
  10. package/lib/{tache-subprocess-history-9ffc5f04.js → tache-subprocess-history-1ed95cee.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/search-result.vue +187 -219
  15. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +52 -43
  16. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +52 -42
  17. package/packages/department-user-tree-inline/src/search-result.vue +207 -220
  18. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +7 -2
  19. package/packages/empty-state/index.vue +28 -0
  20. package/packages/fs-preview/src/fs-preview.vue +7 -2
  21. package/packages/fs-upload/src/fs-upload-multi.vue +6 -4
  22. package/packages/fs-upload/src/fs-upload-single.vue +7 -6
  23. package/packages/fs-upload/src/fs-upload.vue +3 -1
  24. package/packages/fs-upload/src/see-big-picture.vue +3 -0
  25. package/packages/fs-upload-list/src/fs-upload-list.vue +2 -1
  26. package/packages/fs-upload-new/src/fs-button-upload.vue +3 -3
  27. package/packages/fs-upload-new/src/fs-drag-upload.vue +3 -3
  28. package/packages/fs-upload-new/src/fs-preview-new.vue +8 -5
  29. package/packages/plugins/export-data-new.js +2 -0
  30. package/packages/super-grid/src/components/grid-icon.vue +6 -3
  31. package/packages/super-grid/src/normal-column-content.vue +1 -1
  32. package/packages/utils/utils.js +26 -9
  33. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +50 -41
  34. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +45 -36
  35. package/src/i18n/langs/cn.js +3 -3
  36. package/src/i18n/langs/en.js +4 -4
  37. package/src/styles/index.scss +26 -0
  38. package/src/utils/common-util.js +22 -0
  39. package/src/views/dsc-component/Sidebar/SidebarItem.vue +6 -0
  40. package/src/views/dsc-component/tabs/tab-content.vue +6 -0
@@ -84,7 +84,7 @@
84
84
  // import { Image } from 'antd';
85
85
  import { Paperclip as ElIconPaperclip, View as ElIconView, Download as ElIconDownload } from '@element-plus/icons-vue'
86
86
  import * as Vue from 'vue'
87
- import { isPlateSys, getSystemFrontendUrl } from '../../../src/utils/common-util'
87
+ import { isPlateSys, getSystemFrontendUrl, getRelativeBaseUrl } from '../../../src/utils/common-util'
88
88
  import { isImage, getEntityFieldValue } from '../../../src/utils/util'
89
89
  import { packageFile } from '../../super-grid/src/utils'
90
90
  import { getToken } from '../../../src/utils/auth'
@@ -241,6 +241,7 @@ export default {
241
241
  if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
242
242
  tempAction = baseAPI + '/api/search-file-names'
243
243
  }
244
+ tempAction = getRelativeBaseUrl(tempAction)
244
245
  this.$http.post(tempAction, uuids).then((result) => {
245
246
  this.fileList = []
246
247
  uuids.forEach((uuid) => {
@@ -301,6 +302,7 @@ export default {
301
302
  previewUrl = baseUrl + '/common/fs-upload/preview?jwt=' + token
302
303
  previewUrl = previewUrl + '&showName=' + encodeURI(showName) + '&serverPath=' + fileInfo.serverPath
303
304
  }
305
+ previewUrl = getRelativeBaseUrl(previewUrl)
304
306
  window.open(previewUrl, showName)
305
307
  }
306
308
  },
@@ -309,7 +311,8 @@ export default {
309
311
  if (!this.fileList[index].src) {
310
312
  this.download(showName, this.fileList[index].serverPath)
311
313
  } else {
312
- window.open(this.fileList[index].src)
314
+ const src = getRelativeBaseUrl(this.fileList[index].src)
315
+ window.open(src)
313
316
  }
314
317
  },
315
318
  download(showName, serverPath) {
@@ -318,6 +321,7 @@ export default {
318
321
  if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
319
322
  url = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/downloads?jwt=' + token
320
323
  }
324
+ url = getRelativeBaseUrl(url)
321
325
  const src = url + '&showName=' + encodeURI(showName) + '&serverPath=' + serverPath
322
326
  window.open(src)
323
327
  },
@@ -370,6 +374,7 @@ export default {
370
374
  if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
371
375
  tempAction = baseAPI + '/api/search-file-names'
372
376
  }
377
+ tempAction = getRelativeBaseUrl(tempAction)
373
378
  this.$http.post(tempAction, uuids).then((result) => {
374
379
  this.fileList = []
375
380
  uuids.forEach((uuid) => {
@@ -172,6 +172,7 @@ import {getToken} from '../../../src/utils/auth'
172
172
  import {
173
173
  isPlateSys,
174
174
  getSystemFrontendUrl,
175
+ getRelativeBaseUrl,
175
176
  } from '../../../src//utils//common-util.js'
176
177
 
177
178
  export default {
@@ -276,7 +277,7 @@ export default {
276
277
  },
277
278
  },
278
279
  created() {
279
- this.baseURL = window.$vueApp.config.globalProperties.baseURL
280
+ this.baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
280
281
  if (this.data) {
281
282
  this.unifiedEnclosures = this.data
282
283
  }
@@ -332,7 +333,7 @@ export default {
332
333
  const http = this.$http
333
334
  http
334
335
  .post(
335
- window.$vueApp.config.globalProperties.baseURL +
336
+ this.baseURL +
336
337
  '/common/fs-upload/des-encrypt',
337
338
  map
338
339
  )
@@ -366,7 +367,7 @@ export default {
366
367
  } else {
367
368
  const myShowName = row.fileName
368
369
  const uuid = row.uuid
369
- let baseUrl = window.$vueApp.config.globalProperties.baseURL
370
+ let baseUrl = this.baseURL
370
371
  if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
371
372
  baseUrl = window.$vueApp.config.globalProperties.baseAPI
372
373
  }
@@ -392,6 +393,7 @@ export default {
392
393
  '&serverPath=' +
393
394
  uuid
394
395
  }
396
+ previewUrl = getRelativeBaseUrl(previewUrl)
395
397
  window.open(previewUrl, showName)
396
398
  }
397
399
  }
@@ -419,7 +421,7 @@ export default {
419
421
  http.headers = "'Content-Type': 'multipart/form-data'"
420
422
  http
421
423
  .post(
422
- window.$vueApp.config.globalProperties.baseURL +
424
+ this.baseURL +
423
425
  '/common/fs-upload/upload-template/' +
424
426
  this.systemCode,
425
427
  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 {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) {
@@ -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 } 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) {
@@ -258,6 +260,7 @@ const previweDoc = (showName: string, serverPath: string) => {
258
260
  previewUrl = baseUrl + '/common/fs-upload/preview?jwt=' + token
259
261
  previewUrl = previewUrl + '&showName=' + encodeURI(showName) + '&serverPath=' + serverPath
260
262
  }
263
+ previewUrl = getRelativeBaseUrl(previewUrl)
261
264
  window.open(previewUrl, showName)
262
265
  }
263
266
  }
@@ -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 &&
@@ -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
@@ -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
  }