From 7c3193a7d368a10d979da43a2363d5f08f599efc Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期一, 27 十一月 2023 11:18:58 +0800
Subject: [PATCH] 持续优化
---
src/views/eam/DailyInspectionStandardList.vue | 183 +++++++++++++++++++++++++++++++++++++--------
1 files changed, 148 insertions(+), 35 deletions(-)
diff --git a/src/views/eam/DailyInspectionStandardList.vue b/src/views/eam/DailyInspectionStandardList.vue
index fea9f15..2ba59ba 100644
--- a/src/views/eam/DailyInspectionStandardList.vue
+++ b/src/views/eam/DailyInspectionStandardList.vue
@@ -1,6 +1,6 @@
<template>
<a-card
- title="鏃ュ父鐐规"
+ title="鑷富缁存姢鐐规鏍囧噯"
:bordered='false'
>
<div class='table-page-search-wrapper'>
@@ -66,7 +66,21 @@
@click='handleAdd'
type='primary'
icon='plus'
- >鏂板</a-button>
+ v-has="'dailyInspectionStandard:add'"
+ >缂栧埗</a-button>
+ <a-upload
+ name="file"
+ :showUploadList="false"
+ :multiple="false"
+ :headers="tokenHeader"
+ :action="importExcelUrl"
+ @change="handleImportExcel"
+ >
+ <a-button
+ type="primary"
+ icon="import"
+ >瀵煎叆</a-button>
+ </a-upload>
<a-button
type="primary"
@click="searchQuery"
@@ -98,7 +112,7 @@
size='middle'
bordered
rowKey='id'
- :scroll="{ x: 'calc(1400px + 50%)', y: 900 }"
+ :scroll="{ x: 'calc(2300px + 50%)', y: 900 }"
:columns='columns'
:dataSource='dataSource'
:pagination='ipagination'
@@ -134,28 +148,51 @@
slot="action"
slot-scope="text, record"
>
+
<a
- v-if="record.versionStatus == '2'"
- @click="handleRevise(record)"
- >鍗囩増</a>
+ v-show="record.versionStatus == '1' && record.approvalStatus == '1' "
+ @click="handleAuditApproval(record)"
+ v-has="'dailyInspectionStandard:audit'"
+ >瀹℃牳</a>
<a-divider type="vertical" />
<a
- v-if="record.versionStatus == '1'"
- @click="handleTakeEffect(record)"
- >鐢熸晥</a>
+ v-show="record.versionStatus == '1' && record.approvalStatus == '4'"
+ @click="handleAuditApproval(record)"
+ v-has="'dailyInspectionStandard:againAudit'"
+ >閲嶆柊瀹℃牳</a>
<a-divider type="vertical" />
<a
- v-if="record.versionStatus == '1'"
+ v-show="record.versionStatus == '1'&& record.approvalStatus == '3' "
+ @click="handleAuditApproval(record)"
+ v-has="'dailyInspectionStandard:approval'"
+ >瀹℃壒</a>
+ <a-divider type="vertical" />
+ <a
+ v-show="record.versionStatus == '1' && (record.approvalStatus == '1' || record.approvalStatus == '2')"
@click="handleEdit(record)"
+ v-has="'dailyInspectionStandard:edit'"
>缂栬緫</a>
<a-divider type="vertical" />
<a-popconfirm
- v-if="record.versionStatus == '1'"
+ v-show="record.versionStatus == '1' && (record.approvalStatus == '1' || record.approvalStatus == '2')"
title="纭畾鍒犻櫎鍚�?"
@confirm="() => handleDelete(record.id)"
+ v-has="'dailyInspectionStandard:delete'"
>
<a>鍒犻櫎</a>
</a-popconfirm>
+ <a-divider type="vertical" />
+ <a
+ v-show="record.versionStatus != '1'"
+ @click="handleRevise(record)"
+ v-has="'dailyInspectionStandard:revise'"
+ >鍗囩増</a>
+ <a-divider type="vertical" />
+ <a
+ v-show="record.versionStatus == '2'"
+ @click="handleTakeEffect(record)"
+ v-has="'dailyInspectionStandard:loseEfficacy'"
+ >澶辨晥</a>
</span>
</a-table>
@@ -179,6 +216,11 @@
ref='modalForm'
@ok='modalFormOk'
></dailylnspection-standard-modal>
+
+ <audit-approval-modal
+ ref='auditApprovalModal'
+ @ok='modalFormOk'
+ ></audit-approval-modal>
</a-card>
</template>
@@ -189,6 +231,7 @@
import { getAction, requestPut } from '@/api/manage'
import DailyInspectionStandardDetail from './modules/dailyInspectionStandard/DailyInspectionStandardDetail'
import DailylnspectionStandardModal from './modules/dailyInspectionStandard/DailylnspectionStandardModal'
+import AuditApprovalModal from './modules/dailyInspectionStandard/AuditApprovalModal'
import '@/assets/less/TableExpand.less'
export default {
@@ -196,7 +239,8 @@
mixins: [JeecgListMixin],
components: {
DailyInspectionStandardDetail,
- DailylnspectionStandardModal
+ DailylnspectionStandardModal,
+ AuditApprovalModal
},
data() {
return {
@@ -211,28 +255,20 @@
return parseInt(index) + 1
}
},
- {
- title: '鐗堟湰',
- align: 'center',
- dataIndex: 'version',
- },
- {
- title: '鐗堟湰鐘舵��',
- align: 'center',
- dataIndex: 'versionStatusName',
- },
+
{
title: '鏍囧噯缂栫爜',
align: 'center',
dataIndex: 'num',
},
{
- title: '瀵硅薄閮ㄩ棬',
+ title: '绛惧鐘舵��',
align: 'center',
- dataIndex: 'useDepartName',
+ dataIndex: 'approvalStatusName',
},
+
{
- title: '璁惧缂栫爜',
+ title: '缁熶竴缂栫爜',
align: 'center',
dataIndex: 'equipmentNum',
},
@@ -247,6 +283,11 @@
dataIndex: 'equipmentModel',
},
{
+ title: '浣跨敤閮ㄩ棬',
+ align: 'center',
+ dataIndex: 'useDepartName',
+ },
+ {
title: '璐d换鐝粍',
align: 'center',
dataIndex: 'teamName',
@@ -257,15 +298,69 @@
dataIndex: 'assignModeName',
},
{
- title: '鍒涘缓浜�',
+ title: '瀹℃牳鎰忚',
align: 'center',
- dataIndex: 'createBy',
+ dataIndex: 'auditFeedback',
},
{
- title: '鍒涘缓鏃ユ湡',
+ title: '瀹℃壒鎰忚',
+ align: 'center',
+ dataIndex: 'approvalFeedback',
+ },
+ {
+ title: '缂栧埗浜�',
+ align: 'center',
+ dataIndex: 'writePerson',
+ },
+ {
+ title: '瀹℃牳浜�',
+ align: 'center',
+ dataIndex: 'auditPerson',
+ },
+ {
+ title: '瀹℃壒浜�',
+ align: 'center',
+ dataIndex: 'approvalPerson',
+ },
+ {
+ title: '澶辨晥浜�',
+ align: 'center',
+ dataIndex: 'loseEfficacyPerson',
+ },
+ {
+ title: '缂栧埗鏃ユ湡',
align: 'center',
dataIndex: 'createTime',
+ width: 150,
},
+ {
+ title: '鐢熸晥鏃堕棿',
+ align: 'center',
+ dataIndex: 'takeEffectTime',
+ width: 150,
+ },
+ {
+ title: '澶辨晥鏃堕棿',
+ align: 'center',
+ dataIndex: 'loseEfficacyTime',
+ width: 150,
+ },
+ {
+ title: '鐗堟湰',
+ align: 'center',
+ dataIndex: 'version',
+ },
+ {
+ title: '鐗堟湰鐘舵��',
+ align: 'center',
+ dataIndex: 'versionStatusName',
+ },
+ // {
+ // title: '鍒涘缓浜�',
+ // align: 'center',
+ // dataIndex: 'createBy',
+ // },
+
// {
// title: '鏇存柊浜�',
// align: 'center',
@@ -290,6 +385,7 @@
delete: '/eam/inspectionStandard/delete',
deleteBatch: '/eam/inspectionStandard/deleteBatch',
versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect",
+ importExcelUrl: "/eam/inspectionStandard/importExcel",
},
version: '1.0',
dictOptions: {},
@@ -306,6 +402,11 @@
total: 0
},
inspectionStandardId: '-1'
+ }
+ },
+ computed: {
+ importExcelUrl: function () {
+ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
methods: {
@@ -346,6 +447,12 @@
this.$refs.modalForm.isRevise = false;
},
+ //瀹℃牳瀹℃壒
+ handleAuditApproval: function (record) {
+ this.$refs.auditApprovalModal.showModals(record);
+ this.$refs.auditApprovalModal.title = "瀹℃牳";
+ },
+
//鍗囩増
handleRevise: function (record) {
this.$refs.modalForm.edit(record);
@@ -353,23 +460,22 @@
this.$refs.modalForm.disableSubmit = false;
this.$refs.modalForm.isRevise = true;
},
-
- //鐢熸晥
+ //澶辨晥
handleTakeEffect(record) {
const that = this;
that.confirmLoading = true;
this.$confirm({
- title: '鏃ュ父鐐规鏍囧噯鐗堟湰鐢熸晥锛�',
- content: '鎻愮ず锛氱増鏈敓鏁堝悗涓婁竴鐗堟湰灏嗚嚜鍔ㄥけ鏁堬紝璇疯皑鎱庢搷浣滐紒',
+ title: '鏃ュ父鐐规鏍囧噯鐗堟湰澶辨晥锛�',
+ content: '鎻愮ず锛氱増鏈け鏁堝悗灏嗙姝娇鐢紝璇疯皑鎱庢搷浣滐紒',
okText: '纭',
cancelText: '鍙栨秷',
onOk() {
- requestPut(that.url.versionTakeEffect, { id: record.id, num: record.num, versionStatus: '2' }).then((res) => {
+ requestPut(that.url.versionTakeEffect, { id: record.id, num: record.num, versionStatus: '3' }).then((res) => {
if (res.success) {
- that.$message.success("鐗堟湰鐢熸晥鎴愬姛锛�")
+ that.$message.success("鐗堟湰澶辨晥鎴愬姛锛�")
that.loadData(1)
} else {
- that.$message.warning("鐗堟湰鐢熸晥澶辫触锛�")
+ that.$message.warning("鐗堟湰澶辨晥澶辫触锛�")
}
}).finally(() => {
that.confirmLoading = false;
@@ -411,6 +517,13 @@
this.queryParam = {}
this.loadData(1);
},
+ modalFormOk() {
+ // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
+ this.loadData();
+ //娓呯┖鍒楄〃閫変腑
+ // this.onClearSelected()
+ },
+
}
}
</script>
--
Gitblit v1.9.3