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