Browse Source

2023-09-28 设备和质量修改

java8
杨奉源 2 years ago
parent
commit
0187209d14
  1. 4
      src/views/modules/eam/com_eam_knowledge_base_upload_file.vue
  2. 94
      src/views/modules/eam/eam_knowledge_base.vue

4
src/views/modules/eam/com_eam_knowledge_base_upload_file.vue

@ -15,7 +15,7 @@
</el-col>
<el-col :span="8">
<el-form-item class="customer-item" label="故障原因:" >
<el-input v-model="pageData.defectReason" style="width: 120px;" disabled ></el-input>
<el-input v-model="pageData.defectDesc" style="width: 120px;" disabled ></el-input>
</el-form-item>
</el-col>
</el-row>
@ -69,7 +69,7 @@ export default {
objectId: '',
objectName: '',
defectId: '',
defectReason: '',
defectDesc: '',
fileRemark: '',
},
dataListLoading: false,

94
src/views/modules/eam/eam_knowledge_base.vue

@ -14,7 +14,7 @@
<el-input v-model="searchData.defectId" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'故障原因:'">
<el-input v-model="searchData.defectReason" style="width: 120px"></el-input>
<el-input v-model="searchData.defectDesc" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'故障描述:'">
<el-input v-model="searchData.defectDescribe" style="width: 120px"></el-input>
@ -127,18 +127,22 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="故障编码" prop="defectId" :rules="rules.defectIdType">
<el-select v-model="modalData.defectId" @change="defectIdChange()" placeholder="请选择" style="width: 120px">
<el-option
v-for = "i in defectList"
:key = "i.defectId"
:label = "i.defectId"
:value = "i.defectId">
</el-option>
</el-select>
<!-- <el-form-item label="故障编码" prop="defectId" :rules="rules.defectIdType">-->
<!-- <el-select v-model="modalData.defectId" @change="defectIdChange()" placeholder="请选择" style="width: 120px">-->
<!-- <el-option-->
<!-- v-for = "i in defectList"-->
<!-- :key = "i.defectId"-->
<!-- :label = "i.defectId"-->
<!-- :value = "i.defectId">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item prop="defectId" :rules="rules.defectIdType">
<span slot="label" @click="getBaseList(1054)"><a herf="#">故障编码</a></span>
<el-input v-model="modalData.defectId" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="故障原因:" prop="defectReason" :rules="rules.defectReasonType">
<el-input v-model="modalData.defectReason" disabled style="width: 120px"></el-input>
<el-form-item label="故障原因:" prop="defectDesc" :rules="rules.defectDescType">
<el-input v-model="modalData.defectDesc" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
@ -149,12 +153,12 @@
<el-option label="维修" value="维修"></el-option>
</el-select>
</el-form-item>
<el-form-item label="故障描述:" prop="defectDescribe" :rules="rules.defectDescribeType">
<el-form-item label="故障描述:">
<el-input v-model="modalData.defectDescribe" style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="处置措施:" prop="disposalMeasures" :rules="rules.disposalMeasuresType">
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="处置措施:">
<el-input v-model="modalData.disposalMeasures" style="width: 255px"></el-input>
</el-form-item>
</el-form>
@ -263,7 +267,7 @@
site: this.$store.state.user.site,
objectId: '',
defectId: '',
defectReason: '',
defectDesc: '',
defectDescribe: '',
fileType: '',
startDate: '',
@ -337,7 +341,7 @@
objectName: '',
fileType: '',
defectId: '',
defectReason: '',
defectDesc: '',
defectDescribe: '',
disposalMeasures: '',
fileId: '',
@ -402,7 +406,7 @@
fixed: '',
},
{
columnProp: 'defectReason',
columnProp: 'defectDesc',
align: 'center',
columnLabel: '故障原因',
columnHidden: false,
@ -514,7 +518,7 @@
trigger: 'change'
}
],
defectReasonType:[
defectDescType:[
{
required: true,
message: ' ',
@ -527,21 +531,7 @@
message: ' ',
trigger: 'change'
}
],
defectDescribeType:[
{
required: true,
message: ' ',
trigger: 'change'
}
],
disposalMeasuresType:[
{
required: true,
message: ' ',
trigger: 'change'
}
],
]
}
}
},
@ -572,7 +562,7 @@
defectIdChange(){
for (let i = 0; i < this.defectList.length; i++) {
if (this.defectList[i].defectId = this.modalData.defectId){
this.modalData.defectReason = this.defectList[i].defectReason
this.modalData.defectDesc = this.defectList[i].defectDesc
}
}
},
@ -585,6 +575,10 @@
strVal = this.modalData.objectId
this.$refs.baseList.init(val, strVal)
}
if (val === 1054) {
strVal = this.modalData.defectId
this.$refs.baseList.init(val, strVal)
}
})
},
/* 列表方法的回调 */
@ -592,10 +586,14 @@
if (this.tagNo === 200) {
this.modalData.objectId = val.ObjectID
this.modalData.objectName = val.ObjectDesc
this.defectList = []
this.modalData.defectId = ''
this.modalData.defectReason = ''
this.getDefectList()
// this.defectList = []
// this.modalData.defectId = ''
// this.modalData.defectDesc = ''
// this.getDefectList()
}
if (this.tagNo === 1054) {
this.modalData.defectId = val.DefectID
this.modalData.defectDesc = val.DefectDesc
}
},
//
@ -652,7 +650,7 @@
objectName: '',
fileType: '',
defectId: '',
defectReason: '',
defectDesc: '',
defectDescribe: '',
disposalMeasures: '',
fileId: '',
@ -673,7 +671,7 @@
objectName: row.objectName,
fileType: row.fileType,
defectId: row.defectId,
defectReason: row.defectReason,
defectDesc: row.defectDesc,
defectDescribe: row.defectDescribe,
disposalMeasures: row.disposalMeasures,
fileId: row.fileId,
@ -709,18 +707,6 @@
})
return false
}
if (this.modalData.defectDescribe === '' || this.modalData.defectDescribe == null) {
this.$alert('请填写故障描述!', '错误', {
confirmButtonText: '确定'
})
return false
}
if (this.modalData.disposalMeasures === '' || this.modalData.disposalMeasures == null) {
this.$alert('请填写处置措施!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(this.modalData.flag === '1'){
saveKnowledgeBase(this.modalData).then(({data}) => {
if (data && data.code === 0) {
@ -881,7 +867,7 @@
objectId: this.currentRow.objectId,
objectName: this.currentRow.objectName,
defectId: this.currentRow.defectId,
defectReason: this.currentRow.defectReason,
defectDesc: this.currentRow.defectDesc,
}
//
this.$nextTick(() => {

Loading…
Cancel
Save