|
@@ -35,7 +35,7 @@
|
|
|
<el-col :span="8" :offset="1" style="line-height: 32px;">
|
|
|
{{$t('runTest.stage')}}:{{warningInfo}}
|
|
|
<el-button size="small" type="primary" @click="warningFormVisible = true" style="margin-left: 16px;"
|
|
|
- v-if="!(user.parentId == 1 && user.subordinateType == 1) && stage != 0">
|
|
|
+ v-if="user.parentId == 0 || (!(user.parentId == 1 && user.subordinateType == 1) && stage != 0)">
|
|
|
{{$t('runTest.immediate')}}
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -96,7 +96,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.maintainType == 0">{{$t('runTest.spray')}}</span>
|
|
|
<span v-else-if="scope.row.maintainType == 1">{{$t('runTest.check')}}</span>
|
|
|
- <span v-else="scope.row.maintainType == 2">{{$t('runTest.vulnerable')}}</span>
|
|
|
+ <span v-else-if="scope.row.maintainType == 2">{{$t('runTest.vulnerable')}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="fileName" :label="$t('runTest.fileName')" width="200" sortable>
|
|
@@ -140,8 +140,8 @@
|
|
|
|
|
|
<!-- 保养类型为1时 选择易损件ID -->
|
|
|
<el-form-item v-if="type.value == 1" :label="$t('runTest.vulnerable')" prop="vulnerable">
|
|
|
- <el-select v-model="vulnerable.value" clearable filterable :placeholder="$t('runTest.inputVulnerable')" style="width: 500px;">
|
|
|
- <el-option v-for="item in vulnerable" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-select v-model="vulnerable.id" clearable filterable :placeholder="$t('runTest.inputVulnerable')" style="width: 500px;">
|
|
|
+ <el-option v-for="item in vulnerable" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -332,6 +332,26 @@
|
|
|
this.maintenanceFormVisible = true;
|
|
|
},
|
|
|
|
|
|
+ getVulnerableList() {
|
|
|
+ this.http.post( this.port.mold.getVulnerablePartsList, {},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.vulnerable = res.data;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
//获取记录
|
|
|
getList() {
|
|
|
this.listLoading = true;
|
|
@@ -426,10 +446,10 @@
|
|
|
}
|
|
|
form.append("ways", this.action.value);
|
|
|
} else {
|
|
|
- if (this.vulnerable.value == null) {
|
|
|
+ if (this.vulnerable.id == null) {
|
|
|
return;
|
|
|
}
|
|
|
- form.append("ways", this.vulnerable.value); //后面应该换成易损件的ID
|
|
|
+ form.append("ways", this.vulnerable.id); //后面应该换成易损件的ID
|
|
|
}
|
|
|
this.http.uploadFile( this.port.mold.moldMaintain, form,
|
|
|
res => {
|
|
@@ -839,7 +859,7 @@
|
|
|
this.getList();
|
|
|
this.getDetail();
|
|
|
this.getAlternativeEquipment();
|
|
|
-
|
|
|
+ this.getVulnerableList();//获取易损件列表
|
|
|
const that = this
|
|
|
window.onresize = function temp() {
|
|
|
that.echarts2.resize();
|