|
|
@@ -1,13 +1,25 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <user-search @search="reload" ref="searchRef">
|
|
|
- </user-search>
|
|
|
+ <user-search @search="reload" ref="searchRef"> </user-search>
|
|
|
<!-- 数据表格 -->
|
|
|
- <ele-pro-table ref="table" :columns="columns" :datasource="datasource" height="calc(100vh - 265px)"
|
|
|
- full-height="calc(100vh - 116px)" tool-class="ele-toolbar-form" cache-key="systemOrgUserTable">
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="datasource"
|
|
|
+ height="calc(100vh - 265px)"
|
|
|
+ full-height="calc(100vh - 116px)"
|
|
|
+ tool-class="ele-toolbar-form"
|
|
|
+ cache-key="systemOrgUserTable"
|
|
|
+ >
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
|
- <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openAdd()">
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ @click="openAdd()"
|
|
|
+ >
|
|
|
新增
|
|
|
</el-button>
|
|
|
</template>
|
|
|
@@ -17,48 +29,50 @@
|
|
|
{{ row.qualityStandard.name }}
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
<template v-slot:code="{ row }">
|
|
|
- {{ row.qualityStandard.code }}
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ @click="openDetail(row.qualityStandard)"
|
|
|
+ >
|
|
|
+ {{ row.qualityStandard.code }}
|
|
|
+ </el-link>
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
<template v-slot:type="{ row }">
|
|
|
-
|
|
|
- {{getDictValue('质检标准类型', row.qualityStandard.type)}}
|
|
|
-
|
|
|
+ {{ getDictValue('质检标准类型', row.qualityStandard.type) }}
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:standardCode="{ row }">
|
|
|
{{ row.qualityStandard.standardCode }}
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
<template v-slot:status="{ row }">
|
|
|
{{ row.qualityStandard.status == 1 ? '启用' : '停用' }}
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
<template v-slot:mode="{ row }">
|
|
|
{{ getDictValue('质检方式', row.mode) }}
|
|
|
-
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
<template v-slot:version="{ row }">
|
|
|
{{ row.qualityStandard.version }}
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
<template v-slot:action="{ row }">
|
|
|
- <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit(row)">
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="openEdit(row)"
|
|
|
+ >
|
|
|
添加
|
|
|
</el-link>
|
|
|
- <el-popconfirm class="ele-action" title="确定要删除此干燥区吗?" @confirm="remove(row)">
|
|
|
+ <el-popconfirm
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除此干燥区吗?"
|
|
|
+ @confirm="remove(row)"
|
|
|
+ >
|
|
|
<template v-slot:reference>
|
|
|
<el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
删除
|
|
|
@@ -66,13 +80,13 @@
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
-
|
|
|
-
|
|
|
</ele-pro-table>
|
|
|
|
|
|
<Add @chooseProcess="chooseProcess" ref="addRef" />
|
|
|
|
|
|
<edit ref="edit" @done="done"></edit>
|
|
|
+ <Detail ref="detailRef"></Detail>
|
|
|
+
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -82,23 +96,22 @@ import userSearch from './user-search.vue';
|
|
|
import { getList, removeItem, saveBatch } from '@/api/inspectionClassify/index';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import Add from './add.vue';
|
|
|
-import Edit from './edit.vue'
|
|
|
+import Edit from './edit.vue';
|
|
|
+import Detail from '@/views/inspectionStandard/components/edit.vue';
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
- components: { userSearch, Add, Edit },
|
|
|
+ components: { userSearch, Add, Edit ,Detail},
|
|
|
props: {
|
|
|
// 类别id
|
|
|
|
|
|
- rootId: [Number, String],
|
|
|
+ rootId: [Number, String]
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
// 当前编辑数据
|
|
|
current: null,
|
|
|
|
|
|
-
|
|
|
-
|
|
|
// 表格列配置
|
|
|
columns: [
|
|
|
{
|
|
|
@@ -106,7 +119,7 @@ export default {
|
|
|
type: 'index',
|
|
|
label: '序号',
|
|
|
width: 55,
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -114,39 +127,34 @@ export default {
|
|
|
label: '标准编码',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110,
|
|
|
- slot: 'code',
|
|
|
+ slot: 'code'
|
|
|
},
|
|
|
|
|
|
-
|
|
|
-
|
|
|
{
|
|
|
prop: 'name',
|
|
|
label: '标准名称',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110,
|
|
|
- slot: 'name',
|
|
|
+ slot: 'name'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
label: '标准类型',
|
|
|
prop: 'type',
|
|
|
- slot: 'type',
|
|
|
+ slot: 'type'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
label: '标准代码',
|
|
|
- prop: 'standardCode',
|
|
|
-
|
|
|
+ prop: 'standardCode'
|
|
|
},
|
|
|
|
|
|
-
|
|
|
-
|
|
|
{
|
|
|
prop: 'status',
|
|
|
label: '状态',
|
|
|
align: 'center',
|
|
|
minWidth: 110,
|
|
|
- slot: 'status',
|
|
|
+ slot: 'status'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -154,29 +162,21 @@ export default {
|
|
|
label: '版本号',
|
|
|
align: 'center',
|
|
|
minWidth: 110,
|
|
|
- slot: 'version',
|
|
|
+ slot: 'version'
|
|
|
},
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
{
|
|
|
label: '操作',
|
|
|
prop: 'action',
|
|
|
slot: 'action',
|
|
|
action: 'action'
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
]
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.requestDict('质检方式');
|
|
|
- this.requestDict('质检标准类型')
|
|
|
+ this.requestDict('质检标准类型');
|
|
|
},
|
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
|
@@ -191,7 +191,12 @@ export default {
|
|
|
},
|
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
|
- this.$refs.table.reload({ pageNum: 1, where: where, categoryLevelId: this.categoryLevelId, rootCategoryLevelId: this.rootId });
|
|
|
+ this.$refs.table.reload({
|
|
|
+ pageNum: 1,
|
|
|
+ where: where,
|
|
|
+ categoryLevelId: this.categoryLevelId,
|
|
|
+ rootCategoryLevelId: this.rootId
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
/* 打开编辑弹窗 */
|
|
|
@@ -202,19 +207,21 @@ export default {
|
|
|
openEdit(row) {
|
|
|
this.$refs.edit.open(row);
|
|
|
},
|
|
|
-
|
|
|
+ openDetail(row) {
|
|
|
+ console.log(row)
|
|
|
+ this.$refs.detailRef.open('detail',row);
|
|
|
+ },
|
|
|
+
|
|
|
chooseProcess(data) {
|
|
|
- saveBatch(data).then(res => {
|
|
|
- console.log(res)
|
|
|
+ saveBatch(data).then((res) => {
|
|
|
+ console.log(res);
|
|
|
if (res.code == 0) {
|
|
|
- this.$message.success(res.message)
|
|
|
- this.reload()
|
|
|
+ this.$message.success(res.message);
|
|
|
+ this.reload();
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
-
|
|
|
/* 删除 */
|
|
|
remove(row) {
|
|
|
const loading = this.$loading({ lock: true });
|
|
|
@@ -233,15 +240,10 @@ export default {
|
|
|
},
|
|
|
|
|
|
clickSearch(info) {
|
|
|
- this.categoryLevelId = info.id
|
|
|
- this.rootCategoryLevelId = info.rootCategoryLevelId
|
|
|
- this.reload()
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
+ this.categoryLevelId = info.id;
|
|
|
+ this.rootCategoryLevelId = info.rootCategoryLevelId;
|
|
|
+ this.reload();
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|