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
package/index.js
CHANGED
|
@@ -13,6 +13,8 @@ import CustomRenderer from './src/views/popup/js/controls/CustomRenderer';
|
|
|
13
13
|
import translations from './src/views/popup/js/translations/translations';
|
|
14
14
|
import apiFlow from './src/assets/js/api/apiFlow';
|
|
15
15
|
import flowGlobal from './src/assets/js/global/flowGlobal';
|
|
16
|
+
import axios from 'axios';
|
|
17
|
+
import qs from "qs";
|
|
16
18
|
import flowInstView from './src/views/flowInstView';
|
|
17
19
|
import {isAxiosFormData, SaspModuleUtil} from "sasp-base";
|
|
18
20
|
/**
|
|
@@ -43,32 +45,28 @@ let components = [
|
|
|
43
45
|
];
|
|
44
46
|
|
|
45
47
|
let createAxiosIfNotExists = (Vue,props) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
newAxios = axios.create({
|
|
53
|
-
baseURL:(props || {}).SERVICE_URL,
|
|
54
|
-
headers: {
|
|
55
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
56
|
-
common: {
|
|
57
|
-
Authorization: (localStorage["Authorization" + (window.projectSuffix || "")] || "")
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
transformRequest: [
|
|
61
|
-
function (data) {
|
|
62
|
-
return data;
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
})
|
|
66
|
-
newAxios.all = axios.all;
|
|
67
|
-
newAxios.spread = axios.spread;
|
|
68
|
-
Vue.prototype.axios = newAxios;
|
|
69
|
-
Vue.prototype.shareAxios = newAxios;
|
|
70
|
-
(props || {}).axios = newAxios;
|
|
48
|
+
if((props || {}).axios){
|
|
49
|
+
Vue.prototype.saspFlowAxios = props.axios;
|
|
50
|
+
(props || {}).saspFlowAxios = props.axios;
|
|
51
|
+
return;
|
|
71
52
|
}
|
|
53
|
+
|
|
54
|
+
let newAxios = axios.create({
|
|
55
|
+
baseURL:window.FLOW_RENDER_URL,
|
|
56
|
+
headers: {
|
|
57
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
58
|
+
},
|
|
59
|
+
})
|
|
60
|
+
newAxios.defaults.transformRequest = [];
|
|
61
|
+
newAxios.defaults.transformRequest.push(
|
|
62
|
+
function (data) {
|
|
63
|
+
return data;
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
newAxios.all = axios.all;
|
|
67
|
+
newAxios.spread = axios.spread;
|
|
68
|
+
Vue.prototype.saspFlowAxios = newAxios;
|
|
69
|
+
(props || {}).saspFlowAxios = newAxios;
|
|
72
70
|
}
|
|
73
71
|
|
|
74
72
|
/**
|
|
@@ -77,14 +75,12 @@ let createAxiosIfNotExists = (Vue,props) => {
|
|
|
77
75
|
* @param props
|
|
78
76
|
*/
|
|
79
77
|
let initAxios = (Vue, props) => {
|
|
80
|
-
let axios = (props || {}).
|
|
81
|
-
if (!axios) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
78
|
+
let axios = (props || {}).saspFlowAxios;
|
|
84
79
|
|
|
85
80
|
// 添加请求拦截器
|
|
86
81
|
axios.interceptors.request.use(function (config) {
|
|
87
|
-
if ((config.headers["Content-Type"] != 'multipart/form-data') && isAxiosFormData((config.url))) {
|
|
82
|
+
// if ((config.headers["Content-Type"] != 'multipart/form-data') && isAxiosFormData((config.url))) {
|
|
83
|
+
if (config.headers["Content-Type"] != 'multipart/form-data') {
|
|
88
84
|
config = Object.assign({}, config);
|
|
89
85
|
config.headers = Object.assign({}, config.headers || {}, {
|
|
90
86
|
"Is-Sasp-Qs": true,
|
|
@@ -103,12 +99,30 @@ let initAxios = (Vue, props) => {
|
|
|
103
99
|
}
|
|
104
100
|
return config;
|
|
105
101
|
});
|
|
102
|
+
axios.defaults.transformRequest = axios.defaults.transformRequest || [];
|
|
103
|
+
axios.defaults.transformRequest.push(
|
|
104
|
+
function (data,config) {
|
|
105
|
+
if (config["Is-Sasp-Qs"]) {
|
|
106
|
+
delete config["Is-Sasp-Qs"];
|
|
107
|
+
if (data && typeof data === "string") { // 本项目的所有请求都通过qs转换实现
|
|
108
|
+
try {
|
|
109
|
+
data = JSON.parse(data);
|
|
110
|
+
} catch (e) {
|
|
111
|
+
console.error(e);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return qs.stringify(data);
|
|
115
|
+
}else{
|
|
116
|
+
return data;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
106
120
|
};
|
|
107
121
|
|
|
108
122
|
const install = function (Vue, opts = {}) {
|
|
109
123
|
SaspModuleUtil.registerModuleName(Vue, "flow");
|
|
110
|
-
|
|
111
|
-
|
|
124
|
+
window.FLOW_RENDER_URL = opts.SERVICE_URL || window.JAVA_URL;
|
|
125
|
+
createAxiosIfNotExists(Vue,opts);
|
|
112
126
|
|
|
113
127
|
Vue.prototype.USE_SASP_FLOW = true; // 说明安装了流程插件,我们使用此参数作为表单对接的依据
|
|
114
128
|
Vue.use(flowInstall, opts);
|
|
@@ -120,7 +134,7 @@ const install = function (Vue, opts = {}) {
|
|
|
120
134
|
components.forEach(component => {
|
|
121
135
|
Vue.component(component.name, component);
|
|
122
136
|
});
|
|
123
|
-
loadFlowEventPlugin.installAll(Vue);
|
|
137
|
+
loadFlowEventPlugin.installAll(Vue, opts);
|
|
124
138
|
};
|
|
125
139
|
|
|
126
140
|
export default {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sasp-flow-render",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "业务应用支撑平台-智慧流程渲染组件",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "vue-cli-service build"
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"camunda-bpmn-moddle": "^4.4.0",
|
|
13
13
|
"diagram-js": "^6.6.1",
|
|
14
14
|
"diagram-js-minimap": "^2.0.3",
|
|
15
|
+
"qs": "^6.5.2",
|
|
15
16
|
"sasp-base": "2.5.4"
|
|
16
17
|
},
|
|
17
18
|
"browserslist": [
|
package/router.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
menus: [
|
|
3
3
|
{path: 'flowInstTab', component: () => import("./src/components/flowInst/flowInstTab.vue")},
|
|
4
|
-
{path: 'messageMould', component: () => import("./src/components/messageMould/messageMould.vue")},
|
|
5
4
|
{path: 'flowInstTab', component: () => import("./src/components/flowInst/flowInstTab.vue")},
|
|
6
5
|
{path: 'flowMenuRouter/:resourceId', component: () => import("./src/views/menuRouter/flowMenuRouter.vue")},
|
|
7
6
|
],
|
|
@@ -93,6 +93,12 @@ let objResult = {
|
|
|
93
93
|
listNoPageByResult:"/flowInstNodeResultController/listNoPageByResult",
|
|
94
94
|
},
|
|
95
95
|
|
|
96
|
+
//流程节点批量处理配置
|
|
97
|
+
plFlowNodeExtend: {
|
|
98
|
+
find: "/plFlowNodeExtendController/find",
|
|
99
|
+
getById: "/plFlowNodeExtendController/getById",
|
|
100
|
+
},
|
|
101
|
+
|
|
96
102
|
plFlowInst:{
|
|
97
103
|
url:"/plFlowInstController",
|
|
98
104
|
queryFormData:"/plFlowInstController/queryFormData",
|
|
@@ -145,6 +151,10 @@ let objResult = {
|
|
|
145
151
|
|
|
146
152
|
changeDealer:"/plFlowInstController/changeDealer", // 切换当前任务处理人
|
|
147
153
|
forceEnd:"/plFlowInstController/forceEnd", // 强制办结
|
|
154
|
+
recoverExceptionFlow:"/plFlowInstController/recoverExceptionFlow", // 恢复异常流程
|
|
155
|
+
reStartFlow:"/plFlowInstController/reStartFlow", //重启办结状态下的流程
|
|
156
|
+
batchUpdateFlowStatus:"/plFlowInstController/batchUpdateFlowStatus", //新版流程批量处理的批量修改流程状态
|
|
157
|
+
batchExecuteNextStep:"/plFlowInstController/batchExecuteNextStep", //新版流程批量处理的批量执行下一步
|
|
148
158
|
},
|
|
149
159
|
|
|
150
160
|
plFlowSetting:{
|
|
@@ -181,6 +191,10 @@ let objResult = {
|
|
|
181
191
|
login: "/flowLoginController/login",
|
|
182
192
|
logout: "/flowLoginController/logout",
|
|
183
193
|
},
|
|
194
|
+
loginInnovateMethod:{
|
|
195
|
+
login: "/loginController/login",
|
|
196
|
+
logout: "/loginController/logout",
|
|
197
|
+
},
|
|
184
198
|
plFlowDomain:{
|
|
185
199
|
url:"/plFlowDomainController",
|
|
186
200
|
find:"/plFlowDomainController/find",
|
|
@@ -222,6 +236,9 @@ let objResult = {
|
|
|
222
236
|
find:"/operationLogController/find",
|
|
223
237
|
getById:"/operationLogController/getById"
|
|
224
238
|
},
|
|
239
|
+
flowEngine: {
|
|
240
|
+
saveDataFlowDrafts: "/flowEngine/saveDataFlowDrafts",
|
|
241
|
+
}
|
|
225
242
|
};
|
|
226
243
|
|
|
227
244
|
import {SaspModuleUtil} from "sasp-base";
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
this.setNodeColor();
|
|
129
129
|
})
|
|
130
130
|
};
|
|
131
|
-
this.
|
|
131
|
+
this.saspFlowAxios.post(this.api.plFlowDefine.getFlowDraw,{flowId: this.flowId,linkProcId:this.linkProcId,isRelease:this.isRelease}).then(res => {
|
|
132
132
|
if(res && res.data){
|
|
133
133
|
if(res.data.operateObj){
|
|
134
134
|
loadBpmn(res.data.operateObj || '');
|
|
@@ -153,16 +153,16 @@
|
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
if(this.nodeId){
|
|
156
|
-
this.
|
|
156
|
+
this.saspFlowAxios.post(this.api.plFlowNode.getById,{"id":this.nodeId}).then(resNode => {
|
|
157
157
|
let result = resNode.data.nodeLinkId;
|
|
158
158
|
let canvas = this.viewer.get('canvas');
|
|
159
159
|
canvas.addMarker(result,"current-node-class");
|
|
160
160
|
this.setAnnotation(result);
|
|
161
161
|
})
|
|
162
162
|
}else{
|
|
163
|
-
this.
|
|
163
|
+
this.saspFlowAxios.post(this.api.plFlowInst.getById,{"id":this.instId}).then(res => {
|
|
164
164
|
let currentNode = res.data.currentNode;
|
|
165
|
-
this.
|
|
165
|
+
this.saspFlowAxios.post(this.api.plFlowNode.getById,{"id":currentNode}).then(resNode => {
|
|
166
166
|
let result = resNode.data.nodeLinkId;
|
|
167
167
|
let canvas = this.viewer.get('canvas');
|
|
168
168
|
canvas.addMarker(result,"current-node-class");
|
|
@@ -52,14 +52,39 @@
|
|
|
52
52
|
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" round
|
|
53
53
|
@click="openAddFlowForm()">新增
|
|
54
54
|
</el-button>
|
|
55
|
-
<el-button type="danger" icon="el-icon-circle-close" size="small" round @click="deleteFlow()">
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
<el-button type="danger" icon="el-icon-circle-close" size="small" round @click="deleteFlow()">删除</el-button>
|
|
56
|
+
<div style="display: inline-block" v-if='flowImpParamObj.downloadModel'>
|
|
57
|
+
<el-popover style="margin-left: 10px;margin-right: 10px;"
|
|
58
|
+
placement="bottom" width="200" trigger="click" >
|
|
59
|
+
<el-upload
|
|
60
|
+
class=""
|
|
61
|
+
ref="flowInstUploadFileRef"
|
|
62
|
+
:auto-upload="false"
|
|
63
|
+
:file-list="flowAboutFileList"
|
|
64
|
+
:action="flowImpParamObj.impUrl"
|
|
65
|
+
:limit="1"
|
|
66
|
+
accept=".xlsx,.xls"
|
|
67
|
+
:on-exceed="limitFile"
|
|
68
|
+
:on-change="onChangeFile"
|
|
69
|
+
:before-upload="beforeUploadFile"
|
|
70
|
+
:http-request="uploadFileMethod">
|
|
71
|
+
<el-button type="primary" size="small" slot="trigger">选取导入文件</el-button>
|
|
72
|
+
<el-button type="success" size="small" style="margin-left: 12px" @click="beginImp">导入</el-button>
|
|
73
|
+
</el-upload>
|
|
74
|
+
<el-button type="warning" size="small" round icon="el-icon-bottom-left" slot="reference">导入</el-button>
|
|
75
|
+
</el-popover>
|
|
76
|
+
<el-button round size="small" :type="flowImpParamObj.downloadModelObj.buttonColor" :icon="flowImpParamObj.downloadModelObj.icon"
|
|
77
|
+
:circle="flowImpParamObj.downloadModelObj.isCircle" :plain="flowImpParamObj.downloadModelObj.isPlain"
|
|
78
|
+
@click="downloadTemplate">{{flowImpParamObj.downloadModelObj.showName || '模版下载'}}
|
|
79
|
+
</el-button>
|
|
80
|
+
</div>
|
|
59
81
|
</div>
|
|
60
82
|
<el-button type="primary" icon="el-icon-document-copy" size="small" round v-if="isShow('pending')"
|
|
61
83
|
@click="openFlowBatchPendingDialog">批量处理
|
|
62
84
|
</el-button>
|
|
85
|
+
<el-button type="warning" icon="el-icon-document-copy" size="small" round v-if="isShow('pending')"
|
|
86
|
+
@click="openFlowBatchPendingDialogNew">快捷处理
|
|
87
|
+
</el-button>
|
|
63
88
|
</el-header>
|
|
64
89
|
<el-main style="height: 100%;padding: 0;" class="main-box">
|
|
65
90
|
<el-table :data="crud.dataStore.records" :ref="crud.tableRef" @sort-change="flowSortChange"
|
|
@@ -118,26 +143,22 @@
|
|
|
118
143
|
:key="buttonObj.type" size="small" type="primary"
|
|
119
144
|
v-if="judgeListButton(tabType,buttonObj.type)"
|
|
120
145
|
@click="listButtonOpt(buttonObj.type,scope.row)"
|
|
121
|
-
:icon="buttonIcon[buttonObj.type]" :type="buttonType[buttonObj.type]">
|
|
122
|
-
{{buttonObj.showName}}
|
|
146
|
+
:icon="buttonIcon[buttonObj.type]" :type="buttonType[buttonObj.type]">{{buttonObj.showName}}
|
|
123
147
|
</el-button>
|
|
124
148
|
</template>
|
|
125
149
|
<template v-else>
|
|
126
150
|
<el-button size="small"
|
|
127
151
|
@click="listButtonOpt('view',scope.row)"
|
|
128
|
-
icon="el-icon-view" type="primary"
|
|
129
|
-
查看
|
|
152
|
+
icon="el-icon-view" type="primary">查看
|
|
130
153
|
</el-button>
|
|
131
154
|
<el-button size="small"
|
|
132
155
|
@click="listButtonOpt('flowRecord',scope.row)"
|
|
133
|
-
icon="saspiconfont pl-icon-liuchengtu" type="primary"
|
|
134
|
-
流转记录
|
|
156
|
+
icon="saspiconfont pl-icon-liuchengtu" type="primary">流转记录
|
|
135
157
|
</el-button>
|
|
136
158
|
</template>
|
|
137
159
|
<el-button size="small" v-if="scope.row.linkProcId && scope.row.nodeKey == startNodeKeyObj[scope.row.version]"
|
|
138
160
|
@click="deleteRowFlow(scope.row)"
|
|
139
|
-
icon="el-icon-delete" type="danger"
|
|
140
|
-
删除
|
|
161
|
+
icon="el-icon-delete" type="danger">删除
|
|
141
162
|
</el-button>
|
|
142
163
|
</template>
|
|
143
164
|
</el-table-column>
|
|
@@ -336,6 +357,13 @@
|
|
|
336
357
|
}
|
|
337
358
|
},
|
|
338
359
|
|
|
360
|
+
// 打开新的批量修改窗口回调函数
|
|
361
|
+
openNewBatchUpdateFlowForm: {
|
|
362
|
+
type: Function, default() {
|
|
363
|
+
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
|
|
339
367
|
// 打开查看窗口回调函数
|
|
340
368
|
openViewFlowForm: {
|
|
341
369
|
type: Function, default() {
|
|
@@ -363,8 +391,11 @@
|
|
|
363
391
|
},
|
|
364
392
|
userMap:{type: Object,default:()=>{return {};}},
|
|
365
393
|
|
|
366
|
-
instQueryPower:{type:String,default:""}
|
|
367
|
-
|
|
394
|
+
instQueryPower:{type:String,default:""},
|
|
395
|
+
formImpMethod: {type: Function, default(){}},
|
|
396
|
+
flowImpParamObj: {type: Object, default: () => ({})},
|
|
397
|
+
downloadTemplate: {type: Function, default: null},
|
|
398
|
+
getFormDataByDataIds: {type: Function, default: null},
|
|
368
399
|
},
|
|
369
400
|
data() {
|
|
370
401
|
|
|
@@ -473,15 +504,17 @@
|
|
|
473
504
|
flowFormId: "",
|
|
474
505
|
formDefineKey: "",
|
|
475
506
|
title: "",
|
|
476
|
-
formSettingVisible:false,
|
|
477
|
-
flowSortOrder:""
|
|
507
|
+
formSettingVisible: false,
|
|
508
|
+
flowSortOrder: "",
|
|
509
|
+
flowAboutFileList: [],
|
|
510
|
+
flowNewBatchDealDataIds: "",
|
|
478
511
|
}
|
|
479
512
|
},
|
|
480
513
|
created() {
|
|
481
514
|
this.init();
|
|
482
515
|
this.getListButton();
|
|
483
516
|
this.initWorkStageTurnOn();
|
|
484
|
-
if (this.showModel
|
|
517
|
+
if (this.showModel === "card") {
|
|
485
518
|
this.checkScreenWidth();
|
|
486
519
|
window.addEventListener('resize', () => { //监听浏览器窗口大小改变
|
|
487
520
|
//浏览器变化执行动作
|
|
@@ -489,8 +522,7 @@
|
|
|
489
522
|
});
|
|
490
523
|
}
|
|
491
524
|
},
|
|
492
|
-
mounted() {
|
|
493
|
-
},
|
|
525
|
+
mounted() {},
|
|
494
526
|
methods: {
|
|
495
527
|
initWorkStageTurnOn(){
|
|
496
528
|
this.workTurnOn = WORK_GLOBAL.getTurnOn(this.switchOnline,this.listViewId);
|
|
@@ -502,7 +534,7 @@
|
|
|
502
534
|
* 打开相关的智能建表
|
|
503
535
|
*/
|
|
504
536
|
showFormSetting(){
|
|
505
|
-
this.
|
|
537
|
+
this.saspFlowAxios.post(this.api.plPageInfo.find,{ flowId: this.flowDefine.id }).then(res => {
|
|
506
538
|
let pageInfo = (res.data || [])[0] || {};
|
|
507
539
|
this.pageName = pageInfo.pageName || "";
|
|
508
540
|
this.flowFormId = pageInfo.formId;
|
|
@@ -533,7 +565,11 @@
|
|
|
533
565
|
|
|
534
566
|
init() {
|
|
535
567
|
this.crud.searchForm["flowId"] = this.flowDefine.id;
|
|
568
|
+
this.$set(this.crud.searchForm,"currentNode","");
|
|
536
569
|
let flowStatus = this.flowStatusObj[this.tabType];
|
|
570
|
+
if(!flowStatus && flowStatus != 0){
|
|
571
|
+
flowStatus = "";
|
|
572
|
+
}
|
|
537
573
|
this.crud.searchForm["nodeType"] = this.tabType;
|
|
538
574
|
if (this.tabType == "draft") {
|
|
539
575
|
this.crud.searchForm["created"] = this.loginUser.id;
|
|
@@ -550,9 +586,20 @@
|
|
|
550
586
|
}
|
|
551
587
|
this.$set(this.crud.searchForm, 'flowStatus', flowStatus);
|
|
552
588
|
this.crud.search();
|
|
553
|
-
|
|
554
589
|
},
|
|
555
590
|
|
|
591
|
+
// initNewBatchDealFunc() {
|
|
592
|
+
// this.initNewBatchDeal().then(() => {
|
|
593
|
+
// this.initFormDataByDataIds();
|
|
594
|
+
// });
|
|
595
|
+
// },
|
|
596
|
+
|
|
597
|
+
// initFormDataByDataIds() {
|
|
598
|
+
// this.getFormDataByDataIds(this.formId, this.flowNewBatchDealDataIds).then(res => {
|
|
599
|
+
// this.$emit('setDataValue', "formDataObj", res);
|
|
600
|
+
// });
|
|
601
|
+
// },
|
|
602
|
+
|
|
556
603
|
/**
|
|
557
604
|
* 列表操作按钮显示
|
|
558
605
|
*/
|
|
@@ -726,7 +773,7 @@
|
|
|
726
773
|
this.crud.searchForm.flowSortOrder = "";
|
|
727
774
|
}
|
|
728
775
|
this.$emit("initTabNum");
|
|
729
|
-
if (type
|
|
776
|
+
if (type === "noMessage") {
|
|
730
777
|
this.crud.search();
|
|
731
778
|
} else {
|
|
732
779
|
this.crud.doSearch();
|
|
@@ -782,7 +829,7 @@
|
|
|
782
829
|
flowInstIds += "," + row.id;
|
|
783
830
|
dataIds += "," + row.dataId;
|
|
784
831
|
});
|
|
785
|
-
this.
|
|
832
|
+
this.saspFlowAxios.post(this.api.plFlowInst.deleteFlowInst, {
|
|
786
833
|
flowInstIds: flowInstIds.substring(1),
|
|
787
834
|
flowId: this.flowDefine.id,
|
|
788
835
|
dataIds: dataIds.substring(1)
|
|
@@ -819,7 +866,7 @@
|
|
|
819
866
|
* 打开批量处理页面方法
|
|
820
867
|
*/
|
|
821
868
|
async openFlowBatchPendingDialog() {
|
|
822
|
-
if (this.crud.dataStore.records.length
|
|
869
|
+
if (this.crud.dataStore.records.length === 0) {
|
|
823
870
|
this.$message({
|
|
824
871
|
showClose: true,
|
|
825
872
|
message: '当前没有可处理的流程'
|
|
@@ -827,7 +874,12 @@
|
|
|
827
874
|
} else {
|
|
828
875
|
this.openBatchUpdateFlowForm(this.crud.dataStore.records);
|
|
829
876
|
}
|
|
830
|
-
|
|
877
|
+
},
|
|
878
|
+
/**
|
|
879
|
+
* 快捷处理
|
|
880
|
+
*/
|
|
881
|
+
openFlowBatchPendingDialogNew(){
|
|
882
|
+
this.openNewBatchUpdateFlowForm();
|
|
831
883
|
},
|
|
832
884
|
|
|
833
885
|
/**
|
|
@@ -882,7 +934,7 @@
|
|
|
882
934
|
cancelButtonText: '取消',
|
|
883
935
|
type: 'warning'
|
|
884
936
|
}).then(() => {
|
|
885
|
-
this.
|
|
937
|
+
this.saspFlowAxios.post(this.api.plFlowInst.delete, {
|
|
886
938
|
ids: row.id
|
|
887
939
|
}).then(res => {
|
|
888
940
|
if (res && res.data && res.data.operateSuccess) {
|
|
@@ -894,7 +946,88 @@
|
|
|
894
946
|
}
|
|
895
947
|
})
|
|
896
948
|
})
|
|
897
|
-
}
|
|
949
|
+
},
|
|
950
|
+
|
|
951
|
+
// 导入bug单相关的流程数据
|
|
952
|
+
beginImp() {
|
|
953
|
+
if (this.flowAboutFileList.length === 0) {
|
|
954
|
+
this.$message.error("请选择需要导入的文件!");
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
this.$confirm('是否确定导入模板数据?', '确认信息', {
|
|
958
|
+
distinguishCancelAndClose: true,
|
|
959
|
+
confirmButtonText: '确定',
|
|
960
|
+
cancelButtonText: '取消'
|
|
961
|
+
}).then(() => {
|
|
962
|
+
this.$refs.flowInstUploadFileRef.submit();
|
|
963
|
+
})
|
|
964
|
+
},
|
|
965
|
+
|
|
966
|
+
limitFile(files) {
|
|
967
|
+
let file = files[0];
|
|
968
|
+
let fileSuffix = file.name.substring(file.name.lastIndexOf("."), file.name.length);
|
|
969
|
+
if (fileSuffix !== '.xls' && fileSuffix !== '.xlsx') {
|
|
970
|
+
this.$message.error('不支持' + fileSuffix + '文件类型!');
|
|
971
|
+
this.$refs.flowInstUploadFileRef.clearFiles();
|
|
972
|
+
} else {
|
|
973
|
+
let fileData = {
|
|
974
|
+
name: file.name,
|
|
975
|
+
percentage: 0,
|
|
976
|
+
raw: file,
|
|
977
|
+
size: file.size,
|
|
978
|
+
status: 'ready',
|
|
979
|
+
uid: file.uid
|
|
980
|
+
};
|
|
981
|
+
this.flowAboutFileList = [fileData];
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
|
|
985
|
+
onChangeFile(file, fileList) {
|
|
986
|
+
let fileSuffix = file.name.substring(file.name.lastIndexOf("."), file.name.length);
|
|
987
|
+
if (fileSuffix !== '.xls' && fileSuffix !== '.xlsx') {
|
|
988
|
+
this.$message.error('不支持' + fileSuffix + '文件类型!');
|
|
989
|
+
this.$refs.flowInstUploadFileRef.clearFiles();
|
|
990
|
+
} else {
|
|
991
|
+
this.flowAboutFileList = fileList;
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
|
|
995
|
+
beforeUploadFile(file) {
|
|
996
|
+
let fileSuffix = file.name.substring(file.name.lastIndexOf("."), file.name.length);
|
|
997
|
+
if (fileSuffix !== '.xls' && fileSuffix !== '.xlsx') {
|
|
998
|
+
this.$message.error('不支持' + fileSuffix + '文件类型!');
|
|
999
|
+
return false;
|
|
1000
|
+
}
|
|
1001
|
+
return true;
|
|
1002
|
+
},
|
|
1003
|
+
|
|
1004
|
+
uploadFileMethod(val) {
|
|
1005
|
+
if (!this.loginUser.id) {
|
|
1006
|
+
return this.$message({type: "warning", message: "缺失userId参数,请在地址栏用?拼接userId参数"});
|
|
1007
|
+
}
|
|
1008
|
+
this.formImpMethod(val).then(res => {
|
|
1009
|
+
if (res && res.data && res.data.operateSuccess) {
|
|
1010
|
+
let resData = res.data.operateObj;
|
|
1011
|
+
// console.log('resData',resData);
|
|
1012
|
+
this.saspFlowAxios.post(this.api.flowEngine.saveDataFlowDrafts, {
|
|
1013
|
+
flowId: this.flowDefine.id,
|
|
1014
|
+
userCode: this.loginUser.id || "",
|
|
1015
|
+
dataIds: resData.join(",")
|
|
1016
|
+
}).then(res => {
|
|
1017
|
+
// console.log('流程草稿启用',res);
|
|
1018
|
+
if (res && res.data && res.data.requestStatus === "1") {
|
|
1019
|
+
this.$message({type: "success", message: "导入成功!"});
|
|
1020
|
+
this.crud.search();
|
|
1021
|
+
this.$emit("initTabNum");
|
|
1022
|
+
}else {
|
|
1023
|
+
this.$message({type: "warning", message: res.data.errorInfo});
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
} else {
|
|
1027
|
+
this.$message({type: "error", message: "导入失败!"});
|
|
1028
|
+
}
|
|
1029
|
+
});
|
|
1030
|
+
},
|
|
898
1031
|
}
|
|
899
1032
|
}
|
|
900
1033
|
</script>
|