Commit 9b3acd48 authored by xinzhedeai's avatar xinzhedeai

矿山删除 企业删除

parent 40b72ed3
...@@ -194,14 +194,14 @@ export default { ...@@ -194,14 +194,14 @@ export default {
}, },
deleteOpencastById: (ids) => { deleteOpencastById: (ids) => {
return request({ return request({
url: 'api/enterprise', url: 'api/mine/opencast',
method: 'delete', method: 'delete',
data: ids data: ids
}) })
}, },
deleteUndergroundById: (ids) => { deleteUndergroundById: (ids) => {
return request({ return request({
url: 'api/enterprise', url: 'api/mine/underground',
method: 'delete', method: 'delete',
data: ids data: ids
}) })
......
...@@ -462,7 +462,9 @@ ...@@ -462,7 +462,9 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" round @click="beginLook(scope.row.id)">查看</el-button> <el-button size="mini" round @click="beginLook(scope.row.id)">查看</el-button>
<el-button v-if="scope.row.hasEnable" size="mini" round @click="beginEdit(scope.row.id)">编辑</el-button> <el-button v-if="scope.row.hasEnable" size="mini" round @click="beginEdit(scope.row.id)">编辑</el-button>
<el-button v-if="scope.row.hasEnable" size="mini" round @click="beginStopApply(scope.row.id)">申请停产</el-button> <el-button size="mini" round @click="beginDelete(scope.row)">删除</el-button>
<!-- <el-button v-if="scope.row.hasEnable" size="mini" round @click="beginStopApply(scope.row.id)">申请停产</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -609,6 +611,26 @@ export default { ...@@ -609,6 +611,26 @@ export default {
this.$refs['dialog1Form'].clearValidate() this.$refs['dialog1Form'].clearValidate()
}) })
}, },
beginDelete(row){
this.$confirm("确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(
() => {
mineApi.deleteOpencastById([row.id]).then((res) => {
this.$message.success("操作成功");
this.searchSubmit();
});
},
() => {
this.$message({
type: "info",
message: "已取消删除",
});
}
);
},
beginEdit(id) { beginEdit(id) {
this.beforeDialog1Open() this.beforeDialog1Open()
this.editState = 2 this.editState = 2
......
...@@ -572,7 +572,7 @@ export default { ...@@ -572,7 +572,7 @@ export default {
type: "warning", type: "warning",
}).then( }).then(
() => { () => {
mineApi.deleteOpencastById([row.id]).then((res) => { mineApi.deleteUndergroundById([row.id]).then((res) => {
this.$message.success("操作成功"); this.$message.success("操作成功");
this.searchSubmit(); this.searchSubmit();
}); });
......
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