|
@@ -7,7 +7,7 @@
|
|
|
<el-input placeholder="请输入点位名称" v-model="queryParams.itemReadName" size="mini" style="width: 200px;"
|
|
|
@blur="itemChangeEvent" prefix-icon="el-icon-search">
|
|
|
</el-input>
|
|
|
- <el-checkbox size="mini" style="margin-left: 20px;" @change="groupRunCheckboxEvent"
|
|
|
+ <el-checkbox size="mini" style="margin-left: 20px;" v-model="runCheckbox" @change="groupRunCheckboxEvent"
|
|
|
title="固定每5秒刷新一次数据">实时数据</el-checkbox>
|
|
|
<el-button type="danger" size="mini" @click="multipleDelItemEvent" icon="el-icon-delete-solid"
|
|
|
style="float: right;">批量删除</el-button>
|
|
@@ -24,16 +24,16 @@
|
|
|
</UmyTable>
|
|
|
<!-- 分页信息 -->
|
|
|
<pagination v-show="tableTotal > 0" small :total="tableTotal" :page.sync="queryParams.page"
|
|
|
- :limit.sync="queryParams.limit" align="right" @pagination="getItemValuePageByGroupId" />
|
|
|
+ :limit.sync="queryParams.limit" align="right" @pagination="itemChangeEvent" />
|
|
|
</el-dialog>
|
|
|
<!-- 修改数据项 -->
|
|
|
- <UpdateItem ref="updateItem" @getItemGroupById="getItemValuePageByGroupId"></UpdateItem>
|
|
|
+ <UpdateItem ref="updateItem" @getItemGroupById="itemChangeEvent"></UpdateItem>
|
|
|
<!-- 批量设置表达式 -->
|
|
|
- <MultipleModel ref="multipleModel" @getItemGroupById="getItemValuePageByGroupId"></MultipleModel>
|
|
|
+ <MultipleModel ref="multipleModel" @getItemGroupById="itemChangeEvent"></MultipleModel>
|
|
|
<!-- 选择数据项 -->
|
|
|
- <ItemChoose ref="itemChoose" @getItemGroupById="getItemValuePageByGroupId"></ItemChoose>
|
|
|
+ <ItemChoose ref="itemChoose" @getItemGroupById="itemChangeEvent"></ItemChoose>
|
|
|
<!-- 报警配置 -->
|
|
|
- <AlarmConfig ref="alarmConfig" @getItemGroupById="getItemValuePageByGroupId"></AlarmConfig>
|
|
|
+ <AlarmConfig ref="alarmConfig" @getItemGroupById="itemChangeEvent"></AlarmConfig>
|
|
|
<!-- 报警日志 -->
|
|
|
<AlarmLog ref="alarmLog"></alarmLog>
|
|
|
</div>
|
|
@@ -170,6 +170,7 @@ export default {
|
|
|
itemReadName: '',
|
|
|
itemGroupId: 0
|
|
|
},
|
|
|
+ runCheckbox: false,
|
|
|
tableTotal: 0,
|
|
|
}
|
|
|
},
|
|
@@ -181,8 +182,8 @@ export default {
|
|
|
/** 打开弹出层事件 */
|
|
|
dialogOpen() {
|
|
|
if (this.id) {
|
|
|
- this.queryParams.itemGroupId = this.id
|
|
|
- this.getItemValuePageByGroupId()
|
|
|
+ this.queryParams.itemGroupId = this.id
|
|
|
+ this.itemChangeEvent()
|
|
|
}
|
|
|
},
|
|
|
/** 关闭弹出层 */
|
|
@@ -193,12 +194,13 @@ export default {
|
|
|
itemReadName: '',
|
|
|
itemGroupId: 0
|
|
|
}
|
|
|
+ this.runCheckbox = false
|
|
|
this.tableData = []
|
|
|
this.stopTimer()
|
|
|
this.visible = false
|
|
|
},
|
|
|
/** 查看数据组的全部数据项信息 */
|
|
|
- getItemValuePageByGroupId(callback) {
|
|
|
+ getItemValuePageByGroupId() {
|
|
|
getItemValuePageByGroupId(this.queryParams).then(res => {
|
|
|
this.tableTotal = res.data.count
|
|
|
this.tableData = res.data.itemList
|
|
@@ -236,11 +238,12 @@ export default {
|
|
|
},
|
|
|
/** 过滤数据项信息 */
|
|
|
itemChangeEvent(value) {
|
|
|
- this.getItemValuePageByGroupId()
|
|
|
+ this.runCheckbox = false
|
|
|
+ this.groupRunCheckboxEvent()
|
|
|
},
|
|
|
/** 数据组实时数据按钮事件 */
|
|
|
- groupRunCheckboxEvent(val) {
|
|
|
- if (val) {
|
|
|
+ groupRunCheckboxEvent() {
|
|
|
+ if (this.runCheckbox) {
|
|
|
let loading = showLoading(this, '数据加载中,请稍候···')
|
|
|
this.stopTimer()
|
|
|
this.tableHeaderTitle = [
|
|
@@ -256,6 +259,10 @@ export default {
|
|
|
labelName: "数据值",
|
|
|
},
|
|
|
{
|
|
|
+ propName: "countDataValue",
|
|
|
+ labelName: "计算值",
|
|
|
+ },
|
|
|
+ {
|
|
|
propName: "unit",
|
|
|
labelName: "单位",
|
|
|
},
|
|
@@ -445,7 +452,7 @@ export default {
|
|
|
message: '删除成功!',
|
|
|
type: 'success'
|
|
|
})
|
|
|
- this.getItemValuePageByGroupId()
|
|
|
+ this.itemChangeEvent()
|
|
|
})
|
|
|
})
|
|
|
},
|