From a1faa94fbf85553f22da934a1abc745d89dd8667 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期一, 19 十月 2026 17:23:49 +0800
Subject: [PATCH] fix: 取消设备核查/比对的身份限制与三张设备计划的审批功能
---
src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue | 108 +-----------------------------------------------------
1 files changed, 2 insertions(+), 106 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
index 7ebc381..0c19357 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
@@ -11,10 +11,6 @@
</div>
<div>
<el-button size="small" type="primary" @click="loadPlan">鍒锋柊</el-button>
- <el-button size="small" type="primary" :disabled="planInfo.status === 1"
- @click="tellApprove">瀹℃牳閫氱煡</el-button>
- <el-button size="small" type="primary"
- :disabled="planInfo.status === 1 || userId != planInfo.auditId" @click="handleApprove">瀹℃牳</el-button>
<el-button size="small" type="primary" :loading="outLoading" @click="handleDownOne">瀵煎嚭</el-button>
</div>
</div>
@@ -23,7 +19,6 @@
<span>缂栧埗鏃ユ湡锛歿{ planInfo.datePreparationStr || '鈥�' }}</span>
<span v-if="planInfo.status === 1">瀹℃牳鐘舵�侊細<el-tag type="success">閫� 杩�</el-tag></span>
<span v-else-if="planInfo.status === 0">瀹℃牳鐘舵�侊細<el-tag type="danger">涓嶉�氳繃</el-tag></span>
- <span v-else>瀹℃牳鐘舵�侊細<el-tag type="info">鏈鏍�</el-tag></span>
<span v-if="planInfo.auditRemark">瀹℃牳淇℃伅锛歿{ planInfo.auditRemark }}</span>
<span v-if="isAudited && planInfo.audit">瀹℃牳浜猴細{{ planInfo.audit }}</span>
<span v-if="isAudited && planInfo.auditDateStr">瀹℃牳鏃堕棿锛歿{ planInfo.auditDateStr }}</span>
@@ -66,10 +61,10 @@
:formatter="formatDateCell"></el-table-column>
<el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="160">
<template #default="scope">
- <el-button size="small" link type="primary" :disabled="planInfo.status === 1"
+ <el-button size="small" link type="primary"
@click="handleForm('edit', scope.row)">缂栬緫</el-button>
<el-button size="small" link type="primary" @click="handleForm('view', scope.row)">鏌ョ湅</el-button>
- <el-button size="small" link type="danger" :disabled="planInfo.status === 1"
+ <el-button size="small" link type="danger"
@click="deleteRow(scope.row)">鍒犻櫎</el-button>
</template>
</el-table-column>
@@ -132,45 +127,18 @@
v-if="operationType !== 'view'">纭� 璁�</el-button>
</span></template>
</el-dialog>
- <el-dialog v-model="approvalDialog" title="瀹℃牳" width="30%" @close="approvalDialog = false">
- <span>
- 瀹℃牳淇℃伅锛�
- <el-input v-model="approvalRemark" type="textarea"></el-input>
- </span>
- <template #footer><span class="dialog-footer">
- <el-button :loading="approvalLoading" @click="handleApproval(0)">涓嶉�氳繃</el-button>
- <el-button :loading="approvalLoading" type="primary" @click="handleApproval(1)">閫� 杩�</el-button>
- </span></template>
- </el-dialog>
- <el-dialog v-model="notificationDia" title="鎻愪氦瀹℃牳" width="30%" @close="closeNotificationDia">
- <span style="margin-top: 10px;display: inline-block">
- 璇烽�夋嫨瀹℃牳浜猴細
- <el-select v-model="auditUserId" clearable filterable size="small" style="width: 90%;">
- <el-option v-for="item in responsibleOptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </span>
- <template #footer><span class="dialog-footer">
- <el-button :loading="notificationLoading" @click="closeNotificationDia">鍙� 娑�</el-button>
- <el-button :loading="notificationLoading" type="primary" @click="notification">鎻� 浜�</el-button>
- </span></template>
- </el-dialog>
</div>
</template>
<script>
import {
selectDeviceMaintenancePlanByPage,
- submitReviewMaintenancePlanStatus,
getMaintenancePlanByYear,
pageMaintenancePlanDetail,
updateMaintenancePlanDetail,
deleteMaintenancePlanDetail,
exportDeviceMaintenancePlan,
- reviewMaintenancePlanStatus,
} from '@/api/cnas/resourceDemand/device.js'
-import { selectUserCondition } from "@/api/business/inspectionTask";
-import { mapGetters } from "@/utils/store-compat";
import { formatDateOnly } from './dateFormat'
import { saveBlobOrShowError } from '@/utils/saveBlob'
export default {
@@ -207,13 +175,6 @@
},
submitFormLoading: false,
outLoading: false,
- responsibleOptions: [],
- notificationDia: false,
- notificationLoading: false,
- auditUserId: '',
- approvalDialog: false,
- approvalLoading: false,
- approvalRemark: '',
}
},
mounted() {
@@ -374,59 +335,6 @@
});
});
},
- // 鎵撳紑鎻愪氦瀹℃牳寮规
- tellApprove() {
- this.getUserList()
- this.notificationDia = true
- },
- // 鍏抽棴鎻愪氦瀹℃牳寮规
- closeNotificationDia() {
- this.notificationDia = false
- this.auditUserId = ''
- },
- // 鎻愪氦瀹℃牳閫氱煡
- notification() {
- if (!this.auditUserId) {
- this.$message.warning('璇烽�夋嫨瀹℃牳浜�')
- return
- }
- this.notificationLoading = true
- submitReviewMaintenancePlanStatus({
- auditId: this.auditUserId,
- maintenancePlanId: this.planInfo.maintenancePlanId,
- }).then(res => {
- this.notificationLoading = false
- if (res.code == 200) {
- this.closeNotificationDia()
- this.loadPlan()
- }
- }).catch(() => {
- this.notificationLoading = false
- })
- },
- // 鎵撳紑瀹℃牳寮规
- handleApprove() {
- this.approvalRemark = ''
- this.approvalDialog = true
- },
- // 鎻愪氦瀹℃牳缁撴灉
- handleApproval(status) {
- this.approvalLoading = true
- reviewMaintenancePlanStatus({
- maintenancePlanId: this.planInfo.maintenancePlanId,
- status: status,
- auditRemark: this.approvalRemark,
- }).then(res => {
- if (res.code == 200) {
- this.$message.success('瀹℃牳鎴愬姛锛�');
- this.approvalDialog = false
- this.loadPlan()
- }
- this.approvalLoading = false
- }).catch(() => {
- this.approvalLoading = false
- })
- },
// 瀵煎嚭
handleDownOne() {
this.outLoading = true
@@ -436,21 +344,9 @@
}).catch(() => {
this.outLoading = false
})
- },
- // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
- getUserList() {
- selectUserCondition().then(res => {
- if (res.code == 200) {
- this.responsibleOptions = (res.data || []).map(item => ({
- label: item.name,
- value: item.id,
- }))
- }
- });
}
},
computed: {
- ...mapGetters(["userId"]),
// 鏄惁宸插畬鎴愬鏍革紙閫氳繃/涓嶉�氳繃锛�
isAudited() {
return this.planInfo.status === 0 || this.planInfo.status === 1;
--
Gitblit v1.9.3