fix:回转窑更改计算测点值

This commit is contained in:
shijing 2024-05-17 14:48:51 +08:00
parent 08130abf6a
commit 0015e2c96d
1 changed files with 34 additions and 11 deletions

View File

@ -2,6 +2,20 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-select
v-model="query.mpoint__code"
placeholder="测点"
clearable
style="margin: 0 6px; width: 120px"
@change="codeChange"
>
<el-option
v-for="item in mpoints"
:key="item.code"
:label="item.name"
:value="item.code"
></el-option>
</el-select>
<el-select <el-select
v-model="query.type" v-model="query.type"
placeholder="类型" placeholder="类型"
@ -133,13 +147,13 @@ export default {
data() { data() {
return { return {
searchDate: "", searchDate: "",
apiObj: this.$API.enm.mpoint.stat, apiObj: null,
query: { query: {
year_s: "2024", year_s: "",
month_s: "5", month_s: "",
type: "day_s", type: "day_s",
mgroup__name: "回转窑", mgroup__name: "回转窑",
mpoint__code: "slcl", mpoint__code: "",
}, },
deptId: "", deptId: "",
sflogItem: {}, sflogItem: {},
@ -152,18 +166,27 @@ export default {
val_correct: "", val_correct: "",
}, },
visible: false, visible: false,
mpoints: [],
}; };
}, },
mounted() { mounted() {
this.$API.mtm.mgroup.list this.getMpoints();
.req({ page: 0, search: "回转窑" })
.then((res) => {
console.log("回转窑", res);
this.query.mgroup = res[0].id;
this.deptId = res[0].belong_dept;
});
}, },
methods: { methods: {
getMpoints() {
let that = this;
this.$API.enm.mpoint.list
.req({ page: 0, mgroup__name: "回转窑", type: 20 })
.then((res) => {
that.mpoints = res;
});
},
codeChange(val) {
let that = this;
that.apiObj = that.$API.enm.mpoint.stat;
that.$refs.table.queryData(that.query);
},
handle_add() {},
typeChange() { typeChange() {
this.query.month_s = ""; this.query.month_s = "";
this.query.year_s = ""; this.query.year_s = "";