|
|
@@ -25,17 +25,28 @@
|
|
|
:underline="false"
|
|
|
icon="el-icon-edit"
|
|
|
@click="openEdit('edit', row)"
|
|
|
+ v-if="row.isUpdate != 1 && [0, 3].includes(row.approvalStatus)"
|
|
|
>
|
|
|
编辑
|
|
|
</el-link>
|
|
|
- <!-- <el-link
|
|
|
+ <el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
icon="el-icon-edit"
|
|
|
- @click="openEdit('edit', row)"
|
|
|
+ @click="approvalSubmit(row)"
|
|
|
+ v-if="row.isUpdate != 1 && [0, 3].includes(row.approvalStatus)"
|
|
|
+ >
|
|
|
+ 发布
|
|
|
+ </el-link>
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="openEdit('edit', row, true)"
|
|
|
+ v-if="row.isUpdate != 1 && [2].includes(row.approvalStatus)"
|
|
|
>
|
|
|
- 发布模板
|
|
|
- </el-link> -->
|
|
|
+ 变更
|
|
|
+ </el-link>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
@@ -48,6 +59,7 @@
|
|
|
class="ele-action"
|
|
|
title="确定要删除此条数据吗?"
|
|
|
@confirm="remove(row.id)"
|
|
|
+ v-if="row.isUpdate != 1 && [0, 3].includes(row.approvalStatus)"
|
|
|
>
|
|
|
<template v-slot:reference>
|
|
|
<el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
@@ -61,6 +73,12 @@
|
|
|
|
|
|
<edit ref="editRef" @reload="reload"></edit>
|
|
|
<preview ref="previewRef" @reload="reload"></preview>
|
|
|
+ <processSubmitDialog
|
|
|
+ :processSubmitDialogFlag.sync="processSubmitDialogFlag"
|
|
|
+ v-if="processSubmitDialogFlag"
|
|
|
+ ref="processSubmitDialogRef"
|
|
|
+ @reload="search"
|
|
|
+ ></processSubmitDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -73,10 +91,11 @@
|
|
|
} from '@/api/qmsreporttemplate/index';
|
|
|
import edit from './components/edit.vue';
|
|
|
import preview from './components/preview.vue';
|
|
|
+ import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins, tableColumnsMixin],
|
|
|
- components: { edit, preview },
|
|
|
+ components: { edit, preview, processSubmitDialog },
|
|
|
data() {
|
|
|
return {
|
|
|
columns: [
|
|
|
@@ -118,6 +137,14 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '版本号',
|
|
|
+ prop: 'version',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ return `${row.versionSymbol}${row.bigVersion}${row.versionMark}${row.smallVersion}`;
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'remark',
|
|
|
label: '备注',
|
|
|
@@ -125,6 +152,20 @@
|
|
|
minWidth: 110,
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '状态',
|
|
|
+ prop: 'approvalStatus',
|
|
|
+ formatter: (row) => {
|
|
|
+ return row.approvalStatus == 0
|
|
|
+ ? '待发布'
|
|
|
+ : row.approvalStatus == 1
|
|
|
+ ? '审批中'
|
|
|
+ : row.approvalStatus == 2
|
|
|
+ ? '已发布'
|
|
|
+ : '审核不通过';
|
|
|
+ },
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
{
|
|
|
columnKey: 'action',
|
|
|
label: '操作',
|
|
|
@@ -136,6 +177,7 @@
|
|
|
showOverflowTooltip: true
|
|
|
}
|
|
|
],
|
|
|
+ processSubmitDialogFlag: false,
|
|
|
cacheKeyUrl: 'mes-259231040-material-table'
|
|
|
};
|
|
|
},
|
|
|
@@ -184,11 +226,27 @@
|
|
|
this.reload();
|
|
|
});
|
|
|
},
|
|
|
- openEdit(type, data) {
|
|
|
- this.$refs.editRef.open(type, data);
|
|
|
+ openEdit(type, data, isChange) {
|
|
|
+ this.$refs.editRef.open(type, data, isChange);
|
|
|
},
|
|
|
preview(row) {
|
|
|
this.$refs.previewRef.open('edit', row);
|
|
|
+ },
|
|
|
+ async approvalSubmit(res) {
|
|
|
+ this.processSubmitDialogFlag = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ let params = {
|
|
|
+ businessId: res.id,
|
|
|
+ businessKey: 'qms_quality_report_template_release',
|
|
|
+ formCreateUserId: res.createUserId,
|
|
|
+ variables: {
|
|
|
+ businessCode: res.code,
|
|
|
+ businessName: res.name,
|
|
|
+ businessType: '模板变更'
|
|
|
+ }
|
|
|
+ };
|
|
|
+ this.$refs.processSubmitDialogRef.init(params);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|