From ff6d23c5d61d1c6bee47e5863b57a915d98f7be1 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期五, 18 四月 2025 09:47:06 +0800 Subject: [PATCH] 1.设备使用授权页面开发、联调 --- src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue | 69 ++++++++++++++++++++++++++++++++-- 1 files changed, 65 insertions(+), 4 deletions(-) diff --git a/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue b/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue index c6c5913..8fbb501 100644 --- a/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue +++ b/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue @@ -98,6 +98,19 @@ <el-button :loading="submitFormLoading" type="primary" @click="changeMachineName">纭</el-button> </span> </el-dialog> + <el-dialog :visible.sync="notificationDia" title="鎻愪氦瀹℃牳" width="30%" @close="closeNotificationDia"> + <span style="margin-top: 10px;display: inline-block"> + 璇烽�夋嫨瀹℃牳浜猴細 + <el-select v-model="auditId" clearable filterable size="small" style="width: 90%;"> + <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </span> + <span slot="footer" class="dialog-footer"> + <el-button :loading="notificationLoading" @click="closeNotificationDia">鍙� 娑�</el-button> + <el-button :loading="notificationLoading" type="primary" @click="notification">鎻� 浜�</el-button> + </span> + </el-dialog> </div> </template> @@ -106,10 +119,11 @@ import { addImpower, deleteImpower, deviceScopeSearch, getImpowerDetail, reviewImpowerStatus, - selectDeviceImpowerByPage, updateImpower + selectDeviceImpowerByPage, submitReviewImpowerStatus, updateImpower } from "@/api/cnas/resourceDemand/device"; import {exportQualityMonitorDetail} from "@/api/cnas/process/ensureResults/qualityMonitor"; import {selectUserCondition} from "@/api/system/user"; +import {mapGetters} from "vuex"; export default { name: '', @@ -177,13 +191,23 @@ }, }, { - name: '鎺堟潈', + name: '瀹℃牳閫氱煡', + type: 'text', + clickFun: (row) => { + this.tellApprove(row.impowerId); + }, + disabled: (row) => { + return row.status === 1; + }, + }, + { + name: '瀹℃牳', type: 'text', clickFun: (row) => { this.openDia('check', row); }, disabled: (row) => { - return row.status === 1; + return row.status === 1 || this.userId !== row.auditId; }, }, { @@ -211,7 +235,10 @@ impowerYear: '' }, delegatedUser: [], - impowerId: '' + impowerId: '', + notificationDia: false, + auditId: '', + notificationLoading: false, }; }, mounted() { @@ -240,6 +267,37 @@ }).catch(err => { this.tableLoading = false }) + }, + // 鎵撳紑鎻愪氦鎵瑰噯寮规 + tellApprove(impowerId) { + this.getUserList() + this.notificationDia = true + this.impowerId = impowerId + }, + // 鎻愪氦鎵瑰噯閫氱煡 + notification() { + if (!this.auditId) { + this.$message.warning('璇烽�夋嫨瀹℃牳浜�') + return + } + this.notificationLoading = true + submitReviewImpowerStatus({ + auditId: this.auditId, + impowerId: this.impowerId, + }).then(res => { + this.notificationLoading = false + if (res.code == 200) { + this.closeNotificationDia() + this.refreshTableList() + } + }).catch(err => { + this.notificationLoading = false + }) + }, + // 鍏抽棴鎻愪氦鎵瑰噯寮规 + closeNotificationDia() { + this.notificationDia = false + this.auditId = '' }, // 鎵撳紑鎿嶄綔寮规 openDia (type, row) { @@ -400,6 +458,9 @@ } }, }, + computed: { + ...mapGetters(["userId"]), + }, }; </script> -- Gitblit v1.9.3