src/views/chatHome/chatHomeIndex/MobileChat.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/collaborativeApproval/approvalProcess/fileList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/collaborativeApproval/approvalProcess/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/chatHome/chatHomeIndex/MobileChat.vue
@@ -203,7 +203,7 @@ } chatList.value.push(replyMsg) scrollBottom() loading.value = false // å¦æææ¥è¯¢å ³é®åï¼åæ¨¡ææµå¼è¾åº if (route.query.keyWord) { simulateStreamingOutput(replyMsg, route.query.keyWord) src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue
@@ -112,6 +112,23 @@ </el-form-item> </el-col> </el-row> <el-row :gutter="30"> <el-col :span="24"> <el-form-item label="éä»¶ææï¼" prop="remark"> <el-upload v-model:file-list="fileList" :action="upload.url" multiple ref="fileUpload" auto-upload :headers="upload.headers" :before-upload="handleBeforeUpload" :on-error="handleUploadError" :on-success="handleUploadSuccess" :on-remove="handleRemove"> <el-button type="primary" v-if="operationType !== 'view'">ä¸ä¼ </el-button> <template #tip v-if="operationType !== 'view'"> <div class="el-upload__tip"> æä»¶æ ¼å¼æ¯æ docï¼docxï¼xlsï¼xlsxï¼pptï¼pptxï¼pdfï¼txtï¼xmlï¼jpgï¼jpegï¼pngï¼gifï¼bmpï¼rarï¼zipï¼7z </div> </template> </el-upload> </el-form-item> </el-col> </el-row> </el-form> <template #footer> <div class="dialog-footer"> @@ -130,7 +147,11 @@ approveProcessUpdate, getDept } from "@/api/collaborativeApproval/approvalProcess.js"; import { delLedgerFile, } from "@/api/salesManagement/salesLedger.js"; import {userListNoPageByTenantId} from "@/api/system/user.js"; import { getToken } from "@/utils/auth"; const { proxy } = getCurrentInstance() const emit = defineEmits(['close']) import useUserStore from "@/store/modules/user"; @@ -138,6 +159,13 @@ const dialogFormVisible = ref(false); const operationType = ref('') const fileList = ref([]); const upload = reactive({ // ä¸ä¼ çå°å url: import.meta.env.VITE_APP_BASE_API + "/file/upload", // 设置ä¸ä¼ ç请æ±å¤´é¨ headers: { Authorization: "Bearer " + getToken() }, }); const data = reactive({ form: { approveTime: "", @@ -146,6 +174,7 @@ approveDeptId: "", approveReason: "", checkResult: "", tempFileIds: [], approverList: [] // æ°å¢å段ï¼å卿æèç¹ç审æ¹äººid }, rules: { @@ -176,6 +205,7 @@ // æå¼å¼¹æ¡ const openDialog = (type, row) => { console.log('openDialog', type, row) operationType.value = type; dialogFormVisible.value = true; userListNoPageByTenantId().then((res) => { @@ -192,6 +222,8 @@ // è·åå½åç¨æ·ä¿¡æ¯å¹¶è®¾ç½®é¨é¨ID form.value.approveDeptId = userStore.currentDeptId if (operationType.value === 'edit') { fileList.value = row.commonFileList form.value.tempFileIds = fileList.value.map(file => file.id) currentApproveStatus.value = row.approveStatus approveProcessGetInfo({id: row.approveId,approveReason: '1'}).then(res => { form.value = {...res.data} @@ -257,6 +289,7 @@ } // å ³éå¼¹æ¡ const closeDia = () => { fileList.value = [] proxy.resetForm("formRef"); dialogFormVisible.value = false; emit('close') @@ -269,6 +302,48 @@ const day = String(today.getDate()).padStart(2, "0"); return `${year}-${month}-${day}`; } // ä¸ä¼ åæ ¡æ£ function handleBeforeUpload(file) { // æ ¡æ£æä»¶å¤§å° // if (file.size > 1024 * 1024 * 10) { // proxy.$modal.msgError("ä¸ä¼ æä»¶å¤§å°ä¸è½è¶ è¿10MB!"); // return false; // } proxy.$modal.loading("æ£å¨ä¸ä¼ æä»¶ï¼è¯·ç¨å..."); return true; } // ä¸ä¼ 失败 function handleUploadError(err) { proxy.$modal.msgError("ä¸ä¼ æä»¶å¤±è´¥"); proxy.$modal.closeLoading(); } // ä¸ä¼ æååè° function handleUploadSuccess(res, file, uploadFiles) { proxy.$modal.closeLoading(); if (res.code === 200) { // ç¡®ä¿ tempFileIds åå¨ä¸ä¸ºæ°ç» if (!form.value.tempFileIds) { form.value.tempFileIds = []; } form.value.tempFileIds.push(res.data.tempId); proxy.$modal.msgSuccess("ä¸ä¼ æå"); } else { proxy.$modal.msgError(res.msg); proxy.$refs.fileUpload.handleRemove(file); } } // ç§»é¤æä»¶ function handleRemove(file) { if (operationType.value === "edit") { let ids = []; ids.push(file.id); delLedgerFile(ids).then((res) => { proxy.$modal.msgSuccess("å 餿å"); }); } } defineExpose({ openDialog, }); src/views/collaborativeApproval/approvalProcess/fileList.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,43 @@ <template> <el-dialog v-model="dialogVisible" title="éä»¶" width="40%" :before-close="handleClose"> <el-table :data="tableData" border height="40vh"> <el-table-column label="éä»¶åç§°" prop="name" min-width="400" show-overflow-tooltip /> <el-table-column fixed="right" label="æä½" width="100" align="center"> <template #default="scope"> <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">ä¸è½½</el-button> <el-button link type="primary" size="small" @click="lookFile(scope.row)">é¢è§</el-button> </template> </el-table-column> </el-table> </el-dialog> <filePreview ref="filePreviewRef" /> </template> <script setup> import { ref } from 'vue' import filePreview from '@/components/filePreview/index.vue' const dialogVisible = ref(false) const tableData = ref([]) const { proxy } = getCurrentInstance(); const filePreviewRef = ref() const handleClose = () => { dialogVisible.value = false } const open = (list) => { dialogVisible.value = true tableData.value = list } const downLoadFile = (row) => { proxy.$download.name(row.url); } const lookFile = (row) => { filePreviewRef.value.open(row.url) } defineExpose({ open }) </script> <style></style> src/views/collaborativeApproval/approvalProcess/index.vue
@@ -44,10 +44,12 @@ </div> <info-form-dia ref="infoFormDia" @close="handleQuery"></info-form-dia> <approval-dia ref="approvalDia" @close="handleQuery"></approval-dia> <FileList ref="fileListRef" /> </div> </template> <script setup> import FileList from "./fileList.vue"; import { Search } from "@element-plus/icons-vue"; import {onMounted, ref} from "vue"; import {ElMessageBox} from "element-plus"; @@ -116,11 +118,12 @@ { label: "ç³è¯·äºº", prop: "approveUserName", width: 120 }, { label: "ç³è¯·æ¥æ", prop: "approveTime", width: 120 width: 200 }, { label: "ç»ææ¥æ", @@ -137,7 +140,7 @@ label: "æä½", align: "center", fixed: "right", width: 150, width: 230, operation: [ { name: "ç¼è¾", @@ -162,6 +165,13 @@ openApprovalDia('view', row); }, }, { name: "éä»¶", type: "text", clickFun: (row) => { downLoadFile(row); }, }, ], }, ]); @@ -183,6 +193,11 @@ page.current = 1; getList(); }; const fileListRef = ref(null) const downLoadFile = (row) => { fileListRef.value.open(row.commonFileList) } const pagination = (obj) => { page.current = obj.page; page.size = obj.limit;