|
|
@@ -2,7 +2,6 @@
|
|
|
<div>
|
|
|
<user-search @search="reload" ref="searchRef"> </user-search>
|
|
|
<!-- 数据表格 -->
|
|
|
-
|
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
|
:columns="columns"
|
|
|
@@ -10,46 +9,54 @@
|
|
|
height="calc(100vh - 365px)"
|
|
|
full-height="calc(100vh - 116px)"
|
|
|
tool-class="ele-toolbar-form"
|
|
|
- cache-key="systemOrgUserTable"
|
|
|
+ cache-key="inspectionClassify"
|
|
|
+ row-key="id"
|
|
|
>
|
|
|
- <!-- 编码列 -->
|
|
|
-
|
|
|
- <template v-slot:name="{ row }">
|
|
|
- {{ row.qualityStandard && row.qualityStandard.name }}
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:code="{ row }">
|
|
|
- <el-link
|
|
|
- @click="openDetail(row)"
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- >
|
|
|
- {{ row.qualityStandard && row.qualityStandard.code }}
|
|
|
- </el-link>
|
|
|
+ <!-- 表头工具栏 -->
|
|
|
+
|
|
|
+ <template v-slot:textType="{ row }">
|
|
|
+ {{
|
|
|
+ row.itemVO.textType == 1
|
|
|
+ ? '数值'
|
|
|
+ : row.itemVO.textType == 2
|
|
|
+ ? '选择'
|
|
|
+ : row.itemVO.textType == 3
|
|
|
+ ? '上下限'
|
|
|
+ : row.itemVO.textType == 4
|
|
|
+ ? '规格'
|
|
|
+ : row.itemVO.textType == 5
|
|
|
+ ? '时间'
|
|
|
+ : row.itemVO.textType == 6
|
|
|
+ ? '范围'
|
|
|
+ : ''
|
|
|
+ }}
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:type="{ row }">
|
|
|
- {{ getDictValue('质检标准类型', row.qualityStandard && row.qualityStandard.type) }}
|
|
|
+ {{ getDictValue('质检标准类型', row.itemVO.type) }}
|
|
|
</template>
|
|
|
|
|
|
- <template v-slot:standardCode="{ row }">
|
|
|
- {{ row.qualityStandard && row.qualityStandard.standardCode }}
|
|
|
- </template>
|
|
|
|
|
|
- <template v-slot:status="{ row }">
|
|
|
- {{ row.qualityStandard && row.qualityStandard.status == 1 ? '启用' : '停用' }}
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:mode="{ row }">
|
|
|
- {{ getDictValue('质检方式', row.mode) }}
|
|
|
- </template>
|
|
|
+ <template v-slot:toolList="{ row }">
|
|
|
+ <div style="display: inline-block;" v-for="(item,idx) in row.itemVO.toolList" :key="idx">{{ item.name }} <span v-if="row.itemVO.toolList && idx != row.itemVO.toolList.length - 1">, </span></div>
|
|
|
+ </template>
|
|
|
|
|
|
- <template v-slot:version="{ row }">
|
|
|
- {{ row.qualityStandard && row.qualityStandard.version }}
|
|
|
+ <template v-slot:action="{ row }">
|
|
|
+ <el-popconfirm
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除此质检项吗?"
|
|
|
+ @confirm="remove(row)"
|
|
|
+ >
|
|
|
+ <template v-slot:reference>
|
|
|
+ <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
+ 删除
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
|
|
|
- <Detail ref="detailRef" ></Detail>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -57,11 +64,11 @@
|
|
|
import userSearch from './user-search.vue';
|
|
|
import { getList } from '@/api/material/inspectionClassify';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
- import Detail from './edit.vue';
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
- components: { userSearch, Detail },
|
|
|
+ components: { userSearch },
|
|
|
props: {
|
|
|
// 类别id
|
|
|
|
|
|
@@ -72,57 +79,105 @@
|
|
|
// 当前编辑数据
|
|
|
current: null,
|
|
|
|
|
|
- // 表格列配置
|
|
|
columns: [
|
|
|
+
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'selection',
|
|
|
+ columnKey: 'selection',
|
|
|
+ align: 'center',
|
|
|
+ reserveSelection: true
|
|
|
+ },
|
|
|
+
|
|
|
{
|
|
|
- columnKey: 'index',
|
|
|
- type: 'index',
|
|
|
- label: '序号',
|
|
|
- width: 55,
|
|
|
- align: 'center'
|
|
|
+ prop: 'itemVO.inspectionCode',
|
|
|
+ label: '参数编码',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
- prop: 'code',
|
|
|
- label: '标准编码',
|
|
|
+ prop: 'itemVO.inspectionName',
|
|
|
+ label: '参数名称',
|
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110,
|
|
|
- slot: 'code'
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: 'name',
|
|
|
- label: '标准名称',
|
|
|
+ prop: 'itemVO.textType',
|
|
|
+ label: '参数类型',
|
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110,
|
|
|
- slot: 'name'
|
|
|
+ align: 'center',
|
|
|
+ slot: 'textType',
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
|
|
|
+ {
|
|
|
+ prop: 'itemVO.maxValue',
|
|
|
+ label: '参数上限',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'itemVO.minValue',
|
|
|
+ label: '参数下限',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'itemVO.defaultValue',
|
|
|
+ label: '默认值',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '工艺要求',
|
|
|
+ prop: 'itemVO.inspectionStandard',
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return (
|
|
|
+ row.itemVO.symbol + ' ' + cellValue + ' ' + row.itemVO.unit
|
|
|
+ );
|
|
|
+ },
|
|
|
+ minWidth: 150
|
|
|
+ },
|
|
|
{
|
|
|
label: '标准类型',
|
|
|
- prop: 'type',
|
|
|
+ prop: 'itemVO.type',
|
|
|
slot: 'type'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- label: '标准代码',
|
|
|
- prop: 'standardCode'
|
|
|
+ prop: 'itemVO.qualityStandardName',
|
|
|
+ label: '标准名称',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: 'status',
|
|
|
label: '状态',
|
|
|
- align: 'center',
|
|
|
- minWidth: 110,
|
|
|
- slot: 'status'
|
|
|
+ prop: 'status',
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return cellValue == 1 ? '启用' : cellValue === 0 ? '停用' : '';
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: 'version',
|
|
|
- label: '版本号',
|
|
|
+ prop: 'itemVO.toolList',
|
|
|
+ slot: 'toolList',
|
|
|
+ label: '设备名称',
|
|
|
align: 'center',
|
|
|
- minWidth: 110,
|
|
|
- slot: 'version'
|
|
|
+ minWidth: 150
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'inspectionRemark'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '操作',
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
@@ -162,9 +217,7 @@
|
|
|
this.reload();
|
|
|
},
|
|
|
|
|
|
- openDetail(row) {
|
|
|
- this.$refs.detailRef.open('detail',row);
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|