From 26c5f42675afd2d18f22fe88f7c0aad7ca7ff26c Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Thu, 9 May 2024 17:26:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E4=B8=AD=E5=BF=83/=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E7=AE=A1=E7=90=86/=E5=AD=97=E5=85=B8=E9=A1=B9/?= =?UTF-8?q?=E5=A4=9A=E7=BA=A7=E5=88=AB=E8=8F=9C=E5=8D=95/=E5=80=9F?= =?UTF-8?q?=E9=98=85=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 2 +- src/api/archiveUtilize/archiveUtilize.js | 10 +- src/api/archivesManage/library.js | 11 +- src/api/system/dictDetail.js | 60 +++ src/assets/styles/archives-manage.scss | 24 + src/assets/styles/sidebar.scss | 70 ++- src/assets/styles/yxk-admin.scss | 19 +- src/layout/components/Navbar.vue | 245 ++++++---- src/layout/components/Sidebar/Item.vue | 3 + src/layout/index.vue | 2 + src/store/getters.js | 4 +- src/store/modules/cart.js | 21 +- .../archiveSearch/module/resultList.vue | 2 + .../module/utilizationProcess.vue | 2 + src/views/nested/menu1/index.vue | 22 + src/views/nested/menu1/menu1-1/index.vue | 40 ++ src/views/nested/menu1/menu1-2/index.vue | 7 + .../nested/menu1/menu1-2/menu1-2-1/index.vue | 5 + src/views/nested/menu2/index.vue | 5 + src/views/system/dict/dictDetail.vue | 409 +++++++++++++++++ src/views/system/dict/index.vue | 324 ++++++------- src/views/system/dict/index2.vue | 425 ++++++++++++++++++ src/views/system/log/operateLog/index.vue | 13 +- src/views/system/notifyManage/index.vue | 7 +- .../system/notifyManage/module/detail.vue | 23 - .../runningProcess/module/detail.vue | 22 +- src/views/system/user/cart.vue | 2 + src/views/system/user/center.vue | 4 +- src/views/system/user/messageCenter/index.vue | 139 +++--- .../system/user/messageCenter/module/list.vue | 301 ------------- .../system/user/processCenter/module/form.vue | 26 +- 31 files changed, 1540 insertions(+), 709 deletions(-) create mode 100644 src/api/system/dictDetail.js create mode 100644 src/views/nested/menu1/index.vue create mode 100644 src/views/nested/menu1/menu1-1/index.vue create mode 100644 src/views/nested/menu1/menu1-2/index.vue create mode 100644 src/views/nested/menu1/menu1-2/menu1-2-1/index.vue create mode 100644 src/views/nested/menu2/index.vue create mode 100644 src/views/system/dict/dictDetail.vue create mode 100644 src/views/system/dict/index2.vue delete mode 100644 src/views/system/user/messageCenter/module/list.vue diff --git a/public/index.html b/public/index.html index 6511572..29fc5a7 100644 --- a/public/index.html +++ b/public/index.html @@ -12,4 +12,4 @@
- + \ No newline at end of file diff --git a/src/api/archiveUtilize/archiveUtilize.js b/src/api/archiveUtilize/archiveUtilize.js index 4c2fd6b..c1e5d69 100644 --- a/src/api/archiveUtilize/archiveUtilize.js +++ b/src/api/archiveUtilize/archiveUtilize.js @@ -49,4 +49,12 @@ export function FetchSeniorSearch(params) { }) } -export default { FetchInitSearchFonds, FetchInitSearchCategory, FetchInitSearchArchiveCtgNo, FetchResearch, FetchSearchHistory, FetchSeniorSearch } +// 初始化借阅车 +export function FetchInitborrowCar(params) { + return request({ + url: 'api/archivesUtilize/initborrowCar' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +export default { FetchInitSearchFonds, FetchInitSearchCategory, FetchInitSearchArchiveCtgNo, FetchResearch, FetchSearchHistory, FetchSeniorSearch, FetchInitborrowCar } diff --git a/src/api/archivesManage/library.js b/src/api/archivesManage/library.js index f673e27..40d601e 100644 --- a/src/api/archivesManage/library.js +++ b/src/api/archivesManage/library.js @@ -41,6 +41,14 @@ export function FetchBusinessFlowDetails(params) { }) } +// 进入流程操作 +export function FetchHandBusinessFlowDetails(params) { + return request({ + url: 'api/control/handBusinessFlowDetails' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + // 获取主页基础数据 export function FetchMainData(params) { return request({ @@ -133,5 +141,6 @@ export default { FetchArchivesOpenConfirm, FetchArchivesReturnConfirm, FetchTransferConfirm, - FetchOfflineTransferConfirm + FetchOfflineTransferConfirm, + FetchHandBusinessFlowDetails } diff --git a/src/api/system/dictDetail.js b/src/api/system/dictDetail.js new file mode 100644 index 0000000..14218d5 --- /dev/null +++ b/src/api/system/dictDetail.js @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +export function FetchDictsList(params) { + return request({ + url: 'api/dictionary/initDictionaryList', + method: 'get', + params + }) +} + +export function add(data) { + return request({ + url: 'api/dictionary/editDictionary', + method: 'post', + data + }) +} + +export function del(data) { + return request({ + url: 'api/dictionary/delDictionary', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/dictionary/editDictionary', + method: 'post', + data + }) +} + +export function FetchDictionaryTree(params) { + return request({ + url: 'api/dictionary/initDictionaryTree', + method: 'get', + params + }) +} + +export function FetchSonDictionaryList(params) { + return request({ + url: 'api/dictionary/getSonDictionaryList', + method: 'get', + params + }) +} + +// 快速筛选 +export function FetchDictionaryTreeByCategoryId(params) { + return request({ + url: 'api/dictionary/getDictionaryTreeByCategoryId', + method: 'get', + params + }) +} + +export default { add, edit, del, FetchDictsList, FetchDictionaryTree, FetchSonDictionaryList, FetchDictionaryTreeByCategoryId } diff --git a/src/assets/styles/archives-manage.scss b/src/assets/styles/archives-manage.scss index dd56b77..419b545 100644 --- a/src/assets/styles/archives-manage.scss +++ b/src/assets/styles/archives-manage.scss @@ -992,4 +992,28 @@ & i{ font-size: 13px; } +} + +.message-type-title{ + display: block; + padding-left: 33px; + height: 33px; + line-height: 33px; + margin-bottom: 15px; + &.type-title1{ + background: url('~@/assets/images/icon/xttz.png') no-repeat left center; + background-size: 23px 23px; + } + &.type-title2{ + background: url('~@/assets/images/icon/lcdd.png') no-repeat left center; + background-size: 23px 23px; + } + &.type-title3{ + background: url('~@/assets/images/icon/lcwc.png') no-repeat left center; + background-size: 23px 23px; + } + &.type-title4{ + background: url('~@/assets/images/icon/fqdq.png') no-repeat left center; + background-size: 23px 23px; + } } \ No newline at end of file diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 5cbe0b7..0c784c1 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -78,7 +78,7 @@ font-size: 16px; height: 60px !important; line-height: 60px !important; - padding: 0 30px 0 28px !important; + // padding: 0 30px 0 28px !important; background-color: transparent !important; @include siderBar-submenu-set; &:hover { @@ -89,25 +89,31 @@ } } - & .el-submenu .el-menu-item{ - position: relative; - padding: 0 60px 0 82px !important; - height: 36px !important; - line-height: 36px; - @include siderBar-submenu-set; - &::before{ - content: ""; - position: absolute; - left: 56px; - top: 50%; - width: 6px; - height: 6px; - background-color: #fff; - border-radius: 50%; - transform: translateY(-50%); - } - .svg-icon { - display: none; + & .el-submenu{ + & a{ + .el-menu-item{ + position: relative; + // padding: 0 60px 0 82px !important; + height: 36px !important; + line-height: 36px; + @include siderBar-submenu-set; + & .dot{ + // content: ""; + // position: absolute; + // left: 56px; + // top: 50%; + display: inline-block; + width: 6px; + height: 6px; + background-color: #fff; + border-radius: 50%; + margin-right: 14px; + // transform: translateY(-50%); + } + .svg-icon { + display: none; + } + } } } @@ -129,6 +135,22 @@ .is-active.el-menu-item { @include siderBar-submenu-set-acitve; } + + + .el-menu{ + .nest-menu{ + & li.el-submenu{ + & div.el-submenu__title{ + font-size: 14px !important; + height: 50px !important; + line-height: 50px !important; + & i.el-submenu__icon-arrow{ + font-size: 14px !important; + } + } + } + } + } } .hideSidebar { @@ -165,8 +187,10 @@ .el-submenu__icon-arrow { display: none; + } } + } .el-menu--collapse { @@ -252,6 +276,12 @@ &:hover { background-image: $subMenuHover !important; } + + & i.el-submenu__icon-arrow { + position: static; + right: 0; + margin-top: 0; + } } // the scroll bar appears when the subMenu is too long diff --git a/src/assets/styles/yxk-admin.scss b/src/assets/styles/yxk-admin.scss index dee534c..91a26bf 100644 --- a/src/assets/styles/yxk-admin.scss +++ b/src/assets/styles/yxk-admin.scss @@ -1041,18 +1041,23 @@ input[type ='number'] { .el-dropdown-menu--small .el-dropdown-menu__item.message-list-item{ padding: 0; } -.message-list-item a{ +.message-list-item a, +.messsage-item{ display: flex; - justify-content: space-between; - padding: 0 20px; - height: 40px; + justify-content: flex-start; + padding: 5px 10px; + // height: 40px; font-size: 14px; - border-bottom: 1px solid #113D72; + line-height: 30px; + // border-bottom: 1px solid #113D72; + &:hover{ + background-color: #F5F9FC; + } p, span, i{ - line-height: 40px; + // line-height: 40px; } p{ - width: 220px; + width: 300px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index fe6ccc3..5f4dcc5 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -4,10 +4,9 @@
- -
+ +
-
@@ -20,32 +19,41 @@
+ -
+
+ + {{ cartCount.length }} +
-
+
- {{ msgList.length }} + {{ messageAll.length }}
- -
+ +
+

消息

全部标记为已读 - -
-
- +
+
暂无最新消息
- - -

{{ item.noticeContent }}

- {{ item.create_time | parseTime }} - -
+ + +
+ +
+

{{ setNoticeTitle(item) }}

+

{{ item.noticeContext }}

+ {{ item.createTime | parseTime }} +
+
+
+
查看全部
@@ -89,7 +97,9 @@ import Logo from '@/layout/components/Sidebar/Logo' // import Screenfull from '@/components/Screenfull' // import SizeSelect from '@/components/SizeSelect' import Avatar from '@/assets/images/avatar.png' -import { getUserNotice, isread } from '@/api/system/logs' +// import { FetchMySystemNotice } from '@/api/system/new' +import { FetchReadedAll } from '@/api/system/new' +import store from '@/store' export default { inject: ['reload'], @@ -107,16 +117,18 @@ export default { Avatar: Avatar, defaultImg: 'this.src="' + require('@/assets/images/avatar.png') + '"', msgList: [], + cartList: [], themeValue: localStorage.getItem('themeValue') ? localStorage.getItem('themeValue') : 'light' } }, - computed: { ...mapGetters([ 'sidebar', 'device', 'user', - 'baseApi' + 'baseApi', + 'cartCount', + 'messageAll' ]), show: { get() { @@ -137,7 +149,8 @@ export default { } }, created() { - this.getMsgList() + store.dispatch('initborrowCar').then(() => {}) + store.dispatch('initMySystemNotice').then(() => { }) if (!localStorage.getItem('themeValue')) { this.changetheme('light') } else { @@ -145,19 +158,26 @@ export default { } }, methods: { + setNoticeTitle(item) { + switch (item.noticeType) { + case 1 : + return '系统通知' + case 2 : + return '有流程达到' + case 3: + return '流程完成提醒' + case 4: + return '赋权到期提醒' + } + }, // 获取未读消息 async getMsgList() { const params = { page: 0, - size: 10, - sort: 'createTime,desc' + size: 10 } const list = [] const allList = await this.getAllNoRead(params, list) - allList.forEach(item => { - item.pushUserName = item.noticeUsers[0].pushUserName - item.isRead = item.noticeUsers[0].isRead - }) const arr = allList.filter(item => { return !item.isRead }) if (arr.length > 20) { this.msgList = arr.slice(0, 20) @@ -167,46 +187,45 @@ export default { }, // 全部已读 async handleAllRead() { - const params = { - page: 0, - size: 10, - sort: 'createTime,desc' - } - const list = [] - const ids = [] - const allList = await this.getAllNoRead(params, list) - allList.forEach(item => { - item.noticeUsers.forEach(i => { - ids.push(i.id) - }) - }) - isread(ids).then(res => { - if (res) { - this.msgList = [] - if (this.$route.path.includes('user/center') || this.$route.path.includes('system/notifyManage')) { - this.reload() - } + if (this.messageAll.length === 0) { + this.$message({ message: '暂无需要处理得未读消息', type: 'error', offset: 8 }) + } else { + const params = { + 'newsType': null } - }) + FetchReadedAll(params).then(res => { + if (res) { + store.dispatch('initMySystemNotice').then(() => {}) + if (this.$route.path.includes('user/center') || this.$route.path.includes('system/notifyManage')) { + this.reload() + } + } + }) + } }, // 递归获取所有消息列表 async getAllNoRead(params, list) { - const allList = await getUserNotice(params).then(res => { - list = list.concat(res.content) - if ((list.length) < res.totalElements) { - params.page++ - return this.getAllNoRead(params, list) - } else { - return list - } - }) - return allList + // const allList = await FetchMySystemNotice(params).then(res => { + // list = list.concat(res.content) + // if ((list.length) < res.totalElements) { + // params.page++ + // return this.getAllNoRead(params, list) + // } else { + // return list + // } + // }) + // return allList }, toggleSideBar() { this.$store.dispatch('app/toggleSideBar') }, + toMessage(item) { + this.$router.push({ path: '/user/center', query: { activeIndex: 1, noticeType: item.noticeType }}) + this.reload() + }, toAllMessage() { - this.$router.push({ path: '/user/center', query: { activeIndex: 1 }}) + this.$router.push({ path: '/user/center', query: { activeIndex: 1, noticeType: 1 }}) + this.reload() this.$refs.messageDrop.hide() }, open() { @@ -267,7 +286,6 @@ export default { &.hover-effect { cursor: pointer; transition: background .3s; - &:hover { background: rgba(0, 0, 0, .025) } @@ -275,26 +293,28 @@ export default { } .message-center{ margin-right: 40px; - .message-icon{ - position: relative; - .icon-xiaoxi{ - font-size: 20px; - @include icon_color; - } - .message-num{ - position: absolute; - top: 0; - right: -8px; - display: block; - width: 20px; - height: 20px; - font-size: 14px; - text-align: center; - line-height: 20px; - border-radius: 50%; - background-color: #F91832; - color: #fff; - } + + } + + .message-icon{ + position: relative; + .icon-xiaoxi{ + font-size: 20px; + @include icon_color; + } + .message-num{ + position: absolute; + top: 12px; + right: -8px; + display: block; + width: 20px; + height: 20px; + font-size: 14px; + text-align: center; + line-height: 20px; + border-radius: 50%; + background-color: #F91832; + color: #fff; } } @@ -331,10 +351,21 @@ export default { } } } +.cart-main{ + cursor: pointer; + span{ + display: block; + padding: 0 15px; + } + & :hover{ + background-color: rgba(249,249,249,1); + } + & .message-num{ + right: 6px !important; + } +} .icon-jieyueche-ding{ font-size: 20px; - margin-right: 30px; - cursor: pointer; @include icon_color; } .icon-zhuti{ @@ -345,4 +376,54 @@ export default { color: #409EFF; background-color: red; } + +.message-type-title{ + width: 32px; + height: auto; + margin-right: 12px; + margin-bottom: 0; + &.type-title1{ + background-size: 32px 32px; + } + &.type-title2{ + background-size: 32px 32px; + } + &.type-title3{ + background-size: 32px 32px; + } + &.type-title4{ + background-size: 32px 32px; + } +} +.message-top-cont{ + position: relative; + color: #A6ADB6; + flex: 1; + font-size: 12px; + & h4{ + color: #545B65; + font-size: 14px; + } + & span{ + position: absolute; + right: 0; + top: 0; + } +} + +.all-message-btn{ + font-size: 14px; + color: #545B65; + text-align: center; + height: 40px; + line-height: 40px; + border-top: 1px solid #E6E8ED; + margin-top: 12px; + cursor: pointer; + i{ + font-size: 12px; + padding-left: 10px; + color: #888D94; + } +} diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index 1a99d63..478b431 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -15,6 +15,9 @@ export default { render(h, context) { const { icon, title } = context.props const vnodes = [] + if (title) { + vnodes.push() + } if (icon) { vnodes.push() diff --git a/src/layout/index.vue b/src/layout/index.vue index e5942b5..8b275c4 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -29,6 +29,7 @@ import ResizeMixin from './mixin/ResizeHandler' import { mapState } from 'vuex' import Theme from '@/components/ThemePicker' import Cookies from 'js-cookie' +import store from '@/store' export default { name: 'Layout', components: { @@ -66,6 +67,7 @@ export default { watch: { $route(route) { this.routerCurrent = route.path + store.dispatch('initMySystemNotice').then(() => {}) } }, mounted() { diff --git a/src/store/getters.js b/src/store/getters.js index a70684e..c0d0304 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -20,6 +20,8 @@ const getters = { qiNiuUploadApi: state => state.api.qiNiuUploadApi, sqlApi: state => state.api.sqlApi, swaggerApi: state => state.api.swaggerApi, - sidebarRouters: state => state.permission.sidebarRouters + sidebarRouters: state => state.permission.sidebarRouters, + cartCount: state => state.cart.cartCount, + messageAll: state => state.cart.messageAll } export default getters diff --git a/src/store/modules/cart.js b/src/store/modules/cart.js index a65a55c..7b9aca4 100644 --- a/src/store/modules/cart.js +++ b/src/store/modules/cart.js @@ -1,18 +1,23 @@ import { FetchInitborrowCar } from '@/api/archiveUtilize/archiveUtilize' +import { FetchMySystemNotice } from '@/api/system/new' // import { getToken, setToken, removeToken } from '@/utils/auth' const cart = { state: { - cartCount: 0 + cartCount: [], + messageAll: [] }, mutations: { SET_CART(state, cartCount) { state.cartCount = cartCount + }, + SET_MESSAGE(state, messageCount) { + state.messageAll = messageCount } }, actions: { - // 获取用户信息 + // 获取用户借阅车 initborrowCar({ commit }) { return new Promise((resolve, reject) => { FetchInitborrowCar().then(res => { @@ -22,6 +27,18 @@ const cart = { reject(error) }) }) + }, + // 获取用户未读消息 + initMySystemNotice({ commit }) { + return new Promise((resolve, reject) => { + FetchMySystemNotice().then(res => { + const arr = res.content.filter(item => { return !item.isRead }) + commit('SET_MESSAGE', arr) + resolve(res) + }).catch(error => { + reject(error) + }) + }) } } } diff --git a/src/views/archiveUtilize/archiveSearch/module/resultList.vue b/src/views/archiveUtilize/archiveSearch/module/resultList.vue index a10f62c..f2dda8f 100644 --- a/src/views/archiveUtilize/archiveSearch/module/resultList.vue +++ b/src/views/archiveUtilize/archiveSearch/module/resultList.vue @@ -160,6 +160,7 @@ import { FetchInitSearchFonds, FetchInitSearchCategory, FetchInitSearchArchiveCt import { FetchAddBorrowCar } from '@/api/archiveUtilize/cart' import ArchivesInfo from '@/views/components/archivesDetail/detail' import LendForm from '../../utillizeRecord/module/utilizationProcess' +import store from '@/store' import { mapGetters } from 'vuex' export default { name: 'ResultList', @@ -544,6 +545,7 @@ export default { FetchAddBorrowCar(params).then(res => { if (res) { this.$message({ message: '加入借阅车成功', type: 'success', offset: 8 }) + store.dispatch('initborrowCar').then(() => {}) } else { this.$message({ message: '当前所属档案已在借阅车,请勿重复操作', type: 'error', offset: 8 }) } diff --git a/src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue b/src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue index f5ba9ed..fc10ac0 100644 --- a/src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue +++ b/src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue @@ -88,6 +88,7 @@ import { FetchFondsDetail } from '@/api/system/fonds' import { FetchIntoFlowBusiness } from '@/api/archivesManage/library' import { FetchBusinessFlowTitle } from '@/api/collect/collect' import { mapGetters } from 'vuex' +import store from '@/store' export default { name: 'LendForm', components: { }, @@ -241,6 +242,7 @@ export default { if (res.code !== 5001 && res.code !== 500) { this.$message({ message: '操作提交成功', type: 'success', offset: 8 }) this.$emit('close-dialog') + store.dispatch('initborrowCar').then(() => {}) } else { // const message = JSON.parse(res.message) // this.$message.error(message.fail.join(',') + '操作提交失败') diff --git a/src/views/nested/menu1/index.vue b/src/views/nested/menu1/index.vue new file mode 100644 index 0000000..2e96951 --- /dev/null +++ b/src/views/nested/menu1/index.vue @@ -0,0 +1,22 @@ + + + diff --git a/src/views/nested/menu1/menu1-1/index.vue b/src/views/nested/menu1/menu1-1/index.vue new file mode 100644 index 0000000..42b076b --- /dev/null +++ b/src/views/nested/menu1/menu1-1/index.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/views/nested/menu1/menu1-2/index.vue b/src/views/nested/menu1/menu1-2/index.vue new file mode 100644 index 0000000..7f8da90 --- /dev/null +++ b/src/views/nested/menu1/menu1-2/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/views/nested/menu1/menu1-2/menu1-2-1/index.vue b/src/views/nested/menu1/menu1-2/menu1-2-1/index.vue new file mode 100644 index 0000000..c66f692 --- /dev/null +++ b/src/views/nested/menu1/menu1-2/menu1-2-1/index.vue @@ -0,0 +1,5 @@ + diff --git a/src/views/nested/menu2/index.vue b/src/views/nested/menu2/index.vue new file mode 100644 index 0000000..3a6624f --- /dev/null +++ b/src/views/nested/menu2/index.vue @@ -0,0 +1,5 @@ + diff --git a/src/views/system/dict/dictDetail.vue b/src/views/system/dict/dictDetail.vue new file mode 100644 index 0000000..e4579e3 --- /dev/null +++ b/src/views/system/dict/dictDetail.vue @@ -0,0 +1,409 @@ + + + + + diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 40098bd..a689911 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -1,122 +1,91 @@ @@ -125,23 +94,25 @@ import crudDict from '@/api/system/dict' import CRUD, { presenter, header, form } from '@crud/crud' import crudOperation from '@crud/CRUD.operation' -import pagination from '@crud/Pagination' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect' import { mapGetters } from 'vuex' import { exportFile } from '@/utils/index' import qs from 'qs' +import dictDetail from './dictDetail' + +// import pagination from '@crud/Pagination' const defaultForm = { id: null, dictionaryName: null, isTop: '1', dictionaryCode: null, dictionaryOrder: 999, dictionaryRemarks: null, dictionaryParents: null } export default { name: 'Dicts', - components: { crudOperation, Treeselect, pagination }, + components: { crudOperation, Treeselect, dictDetail }, cruds() { return [ CRUD({ - title: '字典', idField: 'dictionaryId', url: 'api/dictionary/initDictionaryList', + title: '字典', idField: 'dictionaryId || id', url: 'api/dictionary/initDictionaryTree', crudMethod: { ...crudDict }, sort: [], optShow: { @@ -161,13 +132,12 @@ export default { return Object.assign({ dictionaryParents: this.dictionaryParents }, defaultForm) }) ], - props: { - activeAddBtn: { - type: Boolean - } - }, data() { return { + currentDict: null, + tableData: [], + tableLoading: false, + selections: [], dicts: [], dictionaryParents: null, rules: { @@ -191,7 +161,12 @@ export default { }, deleteVisible: false, deleteData: {}, - isAllSelect: false + isAllSelect: false, + activeAddBtn: false, + defaultProps: { + children: 'childDictionarys', + label: 'dictionaryName' + } } }, computed: { @@ -226,9 +201,12 @@ export default { } this.getDictsTreeList() }, - // 获取数据前设置默认参数 + // 获取数据前设置好接口地址 [CRUD.HOOK.beforeRefresh]() { - this.tableData = [] + if (this.$refs.dictDetail) { + this.$refs.dictDetail.query.pid = '' + } + return true }, [CRUD.HOOK.afterRefresh](crud) { crud.data.forEach(function(item, index) { @@ -241,11 +219,23 @@ export default { item.children = null } }) - this.tableData = this.crud.data + console.log(this.crud.selections) + const currentSelection = this.crud.selections[0] + if (currentSelection) { + if (currentSelection.hasChildren === true) { + this.crud.selectionChangeHandler([currentSelection]) + } else { + this.crud.selectionChangeHandler([]) + } + this.$refs.tree.setCurrentKey(currentSelection.id) + this.$refs.dictDetail.query.pid = currentSelection.id + this.$refs.dictDetail.dicPid = currentSelection.id + this.$refs.dictDetail.crud.toQuery() + this.activeAddBtn = true + } }, // 编辑前 [CRUD.HOOK.beforeToEdit](crud, form) { - crud.form.id = form.dictionaryId }, // 提交前的验证 [CRUD.HOOK.afterValidateCU](crud) { @@ -253,63 +243,38 @@ export default { crud.form.dictionaryParents = null } delete crud.form.isTop - console.log(crud.form) return true }, - changeIsTop(val) { - if (val === '0') { - this.getDictsTreeList() - } - }, - selectAll() { - this.isAllSelect = !this.isAllSelect - const data = this.tableData - this.toggleSelect(data, this.isAllSelect, 'all') - console.log(data) - }, - // 选择某行 - selectTr(selection, row) { - this.$set(row, 'isChecked', !row.isChecked) - this.$nextTick(() => { - this.isAllSelect = row.isChecked - this.toggleSelect(row, row.isChecked, 'tr') - }) - }, - // 递归子级 - toggleSelect(data, flag, type) { - if (type === 'all') { - if (data.length > 0) { - data.forEach((item) => { - this.toggleSelection(item, flag) - if (item.children && item.children.length > 0) { - this.toggleSelect(item.children, flag, type) - } - }) - } - } else { - if (data.children && data.children.length > 0) { - data.children.forEach((item) => { - item.isChecked = flag - this.$refs.table.toggleRowSelection(item, flag) - this.toggleSelect(item, flag, type) - }) + handleNodeClick(val) { + if (val) { + if (val.hasChildren === true) { + this.crud.selectionChangeHandler([val]) + } else { + this.crud.selectionChangeHandler([]) } + + this.$refs.dictDetail.query.pid = val.id + this.$refs.dictDetail.dicPid = val.id + this.$refs.dictDetail.crud.toQuery() + this.activeAddBtn = true } }, - // 改变选中 - toggleSelection(row, flag) { - this.$set(row, 'isChecked', flag) - this.$nextTick(() => { - if (flag) { - this.$refs.table.toggleRowSelection(row, flag) - } else { - this.$refs.table.clearSelection() + updateKeyChildren(data) { + const oldDatas = this.$refs.tree.getCurrentNode().childDictionarys + if (oldDatas) { + for (let i = 0; i < data.length; i++) { + const oldData = oldDatas.find((d) => { return d.id === data[i].id }) + if (oldData) { + data[i].childDictionarys = oldData.childDictionarys + } } - }) + } + this.$refs.tree.updateKeyChildren(this.$refs.tree.getCurrentKey(), data) }, - clickRowHandler(row) { - this.$refs.table.clearSelection() - this.$refs.table.toggleRowSelection(row) + changeIsTop(val) { + if (val === '0') { + this.getDictsTreeList() + } }, getDictsDatas(tree, treeNode, resolve) { setTimeout(() => { @@ -362,6 +327,7 @@ export default { }, toDelete(datas) { this.deleteData = datas + console.log('deleteData', this.deleteData) this.$confirm('此操作将删除当前所选' + this.crud.title + '你是否还要继续?', '提示', { confirmButtonText: '继续', cancelButtonText: '取消', @@ -371,7 +337,7 @@ export default { this.crud.delAllLoading = true const dictionaryIds = [] this.deleteData.forEach(val => { - dictionaryIds.push(val.dictionaryId) + dictionaryIds.push(val.dictionaryId || val.id) }) crudDict.del(dictionaryIds).then(() => { this.$message({ message: '删除成功', type: 'success', offset: 8 }) @@ -395,7 +361,7 @@ export default { }).then(() => { const ids = [] data.forEach(val => { - ids.push(val.dictionaryId) + ids.push(val.id) }) const params = { 'dictionaryIds': ids diff --git a/src/views/system/dict/index2.vue b/src/views/system/dict/index2.vue new file mode 100644 index 0000000..cb0f956 --- /dev/null +++ b/src/views/system/dict/index2.vue @@ -0,0 +1,425 @@ + + + + + diff --git a/src/views/system/log/operateLog/index.vue b/src/views/system/log/operateLog/index.vue index 0868014..bbb235c 100644 --- a/src/views/system/log/operateLog/index.vue +++ b/src/views/system/log/operateLog/index.vue @@ -86,11 +86,14 @@ export default { } }, mounted() { - if (this.isCenter) { - this.heightStyle = 'calc(100vh - 470px)' - } else { - this.heightStyle = 'calc(100vh - 396px)' - } + this.$nextTick(() => { + console.log(this.isCenter) + if (this.isCenter) { + this.heightStyle = 'calc(100vh - 470px)' + } else { + this.heightStyle = 'calc(100vh - 396px)' + } + }) }, methods: { clickRowHandler(row) { diff --git a/src/views/system/notifyManage/index.vue b/src/views/system/notifyManage/index.vue index 7a0d407..f4daf20 100644 --- a/src/views/system/notifyManage/index.vue +++ b/src/views/system/notifyManage/index.vue @@ -32,9 +32,9 @@ @row-dblclick="handleDbClick" > - + @@ -168,6 +168,7 @@ export default { }, methods: { [CRUD.HOOK.beforeRefresh]() { + this.crud.query.noticeType = 1 if (this.blurryTime) { this.crud.query.startTime = this.blurryTime[0] this.crud.query.endTime = this.blurryTime[1] @@ -203,7 +204,7 @@ export default { // 提交前的验证 [CRUD.HOOK.afterValidateCU](crud) { console.log(crud.form) - crud.form.noticeType = 0 + crud.form.noticeType = 1 delete crud.form.noticeTypeName return true }, diff --git a/src/views/system/notifyManage/module/detail.vue b/src/views/system/notifyManage/module/detail.vue index 159c7ed..691dc1c 100644 --- a/src/views/system/notifyManage/module/detail.vue +++ b/src/views/system/notifyManage/module/detail.vue @@ -60,29 +60,6 @@ export default { .dialog-footer, .el-message-box__btns{ margin-top: 20px; } -.message-type-title{ - display: block; - padding-left: 33px; - height: 33px; - line-height: 33px; - margin-bottom: 15px; - &.type-title1{ - background: url('~@/assets/images/icon/xttz.png') no-repeat left center; - background-size: 23px 23px; - } - &.type-title2{ - background: url('~@/assets/images/icon/lcdd.png') no-repeat left center; - background-size: 23px 23px; - } - &.type-title3{ - background: url('~@/assets/images/icon/lcwc.png') no-repeat left center; - background-size: 23px 23px; - } - &.type-title4{ - background: url('~@/assets/images/icon/fqdq.png') no-repeat left center; - background-size: 23px 23px; - } -} .notify-item{ margin-bottom: 10px; diff --git a/src/views/system/processManage/runningProcess/module/detail.vue b/src/views/system/processManage/runningProcess/module/detail.vue index 619a16c..fb3ac01 100644 --- a/src/views/system/processManage/runningProcess/module/detail.vue +++ b/src/views/system/processManage/runningProcess/module/detail.vue @@ -2,18 +2,19 @@
    -
  • 流程名称:{{ selectRow.flowableName || selectRow.title }}
  • +
  • 流程名称:{{ baseInfo && baseInfo.title || selectRow.flowableName || selectRow.title }}
  • 流程结果:

    {{ !isHistroy ? '进行中' : ( selectRow.endTime ? '已完成' : '已取消') }}

  • 流程结果: -

    运行中

    -

    已取消

    -

    已完成

    -

    不通过

    +

    运行中

    +

    已取消

    +

    已完成

    +

    不通过

  • 结束时间:{{ (selectRow.endTime || selectRow.complete_time) | parseTime }}
  • +
  • 结束时间:-
@@ -97,9 +98,11 @@ export default { data() { return { detailVisible: false, + baseInfo: null, isExpend: false, activeIndex: 0, selectRow: {}, + selectCenterRow: null, srcImg: '', taskTableList: [], tableData: [], @@ -108,7 +111,8 @@ export default { total: 0, size: 10, page: 0 - } + }, + isMessage: false } }, computed: { @@ -140,7 +144,7 @@ export default { }, getBusinessFlowDetails() { const params = { - 'businessId': (this.selectRow && this.selectRow.businessId) ? this.selectRow.businessId : this.selectRow.id, + 'businessId': this.isMessage ? this.selectCenterRow.businessId : this.selectRow.id, 'page': this.setPage.page, 'size': this.setPage.size } @@ -170,7 +174,7 @@ export default { }, getProcessImg() { this.srcImg = '' - FetchGenProcessDiagram({ 'processId': this.selectRow.procInstId }).then((res) => { + FetchGenProcessDiagram({ 'processId': this.isMessage ? this.baseInfo.procInstId : this.selectRow.procInstId }).then((res) => { this.srcImg = res }).catch(err => { console.log(err) @@ -178,7 +182,7 @@ export default { }, getTaskByProcinstId() { this.taskTableList = [] - FetchTaskByProcinstId({ 'procinstId': this.selectRow.procInstId }).then((res) => { + FetchTaskByProcinstId({ 'procinstId': this.isMessage ? this.baseInfo.procInstId : this.selectRow.procInstId }).then((res) => { this.taskTableList = res }).catch(err => { console.log(err) diff --git a/src/views/system/user/cart.vue b/src/views/system/user/cart.vue index 18a3f8b..6c8f8de 100644 --- a/src/views/system/user/cart.vue +++ b/src/views/system/user/cart.vue @@ -76,6 +76,7 @@ import LendForm from '@/views/archiveUtilize/utillizeRecord/module/utilizationPr import ArchivesInfo from '@/views/components/archivesDetail/detail' import { FetchDelBorrowCar } from '@/api/archiveUtilize/cart' import { mapGetters } from 'vuex' +import store from '@/store' export default { name: 'Cart', components: { pagination, crudOperation, LendForm, ArchivesInfo }, @@ -160,6 +161,7 @@ export default { if (res) { this.$message({ message: '删除成功', type: 'success', offset: 8 }) this.crud.refresh() + store.dispatch('initborrowCar').then(() => {}) } else { this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR) } diff --git a/src/views/system/user/center.vue b/src/views/system/user/center.vue index 503a210..a33041a 100644 --- a/src/views/system/user/center.vue +++ b/src/views/system/user/center.vue @@ -120,6 +120,7 @@ export default { } } return { + isCenter: true, defaultImg: 'this.src="' + require('@/assets/images/avatar.png') + '"', show: false, Avatar: Avatar, @@ -144,8 +145,7 @@ export default { gender: [ { required: true, message: '请选择性别', trigger: 'change' } ] - }, - isCenter: true + } } }, computed: { diff --git a/src/views/system/user/messageCenter/index.vue b/src/views/system/user/messageCenter/index.vue index 04883d3..604f3bc 100644 --- a/src/views/system/user/messageCenter/index.vue +++ b/src/views/system/user/messageCenter/index.vue @@ -1,10 +1,10 @@