|
|
@@ -0,0 +1,104 @@
|
|
|
+<template>
|
|
|
+ <el-dialog
|
|
|
+ title="历史版本"
|
|
|
+ :visible.sync="visible"
|
|
|
+ width="900px"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ row-key="id"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="datasource"
|
|
|
+ height="400px"
|
|
|
+ :need-page="false"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import { getSealHistoryList } from '@/api/sealManagement';
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'HistoryVersionDialog',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ sealId: null,
|
|
|
+ // 表格列配置
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 60,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sealNumber',
|
|
|
+ label: '印章编号',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 150,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'version',
|
|
|
+ label: '版本',
|
|
|
+ align: 'center',
|
|
|
+ width: 80
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'validPeriod',
|
|
|
+ label: '有效期',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 200,
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.isLongTerm == 1) {
|
|
|
+ return '长期有效';
|
|
|
+ }
|
|
|
+ if (row.validStartDate && row.validEndDate) {
|
|
|
+ return row.validStartDate + '至' + row.validEndDate;
|
|
|
+ }
|
|
|
+ return '-';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'changeTime',
|
|
|
+ label: '变更时间',
|
|
|
+ align: 'center',
|
|
|
+ width: 150
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 打开弹窗
|
|
|
+ open(sealId) {
|
|
|
+ this.sealId = sealId;
|
|
|
+ this.visible = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.table.reload();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 表格数据源
|
|
|
+ async datasource() {
|
|
|
+ if (!this.sealId) {
|
|
|
+ return { list: [], count: 0 };
|
|
|
+ }
|
|
|
+ const res = await getSealHistoryList(this.sealId);
|
|
|
+ const list = res || [];
|
|
|
+ return {
|
|
|
+ list: list,
|
|
|
+ count: list.length
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ ::v-deep .el-dialog__body {
|
|
|
+ padding: 10px 20px 20px;
|
|
|
+ }
|
|
|
+</style>
|