agilebuilder-ui 1.1.46-sit1 → 1.1.46-sit3

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 (47) hide show
  1. package/lib/{401-17c1ba58.js → 401-ef4398a9.js} +1 -1
  2. package/lib/{404-0bb0c21e.js → 404-287cecdc.js} +1 -1
  3. package/lib/{iframe-page-200e9f78.js → iframe-page-b1ceebcf.js} +1 -1
  4. package/lib/{index-fbc950ca.js → index-53273b38.js} +11082 -11043
  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-2377cd81.js} +1 -1
  9. package/lib/{tab-content-index-55c47eb2.js → tab-content-index-85a86e08.js} +1 -1
  10. package/lib/{tache-subprocess-history-9ffc5f04.js → tache-subprocess-history-d0e1354e.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-user-tree-inline/src/department-user-multiple-tree-inline.vue +52 -43
  17. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +52 -42
  18. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +23 -13
  19. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +9 -5
  20. package/packages/department-user-tree-inline/src/group-user-tree-service.js +17 -11
  21. package/packages/department-user-tree-inline/src/search-result.vue +207 -220
  22. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +7 -2
  23. package/packages/empty-state/index.vue +28 -0
  24. package/packages/fs-preview/src/fs-preview.vue +7 -2
  25. package/packages/fs-upload/src/fs-upload-multi.vue +6 -4
  26. package/packages/fs-upload/src/fs-upload-single.vue +7 -6
  27. package/packages/fs-upload/src/fs-upload.vue +3 -1
  28. package/packages/fs-upload/src/see-big-picture.vue +3 -0
  29. package/packages/fs-upload-list/src/fs-upload-list.vue +2 -1
  30. package/packages/fs-upload-new/src/fs-button-upload.vue +3 -3
  31. package/packages/fs-upload-new/src/fs-drag-upload.vue +3 -3
  32. package/packages/fs-upload-new/src/fs-preview-new.vue +8 -5
  33. package/packages/plugins/export-data-new.js +2 -0
  34. package/packages/super-grid/src/components/grid-icon.vue +6 -3
  35. package/packages/super-grid/src/normal-column-content.vue +1 -1
  36. package/packages/super-grid/src/super-grid.vue +4 -4
  37. package/packages/utils/utils.js +26 -9
  38. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +50 -41
  39. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +30 -24
  40. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +49 -37
  41. package/src/i18n/langs/cn.js +3 -3
  42. package/src/i18n/langs/en.js +4 -4
  43. package/src/styles/index.scss +26 -0
  44. package/src/utils/chat-ai-util.ts +3 -3
  45. package/src/utils/common-util.js +22 -0
  46. package/src/views/dsc-component/Sidebar/SidebarItem.vue +6 -0
  47. package/src/views/dsc-component/tabs/tab-content.vue +6 -0
@@ -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 &&
@@ -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
  }
@@ -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
  }
@@ -132,27 +132,29 @@ const workgroupTreeInlineService = {
132
132
  .then((data) => {
133
133
  resolve(data)
134
134
  // 更新当前点击的节点的子节点
135
- this.$refs.workgroupUserTree.updateKeyChildren(parentNodeId, data)
136
- if (parentId === 0) {
137
- // 初始化树时,展开公司节点
138
- const tenantData = data[0].data
139
- this.tenantInfo = JSON.parse(tenantData)
140
- this.containBranch = data[0].containBranch
141
- // 加载整个组织结构树时,展开公司节点
142
- this.loadWorkgroup(this.tenantNodeId, this.tenantNodeId + '')
143
- }
144
- if (this.isClickNode) {
145
- // 表示点击工作组节点选中时展开
146
- this.isClickNode = false
147
- this.checkedNode(node.data)
148
- } else {
149
- // 表示是点击三角展开节点时
150
- if (checkedKeys && checkedKeys.indexOf(parentNodeId) > -1) {
151
- // 点击公司名称前的三角标识展开节点时,保持当前节点的选中状态
152
- // 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
153
- this.checkedNode(node.data)
135
+ if (this.$refs.workgroupUserTree) {
136
+ this.$refs.workgroupUserTree.updateKeyChildren(parentNodeId, data)
137
+ if (parentId === 0) {
138
+ // 初始化树时,展开公司节点
139
+ const tenantData = data[0].data
140
+ this.tenantInfo = JSON.parse(tenantData)
141
+ this.containBranch = data[0].containBranch
142
+ // 加载整个组织结构树时,展开公司节点
143
+ this.loadWorkgroup(this.tenantNodeId, this.tenantNodeId + '')
144
+ }
145
+ if (this.isClickNode) {
146
+ // 表示点击工作组节点选中时展开
147
+ this.isClickNode = false
148
+ this.checkedNode(node.data)
149
+ } else {
150
+ // 表示是点击三角展开节点时
151
+ if (checkedKeys && checkedKeys.indexOf(parentNodeId) > -1) {
152
+ // 点击公司名称前的三角标识展开节点时,保持当前节点的选中状态
153
+ // 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
154
+ this.checkedNode(node.data)
155
+ }
156
+ }
154
157
  }
155
- }
156
158
  })
157
159
  },
158
160
  // 加载当前节点的子节点
@@ -164,9 +166,11 @@ const workgroupTreeInlineService = {
164
166
  this.$http
165
167
  .post(window.$vueApp.config.globalProperties.baseAPI + '/component/organization-trees/workgroup-users', param)
166
168
  .then((children) => {
167
- this.$refs.workgroupUserTree.updateKeyChildren(parentNodeId, children)
168
- if (this.$refs.workgroupUserTree.store.nodesMap[parentNodeId]) {
169
- this.$refs.workgroupUserTree.store.nodesMap[parentNodeId].expanded = true
169
+ if(this.$refs.workgroupUserTree) {
170
+ this.$refs.workgroupUserTree.updateKeyChildren(parentNodeId, children)
171
+ if (this.$refs.workgroupUserTree.store.nodesMap[parentNodeId]) {
172
+ this.$refs.workgroupUserTree.store.nodesMap[parentNodeId].expanded = true
173
+ }
170
174
  }
171
175
  if (isSearch) {
172
176
  // 查询时处理
@@ -176,7 +180,9 @@ const workgroupTreeInlineService = {
176
180
  }
177
181
  if (this.allExpandNodeIds.length === this.allSearchNodeIds.length) {
178
182
  // 表示所有节点已展开,执行树的过滤方法
179
- this.$refs.workgroupUserTree.filter(searchValue)
183
+ if(this.$refs.workgroupUserTree) {
184
+ this.$refs.workgroupUserTree.filter(searchValue)
185
+ }
180
186
  this.allExpandNodeIds = []
181
187
  this.allSearchNodeIds = []
182
188
  }