|
|
@@ -33,13 +33,20 @@
|
|
|
:value="item.id"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="安全分类" :prop="placementTest?'disciplineTypeId':''">
|
|
|
- <el-select :disabled="showType" v-model="newData.disciplineTypeId" placeholder="安全分类" @change="examChange" style="width:200px;">
|
|
|
+ <el-form-item label="安全分类" v-if="!placementTest" :prop="placementTest?'disciplineTypeId':''">
|
|
|
+ <el-select :disabled="showType" v-model="newData.disciplineTypeId" placeholder="安全分类" style="width:200px;">
|
|
|
<el-option v-for="item in tableList" :key="item.id"
|
|
|
:label="item.disciplineName"
|
|
|
:value="item.id"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="安全分类" v-if="placementTest" :prop="placementTest?'disciplineTypeId':''">
|
|
|
+ <el-select :disabled="showType" v-model="newData.disciplineTypeId" placeholder="安全分类" style="width:200px;">
|
|
|
+ <el-option v-for="item in tableList2" :key="item.id"
|
|
|
+ :label="item.disciplineName"
|
|
|
+ :value="item.id"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="风险等级" prop="riskLevelId" v-if="placementTest">
|
|
|
<el-select :disabled="showType" v-model="newData.riskLevelId" placeholder="请选择" style="width:200px;">
|
|
|
<el-option v-for="item in optionRiskLevel" :key="item.levelId" :label="item.titleName"
|
|
|
@@ -719,6 +726,7 @@
|
|
|
optionListC:[],
|
|
|
optionExamType: [],
|
|
|
tableList: [],
|
|
|
+ tableList2: [],
|
|
|
optionRiskLevel: [],
|
|
|
scopeList: [],
|
|
|
userList: [],
|
|
|
@@ -1134,8 +1142,26 @@
|
|
|
if (self.optionExamType[i].id == self.newData.examTypeId) {
|
|
|
if (self.optionExamType[i].examTypeCode == 'CLASSIFIED') {
|
|
|
self.$set(this, 'placementTest', true)
|
|
|
+ let num = 0;
|
|
|
+ for(let o=0;o<self.tableList2.length;o++){
|
|
|
+ if(self.newData.disciplineTypeId == self.tableList2[o].id){
|
|
|
+ num++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(num == 0){
|
|
|
+ self.$set(self.newData,'disciplineTypeId',null);
|
|
|
+ }
|
|
|
} else {
|
|
|
self.$set(this, 'placementTest', false)
|
|
|
+ let num = 0;
|
|
|
+ for(let o=0;o<self.tableList.length;o++){
|
|
|
+ if(self.newData.disciplineTypeId == self.tableList[o].id){
|
|
|
+ num++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(num == 0){
|
|
|
+ self.$set(self.newData,'disciplineTypeId',null);
|
|
|
+ }
|
|
|
}
|
|
|
if (self.optionExamType[i].examTypeCode == 'yzyh') {
|
|
|
self.$set(this, 'yzyhTest', true)
|
|
|
@@ -1188,7 +1214,8 @@
|
|
|
examElDisciplineTypeList({}).then(response => {
|
|
|
const validCodes = ['CHEMISTRY', 'BIOLOGY', 'RADIATION', 'MECHANICAL_ELECTRICAL', 'OTHER'];
|
|
|
let list = response.data.filter(item => validCodes.includes(item.disciplineTypeCode));
|
|
|
- this.$set(this, 'tableList', list)
|
|
|
+ this.$set(this, 'tableList', response.data)
|
|
|
+ this.$set(this, 'tableList2', list)
|
|
|
})
|
|
|
},
|
|
|
}
|