This commit is contained in:
geting 2024-12-02 09:57:38 +08:00
commit 8f757d0a58

View File

@ -2,9 +2,9 @@
<el-dialog v-model="visible" :title="subSystemName" width="1020" :before-close="handleClose" :show-close="false">
<div class="radioItem">
<el-radio-group v-model="dialogradioactiveName">
<el-radio :value="138">模拟量</el-radio>
<el-radio :value="199">计算量</el-radio>
<el-radio :value="140">状态量</el-radio>
<el-radio v-if="curSubAttrNum.type138" :value="138">模拟量</el-radio>
<el-radio v-if="curSubAttrNum.type199" :value="199">计算量</el-radio>
<el-radio v-if="curSubAttrNum.type140" :value="140">状态量</el-radio>
</el-radio-group>
</div>
<div class="dialogContent">
@ -1017,14 +1017,6 @@ const createRealTimeData = async () => {
const dataFor138And139: { name: string; value: string }[] = []
const dataFor140: { name: string; value: string }[] = []
const dataFor199: { name: string; value: string }[] = []
// const realDataForSub: any = [
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// { type138: [], type140: [], type199: [] },
// ]
const realDataForSub: any = subSystem.map(() => ({ type138: [], type140: [], type199: [] }))
modelList.forEach((item: any) => {
@ -1088,7 +1080,15 @@ const dialogradioactiveName = ref(138)
const realTimeForSubSystem = ref<any>([])
const curSubSystem = ref(0)
const curSubAttrNum = reactive({
type138: true,
type140: true,
type199: true,
})
const subSystemDataList = computed(() => {
curSubAttrNum.type138 = realTimeForSubSystem.value[curSubSystem.value].type138.length > 0
curSubAttrNum.type140 = realTimeForSubSystem.value[curSubSystem.value].type140.length > 0
curSubAttrNum.type199 = realTimeForSubSystem.value[curSubSystem.value].type199.length > 0
const type = dialogradioactiveName.value === 138 ? 'type138' : dialogradioactiveName.value === 140 ? 'type140' : 'type199'
return realTimeForSubSystem.value[curSubSystem.value][type]
})