|
|
@ -139,7 +139,7 @@
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
<!--测量值弹窗-->
|
|
|
|
<!--测量值弹窗-->
|
|
|
|
<el-dialog title="测量值" :visible.sync="valueOpen" width="600px" append-to-body>
|
|
|
|
<el-dialog title="测量值" :visible.sync="valueOpen" width="600px" append-to-body>
|
|
|
|
<el-form :model="dynamicValidateForm" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
|
|
|
|
<el-form :model="dynamicValidateForm" v-loading="dyloading" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
|
|
|
|
<el-form-item
|
|
|
|
<el-form-item
|
|
|
|
v-for="(domain, index) in dynamicValidateForm.domains"
|
|
|
|
v-for="(domain, index) in dynamicValidateForm.domains"
|
|
|
|
:label="'测量值' + index"
|
|
|
|
:label="'测量值' + index"
|
|
|
@ -156,7 +156,7 @@
|
|
|
|
<el-button type="primary" @click="submitForm('dynamicValidateForm')">提交</el-button>
|
|
|
|
<el-button type="primary" @click="submitForm('dynamicValidateForm')">提交</el-button>
|
|
|
|
<el-button @click="addDomain">新增测量值</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 v-if="this.weight === '1'" type="primary" icon="el-icon-refresh" @click="handleWeightValue">自动获取</el-button>
|
|
|
|
<el-button @click="resetForm('dynamicValidateForm')">重置</el-button>
|
|
|
|
<el-button @click="handleResetForm()">重置</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
@ -192,7 +192,8 @@ export default {
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
viewStatus : '0',
|
|
|
|
viewStatus : '0',
|
|
|
|
showFlag : false,
|
|
|
|
showFlag: false,
|
|
|
|
|
|
|
|
dyloading: false,
|
|
|
|
// 选中数组
|
|
|
|
// 选中数组
|
|
|
|
selectedRows: {},
|
|
|
|
selectedRows: {},
|
|
|
|
// 非单个禁用
|
|
|
|
// 非单个禁用
|
|
|
@ -389,6 +390,12 @@ export default {
|
|
|
|
this.showFlag = false;
|
|
|
|
this.showFlag = false;
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 使用nextTick解决循环引用问题
|
|
|
|
|
|
|
|
handleResetForm() {
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
this.dynamicValidateForm.domains = [{ value: ''}];
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 数据状态修改/Y合格N不合格
|
|
|
|
// 数据状态修改/Y合格N不合格
|
|
|
|
/* handleStatusChange(row) {
|
|
|
|
/* handleStatusChange(row) {
|
|
|
@ -409,12 +416,13 @@ export default {
|
|
|
|
this.recordId = row.recordId;
|
|
|
|
this.recordId = row.recordId;
|
|
|
|
this.weight = row.weight;
|
|
|
|
this.weight = row.weight;
|
|
|
|
const actualValue = row.actualValue;
|
|
|
|
const actualValue = row.actualValue;
|
|
|
|
if(actualValue !== null || actualValue !== ''){
|
|
|
|
console.log(actualValue);
|
|
|
|
|
|
|
|
if(actualValue !== null && actualValue !== '') {
|
|
|
|
this.dynamicValidateForm.domains = [];
|
|
|
|
this.dynamicValidateForm.domains = [];
|
|
|
|
let values = actualValue.split(",");
|
|
|
|
let values = actualValue.split(",");
|
|
|
|
values.forEach((item,index) => {
|
|
|
|
values.forEach((item,index) => {
|
|
|
|
this.dynamicValidateForm.domains.push({
|
|
|
|
this.dynamicValidateForm.domains.push({
|
|
|
|
value: item,
|
|
|
|
value: item.toString(),
|
|
|
|
key: Date.now() + index
|
|
|
|
key: Date.now() + index
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -523,13 +531,14 @@ export default {
|
|
|
|
this.defectForm.defectItems.forEach(item => (item.noOkQuality = 0));
|
|
|
|
this.defectForm.defectItems.forEach(item => (item.noOkQuality = 0));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleWeightValue() {
|
|
|
|
handleWeightValue() {
|
|
|
|
|
|
|
|
this.dyloading = true;
|
|
|
|
const recordId = this.recordId;
|
|
|
|
const recordId = this.recordId;
|
|
|
|
getWeightValue(recordId).then(response => {
|
|
|
|
getWeightValue(recordId).then(response => {
|
|
|
|
if(response.code === 200) {
|
|
|
|
if(response.code === 200) {
|
|
|
|
let value = response.msg;
|
|
|
|
let value = response.msg;
|
|
|
|
if(value !== null || value !== ''){
|
|
|
|
if(value !== null && value !== ''){
|
|
|
|
let arr = value.split(",");
|
|
|
|
let arr = value.split(",");
|
|
|
|
console.log(arr);
|
|
|
|
this.dynamicValidateForm.domains = [];
|
|
|
|
arr.forEach((item,index)=> {
|
|
|
|
arr.forEach((item,index)=> {
|
|
|
|
this.dynamicValidateForm.domains.push({
|
|
|
|
this.dynamicValidateForm.domains.push({
|
|
|
|
value: item,
|
|
|
|
value: item,
|
|
|
@ -537,8 +546,7 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.dyloading = false;
|
|
|
|
console.log(this.dynamicValidateForm.domains);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|