diff --git a/.env.development b/.env.development index a6cf54bb..5bdf7fa4 100644 --- a/.env.development +++ b/.env.development @@ -9,8 +9,8 @@ VUE_APP_TITLE = '曲阳金隅安全智能管控平台' #VUE_APP_WS_API = 'ws://localhost:8000' # VUE_APP_API_BASEURL = http://222.222.144.147:6013/api #VUE_APP_API_BASEURL = http://10.99.5.79:20309/api -VUE_APP_API_BASEURL = http://49.232.14.174:2226/api -# VUE_APP_API_BASEURL = http://127.0.0.1:2226/api +# VUE_APP_API_BASEURL = http://49.232.14.174:2226/api +VUE_APP_API_BASEURL = http://127.0.0.1:2226/api #VUE_APP_BASEURL = http://127.0.0.1:8000 diff --git a/src/views/rpm/rpjadd.vue b/src/views/rpm/rpjadd.vue index ba3a432f..ed0d0592 100644 --- a/src/views/rpm/rpjadd.vue +++ b/src/views/rpm/rpjadd.vue @@ -656,15 +656,25 @@ export default { ticket.workflow = this.initForm.workflow; ticket.ticket_data = { rpj: this.rpjId ,name:this.rpjform.name}; ticket.transition = id; - this.$API.wf.ticket.create.req(ticket).then((res) => { - this.$message.success("提交成功"); - this.$router.push({ - name: "rpj", - query: {}, - }); - }).catch(()=>{ - this.isSaveing = false; - }); + if(this.rpjform.ticket!= null&&this.rpjform.ticket!= undefined){ + this.$API.wf.ticket.ticketHandle.req(this.rpjform.ticket,ticket).then((res) => { + this.tLoading=false + this.$message.success("提交成功"); + this.$router.push({ + name: "rpj", + query: {}, + }); + }).catch(e=>{this.tLoading=false}); + }else{ + this.$API.wf.ticket.create.req(ticket).then((res) => { + this.tLoading=false + this.$message.success("提交成功"); + this.$router.push({ + name: "rpj", + query: {}, + }); + }).catch(e=>{this.tLoading=false}); + } }, }, }; diff --git a/src/views/vm/vistoradd.vue b/src/views/vm/vistoradd.vue index dcd67125..fe1c3689 100644 --- a/src/views/vm/vistoradd.vue +++ b/src/views/vm/vistoradd.vue @@ -557,6 +557,7 @@ export default { that.$message.success("创建成功"); that.dialogpeople = false; that.isSaveing = false; + this.getpeoplelistlist(); return res; }) .catch((err) => { @@ -574,7 +575,7 @@ export default { .req(row.id) .then((res) => { this.$message.success("访客删除成功"); - + this.getpeoplelistlist(); return res; }) .catch((err) => { @@ -589,15 +590,26 @@ export default { this.ticket.workflow=this.initform.workflow; this.ticket.ticket_data={visit:this.visitid,name:this.form.name}; this.ticket.transition=id; - this.$API.wf.ticket.create.req(this.ticket).then((res) => { - this.$message.success("提交成功"); - this.$router.push({ - name: "visit", - query: {}, - }); - }).catch(()=>{ - this.isSaving = false; - }); + + if(this.form.ticket!= null&&this.form.ticket!= undefined){ + this.$API.wf.ticket.ticketHandle.req(this.form.ticket,this.ticket).then((res) => { + this.isSaving=false + this.$message.success("提交成功"); + this.$router.push({ + name: "visit", + query: {}, + }); + }).catch(e=>{this.isSaving=false}); + }else{ + this.$API.wf.ticket.create.req(this.ticket).then((res) => { + this.isSaving=false + this.$message.success("提交成功"); + this.$router.push({ + name: "visit", + query: {}, + }); + }).catch(e=>{this.isSaving=false}); + } } }, }; diff --git a/src/views/wf/ticketdetail.vue b/src/views/wf/ticketdetail.vue index 3c806f74..7de1ab2c 100644 --- a/src/views/wf/ticketdetail.vue +++ b/src/views/wf/ticketdetail.vue @@ -129,9 +129,9 @@ - + - + -
- + 加签处理
-
+
- 加签 - 加签 + 转交 -
-
关闭 + + + 撤回 + +
+
+ 编辑许可证 + @click="itemDetailEdtil">前往编辑
- + @@ -363,6 +374,8 @@ dosOption: [], submitLoading: false, userId: this.$TOOL.data.get("USER_INFO").id, + isOwn: false, + isDuty: false }; }, created() { @@ -386,10 +399,27 @@ methods: { itemDetailEdtil(){ let itemDetail = this.itemDetail; - this.$router.push({ + if(this.cateType === 'opl'){ + this.$router.push({ name: itemDetail.cate_code, query: {oplId:itemDetail.id} }) + }else if(this.cateType === 'rpj'){ + this.$router.push({ + name: "rpjadd", + query: { + rpjid: itemDetail.id, //访问项目id + }, + }); + }else if(this.cateType === 'visit'){ + this.$router.push({ + name: "vistoradd", + query: { + visitid: itemDetail.id, //访问项目id + }, + }); + } + }, handleClose(index) { if (index === "1") { @@ -400,7 +430,7 @@ this.handleLabel = "关闭原因"; } this.limitedRetreat = true; - this.ticketId = this.itemDetail.id; + // this.ticketId = this.itemDetail.id; }, handleCancel() { this.limitedRetreat = false; @@ -413,26 +443,21 @@ cancelButtonText: "取消", type: "warning", }) - .then(async () => { + .then(() => { if (that.handleTitle === "撤回工单") { - res = that.$API.wf.ticket.ticketRetreat.req( + that.$API.wf.ticket.ticketRetreat.req( that.ticketId, that.handleForm - ); + ).then(res=>{that.limitedRetreat=false;window.location.reload()}) } else { - res = that.$API.wf.ticket.ticketClose.req( + that.$API.wf.ticket.ticketClose.req( that.ticketId, that.handleForm - ); - } - if (res.err_msg) { - } else { - that.limitedRetreat = false; - + ).then(res=>{that.limitedRetreat=false;window.location.reload()}); } }) .catch((err) => { - console.error(err); + that.limitedRetreat=false }); }, //关闭工作 @@ -464,10 +489,19 @@ this.$API.wf.ticket.ticketItem.req(this.ticketId).then((res) => { this.mainLoading = false; this.ticketDetail = res; + if(this.ticketDetail.state_.key == 'opl_close'){ // 如果是作业关闭,展示需要提交的表单 this.getCloseDos() } + // 判断是不是我的或该我处理的 + if(this.ticketDetail.create_by == this.userId){ + this.isOwn = true + } + let participant = this.ticketDetail.participant + if(participant==this.userId || participant.indexOf(this.userId)>-1){ + this.isDuty = true + } }).catch(e=>{this.mainLoading = false}); }, //获取应有的流转