sasp-flow-render 1.1.3 → 1.1.6
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/index.js +20 -8
- package/package.json +1 -1
- package/src/assets/js/api/apiFlow.js +13 -1
- package/src/components/flowInst/flowInstList.vue +61 -29
- package/src/components/flowInst/flowInstTab.vue +610 -45
- package/src/components/flowNewBatchDeal.vue +556 -0
- package/src/views/flowInstView.vue +7 -2
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container style="height: 100%">
|
|
3
|
+
<el-header style="height: auto">
|
|
4
|
+
<el-form inline size="small" class="search-form-parent el-card">
|
|
5
|
+
<el-form-item label="任务节点筛选">
|
|
6
|
+
<el-select v-model="formSearchObj.taskNode" style="width: 97%;"
|
|
7
|
+
clearable filterable @change="taskNodeChange">
|
|
8
|
+
<el-option v-for="item in taskNodeArr" :key="item.currentNode"
|
|
9
|
+
:label="item.currentNodeName"
|
|
10
|
+
:value="item.nodeKey">
|
|
11
|
+
</el-option>
|
|
12
|
+
</el-select>
|
|
13
|
+
</el-form-item>
|
|
14
|
+
<el-form-item>
|
|
15
|
+
<el-button type="primary" icon="el-icon-search" @click="doSearch()">查询</el-button>
|
|
16
|
+
<el-button icon="el-icon-close" @click="clearSearch()">清空</el-button>
|
|
17
|
+
</el-form-item>
|
|
18
|
+
</el-form>
|
|
19
|
+
</el-header>
|
|
20
|
+
<el-main style="padding-top: 10px;padding-bottom: 0">
|
|
21
|
+
<div style="margin-bottom: 10px;">
|
|
22
|
+
<el-button type="primary" size="small" @click="partSubmit">提交</el-button>
|
|
23
|
+
</div>
|
|
24
|
+
<el-form size="small" style="height: calc(100% - 42px);position: relative">
|
|
25
|
+
<el-table
|
|
26
|
+
v-loading="formSearchObj.loading"
|
|
27
|
+
element-loading-text="正在加载,请稍等..."
|
|
28
|
+
element-loading-spinner="el-icon-loading"
|
|
29
|
+
element-loading-background="rgba(0, 0, 0, 0.6)"
|
|
30
|
+
ref="multipleTable"
|
|
31
|
+
:data="formSearchObj.flowNewBatchDealArr"
|
|
32
|
+
tooltip-effect="dark" stripe
|
|
33
|
+
height="100%" style="width: 100%"
|
|
34
|
+
:cell-class-name="cellClassNameFunc"
|
|
35
|
+
@row-click="handleRowClick"
|
|
36
|
+
@selection-change="handleSelectionChange">
|
|
37
|
+
<el-table-column
|
|
38
|
+
prop="selection"
|
|
39
|
+
header-align="center"
|
|
40
|
+
align="center"
|
|
41
|
+
type="selection"
|
|
42
|
+
:selectable="newBatchDealSelectable"
|
|
43
|
+
width="60">
|
|
44
|
+
</el-table-column>
|
|
45
|
+
<el-table-column
|
|
46
|
+
prop="index"
|
|
47
|
+
header-align="center"
|
|
48
|
+
align="center"
|
|
49
|
+
label="序号"
|
|
50
|
+
type="index"
|
|
51
|
+
width="60">
|
|
52
|
+
</el-table-column>
|
|
53
|
+
<el-table-column
|
|
54
|
+
header-align="center"
|
|
55
|
+
label="概要"
|
|
56
|
+
prop="flowSummary"
|
|
57
|
+
show-overflow-tooltip>
|
|
58
|
+
<template slot-scope="scope">{{ scope.row.outlineType === "diy" ? scope.row.outlineResult : scope.row.flowSummary }}</template>
|
|
59
|
+
</el-table-column>
|
|
60
|
+
<el-table-column
|
|
61
|
+
header-align="center"
|
|
62
|
+
align="center"
|
|
63
|
+
prop="currentNodeName"
|
|
64
|
+
label="当前任务"
|
|
65
|
+
width="150"
|
|
66
|
+
show-overflow-tooltip>
|
|
67
|
+
</el-table-column>
|
|
68
|
+
<el-table-column
|
|
69
|
+
header-align="center"
|
|
70
|
+
align="center"
|
|
71
|
+
prop="checkInfo"
|
|
72
|
+
width="500"
|
|
73
|
+
label="审核信息">
|
|
74
|
+
<template slot-scope="scope">
|
|
75
|
+
<!--:rules="plValidate('required')"-->
|
|
76
|
+
<div class="sh-left-box">
|
|
77
|
+
<div v-if="(scope.row.settingInfo || []).length > 0">
|
|
78
|
+
<div v-for="(items, Index) in scope.row.settingInfo" :key="items.id" v-show="items.processStatus === '1'">
|
|
79
|
+
<el-form-item :prop="'flowNewBatchDealArr.' + scope.$index + '.settingInfo.' + Index + '.defaultValue'"
|
|
80
|
+
:label-width="shLabelWidth" v-if="items.fieldType === 'radio'">
|
|
81
|
+
<div slot="label" class="text-overflow" :title="items.showText">{{ items.showText || "" }}</div>
|
|
82
|
+
<el-radio-group v-model="items.defaultValue" :disabled="scope.row.isLoading && isRefreshGetNextUsers.includes(items.field)"
|
|
83
|
+
@input="val => checkInfoChange(scope.row, items, val)">
|
|
84
|
+
<el-radio :label="item.value" v-for="(item, index) in items.options" :key="index">{{ item.label }}</el-radio>
|
|
85
|
+
</el-radio-group>
|
|
86
|
+
</el-form-item>
|
|
87
|
+
|
|
88
|
+
<el-form-item :prop="'flowNewBatchDealArr.' + scope.$index + '.settingInfo.' + Index + '.defaultValue'"
|
|
89
|
+
:label-width="shLabelWidth" v-if="items.fieldType === 'checkbox'">
|
|
90
|
+
<div slot="label" class="text-overflow" :title="items.showText">{{ items.showText || "" }}</div>
|
|
91
|
+
<el-checkbox-group v-model="items.defaultValue" :disabled="scope.row.isLoading && isRefreshGetNextUsers.includes(items.field)"
|
|
92
|
+
@change="val => checkInfoChange(scope.row, items, val)">
|
|
93
|
+
<el-checkbox :label="item.value" v-for="(item, index) in items.options" :key="index">{{ item.label }}</el-checkbox>
|
|
94
|
+
</el-checkbox-group>
|
|
95
|
+
</el-form-item>
|
|
96
|
+
|
|
97
|
+
<el-form-item :prop="'flowNewBatchDealArr.' + scope.$index + '.settingInfo.' + Index + '.defaultValue'"
|
|
98
|
+
label="" :label-width="shLabelWidth" v-if="items.fieldType === 'text'">
|
|
99
|
+
<div slot="label" class="text-overflow" :title="items.showText">{{ items.showText || "" }}</div>
|
|
100
|
+
<el-input v-model="items.defaultValue" @change="val => checkInfoChange(scope.row, items, val)"></el-input>
|
|
101
|
+
</el-form-item>
|
|
102
|
+
|
|
103
|
+
<el-form-item :prop="'flowNewBatchDealArr.' + scope.$index + '.settingInfo.' + Index + '.defaultValue'"
|
|
104
|
+
label="" :label-width="shLabelWidth" v-if="items.fieldType === 'select'">
|
|
105
|
+
<div slot="label" class="text-overflow" :title="items.showText">{{ items.showText || "" }}</div>
|
|
106
|
+
<el-select v-model="items.defaultValue" :multiple="items.multi === '1'" style="width: 100%"
|
|
107
|
+
@change="val => checkInfoChange(scope.row, items, val)">
|
|
108
|
+
<el-option v-for="(item, index) in items.options"
|
|
109
|
+
:key="item.value"
|
|
110
|
+
:label="item.label"
|
|
111
|
+
:value="item.value">
|
|
112
|
+
</el-option>
|
|
113
|
+
</el-select>
|
|
114
|
+
</el-form-item>
|
|
115
|
+
|
|
116
|
+
<el-form-item :prop="'flowNewBatchDealArr.' + scope.$index + '.settingInfo.' + Index + '.defaultValue'"
|
|
117
|
+
label="" :label-width="shLabelWidth" v-if="items.fieldType === 'userSelect'">
|
|
118
|
+
<div slot="label" class="text-overflow" :title="items.showText">{{ items.showText || "" }}</div>
|
|
119
|
+
<el-select v-model="items.defaultValue" :multiple="items.multi === '1'" filterable clearable style="width: 100%"
|
|
120
|
+
@change="val => checkInfoChange(scope.row, items, val)">
|
|
121
|
+
<el-option v-for="key in Object.keys(userMap)"
|
|
122
|
+
:key="key"
|
|
123
|
+
:label="userMap[key]"
|
|
124
|
+
:value="key">
|
|
125
|
+
</el-option>
|
|
126
|
+
</el-select>
|
|
127
|
+
</el-form-item>
|
|
128
|
+
|
|
129
|
+
<el-form-item :prop="'flowNewBatchDealArr.' + scope.$index + '.settingInfo.' + Index + '.defaultValue'"
|
|
130
|
+
label="" :label-width="shLabelWidth" v-if="items.fieldType === 'date'">
|
|
131
|
+
<div slot="label" class="text-overflow" :title="items.showText">{{ items.showText || "" }}</div>
|
|
132
|
+
<el-date-picker v-if="items.fieldFormat.includes('yyyy')" style="width: 100%"
|
|
133
|
+
v-model="items.defaultValue"
|
|
134
|
+
:type="items.fieldFormatType"
|
|
135
|
+
:format="items.fieldFormat"
|
|
136
|
+
:value-format="items.fieldFormat"
|
|
137
|
+
placeholder="选择日期"
|
|
138
|
+
@change="val => checkInfoChange(scope.row, items, val)">
|
|
139
|
+
</el-date-picker>
|
|
140
|
+
<el-time-picker v-else style="width: 100%"
|
|
141
|
+
v-model="items.defaultValue"
|
|
142
|
+
:format="items.fieldFormat"
|
|
143
|
+
:value-format="items.fieldFormat"
|
|
144
|
+
placeholder="选择时间"
|
|
145
|
+
@change="val => checkInfoChange(scope.row, items, val)">
|
|
146
|
+
</el-time-picker>
|
|
147
|
+
</el-form-item>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
<div style="color: red;" v-else>无快捷审批配置</div>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="sh-right-box">
|
|
153
|
+
<i class="el-icon-edit-outline icon-edit" :class="[{'edit-disable': scope.row.isLoading},{'icon-edited': scope.row.isEdited}]" @click="openEditForm(scope.row)"></i>
|
|
154
|
+
</div>
|
|
155
|
+
</template>
|
|
156
|
+
</el-table-column>
|
|
157
|
+
<el-table-column
|
|
158
|
+
header-align="center"
|
|
159
|
+
align="center"
|
|
160
|
+
prop="nextTask"
|
|
161
|
+
width="300"
|
|
162
|
+
label="下一步任务">
|
|
163
|
+
<template slot-scope="scope">
|
|
164
|
+
<el-form-item>
|
|
165
|
+
<div class="nextDealUsers" v-loading="scope.row.isLoading"
|
|
166
|
+
element-loading-text="拼命加载中"
|
|
167
|
+
element-loading-spinner="el-icon-loading"
|
|
168
|
+
element-loading-background="rgba(0, 0, 0, 0.7)">
|
|
169
|
+
<!-- <el-input v-model="scope.row.nextDealUsers.nextNodeName" disabled style="width: 90%"></el-input>-->
|
|
170
|
+
<div class="nextTaskBox"
|
|
171
|
+
:class="[{'isEndNode': scope.row.isEndNode || scope.row.nextDealUsers.isPassCondition === 0}]">{{ scope.row.nextDealUsers.nextNodeName }}
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</el-form-item>
|
|
175
|
+
</template>
|
|
176
|
+
</el-table-column>
|
|
177
|
+
<el-table-column
|
|
178
|
+
header-align="center"
|
|
179
|
+
align="center"
|
|
180
|
+
prop="nextUser"
|
|
181
|
+
width="300"
|
|
182
|
+
label="下一步处理人">
|
|
183
|
+
<template slot-scope="scope">
|
|
184
|
+
<el-form-item>
|
|
185
|
+
<div class="nextDealUsers" v-loading="scope.row.isLoading"
|
|
186
|
+
element-loading-text="拼命加载中"
|
|
187
|
+
element-loading-spinner="el-icon-loading"
|
|
188
|
+
element-loading-background="rgba(0, 0, 0, 0.7)">
|
|
189
|
+
<el-select v-model="scope.row.chooseNextUserId" v-if="!scope.row.isEndNode" :disabled="scope.row.nextDealUsers.isPassCondition === 0"
|
|
190
|
+
:multiple="scope.row.nextDealUsers.multiChooseUser" filterable style="width: 90%">
|
|
191
|
+
<el-option v-for="item in scope.row.nextDealUsers.userArr" :key="item.id" :value="item.id"
|
|
192
|
+
:label="item.userName">
|
|
193
|
+
</el-option>
|
|
194
|
+
</el-select>
|
|
195
|
+
<div class="nextTaskBox" style="color: red;width: 80%" v-else>无需处理人</div>
|
|
196
|
+
</div>
|
|
197
|
+
</el-form-item>
|
|
198
|
+
</template>
|
|
199
|
+
</el-table-column>
|
|
200
|
+
</el-table>
|
|
201
|
+
</el-form>
|
|
202
|
+
</el-main>
|
|
203
|
+
<el-footer style="height: auto;text-align: right;padding-top: 15px;margin-bottom: -7px" v-show="isShowPage">
|
|
204
|
+
<el-button-group>
|
|
205
|
+
<el-button size="small" icon="el-icon-arrow-left" :disabled="prevDisabled" @click="prevClick">上一页</el-button>
|
|
206
|
+
<el-button size="small" :disabled="nextDisabled" @click="nextClick">下一页<i class="el-icon-arrow-right el-icon--right"></i></el-button>
|
|
207
|
+
</el-button-group>
|
|
208
|
+
<div style="display: inline-block;vertical-align: middle">
|
|
209
|
+
<span style="padding-left: 10px">第{{ currentPage }}页,</span><span>共{{ total }}条</span>
|
|
210
|
+
</div>
|
|
211
|
+
</el-footer>
|
|
212
|
+
</el-container>
|
|
213
|
+
</template>
|
|
214
|
+
|
|
215
|
+
<script>
|
|
216
|
+
export default {
|
|
217
|
+
name: "flowNewBatchDeal",
|
|
218
|
+
props: {
|
|
219
|
+
formSearchObj: {type: Object, default: () => ({})},
|
|
220
|
+
formDataObj: {type: Object, default: () => ({})}, //流程关联的所有表单数据
|
|
221
|
+
allNodeInfo: {type: Object, default: () => ({})}, //所有节点配置信息
|
|
222
|
+
newBatchDealSubmit: {type: Function, default: null},
|
|
223
|
+
isRefreshGetNextUsers: {type: Array, default: () => []},
|
|
224
|
+
userMap: {type: Object, default: () => ({})},
|
|
225
|
+
fieldSysDataObj: {type: Object, default: () => ({})},
|
|
226
|
+
sysDataObj: {type: Object, default: () => ({})},
|
|
227
|
+
formFieldObj: {type: Object, default: () => ({})},
|
|
228
|
+
currentPage: {type: Number, default: 1},
|
|
229
|
+
pages: {type: Number, default: 1},
|
|
230
|
+
total: {type: Number, default: 0},
|
|
231
|
+
},
|
|
232
|
+
data() {
|
|
233
|
+
return {
|
|
234
|
+
backNewBatchDealArr: [],
|
|
235
|
+
multipleSelection: [],
|
|
236
|
+
shLabelWidth: "100px",
|
|
237
|
+
taskNodeArr: [],
|
|
238
|
+
taskNodeClickNum: 0,
|
|
239
|
+
prevDisabled: true,
|
|
240
|
+
nextDisabled: true,
|
|
241
|
+
isShowPage: false,
|
|
242
|
+
// dateTypeObj: {
|
|
243
|
+
// "yyyy-MM-dd HH:mm:ss": {category: "date",type: "datetime", value: "yyyy-MM-dd HH:mm:ss", label: "年-月-日 时:分:秒"},
|
|
244
|
+
// "yyyy-MM-dd": {category: "date",type: "date", value: "yyyy-MM-dd", label: "年-月-日"},
|
|
245
|
+
// "yyyy-MM": {category: "date",type: "month", value: "yyyy-MM", label: "年-月"},
|
|
246
|
+
// "yyyy": {category: "date",type: "year", value: "yyyy", label: "年"},
|
|
247
|
+
// "HH:mm:ss":{category: "time",type: "time", value: "HH:mm:ss", label: "时:分:秒"},
|
|
248
|
+
// "HH:mm":{category: "time",type: "time", value: "HH:mm", label: "时:分"},
|
|
249
|
+
// "HH":{category: "time",type: "time", value: "HH", label: "时"}
|
|
250
|
+
// },
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
created() {
|
|
254
|
+
// console.log(flowNewBatchDealArr,'formSearchObj',this.formSearchObj,this.allNodeInfo);
|
|
255
|
+
// console.log('fieldSysDataObj', this.fieldSysDataObj);
|
|
256
|
+
},
|
|
257
|
+
watch:{
|
|
258
|
+
'formSearchObj.loading'(){
|
|
259
|
+
if(!this.formSearchObj.loading){ // 等到列表数据加载完毕后,即loading消失后初始化数据
|
|
260
|
+
let flowNewBatchDealArr = JSON.parse(JSON.stringify(this.formSearchObj.flowNewBatchDealArr));
|
|
261
|
+
flowNewBatchDealArr.forEach(item => {
|
|
262
|
+
let obj = {currentNode: item.currentNode, currentNodeName: item.currentNodeName, nodeKey: item.nodeKey};
|
|
263
|
+
!this.taskNodeArr.some(taskNodeObj => taskNodeObj.currentNode === obj.currentNode) && this.taskNodeArr.push(obj);
|
|
264
|
+
});
|
|
265
|
+
this.initFlowBatchDeal(this.formSearchObj.flowNewBatchDealArr);
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
'formSearchObj.isInit'() {
|
|
269
|
+
if (this.formSearchObj.isInit) {
|
|
270
|
+
// console.log(this.currentPage,this.pages);
|
|
271
|
+
// 判断是否要分页
|
|
272
|
+
if (this.pages <= 1) {
|
|
273
|
+
this.isShowPage = false;
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
this.isShowPage = true;
|
|
277
|
+
|
|
278
|
+
this.prevDisabled = false;
|
|
279
|
+
this.nextDisabled = false;
|
|
280
|
+
if (this.currentPage === 1) {
|
|
281
|
+
this.prevDisabled = true;
|
|
282
|
+
}
|
|
283
|
+
if (this.currentPage >= this.pages) {
|
|
284
|
+
this.nextDisabled = true;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
methods: {
|
|
290
|
+
initFlowBatchDeal(newBatchDealArr = []) {
|
|
291
|
+
newBatchDealArr.forEach((item, index) => {
|
|
292
|
+
this.$set(item, "isLoading", true);
|
|
293
|
+
//获取处理人的参数处理
|
|
294
|
+
let flowParams = this.formDataObj[item.dataId];
|
|
295
|
+
let flowParamsObj = {};
|
|
296
|
+
Object.keys(flowParams).forEach(key => {
|
|
297
|
+
let paramKey = (this.formFieldObj || {})[key] || key;
|
|
298
|
+
if (this.isRefreshGetNextUsers.includes(key)) {
|
|
299
|
+
if(this.fieldSysDataObj[key]){ // 替换元数据
|
|
300
|
+
let value = flowParams[key];
|
|
301
|
+
flowParamsObj[paramKey] = flowParams[key] || "";
|
|
302
|
+
if(value){
|
|
303
|
+
let valueKeyArr = [value];
|
|
304
|
+
if(value.indexOf(",") > -1){
|
|
305
|
+
valueKeyArr = value.split(",");
|
|
306
|
+
}
|
|
307
|
+
let valueArr = [];
|
|
308
|
+
valueKeyArr.forEach(item => {
|
|
309
|
+
// key是fliedId,item是字典值id,出來是字典的dataName
|
|
310
|
+
// valueArr.push(this.sysDataObj[item]["dataName"]);
|
|
311
|
+
if(this.sysDataObj[item]){ // 初始化获取的数据是元数据ID,编辑保存后回调的行数据就有可能被更新为中文了
|
|
312
|
+
valueArr.push(this.sysDataObj[item]["dataName"]);
|
|
313
|
+
}else{
|
|
314
|
+
valueArr.push(item);
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
flowParamsObj[paramKey + "_SASP_SYS_DATA"] = valueArr.join(",");
|
|
318
|
+
flowParamsObj[key + "_SASP_SYS_DATA"] = valueArr.join(",");
|
|
319
|
+
flowParamsObj[paramKey + "_SASP_SYS_DATA_ID"] = valueKeyArr.join(",");
|
|
320
|
+
flowParamsObj[paramKey] = valueArr.join(",");
|
|
321
|
+
flowParamsObj[key] = valueArr.join(",");
|
|
322
|
+
}
|
|
323
|
+
}else{
|
|
324
|
+
flowParamsObj[paramKey] = flowParams[key];
|
|
325
|
+
flowParamsObj[key] = flowParams[key];
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
let obj = {instId: item.flowInstId, taskId: item.taskId,};
|
|
330
|
+
|
|
331
|
+
let nowNodeObj = this.allNodeInfo[item.currentNode] || {};
|
|
332
|
+
if (nowNodeObj && nowNodeObj.dealType && nowNodeObj.dealType === 'multi') {
|
|
333
|
+
this.$set(obj, 'passCondition', nowNodeObj.passCondition);
|
|
334
|
+
}
|
|
335
|
+
let paramsMap = {"SASP_FLOW_USE_VARIABLES": "yes"};
|
|
336
|
+
Object.assign(paramsMap, flowParamsObj || {}, obj);
|
|
337
|
+
|
|
338
|
+
this.saspFlowAxios.post(this.api.plFlowInst.getNextUsers, paramsMap).then(res => {
|
|
339
|
+
// console.log('getNextUsers-request' + index, res);
|
|
340
|
+
if (res.data.operateSuccess) {
|
|
341
|
+
let operateObj = res.data.operateObj || {nextNodeName: "", userArr: []};
|
|
342
|
+
|
|
343
|
+
let operateMap = JSON.parse(JSON.stringify(res.data.operateMap));
|
|
344
|
+
if (operateMap && operateMap.isPassCondition === 0 && !operateObj.nextNodeName) {
|
|
345
|
+
Object.assign(operateMap, {nextNodeName: "会签中...等待其他人处理完毕"});
|
|
346
|
+
}else {
|
|
347
|
+
if (operateMap && operateMap.hasOwnProperty('isPassCondition')) {
|
|
348
|
+
delete operateMap.isPassCondition;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
//获取下一个节点信息
|
|
352
|
+
let nextNodeObj = this.allNodeInfo[operateObj.nextNodeId] || {};
|
|
353
|
+
operateObj["multiChooseUser"] = nextNodeObj.dealType === "multi";
|
|
354
|
+
let autoChooseUser = false; let isEndNode = false;
|
|
355
|
+
let chooseNextUserId = "";
|
|
356
|
+
|
|
357
|
+
if (nextNodeObj.nodeType === "UserTask") {
|
|
358
|
+
autoChooseUser = nextNodeObj.autoChooseUser === "1";
|
|
359
|
+
if (operateObj.multiChooseUser) {
|
|
360
|
+
chooseNextUserId = [];
|
|
361
|
+
}
|
|
362
|
+
} else if (nextNodeObj.nodeType === "EndEvent") {
|
|
363
|
+
isEndNode = true;
|
|
364
|
+
operateObj.nextNodeName = nextNodeObj.nodeName || "结束";
|
|
365
|
+
}
|
|
366
|
+
let userArr = operateObj.userArr || [];
|
|
367
|
+
if (userArr.length > 0) {
|
|
368
|
+
if (autoChooseUser) {
|
|
369
|
+
let userId = "";
|
|
370
|
+
userArr.forEach(item => {
|
|
371
|
+
userId += "," + item.id;
|
|
372
|
+
});
|
|
373
|
+
chooseNextUserId = userArr[0].id;
|
|
374
|
+
if (operateObj.multiChooseUser) {
|
|
375
|
+
chooseNextUserId = userId.slice(1).split(",");
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if (!operateObj.multiChooseUser) {
|
|
379
|
+
chooseNextUserId = userArr[0].id;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
Object.assign(operateObj, operateMap || {});
|
|
383
|
+
this.$set(item, 'isLoading', false);
|
|
384
|
+
this.$set(item, 'isEndNode', isEndNode);
|
|
385
|
+
this.$set(item, 'chooseNextUserId', chooseNextUserId);
|
|
386
|
+
this.$set(item, 'nextDealUsers', operateObj);
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
});
|
|
390
|
+
},
|
|
391
|
+
|
|
392
|
+
doSearch() {
|
|
393
|
+
this.$emit("changePage", 1);
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
clearSearch() {
|
|
397
|
+
this.$set(this.formSearchObj, "taskNode", "");
|
|
398
|
+
this.$emit("changePage", 1);
|
|
399
|
+
},
|
|
400
|
+
|
|
401
|
+
// 选择提交
|
|
402
|
+
partSubmit() {
|
|
403
|
+
this.newBatchDealSubmit(this.multipleSelection);
|
|
404
|
+
},
|
|
405
|
+
|
|
406
|
+
// 打开编辑表单弹框
|
|
407
|
+
openEditForm(rowData) {
|
|
408
|
+
if (rowData.isLoading) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
this.$emit("openCurrUpdateFlowForm", rowData);
|
|
412
|
+
},
|
|
413
|
+
|
|
414
|
+
checkInfoChange(rowData, rowDataSetInfo, val = "") {
|
|
415
|
+
// console.log('审核信息修改', val, rowData, this.isRefreshGetNextUsers);
|
|
416
|
+
let formData = this.formDataObj[rowData.dataId];
|
|
417
|
+
if (val) {
|
|
418
|
+
formData[rowDataSetInfo.field] = val;
|
|
419
|
+
}
|
|
420
|
+
// TODO 判断是否要刷新下一步处理人
|
|
421
|
+
if (this.isRefreshGetNextUsers.includes(rowDataSetInfo.field)) {
|
|
422
|
+
rowData.isLoading = true;
|
|
423
|
+
this.initFlowBatchDeal([rowData]);
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
|
|
427
|
+
cellClassNameFunc({row, column, rowIndex, columnIndex}) {
|
|
428
|
+
// console.log('112313',row, column, rowIndex, columnIndex);
|
|
429
|
+
let className = "";
|
|
430
|
+
if (column.property === "checkInfo") {
|
|
431
|
+
className = "checkInfo";
|
|
432
|
+
}
|
|
433
|
+
return className;
|
|
434
|
+
},
|
|
435
|
+
|
|
436
|
+
handleSelectionChange(val) {
|
|
437
|
+
this.multipleSelection = val;
|
|
438
|
+
},
|
|
439
|
+
|
|
440
|
+
handleRowClick(row, column, event) {
|
|
441
|
+
// console.log(row, column, event,'handleRowClick',this.multipleSelection);
|
|
442
|
+
column = column || {};
|
|
443
|
+
if (['selection', 'index'].includes(column.property) && this.newBatchDealSelectable(row)) {
|
|
444
|
+
this.$refs.multipleTable.toggleRowSelection(row); // 通过toggleRowSelection方法勾选checkbox
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
|
|
448
|
+
newBatchDealSelectable(row, index) {
|
|
449
|
+
// console.log('是否禁用勾选', row, index);
|
|
450
|
+
let flag = true;
|
|
451
|
+
flag = (row.nextDealUsers.userArr || []).length > 0;
|
|
452
|
+
return !row.isLoading;
|
|
453
|
+
// return (!row.isLoading && flag) || row.isEndNode;
|
|
454
|
+
},
|
|
455
|
+
|
|
456
|
+
taskNodeChange(val) {
|
|
457
|
+
// if (!this.taskNodeClickNum) {
|
|
458
|
+
// this.backNewBatchDealArr = JSON.parse(JSON.stringify(this.formSearchObj.flowNewBatchDealArr));
|
|
459
|
+
// this.taskNodeClickNum++;
|
|
460
|
+
// }
|
|
461
|
+
// let arr = [];
|
|
462
|
+
// if (val) {
|
|
463
|
+
// arr = this.backNewBatchDealArr.filter(item => item.currentNode === val);
|
|
464
|
+
// }else {
|
|
465
|
+
// arr = this.backNewBatchDealArr;
|
|
466
|
+
// }
|
|
467
|
+
// this.$set(this.formSearchObj, "flowNewBatchDealArr", arr);
|
|
468
|
+
},
|
|
469
|
+
|
|
470
|
+
// 上一页事件
|
|
471
|
+
prevClick() {
|
|
472
|
+
this.$emit("changePage", this.currentPage - 1);
|
|
473
|
+
},
|
|
474
|
+
|
|
475
|
+
nextClick() {
|
|
476
|
+
this.$emit("changePage", this.currentPage + 1);
|
|
477
|
+
},
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
</script>
|
|
481
|
+
|
|
482
|
+
<style scoped>
|
|
483
|
+
.el-form > .el-table .el-form-item {
|
|
484
|
+
margin-bottom: 0;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.el-table::v-deep {
|
|
488
|
+
tr > td.checkInfo .cell {
|
|
489
|
+
//display: flex;
|
|
490
|
+
position: relative;
|
|
491
|
+
|
|
492
|
+
.sh-left-box {
|
|
493
|
+
//width: 255px;
|
|
494
|
+
//flex-grow: 1;
|
|
495
|
+
padding-left: 16px;
|
|
496
|
+
padding-right: 16px;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.sh-right-box {
|
|
500
|
+
position: absolute;
|
|
501
|
+
top: 0;
|
|
502
|
+
right: 0;
|
|
503
|
+
//flex-shrink: 0;
|
|
504
|
+
//width: 80px;
|
|
505
|
+
font-size: 26px;
|
|
506
|
+
text-align: right;
|
|
507
|
+
//margin-left: 20px;
|
|
508
|
+
|
|
509
|
+
.icon-edit {
|
|
510
|
+
color: #cccccc;
|
|
511
|
+
cursor: pointer;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
i.icon-edited {
|
|
515
|
+
color: #50E617;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.edit-disable {
|
|
519
|
+
color: #d4d8df;
|
|
520
|
+
cursor: not-allowed;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.text-overflow {
|
|
527
|
+
white-space: nowrap;
|
|
528
|
+
overflow: hidden;
|
|
529
|
+
text-overflow: ellipsis;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.nextDealUsers::v-deep {
|
|
533
|
+
.el-loading-text {
|
|
534
|
+
margin-left: 10px;
|
|
535
|
+
display: inline-block;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.nextTaskBox {
|
|
539
|
+
width: 90%;
|
|
540
|
+
height: 32px;
|
|
541
|
+
line-height: 30px;
|
|
542
|
+
margin: 0 auto;
|
|
543
|
+
border: 1px solid #e4e7ed;
|
|
544
|
+
//background-color: #f5f7fa;
|
|
545
|
+
//border-color: #e4e7ed;
|
|
546
|
+
color: #c0c4cc;
|
|
547
|
+
cursor: not-allowed;
|
|
548
|
+
user-select: none;
|
|
549
|
+
|
|
550
|
+
&.isEndNode {
|
|
551
|
+
//color: #FABDBD;
|
|
552
|
+
color: #ffafaf;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
</style>
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
:operateRootArr="operateArr" :dataPermis="dataPermis"
|
|
4
4
|
:initFormInfo="initFormInfo" :saveFormInfo="saveFormInfo" :class='flowViewMainClass'
|
|
5
5
|
:flow-next-operation="flowNextOperation" :getFormInfo="getFormInfo" :formImpMethod="formImpMethod"
|
|
6
|
-
:flowImpParamObj="flowImpParamObj" :downloadTemplate="downloadTemplate"
|
|
6
|
+
:flowImpParamObj="flowImpParamObj" :downloadTemplate="downloadTemplate" :getFormDataByDataIds="getFormDataByDataIds"
|
|
7
|
+
:saveBatchDealFormData="saveBatchDealFormData" :formAboutInfoObj="formAboutInfoObj" :sysDataObj="sysDataObj">
|
|
7
8
|
<template slot="formInfo">
|
|
8
9
|
<slot name="formInfo"></slot>
|
|
9
10
|
</template>
|
|
@@ -27,6 +28,10 @@
|
|
|
27
28
|
formImpMethod:{type: Function,default:null},
|
|
28
29
|
flowImpParamObj: {type: Object,default: () => ({})},
|
|
29
30
|
downloadTemplate: {type: Function, default: null},
|
|
31
|
+
getFormDataByDataIds: {type: Function, default: null},
|
|
32
|
+
saveBatchDealFormData: {type: Function, default: null},
|
|
33
|
+
formAboutInfoObj: {type: Object, default: () => ({})},
|
|
34
|
+
sysDataObj: {type: Object, default: () => ({})},
|
|
30
35
|
},
|
|
31
36
|
data(){
|
|
32
37
|
return {
|
|
@@ -101,7 +106,7 @@
|
|
|
101
106
|
this.userArr = userArr;
|
|
102
107
|
}else{
|
|
103
108
|
this.saspFlowAxios.post(this.api.plFlowInterface.find,{sysInterName:'userData',interType:'sys',interStatus:'1'}).then(res => {
|
|
104
|
-
if((res.data || []).length
|
|
109
|
+
if((res.data || []).length === 0){
|
|
105
110
|
return;
|
|
106
111
|
}
|
|
107
112
|
let dataInter = res.data[0];
|