计量设备树修改

master
zhouhy 1 year ago
parent e960960402
commit b5e5d1478b

@ -1,5 +1,32 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="4" :xs="24">
<div class="head-container">
<el-input
v-model="monitorName"
placeholder="请输入计量设备名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container">
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="计量设备编号" prop="monitorId">
<el-input
@ -157,7 +184,8 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<!-- 添加或修改电实时数据对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
@ -242,12 +270,16 @@
<script>
import { listDnbInstant, getDnbInstant, delDnbInstant, addDnbInstant, updateDnbInstant } from "@/api/base/dnbInstant";
import { getMonitorInfoTree } from '@/api/report/pointDnb'
export default {
name: "DnbInstant",
dicts: ['collect_type', 'is_flag'],
data() {
return {
//
deptOptions: undefined,
monitorName:undefined,
//
loading: true,
//
@ -295,6 +327,10 @@ export default {
},
//
form: {},
defaultProps: {
children: "children",
label: "label"
},
//
rules: {
},
@ -324,10 +360,33 @@ export default {
]
};
},
watch: {
//
monitorName(val) {
this.$refs.tree.filter(val);
}
},
created() {
this.getList();
this.getDeptTrees();
},
methods: {
/** 查询计量设备下拉树结构 */
getDeptTrees() {
getMonitorInfoTree().then(response => {
this.deptOptions = response.data;
});
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.monitorId = data.code;
this.handleQuery();
},
/** 查询电实时数据列表 */
getList() {
this.loading = true;
@ -382,6 +441,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.daterangeCollectTime = [];
this.queryParams.monitorCode = null;
this.resetForm("queryForm");
this.handleQuery();
},

@ -1,30 +1,36 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="4" :xs="24">
<div class="head-container">
<el-input
v-model="monitorName"
placeholder="请输入计量设备名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container">
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="计量设备编号" prop="monitorCode">
<el-input
v-model="queryParams.monitorCode"
placeholder="请输入计量设备编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="仪表值" prop="instrumentValue">
<el-input
v-model="queryParams.instrumentValue"
placeholder="请输入仪表值"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="耗量" prop="expend">
<el-input
v-model="queryParams.expend"
placeholder="请输入耗量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="报表日期" prop="reportDate">
<el-input
v-model="queryParams.reportDate"
@ -33,22 +39,8 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="开始时间" prop="beginTime">
<el-input
v-model="queryParams.beginTime"
placeholder="请输入开始时间"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-input
v-model="queryParams.endTime"
placeholder="请输入结束时间"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否标识" prop="isFlag">
<el-select v-model="queryParams.isFlag" placeholder="请选择是否标识" clearable>
<el-option
@ -67,30 +59,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createdTime">
<el-date-picker clearable
v-model="queryParams.createdTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updatedBy">
<el-input
v-model="queryParams.updatedBy"
placeholder="请输入更新人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新时间" prop="updatedTime">
<el-date-picker clearable
v-model="queryParams.updatedTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -196,7 +165,8 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<!-- 添加或修改电日耗报对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
@ -260,12 +230,16 @@
<script>
import { listDayDnb, getDayDnb, delDayDnb, addDayDnb, updateDayDnb } from "@/api/report/DayDnb";
import { getMonitorInfoTree } from '@/api/report/pointDnb'
export default {
name: "DayDnb",
dicts: ['is_flag'],
data() {
return {
//
deptOptions: undefined,
monitorName:undefined,
//
loading: true,
//
@ -302,6 +276,10 @@ export default {
},
//
form: {},
defaultProps: {
children: "children",
label: "label"
},
//
rules: {
},
@ -321,10 +299,33 @@ export default {
]
};
},
watch: {
//
monitorName(val) {
this.$refs.tree.filter(val);
}
},
created() {
this.getList();
this.getDeptTrees();
},
methods: {
/** 查询计量设备下拉树结构 */
getDeptTrees() {
getMonitorInfoTree().then(response => {
this.deptOptions = response.data;
});
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.monitorCode = data.code;
this.handleQuery();
},
/** 查询电日耗报列表 */
getList() {
this.loading = true;
@ -365,6 +366,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.monitorCode = null;
this.handleQuery();
},
//

@ -2,7 +2,6 @@
<div class="app-container">
<el-row :gutter="20">
<el-col :span="5" :xs="24">
<div class="head-container">
<el-input
v-model="monitorName"
@ -26,8 +25,6 @@
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="19" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
@ -344,7 +341,8 @@ export default {
},
//
handleNodeClick(data) {
this.queryParams.monitorCode = data.id;
console.log(data.code)
this.queryParams.monitorCode = data.code;
this.handleQuery();
},
//

Loading…
Cancel
Save