Browse Source

0条消息状态

master
x_ying 2 years ago
parent
commit
9431f0af6f
  1. 2
      src/layout/components/Navbar.vue
  2. 46
      src/views/system/logManage/operateLog/index.vue
  3. 28
      src/views/system/messageCenter/data1.json
  4. 88
      src/views/system/messageCenter/index.vue

2
src/layout/components/Navbar.vue

@ -29,7 +29,7 @@
<el-dropdown ref="messageDrop" class="message-center right-menu-item hover-effect" trigger="click">
<div class="message-icon">
<span class="iconfont icon-xiaoxi" />
<i class="message-num">{{ msgList.length }}</i>
<i v-if="msgList.length > 0" class="message-num">{{ msgList.length }}</i>
</div>
<el-dropdown-menu slot="dropdown" class="message-dropdown" style="width: 420px;">
<div style="display: flex; justify-content: flex-end; padding: 0 20px; height: 40px; line-height: 40px; color: #339CFF; font-size: 14px; border-bottom: 1px solid #339CFF;">

46
src/views/system/logManage/operateLog/index.vue

@ -1,33 +1,6 @@
<template>
<div>
<div class="head-container">
<!-- <crudOperation /> -->
<!-- <el-button v-permission="permission.download" :loading="crud.downloadLoading" :disabled="!selections.length" size="mini" icon="el-icon-download" @click="handleDownload">导出</el-button> -->
<!-- <button @click="test">测试</button> -->
<!-- <el-select v-model="oprType" class="filter-item" style="width: 100px; height: 30px;margin:0 0 0 10px" @change="crud.toQuery">
<el-option v-for="item in oprTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input
v-model="keyWord"
size="small"
clearable
placeholder="请输入关键词"
style="width: 300px;margin-right:10px;padding-left:10px"
class="input-prepend filter-item"
> -->
<!-- <el-select slot="prepend" v-model="optionVal" style="width: 100px" @keyup.enter.native="crud.toQuery"> -->
<!-- <el-select slot="prepend" v-model="optionVal" style="width: 100px">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-input> -->
<!-- <date-range-picker v-model="queryTime" class="date-item" /> -->
<!-- <rrOperation /> -->
<!-- <el-button :loading="crud.downloadLoading" size="mini" icon="el-icon-download" @click="handleDownload">导出</el-button> -->
<crudOperation>
<el-button
slot="left"
@ -119,11 +92,8 @@ export default {
mixins: [presenter(), crud()],
cruds() {
return CRUD({
// url: 'api/storage/initStorageLogList',
// sort: ['update_time,desc'],
url: 'api/logs',
title: '日志',
// crudMethod: caseCrudMethod,
title: '操作日志',
optShow: {
add: false,
edit: false,
@ -135,7 +105,6 @@ export default {
data() {
return {
delVisible: false,
// -----------------
selections: [],
keyWord: '',
oprType: 0,
@ -153,13 +122,6 @@ export default {
}
},
methods: {
//
handleDownload() {
},
test() {
console.log(this.crud, 'crud')
},
// clickRowHandler(row) {
// this.$refs.table.toggleRowSelection(row) //
// },
@ -171,11 +133,6 @@ export default {
this.$refs.listenDom.dialogVisible = true
},
confirmDelAll() {
// this.$confirm(`?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
this.crud.delAllLoading = true
delAllInfo().then(res => {
this.crud.delAllLoading = false
@ -187,7 +144,6 @@ export default {
this.crud.delAllLoading = false
console.log(err.response.data.message)
})
// })
}
}
}

28
src/views/system/messageCenter/data1.json

@ -1,28 +0,0 @@
{
"rows":[
{
"notification":"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
"msgType":"系统通知",
"pushObj":"全部用户",
"sendRole":"管理员",
"sendTime":"",
"isRead":false
},
{
"notification":"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
"msgType":"系统通知",
"pushObj":"全部用户",
"sendRole":"管理员",
"sendTime":"",
"isRead":true
},
{
"notification":"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
"msgType":"系统通知",
"pushObj":"全部用户",
"sendRole":"管理员",
"sendTime":"",
"isRead":true
}
]
}

88
src/views/system/messageCenter/index.vue

@ -1,88 +0,0 @@
<template>
<div>
<div class="head-container">
<el-button icon="el-icon-delete" :disabled="!(selections.length)" size="mini">删除</el-button>
<el-button class="iconfont icon-biaojiyidu-fanbai" :disabled="!(selections.length)" size="mini">标记已读</el-button>
<el-button class="iconfont icon-biaojiyidu-fanbai" size="mini">全部标记已读</el-button>
<date-range-picker v-model="query.createTime" class="date-item" />
</div>
<div class="app-container container-wrap">
<span class="right-top-line" />
<span class="left-bottom-line" />
<!--表格渲染-->
<!-- :cell-class-name="cell"
@selection-change="selectionChangeHandler"
-->
<el-table
ref="table"
:data="tableData"
style="width: 100%;"
:row-class-name="cell"
height="calc(100vh - 245px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="notification" :show-overflow-tooltip="true" label="通知内容" min-width="500" align="center" />
<el-table-column prop="msgType" label="消息类型" align="center" min-width="150" />
<el-table-column prop="sendRole" label="推送人" align="center" min-width="150" />
<el-table-column prop="sendTime" label="推送时间" align="center" min-width="180" />
</el-table>
</div>
</div>
</template>
<script>
import DateRangePicker from '@/components/DateRangePicker'
import data1 from './data1.json'
export default {
name: 'MessageCenter',
components: { DateRangePicker },
data() {
return {
tableData: [],
selections: [],
query: {
createTime: null
}
}
},
created() {
this.getData()
},
methods: {
getData() {
this.tableData = data1.rows
},
clickRowHandler(row) {
// this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row) //
},
selectionChangeHandler(val) {
this.selections = val
},
cell({ row }) {
if (row.isRead) { //
console.log(1)
return 'read-color'
}
}
}
}
</script>
<style lang="scss" scoped>
@import '~@/assets/styles/lend-manage.scss';
.head-container .date-item{
margin: -1px 20px 0 12px;
}
.container-wrap{
margin-top: 0;
min-height: 0;
height: calc(100vh - 240px);
}
::v-deep .read-color td{
color: #999 !important;
}
</style>
Loading…
Cancel
Save