From 2a80c8df2186c5a3d0bd2592477df455921fa9b5 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Fri, 21 Jun 2024 17:17:35 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=BD=92=E6=A1=A3=E5=BC=80=E5=90=AF/=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E4=BA=8C=E6=AC=A1=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/project-management/filing/index.vue | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/views/project-management/filing/index.vue b/src/views/project-management/filing/index.vue index 4eb054d..b8c158d 100644 --- a/src/views/project-management/filing/index.vue +++ b/src/views/project-management/filing/index.vue @@ -11,6 +11,7 @@ import fvSelect from '@/fvcomponents/fvSelect/index.vue' import {toThousands} from '@/utils/changePrice.js' import {switchAttachmentState} from "@/api/project-manage/attachment"; +import {ElMessageBox} from "element-plus"; const router = useRouter() const shortcuts = [ @@ -246,10 +247,10 @@ const tableConfig = reactive({ btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'}) } if (buttons.has("openFileSwitch")) { - btn.push({label: '开启上传', prem: ['project:management:filing:conclusion'], func: () => handleOpenUpload(row), type: 'primary'}) + btn.push({label: '开启上传', prem: ['project:management:filing:conclusion'], func: () => handleOpenUpload(row,true), type: 'primary'}) } if (buttons.has("closeFileSwitch")) { - btn.push({label: '关闭上传', prem: ['project:management:filing:conclusion'], func: () => handleCloseUpload(row), type: 'primary'}) + btn.push({label: '关闭上传', prem: ['project:management:filing:conclusion'], func: () => handleOpenUpload(row,false), type: 'primary'}) } return (
@@ -323,24 +324,19 @@ const handleEdit = (row) => { } }) } -const handleOpenUpload=(row)=>{ - let params={ - open: true, - projectId: row.projectId - } - switchAttachmentState(params).then(res=>{ - console.log('res',res) - tableIns.value.refresh() - }) -} -const handleCloseUpload=(row)=>{ - let params={ - open: false, - projectId: row.projectId - } - switchAttachmentState(params).then(res=>{ - console.log('res',res) - tableIns.value.refresh() +const handleOpenUpload=(row,flag)=>{ + ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let params={ + open: flag, + projectId: row.projectId + } + switchAttachmentState(params).then(res=>{ + tableIns.value.refresh() + }) }) }