qgb-process 0.1.69 → 0.1.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/qgb-process.common.js +1010 -223
- package/lib/qgb-process.umd.js +1010 -223
- package/lib/qgb-process.umd.min.js +42 -42
- package/package.json +2 -2
- package/src/App.vue +4 -1
- package/src/api/apiMemberSelection.js +6 -4
- package/src/api/apiProcess.js +6 -4
- package/src/http/index.js +2 -1
- package/src/main.js +0 -9
- package/src/views/formBuilder/components/approverSelector.vue +10 -4
- package/src/views/formBuilder/components/nodeConditionConfig.vue +8 -2
- package/src/views/formBuilder/process-2.vue +19 -24
- package/src/views/formBuilder/process.vue +62 -22
- package/src/views/formBuilder/workflow/nodeWrap.vue +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qgb-process",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.81",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"build": "node --max_old_space_size=10096 node_modules/@vue/cli-service/bin/vue-cli-service.js build",
|
|
10
10
|
"build:test": "node --max_old_space_size=10096 node_modules/@vue/cli-service/bin/vue-cli-service.js build --mode test",
|
|
11
11
|
"build:pre": "node --max_old_space_size=10096 node_modules/@vue/cli-service/bin/vue-cli-service.js build --mode pre",
|
|
12
|
-
"lib": "node --max_old_space_size=10096 node_modules/@vue/cli-service/bin/vue-cli-service.js build --target lib --name qgb-process --dest lib packages/index.js
|
|
12
|
+
"lib": "node --max_old_space_size=10096 node_modules/@vue/cli-service/bin/vue-cli-service.js build --target lib --name qgb-process --dest lib packages/index.js",
|
|
13
13
|
"lint": "vue-cli-service lint",
|
|
14
14
|
"lint-fix": "eslint src/ --fix",
|
|
15
15
|
"test:unit": "vue-cli-service test:unit",
|
package/src/App.vue
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import request from "@/http"
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
2
|
+
const base = JSON.parse(localStorage.getItem("env"))
|
|
3
|
+
const url = base.VUE_APP_API
|
|
4
|
+
const authUrlType = base.VUE_APP_EMTERPRISE
|
|
5
|
+
const qiguan = base.VUE_APP_QIGUAN
|
|
6
|
+
|
|
7
|
+
|
|
6
8
|
const apiMemberSelection = {
|
|
7
9
|
getOrgsData:()=>request.get( url + authUrlType + `/v1/organization/getNewOrganizationAndContacts`),
|
|
8
10
|
list: () => request.get(url + authUrlType + `/v1/organization/getOrganizationAndContacts`), // /v1/organization/getOrganization
|
package/src/api/apiProcess.js
CHANGED
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
* @FilePath: \src\api\apiProcess.js
|
|
8
8
|
**/
|
|
9
9
|
import request from "@/http"
|
|
10
|
-
const baseUrl = process.env.VUE_APP_API + "/sgb-meta-design"
|
|
11
|
-
// const baseUrl = 'http://192.168.3.51:9096'
|
|
12
10
|
import qs from "qs"
|
|
13
|
-
const
|
|
14
|
-
const
|
|
11
|
+
const base = JSON.parse(localStorage.getItem("env"))
|
|
12
|
+
const baseUrl = base.VUE_APP_API + "/sgb-meta-design"
|
|
13
|
+
const url = base.VUE_APP_API
|
|
14
|
+
const qiguan = base.VUE_APP_QIGUAN
|
|
15
15
|
const appUrl = url + qiguan;
|
|
16
16
|
|
|
17
|
+
console.log(baseUrl)
|
|
18
|
+
|
|
17
19
|
// 保存流程
|
|
18
20
|
export const saveProcess = async(params) => request.postHeaders(`${baseUrl}/v1/pc/process/addProcess`, qs.stringify(params))
|
|
19
21
|
// 新的保存流程
|
package/src/http/index.js
CHANGED
|
@@ -24,8 +24,9 @@ const removePending = (config) => {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// axios 基础配置
|
|
27
|
+
const base = JSON.parse(localStorage.getItem("env"))
|
|
27
28
|
axios.defaults.timeout = 50000
|
|
28
|
-
axios.defaults.baseURL =
|
|
29
|
+
axios.defaults.baseURL = base.VUE_APP_APIUSER
|
|
29
30
|
|
|
30
31
|
axios.interceptors.request.use(
|
|
31
32
|
config => {
|
package/src/main.js
CHANGED
|
@@ -34,15 +34,6 @@ if (window.__POWERED_BY_QIANKUN__) {
|
|
|
34
34
|
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
// 流程图组件
|
|
39
|
-
import nodeWrap from '@/views/formBuilder/workflow/nodeWrap'
|
|
40
|
-
import addNode from '@/views/formBuilder/workflow/addNode'
|
|
41
|
-
Vue.use(nodeWrap)
|
|
42
|
-
Vue.component('nodeWrap', nodeWrap); //初始化组件
|
|
43
|
-
Vue.use(addNode)
|
|
44
|
-
Vue.component('addNode', addNode); //初始化组件
|
|
45
|
-
|
|
46
37
|
// 自定义指令
|
|
47
38
|
Vue.directive('enterNumber', {
|
|
48
39
|
bind: function(el, { value = 2 }) {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div class="approverSelectorItemCon rowDirection">
|
|
18
18
|
<el-radio-group v-model="approverMode" @change="approverModeChange">
|
|
19
19
|
<el-radio :label="1">指定成员</el-radio>
|
|
20
|
-
<el-radio :label="2" v-if="
|
|
20
|
+
<el-radio :label="2" v-if="queryInfo.type | filterType">主管</el-radio>
|
|
21
21
|
</el-radio-group>
|
|
22
22
|
<!-- 指定成员 -->
|
|
23
23
|
<div v-if="approverMode == 1" class="selector-list">
|
|
@@ -119,7 +119,13 @@ export default {
|
|
|
119
119
|
value: {
|
|
120
120
|
type: Boolean,
|
|
121
121
|
default: true
|
|
122
|
-
}
|
|
122
|
+
},
|
|
123
|
+
queryInfo:{
|
|
124
|
+
type: Object,
|
|
125
|
+
default:()=>{
|
|
126
|
+
return {}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
123
129
|
},
|
|
124
130
|
data() {
|
|
125
131
|
return {
|
|
@@ -345,9 +351,9 @@ export default {
|
|
|
345
351
|
computed: {
|
|
346
352
|
// 过滤非主管的审批模块
|
|
347
353
|
filterType(type) {
|
|
348
|
-
if (this
|
|
354
|
+
if (this.queryInfo.type == "notice") {
|
|
349
355
|
return false
|
|
350
|
-
} else if (this
|
|
356
|
+
} else if (this.queryInfo.type == "officialDocument") {
|
|
351
357
|
return false
|
|
352
358
|
} else {
|
|
353
359
|
return true
|
|
@@ -171,6 +171,12 @@ export default {
|
|
|
171
171
|
title: {
|
|
172
172
|
type: String,
|
|
173
173
|
default: ""
|
|
174
|
+
},
|
|
175
|
+
queryInfo:{
|
|
176
|
+
type: Object,
|
|
177
|
+
default:()=>{
|
|
178
|
+
return {}
|
|
179
|
+
}
|
|
174
180
|
}
|
|
175
181
|
},
|
|
176
182
|
data() {
|
|
@@ -394,7 +400,7 @@ export default {
|
|
|
394
400
|
|
|
395
401
|
// 设置条件
|
|
396
402
|
async setConfig() {
|
|
397
|
-
this.applyType = this
|
|
403
|
+
this.applyType = this.queryInfo.type;
|
|
398
404
|
var configDefault = {
|
|
399
405
|
ele: "sponsor",
|
|
400
406
|
name: "发起人",
|
|
@@ -403,7 +409,7 @@ export default {
|
|
|
403
409
|
|
|
404
410
|
this.configList = config[this.applyType] ? await config[this.applyType](this) : [];
|
|
405
411
|
|
|
406
|
-
if (this
|
|
412
|
+
if (this.queryInfo.type == "sealApproval" || this.queryInfo.name == "用章申请" || this.queryInfo.name == "用车申请" || this.queryInfo.type == "carApproval") {
|
|
407
413
|
configDefault = {};
|
|
408
414
|
} else {
|
|
409
415
|
this.configList.unshift(configDefault);
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
<el-row v-if="tools">
|
|
4
4
|
<el-col :span="24" class="right-plan">
|
|
5
5
|
<div class="process-heard">
|
|
6
|
-
|
|
7
|
-
<template>
|
|
6
|
+
<template v-if="queryName">
|
|
8
7
|
<div v-if="isEdit">
|
|
9
|
-
|
|
10
|
-
<span class="process-title">流程</span>
|
|
8
|
+
<span class="process-title">{{queryName}}流程</span>
|
|
11
9
|
<!-- <i class="el-icon-edit" @click.stop="isEdit = false; conName = name"></i> -->
|
|
12
10
|
</div>
|
|
13
11
|
<div v-else>
|
|
@@ -108,7 +106,7 @@ import lodash from "lodash";
|
|
|
108
106
|
import * as api from "../../api/apiProcess";
|
|
109
107
|
import * as ProcessBuilder from "../../views/formBuilder/service/ProcessBuilder";
|
|
110
108
|
export default {
|
|
111
|
-
props: ["tools"],
|
|
109
|
+
props: ["queryInfo","tools","path","userInfo"],
|
|
112
110
|
data() {
|
|
113
111
|
return {
|
|
114
112
|
approverSelectorData: {
|
|
@@ -181,10 +179,7 @@ export default {
|
|
|
181
179
|
}
|
|
182
180
|
},
|
|
183
181
|
created() {
|
|
184
|
-
|
|
185
|
-
// this.$route.path == "/index"
|
|
186
|
-
// ? "customForm_" + this.$store.state.formBuilder.formDesId
|
|
187
|
-
// : this.$route.query.type;
|
|
182
|
+
this.type = this.queryInfo.type
|
|
188
183
|
},
|
|
189
184
|
mounted() {
|
|
190
185
|
this.jsPlumbInit();
|
|
@@ -192,9 +187,9 @@ export default {
|
|
|
192
187
|
methods: {
|
|
193
188
|
async save() {
|
|
194
189
|
// const user = this.$store.state.user;
|
|
195
|
-
const user =
|
|
190
|
+
const user = this.userInfo;
|
|
196
191
|
const flg = false;
|
|
197
|
-
if (this
|
|
192
|
+
if (this.path == "/index") {
|
|
198
193
|
// this.params.menuId = this.$store.state.formBuilder.menuId;
|
|
199
194
|
this.params.menuId = ""
|
|
200
195
|
}
|
|
@@ -538,9 +533,9 @@ export default {
|
|
|
538
533
|
const content = JSON.parse(res.data.data.content);
|
|
539
534
|
this.data = { nodeList: content.nodeList, lineList: content.lineList };
|
|
540
535
|
// todo:
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
536
|
+
this.name = this.queryInfo.name
|
|
537
|
+
? this.queryInfo.name + "流程"
|
|
538
|
+
: content.name;
|
|
544
539
|
this.isFlg = content.switchOn != 0;
|
|
545
540
|
this.processId = res.data.data._id;
|
|
546
541
|
this.version = res.data.data.rootNode.version;
|
|
@@ -553,10 +548,10 @@ export default {
|
|
|
553
548
|
if (res.data.data && res.data.data._id) {
|
|
554
549
|
this.processId = res.data.data._id;
|
|
555
550
|
const processList = JSON.parse(res.data.data.content);
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
551
|
+
this.name = processList.name;
|
|
552
|
+
this.name = this.queryInfo.name
|
|
553
|
+
? this.queryInfo.name + "流程"
|
|
554
|
+
: processList.name;
|
|
560
555
|
|
|
561
556
|
this.isFlg = processList.switchOn != 0;
|
|
562
557
|
this.version = res.data.data.rootNode.version;
|
|
@@ -574,17 +569,17 @@ export default {
|
|
|
574
569
|
const res = await api.updateProcessToNew(data);
|
|
575
570
|
}, 200);
|
|
576
571
|
} else {
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
572
|
+
this.name = this.queryInfo.name
|
|
573
|
+
? this.queryInfo.name + "流程"
|
|
574
|
+
: "流程";
|
|
580
575
|
this.initProcess();
|
|
581
576
|
const result = ProcessBuilder.treeToListLocal(this.root.lists);
|
|
582
577
|
this.id = result.length + 10;
|
|
583
578
|
}
|
|
584
579
|
} else {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
580
|
+
this.name = this.queryInfo.name
|
|
581
|
+
? this.queryInfo.name + "流程"
|
|
582
|
+
: "流程";
|
|
588
583
|
this.initProcess();
|
|
589
584
|
const result = ProcessBuilder.treeToListLocal(this.root.lists);
|
|
590
585
|
this.id = result.length + 10;
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
<!-- 顶部导航栏 -->
|
|
4
4
|
<div class="fd-nav sidePadding">
|
|
5
5
|
<div class="fd-nav-left">
|
|
6
|
-
|
|
7
|
-
<div class="fd-nav-title">流程</div>
|
|
6
|
+
<div class="fd-nav-title">{{queryInfo.name}}流程</div>
|
|
8
7
|
</div>
|
|
9
8
|
<div class="fd-nav-center"></div>
|
|
10
9
|
<div class="fd-nav-right">
|
|
@@ -42,6 +41,7 @@
|
|
|
42
41
|
:isTried.sync="isTried"
|
|
43
42
|
:directorMaxLevel="directorMaxLevel"
|
|
44
43
|
:tableId="processConfig.processId"
|
|
44
|
+
:queryInfo="queryInfo"
|
|
45
45
|
/>
|
|
46
46
|
<div class="end-node">
|
|
47
47
|
<div class="end-node-circle"></div>
|
|
@@ -75,15 +75,14 @@
|
|
|
75
75
|
</span>
|
|
76
76
|
</el-dialog>
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
</el-dialog>
|
|
78
|
+
<!-- 老数据展示弹出 -->
|
|
79
|
+
<el-dialog :title="`${queryInfo.name}老数据参考`" :visible.sync="oldModal" width="70%" :before-close="showOldModal">
|
|
80
|
+
<OldProcess :tools="false" :path="path" :userInfo="userInfo" :queryInfo="queryInfo"/>
|
|
81
|
+
<span slot="footer" class="dialog-footer">
|
|
82
|
+
<el-button @click="oldModal = false">取 消</el-button>
|
|
83
|
+
<el-button type="primary" @click="oldModal = false">确 定</el-button>
|
|
84
|
+
</span>
|
|
85
|
+
</el-dialog>
|
|
87
86
|
|
|
88
87
|
|
|
89
88
|
</div>
|
|
@@ -92,11 +91,51 @@
|
|
|
92
91
|
import initData from "./workflow/initData"
|
|
93
92
|
import * as api from "@/api/apiProcess";
|
|
94
93
|
import OldProcess from "./process-2"
|
|
94
|
+
import nodeWrap from './workflow/nodeWrap'
|
|
95
|
+
|
|
95
96
|
|
|
96
97
|
export default {
|
|
97
98
|
name: 'Process',
|
|
98
99
|
components: {
|
|
99
|
-
OldProcess
|
|
100
|
+
OldProcess,
|
|
101
|
+
nodeWrap
|
|
102
|
+
},
|
|
103
|
+
props: {
|
|
104
|
+
// 路由地址
|
|
105
|
+
path: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: () => {
|
|
108
|
+
return "/index"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
// 类型数据
|
|
112
|
+
queryInfo:{
|
|
113
|
+
type:Object,
|
|
114
|
+
default:()=>{
|
|
115
|
+
return {
|
|
116
|
+
name:"公告管理",
|
|
117
|
+
type:"notice"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
// 用户信息
|
|
123
|
+
userInfo: {
|
|
124
|
+
type: Object,
|
|
125
|
+
default:()=>{
|
|
126
|
+
return {
|
|
127
|
+
"companyNo":"202008267425615", // 公司no
|
|
128
|
+
"no":"", // 用户no
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
// 对应环境接口
|
|
133
|
+
env:{
|
|
134
|
+
type:Object,
|
|
135
|
+
default:()=>{
|
|
136
|
+
return {}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
100
139
|
},
|
|
101
140
|
data() {
|
|
102
141
|
return {
|
|
@@ -118,12 +157,16 @@ export default {
|
|
|
118
157
|
processId: null // 流程ID
|
|
119
158
|
};
|
|
120
159
|
},
|
|
160
|
+
mounted() {
|
|
161
|
+
window.process = this.env
|
|
162
|
+
console.log(window.process)
|
|
163
|
+
},
|
|
121
164
|
created() {
|
|
122
165
|
// 获取审批流程数据
|
|
123
166
|
this.getProcessSet()
|
|
124
167
|
// 设置类型
|
|
125
168
|
// todo: 修改 this.$store.state.formBuilder.formDesId
|
|
126
|
-
// this.type = this
|
|
169
|
+
// this.type = this.path == "/index" ? "customForm_" + this.$store.state.formBuilder.formDesId : this.queryInfo.type;
|
|
127
170
|
},
|
|
128
171
|
methods: {
|
|
129
172
|
// 初始化数据
|
|
@@ -139,12 +182,9 @@ export default {
|
|
|
139
182
|
"automaticPass": !!parseInt(this.processConfig.automaticPass)
|
|
140
183
|
}
|
|
141
184
|
},
|
|
142
|
-
|
|
143
185
|
// 获取审批流程数据
|
|
144
186
|
async getProcessSet() {
|
|
145
|
-
|
|
146
|
-
// this.$route.query.type
|
|
147
|
-
const param = { companyId: "", type: "" };
|
|
187
|
+
const param = { companyId: this.userInfo.companyNo, type: this.queryInfo.type };
|
|
148
188
|
const result = await api.queryProcessByType(param);
|
|
149
189
|
const { state, data } = result.data
|
|
150
190
|
if (state == "ok" && data) {
|
|
@@ -326,11 +366,11 @@ export default {
|
|
|
326
366
|
...this.processConfig,
|
|
327
367
|
"switchOn": this.workFlowDef.switchOn ? 1 : 0, // 审批状态
|
|
328
368
|
"automaticPass": this.workFlowDef.automaticPass ? 1 : 0, // 重复审批人问题
|
|
329
|
-
"creator":
|
|
330
|
-
"companyId":
|
|
331
|
-
"type":
|
|
332
|
-
"processName":
|
|
333
|
-
"describe":
|
|
369
|
+
"creator": this.userInfo.no, // 用户no this.$store.state.user.no
|
|
370
|
+
"companyId": this.userInfo.companyNo, // 公司id this.$store.state.user.companyNo
|
|
371
|
+
"type": this.queryInfo.type, // 流程类型 this.$route.query.type
|
|
372
|
+
"processName": this.queryInfo.name, // 流程名称 ""this.$route.query.name
|
|
373
|
+
"describe": this.queryInfo.name // 流程描述 this.$route.query.name
|
|
334
374
|
}
|
|
335
375
|
|
|
336
376
|
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
</div>
|
|
76
76
|
|
|
77
77
|
<nodeWrap v-if="nodeConfig.childNode && nodeConfig.childNode" :nodeConfig.sync="nodeConfig.childNode" :tableId="tableId"
|
|
78
|
-
:isTried.sync="isTried" :directorMaxLevel="directorMaxLevel"></nodeWrap>
|
|
78
|
+
:isTried.sync="isTried" :directorMaxLevel="directorMaxLevel" :queryInfo="queryInfo"></nodeWrap>
|
|
79
79
|
|
|
80
80
|
<!-- 审批人 / 抄送人 -->
|
|
81
|
-
<ApproverSelector ref="approverSelector"/>
|
|
81
|
+
<ApproverSelector ref="approverSelector" :queryInfo="queryInfo"/>
|
|
82
82
|
|
|
83
83
|
<!-- 条件设置弹出窗口 -->
|
|
84
|
-
<NodeConditionConfig ref="conditionForm" :formData="connection" :title="title"/>
|
|
84
|
+
<NodeConditionConfig ref="conditionForm" :formData="connection" :title="title" :queryInfo="queryInfo"/>
|
|
85
85
|
|
|
86
86
|
<!-- TODO: 发起人 -->
|
|
87
87
|
|
|
@@ -91,13 +91,17 @@
|
|
|
91
91
|
<script>
|
|
92
92
|
import ApproverSelector from '../components/approverSelector.vue'
|
|
93
93
|
import NodeConditionConfig from "../components/nodeConditionConfig";
|
|
94
|
+
import addNode from './addNode'
|
|
95
|
+
|
|
94
96
|
|
|
95
97
|
export default {
|
|
96
|
-
props: ["nodeConfig", "flowPermission", "directorMaxLevel", "isTried", "tableId"],
|
|
98
|
+
props: ["nodeConfig", "flowPermission", "directorMaxLevel", "isTried", "tableId","queryInfo"],
|
|
97
99
|
components:{
|
|
98
100
|
ApproverSelector,
|
|
99
|
-
NodeConditionConfig
|
|
101
|
+
NodeConditionConfig,
|
|
102
|
+
addNode
|
|
100
103
|
},
|
|
104
|
+
name:"nodeWrap",
|
|
101
105
|
data() {
|
|
102
106
|
return {
|
|
103
107
|
placeholderList: ["发起人", "审批人", "抄送人"],
|
|
@@ -139,6 +143,7 @@ export default {
|
|
|
139
143
|
}
|
|
140
144
|
}
|
|
141
145
|
},
|
|
146
|
+
created(){},
|
|
142
147
|
methods: {
|
|
143
148
|
// 展示修改节点的输入框
|
|
144
149
|
clickEvent(index) {
|