Commit 40b72ed3 authored by xinzhedeai's avatar xinzhedeai

测试问题fix-1

parent 5f11c39f
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/enterprise',
method: 'delete',
data: ids
})
},
deleteUndergroundById: (ids) => {
return request({
url: 'api/enterprise',
method: 'delete',
data: ids
})
},
} }
...@@ -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>
......
...@@ -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.deleteOpencastById([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