|
|
@@ -9,7 +9,8 @@
|
|
|
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:toolbar>
|
|
|
@@ -23,49 +24,27 @@
|
|
|
添加质检项
|
|
|
</el-button>
|
|
|
</template>
|
|
|
- <!-- 编码列 -->
|
|
|
|
|
|
- <template v-slot:name="{ row }">
|
|
|
- {{ row.qualityStandard && row.qualityStandard.name }}
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:code="{ row }">
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- @click="openDetail(row.qualityStandard)"
|
|
|
- >
|
|
|
- {{ row.qualityStandard && row.qualityStandard.code }}
|
|
|
- </el-link>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:type="{ row }">
|
|
|
+ <template v-slot:textType="{ row }">
|
|
|
{{
|
|
|
- getDictValue(
|
|
|
- '质检标准类型',
|
|
|
- row.qualityStandard && row.qualityStandard.type
|
|
|
- )
|
|
|
+ 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: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:version="{ row }">
|
|
|
- {{ row.qualityStandard && row.qualityStandard.version }}
|
|
|
+ <template v-slot:type="{ row }">
|
|
|
+ {{ getDictValue('质检标准类型', row.itemVO.type) }}
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:action="{ row }">
|
|
|
@@ -83,7 +62,10 @@
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
|
|
|
- <qualityItem ref="qualityItemRef" @chooseProcess="chooseProcess"></qualityItem>
|
|
|
+ <qualityItem
|
|
|
+ ref="qualityItemRef"
|
|
|
+ @chooseProcess="chooseProcess"
|
|
|
+ ></qualityItem>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -102,8 +84,6 @@
|
|
|
mixins: [dictMixins],
|
|
|
components: { userSearch, qualityItem },
|
|
|
props: {
|
|
|
- // 类别id
|
|
|
-
|
|
|
rootId: [Number, String]
|
|
|
},
|
|
|
data() {
|
|
|
@@ -111,72 +91,93 @@
|
|
|
// 当前编辑数据
|
|
|
current: null,
|
|
|
|
|
|
- // 表格列配置
|
|
|
columns: [
|
|
|
{
|
|
|
- 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: '版本号',
|
|
|
- align: 'center',
|
|
|
- minWidth: 110,
|
|
|
- slot: 'version'
|
|
|
+ label: '备注',
|
|
|
+ prop: 'inspectionRemark'
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
label: '操作',
|
|
|
- prop: 'action',
|
|
|
slot: 'action',
|
|
|
- action: 'action'
|
|
|
+ showOverflowTooltip: true
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- this.requestDict('质检方式');
|
|
|
- this.requestDict('质检标准类型');
|
|
|
- },
|
|
|
+ created() {},
|
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
|
datasource({ page, limit, where }) {
|
|
|
@@ -200,7 +201,7 @@
|
|
|
|
|
|
/* 打开编辑弹窗 */
|
|
|
openAdd() {
|
|
|
- this.$refs.qualityItemRef.open(this.categoryLevelId || 12)
|
|
|
+ this.$refs.qualityItemRef.open(this.categoryLevelId || 12);
|
|
|
},
|
|
|
|
|
|
openDetail(row) {
|
|
|
@@ -209,7 +210,6 @@
|
|
|
|
|
|
chooseProcess(data) {
|
|
|
saveBatch(data).then((res) => {
|
|
|
- console.log(res);
|
|
|
if (res.code == 0) {
|
|
|
this.$message.success(res.message);
|
|
|
this.reload();
|