195 lines
4.5 KiB
Vue
195 lines
4.5 KiB
Vue
<template>
|
|
<div class="index-home">
|
|
<img class="index-bgimg" src="../../assets/indexImgs/index-bg.png" />
|
|
|
|
<div class="content">
|
|
<div class="router-list">
|
|
<div @click="toRouterPath(item)" v-for="(item,index) of IndexRouter" :key="index" class="router-list-item">
|
|
<div class="center">
|
|
<img :src="item.meta.icon" />
|
|
<p class="router-list-title">{{item.meta.title}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="message-list">
|
|
<div class="message-list-content">
|
|
<div class="message-list-title" style="margin-bottom: 10px;">
|
|
<img src="../../assets/indexImgs/file.png" />
|
|
<span class="my-notice">我的消息</span>
|
|
<span class="query-list" @click="toUserAnnouncementList">查看更多></span>
|
|
</div>
|
|
<div >
|
|
<div class="message-list-item" v-for="item of dataMessageList" :key="item.id">
|
|
<div style="display: flex">
|
|
<div>【{{item.titile_dictText}}】</div>
|
|
<a-tooltip>
|
|
<template slot="title">
|
|
<span v-html="item.msgContent" class="ellipsis-span"></span>
|
|
</template>
|
|
<span v-html="myEllipsis(item.msgContent,30)" class="ellipsis-span"></span>
|
|
</a-tooltip>
|
|
</div>
|
|
<!-- <span v-html="item.msgContent"></span>-->
|
|
<span>{{item.sendTime}}</span>
|
|
<span class="operate">操作</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import IndexRouter from '@views/dashboard/indexRouter'
|
|
import {getAction} from '@api/manage'
|
|
|
|
export default {
|
|
name: 'Analysis',
|
|
components: {},
|
|
data() {
|
|
return {
|
|
IndexRouter,
|
|
url:{
|
|
list:'/sys/sysAnnouncementSend/getCompanyMyAnnouncementSend'
|
|
},
|
|
// 消息数据
|
|
dataMessageList:[]
|
|
}
|
|
},
|
|
created() {
|
|
getAction(this.url.list,{readFlag:'0'}).then(res => {
|
|
if(res.success){
|
|
this.dataMessageList = [...res.result.records]
|
|
}
|
|
})
|
|
},
|
|
methods: {
|
|
/*
|
|
* 跳转相应的路径
|
|
* */
|
|
toRouterPath(record){
|
|
this.$router.push({
|
|
path:record.path
|
|
})
|
|
},
|
|
/*
|
|
* 跳转我的消息
|
|
* */
|
|
toUserAnnouncementList(){
|
|
this.$router.push({
|
|
path:'/system/userAnnouncementList'
|
|
})
|
|
},
|
|
/*
|
|
* 字符串截取
|
|
* * */
|
|
myEllipsis(value, vlength = 25) {
|
|
if (!value) {
|
|
return value
|
|
}
|
|
if (value.length > vlength) {
|
|
return value.slice(0, vlength) + '...'
|
|
}
|
|
return value
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
.index-home {
|
|
position: relative;
|
|
width: 100%;
|
|
min-width: 1100px;
|
|
height: 100vh;
|
|
}
|
|
|
|
.index-bgimg {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.content {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
margin: auto;
|
|
width: 75%;
|
|
min-width: 1028px;
|
|
height: 80%;
|
|
min-height: 617px;
|
|
.router-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
width: 14%;
|
|
min-width: 140px;
|
|
height: 100%;
|
|
&-item {
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 100%;
|
|
height: 17%;
|
|
background-image: url("../../assets/indexImgs/router-item.png");
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
background-size: 100% 102%;
|
|
cursor: pointer;
|
|
}
|
|
&-title {
|
|
margin: 4px 0 0 0;
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: #eee;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
.message-list {
|
|
flex: 1;
|
|
background-image: url("../../assets/indexImgs/index-message.png");
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
background-size: 100% 102%;
|
|
&-content {
|
|
padding: 40px;
|
|
width: 100%;
|
|
height: 100%;
|
|
.my-notice {
|
|
margin-left: 8px;
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: #eee;
|
|
}
|
|
.query-list {
|
|
float: right;
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
opacity: .7;
|
|
color: #eee;
|
|
}
|
|
}
|
|
&-item{
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 14px;
|
|
color: #FFF;
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
}
|
|
.center {
|
|
text-align: center;
|
|
}
|
|
.operate {
|
|
//width: 150px;
|
|
}
|
|
</style>
|