| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | }, |
| | | // 获取设备树内容 |
| | | getOptions(row) { |
| | | this.filterText=0 |
| | | this.$axios.get(this.$api.url.inspectionItemChooseDev, { |
| | | params: { |
| | | father: row.father, |
| | |
| | | }, |
| | | // 点击树里面的确定 |
| | | clickNodeSure(row) { |
| | | console.log(row); |
| | | let select = this.materialOptions.filter(item => { |
| | | return item.id === this.filterText |
| | | })[0] |
| | |
| | | }) |
| | | .then(res => { |
| | | row.isSelectDevice = false |
| | | console.log("row",row); |
| | | this.filterText=0 |
| | | this.getTableData() |
| | | this.centerDialogVisible = false; |