15a09fff by 杨威

更正:列表点击办理,增加二次提醒:是否确定更正该宗地\自然幢\多幢

1 parent 46e7e7fb
......@@ -12,7 +12,7 @@
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small"
>办理
>更正
</el-button
>
<el-button type="text" size="small">定位</el-button>
......@@ -116,44 +116,61 @@
},
//点击办理
handleClick(row) {
console.log(row);
let path = "";
var type;
var id = row.bsm;
let type;name;
switch (row.dylx) {
case "自然幢":
path = "/zrz";
type = "1";
this.$store.state.zrzbsm = row.glbsm;
break;
case "zd":
path = "/zd";
type = "0";
name = '宗地';
this.$store.state.zdbsm = row.glbsm
break;
case "户":
path = "h";
this.$store.state.hbsm = row.glbsm
case "zrz":
type = "1";
name = '自然幢';
this.$store.state.zrzbsm = row.glbsm;
break;
case "h":
case "h0":
case "h1":
type = "2";
name = "户"
this.$store.state.hbsm = row.glbsm;
case "dz":
type = "3";
name = "多幢";
this.$store.state.dzbsm = row.glbsm;
default:
break;
}
var data = {"id": id, "type": type};
let data = {"id": row.bsm, "type": type};
this.$confirm('是否确定更正该'+name+'?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateQsztByBsm(data)
.then((res => {
if (res.code == 200) {
this.$message({
message: res.message,
type: "success",
type: 'success',
message: '更正成功!'
});
this.$router.push("/"+path);
} else {
this.$message({
message: res.message,
type: "warning",
});
}
}))
this.$router.push(path);
})).catch(() => {
this.$message({
message: res.message,
type: "error",
});
});
}).catch(() => {
});
},
},
computed: {},
......