Commit 70189ac8 by 李君

优化

1 parent 9cd88bda
......@@ -9,10 +9,10 @@
<el-checkbox v-model="addForm.queueLengthSwitch">{{$t('table.queueLengthAlert')}}</el-checkbox>
<el-checkbox v-model="addForm.waitTimeSwitch">{{$t('table.waitTimeAlert')}}</el-checkbox>
</el-form-item> -->
<el-form-item :label="$t('table.alarmPensonNum')" prop="alarmPensonNum">
<el-form-item :label="$t('table.alarmPensonNum')" prop="queueLengthThreshold">
<el-input-number v-model="addForm.queueLengthThreshold" :min="0" :controls = 'false' :precision = '0'></el-input-number> {{$t('format.perNum')}}
</el-form-item>
<el-form-item :label="$t('table.waitingTime')" prop="waitingTime">
<el-form-item :label="$t('table.waitingTime')" prop="waitTimeThreshold">
<el-input-number v-model="addForm.waitTimeThreshold" :min="0" :controls = 'false' :precision = '0'></el-input-number> {{$t('format.minute')}}
</el-form-item>
<el-form-item :label="$t('table.alarmCycle')" prop="alarmInterval">
......@@ -48,12 +48,12 @@ export default {
}],
isAdd:true,
rules: {
alarmPensonNum: [{
queueLengthThreshold: [{
required: true,
message: this.$t('pholder.input'),
trigger: 'blur'
}],
waitingTime:[{
waitTimeThreshold:[{
required: true,
message: this.$t('pholder.input'),
trigger: 'blur'
......@@ -112,6 +112,7 @@ export default {
}
this.addForm.sendEmail = arr.join(';')
this.$refs[formName].validate((valid) => {
console.log(valid)
if (valid) {
this.addForm.queueLengthSwitch = 1
this.addForm.waitTimeSwitch = 1
......
......@@ -755,10 +755,12 @@
let red = data.red ? data.red : [];
let green = data.green ? data.green : [];
let blue = data.blue ? data.blue : [];
let orange = data.orange ? data.orange : [];
this.dataList = [
...red.map((item) => ({ ...item, status: 1 })),
...green.map((item) => ({ ...item, status: 0 })),
...blue.map((item) => ({ ...item, status: 2 })),
...orange.map((item) => ({ ...item, status: 3 })),
];
this.drawCirlce();
}
......@@ -781,6 +783,8 @@
this.ctx.fillStyle = "red";
}else if(item.status == 2){
this.ctx.fillStyle = "blue";
}else if(item.status == 3){
this.ctx.fillStyle = "orange";
} else {
this.ctx.fillStyle = "green";
}
......
......@@ -605,10 +605,12 @@ export default {
let red = data.red ? data.red : [];
let green = data.green ? data.green : [];
let blue = data.blue ? data.blue : [];
let orange = data.orange ? data.orange : [];
this.dataList = [
...red.map((item) => ({ ...item, status: 1 })),
...green.map((item) => ({ ...item, status: 0 })),
...blue.map((item) => ({ ...item, status: 2 })),
...orange.map((item) => ({ ...item, status: 3 })),
];
this.drawCirlce();
......@@ -755,6 +757,8 @@ export default {
this.ctx.fillStyle = "red";
}else if(item.status == 2){
this.ctx.fillStyle = "blue";
}else if(item.status == 3){
this.ctx.fillStyle = "orange";
} else {
this.ctx.fillStyle = "green";
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!