gaoshp
2024-10-19 9fe29d060ff1b2259648e77305fca3eb6baed29b
update
已修改1个文件
17 ■■■■ 文件已修改
src/views/console/workstation/CollDialog.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/console/workstation/CollDialog.vue
@@ -39,7 +39,7 @@
                </template>
                <template #default="scope">
                    <el-select :disabled="!scope.row.status" v-model="scope.row[item.prop]"
                        @change="change($event, scope.row, scope.$index, item.prop)" placeholder="" size="small"
                        @change="change($event, scope.row, scope.$index, item)" placeholder="" size="small"
                        v-if="item.type === 'option'">
                        <el-option v-for="item in item.options" :key="item.value || item" :label="(item?.label || item)"
                            :value="(item.value || item)" />
@@ -93,19 +93,10 @@
    },
    methods: {
        change(e, row, index, prop) {
            console.log(e)
        change(e, row, index, { prop, options }) {
            console.log(e, options)
            if (prop === 'dpCategory' && e !== 'Other') {
                const label = [{
                    label: '状态',
                    value: 'DeviceStatus'
                }, {
                    label: '产量',
                    value: 'Output'
                }, {
                    label: '告警',
                    value: 'Alarm'
                }].find(v => v.value === e).label
                const label = options.find(v => v.value === e).label
                this.tabledata[index].dpLabel = label
                this.tabledata[index].dpName = e
            } else if (prop === 'dpCategory' && e === 'Other') {