|
|
@@ -32,13 +32,24 @@
|
|
|
|
|
|
<div class="content_ll">
|
|
|
<div class="name">状态</div>
|
|
|
- <div class="">
|
|
|
+ <div
|
|
|
+ style="width: 100%; display: flex; justify-content: space-between"
|
|
|
+ >
|
|
|
<el-tag size="small">{{
|
|
|
item.qualityStandard && item.qualityStandard.status == 1
|
|
|
? '启用'
|
|
|
: '停用'
|
|
|
- }}</el-tag></div
|
|
|
- >
|
|
|
+ }}</el-tag>
|
|
|
+
|
|
|
+ <el-link
|
|
|
+ type="danger"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handDel(index)"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </el-link>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<el-form ref="form" style="width: 100%">
|
|
|
@@ -46,7 +57,6 @@
|
|
|
style="margin-top: 15px"
|
|
|
:data="item.qualityStandard.parameterStandards"
|
|
|
border
|
|
|
-
|
|
|
>
|
|
|
<el-table-column
|
|
|
:label="item.qualityStandard.singleWeightDivision"
|
|
|
@@ -139,15 +149,26 @@
|
|
|
import { EventBus } from '@/utils/eventBus';
|
|
|
export default {
|
|
|
components: { termPop },
|
|
|
+
|
|
|
+ props: {
|
|
|
+ qualityParam: {
|
|
|
+ type: Array,
|
|
|
+ default() {
|
|
|
+
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
list: []
|
|
|
};
|
|
|
},
|
|
|
|
|
|
+
|
|
|
+
|
|
|
created() {
|
|
|
EventBus.$on('inspectionSelection', (data) => {
|
|
|
-
|
|
|
let _arr = this.updateOrCreateObjectInArray(this.list, data.message);
|
|
|
this.list = JSON.parse(JSON.stringify(_arr));
|
|
|
this.$forceUpdate();
|
|
|
@@ -168,6 +189,16 @@
|
|
|
// 如果不存在,将新对象添加到数组中
|
|
|
return [...array, newObj];
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ handDel(index) {
|
|
|
+ this.$confirm('是否删除该质检项', '删除', {
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.list.splice(index, 1);
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -188,15 +219,17 @@
|
|
|
}
|
|
|
|
|
|
.content_ll {
|
|
|
- width: 50%;
|
|
|
+ width: 48%;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
- margin-top: 4px;
|
|
|
+
|
|
|
+ margin: auto;
|
|
|
+ margin-top: 10px;
|
|
|
|
|
|
.name {
|
|
|
width: 130px;
|
|
|
color: #000;
|
|
|
- font-weight: 700;
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
|
}
|
|
|
</style>
|