检测值修改

master
shaoyong 6 months ago
parent 8d4db7b7b8
commit f84994ee02

@ -121,18 +121,6 @@
></el-switch>
</template>
</el-table-column>
<el-table-column label="更新" align="center" class-name="small-padding fixed-width" >
<template slot-scope="scope">
<el-button
v-if="scope.row.weight === '1'"
size="mini"
type="text"
icon="el-icon-refresh"
@click="getList"
v-hasPermi="['quality:qcIncome:edit']"
>更新</el-button>
</template>
</el-table-column>
</el-table>
<pagination
@ -167,6 +155,7 @@
<el-form-item>
<el-button type="primary" @click="submitForm('dynamicValidateForm')"></el-button>
<el-button @click="addDomain"></el-button>
<el-button v-if="this.weight === '1'" type="primary" icon="el-icon-refresh" @click="handleWeightValue"></el-button>
<el-button @click="resetForm('dynamicValidateForm')"></el-button>
</el-form-item>
</el-form>
@ -195,7 +184,7 @@
</template>
<script>
import { getCkeckProjectList,changeCheckDetailStatus,commitActualValue,commitCheckResult,getDefectList} from "@/api/quality/income";
import { getCkeckProjectList,changeCheckDetailStatus,commitActualValue,commitCheckResult,getDefectList,getWeightValue} from "@/api/quality/income";
import { getDefectValue, commitDefectValue, updateDefectValue} from "@/api/quality/checkTaskDefect";
export default {
name: "itemSelectUser",
@ -245,6 +234,7 @@ export default {
valueOpen: false,
//id
recordId:'',
weight: null,
//belongTo
belongTo:'',
//
@ -417,7 +407,19 @@ export default {
handleShowValue(row) {
this.valueOpen = true;
this.recordId = row.recordId;
},
this.weight = row.weight;
const actualValue = row.actualValue;
if(actualValue !== null || actualValue !== ''){
this.dynamicValidateForm.domains = [];
let values = actualValue.split(",");
values.forEach((item,index) => {
this.dynamicValidateForm.domains.push({
value: item,
key: Date.now() + index
});
});
}
},
/** 不良类型弹窗 */
handleDefectType(row) {
this.defectForm.defectItems.forEach(item => {
@ -520,6 +522,29 @@ export default {
// defectForm.defectItems noOkQuality
this.defectForm.defectItems.forEach(item => (item.noOkQuality = 0));
},
handleWeightValue() {
const recordId = this.recordId;
getWeightValue(recordId).then(response => {
if(response.code === 200) {
let value = response.msg;
if(value !== null || value !== ''){
let arr = value.split(",");
console.log(arr);
arr.forEach((item,index)=> {
this.dynamicValidateForm.domains.push({
value: item,
key: Date.now() + index
});
});
}
console.log(this.dynamicValidateForm.domains);
}else {
this.$modal.msgError(response.msg);
}
});
}
}
};

Loading…
Cancel
Save