fix:qctDetail修正
This commit is contained in:
parent
f3015f58bf
commit
60d8ea8508
|
@ -9,7 +9,7 @@
|
|||
<div style="padding: 8px">
|
||||
<el-card style="width: 100%" header="基本信息" shadow="hover">
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="名称">{{qctItem.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="名称">{{qctItem.name}}</el-descriptions-item>
|
||||
<el-descriptions-item label="编号">{{qctItem.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="检测类型">
|
||||
<span v-for="(item,index) in qctItem.tags" :key="item">
|
||||
|
@ -106,6 +106,7 @@
|
|||
v-else
|
||||
:apiObj="apiObj2"
|
||||
v-model="scope.row.testitem"
|
||||
v-model:obj="testitemrow"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
|
@ -116,7 +117,7 @@
|
|||
<el-table-column prop="type" label="备注">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.note }}</span>
|
||||
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
|
||||
<el-input v-else v-model="testitemrow.description" placeholder="备注"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="open" label="操作" width="80" align="center">
|
||||
|
@ -162,6 +163,7 @@
|
|||
v-else
|
||||
:apiObj="apiObj3"
|
||||
v-model="scope.row.defect"
|
||||
v-model:obj="defectrow"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
|
@ -178,7 +180,7 @@
|
|||
<el-table-column prop="type" label="备注">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.note }}</span>
|
||||
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
|
||||
<el-input v-else v-model="defectrow.description" placeholder="备注"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="open" label="操作" width="80" align="center">
|
||||
|
@ -270,6 +272,8 @@ export default {
|
|||
sort:'',
|
||||
testitem:'',
|
||||
},
|
||||
defectrow:{},
|
||||
testitemrow:{},
|
||||
|
||||
};
|
||||
},
|
||||
|
@ -300,10 +304,14 @@ export default {
|
|||
formTableAdd(row,type) {
|
||||
let that = this,api = '';
|
||||
if(type=='defect'){
|
||||
console.log(that.defectrow);
|
||||
row.note = that.defectrow.description;
|
||||
api = that.$API.qm.qctdefect.create;
|
||||
}else if(type=='mat'){
|
||||
api = that.$API.qm.qctmat.create;
|
||||
}else if(type=='testitem'){
|
||||
console.log(that.testitemrow);
|
||||
row.note = that.testitemrow.description;
|
||||
api = that.$API.qm.qcttestitem.create;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
placeholder="字段类型"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="changeFieldType"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
|
@ -243,9 +244,11 @@ export default {
|
|||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form, data);
|
||||
// if(data.affects.length>0){
|
||||
// this.itemOptions
|
||||
// }
|
||||
},
|
||||
changeFieldType(){
|
||||
if(this.form.field_type == 'select-text'||this.form.field_type == 'selects-text'){}else{
|
||||
this.form.choices = [];
|
||||
}
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
|
|
Loading…
Reference in New Issue