Commit 50bb351e authored by Mac's avatar Mac

1

parent 9accab0f
<style>
.summaryInfo .box_top {
width: 100%;
border-radius: 6px;
}
.summaryInfo .box_t_item {
background: #FFF;
height: 468px;
border-radius: 6px;
padding: 30px 20px;
}
.box_t_it {
display: flex;
align-items: center;
justify-content: space-between;
}
.box_t_itext {
font-size: 18px;
color: #3F4254;
font-weight: 800;
margin-left: 13px;
}
.summaryInfo .noticeitem {
width: 100%;
padding: 20px;
display: flex;
align-items: flex-start;
}
.noticeitem:hover {
box-shadow: 0px 0px 8px 0px rgba(68, 110, 228, 0.64);
/* border: 1px solid rgba(68, 110, 228, 0.64);; */
}
.summaryInfo .noticeitem_l {
width: 120px;
height: 82px;
border-radius: 6px;
}
</style>
<template>
<div class="summaryInfo">
<div class="box_top">
<el-row :gutter="15">
<el-col :span="12">
<div class="grid-content box_t_item">
<div class="box_t_it">
<div style="display: flex;align-items: center;">
<inline-svg class="svg-icon q-mr-xs svg-icon-secondary"
src="icons/svg/Communication/Urgent-mail.svg"></inline-svg>
<span class="box_t_itext">公告</span>
</div>
</div>
<div
style="margin-top: 10px;background: #fff;height: 368px; width: 100%;overflow-y: auto;cursor: pointer;padding: 2px;">
<div v-for="(item,index) in noticeList" :key='index' class="noticeitem"
@click="goNoticeDetail(item)">
<div class="noticeitem_l">
<img :src="item.UpdateByIcon"
style="width: 120px;height: 82px; border-radius: 6px;" />
</div>
<div style="width: 1px;flex: 1;margin-left: 20px;">
<div
style="width: 100%;display: flex;align-items: flex-start;justify-content: space-between;">
<span
style="font-size: 16px;font-family: PingFang SC;font-weight: 800;color: #3F4254;">{{item.UpdateByName}}</span>
<span
style="font-size: 14px;font-weight: 500;color: #C4C6D1;">{{item.DayStr}}</span>
</div>
<div
style="font-size: 14px; font-family: PingFang SC;font-weight: 400;color: #9A9DAB;margin-top: 10px;overflow: hidden;white-space: nowrap; text-overflow: ellipsis">
{{item.Title}}</div>
<div
style="font-size: 14px; font-family: PingFang SC;font-weight: 400;color: #9A9DAB;margin-top: 10px;">
编号:{{item.Number}}</div>
</div>
</div>
<div class="notifyLoadMore" v-if="noticeMsg.pageSize<Count" @click="getMoreNotify()">
<span>加载更多</span>
</div>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="grid-content box_t_item">
<div class="box_t_it">
<div style="display: flex;align-items: center;">
<inline-svg class="svg-icon q-mr-xs svg-icon-secondary"
src="icons/svg/Communication/Chat-check.svg"></inline-svg>
<span class="box_t_itext">消息</span>
</div>
</div>
<div
style="margin-top: 10px;background: #fff;height: 368px; width: 100%;overflow-y: auto;cursor: pointer;padding: 2px;">
<q-list v-if="socektArr.length>0">
<q-item class="q-my-sm q-pa-xs items-start" v-for="(x,i) in socektArr" :key="i"
clickable v-ripple @click="goMsgDetail(x.JumpUrl,x),readMsgLog(x.Id,i)">
<q-item-section avatar>
<q-avatar :style="{'background-color':'#e1f0ff'}" rounded size="40px"
text-color="negative">
<inline-svg :class="['svg-icon',`svg-icon-primary`]"
src="icons/svg/Shopping/Bag2.svg"></inline-svg>
</q-avatar>
</q-item-section>
<q-item-section>
<q-item-label class="text-weight-bold">{{x.Title}}</q-item-label>
<q-item-label caption lines="3" class="remark-font">{{x.Content}}</q-item-label>
</q-item-section>
<q-item-section side class="remark-font">{{x.SendTime.replace('T',' ')}}
</q-item-section>
</q-item>
</q-list>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import {
SetWebCartoon,
GetWebCartoon
} from '../../api/system/webkit'
import {
GetMyNoticePageList,
BeatchReadMsgLog
} from '../../api/course/index'
import {
GetMsgLogList
} from '../../api/course/index'
export default {
props: {
saveObj: {
type: Object,
default: null
}
},
data() {
return {
//通知请求参数
noticeMsg: {
pageIndex: 1,
pageSize: 5
},
Count: 0,
visible: true,
noticeList: [],
socektArr: [],//消息数组
}
},
mounted() {
this.getNotify();
this.getLogList()
},
methods: {
//请求公告数据
getNotify() {
GetMyNoticePageList(this.noticeMsg).then(res => {
if (res.Code == 1) {
this.noticeList = res.Data.PageData;
this.Count = res.Data.Count;
}
})
},
//获取日志列表
getLogList() {
GetMsgLogList().then(res => {
if (res.Code == 1) {
this.socektArr = res.Data;
}
})
},
//跳转详情
goNoticeDetail(item) {
var url = window.location.host;
let routeUrl = this.$router.resolve({
path: "/noticeView",
query: {
NoticeId: item.Id
}
});
window.open(routeUrl.href, '_blank');
},
//跳转链接 新页面打开
goMsgDetail(url, item) {
if (item.CategoryId == 5) {
let zcurl = url_jump_zc + '#' + url;
// let zcurl='http://www.test.com:8080/#'+url;
window.open(zcurl)
} else {
var hostName = window.location.hostname;
var port = window.location.port;
var newurl = ""
if (url != null && url.length > 0) {
if (url.indexOf('http://') == -1 || url.indexOf('https://') == -1) {
if (url.indexOf("www") == -1) {
newurl = "http://" + hostName + (port != 80 ? ":" + port : "") + "/#" + url;
} else {
newurl = "http://" + url;
}
} else {
newurl = url
}
}
if (newurl) {
window.open(newurl, "_blank");
}
}
},
//看过后删除
readMsgLog(Id, index) {
let msg = {
Ids: []
}
msg.Ids.push(Id);
BeatchReadMsgLog(msg).then(res => {
if (res.Code == 1) {
this.socektArr.splice(index, 1);
}
})
}
},
}
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment