|
@@ -1,22 +1,48 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-dialog title="历史版本" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="false"
|
|
<el-dialog title="历史版本" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="false"
|
|
|
:close-on-press-escape="false" append-to-body width="60%">
|
|
:close-on-press-escape="false" append-to-body width="60%">
|
|
|
-
|
|
|
|
|
- <ele-pro-table ref="table" :columns="columns" :datasource="datasource" height="calc(100vh - 350px)"
|
|
|
|
|
- class="dict-table">
|
|
|
|
|
- <!-- 表头工具栏 -->
|
|
|
|
|
- <template v-slot:action="{ row }">
|
|
|
|
|
- <el-radio class="radio" v-model="radio" :label="row.id"><i></i></el-radio>
|
|
|
|
|
- </template>
|
|
|
|
|
- </ele-pro-table>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-col :span="8">
|
|
|
|
|
+ <el-form-item label="工艺路线编码:">
|
|
|
|
|
+ <span> {{ form.code }} </span>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="8">
|
|
|
|
|
+ <el-form-item label="工艺路线名称:">
|
|
|
|
|
+ <span> {{ form.name }} </span>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="8">
|
|
|
|
|
+ <el-form-item label="产品编码:">
|
|
|
|
|
+ <span> {{ form.categoryCode }} </span>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="8">
|
|
|
|
|
+ <el-form-item label="产品名称:">
|
|
|
|
|
+ <span> {{ form.categoryName }} </span>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <ele-pro-table ref="table" :columns="columns" :datasource="datasource" height="calc(100vh - 350px)"
|
|
|
|
|
+ class="dict-table">
|
|
|
|
|
+ <!-- 表头工具栏 -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 状态列 -->
|
|
|
|
|
+ <template v-slot:status="{ row }">
|
|
|
|
|
+ {{ checkStatus(row) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ </ele-pro-table>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import AssetTree from '@/components/AssetTree';
|
|
import AssetTree from '@/components/AssetTree';
|
|
|
-import { getHistoryByCode } from '@/api/technology/version/version.js';
|
|
|
|
|
|
|
+import route from '@/api/technology/route';
|
|
|
export default {
|
|
export default {
|
|
|
components: { AssetTree },
|
|
components: { AssetTree },
|
|
|
data() {
|
|
data() {
|
|
@@ -32,34 +58,63 @@ export default {
|
|
|
reserveSelection: true
|
|
reserveSelection: true
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'code',
|
|
|
|
|
- label: '产品编码'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'name',
|
|
|
|
|
- label: '产品名称',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
|
|
+ prop: 'version',
|
|
|
|
|
+ label: '版本',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'brandNum',
|
|
|
|
|
- label: '牌号'
|
|
|
|
|
|
|
+ prop: 'status',
|
|
|
|
|
+ label: '状态',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ slot: 'status',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
- prop: 'modelType',
|
|
|
|
|
- label: '型号'
|
|
|
|
|
|
|
+ prop: 'createTime',
|
|
|
|
|
+ label: '创建日期',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
- prop: 'measuringUnit',
|
|
|
|
|
- label: '计量单位'
|
|
|
|
|
|
|
+ prop: 'releaseTime',
|
|
|
|
|
+ label: '发布日期',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
- prop: 'packingUnit',
|
|
|
|
|
- label: '包装单位'
|
|
|
|
|
|
|
+ prop: 'downTime',
|
|
|
|
|
+ label: '停用时间',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
|
|
+ statusList: [
|
|
|
|
|
+ { label: '草稿', value: -1 },
|
|
|
|
|
+ { label: '失效', value: 0 },
|
|
|
|
|
+ { label: '生效', value: 1 }
|
|
|
],
|
|
],
|
|
|
-
|
|
|
|
|
form: null
|
|
form: null
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -68,15 +123,20 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
- datasource({ page, where, limit }) {
|
|
|
|
|
- return getHistoryByCode(this.form.id);
|
|
|
|
|
|
|
+ async datasource({ page, limit }) {
|
|
|
|
|
+ const res = await route.list({
|
|
|
|
|
+ code: this.form.code,
|
|
|
|
|
+
|
|
|
|
|
+ pageNum: page,
|
|
|
|
|
+ size: limit
|
|
|
|
|
+ });
|
|
|
|
|
+ return res;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
open(item) {
|
|
open(item) {
|
|
|
if (item) {
|
|
if (item) {
|
|
|
- this.form = item
|
|
|
|
|
- console.log( this.form )
|
|
|
|
|
|
|
+ this.form = item
|
|
|
}
|
|
}
|
|
|
this.visible = true
|
|
this.visible = true
|
|
|
},
|
|
},
|
|
@@ -84,8 +144,13 @@ export default {
|
|
|
|
|
|
|
|
handleClose() {
|
|
handleClose() {
|
|
|
this.visible = false
|
|
this.visible = false
|
|
|
- this.current = null
|
|
|
|
|
- this.radio = ''
|
|
|
|
|
|
|
+ this.form = null
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ checkStatus(row) {
|
|
|
|
|
+ let obj = this.statusList.find((it) => it.value == row.status);
|
|
|
|
|
+ return obj.label;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
}
|
|
}
|