Commit 1c35e185 authored by zhengke's avatar zhengke

1

parent a2580f43
<template> <template>
<q-dialog v-model="persistent" maximized full-height position="right" @hide="closeShenheForm" class="flex"> <q-dialog v-model="persistent" maximized full-height position="right" @hide="closeShenheForm" class="flex">
<q-card style="margin-top:61px;width:375px;height:calc(100% - 61px) !important;" class="no-border-radius flex column"> <q-card style="margin-top:61px;width:375px;height:calc(100% - 61px) !important;"
<q-tabs class="no-border-radius flex column">
v-model="tab" <q-tabs v-model="tab" class="text-grey" active-color="secondary" indicator-color="secondary" align="justify"
class="text-grey" narrow-indicator inline-label>
active-color="secondary"
indicator-color="secondary"
align="justify"
narrow-indicator
inline-label
>
<q-tab alert="negative" name="msg" style="display:none;"> <q-tab alert="negative" name="msg" style="display:none;">
<inline-svg class="svg-icon q-mr-xs" :class="[tab=='msg'?'svg-icon-secondary':'svg-icon-grey']" src="icons/svg/Communication/Chat-check.svg"></inline-svg> <inline-svg class="svg-icon q-mr-xs" :class="[tab=='msg'?'svg-icon-secondary':'svg-icon-grey']"
src="icons/svg/Communication/Chat-check.svg"></inline-svg>
<span>消息</span> <span>消息</span>
</q-tab> </q-tab>
<q-tab name="notify"> <q-tab name="notify">
<inline-svg class="svg-icon q-mr-xs" :class="[tab=='notify'?'svg-icon-secondary':'svg-icon-grey']" src="icons/svg/Communication/Urgent-mail.svg"></inline-svg> <inline-svg class="svg-icon q-mr-xs" :class="[tab=='notify'?'svg-icon-secondary':'svg-icon-grey']"
src="icons/svg/Communication/Urgent-mail.svg"></inline-svg>
<span>公告</span> <span>公告</span>
</q-tab> </q-tab>
<q-tab name="work"> <q-tab name="work">
<inline-svg class="svg-icon q-mr-xs" :class="[tab=='work'?'svg-icon-secondary':'svg-icon-grey']" src="icons/svg/Files/Folder.svg"></inline-svg> <inline-svg class="svg-icon q-mr-xs" :class="[tab=='work'?'svg-icon-secondary':'svg-icon-grey']"
src="icons/svg/Files/Folder.svg"></inline-svg>
<span>工作</span> <span>工作</span>
</q-tab> </q-tab>
</q-tabs> </q-tabs>
<q-tab-panels v-model="tab" class="q-mt-none col" animated swipeable transition-prev="jump-up" transition-next="jump-up"> <q-tab-panels v-model="tab" class="q-mt-none col" animated swipeable transition-prev="jump-up"
<q-tab-panel name="msg" class="scroll _scrollbar" > transition-next="jump-up">
<q-tab-panel name="msg" class="scroll _scrollbar">
<q-list v-if="dataList.length>0"> <q-list v-if="dataList.length>0">
<q-item class="q-my-sm q-pa-xs items-start" v-for="(x,i) in dataList" :key="i" clickable v-ripple @click="undefinedGongneng"> <q-item class="q-my-sm q-pa-xs items-start" v-for="(x,i) in dataList" :key="i" clickable v-ripple
@click="undefinedGongneng">
<q-item-section avatar> <q-item-section avatar>
<q-avatar :style="{'background-color':x.icons.backgroundColor}" rounded size="40px" :text-color="x.icons.color"> <q-avatar :style="{'background-color':x.icons.backgroundColor}" rounded size="40px"
<inline-svg :class="['svg-icon',`svg-icon-${x.icons.color}`]" :src="x.icons.icon" v-if="x.icons.icon.length>1"></inline-svg> :text-color="x.icons.color">
<inline-svg :class="['svg-icon',`svg-icon-${x.icons.color}`]" :src="x.icons.icon"
v-if="x.icons.icon.length>1"></inline-svg>
<span v-else>{{x.icons.icon}}</span> <span v-else>{{x.icons.icon}}</span>
</q-avatar> </q-avatar>
</q-item-section> </q-item-section>
...@@ -42,13 +43,15 @@ ...@@ -42,13 +43,15 @@
</q-list> </q-list>
<none-data v-else></none-data> <none-data v-else></none-data>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="notify" class="scroll _scrollbar" > <q-tab-panel name="notify" class="scroll _scrollbar">
<q-card flat class="relative-position overflow-hidden q-pa-md text-grey-1 cursor-pointer q-mb-md" style="height:130px" @click="undefinedGongneng"> <q-card flat class="relative-position overflow-hidden q-pa-md text-grey-1 cursor-pointer q-mb-md"
style="height:130px" @click="undefinedGongneng">
<div class="gonggao-bg"> <div class="gonggao-bg">
<img src="../../assets/images/noticeBg.png"/> <img src="../../assets/images/noticeBg.png" />
</div> </div>
<div class="flex row items-center relative-position"> <div class="flex row items-center relative-position">
<q-avatar size="30px" font-size="14px" rounded style="background:#C9F7F5" class="q-mr-md" text-color="secondary"> <q-avatar size="30px" font-size="14px" rounded style="background:#C9F7F5" class="q-mr-md"
text-color="secondary">
<img :src="showObj.UserIcon" v-if="showObj.UserIcon"> <img :src="showObj.UserIcon" v-if="showObj.UserIcon">
<span v-else>{{showObj.AccountName.substring(0,1)}}</span> <span v-else>{{showObj.AccountName.substring(0,1)}}</span>
</q-avatar> </q-avatar>
...@@ -61,191 +64,201 @@ ...@@ -61,191 +64,201 @@
<div class="relative-position q-mt-md text-right text-grey-2 remark-font">甲鹤行2021-A-001</div> <div class="relative-position q-mt-md text-right text-grey-2 remark-font">甲鹤行2021-A-001</div>
</q-card> </q-card>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="work" class="scroll _scrollbar" > <q-tab-panel name="work" class="scroll _scrollbar">
<none-data></none-data> <none-data></none-data>
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>
</q-card> </q-card>
</q-dialog> </q-dialog>
</template> </template>
<script> <script>
import noneData from './none-data' import {
import NoneData from './none-data.vue' GetMyNoticePageList
export default { } from '../../api/course/index'
import noneData from './none-data'
import NoneData from './none-data.vue'
export default {
props: { props: {
showObj: { showObj: {
type: Object, type: Object,
default: null default: null
} }
}, },
components:{ components: {
noneData noneData
}, },
data() { data() {
return { return {
persistent: true, persistent: true,
saveLoading: false, saveLoading: false,
tab:"notify", tab: "notify",
icons:{ icons: {
'退':{ '退': {
backgroundColor: '#ffe2e5', backgroundColor: '#ffe2e5',
color: 'negative', color: 'negative',
icon:'icons/svg/Design/Stamp.svg' icon: 'icons/svg/Design/Stamp.svg'
}, },
'订':{ '订': {
backgroundColor: '#e1f0ff', backgroundColor: '#e1f0ff',
color: 'primary', color: 'primary',
icon:'icons/svg/Shopping/Bag2.svg' icon: 'icons/svg/Shopping/Bag2.svg'
}, },
'考':{ '考': {
backgroundColor: '#fff4de', backgroundColor: '#fff4de',
color: 'warning', color: 'warning',
icon:'icons/svg/Code/Time-schedule.svg' icon: 'icons/svg/Code/Time-schedule.svg'
}, },
'续':{ '续': {
backgroundColor: '#c9f7f5', backgroundColor: '#c9f7f5',
color: 'secondary', color: 'secondary',
icon:'icons/svg/General/Attachment1.svg' icon: 'icons/svg/General/Attachment1.svg'
}, },
'财':{ '财': {
backgroundColor: '#eee5ff', backgroundColor: '#eee5ff',
color: 'accent', color: 'accent',
icon:'icons/svg/Shopping/Dollar.svg' icon: 'icons/svg/Shopping/Dollar.svg'
} }
}, },
defaultIcon:{ defaultIcon: {
backgroundColor: '#f3f6f9', backgroundColor: '#f3f6f9',
color: 'primary' color: 'primary'
}, },
dataList:[ dataList: [{
{ Title: '财务单据结果通知',
Title:'财务单据结果通知', Content: "你参与的财务审核已完成!",
Content:"你参与的财务审核已完成!", Time: "1小时前"
Time:"1小时前"
}, },
{ {
Title:'财务审批通知', Title: '财务审批通知',
Content:"你有待审批的财务单据", Content: "你有待审批的财务单据",
Time:"12小时前" Time: "12小时前"
}, },
{ {
Title:'考勤审批通知', Title: '考勤审批通知',
Content:"李思思发起请假申请,请尽快审批", Content: "李思思发起请假申请,请尽快审批",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'订单通知', Title: '订单通知',
Content:"你的订单:4257已被 刘小勇确认,请尽快上传收费单据,以免班级报满", Content: "你的订单:4257已被 刘小勇确认,请尽快上传收费单据,以免班级报满",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'续费通知', Title: '续费通知',
Content:"你的客户:“郑科”已申请续费课程,请尽快对接", Content: "你的客户:“郑科”已申请续费课程,请尽快对接",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'退课通知', Title: '退课通知',
Content:"你的客户:“郑科”退课申请已通过,请办理相关退款单据", Content: "你的客户:“郑科”退课申请已通过,请办理相关退款单据",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'工作审批通知', Title: '工作审批通知',
Content:"你的20210818工作计划已被:罗超审批通过,请按时上传工作任务信息", Content: "你的20210818工作计划已被:罗超审批通过,请按时上传工作任务信息",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'财务单据结果通知', Title: '财务单据结果通知',
Content:"你参与的财务审核已完成!", Content: "你参与的财务审核已完成!",
Time:"1小时前" Time: "1小时前"
}, },
{ {
Title:'财务审批通知', Title: '财务审批通知',
Content:"你有待审批的财务单据", Content: "你有待审批的财务单据",
Time:"12小时前" Time: "12小时前"
}, },
{ {
Title:'考勤审批通知', Title: '考勤审批通知',
Content:"李思思发起请假申请,请尽快审批", Content: "李思思发起请假申请,请尽快审批",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'订单通知', Title: '订单通知',
Content:"你的订单:4257已被 刘小勇确认,请尽快上传收费单据,以免班级报满", Content: "你的订单:4257已被 刘小勇确认,请尽快上传收费单据,以免班级报满",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'续费通知', Title: '续费通知',
Content:"你的客户:“郑科”已申请续费课程,请尽快对接", Content: "你的客户:“郑科”已申请续费课程,请尽快对接",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'退课通知', Title: '退课通知',
Content:"你的客户:“郑科”退课申请已通过,请办理相关退款单据", Content: "你的客户:“郑科”退课申请已通过,请办理相关退款单据",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'工作审批通知', Title: '工作审批通知',
Content:"你的20210818工作计划已被:罗超审批通过,请按时上传工作任务信息", Content: "你的20210818工作计划已被:罗超审批通过,请按时上传工作任务信息",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'财务单据结果通知', Title: '财务单据结果通知',
Content:"你参与的财务审核已完成!", Content: "你参与的财务审核已完成!",
Time:"1小时前" Time: "1小时前"
}, },
{ {
Title:'财务审批通知', Title: '财务审批通知',
Content:"你有待审批的财务单据", Content: "你有待审批的财务单据",
Time:"12小时前" Time: "12小时前"
}, },
{ {
Title:'考勤审批通知', Title: '考勤审批通知',
Content:"李思思发起请假申请,请尽快审批", Content: "李思思发起请假申请,请尽快审批",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'订单通知', Title: '订单通知',
Content:"你的订单:4257已被 刘小勇确认,请尽快上传收费单据,以免班级报满", Content: "你的订单:4257已被 刘小勇确认,请尽快上传收费单据,以免班级报满",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'续费通知', Title: '续费通知',
Content:"你的客户:“郑科”已申请续费课程,请尽快对接", Content: "你的客户:“郑科”已申请续费课程,请尽快对接",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'退课通知', Title: '退课通知',
Content:"你的客户:“郑科”退课申请已通过,请办理相关退款单据", Content: "你的客户:“郑科”退课申请已通过,请办理相关退款单据",
Time:"1天前" Time: "1天前"
}, },
{ {
Title:'工作审批通知', Title: '工作审批通知',
Content:"你的20210818工作计划已被:罗超审批通过,请按时上传工作任务信息", Content: "你的20210818工作计划已被:罗超审批通过,请按时上传工作任务信息",
Time:"1天前" Time: "1天前"
}, },
], ],
imgCov:'http://192.168.1.214:8130/Upload/studentIcon/20201201044129361.png' imgCov: 'http://192.168.1.214:8130/Upload/studentIcon/20201201044129361.png',
//通知请求参数
noticeMsg:{
pageIndex:1,
pageSize:5
},
} }
}, },
created() { created() {
this.init(); this.init();
this.getNotify();
}, },
methods: { methods: {
init(){ init() {
this.dataList.forEach(x=>{ this.dataList.forEach(x => {
x.icons=this.getIcon(x.Title.substring(0,1)) x.icons = this.getIcon(x.Title.substring(0, 1))
}); });
}, },
closeShenheForm() { closeShenheForm() {
this.$emit('close') this.$emit('close')
}, },
getIcon(t){ getIcon(t) {
if(this.icons[t]){ if (this.icons[t]) {
return this.icons[t] return this.icons[t]
}else{ } else {
let temp=JSON.parse(JSON.stringify(this.defaultIcon)) let temp = JSON.parse(JSON.stringify(this.defaultIcon))
temp.icon=t temp.icon = t
return temp return temp
} }
}, },
...@@ -257,21 +270,50 @@ export default { ...@@ -257,21 +270,50 @@ export default {
}); });
}, },
//请求公告数据
getNotify() {
GetMyNoticePageList(this.noticeMsg).then(res => {
if (res.Code == 1) {
console.log(res, 'notice数据');
// this.noticeObj = res.Data;
// if (res.Data.PageData.length > 0) {
// this.isShowNotice = true;
// }
}
})
}
}, },
} }
</script> </script>
<style> <style>
._scrollbar::-webkit-scrollbar{width: 6px;height: 8px;} ._scrollbar::-webkit-scrollbar {
._scrollbar::-webkit-scrollbar-thumb{border-radius: 2px;box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);background: rgba(0, 0, 0, 0.5);} width: 6px;
._scrollbar::-webkit-scrollbar-track{box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);border-radius: 4px;background: transparent;display: none;} height: 8px;
.gonggao-bg{ }
._scrollbar::-webkit-scrollbar-thumb {
border-radius: 2px;
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.5);
}
._scrollbar::-webkit-scrollbar-track {
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
border-radius: 4px;
background: transparent;
display: none;
}
.gonggao-bg {
position: absolute; position: absolute;
left: -10%; left: -10%;
width: 120%; width: 120%;
height: 130px; height: 130px;
} }
.gonggao-bg img{
.gonggao-bg img {
width: 120%; width: 120%;
height: 120%; height: 120%;
/* filter: blur(20px); */ /* filter: blur(20px); */
...@@ -279,4 +321,5 @@ export default { ...@@ -279,4 +321,5 @@ export default {
margin-top: -8%; margin-top: -8%;
margin-left: -5%; margin-left: -5%;
} }
</style> </style>
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