@lambo-design/workflow-approve 1.0.0-beta.144 → 1.0.0-beta.145
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/package.json +1 -1
- package/src/components/assignee-box.vue +68 -68
- package/src/components/candidate-groups-box.vue +346 -6
- package/src/portrait.vue +42 -10
package/package.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
13
|
<div class="org-detil">
|
|
14
|
-
<LamboPagingTable :key="tableRenderKey" ref="selection" highlight-row :data="tableData" :dataUrl="dataUrl" :columns="tableColumn" :searchParams="tableSearchParams" :height="tableHeight" :width="tableWidth"
|
|
15
|
-
@on-selection-change="onSelectionChange" @on-current-change="onCurrentChange" :page-disable="useTransferRangeUsers" :showTableOption="!useTransferRangeUsers" :stripe="false">
|
|
14
|
+
<LamboPagingTable :key="tableRenderKey" ref="selection" highlight-row :data="tableData" :dataUrl="dataUrl" :columns="tableColumn" :searchParams="tableSearchParams" :height="tableHeight" :width="tableWidth"
|
|
15
|
+
@on-selection-change="onSelectionChange" @on-current-change="onCurrentChange" :page-disable="useTransferRangeUsers" :showTableOption="!useTransferRangeUsers" :stripe="false">
|
|
16
16
|
<div slot="search" v-if="!useTransferRangeUsers">
|
|
17
17
|
<Form :label-width="60" label-colon>
|
|
18
18
|
<Row>
|
|
@@ -105,9 +105,9 @@ export default {
|
|
|
105
105
|
permScope: 'all',
|
|
106
106
|
modalBoxShow: false,
|
|
107
107
|
dataUrl:'',
|
|
108
|
-
tableData:[],
|
|
109
|
-
tableRenderKey: 0,
|
|
110
|
-
helpBoxColumns: [
|
|
108
|
+
tableData:[],
|
|
109
|
+
tableRenderKey: 0,
|
|
110
|
+
helpBoxColumns: [
|
|
111
111
|
{
|
|
112
112
|
title: "用户ID",
|
|
113
113
|
key: "userId",
|
|
@@ -231,39 +231,39 @@ export default {
|
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
233
|
inject: ['toBeDoneListDoSearch'],
|
|
234
|
-
methods: {
|
|
235
|
-
init (organTreeType) {
|
|
236
|
-
let self = this
|
|
237
|
-
self.organTreeType = organTreeType
|
|
238
|
-
self.getRootData(organTreeType)
|
|
239
|
-
},
|
|
240
|
-
resetBoxState(){
|
|
241
|
-
this.tableRenderKey += 1
|
|
242
|
-
this.idSelectedArr = []
|
|
243
|
-
this.currentNode = {}
|
|
244
|
-
this.treeData = []
|
|
245
|
-
this.tableData = []
|
|
246
|
-
this.tableSearchParams = {}
|
|
247
|
-
this.dataUrl = ''
|
|
248
|
-
this.useTransferRangeUsers = false
|
|
249
|
-
this.useTransferRangeOrgan = false
|
|
250
|
-
this.permScopeList = 'all'
|
|
251
|
-
this.form = {
|
|
252
|
-
userId: '',
|
|
253
|
-
userName: '',
|
|
254
|
-
organId: '',
|
|
255
|
-
organTitle: '',
|
|
256
|
-
directChild: false,
|
|
257
|
-
isAdmin: ''
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
clearData(){
|
|
261
|
-
this.resetBoxState()
|
|
262
|
-
},
|
|
263
|
-
toggleShowHelpBox(organTreeType, permScope, helpBoxType, id, data, title) {
|
|
264
|
-
this.clearData()
|
|
265
|
-
this.id = id
|
|
266
|
-
this.title = title
|
|
234
|
+
methods: {
|
|
235
|
+
init (organTreeType) {
|
|
236
|
+
let self = this
|
|
237
|
+
self.organTreeType = organTreeType
|
|
238
|
+
self.getRootData(organTreeType)
|
|
239
|
+
},
|
|
240
|
+
resetBoxState(){
|
|
241
|
+
this.tableRenderKey += 1
|
|
242
|
+
this.idSelectedArr = []
|
|
243
|
+
this.currentNode = {}
|
|
244
|
+
this.treeData = []
|
|
245
|
+
this.tableData = []
|
|
246
|
+
this.tableSearchParams = {}
|
|
247
|
+
this.dataUrl = ''
|
|
248
|
+
this.useTransferRangeUsers = false
|
|
249
|
+
this.useTransferRangeOrgan = false
|
|
250
|
+
this.permScopeList = 'all'
|
|
251
|
+
this.form = {
|
|
252
|
+
userId: '',
|
|
253
|
+
userName: '',
|
|
254
|
+
organId: '',
|
|
255
|
+
organTitle: '',
|
|
256
|
+
directChild: false,
|
|
257
|
+
isAdmin: ''
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
clearData(){
|
|
261
|
+
this.resetBoxState()
|
|
262
|
+
},
|
|
263
|
+
toggleShowHelpBox(organTreeType, permScope, helpBoxType, id, data, title) {
|
|
264
|
+
this.clearData()
|
|
265
|
+
this.id = id
|
|
266
|
+
this.title = title ? title : '选择人员'
|
|
267
267
|
this.helpBoxType = helpBoxType
|
|
268
268
|
this.organTreeType = organTreeType
|
|
269
269
|
if (helpBoxType === 'appointHandlerWithCandGroups'){
|
|
@@ -769,14 +769,14 @@ export default {
|
|
|
769
769
|
}
|
|
770
770
|
},
|
|
771
771
|
|
|
772
|
-
onCancel () {
|
|
773
|
-
if (this.helpBoxType === 'auditTo82'){
|
|
774
|
-
this.$emit('update-selected', ''); // 触发事件并传递 userId
|
|
775
|
-
}
|
|
776
|
-
this.resetBoxState()
|
|
777
|
-
this.modalBoxShow = false;
|
|
778
|
-
|
|
779
|
-
},
|
|
772
|
+
onCancel () {
|
|
773
|
+
if (this.helpBoxType === 'auditTo82'){
|
|
774
|
+
this.$emit('update-selected', ''); // 触发事件并传递 userId
|
|
775
|
+
}
|
|
776
|
+
this.resetBoxState()
|
|
777
|
+
this.modalBoxShow = false;
|
|
778
|
+
|
|
779
|
+
},
|
|
780
780
|
|
|
781
781
|
getSystemConfig(){
|
|
782
782
|
const self = this
|
|
@@ -795,26 +795,26 @@ export default {
|
|
|
795
795
|
</script>
|
|
796
796
|
|
|
797
797
|
<style lang="less" scope>
|
|
798
|
-
.org-info{
|
|
799
|
-
display: flex;
|
|
800
|
-
height: auto;
|
|
801
|
-
max-height: none;
|
|
802
|
-
.org-tree {
|
|
803
|
-
width: 265px;
|
|
804
|
-
min-height: 0;
|
|
805
|
-
border-right: 1px solid #dcdee2;
|
|
806
|
-
.tree-content {
|
|
807
|
-
height: auto;
|
|
808
|
-
overflow-y: auto;
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
.org-detil {
|
|
813
|
-
flex:1;
|
|
814
|
-
min-height: 0;
|
|
815
|
-
min-width: 800px;
|
|
816
|
-
padding: 0 10px 10px;
|
|
817
|
-
margin-left: 10px;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
798
|
+
.org-info{
|
|
799
|
+
display: flex;
|
|
800
|
+
height: auto;
|
|
801
|
+
max-height: none;
|
|
802
|
+
.org-tree {
|
|
803
|
+
width: 265px;
|
|
804
|
+
min-height: 0;
|
|
805
|
+
border-right: 1px solid #dcdee2;
|
|
806
|
+
.tree-content {
|
|
807
|
+
height: auto;
|
|
808
|
+
overflow-y: auto;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
.org-detil {
|
|
813
|
+
flex:1;
|
|
814
|
+
min-height: 0;
|
|
815
|
+
min-width: 800px;
|
|
816
|
+
padding: 0 10px 10px;
|
|
817
|
+
margin-left: 10px;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
820
|
</style>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</div>
|
|
40
40
|
<div class="cont">
|
|
41
41
|
<div
|
|
42
|
-
:class="[this.dataName == '' || this.dataName == '0' || this.dataName == '2' || this.dataName == '4' || (this.dataName == '3' && ucAdapterType =='sc') ? 'contLeftTwo': 'contLeft']">
|
|
42
|
+
:class="[this.dataName == '' || this.dataName == '0' || this.dataName == '2' || this.dataName == '4' || this.dataName == '5' || (this.dataName == '3' && ucAdapterType =='sc') ? 'contLeftTwo': 'contLeft']">
|
|
43
43
|
|
|
44
44
|
<Tabs :animated="false" @on-click="dataNameClick">
|
|
45
45
|
<TabPane label="选组织">
|
|
@@ -83,6 +83,31 @@
|
|
|
83
83
|
@on-select-change="selectPostChange"></Tree>
|
|
84
84
|
</div>
|
|
85
85
|
</TabPane>
|
|
86
|
+
<TabPane v-if="ucAdapterType === 'x1'" label="人员群组">
|
|
87
|
+
<div class="group-panel">
|
|
88
|
+
<div class="group-search">
|
|
89
|
+
<div class="group-search-item">
|
|
90
|
+
<span>群组名称</span>
|
|
91
|
+
<Input v-model="groupSearchForm.groupName" clearable placeholder="请输入群组名称" />
|
|
92
|
+
</div>
|
|
93
|
+
<Button type="primary" @click="doGroupSearch">查询</Button>
|
|
94
|
+
<Button @click="doGroupReset">重置</Button>
|
|
95
|
+
</div>
|
|
96
|
+
<LamboPagingTable
|
|
97
|
+
:key="groupTableKey"
|
|
98
|
+
ref="groupTable"
|
|
99
|
+
:dataUrl="groupDataUrl"
|
|
100
|
+
:columns="groupTableColumn"
|
|
101
|
+
:row-key="'groupId'"
|
|
102
|
+
:searchParams="groupTableSearchParams"
|
|
103
|
+
:requestSuccessCodes="requestSuccessCodes"
|
|
104
|
+
:showTableOption="false"
|
|
105
|
+
:fixHead="true"
|
|
106
|
+
@on-selection-change="handleGroupSelectionChange"
|
|
107
|
+
@on-data-load="handleGroupDataLoad"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
</TabPane>
|
|
86
111
|
<TabPane label="选组织类型" v-if="ucAdapterType === 'sc'">
|
|
87
112
|
<div class="overflowAuto">
|
|
88
113
|
<div v-if="readingRangeOrgType.length === 0">暂无数据</div>
|
|
@@ -128,7 +153,7 @@
|
|
|
128
153
|
</Card>
|
|
129
154
|
</div>
|
|
130
155
|
<div
|
|
131
|
-
:class="[this.dataName == '' || this.dataName == '0' || this.dataName == '2' || this.dataName == '4' || (this.dataName == '3' && ucAdapterType =='sc') ? 'contRightTwo': 'contRight']">
|
|
156
|
+
:class="[this.dataName == '' || this.dataName == '0' || this.dataName == '2' || this.dataName == '4' || this.dataName == '5' || (this.dataName == '3' && ucAdapterType =='sc') ? 'contRightTwo': 'contRight']">
|
|
132
157
|
<Card dis-hover>
|
|
133
158
|
<div class="overflowAuto">
|
|
134
159
|
<Title>已选择:{{ treeLength }}/100 <a type="text" style="float: right;color: #989898"
|
|
@@ -178,7 +203,19 @@
|
|
|
178
203
|
</div>
|
|
179
204
|
</template>
|
|
180
205
|
</Panel>
|
|
181
|
-
<Panel name="5"
|
|
206
|
+
<Panel name="5">
|
|
207
|
+
<span class="fontSize">人员群组</span>
|
|
208
|
+
<template #content>
|
|
209
|
+
<div v-if="selectedGroupList.length === 0" class="summary-empty"></div>
|
|
210
|
+
<div v-else class="summary-list">
|
|
211
|
+
<div class="summary-item" v-for="group in selectedGroupList" :key="group.groupId">
|
|
212
|
+
<span>{{ group.groupName }}</span>
|
|
213
|
+
<Icon type="md-close" class="summary-remove" @click="removeSelectedGroup(group.groupId)" />
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
</template>
|
|
217
|
+
</Panel>
|
|
218
|
+
<Panel name="6" v-if="ucAdapterType === 'sc'">
|
|
182
219
|
<span class="fontSize">组织类型</span>
|
|
183
220
|
<template #content>
|
|
184
221
|
<div v-for="(item, itemIndex) in treeOrgTypeValue" :key="itemIndex">
|
|
@@ -200,6 +237,7 @@
|
|
|
200
237
|
import ajax from "@lambo-design/shared/utils/ajax";
|
|
201
238
|
import Title from "./title";
|
|
202
239
|
import TreeSelect from '@lambo-design/tree-select'
|
|
240
|
+
import LamboPagingTable from '@lambo-design/paging-table'
|
|
203
241
|
|
|
204
242
|
export default {
|
|
205
243
|
name: "candidateGroupsHelpBox",
|
|
@@ -215,7 +253,8 @@ export default {
|
|
|
215
253
|
},
|
|
216
254
|
components: {
|
|
217
255
|
Title,
|
|
218
|
-
TreeSelect
|
|
256
|
+
TreeSelect,
|
|
257
|
+
LamboPagingTable
|
|
219
258
|
},
|
|
220
259
|
data() {
|
|
221
260
|
return {
|
|
@@ -245,6 +284,15 @@ export default {
|
|
|
245
284
|
treeLength: 0,
|
|
246
285
|
treeValueBM: [],
|
|
247
286
|
treeOrgTypeValue:[],
|
|
287
|
+
groupDataUrl: '',
|
|
288
|
+
requestSuccessCodes: [200, '200'],
|
|
289
|
+
groupTableKey: 0,
|
|
290
|
+
groupTableSearchParams: {},
|
|
291
|
+
groupSearchForm: {
|
|
292
|
+
groupName: '',
|
|
293
|
+
},
|
|
294
|
+
groupCurrentRows: [],
|
|
295
|
+
groupSelectedMap: {},
|
|
248
296
|
dataName: "",
|
|
249
297
|
postList: [],//选中岗位集合(右侧显示)
|
|
250
298
|
processPostList: [],//岗位集合
|
|
@@ -286,9 +334,63 @@ export default {
|
|
|
286
334
|
};
|
|
287
335
|
},
|
|
288
336
|
created() {
|
|
337
|
+
this.groupDataUrl = this.smartFlowServerContext + '/manage/smartflowUserGroup/list'
|
|
289
338
|
this.getSystemConfig()
|
|
290
339
|
},
|
|
291
340
|
computed: {
|
|
341
|
+
selectedGroupList() {
|
|
342
|
+
return Object.values(this.groupSelectedMap || {});
|
|
343
|
+
},
|
|
344
|
+
groupTableColumn() {
|
|
345
|
+
const self = this;
|
|
346
|
+
return [
|
|
347
|
+
{
|
|
348
|
+
type: 'selection',
|
|
349
|
+
width: 60,
|
|
350
|
+
fixed: 'left',
|
|
351
|
+
align: 'center',
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
title: '群组名称',
|
|
355
|
+
key: 'groupName',
|
|
356
|
+
minWidth: 120,
|
|
357
|
+
fixed: 'left',
|
|
358
|
+
tooltip: true,
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
title: '群组成员',
|
|
362
|
+
key: 'groupUsers',
|
|
363
|
+
minWidth: 300,
|
|
364
|
+
tooltip: true,
|
|
365
|
+
render: (h, { row }) => {
|
|
366
|
+
const text = self.previewGroupUsers(row.groupUsers);
|
|
367
|
+
return h('Tooltip', {
|
|
368
|
+
props: {
|
|
369
|
+
content: text,
|
|
370
|
+
transfer: true,
|
|
371
|
+
placement: 'top-start',
|
|
372
|
+
}
|
|
373
|
+
}, [h('span', text)]);
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
title: '群组描述',
|
|
378
|
+
key: 'groupRemark',
|
|
379
|
+
minWidth: 140,
|
|
380
|
+
tooltip: true,
|
|
381
|
+
render: (h, { row }) => {
|
|
382
|
+
const text = self.previewText(row.groupRemark);
|
|
383
|
+
return h('Tooltip', {
|
|
384
|
+
props: {
|
|
385
|
+
content: text,
|
|
386
|
+
transfer: true,
|
|
387
|
+
placement: 'top-start',
|
|
388
|
+
}
|
|
389
|
+
}, [h('span', text)]);
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
];
|
|
393
|
+
},
|
|
292
394
|
},
|
|
293
395
|
mounted: function () {
|
|
294
396
|
},
|
|
@@ -409,6 +511,78 @@ export default {
|
|
|
409
511
|
}
|
|
410
512
|
}
|
|
411
513
|
},
|
|
514
|
+
getGroups(row) {
|
|
515
|
+
if (!row) {
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
const appendGroups = value => {
|
|
519
|
+
if (Array.isArray(value)) {
|
|
520
|
+
value.forEach(item => appendGroups(item));
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
if (value && typeof value === 'object') {
|
|
524
|
+
const groupId = value.groupId || value.id;
|
|
525
|
+
if (groupId) {
|
|
526
|
+
this.restoreGroup(groupId, value.groupName || value.name || groupId);
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
Object.keys(value).forEach(key => appendGroups(value[key]));
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
let text = String(value || '');
|
|
533
|
+
const match = text.match(/(?:^|,)UG:([^,]*)/);
|
|
534
|
+
if (match) {
|
|
535
|
+
text = match[1];
|
|
536
|
+
}
|
|
537
|
+
text.split(/[;,]/).filter(Boolean).forEach(item => {
|
|
538
|
+
const separatorIndex = item.indexOf(':');
|
|
539
|
+
const groupId = separatorIndex === -1 ? item : item.slice(0, separatorIndex);
|
|
540
|
+
const groupName = separatorIndex === -1 ? groupId : item.slice(separatorIndex + 1);
|
|
541
|
+
if (groupId) {
|
|
542
|
+
this.restoreGroup(groupId, groupName || groupId);
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
};
|
|
546
|
+
if (typeof row === 'string') {
|
|
547
|
+
appendGroups(row);
|
|
548
|
+
} else {
|
|
549
|
+
Object.keys(row).forEach(key => {
|
|
550
|
+
const normalizedKey = String(key).toLowerCase().replace(/[_-]/g, '');
|
|
551
|
+
if (normalizedKey === 'g' || normalizedKey === 'candidategroups' || normalizedKey.includes('group')) {
|
|
552
|
+
appendGroups(row[key]);
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
this.updateLength();
|
|
557
|
+
},
|
|
558
|
+
restoreGroup(groupId, groupName) {
|
|
559
|
+
const key = String(groupId).trim();
|
|
560
|
+
if (!key) {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
this.$set(this.groupSelectedMap, key, {
|
|
564
|
+
groupId: key,
|
|
565
|
+
groupName: String(groupName || key),
|
|
566
|
+
});
|
|
567
|
+
if (groupName && String(groupName) !== key) {
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
ajax.get(this.smartFlowServerContext + '/manage/smartflowUserGroup/get', {
|
|
571
|
+
params: { groupId: key },
|
|
572
|
+
}).then(resp => {
|
|
573
|
+
const result = resp.data || {};
|
|
574
|
+
const data = result.data || result;
|
|
575
|
+
if ((result.code === 200 || result.code === '200' || result.code === 1 || result.code === '1') && data) {
|
|
576
|
+
this.$set(this.groupSelectedMap, key, Object.assign({}, data, {
|
|
577
|
+
groupId: String(data.groupId || key),
|
|
578
|
+
groupName: data.groupName || data.name || key,
|
|
579
|
+
}));
|
|
580
|
+
}
|
|
581
|
+
this.updateLength();
|
|
582
|
+
}).catch(() => {
|
|
583
|
+
this.updateLength();
|
|
584
|
+
});
|
|
585
|
+
},
|
|
412
586
|
|
|
413
587
|
getRootOrganTree(organTreeType){
|
|
414
588
|
let self = this
|
|
@@ -1702,9 +1876,13 @@ export default {
|
|
|
1702
1876
|
item.checked = false
|
|
1703
1877
|
})
|
|
1704
1878
|
this.treeOrgTypeValue = [];
|
|
1879
|
+
this.groupSelectedMap = {};
|
|
1880
|
+
this.groupCurrentRows = [];
|
|
1881
|
+
this.groupTableKey += 1;
|
|
1882
|
+
this.updateLength();
|
|
1705
1883
|
},
|
|
1706
1884
|
updateLength() {
|
|
1707
|
-
this.treeLength = this.treeValueBM.length + this.treeUserValue.length + this.noticeRoleNameList.length + this.treePostValue.length + this.treeOrgTypeValue.length
|
|
1885
|
+
this.treeLength = this.treeValueBM.length + this.treeUserValue.length + this.noticeRoleNameList.length + this.treePostValue.length + this.treeOrgTypeValue.length + this.selectedGroupList.length
|
|
1708
1886
|
},
|
|
1709
1887
|
clearCache() {
|
|
1710
1888
|
this.readingRangeBM = []
|
|
@@ -1735,6 +1913,13 @@ export default {
|
|
|
1735
1913
|
item.checked = false
|
|
1736
1914
|
})
|
|
1737
1915
|
this.treeOrgTypeValue = [];
|
|
1916
|
+
this.groupCurrentRows = [];
|
|
1917
|
+
this.groupSelectedMap = {};
|
|
1918
|
+
this.groupSearchForm = {
|
|
1919
|
+
groupName: '',
|
|
1920
|
+
};
|
|
1921
|
+
this.groupTableSearchParams = {};
|
|
1922
|
+
this.groupTableKey += 1;
|
|
1738
1923
|
},
|
|
1739
1924
|
getSystemConfig(){
|
|
1740
1925
|
const self = this
|
|
@@ -1758,6 +1943,7 @@ export default {
|
|
|
1758
1943
|
this.getOrgan(inputValue)
|
|
1759
1944
|
this.getUser(inputValue)
|
|
1760
1945
|
this.getRole(inputValue)
|
|
1946
|
+
this.getGroups(inputValue)
|
|
1761
1947
|
this.ucAdapterType === 'x1' ? this.getPost(inputValue) : this.getOrgType(inputValue)
|
|
1762
1948
|
}
|
|
1763
1949
|
if (this.permScope == 'all'){
|
|
@@ -1808,7 +1994,16 @@ export default {
|
|
|
1808
1994
|
names.push(item.typeName)
|
|
1809
1995
|
orgTypes.push(item.bizTypeCode + ':' + item.typeName)
|
|
1810
1996
|
})
|
|
1811
|
-
|
|
1997
|
+
const groupList = this.selectedGroupList.map(item => item.groupId);
|
|
1998
|
+
this.selectedGroupList.forEach(item => {
|
|
1999
|
+
if (item.groupName) {
|
|
2000
|
+
names.push(item.groupName)
|
|
2001
|
+
}
|
|
2002
|
+
})
|
|
2003
|
+
let value = 'O:' + organ.join(";") + "," + "U:" + nameValue.join(";") + "," + "P:" + postList.join(";") + "," + "R:" + roleList.join(";") + "," + "RP:,T:" + orgTypeList.join(";") + ",UG:" + groupList.join(";");
|
|
2004
|
+
if ([organ, nameValue, postList, roleList, groupList, orgTypeList].every(arr => arr.length === 0)) {
|
|
2005
|
+
value = '';
|
|
2006
|
+
}
|
|
1812
2007
|
let nameStr = names.join(",")
|
|
1813
2008
|
let detail = {
|
|
1814
2009
|
organs: organs.join(","),
|
|
@@ -1816,10 +2011,104 @@ export default {
|
|
|
1816
2011
|
roles: roles.join(","),
|
|
1817
2012
|
positions: positions.join(","),
|
|
1818
2013
|
types: orgTypes.join(","),
|
|
2014
|
+
groups: groupList.join(","),
|
|
1819
2015
|
}
|
|
1820
2016
|
this.$emit('update-cand-groups', value, nameStr, detail, this.id);
|
|
1821
2017
|
this.modalBoxShow = false;
|
|
1822
2018
|
},
|
|
2019
|
+
doGroupSearch() {
|
|
2020
|
+
this.groupTableSearchParams = Object.assign({}, this.groupSearchForm);
|
|
2021
|
+
this.$nextTick(() => {
|
|
2022
|
+
if (this.$refs.groupTable && this.$refs.groupTable.tableRefresh) {
|
|
2023
|
+
this.$refs.groupTable.tableRefresh();
|
|
2024
|
+
}
|
|
2025
|
+
});
|
|
2026
|
+
},
|
|
2027
|
+
doGroupReset() {
|
|
2028
|
+
this.groupSearchForm = { groupName: '' };
|
|
2029
|
+
this.groupTableSearchParams = {};
|
|
2030
|
+
this.$nextTick(() => {
|
|
2031
|
+
if (this.$refs.groupTable && this.$refs.groupTable.tableRefresh) {
|
|
2032
|
+
this.$refs.groupTable.tableRefresh();
|
|
2033
|
+
}
|
|
2034
|
+
});
|
|
2035
|
+
},
|
|
2036
|
+
handleGroupDataLoad(resp) {
|
|
2037
|
+
this.groupCurrentRows = this.extractGroupRows(resp);
|
|
2038
|
+
this.$nextTick(() => this.syncGroupTableSelection());
|
|
2039
|
+
},
|
|
2040
|
+
handleGroupSelectionChange(selection) {
|
|
2041
|
+
const selectedIds = new Set((selection || []).map(item => String(item.groupId)));
|
|
2042
|
+
this.groupCurrentRows.forEach(row => {
|
|
2043
|
+
const key = String(row.groupId);
|
|
2044
|
+
if (selectedIds.has(key)) {
|
|
2045
|
+
this.$set(this.groupSelectedMap, key, row);
|
|
2046
|
+
} else {
|
|
2047
|
+
this.$delete(this.groupSelectedMap, key);
|
|
2048
|
+
}
|
|
2049
|
+
});
|
|
2050
|
+
this.updateLength();
|
|
2051
|
+
},
|
|
2052
|
+
removeSelectedGroup(groupId) {
|
|
2053
|
+
this.$delete(this.groupSelectedMap, String(groupId));
|
|
2054
|
+
this.syncGroupTableSelection();
|
|
2055
|
+
this.updateLength();
|
|
2056
|
+
},
|
|
2057
|
+
syncGroupTableSelection() {
|
|
2058
|
+
const table = this.$refs.groupTable && this.$refs.groupTable.$refs && this.$refs.groupTable.$refs.tableRef;
|
|
2059
|
+
if (!table || typeof table.getDataByRowKey !== 'function') {
|
|
2060
|
+
return;
|
|
2061
|
+
}
|
|
2062
|
+
const selectedIds = new Set(Object.keys(this.groupSelectedMap || {}).map(key => String(key)));
|
|
2063
|
+
(this.groupCurrentRows || []).forEach(row => {
|
|
2064
|
+
const tableRow = table.getDataByRowKey(String(row.groupId));
|
|
2065
|
+
if (tableRow) {
|
|
2066
|
+
this.$set(tableRow, '_isChecked', selectedIds.has(String(row.groupId)));
|
|
2067
|
+
}
|
|
2068
|
+
});
|
|
2069
|
+
},
|
|
2070
|
+
extractGroupRows(resp) {
|
|
2071
|
+
if (!resp) {
|
|
2072
|
+
return [];
|
|
2073
|
+
}
|
|
2074
|
+
const payload = resp.data && resp.data.data ? resp.data.data : resp.data || resp;
|
|
2075
|
+
if (Array.isArray(payload)) return payload;
|
|
2076
|
+
if (Array.isArray(payload.rows)) return payload.rows;
|
|
2077
|
+
if (Array.isArray(payload.list)) return payload.list;
|
|
2078
|
+
return [];
|
|
2079
|
+
},
|
|
2080
|
+
previewGroupUsers(groupUsers){
|
|
2081
|
+
return groupUsers.filter(item => item && item.userName).map(item => item.userName).join(',')
|
|
2082
|
+
},
|
|
2083
|
+
previewText(value) {
|
|
2084
|
+
if (!value) {
|
|
2085
|
+
return '-'
|
|
2086
|
+
}
|
|
2087
|
+
const text = String(value).trim()
|
|
2088
|
+
if (text.startsWith('[')) {
|
|
2089
|
+
try {
|
|
2090
|
+
const parsed = JSON.parse(text)
|
|
2091
|
+
if (Array.isArray(parsed)) {
|
|
2092
|
+
const members = parsed.map(item => {
|
|
2093
|
+
if (!item) {
|
|
2094
|
+
return ''
|
|
2095
|
+
}
|
|
2096
|
+
if (typeof item === 'string') {
|
|
2097
|
+
return item.trim()
|
|
2098
|
+
}
|
|
2099
|
+
return item.userName || item.name || item.userId || item.id || ''
|
|
2100
|
+
}).filter(Boolean)
|
|
2101
|
+
if (members.length > 0) {
|
|
2102
|
+
return members.join(',')
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
} catch (e) {
|
|
2106
|
+
// ignore parse errors and fall back to raw text
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
const compact = text.replace(/\s+/g, ' ')
|
|
2110
|
+
return compact.length > 24 ? `${compact.slice(0, 24)}...` : compact
|
|
2111
|
+
},
|
|
1823
2112
|
findTitleByValue(arr, value) {
|
|
1824
2113
|
function traverse(items) {
|
|
1825
2114
|
for (let item of items) {
|
|
@@ -1900,6 +2189,57 @@ export default {
|
|
|
1900
2189
|
margin-top: 30px;
|
|
1901
2190
|
}
|
|
1902
2191
|
|
|
2192
|
+
/deep/ .group-panel {
|
|
2193
|
+
display: flex;
|
|
2194
|
+
flex-direction: column;
|
|
2195
|
+
gap: 10px;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
/deep/ .group-search {
|
|
2199
|
+
display: grid;
|
|
2200
|
+
grid-template-columns: minmax(240px, 1fr) auto auto;
|
|
2201
|
+
gap: 10px;
|
|
2202
|
+
align-items: center;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
/deep/ .group-search-item {
|
|
2206
|
+
display: flex;
|
|
2207
|
+
align-items: center;
|
|
2208
|
+
gap: 8px;
|
|
2209
|
+
min-width: 0;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
/deep/ .group-search-item span {
|
|
2213
|
+
flex: 0 0 auto;
|
|
2214
|
+
white-space: nowrap;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
/deep/ .group-search-item .ivu-input-wrapper {
|
|
2218
|
+
width: 100%;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
/deep/ .summary-empty {
|
|
2222
|
+
min-height: 24px;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
/deep/ .summary-list {
|
|
2226
|
+
display: flex;
|
|
2227
|
+
flex-direction: column;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
/deep/ .summary-item {
|
|
2231
|
+
display: flex;
|
|
2232
|
+
align-items: center;
|
|
2233
|
+
justify-content: space-between;
|
|
2234
|
+
gap: 10px;
|
|
2235
|
+
padding: 6px 0;
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
/deep/ .summary-remove {
|
|
2239
|
+
cursor: pointer;
|
|
2240
|
+
color: #909399;
|
|
2241
|
+
}
|
|
2242
|
+
|
|
1903
2243
|
/deep/ .ivu-checkbox-input {
|
|
1904
2244
|
width: 136px;
|
|
1905
2245
|
}
|
package/src/portrait.vue
CHANGED
|
@@ -594,8 +594,8 @@ export default {
|
|
|
594
594
|
ucAdapterType: 'x1',
|
|
595
595
|
ruleValidate: {
|
|
596
596
|
auditOpinion: [{ required: true, trigger: 'blur', message: '意见不能为空' }],
|
|
597
|
-
assignee: [{ required: true, trigger: '
|
|
598
|
-
candidateGroups: [{ required: true, trigger: '
|
|
597
|
+
assignee: [{ required: true, trigger: 'submit', message: '办理人不能为空' }],
|
|
598
|
+
candidateGroups: [{ required: true, trigger: 'submit', message: '办理人范围不能为空' }],
|
|
599
599
|
},
|
|
600
600
|
form: {
|
|
601
601
|
auditOpinion: '',
|
|
@@ -1525,16 +1525,24 @@ export default {
|
|
|
1525
1525
|
let nextNodeOldForm = {}
|
|
1526
1526
|
let data = resp.data.data
|
|
1527
1527
|
for (let i = 0; i < data.length; i++) {
|
|
1528
|
+
const assignee = data[i].assignee
|
|
1529
|
+
const assigneeId = assignee && typeof assignee === 'object'
|
|
1530
|
+
? (assignee.id || assignee.userId || '')
|
|
1531
|
+
: (assignee || '')
|
|
1532
|
+
const assigneeName = assignee && typeof assignee === 'object'
|
|
1533
|
+
? (assignee.name || assignee.userName || '')
|
|
1534
|
+
: ''
|
|
1528
1535
|
nextNodeOldForm = {
|
|
1529
1536
|
id: data[i].id,
|
|
1530
1537
|
timeLimit: data[i].timeLimit,
|
|
1538
|
+
assignee: assigneeId,
|
|
1531
1539
|
}
|
|
1532
1540
|
nextNodeForm = {
|
|
1533
1541
|
id: data[i].id,
|
|
1534
1542
|
name: data[i].name,
|
|
1535
1543
|
orgTreeType: data[i].orgTreeType,
|
|
1536
|
-
assignee:
|
|
1537
|
-
assigneeName:
|
|
1544
|
+
assignee: assigneeId,
|
|
1545
|
+
assigneeName: assigneeName,
|
|
1538
1546
|
candidateGroups: '',
|
|
1539
1547
|
isMultiInstance: data[i].isMultiInstance,
|
|
1540
1548
|
actionType: '',
|
|
@@ -1546,13 +1554,12 @@ export default {
|
|
|
1546
1554
|
}
|
|
1547
1555
|
if (!self.nextAssigneeSelectionType || self.nextAssigneeSelectionType == 'assignee'){
|
|
1548
1556
|
nextNodeForm.actionType = 'ASSIGNEE'
|
|
1549
|
-
nextNodeForm.assignee = data[i].assignee ? data[i].assignee.id : ''
|
|
1550
|
-
nextNodeForm.assigneeName = data[i].assignee ? data[i].assignee.name : ''
|
|
1551
|
-
nextNodeOldForm.assignee = data[i].assignee ? data[i].assignee.id : ''
|
|
1552
1557
|
}
|
|
1553
1558
|
//显示具体候选人信息
|
|
1554
|
-
if (data[i].candidateGroups
|
|
1555
|
-
|
|
1559
|
+
if (data[i].candidateGroups) {
|
|
1560
|
+
if (!self.nextAssigneeSelectionType || self.nextAssigneeSelectionType == 'candidate') {
|
|
1561
|
+
nextNodeForm.actionType = 'CAND'
|
|
1562
|
+
}
|
|
1556
1563
|
let names = []
|
|
1557
1564
|
let candidates = {}
|
|
1558
1565
|
for (let groupName in data[i].candidateGroups) {
|
|
@@ -2536,7 +2543,7 @@ export default {
|
|
|
2536
2543
|
}
|
|
2537
2544
|
|
|
2538
2545
|
const newIdList = [];
|
|
2539
|
-
const regex = /(?:O:|U:|P:|R:|T:)([^,]+)/g
|
|
2546
|
+
const regex = /(?:O:|U:|P:|R:|RP:|T:|UG:)([^,]+)/g
|
|
2540
2547
|
let match;
|
|
2541
2548
|
while ((match = regex.exec(newSetting)) !== null) {
|
|
2542
2549
|
const idListStr = match[1];
|
|
@@ -2549,6 +2556,31 @@ export default {
|
|
|
2549
2556
|
}
|
|
2550
2557
|
return {oldIdList, newIdList}
|
|
2551
2558
|
},
|
|
2559
|
+
getCandidateGroupType(groupName) {
|
|
2560
|
+
const key = String(groupName || '').toLowerCase().replace(/[_-]/g, '')
|
|
2561
|
+
if (key === 'o' || key === 'organ' || key === 'org' || key === 'organs' || key === 'organization' || key === 'organizations') {
|
|
2562
|
+
return 'O'
|
|
2563
|
+
}
|
|
2564
|
+
if (key === 'u' || key === 'user' || key === 'users') {
|
|
2565
|
+
return 'U'
|
|
2566
|
+
}
|
|
2567
|
+
if (key === 'p' || key === 'post' || key === 'posts' || key === 'position' || key === 'positions') {
|
|
2568
|
+
return 'P'
|
|
2569
|
+
}
|
|
2570
|
+
if (key === 'r' || key === 'role' || key === 'roles') {
|
|
2571
|
+
return 'R'
|
|
2572
|
+
}
|
|
2573
|
+
if (key === 'rp' || key === 'relativeposition' || key === 'relativepositions') {
|
|
2574
|
+
return 'RP'
|
|
2575
|
+
}
|
|
2576
|
+
if (key === 't' || key === 'type' || key === 'types' || key === 'orgtype' || key === 'orgtypes') {
|
|
2577
|
+
return 'T'
|
|
2578
|
+
}
|
|
2579
|
+
if (key === 'g' || key === 'ug' || key === 'group' || key === 'groups' || key === 'usergroup' || key === 'usergroups' || key === 'persongroup' || key === 'persongroups' || key === 'candidategroup' || key === 'candidategroups' || key.includes('group')) {
|
|
2580
|
+
return 'UG'
|
|
2581
|
+
}
|
|
2582
|
+
return ''
|
|
2583
|
+
},
|
|
2552
2584
|
checkAssigneeUpdate(oldSetting, newSetting) {
|
|
2553
2585
|
const oldSettingEmpty = this.isEmpty(oldSetting);
|
|
2554
2586
|
const newSettingEmpty = this.isEmpty(newSetting);
|