Commit eaf7f71e by 李君

优化

1 parent e0213921
......@@ -4,7 +4,7 @@
:close-on-click-modal="false" v-if="addDialogVisible" @close="addDialogClose()">
<el-form :model="addForm" label-width="100px" status-icon :rules="rules" ref="addForm">
<div class="inlineBlock" v-for="item in counterTypeData" :key="item.id">
<template v-if="item.key != '2'">
<template v-if="channelConfig.includes(item.key)">
<p class="itemTitle" style="font-weight: 900">{{item.text}}</p>
{{$t('message.queuelengthmorethan')}}
<el-input-number v-model="item.queueLengthThreshold" :min="0" :controls = 'false' :precision = '0'></el-input-number> {{$t('format.perNum')}},
......@@ -70,10 +70,12 @@ export default {
message: this.$t('pholder.input'),
trigger: 'blur'
}],
}
},
channelConfig:[]
}
},
mounted() {
this.channelConfig = window._vionConfig.channelConfig
this.getCounterType()
},
methods: {
......@@ -94,6 +96,7 @@ export default {
email:arr[i]
})
}
console.log(this.counterTypeData)
this.addForm.alarmInterval = data[0].channelRules[0].alarmInterval
data[0].channelRules.forEach(itemR=>{
this.counterTypeData.forEach(item=>{
......@@ -145,7 +148,7 @@ export default {
if (valid) {
let channelRules = []
for (let item of this.counterTypeData) {
if(item.key != 4){
if( this.channelConfig.includes(item.key)){
if(item.queueLengthThreshold !== ''&&item.queueLengthThreshold !== ''&&item.queueLengthThreshold !== ''&&item.trolleyThreshold !== ''){
channelRules.push({
queueLengthThreshold:item.queueLengthThreshold,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!