This commit is contained in:
Li xia 2024-08-15 16:11:15 +08:00
commit 05727aebed
12 changed files with 37 additions and 18 deletions

5
src/assets/icons/Env.vue Normal file
View File

@ -0,0 +1,5 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32">
<path fill="currentColor" d="M5 5c2.614 8.976 2.362 13.181 6.896 16.693c3.97 3.026 7.94 2.237 10.112 1.914L25.398 27h2l-3.98-3.98C23.393 20.613 29.01 5 5 5m3.084 2.002c.135.011.45.121 1.047.396c3.999 1.85 5.408 4.592 6.931 7.4c1.096 2.023 3.019 5.103 4.374 6.095c1.356.983 2.836 1.709-.288.398c-3.134-1.311-5.417-5.032-6.931-7.85c-1.164-2.162-2.163-4.153-4.336-5.613c0 0-1.203-.86-.797-.826" />
</svg>
</template>

View File

@ -21,4 +21,5 @@ export { default as Shenpi } from './Shenpi.vue'
export { default as Shebei } from './Shebei.vue'
export { default as Xiaoshou } from './Xiaoshou.vue'
export { default as Zhixing } from './Zhixing.vue'
export { default as Zhizao } from './Zhizao.vue'
export { default as Zhizao } from './Zhizao.vue'
export { default as Env } from './Env.vue'

View File

@ -898,7 +898,7 @@ const routes = [
path: "/enp",
meta: {
title: "环保模块",
icon: "el-icon-grid",
icon: "sc-icon-env",
type: "menu",
perms: ["enm_hb"],
},

View File

@ -103,6 +103,10 @@ export default {
name: [{ required: true, message: "请输入类型名称" }],
type: [{ required: true, message: "请请选择设备类型" }],
},
type_gx:[
{ text: '生产设备', key: 10 },
{ text: '计量设备', key: 20 },
],
visible: false,
isSaveing: false,
};

View File

@ -91,7 +91,7 @@
</scTable>
</el-main>
</el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess"
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" :eqtype="10"
@closed="dialog.save = false"></save-dialog>
<check-dialog v-if="dialog.check" ref="checkDialog" :eqms="selectiones" @success="handleCheckSuccess"
@closed="dialog.save = false"></check-dialog>
@ -341,10 +341,12 @@ export default {
},
//
async table_del(row) {
this.$API.em.equipment.delete
let that = this;
that.$API.em.equipment.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功");
that.$message.success("删除成功");
that.$refs.table.refresh();
return res;
})
.catch((err) => {
@ -354,11 +356,7 @@ export default {
//
handleSaveSuccess(data, mode) {
if (mode == "add") {
this.$refs.table.refresh();
} else if (mode == "edit") {
this.$refs.table.refresh();
}
this.$refs.table.refresh();
},
handleCheckSuccess() { },
handleQuery() {

View File

@ -199,6 +199,12 @@ import { genTree } from "@/utils/verificate";
import { iMEnum } from "@/utils/enum";
export default {
emits: ["success", "closed"],
props:{
eqtype:{
type:String,
default: ''
},
},
data() {
return {
iMEnum,
@ -211,7 +217,7 @@ export default {
show: "查看",
},
form: {
type: 10
type: 10,
},
rules: {
name: [{ required: true, message: "请输入", trigger: "blur" }],
@ -257,11 +263,13 @@ export default {
this.getGroup();
this.getBaseInfo();
this.getCateOptions();
this.form.type = this.eqtype;
},
methods: {
getCateOptions() {
this.$API.em.ecate.list.req({page:0}).then(res => {
this.cateOptions = res
let that = this;
that.$API.em.ecate.list.req({page:0,type:that.eqtype}).then(res => {
that.cateOptions = res;
})
},
getBaseInfo() {

View File

@ -91,7 +91,7 @@
</scTable>
</el-main>
</el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess"
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" :eqtype='40'
@closed="dialog.save = false"></save-dialog>
<check-dialog v-if="dialog.check" ref="checkDialog" :eqms="selectiones" @success="handleCheckSuccess"
@closed="dialog.save = false"></check-dialog>

View File

@ -91,7 +91,7 @@
</scTable>
</el-main>
</el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess"
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" :eqtype="50"
@closed="dialog.save = false"></save-dialog>
<check-dialog v-if="dialog.check" ref="checkDialog" :eqms="selectiones" @success="handleCheckSuccess"
@closed="dialog.save = false"></check-dialog>

View File

@ -138,7 +138,7 @@
</el-drawer>
</el-main>
</el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess"
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" :eqtype="20"
@closed="dialog.save = false"></save-dialog>
</template>
<script>

View File

@ -92,7 +92,7 @@
</scTable>
</el-main>
</el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess"
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" :eqtype="30"
@closed="dialog.save = false"></save-dialog>
<check-dialog v-if="dialog.check" ref="checkDialog" :eqms="selectiones" @success="handleCheckSuccess"
@closed="dialog.save = false"></check-dialog>

View File

@ -704,6 +704,6 @@ export default {
.infotitle {
font-weight: normal;
color: #333333;
color: #dddddd;
}
</style>

View File

@ -244,6 +244,7 @@ export default {
let form = {};
form.name = that.form.name;
form.material = that.form.material;
console.log("that.form",that.form)
if (that.form.id) {
that.$API.mtm.routepack.update
.req(that.form.id, that.form)
@ -258,7 +259,9 @@ export default {
} else {
that.$API.mtm.routepack.create.req(form).then((res) => {
this.active = 1;
that.form.id = res.id;
that.routepack = res.id;
console.log("that.form",that.form)
});
}
},