检测计划未检下拉框不可编辑
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测脚本" prop="scriptId" :label-width="100">
|
||||
<el-select v-model="formContent.scriptId" placeholder="请选择检测脚本" autocomplete="off">
|
||||
<el-select v-model="formContent.scriptId" placeholder="请选择检测脚本" autocomplete="off" :disabled="isSelectDisabled ">
|
||||
<el-option
|
||||
v-for="(option, index) in pqScriptArray"
|
||||
:key="index"
|
||||
@@ -39,7 +39,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="误差体系" prop="errorSysId" :label-width="100">
|
||||
<el-select v-model="formContent.errorSysId" placeholder="请选择误差体系" autocomplete="off">
|
||||
<el-select v-model="formContent.errorSysId" placeholder="请选择误差体系" autocomplete="off" :disabled="isSelectDisabled">
|
||||
<el-option
|
||||
v-for="(option, index) in pqErrorArray"
|
||||
:key="index"
|
||||
@@ -118,6 +118,7 @@ import { Loading } from '@element-plus/icons-vue/dist/types';
|
||||
const boundPqDevList=ref<Device.ResPqDev[]>([])//根据检测计划id查询出所有已绑定的设备
|
||||
const value = ref<string[]>([])
|
||||
const allData = computed(() => generateData())
|
||||
const isSelectDisabled = ref(false)
|
||||
const generateData = () => {
|
||||
const unboundData = unboundPqDevList.value.map((i: Device.ResPqDev) => ({
|
||||
key: i.id,
|
||||
@@ -286,8 +287,12 @@ const open = async (sign: string,
|
||||
data.pattern = patternId
|
||||
mode.value = currentMode
|
||||
titleType.value = sign
|
||||
|
||||
isSelectDisabled.value = false
|
||||
if (data.id) {
|
||||
if(data.testState === 0){
|
||||
isSelectDisabled.value = true
|
||||
}
|
||||
|
||||
Object.assign(formContent,{ ...data })
|
||||
} else {
|
||||
resetFormContent()
|
||||
|
||||
Reference in New Issue
Block a user