|
|
@@ -16,7 +16,11 @@
|
|
|
:data="form.parameterStandards"
|
|
|
border
|
|
|
height="40vh"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
>
|
|
|
+ <el-table-column type="selection" align="center" width="55">
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
<el-table-column :label="form.singleWeightDivision" align="center">
|
|
|
<el-table-column
|
|
|
label="参数上限"
|
|
|
@@ -67,6 +71,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
<el-table-column :label="form.tolerance" align="center">
|
|
|
<el-table-column label="质检标准" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
@@ -96,12 +101,7 @@
|
|
|
|
|
|
<template v-slot:footer>
|
|
|
<el-button @click="handleClose">取消</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- :loading="loading"
|
|
|
- @click="save"
|
|
|
- v-if="type != 'detail'"
|
|
|
- >
|
|
|
+ <el-button type="primary" :loading="loading" @click="save">
|
|
|
保存
|
|
|
</el-button>
|
|
|
</template>
|
|
|
@@ -109,6 +109,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { EventBus } from '@/utils/eventBus';
|
|
|
export default {
|
|
|
components: {},
|
|
|
|
|
|
@@ -129,13 +130,18 @@
|
|
|
visible: false,
|
|
|
|
|
|
type: '',
|
|
|
- loading: false
|
|
|
+ loading: false,
|
|
|
+
|
|
|
+ multipleSelection: [],
|
|
|
+ rowObj: {}
|
|
|
};
|
|
|
},
|
|
|
|
|
|
created() {},
|
|
|
methods: {
|
|
|
- open(type, row) {
|
|
|
+ open(type, rowItem) {
|
|
|
+ this.rowObj = rowItem;
|
|
|
+ let row = rowItem.qualityStandard || {};
|
|
|
this.type = type;
|
|
|
if (this.type != 'add') {
|
|
|
row.linePoints = row.linePoints || [];
|
|
|
@@ -152,11 +158,15 @@
|
|
|
this.visible = true;
|
|
|
},
|
|
|
|
|
|
- handleDeleteItem(index, list) {
|
|
|
- this.form[list].splice(index, 1);
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.multipleSelection = val;
|
|
|
},
|
|
|
+
|
|
|
/* 保存编辑 */
|
|
|
- save() {},
|
|
|
+ save() {
|
|
|
+ this.rowObj.qualityStandard.parameterStandards = this.multipleSelection;
|
|
|
+ EventBus.$emit('inspectionSelection', { message: this.rowObj });
|
|
|
+ },
|
|
|
restForm() {
|
|
|
this.form = { ...this.defaultForm() };
|
|
|
this.$nextTick(() => {
|