Commit 2b1fdd08 authored by yaqizhang's avatar yaqizhang

作废按钮

parent 9eb7e2b0
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
size="normal" size="normal"
type="primary" type="primary"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleIsDel(form.planId)" @click="handleIsDel(form)"
v-hasPermi="['deviceInspection:inspectionPlan:edit']" v-hasPermi="['deviceInspection:inspectionPlan:edit']"
>作废 >作废
</el-button> </el-button>
...@@ -470,16 +470,16 @@ export default { ...@@ -470,16 +470,16 @@ export default {
}); });
}, },
/** 作废按钮操作 */ /** 作废按钮操作 */
handleIsDel(planId) { handleIsDel(row) {
// this.form.planId.isDel = "1"; row.isDel = "1";
this.$confirm('是否确认作废巡检计划名称为"' + this.form.planName + '"的数据项?', "警告", { this.$confirm('是否确认作废巡检计划名称为"' + row.planName + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function () { }).then(function () {
return updateInspectionPlan(planId); return updateInspectionPlan(row);
}).then(() => { }).then(() => {
this.getList(); this.$router.go(-1);
this.msgSuccess("已作废"); this.msgSuccess("已作废");
}).catch(() => { }).catch(() => {
}); });
......
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
size="normal" size="normal"
type="primary" type="primary"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleIsDel(form.troubleId)" @click="handleIsDel(form)"
v-hasPermi="['riskManagement:hiddenTrouble:query']" v-hasPermi="['riskManagement:hiddenTrouble:query']"
>作废 >作废
</el-button> </el-button>
...@@ -372,6 +372,7 @@ export default { ...@@ -372,6 +372,7 @@ export default {
levelOptions: [], levelOptions: [],
// 用户列表 // 用户列表
userList: [], userList: [],
loadmap: false,
props: { props: {
value: "id", value: "id",
label: "name", label: "name",
...@@ -576,6 +577,10 @@ export default { ...@@ -576,6 +577,10 @@ export default {
this.loadmap = true; this.loadmap = true;
this.dialogTableVisible = true; this.dialogTableVisible = true;
}, },
dialogcancelFun() {
this.loadmap = false;
this.dialogTableVisible = false;
},
handleChange(value) { handleChange(value) {
console.log(this.form1.device); console.log(this.form1.device);
let arr = this.form1.device; let arr = this.form1.device;
...@@ -647,16 +652,16 @@ export default { ...@@ -647,16 +652,16 @@ export default {
this.resetForm("form2"); this.resetForm("form2");
}, },
/** 作废按钮操作 */ /** 作废按钮操作 */
handleIsDel(troubleId) { handleIsDel(row) {
// this.form.troubleId.isDel = "1"; row.isDel = "1";
this.$confirm('是否确认作废隐患名称为"' + this.form.troubleName + '"的数据项?', "警告", { this.$confirm('是否确认作废隐患名称为"' + row.troubleName + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function () { }).then(function () {
return updateHiddenTrouble(troubleId); return updateHiddenTrouble(row);
}).then(() => { }).then(() => {
this.getList(); this.$router.go(-1);
this.msgSuccess("已作废"); this.msgSuccess("已作废");
}).catch(() => { }).catch(() => {
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment