| | |
| | | </el-col> |
| | | <el-col :span="12" v-if="editForm.inspectionItemType == 1"> |
| | | <el-form-item label="设备绑定:" prop="deviceId"> |
| | | <el-select v-model="editForm.deviceId" clearable placeholder="请选择" size="small" style="width: 100%" multiple> |
| | | <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.value"></el-option> |
| | | <el-select v-model="editForm.deviceId" clearable placeholder="请选择" |
| | | size="small" style="width: 100%" multiple filterable> |
| | | <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.value"> |
| | | {{item.label + ' - ' + item.managementNumber}} |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | this.editForm.sample = JSON.parse(this.editForm.sample) |
| | | this.editForm.radiusList = this.editForm.radiusList && JSON.parse(this.editForm.radiusList) |
| | | this.editForm.method = JSON.parse(this.editForm.method) |
| | | this.$set(this.editForm, 'deviceId', this.editForm.deviceIds && this.editForm.deviceIds.split(",")) |
| | | const ids = this.editForm.deviceIds && this.editForm.deviceIds.split(",") || []; |
| | | const numericIds = ids.map(Number); |
| | | this.$set(this.editForm, 'deviceId', numericIds); |
| | | } |
| | | }, |
| | | // 提交编辑 |
| | |
| | | this.equipOptions = res.data.map((m) => { |
| | | m.value = m.id; |
| | | m.label = m.deviceName; |
| | | m.managementNumber = m.managementNumber; |
| | | return m; |
| | | }); |
| | | } |