From 59a2581498cc15c4907bb22c992c38d80f3aa66d Mon Sep 17 00:00:00 2001 From: esacpe <12345678> Date: Fri, 26 Sep 2025 17:29:02 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=BB=84=E4=BB=B6=E4=B8=8A=E4=BC=A0'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyComponents/Upload/index.vue | 12 ++++++++++++ .../components/detailForm.vue | 2 +- .../trainingProject/components/addPxxm.vue | 6 ++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/MyComponents/Upload/index.vue b/src/components/MyComponents/Upload/index.vue index a052752..35b2eac 100644 --- a/src/components/MyComponents/Upload/index.vue +++ b/src/components/MyComponents/Upload/index.vue @@ -10,6 +10,7 @@ :list-type="props.showBtn ? '' : 'picture-card'" :file-list="fileList" show-file-list + :before-remove="beforeRemove" :on-exceed="handleExceed" :on-success="handlerSuccess" :before-upload="beforeImgUpload"> @@ -192,6 +193,17 @@ const handlePictureCardPreview = (file) => { const handleDownload = (file) => { window.open(file.response.data); }; + +// 删除文件 触发父组件更新 +const beforeRemove = (file) => { + let index = fileList.value.findIndex(function (item) { + return item.id === file.id; + }); + + props.modelValue.splice(index, 1); + emits("update:modelValue", props.modelValue); +} + const handleRemove = (file) => { let index = fileList.value.findIndex(function (item) { return item.id === file.id; diff --git a/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue b/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue index 468488e..c804c2e 100644 --- a/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue +++ b/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue @@ -63,7 +63,7 @@ const init = (type, id,) => { }; function getDateById (id) { - qcckPost({},`/mosty-base/baxx/jxda/getInfo/${id}`).then((res) => { + qcckPost({},`/bagl/mosty-base/baxx/jxda/getInfo/${id}`).then((res) => { res.fj = res.fj ? JSON.parse(res.fj):[] listQuery.value = res || {}; }) diff --git a/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue b/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue index 0f75e80..ad63c5f 100644 --- a/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue +++ b/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue @@ -97,6 +97,7 @@ import { qcckPost } from "@/api/qcckApi.js"; import MyTable from '@/components/aboutTable/MyTable.vue'; import { ref, computed, reactive, getCurrentInstance } from 'vue' import SelectPersonnelDialog from "./selectPersonnelDialog.vue"; +import { getItem } from "@/utils/storage"; const { proxy } = getCurrentInstance() const visible = ref(false) @@ -200,10 +201,11 @@ const handleChange = (val) => { // 获取授课教员 const getCyryList = async () => { + const userInfo = getItem('userInfo') const res = await qcckPost({ - pxgsid: "", + pxgsid: userInfo?.pxgsid || '', gw: '04' - }, `/mosty-base//baxx/cyry/list`) + }, `bagl/mosty-base//baxx/cyry/list`) if (res) { cyryList.value = res