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-header>
<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
v-model="query.type"
placeholder="类型"
@ -133,13 +147,13 @@ export default {
data() {
return {
searchDate: "",
apiObj: this.$API.enm.mpoint.stat,
apiObj: null,
query: {
year_s: "2024",
month_s: "5",
year_s: "",
month_s: "",
type: "day_s",
mgroup__name: "回转窑",
mpoint__code: "slcl",
mpoint__code: "",
},
deptId: "",
sflogItem: {},
@ -152,18 +166,27 @@ export default {
val_correct: "",
},
visible: false,
mpoints: [],
};
},
mounted() {
this.$API.mtm.mgroup.list
.req({ page: 0, search: "回转窑" })
.then((res) => {
console.log("回转窑", res);
this.query.mgroup = res[0].id;
this.deptId = res[0].belong_dept;
});
this.getMpoints();
},
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() {
this.query.month_s = "";
this.query.year_s = "";