From c567ca9176f9b52abab5a71c1f6a10c116bd1cbc Mon Sep 17 00:00:00 2001 From: pan <380711010@qq.com> Date: Fri, 6 Sep 2024 19:57:10 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=8F=B3=E4=B8=8A=E8=A7=92=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=B6=88=E6=81=AF=E4=B8=AD=E5=BF=83=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=202=E3=80=81=E6=B6=88=E6=81=AF=E4=B8=AD=E5=BF=83=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=BF=9E=E6=8E=A5=E7=82=B9=E5=87=BB=E6=89=93=E5=BC=80?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=9A=84=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=203=E3=80=81=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=8C=E5=85=B3=E8=81=94=E9=99=84=E4=BB=B6=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=89=8D=E7=AB=AF=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/tool.css | 48 +- src/api/message/message.js | 9 + src/layout/components/Navbar.vue | 30 +- src/store/getters.js | 1 + src/store/modules/user.js | 7 +- src/views/document/detail.vue | 575 ++++++++++++++++++ src/views/document/editDocument.vue | 90 ++- src/views/document/index.vue | 60 +- src/views/filestatistic/index.vue | 2 +- src/views/message/index.vue | 129 +++- src/views/monitor/cache/list.vue | 2 + src/views/statistic/index.vue | 2 +- src/views/system/role/index.vue | 7 +- src/views/tool/index.vue | 20 +- src/views/tool/toolDetail.vue | 34 +- .../workflowList/addWorkflow/tool_release.vue | 63 +- .../workflowList/addWorkflow/use_apply.vue | 5 + src/views/workstuff/dispose/index.vue | 5 + 18 files changed, 991 insertions(+), 98 deletions(-) create mode 100644 src/views/document/detail.vue diff --git a/public/css/tool.css b/public/css/tool.css index 58f1fc5..db14df0 100644 --- a/public/css/tool.css +++ b/public/css/tool.css @@ -75,7 +75,7 @@ body #app .hideSidebar .sidebar-container { width: 65px !important; } body #app .openSidebar .sidebar-container { - width:220px !important; + width:180px !important; } body #app .sidebar-container .nest-menu .el-sub-menu>.el-sub-menu__title, body #app .sidebar-container .el-sub-menu .el-menu-item { @@ -344,7 +344,7 @@ body #app .hideSidebar .main-container { margin-left: 65px; } body #app .main-container { - margin-left: 220px; + margin-left: 180px; background:#f9fafe; background-size:100%; } @@ -440,6 +440,34 @@ body #app .main-container .navbar .right-menu{ float: inherit; top: 8px; right: 16px; + display: flex; + align-items: center; +} +body #app .main-container .navbar .right-menu .el-badge{ + margin: 0 20px 0 0; +} +body #app .main-container .navbar .right-menu .el-badge .el-badge__content.is-fixed{ + top: 5px; + right: 14px; + border: 0; + padding: 0 4px; + min-width: 18px; + text-align: center; +} +body #app .main-container .navbar .right-menu .el-badge .top-msg{ + background: rgba(0 64 152 / 6%); + color: #004098; + font-size: 14px; + height: 36px; + display: block; + padding: 0 12px; + line-height: 36px; + border-radius: 2px; + cursor: pointer; +} +body #app .main-container .navbar .right-menu .top-version{ + margin: 0 10px 0 0; + font-size: 14px; } body #app .main-container .navbar .right-menu>.el-select{ margin-right: 15px; @@ -1752,22 +1780,26 @@ body .el-card>.el-card__body .el-tabs--border-card{ body .el-card>.el-card__body .search-btn .el-tabs--border-card{ border: 0; } -body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header{ +body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header, +body .el-card>.el-card__body .search-btn .el-tabs--card>.el-tabs__header{ border-bottom: 1px solid #e6e6e6; background: transparent; } -body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item{ +body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item, +body .el-card>.el-card__body .search-btn .el-tabs--card>.el-tabs__header .el-tabs__item{ margin: 0; border: none; } -body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{ +body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active, +body .el-card>.el-card__body .search-btn .el-tabs--card>.el-tabs__header .el-tabs__item.is-active{ border: 0; background: transparent; color: #034aac; font-weight: bold; position: relative; } -body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active::after{ +body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active::after, +body .el-card>.el-card__body .search-btn .el-tabs--card>.el-tabs__header .el-tabs__item.is-active::after{ position: absolute; left: 0; bottom: 0; @@ -2080,7 +2112,7 @@ body .etable1.el-table .el-table__expanded-cell tr>td:nth-child(2){ .search .el-form-item>.el-form-item__content>.el-cascader, .search .el-form-item>.el-form-item__content>.el-date-editor.el-range-editor, .search .el-form-item>.el-form-item__content>.el-date-editor.el-date-editor{ - width: 250px; + width: 230px; } .grab .filtrate{ display: none; @@ -2109,7 +2141,7 @@ body .etable1.el-table .el-table__expanded-cell tr>td:nth-child(2){ .filtrate .el-form-item>.el-form-item__content>.el-cascader, .filtrate .el-form-item>.el-form-item__content>.el-date-editor.el-range-editor, .filtrate .el-form-item>.el-form-item__content>.el-date-editor.el-date-editor{ - width: 250px; + width: 230px; } /*operate 操作区域*/ diff --git a/src/api/message/message.js b/src/api/message/message.js index e6a0c2b..451ff97 100644 --- a/src/api/message/message.js +++ b/src/api/message/message.js @@ -52,3 +52,12 @@ export function allMarkedRead(data) { data: data }) } + + +// 获取用户统计 +export function getUserMsgCount(id) { + return request({ + url: '/system/message/user/msg/count/' + id, + method: 'get' + }) +} diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 99cc36d..6a35b7f 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -5,13 +5,22 @@ +
- + v1.0.0 + + + + + + + - - - -->
{{nickName}} @@ -68,7 +77,10 @@ export default { get() { return this.$store.state.settings.topNav } - } + }, + totalCartCount() { + return this.$store.state.user.unreadMsgNumber ? this.$store.state.user.unreadMsgNumber : 0 + }, }, methods: { toggleSideBar() { @@ -84,7 +96,11 @@ export default { location.href = '/index'; }) }).catch(() => {}); - } + }, + // 跳转到购物车 + toMyCartPage() { + this.$router.push({ path: '/message' }) + }, } } diff --git a/src/store/getters.js b/src/store/getters.js index 667e425..e9c105e 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -11,6 +11,7 @@ const getters = { userInfo: state => state.user.info, name: state => state.user.name, nickName: state => state.user.nickName, + unreadMsgNumber: state => state.user.unreadMsgNumber, introduction: state => state.user.introduction, roles: state => state.user.roles, permissions: state => state.user.permissions, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index cced906..5370465 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -10,7 +10,8 @@ const user = { info: {}, avatar: '', roles: [], - permissions: [] + permissions: [], + unreadMsgNumber: 0, }, mutations: { @@ -37,6 +38,9 @@ const user = { }, SET_INFO:(state, info) => { state.info = info + }, + SET_UNREAD_MSG_NUMBER:(state, info) => { + state.unreadMsgNumber = info } }, @@ -71,6 +75,7 @@ const user = { commit('SET_ROLES', ['ROLE_DEFAULT']) } commit('SET_ID', user.userId) + commit('SET_UNREAD_MSG_NUMBER', res.unMsgNumber) commit('SET_NAME', user.userName) commit('SET_NICK_NAME', user.nickName) commit('SET_AVATAR', avatar) diff --git a/src/views/document/detail.vue b/src/views/document/detail.vue new file mode 100644 index 0000000..3aa35df --- /dev/null +++ b/src/views/document/detail.vue @@ -0,0 +1,575 @@ + + + + + diff --git a/src/views/document/editDocument.vue b/src/views/document/editDocument.vue index 242f428..cfcdb44 100644 --- a/src/views/document/editDocument.vue +++ b/src/views/document/editDocument.vue @@ -23,7 +23,7 @@ - + @@ -130,10 +130,6 @@
- @@ -316,10 +332,12 @@ import uploadProgress from "./uploadProgress"; import Treeselect from "@riophae/vue-treeselect"; import { exportDocx } from '@/utils/docUtil/docutil.js'; import downloadFileDetail from "./downloadFileDetail.vue"; +import docDetail from "@/views/document/detail"; +import store from "@/store"; export default { name: "Document", - components: { editDocument, uploadProgress, Treeselect, downloadFileDetail}, + components: { editDocument, uploadProgress, Treeselect, downloadFileDetail, docDetail}, dicts:['doc_class','doc_source','doc_upload_status'], data() { return { @@ -447,6 +465,8 @@ export default { batchExportFlag: false, //查询 selection: undefined, + docDetail: {}, + detailDocOpen: false, }; }, created() { @@ -523,12 +543,12 @@ export default { }) }, handleDetail(row){ - this.docTitle="详情" + this.docTitle="文档详情" this.docTipAddOrEdit = 'detail' this.docDetailDisable=false - this.open = true + this.detailDocOpen = true this.$nextTick(()=>{ - this.$refs.editDocumentRef.editInit(row.docId, "detail"); + this.$refs.docDetailRef.editInit(row.docId, "detail"); }) }, handlePreview(row){ @@ -550,6 +570,10 @@ export default { this.open = false; this.getList(); }, + docDetailFormSubmit: function() { + this.detailDocOpen = false; + this.getList(); + }, /** 删除按钮操作 */ handleDelete(row) { let self = this @@ -648,16 +672,30 @@ export default { }, /** 发布操作 */ handlePush(row) { + let self = this const docIds = row.docId || this.ids; if(docIds == null || docIds == undefined || docIds =='' || docIds.length < 0){ this.$modal.msgError(`最少选择一条数据`); return; } + //只能删除已上传数据 + let delFlag = false; + for(let item of self.selection){ + if(!(item.docStatus == 'ysc')){ + delFlag = true; + } + } + if(delFlag){ + this.$modal.msgError(`只能发布文档状态为[已上传]数据,请重新选择`); + return + } + this.$modal.confirm('是否确认发布?').then(function() { return pushDoc(docIds); }).then(() => { - this.getList(); - this.$modal.msgSuccess("发布成功"); + self.getList(); + store.commit('SET_UNREAD_MSG_NUMBER', this.$store.state.user.unreadMsgNumber+1); + self.$modal.msgSuccess("发布成功"); }).catch((err) => { console.error(err) }); @@ -672,6 +710,10 @@ export default { this.$refs.editDocumentRef.resetForm(); this.open = false }, + docDetailCancel(){ + this.$refs.docDetailRef.resetForm(); + this.detailDocOpen = false + }, previewAuth(row){ if(row.docUrl == null || row.docUrl == '' || row.docUrl == undefined){ return false diff --git a/src/views/filestatistic/index.vue b/src/views/filestatistic/index.vue index 6c2cdc4..bfdf9ac 100644 --- a/src/views/filestatistic/index.vue +++ b/src/views/filestatistic/index.vue @@ -80,7 +80,7 @@
- + diff --git a/src/views/message/index.vue b/src/views/message/index.vue index 05ad9ea..11e6046 100644 --- a/src/views/message/index.vue +++ b/src/views/message/index.vue @@ -13,8 +13,19 @@ @keyup.enter.native="handleQuery" /> + + + + + + - + 全部标记已读
- - - - + + + + + + + + + - + diff --git a/src/views/monitor/cache/list.vue b/src/views/monitor/cache/list.vue index 29a7c74..e9da267 100644 --- a/src/views/monitor/cache/list.vue +++ b/src/views/monitor/cache/list.vue @@ -23,6 +23,7 @@ @@ -81,6 +82,7 @@
- + diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index faa733b..d4d7b78 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -290,16 +290,15 @@ export default { value: "1", label: "全部数据权限" }, - /* { value: "2", label: "自定数据权限" - },*/ + }, { value: "3", label: "本部门数据权限" } - /*, + , { value: "4", label: "本部门及以下数据权限" @@ -307,7 +306,7 @@ export default { { value: "5", label: "仅本人数据权限" - }*/ + } ], // 菜单列表 menuOptions: [], diff --git a/src/views/tool/index.vue b/src/views/tool/index.vue index 4df0b82..311f1a5 100644 --- a/src/views/tool/index.vue +++ b/src/views/tool/index.vue @@ -95,16 +95,16 @@
- - - + + + - - - + + + @@ -146,7 +146,7 @@ - + @@ -155,12 +155,12 @@ label="操作" align="center" fixed="right" - width="270px" + width="260px" class-name="small-padding fixed-width" >
- + @@ -268,6 +268,15 @@ + +
@@ -330,6 +339,7 @@ import ToolSelector from '@/components/tool-selector/index.vue' import uploadVue from '@/components/FileUpload/optimizeToolUpload.vue' import { addCount } from "@/api/tool/downloadCount"; import previewUtil from '@/components/PreviewUtil/previewUtil.vue' +import store from "@/store"; // PDF本地文件预览 export default { @@ -364,10 +374,9 @@ export default { return { toolPrincipalsChoose: false, addDocShow: false, - docQueryParams: { + attQueryParams: { pageNum: 1, - pageSize: 10, - toolId: '' + pageSize: 99999, }, defaultStaff: [], yes: 'Y', @@ -462,10 +471,23 @@ export default { attachmentList: [], attFileType: "zip,rar,7z", isPreviewDisable: false, - title: '工具发布' + title: '工具发布', + currentPage: 1, // 当前页 + pageSize: 10, // 每页显示数量 }; }, - computed: {}, + computed: { + // 分页后的数据 + paginatedData() { + const start = (this.currentPage - 1) * this.pageSize; + const end = this.currentPage * this.pageSize; + return this.attachmentList.slice(start, end); + }, + // 总数据条数 + total() { + return this.attachmentList.length; + }, + }, watch: { data (val) { if (val) { @@ -524,7 +546,7 @@ export default { // _this.attachmentList = formData.attachmentList formData.association = JSON.parse(res.data.association) _this.form = formData - _this.getDocumentList(res.data.toolId) + _this.getAttachmentList(res.data.toolId) }).finally(()=>{ _this.detailLoading = false }); @@ -812,6 +834,10 @@ export default { this.$set(formData,'attachmentList',_this.attachmentList) addTool(formData).then((res) => { if (res.code===200) { + /* if(formData.recordStatus == 'done'){ + console.info("2222222222222222", _this.$store.state.user.unreadMsgNumber+1) + store.commit('SET_UNREAD_MSG_NUMBER', _this.$store.state.user.unreadMsgNumber+1); + } */ _this.$message({ message: '流程提交成功',//提示的信息 type:'success',  //类型是成功 @@ -833,7 +859,15 @@ export default { }); }, handleDelete(row){ - this.attachmentList.splice(row,1) + const index = this.attachmentList.findIndex(item => item.fileNewName == row.fileNewName); + if (index !== -1) { + // 从 attachmentList 中删除数据 + this.attachmentList.splice(index, 1); + // 处理当前页面可能没有数据的情况,跳到上一页 + if (this.paginatedData.length === 0 && this.currentPage > 1) { + this.currentPage--; + } + } }, /** * 新增上传附件 @@ -844,13 +878,13 @@ export default { this.$refs.addDocRef.resetForm() }) }, - getDocumentList(toolId) { + getAttachmentList(toolId) { this.loading = true - this.$set(this.docQueryParams,'del',"0") - this.$set(this.docQueryParams,'businessId',toolId) - listAttachment(this.docQueryParams).then(res => { + this.$set(this.attQueryParams,'del',"0") + this.$set(this.attQueryParams,'businessId',toolId) + listAttachment(this.attQueryParams).then(res => { this.attachmentList = res.rows; - this.total = res.total; + // this.total = res.total; this.loading = false; } ); @@ -978,6 +1012,9 @@ export default { handleUploadError(error) { // 处理上传失败后的逻辑 }, + handlePageChange(newPage) { + this.currentPage = newPage; + }, }, diff --git a/src/views/workflowList/addWorkflow/use_apply.vue b/src/views/workflowList/addWorkflow/use_apply.vue index 7d60149..eeecb5a 100644 --- a/src/views/workflowList/addWorkflow/use_apply.vue +++ b/src/views/workflowList/addWorkflow/use_apply.vue @@ -185,6 +185,8 @@ import { addApply, getInfoByBpmcId, updateApply } from '@/api/tool/toolApply' import { listItem } from '@/api/tool/userApplyItem' import blUserSelector from '@/components/user-selector/src/user-selector.vue' import { getTool } from "@/api/tool/tool"; +import store from "@/store"; + // PDF本地文件预览 export default { dicts: ['sys_normal_disable','tool_type', 'tool_source', 'tool_status'], @@ -619,6 +621,9 @@ export default { formData.editStatus = _this.editStatus addApply(formData).then((res) => { if (res.code===200) { + if(formData.recordStatus == 'done'){ + store.commit('SET_UNREAD_MSG_NUMBER', _this.$store.state.user.unreadMsgNumber+1); + } _this.$message({ message: '流程提交成功',//提示的信息 type:'success',  //类型是成功 diff --git a/src/views/workstuff/dispose/index.vue b/src/views/workstuff/dispose/index.vue index 110e3c0..8c2b3d3 100644 --- a/src/views/workstuff/dispose/index.vue +++ b/src/views/workstuff/dispose/index.vue @@ -120,6 +120,8 @@