Fixiaobai
2023-09-15 cdf986d7321208634387a8ab5eafa8e8e3d872f8
src/components/view/processInspectionUpdate.vue
@@ -126,7 +126,7 @@
                        <el-button v-if="!scope.row.isSelectDevice" type="text" @click="clickTableSelect(scope)">{{
                            scope.row.dname == null ? "请选择" : scope.row.dname
                        }}</el-button>
                        <el-select v-if="scope.row.isSelectDevice" style="width: 100%;" @change="clickNodeSure(scope.row)"
                        <el-select v-if="scope.row.isSelectDevice" style="width: 100%;" onchange="clickNodeSure(scope.row)"
                             v-model="filterText" placeholder="请选择">
                            <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" :value="item.id">
                            </el-option>
@@ -171,10 +171,10 @@
        </div>
        <el-dialog title="请选择设备" :visible.sync="centerDialogVisible" width="20%">
            <div class="div_device_dialog">
                <el-select style="width: 100%;" @change="clickNodeSure()" v-model="filterText" placeholder="请选择">
                <!-- <el-select style="width: 100%;" @change="clickNodeSure()" v-model="filterText" placeholder="请选择">
                    <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" :value="item.id">
                    </el-option>
                </el-select>
                </el-select> -->
            </div>
            <!-- <span slot="footer" class="dialog-footer">
                <el-button @click="centerDialogVisible = false">取 消</el-button>
@@ -367,6 +367,7 @@
        },
        // 获取设备树内容
        getOptions(row) {
            this.filterText=0
            this.$axios.get(this.$api.url.inspectionItemChooseDev, {
                params: {
                    father: row.father,
@@ -392,6 +393,7 @@
        },
        // 点击树里面的确定
        clickNodeSure(row) {
            console.log(row);
            let select = this.materialOptions.filter(item => {
                return item.id === this.filterText
            })[0]
@@ -414,6 +416,7 @@
                    })
                    .then(res => {
                        row.isSelectDevice = false
                        console.log("row",row);
                        this.filterText=0
                        this.getTableData()
                        this.centerDialogVisible = false;