agilebuilder-ui 1.1.36 → 1.1.37-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.
- package/lib/{401-b8934d65.js → 401-c46a3b20.js} +1 -1
- package/lib/{404-743a4631.js → 404-c35a937a.js} +1 -1
- package/lib/{iframe-page-5e102433.js → iframe-page-10e94ddd.js} +1 -1
- package/lib/{index-a0c08bb5.js → index-f92e8ddb.js} +8140 -8005
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +97 -97
- package/lib/{tab-content-iframe-index-e9b465bf.js → tab-content-iframe-index-8113610a.js} +1 -1
- package/lib/{tab-content-index-313404d0.js → tab-content-index-3b7f4fa8.js} +1 -1
- package/lib/{tache-subprocess-history-7d87cd77.js → tache-subprocess-history-75f40d2a.js} +1 -1
- package/package.json +1 -1
- package/packages/department-tree/src/department-tree.vue +130 -123
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +435 -466
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +335 -342
- package/packages/department-tree-inline/src/department-tree-inline.vue +18 -11
- package/packages/department-tree-inline/src/department-tree-service.js +10 -11
- package/packages/department-tree-mobile/src/department-tree-app.vue +103 -75
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +256 -225
- package/packages/department-tree-mobile/src/department-tree-service.ts +98 -75
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +112 -115
- package/packages/department-user-tree/src/department-user-single-tree.vue +85 -88
- package/packages/department-user-tree/src/department-user-tree.vue +127 -119
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +6 -1
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +5 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +18 -11
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +26 -51
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +25 -45
- package/packages/department-user-tree-inline/src/group-user/group-list.vue +97 -90
- package/packages/department-user-tree-inline/src/group-user/group-user.vue +28 -32
- package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +103 -75
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +282 -224
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +58 -51
- package/packages/fs-preview/src/fs-preview.vue +20 -2
- package/packages/fs-upload-list/src/fs-upload-list.vue +30 -7
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +1 -1
- package/packages/fs-upload-new/src/fs-preview-new.vue +27 -15
- package/packages/organization-input/src/organization-input.vue +34 -12
- package/packages/super-grid/src/apis.js +25 -4
- package/packages/super-grid/src/components/grid-radio-input.vue +104 -0
- package/packages/super-grid/src/dynamic-input.vue +94 -16
- package/packages/super-grid/src/formValidatorUtil.js +7 -2
- package/packages/super-grid/src/normal-column-content.vue +2 -1
- package/packages/super-grid/src/row-operation.vue +23 -13
- package/packages/super-grid/src/search-form-item.vue +444 -460
- package/packages/super-grid/src/super-grid.vue +73 -45
- package/packages/super-grid/src/utils.js +28 -9
- package/packages/super-icon/src/index.vue +4 -1
- package/packages/utils/value-set.js +25 -33
- package/packages/workgroup-tree/src/workgroup-tree.vue +117 -110
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +6 -1
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +103 -75
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +229 -208
- package/src/api/sso-service.js +6 -5
- package/src/store/modules/table.js +0 -1
- package/src/styles/theme/dark-blue/sidebar.scss +9 -0
- package/src/styles/theme/gray/sidebar.scss +9 -8
- package/src/styles/theme/green/sidebar.scss +10 -0
- package/src/styles/theme/ocean-blue/sidebar.scss +9 -0
- package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +9 -0
- package/src/utils/common-util.js +2 -1
- package/src/utils/insert_css.js +1 -1
- package/src/utils/util.js +19 -0
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -2
- package/src/views/dsc-component/Sidebar/index.vue +36 -18
- package/src/views/layout/components/Menubar/Item.vue +0 -9
- package/src/views/layout/components/Menubar/SidebarItem.vue +2 -2
- package/src/views/layout/components/Sidebar/Item.vue +4 -1
- package/src/views/layout/components/Sidebar/SidebarItem.vue +2 -2
|
@@ -1,64 +1,71 @@
|
|
|
1
|
-
export function getTenant
|
|
1
|
+
export function getTenant() {
|
|
2
2
|
const parentId = 0
|
|
3
|
-
return window['$vueApp'].config.globalProperties.$http.get(
|
|
3
|
+
return window['$vueApp'].config.globalProperties.$http.get(
|
|
4
|
+
window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/departments/' + parentId
|
|
5
|
+
)
|
|
4
6
|
}
|
|
5
7
|
|
|
6
8
|
// 获得公司节点的孩子节点
|
|
7
|
-
export function getTenantChildren
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
export function getTenantChildren(departmentInfo, tenantNodeId, limitFilterColumn) {
|
|
10
|
+
if (departmentInfo && departmentInfo.length > 0) {
|
|
11
|
+
// 加载指定部门时,展开公司节点
|
|
12
|
+
return loadPointDepartments(departmentInfo, limitFilterColumn)
|
|
13
|
+
} else {
|
|
14
|
+
// 加载整个组织结构树时,展开公司节点
|
|
15
|
+
return loadDepartment(tenantNodeId, null)
|
|
16
|
+
}
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
// 加载指定部门节点
|
|
20
|
+
export function loadPointDepartments(departmentInfo, limitFilterColumn) {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
let url = window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/point-department-users'
|
|
23
|
+
if (limitFilterColumn) {
|
|
24
|
+
url += '/' + limitFilterColumn
|
|
25
|
+
}
|
|
26
|
+
window['$vueApp'].config.globalProperties.$http.post(url, departmentInfo).then((children) => {
|
|
23
27
|
resolve(children)
|
|
24
28
|
})
|
|
25
29
|
})
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
branchId: null
|
|
35
|
-
}
|
|
36
|
-
if (branchId) {
|
|
37
|
-
param.branchId = branchId
|
|
38
|
-
}
|
|
39
|
-
return new Promise((resolve,reject)=>{
|
|
40
|
-
window['$vueApp'].config.globalProperties.$http.post(window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/department-users', param)
|
|
41
|
-
.then(children => {
|
|
42
|
-
resolve(children)
|
|
43
|
-
})
|
|
44
|
-
})
|
|
32
|
+
// 加载当前节点的子节点
|
|
33
|
+
export function loadDepartment(parentId, branchId) {
|
|
34
|
+
let param = {
|
|
35
|
+
parentId: parentId,
|
|
36
|
+
needVirtualUser: false,
|
|
37
|
+
branchId: null
|
|
45
38
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
selectDepts.forEach(dept => {
|
|
49
|
-
defaultCheckedKeys.push(dept.nodeId)
|
|
50
|
-
})
|
|
51
|
-
}
|
|
52
|
-
// ,
|
|
53
|
-
// isDeptOrUser (item, dept) {
|
|
54
|
-
// return item.id === dept.id && item.nodeType && dept.nodeType && item.nodeType === dept.nodeType
|
|
55
|
-
// },
|
|
56
|
-
export function getUserInDepartments (departmentIds) {
|
|
57
|
-
return window['$vueApp'].config.globalProperties.$http.post(window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/user-only-in-departments', departmentIds)
|
|
39
|
+
if (branchId) {
|
|
40
|
+
param.branchId = branchId
|
|
58
41
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
42
|
+
return new Promise((resolve, reject) => {
|
|
43
|
+
window['$vueApp'].config.globalProperties.$http
|
|
44
|
+
.post(window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/department-users', param)
|
|
45
|
+
.then((children) => {
|
|
46
|
+
resolve(children)
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
export function checkedDeptDefault(selectDepts, defaultCheckedKeys) {
|
|
51
|
+
defaultCheckedKeys = []
|
|
52
|
+
selectDepts.forEach((dept) => {
|
|
53
|
+
defaultCheckedKeys.push(dept.nodeId)
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
// ,
|
|
57
|
+
// isDeptOrUser (item, dept) {
|
|
58
|
+
// return item.id === dept.id && item.nodeType && dept.nodeType && item.nodeType === dept.nodeType
|
|
59
|
+
// },
|
|
60
|
+
export function getUserInDepartments(departmentIds) {
|
|
61
|
+
return window['$vueApp'].config.globalProperties.$http.post(
|
|
62
|
+
window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/user-only-in-departments',
|
|
63
|
+
departmentIds
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
// getTenantNoDeptUsers () {
|
|
67
|
+
// return this.$http.get(window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/tenant-no-dept-users')
|
|
68
|
+
// },
|
|
69
|
+
// getBranchNoDeptUsers (branchId) {
|
|
70
|
+
// return this.$http.get(window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/branch-no-dept-users/' + branchId)
|
|
71
|
+
// }
|
|
@@ -37,7 +37,16 @@
|
|
|
37
37
|
</span>
|
|
38
38
|
</template>
|
|
39
39
|
<el-table :show-header="false" :data="fileList" max-height="60vh">
|
|
40
|
-
<el-table-column prop="showName" show-overflow-tooltip
|
|
40
|
+
<el-table-column prop="showName" show-overflow-tooltip>
|
|
41
|
+
<template v-slot="scope">
|
|
42
|
+
<div style="display: flex; align-items: center">
|
|
43
|
+
<super-icon :iconValue="getFileIconByName(scope.row.showName)" />
|
|
44
|
+
<span style="margin-left: 10px; cursor: pointer" @click="previewSingle(scope.row)">
|
|
45
|
+
{{ scope.row.showName }}
|
|
46
|
+
</span>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
</el-table-column>
|
|
41
50
|
<el-table-column width="80" align="center">
|
|
42
51
|
<template v-slot="scope">
|
|
43
52
|
<div style="margin: -10px 0">
|
|
@@ -69,6 +78,7 @@ import { isPlateSys, getSystemFrontendUrl } from '../../../src/utils/common-util
|
|
|
69
78
|
import { isImage, getEntityFieldValue } from '../../../src/utils/util'
|
|
70
79
|
import { packageFile } from '../../super-grid/src/utils'
|
|
71
80
|
import { getToken } from '../../../src/utils/auth'
|
|
81
|
+
import { getFileIconByName } from '../../../src/utils/file-util'
|
|
72
82
|
import { Base64 } from 'js-base64'
|
|
73
83
|
export default {
|
|
74
84
|
components: {
|
|
@@ -284,10 +294,18 @@ export default {
|
|
|
284
294
|
},
|
|
285
295
|
formatFileName(fileName) {
|
|
286
296
|
return fileName.replace('#', '~~').replace('?', '~$').replace('&', '$')
|
|
297
|
+
},
|
|
298
|
+
getFileIconByName(fileName) {
|
|
299
|
+
return getFileIconByName(fileName)
|
|
287
300
|
}
|
|
288
301
|
},
|
|
289
302
|
emits: ['close']
|
|
290
303
|
}
|
|
291
304
|
</script>
|
|
292
305
|
|
|
293
|
-
<style lang="scss" scoped
|
|
306
|
+
<style lang="scss" scoped>
|
|
307
|
+
.amb-color-iconfont {
|
|
308
|
+
width: 30px;
|
|
309
|
+
height: 30px;
|
|
310
|
+
}
|
|
311
|
+
</style>
|
|
@@ -82,22 +82,35 @@
|
|
|
82
82
|
</span>
|
|
83
83
|
</template>
|
|
84
84
|
<el-table :data="showFileList" :show-header="false">
|
|
85
|
-
<el-table-column prop="showName" width="300"
|
|
85
|
+
<el-table-column prop="showName" width="300" show-overflow-tooltip>
|
|
86
|
+
<template v-slot="scope">
|
|
87
|
+
<div style="display: flex; align-items: center">
|
|
88
|
+
<super-icon :iconValue="getFileIconByName(scope.row.showName)" />
|
|
89
|
+
<span style="margin-left: 10px; cursor: pointer" @click="previewSingle(scope.row)">
|
|
90
|
+
{{ scope.row.showName }}
|
|
91
|
+
</span>
|
|
92
|
+
</div>
|
|
93
|
+
</template>
|
|
94
|
+
</el-table-column>
|
|
86
95
|
<el-table-column align="right">
|
|
87
96
|
<template v-slot="scope">
|
|
88
97
|
<el-tooltip :content="$t('imatrixUIPublicModel.preview')" class="item" effect="dark" placement="top">
|
|
89
|
-
<el-
|
|
90
|
-
<el-icon
|
|
91
|
-
|
|
98
|
+
<el-button type="text" @click="previewSingle(scope.row)">
|
|
99
|
+
<el-icon style="cursor: pointer">
|
|
100
|
+
<el-icon-view />
|
|
101
|
+
</el-icon>
|
|
102
|
+
</el-button>
|
|
92
103
|
</el-tooltip>
|
|
93
104
|
</template>
|
|
94
105
|
</el-table-column>
|
|
95
106
|
<el-table-column v-if="!disabled">
|
|
96
107
|
<template v-slot="scope">
|
|
97
108
|
<el-tooltip :content="$t('imatrixUIPublicModel.delete')" class="item" effect="dark" placement="top">
|
|
98
|
-
<el-
|
|
99
|
-
<el-icon
|
|
100
|
-
|
|
109
|
+
<el-button type="text" @click="deleteRow(scope.$index)">
|
|
110
|
+
<el-icon style="cursor: pointer">
|
|
111
|
+
<el-icon-delete />
|
|
112
|
+
</el-icon>
|
|
113
|
+
</el-button>
|
|
101
114
|
</el-tooltip>
|
|
102
115
|
</template>
|
|
103
116
|
</el-table-column>
|
|
@@ -144,6 +157,7 @@ import FsPreview from '../../fs-preview/src/fs-preview.vue'
|
|
|
144
157
|
import { packageFile } from '../../super-grid/src/utils'
|
|
145
158
|
import FileUploadInputMobile from '../../fs-upload-new/src/file-upload-mobile/file-upload-input.vue'
|
|
146
159
|
import { Base64 } from 'js-base64'
|
|
160
|
+
import { getFileIconByName } from '../../../src/utils/file-util'
|
|
147
161
|
export default {
|
|
148
162
|
name: 'FsUploadList',
|
|
149
163
|
props: {
|
|
@@ -418,8 +432,17 @@ export default {
|
|
|
418
432
|
},
|
|
419
433
|
uploadFileDone(data) {
|
|
420
434
|
this.$refs.fileUploadRef.uploadFileDone(data)
|
|
435
|
+
},
|
|
436
|
+
getFileIconByName(fileName) {
|
|
437
|
+
return getFileIconByName(fileName)
|
|
421
438
|
}
|
|
422
439
|
},
|
|
423
440
|
emits: ['close', 'upload-success', 'delete-success', 'delete', 'update:value', 'close', 'update:value']
|
|
424
441
|
}
|
|
425
442
|
</script>
|
|
443
|
+
<style lang="scss" scoped>
|
|
444
|
+
.amb-color-iconfont {
|
|
445
|
+
width: 30px;
|
|
446
|
+
height: 30px;
|
|
447
|
+
}
|
|
448
|
+
</style>
|
|
@@ -362,7 +362,7 @@ function validateCanUploadFile(file, limitFileSize) {
|
|
|
362
362
|
ElMessage({
|
|
363
363
|
showClose: true,
|
|
364
364
|
type: 'warning',
|
|
365
|
-
message: t('
|
|
365
|
+
message: t('imatrixUIMessage.exceedFileSize', { fileName: file.name, fileSize: limitFileSize })
|
|
366
366
|
})
|
|
367
367
|
// 返回false停止上传
|
|
368
368
|
isCanUpload = false
|
|
@@ -2,21 +2,26 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div v-if="!isMobile">
|
|
4
4
|
<div v-for="(file, index) in fileList" :key="index" style="width: 100%">
|
|
5
|
-
<el-tag>
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
<el-tag color="white" size="large">
|
|
6
|
+
<template #default>
|
|
7
|
+
<div style="display: flex; align-items: center">
|
|
8
|
+
<!-- 'amb-color-icon-XLS' -->
|
|
9
|
+
<super-icon :iconValue="getFileIconByName(file.showName)" />
|
|
10
|
+
<el-tooltip content="预览" placement="top">
|
|
11
|
+
<span style="cursor: pointer" @click="preview(file.showName, file.serverPath)">
|
|
12
|
+
<span style="margin-left: 6.5px">{{ file.showName }}</span>
|
|
13
|
+
</span>
|
|
14
|
+
</el-tooltip>
|
|
15
|
+
<el-tooltip v-if="!disabled" content="下载" placement="top">
|
|
16
|
+
<el-icon style="margin-left: 10px" @click="handleDownload(file)">
|
|
17
|
+
<Download />
|
|
18
|
+
</el-icon>
|
|
19
|
+
</el-tooltip>
|
|
20
|
+
<el-tooltip v-if="!disabled" content="移除" placement="top">
|
|
21
|
+
<el-icon @click="handleOnRemove(file)"><Close /></el-icon>
|
|
22
|
+
</el-tooltip>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
20
25
|
</el-tag>
|
|
21
26
|
</div>
|
|
22
27
|
</div>
|
|
@@ -53,6 +58,7 @@ import { getSystemFrontendUrl, isPlateSys, isMobileBrowser, getReplaceUrlDomain
|
|
|
53
58
|
import { getToken } from '../../../src/utils/auth'
|
|
54
59
|
import { isImage } from '../../../src/utils/util'
|
|
55
60
|
import { Base64 } from 'js-base64'
|
|
61
|
+
import { getFileIconByName } from '../../../src/utils/file-util'
|
|
56
62
|
const props = defineProps({
|
|
57
63
|
systemCode: {
|
|
58
64
|
type: String,
|
|
@@ -264,3 +270,9 @@ const isPreview = (fileName: string) => {
|
|
|
264
270
|
return false
|
|
265
271
|
}
|
|
266
272
|
</script>
|
|
273
|
+
<style lang="scss" scoped>
|
|
274
|
+
.amb-color-iconfont {
|
|
275
|
+
width: 30px;
|
|
276
|
+
height: 30px;
|
|
277
|
+
}
|
|
278
|
+
</style>
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
:search-field="searchField"
|
|
40
40
|
:select-user-info="selectOrganizationInfo"
|
|
41
41
|
:separator="separator"
|
|
42
|
+
:limit-filter-column="limitFilterColumn"
|
|
42
43
|
@close="closeOrganizationTree"
|
|
43
44
|
/>
|
|
44
45
|
<!-- 部门树 -->
|
|
@@ -47,8 +48,10 @@
|
|
|
47
48
|
:check-strictly="typeof checkStrictly === 'undefined' ? false : checkStrictly"
|
|
48
49
|
:multiple="typeof multiple === 'undefined' ? false : multiple"
|
|
49
50
|
:search-field="searchField"
|
|
51
|
+
:department-info="departmentInfo"
|
|
50
52
|
:select-department-info="selectOrganizationInfo"
|
|
51
53
|
:separator="separator"
|
|
54
|
+
:limit-filter-column="limitFilterColumn"
|
|
52
55
|
width="30%"
|
|
53
56
|
@close="closeOrganizationTree"
|
|
54
57
|
/>
|
|
@@ -60,6 +63,7 @@
|
|
|
60
63
|
:search-field="searchField"
|
|
61
64
|
:select-workgroup-info="selectOrganizationInfo"
|
|
62
65
|
:separator="separator"
|
|
66
|
+
:limit-filter-column="limitFilterColumn"
|
|
63
67
|
width="30%"
|
|
64
68
|
@close="closeOrganizationTree"
|
|
65
69
|
/>
|
|
@@ -71,6 +75,7 @@
|
|
|
71
75
|
:search-field="searchField"
|
|
72
76
|
:select-user-info="selectOrganizationInfo"
|
|
73
77
|
:separator="separator"
|
|
78
|
+
:limit-filter-column="limitFilterColumn"
|
|
74
79
|
width="30%"
|
|
75
80
|
@close="closeOrganizationTree"
|
|
76
81
|
/>
|
|
@@ -102,11 +107,14 @@
|
|
|
102
107
|
import { Delete as ElIconDelete, Search as ElIconSearch } from '@element-plus/icons-vue'
|
|
103
108
|
// import Vue from 'vue'
|
|
104
109
|
import { getPropNameWhenJoinTable, setEntityFieldValue } from '../../../src/utils/util'
|
|
105
|
-
|
|
110
|
+
import DepartmentUserTree from '../../department-user-tree/src/department-user-tree.vue'
|
|
111
|
+
import DepartmentTree from '../../department-tree/src/department-tree.vue'
|
|
106
112
|
export default {
|
|
107
113
|
components: {
|
|
108
114
|
ElIconSearch,
|
|
109
|
-
ElIconDelete
|
|
115
|
+
ElIconDelete,
|
|
116
|
+
DepartmentUserTree,
|
|
117
|
+
DepartmentTree
|
|
110
118
|
},
|
|
111
119
|
name: 'OrganizationInput',
|
|
112
120
|
model: {
|
|
@@ -184,6 +192,11 @@ export default {
|
|
|
184
192
|
pageModels: {
|
|
185
193
|
type: Object,
|
|
186
194
|
default: null
|
|
195
|
+
},
|
|
196
|
+
// 根据变量限制部门时,根据部门表的哪个字段进行过滤,默认是code
|
|
197
|
+
limitFilterColumn: {
|
|
198
|
+
type: String,
|
|
199
|
+
default: 'code'
|
|
187
200
|
}
|
|
188
201
|
},
|
|
189
202
|
data() {
|
|
@@ -369,20 +382,24 @@ export default {
|
|
|
369
382
|
}
|
|
370
383
|
}
|
|
371
384
|
return mainDeptIds.join(this.separator)
|
|
372
|
-
} else if (orgDataType === 'mainDeptCode') {
|
|
373
|
-
// 正职部门code
|
|
374
|
-
|
|
385
|
+
} else if (orgDataType === 'mainDeptCode' || orgDataType === 'mainDeptName') {
|
|
386
|
+
// 正职部门code或名称
|
|
387
|
+
// 这里的orgDataType是mainDeptCode或mainDeptName
|
|
388
|
+
// 需要根据orgDataType来判断返回的值
|
|
389
|
+
// 如果是mainDeptCode,则返回mainDepartmentCode,如果是mainDeptName,则返回mainDepartmentName
|
|
390
|
+
const mainDeptColumn = []
|
|
391
|
+
const key = orgDataType === 'mainDeptCode' ? 'mainDepartmentCode' : 'mainDepartmentName'
|
|
375
392
|
if (isUserTree) {
|
|
376
393
|
const users = selectNodeInfo.users
|
|
377
394
|
if (users) {
|
|
378
395
|
users.forEach((user) => {
|
|
379
|
-
if (user
|
|
380
|
-
|
|
396
|
+
if (user[key]) {
|
|
397
|
+
mainDeptColumn.push(user[key])
|
|
381
398
|
}
|
|
382
399
|
})
|
|
383
400
|
}
|
|
384
401
|
}
|
|
385
|
-
return
|
|
402
|
+
return mainDeptColumn.join(this.separator)
|
|
386
403
|
} else if (orgDataType === 'subCompanyName') {
|
|
387
404
|
// 分支名称
|
|
388
405
|
const branchNames = []
|
|
@@ -445,16 +462,21 @@ export default {
|
|
|
445
462
|
}
|
|
446
463
|
}
|
|
447
464
|
return mainDeptId
|
|
448
|
-
} else if (orgDataType === 'mainDeptCode') {
|
|
465
|
+
} else if (orgDataType === 'mainDeptCode' || orgDataType === 'mainDeptName') {
|
|
466
|
+
// 正职部门code或名称
|
|
467
|
+
// 这里的orgDataType是mainDeptCode或mainDeptName
|
|
468
|
+
// 需要根据orgDataType来判断返回的值
|
|
469
|
+
// 如果是mainDeptCode,则返回mainDepartmentCode,如果是mainDeptName,则返回mainDepartmentName
|
|
470
|
+
const key = orgDataType === 'mainDeptCode' ? 'mainDepartmentCode' : 'mainDepartmentName'
|
|
449
471
|
// 正职部门code
|
|
450
|
-
let
|
|
472
|
+
let mainDeptColumn = null
|
|
451
473
|
if (isUserTree) {
|
|
452
474
|
const user = selectNodeInfo.user
|
|
453
475
|
if (user) {
|
|
454
|
-
|
|
476
|
+
mainDeptColumn = user[key]
|
|
455
477
|
}
|
|
456
478
|
}
|
|
457
|
-
return
|
|
479
|
+
return mainDeptColumn
|
|
458
480
|
} else if (orgDataType === 'subCompanyName') {
|
|
459
481
|
// 分支名称
|
|
460
482
|
let branchName = null
|
|
@@ -134,7 +134,12 @@ const apis = {
|
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
// 新建行
|
|
137
|
-
createRow(listCode, row, options) {
|
|
137
|
+
createRow(listCode, row, options, event) {
|
|
138
|
+
// addRowIndex 表示新建行插入到第几行后面,默认是-1表示添加到最后面
|
|
139
|
+
let addRowIndex = -1
|
|
140
|
+
if (event && event.rowIndex > -1) {
|
|
141
|
+
addRowIndex = event.rowIndex + 1
|
|
142
|
+
}
|
|
138
143
|
return new Promise((resolve, reject) => {
|
|
139
144
|
if (!listCode) {
|
|
140
145
|
listCode = store.get('_list_code')
|
|
@@ -257,10 +262,18 @@ const apis = {
|
|
|
257
262
|
if (gridParams.isSubTableShowPage !== undefined && gridParams.isSubTableShowPage === true) {
|
|
258
263
|
// 子表集合添加该新建的行。会触发watch subTableData的监控
|
|
259
264
|
gridParams.isChangePage = true
|
|
260
|
-
|
|
265
|
+
if (addRowIndex >= 0) {
|
|
266
|
+
gridParams.subTableData.splice(addRowIndex, 0, row)
|
|
267
|
+
} else {
|
|
268
|
+
gridParams.subTableData.splice(gridParams.subTableData.length, 0, row)
|
|
269
|
+
}
|
|
261
270
|
} else {
|
|
262
271
|
// 子表不分页
|
|
263
|
-
|
|
272
|
+
if (addRowIndex >= 0) {
|
|
273
|
+
gridData.splice(addRowIndex, 0, row)
|
|
274
|
+
} else {
|
|
275
|
+
gridData.splice(gridData.length, 0, row)
|
|
276
|
+
}
|
|
264
277
|
if (gridParams.lineEdit.editingCell) {
|
|
265
278
|
gridParams.lineEdit.editingCell.row = gridData.length
|
|
266
279
|
}
|
|
@@ -284,7 +297,11 @@ const apis = {
|
|
|
284
297
|
// console.log('创建行所属的list2', gridData)
|
|
285
298
|
// console.log('创建行所属的打印gridParams.gridData', gridParams.gridData)
|
|
286
299
|
const orgRow = Object.assign({}, row)
|
|
287
|
-
|
|
300
|
+
if (addRowIndex >= 0) {
|
|
301
|
+
gridParams.orgGridData.splice(addRowIndex, 0, orgRow)
|
|
302
|
+
} else {
|
|
303
|
+
gridParams.orgGridData.splice(0, 0, orgRow)
|
|
304
|
+
}
|
|
288
305
|
if (!gridParams.lineEdit.editingCell) {
|
|
289
306
|
gridParams.lineEdit.editingCell = {}
|
|
290
307
|
gridParams.lineEdit.validateErrorField = ''
|
|
@@ -1404,6 +1421,7 @@ const apis = {
|
|
|
1404
1421
|
if (!gridParams.options.customRules) {
|
|
1405
1422
|
gridParams.options.customRules = {}
|
|
1406
1423
|
}
|
|
1424
|
+
copyItem.beforeValidate = item.beforeValidate
|
|
1407
1425
|
// console.log('dynamicControlTableEdit----gridParams.options.customRules222-----', gridParams.options.customRules)
|
|
1408
1426
|
gridParams.options.customRules[prop] = copyItem
|
|
1409
1427
|
})
|
|
@@ -1439,6 +1457,9 @@ const apis = {
|
|
|
1439
1457
|
if (this.$refs && this.$refs.superGrid) {
|
|
1440
1458
|
this.$refs.superGrid.doLayout()
|
|
1441
1459
|
}
|
|
1460
|
+
},
|
|
1461
|
+
getCustomFunc(funcName) {
|
|
1462
|
+
window.$PageUtil.getCustomFunc(this.pageContext, funcName)
|
|
1442
1463
|
}
|
|
1443
1464
|
}
|
|
1444
1465
|
export default apis
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-radio-group
|
|
3
|
+
ref="item"
|
|
4
|
+
v-model="innerValue"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:title="getClassOptionTitle(innerValue)"
|
|
7
|
+
@blur="emits('cellEvent', 'blur', $event)"
|
|
8
|
+
@change="changeValue"
|
|
9
|
+
@clear="emits('cellEvent', 'clear', $event)"
|
|
10
|
+
@focus="emits('cellEvent', 'focus', $event)"
|
|
11
|
+
@input="emits('cellEvent', 'input', $event)"
|
|
12
|
+
@visible-change="emits('cellEvent', 'visible-change', $event)"
|
|
13
|
+
>
|
|
14
|
+
<el-radio v-for="item in options" :key="item.value" :value="item.value">
|
|
15
|
+
{{ item.label }}
|
|
16
|
+
</el-radio>
|
|
17
|
+
</el-radio-group>
|
|
18
|
+
</template>
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { onMounted, ref, defineProps, defineEmits } from 'vue'
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
options: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
valueSetOptions: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
disabled: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false
|
|
33
|
+
},
|
|
34
|
+
modelValue: {
|
|
35
|
+
type: [String, Number, Boolean],
|
|
36
|
+
default: ''
|
|
37
|
+
},
|
|
38
|
+
prop: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ''
|
|
41
|
+
},
|
|
42
|
+
entity: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: () => ({})
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const emits = defineEmits(['update:modelValue', 'cellEvent', 'getClassOptionTitle'])
|
|
49
|
+
const innerValue = ref(props.modelValue)
|
|
50
|
+
|
|
51
|
+
const changeValue = (val: any) => {
|
|
52
|
+
innerValue.value = val
|
|
53
|
+
if (props.valueSetOptions && props.valueSetOptions.length > 0) {
|
|
54
|
+
// 如果有valueSetOptions,则根据valueSetOptions设置对应的值
|
|
55
|
+
const selectedOptions = getSelectedOptionItem(val, props.options)
|
|
56
|
+
if (selectedOptions) {
|
|
57
|
+
props.valueSetOptions.forEach((item: any) => {
|
|
58
|
+
if (item.valueField !== props.prop) {
|
|
59
|
+
props.entity[item.valueField] = selectedOptions[item.columnName]
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
emits('update:modelValue', val)
|
|
65
|
+
emits('cellEvent', 'change', val)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 根据value获取options中value等于传递的value的选项
|
|
70
|
+
*/
|
|
71
|
+
function getSelectedOptionItem(value, options) {
|
|
72
|
+
if (!options) {
|
|
73
|
+
return []
|
|
74
|
+
}
|
|
75
|
+
return options.find((item) => {
|
|
76
|
+
return item.value === value
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function getClassOptionTitle(val) {
|
|
81
|
+
if (val !== null && val !== undefined && val !== '' && val.length > 0) {
|
|
82
|
+
let selectTittle = ''
|
|
83
|
+
if (typeof val === 'string') {
|
|
84
|
+
// 单选
|
|
85
|
+
props.options?.forEach((item: any) => {
|
|
86
|
+
if (item.value === val) {
|
|
87
|
+
selectTittle = item.label
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
} else {
|
|
91
|
+
// 多选
|
|
92
|
+
props.options?.forEach((item: any) => {
|
|
93
|
+
val.forEach((Vtem) => {
|
|
94
|
+
if (item.value === Vtem) {
|
|
95
|
+
selectTittle = selectTittle + item.label + ','
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
selectTittle = selectTittle.slice(0, selectTittle.length - 1)
|
|
100
|
+
}
|
|
101
|
+
return selectTittle
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|