Compare commits

..

2 Commits

3 changed files with 17 additions and 3 deletions

View File

@ -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">
@ -196,6 +197,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;

View File

@ -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 || {};
})

View File

@ -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