commit
This commit is contained in:
@@ -15,7 +15,7 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
|
||||
.module {
|
||||
margin: 10px;
|
||||
margin: 10px 10px 20px 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
@@ -33,15 +33,16 @@ layout("/mobile/platform.html"){
|
||||
background-color: white;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
padding: 6px 0px;
|
||||
}
|
||||
|
||||
.menu_item {
|
||||
width: calc(100% / 3);
|
||||
width: calc(100% / 4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 5px 0;
|
||||
padding: 2px 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -56,7 +57,6 @@ layout("/mobile/platform.html"){
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
font-family: "微软雅黑", Helvetica, STHeiTi, sans-serif;
|
||||
color: grey;
|
||||
}
|
||||
@@ -84,13 +84,12 @@ layout("/mobile/platform.html"){
|
||||
|
||||
.middle {
|
||||
background-color: white;
|
||||
margin: 10px;
|
||||
margin: 6px 10px 10px 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.middle_item {
|
||||
display: flex;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.middle_item:last-of-type {
|
||||
@@ -102,31 +101,34 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
|
||||
.middle_item_img {
|
||||
min-width: 100px;
|
||||
width: 130px;
|
||||
height: 90px;
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
height: 140px;
|
||||
object-fit: revert;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.middle_item_text {
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.middle_item_img img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.middle_item_text>div:nth-of-type(1) {
|
||||
font-size: 18px;
|
||||
.middle_item_text {
|
||||
font-size: 12px;
|
||||
margin-top: 6px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.middle_item_text > div:nth-of-type(1) {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.van-badge {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
top: 2px;
|
||||
right: 20px;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.middle .van-empty {
|
||||
@@ -134,59 +136,118 @@ layout("/mobile/platform.html"){
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.sort_div {
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
align-items: center;
|
||||
color: #1867b0;
|
||||
justify-content: flex-end;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.van-tabs .van-icon::before {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.msg_div_text {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.sign_popup {
|
||||
width: 96%;
|
||||
height: 640px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.menu_item_name {
|
||||
margin-top: 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
|
||||
<div style="margin-bottom: 60px" v-if="active === 0">
|
||||
<!--首页-->
|
||||
<div style="margin-bottom: 100px" v-if="active === 'home'">
|
||||
<!--轮播图-->
|
||||
<van-swipe :autoplay="3000" class="swiper">
|
||||
<van-swipe-item v-for="(image, index) in images" :key="index">
|
||||
<img :src="image" width="100%"/>
|
||||
<img :src="image" width="100%" />
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<van-row class="module">
|
||||
<!--应用窗格-->
|
||||
<van-row class="first module">
|
||||
<div class="menu" style="border-radius: 10px">
|
||||
<div class="menu_item">
|
||||
<img :src="CREATE_PREVIEW_URL('')" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">消息</span>
|
||||
<van-badge :content="20"></van-badge>
|
||||
</div>
|
||||
<div v-for="item in 6" class="menu_item">
|
||||
<img :src="CREATE_PREVIEW_URL('')" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">122</span>
|
||||
<div @click="switchModuleMenus(item)" v-for="item in moduleMenus" class="menu_item">
|
||||
<img :src="CREATE_PREVIEW_URL(item.iconClass)" alt="" class="menu_item_img" />
|
||||
<span class="menu_item_name">{{item.moduleName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-row>
|
||||
|
||||
<!--下方功能区,包含活动、功能入口、消息列表-->
|
||||
<van-row>
|
||||
<div class="middle" style="border-radius: 10px;">
|
||||
<template v-if="true">
|
||||
<div v-for="item in 3" class="middle_item">
|
||||
<div class="middle_item_pic">
|
||||
<img :src="CREATE_PREVIEW_URL('FysF8kzAF9aONfw4FSivk2.jpg')" alt="" class="middle_item_img">
|
||||
</div>
|
||||
<div class="middle_item_text">
|
||||
<div><van-icon name="fire" color="red" size="23"></van-icon>春节培训班</div>
|
||||
<div style="line-height: 23px; color: grey; font-size: 12px">
|
||||
<div>开始时间:01/05 08:00</div>
|
||||
<div>结束时间:01/10 08:00</div>
|
||||
<div v-if="clickIndex !== 1" @click="clickIndex = 1" class="sort_div">
|
||||
<van-icon name="sort" style="transform: rotate(90deg)"></van-icon>
|
||||
<span>切换活动列表</span>
|
||||
</div>
|
||||
|
||||
<!--活动列表-->
|
||||
<template v-if="clickIndex === 1">
|
||||
<div v-if="activityOptions.length > 0" v-for="item in activityOptions" class="middle" style="border-radius: 10px">
|
||||
<van-row gutter="20">
|
||||
<van-col span="24" @click="menuClick(item.h5Url)" class="middle_item">
|
||||
<div>
|
||||
<van-image :src="CREATE_PREVIEW_URL(item.cover)" class="middle_item_img">
|
||||
<template slot="loading">
|
||||
<van-loading type="spinner" size="13" />
|
||||
</template>
|
||||
</van-image>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="middle_item_text">
|
||||
<van-icon name="fire" color="red" size="12" style="top: 1px"></van-icon>
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<div style="margin-top: 6px; color: grey; font-size: 11px; display: flex">
|
||||
<div>开始时间:{{ moment(item.startDate).format('YYYY/MM/DD HH:mm') }}</div>
|
||||
<div style="margin-left: 25px">结束时间:{{ moment(item.endDate).format('YYYY/MM/DD HH:mm') }}</div>
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<div v-else>
|
||||
<van-empty description="近期暂无活动"></van-empty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--功能入口-->
|
||||
<template v-else-if="clickIndex === 2">
|
||||
<div class="middle" style="border-radius: 10px">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">{{clickMenu.moduleName}}</div>
|
||||
<div class="menu" style="margin-top: 10px">
|
||||
<div
|
||||
v-for="m in clickMenu.menuList"
|
||||
:key="m.menuId"
|
||||
class="menu_item"
|
||||
v-if="(m.url == '/mobile/member/apply' && ${@shiro.lacksRole('H01')}) || m.url != '/mobile/member/apply'"
|
||||
@click="menuClick(m.url)"
|
||||
>
|
||||
<img :src="CREATE_PREVIEW_URL(m.menuIcon)" alt="" class="menu_item_img" />
|
||||
<span class="menu_item_name">{{m.menuName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div v-if="active === 1" style="background-color: #f6f7f9; min-height: 100vh">
|
||||
<van-notice-bar
|
||||
left-icon="volume-o" color="#1989fa" background="#ecf9ff"
|
||||
text="温馨提示:只显示当前年份的待办和已办事项"
|
||||
></van-notice-bar>
|
||||
<!--我的办理-->
|
||||
<div v-if="active === 'handle'" style="background-color: #f6f7f9; min-height: 100vh">
|
||||
<van-notice-bar left-icon="volume-o" color="#1989fa" background="#ecf9ff" text="温馨提示:只显示当前年份的待办和已办事项"></van-notice-bar>
|
||||
|
||||
<van-tabs v-model="activeName" @click="initData">
|
||||
<van-tab title="待办" name="0">
|
||||
@@ -194,7 +255,7 @@ layout("/mobile/platform.html"){
|
||||
<div v-for="o in needItems">
|
||||
<div v-if="o.count > 0" @click="toUrl(o)" class="van-doc-card">
|
||||
<div class="title">{{ o.title }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<div>
|
||||
<div style="color: grey; font-size: 15px">{{ o.name }}</div>
|
||||
</div>
|
||||
@@ -205,11 +266,11 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
style="margin-top: 44px"
|
||||
v-if="needItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无待办"
|
||||
style="margin-top: 44px"
|
||||
v-if="needItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无待办"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
@@ -218,7 +279,7 @@ layout("/mobile/platform.html"){
|
||||
<div style="min-height: 80vh">
|
||||
<div @click="toHref(o)" class="van-doc-card" v-for="o in completedItems">
|
||||
<div class="title">{{ o.moduleName }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<div>
|
||||
<span>{{ o.auditState }}</span>
|
||||
</div>
|
||||
@@ -228,108 +289,112 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
style="margin-top: 44px"
|
||||
v-if="completedItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无已办"
|
||||
style="margin-top: 44px"
|
||||
v-if="completedItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无已办"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 60px" v-if="active === 2">
|
||||
<van-swipe :autoplay="3000" class="swiper">
|
||||
<van-swipe-item v-for="(image, index) in images" :key="index">
|
||||
<img :src="image" width="100%"/>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<!--工作台-->
|
||||
<div style="margin-bottom: 150px" v-if="active === 'work'">
|
||||
<van-row v-for="m in moduleMenus" class="module">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
{{m.moduleName}}
|
||||
</div>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">{{m.moduleName}}</div>
|
||||
|
||||
<div class="menu">
|
||||
<div v-for="m in m.menuList" :key="m.menuId" class="menu_item"
|
||||
@click="menuClick(m)">
|
||||
<img :src="CREATE_PREVIEW_URL(m.menuIcon)" alt="" class="menu_item_img">
|
||||
<div v-for="m in m.menuList" :key="m.menuId" class="menu_item" @click="menuClick(m.url)">
|
||||
<img :src="CREATE_PREVIEW_URL(m.menuIcon)" alt="" class="menu_item_img" />
|
||||
<span class="menu_item_name">{{m.menuName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<!-- <van-tabbar v-model="active" @change="tabbrChange">-->
|
||||
<!-- <van-tabbar-item icon="home-o">首页</van-tabbar-item>-->
|
||||
<!-- <van-tabbar-item :dot="needCount" icon="envelop-o">我的办理</van-tabbar-item>-->
|
||||
<!-- <van-tabbar-item icon="apps-o">工作台</van-tabbar-item>-->
|
||||
<!-- </van-tabbar>-->
|
||||
<van-popup v-model="qianShow" class="sign_popup">
|
||||
<mobile-sign-points></mobile-sign-points>
|
||||
</van-popup>
|
||||
|
||||
<van-tabbar v-model="active" @change="tabbrChange">
|
||||
<van-tabbar-item icon="home-o" name="home">首页</van-tabbar-item>
|
||||
<van-tabbar-item :dot="needCount" icon="envelop-o" name="handle">我的办理</van-tabbar-item>
|
||||
<van-tabbar-item icon="apps-o" name="work">工作台</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
data() {
|
||||
return {
|
||||
images: [
|
||||
"${AppDomain!}" + '/home1.png',
|
||||
"${AppDomain!}" + '/home2.png',
|
||||
"${AppDomain!}" + '/home3.png',
|
||||
],
|
||||
swipeShow: false,
|
||||
images: ["${AppDomain!}" + "/home1.png", "${AppDomain!}" + "/home2.png", "${AppDomain!}" + "/home3.png"],
|
||||
qianShow: false,
|
||||
msgActive: "unread",
|
||||
moduleMenus: [],
|
||||
roles: [],
|
||||
active: 2,
|
||||
active: "home",
|
||||
needCount: 0,
|
||||
needItems: [],
|
||||
activeName: '0',
|
||||
activeName: "0",
|
||||
completedItems: [],
|
||||
activityOptions: [],
|
||||
clickMenu: {},
|
||||
clickIndex: 1,
|
||||
msgPageForm: {},
|
||||
msgList: [],
|
||||
msgCount: null,
|
||||
|
||||
integralShow: false,
|
||||
integralForm: {},
|
||||
integralViewData: [],
|
||||
totalIntegral: null,
|
||||
yearList: [],
|
||||
monthList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
switchModuleMenus(item) {
|
||||
this.clickMenu = item
|
||||
this.clickIndex = 2
|
||||
},
|
||||
async getMenus() {
|
||||
const {data} = await $.post('/platform/sys/appMenu/appMenus')
|
||||
const { data } = await $.post("/platform/sys/appMenu/appMenus")
|
||||
this.moduleMenus = data
|
||||
},
|
||||
menuClick(menu) {
|
||||
location.href = menu.url
|
||||
menuClick(url) {
|
||||
if (url) {
|
||||
pjaxReplace(url)
|
||||
// location.href = url
|
||||
}
|
||||
},
|
||||
tabbrChange(o) {
|
||||
this.needItems = []
|
||||
this.initData()
|
||||
// this.needItems = []
|
||||
// this.initData()
|
||||
window.localStorage.setItem("active", this.active)
|
||||
},
|
||||
toUrl(o) {
|
||||
location.href = o.mobileHref
|
||||
},
|
||||
toHref(o) {
|
||||
location.href = o.mobileUrl + '?audit=1';
|
||||
location.href = o.mobileUrl + "?audit=1"
|
||||
},
|
||||
/**
|
||||
* 入学登记待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
/*async getRxdjAgenda() {
|
||||
const {data, code} = await $.get("/platform/rxdj/agent/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.number > 0))
|
||||
}
|
||||
},*/
|
||||
async getNeedItems() {
|
||||
const {data, code} = await $.get('/platform/needItems/getNeedItems')
|
||||
const { data, code } = await $.get("/platform/needItems/getNeedItems")
|
||||
if (code === 0) {
|
||||
const obj = data.filter(v => {
|
||||
const obj = data.filter((v) => {
|
||||
return v.mobileHref != null && v.count > 0
|
||||
})
|
||||
this.needItems = obj
|
||||
}
|
||||
},
|
||||
async getCompletes() {
|
||||
const {data, code} = await $.get('/platform/sys/completed/getCompletes')
|
||||
const { data, code } = await $.get("/platform/sys/completed/getCompletes")
|
||||
if (code === 0) {
|
||||
this.completedItems = data;
|
||||
this.completedItems = data
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -337,9 +402,9 @@ layout("/mobile/platform.html"){
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getMemberCheckSelfAgenda() {
|
||||
const {data, code} = await $.get("/platform/memberSelf/agenda/getAgenda")
|
||||
const { data, code } = await $.get("/platform/memberSelf/agenda/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.count > 0))
|
||||
this.needItems = this.needItems.concat(data.filter((v) => v.count > 0))
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -347,37 +412,55 @@ layout("/mobile/platform.html"){
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getWelfareCheckSelfAgenda() {
|
||||
const {data, code} = await $.get("/platform/welfareSelf/agenda/getAgenda")
|
||||
const { data, code } = await $.get("/platform/welfareSelf/agenda/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.count > 0))
|
||||
this.needItems = this.needItems.concat(data.filter((v) => v.count > 0))
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
await this.getNeedItems();
|
||||
await this.getMemberCheckSelfAgenda()
|
||||
await this.getWelfareCheckSelfAgenda()
|
||||
await this.getCompletes();
|
||||
// await this.getNeedItems()
|
||||
// await this.getMemberCheckSelfAgenda()
|
||||
// await this.getWelfareCheckSelfAgenda()
|
||||
// await this.getCompletes()
|
||||
await this.listActivity()
|
||||
this.needCount = this.needItems.length
|
||||
},
|
||||
async setNeedItems() {
|
||||
const {data, code} = await $.get('/platform/needItems/getNeedItems')
|
||||
const { data, code } = await $.get("/platform/needItems/getNeedItems")
|
||||
if (code === 0) {
|
||||
const obj = data.filter(v => {
|
||||
const obj = data.filter((v) => {
|
||||
return v.mobileHref != null && v.count > 0
|
||||
})
|
||||
window.localStorage.setItem('needItems', escape(JSON.stringify(obj)))
|
||||
window.localStorage.setItem("needItems", escape(JSON.stringify(obj)))
|
||||
}
|
||||
},
|
||||
async listActivity() {
|
||||
const resp = await $.post("/platform/sys/homeActivity/listHomeActivity")
|
||||
if (resp.code === 0) {
|
||||
this.activityOptions = resp.data
|
||||
if (!resp.data || resp.data.length === 0) {
|
||||
this.switchFirstModule()
|
||||
}
|
||||
}
|
||||
},
|
||||
switchFirstModule() {
|
||||
const data = this.moduleMenus.find((v) => v.orderNum === 1)
|
||||
this.switchModuleMenus(data)
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
this.setNeedItems();
|
||||
this.setNeedItems()
|
||||
},
|
||||
async created() {
|
||||
await this.getMenus();
|
||||
const data = window.localStorage.getItem("active")
|
||||
if (data) {
|
||||
this.$set(this, "active", data)
|
||||
}
|
||||
await this.getMenus()
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
window.addEventListener("pageshow", (e) => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.getMenus()
|
||||
vue.initData()
|
||||
|
||||
Reference in New Issue
Block a user