自然幢工作流添加
Showing
2 changed files
with
132 additions
and
32 deletions
... | @@ -162,6 +162,8 @@ import { insertZrzjbxx } from "@api/zrz"; | ... | @@ -162,6 +162,8 @@ import { insertZrzjbxx } from "@api/zrz"; |
162 | import { insertDzjbxx } from "@api/dz"; | 162 | import { insertDzjbxx } from "@api/dz"; |
163 | import { insertGzwjbxx } from "@api/gzw"; | 163 | import { insertGzwjbxx } from "@api/gzw"; |
164 | import { createProcessInstance } from "@api/user"; | 164 | import { createProcessInstance } from "@api/user"; |
165 | import { getZrzDetailByBsm} from "@api/zrz" | ||
166 | |||
165 | 167 | ||
166 | export default { | 168 | export default { |
167 | name: "", | 169 | name: "", |
... | @@ -198,22 +200,29 @@ export default { | ... | @@ -198,22 +200,29 @@ export default { |
198 | xmmc: "", | 200 | xmmc: "", |
199 | xzqbsm: "", | 201 | xzqbsm: "", |
200 | type: "zd", | 202 | type: "zd", |
201 | zdtzmbsm: "" | 203 | zdtzmbsm: "", |
204 | ywlx:"create" | ||
202 | }, | 205 | }, |
203 | ruleForm1:{ | 206 | ruleForm1:{ |
204 | zdbsm:'', | 207 | zdbsm:'', |
205 | xmmc:'', | 208 | xmmc:'', |
206 | userbsm:'' | 209 | userbsm:'', |
210 | type: "zrz", | ||
211 | ywlx:"create" | ||
207 | }, | 212 | }, |
208 | ruleForm2:{ | 213 | ruleForm2:{ |
209 | zdbsm:'', | 214 | zdbsm:'', |
210 | xmmc:'', | 215 | xmmc:'', |
211 | userbsm:'' | 216 | userbsm:'', |
217 | type: "dz", | ||
218 | ywlx:"create" | ||
212 | }, | 219 | }, |
213 | ruleForm4:{ | 220 | ruleForm4:{ |
214 | zdzhbsm:'', | 221 | zdzhbsm:'', |
215 | xmmc:'', | 222 | xmmc:'', |
216 | userbsm:'' | 223 | userbsm:'', |
224 | type: "gzw", | ||
225 | ywlx:"create" | ||
217 | }, | 226 | }, |
218 | rules: { | 227 | rules: { |
219 | xzqbsm: [ | 228 | xzqbsm: [ |
... | @@ -359,31 +368,66 @@ export default { | ... | @@ -359,31 +368,66 @@ export default { |
359 | if (valid) { | 368 | if (valid) { |
360 | this.ruleForm1.zdbsm = this.auth ? this.$store.state.zdbsm : ''; | 369 | this.ruleForm1.zdbsm = this.auth ? this.$store.state.zdbsm : ''; |
361 | this.ruleForm1.dzbsm = this.auth ? this.$store.state.dzbsm : ''; | 370 | this.ruleForm1.dzbsm = this.auth ? this.$store.state.dzbsm : ''; |
362 | insertZrzjbxx(this.ruleForm1) | 371 | // insertZrzjbxx(this.ruleForm1) |
372 | // .then((res) => { | ||
373 | // if (res.code == "200") { | ||
374 | // //获取左侧树数据 | ||
375 | // this.$store.state.oldZdbsm = ''; | ||
376 | // this.getTreeByBsm(res.result.bsm,'zrz','0,1,2'); | ||
377 | // this.$message({ | ||
378 | // message: "创建成功!", | ||
379 | // type: "success", | ||
380 | // }); | ||
381 | // //todo 跳转到自然幢基本信息内容表页面 (预留) | ||
382 | // this.$store.state.zdbsm=res.result.zdbsm; | ||
383 | // this.$store.state.zrzbsm=res.result.bsm; | ||
384 | // this.$store.state.xmmc=res.result.xmmc; | ||
385 | // this.$store.state.newZdbsm = res.result.zdbsm; | ||
386 | // this.close(); | ||
387 | // this.$router.push({ | ||
388 | // path: '/zrz', query:{ | ||
389 | // source: 1, | ||
390 | // bsm:res.result.bsm, | ||
391 | // auth: '0,1,2' | ||
392 | // } | ||
393 | // }); | ||
394 | // } else { | ||
395 | // this.$message.error("创建失败!"); | ||
396 | // } | ||
397 | // }) | ||
398 | // .catch((error) => {}); | ||
399 | let data = { | ||
400 | params:this.ruleForm1, | ||
401 | workflowName:'新建自然幢' | ||
402 | }; | ||
403 | createProcessInstance(data) | ||
363 | .then((res) => { | 404 | .then((res) => { |
364 | if (res.code == "200") { | 405 | console.log(res); |
365 | //获取左侧树数据 | 406 | if (res.needShow) { |
366 | this.$store.state.oldZdbsm = ''; | 407 | this.getTreeByBsm(res.processInstance.title,"zrz",'0,1,2'); |
367 | this.getTreeByBsm(res.result.bsm,'zrz','0,1,2'); | ||
368 | this.$message({ | 408 | this.$message({ |
369 | message: "创建成功!", | 409 | message: "创建成功!", |
370 | type: "success", | 410 | type: "success", |
371 | }); | 411 | }); |
372 | //todo 跳转到自然幢基本信息内容表页面 (预留) | 412 | this.close(); |
373 | this.$store.state.zdbsm=res.result.zdbsm; | 413 | // 根据res.processInstance.businessId去查询zdbsm TODO |
374 | this.$store.state.zrzbsm=res.result.bsm; | 414 | |
375 | this.$store.state.xmmc=res.result.xmmc; | 415 | this.$store.state.zrzbsm = res.processInstance.title; |
376 | this.$store.state.newZdbsm = res.result.zdbsm; | 416 | this.$nextTick(()=>{ |
417 | this.loadCache(res.processInstance.title,'zrz'); | ||
418 | }) | ||
419 | // todo 跳转到宗地基本信息内容表页面 (预留) | ||
377 | this.close(); | 420 | this.close(); |
378 | this.$router.push({ | 421 | this.$router.push({ |
379 | path: '/zrz', query:{ | 422 | path: '/zrz', query:{ |
380 | source: 1, | 423 | source: 1, |
381 | bsm:res.result.bsm, | 424 | bsm:res.processInstance.title, |
425 | workitemInstanceId:res.workitemInstance.id, | ||
382 | auth: '0,1,2' | 426 | auth: '0,1,2' |
383 | } | 427 | } |
384 | }); | 428 | }); |
385 | } else { | 429 | } else { |
386 | this.$message.error("创建失败!"); | 430 | this.$message.error("创建失败"); |
387 | } | 431 | } |
388 | }) | 432 | }) |
389 | .catch((error) => {}); | 433 | .catch((error) => {}); |
... | @@ -394,6 +438,21 @@ export default { | ... | @@ -394,6 +438,21 @@ export default { |
394 | }); | 438 | }); |
395 | 439 | ||
396 | }, | 440 | }, |
441 | |||
442 | loadCache(bsm,type){ | ||
443 | if(type === 'zrz'){ | ||
444 | getZrzDetailByBsm(bsm).then((res)=>{ | ||
445 | if(res.code === 200){ | ||
446 | this.$store.state.zdbsm=res.result.zdbsm; | ||
447 | this.$store.state.zrzbsm=res.result.bsm; | ||
448 | this.$store.state.xmmc=res.result.xmmc; | ||
449 | this.$store.state.newZdbsm = res.result.zdbsm; | ||
450 | } | ||
451 | }) | ||
452 | } | ||
453 | |||
454 | }, | ||
455 | |||
397 | newGzw(){ | 456 | newGzw(){ |
398 | this.$refs['ruleForm4'].validate((valid) => { | 457 | this.$refs['ruleForm4'].validate((valid) => { |
399 | if (valid) { | 458 | if (valid) { | ... | ... |
... | @@ -274,11 +274,15 @@ | ... | @@ -274,11 +274,15 @@ |
274 | </table> | 274 | </table> |
275 | <div class="header-button" :style="{width:mainBoxWidth+'px'}"> | 275 | <div class="header-button" :style="{width:mainBoxWidth+'px'}"> |
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="onSubmit" :disabled="disabled">提交</el-button> | ||
278 | <el-button type="primary" @click="registerCall">登记调用</el-button> | 277 | <el-button type="primary" @click="registerCall">登记调用</el-button> |
279 | <!-- <el-button type="primary" class="saveBtn" @click="save">保存</el-button> --> | 278 | <!-- <el-button type="primary" class="saveBtn" @click="save">保存</el-button> --> |
280 | </div> | 279 | </div> |
281 | </div> | 280 | </div> |
281 | <div class="sh-btn"> | ||
282 | <el-button type="primary" @click="thzd">退回</el-button> | ||
283 | <el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button> | ||
284 | <el-button type="primary" @click="shzrz" v-if="workFlowState">审核</el-button> | ||
285 | </div> | ||
282 | </div> | 286 | </div> |
283 | </template> | 287 | </template> |
284 | 288 | ||
... | @@ -288,6 +292,7 @@ | ... | @@ -288,6 +292,7 @@ |
288 | import {getBdcdyh,saveZrzInfo,getZrzDetailByBsm,getHCountByZrzbsm} from "@api/zrz" | 292 | import {getBdcdyh,saveZrzInfo,getZrzDetailByBsm,getHCountByZrzbsm} from "@api/zrz" |
289 | import {getQjZdjbxxDetailById} from "@api/zd" | 293 | import {getQjZdjbxxDetailById} from "@api/zd" |
290 | import {submit,registerCall} from "@api/common" | 294 | import {submit,registerCall} from "@api/common" |
295 | import { getActivityDetail } from "@api/user"; | ||
291 | import geoUtils from "@components/lineTree/tx/js/geoUtils"; | 296 | import geoUtils from "@components/lineTree/tx/js/geoUtils"; |
292 | export default { | 297 | export default { |
293 | name:'zrz', | 298 | name:'zrz', |
... | @@ -316,6 +321,8 @@ | ... | @@ -316,6 +321,8 @@ |
316 | lx:"zrz", | 321 | lx:"zrz", |
317 | bsm:'', | 322 | bsm:'', |
318 | 323 | ||
324 | workFlowState:false, | ||
325 | |||
319 | initZrzh:'', | 326 | initZrzh:'', |
320 | finishZrzh:'', | 327 | finishZrzh:'', |
321 | hcount:0, | 328 | hcount:0, |
... | @@ -418,6 +425,19 @@ | ... | @@ -418,6 +425,19 @@ |
418 | mixins:[geoUtils], | 425 | mixins:[geoUtils], |
419 | methods: { | 426 | methods: { |
420 | 427 | ||
428 | getActivityDetail(){ | ||
429 | let params = { | ||
430 | "params": {}, | ||
431 | "workflowPeriod": "current", | ||
432 | "workitemInstanceId": this.$route.query.workitemInstanceId | ||
433 | } | ||
434 | getActivityDetail(params).then(res => { | ||
435 | this.workFlowState = res.workitemInstance.apps.some(function(item) { | ||
436 | return item == 'shenpibiao'; | ||
437 | }); | ||
438 | }) | ||
439 | }, | ||
440 | |||
421 | updateSjfyyt(data){ | 441 | updateSjfyyt(data){ |
422 | data.fwsjytbsm = data.fwytzdbsm; | 442 | data.fwsjytbsm = data.fwytzdbsm; |
423 | }, | 443 | }, |
... | @@ -614,21 +634,32 @@ | ... | @@ -614,21 +634,32 @@ |
614 | },ybsm); | 634 | },ybsm); |
615 | }, | 635 | }, |
616 | onSubmit(){ | 636 | onSubmit(){ |
617 | let data={ | 637 | vm.setTjDialog(true); |
618 | glbsm:this.bsm, | 638 | // let data={ |
619 | status:1, | 639 | // glbsm:this.bsm, |
620 | type:"zrz" | 640 | // status:1, |
621 | } | 641 | // type:"zrz" |
622 | submit(data).then((res)=>{ | 642 | // } |
623 | if(res.code===200){ | 643 | // submit(data).then((res)=>{ |
624 | this.$message.success("提交完成!"); | 644 | // if(res.code===200){ |
625 | this.getZrzDetailByBsm(this.$route.query.bsm); | 645 | // this.$message.success("提交完成!"); |
626 | this.$store.state.oldZdbsm = ''; | 646 | // this.getZrzDetailByBsm(this.$route.query.bsm); |
627 | this.getTreeByBsm(this.$route.query.bsm,'zrz','0,1,2') | 647 | // this.$store.state.oldZdbsm = ''; |
628 | }else{ | 648 | // this.getTreeByBsm(this.$route.query.bsm,'zrz','0,1,2') |
629 | this.$message.error(res.message); | 649 | // }else{ |
630 | } | 650 | // this.$message.error(res.message); |
631 | }) | 651 | // } |
652 | // }) | ||
653 | }, | ||
654 | shzrz(){ | ||
655 | let data = { | ||
656 | bdcdyh:this.form.bdcdyh, | ||
657 | zl:this.form.zl, | ||
658 | shyj:'', | ||
659 | shr:'admin', | ||
660 | shsj:'2021-01-22' | ||
661 | }; | ||
662 | vm.setShDialog(true,data) | ||
632 | }, | 663 | }, |
633 | open() { | 664 | open() { |
634 | const self = this; | 665 | const self = this; |
... | @@ -820,6 +851,7 @@ | ... | @@ -820,6 +851,7 @@ |
820 | this.hcount = res.result; | 851 | this.hcount = res.result; |
821 | } | 852 | } |
822 | }); | 853 | }); |
854 | this.getActivityDetail(); | ||
823 | this.$nextTick(() => { | 855 | this.$nextTick(() => { |
824 | this.mainBoxWidth = this.$refs.mainBox.clientWidth; | 856 | this.mainBoxWidth = this.$refs.mainBox.clientWidth; |
825 | }) | 857 | }) |
... | @@ -981,5 +1013,14 @@ | ... | @@ -981,5 +1013,14 @@ |
981 | border-color: rgba(0, 202, 205, .8); | 1013 | border-color: rgba(0, 202, 205, .8); |
982 | } | 1014 | } |
983 | } | 1015 | } |
1016 | .sh-btn{ | ||
1017 | position: fixed; | ||
1018 | top: 74px; | ||
1019 | right: 20px; | ||
1020 | z-index: 999; | ||
1021 | .el-button{ | ||
1022 | padding: 10px 30px; | ||
1023 | } | ||
1024 | } | ||
984 | } | 1025 | } |
985 | </style> | 1026 | </style> | ... | ... |
-
Please register or sign in to post a comment