Commit 9b3acd48 authored by xinzhedeai's avatar xinzhedeai

矿山删除 企业删除

parent 40b72ed3
......@@ -194,14 +194,14 @@ export default {
},
deleteOpencastById: (ids) => {
return request({
url: 'api/enterprise',
url: 'api/mine/opencast',
method: 'delete',
data: ids
})
},
deleteUndergroundById: (ids) => {
return request({
url: 'api/enterprise',
url: 'api/mine/underground',
method: 'delete',
data: ids
})
......
......@@ -462,7 +462,9 @@
<template slot-scope="scope">
<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="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>
</el-table-column>
</el-table>
......@@ -609,6 +611,26 @@ export default {
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) {
this.beforeDialog1Open()
this.editState = 2
......
......@@ -572,7 +572,7 @@ export default {
type: "warning",
}).then(
() => {
mineApi.deleteOpencastById([row.id]).then((res) => {
mineApi.deleteUndergroundById([row.id]).then((res) => {
this.$message.success("操作成功");
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