|
@@ -318,7 +318,7 @@
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="SAI级别" :span="1">
|
|
|
<el-form-item prop="saiLevel">
|
|
|
- <el-select v-model="form.saiLevel" placeholder="请选择SAI级别">
|
|
|
+ <el-select v-model="form.saiLevel" placeholder="请选择SAI级别" @change="handleSaiLevelChange">
|
|
|
<el-option key="1" label="1" value="1"></el-option>
|
|
|
<el-option key="2" label="2" value="2"></el-option>
|
|
|
<el-option key="3" label="3" value="3"></el-option>
|
|
@@ -328,12 +328,13 @@
|
|
|
<el-descriptions-item label="SAI类别" :span="2">
|
|
|
<el-form-item prop="category">
|
|
|
<el-select
|
|
|
+ @change="handleSaiCategoryChange"
|
|
|
filterable
|
|
|
clearable
|
|
|
v-model="form.category"
|
|
|
placeholder="请选择SAI类别">
|
|
|
<el-option
|
|
|
- v-for="dict in saiCategoryOptions"
|
|
|
+ v-for="dict in saiCategoryOptions2"
|
|
|
:key="dict.dictValue"
|
|
|
:label="dict.dictLabel"
|
|
|
:value="dict.dictValue"
|
|
@@ -601,7 +602,18 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.category" placeholder="请输入" />
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ v-model="scope.row.category"
|
|
|
+ placeholder="请选择SAI类别">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in saiCategoryOptions2"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="采取或要采取的措施" align="center" prop="actions" :show-overflow-tooltip="true"/>
|
|
@@ -700,6 +712,7 @@ export default {
|
|
|
estimateFinishDateRange: [],
|
|
|
// SAI类别列表
|
|
|
saiCategoryOptions: [],
|
|
|
+ saiCategoryOptions2: [],
|
|
|
fileList: [],
|
|
|
// 统计至SAI检查台账的数据
|
|
|
saiList: [],
|
|
@@ -932,6 +945,52 @@ export default {
|
|
|
this.getCategoryList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 处理SAI级别下拉框选中事件
|
|
|
+ handleSaiLevelChange() {
|
|
|
+ this.saiCategoryOptions2 = [];
|
|
|
+ let saiLevel = this.form.saiLevel;
|
|
|
+ let saiCategoryOptionsTemp = [];
|
|
|
+ for (let i = 0; i < this.saiCategoryOptions.length; i++) {
|
|
|
+ if (saiLevel == 1 && this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
|
|
|
+ let saiCategoryOption = {
|
|
|
+ dictValue: this.saiCategoryOptions[i].dictValue,
|
|
|
+ dictLabel: this.saiCategoryOptions[i].dictLabel,
|
|
|
+ };
|
|
|
+ saiCategoryOptionsTemp.push(saiCategoryOption);
|
|
|
+ }
|
|
|
+ if (saiLevel == 2 && this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
|
|
|
+ let saiCategoryOption = {
|
|
|
+ dictValue: this.saiCategoryOptions[i].dictValue,
|
|
|
+ dictLabel: this.saiCategoryOptions[i].dictLabel,
|
|
|
+ };
|
|
|
+ saiCategoryOptionsTemp.push(saiCategoryOption);
|
|
|
+ }
|
|
|
+ if (saiLevel == 3 && this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
|
|
|
+ let saiCategoryOption = {
|
|
|
+ dictValue: this.saiCategoryOptions[i].dictValue,
|
|
|
+ dictLabel: this.saiCategoryOptions[i].dictLabel,
|
|
|
+ };
|
|
|
+ saiCategoryOptionsTemp.push(saiCategoryOption);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.saiCategoryOptions2 = saiCategoryOptionsTemp;
|
|
|
+ },
|
|
|
+ // 处理SAI类别下拉框选中事件
|
|
|
+ handleSaiCategoryChange() {
|
|
|
+ for (let i = 0; i < this.saiCategoryOptions.length; i++) {
|
|
|
+ if (this.form.category == this.saiCategoryOptions[i].dictValue) {
|
|
|
+ if (this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
|
|
|
+ this.form.saiLevel = 1;
|
|
|
+ }
|
|
|
+ if (this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
|
|
|
+ this.form.saiLevel = 2;
|
|
|
+ }
|
|
|
+ if (this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
|
|
|
+ this.form.saiLevel = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// SAI类别字典翻译
|
|
|
saiCategoryFormat(row, column) {
|
|
|
return this.selectDictLabel(this.saiCategoryOptions, row.category);
|
|
@@ -946,6 +1005,10 @@ export default {
|
|
|
dictLabel: data[i].saiCategoryName,
|
|
|
dictValue: data[i].saiCategoryId
|
|
|
});
|
|
|
+ this.saiCategoryOptions2.push({
|
|
|
+ dictLabel: data[i].saiCategoryName,
|
|
|
+ dictValue: data[i].saiCategoryId
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -1500,7 +1563,7 @@ export default {
|
|
|
sai.source = "装置";
|
|
|
sai.deptId = 103;
|
|
|
sai.saiLevel = apply.saiLevel;
|
|
|
- sai.category = apply.category;
|
|
|
+ sai.category = Number(apply.category);
|
|
|
sai.applicant = apply.applicant;
|
|
|
sai.applicantName = apply.applicantName;
|
|
|
this.saiList.push(sai);
|