Commit 3c22383d authored by Kimber's avatar Kimber
parents cffce88f 9b3acd48
import request from '@/utils/request' import request from '@/utils/request'
export default { export default {
deleteById: (ids) => {
return request({
url: 'api/enterprise',
method: 'delete',
data: ids
})
},
// 审核状态 // 审核状态
auditStates: () => { auditStates: () => {
return [{ return [{
......
...@@ -191,6 +191,22 @@ export default { ...@@ -191,6 +191,22 @@ export default {
method: 'get', method: 'get',
params: mineSearchParam params: mineSearchParam
}) })
} },
deleteOpencastById: (ids) => {
return request({
url: 'api/mine/opencast',
method: 'delete',
data: ids
})
},
deleteUndergroundById: (ids) => {
return request({
url: 'api/mine/underground',
method: 'delete',
data: ids
})
},
} }
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="folderModal = false">取消</el-button> <el-button @click="folderModal = false">取消</el-button>
<el-button type="primary" @click="confirmFolder" :loading="modalBtnLoad">确定</el-button> <el-button type="primary" @click="confirmFolder" :loading="modalBtnLoad"
>确定</el-button
>
</div> </div>
</el-dialog> </el-dialog>
<!-- 上传文件窗口 --> <!-- 上传文件窗口 -->
...@@ -83,7 +85,12 @@ ...@@ -83,7 +85,12 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="fileUploadModal = false">取消</el-button> <el-button @click="fileUploadModal = false">取消</el-button>
<el-button type="primary" @click="confirmUploadFile">确定</el-button> <el-button
type="primary"
@click="confirmUploadFile"
:loading="modalBtnLoad"
>确定</el-button
>
</div> </div>
</el-dialog> </el-dialog>
<el-row :gutter="15"> <el-row :gutter="15">
...@@ -91,6 +98,7 @@ ...@@ -91,6 +98,7 @@
<el-card class="box-card" shadow="never"> <el-card class="box-card" shadow="never">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-button <el-button
v-show="selectedFolderInfo.deleteWhether"
size="mini" size="mini"
style="float: right; margin-left: 6px" style="float: right; margin-left: 6px"
type="danger" type="danger"
...@@ -99,6 +107,7 @@ ...@@ -99,6 +107,7 @@
删除</el-button 删除</el-button
> >
<el-button <el-button
v-show="selectedFolderInfo.editWhether"
size="mini" size="mini"
style="float: right" style="float: right"
type="primary" type="primary"
...@@ -121,9 +130,9 @@ ...@@ -121,9 +130,9 @@
:props="defaultProps" :props="defaultProps"
check-strictly check-strictly
accordion accordion
show-checkbox show-checkbox1
node-key="id" node-key="id"
@check="menuChange" check="menuCheck"
@node-click="menuClick" @node-click="menuClick"
/> />
</el-card> </el-card>
...@@ -134,30 +143,32 @@ ...@@ -134,30 +143,32 @@
<el-card class="box-card" shadow="never"> <el-card class="box-card" shadow="never">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-button <el-button
v-show="selectedFolderInfo.uploadWhether"
type="primary" type="primary"
size="mini" size="mini"
@click="fileUploadModal = true" @click="fileUploadModal = true"
>上传文件</el-button >上传文件</el-button
> >
<el-input <el-input
v-model="query.type" v-model="query.originallyName"
size="small" size="small"
clearable clearable
placeholder="查询文件分类" placeholder="查询文件名称"
style="width: 200px" style="width: 200px"
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery"
/> />
<date-range-picker v-model="query.time" class="date-item" /> <date-range-picker v-model="query.time" type="datetimerange" class="date-item" />
<el-input <el-input
v-model="query.name" v-model="query.classification"
size="small" size="small"
clearable clearable
placeholder="查询文件名称" placeholder="查询文件分类"
style="width: 200px" style="width: 200px"
class="filter-item" class="filter-item"
/> />
<el-button type="primary" size="mini" @click="search">查询</el-button> <el-button type="primary" size="mini" @click="search"
>查询</el-button
>
</div> </div>
<el-table ref="table" style="width: 100%" :data="fileDataList"> <el-table ref="table" style="width: 100%" :data="fileDataList">
<el-table-column type="" width="55" /> <el-table-column type="" width="55" />
...@@ -167,16 +178,18 @@ ...@@ -167,16 +178,18 @@
prop="classification" prop="classification"
width="100" width="100"
/> />
<el-table-column width="200px" prop="time" label="录入时间" /> <el-table-column width="200px" prop="createTime" label="录入时间" />
<el-table-column label="操作" width="230px" align="center"> <el-table-column label="操作" width="230px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="success" v-show="scope.row.downloadWhether"
type="primary"
size="mini" size="mini"
@click="downFileById(scope.row)" @click="downFileById(scope.row)"
>下载</el-button >下载</el-button
> >
<el-button <el-button
v-show="scope.row.deleteWhether"
type="danger" type="danger"
size="mini" size="mini"
@click="delFileById(scope.row)" @click="delFileById(scope.row)"
...@@ -205,7 +218,7 @@ ...@@ -205,7 +218,7 @@
import edocApi from "@/api/kd/edoc"; import edocApi from "@/api/kd/edoc";
import DateRangePicker from "@/components/DateRangePicker"; import DateRangePicker from "@/components/DateRangePicker";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import axios from 'axios' import axios from "axios";
export default { export default {
name: "Folder", name: "Folder",
...@@ -215,10 +228,10 @@ export default { ...@@ -215,10 +228,10 @@ export default {
data() { data() {
return { return {
modalBtnLoad: false, modalBtnLoad: false,
query:{ query: {
originallyName: '', originallyName: "",
type:'', classification: "",
time: '' time: "",
}, },
folderModal: false, folderModal: false,
folderForm: { folderForm: {
...@@ -228,9 +241,9 @@ export default { ...@@ -228,9 +241,9 @@ export default {
fileType: "", fileType: "",
fileUploadModal: false, fileUploadModal: false,
uploadedFiles: [], uploadedFiles: [],
currentFolderId: "", selectedFolderId: "",
currentCheckedFolderId: "", selectedFolderId: "",
currentCheckedFolderInfo: {}, selectedFolderInfo: {},
fileDataList: [], fileDataList: [],
totalElement: 0, totalElement: 0,
page: 0, page: 0,
...@@ -253,10 +266,18 @@ export default { ...@@ -253,10 +266,18 @@ export default {
mounted() { mounted() {
this.getDataList(); // 获取所有文件夹 this.getDataList(); // 获取所有文件夹
}, },
created() { created() {},
},
methods: { methods: {
// searchParamReset() {
// this.searchParam = {
// originallyName: "",
// classification: "",
// time: "",
// }
// this.page = 0
// this.size = 10
// this.getfileByFolderId()
// },
// 当前页的条数变化 // 当前页的条数变化
handleSizeChange(val) { handleSizeChange(val) {
this.size = val; this.size = val;
...@@ -275,48 +296,50 @@ export default { ...@@ -275,48 +296,50 @@ export default {
confirmFolder() { confirmFolder() {
this.$refs["folderForm"].validate((valid) => { this.$refs["folderForm"].validate((valid) => {
if (valid) { if (valid) {
if(this.modalBtnLoad){ if (this.modalBtnLoad) {
return return;
} }
this.modalBtnLoad = true this.modalBtnLoad = true;
if(this.folderForm.id){ // 修改 if (this.folderForm.id) {
// 修改
edocApi edocApi
.updateFolder({ .updateFolder({
...this.folderForm, ...this.folderForm,
}) })
.then((res) => { .then((res) => {
this.folderModal = false this.folderModal = false;
this.$message.success("操作成功"); this.$message.success("操作成功");
this.getDataList(); this.getDataList();
}); });
}else{// 新增 } else {
// 新增
edocApi edocApi
.addFolder({ .addFolder({
...this.folderForm, ...this.folderForm,
pid: this.currentCheckedFolderId, pid: this.selectedFolderId,
}) })
.then((res) => { .then((res) => {
this.folderModal = false this.folderModal = false;
this.$message.success("操作成功"); this.$message.success("操作成功");
this.getDataList(); this.getDataList();
}); });
} }
this.modalBtnLoad = false this.modalBtnLoad = false;
} }
}); });
}, },
addFolder() { addFolder() {
// if (!this.currentCheckedFolderId) { // if (!this.selectedFolderId) {
// this.$message.warning("请勾选文件夹"); // this.$message.warning("请选择文件夹");
// return; // return;
// } // }
this.folderModal = true; this.folderModal = true;
this.folderForm = { name: "", order: "" }; this.folderForm = { name: "", order: "" };
}, },
delFolder() { delFolder() {
if (!this.currentCheckedFolderId) { if (!this.selectedFolderId) {
this.$message.warning("勾选要操作的文件夹"); this.$message.warning("选择要操作的文件夹");
return; return;
} }
this.$confirm("确定要删除吗?", "提示", { this.$confirm("确定要删除吗?", "提示", {
...@@ -325,7 +348,7 @@ export default { ...@@ -325,7 +348,7 @@ export default {
type: "warning", type: "warning",
}).then( }).then(
() => { () => {
edocApi.delFolder([this.currentCheckedFolderId]).then((res) => { edocApi.delFolder([this.selectedFolderId]).then((res) => {
this.$message.success("操作成功"); this.$message.success("操作成功");
this.getDataList(); this.getDataList();
}); });
...@@ -339,29 +362,34 @@ export default { ...@@ -339,29 +362,34 @@ export default {
); );
}, },
downFileById(row) { downFileById(row) {
if(this.isExportLoading){ if (this.isExportLoading) {
return return;
} }
this.isExportLoading = true; this.isExportLoading = true;
// 导出信息 // 导出信息
axios.defaults.headers.common["Authorization"] = getToken(); axios.defaults.headers.common["Authorization"] = getToken();
const apiUrl = (process.env.VUE_APP_LOCAL_API + "/api/document/download").replaceAll("'", "") const apiUrl = (
axios.interceptors.response.use(function (response) { process.env.VUE_APP_LOCAL_API + "/api/document/download"
// 对响应数据做点什么 ).replaceAll("'", "");
console.log("响应头",response); axios.interceptors.response.use(
function (response) {
return response; // 对响应数据做点什么
}, function (error) { console.log("响应头", response);
// 对响应错误做点什么
return Promise.reject(error); return response;
}); },
function (error) {
// 对响应错误做点什么
return Promise.reject(error);
}
);
axios({ axios({
url: apiUrl, url: apiUrl,
responseType: "blob", responseType: "blob",
method: "get", method: "get",
params: { id: row.id}, params: { id: row.id },
}).then((res) => { }).then((res) => {
console.log("export",res.headers["content-disposition"]); console.log("export", res.headers["content-disposition"]);
let data = res.data; let data = res.data;
let url = URL.createObjectURL(data); let url = URL.createObjectURL(data);
let dis = res.headers["content-disposition"]; let dis = res.headers["content-disposition"];
...@@ -389,7 +417,7 @@ export default { ...@@ -389,7 +417,7 @@ export default {
() => { () => {
edocApi.delFileById([row.id]).then((res) => { edocApi.delFileById([row.id]).then((res) => {
this.$message.success("操作成功"); this.$message.success("操作成功");
this.getfileByFolderId(this.currentFolderId); this.getfileByFolderId(this.selectedFolderId);
}); });
}, },
() => { () => {
...@@ -401,26 +429,26 @@ export default { ...@@ -401,26 +429,26 @@ export default {
); );
}, },
updateFolder() { updateFolder() {
if (!this.currentCheckedFolderId) { if (!this.selectedFolderId) {
this.$message.warning("勾选文件夹"); this.$message.warning("选择文件夹");
return; return;
} }
this.folderModal = true; this.folderModal = true;
this.folderForm.name = this.currentCheckedFolderInfo.name this.folderForm.name = this.selectedFolderInfo.name;
this.folderForm.order = this.currentCheckedFolderInfo.order this.folderForm.order = this.selectedFolderInfo.order;
this.folderForm.id = this.currentCheckedFolderInfo.id this.folderForm.id = this.selectedFolderInfo.id;
}, },
search(){ search() {
this.getfileByFolderId() this.getfileByFolderId();
}, },
getfileByFolderId() { getfileByFolderId() {
edocApi edocApi
.getfileByFolderId({ .getfileByFolderId({
catalogueId: this.currentFolderId, catalogueId: this.selectedFolderId,
page: this.page, page: this.page,
size: this.size, size: this.size,
...this.query, ...this.query,
time: this.query.time ? this.query.time.join(',') : '' time: this.query.time ? this.query.time.join(",") : "",
}) })
.then((res) => { .then((res) => {
this.fileDataList = res.body.results; this.fileDataList = res.body.results;
...@@ -428,7 +456,7 @@ export default { ...@@ -428,7 +456,7 @@ export default {
}); });
}, },
confirmUploadFile() { confirmUploadFile() {
if (!this.currentFolderId) { if (!this.selectedFolderId) {
this.$message.warning("请选择文件夹"); this.$message.warning("请选择文件夹");
return; return;
} }
...@@ -436,10 +464,14 @@ export default { ...@@ -436,10 +464,14 @@ export default {
this.$message.warning("请上传文件"); this.$message.warning("请上传文件");
return; return;
} }
if (this.modalBtnLoad) {
return;
}
this.modalBtnLoad = true;
const formData = new FormData(); const formData = new FormData();
// console.log(this.formInfo.hdstatus1, "haStatus"); // console.log(this.formInfo.hdstatus1, "haStatus");
formData.append("fileList", this.uploadedFiles[0]); formData.append("fileList", this.uploadedFiles[0]);
formData.append("catalogueId", this.currentFolderId); formData.append("catalogueId", this.selectedFolderId);
formData.append("classification", this.fileType); formData.append("classification", this.fileType);
edocApi.addFileByFolderId(formData).then((res) => { edocApi.addFileByFolderId(formData).then((res) => {
...@@ -447,6 +479,7 @@ export default { ...@@ -447,6 +479,7 @@ export default {
this.getfileByFolderId(); this.getfileByFolderId();
this.fileUploadModal = false; this.fileUploadModal = false;
}); });
this.modalBtnLoad = false;
}, },
addhdPicChange(event) { addhdPicChange(event) {
// event.target 是触发事件的 input 元素 // event.target 是触发事件的 input 元素
...@@ -464,17 +497,28 @@ export default { ...@@ -464,17 +497,28 @@ export default {
menuClick(data, node, target) { menuClick(data, node, target) {
console.log("menuClick", data, node, target); console.log("menuClick", data, node, target);
// 传递文件夹ID,获取对应文件夹下的文件数据 // 传递文件夹ID,获取对应文件夹下的文件数据
this.currentFolderId = data.id; this.selectedFolderId = data.id;
// 下方著用于添加目录操作
this.selectedFolderInfo = data;
// this.selectedFolderId = data.id;
this.getfileByFolderId(); this.getfileByFolderId();
}, },
menuChange(data, node, target) { // menuCheck(data, node, target) {
console.log("menuChange", data, node, target); // console.log("menuCheck处理前", data, node, target);
this.currentCheckedFolderInfo = data // if(node.checkedKeys.length>1){
const menu = data; // const tempCheckey = node.checkedKeys[node.checkedKeys.length-1]
this.currentCheckedFolderId = node.checkedKeys.length // this.$refs.menu.setCheckedKeys([tempCheckey]);
? node.checkedKeys[0]
: ""; // // node.checkedKeys.splice(0, 1)
}, // console.log("menuCheck处理后", data, node, target);
// }
// this.selectedFolderInfo = node.checkedKeys.length ? data : {} // 勾选上则赋值当先选中节点。否则位空对象
// const menu = data;
// this.selectedFolderId = node.checkedKeys.length
// ? node.checkedKeys[0]
// : "";
// },
}, },
}; };
</script> </script>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</el-select> --> </el-select> -->
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="searchSubmit">搜索</el-button> <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="searchSubmit">搜索</el-button>
<el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="searchParamReset">重置</el-button> <el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="searchParamReset">重置</el-button>
<el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="add">新增</el-button> <el-button class="filter-item" size="mini" type="primary" icon="el-icon-plus" @click="add">新增</el-button>
<el-tooltip class="item" effect="dark" content="按当前查询条件导出" placement="top"> <el-tooltip class="item" effect="dark" content="按当前查询条件导出" placement="top">
<el-button :loading="exporting" class="filter-item" size="mini" type="info" plain icon="el-icon-download" @click="exportSubmit">导出</el-button> <el-button :loading="exporting" class="filter-item" size="mini" type="info" plain icon="el-icon-download" @click="exportSubmit">导出</el-button>
</el-tooltip> </el-tooltip>
...@@ -543,10 +543,11 @@ ...@@ -543,10 +543,11 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="200px" align="center" fixed="right"> <el-table-column label="操作" width="300px" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" round @click="showEnterpriseInfo(scope.row.id)">查看详情</el-button> <el-button size="mini" round @click="showEnterpriseInfo(scope.row.id)">查看详情</el-button>
<el-button size="mini" round @click="editEnterpriseInfo(scope.row)">修改</el-button> <el-button size="mini" round @click="editEnterpriseInfo(scope.row)">修改</el-button>
<el-button size="mini" round @click="deleteEnterpriseInfo(scope.row)">删除</el-button>
<!-- <el-button v-show="scope.row.auditState==1" size="mini" round @click="auditBtn(scope.row, 2)">通过</el-button> <!-- <el-button v-show="scope.row.auditState==1" size="mini" round @click="auditBtn(scope.row, 2)">通过</el-button>
<el-button v-show="scope.row.auditState==1" size="mini" round @click="auditBtn(scope.row, 3)">不通过</el-button> --> <el-button v-show="scope.row.auditState==1" size="mini" round @click="auditBtn(scope.row, 3)">不通过</el-button> -->
...@@ -916,6 +917,26 @@ export default { ...@@ -916,6 +917,26 @@ export default {
dialog2Submit() { dialog2Submit() {
this.doAudit(this.dialog2Data) this.doAudit(this.dialog2Data)
}, },
deleteEnterpriseInfo(row){
this.$confirm("确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(
() => {
enterpriseApi.deleteById([row.id]).then((res) => {
this.$message.success("操作成功");
this.searchSubmit();
});
},
() => {
this.$message({
type: "info",
message: "已取消删除",
});
}
);
},
editEnterpriseInfo(row){ editEnterpriseInfo(row){
this.addCompanyShow = true this.addCompanyShow = true
this.mainDataEditing = row this.mainDataEditing = row
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!--工具栏--> <!--工具栏-->
<span style="color: red;font-size: 10px;">* 原型图菜单叫监控数据,但其他2处监控叫实时数据,此页面查询的也是最新的测点数据,为措辞统一,这里也叫实时数据了。</span> <!-- <span style="color: red;font-size: 10px;">* 原型图菜单叫监控数据,但其他2处监控叫实时数据,此页面查询的也是最新的测点数据,为措辞统一,这里也叫实时数据了。</span>
<span style="color: red;font-size: 10px;">* 测点类型在新增时是填写的,在这里是选择的?在填过的内容里选择吗?等对接了硬件可能会更清楚这个类型是干什么用的。</span> <span style="color: red;font-size: 10px;">* 测点类型在新增时是填写的,在这里是选择的?在填过的内容里选择吗?等对接了硬件可能会更清楚这个类型是干什么用的。</span> -->
<div class="head-container"> <div class="head-container">
<div> <div>
<el-input clearable size="small" placeholder="测点名称" style="width: 200px;" class="filter-item" /> <el-input clearable size="small" placeholder="测点名称" style="width: 200px;" class="filter-item" />
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!--工具栏--> <!--工具栏-->
<span style="color: red;font-size: 10px;">* 监测类型在新增时是填写的,在这里是选择的?在填过的内容里选择吗?等对接了硬件可能会更清楚这个类型是干什么用的。</span> <!-- <span style="color: red;font-size: 10px;">* 监测类型在新增时是填写的,在这里是选择的?在填过的内容里选择吗?等对接了硬件可能会更清楚这个类型是干什么用的。</span> -->
<div class="head-container"> <div class="head-container">
<div> <div>
<el-input clearable size="small" placeholder="设备名称" style="width: 200px;" class="filter-item" /> <el-input clearable size="small" placeholder="设备名称" style="width: 200px;" class="filter-item" />
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
</div> </div>
<!--表格--> <!--表格-->
<span style="color: red;font-size: 10px;">* 此处表格显示了监测类型,环境检测却不显示?</span> <!-- <span style="color: red;font-size: 10px;">* 此处表格显示了监测类型,环境检测却不显示?</span> -->
<el-table ref="table" v-loading="searching" :data="tableData" row-key="id"> <el-table ref="table" v-loading="searching" :data="tableData" row-key="id">
<el-table-column :show-overflow-tooltip="true" prop="id" label="编号" width="100px" align="center" /> <el-table-column :show-overflow-tooltip="true" prop="id" label="编号" width="100px" align="center" />
<el-table-column :show-overflow-tooltip="true" prop="mineName" label="设备名称" align="center" /> <el-table-column :show-overflow-tooltip="true" prop="mineName" label="设备名称" align="center" />
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<span style="color: red; font-size: 11px;">* 图纸点选X Y?等确认如何操作时再做。XY现在是String</span> <!-- <span style="color: red; font-size: 11px;">* 图纸点选X Y?等确认如何操作时再做。XY现在是String</span> -->
</el-form> </el-form>
<div v-show="dialog1Editing" slot="footer" class="dialog-footer"> <div v-show="dialog1Editing" slot="footer" class="dialog-footer">
<el-button type="text" @click="dialog1Show=false">取消</el-button> <el-button type="text" @click="dialog1Show=false">取消</el-button>
......
...@@ -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
......
...@@ -418,7 +418,9 @@ ...@@ -418,7 +418,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>
...@@ -563,6 +565,26 @@ export default { ...@@ -563,6 +565,26 @@ export default {
this.$refs['dialog1Form'].clearValidate() this.$refs['dialog1Form'].clearValidate()
}) })
}, },
beginDelete(row){
this.$confirm("确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(
() => {
mineApi.deleteUndergroundById([row.id]).then((res) => {
this.$message.success("操作成功");
this.searchSubmit();
});
},
() => {
this.$message({
type: "info",
message: "已取消删除",
});
}
);
},
beginEdit(id) { beginEdit(id) {
if (this.editState === 1) { if (this.editState === 1) {
this.addingData = this.dialog1Data this.addingData = this.dialog1Data
......
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