diff --git a/src/components/MyComponents/Upload/index.vue b/src/components/MyComponents/Upload/index.vue index 0a8ea8b..3bff157 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"> @@ -195,6 +196,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 b5b25f4..c1241d7 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 1822fa5..54b0006 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