diff --git a/src/components/jeecg/comment/useComment.ts b/src/components/jeecg/comment/useComment.ts index 058f818..3e04eae 100644 --- a/src/components/jeecg/comment/useComment.ts +++ b/src/components/jeecg/comment/useComment.ts @@ -315,14 +315,18 @@ export function useFileList() { * @param text */ async function viewImage(file) { + console.log('viewImage', file) if(isImage(file)){ + console.log('viewImage1111', file) let text = getImageSrc(file) if (text) { let imgList = [text]; createImgPreview({ imageList: imgList }); } }else{ + console.log('viewImage2222', file.url) if(file.url){ + console.log('viewImage3333', file.url) //数据库中地址 let url = getFileAccessHttpUrl(file.url); await initViewDomain(); @@ -330,6 +334,15 @@ export function useFileList() { //url = url.replace('localhost', '192.168.1.100') //如果集成的KkFileview-v3.3.0+ 需要对url再做一层base64编码 encodeURIComponent(encryptByBase64(url)) window.open(onlinePreviewDomain+'?officePreviewType=pdf&url='+encodeURIComponent(url)); + }else{ + //数据库中地址 + let url = getFileAccessHttpUrl(encodeURIComponent(file)); + console.log(`🚀 ~ viewImage ~ url:`, url) + await initViewDomain(); + //本地测试需要将文件地址的localhost/127.0.0.1替换成IP, 或是直接修改全局domain + //url = url.replace('localhost', '192.168.1.100') + //如果集成的KkFileview-v3.3.0+ 需要对url再做一层base64编码 encodeURIComponent(encryptByBase64(url)) + window.open(onlinePreviewDomain+'?url='+url); } } } diff --git a/src/views/zy/jiaoXueDanYuanNeiRong/index.vue b/src/views/zy/jiaoXueDanYuanNeiRong/index.vue index b769c93..ab0db5d 100644 --- a/src/views/zy/jiaoXueDanYuanNeiRong/index.vue +++ b/src/views/zy/jiaoXueDanYuanNeiRong/index.vue @@ -229,6 +229,15 @@ class="addBtn" > + ({}); const dataSource = ref([]); diff --git a/src/views/zy/zyInfoStudent/ZyInfoStudent.api.ts b/src/views/zy/zyInfoStudent/ZyInfoStudent.api.ts index e0faa7b..3500f25 100644 --- a/src/views/zy/zyInfoStudent/ZyInfoStudent.api.ts +++ b/src/views/zy/zyInfoStudent/ZyInfoStudent.api.ts @@ -11,6 +11,7 @@ enum Api { save='/zyInfoStudent/zyInfoStudent/add', edit='/zyInfoStudent/zyInfoStudent/edit', zyscStu='/zyInfoStudent/zyInfoStudent/zyscStu', + stuWpKsjc='/zyInfoStudent/zyInfoStudent/stuWpKsjc', editCdlx='/zyInfoStudent/zyInfoStudent/editCdlx', deleteOne = '/zyInfoStudent/zyInfoStudent/delete', deleteBatch = '/zyInfoStudent/zyInfoStudent/deleteBatch', @@ -102,6 +103,11 @@ export const zyscStu = (params, isUpdate) => { return defHttp.post({ url: url, params }, { isTransformResponse: false }); } +export const stuWpKsjc = (params, isUpdate) => { + let url = Api.stuWpKsjc; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} + export const editCdlx = (params, isUpdate) => { let url = Api.editCdlx; diff --git a/src/views/zy/zyInfoStudent/components/ZyInfoStudentForm.vue b/src/views/zy/zyInfoStudent/components/ZyInfoStudentForm.vue index c730202..2e8778d 100644 --- a/src/views/zy/zyInfoStudent/components/ZyInfoStudentForm.vue +++ b/src/views/zy/zyInfoStudent/components/ZyInfoStudentForm.vue @@ -36,7 +36,7 @@ import { useMessage } from '/@/hooks/web/useMessage'; import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue'; import { getValueType } from '/@/utils'; - import { saveOrUpdate,zyscStu } from '../ZyInfoStudent.api'; + import { saveOrUpdate,zyscStu,stuWpKsjc } from '../ZyInfoStudent.api'; import { Form } from 'ant-design-vue'; import {getFileAccessHttpUrl} from "/@/utils/common/compUtils"; import {useGlobSetting} from "/@/hooks/setting"; @@ -163,8 +163,10 @@ .then((res) => { console.log(`🚀 ~ .then ~ res:`, res) if (res.success) { - createMessage.success(res.message); + createMessage.success("操作成功"); emit('ok'); + //异步提交维普 + stuWpKsjc(model, isUpdate.value).then((res) => {}) } else { createMessage.warning(res.message); }