diff --git a/src/components/scOpl/scFire.vue b/src/components/scOpl/scFire.vue index 0ac17755..135864d2 100644 --- a/src/components/scOpl/scFire.vue +++ b/src/components/scOpl/scFire.vue @@ -229,7 +229,7 @@ --> - + { this.mainLoading = false this.form = res; + this.oplcateCode = res.cate_code // this.oplcateId = res.cate; // this.operationId = res.operation; // this.getOperation(); diff --git a/src/views/opm/clear.vue b/src/views/opm/clear.vue index 95317006..1bd3a417 100644 --- a/src/views/opm/clear.vue +++ b/src/views/opm/clear.vue @@ -1,880 +1,901 @@ - \ No newline at end of file + this.formworker = Object.assign({}, defaultformworker); + }, + + //删除作业人员 + delWorker(row) { + this.$API.opm.worker.delete + .req(row.id) + .then((res) => { + this.$message.success("作业人员删除成功"); + this.getworkerList() + return res; + }) + .catch((err) => { + return err; + }); + }, + //提交作业人员信息 + submitWorker() { + this.formworker.opl = this.oplId; + this.$refs.workerForm.validate(async (valid) => { + + this.$API.opm.worker.create + .req(this.formworker) + .then((res) => { + this.$message.success("创建作业人员成功"); + this.getworkerList(); + this.workerdialog = false; + }) + .catch((err) => { + return err; + }); + }); + }, + + //气体检测记录列表 + getgasList() { + this.$API.opm.gas.list.req({opl: this.oplId, page: 0}).then((res) => { + this.apigasObj = res; + console.log(res); + }); + }, + + //创建气体检测记录,显示Form + addgas() { + this.gasdialog = true; + this.formgas = Object.assign({}, defaultformgas); + }, + + //提交气体检测记录 + submitgas() { + this.formgas.opl = this.oplId; + this.$refs.gasForm.validate(async (valid) => { + + this.$API.opm.gas.create + .req(this.formgas) + .then((res) => { + this.$message.success("创建气体检测记录成功"); + this.getgasList(); + this.gasdialog = false; + + }) + .catch((err) => { + return err; + }); + + }); + }, + + //删除气体检测记录 + delgas(row) { + this.$API.opm.gas.delete + .req(row.id) + .then((res) => { + this.$message.success("气体检测记录删除成功"); + this.getgasList() + return res; + }) + .catch((err) => { + return err; + }); + }, + + //渲染工单提交按钮 + getInit() { + this.$API.wf.workflow.initkey.req('opl_clear').then((res) => { + this.initForm = res; + }); + }, + + //提交,创建工单 + submitTicketCreate(id) { + let ticket = {}; + ticket.workflow = this.initForm.workflow; + ticket.ticket_data = {opl: this.oplId}; + ticket.transition = id; + ticket.title = this.form.name + '-申请'; + this.tLoading = true + this.$API.wf.ticket.create.req(ticket).then((res) => { + this.tLoading = false + this.$message.success("提交成功"); + this.submitOut() + }).catch(e=>{this.tLoading=false}); + }, + + //退出界面 + submitOut() { + this.$router.push({ + name: "opl", + query: { + id: this.operationId,//作业ID + + }, + }); + } + }, + }; + diff --git a/src/views/opm/cooler.vue b/src/views/opm/cooler.vue index 2c12ba2b..58ac26f3 100644 --- a/src/views/opm/cooler.vue +++ b/src/views/opm/cooler.vue @@ -1,580 +1,887 @@ - \ No newline at end of file + this.formworker = Object.assign({}, defaultformworker); + }, + + //删除作业人员 + delWorker(row) { + this.$API.opm.worker.delete + .req(row.id) + .then((res) => { + this.$message.success("作业人员删除成功"); + this.getworkerList() + return res; + }) + .catch((err) => { + return err; + }); + }, + //提交作业人员信息 + submitWorker() { + this.formworker.opl = this.oplId; + this.$refs.workerForm.validate(async (valid) => { + + this.$API.opm.worker.create + .req(this.formworker) + .then((res) => { + this.$message.success("创建作业人员成功"); + this.getworkerList(); + this.workerdialog = false; + }) + .catch((err) => { + return err; + }); + }); + }, + + //气体检测记录列表 + getgasList() { + this.$API.opm.gas.list.req({opl: this.oplId, page: 0}).then((res) => { + this.apigasObj = res; + console.log(res); + }); + }, + + //创建气体检测记录,显示Form + addgas() { + this.gasdialog = true; + this.formgas = Object.assign({}, defaultformgas); + }, + + //提交气体检测记录 + submitgas() { + this.formgas.opl = this.oplId; + this.$refs.gasForm.validate(async (valid) => { + + this.$API.opm.gas.create + .req(this.formgas) + .then((res) => { + this.$message.success("创建气体检测记录成功"); + this.getgasList(); + this.gasdialog = false; + + }) + .catch((err) => { + return err; + }); + + }); + }, + + //删除气体检测记录 + delgas(row) { + this.$API.opm.gas.delete + .req(row.id) + .then((res) => { + this.$message.success("气体检测记录删除成功"); + this.getgasList() + return res; + }) + .catch((err) => { + return err; + }); + }, + + //渲染工单提交按钮 + getInit() { + this.$API.wf.workflow.initkey.req('opl_cooler').then((res) => { + this.initForm = res; + }); + }, + + //提交,创建工单 + submitTicketCreate(id) { + let ticket = {}; + ticket.workflow = this.initForm.workflow; + ticket.ticket_data = {opl: this.oplId}; + ticket.transition = id; + ticket.title = this.form.name + '-申请'; + this.tLoading = true + this.$API.wf.ticket.create.req(ticket).then((res) => { + this.tLoading = false + this.$message.success("提交成功"); + this.submitOut() + }).catch(e=>{this.tLoading=false}); + }, + + //退出界面 + submitOut() { + this.$router.push({ + name: "opl", + query: { + id: this.operationId,//作业ID + + }, + }); + } + }, + }; + diff --git a/src/views/opm/fire.vue b/src/views/opm/fire.vue index 73239169..a2970eb3 100644 --- a/src/views/opm/fire.vue +++ b/src/views/opm/fire.vue @@ -25,7 +25,7 @@ :model="form" :rules="rules" label-width="110px" - style="margin: 40px 40px 40px 40px" + style="margin: 40px 40px 0px 40px" > @@ -47,7 +47,7 @@ - + - + - + - - + + - + - + - + - + - - - - +
+ 下一步 - - - - +
@@ -205,7 +201,7 @@ hidePagination stripe hideDo - style="height: 200px;" + style="height: 300px;" > -
- + 取 消 确 定 - +
上一步 { this.form = res; - + this.oplId = res.id; this.oplcateId = res.cate; this.operationId = res.operation; this.getOperation(); @@ -686,9 +705,11 @@ }, //组件点击下一步 handleNextStep() { + if (this.active == 0) { - // console.log(this.oplId); - //如果是创建许可证书 + this.$refs.dialogForm.validate((valid) => { + if (valid) { + //如果是创建许可证书 if (this.oplId == "") { //基本信息提交 debugger; @@ -704,8 +725,8 @@ this.active = 1; this.oplId = res.id; - this.getworkerList(res.id); - this.getgasList(res.id); + this.getworkerList(); + this.getgasList(); return res; }) .catch((err) => { @@ -717,14 +738,22 @@ this.$message.success("基本修改成功!"); this.issave = true; this.active = 1; - this.getgasList(this.oplId); - this.getworkerList(this.oplId); + this.getgasList(); + this.getworkerList(); }); } else { this.active = 1; } + } + }) } else { + if (this.active==1){ + if(this.apiworkerObj.length==0){ + this.$message.warning("请添加作业人员"); + return + } + } this.active = 2; } @@ -742,8 +771,8 @@ }, //作业人员列表 - getworkerList(id) { - this.$API.opm.worker.list.req({opl: id, page: 0}).then((res) => { + getworkerList() { + this.$API.opm.worker.list.req({opl: this.oplId, page: 0}).then((res) => { this.apiworkerObj = res; console.log(res); }); @@ -761,7 +790,7 @@ .req(row.id) .then((res) => { this.$message.success("作业人员删除成功"); - this.$refs.workerTable.refresh(); + this.getworkerList() return res; }) .catch((err) => { @@ -777,7 +806,7 @@ .req(this.formworker) .then((res) => { this.$message.success("创建作业人员成功"); - this.getworkerList(this.oplId); + this.getworkerList(); this.workerdialog = false; }) .catch((err) => { @@ -787,8 +816,8 @@ }, //气体检测记录列表 - getgasList(id) { - this.$API.opm.gas.list.req({opl: id, page: 0}).then((res) => { + getgasList() { + this.$API.opm.gas.list.req({opl: this.oplId, page: 0}).then((res) => { this.apigasObj = res; console.log(res); }); @@ -809,7 +838,7 @@ .req(this.formgas) .then((res) => { this.$message.success("创建气体检测记录成功"); - this.getgasList(this.oplId); + this.getgasList(); this.gasdialog = false; }) @@ -826,7 +855,7 @@ .req(row.id) .then((res) => { this.$message.success("气体检测记录删除成功"); - this.$refs.gasTable.refresh(); + this.getgasList() return res; }) .catch((err) => { diff --git a/src/views/opm/high.vue b/src/views/opm/high.vue index dfc60659..96fd0f69 100644 --- a/src/views/opm/high.vue +++ b/src/views/opm/high.vue @@ -1,670 +1,721 @@ - \ No newline at end of file + //删除作业人员 + delWorker(row) { + this.$API.opm.worker.delete + .req(row.id) + .then((res) => { + this.$message.success("作业人员删除成功"); + this.getworkerList() + return res; + }) + .catch((err) => { + return err; + }); + }, + //提交作业人员信息 + submitWorker() { + this.formworker.opl = this.oplId; + this.$refs.workerForm.validate(async (valid) => { + + this.$API.opm.worker.create + .req(this.formworker) + .then((res) => { + this.$message.success("创建作业人员成功"); + this.getworkerList(); + this.workerdialog = false; + }) + .catch((err) => { + return err; + }); + }); + }, + + //气体检测记录列表 + getgasList() { + this.$API.opm.gas.list.req({opl: this.oplId, page: 0}).then((res) => { + this.apigasObj = res; + console.log(res); + }); + }, + + //创建气体检测记录,显示Form + addgas() { + this.gasdialog = true; + this.formgas = Object.assign({}, defaultformgas); + }, + + //提交气体检测记录 + submitgas() { + this.formgas.opl = this.oplId; + this.$refs.gasForm.validate(async (valid) => { + + this.$API.opm.gas.create + .req(this.formgas) + .then((res) => { + this.$message.success("创建气体检测记录成功"); + this.getgasList(); + this.gasdialog = false; + + }) + .catch((err) => { + return err; + }); + + }); + }, + + //删除气体检测记录 + delgas(row) { + this.$API.opm.gas.delete + .req(row.id) + .then((res) => { + this.$message.success("气体检测记录删除成功"); + this.getgasList() + return res; + }) + .catch((err) => { + return err; + }); + }, + + //渲染工单提交按钮 + getInit() { + this.$API.wf.workflow.initkey.req('opl_high').then((res) => { + this.initForm = res; + }); + }, + + //提交,创建工单 + submitTicketCreate(id) { + if(this.apiworkerObj.length==0){ + this.$message.warning("请添加作业人员"); + return + } + let ticket = {}; + ticket.workflow = this.initForm.workflow; + ticket.ticket_data = {opl: this.oplId}; + ticket.transition = id; + ticket.title = this.form.name + '-申请'; + this.tLoading = true + this.$API.wf.ticket.create.req(ticket).then((res) => { + this.tLoading = false + this.$message.success("提交成功"); + this.submitOut() + }).catch(e=>{this.tLoading=false}); + }, + + //退出界面 + submitOut() { + this.$router.push({ + name: "opl", + query: { + id: this.operationId,//作业ID + + }, + }); + } + }, + }; + diff --git a/src/views/opm/hoisting.vue b/src/views/opm/hoisting.vue index 8feed46d..567fa6d4 100644 --- a/src/views/opm/hoisting.vue +++ b/src/views/opm/hoisting.vue @@ -1,669 +1,720 @@ - \ No newline at end of file + //删除作业人员 + delWorker(row) { + this.$API.opm.worker.delete + .req(row.id) + .then((res) => { + this.$message.success("作业人员删除成功"); + this.getworkerList() + return res; + }) + .catch((err) => { + return err; + }); + }, + //提交作业人员信息 + submitWorker() { + this.formworker.opl = this.oplId; + this.$refs.workerForm.validate(async (valid) => { + + this.$API.opm.worker.create + .req(this.formworker) + .then((res) => { + this.$message.success("创建作业人员成功"); + this.getworkerList(); + this.workerdialog = false; + }) + .catch((err) => { + return err; + }); + }); + }, + + //气体检测记录列表 + getgasList() { + this.$API.opm.gas.list.req({opl: this.oplId, page: 0}).then((res) => { + this.apigasObj = res; + console.log(res); + }); + }, + + //创建气体检测记录,显示Form + addgas() { + this.gasdialog = true; + this.formgas = Object.assign({}, defaultformgas); + }, + + //提交气体检测记录 + submitgas() { + this.formgas.opl = this.oplId; + this.$refs.gasForm.validate(async (valid) => { + + this.$API.opm.gas.create + .req(this.formgas) + .then((res) => { + this.$message.success("创建气体检测记录成功"); + this.getgasList(); + this.gasdialog = false; + + }) + .catch((err) => { + return err; + }); + + }); + }, + + //删除气体检测记录 + delgas(row) { + this.$API.opm.gas.delete + .req(row.id) + .then((res) => { + this.$message.success("气体检测记录删除成功"); + this.getgasList() + return res; + }) + .catch((err) => { + return err; + }); + }, + + //渲染工单提交按钮 + getInit() { + this.$API.wf.workflow.initkey.req('opl_hoisting').then((res) => { + this.initForm = res; + }); + }, + + //提交,创建工单 + submitTicketCreate(id) { + if(this.apiworkerObj.length==0){ + this.$message.warning("请添加作业人员"); + return + } + let ticket = {}; + ticket.workflow = this.initForm.workflow; + ticket.ticket_data = {opl: this.oplId}; + ticket.transition = id; + ticket.title = this.form.name + '-申请'; + this.tLoading = true + this.$API.wf.ticket.create.req(ticket).then((res) => { + this.tLoading = false + this.$message.success("提交成功"); + this.submitOut() + }).catch(e=>{this.tLoading=false}); + }, + + //退出界面 + submitOut() { + this.$router.push({ + name: "opl", + query: { + id: this.operationId,//作业ID + + }, + }); + } + }, + }; + diff --git a/src/views/opm/opl.vue b/src/views/opm/opl.vue index 4d7c3d4b..f3bd315e 100644 --- a/src/views/opm/opl.vue +++ b/src/views/opm/opl.vue @@ -22,17 +22,17 @@ {{ - operationObj.dept_ter_.name + operationObj.dept_ter_.name }} {{ - operationObj.dept_bus_.name + operationObj.dept_bus_.name }} {{ - operationObj.coordinator_.name + operationObj.coordinator_.name }} @@ -40,91 +40,50 @@
- + {{ item.name }}
- + - + -
- + @@ -159,14 +118,14 @@ export default { 40: "进行中", 50: "已完成", }, - act_states: { - 0: "草稿中", - 1: "进行中", - 2: "被退回", - 3: "被撤回", - 4: "已完成", - 5: "已关闭", - }, + act_states: { + 0: "草稿中", + 1: "进行中", + 2: "被退回", + 3: "被撤回", + 4: "已完成", + 5: "已关闭", + }, }; }, @@ -206,181 +165,30 @@ export default { }, //点击作业类型,创建作业许可证添加 - addFire(id, name) { - switch (name) { - case "动火": - this.$router.push({ - name: "fire", - query: { - operationid: this.$route.query.id, //作业ID - oplcateId: id, //许可证类型ID - oplId: "", //许可证ID - }, - }); - break; - case "有限空间": - this.$router.push({ - name: "space", - query: { - operationid: this.$route.query.id, //作业ID - oplcateId: id, //许可证类型ID - oplId: "", //许可证ID - }, - }); - break; - case "清库": - this.$router.push({ - name: "clear", - query: { - operationid: this.$route.query.id, //作业ID - oplcateId: id, //许可证类型ID - oplId: "", //许可证ID - }, - }); - break; - case "高处": - this.$router.push({ - name: "high", - query: { - operationid: this.$route.query.id, //作业ID - oplcateId: id, //许可证类型ID - oplId: "", //许可证ID - }, - }); - break; - case "吊装": - this.$router.push({ - name: "hoisting", - query: { - operationid: this.$route.query.id, //作业ID - oplcateId: id, //许可证类型ID - oplId: "", //许可证ID - }, - }); - break; - case "预热器清堵": - this.$router.push({ - name: "preheat", - query: { - operationid: this.$route.query.id, //作业ID - oplcateId: id, //许可证类型ID - oplId: "", //许可证ID - }, - }); - break; - case "篦冷机清大块": - this.$router.push({ - name: "cooler", - query: { - operationid: this.$route.query.id, //作业ID - oplcateId: id, //许可证类型ID - oplId: "", //许可证ID - }, - }); - break; - case "动土": - this.$router.push({ - name: "soil", - query: { - operationid: this.$route.query.id, //作业ID - oplcateId: id, //许可证类型ID - oplId: "", //许可证ID - }, - }); - break; - case "临时用电": - this.$router.push({ - name: "usecl", - query: { - operationid: this.$route.query.id, //作业ID - oplcateId: id, //许可证类型ID - oplId: "", //许可证ID - }, - }); - break; - } + addOpl(id, code) { + this.$router.push({ + name: code, + query: { + operationid: this.$route.query.id, //作业ID + oplcateId: id, //许可证类型ID + oplId: "", //许可证ID + }, + }); }, //编辑 table_edit(row) { - switch (row.cate_name) { - case "动火": - this.$router.push({ - name: "fire", - query: { - oplId: row.id, //许可证ID - }, - }); - break; - case "有限空间": - this.$router.push({ - name: "space", - query: { - oplId: row.id, //许可证ID - }, - }); - break; - case "清库": - this.$router.push({ - name: "clear", - query: { - oplId: row.id, //许可证ID - }, - }); - break; - case "高处": - this.$router.push({ - name: "high", - query: { - oplId: row.id, //许可证ID - }, - }); - break; - case "吊装": - this.$router.push({ - name: "hoisting", - query: { - oplId: row.id, //许可证ID - }, - }); - break; - case "预热器清堵": - this.$router.push({ - name: "preheat", - query: { - oplId: row.id, //许可证ID - }, - }); - break; - case "篦冷机清大块": - this.$router.push({ - name: "cooler", - query: { - oplId: row.id, //许可证ID - }, - }); - break; - case "动土": - this.$router.push({ - name: "soil", - query: { - oplId: row.id, //许可证ID - }, - }); - break; - case "临时用电": - this.$router.push({ - name: "usecl", - query: { - oplId: row.id, //许可证ID - }, - }); - break; - } + this.$router.push({ + name: row.cate_code, + query: { + oplId: row.id, //许可证ID + }, + }); }, //查看 table_show(row) { this.showLimited = true; this.oplId = row.id; + this.oplCode = row.cate_code; this.oplName = row.cate_name; this.workId = row.workers[0]; }, @@ -417,7 +225,7 @@ export default { loading.close(); this.$message.success("操作成功"); }) - .catch(() => {}); + .catch(() => { }); }, //表格选择后回调事件 selectionChange(selection) { @@ -434,7 +242,7 @@ export default { }, 500); }, //搜索 - handleQuery() {}, + handleQuery() { }, //根据ID获取树结构 filterTree(id) { var target = null; diff --git a/src/views/opm/preheat.vue b/src/views/opm/preheat.vue index 460b59fd..bdcd26eb 100644 --- a/src/views/opm/preheat.vue +++ b/src/views/opm/preheat.vue @@ -1,604 +1,723 @@ - \ No newline at end of file + this.$API.opm.gas.create + .req(this.formgas) + .then((res) => { + this.$message.success("创建气体检测记录成功"); + this.getgasList(); + this.gasdialog = false; + + }) + .catch((err) => { + return err; + }); + + }); + }, + + //删除气体检测记录 + delgas(row) { + this.$API.opm.gas.delete + .req(row.id) + .then((res) => { + this.$message.success("气体检测记录删除成功"); + this.getgasList() + return res; + }) + .catch((err) => { + return err; + }); + }, + + //渲染工单提交按钮 + getInit() { + this.$API.wf.workflow.initkey.req('opl_preheat').then((res) => { + this.initForm = res; + }); + }, + + //提交,创建工单 + submitTicketCreate(id) { + if(this.apiworkerObj.length==0){ + this.$message.warning("请添加作业人员"); + return + } + let ticket = {}; + ticket.workflow = this.initForm.workflow; + ticket.ticket_data = {opl: this.oplId}; + ticket.transition = id; + ticket.title = this.form.name + '-申请'; + this.tLoading = true + this.$API.wf.ticket.create.req(ticket).then((res) => { + this.tLoading = false + this.$message.success("提交成功"); + this.submitOut() + }).catch(e=>{this.tLoading=false}); + }, + + //退出界面 + submitOut() { + this.$router.push({ + name: "opl", + query: { + id: this.operationId,//作业ID + + }, + }); + } + }, + }; + diff --git a/src/views/opm/soil.vue b/src/views/opm/soil.vue index c3e721fc..8e27bad2 100644 --- a/src/views/opm/soil.vue +++ b/src/views/opm/soil.vue @@ -1,616 +1,721 @@ - \ No newline at end of file + //删除作业人员 + delWorker(row) { + this.$API.opm.worker.delete + .req(row.id) + .then((res) => { + this.$message.success("作业人员删除成功"); + this.getworkerList() + return res; + }) + .catch((err) => { + return err; + }); + }, + //提交作业人员信息 + submitWorker() { + this.formworker.opl = this.oplId; + this.$refs.workerForm.validate(async (valid) => { + + this.$API.opm.worker.create + .req(this.formworker) + .then((res) => { + this.$message.success("创建作业人员成功"); + this.getworkerList(); + this.workerdialog = false; + }) + .catch((err) => { + return err; + }); + }); + }, + + //气体检测记录列表 + getgasList() { + this.$API.opm.gas.list.req({opl: this.oplId, page: 0}).then((res) => { + this.apigasObj = res; + console.log(res); + }); + }, + + //创建气体检测记录,显示Form + addgas() { + this.gasdialog = true; + this.formgas = Object.assign({}, defaultformgas); + }, + + //提交气体检测记录 + submitgas() { + this.formgas.opl = this.oplId; + this.$refs.gasForm.validate(async (valid) => { + + this.$API.opm.gas.create + .req(this.formgas) + .then((res) => { + this.$message.success("创建气体检测记录成功"); + this.getgasList(); + this.gasdialog = false; + + }) + .catch((err) => { + return err; + }); + + }); + }, + + //删除气体检测记录 + delgas(row) { + this.$API.opm.gas.delete + .req(row.id) + .then((res) => { + this.$message.success("气体检测记录删除成功"); + this.getgasList() + return res; + }) + .catch((err) => { + return err; + }); + }, + + //渲染工单提交按钮 + getInit() { + this.$API.wf.workflow.initkey.req('opl_soil').then((res) => { + this.initForm = res; + }); + }, + + //提交,创建工单 + submitTicketCreate(id) { + if(this.apiworkerObj.length==0){ + this.$message.warning("请添加作业人员"); + return + } + let ticket = {}; + ticket.workflow = this.initForm.workflow; + ticket.ticket_data = {opl: this.oplId}; + ticket.transition = id; + ticket.title = this.form.name + '-申请'; + this.tLoading = true + this.$API.wf.ticket.create.req(ticket).then((res) => { + this.tLoading = false + this.$message.success("提交成功"); + this.submitOut() + }).catch(e=>{this.tLoading=false}); + }, + + //退出界面 + submitOut() { + this.$router.push({ + name: "opl", + query: { + id: this.operationId,//作业ID + + }, + }); + } + }, + }; + diff --git a/src/views/opm/space.vue b/src/views/opm/space.vue index f40115c7..270b4f5b 100644 --- a/src/views/opm/space.vue +++ b/src/views/opm/space.vue @@ -1,555 +1,488 @@ - \ No newline at end of file + //退出界面 + submitOut() { + this.$router.push({ + name: "opl", + query: { + id: this.operationId,//作业ID + + }, + }); + } + }, + }; + diff --git a/src/views/opm/usecl.vue b/src/views/opm/usecl.vue index 9b91253e..fc7fded6 100644 --- a/src/views/opm/usecl.vue +++ b/src/views/opm/usecl.vue @@ -25,13 +25,13 @@ :model="form" :rules="rules" label-width="110px" - style="margin: 40px 40px 40px 40px" + style="margin: 40px 40px 0px 40px" > @@ -47,7 +47,7 @@ - + - + - + - + - + - - - - - - - @@ -272,16 +260,12 @@ !--> - - - - 下一步 - - - +
+ 下一步 + +
@@ -340,7 +324,7 @@ - + 取 消
确 定 - - 上一步 - 退出 + +
+ 上一步 + {{item.name}} + + 退出 + +
@@ -441,7 +435,7 @@ import { genTree } from "@/utils/verificate"; const defaultformworker = { id: "", worker: null, - duty: null, + duty: "作业人员", certificates: [], opl: "", }; @@ -473,7 +467,7 @@ export default { cate: "", risks_checked: [], }, - + initForm: {}, operationId: "", oplcateId: "", oplId: "", @@ -507,6 +501,32 @@ export default { true: "正常", false: "不正常", }, + rules: { + start_time: [ + {required: true, message: '请选择'} + ], + end_time: [ + {required: true, message: '请选择'} + ], + level: [ + {required: true, message: '请选择'} + ], + dept_do: [ + {required: true, message: '请选择'} + ], + charger: [ + {required: true, message: '请选择'} + ], + monitor: [ + {required: true, message: '请选择'} + ], + risks_checked: [ + {required: true, message: '请选择'} + ], + measures_checked: [ + {required: true, message: '请选择'} + ], + } }; }, mounted() { @@ -514,9 +534,8 @@ export default { this.oplcateId = this.$route.query.oplcateId; //作业许可证种类ID this.oplId = this.$route.query.oplId; //许可证ID this.getoplData(); - + this.getInit(); this.getDept(); - this.getUser(); }, methods: { @@ -685,7 +704,27 @@ export default { }); }, - + //渲染工单提交按钮 + getInit() { + this.$API.wf.workflow.initkey.req('opl_usecl').then((res) => { + this.initForm = res; + }); + }, + + //提交,创建工单 + submitTicketCreate(id) { + let ticket = {}; + ticket.workflow = this.initForm.workflow; + ticket.ticket_data = {opl: this.oplId}; + ticket.transition = id; + ticket.title = this.form.name + '-申请'; + this.tLoading = true + this.$API.wf.ticket.create.req(ticket).then((res) => { + this.tLoading = false + this.$message.success("提交成功"); + this.submitOut() + }).catch(e=>{this.tLoading=false}); + }, //退出界面 submitOut(){ this.$router.push({