src/api/types.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/upload/index.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/component/pdfPreview.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/component/四川招标投标交易服务平台用户操作手册(代理机构).pdf | 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/dept/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/dept/uploadform.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/dept/utils/hook.tsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/types.ts
@@ -24,6 +24,25 @@ id: string; }; type getUploadToken = { policy: string; message: string; DirPath: string; id: string; x_oss_signature_version: string; x_oss_credential: string; x_oss_date: string; signature: string; security_token: string; url: string; }; export type getUploadTokenResult = { success: boolean; result: getUploadToken; code: string | number; }; export type CaptchaResult = { success: boolean; result: captchaImg; src/api/upload/index.ts
@@ -6,11 +6,14 @@ import { http } from "@/utils/http"; import { baseUrlApi, uploadUrlApi } from "../util"; import type { Result } from "../types"; import type { Result, getUploadTokenResult } from "../types"; // è·åä¸ä¼ Token export const getUploadToken = () => { return http.request<Result>("get", baseUrlApi("/api/upFile/token")); return http.request<getUploadTokenResult>( "get", baseUrlApi("/api/upFile/token") ); }; export const uploadFileAli11 = (data, key) => { src/views/system/component/pdfPreview.vue
New file @@ -0,0 +1,31 @@ <template> <div v-loading="isLoading" class="pdf-container" element-loading-text="å è½½ä¸..." > <iframe id="printIframe" :src="pdfSrc" frameborder="0" style="width: 100%; height: 100%" @load="iframeLoaded" /> </div> </template> <script setup lang="ts"> import { ref } from "vue"; import pdfSrc from "./åå·ææ ææ 交ææå¡å¹³å°ç¨æ·æä½æåï¼ä»£çæºæï¼.pdf"; let isLoading = ref(true); const iframeLoaded = () => { console.log("jjjjjj"); isLoading.value = false; }; </script> <style> .pdf-container { height: 600px; } </style> src/views/system/component/ËÄ´¨ÕбêͶ±ê½»Ò×·þÎñƽ̨Óû§²Ù×÷Êֲᣨ´úÀí»ú¹¹£©.pdfBinary files differ
src/views/system/dept/index.vue
@@ -230,12 +230,12 @@ <el-button type="primary" :loading="loading" @click="onSearch"> æç´¢ </el-button> <!-- <el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)" > éç½® </el-button> --> <el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)" > éç½® </el-button> <el-button type="primary" @click="openDialog()"> æ°å¢ </el-button> src/views/system/dept/uploadform.vue
@@ -30,8 +30,25 @@ }), isChange: null }); const gonggaoRules = reactive({ interface FormInlineType { // é¡¹ç®æ é¢ projectName: string | null | undefined; // ææ æ¥åå¼å§æ¶é´ï¼é常为ISOæ¥æåç¬¦ä¸²æ ¼å¼ï¼ toubiaoStartDate: string | null | undefined; // ææ æ¥åç»ææ¶é´ toubiaoEndDate: string | null | undefined; // 弿 æ¶é´ kaibiaoDate: string | null | undefined; // ææ æä»¶ï¼å¯è½æ¯æä»¶è·¯å¾ãIDææä»¶å¯¹è±¡ï¼ zhaobiaowenjian: string | null | undefined; // åæ´æä»¶ biangengwenjian: string | null | undefined; // éä»¶ï¼ææ¬æè¿°æè·¯å¾ï¼ fujian: string | null | undefined; // 弿 å°ç¹ kaibiaodidian: string | null | undefined; } const gonggaoRules = reactive<FormRules<FormInlineType>>({ projectName: [{ required: true, message: "请è¾å ¥æ é¢", trigger: "change" }], toubiaoStartDate: [ { required: true, message: "è¯·éæ©ææ æ¥åå¼å§æ¶é´", trigger: "change" } @@ -150,6 +167,8 @@ let res = await getUploadToken(); if (res.code == 200) { let keyVal = generateTimestampWithRandom(res.result.DirPath, file.name); let upUrl = res.result.url; let upPath = res.result.DirPath; let formData = new FormData(); formData.append("policy", res.result.policy); formData.append( @@ -166,9 +185,7 @@ formData.append("key", keyVal); // æä»¶å formData.append("file", file.raw); // file å¿ é¡»ä¸ºæåä¸ä¸ªè¡¨åå uploadFileAli(formData, res.result.url).then(res => { let path = res.result.url + "/" + res.result.DirPath + keyVal; console.log(path); let path = `${upUrl}"/"${upPath}${upPath};`; if (props.isChange) { newFormInline.value.biangengwenjian = path; } else { src/views/system/dept/utils/hook.tsx
@@ -23,6 +23,7 @@ // import { useUserStoreHook } from "@/store/modules/user"; import type { PaginationProps } from "@pureadmin/table"; import pdfPreview from "../../component/pdfPreview.vue"; // const nowRole = computed(() => { // return useUserStoreHook().nowRole; // }); @@ -286,9 +287,22 @@ } function resetForm(formEl) { if (!formEl) return; formEl.resetFields(); onSearch(); // if (!formEl) return; // formEl.resetFields(); // onSearch(); addDialog({ title: `é¢è§pdf`, props: {}, width: "60%", draggable: true, fullscreen: deviceDetection(), fullscreenIcon: true, sureBtnLoading: true, closeOnClickModal: false, contentRenderer: () => h(pdfPreview, { ref: formRef, formInline: null }) // jsx è¯æ³ ï¼æ³¨æå¨.vueæä»¶å¯ç¨jsxè¯æ³ï¼éè¦å¨scriptå¼å¯lang="tsx"ï¼ }); } const checkboxAsRadio = data => { if (data.length > 1) {