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/equipmentCalibrationPlan.vue | 113 +-------------------------------------------------------
1 files changed, 2 insertions(+), 111 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
index 58862d8..07c0f0d 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.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.ratifyStatus === 1"
- @click="tellApprove">鎵瑰噯閫氱煡</el-button>
- <el-button size="small" type="primary"
- :disabled="planInfo.ratifyStatus === 1 || userId != planInfo.ratifyUserId" @click="handleApprove">鎵瑰噯</el-button>
<el-button size="small" type="primary" @click="downLoadPost">瀵煎嚭</el-button>
</div>
</div>
@@ -67,10 +63,10 @@
<template #default="scope">
<el-button size="small" link type="primary" :disabled="!scope.row.deviceId"
@click="handleExecute(scope.row)">鎵ц</el-button>
- <el-button size="small" link type="primary" :disabled="planInfo.ratifyStatus === 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.ratifyStatus === 1"
+ <el-button size="small" link type="danger"
@click="deleteFun1(scope.row.planDetailId)">鍒犻櫎</el-button>
</template>
</el-table-column>
@@ -138,29 +134,6 @@
璁�</el-button>
</span></template>
</el-dialog>
- <el-dialog v-model="approvalDialog" title="鎵瑰噯" width="30%" @close="approvalDialog = false">
- <span>
- 鎵瑰噯澶囨敞锛�
- <el-input v-model="ratifyRemark" 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="ratifyUserId" 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>
<!-- 娣诲姞/鏌ョ湅鏍″噯璁板綍寮圭獥 -->
<calibration-record-dia ref="calibrationRecordDia" @success="getYearTableDetailData"></calibration-record-dia>
</div>
@@ -171,15 +144,11 @@
import {
pageDeviceCalibrationPlan,
getCalibrationPlanByYear,
- submiatRatifyDeviceCalibrationPlan,
exportDeviceCalibrationPlanDetail,
delDeviceCalibrationPlanDetail,
pageDeviceCalibrationPlanDetail,
updateDeviceCalibrationPlanDetail,
- ratifyDeviceCalibrationPlan,
} from '@/api/cnas/resourceDemand/device.js'
-import { selectUserCondition } from "@/api/performance/class";
-import { mapGetters } from "@/utils/store-compat";
import { formatDateOnly } from './dateFormat'
import { saveBlobOrShowError } from '@/utils/saveBlob'
export default {
@@ -229,15 +198,7 @@
planDate: [{ required: true, message: '璇烽�夋嫨鏃ユ湡', trigger: 'change' }],
},
yearTableDetailDataLoading: false,
- approvalDialog: false,
- approvalLoading: false,
submitFormLoading: false,
- ratifyRemark: '',
- currentRowId: '',
- responsibleOptions: [],
- notificationDia: false,
- notificationLoading: false,
- ratifyUserId: '',
}
},
mounted() {
@@ -383,60 +344,6 @@
});
});
},
- // 鎵撳紑鎻愪氦鎵瑰噯寮规
- tellApprove() {
- this.getUserList()
- this.notificationDia = true
- },
- // 鍏抽棴鎻愪氦鎵瑰噯寮规
- closeNotificationDia() {
- this.notificationDia = false
- this.ratifyUserId = ''
- },
- // 鎻愪氦鎵瑰噯閫氱煡
- notification() {
- if (!this.ratifyUserId) {
- this.$message.warning('璇烽�夋嫨鎵瑰噯浜�')
- return
- }
- this.notificationLoading = true
- submiatRatifyDeviceCalibrationPlan({
- ratifyUserId: this.ratifyUserId,
- planId: this.planInfo.planId,
- }).then(res => {
- this.notificationLoading = false
- if (res.code == 200) {
- this.closeNotificationDia()
- this.loadPlan()
- }
- }).catch(err => {
- this.notificationLoading = false
- })
- },
- // 鎵瑰噯
- handleApprove() {
- this.currentRowId = this.planInfo.planId
- this.approvalDialog = true
- },
- // 鎻愪氦鎵瑰噯缁撴灉
- handleApproval(status) {
- const personTrainingUpdateDto = {
- planId: this.currentRowId,
- ratifyRemark: this.ratifyRemark,
- ratifyStatus: status
- }
- this.approvalLoading = true
- ratifyDeviceCalibrationPlan(personTrainingUpdateDto).then(res => {
- if (res.code === 200) {
- this.$message.success('鎻愪氦鎴愬姛锛�');
- this.approvalDialog = false
- this.loadPlan()
- }
- this.approvalLoading = false
- }).catch(() => {
- this.approvalLoading = false
- })
- },
// 瀵煎嚭
downLoadPost() {
exportDeviceCalibrationPlanDetail({ planId: this.planInfo.planId }).then(res => {
@@ -446,25 +353,9 @@
resetForm() {
this.$refs.modelForm.resetFields();
this.dialogVisible = false
- },
- // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
- getUserList() {
- selectUserCondition().then(res => {
- if (res.code == 200) {
- let data = [];
- res.data.forEach((a) => {
- data.push({
- label: a.name,
- value: a.id,
- });
- });
- this.responsibleOptions = data
- }
- });
}
},
computed: {
- ...mapGetters(["userId"]),
// 鏄惁宸插畬鎴愬鎵癸紙鎵瑰噯/涓嶆壒鍑嗭級
isRatified() {
return this.planInfo.ratifyStatus === 0 || this.planInfo.ratifyStatus === 1;
--
Gitblit v1.9.3