工作流权限控制修改
Showing
9 changed files
with
71 additions
and
45 deletions
... | @@ -102,3 +102,16 @@ export function termProcess(data) { | ... | @@ -102,3 +102,16 @@ export function termProcess(data) { |
102 | }) | 102 | }) |
103 | } | 103 | } |
104 | 104 | ||
105 | /** | ||
106 | * 根据bsm判断是否存在工作流 | ||
107 | */ | ||
108 | export function booleanWorkflow(data) { | ||
109 | return request({ | ||
110 | url: '/qj/workarea/booleanWorkflow', | ||
111 | method: 'get', | ||
112 | params: { | ||
113 | bsm:data, | ||
114 | } | ||
115 | }) | ||
116 | } | ||
117 | ... | ... |
... | @@ -53,6 +53,7 @@ const store = new Vuex.Store({ | ... | @@ -53,6 +53,7 @@ const store = new Vuex.Store({ |
53 | treeData:[], // 树数据 | 53 | treeData:[], // 树数据 |
54 | oldZdbsm:'', | 54 | oldZdbsm:'', |
55 | newZdbsm:'', | 55 | newZdbsm:'', |
56 | isWorkFlow:false, // 判断是否工作流数据 | ||
56 | }, | 57 | }, |
57 | modules: { | 58 | modules: { |
58 | user, | 59 | user, | ... | ... |
... | @@ -82,6 +82,7 @@ import Create from "./panel/create/index"; | ... | @@ -82,6 +82,7 @@ import Create from "./panel/create/index"; |
82 | import LineTree from "../components/lineTree/lineTree"; | 82 | import LineTree from "../components/lineTree/lineTree"; |
83 | import { setTimeout } from "timers"; | 83 | import { setTimeout } from "timers"; |
84 | import { getTree,getDdicByMC,getTreeList,getTreeByBsm,getListMenu } from "../api/common"; | 84 | import { getTree,getDdicByMC,getTreeList,getTreeByBsm,getListMenu } from "../api/common"; |
85 | import {booleanWorkflow} from "@api/user" | ||
85 | 86 | ||
86 | export default { | 87 | export default { |
87 | components: { | 88 | components: { |
... | @@ -177,8 +178,10 @@ export default { | ... | @@ -177,8 +178,10 @@ export default { |
177 | } | 178 | } |
178 | } else if(newPath == '/viewMap'){ | 179 | } else if(newPath == '/viewMap'){ |
179 | this.isMap = true; | 180 | this.isMap = true; |
180 | }else{ | 181 | }else if(newPath == '/zrz' || newPath == '/zd' || newPath == '/dz'){ |
181 | 182 | booleanWorkflow(this.$route.query.ywbsm).then(res=>{ | |
183 | this.$store.state.isWorkFlow = res.result; | ||
184 | }) | ||
182 | } | 185 | } |
183 | }, | 186 | }, |
184 | "$store.state.treeData":function (val) { | 187 | "$store.state.treeData":function (val) { | ... | ... |
... | @@ -158,6 +158,7 @@ | ... | @@ -158,6 +158,7 @@ |
158 | path: path, | 158 | path: path, |
159 | query: { | 159 | query: { |
160 | bsm: row.glbsm, | 160 | bsm: row.glbsm, |
161 | ywbsm: row.businessId, | ||
161 | source: 2, | 162 | source: 2, |
162 | auth: '0,1,2', | 163 | auth: '0,1,2', |
163 | workitemInstanceId:row.id | 164 | workitemInstanceId:row.id | ... | ... |
... | @@ -193,11 +193,11 @@ | ... | @@ -193,11 +193,11 @@ |
193 | </tbody> | 193 | </tbody> |
194 | </table> | 194 | </table> |
195 | </el-form> | 195 | </el-form> |
196 | <div class="header-button" :style="{width:mainBoxWidth+'px'}"> | 196 | <div class="header-button" :style="{width:mainBoxWidth+'px'}" v-if="$store.state.isWorkFlow"> |
197 | <el-button type="primary" class="saveBtn" @click="onSave" :disabled="disabled">保存</el-button> | 197 | <el-button type="primary" class="saveBtn" @click="onSave" :disabled="disabled">保存</el-button> |
198 | <el-button type="primary" @click="registerCall">登记调用</el-button> | 198 | <el-button type="primary" @click="registerCall">登记调用</el-button> |
199 | </div> | 199 | </div> |
200 | <div class="sh-btn"> | 200 | <div class="sh-btn" v-if="$store.state.isWorkFlow"> |
201 | <el-button type="primary" @click="lczz" v-show="workFlowphase == 'modify'">终止</el-button> | 201 | <el-button type="primary" @click="lczz" v-show="workFlowphase == 'modify'">终止</el-button> |
202 | <el-button type="primary" @click="thzd" v-show="rollbackDetails.length>0">退回</el-button> | 202 | <el-button type="primary" @click="thzd" v-show="rollbackDetails.length>0">退回</el-button> |
203 | <el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button> | 203 | <el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button> |
... | @@ -321,19 +321,21 @@ | ... | @@ -321,19 +321,21 @@ |
321 | 321 | ||
322 | 322 | ||
323 | getActivityDetail(){ | 323 | getActivityDetail(){ |
324 | let params = { | 324 | if (this.$route.query.workitemInstanceId) { |
325 | "params": {}, | 325 | let params = { |
326 | "workflowPeriod": "current", | 326 | "params": {}, |
327 | "workitemInstanceId": this.$route.query.workitemInstanceId | 327 | "workflowPeriod": "current", |
328 | "workitemInstanceId": this.$route.query.workitemInstanceId | ||
329 | } | ||
330 | getActivityDetail(params).then(res => { | ||
331 | this.workFlowData= res; | ||
332 | this.workFlowphase = res.properties.phase; | ||
333 | this.rollbackDetails = res.rollbackDetails; | ||
334 | this.workFlowState = res.workitemInstance.apps.some(function(item) { | ||
335 | return item == 'shenpibiao'; | ||
336 | }); | ||
337 | }) | ||
328 | } | 338 | } |
329 | getActivityDetail(params).then(res => { | ||
330 | this.workFlowData= res; | ||
331 | this.workFlowphase = res.properties.phase; | ||
332 | this.rollbackDetails = res.rollbackDetails; | ||
333 | this.workFlowState = res.workitemInstance.apps.some(function(item) { | ||
334 | return item == 'shenpibiao'; | ||
335 | }); | ||
336 | }) | ||
337 | }, | 339 | }, |
338 | 340 | ||
339 | shdz(){ | 341 | shdz(){ | ... | ... |
... | @@ -15,7 +15,7 @@ | ... | @@ -15,7 +15,7 @@ |
15 | <el-tab-pane label="附件材料" name="fjcl"> | 15 | <el-tab-pane label="附件材料" name="fjcl"> |
16 | <fjcl v-if="fjclVisible" ref="fjcl" :is-disabled="isDisabled"></fjcl> | 16 | <fjcl v-if="fjclVisible" ref="fjcl" :is-disabled="isDisabled"></fjcl> |
17 | </el-tab-pane> | 17 | </el-tab-pane> |
18 | <el-tab-pane label="流程跟踪" name="lcgz" lazy> | 18 | <el-tab-pane label="流程跟踪" name="lcgz" v-if="$store.state.isWorkFlow" lazy> |
19 | <lcgz ref="lcgz" ></lcgz> | 19 | <lcgz ref="lcgz" ></lcgz> |
20 | </el-tab-pane> | 20 | </el-tab-pane> |
21 | </el-tabs> | 21 | </el-tabs> | ... | ... |
... | @@ -363,12 +363,12 @@ | ... | @@ -363,12 +363,12 @@ |
363 | </td> | 363 | </td> |
364 | </tr> | 364 | </tr> |
365 | </table> | 365 | </table> |
366 | <div class="header-button" :style="{width:mainBoxWidth+'px'}"> | 366 | <div class="header-button" :style="{width:mainBoxWidth+'px'}" v-if="$store.state.isWorkFlow"> |
367 | <el-button type="primary" class="saveBtn" @click="updateZDxx" :disabled="disabled" icon="iconfont iconbaocun">保存</el-button> | 367 | <el-button type="primary" class="saveBtn" @click="updateZDxx" :disabled="disabled" icon="iconfont iconbaocun">保存</el-button> |
368 | <el-button type="primary" @click="registerCall">登记调用</el-button> | 368 | <el-button type="primary" @click="registerCall">登记调用</el-button> |
369 | </div> | 369 | </div> |
370 | </div> | 370 | </div> |
371 | <div class="sh-btn"> | 371 | <div class="sh-btn" v-if="$store.state.isWorkFlow"> |
372 | <el-button type="primary" @click="lczz" v-show="workFlowphase == 'modify'">终止</el-button> | 372 | <el-button type="primary" @click="lczz" v-show="workFlowphase == 'modify'">终止</el-button> |
373 | <el-button type="primary" @click="thzd" v-show="rollbackDetails.length>0">退回</el-button> | 373 | <el-button type="primary" @click="thzd" v-show="rollbackDetails.length>0">退回</el-button> |
374 | <el-button type="primary" @click="submitZDxx" :disabled="disabled" v-if="!workFlowState">提交</el-button> | 374 | <el-button type="primary" @click="submitZDxx" :disabled="disabled" v-if="!workFlowState">提交</el-button> |
... | @@ -502,19 +502,22 @@ | ... | @@ -502,19 +502,22 @@ |
502 | }, | 502 | }, |
503 | methods: { | 503 | methods: { |
504 | getActivityDetail(){ | 504 | getActivityDetail(){ |
505 | let params = { | 505 | if (this.$route.query.workitemInstanceId) { |
506 | "params": {}, | 506 | let params = { |
507 | "workflowPeriod": "current", | 507 | "params": {}, |
508 | "workitemInstanceId": this.$route.query.workitemInstanceId | 508 | "workflowPeriod": "current", |
509 | "workitemInstanceId": this.$route.query.workitemInstanceId | ||
510 | } | ||
511 | getActivityDetail(params).then(res => { | ||
512 | this.workFlowData= res; | ||
513 | this.workFlowphase = res.properties.phase; | ||
514 | this.rollbackDetails = res.rollbackDetails; | ||
515 | this.workFlowState = res.workitemInstance.apps.some(function(item) { | ||
516 | return item == 'shenpibiao'; | ||
517 | }); | ||
518 | }) | ||
509 | } | 519 | } |
510 | getActivityDetail(params).then(res => { | 520 | |
511 | this.workFlowData= res; | ||
512 | this.workFlowphase = res.properties.phase; | ||
513 | this.rollbackDetails = res.rollbackDetails; | ||
514 | this.workFlowState = res.workitemInstance.apps.some(function(item) { | ||
515 | return item == 'shenpibiao'; | ||
516 | }); | ||
517 | }) | ||
518 | }, | 521 | }, |
519 | registerCall() { | 522 | registerCall() { |
520 | let data = { | 523 | let data = { | ... | ... |
... | @@ -272,13 +272,13 @@ | ... | @@ -272,13 +272,13 @@ |
272 | </tr> | 272 | </tr> |
273 | 273 | ||
274 | </table> | 274 | </table> |
275 | <div class="header-button" :style="{width:mainBoxWidth+'px'}"> | 275 | <div class="header-button" :style="{width:mainBoxWidth+'px'}" v-if="$store.state.isWorkFlow"> |
276 | <el-button type="primary" class="saveBtn" @click="onSave" :disabled="disabled" icon="iconfont iconbaocun">保存</el-button> | 276 | <el-button type="primary" class="saveBtn" @click="onSave" :disabled="disabled" icon="iconfont iconbaocun">保存</el-button> |
277 | <el-button type="primary" @click="registerCall">登记调用</el-button> | 277 | <el-button type="primary" @click="registerCall">登记调用</el-button> |
278 | <!-- <el-button type="primary" class="saveBtn" @click="save">保存</el-button> --> | 278 | <!-- <el-button type="primary" class="saveBtn" @click="save">保存</el-button> --> |
279 | </div> | 279 | </div> |
280 | </div> | 280 | </div> |
281 | <div class="sh-btn"> | 281 | <div class="sh-btn" v-if="$store.state.isWorkFlow"> |
282 | <el-button type="primary" @click="lczz" v-show="workFlowphase == 'modify'">终止</el-button> | 282 | <el-button type="primary" @click="lczz" v-show="workFlowphase == 'modify'">终止</el-button> |
283 | <el-button type="primary" @click="thzd" v-show="rollbackDetails.length>0">退回</el-button> | 283 | <el-button type="primary" @click="thzd" v-show="rollbackDetails.length>0">退回</el-button> |
284 | <el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button> | 284 | <el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button> |
... | @@ -426,19 +426,21 @@ | ... | @@ -426,19 +426,21 @@ |
426 | methods: { | 426 | methods: { |
427 | 427 | ||
428 | getActivityDetail(){ | 428 | getActivityDetail(){ |
429 | let params = { | 429 | if (this.$route.query.workitemInstanceId) { |
430 | "params": {}, | 430 | let params = { |
431 | "workflowPeriod": "current", | 431 | "params": {}, |
432 | "workitemInstanceId": this.$route.query.workitemInstanceId | 432 | "workflowPeriod": "current", |
433 | "workitemInstanceId": this.$route.query.workitemInstanceId | ||
434 | } | ||
435 | getActivityDetail(params).then(res => { | ||
436 | this.workFlowData= res; | ||
437 | this.workFlowphase = res.properties.phase; | ||
438 | this.rollbackDetails = res.rollbackDetails; | ||
439 | this.workFlowState = res.workitemInstance.apps.some(function(item) { | ||
440 | return item == 'shenpibiao'; | ||
441 | }); | ||
442 | }) | ||
433 | } | 443 | } |
434 | getActivityDetail(params).then(res => { | ||
435 | this.workFlowData= res; | ||
436 | this.workFlowphase = res.properties.phase; | ||
437 | this.rollbackDetails = res.rollbackDetails; | ||
438 | this.workFlowState = res.workitemInstance.apps.some(function(item) { | ||
439 | return item == 'shenpibiao'; | ||
440 | }); | ||
441 | }) | ||
442 | }, | 444 | }, |
443 | 445 | ||
444 | updateSjfyyt(data){ | 446 | updateSjfyyt(data){ | ... | ... |
-
Please register or sign in to post a comment