Commit 2b1fdd08 authored by yaqizhang's avatar yaqizhang

作废按钮

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