Browse Source

页面需求修改

master
xuhuajiao 9 months ago
parent
commit
a8befde0d5
  1. BIN
      src/assets/images/icon/fqdq.png
  2. BIN
      src/assets/images/icon/jjdq.png
  3. BIN
      src/assets/images/icon/lcdd.png
  4. BIN
      src/assets/images/icon/lcwc.png
  5. BIN
      src/assets/images/icon/xttz.png
  6. 4
      src/assets/styles/archives-manage.scss
  7. 1
      src/assets/styles/yxk-admin.scss
  8. 79
      src/layout/components/Navbar.vue
  9. 2
      src/views/system/archivesCategory/index.vue
  10. 41
      src/views/system/dept/index.vue
  11. 30
      src/views/system/dict/dictDetail.vue
  12. 40
      src/views/system/dict/index.vue
  13. 31
      src/views/system/log/operateLog/index.vue
  14. 5
      src/views/system/log/search.vue
  15. 33
      src/views/system/processManage/runningProcess/module/detail.vue
  16. 6
      src/views/system/role/index.vue
  17. 6
      src/views/system/user/index.vue
  18. 85
      src/views/system/user/messageCenter/index.vue
  19. 4
      src/views/system/user/processCenter/module/form.vue

BIN
src/assets/images/icon/fqdq.png

Before

Width: 23  |  Height: 23  |  Size: 1.1 KiB

After

Width: 65  |  Height: 65  |  Size: 4.2 KiB

BIN
src/assets/images/icon/jjdq.png

After

Width: 65  |  Height: 65  |  Size: 4.8 KiB

BIN
src/assets/images/icon/lcdd.png

Before

Width: 23  |  Height: 23  |  Size: 1.1 KiB

After

Width: 65  |  Height: 65  |  Size: 4.2 KiB

BIN
src/assets/images/icon/lcwc.png

Before

Width: 23  |  Height: 23  |  Size: 1.2 KiB

After

Width: 65  |  Height: 65  |  Size: 5.0 KiB

BIN
src/assets/images/icon/xttz.png

Before

Width: 23  |  Height: 23  |  Size: 1.1 KiB

After

Width: 65  |  Height: 65  |  Size: 4.9 KiB

4
src/assets/styles/archives-manage.scss

@ -1016,4 +1016,8 @@
background: url('~@/assets/images/icon/fqdq.png') no-repeat left center;
background-size: 23px 23px;
}
&.type-title5{
background: url('~@/assets/images/icon/jjdq.png') no-repeat left center;
background-size: 23px 23px;
}
}

1
src/assets/styles/yxk-admin.scss

@ -339,7 +339,6 @@
@include tree_children_font;
font-size: 14px;
font-weight: normal;
}
}

79
src/layout/components/Navbar.vue

@ -1,7 +1,6 @@
<template>
<div class="navbar">
<logo v-if="showLogo" :collapse="isCollapse" />
<div class="right-menu">
<!-- 主题切换 -->
<el-dropdown trigger="click">
@ -21,6 +20,7 @@
</el-dropdown>
<!-- 借阅车 -->
<router-link :to="{ path: '/user/cart'}">
<!-- 借阅车 -小红点数量 -->
<div class="message-icon cart-main">
<span class="iconfont icon-jieyueche-ding" />
<i v-if="cartCount.length > 0" class="message-num">{{ cartCount.length }}</i>
@ -28,6 +28,7 @@
</router-link>
<!-- 消息中心 -->
<el-dropdown ref="messageDrop" class="message-center right-menu-item hover-effect" trigger="click">
<!-- 消息中心 -小红点数量 -->
<div class="message-icon" style="margin: 0 15px;">
<span class="iconfont icon-xiaoxi" />
<i v-if="messageAll.length > 0" class="message-num">{{ messageAll.length }}</i>
@ -41,17 +42,16 @@
<el-dropdown-item v-if="messageAll.length===0" class="message-list-item">
<div style="text-align:center">暂无最新消息</div>
</el-dropdown-item>
<!-- 消息中心 - 列表 -->
<el-dropdown-item v-for="(item,index) in messageAll" :key="index" class="message-list-item" style="padding: 0 14px;">
<!-- <router-link :to="{ path: '/user/center', query: { activeIndex: 1, noticeType: item.noticeType }}"> -->
<div class="messsage-item" @click="toMessage(item)">
<span :class="['message-type-title',{'type-title1': item.noticeType === 1 },{'type-title2':item.noticeType === 2 },{'type-title3': item.noticeType === 3 },{'type-title4': item.noticeType === 4}]" />
<span :class="setIconClass(item)" />
<div class="message-top-cont">
<h4>{{ setNoticeTitle(item) }}</h4>
<p>{{ item.noticeContext }}</p>
<span>{{ item.createTime | parseTime }}</span>
</div>
</div>
<!-- </router-link> -->
</el-dropdown-item>
<div v-if="messageAll.length!==0" class="all-message-btn" @click="toAllMessage">查看全部<i class="iconfont icon-chakan" /></div>
</div>
@ -91,33 +91,19 @@
<script>
import { mapGetters } from 'vuex'
import Logo from '@/layout/components/Sidebar/Logo'
// import Breadcrumb from '@/components/Breadcrumb'
// import Hamburger from '@/components/Hamburger'
// import Doc from '@/components/Doc'
// import Screenfull from '@/components/Screenfull'
// import SizeSelect from '@/components/SizeSelect'
import Avatar from '@/assets/images/avatar.png'
// import { FetchMySystemNotice } from '@/api/system/new'
import { FetchReadedAll } from '@/api/system/new'
import store from '@/store'
export default {
inject: ['reload'],
components: {
// Breadcrumb,
// Hamburger,
// Screenfull,
// SizeSelect,
// Search,
// Doc,
Logo
},
data() {
return {
Avatar: Avatar,
defaultImg: 'this.src="' + require('@/assets/images/avatar.png') + '"',
msgList: [],
cartList: [],
themeValue: localStorage.getItem('themeValue') ? localStorage.getItem('themeValue') : 'light'
}
},
@ -158,6 +144,21 @@ export default {
}
},
methods: {
setIconClass(item) {
if (item.noticeType === 1) {
return 'message-type-title type-title1'
} else if (item.noticeType === 2) {
return 'message-type-title type-title2'
} else if (item.noticeType === 3) {
return 'message-type-title type-title3'
} else if (item.noticeType === 4) {
if (item.noticeContext.includes('到期')) {
return 'message-type-title type-title5'
} else if (item.noticeContext.includes('逾期')) {
return 'message-type-title type-title4'
}
}
},
setNoticeTitle(item) {
switch (item.noticeType) {
case 1 :
@ -167,22 +168,12 @@ export default {
case 3:
return '流程完成提醒'
case 4:
if (item.noticeContext.includes('到期')) {
return '赋权到期提醒'
} else if (item.noticeContext.includes('逾期')) {
return '赋权逾期提醒'
}
},
//
async getMsgList() {
const params = {
page: 0,
size: 10
}
const list = []
const allList = await this.getAllNoRead(params, list)
const arr = allList.filter(item => { return !item.isRead })
if (arr.length > 20) {
this.msgList = arr.slice(0, 20)
} else {
this.msgList = arr
return '赋权提醒'
}
},
//
@ -203,19 +194,6 @@ export default {
})
}
},
//
async getAllNoRead(params, list) {
// 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')
},
@ -383,16 +361,19 @@ export default {
margin-right: 12px;
margin-bottom: 0;
&.type-title1{
background-size: 32px 32px;
background-size: 33px 33px;
}
&.type-title2{
background-size: 32px 32px;
background-size: 33px 33px;
}
&.type-title3{
background-size: 32px 32px;
background-size: 33px 33px;
}
&.type-title4{
background-size: 32px 32px;
background-size: 33px 33px;
}
&.type-title5{
background-size: 33px 33px;
}
}
.message-top-cont{

2
src/views/system/archivesCategory/index.vue

@ -30,6 +30,7 @@
<span class="left-bottom-line" />
<!--门类树状结构-->
<div class="tree-scroll">
<el-scrollbar style="height: calc(100vh - 230px);">
<el-tree ref="tree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.isType === 1 " class="iconFolder">
@ -43,6 +44,7 @@
</span>
</span>
</el-tree>
</el-scrollbar>
</div>
</div>
</div>

41
src/views/system/dept/index.vue

@ -6,7 +6,26 @@
<div class="head-container">
<el-input v-model="filterText" clearable size="small" placeholder="输入全宗名称搜索" prefix-icon="el-icon-search" class="filter-item" />
</div>
<el-tree ref="tree" v-loading="crud.loading" :data="fondsDatas" :props="defaultProps" :expand-on-click-node="false" :default-expanded-keys="defaultExpandedKeys" node-key="id" highlight-current :filter-node-method="filterNode" @node-click="handleNodeClick" />
<el-tree ref="tree" v-loading="crud.loading" :data="fondsDatas" :props="defaultProps" :expand-on-click-node="false" :default-expanded-keys="defaultExpandedKeys" node-key="id" highlight-current :filter-node-method="filterNode" @node-click="handleNodeClick">
<template
slot-scope="{node}"
class="custom-tree-node"
>
<span
v-if="node.label.length <= 10"
class="tree-text"
> {{ node.label }}</span>
<el-tooltip
v-else
effect="dark"
:content="node.label"
:enterable="false"
placement="left"
>
<span class="tree-text"> {{ node.label }}</span>
</el-tooltip>
</template>
</el-tree>
</div>
<!--用户数据-->
<div class="elect-cont-right">
@ -572,4 +591,24 @@ export default {
::v-deep .expanded-list.el-table .el-table__cell:first-child .cell{
margin-left: -20px;
}
.el-tree{
.el-tree-node__content{
.tree-text{
font-size: 16px;
font-weight: 600;
}
}
.el-tree-node__children{
.tree-text {
font-size: 14px !important;
font-weight: normal;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
display: inline-block;
min-width: 170px;
}
}
}
</style>

30
src/views/system/dict/dictDetail.vue

@ -98,8 +98,6 @@ 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'
const defaultForm = { id: null, dictionaryName: null, isTop: '1', dictionaryCode: null, dictionaryOrder: 999, dictionaryRemarks: null, dictionaryParents: null }
@ -163,7 +161,8 @@ export default {
},
deleteVisible: false,
deleteData: {},
isAllSelect: false
isAllSelect: false,
currentParent: null
}
},
computed: {
@ -191,6 +190,9 @@ export default {
},
//
[CRUD.HOOK.afterToCU](crud, form) {
console.log('dictionaryParents', this.dictionaryParents)
console.log('form', form.dictionaryParents)
form.dictionaryParents = this.dictionaryParents
if (form.dictionaryParents !== null) {
form.isTop = '0'
} else if (form.dictionaryId !== null) {
@ -238,6 +240,7 @@ export default {
crud.form.dictionaryParents = null
}
delete crud.form.isTop
console.log('crud.form', crud.form)
return true
},
changeIsTop(val) {
@ -370,27 +373,6 @@ export default {
}).catch(() => {
})
},
doExport(data) {
console.log(data)
this.crud.downloadLoading = true
this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const ids = []
data.forEach(val => {
ids.push(val.dictionaryId)
})
const params = {
'dictionaryIds': ids
}
exportFile(this.baseApi + '/api/dictionary/download?' + qs.stringify(params, { indices: false }))
this.crud.downloadLoading = false
}).catch(() => {
})
},
normalizer(node) {
if (node.childDictionarys == null || node.childDictionarys === 'null') {
delete node.childDictionarys

40
src/views/system/dict/index.vue

@ -12,9 +12,9 @@
</el-button>
</template>
<template v-slot:right>
<el-button :loading="crud.downloadLoading" size="mini" :disabled="crud.selections.length === 0" @click="doExport(crud.selections)">
<el-button :loading="crud.downloadLoading" size="mini" @click="doExport(crud.data)">
<i class="iconfont icon-daochu" />
导出
全部导出
</el-button>
</template>
</crudOperation>
@ -35,7 +35,7 @@
<div class="container-right">
<span class="right-top-line" />
<span class="left-bottom-line" />
<dictDetail ref="dictDetail" :permission="permission" :active-add-btn="activeAddBtn" @treeRefresh="updateKeyChildren" @resetQuery="resetQuery" />
<dictDetail ref="dictDetail" :active-add-btn="activeAddBtn" @resetQuery="resetQuery" />
</div>
</div>
<!--表单组件-->
@ -102,8 +102,6 @@ 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 {
@ -134,10 +132,6 @@ export default {
],
data() {
return {
currentDict: null,
tableData: [],
tableLoading: false,
selections: [],
dicts: [],
dictionaryParents: null,
rules: {
@ -159,14 +153,13 @@ export default {
edit: ['admin', 'dict:edit'],
del: ['admin', 'dict:del']
},
deleteVisible: false,
deleteData: {},
isAllSelect: false,
activeAddBtn: false,
defaultProps: {
children: 'childDictionarys',
label: 'dictionaryName'
}
},
allExportIds: []
}
},
computed: {
@ -219,7 +212,6 @@ export default {
item.children = null
}
})
console.log(this.crud.selections)
const currentSelection = this.crud.selections[0]
if (currentSelection) {
if (currentSelection.hasChildren === true) {
@ -229,7 +221,6 @@ export default {
}
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
}
@ -252,9 +243,8 @@ export default {
} else {
this.crud.selectionChangeHandler([])
}
this.$refs.dictDetail.query.pid = val.id
this.$refs.dictDetail.dicPid = val.id
this.$refs.dictDetail.dictionaryParents = val.id
this.$refs.dictDetail.crud.toQuery()
this.activeAddBtn = true
}
@ -327,7 +317,6 @@ export default {
},
toDelete(datas) {
this.deleteData = datas
console.log('deleteData', this.deleteData)
this.$confirm('此操作将删除当前所选' + this.crud.title + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
@ -351,7 +340,6 @@ export default {
})
},
doExport(data) {
console.log(data)
this.crud.downloadLoading = true
this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
@ -359,18 +347,24 @@ export default {
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const ids = []
data.forEach(val => {
ids.push(val.id)
})
this.getAllExportIds(data)
const params = {
'dictionaryIds': ids
'dictionaryIds': this.allExportIds
}
exportFile(this.baseApi + '/api/dictionary/download?' + qs.stringify(params, { indices: false }))
this.crud.downloadLoading = false
}).catch(() => {
})
},
getAllExportIds(data) {
data.sort((a, b) => a.dictionaryOrder - b.dictionaryOrder)
for (const item of data) {
this.allExportIds.push(item.id)
if (item.childDictionarys) {
this.getAllExportIds(item.childDictionarys)
}
}
},
normalizer(node) {
if (node.childDictionarys == null || node.childDictionarys === 'null') {
delete node.childDictionarys

31
src/views/system/log/operateLog/index.vue

@ -23,14 +23,14 @@
</el-form>
</template>
</el-table-column>
<el-table-column align="center" prop="username" label="账号" />
<el-table-column align="center" prop="nickName" label="用户名" />
<el-table-column prop="fondsName" label="所属全宗" align="center" />
<el-table-column prop="deptsName" label="所属部门" align="center" />
<el-table-column prop="requestIp" label="IP" align="center" />
<el-table-column align="center" prop="username" label="账号" min-width="100px" />
<el-table-column align="center" prop="nickName" label="用户名" min-width="100px" />
<el-table-column prop="fondsName" label="所属全宗" show-overflow-tooltip align="center" min-width="200px" />
<el-table-column prop="deptsName" label="所属部门" show-overflow-tooltip align="center" min-width="120px" />
<el-table-column prop="requestIp" label="IP" show-overflow-tooltip align="center" min-width="120px" />
<el-table-column prop="address" label="IP来源" align="center" />
<el-table-column prop="description" label="内容描述" align="center" />
<el-table-column prop="browser" label="浏览器" align="center" />
<el-table-column prop="description" label="内容描述" show-overflow-tooltip align="center" min-width="200px" />
<el-table-column prop="browser" label="浏览器" align="center" min-width="100px" />
<el-table-column prop="time" label="请求耗时" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.time <= 300">{{ scope.row.time }}ms</el-tag>
@ -52,6 +52,7 @@
import { FetchClearLog } from '@/api/system/logs'
import Search from '@/views/system/log/search.vue'
import CRUD, { presenter, crud } from '@crud/crud'
import { mapGetters } from 'vuex'
import pagination from '@crud/Pagination'
export default {
@ -72,6 +73,7 @@ export default {
}
})
},
props: {
isCenter: {
type: Boolean,
@ -82,12 +84,16 @@ export default {
return {
isLogType: 'operate',
selections: [],
heightStyle: ''
heightStyle: 'calc(100vh - 396px)'
}
},
computed: {
...mapGetters([
'user'
])
},
mounted() {
this.$nextTick(() => {
console.log(this.isCenter)
if (this.isCenter) {
this.heightStyle = 'calc(100vh - 470px)'
} else {
@ -96,6 +102,13 @@ export default {
})
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
if (this.isCenter) {
this.crud.query.username = this.user.username
} else {
this.crud.query[this.optionVal] = this.keyWord
}
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) //
},

5
src/views/system/log/search.vue

@ -2,6 +2,7 @@
<div class="head-container">
<div class="head-search">
<el-input
v-if="!isCenter"
v-model="keyWord"
size="small"
clearable
@ -83,7 +84,8 @@ export default {
},
computed: {
...mapGetters([
'baseApi'
'baseApi',
'user'
])
},
created() {
@ -104,7 +106,6 @@ export default {
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
this.crud.query[this.optionVal] = this.keyWord
if (this.blurryTime) {
this.crud.query.startTime = this.blurryTime[0]
this.crud.query.endTime = this.blurryTime[1]

33
src/views/system/processManage/runningProcess/module/detail.vue

@ -14,27 +14,29 @@
<!-- 等门类树更改之后再显示 -->
<!-- <li><span>所属全宗</span>全宗A</li> -->
<li v-if="selectRow.endTime || selectRow.complete_time"><span>结束时间</span>{{ ( selectRow.endTime || selectRow.complete_time) | parseTime }}</li>
<!-- <li v-else-if="baseInfo && baseInfo.updateTime"><span>结束时间</span>{{ baseInfo && baseInfo.updateTime }}</li> -->
<li v-else-if="baseInfo && baseInfo.completeTime"><span>结束时间</span>{{ baseInfo && baseInfo.completeTime }}</li>
<li v-else><span>结束时间</span>-</li>
</ul>
<!-- 1.归档 index=1 2.退回 index=2 3.开放 index=6 4.销毁index=7 5.利用index=3 6.内部移交index=4 7.外部移交index=5 -->
<!-- 归档 / 退档 -->
<!-- <ul class="detail-type-info">
<li><span>原始位置</span>整编库</li>
<li><span>目标位置</span>管理库</li>
</ul> -->
<ul v-if="baseInfo && (baseInfo.businessType === 1 || baseInfo.businessType === 2)" class="detail-type-info">
<li><span>原始位置</span>{{ baseInfo && baseInfo.businessType === 1 ? '收集库' : baseInfo && baseInfo.businessType === 2 ? '管理库' : '-' }}</li>
<li><span>目标位置</span>{{ baseInfo && baseInfo.businessType === 1 ? '管理库' : baseInfo && baseInfo.businessType === 2 ? '收集库' : '-' }}</li>
</ul>
<!-- 赋权审批 -->
<!-- <ul class="detail-type-info">
<li><span>利用目的</span>资料查阅</li>
<li><span>赋权开始</span>2022-10-01 10:23:56</li>
<li><span>赋权结束</span>2022-10-07 10:23:56</li>
</ul> -->
<ul v-if="baseInfo && baseInfo.businessType===5" class="detail-type-info">
<li><span>利用目的</span>{{ baseInfo && baseInfo.borrowReason }}</li>
<li v-if="baseInfo && baseInfo.giveStartTime"><span>起始时间</span>{{ baseInfo && baseInfo.giveStartTime | parseTime }}</li>
<li v-else><span>起始时间</span>-</li>
<li v-if="baseInfo && baseInfo.giveEndTime"><span>终止时间</span>{{ baseInfo && baseInfo.giveEndTime | parseTime }}</li>
<li v-else><span>终止时间</span>-</li>
</ul>
<!-- 内部移交 -->
<!-- <ul class="detail-type-info">
<li><span>目标全宗</span>全宗B</li>
</ul> -->
<ul v-if="baseInfo && baseInfo.businessType===6" class="detail-type-info">
<li><span>目标全宗</span>{{ baseInfo && baseInfo.targetFondsNo }}</li>
</ul>
<!-- 开发鉴定 / 销毁鉴定 -->
<!-- <ul class="detail-type-info">
<!-- <ul v-if="baseInfo && baseInfo.businessType===3" class="detail-type-info">
<li><span>申请缘由</span>开放学习</li>
</ul> -->
<!-- <div class="detail-arrow" @click="isExpend = !isExpend"><i :class="[ isExpend ? 'arrow-up':'']" /></div>
@ -144,13 +146,12 @@ export default {
},
getBusinessFlowDetails() {
const params = {
'businessId': this.isMessage ? this.selectCenterRow.businessId : this.selectRow.id,
'businessId': this.isMessage ? this.selectCenterRow.businessId : this.selectRow.businessId,
'page': this.setPage.page,
'size': this.setPage.size
}
FetchBusinessFlowDetails(params).then((res) => {
if (res.code !== 500) {
console.log(res)
this.baseInfo = res.businessFlow
if (res.businessFlow.businessType === 5) {
this.isUtilize = true

6
src/views/system/role/index.vue

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<div class="container-main" style="justify-content: flex-start;">
<div class="container-main" style="justify-content: flex-start; height: calc(100vh - 140px);">
<!--侧边部门数据-->
<div class="elect-cont-right">
<!--工具栏-->
@ -74,7 +74,7 @@
</div>
</div>
<div class="elect-cont-left role-cont-left" style="margin: 0 0 0 20px; ">
<div class="container-left">
<div class="container-left" style="height: calc(100vh - 180px);">
<span class="right-top-line" />
<span class="left-bottom-line" />
<div slot="header" class="tree-tab">
@ -92,6 +92,7 @@
@click="saveMenu"
>保存</el-button>
</div>
<el-scrollbar style="height: calc(100% - 42px);">
<el-tree
v-show="roleTabIndex == 0"
ref="menu"
@ -124,6 +125,7 @@
</el-tooltip>
</template>
</el-tree>
</el-scrollbar>
</div>
</div>
</div>

6
src/views/system/user/index.vue

@ -348,6 +348,12 @@ export default {
[CRUD.HOOK.afterToCU](crud, form) {
this.getRoles()
this.getPosts()
if (this.leftFondsId) {
this.changeFondsValue(this.leftFondsId)
form.fonds.id = this.leftFondsId
form.dept.id = this.query.deptsId ? this.query.deptsId : null
}
},
//
[CRUD.HOOK.beforeToAdd]() {

85
src/views/system/user/messageCenter/index.vue

@ -26,7 +26,7 @@
<div class="message-date">{{ item.createTime | parseTime }}</div>
<div class="message-cont">
<div class="message-cont-info">
<span :class="['message-type-title',{'type-title1': listIndex === 1 },{'type-title2': listIndex === 2 },{'type-title3': listIndex === 3 },{'type-title4': listIndex === 4 }]">{{ titleType }}</span>
<span :class="setIconClass(item)">{{ setNoticeTitle(item) }}</span>
<span :class="[ item.isRead === 0 ? 'unread-tip' : 'unread-tip read-tip']">{{ item.isRead === 0 ? '未读' : '已读' }}</span>
<div class="message-title">{{ item.noticeTitle }}</div>
<ul class="message-list-info">
@ -46,7 +46,7 @@
<el-dialog :visible.sync="messageVisible" :modal-append-to-body="false" :close-on-click-modal="false" append-to-body title="消息详情" @closed="closeDialog">
<div class="setting-dialog">
<div class="message-detail">
<span :class="['message-type-title',{'type-title1': listIndex === 1 },{'type-title2': listIndex === 2 },{'type-title3': listIndex === 3 },{'type-title4': listIndex === 4 }]">{{ titleType }}</span>
<span :class="setIconClass(detailInfo)">{{ setNoticeTitle(detailInfo) }}</span>
<span class="detail-date">{{ detailInfo && detailInfo.createBy }} {{ detailInfo && detailInfo.createTime | parseTime }}</span>
<div class="message-title">{{ detailInfo && detailInfo.noticeTitle }}</div>
<el-input v-model="detailInfo.noticeContext" placeholder="请输入" type="textarea" :rows="10" />
@ -76,6 +76,7 @@ import store from '@/store'
export default {
name: 'MessageCenter',
components: { DateRangePicker, eForm, detial },
inject: ['reload'],
data() {
return {
blurryTime: [],
@ -101,22 +102,21 @@ export default {
messageVisible: false,
detailInfo: {},
currentMessage: null,
hasMore: true, //
hasNextPage: false
hasNextPage: false,
loadingMoreData: false
}
},
watch: {
'$route'(val, from) { //
if (this.$route.query) {
this.listIndex = this.$route.query.noticeType ? this.$route.query.noticeType : 1
this.getIndex()
}
}
},
created() {
if (this.$route.query) {
console.log(' this.$route.query.noticeType', this.$route.query.noticeType)
this.listIndex = this.$route.query.noticeType ? this.$route.query.noticeType : 1
this.getIndex()
}
this.getListMessage()
},
@ -127,7 +127,6 @@ export default {
this.search = null
this.unread = null
this.handleSearch()
this.getIndex()
},
handleSearch() {
this.page.page = 0
@ -159,28 +158,21 @@ export default {
this.items = this.items.concat(listData)
setTimeout(() => {
this.loading = false
this.loadingMoreData = false
}, 1000)
})
},
// loadData() {
// this.loading = true
// setTimeout(() => {
// this.getListMessage()
// this.page.page++
// }, 1000)
// },
// loadMore() {
// if (this.loading) {
// return
// }
// this.loadData()
// },
//
listenScroll(e) {
const ele = e.srcElement ? e.srcElement : e.target
if (ele.scrollTop + ele.offsetHeight > ele.scrollHeight - 100) { // div
setTimeout(() => {
if (!this.loadingMoreData) {
this.loadingMoreData = true
this.addMoreData()
}
}, 1000)
}
},
//
addMoreData() {
@ -195,8 +187,6 @@ export default {
},
handleDetail(item) {
this.currentMessage = this.items.find(i => i.noticeId === item.noticeId)
// this.detailInfo = item
// this.messageVisible = true
const params = {
'newsType': item.noticeType,
'noticeId': item.noticeId
@ -210,7 +200,6 @@ export default {
},
dealWithCont(row) {
this.$refs.eForm.isMessage = true
this.$refs.eForm.formVisible = true
this.$refs.eForm.selectCenterRow = row
this.$refs.eForm.activeIndex = 0
this.$refs.eForm.form.opinion = null
@ -229,39 +218,43 @@ export default {
closeDialog() {
this.messageVisible = false
this.currentMessage.isRead = 1
// this.handleSearch()
store.dispatch('initMySystemNotice').then(() => {})
},
getIndex() {
switch (this.listIndex) {
setIconClass(item) {
if (item.noticeType === 1) {
return 'message-type-title type-title1'
} else if (item.noticeType === 2) {
return 'message-type-title type-title2'
} else if (item.noticeType === 3) {
return 'message-type-title type-title3'
} else if (item.noticeType === 4) {
if (item.noticeContext.includes('到期')) {
return 'message-type-title type-title5'
} else if (item.noticeContext.includes('逾期')) {
return 'message-type-title type-title4'
}
}
},
setNoticeTitle(item) {
switch (item.noticeType) {
case 1 :
this.titleType = '系统通知'
break
return '系统通知'
case 2 :
this.titleType = '有流程达到'
break
return '有流程达到'
case 3:
this.titleType = '流程完成提醒'
break
return '流程完成提醒'
case 4:
this.titleType = '赋权到期提醒'
break
if (item.noticeContext.includes('到期')) {
return '赋权到期提醒'
} else if (item.noticeContext.includes('逾期')) {
return '赋权逾期提醒'
}
return '赋权提醒'
}
},
//
async handleAllRead() {
// const arr = this.items.filter(item => { return !item.isRead })
// console.log('arr', arr)
// arr.forEach(item => {
// item.isRead = 1
// })
// this.handleSearch()
// const params = {
// page: 0,
// size: 10,
// sort: 'createTime,desc'
// }
// const list = []
// const allList = await this.getAllNoRead(params, list)
const params = {
'newsType': this.listIndex
}

4
src/views/system/user/processCenter/module/form.vue

@ -147,6 +147,7 @@ export default {
}
FetchHandBusinessFlowDetails(params).then((res) => {
if (res.code !== 500) {
this.formVisible = true
this.baseInfo = res.businessFlow
this.selectRow = res.businessFlow
if (this.selectRow.businessType === 5) {
@ -169,7 +170,7 @@ export default {
})
this.setPage.total = res.details.totalElements
} else {
this.$message({ message: '获取数据失败', type: 'error', offset: 8 })
this.$message({ message: res.message, type: 'error', offset: 8 })
}
}).catch(err => {
console.log(err)
@ -187,7 +188,6 @@ export default {
this.getBusinessFlowDetails()
},
submitOpinion(type) {
console.log('selectRow', this.selectRow)
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.selectRow.businessType === 5) {

Loading…
Cancel
Save