opt: 路由同步,设备监控优化

This commit is contained in:
yanps
2024-03-08 09:52:05 +08:00
parent 0b7945a149
commit 19615e8ca7
7 changed files with 72 additions and 60 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div style="overflow: hidden">
<el-select v-model="value" :placeholder="$t('auto.common.please')" @change="initStageData">
<el-select v-model="value" :placeholder="$t('auto.common.please')" @change="initStageData(value)">
<el-option
v-for="item in stageParam"
:key="item.value"
@@ -259,12 +259,12 @@ export default {
dialogFormVisible10: false,
stageParam: [{// 舞台参数
value: 'age',
label: 'age'
label: '一楼监控'
}, {
value: 'stage_code',
label: 'stage_code'
label: '二楼监控'
}],
value: '',
value: 'age',
stage_code: '',
form: {
device_code: '',
@@ -364,6 +364,10 @@ export default {
initStageData(var1) {
// 获取舞台数据
this.stage_code = var1
if (!this.stage_code) {
// 可以在这里设置一个默认的stage_code或者直接返回
this.stage_code = 'age'
}
crudStage.getNewStageDataByCode(this.stage_code).then(res => { // 通过舞台编码获取舞台数据并且赋值到lf对象
data = JSON.parse(res.stage_data)
lf.render(data)