From 7d20c555e032effc7d202ed239d146ed1a72baaf Mon Sep 17 00:00:00 2001 From: yaowanxin <3588231647@qq.com> Date: 星期二, 12 八月 2025 16:20:06 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev_ai' into ywx --- src/views/chatHome/chatHomeIndex/MobileChat.vue | 2 src/settings.js | 2 src/views/collaborativeApproval/approvalProcess/index.vue | 19 +++++ src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue | 75 +++++++++++++++++++++++++ .env.staging | 4 .env.development | 4 src/assets/indexViews/HYSNLogo.png | 0 src/views/login.vue | 2 index.html | 4 package.json | 2 .env.production | 4 src/assets/indexViews/HYSNView.png | 0 src/views/collaborativeApproval/approvalProcess/fileList.vue | 43 ++++++++++++++ vite.config.js | 4 public/HYSNico.ico | 0 15 files changed, 149 insertions(+), 16 deletions(-) diff --git a/.env.development b/.env.development index b5f6a61..042d9fb 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 椤甸潰鏍囬 -VITE_APP_TITLE = MIS绯荤粺锛堢鐞嗕俊鎭郴缁燂級 +VITE_APP_TITLE = 寮樹篃姘存偿绠$悊绯荤粺 # 寮�鍙戠幆澧冮厤缃� VITE_APP_ENV = 'development' -# MIS绯荤粺锛堢鐞嗕俊鎭郴缁燂級/寮�鍙戠幆澧� +# 寮樹篃姘存偿绠$悊绯荤粺/寮�鍙戠幆澧� VITE_APP_BASE_API = '/dev-api' diff --git a/.env.production b/.env.production index bc91821..ce8e1b7 100644 --- a/.env.production +++ b/.env.production @@ -1,10 +1,10 @@ # 椤甸潰鏍囬 -VITE_APP_TITLE = MIS绯荤粺锛堢鐞嗕俊鎭郴缁燂級 +VITE_APP_TITLE = 寮樹篃姘存偿绠$悊绯荤粺 # 鐢熶骇鐜閰嶇疆 VITE_APP_ENV = 'production' -# MIS绯荤粺锛堢鐞嗕俊鎭郴缁燂級/鐢熶骇鐜 +# 寮樹篃姘存偿绠$悊绯荤粺/鐢熶骇鐜 VITE_APP_BASE_API = '/prod-api' # 鏄惁鍦ㄦ墦鍖呮椂寮�鍚帇缂╋紝鏀寔 gzip 鍜� brotli diff --git a/.env.staging b/.env.staging index f759f9a..200b47b 100644 --- a/.env.staging +++ b/.env.staging @@ -1,10 +1,10 @@ # 椤甸潰鏍囬 -VITE_APP_TITLE = MIS绯荤粺锛堢鐞嗕俊鎭郴缁燂級 +VITE_APP_TITLE = 寮樹篃姘存偿绠$悊绯荤粺 # 鐢熶骇鐜閰嶇疆 VITE_APP_ENV = 'staging' -# MIS绯荤粺锛堢鐞嗕俊鎭郴缁燂級/鐢熶骇鐜 +# 寮樹篃姘存偿绠$悊绯荤粺/鐢熶骇鐜 VITE_APP_BASE_API = '/stage-api' # 鏄惁鍦ㄦ墦鍖呮椂寮�鍚帇缂╋紝鏀寔 gzip 鍜� brotli diff --git a/index.html b/index.html index 879c6c5..386c920 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,8 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> - <link rel="icon" href="/favicon.ico"> - <title>MIS绯荤粺锛堢鐞嗕俊鎭郴缁燂級</title> + <link rel="icon" href="/HYSNico.ico"> + <title>寮樹篃姘存偿绠$悊绯荤粺</title> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <style> html, diff --git a/package.json b/package.json index 2ffdd34..8369890 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ruoyi", "version": "3.8.9", - "description": "MIS绯荤粺锛堢鐞嗕俊鎭郴缁燂級", + "description": "寮樹篃姘存偿绠$悊绯荤粺", "author": "鑻ヤ緷", "license": "MIT", "type": "module", diff --git a/public/HYSNico.ico b/public/HYSNico.ico new file mode 100644 index 0000000..70148cc --- /dev/null +++ b/public/HYSNico.ico Binary files differ diff --git a/src/assets/indexViews/HYSNLogo.png b/src/assets/indexViews/HYSNLogo.png new file mode 100644 index 0000000..70148cc --- /dev/null +++ b/src/assets/indexViews/HYSNLogo.png Binary files differ diff --git a/src/assets/indexViews/HYSNView.png b/src/assets/indexViews/HYSNView.png new file mode 100644 index 0000000..ccd5fcc --- /dev/null +++ b/src/assets/indexViews/HYSNView.png Binary files differ diff --git a/src/settings.js b/src/settings.js index f944e2d..a9c3f98 100644 --- a/src/settings.js +++ b/src/settings.js @@ -30,7 +30,7 @@ /** * 鏄惁鏄剧ずlogo */ - sidebarLogo: true, + sidebarLogo: false, /** * 鏄惁鏄剧ず鍔ㄦ�佹爣棰� diff --git a/src/views/chatHome/chatHomeIndex/MobileChat.vue b/src/views/chatHome/chatHomeIndex/MobileChat.vue index f8bc625..5b06e76 100644 --- a/src/views/chatHome/chatHomeIndex/MobileChat.vue +++ b/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) diff --git a/src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue b/src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue index 3aa58c5..52c7b85 100644 --- a/src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue +++ b/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锛宒ocx锛寈ls锛寈lsx锛宲pt锛宲ptx锛宲df锛宼xt锛寈ml锛宩pg锛宩peg锛宲ng锛実if锛宐mp锛宺ar锛寊ip锛�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: [] // 鏂板瀛楁锛屽瓨鍌ㄦ墍鏈夎妭鐐圭殑瀹℃壒浜篿d }, 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 @@ // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅骞惰缃儴闂↖D 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("姝e湪涓婁紶鏂囦欢锛岃绋嶅��..."); + 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, }); diff --git a/src/views/collaborativeApproval/approvalProcess/fileList.vue b/src/views/collaborativeApproval/approvalProcess/fileList.vue new file mode 100644 index 0000000..da37db2 --- /dev/null +++ b/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> \ No newline at end of file diff --git a/src/views/collaborativeApproval/approvalProcess/index.vue b/src/views/collaborativeApproval/approvalProcess/index.vue index 79f358b..9630af3 100644 --- a/src/views/collaborativeApproval/approvalProcess/index.vue +++ b/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; diff --git a/src/views/login.vue b/src/views/login.vue index 6046eeb..4248b7b 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -181,7 +181,7 @@ <style lang='scss' scoped> .login { height: 100%; - background-image: url("../assets/indexViews/JZYJView.png"); + background-image: url("../assets/indexViews/HYSNView.png"); background-size: cover; position: relative; } diff --git a/vite.config.js b/vite.config.js index d686a0f..b96c1d4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -8,8 +8,8 @@ const { VITE_APP_ENV } = env; const baseUrl = VITE_APP_ENV == "development" - ? "http://192.168.1.147:7003" // 寮�鍙戠幆澧冨悗绔帴鍙� - : "http://114.132.189.42:7003"; // 鐢熶骇鐜鍚庣鎺ュ彛 + ? "http://114.132.189.42:8092" // 寮�鍙戠幆澧冨悗绔帴鍙� + : "http://114.132.189.42:8092"; // 鐢熶骇鐜鍚庣鎺ュ彛 return { // 閮ㄧ讲鐢熶骇鐜鍜屽紑鍙戠幆澧冧笅鐨刄RL銆� -- Gitblit v1.9.3