移动端返回

This commit is contained in:
Paidax
2025-04-03 17:51:01 +08:00
parent 45a16bf564
commit 3a2f108c42
74 changed files with 2859 additions and 3654 deletions
@@ -38,7 +38,9 @@ layout("/mobile/platform.html"){
font-weight: bold; font-weight: bold;
} }
.concat, .mobile, .union { .concat,
.mobile,
.union {
font-size: 13px; font-size: 13px;
line-height: 18px; line-height: 18px;
width: 100%; width: 100%;
@@ -83,12 +85,10 @@ layout("/mobile/platform.html"){
right: 10px; right: 10px;
color: #1867b0; color: #1867b0;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="货物展示" left-arrow placeholder fixed <van-nav-bar title="货物展示" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<!--<van-dropdown-menu> <!--<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"></van-dropdown-item> <van-dropdown-item v-model="pageForm.typeId" :options="typeList"></van-dropdown-item>
</van-dropdown-menu>--> </van-dropdown-menu>-->
@@ -98,20 +98,17 @@ layout("/mobile/platform.html"){
</van-tabs> </van-tabs>
<template> <template>
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" <van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
v-if="tableData && tableData.length>0" v-if="tableData && tableData.length>0"
v-model="mLoading" v-model="mLoading"
@load="pageData"> @load="pageData"
>
<template v-for="o in tableData"> <template v-for="o in tableData">
<div class="list-card"> <div class="list-card">
<div @click="showGoods(o)" class="content"> <div @click="showGoods(o)" class="content">
<van-image <van-image height="100px" width="100px" radius="8" :src="CREATE_PREVIEW_URL(o.imgUrl)" class="van-image__img"></van-image>
height="100px"
width="100px"
radius="8"
:src="CREATE_PREVIEW_URL(o.imgUrl)"
class="van-image__img">
</van-image>
<div class="content-right"> <div class="content-right">
<div class="cr-title"> <div class="cr-title">
<span>{{o.goodsName}}</span> <span>{{o.goodsName}}</span>
@@ -129,10 +126,8 @@ layout("/mobile/platform.html"){
<div v-if="o.description" style="display: flex; color: #969799"> <div v-if="o.description" style="display: flex; color: #969799">
{{removeHTMLTag(o.description).substr(0,25)+'...'}} {{removeHTMLTag(o.description).substr(0,25)+'...'}}
</div> </div>
<div style="text-align: right;"> <div style="text-align: right">
<a @click.stop="viewDesc(o.id,o.description)" <a @click.stop="viewDesc(o.id,o.description)" class="more" style="color: #1867b0" href="#">查看更多</a>
class="more" style="color:#1867b0"
href="#">查看更多</a>
</div> </div>
</div> </div>
@@ -146,28 +141,19 @@ layout("/mobile/platform.html"){
</template> </template>
</van-list> </van-list>
</template> </template>
<van-empty <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
<van-popup v-model="descPopup" position="right" :style="{ height: '100%',width: '100%'}" safe-area-inset-bottom>
<van-popup v-model="descPopup" position="right" :style="{ height: '100%',width: '100%'}"
safe-area-inset-bottom>
<van-sticky> <van-sticky>
<van-nav-bar @click-left="descPopup=false" left-arrow <van-nav-bar @click-left="descPopup=false" left-arrow title="详情"></van-nav-bar>
title="详情"></van-nav-bar>
</van-sticky> </van-sticky>
<div class="desc" v-html="desc" @click="descClick($event)"></div> <div class="desc" v-html="desc" @click="descClick($event)"></div>
</van-popup> </van-popup>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -176,24 +162,24 @@ layout("/mobile/platform.html"){
pageForm: { pageForm: {
projectId: null, projectId: null,
goodsNAme: null, goodsNAme: null,
typeId:null, typeId: null
}, },
typeList:[], typeList: []
} }
}, },
methods: { methods: {
descClick(e) { descClick(e) {
if (e.target.tagName === 'IMG') { if (e.target.tagName === "IMG") {
vant.ImagePreview([e.target.src]) vant.ImagePreview([e.target.src])
} }
}, },
doSearch() { doSearch() {
this.pageForm.pageNumber = 1 this.pageForm.pageNumber = 1
this.pageData(); this.pageData()
}, },
async pageData() { async pageData() {
this.mLoading = true this.mLoading = true
const resp = await $.post('/mobile/benefiting/onLoad', this.pageForm) const resp = await $.post("/mobile/benefiting/onLoad", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
this.tableData = resp.data.list this.tableData = resp.data.list
if (this.tableData.length === resp.data.totalCount) { if (this.tableData.length === resp.data.totalCount) {
@@ -205,24 +191,23 @@ layout("/mobile/platform.html"){
this.mLoading = false this.mLoading = false
}, },
async getAllType() { async getAllType() {
const resp = await $.get('/platform/benefiting/type/findAllType') const resp = await $.get("/platform/benefiting/type/findAllType")
if (resp.code === 0) { if (resp.code === 0) {
this.typeList = resp.data; this.typeList = resp.data
this.pageForm.typeId = this.typeList[0].id this.pageForm.typeId = this.typeList[0].id
} }
await this.pageData(); await this.pageData()
}, },
viewDesc(optionId, desc) { viewDesc(optionId, desc) {
this.desc = desc this.desc = desc
this.descPopup = true this.descPopup = true
}, }
}, },
async created() { async created() {
this.pageForm.projectId = GetQueryString("projectId") this.pageForm.projectId = GetQueryString("projectId")
await this.getAllType(); await this.getAllType()
}, }
}); })
</script> </script>
<!--# <!--#
} }
@@ -18,45 +18,31 @@ layout("/mobile/platform.html"){
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="惠民服务" left-arrow placeholder fixed <van-nav-bar title="惠民服务" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar> <van-search v-model="pageForm.projectName" shape="round" maxlength="10" @search="doSearch" placeholder="请输入项目名称查询"></van-search>
<van-search
v-model="pageForm.projectName"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入项目名称查询"
></van-search>
<template> <template>
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" <van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
v-if="tableData && tableData.length>0" v-if="tableData && tableData.length>0"
v-model="mLoading" v-model="mLoading"
@load="pageData"> @load="pageData"
>
<template v-for="o in tableData"> <template v-for="o in tableData">
<div class="list-card" style="background-color: #FFFFFF;border-radius: 6px;"> <div class="list-card" style="background-color: #ffffff; border-radius: 6px">
<van-card @click="showGoods(o)" class="content"> <van-card @click="showGoods(o)" class="content">
<template #thumb> <template #thumb>
<img :src="CREATE_PREVIEW_URL(o.cover)" <img :src="CREATE_PREVIEW_URL(o.cover)" @click="preview(o.cover,o.cover)" class="van-image__img" />
@click="preview(o.cover,o.cover)"
class="van-image__img">
</template> </template>
<template #title> <template #title>
<div class="van-ellipsis" <div class="van-ellipsis" style="font-size: 15px; font-weight: bold; line-height: 30px">{{o.projectName}}</div>
style="font-size: 15px;font-weight: bold;line-height: 30px;">
{{o.projectName}}
</div>
</template> </template>
<template #desc> <template #desc>
<div> <div>
<template> <template>
<div> <div>年度:{{o.year}}</div>
年度:{{o.year}} <div style="flex: 1.5">创建时间: {{moment(o.createTime).format('YYYY/MM/DD HH:mm')}}</div>
</div>
<div style="flex: 1.5">
创建时间:
{{moment(o.createTime).format('YYYY/MM/DD HH:mm')}}
</div>
</template> </template>
</div> </div>
</template> </template>
@@ -65,26 +51,21 @@ layout("/mobile/platform.html"){
</template> </template>
</van-list> </van-list>
</template> </template>
<van-empty <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
pageForm:{}, pageForm: {}
} }
}, },
methods: { methods: {
async pageData() { async pageData() {
this.mLoading = true this.mLoading = true
const resp = await $.post('/mobile/benefiting/pageData', this.pageForm) const resp = await $.post("/mobile/benefiting/pageData", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
this.tableData = this.tableData.concat(resp.data.list) this.tableData = this.tableData.concat(resp.data.list)
if (this.tableData.length === resp.data.totalCount) { if (this.tableData.length === resp.data.totalCount) {
@@ -96,13 +77,13 @@ layout("/mobile/platform.html"){
this.mLoading = false this.mLoading = false
}, },
async showGoods(o) { async showGoods(o) {
window.location.href='/mobile/benefiting/goods?projectId=' + o.id window.location.href = "/mobile/benefiting/goods?projectId=" + o.id
} }
}, },
created() { created() {
this.pageData(); this.pageData()
}, }
}); })
</script> </script>
<!--# <!--#
} }
@@ -3,14 +3,23 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.test{width:9em; overflow:hidden; white-space:nowrap;text-overflow: ellipsis;font-size: 10px;text-align: center;color: #a0a1a1 .test {
width: 9em;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 10px;
text-align: center;
color: #a0a1a1;
}
.test:hover {
text-overflow: inherit;
overflow: visible;
} }
.test:hover{text-overflow:inherit; overflow:visible;}
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="生日祝福" left-arrow placeholder fixed <van-nav-bar title="生日祝福" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-search <van-search
v-model="pageForm.searchKeyWord" v-model="pageForm.searchKeyWord"
@@ -18,8 +27,7 @@ layout("/mobile/platform.html"){
maxlength="10" maxlength="10"
@search="doSearch" @search="doSearch"
placeholder="请输入教职工姓名或者教职工编号进行查询" placeholder="请输入教职工姓名或者教职工编号进行查询"
> ></van-search>
</van-search>
<div style="display: flex"> <div style="display: flex">
<div style="width: calc(100% - 100px); background: rgb(255, 255, 255)"> <div style="width: calc(100% - 100px); background: rgb(255, 255, 255)">
@@ -27,26 +35,21 @@ layout("/mobile/platform.html"){
<h5 style="margin-left: 5%; color: rgb(122, 110, 96)">{{tableData.length}}同事即将生日</h5> <h5 style="margin-left: 5%; color: rgb(122, 110, 96)">{{tableData.length}}同事即将生日</h5>
</div> </div>
<div style="width: 100px; max-width: 100px"> <div style="width: 100px; max-width: 100px">
<van-image width="100px" <van-image width="100px" height="100px" src="/assets/mobile/img/birthday/birthday1.png"></van-image>
height="100px"
src="/assets/mobile/img/birthday/birthday1.png"
></van-image>
</div> </div>
</div> </div>
</div> </div>
<div style="margin-top: 160px; margin-bottom: 50px"> <div style="margin-top: 160px; margin-bottom: 50px">
<div> <div>
<van-checkbox-group v-model="result"> <van-checkbox-group v-model="result">
<van-grid :column-num="3" :border="false" style="background-color: white"> <van-grid :column-num="3" :border="false" style="background-color: white">
<van-grid-item <van-grid-item v-for="o in tableData" :key="o.userId" style="padding: 5px">
v-for="o in tableData"
:key="o.userId" style="padding: 5px;">
<span style="font-size: 10px">{{o.birthday.substr(0,2)}}-{{o.birthday.substr(2,4)}}</span> <span style="font-size: 10px">{{o.birthday.substr(0,2)}}-{{o.birthday.substr(2,4)}}</span>
<div style="background-image: url('/assets/mobile/img/birthday/birthday2.png'); <div
style="
background-image: url(&quot;/assets/mobile/img/birthday/birthday2.png&quot;);
width: 100px; width: 100px;
height: 100px; height: 100px;
background-size: 100% 100%; background-size: 100% 100%;
@@ -54,7 +57,8 @@ layout("/mobile/platform.html"){
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
"> "
>
<span style="font-size: 20px; font-weight: bold; font-family: cursive">{{o.username.substr(0,1)}}</span> <span style="font-size: 20px; font-weight: bold; font-family: cursive">{{o.username.substr(0,1)}}</span>
</div> </div>
<span style="font-size: 10px">{{o.username}}</span> <span style="font-size: 10px">{{o.username}}</span>
@@ -63,11 +67,7 @@ layout("/mobile/platform.html"){
</div> </div>
<!-- <span v-if="o.unitName.length>7" style="font-size: 10px;">{{o.unitName.substr(0,7)+"..."}}</span>--> <!-- <span v-if="o.unitName.length>7" style="font-size: 10px;">{{o.unitName.substr(0,7)+"..."}}</span>-->
<!-- <span v-else style="font-size: 10px">{{o.unitName}}</span>--> <!-- <span v-else style="font-size: 10px">{{o.unitName}}</span>-->
<van-checkbox <van-checkbox style="margin-left: 80px; margin-top: -35px" icon-size="20px" :name="o.userId" ref="checkboxes"></van-checkbox>
style="margin-left: 80px;margin-top: -35px"
icon-size="20px"
:name="o.userId" ref="checkboxes">
</van-checkbox>
</van-grid-item> </van-grid-item>
</van-grid> </van-grid>
</van-checkbox-group> </van-checkbox-group>
@@ -75,22 +75,21 @@ layout("/mobile/platform.html"){
<div> <div>
<van-tabbar route> <van-tabbar route>
<van-tabbar-item replace @click="sendBlessings()" style="font-size: 16px;">送上祝福</van-tabbar-item> <van-tabbar-item replace @click="sendBlessings()" style="font-size: 16px">送上祝福</van-tabbar-item>
<van-tabbar-item replace @click="showMine()" style="font-size: 16px">我收到的</van-tabbar-item> <van-tabbar-item replace @click="showMine()" style="font-size: 16px">我收到的</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
</div> </div>
</div> </div>
<script> <script>
new Vue({ new Vue({
el: '#app', el: "#app",
data() { data() {
return { return {
tableData: [], tableData: [],
pageForm: {}, pageForm: {},
checked: true, checked: true,
result: [], result: []
} }
}, },
methods: { methods: {
@@ -98,7 +97,7 @@ layout("/mobile/platform.html"){
this.onLoad() this.onLoad()
}, },
async onLoad() { async onLoad() {
const res = await $.post('/mobile/birthday/greeting/pageData', this.pageForm) const res = await $.post("/mobile/birthday/greeting/pageData", this.pageForm)
if (res.code === 0) { if (res.code === 0) {
this.tableData = res.data this.tableData = res.data
} }
@@ -106,25 +105,23 @@ layout("/mobile/platform.html"){
//送上祝福 //送上祝福
sendBlessings() { sendBlessings() {
if (this.result.length === 0) { if (this.result.length === 0) {
this.$toast.fail("请选择教职工"); this.$toast.fail("请选择教职工")
return; return
} }
localStorage.setItem("greetingResult",this.result); localStorage.setItem("greetingResult", this.result)
window.location.href = '/mobile/birthday/greeting/greeting_list' window.location.href = "/mobile/birthday/greeting/greeting_list"
}, },
toggle(index) { toggle(index) {
this.$refs.checkboxes[index].toggle(); this.$refs.checkboxes[index].toggle()
}, },
showMine() { showMine() {
window.location.href = '/mobile/birthday/greeting/greeting_info' window.location.href = "/mobile/birthday/greeting/greeting_info"
} }
}, },
created() { created() {
this.onLoad(); this.onLoad()
},
components: {
}, },
components: {}
}) })
</script> </script>
<!--# <!--#
@@ -21,35 +21,19 @@ layout("/mobile/platform.html"){
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="我收到的祝福" left-arrow placeholder fixed <van-nav-bar title="我收到的祝福" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-search <van-search v-model="pageForm.username" shape="round" maxlength="10" @search="doSearch" placeholder="请输入教职工姓名进行查询"></van-search>
v-model="pageForm.username"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入教职工姓名进行查询"
>
</van-search>
</div> </div>
<div style="margin-top: 70px"> <div style="margin-top: 70px">
<van-list v-model="mLoading" :finished="finished" :finished-text="giftInfo.length>0?'没有更多了':''" <van-list v-model="mLoading" :finished="finished" :finished-text="giftInfo.length>0?'没有更多了':''" @load="onLoad">
@load="onLoad">
<div v-for="o in giftInfo" :key="o.id" class="van-doc-card"> <div v-for="o in giftInfo" :key="o.id" class="van-doc-card">
<div> <div>
<div style="font-size: 15px; <div style="font-size: 15px; font-weight: bold; flex: 1; margin-left: 15px; overflow: hidden; white-space: nowrap">
font-weight: bold;
flex: 1;
margin-left: 15px;
overflow: hidden;
white-space: nowrap;">
<span style="color: #3ea1ec">{{o.username}}</span> <span style="color: #3ea1ec">{{o.username}}</span>
<span style="color: #3ea1ec">|</span> <span style="color: #3ea1ec">|</span>
<span style="font-size: 10px; font-weight: normal; color: #a0a1a1">{{o.name}}</span> <span style="font-size: 10px; font-weight: normal; color: #a0a1a1">{{o.name}}</span>
@@ -62,34 +46,30 @@ layout("/mobile/platform.html"){
<span v-if="o.message.length==0">无</span> <span v-if="o.message.length==0">无</span>
<span v-if="o.message.length>0">{{o.message}}</span> <span v-if="o.message.length>0">{{o.message}}</span>
</van-cell> </van-cell>
<van-cell :border="false" title="生日贺卡" @click="showHk(o)" <van-cell :border="false" title="生日贺卡" @click="showHk(o)" v-if="o.isSend==1" is-link value="点击展示"></van-cell>
v-if="o.isSend==1" is-link value="点击展示"></van-cell>
<van-cell :border="false" title="赠送礼物"> <van-cell :border="false" title="赠送礼物">
<van-image style="width: 50px;height: 50px" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id" @click="showGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"></van-image> <van-image
style="width: 50px; height: 50px"
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id"
@click="showGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"
></van-image>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</div> </div>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty v-if="mLoading==false&&giftInfo.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&giftInfo.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
</div> </div>
<script> <script>
new Vue({ new Vue({
el:'#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
show: false, show: false,
images:'', images: "",
giftInfo:[], giftInfo: []
} }
}, },
methods: { methods: {
@@ -101,11 +81,11 @@ layout("/mobile/platform.html"){
}, },
async onLoad() { async onLoad() {
this.mLoading = true this.mLoading = true
const res = await $.post('/mobile/birthday/greeting/giftInfo', this.pageForm) const res = await $.post("/mobile/birthday/greeting/giftInfo", this.pageForm)
this.mLoading = false this.mLoading = false
if (res.code === 0) { if (res.code === 0) {
res.data.list.forEach(v => { res.data.list.forEach((v) => {
if(!(typeof v.files =='object')){ if (!(typeof v.files == "object")) {
v.files = JSON.parse(v.files) v.files = JSON.parse(v.files)
} }
}) })
@@ -121,12 +101,10 @@ layout("/mobile/platform.html"){
vant.ImagePreview([data]) vant.ImagePreview([data])
}, },
showHk(o) { showHk(o) {
window.location.href='/mobile/birthday/greeting/hk?id='+o.id window.location.href = "/mobile/birthday/greeting/hk?id=" + o.id
},
},
created(){
} }
},
created() {}
}) })
</script> </script>
<!--# <!--#
@@ -15,20 +15,21 @@ layout("/mobile/platform.html"){
</style> </style>
<div id="app" style="background-color: white"> <div id="app" style="background-color: white">
<van-nav-bar title="精选礼物" left-arrow placeholder fixed <van-nav-bar title="精选礼物" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<div> <div>
<span style="color: rgb(114,90,69);margin-left: 10px;font-size: 14px;font-weight: bold">正在为 <span style="color: rgb(114, 90, 69); margin-left: 10px; font-size: 14px; font-weight: bold">
<span v-for="o in tableData"> {{o.username}} </span>挑选礼物 正在为
<span v-for="o in tableData">{{o.username}}</span>
挑选礼物
</span> </span>
</div> </div>
<div> <div>
<van-grid :column-num="6" :border="false"> <van-grid :column-num="6" :border="false">
<van-grid-item <van-grid-item v-for="o in tableData" :key="o.userId" style="padding: 5px">
v-for="o in tableData" <div
:key="o.userId" style="padding: 5px;"> style="
<div style="background-color: rgb(203,200,222); background-color: rgb(203, 200, 222);
width: 50px; width: 50px;
height: 50px; height: 50px;
background-size: 100% 100%; background-size: 100% 100%;
@@ -37,7 +38,8 @@ layout("/mobile/platform.html"){
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
"> "
>
<span style="font-size: 20px">{{o.username.substr(0,1)}}</span> <span style="font-size: 20px">{{o.username.substr(0,1)}}</span>
</div> </div>
<span style="font-size: 10px">{{o.username}}</span> <span style="font-size: 10px">{{o.username}}</span>
@@ -49,11 +51,12 @@ layout("/mobile/platform.html"){
<div><h3 style="margin-left: 10px">精选礼物</h3></div> <div><h3 style="margin-left: 10px">精选礼物</h3></div>
<div> <div>
<van-grid :column-num="3" :border="false"> <van-grid :column-num="3" :border="false">
<van-grid-item <van-grid-item v-for="(o,index) in listGift" :key="o.id" style="padding: 5px">
v-for="(o,index) in listGift"
:key="o.id" style="padding: 5px;">
<div class="sub"> <div class="sub">
<van-image :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id" @click="sendGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"></van-image> <van-image
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id"
@click="sendGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"
></van-image>
</div> </div>
<span style="font-size: 10px">{{o.giftName}}</span> <span style="font-size: 10px">{{o.giftName}}</span>
</van-grid-item> </van-grid-item>
@@ -93,39 +96,38 @@ layout("/mobile/platform.html"){
</div> </div>
</van-dialog> </van-dialog>
</div> </div>
</div> </div>
<script> <script>
new Vue({ new Vue({
el:'#app', el: "#app",
data() { data() {
return { return {
pageForm: { pageForm: {
greetingResult:localStorage.getItem("greetingResult"), greetingResult: localStorage.getItem("greetingResult")
}, },
tableData: [], tableData: [],
listGift: [], listGift: [],
show: false, show: false,
images:'', images: "",
form: { form: {
giftId:'', giftId: "",
message:'', message: "",
isSend:false, isSend: false
}, }
} }
}, },
methods: { methods: {
async loadList() { async loadList() {
const res = await $.post('/mobile/birthday/greeting/loadList',this.pageForm) const res = await $.post("/mobile/birthday/greeting/loadList", this.pageForm)
if (res.code === 0) { if (res.code === 0) {
this.tableData = res.data this.tableData = res.data
} }
}, },
async giftList() { async giftList() {
const res = await $.get('/mobile/birthday/greeting/giftList') const res = await $.get("/mobile/birthday/greeting/giftList")
if (res.code === 0) { if (res.code === 0) {
res.data.forEach(v => { res.data.forEach((v) => {
if(!(typeof v.files =='object')){ if (!(typeof v.files == "object")) {
v.files = JSON.parse(v.files) v.files = JSON.parse(v.files)
} }
}) })
@@ -133,40 +135,43 @@ layout("/mobile/platform.html"){
} }
}, },
sendGift(data, id) { sendGift(data, id) {
this.show=true; this.show = true
this.images=data; this.images = data
this.form.giftId=id; this.form.giftId = id
this.form.greetingResult=this.pageForm.greetingResult; this.form.greetingResult = this.pageForm.greetingResult
}, },
beforeClose : async function (action, done) { // 点击事件 - 备注按钮提示框 beforeClose: async function (action, done) {
if (action === 'confirm') { // 确认 // 点击事件 - 备注按钮提示框
const res = await $.post('/mobile/birthday/greeting/sendBlessing', this.form) if (action === "confirm") {
// 确认
const res = await $.post("/mobile/birthday/greeting/sendBlessing", this.form)
if (res.code === 0) { if (res.code === 0) {
done(); // 关闭提示框 done() // 关闭提示框
this.$toast.success("赠送成功") this.$toast.success("赠送成功")
} else { } else {
done(); done()
this.$toast.fail("操作失败") this.$toast.fail("操作失败")
} }
} else if (action === 'cancel') { // 取消 } else if (action === "cancel") {
this.show = false; // 取消
this.images = ''; this.show = false
this.form = {}; this.images = ""
done(); // 关闭提示框 this.form = {}
done() // 关闭提示框
} }
}, },
send() { send() {
console.log(this.form.isSend) console.log(this.form.isSend)
}, },
showHk() { showHk() {
window.location.href='/mobile/birthday/greeting/hk' window.location.href = "/mobile/birthday/greeting/hk"
} }
}, },
created() { created() {
this.loadList(); this.loadList()
this.giftList(); this.giftList()
} }
}); })
</script> </script>
<!--# <!--#
} }
@@ -5,13 +5,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="活动列表"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
@@ -20,11 +14,7 @@ layout("/mobile/platform.html"){
</div> </div>
<div style="margin: 60px auto"> <div style="margin: 60px auto">
<van-list <van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="mLoading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="list-card" @click="openView(o)"> <div v-for="o in tableData" class="list-card" @click="openView(o)">
<van-cell-group inset> <van-cell-group inset>
<van-cell title="主题" :border="false">{{o.hdname}}</van-cell> <van-cell title="主题" :border="false">{{o.hdname}}</van-cell>
@@ -35,12 +25,7 @@ layout("/mobile/platform.html"){
</van-cell-group> </van-cell-group>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
<div> <div>
@@ -49,20 +34,19 @@ layout("/mobile/platform.html"){
<van-tabbar-item icon="manager-o" replace url="/mobile/cahd/list">我的亲子作品</van-tabbar-item> <van-tabbar-item icon="manager-o" replace url="/mobile/cahd/list">我的亲子作品</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
</div> </div>
<script> <script>
let vue = new Vue({ let vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
tarBarActive: 0, tarBarActive: 0,
yearOption: [], yearOption: [],
pageForm: { pageForm: {
year: '', year: "",
hdtype: 2, hdtype: 2
} }
} }
}, },
@@ -74,7 +58,7 @@ layout("/mobile/platform.html"){
}, },
async onLoad() { async onLoad() {
this.mLoading = true this.mLoading = true
$.post('/mobile/cahd/apply/pageData', this.pageForm).then(res => { $.post("/mobile/cahd/apply/pageData", this.pageForm).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -89,25 +73,24 @@ layout("/mobile/platform.html"){
openView(o) { openView(o) {
const { hdid, hdjssj, hdkssj } = o const { hdid, hdjssj, hdkssj } = o
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) { if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
vant.Toast('报名暂未开始!') vant.Toast("报名暂未开始!")
return return
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) { } else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
vant.Toast('报名已结束!') vant.Toast("报名已结束!")
return return
} }
window.location.href = '/childrenActivities?client=mobile&id=' + hdid window.location.href = "/childrenActivities?client=mobile&id=" + hdid
} }
}, },
async created() { async created() {
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) { for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearOption.unshift({value: i, text: i + '年'},) this.yearOption.unshift({ value: i, text: i + "年" })
} }
this.$set(this.pageForm, "year", this.yearOption[0].value) this.$set(this.pageForm, "year", this.yearOption[0].value)
} }
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -13,7 +13,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="作品列表" left-arrow placeholder fixed @click-left="location.href='/mobile/index'"></van-nav-bar> <van-nav-bar title="作品列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
@@ -1,23 +1,23 @@
<!--# <!--#
layout("/mobile/platform.html"){ layout("/mobile/platform.html"){
#--> #-->
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css"> <link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css" />
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script> <script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<mobile-cahd-info ref="minfo"></mobile-cahd-info> <mobile-cahd-info ref="minfo"></mobile-cahd-info>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
data() { data() {
return {} return {}
}, },
components: { components: {
'mobile-cahd-info': httpVueLoader('/components/mobile/cahd/info.vue?v=' + new Date().getTime()), "mobile-cahd-info": httpVueLoader("/components/mobile/cahd/info.vue?v=" + new Date().getTime())
}, },
methods: {}, methods: {},
async created() { async created() {
@@ -31,7 +31,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
+10 -17
View File
@@ -3,7 +3,6 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.container .van-button { .container .van-button {
position: relative; position: relative;
display: block; display: block;
@@ -30,44 +29,38 @@ layout("/mobile/platform.html"){
height: calc(100vh - 46px); height: calc(100vh - 46px);
flex-direction: column; flex-direction: column;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="代表证" left-arrow placeholder fixed <van-nav-bar title="代表证" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<div class="container"> <div class="container">
<van-button @click="showCard('jdh')" style="margin-bottom: 40px;">教代会代表证</van-button> <van-button @click="showCard('jdh')" style="margin-bottom: 40px">教代会代表证</van-button>
<van-button @click="showCard('gdh')">工代会代表证</van-button> <van-button @click="showCard('gdh')">工代会代表证</van-button>
</div> </div>
</div> </div>
<script> <script>
new Vue({ new Vue({
el: '#app', el: "#app",
data() { data() {
return { return {}
}
}, },
methods: { methods: {
async showCard(type) { async showCard(type) {
//先查看当前登录用户是不是代表 //先查看当前登录用户是不是代表
const resp = await $.post('/platform/card/isDb', {type: type}) const resp = await $.post("/platform/card/isDb", { type: type })
if (resp.code !== 0) { if (resp.code !== 0) {
vant.Dialog.alert({ vant.Dialog.alert({
title: '温馨提示', title: "温馨提示",
message: resp.msg, message: resp.msg
}) })
return return
} }
//获取代表证 //获取代表证
vant.ImagePreview(['/platform/card/showCard?type=' + type]) vant.ImagePreview(["/platform/card/showCard?type=" + type])
}, }
},
created() {
}, },
created() {}
}) })
</script> </script>
<!--# <!--#
@@ -1,19 +1,16 @@
<!--# <!--#
layout("/mobile/platform.html"){ layout("/mobile/platform.html"){
#--> #-->
<style> <style></style>
</style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="慰问申请信息" left-arrow placeholder fixed <van-nav-bar title="慰问申请信息" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<div> <div>
<condolence-info :id.sync="id"></condolence-info> <condolence-info :id.sync="id"></condolence-info>
<div style="margin: 20px 20px 10px 20px"> <div style="margin: 20px 20px 10px 20px">
<van-button :color="themeColor" block @click="doEdit" class="ml10 mr10" <van-button :color="themeColor" block @click="doEdit" class="ml10 mr10" v-if="state_id==2010||state_id==2020">
v-if="state_id==2010||state_id==2020">撤&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;回 撤&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;回
</van-button> </van-button>
</div> </div>
</div> </div>
@@ -21,7 +18,7 @@ layout("/mobile/platform.html"){
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -30,30 +27,29 @@ layout("/mobile/platform.html"){
} }
}, },
components: { components: {
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()), "condolence-info": httpVueLoader("/components/condolence/mobile/common.vue?v=" + new Date().getTime())
}, },
methods: { methods: {
doEdit() { doEdit() {
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '标题', title: "标题",
message: '确认要撤回吗?', message: "确认要撤回吗?"
}) })
.then(async () => { .then(async () => {
const resp = await $.post("/platform/fw/condolence/ucr/doEdit", {id: this.id}); const resp = await $.post("/platform/fw/condolence/ucr/doEdit", { id: this.id })
this.$toast.success('撤回成功'); this.$toast.success("撤回成功")
setTimeout(() => { setTimeout(() => {
history.back() history.back()
}, 1000) }, 1000)
}) })
.catch(() => { .catch(() => {
// on cancel // on cancel
}); })
} }
}, },
async created() { async created() {
this.id = GetQueryString('id') this.id = GetQueryString("id")
this.state_id = GetQueryString('state_id') this.state_id = GetQueryString("state_id")
} }
}) })
</script> </script>
@@ -3,38 +3,25 @@ layout("/mobile/platform.html"){
#--> #-->
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="慰问审核" left-arrow placeholder fixed <van-nav-bar title="慰问审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.go(-1)"></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu :active-color="themeColor"> <van-dropdown-menu :active-color="themeColor">
<van-dropdown-item v-model="pageForm.year" @change="yearChange" <van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
:options="yearList"></van-dropdown-item> <van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" <van-dropdown-item v-model="pageForm.type" @change="yearChange" :options="mCondolence.typeList"></van-dropdown-item>
:options="auditList"></van-dropdown-item> <van-dropdown-item v-model="pageForm.unionId" @change="yearChange" :options="mCommon.unionList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.type" @change="yearChange" <van-dropdown-item v-model="pageForm.unitId" @change="yearChange" :options="mCommon.unitList"></van-dropdown-item>
:options="mCondolence.typeList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange"
:options="mCommon.unionList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange"
:options="mCommon.unitList"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div style="margin: 70px auto 0"> <div style="margin: 70px auto 0">
<van-list v-model="mLoading" :finished="finished" <van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="pageData">
:finished-text="tableData.length>0?'没有更多了':''"
@load="pageData">
<div v-for="o in tableData" class="list-card" @click="openView(o)"> <div v-for="o in tableData" class="list-card" @click="openView(o)">
<van-cell-group inset> <van-cell-group inset>
<van-cell :border="false" title="被慰问人"> <van-cell :border="false" title="被慰问人">
<span class="van-ellipsis" style="font-size: 16px;" <span class="van-ellipsis" style="font-size: 16px" :style="{color:themeColor}">{{o.be_username}}</span>
:style="{color:themeColor}">
{{o.be_username}}
</span>
</van-cell> </van-cell>
<van-cell :border="false" title="申&ensp;请&ensp;人">{{o.sqr_username}}</van-cell> <van-cell :border="false" title="申&ensp;请&ensp;人">{{o.sqr_username}}</van-cell>
<van-cell :border="false" title="所在单位">{{o.be_unitname}}</van-cell> <van-cell :border="false" title="所在单位">{{o.be_unitname}}</van-cell>
@@ -49,18 +36,13 @@ layout("/mobile/platform.html"){
</div> </div>
</van-list> </van-list>
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
image="/none.svg"
description="暂无数据">
</van-empty>
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -68,30 +50,30 @@ layout("/mobile/platform.html"){
unionList: [], unionList: [],
yearList: [], yearList: [],
auditList: [ auditList: [
{text: '未审核', value: false}, { text: "未审核", value: false },
{text: '已审核', value: true}, { text: "已审核", value: true }
], ],
handle: true, handle: true,
pageForm: { pageForm: {
year: new Date().getFullYear(), year: new Date().getFullYear(),
isAudit: false, isAudit: false
}, }
} }
}, },
methods: { methods: {
openView(o) { openView(o) {
window.location.href = '/mobile/condolence/audit/auditHtml?state_id=' + o.state_id + '&id=' + o.id window.location.href = "/mobile/condolence/audit/auditHtml?state_id=" + o.state_id + "&id=" + o.id
}, },
yearChange() { yearChange() {
this.tableData = [] this.tableData = []
this.refreshing = true; this.refreshing = true
this.finished = false; this.finished = false
this.pageForm.pageNumber = 0 this.pageForm.pageNumber = 0
this.flushUnits() this.flushUnits()
}, },
pageData() { pageData() {
this.mLoading = true this.mLoading = true
$.get(loc() + '/pageData', this.pageForm, (res) => { $.get(loc() + "/pageData", this.pageForm, (res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -102,11 +84,10 @@ layout("/mobile/platform.html"){
} }
}) })
this.mLoading = false this.mLoading = false
}, },
async flushUnits() { async flushUnits() {
//this.$set(this.pageForm, "unitId", "") //this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') { if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === "true") {
await mCommon.getUnitList(this.pageForm.unionId) await mCommon.getUnitList(this.pageForm.unionId)
} else { } else {
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}") await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
@@ -133,12 +114,12 @@ layout("/mobile/platform.html"){
async created() { async created() {
this.init() this.init()
this.flushUnits() this.flushUnits()
if (GetQueryString("audit") === '1') { if (GetQueryString("audit") === "1") {
this.pageForm.isAudit = true this.pageForm.isAudit = true
} }
} }
}) })
window.addEventListener('pageshow', e => { window.addEventListener("pageshow", (e) => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) { if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.init() vue.init()
vue.yearChange() vue.yearChange()
@@ -146,7 +127,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -3,29 +3,26 @@ layout("/mobile/platform.html"){
#--> #-->
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="慰问审核" left-arrow placeholder fixed <van-nav-bar title="慰问审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<condolence-info ref="info" :id.sync="id" title="校工会审核" :handle="handle"> <condolence-info ref="info" :id.sync="id" title="校工会审核" :handle="handle">
<template #handle> <template #handle>
<div class="van-cell-group__title mt20"> <div class="van-cell-group__title mt20">
<div class="van-sidebar-item van-sidebar-item--select"> <div class="van-sidebar-item van-sidebar-item--select">校工会审核</div>
校工会审核
</div>
</div> </div>
<van-form> <van-form>
<van-field
<van-field readonly left-icon="contact" readonly
left-icon="contact"
value="${@shiro.getPrincipalProperty('username')}" value="${@shiro.getPrincipalProperty('username')}"
name="username" name="username"
label="审核人员" label="审核人员"
></van-field> ></van-field>
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o" <van-field v-model="formData.time" label="审核时间" left-icon="clock-o" readonly></van-field>
readonly></van-field>
<van-field v-model="formData.opinion" <van-field
v-model="formData.opinion"
left-icon="chat-o" left-icon="chat-o"
rows="1" rows="1"
required required
@@ -45,71 +42,61 @@ layout("/mobile/platform.html"){
</template> </template>
</van-field> </van-field>
<van-row gutter="20" style="margin-top: 30px; padding: 0 25px"> <van-row gutter="20" style="margin-top: 30px; padding: 0 25px">
<van-col span="8"> <van-col span="8">
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝 <van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝</van-button>
</van-button>
</van-col> </van-col>
<van-col span="8"> <van-col span="8">
<van-button :color="themeColor" block @click="doAudit(2)">返回修改 <van-button :color="themeColor" block @click="doAudit(2)">返回修改</van-button>
</van-button>
</van-col> </van-col>
<van-col span="8"> <van-col span="8">
<van-button :color="themeColor" block @click="doAudit(3)">通 过 <van-button :color="themeColor" block @click="doAudit(3)">通 过</van-button>
</van-button>
</van-col> </van-col>
</van-row> </van-row>
</van-form> </van-form>
</template> </template>
</condolence-info> </condolence-info>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
handle: true, handle: true,
id: "", id: "",
formData: {}, formData: {}
} }
}, },
components: { components: {
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'), "mobile-sign": httpVueLoader("/components/sign/mobileSign.vue"),
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()), "condolence-info": httpVueLoader("/components/condolence/mobile/common.vue?v=" + new Date().getTime())
}, },
methods: { methods: {
async doAudit(pass) { async doAudit(pass) {
if (!this.formData.opinion) { if (!this.formData.opinion) {
this.$toast.fail('请填写审核意见'); this.$toast.fail("请填写审核意见")
return return
} }
this.$refs.signature.submitSign() this.$refs.signature.submitSign()
if (this.$refs.signature.checkNull()) { if (this.$refs.signature.checkNull()) {
vant.Toast('请签名!') vant.Toast("请签名!")
return return
} }
await this.$refs.signature.updateSign() await this.$refs.signature.updateSign()
this.formData.pass = pass this.formData.pass = pass
const resp = await $.post("/platform/fw/condolence/fr/doReview", this.formData) const resp = await $.post("/platform/fw/condolence/fr/doReview", this.formData)
if (resp.code === 0) { if (resp.code === 0) {
this.$toast.success('审核成功') this.$toast.success("审核成功")
setTimeout(() => { setTimeout(() => {
window.history.back() window.history.back()
}, 1000) }, 1000)
} else { } else {
this.$toast.fail('审核失败'); this.$toast.fail("审核失败")
}
} }
},
}, },
async created() { async created() {
this.id = GetQueryString("id") this.id = GetQueryString("id")
@@ -117,16 +104,14 @@ layout("/mobile/platform.html"){
this.formData = { this.formData = {
id: this.id, id: this.id,
username: "${@shiro.getPrincipalProperty('username')}", username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'), time: moment().format("YYYY-MM-DD"),
opinion: null, opinion: null,
sign: "", sign: ""
} }
} }
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -3,7 +3,7 @@ layout("/mobile/platform.html"){
#--> #-->
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="慰问审核" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="慰问审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<condolence-info ref="info" :id.sync="id" title="校工会主席审核" :handle="handle"> <condolence-info ref="info" :id.sync="id" title="校工会主席审核" :handle="handle">
<template #handle> <template #handle>
@@ -3,7 +3,7 @@ layout("/mobile/platform.html"){
#--> #-->
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="慰问审核" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="慰问审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<condolence-info ref="info" :id.sync="id" title="基层工会审核" :handle="handle"> <condolence-info ref="info" :id.sync="id" title="基层工会审核" :handle="handle">
<template #handle> <template #handle>
@@ -44,15 +44,12 @@ layout("/mobile/platform.html"){
.avatar .van-image__img { .avatar .van-image__img {
border-radius: 10px; border-radius: 10px;
} }
.list-card { .list-card {
margin: 10px 10px; margin: 10px 10px;
} }
.list-card .van-cell { .list-card .van-cell {
border-radius: 10px; border-radius: 10px;
padding: 18px 16px; padding: 18px 16px;
@@ -61,20 +58,11 @@ layout("/mobile/platform.html"){
.van-cell-group { .van-cell-group {
border-radius: 10px; border-radius: 10px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="慈善捐款项目" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" safe-area-inset-top></van-nav-bar>
title="慈善捐款项目"
left-arrow
placeholder
fixed
@click-left="history.back()"
safe-area-inset-top
></van-nav-bar>
<div style="margin: 20px auto 0 auto"> <div style="margin: 20px auto 0 auto">
<van-list :finished="finished" :finished-text="isNullTypeCodeData.length>0?'没有更多了':''"> <van-list :finished="finished" :finished-text="isNullTypeCodeData.length>0?'没有更多了':''">
@@ -91,17 +79,12 @@ layout("/mobile/platform.html"){
</div> </div>
<div class="right-content"> <div class="right-content">
<div class="r-title">{{o.contributionName}}</div> <div class="r-title">{{o.contributionName}}</div>
<div class="van-ellipsis r-content"> <div class="van-ellipsis r-content">{{removeHTMLTag(o.contributionIntroduce)}}</div>
{{removeHTMLTag(o.contributionIntroduce)}}
</div>
<div> <div>
<van-row type="flex" justify="space-between" <van-row type="flex" justify="space-between" style="white-space: nowrap">
style="white-space: nowrap">
<van-col span="12"> <van-col span="12">
已筹: 已筹:
<sapn style="color: red"> <sapn style="color: red">{{o.totalMoney?o.totalMoney:0}}</sapn>
{{o.totalMoney?o.totalMoney:0}}
</sapn>
元 元
</van-col> </van-col>
<van-col span="12" class="text-right"> <van-col span="12" class="text-right">
@@ -111,10 +94,8 @@ layout("/mobile/platform.html"){
</van-col> </van-col>
</van-row> </van-row>
</div> </div>
</div> </div>
</div> </div>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</div> </div>
@@ -131,12 +112,11 @@ layout("/mobile/platform.html"){
></van-image> ></van-image>
</div> </div>
<div class="right-content"> <div class="right-content">
<div class="r-title">{{o.typeName}} <div class="r-title">
{{o.typeName}}
<van-tag type="danger" round>专题</van-tag> <van-tag type="danger" round>专题</van-tag>
</div> </div>
<div class="van-ellipsis r-content"> <div class="van-ellipsis r-content">{{removeHTMLTag(o.contributionTypeIntroduce)}}</div>
{{removeHTMLTag(o.contributionTypeIntroduce)}}
</div>
<div> <div>
<van-row type="flex" justify="space-between"> <van-row type="flex" justify="space-between">
<van-col span="24"> <van-col span="24">
@@ -146,25 +126,25 @@ layout("/mobile/platform.html"){
</van-col> </van-col>
</van-row> </van-row>
</div> </div>
</div> </div>
</div> </div>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</div> </div>
</van-list> </van-list>
</div> </div>
<van-empty v-if="mLoading==false&&isNullTypeCodeData.length==0&&contributionTypeData.length==0" <van-empty
class="custom-image" image="/none.svg" v-if="mLoading==false&&isNullTypeCodeData.length==0&&contributionTypeData.length==0"
description="暂无数据"> class="custom-image"
</van-empty> image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -175,30 +155,29 @@ layout("/mobile/platform.html"){
}, },
methods: { methods: {
openContribution(data) { openContribution(data) {
const time = moment().format('YYYY-MM-DD HH:mm:ss') const time = moment().format("YYYY-MM-DD HH:mm:ss")
if (!data.sonNum) { if (!data.sonNum) {
if (time < data.contributionStartTime) { if (time < data.contributionStartTime) {
this.$toast(data.contributionStartTime + '开始捐款'); this.$toast(data.contributionStartTime + "开始捐款")
return; return
} }
if (time > data.contributionEndTime) { if (time > data.contributionEndTime) {
this.$toast('捐款在' + data.contributionEndTime + '结束'); this.$toast("捐款在" + data.contributionEndTime + "结束")
return; return
} }
} }
if (data.contributionTypeCode == null && data.sonNum == 0) { if (data.contributionTypeCode == null && data.sonNum == 0) {
window.location.href = '/mobile/contribution/view/contributionView?id=' + data.id window.location.href = "/mobile/contribution/view/contributionView?id=" + data.id
} else if (data.sonNum > 0 && data.typeCode) { } else if (data.sonNum > 0 && data.typeCode) {
window.location.href = '/mobile/contribution/son/sonList?typeCode=' + data.typeCode window.location.href = "/mobile/contribution/son/sonList?typeCode=" + data.typeCode
} else { } else {
this.$toast('暂无项目'); this.$toast("暂无项目")
return return
} }
}, },
async isNullTypeCodePageData() { async isNullTypeCodePageData() {
const { data } = await $.post("/mobile/contribution/isNullTypeCodePageData") const { data } = await $.post("/mobile/contribution/isNullTypeCodePageData")
data.forEach(v => { data.forEach((v) => {
v.sonNum = 0 v.sonNum = 0
v.contributionFiles = JSON.parse(v.contributionFiles) v.contributionFiles = JSON.parse(v.contributionFiles)
}) })
@@ -207,7 +186,7 @@ layout("/mobile/platform.html"){
async pageData() { async pageData() {
await this.isNullTypeCodePageData() await this.isNullTypeCodePageData()
const { data } = await $.get("/mobile/contribution/getContributionTypeData") const { data } = await $.get("/mobile/contribution/getContributionTypeData")
data.forEach(v => { data.forEach((v) => {
v.contributionTypeCode = v.typeCode v.contributionTypeCode = v.typeCode
v.contributionTypeFiles = JSON.parse(v.contributionTypeFiles) v.contributionTypeFiles = JSON.parse(v.contributionTypeFiles)
}) })
@@ -221,7 +200,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -19,7 +19,6 @@ layout("/mobile/platform.html"){
.typeName { .typeName {
margin-left: 10px; margin-left: 10px;
height: 70px; height: 70px;
} }
.typeName .typeNameLabel { .typeName .typeNameLabel {
@@ -39,29 +38,16 @@ layout("/mobile/platform.html"){
margin-bottom: 50px; margin-bottom: 50px;
padding-bottom: 10px; padding-bottom: 10px;
height: calc(100% - 250px); height: calc(100% - 250px);
background-color: #ffffff background-color: #ffffff;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="项目详情" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" safe-area-inset-top></van-nav-bar>
title="项目详情"
left-arrow
placeholder
fixed
@click-left="history.back()"
safe-area-inset-top
></van-nav-bar>
<div> <div>
<div style="background-color:#ffffff;"> <div style="background-color: #ffffff">
<van-image <van-image class="backdrop" fit="cover" :src=" FILE_DOMAIN + '/fileStreamPreview?id=' + viewData.contributionFiles[0].id"></van-image>
class="backdrop"
fit="cover"
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + viewData.contributionFiles[0].id"
></van-image>
<div class="typeName"> <div class="typeName">
<div class="typeNameLabel">{{viewData.contributionName}}</div> <div class="typeNameLabel">{{viewData.contributionName}}</div>
<van-row> <van-row>
@@ -77,29 +63,22 @@ layout("/mobile/platform.html"){
</div> </div>
</div> </div>
<div class="con-introduce"> <div class="con-introduce">
<van-cell-group style=" border-top-left-radius: 30px; border-top-right-radius: 30px;"> <van-cell-group style="border-top-left-radius: 30px; border-top-right-radius: 30px">
<van-cell style=" border-top-left-radius: 30px; border-top-right-radius: 30px;"> <van-cell style="border-top-left-radius: 30px; border-top-right-radius: 30px">
<template #title> <template #title>
<span class="custom-title">项目介绍</span> <span class="custom-title">项目介绍</span>
<span v-if="viewData.contributionMode==='sdc'" style="color: red">(捐款方式为水滴筹将直接跳转放到相应页面)</span> <span v-if="viewData.contributionMode==='sdc'" style="color: red">(捐款方式为水滴筹将直接跳转放到相应页面)</span>
</template> </template>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
<div v-html="viewData.contributionIntroduce" <div v-html="viewData.contributionIntroduce" style="margin: 15px; white-space: pre-wrap; word-break: break-word"></div>
style="margin: 15px;white-space: pre-wrap;word-break: break-word;"></div>
</div> </div>
<div style="position: fixed; width: 100%; bottom: 0px; height: 60px"> <div style="position: fixed; width: 100%; bottom: 0px; height: 60px">
<van-button type="info" class="bth" block round @click="doContribution" <van-button type="info" class="bth" block round @click="doContribution" v-if="viewData.isContributionEnable" :color="themeColor">
v-if="viewData.isContributionEnable" :color="themeColor">我要捐款 我要捐款
</van-button>
<van-button type="info" class="bth" block round
v-if="!viewData.isContributionEnable">暂未开放
</van-button> </van-button>
<van-button type="info" class="bth" block round v-if="!viewData.isContributionEnable">暂未开放</van-button>
</div> </div>
<!-- <van-row> <!-- <van-row>
<van-col span="24"> <van-col span="24">
@@ -110,10 +89,9 @@ layout("/mobile/platform.html"){
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -122,10 +100,10 @@ layout("/mobile/platform.html"){
}, },
methods: { methods: {
doContribution() { doContribution() {
if (this.viewData.contributionMode === 'sdc') { if (this.viewData.contributionMode === "sdc") {
window.location.href = this.viewData.contributionUrl window.location.href = this.viewData.contributionUrl
} else { } else {
window.location.href = '/mobile/contribution/doContribution?id=' + this.viewData.id window.location.href = "/mobile/contribution/doContribution?id=" + this.viewData.id
} }
}, },
async getContributionById(id) { async getContributionById(id) {
@@ -141,7 +119,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -28,63 +28,47 @@ layout("/mobile/platform.html"){
margin: 10px 10px; margin: 10px 10px;
border-radius: 20px; border-radius: 20px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="我要捐款" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" safe-area-inset-top></van-nav-bar>
title="我要捐款"
left-arrow
placeholder
fixed
@click-left="history.back()"
safe-area-inset-top
></van-nav-bar>
<van-form @submit="onSubmit"> <van-form @submit="onSubmit">
<van-cell-group> <van-cell-group>
<van-row type="flex" gutter="20"> <van-row type="flex" gutter="20">
<van-col span="8" v-for="key in moneyData" @click="dateClick(key)" <van-col span="8" v-for="key in moneyData" @click="dateClick(key)" style="text-align: center; border-radius: 20px">
style="text-align: center;border-radius: 20px;">
<van-tag :plain="activeDate!=key" size="large" type="primary"> <van-tag :plain="activeDate!=key" size="large" type="primary">
<div style="position: absolute; left: 0; right: 0">{{key}}</div> <div style="position: absolute; left: 0; right: 0">{{key}}</div>
</van-tag> </van-tag>
</van-col> </van-col>
</van-row> </van-row>
<div class="van-hairline--top"> <div class="van-hairline--top">
<van-field v-model="formData.money" label="捐赠金额" type="number" input-align="right" <van-field
placeholder="请输入捐赠金额" @input="moneyInput"> v-model="formData.money"
<template #button> label="捐赠金额"
元 type="number"
</template> input-align="right"
placeholder="请输入捐赠金额"
@input="moneyInput"
>
<template #button>元</template>
</van-field> </van-field>
</div> </div>
</van-cell-group> </van-cell-group>
<van-cell-group> <van-cell-group>
<van-field v-model="formData.username" label="真实姓名:" input-align="right" readonly> <van-field v-model="formData.username" label="真实姓名:" input-align="right" readonly></van-field>
</van-field> <van-field v-model="formData.loginname" label="真实工号:" input-align="right" readonly></van-field>
<van-field v-model="formData.loginname" label="真实工号:" input-align="right" readonly> <van-field v-model="formData.mobile" label="联系电话:" input-align="right" placeholder="请输入手机号或电话号"></van-field>
</van-field>
<van-field v-model="formData.mobile" label="联系电话:" input-align="right"
placeholder="请输入手机号或电话号">
</van-field>
</van-cell-group> </van-cell-group>
<van-radio-group v-model="formData.payMode"> <van-radio-group v-model="formData.payMode">
<van-cell-group> <van-cell-group>
<van-cell title="微信支付" clickable @click="formData.payMode = 'WeChat'" <van-cell title="微信支付" clickable @click="formData.payMode = 'WeChat'" icon="/assets/mobile/svg/wx.png">
icon="/assets/mobile/svg/wx.png">
<template #right-icon> <template #right-icon>
<van-radio name="WeChat"></van-radio> <van-radio name="WeChat"></van-radio>
</template> </template>
</van-cell> </van-cell>
<van-cell title="支付宝支付" clickable @click="formData.payMode = 'Alipay'" <van-cell title="支付宝支付" clickable @click="formData.payMode = 'Alipay'" icon="/assets/mobile/svg/zfb.png">
icon="/assets/mobile/svg/zfb.png">
<template #right-icon> <template #right-icon>
<van-radio name="Alipay"></van-radio> <van-radio name="Alipay"></van-radio>
</template> </template>
@@ -93,8 +77,7 @@ layout("/mobile/platform.html"){
</van-radio-group> </van-radio-group>
<van-cell-group> <van-cell-group>
<van-field name="files" label="捐款凭证" required style="flex-flow: column" <van-field name="files" label="捐款凭证" required style="flex-flow: column" input-align="left">
input-align="left">
<template #label> <template #label>
<div class="mb10">捐款凭证</div> <div class="mb10">捐款凭证</div>
</template> </template>
@@ -104,29 +87,23 @@ layout("/mobile/platform.html"){
</van-field> </van-field>
</van-cell-group> </van-cell-group>
<div class="bth"> <div class="bth">
<van-row style="display: flex;padding-left: 15px;" type="flex" justify="space-between"> <van-row style="display: flex; padding-left: 15px" type="flex" justify="space-between">
<van-col span="16" style="align-self:center;">合计: <van-col span="16" style="align-self: center">
合计:
<sapn style="color: red">{{formData.money?formData.money:0}}</sapn> <sapn style="color: red">{{formData.money?formData.money:0}}</sapn>
元 元
</van-col> </van-col>
<van-col span="8" style="align-self:center;padding-right: 20px;"> <van-col span="8" style="align-self: center; padding-right: 20px">
<van-button plain type="info" style="float: right;border-radius: 15px;" <van-button plain type="info" style="float: right; border-radius: 15px" :color="themeColor">确认捐款</van-button>
:color="themeColor">确认捐款
</van-button>
</van-col> </van-col>
</van-row> </van-row>
</div> </div>
</van-form> </van-form>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -137,7 +114,7 @@ layout("/mobile/platform.html"){
7000: 7000, 7000: 7000,
1952: 1952, 1952: 1952,
1975: 1975, 1975: 1975,
1987: 1987, 1987: 1987
}, },
formData: {} formData: {}
} }
@@ -146,39 +123,35 @@ layout("/mobile/platform.html"){
dateClick(key) { dateClick(key) {
this.activeDate = key this.activeDate = key
this.formData.money = key this.formData.money = key
}, },
moneyInput(val) { moneyInput(val) {
this.$set(this.formData, "money", val) this.$set(this.formData, "money", val)
}, },
async onSubmit() { async onSubmit() {
if (!this.formData.money) { if (!this.formData.money) {
this.$toast.fail('捐赠金额不能为空'); this.$toast.fail("捐赠金额不能为空")
return return
} }
if (!this.formData.contributionFiles) { if (!this.formData.contributionFiles) {
this.$toast.fail('捐赠凭证不能为空'); this.$toast.fail("捐赠凭证不能为空")
return return
} }
const confirm = await vant.Dialog.confirm({ const confirm = await vant.Dialog.confirm({
title: '请确认', title: "请确认",
message: '确认要为' + this.formData.contributionName + '捐款吗?', message: "确认要为" + this.formData.contributionName + "捐款吗?"
}) })
if (confirm === "confirm") { if (confirm === "confirm") {
const data = await $.post("/mobile/contribution/doContributionApply", { contributionApply: JSON.stringify(this.formData) }) const data = await $.post("/mobile/contribution/doContributionApply", { contributionApply: JSON.stringify(this.formData) })
if (data.code === 0) { if (data.code === 0) {
vant.Dialog.alert({ vant.Dialog.alert({
title: '提示', title: "提示",
message: '捐赠成功,已收到您为“' + this.formData.contributionName + '”捐赠的善款', message: "捐赠成功,已收到您为“" + this.formData.contributionName + "”捐赠的善款",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}).then(() => { }).then(() => {
window.history.back() window.history.back()
}); })
} }
} }
}, },
async init(id) { async init(id) {
const { data } = await $.post("/mobile/contribution/getContributionById", { id: id }) const { data } = await $.post("/mobile/contribution/getContributionById", { id: id })
@@ -189,20 +162,17 @@ layout("/mobile/platform.html"){
mobile: "${@shiro.getPrincipalProperty('mobile')}", mobile: "${@shiro.getPrincipalProperty('mobile')}",
payMode: "WeChat", payMode: "WeChat",
money: null, money: null,
contributionName: data.contributionName, contributionName: data.contributionName
} }
} }
}, },
created() { created() {
const id = this.GetQueryString("id") const id = this.GetQueryString("id")
this.init(id) this.init(id)
} }
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -51,7 +51,6 @@ layout("/mobile/platform.html"){
.typeName { .typeName {
margin-left: 10px; margin-left: 10px;
height: 70px; height: 70px;
} }
.typeName .typeNameLabel { .typeName .typeNameLabel {
@@ -67,10 +66,8 @@ layout("/mobile/platform.html"){
.avatar .van-image__img { .avatar .van-image__img {
border-radius: 10px; border-radius: 10px;
} }
.list-card .van-cell { .list-card .van-cell {
border-radius: 10px; border-radius: 10px;
padding: 18px 16px; padding: 18px 16px;
@@ -84,30 +81,16 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="项目专题" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" safe-area-inset-top></van-nav-bar>
title="项目专题"
left-arrow
placeholder
fixed
@click-left="history.back()"
safe-area-inset-top
></van-nav-bar>
<div style=" background-color:#ffffff;"> <div style="background-color: #ffffff">
<van-image <van-image class="backdrop" fit="cover" :src=" FILE_DOMAIN + '/fileStreamPreview?id=' + typeData.contributionTypeFiles[0].id"></van-image>
class="backdrop"
fit="cover"
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + typeData.contributionTypeFiles[0].id"
></van-image>
<div class="typeName"> <div class="typeName">
<div class="typeNameLabel">{{typeData.typeName}} <div class="typeNameLabel">
{{typeData.typeName}}
<van-tag type="danger" round>专题</van-tag> <van-tag type="danger" round>专题</van-tag>
</div> </div>
<div class="van-multi-ellipsis--l2 typeNameContent"> <div class="van-multi-ellipsis--l2 typeNameContent">{{removeHTMLTag(typeData.contributionTypeIntroduce)}}</div>
{{removeHTMLTag(typeData.contributionTypeIntroduce)}}
</div>
</div> </div>
</div> </div>
@@ -117,7 +100,6 @@ layout("/mobile/platform.html"){
<van-cell-group inset> <van-cell-group inset>
<van-cell :border="false"> <van-cell :border="false">
<div class="list-item"> <div class="list-item">
<div class="left-img"> <div class="left-img">
<van-image <van-image
class="avatar" class="avatar"
@@ -127,17 +109,12 @@ layout("/mobile/platform.html"){
</div> </div>
<div class="right-content"> <div class="right-content">
<div class="r-title">{{o.contributionName}}</div> <div class="r-title">{{o.contributionName}}</div>
<div class="van-ellipsis r-content"> <div class="van-ellipsis r-content">{{removeHTMLTag(o.contributionIntroduce)}}</div>
{{removeHTMLTag(o.contributionIntroduce)}}
</div>
<div> <div>
<van-row type="flex" justify="space-between" <van-row type="flex" justify="space-between" style="white-space: nowrap">
style="white-space: nowrap">
<van-col span="12"> <van-col span="12">
已筹: 已筹:
<sapn style="color: red"> <sapn style="color: red">{{o.totalMoney?o.totalMoney:0}}</sapn>
{{o.totalMoney?o.totalMoney:0}}
</sapn>
元 元
</van-col> </van-col>
<van-col span="12" class="text-right"> <van-col span="12" class="text-right">
@@ -147,46 +124,43 @@ layout("/mobile/platform.html"){
</van-col> </van-col>
</van-row> </van-row>
</div> </div>
</div> </div>
</div> </div>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</div> </div>
</van-list> </van-list>
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
sonData: [], sonData: [],
typeData: {}, typeData: {}
} }
}, },
methods: { methods: {
openContribution(data) { openContribution(data) {
const time = moment().format('YYYY-MM-DD HH:mm:ss') const time = moment().format("YYYY-MM-DD HH:mm:ss")
if (!data.sonNum) { if (!data.sonNum) {
if (time < data.contributionStartTime) { if (time < data.contributionStartTime) {
this.$toast(data.contributionStartTime + '开始捐款'); this.$toast(data.contributionStartTime + "开始捐款")
return; return
} }
if (time > data.contributionEndTime) { if (time > data.contributionEndTime) {
this.$toast('捐款在' + data.contributionEndTime + '结束'); this.$toast("捐款在" + data.contributionEndTime + "结束")
return; return
} }
} }
window.location.href = '/mobile/contribution/view/contributionView?id=' + data.id window.location.href = "/mobile/contribution/view/contributionView?id=" + data.id
}, },
async pageData(typeCode) { async pageData(typeCode) {
const { data } = await $.get("/mobile/contribution/son/pageData", { typeCode: typeCode }) const { data } = await $.get("/mobile/contribution/son/pageData", { typeCode: typeCode })
data.forEach(v => { data.forEach((v) => {
v.contributionFiles = JSON.parse(v.contributionFiles) v.contributionFiles = JSON.parse(v.contributionFiles)
}) })
this.sonData = data this.sonData = data
@@ -204,7 +178,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -1,12 +1,10 @@
<!--# <!--#
layout("/mobile/platform.html"){ layout("/mobile/platform.html"){
#--> #-->
<style> <style></style>
</style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="困难帮扶申请信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="困难帮扶申请信息" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<div> <div>
<difficulty-info :id.sync="id"></difficulty-info> <difficulty-info :id.sync="id"></difficulty-info>
@@ -15,7 +13,7 @@ layout("/mobile/platform.html"){
<script src="/assets/platform/module/difficulty/common.js?v=1.0.0"></script> <script src="/assets/platform/module/difficulty/common.js?v=1.0.0"></script>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -24,12 +22,12 @@ layout("/mobile/platform.html"){
} }
}, },
components: { components: {
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()), "difficulty-info": httpVueLoader("/components/mobile/difficulty/info.vue?v=" + new Date().getTime())
}, },
methods: {}, methods: {},
async created() { async created() {
this.id = GetQueryString('id') this.id = GetQueryString("id")
this.state_id = GetQueryString('state_id') this.state_id = GetQueryString("state_id")
} }
}) })
</script> </script>
@@ -3,10 +3,10 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.apply_btn { .apply_btn {
animation: come .5s; animation: come 0.5s;
position: fixed; position: fixed;
top: 20%; top: 20%;
right: 0 right: 0;
} }
@keyframes come { @keyframes come {
@@ -17,12 +17,11 @@ layout("/mobile/platform.html"){
right: 0px; right: 0px;
} }
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="困难帮扶申请列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="困难帮扶申请列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
@@ -30,14 +29,11 @@ layout("/mobile/platform.html"){
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div style="margin: 60px auto 0 auto"> <div style="margin: 60px auto 0 auto">
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" <van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="pageData">
@load="pageData">
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.zt)"> <div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.zt)">
<van-cell-group inset> <van-cell-group inset>
<van-cell :border="false" title="受补助人"> <van-cell :border="false" title="受补助人">
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}"> <span class="van-ellipsis" style="font-size: 16px" :style="{color:themeColor}">{{o.sbzrname}}({{o.sbzrloginname}})</span>
{{o.sbzrname}}({{o.sbzrloginname}})
</span>
</van-cell> </van-cell>
<van-cell :border="false" title="申请时间">{{o.sqsj}}</van-cell> <van-cell :border="false" title="申请时间">{{o.sqsj}}</van-cell>
<van-cell :border="false" title="所属单位">{{o.unitname}}</van-cell> <van-cell :border="false" title="所属单位">{{o.unitname}}</van-cell>
@@ -50,34 +46,30 @@ layout("/mobile/platform.html"){
</van-list> </van-list>
</div> </div>
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
description="暂无数据">
</van-empty>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
visible: true, visible: true,
typeOption: [ typeOption: [{ value: null, text: "全部" }],
{value: null, text: '全部'}
],
yearOption: [], yearOption: [],
pageForm: { pageForm: {
year: '', year: "",
type: '' type: ""
} }
} }
}, },
components: { components: {
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'), "mobile-sign": httpVueLoader("/components/sign/mobileSign.vue")
}, },
methods: { methods: {
openInfo(id, state) { openInfo(id, state) {
window.location.href = '/mobile/difficulty/apply/apply_info?id=' + id window.location.href = "/mobile/difficulty/apply/apply_info?id=" + id
/* if ([95,96, 100].includes(state)) { /* if ([95,96, 100].includes(state)) {
window.location.href = '/mobile/difficulty/apply/index?id=' + id window.location.href = '/mobile/difficulty/apply/index?id=' + id
}else{ }else{
@@ -92,19 +84,18 @@ layout("/mobile/platform.html"){
listenTouch() { listenTouch() {
this.$nextTick(() => { this.$nextTick(() => {
const app = document.querySelector("#app") const app = document.querySelector("#app")
app.addEventListener('touchstart', () => { app.addEventListener("touchstart", () => {
this.visible = false this.visible = false
}) })
app.addEventListener('touchend', () => { app.addEventListener("touchend", () => {
this.visible = true this.visible = true
}) })
}) })
}, },
pageData() { pageData() {
this.mLoading = true this.mLoading = true
setTimeout(async () => { setTimeout(async () => {
$.get('/platform/fw/difficulty/applylist/pageData', this.pageForm, (res) => { $.get("/platform/fw/difficulty/applylist/pageData", this.pageForm, (res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -116,7 +107,7 @@ layout("/mobile/platform.html"){
}) })
this.mLoading = false this.mLoading = false
}, 600) }, 600)
}, }
}, },
mounted() { mounted() {
this.listenTouch() this.listenTouch()
@@ -124,7 +115,7 @@ layout("/mobile/platform.html"){
async created() { async created() {
this.mLoading = true this.mLoading = true
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) { for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearOption.unshift({value: i, text: i + '年'},) this.yearOption.unshift({ value: i, text: i + "年" })
} }
this.$set(this.pageForm, "year", this.yearOption[0].value) this.$set(this.pageForm, "year", this.yearOption[0].value)
this.mLoading = false this.mLoading = false
@@ -3,36 +3,24 @@ layout("/mobile/platform.html"){
#--> #-->
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed <van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.go(-1)"></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
<van-dropdown-item v-model="pageForm.year" @change="yearChange" <van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
:options="yearList"></van-dropdown-item> <van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" <van-dropdown-item v-model="pageForm.unionId" @change="yearChange" :options="mCommon.unionList"></van-dropdown-item>
:options="auditList"></van-dropdown-item> <van-dropdown-item v-model="pageForm.unitId" @change="yearChange" :options="mCommon.unitList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange"
:options="mCommon.unionList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange"
:options="mCommon.unitList"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div style="margin: 70px auto 0"> <div style="margin: 70px auto 0">
<van-list v-model="loading" :finished="finished" <van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="pageData">
:finished-text="tableData.length>0?'没有更多了':''"
@load="pageData">
<div v-for="o in tableData" class="list-card" @click="openView(o)"> <div v-for="o in tableData" class="list-card" @click="openView(o)">
<van-cell-group inset> <van-cell-group inset>
<van-cell :border="false" title="受助人"> <van-cell :border="false" title="受助人">
<span class="van-ellipsis" style="font-size: 16px;" <span class="van-ellipsis" style="font-size: 16px" :style="{color:themeColor}">{{o.sbzrname}}({{o.sbzrloginname}})</span>
:style="{color:themeColor}">
{{o.sbzrname}}({{o.sbzrloginname}})
</span>
</van-cell> </van-cell>
<van-cell :border="false" title="申&ensp;请&ensp;人">{{o.sqrname}}</van-cell> <van-cell :border="false" title="申&ensp;请&ensp;人">{{o.sqrname}}</van-cell>
<van-cell :border="false" title="所在工会">{{o.sqrunionname}}</van-cell> <van-cell :border="false" title="所在工会">{{o.sqrunionname}}</van-cell>
@@ -46,18 +34,13 @@ layout("/mobile/platform.html"){
</div> </div>
</van-list> </van-list>
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
image="/none.svg"
description="暂无数据">
</van-empty>
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -65,19 +48,19 @@ layout("/mobile/platform.html"){
unionList: [], unionList: [],
yearList: [], yearList: [],
auditList: [ auditList: [
{text: '未审核', value: false}, { text: "未审核", value: false },
{text: '已审核', value: true}, { text: "已审核", value: true }
], ],
handle: true, handle: true,
pageForm: { pageForm: {
year: new Date().getFullYear(), year: new Date().getFullYear(),
isAudit: false, isAudit: false
}, }
} }
}, },
methods: { methods: {
openView(o) { openView(o) {
window.location.href = '/mobile/difficulty/audit/auditHtml?zt=' + o.zt + '&id=' + o.id window.location.href = "/mobile/difficulty/audit/auditHtml?zt=" + o.zt + "&id=" + o.id
}, },
yearChange() { yearChange() {
this.pageForm.pageNumber = 1 this.pageForm.pageNumber = 1
@@ -89,7 +72,7 @@ layout("/mobile/platform.html"){
pageData() { pageData() {
this.mLoading = true this.mLoading = true
setTimeout(async () => { setTimeout(async () => {
$.get(loc() + '/pageData', this.pageForm, (res) => { $.get(loc() + "/pageData", this.pageForm, (res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -103,7 +86,7 @@ layout("/mobile/platform.html"){
}, 600) }, 600)
}, },
async flushUnits() { async flushUnits() {
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') { if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === "true") {
await mCommon.getUnitList(this.pageForm.unionId) await mCommon.getUnitList(this.pageForm.unionId)
} else { } else {
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}") await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
@@ -129,7 +112,7 @@ layout("/mobile/platform.html"){
this.flushUnits() this.flushUnits()
} }
}) })
window.addEventListener('pageshow', e => { window.addEventListener("pageshow", (e) => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) { if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.init() vue.init()
vue.yearChange() vue.yearChange()
@@ -137,7 +120,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -3,35 +3,20 @@ layout("/mobile/platform.html"){
#--> #-->
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="慰问审核" left-arrow placeholder fixed <van-nav-bar title="慰问审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<difficulty-info ref="info" :id.sync="id" title="校工会主席审核" :handle="handle"> <difficulty-info ref="info" :id.sync="id" title="校工会主席审核" :handle="handle">
<template #handle> <template #handle>
<div class="van-cell-group__title"> <div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select"> <div class="van-sidebar-item van-sidebar-item--select">校工会主席审核</div>
校工会主席审核
</div>
</div> </div>
<van-form> <van-form>
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="username" label="审核人员"></van-field>
<van-field readonly
value="${@shiro.getPrincipalProperty('username')}"
name="username"
label="审核人员"
></van-field>
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field> <van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
<van-field v-model="formData.xghbzje" label="初审金额"></van-field> <van-field v-model="formData.xghbzje" label="初审金额"></van-field>
<van-field v-model="formData.opinion" <van-field v-model="formData.opinion" rows="1" autosize label="审核意见" type="textarea" placeholder="请输入审核意见"></van-field>
rows="1"
autosize
label="审核意见"
type="textarea"
placeholder="请输入审核意见"
></van-field>
<van-field label="签字" required style="flex-flow: column"> <van-field label="签字" required style="flex-flow: column">
<template #label> <template #label>
@@ -42,52 +27,42 @@ layout("/mobile/platform.html"){
</template> </template>
</van-field> </van-field>
<van-row gutter="20" style="margin-top: 30px; padding: 0 25px"> <van-row gutter="20" style="margin-top: 30px; padding: 0 25px">
<van-col span="8"> <van-col span="8">
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝 <van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝</van-button>
</van-button>
</van-col> </van-col>
<van-col span="8"> <van-col span="8">
<van-button :color="themeColor" block @click="doAudit(3)">返回修改 <van-button :color="themeColor" block @click="doAudit(3)">返回修改</van-button>
</van-button>
</van-col> </van-col>
<van-col span="8"> <van-col span="8">
<van-button :color="themeColor" block @click="doAudit(2)">通 过 <van-button :color="themeColor" block @click="doAudit(2)">通 过</van-button>
</van-button>
</van-col> </van-col>
</van-row> </van-row>
</van-form> </van-form>
</template> </template>
</difficulty-info> </difficulty-info>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
handle: true, handle: true,
id: "", id: "",
formData: {}, formData: {}
} }
}, },
components: { components: {
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'), "mobile-sign": httpVueLoader("/components/sign/mobileSign.vue"),
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()), "difficulty-info": httpVueLoader("/components/mobile/difficulty/info.vue?v=" + new Date().getTime())
}, },
methods: { methods: {
async doAudit(pass) { async doAudit(pass) {
if (!this.formData.opinion) { if (!this.formData.opinion) {
this.$toast.fail('请填写审核意见'); this.$toast.fail("请填写审核意见")
return return
} }
this.$refs.signature.submitSign() this.$refs.signature.submitSign()
@@ -96,14 +71,14 @@ layout("/mobile/platform.html"){
this.formData.pass = pass this.formData.pass = pass
const resp = await $.post("/platform/fw/difficulty/schoolmanager/doReview", this.formData) const resp = await $.post("/platform/fw/difficulty/schoolmanager/doReview", this.formData)
if (resp.code === 0) { if (resp.code === 0) {
this.$toast.success('审核成功'); this.$toast.success("审核成功")
setTimeout(() => { setTimeout(() => {
history.back() history.back()
}, 1000) }, 1000)
} else { } else {
this.$toast.fail('审核失败'); this.$toast.fail("审核失败")
}
} }
},
}, },
async created() { async created() {
this.id = GetQueryString("id") this.id = GetQueryString("id")
@@ -111,19 +86,16 @@ layout("/mobile/platform.html"){
this.formData = { this.formData = {
id: this.id, id: this.id,
username: "${@shiro.getPrincipalProperty('username')}", username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'), auditTime: moment().format("YYYY-MM-DD"),
auditOpinion: null, auditOpinion: null,
auditSign: "", auditSign: "",
xghbzje: this.$refs.info.viewData.xghbzje xghbzje: this.$refs.info.viewData.xghbzje
} }
}, 300) }, 300)
} }
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -3,7 +3,7 @@ layout("/mobile/platform.html"){
#--> #-->
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<difficulty-info ref="info" :id.sync="id" title="基层工会审核" :handle="handle"> <difficulty-info ref="info" :id.sync="id" title="基层工会审核" :handle="handle">
<template #handle> <template #handle>
@@ -46,16 +46,15 @@ layout("/mobile/platform.html"){
max-height: 200px; max-height: 200px;
} }
.van-image__error, .van-image__loading { .van-image__error,
.van-image__loading {
height: 200px; height: 200px;
position: relative; position: relative;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar title="活动列表" left-arrow <van-nav-bar title="活动列表" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.go(-1)"></van-nav-bar>
</van-sticky> </van-sticky>
<van-sticky> <van-sticky>
@@ -68,41 +67,45 @@ layout("/mobile/platform.html"){
</van-sticky> </van-sticky>
<div style="margin-bottom: 20px"> <div style="margin-bottom: 20px">
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" <van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
v-if="tableData && tableData.length>0" v-if="tableData && tableData.length>0"
v-model="loading" v-model="loading"
@load="pageData"> @load="pageData"
>
<div v-for="o in tableData" class="van-doc-card"> <div v-for="o in tableData" class="van-doc-card">
<div @click="welfareClick(o)"> <div @click="welfareClick(o)">
<div> <div>
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover.id" <van-image
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover.id"
style="display: contents" style="display: contents"
v-if="o.cover && o.cover.filepath"></van-image> v-if="o.cover && o.cover.filepath"
<van-image src="" ></van-image>
style="display: contents" <van-image src="" style="display: contents" v-else></van-image>
v-else></van-image>
</div> </div>
<div> <div>
<div class="van-ellipsis" <div class="van-ellipsis" style="margin-top: 6px; font-size: 15px; font-weight: bold; flex: 1">{{o.activityName}}</div>
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
{{o.activityName}}
</div>
</div> </div>
<div> <div>
<div class="train-title"><span <div class="train-title">
style="color: grey">年&emsp;&emsp;度:</span>{{o.year}} <span style="color: grey">年&emsp;&emsp;度:</span>
{{o.year}}
</div> </div>
<div class="train-title"><span style="color: grey">活动对象:</span>{{o.activityGroupName}} <div class="train-title">
<span style="color: grey">活动对象:</span>
{{o.activityGroupName}}
</div> </div>
<van-divider></van-divider> <van-divider></van-divider>
</div> </div>
<div class="train-title"><span style="color: grey">报名时间:</span> <div class="train-title">
{{moment(o.activitySignUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + <span style="color: grey">报名时间:</span>
moment(o.activitySignUpEndTime).format('YYYY-MM-DD HH:mm')}} {{moment(o.activitySignUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(o.activitySignUpEndTime).format('YYYY-MM-DD
HH:mm')}}
</div> </div>
<div style="margin-top: 6px"><span style="color: grey">活动时间:</span> <div style="margin-top: 6px">
{{moment(o.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + <span style="color: grey">活动时间:</span>
moment(o.activityEndTime).format('YYYY-MM-DD HH:mm')}} {{moment(o.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(o.activityEndTime).format('YYYY-MM-DD HH:mm')}}
</div> </div>
</div> </div>
</div> </div>
@@ -116,32 +119,38 @@ layout("/mobile/platform.html"){
<van-tabbar-item icon="manager-o" replace url="/platform/mobile/fellowshipActivity/fellowshipList?type=my">我的联谊</van-tabbar-item> <van-tabbar-item icon="manager-o" replace url="/platform/mobile/fellowshipActivity/fellowshipList?type=my">我的联谊</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
tarBarActive: 0, tarBarActive: 0,
type: '', type: ""
} }
}, },
methods: { methods: {
async welfareClick(o) { async welfareClick(o) {
if (this.type === 'my') { if (this.type === "my") {
window.location.href = '/platform/mobile/fellowshipActivity/fellowshipInfo' + window.location.href =
'?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime + '&type=my' + '&startTime=' + o.activitySignUpStartTime "/platform/mobile/fellowshipActivity/fellowshipInfo" +
"?activityId=" +
o.id +
"&endTime=" +
o.activitySignUpEndTime +
"&type=my" +
"&startTime=" +
o.activitySignUpStartTime
} else { } else {
window.location.href = '/platform/mobile/fellowshipActivity/activityInfo?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime window.location.href =
"/platform/mobile/fellowshipActivity/activityInfo?activityId=" + o.id + "&endTime=" + o.activitySignUpEndTime
} }
}, },
async pageData() { async pageData() {
this.mLoading = true this.mLoading = true
const resp = await $.post('/platform/mobile/fellowshipActivity/pageData', this.pageForm) const resp = await $.post("/platform/mobile/fellowshipActivity/pageData", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
if (resp.data.list.length === 0) { if (resp.data.list.length === 0) {
this.tableData = [] this.tableData = []
@@ -156,7 +165,7 @@ layout("/mobile/platform.html"){
this.pageForm.pageNumber++ this.pageForm.pageNumber++
} }
} }
this.loading = false; this.loading = false
this.mLoading = false this.mLoading = false
}, },
tabChange(val) { tabChange(val) {
@@ -169,23 +178,23 @@ layout("/mobile/platform.html"){
} }
}, },
created() { created() {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search)
const param = urlParams.get('type'); const param = urlParams.get("type")
this.tarBarActive = param === 'my' ? 1 : 0; this.tarBarActive = param === "my" ? 1 : 0
this.type = GetQueryString('type') this.type = GetQueryString("type")
this.pageForm.type = this.type this.pageForm.type = this.type
this.startLoading() this.startLoading()
this.pageForm.activityStatus = this.type === 'my' ? '3' : '1' this.pageForm.activityStatus = this.type === "my" ? "3" : "1"
this.pageData() this.pageData()
this.closeLoading() this.closeLoading()
} }
}) })
window.addEventListener('pageshow', e => { window.addEventListener("pageshow", (e) => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) { if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.type = GetQueryString('type') vue.type = GetQueryString("type")
vue.pageForm.type = this.type vue.pageForm.type = this.type
vue.startLoading() vue.startLoading()
vue.pageForm.activityStatus = this.type === 'my' ? '3' : '1' vue.pageForm.activityStatus = this.type === "my" ? "3" : "1"
vue.pageData() vue.pageData()
vue.closeLoading() vue.closeLoading()
} }
@@ -25,13 +25,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="活动列表"
left-arrow
placeholder
fixed
@click-left="location.href='/mobile/index'"
></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
@@ -40,11 +34,7 @@ layout("/mobile/platform.html"){
</div> </div>
<div style="margin: 60px auto 0 auto"> <div style="margin: 60px auto 0 auto">
<van-list <van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="mLoading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="list-card" @click="openView(o)"> <div v-for="o in tableData" class="list-card" @click="openView(o)">
<van-cell-group inset> <van-cell-group inset>
<van-cell title="主&emsp;&emsp;题" :border="false">{{o.hdname}}</van-cell> <van-cell title="主&emsp;&emsp;题" :border="false">{{o.hdname}}</van-cell>
@@ -56,26 +46,20 @@ layout("/mobile/platform.html"){
</van-cell-group> </van-cell-group>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
</div> </div>
<script> <script>
let vue = new Vue({ let vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
yearOption: [], yearOption: [],
pageForm: { pageForm: {
year: '', year: "",
hdtype: 1, hdtype: 1
} }
} }
}, },
@@ -87,7 +71,7 @@ layout("/mobile/platform.html"){
}, },
async onLoad() { async onLoad() {
this.mLoading = true this.mLoading = true
$.post('/platform/hd/checkinManage/data', this.pageForm).then(res => { $.post("/platform/hd/checkinManage/data", this.pageForm).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -102,25 +86,24 @@ layout("/mobile/platform.html"){
openView(o) { openView(o) {
const { hdid, hdjssj, hdkssj } = o const { hdid, hdjssj, hdkssj } = o
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) { if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
vant.Toast('活动暂未开始!') vant.Toast("活动暂未开始!")
return return
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) { } else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
vant.Toast('活动已结束!') vant.Toast("活动已结束!")
return return
} }
window.location.href = '/mobile/checkin/info?client=mobile&id=' + hdid window.location.href = "/mobile/checkin/info?client=mobile&id=" + hdid
} }
}, },
async created() { async created() {
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) { for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearOption.unshift({value: i, text: i + '年'},) this.yearOption.unshift({ value: i, text: i + "年" })
} }
this.$set(this.pageForm, "year", this.yearOption[0].value) this.$set(this.pageForm, "year", this.yearOption[0].value)
} }
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -77,12 +77,10 @@ layout("/mobile/platform.html"){
padding-left: 7px; padding-left: 7px;
/*margin-top: 30px;*/ /*margin-top: 30px;*/
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar title="保险列表" left-arrow <van-nav-bar title="保险列表" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.go(-1)"></van-nav-bar>
</van-sticky> </van-sticky>
<van-sticky> <van-sticky>
@@ -94,46 +92,67 @@ layout("/mobile/platform.html"){
</van-sticky> </van-sticky>
<div> <div>
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" <van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
v-if="tableData && tableData.length>0" v-if="tableData && tableData.length>0"
v-model="loading" v-model="loading"
@load="pageData"> @load="pageData"
>
<div v-for="o in tableData" class="van-doc-card"> <div v-for="o in tableData" class="van-doc-card">
<div> <div>
<div> <div>
<div class="van-ellipsis" <div class="van-ellipsis" style="margin-top: 6px; font-size: 15px; font-weight: bold; flex: 1">{{o.name}}</div>
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
{{o.name}}
</div>
</div> </div>
<div> <div>
<div class="train-title"><span <div class="train-title">
style="color: grey">年&emsp;&emsp;度:</span>{{moment(o.startTime).format('YYYY')}} <span style="color: grey">年&emsp;&emsp;度:</span>
{{moment(o.startTime).format('YYYY')}}
</div> </div>
<div class="train-title"><span style="color: grey">登记范围:</span>{{o.activityGroupName}} <div class="train-title">
<span style="color: grey">登记范围:</span>
{{o.activityGroupName}}
</div> </div>
<van-divider></van-divider> <van-divider></van-divider>
</div> </div>
<div class="train-title"><span style="color: grey">登记时间:</span> <div class="train-title">
{{moment(o.stratTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + <span style="color: grey">登记时间:</span>
moment(o.endTime).format('YYYY-MM-DD HH:mm')}} {{moment(o.stratTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(o.endTime).format('YYYY-MM-DD HH:mm')}}
</div> </div>
<div style="display: flex; justify-content: flex-end; margin-top: 4px"> <div style="display: flex; justify-content: flex-end; margin-top: 4px">
<div> <div>
<van-button @click.stop="openView(o)" class="cus_button" <van-button
type="primary" size="small" color="#1867b0" @click.stop="openView(o)"
style="margin-right: 8px; width: auto;">详细信息
</van-button>
<van-button v-if="o.count === 0" @click.stop="needChoose(o)"
class="cus_button" class="cus_button"
type="primary" size="small" color="#1867b0" type="primary"
style="margin-right: 8px; width: auto;">我要选择 size="small"
color="#1867b0"
style="margin-right: 8px; width: auto"
>
详细信息
</van-button> </van-button>
<van-button v-if="o.count > 0" @click.stop="cancelChoose(o)" <van-button
v-if="o.count === 0"
@click.stop="needChoose(o)"
class="cus_button" class="cus_button"
type="primary" size="small" color="#1867b0" type="primary"
style="margin-right: 8px; width: auto;">取消选择 size="small"
color="#1867b0"
style="margin-right: 8px; width: auto"
>
我要选择
</van-button>
<van-button
v-if="o.count > 0"
@click.stop="cancelChoose(o)"
class="cus_button"
type="primary"
size="small"
color="#1867b0"
style="margin-right: 8px; width: auto"
>
取消选择
</van-button> </van-button>
</div> </div>
</div> </div>
@@ -143,15 +162,8 @@ layout("/mobile/platform.html"){
<van-empty v-else description="暂无数据"></van-empty> <van-empty v-else description="暂无数据"></van-empty>
</div> </div>
<van-popup v-model="infoShow" position="right" <van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%', 'background-color': '#f6f7f9' }">
:style="{ height: '100%', width: '100%', 'background-color': '#f6f7f9' }"> <van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="infoShow = false"></van-nav-bar>
<van-nav-bar
title="详细信息"
left-arrow
placeholder
fixed
@click-left="infoShow = false">
</van-nav-bar>
<van-tabs v-model="active"> <van-tabs v-model="active">
<van-tab v-if="viewData.moreInfo" title="通知内容"> <van-tab v-if="viewData.moreInfo" title="通知内容">
<div class="pre_text" v-html="viewData.moreInfo"></div> <div class="pre_text" v-html="viewData.moreInfo"></div>
@@ -166,25 +178,24 @@ layout("/mobile/platform.html"){
<van-cell title="创建时间" :value="viewData.createTime"></van-cell> <van-cell title="创建时间" :value="viewData.createTime"></van-cell>
<van-cell title="介绍链接"> <van-cell title="介绍链接">
<template #right-icon> <template #right-icon>
<span style="cursor: pointer; color: #236eb4" <span
@click="window.open(viewData.href.indexOf('http') !== -1 ? viewData.href : 'https://' + viewData.href)">{{viewData.href}}</span> style="cursor: pointer; color: #236eb4"
@click="window.open(viewData.href.indexOf('http') !== -1 ? viewData.href : 'https://' + viewData.href)"
>
{{viewData.href}}
</span>
</template> </template>
</van-cell> </van-cell>
<van-cell title="支付二维码" is-link value="点击查看" <van-cell title="支付二维码" is-link value="点击查看" @click="showPic"></van-cell>
@click="showPic"></van-cell>
</van-cell-group> </van-cell-group>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</van-popup> </van-popup>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -193,13 +204,13 @@ layout("/mobile/platform.html"){
activityStatus: 1 activityStatus: 1
}, },
infoShow: false, infoShow: false,
viewData: {}, viewData: {}
} }
}, },
methods: { methods: {
showPic() { showPic() {
if (this.viewData.payCode && this.viewData.payCode.length > 0) { if (this.viewData.payCode && this.viewData.payCode.length > 0) {
const url = FILE_DOMAIN + '/fileStreamPreview?id=' + this.viewData.payCode[0].id const url = FILE_DOMAIN + "/fileStreamPreview?id=" + this.viewData.payCode[0].id
vant.ImagePreview([url]) vant.ImagePreview([url])
} }
}, },
@@ -213,44 +224,46 @@ layout("/mobile/platform.html"){
}, },
cancelChoose(row) { cancelChoose(row) {
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '温馨提示', title: "温馨提示",
message: '您确定要取消【' + row.name + '】吗?', message: "您确定要取消【" + row.name + "】吗?"
}).then(async () => { })
const resp = await $.post('/mobile/insurance/manage/cancelChoose', { .then(async () => {
const resp = await $.post("/mobile/insurance/manage/cancelChoose", {
id: row.id id: row.id
}) })
vant.Toast(resp.msg) vant.Toast(resp.msg)
if (resp.code === 0) { if (resp.code === 0) {
this.doSearch() this.doSearch()
} }
}).catch(() => {
}) })
.catch(() => {})
}, },
async needChoose(row) { async needChoose(row) {
if (row.groupId != null) { if (row.groupId != null) {
const isExist = await getScopeUser(row.groupId) const isExist = await getScopeUser(row.groupId)
if (!isExist) { if (!isExist) {
vant.Dialog.alert({ vant.Dialog.alert({
title: '参加人员范围', title: "参加人员范围",
message: row.activityGroupName, message: row.activityGroupName,
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
return return
} }
} }
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '温馨提示', title: "温馨提示",
message: '您确定要选择【' + row.name + '】吗?', message: "您确定要选择【" + row.name + "】吗?"
}).then(async () => { })
const resp = await $.post('/mobile/insurance/manage/needChoose', { .then(async () => {
const resp = await $.post("/mobile/insurance/manage/needChoose", {
id: row.id id: row.id
}) })
vant.Toast(resp.msg) vant.Toast(resp.msg)
if (resp.code === 0) { if (resp.code === 0) {
this.doSearch() this.doSearch()
} }
}).catch(() => {
}) })
.catch(() => {})
}, },
tabChange() { tabChange() {
this.doSearch() this.doSearch()
@@ -262,7 +275,7 @@ layout("/mobile/platform.html"){
}, },
async pageData() { async pageData() {
this.mLoading = true this.mLoading = true
const resp = await $.post('/mobile/insurance/manage/pageData', this.pageForm) const resp = await $.post("/mobile/insurance/manage/pageData", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
if (resp.data.list.length === 0) { if (resp.data.list.length === 0) {
this.tableData = [] this.tableData = []
@@ -277,21 +290,21 @@ layout("/mobile/platform.html"){
this.pageForm.pageNumber++ this.pageForm.pageNumber++
} }
} }
this.loading = false; this.loading = false
this.mLoading = false this.mLoading = false
}, }
}, },
created() { created() {
this.pageData() this.pageData()
} }
}) })
window.onload = () => { window.onload = () => {
window.addEventListener('pageshow', e => { window.addEventListener("pageshow", (e) => {
if (e.persisted) { if (e.persisted) {
window.location.reload(); window.location.reload()
}
})
} }
});
};
</script> </script>
<!--# <!--#
} }
@@ -3,7 +3,6 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.info { .info {
position: relative; position: relative;
width: 88%; width: 88%;
@@ -36,7 +35,8 @@ layout("/mobile/platform.html"){
background-color: white; background-color: white;
} }
.van-tab__pane, .van-tab__pane-wrapper { .van-tab__pane,
.van-tab__pane-wrapper {
padding: 20px; padding: 20px;
} }
@@ -101,45 +101,28 @@ layout("/mobile/platform.html"){
img { img {
border-radius: 10px; border-radius: 10px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="法律咨询预约" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<van-nav-bar
title="法律咨询预约"
left-arrow
placeholder
fixed
@click-left="window.history.back()">
</van-nav-bar>
<div class="info"> <div class="info">
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center">
<!--头像--> <!--头像-->
<div class="avatar"> <div class="avatar">
<van-image width="80" <van-image width="80" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+doctorData.avatar"></van-image>
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+doctorData.avatar"></van-image>
</div> </div>
<!--其他信息--> <!--其他信息-->
<div class="other_info"> <div class="other_info">
<div> <div>{{doctorData.username}}</div>
{{doctorData.username}} <div>{{doctorData.jobTitle}}</div>
</div>
<div>
{{doctorData.jobTitle}}
</div>
</div> </div>
</div> </div>
</div> </div>
<van-tabs v-model="active" :style="'height: ' + (window.screen.height - 46 - 40 - 84 - 24 - 44) + 'px'"> <van-tabs v-model="active" :style="'height: ' + (window.screen.height - 46 - 40 - 84 - 24 - 44) + 'px'">
<van-tab title="预约时段"> <van-tab title="预约时段">
<van-list <van-list v-model="mLoading" :finished="finished" :finished-text="timeData.length > 0 ? '没有更多了' : ''" @load="getDataByDoctorId">
v-model="mLoading"
:finished="finished"
:finished-text="timeData.length > 0 ? '没有更多了' : ''"
@load="getDataByDoctorId">
<div v-if="timeData.length > 0" class="time_info" v-for="item in timeData"> <div v-if="timeData.length > 0" class="time_info" v-for="item in timeData">
<div style="color: #1867b0">{{getFormatTime(item)}}</div> <div style="color: #1867b0">{{getFormatTime(item)}}</div>
<div> <div>
@@ -151,8 +134,8 @@ layout("/mobile/platform.html"){
v-if="mLoading === false && timeData.length === 0" v-if="mLoading === false && timeData.length === 0"
class="custom-image" class="custom-image"
image="/none.svg" image="/none.svg"
description="抱歉,此咨询师暂时没有进行排班哦"> description="抱歉,此咨询师暂时没有进行排班哦"
</van-empty> ></van-empty>
</van-tab> </van-tab>
<van-tab title="咨询师简介"> <van-tab title="咨询师简介">
<div class="label">咨询师擅长</div> <div class="label">咨询师擅长</div>
@@ -163,58 +146,48 @@ layout("/mobile/platform.html"){
</van-tabs> </van-tabs>
<van-popup v-model="show" class="apply_pop" position="right"> <van-popup v-model="show" class="apply_pop" position="right">
<van-nav-bar <van-nav-bar title="预约信息" left-arrow placeholder fixed @click-left="show = false"></van-nav-bar>
title="预约信息"
left-arrow
placeholder
fixed
@click-left="show = false">
</van-nav-bar>
<van-form ref="addForm" :show-error-message="false" input-align="right"> <van-form ref="addForm" :show-error-message="false" input-align="right">
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<van-field readonly <van-field readonly :value="chooseData.startTime" label="开始时间"></van-field>
:value="chooseData.startTime" <van-field readonly :value="chooseData.endTime" label="结束时间"></van-field>
label="开始时间"></van-field>
<van-field readonly
:value="chooseData.endTime"
label="结束时间"></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser"> <van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
<van-field readonly <van-field readonly :value="chooseData.username" label="咨询师姓名"></van-field>
:value="chooseData.username" <van-field readonly :value="chooseData.mobile" label="咨询师电话"></van-field>
label="咨询师姓名"></van-field>
<van-field readonly
:value="chooseData.mobile"
label="咨询师电话"></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<van-field readonly <van-field readonly value="${@shiro.getPrincipalProperty('username')}" label="预约人姓名"></van-field>
value="${@shiro.getPrincipalProperty('username')}" <van-field readonly value="${@shiro.getPrincipalProperty('loginname')}" label="预约人工号"></van-field>
label="预约人姓名"></van-field> <van-field readonly value="${@shiro.getPrincipalProperty('unit').getName()}" label="预约人单位"></van-field>
<van-field readonly <van-field
value="${@shiro.getPrincipalProperty('loginname')}" :rules="[{ required: true, message: '请填写手机号' }]"
label="预约人工号"></van-field> required
<van-field readonly placeholder="请填写手机号"
value="${@shiro.getPrincipalProperty('unit').getName()}"
label="预约人单位"></van-field>
<van-field :rules="[{ required: true, message: '请填写手机号' }]"
required placeholder="请填写手机号"
type="tel" type="tel"
v-model=chooseData.userMobile v-model="chooseData.userMobile"
label="预约人电话"></van-field> label="预约人电话"
></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<div v-if="chooseData.askType"> <div v-if="chooseData.askType">
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true" <van-field
required :rules="[{ required: true, message: '请选择咨询方式' }]" v-model="appointmentAskTypeText"
placeholder="请选择咨询方式"></van-field> label="咨询方式"
@click="appointmentAskTypeShow = true"
required
:rules="[{ required: true, message: '请选择咨询方式' }]"
placeholder="请选择咨询方式"
></van-field>
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round> <van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm" <van-picker
@cancel="appointmentAskTypeShow = false"> show-toolbar
</van-picker> :columns="askTypeArray"
@confirm="askTypeConfirm"
@cancel="appointmentAskTypeShow = false"
></van-picker>
</van-popup> </van-popup>
</div> </div>
@@ -235,21 +208,20 @@ layout("/mobile/platform.html"){
</div> </div>
<script> <script>
function getQueryVariable(variable) { function getQueryVariable(variable) {
var query = window.location.search.substring(1); var query = window.location.search.substring(1)
var vars = query.split("&"); var vars = query.split("&")
for (var i = 0; i < vars.length; i++) { for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("="); var pair = vars[i].split("=")
if (pair[0] == variable) { if (pair[0] == variable) {
return pair[1]; return pair[1]
} }
} }
return ''; return ""
} }
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -257,7 +229,7 @@ layout("/mobile/platform.html"){
askTypeList: [], askTypeList: [],
askTypeArray: [], askTypeArray: [],
show: false, show: false,
doctorId: '', doctorId: "",
doctorData: {}, doctorData: {},
active: 0, active: 0,
timeData: [], timeData: [],
@@ -265,10 +237,10 @@ layout("/mobile/platform.html"){
chooseData: { chooseData: {
userMobile: null userMobile: null
}, },
appointmentUserNote: '', appointmentUserNote: "",
appointmentAskTypeText: '', appointmentAskTypeText: "",
appointmentAskTypeValue: '', appointmentAskTypeValue: "",
typeId: '', typeId: ""
} }
}, },
methods: { methods: {
@@ -279,36 +251,36 @@ layout("/mobile/platform.html"){
}, },
async doSubmit() { async doSubmit() {
if (!this.chooseData.userMobile.trim()) { if (!this.chooseData.userMobile.trim()) {
this.$toast.fail("请填写手机号"); this.$toast.fail("请填写手机号")
return return
} }
if (!this.appointmentAskTypeValue) { if (!this.appointmentAskTypeValue) {
this.$toast.fail("请选择咨询方式"); this.$toast.fail("请选择咨询方式")
return return
} }
const valid = await vant.Dialog.confirm({ const valid = await vant.Dialog.confirm({
title: '提示', title: "提示",
message: '您确认提交吗?', message: "您确认提交吗?",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
if (valid) { if (valid) {
this.$toast.loading('提交中...') this.$toast.loading("提交中...")
const params = { const params = {
appointmentUserNote: this.appointmentUserNote, appointmentUserNote: this.appointmentUserNote,
appointmentAskTypeValue: this.appointmentAskTypeValue, appointmentAskTypeValue: this.appointmentAskTypeValue,
userMobile: this.chooseData.userMobile, userMobile: this.chooseData.userMobile,
id: this.chooseData.id, id: this.chooseData.id,
isAdd: true, isAdd: true
} }
const resp = await $.post('/mobile/legalAidPro/doApply', params) const resp = await $.post("/mobile/legalAidPro/doApply", params)
if (resp.code === 0) { if (resp.code === 0) {
vant.Dialog.alert({ vant.Dialog.alert({
title: '提示', title: "提示",
message: '您已预约成功!', message: "您已预约成功!",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}).then(() => { }).then(() => {
location.replace('/mobile/legalAidPro/myApplyList') location.replace("/mobile/legalAidPro/myApplyList")
}); })
} else if (resp.code === 1) { } else if (resp.code === 1) {
this.$toast.error(resp.msg) this.$toast.error(resp.msg)
} else if (resp.code === 2) { } else if (resp.code === 2) {
@@ -317,13 +289,13 @@ layout("/mobile/platform.html"){
} }
}, },
apply(o) { apply(o) {
if (o.title !== '可预约') { if (o.title !== "可预约") {
return return
} }
this.askTypeArray = [] this.askTypeArray = []
if (o.askType) { if (o.askType) {
const array = JSON.parse(o.askType) const array = JSON.parse(o.askType)
this.askTypeList.map(o => { this.askTypeList.map((o) => {
if (array.includes(o.code)) { if (array.includes(o.code)) {
this.askTypeArray.push({ text: o.name, value: o.code }) this.askTypeArray.push({ text: o.name, value: o.code })
} }
@@ -338,17 +310,17 @@ layout("/mobile/platform.html"){
this.show = true this.show = true
}, },
getFormatTime(o) { getFormatTime(o) {
const simpleStartDate = moment(o.startTime).format('YYYY-MM-DD') const simpleStartDate = moment(o.startTime).format("YYYY-MM-DD")
const simpleStartHour = moment(o.startTime).format('HH:mm') const simpleStartHour = moment(o.startTime).format("HH:mm")
const simpleEndHour = moment(o.endTime).format('HH:mm') const simpleEndHour = moment(o.endTime).format("HH:mm")
const dayNameOfWeek = this.dayNames[new Date(simpleStartDate).getDay()] const dayNameOfWeek = this.dayNames[new Date(simpleStartDate).getDay()]
return simpleStartDate + ' ' + dayNameOfWeek + ' ' + simpleStartHour + '至' + simpleEndHour return simpleStartDate + " " + dayNameOfWeek + " " + simpleStartHour + "至" + simpleEndHour
}, },
async pageData() { async pageData() {
this.pageForm.doctorId = this.doctorId this.pageForm.doctorId = this.doctorId
const resp = await $.post('/mobile/legalAidPro/pageData', this.pageForm) const resp = await $.post("/mobile/legalAidPro/pageData", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
if (this.doctorId !== '') { if (this.doctorId !== "") {
this.doctorData = resp.data[0] this.doctorData = resp.data[0]
} else { } else {
this.tableData = resp.data this.tableData = resp.data
@@ -359,40 +331,40 @@ layout("/mobile/platform.html"){
this.mLoading = true this.mLoading = true
this.pageForm.id = this.doctorId this.pageForm.id = this.doctorId
this.pageForm.typeId = this.typeId this.pageForm.typeId = this.typeId
const resp = await $.post('/mobile/legalAidPro/getDataByDoctorId', this.pageForm) const resp = await $.post("/mobile/legalAidPro/getDataByDoctorId", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
const userId = "${@shiro.getPrincipalProperty('id')}" const userId = "${@shiro.getPrincipalProperty('id')}"
const record = resp.data.list.find(v => v.appointmentUser === userId) const record = resp.data.list.find((v) => v.appointmentUser === userId)
if (record) { if (record) {
resp.data.list.forEach(v => { resp.data.list.forEach((v) => {
if (new Date().getTime() > v.startTimeTs) { if (new Date().getTime() > v.startTimeTs) {
v.className = 'gray' v.className = "gray"
v.title = '不可预约' v.title = "不可预约"
} else { } else {
if (v.appointmentUser === userId) { if (v.appointmentUser === userId) {
v.className = 'gray' v.className = "gray"
v.title = '我已预约' v.title = "我已预约"
} else { } else {
v.className = 'gray' v.className = "gray"
v.title = '不可预约' v.title = "不可预约"
} }
} }
}) })
} else { } else {
resp.data.list.forEach(v => { resp.data.list.forEach((v) => {
if (new Date().getTime() > v.startTimeTs) { if (new Date().getTime() > v.startTimeTs) {
v.className = 'gray' v.className = "gray"
v.title = '不可预约' v.title = "不可预约"
} else { } else {
if (!v.appointmentUser) { if (!v.appointmentUser) {
v.className = '#1867b0' v.className = "#1867b0"
v.title = '可预约' v.title = "可预约"
} else if (v.appointmentUser === userId) { } else if (v.appointmentUser === userId) {
v.className = 'gray' v.className = "gray"
v.title = '我已预约' v.title = "我已预约"
} else { } else {
v.className = 'gray' v.className = "gray"
v.title = '不可预约' v.title = "不可预约"
} }
} }
}) })
@@ -405,14 +377,14 @@ layout("/mobile/platform.html"){
} }
} }
this.mLoading = false this.mLoading = false
}, }
}, },
async created() { async created() {
this.doctorId = getQueryVariable('doctorId') this.doctorId = getQueryVariable("doctorId")
this.typeId = getQueryVariable('typeId') this.typeId = getQueryVariable("typeId")
this.askTypeList = await getDictOptions("psychology_asktype") this.askTypeList = await getDictOptions("psychology_asktype")
await this.pageData() await this.pageData()
}, }
}) })
</script> </script>
@@ -11,23 +11,13 @@ layout("/mobile/platform.html"){
text-align: right; text-align: right;
color: #969799; color: #969799;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="预约详细信息" left-arrow placeholder fixed @click-left="goBack()" safe-area-inset-top></van-nav-bar>
title="预约详细信息"
left-arrow
placeholder
fixed
@click-left="goBack()"
safe-area-inset-top
></van-nav-bar>
<div class="van-cell-group__title"> <div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select"> <div class="van-sidebar-item van-sidebar-item--select">预约时间段</div>
预约时间段
</div>
</div> </div>
<van-cell-group> <van-cell-group>
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell> <van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
@@ -35,9 +25,7 @@ layout("/mobile/platform.html"){
</van-cell-group> </van-cell-group>
<div class="van-cell-group__title"> <div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select"> <div class="van-sidebar-item van-sidebar-item--select">预约人信息</div>
预约人信息
</div>
</div> </div>
<van-cell-group> <van-cell-group>
<van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell> <van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell>
@@ -58,9 +46,7 @@ layout("/mobile/platform.html"){
</van-cell-group> </van-cell-group>
<div class="van-cell-group__title"> <div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select"> <div class="van-sidebar-item van-sidebar-item--select">咨询师信息</div>
咨询师信息
</div>
</div> </div>
<van-cell-group> <van-cell-group>
<van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell> <van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell>
@@ -69,17 +55,13 @@ layout("/mobile/platform.html"){
<van-cell title="电话">{{ viewData.doctorMobile || '暂无'}}</van-cell> <van-cell title="电话">{{ viewData.doctorMobile || '暂无'}}</van-cell>
<van-cell title="个人简介">{{ viewData.doctorIntroduce || '暂无'}}</van-cell> <van-cell title="个人简介">{{ viewData.doctorIntroduce || '暂无'}}</van-cell>
</van-cell-group> </van-cell-group>
</div> </div>
<script> <script></script>
</script>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -88,7 +70,7 @@ layout("/mobile/platform.html"){
}, },
methods: { methods: {
goBack() { goBack() {
window.history.back() pjaxReplace("/mobile/index")
const id = this.GetQueryString("id") const id = this.GetQueryString("id")
window.localStorage.removeItem("psychology-info-" + id) window.localStorage.removeItem("psychology-info-" + id)
} }
@@ -3,7 +3,6 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.info { .info {
position: relative; position: relative;
width: 88%; width: 88%;
@@ -40,27 +39,18 @@ layout("/mobile/platform.html"){
.van-dropdown-menu__item { .van-dropdown-menu__item {
flex: auto; flex: auto;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="法律咨询师列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<van-nav-bar
title="法律咨询师列表"
left-arrow
placeholder
fixed
@click-left="window.history.back()">
</van-nav-bar>
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item v-model="pageForm.typeId" :options="typeList" <van-dropdown-item v-model="pageForm.typeId" :options="typeList" @change="doSearch"></van-dropdown-item>
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
<!--咨询师列表--> <!--咨询师列表-->
<div class="info" @click="toApply(item)" v-for="item in tableData"> <div class="info" @click="toApply(item)" v-for="item in tableData">
<div style="display: flex;"> <div style="display: flex">
<!--头像--> <!--头像-->
<div class="avatar"> <div class="avatar">
<van-image width="80" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.avatar"></van-image> <van-image width="80" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.avatar"></van-image>
@@ -69,40 +59,41 @@ layout("/mobile/platform.html"){
<div class="other_info"> <div class="other_info">
<div> <div>
<span style="font-size: 20px">{{item.username}}&ensp;</span> <span style="font-size: 20px">{{item.username}}&ensp;</span>
<span style="color: grey">{{item.sex}}&ensp;</span>&emsp; <span style="color: grey">{{item.sex}}&ensp;</span>
&emsp;
</div> </div>
<div> <div>
<div> <div>
<span style="color: grey">职称:</span>{{item.jobTitle}} <span style="color: grey">职称:</span>
{{item.jobTitle}}
</div> </div>
<div> <div>
<span style="color: grey">单位:</span>{{item.unitName}} <span style="color: grey">单位:</span>
{{item.unitName}}
</div> </div>
<div class="desc"> <div class="desc">
<span style="color: grey">特长:</span>{{item.specialty}} <span style="color: grey">特长:</span>
{{item.specialty}}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" <van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
description="暂无数据">
</van-empty>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
typeList: [ typeList: [
{text: '时间不限', value: 'no'}, { text: "时间不限", value: "no" },
{text: '本周', value: 'thisWeek'}, { text: "本周", value: "thisWeek" },
{text: '下周', value: 'nextWeek'}, { text: "下周", value: "nextWeek" }
], ]
} }
}, },
methods: { methods: {
@@ -111,19 +102,19 @@ layout("/mobile/platform.html"){
this.pageData() this.pageData()
}, },
async pageData() { async pageData() {
const resp = await $.post('/mobile/legalAidPro/pageData', this.pageForm) const resp = await $.post("/mobile/legalAidPro/pageData", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
this.tableData = resp.data this.tableData = resp.data
} }
}, },
toApply(o) { toApply(o) {
location.href = '/mobile/legalAidPro/apply?doctorId=' + o.userid + '&typeId=' + this.pageForm.typeId location.href = "/mobile/legalAidPro/apply?doctorId=" + o.userid + "&typeId=" + this.pageForm.typeId
} }
}, },
async created() { async created() {
this.$set(this.pageForm, "typeId", this.typeList[0].value) this.$set(this.pageForm, "typeId", this.typeList[0].value)
await this.pageData() await this.pageData()
}, }
}) })
</script> </script>
@@ -4,7 +4,7 @@ layout("/mobile/platform.html"){
<style> <style>
.list-card { .list-card {
background: #FFFFFF; background: #ffffff;
width: 92%; width: 92%;
margin: 0px auto 20px; margin: 0px auto 20px;
box-shadow: 0 2px 10px rgb(125 126 128 / 16%); box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
@@ -79,7 +79,7 @@ layout("/mobile/platform.html"){
} }
.van-card-body { .van-card-body {
padding: 0px 10px 0px 10px padding: 0px 10px 0px 10px;
} }
.van-doc-card > div:first-child { .van-doc-card > div:first-child {
@@ -114,29 +114,23 @@ layout("/mobile/platform.html"){
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="我的预约记录" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="我的预约记录"
left-arrow
placeholder
fixed
@click-left="window.history.back()"
></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item v-model="pageForm.year" :options="yearList" <van-dropdown-item v-model="pageForm.year" :options="yearList" @change="doSearch"></van-dropdown-item>
@change="doSearch"></van-dropdown-item> <van-dropdown-item v-model="pageForm.stateId" :options="stateList" @change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.stateId" :options="stateList"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div style="margin: 60px auto 0 auto"> <div style="margin: 60px auto 0 auto">
<van-list v-model="loading" <van-list
v-model="loading"
:finished="finished" :finished="finished"
:finished-text="tableData.length>0?'没有更多了':''" :finished-text="tableData.length>0?'没有更多了':''"
:immediate-check="false" :immediate-check="false"
@load="pageData"> @load="pageData"
>
<div v-for="o in tableData" class="list-card" @click="viewInfo(o)"> <div v-for="o in tableData" class="list-card" @click="viewInfo(o)">
<div class="card-head"> <div class="card-head">
法律咨询预约 法律咨询预约
@@ -152,35 +146,32 @@ layout("/mobile/platform.html"){
<van-cell :border="false" title="结束时间">{{o.endTime}}</van-cell> <van-cell :border="false" title="结束时间">{{o.endTime}}</van-cell>
</van-cell-group> </van-cell-group>
<div class="cancel-button"> <div class="cancel-button">
<van-button v-if="moment().unix() < moment(o.startTime).unix()" style="margin-right: 4px" <van-button
@click.stop="update(o)" round size="small" color="#1867b0">修改 v-if="moment().unix() < moment(o.startTime).unix()"
style="margin-right: 4px"
@click.stop="update(o)"
round
size="small"
color="#1867b0"
>
修改
</van-button> </van-button>
<van-button v-if="moment().unix() < moment(o.startTime).unix()" <van-button v-if="moment().unix() < moment(o.startTime).unix()" @click.stop="doCancel(o.id)" round size="small" color="#1867b0">
@click.stop="doCancel(o.id)" round size="small" color="#1867b0">取消 取消
</van-button> </van-button>
</div> </div>
</div> </div>
</van-list> </van-list>
</div> </div>
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
description="暂无数据">
</van-empty>
<van-popup v-model="show" class="apply_pop" position="right"> <van-popup v-model="show" class="apply_pop" position="right">
<van-nav-bar <van-nav-bar title="预约详细信息" left-arrow placeholder fixed @click-left="show = false" safe-area-inset-top></van-nav-bar>
title="预约详细信息"
left-arrow
placeholder
fixed
@click-left="show = false"
safe-area-inset-top></van-nav-bar>
<div class="van-doc-card" style="margin: 16px"> <div class="van-doc-card" style="margin: 16px">
<div></div> <div></div>
<div class="van-card-header"> <div class="van-card-header">预约时间段</div>
预约时间段
</div>
<div class="van-card-body"> <div class="van-card-body">
<van-cell-group> <van-cell-group>
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell> <van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
@@ -191,9 +182,7 @@ layout("/mobile/platform.html"){
<div class="van-doc-card" style="margin: 16px"> <div class="van-doc-card" style="margin: 16px">
<div></div> <div></div>
<div class="van-card-header"> <div class="van-card-header">预约人信息</div>
预约人信息
</div>
<div class="van-card-body"> <div class="van-card-body">
<van-cell-group> <van-cell-group>
<van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell> <van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell>
@@ -208,9 +197,7 @@ layout("/mobile/platform.html"){
<div class="van-doc-card" style="margin: 16px"> <div class="van-doc-card" style="margin: 16px">
<div></div> <div></div>
<div class="van-card-header"> <div class="van-card-header">咨询师信息</div>
咨询师信息
</div>
<div class="van-card-body"> <div class="van-card-body">
<van-cell-group> <van-cell-group>
<van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell> <van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell>
@@ -220,20 +207,17 @@ layout("/mobile/platform.html"){
<van-cell title="咨询方式"> <van-cell title="咨询方式">
<div v-if="!viewData.askType || getDoctorAskTypeName().length === 0">暂无</div> <div v-if="!viewData.askType || getDoctorAskTypeName().length === 0">暂无</div>
<div v-else> <div v-else>
<div v-for="item in getDoctorAskTypeName()"> <div v-for="item in getDoctorAskTypeName()">{{ item.name }}</div>
{{ item.name }}
</div>
</div> </div>
</van-cell> </van-cell>
<van-cell @click="doctorIntroduceShow = true" title="个人简介" is-link> <van-cell @click="doctorIntroduceShow = true" title="个人简介" is-link>
<div style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: break-word;"> <div style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: break-word">
{{ viewData.doctorIntroduce || '暂无'}} {{ viewData.doctorIntroduce || '暂无'}}
</div> </div>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</div> </div>
</div> </div>
</van-popup> </van-popup>
<van-popup v-model:show="doctorIntroduceShow" position="bottom" round style="padding: 20px; width: auto"> <van-popup v-model:show="doctorIntroduceShow" position="bottom" round style="padding: 20px; width: auto">
@@ -247,57 +231,45 @@ layout("/mobile/platform.html"){
</van-popup> </van-popup>
<van-popup v-model="infoShow" class="apply_pop" position="right"> <van-popup v-model="infoShow" class="apply_pop" position="right">
<van-nav-bar <van-nav-bar title="预约信息" left-arrow placeholder fixed @click-left="infoShow = false"></van-nav-bar>
title="预约信息"
left-arrow
placeholder
fixed
@click-left="infoShow = false">
</van-nav-bar>
<van-form ref="addForm" :show-error-message="false" input-align="right"> <van-form ref="addForm" :show-error-message="false" input-align="right">
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<van-field readonly <van-field readonly :value="chooseData.startTime" label="开始时间"></van-field>
:value="chooseData.startTime" <van-field readonly :value="chooseData.endTime" label="结束时间"></van-field>
label="开始时间"></van-field>
<van-field readonly
:value="chooseData.endTime"
label="结束时间"></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser"> <van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
<van-field readonly <van-field readonly :value="chooseData.doctorUserName" label="咨询师姓名"></van-field>
:value="chooseData.doctorUserName" <van-field readonly :value="chooseData.doctorMobile" label="咨询师电话"></van-field>
label="咨询师姓名"></van-field>
<van-field readonly
:value="chooseData.doctorMobile"
label="咨询师电话"></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<van-field readonly <van-field readonly value="${@shiro.getPrincipalProperty('username')}" label="预约人姓名"></van-field>
value="${@shiro.getPrincipalProperty('username')}" <van-field readonly value="${@shiro.getPrincipalProperty('loginname')}" label="预约人工号"></van-field>
label="预约人姓名"></van-field> <van-field readonly value="${@shiro.getPrincipalProperty('unit').getName()}" label="预约人单位"></van-field>
<van-field readonly <van-field
value="${@shiro.getPrincipalProperty('loginname')}" :rules="[{ required: true, message: '请填写电话' }]"
label="预约人工号"></van-field>
<van-field readonly
value="${@shiro.getPrincipalProperty('unit').getName()}"
label="预约人单位"></van-field>
<van-field :rules="[{ required: true, message: '请填写电话' }]"
required required
type="tel" type="tel"
v-model=chooseData.userMobile v-model="chooseData.userMobile"
label="预约人电话"></van-field> label="预约人电话"
></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<div v-if="chooseData.askType"> <div v-if="chooseData.askType">
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true" <van-field
placeholder="请选择咨询方式"></van-field> v-model="appointmentAskTypeText"
label="咨询方式"
@click="appointmentAskTypeShow = true"
placeholder="请选择咨询方式"
></van-field>
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round> <van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm" <van-picker
@cancel="appointmentAskTypeShow = false"> show-toolbar
</van-picker> :columns="askTypeArray"
@confirm="askTypeConfirm"
@cancel="appointmentAskTypeShow = false"
></van-picker>
</van-popup> </van-popup>
</div> </div>
@@ -319,27 +291,27 @@ layout("/mobile/platform.html"){
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
appointmentAskTypeText: '', appointmentAskTypeText: "",
appointmentUserNote: '', appointmentUserNote: "",
appointmentAskTypeShow: false, appointmentAskTypeShow: false,
appointmentAskTypeValue: '', appointmentAskTypeValue: "",
askTypeArray: [], askTypeArray: [],
chooseData: {}, chooseData: {},
infoShow: false, infoShow: false,
doctorIntroduceShow: false, doctorIntroduceShow: false,
stateList: [ stateList: [
{text: '全部预约状态', value: null}, { text: "全部预约状态", value: null },
{text: '预约中', value: 2100}, { text: "预约中", value: 2100 },
{text: '预约成功', value: 2300}, { text: "预约成功", value: 2300 },
{text: '预约失败', value: 2200} { text: "预约失败", value: 2200 }
], ],
askTypeList: [], askTypeList: [],
show: false, show: false,
viewData: {}, viewData: {}
} }
}, },
methods: { methods: {
@@ -347,15 +319,15 @@ layout("/mobile/platform.html"){
this.askTypeArray = [] this.askTypeArray = []
if (o.askType) { if (o.askType) {
const array = JSON.parse(o.askType) const array = JSON.parse(o.askType)
this.askTypeList.map(o => { this.askTypeList.map((o) => {
if (array.includes(o.code)) { if (array.includes(o.code)) {
this.askTypeArray.push({ text: o.name, value: o.code }) this.askTypeArray.push({ text: o.name, value: o.code })
} }
}) })
} }
if (o.appointmentAskTypeValue) { if (o.appointmentAskTypeValue) {
const type = this.askTypeList.find(x => x.code === o.appointmentAskTypeValue) const type = this.askTypeList.find((x) => x.code === o.appointmentAskTypeValue)
this.appointmentAskTypeText = type ? type.name : '' this.appointmentAskTypeText = type ? type.name : ""
} }
this.chooseData = o this.chooseData = o
this.appointmentUserNote = o.appointmentUserNote this.appointmentUserNote = o.appointmentUserNote
@@ -369,28 +341,28 @@ layout("/mobile/platform.html"){
}, },
async doSubmit() { async doSubmit() {
if (!this.chooseData.userMobile) { if (!this.chooseData.userMobile) {
this.$toast.fail("请输入手机号"); this.$toast.fail("请输入手机号")
return return
} }
const valid = await vant.Dialog.confirm({ const valid = await vant.Dialog.confirm({
title: '提示', title: "提示",
message: '您确认提交吗?', message: "您确认提交吗?",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
if (valid) { if (valid) {
this.$toast.loading('提交中...') this.$toast.loading("提交中...")
const params = { const params = {
appointmentUserNote: this.appointmentUserNote, appointmentUserNote: this.appointmentUserNote,
appointmentAskTypeValue: this.appointmentAskTypeValue, appointmentAskTypeValue: this.appointmentAskTypeValue,
userMobile: this.chooseData.userMobile, userMobile: this.chooseData.userMobile,
id: this.chooseData.id, id: this.chooseData.id,
isAdd: false, isAdd: false
} }
const resp = await $.post('/mobile/legalAidPro/doApply', params) const resp = await $.post("/mobile/legalAidPro/doApply", params)
if (resp.code === 0) { if (resp.code === 0) {
this.$toast.success('修改成功') this.$toast.success("修改成功")
setTimeout(() => { setTimeout(() => {
location.replace('/mobile/legalAidPro/myApplyList') location.replace("/mobile/legalAidPro/myApplyList")
}, 1000) }, 1000)
} else if (resp.code === 1) { } else if (resp.code === 1) {
this.$toast.error(resp.msg) this.$toast.error(resp.msg)
@@ -401,17 +373,17 @@ layout("/mobile/platform.html"){
}, },
getAskTypeName() { getAskTypeName() {
if (this.viewData.appointmentAskTypeValue) { if (this.viewData.appointmentAskTypeValue) {
const type = this.askTypeList.find(o => o.code === this.viewData.appointmentAskTypeValue + '') const type = this.askTypeList.find((o) => o.code === this.viewData.appointmentAskTypeValue + "")
return type ? type.name : '暂无' return type ? type.name : "暂无"
} else { } else {
return '暂无' return "暂无"
} }
}, },
getDoctorAskTypeName() { getDoctorAskTypeName() {
const askTypeArray = [] const askTypeArray = []
if (this.viewData.askType) { if (this.viewData.askType) {
const array = JSON.parse(this.viewData.askType) const array = JSON.parse(this.viewData.askType)
this.askTypeList.map(o => { this.askTypeList.map((o) => {
if (array.includes(o.code)) { if (array.includes(o.code)) {
askTypeArray.push(o) askTypeArray.push(o)
} }
@@ -421,7 +393,7 @@ layout("/mobile/platform.html"){
}, },
async pageData() { async pageData() {
this.loading = true this.loading = true
const {data} = await $.get('/mobile/legalAidPro/MyPageData', this.pageForm) const { data } = await $.get("/mobile/legalAidPro/MyPageData", this.pageForm)
setTimeout(() => { setTimeout(() => {
this.tableData = this.tableData.concat(data.list) this.tableData = this.tableData.concat(data.list)
if (this.tableData.length === data.totalCount) { if (this.tableData.length === data.totalCount) {
@@ -444,14 +416,14 @@ layout("/mobile/platform.html"){
}, },
async doCancel(id) { async doCancel(id) {
const confirm = await vant.Dialog.confirm({ const confirm = await vant.Dialog.confirm({
title: '提示', title: "提示",
message: '您确定取消此次预约吗?', message: "您确定取消此次预约吗?",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
if (confirm === 'confirm') { if (confirm === "confirm") {
const resp = await $.post('/mobile/legalAidPro/doCancel', {id}) const resp = await $.post("/mobile/legalAidPro/doCancel", { id })
if (resp.code === 0) { if (resp.code === 0) {
vant.Toast.success('取消成功') vant.Toast.success("取消成功")
this.doSearch() this.doSearch()
} }
} }
@@ -16,7 +16,7 @@ layout("/mobile/platform.html"){
.year { .year {
font-size: 16px; font-size: 16px;
color: #3498db; color: #3498db;
font-weight: bold font-weight: bold;
} }
h1 { h1 {
@@ -29,14 +29,7 @@ layout("/mobile/platform.html"){
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder safe-area-inset-top title="我的互助金申请"></van-nav-bar>
@click-left="history.go(-1)"
fixed
left-arrow
placeholder
safe-area-inset-top
title="我的互助金申请"
></van-nav-bar>
<div> <div>
<div class="card" v-for="item in tableData"> <div class="card" v-for="item in tableData">
@@ -48,19 +41,16 @@ layout("/mobile/platform.html"){
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return {} return {}
}, },
methods: { methods: {},
},
created() { created() {
this.pageData() this.pageData()
} }
@@ -3,7 +3,6 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.van-index-bar__sidebar { .van-index-bar__sidebar {
display: none; display: none;
} }
@@ -159,18 +158,10 @@ layout("/mobile/platform.html"){
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<!--top栏--> <!--top栏-->
<van-nav-bar <van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder safe-area-inset-top title="会议请假审核"></van-nav-bar>
@click-left="history.go(-1)"
fixed
left-arrow
placeholder
safe-area-inset-top
title="会议请假审核"
></van-nav-bar>
<!--筛选框--> <!--筛选框-->
<div class="search-fixed"> <div class="search-fixed">
@@ -180,27 +171,18 @@ layout("/mobile/platform.html"){
placeholder="请输入会议名称、会议地点进行查询" placeholder="请输入会议名称、会议地点进行查询"
shape="round" shape="round"
v-model="pageForm.searchKeyword" v-model="pageForm.searchKeyword"
> ></van-search>
</van-search>
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item :options="meetingTimeList" @change="doSearch" <van-dropdown-item :options="meetingTimeList" @change="doSearch" v-model="pageForm.meetingTime"></van-dropdown-item>
v-model="pageForm.meetingTime"></van-dropdown-item> <van-dropdown-item :options="typeList" @change="doSearch" v-model="pageForm.typeId"></van-dropdown-item>
<van-dropdown-item :options="typeList" @change="doSearch"
v-model="pageForm.typeId"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<!--列表--> <!--列表-->
<div style="margin-top: 116px"> <div style="margin-top: 116px">
<van-list <van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false" @load="onLoad" v-model="loading">
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false"
@load="onLoad"
v-model="loading">
<div class="van-doc-card" v-for="o in tableData"> <div class="van-doc-card" v-for="o in tableData">
<div @click="openView(o.id, o.modulename)"> <div @click="openView(o.id, o.modulename)">
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div style="width: 70%"> <div style="width: 70%">
<div class="van-ellipsis title"> <div class="van-ellipsis title">
@@ -209,9 +191,7 @@ layout("/mobile/platform.html"){
</div> </div>
<div style="color: grey">{{o.location}}</div> <div style="color: grey">{{o.location}}</div>
</div> </div>
<div style="color: #1867b0;"> <div style="color: #1867b0">{{o.meetingtypename}}</div>
{{o.meetingtypename}}
</div>
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
@@ -221,12 +201,11 @@ layout("/mobile/platform.html"){
<!--<van-col span="12"><span style="color: grey">结束时间:</span></van-col>--> <!--<van-col span="12"><span style="color: grey">结束时间:</span></van-col>-->
</van-row> </van-row>
<van-row> <van-row>
<!--<van-col span="12">{{o.endtime}}</van-col>--> <!--<van-col span="12">{{o.endtime}}</van-col>-->
</van-row> </van-row>
</div> </div>
<div style="display: flex; justify-content: space-between; margin-top: 8px;"> <div style="display: flex; justify-content: space-between; margin-top: 8px">
<div class="cus_overflow" style="line-height: 20px; width: 83%"> <div class="cus_overflow" style="line-height: 20px; width: 83%">
<span style="color: grey">会议描述:</span> <span style="color: grey">会议描述:</span>
{{o.meetingdescription}} {{o.meetingdescription}}
@@ -238,25 +217,32 @@ layout("/mobile/platform.html"){
<div style="display: flex; justify-content: flex-end; margin-top: 4px"> <div style="display: flex; justify-content: flex-end; margin-top: 4px">
<div> <div>
<van-button @click.stop="getAuditList(o)" class="cus_button" <van-button
color="#1867b0" size="small" style="margin-right: 8px; width: auto;" @click.stop="getAuditList(o)"
type="primary">已审{{o.audit}} class="cus_button"
color="#1867b0"
size="small"
style="margin-right: 8px; width: auto"
type="primary"
>
已审{{o.audit}}
</van-button> </van-button>
<van-button @click.stop="openView(o.id, o.modulename)" class="cus_button" <van-button
color="#1867b0" size="small" style="margin-right: 8px; width: auto;" @click.stop="openView(o.id, o.modulename)"
type="primary">未审{{o.no_audit}} class="cus_button"
color="#1867b0"
size="small"
style="margin-right: 8px; width: auto"
type="primary"
>
未审{{o.no_audit}}
</van-button> </van-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty class="custom-image" description="暂无数据" image="/none.svg" v-if="mLoading==false&&tableData.length==0"></van-empty>
class="custom-image"
description="暂无数据"
image="/none.svg"
v-if="mLoading==false&&tableData.length==0"
></van-empty>
</div> </div>
<!--弹出框--> <!--弹出框-->
@@ -267,8 +253,7 @@ layout("/mobile/platform.html"){
<van-icon @click="popupShow = false" class="cus_icon" name="close" v-if="popupShow"></van-icon> <van-icon @click="popupShow = false" class="cus_icon" name="close" v-if="popupShow"></van-icon>
<!--审核人员--> <!--审核人员-->
<van-action-sheet :title="queryType === 'notAudit' ? '请假人员列表' : '请假人员列表'" @close="popClose" class="userPopup" <van-action-sheet :title="queryType === 'notAudit' ? '请假人员列表' : '请假人员列表'" @close="popClose" class="userPopup" v-model:show="userShow">
v-model:show="userShow">
<div class="content"> <div class="content">
<div class="van-doc-card" v-for="(item, i) in userList"> <div class="van-doc-card" v-for="(item, i) in userList">
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
@@ -291,19 +276,23 @@ layout("/mobile/platform.html"){
</div> </div>
<van-checkbox-group ref="checkboxGroup" v-if="item.users !== null" v-model="result"> <van-checkbox-group ref="checkboxGroup" v-if="item.users !== null" v-model="result">
<van-cell-group> <van-cell-group>
<van-cell <van-cell :key="obj.id" @click="toggle(i, index)" class="cus_cell" clickable v-for="(obj, index) in item.users">
:key="obj.id"
@click="toggle(i, index)" class="cus_cell"
clickable
v-for="(obj, index) in item.users">
<span style="display: inline-block; width: 40px">{{obj.username}}</span> <span style="display: inline-block; width: 40px">{{obj.username}}</span>
<span style="display: inline-block; width: 20px">{{obj.sex}}</span> <span style="display: inline-block; width: 20px">{{obj.sex}}</span>
<span style="display: inline-block; width: 60px">{{obj.loginname}}</span> <span style="display: inline-block; width: 60px">{{obj.loginname}}</span>
<span class="unit">{{obj.unitname}}</span> <span class="unit">{{obj.unitname}}</span>
<van-icon class="audit_icon" color="green" name="passed" <van-icon
v-if="queryType === 'hasAudit' && obj.auditState === true"></van-icon> class="audit_icon"
<van-icon class="audit_icon" color="grey" name="close" color="green"
v-if="queryType === 'hasAudit' && obj.auditState === false"></van-icon> name="passed"
v-if="queryType === 'hasAudit' && obj.auditState === true"
></van-icon>
<van-icon
class="audit_icon"
color="grey"
name="close"
v-if="queryType === 'hasAudit' && obj.auditState === false"
></van-icon>
<template #right-icon v-if="queryType === 'notAudit'"> <template #right-icon v-if="queryType === 'notAudit'">
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox> <van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
</template> </template>
@@ -311,22 +300,15 @@ layout("/mobile/platform.html"){
</van-cell-group> </van-cell-group>
</van-checkbox-group> </van-checkbox-group>
<div style="margin-top: 4px; text-align: center" v-else>暂无请假人员</div> <div style="margin-top: 4px; text-align: center" v-else>暂无请假人员</div>
</div> </div>
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%" <div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%" v-if="queryType === 'notAudit'">
v-if="queryType === 'notAudit'"> <van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回</van-button>
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回 <van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过</van-button>
</van-button>
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过
</van-button>
</div> </div>
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%" <div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%" v-if="queryType === 'notAudit'">
v-if="queryType === 'notAudit'"> <van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回</van-button>
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回 <van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过</van-button>
</van-button>
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过
</van-button>
</div> </div>
</div> </div>
</van-action-sheet> </van-action-sheet>
@@ -334,7 +316,7 @@ layout("/mobile/platform.html"){
<!--审核弹框--> <!--审核弹框-->
<van-dialog @confirm="auditDo" show-cancel-button title="温馨提示" v-model:show="auditShow"> <van-dialog @confirm="auditDo" show-cancel-button title="温馨提示" v-model:show="auditShow">
<div style="padding-top: 8px; text-align: center; font-size: 14px; color: #646566">{{str}}</div> <div style="padding-top: 8px; text-align: center; font-size: 14px; color: #646566">{{str}}</div>
<van-divider style="margin: 12px 0 1px 0px;"></van-divider> <van-divider style="margin: 12px 0 1px 0px"></van-divider>
<van-field <van-field
autosize autosize
label="审核意见:" label="审核意见:"
@@ -352,37 +334,41 @@ layout("/mobile/platform.html"){
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #--> <!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
const meetUtil = new meetingUtil() const meetUtil = new meetingUtil()
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
desc: '', desc: "",
list: ['a', 'b'], list: ["a", "b"],
result: [], result: [],
reason: '', reason: "",
auditShow: false, auditShow: false,
popupShow: false, popupShow: false,
userShow: false, userShow: false,
userList: [], userList: [],
userClickList: [], userClickList: [],
str: '', str: "",
type: '', type: "",
auditType: '', auditType: "",
queryType: '', queryType: "",
typeList: [], typeList: [],
meetingTimeList: [{text: '全部时间', value: null}, {text: '即将开始', value: 0}, {text: '已结束', value: 1}], meetingTimeList: [
{ text: "全部时间", value: null },
{ text: "即将开始", value: 0 },
{ text: "已结束", value: 1 }
]
} }
}, },
methods: { methods: {
async getAuditList(o) { async getAuditList(o) {
this.queryType = 'hasAudit' this.queryType = "hasAudit"
const resp = await $.post('/mobile/meeting/audit/getLeaveUser', { const resp = await $.post("/mobile/meeting/audit/getLeaveUser", {
meetingId: o.id, meetingId: o.id,
auditType: 'hasAudit', auditType: "hasAudit"
}) })
if (resp.code === 0) { if (resp.code === 0) {
this.userList = resp.data this.userList = resp.data
this.userList.forEach(item => { this.userList.forEach((item) => {
if (item.users && item.users.length > 1) { if (item.users && item.users.length > 1) {
item.users.sort((a, b) => { item.users.sort((a, b) => {
return b.auditState - a.auditState return b.auditState - a.auditState
@@ -393,10 +379,10 @@ layout("/mobile/platform.html"){
} }
}, },
checkAll(i) { checkAll(i) {
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle(true)) this.$refs.checkboxGroup[i].children.forEach((item) => item.toggle(true))
}, },
toggleAll(i) { toggleAll(i) {
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle()) this.$refs.checkboxGroup[i].children.forEach((item) => item.toggle())
}, },
toggle(i, index) { toggle(i, index) {
if (i > 0) { if (i > 0) {
@@ -406,21 +392,21 @@ layout("/mobile/platform.html"){
} }
index = length + index index = length + index
} }
this.$refs.checkboxes[index].toggle(); this.$refs.checkboxes[index].toggle()
}, },
async auditDo() { async auditDo() {
let idList = this.result let idList = this.result
if (this.type === 'all') { if (this.type === "all") {
this.userList.forEach(item => { this.userList.forEach((item) => {
if (item.users !== null && item.users !== undefined) { if (item.users !== null && item.users !== undefined) {
idList = idList.concat(item.users.map(o => o.id)) idList = idList.concat(item.users.map((o) => o.id))
} }
}) })
} }
const resp = await $.post('/mobile/meeting/audit/audit', { const resp = await $.post("/mobile/meeting/audit/audit", {
tpuIds: JSON.stringify(idList), tpuIds: JSON.stringify(idList),
auditOpinion: this.reason, auditOpinion: this.reason,
isPass: this.auditType === 'pass' isPass: this.auditType === "pass"
}) })
if (resp.code === 0) { if (resp.code === 0) {
this.doSearch() this.doSearch()
@@ -431,38 +417,38 @@ layout("/mobile/platform.html"){
audit(type, auditType) { audit(type, auditType) {
this.type = type this.type = type
this.auditType = auditType this.auditType = auditType
if (type === 'many' && this.result.length === 0) { if (type === "many" && this.result.length === 0) {
vant.Toast('请先选择人员') vant.Toast("请先选择人员")
return return
} }
this.str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择' : '您确定要一键全部审核吗?' this.str = type === "many" ? "您选择了" + this.result.length + "个人,请确认您的选择" : "您确定要一键全部审核吗?"
this.reason = auditType === 'pass' ? '同意' : '拒绝' this.reason = auditType === "pass" ? "同意" : "拒绝"
this.auditShow = true this.auditShow = true
}, },
async openView(id, modulename) { async openView(id, modulename) {
this.queryType = 'notAudit' this.queryType = "notAudit"
this.userList = [] this.userList = []
const resp = await $.post('/mobile/meeting/audit/getLeaveUser', { const resp = await $.post("/mobile/meeting/audit/getLeaveUser", {
meetingId: id, meetingId: id,
moduleName: modulename, moduleName: modulename,
auditType: 'canAudit', auditType: "canAudit"
}) })
if (resp.code === 0) { if (resp.code === 0) {
this.userList = resp.data this.userList = resp.data
this.userClickList = [] this.userClickList = []
if (this.userList.length === 0) { if (this.userList.length === 0) {
vant.Toast('暂无请假人员') vant.Toast("暂无请假人员")
} else { } else {
this.userShow = true this.userShow = true
} }
return return
} }
vant.Toast('系统错误,请联系管理员') vant.Toast("系统错误,请联系管理员")
}, },
popClose() { popClose() {
this.$nextTick(function () { this.$nextTick(function () {
if (this.$refs.checkboxes !== undefined) { if (this.$refs.checkboxes !== undefined) {
this.$refs.checkboxes.forEach(item => item.toggle(false)); this.$refs.checkboxes.forEach((item) => item.toggle(false))
} }
}) })
}, },
@@ -474,7 +460,7 @@ layout("/mobile/platform.html"){
}, },
async onLoad() { async onLoad() {
this.loading = true this.loading = true
$.post('/mobile/meeting/audit/pageData', this.pageForm).then(res => { $.post("/mobile/meeting/audit/pageData", this.pageForm).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -485,11 +471,11 @@ layout("/mobile/platform.html"){
} }
this.loading = false this.loading = false
}) })
}, }
}, },
async created() { async created() {
this.typeList = await meetUtil.getAllMeetingType() this.typeList = await meetUtil.getAllMeetingType()
this.typeList.unshift({text: '全部会议类型'}) this.typeList.unshift({ text: "全部会议类型" })
if (this.typeList && this.typeList.length > 0) { if (this.typeList && this.typeList.length > 0) {
this.$set(this.pageForm, "typeId", this.typeList[0].value) this.$set(this.pageForm, "typeId", this.typeList[0].value)
} }
@@ -3,7 +3,6 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.van-index-bar__sidebar { .van-index-bar__sidebar {
display: none; display: none;
} }
@@ -133,22 +132,13 @@ layout("/mobile/platform.html"){
right: 4px; right: 4px;
top: 28px; top: 28px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<!--top栏--> <!--top栏-->
<van-nav-bar <van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder safe-area-inset-top title="我的会议"></van-nav-bar>
@click-left="history.go(-1)"
fixed
left-arrow
placeholder
safe-area-inset-top
title="我的会议"
></van-nav-bar>
<!--筛选框--> <!--筛选框-->
<div class="search-fixed"> <div class="search-fixed">
@@ -158,31 +148,20 @@ layout("/mobile/platform.html"){
placeholder="请输入会议名称、会议地点进行查询" placeholder="请输入会议名称、会议地点进行查询"
shape="round" shape="round"
v-model="pageForm.searchKeyWord" v-model="pageForm.searchKeyWord"
> ></van-search>
</van-search>
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item :options="meetingList" @change="doSearch" <van-dropdown-item :options="meetingList" @change="doSearch" v-model="pageForm.tabNameIndex"></van-dropdown-item>
v-model="pageForm.tabNameIndex"></van-dropdown-item> <van-dropdown-item :options="meetingTimeList" @change="doSearch" v-model="pageForm.meetingTime"></van-dropdown-item>
<van-dropdown-item :options="meetingTimeList" @change="doSearch" <van-dropdown-item :options="typeList" @change="doSearch" v-model="pageForm.typeId"></van-dropdown-item>
v-model="pageForm.meetingTime"></van-dropdown-item>
<van-dropdown-item :options="typeList" @change="doSearch"
v-model="pageForm.typeId"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<!--列表--> <!--列表-->
<div style="margin-top: 116px"> <div style="margin-top: 116px">
<van-list <van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false" @load="onLoad" v-model="loading">
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false"
@load="onLoad"
v-model="loading"
>
<div class="van-doc-card" v-for="o in tableData"> <div class="van-doc-card" v-for="o in tableData">
<div @click="openView(o.id)"> <div @click="openView(o.id)">
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div style="width: 74%"> <div style="width: 74%">
<div class="van-ellipsis title"> <div class="van-ellipsis title">
@@ -190,9 +169,7 @@ layout("/mobile/platform.html"){
<span>{{o.meetingName}}</span> <span>{{o.meetingName}}</span>
</div> </div>
</div> </div>
<div style="color: #1867b0; white-space: nowrap;"> <div style="color: #1867b0; white-space: nowrap">{{o.meetingTypeName}}</div>
{{o.meetingTypeName}}
</div>
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
@@ -218,8 +195,7 @@ layout("/mobile/platform.html"){
<span style="color: grey">会议描述:</span> <span style="color: grey">会议描述:</span>
{{o.meetingDescription}} {{o.meetingDescription}}
</div> </div>
<span @click.stop="popupShow = true; clickRow = o" <span @click.stop="popupShow = true; clickRow = o" class="showMore">查看更多</span>
class="showMore">查看更多</span>
</div> </div>
<van-divider></van-divider> <van-divider></van-divider>
@@ -238,26 +214,29 @@ layout("/mobile/platform.html"){
<van-button <van-button
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false" :disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
@click="needLeave(o, false)" @click="needLeave(o, false)"
color="#1867b0" size="small" style="margin-right: 8px" color="#1867b0"
type="primary">查看请假状态 size="small"
style="margin-right: 8px"
type="primary"
>
查看请假状态
</van-button> </van-button>
<van-button <van-button
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false" :disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
@click="needLeave(o, true)" @click="needLeave(o, true)"
color="#1867b0" size="small" style="margin-right: 8px" color="#1867b0"
type="primary">我要请假 size="small"
style="margin-right: 8px"
type="primary"
>
我要请假
</van-button> </van-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty class="custom-image" description="暂无数据" image="/none.svg" v-if="mLoading==false&&tableData.length==0"></van-empty>
class="custom-image"
description="暂无数据"
image="/none.svg"
v-if="mLoading==false&&tableData.length==0"
></van-empty>
</div> </div>
<!--弹出框--> <!--弹出框-->
@@ -269,18 +248,20 @@ layout("/mobile/platform.html"){
<!--请假弹框--> <!--请假弹框-->
<van-action-sheet class="leave_pop" title="会议信息" v-model="leaveShow"> <van-action-sheet class="leave_pop" title="会议信息" v-model="leaveShow">
<div v-if="flag === true" <div v-if="flag === true" style="padding: 0px 0px 10px 0px; text-align: center; font-size: 14px; color: #646566">
style="padding: 0px 0px 10px 0px; text-align: center; font-size: 14px; color: #646566"> 请
请<span style="color: red">点击选择</span>请假时间段,填写请假原因 <span style="color: red">点击选择</span>
请假时间段,填写请假原因
</div> </div>
<div class="content"> <div class="content">
<div class="van-doc-card" v-for="(item, index) in timeList"> <div class="van-doc-card" v-for="(item, index) in timeList">
<div> <div>
<div><span style="color: grey">会议名称:</span>{{item.timePeriodName}}</div> <div>
<span style="color: grey">会议名称:</span>
{{item.timePeriodName}}
</div> </div>
<div @click="leaveClick(item, index)" </div>
style="display: flex; justify-content: space-between"> <div @click="leaveClick(item, index)" style="display: flex; justify-content: space-between">
<div> <div>
<div> <div>
<span style="color: grey">会议时间:</span> <span style="color: grey">会议时间:</span>
@@ -290,43 +271,42 @@ layout("/mobile/platform.html"){
</div> </div>
<div> <div>
<div v-if="flag === true" class="border_div"></div> <div v-if="flag === true" class="border_div"></div>
<van-icon v-if="flag === true" :class="'checkDiv checkDiv' + index" <van-icon v-if="flag === true" :class="'checkDiv checkDiv' + index" name="success" style="display: none"></van-icon>
name="success" style="display: none;"></van-icon> <span class="auditState" v-if="item.isJoin === false">{{item.stateName}}</span>
<span class="auditState"
v-if="item.isJoin === false">{{item.stateName}}</span>
</div> </div>
</div> </div>
<div v-if="item.isJoin === false"> <div v-if="item.isJoin === false">
<div><span style="color: grey">审核状态:</span>{{item.stateName}}</div> <div>
<span style="color: grey">审核状态:</span>
{{item.stateName}}
</div>
</div> </div>
<div> <div>
<span style="float: left; color: grey">请假原因:</span> <span style="float: left; color: grey">请假原因:</span>
<van-field :disabled="item.isJoin === false" placeholder="请输入请假原因" rows="1" <van-field
:disabled="item.isJoin === false"
placeholder="请输入请假原因"
rows="1"
style="font-size: 12px; padding: 0; width: 70%; line-height: 20px" style="font-size: 12px; padding: 0; width: 70%; line-height: 20px"
type="textarea" autosize type="textarea"
v-model="item.leaveReason"></van-field> autosize
v-model="item.leaveReason"
></van-field>
</div> </div>
<div v-if="flag === false && item.stateCode === clickRow.firstState && item.stateAuditType !== 1" <div v-if="flag === false && item.stateCode === clickRow.firstState && item.stateAuditType !== 1" style="text-align: right">
style="text-align: right"> <van-button @click.stop="cancelLeave(item)" border color="#1867b0" size="small">取消请假</van-button>
<van-button @click.stop="cancelLeave(item)" border color="#1867b0" size="small">
取消请假
</van-button>
</div> </div>
<div v-if="flag === false && item.stateAuditType === 1" style="text-align: right"> <div v-if="flag === false && item.stateAuditType === 1" style="text-align: right">
<van-button @click.stop="refreshApply(item)" border color="#1867b0" <van-button @click.stop="refreshApply(item)" border color="#1867b0" size="small">重新申请</van-button>
size="small">重新申请
</van-button>
</div> </div>
</div> </div>
</div> </div>
<div v-if="flag === true"> <div v-if="flag === true">
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 20px; width: 100%"> <div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 20px; width: 100%">
<van-button @click="leaveShow = false" color="lightgrey" size="small" <van-button @click="leaveShow = false" color="lightgrey" size="small" style="width: 40%; border-radius: revert; height: 38px">
style="width: 40%; border-radius: revert; height: 38px">取消 取消
</van-button>
<van-button @click="leave" color="#1867b0" size="small"
style="width: 40%; border-radius: revert; height: 38px">确定
</van-button> </van-button>
<van-button @click="leave" color="#1867b0" size="small" style="width: 40%; border-radius: revert; height: 38px">确定</van-button>
</div> </div>
</div> </div>
</van-action-sheet> </van-action-sheet>
@@ -336,87 +316,94 @@ layout("/mobile/platform.html"){
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #--> <!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
const meetUtil = new meetingUtil() const meetUtil = new meetingUtil()
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
timeList: [], timeList: [],
checked: [], checked: [],
checkboxRefs: [], checkboxRefs: [],
leaveReason: '', leaveReason: "",
leaveShow: false, leaveShow: false,
popupShow: false, popupShow: false,
tabNameIndex: 0, tabNameIndex: 0,
clickRow: {}, clickRow: {},
meetingList: [{text: '全部', value: '0'}, {text: '我参与的', value: '1'}, { meetingList: [
text: '我请假的', { text: "全部", value: "0" },
value: '2' { text: "我参与的", value: "1" },
}], {
text: "我请假的",
value: "2"
}
],
typeList: [], typeList: [],
meetingTimeList: [{text: '全部时间', value: null}, { meetingTimeList: [
text: '即将开始', { text: "全部时间", value: null },
{
text: "即将开始",
value: 0 value: 0
}, {text: '已结束', value: 1}], },
flag: true, { text: "已结束", value: 1 }
],
flag: true
} }
}, },
methods: { methods: {
refreshApply(o) { refreshApply(o) {
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '温馨提示', title: "温馨提示",
message: '您确定要重新申请吗?', message: "您确定要重新申请吗?"
}).then(async () => { })
.then(async () => {
await this.needLeave(this.clickRow, true) await this.needLeave(this.clickRow, true)
this.timeList.forEach((re, index) => { this.timeList.forEach((re, index) => {
if (re.stateAuditType === 1) { if (re.stateAuditType === 1) {
re.isJoin = null re.isJoin = null
re.stateCode = null re.stateCode = null
re.leaveReason = null re.leaveReason = null
$('.checkDiv' + index).css('display', 'none') $(".checkDiv" + index).css("display", "none")
this.checked = this.checked.filter(function (item, index) { this.checked = this.checked.filter(function (item, index) {
return item.id !== re.id return item.id !== re.id
}) })
} }
}) })
}).catch(() => {
}) })
.catch(() => {})
}, },
cancelLeave(o) { cancelLeave(o) {
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '温馨提示', title: "温馨提示",
message: '您确定要取消请假吗?', message: "您确定要取消请假吗?"
}).then(async () => { })
const res = await $.post('/mobile/meeting/mine/cancelLeave', {id: o.id}) .then(async () => {
const res = await $.post("/mobile/meeting/mine/cancelLeave", { id: o.id })
if (res.code === 0) { if (res.code === 0) {
vant.Toast('操作成功') vant.Toast("操作成功")
this.doSearch() this.doSearch()
this.leaveShow = false this.leaveShow = false
} }
}).catch(() => {
}) })
.catch(() => {})
}, },
leaveClick(item, index) { leaveClick(item, index) {
if (item.isJoin === false) { if (item.isJoin === false) {
return return
} }
const isExist = this.checked.some(o => o.tpuId === item.tpuId) const isExist = this.checked.some((o) => o.tpuId === item.tpuId)
if (!isExist) { if (!isExist) {
$('.checkDiv' + index).css('display', '') $(".checkDiv" + index).css("display", "")
this.checked.push(item) this.checked.push(item)
} else { } else {
$('.checkDiv' + index).css('display', 'none') $(".checkDiv" + index).css("display", "none")
this.checked = this.checked.filter(o => o.tpuId !== item.tpuId) this.checked = this.checked.filter((o) => o.tpuId !== item.tpuId)
} }
}, },
toggle(item, index) { toggle(item, index) {
if (item.auditIdList === null) { if (item.auditIdList === null) {
this.$refs.checkboxes[index].toggle(); this.$refs.checkboxes[index].toggle()
} }
}, },
openView(id) { openView(id) {},
},
doSearch() { doSearch() {
this.pageForm.pageNumber = 1 this.pageForm.pageNumber = 1
this.tableData = [] this.tableData = []
@@ -425,7 +412,7 @@ layout("/mobile/platform.html"){
}, },
async onLoad() { async onLoad() {
this.loading = true this.loading = true
$.post('/mobile/meeting/mine/pageData', this.pageForm).then(res => { $.post("/mobile/meeting/mine/pageData", this.pageForm).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -441,16 +428,16 @@ layout("/mobile/platform.html"){
this.flag = flag this.flag = flag
this.clickRow = o this.clickRow = o
if (moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false) { if (moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false) {
vant.Toast('抱歉,已过请假截止时间'); vant.Toast("抱歉,已过请假截止时间")
return return
} }
this.leaveReason = '' this.leaveReason = ""
this.checked = [] this.checked = []
const res = await $.post('/mobile/meeting/mine/findMyMeetPeriod', {meetingId: o.id}) const res = await $.post("/mobile/meeting/mine/findMyMeetPeriod", { meetingId: o.id })
if (res.code === 0) { if (res.code === 0) {
this.timeList = res.data this.timeList = res.data
if (this.timeList.length === 0) { if (this.timeList.length === 0) {
vant.Toast('您暂无可请假的假时间段'); vant.Toast("您暂无可请假的假时间段")
return return
} }
@@ -459,64 +446,62 @@ layout("/mobile/platform.html"){
this.timeList.forEach((re, index) => { this.timeList.forEach((re, index) => {
if (re.isJoin === false) { if (re.isJoin === false) {
this.checked.push(re) this.checked.push(re)
$('.checkDiv' + index).css('display', '') $(".checkDiv" + index).css("display", "")
} }
}) })
}) })
return return
} }
vant.Toast('系统错误,请联系管理员'); vant.Toast("系统错误,请联系管理员")
}, },
async leave() { async leave() {
if (this.checked.length === 0) { if (this.checked.length === 0) {
vant.Toast('请选择请假时间段'); vant.Toast("请选择请假时间段")
return return
} }
const array = this.timeList.find(o => o.stateCode === null || o.stateCode < this.clickRow.firstState) const array = this.timeList.find((o) => o.stateCode === null || o.stateCode < this.clickRow.firstState)
if (array === undefined) { if (array === undefined) {
vant.Toast('您的所有请假均已处于审核阶段'); vant.Toast("您的所有请假均已处于审核阶段")
return return
} }
const paramArray = [] const paramArray = []
let valid = false let valid = false
this.checked.forEach(item => { this.checked.forEach((item) => {
if (item.leaveReason === '' || item.leaveReason === undefined) { if (item.leaveReason === "" || item.leaveReason === undefined) {
vant.Toast('请填写请假原因'); vant.Toast("请填写请假原因")
valid = true valid = true
return return
} }
if (!item.stateCode) { if (!item.stateCode) {
paramArray.push( paramArray.push({
{
id: item.tpuId, id: item.tpuId,
meetingId: this.clickRow.id, meetingId: this.clickRow.id,
leaveReason: item.leaveReason leaveReason: item.leaveReason
} })
)
} }
}) })
if (paramArray.length === 0) { if (paramArray.length === 0) {
vant.Toast('请选择请假时间段'); vant.Toast("请选择请假时间段")
return return
} }
if (valid) { if (valid) {
return return
} }
const resp = await $.post('/mobile/meeting/mine/askForLeave', { const resp = await $.post("/mobile/meeting/mine/askForLeave", {
meetingId: this.clickRow.id, meetingId: this.clickRow.id,
data: JSON.stringify(paramArray) data: JSON.stringify(paramArray)
}) })
if (resp.code === 0) { if (resp.code === 0) {
vant.Toast('操作成功'); vant.Toast("操作成功")
this.doSearch() this.doSearch()
this.leaveShow = false this.leaveShow = false
} }
$('.checkDiv').css('display', 'none') $(".checkDiv").css("display", "none")
} }
}, },
async created() { async created() {
this.typeList = await meetUtil.getAllMeetingType() this.typeList = await meetUtil.getAllMeetingType()
this.typeList.unshift({'text': '全部会议类型'}) this.typeList.unshift({ text: "全部会议类型" })
if (this.typeList && this.typeList.length > 0) { if (this.typeList && this.typeList.length > 0) {
this.$set(this.pageForm, "typeId", this.typeList[0].value) this.$set(this.pageForm, "typeId", this.typeList[0].value)
} }
@@ -3,7 +3,6 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.info { .info {
position: relative; position: relative;
width: 88%; width: 88%;
@@ -36,7 +35,8 @@ layout("/mobile/platform.html"){
background-color: white; background-color: white;
} }
.van-tab__pane, .van-tab__pane-wrapper { .van-tab__pane,
.van-tab__pane-wrapper {
padding: 20px; padding: 20px;
} }
@@ -101,45 +101,28 @@ layout("/mobile/platform.html"){
img { img {
border-radius: 10px; border-radius: 10px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="心理咨询预约" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<van-nav-bar
title="心理咨询预约"
left-arrow
placeholder
fixed
@click-left="window.history.back()">
</van-nav-bar>
<div class="info"> <div class="info">
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center">
<!--头像--> <!--头像-->
<div class="avatar"> <div class="avatar">
<van-image width="80" <van-image width="80" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+doctorData.avatar"></van-image>
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+doctorData.avatar"></van-image>
</div> </div>
<!--其他信息--> <!--其他信息-->
<div class="other_info"> <div class="other_info">
<div> <div>{{doctorData.username}}</div>
{{doctorData.username}} <div>{{doctorData.jobTitle}}</div>
</div>
<div>
{{doctorData.jobTitle}}
</div>
</div> </div>
</div> </div>
</div> </div>
<van-tabs v-model="active" :style="'height: ' + (window.screen.height - 46 - 40 - 84 - 24 - 44) + 'px'"> <van-tabs v-model="active" :style="'height: ' + (window.screen.height - 46 - 40 - 84 - 24 - 44) + 'px'">
<van-tab title="预约时段"> <van-tab title="预约时段">
<van-list <van-list v-model="mLoading" :finished="finished" :finished-text="timeData.length > 0 ? '没有更多了' : ''" @load="getDataByDoctorId">
v-model="mLoading"
:finished="finished"
:finished-text="timeData.length > 0 ? '没有更多了' : ''"
@load="getDataByDoctorId">
<div v-if="timeData.length > 0" class="time_info" v-for="item in timeData"> <div v-if="timeData.length > 0" class="time_info" v-for="item in timeData">
<div style="color: #1867b0">{{getFormatTime(item)}}</div> <div style="color: #1867b0">{{getFormatTime(item)}}</div>
<div> <div>
@@ -151,8 +134,8 @@ layout("/mobile/platform.html"){
v-if="mLoading === false && timeData.length === 0" v-if="mLoading === false && timeData.length === 0"
class="custom-image" class="custom-image"
image="/none.svg" image="/none.svg"
description="抱歉,此咨询师暂时没有进行排班哦"> description="抱歉,此咨询师暂时没有进行排班哦"
</van-empty> ></van-empty>
</van-tab> </van-tab>
<van-tab title="咨询师简介"> <van-tab title="咨询师简介">
<div class="label">咨询师擅长</div> <div class="label">咨询师擅长</div>
@@ -163,58 +146,48 @@ layout("/mobile/platform.html"){
</van-tabs> </van-tabs>
<van-popup v-model="show" class="apply_pop" position="right"> <van-popup v-model="show" class="apply_pop" position="right">
<van-nav-bar <van-nav-bar title="预约信息" left-arrow placeholder fixed @click-left="show = false"></van-nav-bar>
title="预约信息"
left-arrow
placeholder
fixed
@click-left="show = false">
</van-nav-bar>
<van-form ref="addForm" :show-error-message="false" input-align="right"> <van-form ref="addForm" :show-error-message="false" input-align="right">
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<van-field readonly <van-field readonly :value="chooseData.startTime" label="开始时间"></van-field>
:value="chooseData.startTime" <van-field readonly :value="chooseData.endTime" label="结束时间"></van-field>
label="开始时间"></van-field>
<van-field readonly
:value="chooseData.endTime"
label="结束时间"></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser"> <van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
<van-field readonly <van-field readonly :value="chooseData.username" label="咨询师姓名"></van-field>
:value="chooseData.username" <van-field readonly :value="chooseData.mobile" label="咨询师电话"></van-field>
label="咨询师姓名"></van-field>
<van-field readonly
:value="chooseData.mobile"
label="咨询师电话"></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<van-field readonly <van-field readonly value="${@shiro.getPrincipalProperty('username')}" label="预约人姓名"></van-field>
value="${@shiro.getPrincipalProperty('username')}" <van-field readonly value="${@shiro.getPrincipalProperty('loginname')}" label="预约人工号"></van-field>
label="预约人姓名"></van-field> <van-field readonly value="${@shiro.getPrincipalProperty('unit').getName()}" label="预约人单位"></van-field>
<van-field readonly <van-field
value="${@shiro.getPrincipalProperty('loginname')}" :rules="[{ required: true, message: '请填写手机号' }]"
label="预约人工号"></van-field> required
<van-field readonly placeholder="请填写手机号"
value="${@shiro.getPrincipalProperty('unit').getName()}"
label="预约人单位"></van-field>
<van-field :rules="[{ required: true, message: '请填写手机号' }]"
required placeholder="请填写手机号"
type="tel" type="tel"
v-model=chooseData.userMobile v-model="chooseData.userMobile"
label="预约人电话"></van-field> label="预约人电话"
></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<div v-if="chooseData.askType"> <div v-if="chooseData.askType">
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true" <van-field
required :rules="[{ required: true, message: '请选择咨询方式' }]" v-model="appointmentAskTypeText"
placeholder="请选择咨询方式"></van-field> label="咨询方式"
@click="appointmentAskTypeShow = true"
required
:rules="[{ required: true, message: '请选择咨询方式' }]"
placeholder="请选择咨询方式"
></van-field>
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round> <van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm" <van-picker
@cancel="appointmentAskTypeShow = false"> show-toolbar
</van-picker> :columns="askTypeArray"
@confirm="askTypeConfirm"
@cancel="appointmentAskTypeShow = false"
></van-picker>
</van-popup> </van-popup>
</div> </div>
@@ -235,21 +208,20 @@ layout("/mobile/platform.html"){
</div> </div>
<script> <script>
function getQueryVariable(variable) { function getQueryVariable(variable) {
var query = window.location.search.substring(1); var query = window.location.search.substring(1)
var vars = query.split("&"); var vars = query.split("&")
for (var i = 0; i < vars.length; i++) { for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("="); var pair = vars[i].split("=")
if (pair[0] == variable) { if (pair[0] == variable) {
return pair[1]; return pair[1]
} }
} }
return ''; return ""
} }
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -257,7 +229,7 @@ layout("/mobile/platform.html"){
askTypeList: [], askTypeList: [],
askTypeArray: [], askTypeArray: [],
show: false, show: false,
doctorId: '', doctorId: "",
doctorData: {}, doctorData: {},
active: 0, active: 0,
timeData: [], timeData: [],
@@ -265,10 +237,10 @@ layout("/mobile/platform.html"){
chooseData: { chooseData: {
userMobile: null userMobile: null
}, },
appointmentUserNote: '', appointmentUserNote: "",
appointmentAskTypeText: '', appointmentAskTypeText: "",
appointmentAskTypeValue: '', appointmentAskTypeValue: "",
typeId: '', typeId: ""
} }
}, },
methods: { methods: {
@@ -279,36 +251,36 @@ layout("/mobile/platform.html"){
}, },
async doSubmit() { async doSubmit() {
if (!this.chooseData.userMobile.trim()) { if (!this.chooseData.userMobile.trim()) {
this.$toast.fail("请填写手机号"); this.$toast.fail("请填写手机号")
return return
} }
if (!this.appointmentAskTypeValue) { if (!this.appointmentAskTypeValue) {
this.$toast.fail("请选择咨询方式"); this.$toast.fail("请选择咨询方式")
return return
} }
const valid = await vant.Dialog.confirm({ const valid = await vant.Dialog.confirm({
title: '提示', title: "提示",
message: '您确认提交吗?', message: "您确认提交吗?",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
if (valid) { if (valid) {
this.$toast.loading('提交中...') this.$toast.loading("提交中...")
const params = { const params = {
appointmentUserNote: this.appointmentUserNote, appointmentUserNote: this.appointmentUserNote,
appointmentAskTypeValue: this.appointmentAskTypeValue, appointmentAskTypeValue: this.appointmentAskTypeValue,
userMobile: this.chooseData.userMobile, userMobile: this.chooseData.userMobile,
id: this.chooseData.id, id: this.chooseData.id,
isAdd: true, isAdd: true
} }
const resp = await $.post('/mobile/psychologyPro/doApply', params) const resp = await $.post("/mobile/psychologyPro/doApply", params)
if (resp.code === 0) { if (resp.code === 0) {
vant.Dialog.alert({ vant.Dialog.alert({
title: '提示', title: "提示",
message: '您已预约成功!', message: "您已预约成功!",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}).then(() => { }).then(() => {
location.replace('/mobile/psychologyPro/myApplyList') location.replace("/mobile/psychologyPro/myApplyList")
}); })
} else if (resp.code === 1) { } else if (resp.code === 1) {
this.$toast.error(resp.msg) this.$toast.error(resp.msg)
} else if (resp.code === 2) { } else if (resp.code === 2) {
@@ -317,13 +289,13 @@ layout("/mobile/platform.html"){
} }
}, },
apply(o) { apply(o) {
if (o.title !== '可预约') { if (o.title !== "可预约") {
return return
} }
this.askTypeArray = [] this.askTypeArray = []
if (o.askType) { if (o.askType) {
const array = JSON.parse(o.askType) const array = JSON.parse(o.askType)
this.askTypeList.map(o => { this.askTypeList.map((o) => {
if (array.includes(o.code)) { if (array.includes(o.code)) {
this.askTypeArray.push({ text: o.name, value: o.code }) this.askTypeArray.push({ text: o.name, value: o.code })
} }
@@ -338,17 +310,17 @@ layout("/mobile/platform.html"){
this.show = true this.show = true
}, },
getFormatTime(o) { getFormatTime(o) {
const simpleStartDate = moment(o.startTime).format('YYYY-MM-DD') const simpleStartDate = moment(o.startTime).format("YYYY-MM-DD")
const simpleStartHour = moment(o.startTime).format('HH:mm') const simpleStartHour = moment(o.startTime).format("HH:mm")
const simpleEndHour = moment(o.endTime).format('HH:mm') const simpleEndHour = moment(o.endTime).format("HH:mm")
const dayNameOfWeek = this.dayNames[new Date(simpleStartDate).getDay()] const dayNameOfWeek = this.dayNames[new Date(simpleStartDate).getDay()]
return simpleStartDate + ' ' + dayNameOfWeek + ' ' + simpleStartHour + '至' + simpleEndHour return simpleStartDate + " " + dayNameOfWeek + " " + simpleStartHour + "至" + simpleEndHour
}, },
async pageData() { async pageData() {
this.pageForm.doctorId = this.doctorId this.pageForm.doctorId = this.doctorId
const resp = await $.post('/mobile/psychologyPro/pageData', this.pageForm) const resp = await $.post("/mobile/psychologyPro/pageData", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
if (this.doctorId !== '') { if (this.doctorId !== "") {
this.doctorData = resp.data[0] this.doctorData = resp.data[0]
} else { } else {
this.tableData = resp.data this.tableData = resp.data
@@ -359,40 +331,40 @@ layout("/mobile/platform.html"){
this.mLoading = true this.mLoading = true
this.pageForm.id = this.doctorId this.pageForm.id = this.doctorId
this.pageForm.typeId = this.typeId this.pageForm.typeId = this.typeId
const resp = await $.post('/mobile/psychologyPro/getDataByDoctorId', this.pageForm) const resp = await $.post("/mobile/psychologyPro/getDataByDoctorId", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
const userId = "${@shiro.getPrincipalProperty('id')}" const userId = "${@shiro.getPrincipalProperty('id')}"
const record = resp.data.list.find(v => v.appointmentUser === userId) const record = resp.data.list.find((v) => v.appointmentUser === userId)
if (record) { if (record) {
resp.data.list.forEach(v => { resp.data.list.forEach((v) => {
if (new Date().getTime() > v.startTimeTs) { if (new Date().getTime() > v.startTimeTs) {
v.className = 'gray' v.className = "gray"
v.title = '不可预约' v.title = "不可预约"
} else { } else {
if (v.appointmentUser === userId) { if (v.appointmentUser === userId) {
v.className = 'gray' v.className = "gray"
v.title = '我已预约' v.title = "我已预约"
} else { } else {
v.className = 'gray' v.className = "gray"
v.title = '不可预约' v.title = "不可预约"
} }
} }
}) })
} else { } else {
resp.data.list.forEach(v => { resp.data.list.forEach((v) => {
if (new Date().getTime() > v.startTimeTs) { if (new Date().getTime() > v.startTimeTs) {
v.className = 'gray' v.className = "gray"
v.title = '不可预约' v.title = "不可预约"
} else { } else {
if (!v.appointmentUser) { if (!v.appointmentUser) {
v.className = '#1867b0' v.className = "#1867b0"
v.title = '可预约' v.title = "可预约"
} else if (v.appointmentUser === userId) { } else if (v.appointmentUser === userId) {
v.className = 'gray' v.className = "gray"
v.title = '我已预约' v.title = "我已预约"
} else { } else {
v.className = 'gray' v.className = "gray"
v.title = '不可预约' v.title = "不可预约"
} }
} }
}) })
@@ -405,14 +377,14 @@ layout("/mobile/platform.html"){
} }
} }
this.mLoading = false this.mLoading = false
}, }
}, },
async created() { async created() {
this.doctorId = getQueryVariable('doctorId') this.doctorId = getQueryVariable("doctorId")
this.typeId = getQueryVariable('typeId') this.typeId = getQueryVariable("typeId")
this.askTypeList = await getDictOptions("psychology_asktype") this.askTypeList = await getDictOptions("psychology_asktype")
await this.pageData() await this.pageData()
}, }
}) })
</script> </script>
@@ -3,7 +3,6 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.info { .info {
position: relative; position: relative;
width: 88%; width: 88%;
@@ -40,27 +39,18 @@ layout("/mobile/platform.html"){
.van-dropdown-menu__item { .van-dropdown-menu__item {
flex: auto; flex: auto;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="心理咨询师列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<van-nav-bar
title="心理咨询师列表"
left-arrow
placeholder
fixed
@click-left="window.history.back()">
</van-nav-bar>
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item v-model="pageForm.typeId" :options="typeList" <van-dropdown-item v-model="pageForm.typeId" :options="typeList" @change="doSearch"></van-dropdown-item>
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
<!--咨询师列表--> <!--咨询师列表-->
<div class="info" @click="toApply(item)" v-for="item in tableData" style="margin-bottom: 20px"> <div class="info" @click="toApply(item)" v-for="item in tableData" style="margin-bottom: 20px">
<div style="display: flex;"> <div style="display: flex">
<!--头像--> <!--头像-->
<div class="avatar"> <div class="avatar">
<van-image width="80" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.avatar"></van-image> <van-image width="80" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.avatar"></van-image>
@@ -69,27 +59,28 @@ layout("/mobile/platform.html"){
<div class="other_info"> <div class="other_info">
<div> <div>
<span style="font-size: 20px">{{item.username}}&ensp;</span> <span style="font-size: 20px">{{item.username}}&ensp;</span>
<span style="color: grey">{{item.sex}}&ensp;</span>&emsp; <span style="color: grey">{{item.sex}}&ensp;</span>
&emsp;
</div> </div>
<div> <div>
<div> <div>
<span style="color: grey">职称:</span>{{item.jobTitle}} <span style="color: grey">职称:</span>
{{item.jobTitle}}
</div> </div>
<div> <div>
<span style="color: grey">单位:</span>{{item.unitName}} <span style="color: grey">单位:</span>
{{item.unitName}}
</div> </div>
<div class="desc"> <div class="desc">
<span style="color: grey">特长:</span>{{item.specialty}} <span style="color: grey">特长:</span>
{{item.specialty}}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" <van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
description="暂无数据">
</van-empty>
<div> <div>
<van-tabbar v-model="tarBarActive"> <van-tabbar v-model="tarBarActive">
@@ -97,21 +88,20 @@ layout("/mobile/platform.html"){
<van-tabbar-item icon="manager-o" replace url="/mobile/psychologyPro/myApplyList">我的预约</van-tabbar-item> <van-tabbar-item icon="manager-o" replace url="/mobile/psychologyPro/myApplyList">我的预约</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
tarBarActive: 0, tarBarActive: 0,
typeList: [ typeList: [
{text: '时间不限', value: 'no'}, { text: "时间不限", value: "no" },
{text: '本周', value: 'thisWeek'}, { text: "本周", value: "thisWeek" },
{text: '下周', value: 'nextWeek'}, { text: "下周", value: "nextWeek" }
], ]
} }
}, },
methods: { methods: {
@@ -120,19 +110,19 @@ layout("/mobile/platform.html"){
this.pageData() this.pageData()
}, },
async pageData() { async pageData() {
const resp = await $.post('/mobile/psychologyPro/pageData', this.pageForm) const resp = await $.post("/mobile/psychologyPro/pageData", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
this.tableData = resp.data this.tableData = resp.data
} }
}, },
toApply(o) { toApply(o) {
location.href = '/mobile/psychologyPro/apply?doctorId=' + o.userid + '&typeId=' + this.pageForm.typeId location.href = "/mobile/psychologyPro/apply?doctorId=" + o.userid + "&typeId=" + this.pageForm.typeId
} }
}, },
async created() { async created() {
this.$set(this.pageForm, "typeId", this.typeList[0].value) this.$set(this.pageForm, "typeId", this.typeList[0].value)
await this.pageData() await this.pageData()
}, }
}) })
</script> </script>
@@ -4,7 +4,7 @@ layout("/mobile/platform.html"){
<style> <style>
.list-card { .list-card {
background: #FFFFFF; background: #ffffff;
width: 92%; width: 92%;
margin: 0px auto 20px; margin: 0px auto 20px;
box-shadow: 0 2px 10px rgb(125 126 128 / 16%); box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
@@ -79,7 +79,7 @@ layout("/mobile/platform.html"){
} }
.van-card-body { .van-card-body {
padding: 0px 10px 0px 10px padding: 0px 10px 0px 10px;
} }
.van-doc-card > div:first-child { .van-doc-card > div:first-child {
@@ -114,29 +114,23 @@ layout("/mobile/platform.html"){
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="我的预约记录" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="我的预约记录"
left-arrow
placeholder
fixed
@click-left="window.history.back()"
></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item v-model="pageForm.year" :options="yearList" <van-dropdown-item v-model="pageForm.year" :options="yearList" @change="doSearch"></van-dropdown-item>
@change="doSearch"></van-dropdown-item> <van-dropdown-item v-model="pageForm.stateId" :options="stateList" @change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.stateId" :options="stateList"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div style="margin: 60px auto 0 auto"> <div style="margin: 60px auto 0 auto">
<van-list v-model="loading" <van-list
v-model="loading"
:finished="finished" :finished="finished"
:finished-text="tableData.length>0?'没有更多了':''" :finished-text="tableData.length>0?'没有更多了':''"
:immediate-check="false" :immediate-check="false"
@load="pageData"> @load="pageData"
>
<div v-for="o in tableData" class="list-card" @click="viewInfo(o)"> <div v-for="o in tableData" class="list-card" @click="viewInfo(o)">
<div class="card-head"> <div class="card-head">
心理咨询预约 心理咨询预约
@@ -152,35 +146,32 @@ layout("/mobile/platform.html"){
<van-cell :border="false" title="结束时间">{{o.endTime}}</van-cell> <van-cell :border="false" title="结束时间">{{o.endTime}}</van-cell>
</van-cell-group> </van-cell-group>
<div class="cancel-button"> <div class="cancel-button">
<van-button v-if="moment().unix() < moment(o.startTime).unix()" style="margin-right: 4px" <van-button
@click.stop="update(o)" round size="small" color="#1867b0">修改 v-if="moment().unix() < moment(o.startTime).unix()"
style="margin-right: 4px"
@click.stop="update(o)"
round
size="small"
color="#1867b0"
>
修改
</van-button> </van-button>
<van-button v-if="moment().unix() < moment(o.startTime).unix()" <van-button v-if="moment().unix() < moment(o.startTime).unix()" @click.stop="doCancel(o.id)" round size="small" color="#1867b0">
@click.stop="doCancel(o.id)" round size="small" color="#1867b0">取消 取消
</van-button> </van-button>
</div> </div>
</div> </div>
</van-list> </van-list>
</div> </div>
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
description="暂无数据">
</van-empty>
<van-popup v-model="show" class="apply_pop" position="right"> <van-popup v-model="show" class="apply_pop" position="right">
<van-nav-bar <van-nav-bar title="预约详细信息" left-arrow placeholder fixed @click-left="show = false" safe-area-inset-top></van-nav-bar>
title="预约详细信息"
left-arrow
placeholder
fixed
@click-left="show = false"
safe-area-inset-top></van-nav-bar>
<div class="van-doc-card" style="margin: 16px"> <div class="van-doc-card" style="margin: 16px">
<div></div> <div></div>
<div class="van-card-header"> <div class="van-card-header">预约时间段</div>
预约时间段
</div>
<div class="van-card-body"> <div class="van-card-body">
<van-cell-group> <van-cell-group>
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell> <van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
@@ -191,9 +182,7 @@ layout("/mobile/platform.html"){
<div class="van-doc-card" style="margin: 16px"> <div class="van-doc-card" style="margin: 16px">
<div></div> <div></div>
<div class="van-card-header"> <div class="van-card-header">预约人信息</div>
预约人信息
</div>
<div class="van-card-body"> <div class="van-card-body">
<van-cell-group> <van-cell-group>
<van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell> <van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell>
@@ -208,9 +197,7 @@ layout("/mobile/platform.html"){
<div class="van-doc-card" style="margin: 16px"> <div class="van-doc-card" style="margin: 16px">
<div></div> <div></div>
<div class="van-card-header"> <div class="van-card-header">咨询师信息</div>
咨询师信息
</div>
<div class="van-card-body"> <div class="van-card-body">
<van-cell-group> <van-cell-group>
<van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell> <van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell>
@@ -220,20 +207,17 @@ layout("/mobile/platform.html"){
<van-cell title="咨询方式"> <van-cell title="咨询方式">
<div v-if="!viewData.askType || getDoctorAskTypeName().length === 0">暂无</div> <div v-if="!viewData.askType || getDoctorAskTypeName().length === 0">暂无</div>
<div v-else> <div v-else>
<div v-for="item in getDoctorAskTypeName()"> <div v-for="item in getDoctorAskTypeName()">{{ item.name }}</div>
{{ item.name }}
</div>
</div> </div>
</van-cell> </van-cell>
<van-cell @click="doctorIntroduceShow = true" title="个人简介" is-link> <van-cell @click="doctorIntroduceShow = true" title="个人简介" is-link>
<div style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: break-word;"> <div style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: break-word">
{{ viewData.doctorIntroduce || '暂无'}} {{ viewData.doctorIntroduce || '暂无'}}
</div> </div>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</div> </div>
</div> </div>
</van-popup> </van-popup>
<van-popup v-model:show="doctorIntroduceShow" position="bottom" round style="padding: 20px; width: auto"> <van-popup v-model:show="doctorIntroduceShow" position="bottom" round style="padding: 20px; width: auto">
@@ -247,57 +231,45 @@ layout("/mobile/platform.html"){
</van-popup> </van-popup>
<van-popup v-model="infoShow" class="apply_pop" position="right"> <van-popup v-model="infoShow" class="apply_pop" position="right">
<van-nav-bar <van-nav-bar title="预约信息" left-arrow placeholder fixed @click-left="infoShow = false"></van-nav-bar>
title="预约信息"
left-arrow
placeholder
fixed
@click-left="infoShow = false">
</van-nav-bar>
<van-form ref="addForm" :show-error-message="false" input-align="right"> <van-form ref="addForm" :show-error-message="false" input-align="right">
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<van-field readonly <van-field readonly :value="chooseData.startTime" label="开始时间"></van-field>
:value="chooseData.startTime" <van-field readonly :value="chooseData.endTime" label="结束时间"></van-field>
label="开始时间"></van-field>
<van-field readonly
:value="chooseData.endTime"
label="结束时间"></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser"> <van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
<van-field readonly <van-field readonly :value="chooseData.doctorUserName" label="咨询师姓名"></van-field>
:value="chooseData.doctorUserName" <van-field readonly :value="chooseData.doctorMobile" label="咨询师电话"></van-field>
label="咨询师姓名"></van-field>
<van-field readonly
:value="chooseData.doctorMobile"
label="咨询师电话"></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<van-field readonly <van-field readonly value="${@shiro.getPrincipalProperty('username')}" label="预约人姓名"></van-field>
value="${@shiro.getPrincipalProperty('username')}" <van-field readonly value="${@shiro.getPrincipalProperty('loginname')}" label="预约人工号"></van-field>
label="预约人姓名"></van-field> <van-field readonly value="${@shiro.getPrincipalProperty('unit').getName()}" label="预约人单位"></van-field>
<van-field readonly <van-field
value="${@shiro.getPrincipalProperty('loginname')}" :rules="[{ required: true, message: '请填写电话' }]"
label="预约人工号"></van-field>
<van-field readonly
value="${@shiro.getPrincipalProperty('unit').getName()}"
label="预约人单位"></van-field>
<van-field :rules="[{ required: true, message: '请填写电话' }]"
required required
type="tel" type="tel"
v-model=chooseData.userMobile v-model="chooseData.userMobile"
label="预约人电话"></van-field> label="预约人电话"
></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group inset class="mt10"> <van-cell-group inset class="mt10">
<div v-if="chooseData.askType"> <div v-if="chooseData.askType">
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true" <van-field
placeholder="请选择咨询方式"></van-field> v-model="appointmentAskTypeText"
label="咨询方式"
@click="appointmentAskTypeShow = true"
placeholder="请选择咨询方式"
></van-field>
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round> <van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm" <van-picker
@cancel="appointmentAskTypeShow = false"> show-toolbar
</van-picker> :columns="askTypeArray"
@confirm="askTypeConfirm"
@cancel="appointmentAskTypeShow = false"
></van-picker>
</van-popup> </van-popup>
</div> </div>
@@ -326,28 +298,28 @@ layout("/mobile/platform.html"){
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
tarBarActive: 1, tarBarActive: 1,
appointmentAskTypeText: '', appointmentAskTypeText: "",
appointmentUserNote: '', appointmentUserNote: "",
appointmentAskTypeShow: false, appointmentAskTypeShow: false,
appointmentAskTypeValue: '', appointmentAskTypeValue: "",
askTypeArray: [], askTypeArray: [],
chooseData: {}, chooseData: {},
infoShow: false, infoShow: false,
doctorIntroduceShow: false, doctorIntroduceShow: false,
stateList: [ stateList: [
{text: '全部预约状态', value: null}, { text: "全部预约状态", value: null },
{text: '预约中', value: 2100}, { text: "预约中", value: 2100 },
{text: '预约成功', value: 2300}, { text: "预约成功", value: 2300 },
{text: '预约失败', value: 2200} { text: "预约失败", value: 2200 }
], ],
askTypeList: [], askTypeList: [],
show: false, show: false,
viewData: {}, viewData: {}
} }
}, },
methods: { methods: {
@@ -355,15 +327,15 @@ layout("/mobile/platform.html"){
this.askTypeArray = [] this.askTypeArray = []
if (o.askType) { if (o.askType) {
const array = JSON.parse(o.askType) const array = JSON.parse(o.askType)
this.askTypeList.map(o => { this.askTypeList.map((o) => {
if (array.includes(o.code)) { if (array.includes(o.code)) {
this.askTypeArray.push({ text: o.name, value: o.code }) this.askTypeArray.push({ text: o.name, value: o.code })
} }
}) })
} }
if (o.appointmentAskTypeValue) { if (o.appointmentAskTypeValue) {
const type = this.askTypeList.find(x => x.code === o.appointmentAskTypeValue) const type = this.askTypeList.find((x) => x.code === o.appointmentAskTypeValue)
this.appointmentAskTypeText = type ? type.name : '' this.appointmentAskTypeText = type ? type.name : ""
} }
this.chooseData = o this.chooseData = o
this.appointmentUserNote = o.appointmentUserNote this.appointmentUserNote = o.appointmentUserNote
@@ -377,28 +349,28 @@ layout("/mobile/platform.html"){
}, },
async doSubmit() { async doSubmit() {
if (!this.chooseData.userMobile) { if (!this.chooseData.userMobile) {
this.$toast.fail("请输入手机号"); this.$toast.fail("请输入手机号")
return return
} }
const valid = await vant.Dialog.confirm({ const valid = await vant.Dialog.confirm({
title: '提示', title: "提示",
message: '您确认提交吗?', message: "您确认提交吗?",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
if (valid) { if (valid) {
this.$toast.loading('提交中...') this.$toast.loading("提交中...")
const params = { const params = {
appointmentUserNote: this.appointmentUserNote, appointmentUserNote: this.appointmentUserNote,
appointmentAskTypeValue: this.appointmentAskTypeValue, appointmentAskTypeValue: this.appointmentAskTypeValue,
userMobile: this.chooseData.userMobile, userMobile: this.chooseData.userMobile,
id: this.chooseData.id, id: this.chooseData.id,
isAdd: false, isAdd: false
} }
const resp = await $.post('/mobile/psychologyPro/doApply', params) const resp = await $.post("/mobile/psychologyPro/doApply", params)
if (resp.code === 0) { if (resp.code === 0) {
this.$toast.success('修改成功') this.$toast.success("修改成功")
setTimeout(() => { setTimeout(() => {
location.replace('/mobile/psychologyPro/myApplyList') location.replace("/mobile/psychologyPro/myApplyList")
}, 1000) }, 1000)
} else if (resp.code === 1) { } else if (resp.code === 1) {
this.$toast.error(resp.msg) this.$toast.error(resp.msg)
@@ -409,17 +381,17 @@ layout("/mobile/platform.html"){
}, },
getAskTypeName() { getAskTypeName() {
if (this.viewData.appointmentAskTypeValue) { if (this.viewData.appointmentAskTypeValue) {
const type = this.askTypeList.find(o => o.code === this.viewData.appointmentAskTypeValue + '') const type = this.askTypeList.find((o) => o.code === this.viewData.appointmentAskTypeValue + "")
return type ? type.name : '暂无' return type ? type.name : "暂无"
} else { } else {
return '暂无' return "暂无"
} }
}, },
getDoctorAskTypeName() { getDoctorAskTypeName() {
const askTypeArray = [] const askTypeArray = []
if (this.viewData.askType) { if (this.viewData.askType) {
const array = JSON.parse(this.viewData.askType) const array = JSON.parse(this.viewData.askType)
this.askTypeList.map(o => { this.askTypeList.map((o) => {
if (array.includes(o.code)) { if (array.includes(o.code)) {
askTypeArray.push(o) askTypeArray.push(o)
} }
@@ -429,7 +401,7 @@ layout("/mobile/platform.html"){
}, },
async pageData() { async pageData() {
this.loading = true this.loading = true
const {data} = await $.get('/mobile/psychologyPro/MyPageData', this.pageForm) const { data } = await $.get("/mobile/psychologyPro/MyPageData", this.pageForm)
setTimeout(() => { setTimeout(() => {
this.tableData = this.tableData.concat(data.list) this.tableData = this.tableData.concat(data.list)
if (this.tableData.length === data.totalCount) { if (this.tableData.length === data.totalCount) {
@@ -452,14 +424,14 @@ layout("/mobile/platform.html"){
}, },
async doCancel(id) { async doCancel(id) {
const confirm = await vant.Dialog.confirm({ const confirm = await vant.Dialog.confirm({
title: '提示', title: "提示",
message: '您确定取消此次预约吗?', message: "您确定取消此次预约吗?",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
if (confirm === 'confirm') { if (confirm === "confirm") {
const resp = await $.post('/mobile/psychologyPro/doCancel', {id}) const resp = await $.post("/mobile/psychologyPro/doCancel", { id })
if (resp.code === 0) { if (resp.code === 0) {
vant.Toast.success('取消成功') vant.Toast.success("取消成功")
this.doSearch() this.doSearch()
} }
} }
@@ -100,15 +100,12 @@ layout("/mobile/platform.html"){
padding: 10px; padding: 10px;
font-size: 14px; font-size: 14px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="root"> <div class="root">
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="知识竞答" left-arrow placeholder fixed <van-nav-bar title="知识竞答" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.go(-1)"></van-nav-bar>
<template v-if="!mLoading"> <template v-if="!mLoading">
<div v-if="finishAnswer"> <div v-if="finishAnswer">
{{finishAnswer}} {{finishAnswer}}
@@ -120,38 +117,28 @@ layout("/mobile/platform.html"){
</div> </div>
</van-empty> </van-empty>
</div> </div>
<div v-else class="page-survey" style="touch-action: manipulation;min-height: 100vh;"> <div v-else class="page-survey" style="touch-action: manipulation; min-height: 100vh">
<div class="survey-container"> <div class="survey-container">
<div class="survey-head"> <div class="survey-head">
<div class="title"> <div class="title">{{questionData.qtitle}}</div>
{{questionData.qtitle}} <div class="desc">{{titleMsg}}</div>
</div>
<div class="desc">
{{titleMsg}}
</div>
</div> </div>
<div class="question-list"> <div class="question-list">
<section v-for="(issue,issueIdx) in issueList" :key="issue.iid" class="question" <section v-for="(issue,issueIdx) in issueList" :key="issue.iid" class="question" :id="'issue'+issue.iid">
:id="'issue'+issue.iid">
<div class="question-head"> <div class="question-head">
<div class="question-tags"> <div class="question-tags">
<template v-if="issue.itx===1"> <template v-if="issue.itx===1">
<van-tag :type="issue.iisdx?'primary':'warning'">{{issue.iisdx?'单选':'多选'}} <van-tag :type="issue.iisdx?'primary':'warning'">{{issue.iisdx?'单选':'多选'}}</van-tag>
</van-tag>
</template> </template>
<!-- <van-tag v-if="issue.fraction" type="primary">{{issue.fraction}}分</van-tag>--> <!-- <van-tag v-if="issue.fraction" type="primary">{{issue.fraction}}分</van-tag>-->
</div> </div>
<h2 class="question-title"> <h2 class="question-title">
<span class="question-seq"> <span class="question-seq">
<b> <b>{{issueIdx+1}}</b>
{{issueIdx+1}}
</b>
</span> </span>
<div class="text" v-html="issue.iname"></div> <div class="text" v-html="issue.iname"></div>
</h2> </h2>
</div> </div>
<div class="question-body"> <div class="question-body">
<van-checkbox-group v-model="issue.userSelect" :ref="'checkboxGroup'+issue.iid"> <van-checkbox-group v-model="issue.userSelect" :ref="'checkboxGroup'+issue.iid">
@@ -164,13 +151,15 @@ layout("/mobile/platform.html"){
@click="toggle(issue,item.wid)" @click="toggle(issue,item.wid)"
> >
<template #icon> <template #icon>
<van-checkbox :name="item.wid" :ref="'checkboxes'+item.wid" <van-checkbox
:shape="issue.iisdx?'round':'square'"></van-checkbox> :name="item.wid"
:ref="'checkboxes'+item.wid"
:shape="issue.iisdx?'round':'square'"
></van-checkbox>
</template> </template>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</van-checkbox-group> </van-checkbox-group>
</div> </div>
</section> </section>
</div> </div>
@@ -178,18 +167,16 @@ layout("/mobile/platform.html"){
<van-button type="info" block @click="save()">保存</van-button> <van-button type="info" block @click="save()">保存</van-button>
<van-button type="info" block @click="submit()">提交</van-button> <van-button type="info" block @click="submit()">提交</van-button>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
</div> </div>
</div> </div>
<script> <script>
const BASE_URL = '/mobile/question/h5ctgu' const BASE_URL = "/mobile/question/h5ctgu"
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
data() { data() {
return { return {
questionData: { questionData: {
@@ -206,116 +193,115 @@ layout("/mobile/platform.html"){
return this.questionData.issues return this.questionData.issues
}, },
titleMsg() { titleMsg() {
const radios = this.issueList.filter(v => v.itx === 1 && v.iisdx) const radios = this.issueList.filter((v) => v.itx === 1 && v.iisdx)
const checkBoxes = this.issueList.filter(v => v.itx === 1 && !v.iisdx) const checkBoxes = this.issueList.filter((v) => v.itx === 1 && !v.iisdx)
const radioScore = radios && radios.length > 0 ? radios[0].fraction : 0 const radioScore = radios && radios.length > 0 ? radios[0].fraction : 0
const checkBoxesScore = checkBoxes && checkBoxes.length > 0 ? checkBoxes[0].fraction : 0 const checkBoxesScore = checkBoxes && checkBoxes.length > 0 ? checkBoxes[0].fraction : 0
const radioScoreSum = radios.map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b, 0) const radioScoreSum = radios.map((v) => (v.fraction ? v.fraction : 0)).reduce((a, b) => a + b, 0)
const checkBoxesScoreSum = checkBoxes.map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b, 0) const checkBoxesScoreSum = checkBoxes.map((v) => (v.fraction ? v.fraction : 0)).reduce((a, b) => a + b, 0)
const sumScore = radioScoreSum + checkBoxesScoreSum const sumScore = radioScoreSum + checkBoxesScoreSum
let radiosText = '' let radiosText = ""
let checkBoxesText = '' let checkBoxesText = ""
if (radios && radios.length > 0) { if (radios && radios.length > 0) {
radiosText = "单选题" + radios.length + "题,每题" + radioScore + "分,合计" + radioScoreSum + "分;" radiosText = "单选题" + radios.length + "题,每题" + radioScore + "分,合计" + radioScoreSum + "分;"
} }
if (checkBoxes && checkBoxes.length > 0) { if (checkBoxes && checkBoxes.length > 0) {
checkBoxesText = "多选题" + checkBoxes.length + "题,每题" + checkBoxesScore + "分,合计" + checkBoxesScoreSum + "分;总分" + sumScore + "分。" checkBoxesText =
"多选题" + checkBoxes.length + "题,每题" + checkBoxesScore + "分,合计" + checkBoxesScoreSum + "分;总分" + sumScore + "分。"
} }
return "说明:" + radiosText + checkBoxesText return "说明:" + radiosText + checkBoxesText
}, },
fullScore() { fullScore() {
return this.issueList.map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b) return this.issueList.map((v) => (v.fraction ? v.fraction : 0)).reduce((a, b) => a + b)
}, },
radioNum() { radioNum() {
return this.issueList.filter(v => v.idx === 1 && v.iisdx).map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b) return this.issueList
.filter((v) => v.idx === 1 && v.iisdx)
.map((v) => (v.fraction ? v.fraction : 0))
.reduce((a, b) => a + b)
}, },
checkBoxNum() { checkBoxNum() {}
}
}, },
methods: { methods: {
async getQuestionData() { async getQuestionData() {
const resp = await $.get(BASE_URL + '/questionInfo/' + this.id) const resp = await $.get(BASE_URL + "/questionInfo/" + this.id)
this.questionData = resp.data this.questionData = resp.data
this.questionData.issues.forEach(i => { this.questionData.issues.forEach((i) => {
// i.userSelect = null // i.userSelect = null
}) })
}, },
toggle(issue, worId) { toggle(issue, worId) {
//单选 //单选
if (issue.iisdx) { if (issue.iisdx) {
vue.$refs['checkboxGroup' + issue.iid][0].toggleAll(false) vue.$refs["checkboxGroup" + issue.iid][0].toggleAll(false)
} else { } else {
} }
console.log(issue.userSelect) console.log(issue.userSelect)
this.$refs['checkboxes' + worId][0].toggle() this.$refs["checkboxes" + worId][0].toggle()
setTimeout(() => { setTimeout(() => {
console.log(issue.userSelect) console.log(issue.userSelect)
}) })
}, },
save() { save() {
this.$modal.confirm('保存后下次可继续做答,您确定要保存吗?').then(async () => { this.$modal.confirm("保存后下次可继续做答,您确定要保存吗?").then(async () => {
const replies = this.questionData.issues.map(v => { const replies = this.questionData.issues.map((v) => {
return { return {
qid: v.iid, qid: v.iid,
issueId: v.iid, issueId: v.iid,
userSelect: v.userSelect, userSelect: v.userSelect
} }
}) })
const {code} = await $.post(BASE_URL + '/saveAnswer', { const { code } = await $.post(BASE_URL + "/saveAnswer", {
replies: JSON.stringify(replies), replies: JSON.stringify(replies),
questionId: this.questionData.qid, questionId: this.questionData.qid,
isSave: true isSave: true
}) })
this.$modal.closeLoading() this.$modal.closeLoading()
if (code === 0) { if (code === 0) {
this.$modal.msg('保存成功') this.$modal.msg("保存成功")
} else { } else {
this.$modal.msg('保存失败') this.$modal.msg("保存失败")
} }
}) })
}, },
submit() { submit() {
const iids = this.questionData.issues.filter(v => !v.userSelect).map(v => v.iid) const iids = this.questionData.issues.filter((v) => !v.userSelect).map((v) => v.iid)
if (iids.length > 0) { if (iids.length > 0) {
vant.Toast('您还有' + iids.length + '题未作答,请答完后再提交!') vant.Toast("您还有" + iids.length + "题未作答,请答完后再提交!")
document.getElementById('issue' + iids[0]).scrollIntoView({behavior: 'smooth', block: 'center','inline':'start'}); document.getElementById("issue" + iids[0]).scrollIntoView({ behavior: "smooth", block: "center", inline: "start" })
return return
} }
const msg = '一旦提交不可修改,您确定要提交吗?' const msg = "一旦提交不可修改,您确定要提交吗?"
this.$modal.confirm(msg).then(async () => { this.$modal.confirm(msg).then(async () => {
const replies = this.questionData.issues.map(v => { const replies = this.questionData.issues.map((v) => {
return { return {
qid: v.iid, qid: v.iid,
issueId: v.iid, issueId: v.iid,
userSelect: v.userSelect, userSelect: v.userSelect
} }
}) })
const {code} = await $.post(BASE_URL + '/saveAnswer', { const { code } = await $.post(BASE_URL + "/saveAnswer", {
replies: JSON.stringify(replies), replies: JSON.stringify(replies),
questionId: this.questionData.qid, questionId: this.questionData.qid,
isSave: false isSave: false
}) })
this.$modal.closeLoading() this.$modal.closeLoading()
if (code === 0) { if (code === 0) {
this.$modal.msg('提交成功') this.$modal.msg("提交成功")
await this.checkUserFinishAnswer() await this.checkUserFinishAnswer()
if (this.finishAnswer) { if (this.finishAnswer) {
//查看分数 //查看分数
@@ -326,18 +312,17 @@ layout("/mobile/platform.html"){
}, },
//获取回答信息 //获取回答信息
async getReply() { async getReply() {
const resp = await $.get(BASE_URL + '/answerInfo/' + this.id) const resp = await $.get(BASE_URL + "/answerInfo/" + this.id)
this.replyInfo = resp.data this.replyInfo = resp.data
}, },
//用户是否全部答完提交 //用户是否全部答完提交
async checkUserFinishAnswer() { async checkUserFinishAnswer() {
this.mLoading = true this.mLoading = true
const resp = await $.get(BASE_URL + '/checkUserFinishAnswer', {questionId: this.id}) const resp = await $.get(BASE_URL + "/checkUserFinishAnswer", { questionId: this.id })
setTimeout(async () => { setTimeout(async () => {
this.mLoading = false this.mLoading = false
this.finishAnswer = resp.data this.finishAnswer = resp.data
if (resp.data) { if (resp.data) {
} else { } else {
await this.getReply() await this.getReply()
await this.assignmentAnswer() await this.assignmentAnswer()
@@ -347,9 +332,9 @@ layout("/mobile/platform.html"){
//答案赋值 //答案赋值
assignmentAnswer() { assignmentAnswer() {
this.questionData.issues.forEach(issue => { this.questionData.issues.forEach((issue) => {
const rwids = this.replyInfo.filter(v => v.issueId === issue.iid).map(v => v.rwid) const rwids = this.replyInfo.filter((v) => v.issueId === issue.iid).map((v) => v.rwid)
rwids.forEach(rwid => { rwids.forEach((rwid) => {
this.toggle(issue, rwid) this.toggle(issue, rwid)
}) })
}) })
@@ -358,21 +343,20 @@ layout("/mobile/platform.html"){
answerAgain() { answerAgain() {
this.finishAnswer = false this.finishAnswer = false
setTimeout(() => { setTimeout(() => {
this.questionData.issues.forEach(issue => { this.questionData.issues.forEach((issue) => {
issue.wors.forEach(wor => { issue.wors.forEach((wor) => {
this.$refs['checkboxes' + wor.wid][0].toggle(false) this.$refs["checkboxes" + wor.wid][0].toggle(false)
}) })
}) })
}, 0) }, 0)
}, },
viewScore() { viewScore() {
window.location.href = BASE_URL + '/score?id=' + this.id window.location.href = BASE_URL + "/score?id=" + this.id
}, },
viewAnswerSheet() { viewAnswerSheet() {
window.location.href = BASE_URL + '/answerSheet?id=' + this.id window.location.href = BASE_URL + "/answerSheet?id=" + this.id
} }
}, },
async created() { async created() {
this.id = GetQueryString("id") this.id = GetQueryString("id")
@@ -383,17 +367,15 @@ layout("/mobile/platform.html"){
} }
}) })
window.addEventListener('pageshow', async e => { window.addEventListener("pageshow", async (e) => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) { if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.id = GetQueryString("id") vue.id = GetQueryString("id")
await vue.getQuestionData() await vue.getQuestionData()
await vue.checkUserFinishAnswer() await vue.checkUserFinishAnswer()
} }
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -54,7 +54,7 @@ layout("/mobile/platform.html"){
} }
.middle-subject-topic { .middle-subject-topic {
background-color: #FFFFFF; background-color: #ffffff;
margin-bottom: 1rem; margin-bottom: 1rem;
padding: 10px; padding: 10px;
border-radius: 10px; border-radius: 10px;
@@ -94,11 +94,10 @@ layout("/mobile/platform.html"){
line-height: 40px; line-height: 40px;
outline: none; outline: none;
padding: 0 15px; padding: 0 15px;
transition: border-color .2s cubic-bezier(.645, .045, .355, 1); transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%; width: 100%;
} }
.middle-subject-topic-submit .u-btn { .middle-subject-topic-submit .u-btn {
width: 60%; width: 60%;
} }
@@ -109,7 +108,7 @@ layout("/mobile/platform.html"){
right: 0; right: 0;
height: 40px; height: 40px;
z-index: 999; z-index: 999;
background-color: #FFF; background-color: #fff;
box-shadow: 0 0 20px rgb(230, 230, 230); box-shadow: 0 0 20px rgb(230, 230, 230);
border-radius: 20px 0 0 20px; border-radius: 20px 0 0 20px;
} }
@@ -119,7 +118,7 @@ layout("/mobile/platform.html"){
width: 40px; width: 40px;
box-shadow: 0 0 10px #1678ff; box-shadow: 0 0 10px #1678ff;
border-radius: 20px 0 0 20px; border-radius: 20px 0 0 20px;
background-color: #FFF; background-color: #fff;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@@ -133,7 +132,7 @@ layout("/mobile/platform.html"){
align-items: center; align-items: center;
box-shadow: 0 0 10px #1678ff; box-shadow: 0 0 10px #1678ff;
border-radius: 20px 0 0 20px; border-radius: 20px 0 0 20px;
background-color: #FFF; background-color: #fff;
} }
.middle-subject-info-footer { .middle-subject-info-footer {
@@ -142,7 +141,7 @@ layout("/mobile/platform.html"){
left: 0; left: 0;
right: 0; right: 0;
max-height: 64px; max-height: 64px;
background-color: #FFF; background-color: #fff;
box-shadow: 0 0 20px rgb(230, 230, 230); box-shadow: 0 0 20px rgb(230, 230, 230);
z-index: 999; z-index: 999;
padding: 10px 20px; padding: 10px 20px;
@@ -186,13 +185,11 @@ layout("/mobile/platform.html"){
.wsmPopup { .wsmPopup {
padding: 10px; padding: 10px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="middle-subject"> <div class="middle-subject">
<van-nav-bar title="在线调查" left-arrow <van-nav-bar title="在线调查" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<div class="middle-subject-info"> <div class="middle-subject-info">
<div class="middle-subject-info-scroll"> <div class="middle-subject-info-scroll">
@@ -213,14 +210,16 @@ layout("/mobile/platform.html"){
<span>多选</span> <span>多选</span>
</div> </div>
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<span v-if="issue.iisbd" style="color: red;">*</span> <span v-if="issue.iisbd" style="color: red">*</span>
<span class="middle-subject-topic-title"> <span class="middle-subject-topic-title">
{{ issueIndex + 1 }}. {{ issueIndex + 1 }}. {{ removeHTMLTag(issue.iname) }}
{{ removeHTMLTag(issue.iname) }}
<span v-if="issue.iminselect">(最少选择:{{issue.iminselect}})</span> <span v-if="issue.iminselect">(最少选择:{{issue.iminselect}})</span>
<span v-if="issue.imaxselect">(最多选择:{{issue.imaxselect}})</span> <span v-if="issue.imaxselect">(最多选择:{{issue.imaxselect}})</span>
<div v-if="issue.its" class="middle-subject-topic-desc" <div
style="margin-left: 17px;font-size: 12px;font-weight: 500;"> v-if="issue.its"
class="middle-subject-topic-desc"
style="margin-left: 17px; font-size: 12px; font-weight: 500"
>
{{ issue.its }} {{ issue.its }}
</div> </div>
</span> </span>
@@ -231,16 +230,15 @@ layout("/mobile/platform.html"){
<!-- 单选题 --> <!-- 单选题 -->
<van-radio-group v-if="issue.iisdx" v-model="issue.rwid" :disabled="replyFinish"> <van-radio-group v-if="issue.iisdx" v-model="issue.rwid" :disabled="replyFinish">
<div v-for="(wor,worIndex) in issue.wors" :key="wor.wid"> <div v-for="(wor,worIndex) in issue.wors" :key="wor.wid">
<van-radio :ref="wor.wid" :name="wor.wid"> <van-radio :ref="wor.wid" :name="wor.wid">{{ letterList[worIndex] }}.&ensp;{{ wor.wtxt }}</van-radio>
{{ letterList[worIndex] }}.&ensp;{{ wor.wtxt }}
</van-radio>
<div class="middle-subject-topic-desc"> <div class="middle-subject-topic-desc">
<van-row gutter="16"> <van-row gutter="16">
<van-col span="8" v-if="wor.wimg"> <van-col span="8" v-if="wor.wimg">
<image style="height: 80px;width: 80px" <image
style="height: 80px; width: 80px"
:src="'/file_server/fileStreamPreview?id='+wor.wimg" :src="'/file_server/fileStreamPreview?id='+wor.wimg"
mode="aspectFit"> mode="aspectFit"
</image> ></image>
</van-col> </van-col>
<van-col span="16" v-if="wor.wsm"> <van-col span="16" v-if="wor.wsm">
<div class="wsm" v-html="wor.wsm" @click="openWsm(wor.wsm)"></div> <div class="wsm" v-html="wor.wsm" @click="openWsm(wor.wsm)"></div>
@@ -251,9 +249,12 @@ layout("/mobile/platform.html"){
</van-radio-group> </van-radio-group>
<!-- 多选题 --> <!-- 多选题 -->
<van-checkbox-group v-else-if="!issue.iisdx" v-model="issue.rwid" <van-checkbox-group
v-else-if="!issue.iisdx"
v-model="issue.rwid"
:disabled="replyFinish" :disabled="replyFinish"
:max="issue.imaxselect ? issue.imaxselect:0"> :max="issue.imaxselect ? issue.imaxselect:0"
>
<div v-for="(wor,worIndex) in issue.wors" :key="worIndex"> <div v-for="(wor,worIndex) in issue.wors" :key="worIndex">
<van-checkbox :ref="wor.wid" :name="wor.wid" shape="square"> <van-checkbox :ref="wor.wid" :name="wor.wid" shape="square">
{{ letterList[worIndex] }}.&ensp;{{ wor.wtxt }} {{ letterList[worIndex] }}.&ensp;{{ wor.wtxt }}
@@ -261,10 +262,11 @@ layout("/mobile/platform.html"){
<div class="middle-subject-topic-desc"> <div class="middle-subject-topic-desc">
<van-row gutter="16"> <van-row gutter="16">
<van-col span="8" v-if="wor.wimg"> <van-col span="8" v-if="wor.wimg">
<image style="height: 80px;width: 80px" <image
style="height: 80px; width: 80px"
:src="'/file_server/fileStreamPreview?id='+wor.wimg" :src="'/file_server/fileStreamPreview?id='+wor.wimg"
mode="aspectFit"> mode="aspectFit"
</image> ></image>
</van-col> </van-col>
<van-col span="16" v-if="wor.wsm"> <van-col span="16" v-if="wor.wsm">
<div class="wsm" v-html=" wor.wsm" @click="openWsm(wor.wsm)"></div> <div class="wsm" v-html=" wor.wsm" @click="openWsm(wor.wsm)"></div>
@@ -277,11 +279,17 @@ layout("/mobile/platform.html"){
<!-- 填空题 --> <!-- 填空题 -->
<template v-if="issue.itx===2"> <template v-if="issue.itx===2">
<van-field v-model="issue.rval" type="text" border <van-field
v-model="issue.rval"
type="text"
border
class="itx_field" class="itx_field"
cursor-spacing="100" cursor-spacing="100"
:show-confirmbar="false" :show-confirmbar="false"
:disabled="replyFinish" :auto-height="true" maxlength="2000"></van-field> :disabled="replyFinish"
:auto-height="true"
maxlength="2000"
></van-field>
</template> </template>
</div> </div>
</div> </div>
@@ -290,13 +298,8 @@ layout("/mobile/platform.html"){
<div class="middle-subject-info-footer"> <div class="middle-subject-info-footer">
<div class="middle-subject-info-footer-save"> <div class="middle-subject-info-footer-save">
<van-button size="medium" type="primary" @click="saveAnswer" <van-button size="medium" type="primary" @click="saveAnswer" :disabled="replyFinish">保存</van-button>
:disabled="replyFinish">保存 <van-button size="medium" type="info" :disabled="replyFinish" @click="submitAnswer">提交</van-button>
</van-button>
<van-button size="medium" type="info" :disabled="replyFinish"
@click="submitAnswer">
提交
</van-button>
</div> </div>
</div> </div>
</div> </div>
@@ -309,7 +312,7 @@ layout("/mobile/platform.html"){
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -324,12 +327,12 @@ layout("/mobile/platform.html"){
computed: { computed: {
letterList() { letterList() {
const alphabet = Array.from(new Array(26), (ele, index) => { const alphabet = Array.from(new Array(26), (ele, index) => {
return String.fromCharCode(65 + index); return String.fromCharCode(65 + index)
}) })
return alphabet return alphabet
}, },
replyFinish() { replyFinish() {
return this.replyInfo.some(v => !v.save) return this.replyInfo.some((v) => !v.save)
} }
}, },
methods: { methods: {
@@ -339,75 +342,73 @@ layout("/mobile/platform.html"){
}, },
async getQuestionData() { async getQuestionData() {
const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id) const resp = await $.get("/mobile/question/h5/questionInfo/" + this.id)
this.questionData = resp.data this.questionData = resp.data
this.issueList = this.questionData && this.questionData.issues this.issueList = this.questionData && this.questionData.issues
}, },
saveAnswer() { saveAnswer() {
const formData = this.formatFormData() const formData = this.formatFormData()
formData.forEach(v => v.save = true) formData.forEach((v) => (v.save = true))
this.$modal.loading('保存中') this.$modal.loading("保存中")
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => { $.post("/mobile/question/h5/saveAnswer", { repliesArray: JSON.stringify(formData) }).then((res) => {
this.$modal.closeLoading() this.$modal.closeLoading()
if (res.code === 0) { if (res.code === 0) {
this.$modal.msg('保存成功') this.$modal.msg("保存成功")
this.getReply() this.getReply()
} else { } else {
this.$modal.msg('保存失败') this.$modal.msg("保存失败")
} }
}) })
}, },
submitAnswer() { submitAnswer() {
const formData = this.formatFormData() const formData = this.formatFormData()
formData.forEach(v => v.save = false) formData.forEach((v) => (v.save = false))
this.$modal.confirm('您确定要提交吗?提交后不能修改!').then(() => { this.$modal.confirm("您确定要提交吗?提交后不能修改!").then(() => {
this.$modal.loading('提交中') this.$modal.loading("提交中")
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => { $.post("/mobile/question/h5/saveAnswer", { repliesArray: JSON.stringify(formData) }).then((res) => {
this.$modal.closeLoading() this.$modal.closeLoading()
if (res.code === 0) { if (res.code === 0) {
this.$modal.msg('提交成功') this.$modal.msg("提交成功")
this.getReply() this.getReply()
} else { } else {
this.$modal.msg('提交失败') this.$modal.msg("提交失败")
} }
}) })
}) })
}, },
validAnswer() { validAnswer() {},
},
//格式化提交数据 //格式化提交数据
formatFormData() { formatFormData() {
const formData = [] const formData = []
this.issueList.forEach(v => { this.issueList.forEach((v) => {
if (v.itx === 1 && v.iisdx) { if (v.itx === 1 && v.iisdx) {
//单选 //单选
if (v.rwid) { if (v.rwid) {
formData.push({ formData.push({
"rwid": v.rwid, rwid: v.rwid,
"qid": this.questionData.qid, qid: this.questionData.qid,
"issueId": v.iid issueId: v.iid
}) })
} }
} else if (v.itx === 1 && !v.iisdx) { } else if (v.itx === 1 && !v.iisdx) {
//多选 //多选
if (v.rwid) { if (v.rwid) {
v.rwid.forEach(r => { v.rwid.forEach((r) => {
formData.push({ formData.push({
"rwid": r, rwid: r,
"qid": this.questionData.qid, qid: this.questionData.qid,
"issueId": v.iid issueId: v.iid
}) })
}) })
} }
} else if (v.itx === 2) { } else if (v.itx === 2) {
if (v.rval) { if (v.rval) {
formData.push({ formData.push({
"rval": v.rval, rval: v.rval,
"qid": this.questionData.qid, qid: this.questionData.qid,
"issueId": v.iid issueId: v.iid
}) })
} }
} }
@@ -416,36 +417,36 @@ layout("/mobile/platform.html"){
}, },
//获取回答信息并赋值 //获取回答信息并赋值
async getReply() { async getReply() {
const resp = await $.get('/mobile/question/h5/answerInfo/' + this.id) const resp = await $.get("/mobile/question/h5/answerInfo/" + this.id)
this.replyInfo = resp.data this.replyInfo = resp.data
this.issueList.forEach((issue, issueIndex) => { this.issueList.forEach((issue, issueIndex) => {
if (issue.itx === 1 && issue.iisdx) { if (issue.itx === 1 && issue.iisdx) {
//单选 //单选
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid) const rw = this.replyInfo.find((answer) => answer.issueId === issue.iid)
this.$set(this.issueList[issueIndex], 'rwid', rw ? rw.rwid : null) this.$set(this.issueList[issueIndex], "rwid", rw ? rw.rwid : null)
} else if (issue.itx === 1 && !issue.iisdx) { } else if (issue.itx === 1 && !issue.iisdx) {
//多选 //多选
const rws = this.replyInfo.filter(answer => answer.issueId === issue.iid).map(v => v.rwid) const rws = this.replyInfo.filter((answer) => answer.issueId === issue.iid).map((v) => v.rwid)
this.$set(this.issueList[issueIndex], 'rwid', rws ? rws : []) this.$set(this.issueList[issueIndex], "rwid", rws ? rws : [])
} else if (issue.itx === 2) { } else if (issue.itx === 2) {
//填空题 //填空题
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid) const rw = this.replyInfo.find((answer) => answer.issueId === issue.iid)
this.$set(this.issueList[issueIndex], 'rval', rw ? rw.rval : null) this.$set(this.issueList[issueIndex], "rval", rw ? rw.rval : null)
} }
}) })
}, },
defaultChecked() { defaultChecked() {
const itx = this.issueList[0]['itx'] const itx = this.issueList[0]["itx"]
const iisdx = this.issueList[0]['iisdx'] const iisdx = this.issueList[0]["iisdx"]
//判断用户是否选过 并且是选择题才可以 //判断用户是否选过 并且是选择题才可以
if (this.replyInfo.length === 0 && itx === 1) { if (this.replyInfo.length === 0 && itx === 1) {
if (iisdx) { if (iisdx) {
const defaultOption = this.issueList[0]['wors'].find(v => v.wismr === true) const defaultOption = this.issueList[0]["wors"].find((v) => v.wismr === true)
this.$set(this.issueList[0], 'rwid', defaultOption ? defaultOption.rwid : null) this.$set(this.issueList[0], "rwid", defaultOption ? defaultOption.rwid : null)
} else { } else {
const defaultOptionIds = this.issueList[0]['wors'].filter(v => v.wismr === true).map(v => v.wid) const defaultOptionIds = this.issueList[0]["wors"].filter((v) => v.wismr === true).map((v) => v.wid)
this.$set(this.issueList[0], 'rwid', defaultOptionIds ? defaultOptionIds : []) this.$set(this.issueList[0], "rwid", defaultOptionIds ? defaultOptionIds : [])
} }
} }
} }
@@ -455,7 +456,7 @@ layout("/mobile/platform.html"){
await this.getQuestionData() await this.getQuestionData()
await this.getReply() await this.getReply()
// await this.defaultChecked() // await this.defaultChecked()
}, }
}) })
</script> </script>
@@ -8,7 +8,7 @@ layout("/mobile/platform.html"){
.cell-card { .cell-card {
padding: 20px; padding: 20px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
width: 90%; width: 90%;
margin: 20px auto; margin: 20px auto;
border-radius: 20px; border-radius: 20px;
@@ -19,34 +19,25 @@ layout("/mobile/platform.html"){
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="问卷调查" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="问卷调查" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<div> <div>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh"> <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list v-model="loading" <van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<van-cell v-for="item in tableData" class="cell-card" @click="openView(item.qid)"> <van-cell v-for="item in tableData" class="cell-card" @click="openView(item.qid)">
<div class="text-overflow" style="font-weight: bold">{{item.qtitle}}</div> <div class="text-overflow" style="font-weight: bold">{{item.qtitle}}</div>
<div style="font-size: 12px" v-html="item.qsm"></div> <div style="font-size: 12px" v-html="item.qsm"></div>
</van-cell> </van-cell>
</van-list> </van-list>
</van-pull-refresh> </van-pull-refresh>
<van-empty <van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
</div> </div>
<script> <script>
new Vue({ new Vue({
el: '#app', el: "#app",
data() { data() {
return { return {
list: [], list: [],
@@ -59,8 +50,8 @@ layout("/mobile/platform.html"){
totalCount: 0 totalCount: 0
}, },
tableData: [], tableData: [],
appid: 'wx9fd2b07ea126f9f6', appid: "wx9fd2b07ea126f9f6",
redirect_uri: location.protocol + "//" + location.host, redirect_uri: location.protocol + "//" + location.host
} }
}, },
methods: { methods: {
@@ -75,11 +66,10 @@ layout("/mobile/platform.html"){
setTimeout(() => { setTimeout(() => {
this.refreshing = false this.refreshing = false
}, 1000) }, 1000)
}, },
async onLoad() { async onLoad() {
this.loading = true this.loading = true
$.post('/mobile/question/list/pageData', this.pageForm).then(res => { $.post("/mobile/question/list/pageData", this.pageForm).then((res) => {
this.loading = false this.loading = false
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
@@ -92,12 +82,10 @@ layout("/mobile/platform.html"){
}) })
}, },
openView(id) { openView(id) {
window.location.href = this.redirect_uri + '/platform/zgfw/mobile/questionnaire?qid=' + id window.location.href = this.redirect_uri + "/platform/zgfw/mobile/questionnaire?qid=" + id
} }
}, },
created() { created() {}
}
}) })
</script> </script>
<!--# <!--#
@@ -44,7 +44,6 @@ layout("/mobile/platform.html"){
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
position: relative; position: relative;
} }
.quizzes-item-info { .quizzes-item-info {
@@ -93,7 +92,6 @@ layout("/mobile/platform.html"){
} }
.winPopup .van-popup__close-icon { .winPopup .van-popup__close-icon {
} }
.iconDiv { .iconDiv {
@@ -112,14 +110,12 @@ layout("/mobile/platform.html"){
top: 16px; top: 16px;
left: 5px; left: 5px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="container"> <div class="container">
<van-sticky> <van-sticky>
<van-nav-bar title="列表" left-arrow <van-nav-bar title="列表" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
</van-sticky> </van-sticky>
<van-tabs v-model="queryForm.status" @change="doSearch"> <van-tabs v-model="queryForm.status" @change="doSearch">
@@ -139,17 +135,20 @@ layout("/mobile/platform.html"){
<div class="quizzes-item-info-title">{{ item.qtitle }}</div> <div class="quizzes-item-info-title">{{ item.qtitle }}</div>
<div class="quizzes-item-info-right"> <div class="quizzes-item-info-right">
<span class="quizzes-item-info-tip">创建时间:</span> <span class="quizzes-item-info-tip">创建时间:</span>
<span class="quizzes-item-info-text"> <span class="quizzes-item-info-text">{{ moment(item.createTime).format('YYYY年MM月DD日') }}</span>
{{ moment(item.createTime).format('YYYY年MM月DD日') }}
</span>
</div> </div>
<div class="quizzes-item-info-right" v-if="item.qlx!==4"> <div class="quizzes-item-info-right" v-if="item.qlx!==4">
<span class="quizzes-item-info-tip">题目数量:</span> <span class="quizzes-item-info-tip">题目数量:</span>
<span class="quizzes-item-info-text"> <span class="quizzes-item-info-text">{{item.ctMode === 1 ? item.topicTotal : item.ctNum }}</span>
{{item.ctMode === 1 ? item.topicTotal : item.ctNum }}
</span>
<span class="quizzes-item-info-text" style="position: absolute; right: 0"> <span class="quizzes-item-info-text" style="position: absolute; right: 0">
<van-tag @click.stop="showWinInfo(item)" type="primary" class="win_tag" v-if="item.qlx===2 && item.isRaffle && moment(item.startTime).diff(moment(new Date().getTime()),'days') < 0">获奖信息</van-tag> <van-tag
@click.stop="showWinInfo(item)"
type="primary"
class="win_tag"
v-if="item.qlx===2 && item.isRaffle && moment(item.startTime).diff(moment(new Date().getTime()),'days') < 0"
>
获奖信息
</van-tag>
<!-- v-if="moment(item.startTime).diff(moment(new Date().getTime()),'days') < 0"--> <!-- v-if="moment(item.startTime).diff(moment(new Date().getTime()),'days') < 0"-->
</span> </span>
</div> </div>
@@ -159,18 +158,19 @@ layout("/mobile/platform.html"){
</div> </div>
</div> </div>
<van-empty v-if="finished && !tableData.length" text="暂无问卷" icon-size="320" <van-empty v-if="finished && !tableData.length" text="暂无问卷" icon-size="320" src="/static/img/notData.svg"></van-empty>
src="/static/img/notData.svg">
</van-empty>
</div> </div>
<van-popup v-model="winPopupShow" class="winPopup" <van-popup v-model="winPopupShow" class="winPopup" :style="{ height: '100%' }">
:style="{ height: '100%' }"
>
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<img v-if="isWin" width="100%" height="60%" src="/assets/mobile/img/question/win.png" /> <img v-if="isWin" width="100%" height="60%" src="/assets/mobile/img/question/win.png" />
<!-- <img v-if="!isWin" width="100%" height="50%" src="/assets/mobile/img/question/noWin1.png"/>--> <!-- <img v-if="!isWin" width="100%" height="50%" src="/assets/mobile/img/question/noWin1.png"/>-->
<img v-if="!isWin" width="100%" height="50%" src="https://img1.baidu.com/it/u=3192248910,26901819&fm=253&fmt=auto&app=138&f=JPEG?w=403&h=500"/> <img
v-if="!isWin"
width="100%"
height="50%"
src="https://img1.baidu.com/it/u=3192248910,26901819&fm=253&fmt=auto&app=138&f=JPEG?w=403&h=500"
/>
</div> </div>
<div class="iconDiv"> <div class="iconDiv">
<div v-if="isWin" style="font-size: 14px;!important;">恭喜您中奖了,本次活动中奖机会只有一次喔!</div> <div v-if="isWin" style="font-size: 14px;!important;">恭喜您中奖了,本次活动中奖机会只有一次喔!</div>
@@ -182,16 +182,16 @@ layout("/mobile/platform.html"){
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
questionStatus: '1', questionStatus: "1",
scrollTop: 0, scrollTop: 0,
statusBarHeight: 0, statusBarHeight: 0,
pageLoading: false, pageLoading: false,
queryForm: { queryForm: {
status: '1' status: "1"
}, },
winPopupShow: false, winPopupShow: false,
isWin: false isWin: false
@@ -203,9 +203,9 @@ layout("/mobile/platform.html"){
}, },
methods: { methods: {
async showWinInfo({ qid }) { async showWinInfo({ qid }) {
const {data} = await $.post('/mobile/question/h5/winInfo', {questionId: qid}) const { data } = await $.post("/mobile/question/h5/winInfo", { questionId: qid })
const userId = "${@shiro.getPrincipalProperty('id')}" const userId = "${@shiro.getPrincipalProperty('id')}"
const user = data.find(o => o.id === userId) const user = data.find((o) => o.id === userId)
this.isWin = user !== undefined this.isWin = user !== undefined
this.winList = data this.winList = data
console.log(this.isWin) console.log(this.isWin)
@@ -221,7 +221,7 @@ layout("/mobile/platform.html"){
this.$modal.loading() this.$modal.loading()
this.tableLoading = true this.tableLoading = true
$.post('/mobile/question/h5/pageData', {...this.pageForm, ...this.queryForm}).then(res => { $.post("/mobile/question/h5/pageData", { ...this.pageForm, ...this.queryForm }).then((res) => {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length === this.pageForm.totalCount) { if (this.tableData.length === this.pageForm.totalCount) {
@@ -233,7 +233,6 @@ layout("/mobile/platform.html"){
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
// $.post('/activity/question/h5/pageData', this.pageForm, { // $.post('/activity/question/h5/pageData', this.pageForm, {
// params: this.queryForm // params: this.queryForm
// }).then(res => { // }).then(res => {
@@ -254,15 +253,15 @@ layout("/mobile/platform.html"){
}, },
tabChange(index) { tabChange(index) {
this.page.current = index; this.page.current = index
// this.refresh(); // this.refresh();
}, },
lower(e) { lower(e) {
if (!this.finished) this.loadData(); if (!this.finished) this.loadData()
}, },
async hasPermissionByIssue(groupId) { async hasPermissionByIssue(groupId) {
const resp = await this.$http.get('/platform/question/applets/list/hasPermission', { const resp = await this.$http.get("/platform/question/applets/list/hasPermission", {
params: { groupId: groupId } params: { groupId: groupId }
}) })
return resp return resp
@@ -271,39 +270,38 @@ layout("/mobile/platform.html"){
async openAnswer(item) { async openAnswer(item) {
const { qid, qlx, qflag, activityUserScopeId } = item const { qid, qlx, qflag, activityUserScopeId } = item
if (qflag !== 2) { if (qflag !== 2) {
this.$modal.msg('该问卷未发布') this.$modal.msg("该问卷未发布")
return return
} }
const now = new Date().getTime() const now = new Date().getTime()
if (now < item.startTime || now > item.endTime) { if (now < item.startTime || now > item.endTime) {
this.$modal.msg('不在开启时间内') this.$modal.msg("不在开启时间内")
return return
} }
if (activityUserScopeId) { if (activityUserScopeId) {
const resp = await $.get('/mobile/question/h5/checkPermission/' + activityUserScopeId) const resp = await $.get("/mobile/question/h5/checkPermission/" + activityUserScopeId)
if (!resp.data) { if (!resp.data) {
this.$modal.msg('您无权限参加') this.$modal.msg("您无权限参加")
return return
} }
} }
if (qlx === 1) { if (qlx === 1) {
//调查 //调查
location.href = '/mobile/question/h5/poll/index?id=' + qid location.href = "/mobile/question/h5/poll/index?id=" + qid
} else if (qlx === 2) { } else if (qlx === 2) {
//答题 //答题
location.href = '/mobile/question/h5/answer/index_ctgu?id=' + qid location.href = "/mobile/question/h5/answer/index_ctgu?id=" + qid
} else if (qlx === 3) { } else if (qlx === 3) {
//购物 //购物
location.href = '/mobile/question/h5/shop/index?id=' + qid location.href = "/mobile/question/h5/shop/index?id=" + qid
} else if (qlx === 4) { } else if (qlx === 4) {
//蛋糕卡 //蛋糕卡
location.href = '/mobile/question/h5/cake/index?id=' + qid location.href = "/mobile/question/h5/cake/index?id=" + qid
} }
// if (qlx === 4) { // if (qlx === 4) {
// if (item.startTime > new Date().getTime() || item.endTime < new Date().getTime()) { // if (item.startTime > new Date().getTime() || item.endTime < new Date().getTime()) {
// uni.showToast({ // uni.showToast({
@@ -338,7 +336,7 @@ layout("/mobile/platform.html"){
// }); // });
// } // }
} }
}, }
}) })
</script> </script>
@@ -54,7 +54,7 @@ layout("/mobile/platform.html"){
} }
.middle-subject-topic { .middle-subject-topic {
background-color: #FFFFFF; background-color: #ffffff;
margin-bottom: 1rem; margin-bottom: 1rem;
padding: 20px; padding: 20px;
border-radius: 10px; border-radius: 10px;
@@ -94,11 +94,10 @@ layout("/mobile/platform.html"){
line-height: 40px; line-height: 40px;
outline: none; outline: none;
padding: 0 15px; padding: 0 15px;
transition: border-color .2s cubic-bezier(.645, .045, .355, 1); transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%; width: 100%;
} }
.middle-subject-topic-submit .u-btn { .middle-subject-topic-submit .u-btn {
width: 60%; width: 60%;
} }
@@ -109,7 +108,7 @@ layout("/mobile/platform.html"){
right: 0; right: 0;
height: 40px; height: 40px;
z-index: 999; z-index: 999;
background-color: #FFF; background-color: #fff;
box-shadow: 0 0 20px rgb(230, 230, 230); box-shadow: 0 0 20px rgb(230, 230, 230);
border-radius: 20px 0 0 20px; border-radius: 20px 0 0 20px;
} }
@@ -119,7 +118,7 @@ layout("/mobile/platform.html"){
width: 40px; width: 40px;
box-shadow: 0 0 10px #1678ff; box-shadow: 0 0 10px #1678ff;
border-radius: 20px 0 0 20px; border-radius: 20px 0 0 20px;
background-color: #FFF; background-color: #fff;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@@ -133,7 +132,7 @@ layout("/mobile/platform.html"){
align-items: center; align-items: center;
box-shadow: 0 0 10px #1678ff; box-shadow: 0 0 10px #1678ff;
border-radius: 20px 0 0 20px; border-radius: 20px 0 0 20px;
background-color: #FFF; background-color: #fff;
} }
.middle-subject-info-footer { .middle-subject-info-footer {
@@ -142,7 +141,7 @@ layout("/mobile/platform.html"){
left: 0; left: 0;
right: 0; right: 0;
max-height: 64px; max-height: 64px;
background-color: #FFF; background-color: #fff;
box-shadow: 0 0 20px rgb(230, 230, 230); box-shadow: 0 0 20px rgb(230, 230, 230);
z-index: 999; z-index: 999;
padding: 10px 20px; padding: 10px 20px;
@@ -170,8 +169,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="middle-subject"> <div class="middle-subject">
<van-nav-bar title="在线调查" left-arrow <van-nav-bar title="在线调查" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<div class="middle-subject-info"> <div class="middle-subject-info">
<div class="middle-subject-info-scroll"> <div class="middle-subject-info-scroll">
@@ -192,16 +190,17 @@ layout("/mobile/platform.html"){
<span>多选</span> <span>多选</span>
</div> </div>
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<span v-if="issue.iisbd" style="color: red;">*</span> <span v-if="issue.iisbd" style="color: red">*</span>
<span class="middle-subject-topic-title"> <span class="middle-subject-topic-title">
{{ issueIndex + 1 }}. {{ issueIndex + 1 }}. {{ removeHTMLTag(issue.iname) }}
{{ removeHTMLTag(issue.iname) }}
<span v-if="issue.iminselect">(最少选择:{{issue.iminselect}})</span> <span v-if="issue.iminselect">(最少选择:{{issue.iminselect}})</span>
<span v-if="issue.imaxselect">(最多选择:{{issue.imaxselect}})</span> <span v-if="issue.imaxselect">(最多选择:{{issue.imaxselect}})</span>
<div v-if="issue.its" class="middle-subject-topic-desc" <div
v-if="issue.its"
class="middle-subject-topic-desc"
v-html="issue.its" v-html="issue.its"
style="margin-left: 17px;font-size: 12px;font-weight: 500;"> style="margin-left: 17px; font-size: 12px; font-weight: 500"
</div> ></div>
</span> </span>
</div> </div>
@@ -210,28 +209,25 @@ layout("/mobile/platform.html"){
<!-- 单选题 --> <!-- 单选题 -->
<van-radio-group v-if="issue.iisdx" v-model="issue.rwid" :disabled="replyFinish"> <van-radio-group v-if="issue.iisdx" v-model="issue.rwid" :disabled="replyFinish">
<div v-for="(wor,worIndex) in issue.wors" :key="wor.wid"> <div v-for="(wor,worIndex) in issue.wors" :key="wor.wid">
<van-radio :ref="wor.wid" :name="wor.wid"> <van-radio :ref="wor.wid" :name="wor.wid">{{ letterList[worIndex] }}.&ensp;{{ wor.wtxt }}</van-radio>
{{ letterList[worIndex] }}.&ensp;{{ wor.wtxt }}
</van-radio>
<div class="middle-subject-topic-desc"> <div class="middle-subject-topic-desc">
<van-row gutter="16"> <van-row gutter="16">
<van-col span="8" v-if="wor.wimg"> <van-col span="8" v-if="wor.wimg">
<image style="height: 80px;width: 80px" :src="wor.wimg" <image style="height: 80px; width: 80px" :src="wor.wimg" mode="aspectFit"></image>
mode="aspectFit">
</image>
</van-col>
<van-col span="16" v-if="wor.wsm">
{{ wor.wsm }}
</van-col> </van-col>
<van-col span="16" v-if="wor.wsm">{{ wor.wsm }}</van-col>
</van-row> </van-row>
</div> </div>
</div> </div>
</van-radio-group> </van-radio-group>
<!-- 多选题 --> <!-- 多选题 -->
<van-checkbox-group v-else-if="!issue.iisdx" v-model="issue.rwid" <van-checkbox-group
v-else-if="!issue.iisdx"
v-model="issue.rwid"
:disabled="replyFinish" :disabled="replyFinish"
:max="issue.imaxselect ? issue.imaxselect:0"> :max="issue.imaxselect ? issue.imaxselect:0"
>
<div v-for="(wor,worIndex) in issue.wors" :key="worIndex"> <div v-for="(wor,worIndex) in issue.wors" :key="worIndex">
<van-checkbox :ref="wor.wid" :name="wor.wid" shape="square"> <van-checkbox :ref="wor.wid" :name="wor.wid" shape="square">
{{ letterList[worIndex] }}.&ensp;{{ wor.wtxt }} {{ letterList[worIndex] }}.&ensp;{{ wor.wtxt }}
@@ -239,13 +235,9 @@ layout("/mobile/platform.html"){
<div class="middle-subject-topic-desc"> <div class="middle-subject-topic-desc">
<van-row gutter="16"> <van-row gutter="16">
<van-col span="8" v-if="wor.wimg"> <van-col span="8" v-if="wor.wimg">
<image style="height: 80px;width: 80px" :src="wor.wimg" <image style="height: 80px; width: 80px" :src="wor.wimg" mode="aspectFit"></image>
mode="aspectFit">
</image>
</van-col>
<van-col span="16" v-if="wor.wsm">
{{ wor.wsm }}
</van-col> </van-col>
<van-col span="16" v-if="wor.wsm">{{ wor.wsm }}</van-col>
</van-row> </van-row>
</div> </div>
</div> </div>
@@ -254,11 +246,17 @@ layout("/mobile/platform.html"){
<!-- 填空题 --> <!-- 填空题 -->
<template v-if="issue.itx===2"> <template v-if="issue.itx===2">
<van-field v-model="issue.rval" type="text" border <van-field
v-model="issue.rval"
type="text"
border
class="itx_field" class="itx_field"
cursor-spacing="100" cursor-spacing="100"
:show-confirmbar="false" :show-confirmbar="false"
:disabled="replyFinish" :auto-height="true" maxlength="2000"/> :disabled="replyFinish"
:auto-height="true"
maxlength="2000"
/>
</template> </template>
</div> </div>
</div> </div>
@@ -267,13 +265,8 @@ layout("/mobile/platform.html"){
<div class="middle-subject-info-footer"> <div class="middle-subject-info-footer">
<div class="middle-subject-info-footer-save"> <div class="middle-subject-info-footer-save">
<van-button size="medium" type="primary" @click="saveAnswer" <van-button size="medium" type="primary" @click="saveAnswer" :disabled="replyFinish">保存</van-button>
:disabled="replyFinish">保存 <van-button size="medium" type="info" :disabled="replyFinish" @click="submitAnswer">提交</van-button>
</van-button>
<van-button size="medium" type="info" :disabled="replyFinish"
@click="submitAnswer">
提交
</van-button>
</div> </div>
</div> </div>
</div> </div>
@@ -282,7 +275,7 @@ layout("/mobile/platform.html"){
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -295,87 +288,85 @@ layout("/mobile/platform.html"){
computed: { computed: {
letterList() { letterList() {
const alphabet = Array.from(new Array(26), (ele, index) => { const alphabet = Array.from(new Array(26), (ele, index) => {
return String.fromCharCode(65 + index); return String.fromCharCode(65 + index)
}) })
return alphabet return alphabet
}, },
replyFinish() { replyFinish() {
return this.replyInfo.some(v => !v.save) return this.replyInfo.some((v) => !v.save)
} }
}, },
methods: { methods: {
async getQuestionData() { async getQuestionData() {
const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id) const resp = await $.get("/mobile/question/h5/questionInfo/" + this.id)
this.questionData = resp.data this.questionData = resp.data
this.issueList = this.questionData && this.questionData.issues this.issueList = this.questionData && this.questionData.issues
}, },
saveAnswer() { saveAnswer() {
const formData = this.formatFormData() const formData = this.formatFormData()
formData.forEach(v => v.save = true) formData.forEach((v) => (v.save = true))
this.$modal.loading('保存中') this.$modal.loading("保存中")
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => { $.post("/mobile/question/h5/saveAnswer", { repliesArray: JSON.stringify(formData) }).then((res) => {
this.$modal.closeLoading() this.$modal.closeLoading()
if (res.code === 0) { if (res.code === 0) {
this.$modal.msg('保存成功') this.$modal.msg("保存成功")
this.getReply() this.getReply()
} else { } else {
this.$modal.msg('保存失败') this.$modal.msg("保存失败")
} }
}) })
}, },
submitAnswer() { submitAnswer() {
const v1 = this.issueList.some(v => v.itx === 1 && v.iisbd && v.rwid == null) const v1 = this.issueList.some((v) => v.itx === 1 && v.iisbd && v.rwid == null)
if (v1) { if (v1) {
this.$modal.msg('请选择后再提交') this.$modal.msg("请选择后再提交")
return return
} }
const v2 = this.issueList.some(v => v.itx === 2 && v.iisbd && (v.rval == null || v.rval === '')) const v2 = this.issueList.some((v) => v.itx === 2 && v.iisbd && (v.rval == null || v.rval === ""))
if (v2) { if (v2) {
this.$modal.msg('请填写后再提交') this.$modal.msg("请填写后再提交")
return return
} }
const formData = this.formatFormData() const formData = this.formatFormData()
formData.forEach(v => v.save = false) formData.forEach((v) => (v.save = false))
this.$modal.confirm('您确定要提交吗?提交后不能修改!').then(() => { this.$modal.confirm("您确定要提交吗?提交后不能修改!").then(() => {
this.$modal.loading('提交中') this.$modal.loading("提交中")
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => { $.post("/mobile/question/h5/saveAnswer", { repliesArray: JSON.stringify(formData) }).then((res) => {
this.$modal.closeLoading() this.$modal.closeLoading()
if (res.code === 0) { if (res.code === 0) {
this.$modal.msg('提交成功') this.$modal.msg("提交成功")
this.getReply() this.getReply()
} else { } else {
this.$modal.msg('提交失败') this.$modal.msg("提交失败")
} }
}) })
}) })
}, },
validAnswer() { validAnswer() {},
},
//格式化提交数据 //格式化提交数据
formatFormData() { formatFormData() {
const formData = [] const formData = []
this.issueList.forEach(v => { this.issueList.forEach((v) => {
if (v.itx === 1 && v.iisdx) { if (v.itx === 1 && v.iisdx) {
//单选 //单选
if (v.rwid) { if (v.rwid) {
formData.push({ formData.push({
"rwid": v.rwid, rwid: v.rwid,
"qid": this.questionData.qid, qid: this.questionData.qid,
"issueId": v.iid issueId: v.iid
}) })
} }
} else if (v.itx === 1 && !v.iisdx) { } else if (v.itx === 1 && !v.iisdx) {
//多选 //多选
if (v.rwid) { if (v.rwid) {
v.rwid.forEach(r => { v.rwid.forEach((r) => {
formData.push({ formData.push({
"rwid": r, rwid: r,
"qid": this.questionData.qid, qid: this.questionData.qid,
"issueId": v.iid issueId: v.iid
}) })
}) })
} }
@@ -383,10 +374,10 @@ layout("/mobile/platform.html"){
if (v.rval) { if (v.rval) {
debugger debugger
formData.push({ formData.push({
"rwid": v.wors[0].wid, rwid: v.wors[0].wid,
"rval": v.rval, rval: v.rval,
"qid": this.questionData.qid, qid: this.questionData.qid,
"issueId": v.iid issueId: v.iid
}) })
} }
} }
@@ -395,21 +386,21 @@ layout("/mobile/platform.html"){
}, },
//获取回答信息并赋值 //获取回答信息并赋值
async getReply() { async getReply() {
const resp = await $.get('/mobile/question/h5/answerInfo/' + this.id) const resp = await $.get("/mobile/question/h5/answerInfo/" + this.id)
this.replyInfo = resp.data this.replyInfo = resp.data
this.issueList.forEach((issue, issueIndex) => { this.issueList.forEach((issue, issueIndex) => {
if (issue.itx === 1 && issue.iisdx) { if (issue.itx === 1 && issue.iisdx) {
//单选 //单选
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid) const rw = this.replyInfo.find((answer) => answer.issueId === issue.iid)
this.$set(this.issueList[issueIndex], 'rwid', rw ? rw.rwid : null) this.$set(this.issueList[issueIndex], "rwid", rw ? rw.rwid : null)
} else if (issue.itx === 1 && !issue.iisdx) { } else if (issue.itx === 1 && !issue.iisdx) {
//多选 //多选
const rws = this.replyInfo.filter(answer => answer.issueId === issue.iid).map(v => v.rwid) const rws = this.replyInfo.filter((answer) => answer.issueId === issue.iid).map((v) => v.rwid)
this.$set(this.issueList[issueIndex], 'rwid', rws ? rws : []) this.$set(this.issueList[issueIndex], "rwid", rws ? rws : [])
} else if (issue.itx === 2) { } else if (issue.itx === 2) {
//填空题 //填空题
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid) const rw = this.replyInfo.find((answer) => answer.issueId === issue.iid)
this.$set(this.issueList[issueIndex], 'rval', rw ? rw.rval : null) this.$set(this.issueList[issueIndex], "rval", rw ? rw.rval : null)
} }
}) })
} }
@@ -418,7 +409,7 @@ layout("/mobile/platform.html"){
this.id = GetQueryString("id") this.id = GetQueryString("id")
await this.getQuestionData() await this.getQuestionData()
await this.getReply() await this.getReply()
}, }
}) })
</script> </script>
@@ -13,7 +13,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="我的登记" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="我的登记" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<div style="margin: 20px auto 0"> <div style="margin: 20px auto 0">
<van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad"> <van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
@@ -1,12 +1,10 @@
<!--# <!--#
layout("/mobile/platform.html"){ layout("/mobile/platform.html"){
#--> #-->
<style> <style></style>
</style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="登记信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="登记信息" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<div> <div>
<rxdj-mobile-info :dj_id="dj_id" title="登记信息"></rxdj-mobile-info> <rxdj-mobile-info :dj_id="dj_id" title="登记信息"></rxdj-mobile-info>
@@ -15,22 +13,18 @@ layout("/mobile/platform.html"){
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
dj_id: GetQueryString('dj_id'), dj_id: GetQueryString("dj_id")
} }
}, },
components: { components: {
'rxdj-mobile-info': httpVueLoader('/components/zgfw/rxdj/mobileRxdj.vue?v=' + new Date().getTime()), "rxdj-mobile-info": httpVueLoader("/components/zgfw/rxdj/mobileRxdj.vue?v=" + new Date().getTime())
}, },
methods: { methods: {},
async created() {}
},
async created() {
}
}) })
</script> </script>
<!--# <!--#
@@ -5,27 +5,18 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="登记列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="登记列表"
left-arrow
placeholder
fixed
@click-left="history.back()"
></van-nav-bar>
<div style="margin: 20px auto 0"> <div style="margin: 20px auto 0">
<van-list <van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="mLoading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="list-card" @click="openView(o)"> <div v-for="o in tableData" class="list-card" @click="openView(o)">
<van-cell-group inset> <van-cell-group inset>
<van-cell :border="false" title="年度">{{o.bmyear}}</van-cell> <van-cell :border="false" title="年度">{{o.bmyear}}</van-cell>
<van-cell title="登记类型" :border="false"> <van-cell title="登记类型" :border="false">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<span :style="{color:themeColor}" style="font-size: 16px" <span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">
class="van-ellipsis">{{o.bmlx=='1'?'幼升小':o.bmlx=='2'?'小学':'初升高'}}</span> {{o.bmlx=='1'?'幼升小':o.bmlx=='2'?'小学':'初升高'}}
</span>
</div> </div>
</van-cell> </van-cell>
@@ -34,12 +25,7 @@ layout("/mobile/platform.html"){
</van-cell-group> </van-cell-group>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
<div> <div>
@@ -48,12 +34,11 @@ layout("/mobile/platform.html"){
<van-tabbar-item icon="manager-o" replace url="/platform/zgfw/mobile/rxdj/apply">我的</van-tabbar-item> <van-tabbar-item icon="manager-o" replace url="/platform/zgfw/mobile/rxdj/apply">我的</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
</div> </div>
<script> <script>
let vue = new Vue({ let vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -63,7 +48,7 @@ layout("/mobile/platform.html"){
methods: { methods: {
async onLoad() { async onLoad() {
this.mLoading = true this.mLoading = true
$.post('/mobile/rxdj/apply/pageData', this.pageForm).then(res => { $.post("/mobile/rxdj/apply/pageData", this.pageForm).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -80,26 +65,25 @@ layout("/mobile/platform.html"){
const isExist = await getScopeUser(o.activityGroupId) const isExist = await getScopeUser(o.activityGroupId)
if (!isExist) { if (!isExist) {
vant.Dialog.alert({ vant.Dialog.alert({
title: '温馨提示', title: "温馨提示",
message: "您不在报名范围中", message: "您不在报名范围中",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
return return
} }
if (moment().format("YYYY-MM-DD") < bmkssj) { if (moment().format("YYYY-MM-DD") < bmkssj) {
vant.Toast('报名暂未开始!') vant.Toast("报名暂未开始!")
return return
} else if (moment().format("YYYY-MM-DD") > bmjssj) { } else if (moment().format("YYYY-MM-DD") > bmjssj) {
vant.Toast('报名已结束!') vant.Toast("报名已结束!")
return return
} }
window.location.href = '/platform/zgfw/mobile/rxdj/psms?client=mobile&dj_djlx=' + bmlx window.location.href = "/platform/zgfw/mobile/rxdj/psms?client=mobile&dj_djlx=" + bmlx
} }
}, },
async created() { async created() {}
}
}) })
window.addEventListener('pageshow', e => { window.addEventListener("pageshow", (e) => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) { if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.tableData = [] vue.tableData = []
vue.onLoad() vue.onLoad()
@@ -107,7 +91,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -5,7 +5,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="我的审核" left-arrow placeholder fixed @click-left="history.go(-1)"></van-nav-bar> <van-nav-bar title="我的审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="RGB(8,23,118)"> <van-dropdown-menu active-color="RGB(8,23,118)">
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item> <van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
@@ -3,21 +3,17 @@ layout("/mobile/platform.html"){
#--> #-->
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar @click-left="history.back()" title="校工会审核" fixed placeholder left-arrow></van-nav-bar> <van-nav-bar @click-left="pjaxReplace('/mobile/index')" title="校工会审核" fixed placeholder left-arrow></van-nav-bar>
<rxdj-mobile-info :dj_id="dj_id" title="校工会审核" :handle="handle"> <rxdj-mobile-info :dj_id="dj_id" title="校工会审核" :handle="handle">
<template #handle> <template #handle>
<div class="handle"> <div class="handle">
<van-form> <van-form>
<van-field <van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="username" label="审核人员"></van-field>
readonly
value="${@shiro.getPrincipalProperty('username')}"
name="username"
label="审核人员"
></van-field>
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field> <van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
<van-field v-model="formData.dj_xghshyj" <van-field
v-model="formData.dj_xghshyj"
required required
rows="1" rows="1"
autosize autosize
@@ -27,89 +23,75 @@ layout("/mobile/platform.html"){
></van-field> ></van-field>
</van-form> </van-form>
<div style="display: flex;justify-content: space-around;padding: 5px 0 20px 0;"> <div style="display: flex; justify-content: space-around; padding: 5px 0 20px 0">
<van-button type="danger" plain style="flex: 1; margin: 0 10px 0 10px" @click="doHandle(5215)">拒绝</van-button>
<van-button color="RGB(8,23,118)" plain style="flex: 1; margin: 0 10px 0 10px" @click="doHandle(5218)">退回</van-button>
<van-button type="danger" plain style="flex: 1;margin: 0 10px 0 10px" <van-button color="RGB(8,23,118)" style="flex: 1; margin: 0 10px 0 10px" @click="doHandle(5300)">通过</van-button>
@click="doHandle(5215)">拒绝
</van-button>
<van-button color="RGB(8,23,118)" plain style="flex: 1;margin: 0 10px 0 10px"
@click="doHandle(5218)">
退回
</van-button>
<van-button color="RGB(8,23,118)" style="flex: 1;margin: 0 10px 0 10px"
@click="doHandle(5300)">通过
</van-button>
</div> </div>
</div> </div>
</template> </template>
</rxdj-mobile-info> </rxdj-mobile-info>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
data() { data() {
return { return {
formData: {}, formData: {},
dj_id: GetQueryString('dj_id'), dj_id: GetQueryString("dj_id"),
handle: true, handle: true
} }
}, },
components: { components: {
'rxdj-mobile-info': httpVueLoader('/components/zgfw/rxdj/mobileRxdj.vue?v=' + new Date().getTime()), "rxdj-mobile-info": httpVueLoader("/components/zgfw/rxdj/mobileRxdj.vue?v=" + new Date().getTime())
}, },
methods: { methods: {
async doHandle(s) { async doHandle(s) {
this.formData.dj_sqzt = s this.formData.dj_sqzt = s
if (this.formData.dj_xghshyj == "") { if (this.formData.dj_xghshyj == "") {
vant.Toast('请填写审核意见'); vant.Toast("请填写审核意见")
return return
} }
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '标题', title: "标题",
message: '您确定要提交吗?', message: "您确定要提交吗?"
}).then(async () => { })
.then(async () => {
const loading = this.$toast({ const loading = this.$toast({
duration: 0, duration: 0,
message: '提交中...', message: "提交中...",
forbidClick: true, forbidClick: true,
loadingType: 'spinner', loadingType: "spinner",
type: 'loading', type: "loading",
overlay: true overlay: true
}); })
const res = await $.post('/platform/zgfw/rxdj/sh/doxghSh', this.formData) const res = await $.post("/platform/zgfw/rxdj/sh/doxghSh", this.formData)
if (res.code === 0) { if (res.code === 0) {
window.setTimeout(() => { window.setTimeout(() => {
loading.type = 'success' loading.type = "success"
loading.message = '提交成功' loading.message = "提交成功"
window.history.back() window.history.back()
}, 500) }, 500)
} }
})
}).catch(() => { .catch(() => {})
});
} }
}, },
async created() { async created() {
this.formData = { this.formData = {
dj_id: this.dj_id, dj_id: this.dj_id,
username: "${@shiro.getPrincipalProperty('username')}", username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'), auditTime: moment().format("YYYY-MM-DD"),
dj_xghshyj: '', dj_xghshyj: ""
} }
const { data } = await $.get("/platform/zgfw/mobile/rxdj/audit/GetRxdjDjSqzt", { dj_id: this.dj_id }) const { data } = await $.get("/platform/zgfw/mobile/rxdj/audit/GetRxdjDjSqzt", { dj_id: this.dj_id })
this.handle = data === 5200 this.handle = data === 5200
}, },
mounted() { mounted() {}
}
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -3,7 +3,7 @@ layout("/mobile/platform.html"){
#--> #-->
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="基层工会审核" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="基层工会审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<rxdj-mobile-info :dj_id="dj_id" title="基层工会审核" :handle="handle"> <rxdj-mobile-info :dj_id="dj_id" title="基层工会审核" :handle="handle">
<template #handle> <template #handle>
<div class="handle"> <div class="handle">
@@ -163,14 +163,7 @@ layout("/mobile/platform.html"){
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="申请账号审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" safe-area-inset-top></van-nav-bar>
title="申请账号审核"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
safe-area-inset-top
></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-search <van-search
@@ -179,48 +172,35 @@ layout("/mobile/platform.html"){
maxlength="10" maxlength="10"
@search="doSearch" @search="doSearch"
placeholder="请输入供应商名称、申请人进行查询" placeholder="请输入供应商名称、申请人进行查询"
> ></van-search>
</van-search>
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item :title="pageForm.time" ref="item"> <van-dropdown-item :title="pageForm.time" ref="item">
<van-cell center title="查询全部"> <van-cell center title="查询全部">
<template #right-icon> <template #right-icon>
<van-switch v-model="pageForm.timeSwitch" size="24" <van-switch v-model="pageForm.timeSwitch" size="24" active-color="#246fb4"></van-switch>
active-color="#246fb4"></van-switch>
</template> </template>
</van-cell> </van-cell>
<van-datetime-picker v-show="pageForm.timeSwitch === false" <van-datetime-picker
v-model="time" cancel-button-text=" " confirm-button-text=" " v-show="pageForm.timeSwitch === false"
v-model="time"
cancel-button-text=" "
confirm-button-text=" "
type="year-month" type="year-month"
title="选择年月" title="选择年月"
:formatter="timeFormatter" :formatter="timeFormatter"
></van-datetime-picker> ></van-datetime-picker>
<div style="padding: 5px 16px; margin-top: 6px"> <div style="padding: 5px 16px; margin-top: 6px">
<van-button type="danger" color="#246fb4" block round @click="onConfirm" <van-button type="danger" color="#246fb4" block round @click="onConfirm" style="height: 36px">确认</van-button>
style="height: 36px">
确认
</van-button>
</div> </div>
</van-dropdown-item> </van-dropdown-item>
<van-dropdown-item v-model="pageForm.auditState" :options="stateOption" <van-dropdown-item v-model="pageForm.auditState" :options="stateOption" @change="doSearch"></van-dropdown-item>
@change="doSearch">
</van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div style="margin-top: 116px"> <div style="margin-top: 116px">
<van-list <van-list v-model="loading" :finished="finished" :immediate-check="false" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="loading"
:finished="finished" :immediate-check="false"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div class="van-doc-card" v-for="o in tableData"> <div class="van-doc-card" v-for="o in tableData">
<div> <div>
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div style="width: 74%"> <div style="width: 74%">
<div class="van-ellipsis title"> <div class="van-ellipsis title">
@@ -267,8 +247,7 @@ layout("/mobile/platform.html"){
<van-row> <van-row>
<van-col span="24"> <van-col span="24">
<span style="color: grey">审核状态:</span> <span style="color: grey">审核状态:</span>
<span v-if="o.auditState===1" <span v-if="o.auditState===1" style="color: #e6a23c">待审核</span>
style="color: #e6a23c">待审核</span>
<span v-if="o.auditState==3" style="color: #67c23a">审核通过</span> <span v-if="o.auditState==3" style="color: #67c23a">审核通过</span>
<span v-if="o.auditState==2" style="color: #f56c6c">审核不通过</span> <span v-if="o.auditState==2" style="color: #f56c6c">审核不通过</span>
</van-col> </van-col>
@@ -289,38 +268,39 @@ layout("/mobile/platform.html"){
<div style="display: flex; justify-content: flex-end; margin-top: 4px"> <div style="display: flex; justify-content: flex-end; margin-top: 4px">
<div v-if="o.auditState === 1"> <div v-if="o.auditState === 1">
<van-button @click.stop="openSubmit(o)" class="cus_button" <van-button
type="primary" size="small" color="#1867b0" @click.stop="openSubmit(o)"
style="margin-right: 8px; width: auto;">审&emsp;&emsp;核 class="cus_button"
type="primary"
size="small"
color="#1867b0"
style="margin-right: 8px; width: auto"
>
审&emsp;&emsp;核
</van-button> </van-button>
</div> </div>
<div> <div>
<van-button @click.stop="doDelete(o)" class="cus_button" <van-button
type="danger" size="small" @click.stop="doDelete(o)"
style="margin-right: 8px; width: auto;">删&emsp;&emsp;除 class="cus_button"
type="danger"
size="small"
style="margin-right: 8px; width: auto"
>
删&emsp;&emsp;除
</van-button> </van-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
<van-dialog v-model="optionShow" title="审核意见" show-cancel-button @confirm="doSubmit"> <van-dialog v-model="optionShow" title="审核意见" show-cancel-button @confirm="doSubmit">
<van-cell center title="是否审核通过:"> <van-cell center title="是否审核通过:">
<template #right-icon> <template #right-icon>
<van-switch v-model="info.checked" size="24" active-color="#07c160" <van-switch v-model="info.checked" size="24" active-color="#07c160" inactive-color="#ee0a24"></van-switch>
inactive-color="#ee0a24"></van-switch>
</template> </template>
</van-cell> </van-cell>
<van-field <van-field
@@ -333,14 +313,12 @@ layout("/mobile/platform.html"){
placeholder="请输入审核意见" placeholder="请输入审核意见"
show-word-limit show-word-limit
></van-field> ></van-field>
</van-dialog> </van-dialog>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -349,43 +327,40 @@ layout("/mobile/platform.html"){
auditState: 1 auditState: 1
}, },
stateOption: [ stateOption: [
{text: '未审核', value: 1}, { text: "未审核", value: 1 },
{text: '审核未通过', value: 2}, { text: "审核未通过", value: 2 },
{text: '审核通过', value: 3}, { text: "审核通过", value: 3 }
], ],
time: new Date(), time: new Date(),
show: false, show: false,
timeList: [], timeList: [],
info: {}, info: {}
} }
}, },
methods: { methods: {
doDelete(o) { doDelete(o) {
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '温馨提示', title: "温馨提示",
message: '确认要删除吗?', message: "确认要删除吗?"
}) })
.then(async () => { .then(async () => {
const resp = await $.post(loc() + "/doDelete", { id: o.id }) const resp = await $.post(loc() + "/doDelete", { id: o.id })
if (resp.code === 0) { if (resp.code === 0) {
vant.Toast.success('删除成功'); vant.Toast.success("删除成功")
this.doSearch() this.doSearch()
} else { } else {
vant.Toast.fail('删除失败'); vant.Toast.fail("删除失败")
} }
}) })
.catch(() => { .catch(() => {})
});
}, },
async doSubmit() { async doSubmit() {
const resp = await $.post(loc() + "/doSubmit", this.info) const resp = await $.post(loc() + "/doSubmit", this.info)
if (resp.code === 0) { if (resp.code === 0) {
vant.Toast.success('审核成功'); vant.Toast.success("审核成功")
this.doSearch() this.doSearch()
} else { } else {
vant.Toast.fail('审核失败'); vant.Toast.fail("审核失败")
} }
}, },
openSubmit(o) { openSubmit(o) {
@@ -395,29 +370,31 @@ layout("/mobile/platform.html"){
}, },
onConfirm() { onConfirm() {
if (this.pageForm.timeSwitch === true) { if (this.pageForm.timeSwitch === true) {
this.timeList = [{text: '全部', value: '全部'}] this.timeList = [{ text: "全部", value: "全部" }]
} else { } else {
this.timeList = [{ this.timeList = [
text: moment(this.time).format('YYYY-MM'), {
value: moment(this.time).format('YYYY-MM') text: moment(this.time).format("YYYY-MM"),
}] value: moment(this.time).format("YYYY-MM")
}
]
} }
this.$set(this.pageForm, "time", this.timeList[0].value) this.$set(this.pageForm, "time", this.timeList[0].value)
this.$refs.item.toggle() this.$refs.item.toggle()
this.doSearch() this.doSearch()
}, },
timeFormatter(type, val) { timeFormatter(type, val) {
if (type === 'year') { if (type === "year") {
return val + `年`; return val + `年`
} }
if (type === 'month') { if (type === "month") {
return val + `月`; return val + `月`
} }
return val; return val
}, },
async onLoad() { async onLoad() {
this.loading = true this.loading = true
$.post(loc() + '/pageData', this.pageForm).then(res => { $.post(loc() + "/pageData", this.pageForm).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -428,10 +405,10 @@ layout("/mobile/platform.html"){
} }
this.loading = false this.loading = false
}) })
}, }
}, },
async created() { async created() {
this.timeList = [{text: '全部', value: '全部'}] this.timeList = [{ text: "全部", value: "全部" }]
this.$set(this.pageForm, "time", this.timeList[0].value) this.$set(this.pageForm, "time", this.timeList[0].value)
this.$set(this.pageForm, "timeSwitch", true) this.$set(this.pageForm, "timeSwitch", true)
this.onLoad() this.onLoad()
@@ -439,7 +416,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -6,16 +6,9 @@ layout("/mobile/platform.html"){
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script> <script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="申请二维码" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" safe-area-inset-top></van-nav-bar>
title="申请二维码"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
safe-area-inset-top
></van-nav-bar>
<div style="width: 100%;position: fixed;top: 50%;transform: translateY(-50%);"> <div style="width: 100%; position: fixed; top: 50%; transform: translateY(-50%)">
<div id="qrcode" style="width: 70%; left: 0; right: 0; margin: auto"></div> <div id="qrcode" style="width: 70%; left: 0; right: 0; margin: auto"></div>
<van-cell class="mt10"> <van-cell class="mt10">
<template #icon> <template #icon>
@@ -26,10 +19,7 @@ layout("/mobile/platform.html"){
</template> </template>
</van-cell> </van-cell>
<van-cell title="二维码有效期截止时间" is-link :value="dateTimeValue" <van-cell title="二维码有效期截止时间" is-link :value="dateTimeValue" @click="openDateTime"></van-cell>
@click="openDateTime"></van-cell>
</div> </div>
<van-popup v-model="dateTimeShow" position="bottom" :style="{ height: '50%' }"> <van-popup v-model="dateTimeShow" position="bottom" :style="{ height: '50%' }">
@@ -45,14 +35,11 @@ layout("/mobile/platform.html"){
:formatter="formatter" :formatter="formatter"
></van-datetime-picker> ></van-datetime-picker>
</van-popup> </van-popup>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -60,30 +47,30 @@ layout("/mobile/platform.html"){
maxDate: new Date(2025, 10, 1), maxDate: new Date(2025, 10, 1),
currentDate: new Date(new Date().getTime() + 60 * 60 * 1000), currentDate: new Date(new Date().getTime() + 60 * 60 * 1000),
dateTimeShow: false, dateTimeShow: false,
dateTime: '', dateTime: "",
dateTimeValue: moment(new Date(new Date().getTime() + 60 * 60 * 1000)).format('YYYY-MM-DD HH') dateTimeValue: moment(new Date(new Date().getTime() + 60 * 60 * 1000)).format("YYYY-MM-DD HH")
} }
}, },
methods: { methods: {
formatter(type, val) { formatter(type, val) {
if (type === 'year') { if (type === "year") {
return val + '年'; return val + "年"
} }
if (type === 'month') { if (type === "month") {
return val + '月'; return val + "月"
} }
if (type === 'day') { if (type === "day") {
return val + '日'; return val + "日"
} }
if (type === 'hour') { if (type === "hour") {
return val + '时'; return val + "时"
} }
return val; return val
}, },
confirm(val) { confirm(val) {
this.initQrcode(); this.initQrcode()
this.dateTimeShow = false this.dateTimeShow = false
this.dateTimeValue = moment(val).format('YYYY-MM-DD HH') this.dateTimeValue = moment(val).format("YYYY-MM-DD HH")
}, },
openDateTime() { openDateTime() {
this.dateTimeShow = true this.dateTimeShow = true
@@ -91,23 +78,23 @@ layout("/mobile/platform.html"){
initQrcode() { initQrcode() {
this.$nextTick(() => { this.$nextTick(() => {
$("#qrcode").html("") $("#qrcode").html("")
$("#qrcode").qrcode({ //设置css $("#qrcode").qrcode({
//设置css
render: "canvas", //二维码的生成方式 render: "canvas", //二维码的生成方式
width: $("#qrcode").width(), //生成二维码的宽度 width: $("#qrcode").width(), //生成二维码的宽度
height: $("#qrcode").width(), //生成二维码的高度 height: $("#qrcode").width(), //生成二维码的高度
text: APP_DOMAIN + "/mobile/self/applyUser?currentDate=" + this.currentDate.valueOf(), text: APP_DOMAIN + "/mobile/self/applyUser?currentDate=" + this.currentDate.valueOf(),
correctLevel: 3 //容错级别,默认为2,最高为3,为了让用户扫码最快,容错级别应当设为最低 correctLevel: 3 //容错级别,默认为2,最高为3,为了让用户扫码最快,容错级别应当设为最低
}); })
}) })
} }
}, },
async created() { async created() {
this.initQrcode(); this.initQrcode()
} }
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
+11 -28
View File
@@ -7,35 +7,21 @@ layout("/mobile/platform.html"){
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="提案详情" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="提案详情"
left-arrow
placeholder
fixed
@click-left="history.back()"
></van-nav-bar>
<div style="padding-top: 20px"> <div style="padding-top: 20px">
<van-collapse v-model="activeNames"> <van-collapse v-model="activeNames">
<van-collapse-item title="提案基本信息" name="1"> <van-collapse-item title="提案基本信息" name="1">
<van-cell title="提案名称"> <van-cell title="提案名称">
<div> <div>{{tableData.proposalName}}</div>
{{tableData.proposalName}}
</div>
</van-cell> </van-cell>
<van-cell title="提案人"> <van-cell title="提案人">
<div> <div>{{tableData.createUserName}}</div>
{{tableData.createUserName}}
</div>
</van-cell> </van-cell>
<van-cell title="所在部门"> <van-cell title="所在部门">
<div> <div>{{tableData.unionName}}</div>
{{tableData.unionName}}
</div>
</van-cell> </van-cell>
<van-cell title="提案类型"> <van-cell title="提案类型">
<div> <div>{{tableData.typeName}}</div>
{{tableData.typeName}}
</div>
</van-cell> </van-cell>
<van-cell title="立案结果"> <van-cell title="立案结果">
<span>{{tableData.resultName ? tableData.resultName : '暂无'}}</span> <span>{{tableData.resultName ? tableData.resultName : '暂无'}}</span>
@@ -44,8 +30,7 @@ layout("/mobile/platform.html"){
<div> <div>
<span v-if="!tableData.seconded">暂无</span> <span v-if="!tableData.seconded">暂无</span>
<span v-else v-for="(item,index) in tableData.seconded"> <span v-else v-for="(item,index) in tableData.seconded">
{{ item.username }} {{ item.username }} {{ index + 1 === tableData.seconded.length ? '' : '、' }}
{{ index + 1 === tableData.seconded.length ? '' : '、' }}
</span> </span>
</div> </div>
</van-cell> </van-cell>
@@ -63,24 +48,22 @@ layout("/mobile/platform.html"){
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
</div> </div>
</div> </div>
<script> <script>
new Vue({ new Vue({
el: '#app', el: "#app",
data() { data() {
return { return {
ayActiveNames: [], ayActiveNames: [],
jyActiveNames: [], jyActiveNames: [],
activeNames: ['1'], activeNames: ["1"],
tableData: {} tableData: {}
} }
}, },
methods: { methods: {
checkParams() { checkParams() {
if (GetQueryString('id') === '') { if (GetQueryString("id") === "") {
vant.Toast.fail('参数不合法'); vant.Toast.fail("参数不合法")
return false return false
} }
return true return true
@@ -88,7 +71,7 @@ layout("/mobile/platform.html"){
}, },
created() { created() {
if (this.checkParams()) { if (this.checkParams()) {
$.post('/platform/mobile/proposal/compose/findOne', {id: GetQueryString('id')}).then(res => { $.post("/platform/mobile/proposal/compose/findOne", { id: GetQueryString("id") }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = res.data this.tableData = res.data
} }
+37 -78
View File
@@ -8,7 +8,7 @@ layout("/mobile/platform.html"){
.cell-card { .cell-card {
padding: 20px; padding: 20px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
width: 90%; width: 90%;
margin: 20px auto; margin: 20px auto;
border-radius: 20px; border-radius: 20px;
@@ -24,16 +24,9 @@ layout("/mobile/platform.html"){
width: 50%; width: 50%;
text-align: center; text-align: center;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="提案列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="提案列表"
left-arrow
placeholder
fixed
@click-left="location.href='/mobile/index'"
></van-nav-bar>
<van-search <van-search
v-model="pageForm.searchKeyWord" v-model="pageForm.searchKeyWord"
@@ -41,42 +34,29 @@ layout("/mobile/platform.html"){
maxlength="10" maxlength="10"
@search="doSearch" @search="doSearch"
placeholder="请输入提案名称或者提案编号进行查询" placeholder="请输入提案名称或者提案编号进行查询"
> ></van-search>
</van-search>
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item> <van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList" <van-dropdown-item v-model="pageForm.delegationId" :options="delegationList" @change="doSearch"></van-dropdown-item>
@change="doSearch"></van-dropdown-item> <van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList" @change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList" <van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList" @change="doSearch"></van-dropdown-item>
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
<van-tabs v-model="active" @click="onClickActive"> <van-tabs v-model="active" @click="onClickActive">
<van-tab title="未审核"> <van-tab title="未审核">
<div> <div>
<van-list <van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="loading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad"
>
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id,o.secondedId)"> <van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id,o.secondedId)">
<div style="display: flex"> <div style="display: flex">
<div style="width: 75%"> <div style="width: 75%">
<div class="text-overflow" style="font-weight: bold;color: #409EFF"> <div class="text-overflow" style="font-weight: bold; color: #409eff">{{o.proposalName}}</div>
{{o.proposalName}}
</div>
<div style="font-size: 12px">编号:{{o.proposalCode}}</div> <div style="font-size: 12px">编号:{{o.proposalCode}}</div>
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div> <div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div> <div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
<div style="font-size: 12px">代表团:{{o.delegationName}}</div> <div style="font-size: 12px">代表团:{{o.delegationName}}</div>
</div> </div>
<div style="width: 25%;display: flex;align-items: center;"> <div style="width: 25%; display: flex; align-items: center">
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span> <span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
</div> </div>
</div> </div>
@@ -97,34 +77,22 @@ layout("/mobile/platform.html"){
</div> </div>
</van-cell> </van-cell>
</van-list> </van-list>
<van-empty <van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
</van-tab> </van-tab>
<van-tab title="已审核"> <van-tab title="已审核">
<div> <div>
<van-list <van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="loading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad"
>
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id,o.secondedId)"> <van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id,o.secondedId)">
<div style="display: flex"> <div style="display: flex">
<div style="width: 75%"> <div style="width: 75%">
<div class="text-overflow" style="font-weight: bold;color: #409EFF"> <div class="text-overflow" style="font-weight: bold; color: #409eff">{{o.proposalName}}</div>
{{o.proposalName}}
</div>
<div style="font-size: 12px">编号:{{o.proposalCode}}</div> <div style="font-size: 12px">编号:{{o.proposalCode}}</div>
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div> <div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div> <div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
<div style="font-size: 12px">代表团:{{o.delegationName}}</div> <div style="font-size: 12px">代表团:{{o.delegationName}}</div>
</div> </div>
<div style="width: 25%;display: flex;align-items: center;"> <div style="width: 25%; display: flex; align-items: center">
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span> <span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
</div> </div>
</div> </div>
@@ -145,22 +113,15 @@ layout("/mobile/platform.html"){
</div> </div>
</van-cell> </van-cell>
</van-list> </van-list>
<van-empty <van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -169,7 +130,7 @@ layout("/mobile/platform.html"){
isAudit: false isAudit: false
}, },
list: [], list: [],
state: '0', state: "0",
loading: false, loading: false,
finished: false, finished: false,
refreshing: false, refreshing: false,
@@ -178,8 +139,9 @@ layout("/mobile/platform.html"){
proposalTypeList: [], proposalTypeList: [],
resultList: [], resultList: [],
isAuditList: [ isAuditList: [
{"text": "未审核", "value": false}, { text: "未审核", value: false },
{"text": "已审核", "value": true}] { text: "已审核", value: true }
]
} }
}, },
methods: { methods: {
@@ -194,20 +156,18 @@ layout("/mobile/platform.html"){
setTimeout(() => { setTimeout(() => {
this.refreshing = false this.refreshing = false
}, 1000) }, 1000)
}, },
doSearch() { doSearch() {
this.onLoad() this.onLoad()
}, },
onClickActive(name) { onClickActive(name) {
this.$set(this.pageForm, "isAudit", name) this.$set(this.pageForm, "isAudit", name)
this.onLoad() this.onLoad()
}, },
async onLoad() { async onLoad() {
this.tableData = [] this.tableData = []
this.loading = true this.loading = true
$.post('/platform/mobile/proposal/seconded/pageData', this.pageForm).then(res => { $.post("/platform/mobile/proposal/seconded/pageData", this.pageForm).then((res) => {
this.loading = false this.loading = false
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
@@ -222,17 +182,18 @@ layout("/mobile/platform.html"){
}, },
doAudit(flag, row) { doAudit(flag, row) {
const { id, secondedId } = row const { id, secondedId } = row
let res = flag === true ? '通过' : '拒绝' let res = flag === true ? "通过" : "拒绝"
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '提示', title: "提示",
message: '您确定' + res + '吗?', message: "您确定" + res + "吗?"
}).then(() => { })
$.post('/platform/proposal/transact/seconded/doAudit', { .then(() => {
$.post("/platform/proposal/transact/seconded/doAudit", {
secondedId: secondedId, secondedId: secondedId,
proposalId: id, proposalId: id,
flag: flag flag: flag
}).then(res => { }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.pageForm = { this.pageForm = {
pageNumber: 1, pageNumber: 1,
@@ -241,26 +202,26 @@ layout("/mobile/platform.html"){
} }
this.tableData = [] this.tableData = []
this.onLoad() this.onLoad()
vant.Toast.success('提交成功!') vant.Toast.success("提交成功!")
} }
}) })
}).catch(() => {
}) })
.catch(() => {})
}, },
openView(id, secondedId) { openView(id, secondedId) {
// window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id // window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
window.location.href = '/platform/mobile/proposal/seconded/view?biz_key=' + secondedId + '&proposal_id=' + id + '&mobile=' + true window.location.href = "/platform/mobile/proposal/seconded/view?biz_key=" + secondedId + "&proposal_id=" + id + "&mobile=" + true
} }
}, },
async created() { async created() {
this.sessionList = await mProposal.getAllSession() this.sessionList = await mProposal.getAllSession()
const a = await getProposalType() const a = await getProposalType()
if (a) { if (a) {
a.forEach(v => { a.forEach((v) => {
this.proposalTypeList.push({"text": v.typeName, "value": v.id}) this.proposalTypeList.push({ text: v.typeName, value: v.id })
}) })
this.proposalTypeList.unshift({"text": "所有类型", "value": null}) this.proposalTypeList.unshift({ text: "所有类型", value: null })
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value) this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
} }
if (this.sessionList && this.sessionList.length > 0) { if (this.sessionList && this.sessionList.length > 0) {
@@ -269,19 +230,17 @@ layout("/mobile/platform.html"){
if (this.delegationList) { if (this.delegationList) {
this.$set(this.pageForm, "delegationId", this.delegationList[0].value) this.$set(this.pageForm, "delegationId", this.delegationList[0].value)
} }
} }
const aa = await getDictOptions("proposal_result") const aa = await getDictOptions("proposal_result")
console.log(aa) console.log(aa)
if (a) { if (a) {
aa.forEach(v => { aa.forEach((v) => {
this.resultList.push({"text": v.name, "value": v.code}) this.resultList.push({ text: v.name, value: v.code })
}) })
this.resultList.unshift({"text": "所有结果", "value": null}) this.resultList.unshift({ text: "所有结果", value: null })
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value) this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
} }
}
},
}) })
</script> </script>
+32 -41
View File
@@ -8,7 +8,7 @@ layout("/mobile/platform.html"){
.cell-card { .cell-card {
padding: 20px; padding: 20px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
width: 90%; width: 90%;
margin: 20px auto; margin: 20px auto;
border-radius: 20px; border-radius: 20px;
@@ -19,34 +19,32 @@ layout("/mobile/platform.html"){
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="个人提案" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="个人提案"
left-arrow
placeholder
fixed
@click-left="history.back()"
></van-nav-bar>
<div> <div>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh"> <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list <van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="loading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<van-cell v-for="o in tableData" class="cell-card"> <van-cell v-for="o in tableData" class="cell-card">
<div style="width: 100%; display: flex; flex-direction: row"> <div style="width: 100%; display: flex; flex-direction: row">
<div class="text-overflow" style="font-weight: bold;color: #409EFF;width: calc(100% - 50px)" <div class="text-overflow" style="font-weight: bold; color: #409eff; width: calc(100% - 50px)" @click="openView(o.id)">
@click="openView(o.id)">
{{o.proposalName}} {{o.proposalName}}
</div> </div>
<div v-if="o.stateCode==100&&!config.isAutoSubmit" @click="doSubmit(o)" <div
style="width: 50px;display: flex;flex-direction:column;align-items: center;justify-content: center;font-size: 20px;color: #409EFF"> v-if="o.stateCode==100&&!config.isAutoSubmit"
@click="doSubmit(o)"
style="
width: 50px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 20px;
color: #409eff;
"
>
<van-icon name="share" /> <van-icon name="share" />
<div style="font-size: 8px">提交</div> <div style="font-size: 8px">提交</div>
</div> </div>
@@ -71,18 +69,13 @@ layout("/mobile/platform.html"){
</van-cell> </van-cell>
</van-list> </van-list>
</van-pull-refresh> </van-pull-refresh>
<van-empty <van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
</div> </div>
<script> <script>
new Vue({ new Vue({
el: '#app', el: "#app",
data() { data() {
return { return {
list: [], list: [],
@@ -101,33 +94,32 @@ layout("/mobile/platform.html"){
methods: { methods: {
async doSubmit(row) { async doSubmit(row) {
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '提示', title: "提示",
message: '是否提交提案?', message: "是否提交提案?"
}) }).then(async () => {
.then(async () => {
const toast = vant.Toast.loading({ const toast = vant.Toast.loading({
duration: 0, duration: 0,
forbidClick: true, forbidClick: true,
message: '正在提交...', message: "正在提交..."
}); })
const {code, msg} = await $.post('/platform/proposal/transact/compose/doSubmit', { const { code, msg } = await $.post("/platform/proposal/transact/compose/doSubmit", {
id: row.id, id: row.id,
mannerCode: row.mannerCode mannerCode: row.mannerCode
}) })
if (code === 0) { if (code === 0) {
toast.icon = 'success' toast.icon = "success"
toast.message = '提交成功' toast.message = "提交成功"
await this.onRefresh() await this.onRefresh()
} else { } else {
toast.icon = 'fail' toast.icon = "fail"
toast.message = msg toast.message = msg
} }
setTimeout(() => { setTimeout(() => {
vant.Toast.clear(); vant.Toast.clear()
}, 500) }, 500)
}); })
}, },
async onRefresh() { async onRefresh() {
this.tableData = [] this.tableData = []
@@ -140,11 +132,10 @@ layout("/mobile/platform.html"){
setTimeout(() => { setTimeout(() => {
this.refreshing = false this.refreshing = false
}, 1000) }, 1000)
}, },
async onLoad() { async onLoad() {
this.loading = true this.loading = true
$.post('/platform/mobile/proposal/compose/pageData', this.pageForm).then(res => { $.post("/platform/mobile/proposal/compose/pageData", this.pageForm).then((res) => {
this.loading = false this.loading = false
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
@@ -157,7 +148,7 @@ layout("/mobile/platform.html"){
}) })
}, },
openView(id) { openView(id) {
window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id window.location.href = "/platform/mobile/proposal/compose/detail?id=" + id
} }
}, },
async created() { async created() {
+35 -73
View File
@@ -8,7 +8,7 @@ layout("/mobile/platform.html"){
.cell-card { .cell-card {
padding: 20px; padding: 20px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
width: 90%; width: 90%;
margin: 20px auto; margin: 20px auto;
border-radius: 20px; border-radius: 20px;
@@ -21,54 +21,36 @@ layout("/mobile/platform.html"){
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="团长审议" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="团长审议"
left-arrow
placeholder
fixed
@click-left="location.href='/mobile/index'"
></van-nav-bar>
<van-search <van-search
v-model="pageForm.searchKeyWord" v-model="pageForm.searchKeyWord"
shape="round" shape="round"
maxlength="10" maxlength="10"
@search="doSearch" @search="doSearch"
placeholder="请输入提案名称或者提案编号进行查询" placeholder="请输入提案名称或者提案编号进行查询"
> ></van-search>
</van-search>
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item> <van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList" <van-dropdown-item v-model="pageForm.delegationId" :options="delegationList" @change="doSearch"></van-dropdown-item>
@change="doSearch"></van-dropdown-item> <van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList" @change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList" <van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList" @change="doSearch"></van-dropdown-item>
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
<van-tabs v-model="active" @click="onClickActive"> <van-tabs v-model="active" @click="onClickActive">
<van-tab title="未审核"> <van-tab title="未审核">
<div> <div>
<van-list <van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="loading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id)"> <van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id)">
<div style="display: flex"> <div style="display: flex">
<div style="width: 75%"> <div style="width: 75%">
<div class="text-overflow" style="font-weight: bold;color: #409EFF"> <div class="text-overflow" style="font-weight: bold; color: #409eff">{{o.proposalName}}</div>
{{o.proposalName}}
</div>
<div style="font-size: 12px">编号:{{o.proposalCode}}</div> <div style="font-size: 12px">编号:{{o.proposalCode}}</div>
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div> <div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div> <div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
<div style="font-size: 12px">代表团:{{o.delegationName}}</div> <div style="font-size: 12px">代表团:{{o.delegationName}}</div>
</div> </div>
<div style="width: 25%;display: flex;align-items: center;"> <div style="width: 25%; display: flex; align-items: center">
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span> <span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
</div> </div>
</div> </div>
@@ -89,34 +71,22 @@ layout("/mobile/platform.html"){
</div> </div>
</van-cell> </van-cell>
</van-list> </van-list>
<van-empty <van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
</van-tab> </van-tab>
<van-tab title="已审核"> <van-tab title="已审核">
<div> <div>
<van-list <van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="loading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad"
>
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id)"> <van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id)">
<div style="display: flex"> <div style="display: flex">
<div style="width: 75%"> <div style="width: 75%">
<div class="text-overflow" style="font-weight: bold;color: #409EFF"> <div class="text-overflow" style="font-weight: bold; color: #409eff">{{o.proposalName}}</div>
{{o.proposalName}}
</div>
<div style="font-size: 12px">编号:{{o.proposalCode}}</div> <div style="font-size: 12px">编号:{{o.proposalCode}}</div>
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div> <div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div> <div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
<div style="font-size: 12px">代表团:{{o.delegationName}}</div> <div style="font-size: 12px">代表团:{{o.delegationName}}</div>
</div> </div>
<div style="width: 25%;display: flex;align-items: center;"> <div style="width: 25%; display: flex; align-items: center">
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span> <span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
</div> </div>
</div> </div>
@@ -137,17 +107,11 @@ layout("/mobile/platform.html"){
</div> </div>
</van-cell> </van-cell>
</van-list> </van-list>
<van-empty <van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<!-- <div> <!-- <div>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh"> <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list <van-list
@@ -257,7 +221,7 @@ layout("/mobile/platform.html"){
<script> <script>
let vue = new Vue({ let vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -266,7 +230,7 @@ layout("/mobile/platform.html"){
isAudit: false isAudit: false
}, },
list: [], list: [],
state: '0', state: "0",
loading: false, loading: false,
finished: false, finished: false,
refreshing: false, refreshing: false,
@@ -275,8 +239,9 @@ layout("/mobile/platform.html"){
proposalTypeList: [], proposalTypeList: [],
resultList: [], resultList: [],
isAuditList: [ isAuditList: [
{"text": "未审核", "value": false}, { text: "未审核", value: false },
{"text": "已审核", "value": true}] { text: "已审核", value: true }
]
} }
}, },
methods: { methods: {
@@ -291,20 +256,18 @@ layout("/mobile/platform.html"){
setTimeout(() => { setTimeout(() => {
this.refreshing = false this.refreshing = false
}, 1000) }, 1000)
}, },
doSearch() { doSearch() {
this.onLoad() this.onLoad()
}, },
onClickActive(name) { onClickActive(name) {
this.$set(this.pageForm, "isAudit", name) this.$set(this.pageForm, "isAudit", name)
this.onLoad() this.onLoad()
}, },
async onLoad() { async onLoad() {
this.tableData = [] this.tableData = []
this.loading = true this.loading = true
$.post('/platform/mobile/proposal/delegation/pageData', this.pageForm).then(res => { $.post("/platform/mobile/proposal/delegation/pageData", this.pageForm).then((res) => {
this.loading = false this.loading = false
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
@@ -321,19 +284,19 @@ layout("/mobile/platform.html"){
proposalId: id, proposalId: id,
username: "${@shiro.getPrincipalProperty('username')}", username: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}", loginName: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'), auditTime: moment().format("YYYY-MM-DD"),
opinion: '', opinion: "",
sign: '', sign: ""
} }
this.state = '0' this.state = "0"
this.show = true this.show = true
}, },
validateForm(action, done) { validateForm(action, done) {
done(false) done(false)
}, },
async doHandle() { async doHandle() {
this.$refs['handleForm'].validate().then(valid => { this.$refs["handleForm"].validate().then((valid) => {
$.post('/platform/proposal/transact/audit/doAudit', { $.post("/platform/proposal/transact/audit/doAudit", {
audit: JSON.stringify(this.formData), audit: JSON.stringify(this.formData),
flag: this.state === 0 flag: this.state === 0
}).then((res) => { }).then((res) => {
@@ -347,26 +310,26 @@ layout("/mobile/platform.html"){
} }
this.tableData = [] this.tableData = []
this.onLoad() this.onLoad()
vant.Toast.success('审核成功!') vant.Toast.success("审核成功!")
} else { } else {
vant.Toast.error('审核失败!') vant.Toast.error("审核失败!")
} }
}) })
}) })
}, },
openView(id) { openView(id) {
// window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id // window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
window.location.href = '/platform/mobile/proposal/delegation/view?biz_key=' + id + '&proposal_id=' + id + '&mobile=' + true window.location.href = "/platform/mobile/proposal/delegation/view?biz_key=" + id + "&proposal_id=" + id + "&mobile=" + true
} }
}, },
async created() { async created() {
this.sessionList = await mProposal.getAllSession() this.sessionList = await mProposal.getAllSession()
const a = await getProposalType() const a = await getProposalType()
if (a) { if (a) {
a.forEach(v => { a.forEach((v) => {
this.proposalTypeList.push({"text": v.typeName, "value": v.id}) this.proposalTypeList.push({ text: v.typeName, value: v.id })
}) })
this.proposalTypeList.unshift({"text": "所有类型", "value": null}) this.proposalTypeList.unshift({ text: "所有类型", value: null })
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value) this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
} }
if (this.sessionList && this.sessionList.length > 0) { if (this.sessionList && this.sessionList.length > 0) {
@@ -375,14 +338,13 @@ layout("/mobile/platform.html"){
if (this.delegationList) { if (this.delegationList) {
this.$set(this.pageForm, "delegationId", this.delegationList[0].value) this.$set(this.pageForm, "delegationId", this.delegationList[0].value)
} }
} }
const aa = await getDictOptions("proposal_result") const aa = await getDictOptions("proposal_result")
if (a) { if (a) {
aa.forEach(v => { aa.forEach((v) => {
this.resultList.push({"text": v.name, "value": v.code}) this.resultList.push({ text: v.name, value: v.code })
}) })
this.resultList.unshift({"text": "所有结果", "value": null}) this.resultList.unshift({ text: "所有结果", value: null })
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value) this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
} }
} }
@@ -198,7 +198,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养-酒店介绍"></van-nav-bar> <van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder title="职工疗休养-酒店介绍"></van-nav-bar>
</van-sticky> </van-sticky>
<!--线路详情--> <!--线路详情-->
@@ -2,7 +2,6 @@
layout("/mobile/platform.html"){ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.van-doc-card { .van-doc-card {
margin: 10px; margin: 10px;
padding: 12px 12px 12px 12px; padding: 12px 12px 12px 12px;
@@ -30,13 +29,11 @@ layout("/mobile/platform.html"){
white-space: break-spaces; white-space: break-spaces;
padding-left: 7px; padding-left: 7px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养"></van-nav-bar> <van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder title="职工疗休养"></van-nav-bar>
</van-sticky> </van-sticky>
<!--顶部轮播图--> <!--顶部轮播图-->
@@ -67,23 +64,20 @@ layout("/mobile/platform.html"){
<div> <div>
<van-tabbar v-model="tarBarActive"> <van-tabbar v-model="tarBarActive">
<van-tabbar-item icon="home-o" replace url="/platform/mobile/theRapyRecuperation/index">疗休养报名 <van-tabbar-item icon="home-o" replace url="/platform/mobile/theRapyRecuperation/index">疗休养报名</van-tabbar-item>
</van-tabbar-item> <van-tabbar-item icon="manager-o" replace url="/platform/mobile/theRapyRecuperation/myRecuperation">我的疗休养</van-tabbar-item>
<van-tabbar-item icon="manager-o" replace url="/platform/mobile/theRapyRecuperation/myRecuperation">我的疗休养
</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
chooseButton: [], chooseButton: [],
configData: {}, configData: {},
tarBarActive: 0, tarBarActive: 0
} }
}, },
methods: { methods: {
@@ -91,23 +85,23 @@ layout("/mobile/platform.html"){
const isExist = await getScopeUser(this.configData.activityGroupId) const isExist = await getScopeUser(this.configData.activityGroupId)
if (!isExist) { if (!isExist) {
vant.Dialog.alert({ vant.Dialog.alert({
title: '温馨提示', title: "温馨提示",
message: '您不在疗休养报名范围中', message: "您不在疗休养报名范围中",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
return return
} }
localStorage.setItem("clickIndex", JSON.stringify({ clickIndex: index })) localStorage.setItem("clickIndex", JSON.stringify({ clickIndex: index }))
location.href = '/platform/mobile/theRapyRecuperation/mobileLineListPage' location.href = "/platform/mobile/theRapyRecuperation/mobileLineListPage"
}, },
async getConfigData() { async getConfigData() {
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne') const resp = await $.get("/platform/theRapyRecuperation/TheRapyConfig/findOne")
this.configData = resp.data this.configData = resp.data
}, }
}, },
async created() { async created() {
this.chooseButton = await getEnumOptions('TheRapyRecuperationType') this.chooseButton = await getEnumOptions("TheRapyRecuperationType")
this.chooseButton = this.chooseButton.filter(o => o.value !== 2 && o.value !== 3) this.chooseButton = this.chooseButton.filter((o) => o.value !== 2 && o.value !== 3)
await this.getConfigData() await this.getConfigData()
} }
}) })
@@ -2,7 +2,6 @@
layout("/mobile/platform.html"){ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
.container img { .container img {
background-size: contain; background-size: contain;
width: 100%; width: 100%;
@@ -41,7 +40,8 @@ layout("/mobile/platform.html"){
padding-top: 60px; padding-top: 60px;
} }
.van-skeleton__row, .van-skeleton__title { .van-skeleton__row,
.van-skeleton__title {
height: 30px; height: 30px;
} }
@@ -106,7 +106,7 @@ layout("/mobile/platform.html"){
} }
.van-card-body { .van-card-body {
padding: 0px 10px 0px 10px padding: 0px 10px 0px 10px;
} }
.van-doc-card > div:first-child { .van-doc-card > div:first-child {
@@ -194,13 +194,11 @@ layout("/mobile/platform.html"){
.van-image-preview img { .van-image-preview img {
background-color: white; background-color: white;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar @click-left="history.go(-1)" fixed left-arrow placeholder title="职工疗休养-线路介绍"></van-nav-bar> <van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder title="职工疗休养-线路介绍"></van-nav-bar>
</van-sticky> </van-sticky>
<!--线路详情--> <!--线路详情-->
@@ -208,9 +206,7 @@ layout("/mobile/platform.html"){
<div class="container"> <div class="container">
<div class="header"> <div class="header">
<div class="title"> <div class="title">
<van-tag size="large" color="#1867b0" style="color: white;position: relative; top: -2px"> <van-tag size="large" color="#1867b0" style="color: white; position: relative; top: -2px">{{lineData.lotName}}</van-tag>
{{lineData.lotName}}
</van-tag>
{{lineData.lineName}} {{lineData.lineName}}
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
@@ -220,18 +216,17 @@ layout("/mobile/platform.html"){
</div> </div>
<div> <div>
<span>当前报名:</span> <span>当前报名:</span>
{{lineData.signUpUserNum + lineData.signUpUserFamilyNum + '(家属' + lineData.signUpUserFamilyNum + {{lineData.signUpUserNum + lineData.signUpUserFamilyNum + '(家属' + lineData.signUpUserFamilyNum + '人)'}}
'人)'}}
</div> </div>
<div> <div>
<span>报名时间:</span> <span>报名时间:</span>
{{moment(lineData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + {{moment(lineData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(lineData.signUpEndTime).format('YYYY-MM-DD
moment(lineData.signUpEndTime).format('YYYY-MM-DD HH:mm')}} HH:mm')}}
</div> </div>
<div> <div>
<span>出行时间:</span> <span>出行时间:</span>
{{moment(lineData.playStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + {{moment(lineData.playStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(lineData.playEndTime).format('YYYY-MM-DD
moment(lineData.playEndTime).format('YYYY-MM-DD HH:mm')}} HH:mm')}}
</div> </div>
<div> <div>
<span>旅&ensp;行&ensp;社:</span> <span>旅&ensp;行&ensp;社:</span>
@@ -255,44 +250,44 @@ layout("/mobile/platform.html"){
</van-skeleton> </van-skeleton>
<!--置顶图标--> <!--置顶图标-->
<image v-if="btnFlag" @click="backTop" src="/assets/mobile/svg/therapyRecuperation/top.svg" <image v-if="btnFlag" @click="backTop" src="/assets/mobile/svg/therapyRecuperation/top.svg" class="top_icon"></image>
class="top_icon"></image>
<!--底部报名按钮--> <!--底部报名按钮-->
<div class="footer" v-if="fromUrlByMy != 'edit'"> <div class="footer" v-if="fromUrlByMy != 'edit'">
<template v-if="lineData.isNormal==0&&lineData.isNormalFalse>0"> <template v-if="lineData.isNormal==0&&lineData.isNormalFalse>0">
<van-button @click="join" <van-button @click="join" class="join">我要报名</van-button>
class="join">我要报名
</van-button>
</template> </template>
<template v-else> <template v-else>
<van-button v-if="moment().unix() <= moment(lineData.signUpEndTime).unix()" @click="join" <van-button v-if="moment().unix() <= moment(lineData.signUpEndTime).unix()" @click="join" class="join">我要报名</van-button>
class="join">我要报名
</van-button>
<van-button v-if="moment().unix() > moment(lineData.signUpEndTime).unix()" class="join">报名结束</van-button> <van-button v-if="moment().unix() > moment(lineData.signUpEndTime).unix()" class="join">报名结束</van-button>
</template> </template>
</div> </div>
<!--报名弹出框--> <!--报名弹出框-->
<van-popup v-model:show="joinPopup" position="right" class="joinPopup"> <van-popup v-model:show="joinPopup" position="right" class="joinPopup">
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="疗休养报名"></van-nav-bar> <van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="疗休养报名"></van-nav-bar>
<div class="join_content"> <div class="join_content">
<van-form @submit="joinSubmit"> <van-form @submit="joinSubmit">
<!--基础信息--> <!--基础信息-->
<div class="van-doc-card" style="margin-bottom: 16px"> <div class="van-doc-card" style="margin-bottom: 16px">
<div></div> <div></div>
<div class="van-card-header"> <div class="van-card-header">基础信息</div>
基础信息
</div>
<div class="van-card-body"> <div class="van-card-body">
<van-field label="姓名" readonly v-model="formData.userName"></van-field> <van-field label="姓名" readonly v-model="formData.userName"></van-field>
<van-field label="工号" readonly v-model="formData.loginName"></van-field> <van-field label="工号" readonly v-model="formData.loginName"></van-field>
<van-field label="身份证号" name="idCard" :rules="[{ required: true }]" <van-field
placeholder="请填写身份证号" v-model="formData.idCard"></van-field> label="身份证号"
<van-field label="手机号" name="mobile" :rules="[{ required: true }]" name="idCard"
placeholder="请填写手机号" v-model="formData.mobile"></van-field> :rules="[{ required: true }]"
placeholder="请填写身份证号"
v-model="formData.idCard"
></van-field>
<van-field
label="手机号"
name="mobile"
:rules="[{ required: true }]"
placeholder="请填写手机号"
v-model="formData.mobile"
></van-field>
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field> <van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
<van-field label="报名线路" readonly v-model="formData.lineName"></van-field> <van-field label="报名线路" readonly v-model="formData.lineName"></van-field>
</div> </div>
@@ -301,19 +296,35 @@ layout("/mobile/platform.html"){
<!--床位信息--> <!--床位信息-->
<div class="van-doc-card" style="margin-bottom: 16px"> <div class="van-doc-card" style="margin-bottom: 16px">
<div></div> <div></div>
<div class="van-card-header"> <div class="van-card-header">床位信息</div>
床位信息
</div>
<div class="van-card-body"> <div class="van-card-body">
<van-field @click="self = true; roomVisible = true" readonly is-link label="房间" name="bedType" <van-field
placeholder="请选择房间" v-model="formData.bedInfo.bedType" @click="self = true; roomVisible = true"
:rules="[{ required: true }]"></van-field> readonly
<van-field v-if="formData.bedInfo.bedType == '标准间'" @click="self = true; bedVisible = true" is-link
readonly is-link label="床位" label="房间"
name="bedNum" placeholder="请选择床位" v-model="formData.bedInfo.bedNum" name="bedType"
:rules="[{ required: true }]"></van-field> placeholder="请选择房间"
<van-field v-if="formData.bedInfo.bedType == '标准间'" :rules="[{ validator, message: '请选择是否拼房' }]" v-model="formData.bedInfo.bedType"
label="是否拼房" name="validator"> :rules="[{ required: true }]"
></van-field>
<van-field
v-if="formData.bedInfo.bedType == '标准间'"
@click="self = true; bedVisible = true"
readonly
is-link
label="床位"
name="bedNum"
placeholder="请选择床位"
v-model="formData.bedInfo.bedNum"
:rules="[{ required: true }]"
></van-field>
<van-field
v-if="formData.bedInfo.bedType == '标准间'"
:rules="[{ validator, message: '请选择是否拼房' }]"
label="是否拼房"
name="validator"
>
<template #input> <template #input>
<van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether"> <van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether">
<van-radio :name="true" shape="square">是</van-radio> <van-radio :name="true" shape="square">是</van-radio>
@@ -321,19 +332,22 @@ layout("/mobile/platform.html"){
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
<van-field v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true" <van-field
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开" v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
label="意向拼房人"
name="otherSleepUser"
placeholder="多个拼房人请用,隔开"
v-model="formData.bedInfo.otherSleepUser" v-model="formData.bedInfo.otherSleepUser"
:rules="[{ required: true }]"></van-field> :rules="[{ required: true }]"
></van-field>
</div> </div>
</div> </div>
<!--随行人信息--> <!--随行人信息-->
<div class="van-doc-card" style="margin-bottom: 16px"> <div class="van-doc-card" style="margin-bottom: 16px">
<div></div> <div></div>
<div class="van-card-header" <div class="van-card-header" style="display: flex; justify-content: space-between; align-items: center">
style="display: flex; justify-content: space-between; align-items: center"> <span style="float: left">随行人信息</span>
<span style="float:left;">随行人信息</span>
<div> <div>
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag> <van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag>
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag> <van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag>
@@ -342,11 +356,22 @@ layout("/mobile/platform.html"){
<div v-if="formData.companionList.length > 0" class="van-card-body"> <div v-if="formData.companionList.length > 0" class="van-card-body">
<van-tabs v-model="active" type="card" color="#0e78c5" animated> <van-tabs v-model="active" type="card" color="#0e78c5" animated>
<van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)"> <van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)">
<van-field label="姓名" name="userName" placeholder="请填写姓名" v-model="item.userName" <van-field
:rules="[{ required: true }]"></van-field> label="姓名"
name="userName"
placeholder="请填写姓名"
v-model="item.userName"
:rules="[{ required: true }]"
></van-field>
<!--<van-field label="工号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>--> <!--<van-field label="工号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>-->
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age" <van-field
type="digit" :rules="[{ required: true }]"></van-field> label="年龄"
name="age"
placeholder="请填写年龄"
v-model="item.age"
type="digit"
:rules="[{ required: true }]"
></van-field>
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator"> <van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
<template #input> <template #input>
<van-radio-group direction="horizontal" v-model="item.sex"> <van-radio-group direction="horizontal" v-model="item.sex">
@@ -355,28 +380,60 @@ layout("/mobile/platform.html"){
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
<van-field label="身份证号" name="idCard" placeholder="请填写身份证号" <van-field
:rules="[{ required: true }]" type="digit" label="身份证号"
v-model="item.idCard"></van-field> name="idCard"
<van-field label="手机号" name="mobile" placeholder="请填写手机号" placeholder="请填写身份证号"
:rules="[{ required: true }]" type="digit" :rules="[{ required: true }]"
v-model="item.mobile"></van-field> type="digit"
<van-field @click="companionVisible = true" readonly is-link label="与本人关系" v-model="item.idCard"
></van-field>
<van-field
label="手机号"
name="mobile"
placeholder="请填写手机号"
:rules="[{ required: true }]"
type="digit"
v-model="item.mobile"
></van-field>
<van-field
@click="companionVisible = true"
readonly
is-link
label="与本人关系"
name="relation" name="relation"
placeholder="随行人与本人关系" v-model="item.relation" placeholder="随行人与本人关系"
:rules="[{ required: true }]"></van-field> v-model="item.relation"
:rules="[{ required: true }]"
></van-field>
<van-field @click="self = false; roomVisible = true" readonly is-link label="房间" <van-field
name="bedType" placeholder="请选择房间" @click="self = false; roomVisible = true"
v-model="item.bedInfo.bedType"></van-field> readonly
is-link
label="房间"
name="bedType"
placeholder="请选择房间"
v-model="item.bedInfo.bedType"
></van-field>
<div style="font-size: 12px; color: orangered; padding-left: 16px; padding-bottom: 4px"> <div style="font-size: 12px; color: orangered; padding-left: 16px; padding-bottom: 4px">
提醒:如果跟报名人员同一房间,无须选择! 提醒:如果跟报名人员同一房间,无须选择!
</div> </div>
<van-field v-if="item.bedInfo.bedType == '标准间'" @click="self = false; bedVisible = true" <van-field
readonly is-link label="床位" v-if="item.bedInfo.bedType == '标准间'"
name="bedNum" placeholder="请选择床位" v-model="item.bedInfo.bedNum"></van-field> @click="self = false; bedVisible = true"
<van-field v-if="item.bedInfo.bedType == '标准间'" readonly
:rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房"> is-link
label="床位"
name="bedNum"
placeholder="请选择床位"
v-model="item.bedInfo.bedNum"
></van-field>
<van-field
v-if="item.bedInfo.bedType == '标准间'"
:rules="[{ validator, message: '请选择是否拼房' }]"
label="是否拼房"
>
<template #input> <template #input>
<van-radio-group direction="horizontal" v-model="item.bedInfo.isSleepTogether"> <van-radio-group direction="horizontal" v-model="item.bedInfo.isSleepTogether">
<van-radio :name="true" shape="square">是</van-radio> <van-radio :name="true" shape="square">是</van-radio>
@@ -384,83 +441,72 @@ layout("/mobile/platform.html"){
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
<van-field v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true" <van-field
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开" v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
v-model="item.bedInfo.otherSleepUser"></van-field> label="意向拼房人"
name="otherSleepUser"
placeholder="多个拼房人请用,隔开"
v-model="item.bedInfo.otherSleepUser"
></van-field>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
<div v-if="formData.companionList.length == 0" class="companionList_empty_text"> <div v-if="formData.companionList.length == 0" class="companionList_empty_text">
<span> <span>如有随行人出行,请添加随行人</span>
如有随行人出行,请添加随行人
</span>
</div> </div>
</div> </div>
<div class="submitButton"> <div class="submitButton">
<van-button class="join join_submit">提交报名</van-button> <van-button class="join join_submit">提交报名</van-button>
</div> </div>
</van-form> </van-form>
</div> </div>
</van-popup> </van-popup>
<!--房间类型弹出框--> <!--房间类型弹出框-->
<van-popup position="bottom" round v-model="roomVisible"> <van-popup position="bottom" round v-model="roomVisible">
<van-picker <van-picker title="入住房间" show-toolbar :columns="roomColumns" @confirm="roomConfirm" @cancel="roomCancel"></van-picker>
title="入住房间" show-toolbar
:columns="roomColumns"
@confirm="roomConfirm"
@cancel="roomCancel">
</van-picker>
</van-popup> </van-popup>
<!--床位弹出框--> <!--床位弹出框-->
<van-popup position="bottom" round v-model="bedVisible"> <van-popup position="bottom" round v-model="bedVisible">
<van-picker <van-picker title="床位" show-toolbar :columns="bedColumns" @confirm="bedConfirm" @cancel="bedVisible = false"></van-picker>
title="床位" show-toolbar
:columns="bedColumns"
@confirm="bedConfirm"
@cancel="bedVisible = false">
</van-picker>
</van-popup> </van-popup>
<!--随行人关系弹出框--> <!--随行人关系弹出框-->
<van-popup position="bottom" round v-model="companionVisible"> <van-popup position="bottom" round v-model="companionVisible">
<van-picker <van-picker
title="与本人关系" show-toolbar title="与本人关系"
show-toolbar
:columns="companionColumns" :columns="companionColumns"
@confirm="(value, index) => {formData.companionList[active].relation = value; companionVisible = false}" @confirm="(value, index) => {formData.companionList[active].relation = value; companionVisible = false}"
@cancel="companionVisible = false"> @cancel="companionVisible = false"
</van-picker> ></van-picker>
</van-popup> </van-popup>
</div> </div>
<script> <script>
function getQueryString(name) { function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i")
var r = window.location.search.substr(1).match(reg); var r = window.location.search.substr(1).match(reg)
if (r != null) return decodeURI(r[2]); if (r != null) return decodeURI(r[2])
return null; return null
} }
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
active: 0, active: 0,
roomColumns: ['大床房', '标准间'], roomColumns: ["大床房", "标准间"],
bedColumns: ['1', '2'], bedColumns: ["1", "2"],
companionColumns: ['亲属', '朋友'], companionColumns: ["亲属", "朋友"],
bedVisible: false, bedVisible: false,
roomVisible: false, roomVisible: false,
companionVisible: false, companionVisible: false,
joinPopup: false, joinPopup: false,
skeLoading: true, skeLoading: true,
id: '', id: "",
lineData: {}, lineData: {},
formData: { formData: {
userName: "${@shiro.getPrincipalProperty('username')}", userName: "${@shiro.getPrincipalProperty('username')}",
@@ -468,25 +514,25 @@ layout("/mobile/platform.html"){
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}", unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
idCard: "", idCard: "",
mobile: "${@shiro.getPrincipalProperty('mobile')}", mobile: "${@shiro.getPrincipalProperty('mobile')}",
lineName: '', lineName: "",
takePartInLineId: '', takePartInLineId: "",
takePartInUnionId: '', takePartInUnionId: "",
companionList: [], companionList: [],
bedInfo: {}, bedInfo: {}
}, },
self: true, self: true,
btnFlag: false, btnFlag: false,
index: 0, index: 0,
scrollTop: 0, scrollTop: 0,
fromUrlByMy: '', fromUrlByMy: "",
enrollId: '', enrollId: "",
configData: {}, configData: {}
} }
}, },
methods: { methods: {
roomCancel() { roomCancel() {
if (!this.self) { if (!this.self) {
this.formData.companionList[this.active].bedInfo.bedType = '' this.formData.companionList[this.active].bedInfo.bedType = ""
} }
this.roomVisible = false this.roomVisible = false
}, },
@@ -514,66 +560,68 @@ layout("/mobile/platform.html"){
duration: 0, duration: 0,
forbidClick: true, forbidClick: true,
overlay: true, overlay: true,
message: '努力提交中', message: "努力提交中"
}) })
const cloneData = clone(this.formData) const cloneData = clone(this.formData)
cloneData.companionList.forEach((item, index) => { cloneData.companionList.forEach((item, index) => {
if (item.userName === '') { if (item.userName === "") {
cloneData.companionList.splice(index, 1) cloneData.companionList.splice(index, 1)
} }
}) })
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForLine', { const resp = await $.post("/platform/theRapyRecuperation/line/enroll/doSignUpForLine", {
enroll: JSON.stringify(cloneData), enroll: JSON.stringify(cloneData)
}) })
setTimeout(() => { setTimeout(() => {
if (resp.code === 0) { if (resp.code === 0) {
toast.message = '提交成功' toast.message = "提交成功"
toast.type = 'success' toast.type = "success"
} else { } else {
toast.message = resp.msg toast.message = resp.msg
toast.type = 'fail' toast.type = "fail"
} }
setTimeout(() => { setTimeout(() => {
toast.clear() toast.clear()
}, 500) }, 500)
if (resp.code === 0) { if (resp.code === 0) {
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index location.href = "/platform/mobile/theRapyRecuperation/myRecuperation?index=" + this.index
} }
}, 1000) }, 1000)
}, },
addCompanion() { addCompanion() {
this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}}) this.formData.companionList.push({ userName: "", loginName: "", sex: "", relation: "", bedInfo: {} })
}, },
delCompanion() { delCompanion() {
this.formData.companionList.splice(this.active, 1) this.formData.companionList.splice(this.active, 1)
}, },
async join() { async join() {
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', { const re = await $.post("/platform/theRapyRecuperation/line/enroll/validSignUpInfo", {
enroll: JSON.stringify({ enroll: JSON.stringify({
id: this.enrollId, id: this.enrollId,
isNormal: this.lineData.isNormal, isNormal: this.lineData.isNormal,
takePartInLineId: this.lineData.usId, takePartInLineId: this.lineData.usId,
takePartInUnionId: this.takePartInUnionId takePartInUnionId: this.takePartInUnionId
}), })
}) })
if (re.code !== 0) { if (re.code !== 0) {
if(re.msg === '您今年已报名,如要继续报名请进入我的疗休养,取消已选择') { if (re.msg === "您今年已报名,如要继续报名请进入我的疗休养,取消已选择") {
vant.Dialog.confirm({ vant.Dialog.confirm({
title: '温馨提示', title: "温馨提示",
message: re.msg, message: re.msg,
confirmButtonText: '跳转页面', confirmButtonText: "跳转页面"
}).then(() => { })
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index .then(() => {
}).catch(() => {}); location.href = "/platform/mobile/theRapyRecuperation/myRecuperation?index=" + this.index
})
.catch(() => {})
} else { } else {
vant.Dialog.alert({ vant.Dialog.alert({
title: '温馨提示', title: "温馨提示",
message: re.msg, message: re.msg
}).then(() => {}) }).then(() => {})
} }
return return
} }
if (this.fromUrlByMy !== 'editDo') { if (this.fromUrlByMy !== "editDo") {
this.formData = { this.formData = {
userName: "${@shiro.getPrincipalProperty('username')}", userName: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}", loginName: "${@shiro.getPrincipalProperty('loginname')}",
@@ -584,14 +632,14 @@ layout("/mobile/platform.html"){
takePartInLineId: this.lineData.usId, takePartInLineId: this.lineData.usId,
takePartInUnionId: this.takePartInUnionId, takePartInUnionId: this.takePartInUnionId,
companionList: [], companionList: [],
bedInfo: {}, bedInfo: {}
} }
this.$set(this.formData.bedInfo, 'bedType', '大床房') this.$set(this.formData.bedInfo, "bedType", "大床房")
} }
this.joinPopup = true this.joinPopup = true
}, },
async getData() { async getData() {
const res = await $.get('/platform/theRapyRecuperation/line/enroll/selectLineAllInfo', { const res = await $.get("/platform/theRapyRecuperation/line/enroll/selectLineAllInfo", {
usId: this.id, usId: this.id,
usUnionId: this.takePartInUnionId usUnionId: this.takePartInUnionId
}) })
@@ -617,18 +665,18 @@ layout("/mobile/platform.html"){
scrollToTop() { scrollToTop() {
const that = this const that = this
that.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop that.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
that.btnFlag = that.scrollTop > 100; that.btnFlag = that.scrollTop > 100
}, },
//修改时查询报名信息,进行回显 //修改时查询报名信息,进行回显
async findSignUpInfoById() { async findSignUpInfoById() {
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId) const res = await $.post("/platform/theRapyRecuperation/line/enroll/findSignUpInfoById/" + this.enrollId)
if (res.code === 0) { if (res.code === 0) {
this.formData = res.data this.formData = res.data
if (this.formData.bedInfo === null) { if (this.formData.bedInfo === null) {
this.formData.bedInfo = {} this.formData.bedInfo = {}
} }
if (this.formData.companionList) { if (this.formData.companionList) {
this.formData.companionList.forEach(item => { this.formData.companionList.forEach((item) => {
if (item.bedInfo === null) { if (item.bedInfo === null) {
item.bedInfo = {} item.bedInfo = {}
} }
@@ -638,35 +686,35 @@ layout("/mobile/platform.html"){
} }
}, },
async getConfigData() { async getConfigData() {
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne') const resp = await $.get("/platform/theRapyRecuperation/TheRapyConfig/findOne")
this.configData = resp.data this.configData = resp.data
}, }
}, },
async created() { async created() {
this.id = getQueryString('id') ? getQueryString('id') : '' this.id = getQueryString("id") ? getQueryString("id") : ""
this.index = getQueryString('index') ? getQueryString('index') : '' this.index = getQueryString("index") ? getQueryString("index") : ""
await this.getConfigData() await this.getConfigData()
//编辑传出来的参数 //编辑传出来的参数
this.fromUrlByMy = getQueryString('fromUrlByMy') ? getQueryString('fromUrlByMy') : '' this.fromUrlByMy = getQueryString("fromUrlByMy") ? getQueryString("fromUrlByMy") : ""
this.enrollId = getQueryString('enrollId') ? getQueryString('enrollId') : '' this.enrollId = getQueryString("enrollId") ? getQueryString("enrollId") : ""
this.takePartInUnionId = getQueryString('takePartInUnionId') ? getQueryString('takePartInUnionId') : '' this.takePartInUnionId = getQueryString("takePartInUnionId") ? getQueryString("takePartInUnionId") : ""
if (this.enrollId) { if (this.enrollId) {
await this.findSignUpInfoById() await this.findSignUpInfoById()
} }
this.getData() this.getData()
}, },
mounted() { mounted() {
window.addEventListener('scroll', this.scrollToTop) window.addEventListener("scroll", this.scrollToTop)
document.addEventListener('click', function (event) { document.addEventListener("click", function (event) {
// 打印被点击的元素标签名和 class // 打印被点击的元素标签名和 class
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') { if (event.target.tagName === "IMG" && event.target.className !== "top_icon") {
vant.ImagePreview([event.target.src]) vant.ImagePreview([event.target.src])
} }
}) })
}, },
destroyed() { destroyed() {
window.removeEventListener('scroll', this.scrollToTop) window.removeEventListener("scroll", this.scrollToTop)
}, }
}) })
</script> </script>
@@ -126,7 +126,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="疗休养线路"></van-nav-bar> <van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder title="疗休养线路"></van-nav-bar>
</van-sticky> </van-sticky>
<van-dropdown-menu> <van-dropdown-menu>
@@ -176,7 +176,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="我的疗休养"></van-nav-bar> <van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder title="我的疗休养"></van-nav-bar>
</van-sticky> </van-sticky>
<van-dropdown-menu> <van-dropdown-menu>
@@ -47,7 +47,8 @@ layout("/mobile/platform.html"){
max-height: 200px; max-height: 200px;
} }
.van-image__error, .van-image__loading { .van-image__error,
.van-image__loading {
height: 200px; height: 200px;
position: relative; position: relative;
} }
@@ -63,20 +64,15 @@ layout("/mobile/platform.html"){
right: -8px; right: -8px;
padding: 1px 7px; padding: 1px 7px;
transform: rotate(17deg); transform: rotate(17deg);
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="活动列表" left-arrow placeholder fixed <van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="location.replace('/mobile/index')"></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
<van-dropdown-item v-model="pageForm.year" :options="yearList" <van-dropdown-item v-model="pageForm.year" :options="yearList" @change="formChange"></van-dropdown-item>
@change="formChange"></van-dropdown-item> <van-dropdown-item v-model="pageForm.activityStatus" :options="activityStatusList" @change="formChange"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.activityStatus" :options="activityStatusList"
@change="formChange"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<!-- <van-sticky>--> <!-- <van-sticky>-->
@@ -94,33 +90,52 @@ layout("/mobile/platform.html"){
<!-- </van-sticky>--> <!-- </van-sticky>-->
<div style="margin: 60px auto 80px auto"> <div style="margin: 60px auto 80px auto">
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" <van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
v-if="tableData && tableData.length>0" v-if="tableData && tableData.length>0"
v-model="loading" v-model="loading"
@load="pageData"> @load="pageData"
>
<div v-for="o in tableData" class="van-doc-card"> <div v-for="o in tableData" class="van-doc-card">
<!-- <div class="tag" v-if="moment(o.activitySignUpStartTime).unix() > moment().unix()">即将开始</div>--> <!-- <div class="tag" v-if="moment(o.activitySignUpStartTime).unix() > moment().unix()">即将开始</div>-->
<div> <div>
<div class="tag" style="background-color: #bc62c5" v-if="o.isDisabled">活动未开启</div> <div class="tag" style="background-color: #bc62c5" v-if="o.isDisabled">活动未开启</div>
<div class="tag" v-else-if="!o.isDisabled && moment(o.activitySignUpStartTime).valueOf() > moment().valueOf()">未开始报名</div> <div class="tag" v-else-if="!o.isDisabled && moment(o.activitySignUpStartTime).valueOf() > moment().valueOf()">未开始报名</div>
<div class="tag" v-else-if="!o.isDisabled &&moment(o.activitySignUpEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.activitySignUpStartTime).valueOf()">报名中</div> <div
<div class="tag" style="background-color: #f14646" v-else-if="!o.isDisabled &&moment(o.activityEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityStartTime).valueOf()">报名结束</div> class="tag"
<div class="tag" v-else-if="!o.isDisabled &&moment(o.activityStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityEndTime).valueOf()">活动进行中</div> v-else-if="!o.isDisabled &&moment(o.activitySignUpEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.activitySignUpStartTime).valueOf()"
<div class="tag" style="background-color: #f14646" v-else-if="!o.isDisabled &&moment().valueOf() > moment(o.activityEndTime).valueOf()">活动结束</div> >
报名中
</div>
<div
class="tag"
style="background-color: #f14646"
v-else-if="!o.isDisabled &&moment(o.activityEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityStartTime).valueOf()"
>
报名结束
</div>
<div
class="tag"
v-else-if="!o.isDisabled &&moment(o.activityStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityEndTime).valueOf()"
>
活动进行中
</div>
<div
class="tag"
style="background-color: #f14646"
v-else-if="!o.isDisabled &&moment().valueOf() > moment(o.activityEndTime).valueOf()"
>
活动结束
</div>
</div> </div>
<div @click="welfareClick(o)"> <div @click="welfareClick(o)">
<div> <div>
<van-image :src="CREATE_PREVIEW_URL(o.cover.id)" <van-image :src="CREATE_PREVIEW_URL(o.cover.id)" style="display: contents" v-if="o.cover && o.cover.filepath"></van-image>
style="display: contents" <van-image src="" style="display: contents" v-else></van-image>
v-if="o.cover && o.cover.filepath"></van-image>
<van-image src=""
style="display: contents"
v-else></van-image>
</div> </div>
<div> <div>
<div class="van-ellipsis" style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1"> <div class="van-ellipsis" style="margin-top: 6px; font-size: 15px; font-weight: bold; flex: 1">{{o.activityName}}</div>
{{o.activityName}}
</div>
</div> </div>
<div> <div>
<div class="train-title"> <div class="train-title">
@@ -135,44 +150,45 @@ layout("/mobile/platform.html"){
</div> </div>
<div class="train-title"> <div class="train-title">
<span style="color: grey">报名时间:</span> <span style="color: grey">报名时间:</span>
<span>{{moment(o.activitySignUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + <span>
moment(o.activitySignUpEndTime).format('YYYY-MM-DD HH:mm')}}</span> {{moment(o.activitySignUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
moment(o.activitySignUpEndTime).format('YYYY-MM-DD HH:mm')}}
</span>
</div> </div>
<div style="margin-top: 6px"> <div style="margin-top: 6px">
<span style="color: grey">活动时间:</span> <span style="color: grey">活动时间:</span>
<span>{{moment(o.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + <span>
moment(o.activityEndTime).format('YYYY-MM-DD HH:mm')}}</span> {{moment(o.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(o.activityEndTime).format('YYYY-MM-DD HH:mm')}}
</span>
</div> </div>
</div> </div>
</div> </div>
</van-list> </van-list>
<van-empty v-else description="暂无数据"></van-empty> <van-empty v-else description="暂无数据"></van-empty>
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
tarBarActive: 0, tarBarActive: 0,
type: '', type: "",
pageForm: { pageForm: {
year: '', year: "",
activityStatus: null activityStatus: null
}, },
activityLevelList: [], activityLevelList: [],
activityStatusList: [ activityStatusList: [
{text: '全部', value: 1}, { text: "全部", value: 1 },
// {text: '未开启', value: 5}, // {text: '未开启', value: 5},
{text: '未开始', value: 6}, { text: "未开始", value: 6 },
{text: '报名中', value: 2}, { text: "报名中", value: 2 },
{text: '进行中', value: 3}, { text: "进行中", value: 3 },
{text: '已结束', value: 4} { text: "已结束", value: 4 }
] ]
} }
}, },
@@ -184,23 +200,31 @@ layout("/mobile/platform.html"){
}, },
async welfareClick(o) { async welfareClick(o) {
if (o.isDisabled) { if (o.isDisabled) {
this.$toast('活动未开启') this.$toast("活动未开启")
return; return
} }
if (moment(o.applyStartTime).valueOf() > moment().valueOf()) { if (moment(o.applyStartTime).valueOf() > moment().valueOf()) {
this.$toast('活动未开始报名') this.$toast("活动未开始报名")
return; return
} }
if (this.type === 'my') { if (this.type === "my") {
window.location.href = '/platform/mobile/trainSignUpActivity/trainInfo' + window.location.href =
'?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime + '&type=my' + '&startTime=' + o.activitySignUpStartTime "/platform/mobile/trainSignUpActivity/trainInfo" +
"?activityId=" +
o.id +
"&endTime=" +
o.activitySignUpEndTime +
"&type=my" +
"&startTime=" +
o.activitySignUpStartTime
} else { } else {
window.location.href = '/platform/mobile/trainSignUpActivity/activityInfo?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime window.location.href =
"/platform/mobile/trainSignUpActivity/activityInfo?activityId=" + o.id + "&endTime=" + o.activitySignUpEndTime
} }
}, },
async pageData() { async pageData() {
this.mLoading = true this.mLoading = true
const resp = await $.post('/platform/mobile/trainSignUpActivity/pageData', this.pageForm) const resp = await $.post("/platform/mobile/trainSignUpActivity/pageData", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
if (resp.data.list.length === 0) { if (resp.data.list.length === 0) {
this.tableData = [] this.tableData = []
@@ -215,7 +239,7 @@ layout("/mobile/platform.html"){
this.pageForm.pageNumber++ this.pageForm.pageNumber++
} }
} }
this.loading = false; this.loading = false
this.mLoading = false this.mLoading = false
}, },
tabChange(val) { tabChange(val) {
@@ -233,7 +257,7 @@ layout("/mobile/platform.html"){
}, },
async created() { async created() {
await this.init() await this.init()
this.type = GetQueryString('type') this.type = GetQueryString("type")
this.pageForm.type = this.type this.pageForm.type = this.type
this.startLoading() this.startLoading()
// this.pageForm.activityStatus = this.type === 'my' ? '3' : '1' // this.pageForm.activityStatus = this.type === 'my' ? '3' : '1'
@@ -3,9 +3,8 @@ layout("/mobile/platform.html"){
#--> #-->
<style> <style>
#app { #app {
background: #FFFFFF; background: #ffffff;
} }
.topTitle { .topTitle {
@@ -26,61 +25,42 @@ layout("/mobile/platform.html"){
line-height: 30px; line-height: 30px;
} }
.newest-video, .nav-button { .newest-video,
.nav-button {
padding: 0 20px; padding: 0 20px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="视频资料" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="视频资料"
left-arrow
placeholder
fixed
@click-left="window.history.back()"
></van-nav-bar>
<div class="newest-video"> <div class="newest-video">
<h4>{{typeName}}</h4> <h4>{{typeName}}</h4>
</div> </div>
<div class="nav-button"> <div class="nav-button">
<van-button type="info" :plain="pageForm.searchType !== 'new'" size="small" @click="searchTypeClick('new')"> <van-button type="info" :plain="pageForm.searchType !== 'new'" size="small" @click="searchTypeClick('new')">最新视频</van-button>
最新视频 <van-button type="info" :plain="pageForm.searchType !== 'most'" size="small" @click="searchTypeClick('most')">播放最多</van-button>
</van-button> <van-button type="info" :plain="pageForm.searchType !== null" size="small" @click="searchTypeClick(null)">全部</van-button>
<van-button type="info" :plain="pageForm.searchType !== 'most'" size="small" @click="searchTypeClick('most')">
播放最多
</van-button>
<van-button type="info" :plain="pageForm.searchType !== null" size="small" @click="searchTypeClick(null)">全部
</van-button>
</div> </div>
<van-divider></van-divider> <van-divider></van-divider>
<div style="margin: 20px auto 0 auto; position: relative"> <div style="margin: 20px auto 0 auto; position: relative">
<van-list v-model="loading" <van-list
v-model="loading"
:finished="finished" :finished="finished"
:finished-text="tableData.length>0?'没有更多了':''" :finished-text="tableData.length>0?'没有更多了':''"
:immediate-check="false" :immediate-check="false"
@load="pageData"> @load="pageData"
>
<div v-for="o in tableData" class="list-card" @click="goVideoPage(o)"> <div v-for="o in tableData" class="list-card" @click="goVideoPage(o)">
<div style="display: flex; padding-bottom: 10px" class="van-hairline--bottom"> <div style="display: flex; padding-bottom: 10px" class="van-hairline--bottom">
<van-image <van-image style="margin-right: 10px" width="90" height="90" :src="FILE_DOMAIN+'/fileStreamPreview?id='+o.cover"></van-image>
style="margin-right: 10px"
width="90"
height="90"
:src="FILE_DOMAIN+'/fileStreamPreview?id='+o.cover"
></van-image>
<div class="list-item"> <div class="list-item">
<div style="font-size: 14px">{{o.title}}</div> <div style="font-size: 14px">{{o.title}}</div>
<div class="van-ellipsis" style="color: darkgray;font-size: 13px"> <div class="van-ellipsis" style="color: darkgray; font-size: 13px">{{removeHTMLTag(o.description)}}</div>
{{removeHTMLTag(o.description)}}
</div>
<div> <div>
<van-tag plain type="primary">{{o.videoCount}}个视频</van-tag> <van-tag plain type="primary">{{o.videoCount}}个视频</van-tag>
</div> </div>
@@ -90,19 +70,14 @@ layout("/mobile/platform.html"){
</van-list> </van-list>
</div> </div>
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
description="暂无数据">
</van-empty>
</div> </div>
<script> <script>
<!--#include("/platform/trainEdu/include/include.js"){}#--> <!--#include("/platform/trainEdu/include/include.js"){}#-->
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -116,7 +91,7 @@ layout("/mobile/platform.html"){
methods: { methods: {
async pageData() { async pageData() {
this.mLoading = true this.mLoading = true
const {data} = await $.get('/mobile/trainEducation/getAlbumList', this.pageForm) const { data } = await $.get("/mobile/trainEducation/getAlbumList", this.pageForm)
setTimeout(() => { setTimeout(() => {
this.tableData = this.tableData.concat(data.list) this.tableData = this.tableData.concat(data.list)
if (this.tableData.length === data.totalCount) { if (this.tableData.length === data.totalCount) {
@@ -140,16 +115,16 @@ layout("/mobile/platform.html"){
this.pageData() this.pageData()
}, },
goVideoPage(item) { goVideoPage(item) {
window.location.href = '/mobile/trainEducation/videoPage?id=' + item.id window.location.href = "/mobile/trainEducation/videoPage?id=" + item.id
} }
}, },
async created() { async created() {
this.videoTypeList = await getVideoType() this.videoTypeList = await getVideoType()
const typeId = this.GetQueryString("id") const typeId = this.GetQueryString("id")
const type = this.videoTypeList.find(v => parseInt(v.id) === parseInt(typeId)) const type = this.videoTypeList.find((v) => parseInt(v.id) === parseInt(typeId))
this.typeName = type.typeName this.typeName = type.typeName
if (typeId) { if (typeId) {
this.$set(this.pageForm, 'typeId', typeId) this.$set(this.pageForm, "typeId", typeId)
await this.pageData() await this.pageData()
} }
} }
@@ -23,33 +23,25 @@ layout("/mobile/platform.html"){
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="培训教育" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="培训教育"
left-arrow
placeholder
fixed
@click-left="history.back()"
></van-nav-bar>
<van-swiper> <van-swiper>
<van-swiper-item> <van-swiper-item>
<van-image <van-image fit="contain" :src="topImg" alt=""></van-image>
fit="contain"
:src="topImg" alt="">
</van-image>
</van-swiper-item> </van-swiper-item>
</van-swiper> </van-swiper>
<van-grid :column-num="3" :border="false"> <van-grid :column-num="3" :border="false">
<van-grid-item v-for="item in videoTypeList" <van-grid-item
v-for="item in videoTypeList"
:url="'/mobile/trainEducation/AlbumList?id=' + item.id" :url="'/mobile/trainEducation/AlbumList?id=' + item.id"
:key="item.id" :key="item.id"
:icon="FILE_DOMAIN+'/fileStreamPreview?id='+item.icon" :icon="FILE_DOMAIN+'/fileStreamPreview?id='+item.icon"
:text="item.typeName"></van-grid-item> :text="item.typeName"
></van-grid-item>
</van-grid> </van-grid>
<div style="height: 5px; background-color: #f6f7f9"></div> <div style="height: 5px; background-color: #f6f7f9"></div>
@@ -60,54 +52,44 @@ layout("/mobile/platform.html"){
<div v-for="o in tableData" class="list-card" @click="goVideoPage(o)"> <div v-for="o in tableData" class="list-card" @click="goVideoPage(o)">
<div style="display: flex; padding-bottom: 10px" class="van-hairline--bottom"> <div style="display: flex; padding-bottom: 10px" class="van-hairline--bottom">
<van-image <van-image style="margin-right: 10px" width="90" height="90" :src="FILE_DOMAIN+'/fileStreamPreview?id='+o.cover"></van-image>
style="margin-right: 10px"
width="90"
height="90"
:src="FILE_DOMAIN+'/fileStreamPreview?id='+o.cover"
></van-image>
<div class="list-item"> <div class="list-item">
<div style="font-size: 14px">{{o.title}}</div> <div style="font-size: 14px">{{o.title}}</div>
<div class="van-ellipsis" style="color: darkgray;font-size: 13px"> <div class="van-ellipsis" style="color: darkgray; font-size: 13px">{{removeHTMLTag(o.description)}}</div>
{{removeHTMLTag(o.description)}}
</div>
<div> <div>
<van-tag plain type="primary">{{o.videoCount}}个视频</van-tag> <van-tag plain type="primary">{{o.videoCount}}个视频</van-tag>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script> <script>
<!--#include("/platform/trainEdu/include/include.js"){}#--> <!--#include("/platform/trainEdu/include/include.js"){}#-->
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
videoTypeList: [], videoTypeList: [],
topImg: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F05%2F55%2F78%2F725b1593ced0c43.jpg&refer=http%3A%2F%2Fbpic.588ku.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642838257&t=cce87815db1b5e740bce9dc9357c7eaa' topImg: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F05%2F55%2F78%2F725b1593ced0c43.jpg&refer=http%3A%2F%2Fbpic.588ku.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642838257&t=cce87815db1b5e740bce9dc9357c7eaa"
} }
}, },
methods: { methods: {
goVideoPage(item) { goVideoPage(item) {
window.location.href = '/mobile/trainEducation/videoPage?id=' + item.id window.location.href = "/mobile/trainEducation/videoPage?id=" + item.id
}, },
async getNewVideo() { async getNewVideo() {
this.tableData = [] this.tableData = []
const {data} = await $.get('/mobile/trainEducation/getNewestVideo') const { data } = await $.get("/mobile/trainEducation/getNewestVideo")
this.tableData.push(data) this.tableData.push(data)
} }
}, },
async created() { async created() {
const videoTypeList = await getVideoType() const videoTypeList = await getVideoType()
if (videoTypeList.length > 0) { if (videoTypeList.length > 0) {
videoTypeList.map(v => { videoTypeList.map((v) => {
if (v.files) { if (v.files) {
v.icon = JSON.parse(v.files)[0].id v.icon = JSON.parse(v.files)[0].id
} }
@@ -11,7 +11,7 @@ layout("/mobile/platform.html"){
<style> <style>
#app { #app {
background: #FFFFFF; background: #ffffff;
} }
.video-container { .video-container {
@@ -57,39 +57,22 @@ layout("/mobile/platform.html"){
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar <van-nav-bar title="" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title=""
left-arrow
placeholder
fixed
@click-left="window.history.back()"
></van-nav-bar>
<div class="video-container"> <div class="video-container">
<video v-if="isPlay" id="player-container-id" preload="auto" playsinline <video v-if="isPlay" id="player-container-id" preload="auto" playsinline webkit-playsinline></video>
webkit-playsinline>
</video>
<van-image
v-else
style="width: 100%;height: 100%"
:src="FILE_DOMAIN+'/fileStreamPreview?id='+albumInfo.cover"
></van-image>
<van-image v-else style="width: 100%; height: 100%" :src="FILE_DOMAIN+'/fileStreamPreview?id='+albumInfo.cover"></van-image>
</div> </div>
<van-tabs v-model="tabIndex" sticky> <van-tabs v-model="tabIndex" sticky>
<van-tab title="介绍"> <van-tab title="介绍">
<div style="height: 5px; background-color: #f6f7f9"></div> <div style="height: 5px; background-color: #f6f7f9"></div>
<div style="padding: 16px"> <div style="padding: 16px">{{albumInfo.title}}</div>
{{albumInfo.title}}
</div>
<div style="height: 5px; background-color: #f6f7f9"></div> <div style="height: 5px; background-color: #f6f7f9"></div>
@@ -101,7 +84,6 @@ layout("/mobile/platform.html"){
<div class="album-description" v-html="albumInfo.description"></div> <div class="album-description" v-html="albumInfo.description"></div>
</template> </template>
</van-cell> </van-cell>
</van-tab> </van-tab>
<van-tab title="目录"> <van-tab title="目录">
<div style="height: 5px; background-color: #f6f7f9"></div> <div style="height: 5px; background-color: #f6f7f9"></div>
@@ -110,20 +92,12 @@ layout("/mobile/platform.html"){
<van-cell v-for="(o,i) in videoList" @click="playVideo(o)"> <van-cell v-for="(o,i) in videoList" @click="playVideo(o)">
<template #title> <template #title>
<van-tag plain type="primary" style="margin-right: 10px">视频</van-tag> <van-tag plain type="primary" style="margin-right: 10px">视频</van-tag>
<span style="margin-right: 10px"> <span style="margin-right: 10px">{{i+1}}.</span>
{{i+1}}. <span>{{o.title}}</span>
</span>
<span>
{{o.title}}
</span>
</template>
<template #label>
{{getWatchStatus(o)}}
</template> </template>
<template #label>{{getWatchStatus(o)}}</template>
<template> <template>
<span v-if="o.id === currentVideo.id"> <span v-if="o.id === currentVideo.id">播放中</span>
播放中
</span>
</template> </template>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
@@ -137,15 +111,13 @@ layout("/mobile/platform.html"){
<!-- </van-cell>--> <!-- </van-cell>-->
<!-- </van-tab>--> <!-- </van-tab>-->
</van-tabs> </van-tabs>
</div> </div>
<script> <script>
let player = null let player = null
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -160,17 +132,15 @@ layout("/mobile/platform.html"){
watchRecordList: [], watchRecordList: [],
lastTime: 0, lastTime: 0,
isPlay: false isPlay: false
} }
}, },
methods: { methods: {
async getVideoInfo() { async getVideoInfo() {
const {data} = await $.get('/mobile/trainEducation/getVideoList', {albumId: this.albumId}) const { data } = await $.get("/mobile/trainEducation/getVideoList", { albumId: this.albumId })
this.videoList = data this.videoList = data
}, },
async getAlbumInfo() { async getAlbumInfo() {
const {data} = await $.get('/mobile/trainEducation/getAlbumInfo', {id: this.albumId}) const { data } = await $.get("/mobile/trainEducation/getAlbumInfo", { id: this.albumId })
this.albumInfo = data this.albumInfo = data
}, },
//播放视频 //播放视频
@@ -180,17 +150,16 @@ layout("/mobile/platform.html"){
this.$nextTick(() => { this.$nextTick(() => {
if (!player) { if (!player) {
player = TCPlayer('player-container-id', {}) player = TCPlayer("player-container-id", {})
} }
player.src(o.mediaUrl) player.src(o.mediaUrl)
}) })
// await this.addWatchRecord() // await this.addWatchRecord()
await this.getMyWatchRecord() await this.getMyWatchRecord()
//接着上次继续看 //接着上次继续看
const v = this.watchRecordList.find(v => v.videoId === o.id) const v = this.watchRecordList.find((v) => v.videoId === o.id)
if (v) { if (v) {
this.lastTime = v.watchDuration this.lastTime = v.watchDuration
setTimeout(() => { setTimeout(() => {
@@ -211,14 +180,14 @@ layout("/mobile/platform.html"){
//快进 快退 //快进 快退
playSeeked() { playSeeked() {
player.on('seeked', () => { player.on("seeked", () => {
this.lastTime = player.currentTime() this.lastTime = player.currentTime()
this.addWatchRecord() this.addWatchRecord()
}) })
}, },
playTimeUpdate() { playTimeUpdate() {
this.lastTime = player.currentTime() this.lastTime = player.currentTime()
player.on('timeupdate', () => { player.on("timeupdate", () => {
const nowTime = player.currentTime() const nowTime = player.currentTime()
if (nowTime - this.lastTime > 5) { if (nowTime - this.lastTime > 5) {
this.lastTime = nowTime this.lastTime = nowTime
@@ -227,16 +196,16 @@ layout("/mobile/platform.html"){
}) })
}, },
playPause() { playPause() {
player.on('pause', () => { player.on("pause", () => {
this.addWatchRecord() this.addWatchRecord()
}) })
}, },
playEnd() { playEnd() {
player.on('ended', () => { player.on("ended", () => {
this.addWatchRecord() this.addWatchRecord()
this.getMyWatchRecord() this.getMyWatchRecord()
const currentIndex = this.videoList.findIndex(v => v.id === this.currentVideo.id) const currentIndex = this.videoList.findIndex((v) => v.id === this.currentVideo.id)
const nextVideo = this.videoList[currentIndex + 1] const nextVideo = this.videoList[currentIndex + 1]
if (nextVideo) { if (nextVideo) {
this.playVideo(nextVideo) this.playVideo(nextVideo)
@@ -254,12 +223,12 @@ layout("/mobile/platform.html"){
currentTime: parseInt(player.currentTime()), currentTime: parseInt(player.currentTime()),
albumId: this.currentVideo.albumId albumId: this.currentVideo.albumId
} }
await $.post('/mobile/trainEducation/addWatchRecord', params) await $.post("/mobile/trainEducation/addWatchRecord", params)
}, },
//监听页面关闭 隐藏 //监听页面关闭 隐藏
watchPage() { watchPage() {
document.addEventListener('visibilitychange', () => { document.addEventListener("visibilitychange", () => {
if (document.visibilityState === 'hidden') { if (document.visibilityState === "hidden") {
if (player && this.currentVideo) { if (player && this.currentVideo) {
this.addWatchRecord() this.addWatchRecord()
} }
@@ -267,18 +236,18 @@ layout("/mobile/platform.html"){
}) })
}, },
async getMyWatchRecord() { async getMyWatchRecord() {
const {data} = await $.get('/mobile/trainEducation/getMyWatchRecord') const { data } = await $.get("/mobile/trainEducation/getMyWatchRecord")
this.watchRecordList = data this.watchRecordList = data
}, },
getWatchStatus(video) { getWatchStatus(video) {
const v = this.watchRecordList.find(v => v.videoId === video.id) const v = this.watchRecordList.find((v) => v.videoId === video.id)
if (!v) { if (!v) {
return '学习进度:还未开始学习' return "学习进度:还未开始学习"
} }
if (v.videoId === this.currentVideo.id) { if (v.videoId === this.currentVideo.id) {
return '学习进度:正在学习中' return "学习进度:正在学习中"
} }
const percentage = (parseInt((v.watchDuration / (video.fileDuration - 1)).toFixed(2) * 100)) + "%" const percentage = parseInt((v.watchDuration / (video.fileDuration - 1)).toFixed(2) * 100) + "%"
return "学习进度:" + percentage return "学习进度:" + percentage
} }
}, },
@@ -291,7 +260,6 @@ layout("/mobile/platform.html"){
this.getVideoInfo() this.getVideoInfo()
this.getMyWatchRecord() this.getMyWatchRecord()
} }
} }
}) })
</script> </script>
@@ -27,7 +27,7 @@ layout("/mobile/platform.html"){
} }
</style> </style>
<div id="app"> <div id="app">
<van-nav-bar title="民主测评列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="民主测评列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
@@ -26,7 +26,7 @@ layout("/mobile/platform.html"){
} }
.van-collapse-item .van-cell__title :before { .van-collapse-item .van-cell__title :before {
content: ''; content: "";
display: inline-block; display: inline-block;
height: 15px; height: 15px;
background-color: #0e5996; background-color: #0e5996;
@@ -56,13 +56,11 @@ layout("/mobile/platform.html"){
.van-button { .van-button {
height: 40px; height: 40px;
margin: 6px 20px margin: 6px 20px;
} }
</style> </style>
<div id="app"> <div id="app">
<van-nav-bar title="民主测评" left-arrow placeholder fixed <van-nav-bar title="民主测评" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.back()"></van-nav-bar>
<div> <div>
<van-form ref="addForm" :show-error-message="false" style="margin-bottom: 60px"> <van-form ref="addForm" :show-error-message="false" style="margin-bottom: 60px">
@@ -74,11 +72,11 @@ layout("/mobile/platform.html"){
<!-- v-for测评指标 --> <!-- v-for测评指标 -->
<div v-for="item in o.bzs" style="margin-top: 10px" class="content_div"> <div v-for="item in o.bzs" style="margin-top: 10px" class="content_div">
<div> <div>
<div style="font-size: 15px;color: black"> <div style="font-size: 15px; color: black">{{item.contentNumber}}、{{item.inspection}}</div>
{{item.contentNumber}}、{{item.inspection}}
</div>
<van-row> <van-row>
<div style="font-size: 15px;text-align: right;margin-right: 30px;margin-bottom:-4px">标准分:{{item.score}}</div> <div style="font-size: 15px; text-align: right; margin-right: 30px; margin-bottom: -4px">
标准分:{{item.score}}
</div>
</van-row> </van-row>
<van-field <van-field
v-model="item.resultScore" v-model="item.resultScore"
@@ -92,7 +90,8 @@ layout("/mobile/platform.html"){
:rules="[{ required: true, message: '请填写测评分' }]" :rules="[{ required: true, message: '请填写测评分' }]"
></van-field> ></van-field>
<van-field v-if="item.isEvidence" <van-field
v-if="item.isEvidence"
v-model="item.options" v-model="item.options"
name="意见或建议" name="意见或建议"
label="意见或建议" label="意见或建议"
@@ -102,27 +101,28 @@ layout("/mobile/platform.html"){
</div> </div>
</div> </div>
</van-collapse-item> </van-collapse-item>
</div> </div>
</div> </div>
<div v-if="commentatorData.scoringMode==2"> <div v-if="commentatorData.scoringMode==2">
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
<van-dropdown-item v-model="president" :options="presidentList" <van-dropdown-item v-model="president" :options="presidentList" @change="presidentChange"></van-dropdown-item>
@change="presidentChange"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div v-for="o in commentatorData.nrs" style="margin: 60px auto 0 auto"> <div v-for="o in commentatorData.nrs" style="margin: 60px auto 0 auto">
<div v-for="item in o.bzs"> <div v-for="item in o.bzs">
<div class="van-doc-card"> <div class="van-doc-card">
<div style="font-size: 15px;color: black">{{item.contentNumber}}、{{item.inspection}} <div style="font-size: 15px; color: black">{{item.contentNumber}}、{{item.inspection}}</div>
</div>
<van-field name="radio" label="满意度" style="padding: 12px 2px; margin: 5px"> <van-field name="radio" label="满意度" style="padding: 12px 2px; margin: 5px">
<template #input> <template #input>
<van-radio-group style="margin-left: -20px" v-model="item.resultScore" :disabled="isReadOnly" direction="horizontal"> <van-radio-group
style="margin-left: -20px"
v-model="item.resultScore"
:disabled="isReadOnly"
direction="horizontal"
>
<van-radio name="满意">满意</van-radio> <van-radio name="满意">满意</van-radio>
<van-radio name="基本满意">基本满意</van-radio> <van-radio name="基本满意">基本满意</van-radio>
<van-radio name="不满意">不满意</van-radio> <van-radio name="不满意">不满意</van-radio>
@@ -148,9 +148,7 @@ layout("/mobile/platform.html"){
</div> </div>
</div> </div>
</van-collapse> </van-collapse>
</van-form> </van-form>
</div> </div>
<div> <div>
@@ -159,90 +157,88 @@ layout("/mobile/platform.html"){
<van-button id="buttonSub" :disabled="isShowSubmit" round block type="info" @click="onSubmit">提交</van-button> <van-button id="buttonSub" :disabled="isShowSubmit" round block type="info" @click="onSubmit">提交</van-button>
</van-tabbar> </van-tabbar>
</div> </div>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
data() { data() {
return { return {
id: "", id: "",
activeNames: '', activeNames: "",
commentatorData: {}, commentatorData: {},
reviewResult: null, reviewResult: null,
presidentOpinions: '', presidentOpinions: "",
bzList: [], bzList: [],
president: '', president: "",
presidentList: [], presidentList: [],
userList: [], userList: [],
isShowSubmit: false, isShowSubmit: false,
isReadOnly:false, isReadOnly: false
} }
}, },
methods: { methods: {
async getCommentById() { async getCommentById() {
const resp = await $.get('/mobile/unioncomment/appraisal/getById', {id: this.id}) const resp = await $.get("/mobile/unioncomment/appraisal/getById", { id: this.id })
if (resp.code === 0) { if (resp.code === 0) {
this.commentatorData = resp.data this.commentatorData = resp.data
if (this.commentatorData.assessmentMode === 2) { if (this.commentatorData.assessmentMode === 2) {
this.commentatorData.nrs.forEach(v => { this.commentatorData.nrs.forEach((v) => {
v.bzs.forEach(o => { v.bzs.forEach((o) => {
o.resultScore = '满意' o.resultScore = "满意"
}) })
}) })
await this.getPresidents(); await this.getPresidents()
} }
this.activeNames = this.commentatorData.nrs[0].id this.activeNames = this.commentatorData.nrs[0].id
} }
}, },
async assignment() { async assignment() {
const self = this; const self = this
this.bzList = []; this.bzList = []
this.commentatorData.nrs.forEach(v => { this.commentatorData.nrs.forEach((v) => {
v.bzs.forEach(o => { v.bzs.forEach((o) => {
self.bzList.push(o) self.bzList.push(o)
}) })
}) })
}, },
async onSubmit() { async onSubmit() {
this.$refs['addForm'].validate().then(async () => { this.$refs["addForm"].validate().then(async () => {
await this.$dialog.confirm({ await this.$dialog.confirm({
title: '确定要提交该测评结果吗?', title: "确定要提交该测评结果吗?",
message: '提交后不可修改,请仔细检查后提交' message: "提交后不可修改,请仔细检查后提交"
}) })
await this.assignment(); await this.assignment()
let evaluatedPersonName=null; let evaluatedPersonName = null
let evaluatedPersonType=null; let evaluatedPersonType = null
if (this.commentatorData.assessmentMode === 1) { if (this.commentatorData.assessmentMode === 1) {
let score = 0; let score = 0
this.bzList.forEach(v => { this.bzList.forEach((v) => {
score += Number(v.resultScore) score += Number(v.resultScore)
}) })
if (score >= Number(80)) { if (score >= Number(80)) {
this.reviewResult = '满意' this.reviewResult = "满意"
} else if (score >= Number(60) && score <= Number(79)) { } else if (score >= Number(60) && score <= Number(79)) {
this.reviewResult = '基本满意' this.reviewResult = "基本满意"
} else { } else {
this.reviewResult = '不满意' this.reviewResult = "不满意"
} }
} else if (this.commentatorData.assessmentMode === 2) { } else if (this.commentatorData.assessmentMode === 2) {
const result = this.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意') const result = this.bzList.filter((v) => v.resultScore === "满意" || v.resultScore === "基本满意")
if (result.length >= 8) { if (result.length >= 8) {
this.reviewResult = '满意' this.reviewResult = "满意"
} else if (result.length >= 6 && result.length <= 7) { } else if (result.length >= 6 && result.length <= 7) {
this.reviewResult = '基本满意' this.reviewResult = "基本满意"
} else { } else {
this.reviewResult = '不满意' this.reviewResult = "不满意"
} }
const user = this.userList.find(v=> v.id === this.president) const user = this.userList.find((v) => v.id === this.president)
evaluatedPersonName = user.username evaluatedPersonName = user.username
evaluatedPersonType = user.evaluatedPersonType evaluatedPersonType = user.evaluatedPersonType
} }
const resp = await $.post('/mobile/unioncomment/appraisal/doSubmit', { const resp = await $.post("/mobile/unioncomment/appraisal/doSubmit", {
data: JSON.stringify(this.bzList), data: JSON.stringify(this.bzList),
id: this.id, id: this.id,
reviewResult: this.reviewResult, reviewResult: this.reviewResult,
@@ -252,90 +248,90 @@ layout("/mobile/platform.html"){
presidentOpinions: this.presidentOpinions presidentOpinions: this.presidentOpinions
}) })
if (resp.code === 0) { if (resp.code === 0) {
await this.getCommentById(); await this.getCommentById()
window.location.href = '/mobile/unioncomment/appraisal/mine' window.location.href = "/mobile/unioncomment/appraisal/mine"
} }
}) })
}, },
async showAssess() { async showAssess() {
this.$refs['addForm'].validate().then(async () => { this.$refs["addForm"].validate().then(async () => {
let score = 0; let score = 0
await this.assignment(); await this.assignment()
if (this.commentatorData.assessmentMode === 1) { if (this.commentatorData.assessmentMode === 1) {
this.bzList.forEach(v => { this.bzList.forEach((v) => {
score += Number(v.resultScore) score += Number(v.resultScore)
}) })
if (score >= Number(80)) { if (score >= Number(80)) {
this.reviewResult = '满意' this.reviewResult = "满意"
} else if (score >= Number(60) && score <= Number(79)) { } else if (score >= Number(60) && score <= Number(79)) {
this.reviewResult = '基本满意' this.reviewResult = "基本满意"
} else { } else {
this.reviewResult = '不满意' this.reviewResult = "不满意"
} }
console.log(score) console.log(score)
console.log(this.reviewResult) console.log(this.reviewResult)
vant.Dialog.alert({ vant.Dialog.alert({
title: '测评结果', title: "测评结果",
message: '您的测评分数为【' + score + "】分,测评结果为【" + this.reviewResult + "】", message: "您的测评分数为【" + score + "】分,测评结果为【" + this.reviewResult + "】",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
} else if (this.commentatorData.assessmentMode === 2) { } else if (this.commentatorData.assessmentMode === 2) {
const result = this.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意') const result = this.bzList.filter((v) => v.resultScore === "满意" || v.resultScore === "基本满意")
if (result.length >= 8) { if (result.length >= 8) {
this.reviewResult = '满意' this.reviewResult = "满意"
} else if (result.length >= 6 && result.length <= 7) { } else if (result.length >= 6 && result.length <= 7) {
this.reviewResult = '基本满意' this.reviewResult = "基本满意"
} else { } else {
this.reviewResult = '不满意' this.reviewResult = "不满意"
} }
console.log(result) console.log(result)
console.log(this.reviewResult) console.log(this.reviewResult)
vant.Dialog.alert({ vant.Dialog.alert({
title: '测评结果', title: "测评结果",
message: '您的满意或基本满意个数为【' + result.length + "】个,测评结果为【" + this.reviewResult + "】", message: "您的满意或基本满意个数为【" + result.length + "】个,测评结果为【" + this.reviewResult + "】",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
} }
}) })
}, },
changeScore(item) { changeScore(item) {
if (Number(item.score) < Number(item.resultScore)) { if (Number(item.score) < Number(item.resultScore)) {
item.resultScore = null; item.resultScore = null
vant.Toast('测评分不能超过标准分!') vant.Toast("测评分不能超过标准分!")
} }
}, },
async getPresidents() { async getPresidents() {
const resp = await $.get('/mobile/unioncomment/appraisal/getPresidents') const resp = await $.get("/mobile/unioncomment/appraisal/getPresidents")
if (resp.code === 0) { if (resp.code === 0) {
this.userList = resp.data this.userList = resp.data
this.userList.forEach(v => { this.userList.forEach((v) => {
this.presidentList.push({ value: v.id, text: v.presidents }) this.presidentList.push({ value: v.id, text: v.presidents })
}) })
} }
this.president = this.presidentList[0].value this.president = this.presidentList[0].value
await this.presidentChange(); await this.presidentChange()
}, },
async presidentChange() { async presidentChange() {
const resp = await $.get('/mobile/unioncomment/appraisal/isAssess', { const resp = await $.get("/mobile/unioncomment/appraisal/isAssess", {
id: this.id, id: this.id,
evaluatedPersonId: this.president, evaluatedPersonId: this.president
}) })
if (resp.data > 0) { if (resp.data > 0) {
vant.Dialog.alert({ vant.Dialog.alert({
title: '提示', title: "提示",
message: '您已经评测过该主席(副主席),请在【我的评测】中查看结果,或更换主席(副主席)进行测评', message: "您已经评测过该主席(副主席),请在【我的评测】中查看结果,或更换主席(副主席)进行测评",
confirmButtonColor: '#1867b0' confirmButtonColor: "#1867b0"
}) })
this.isShowSubmit = true; this.isShowSubmit = true
this.isReadOnly = true this.isReadOnly = true
} }
}, }
}, },
async created() { async created() {
this.id = GetQueryString('id') this.id = GetQueryString("id")
await this.getCommentById(); await this.getCommentById()
} }
}); })
</script> </script>
<!--# <!--#
} }
@@ -46,7 +46,7 @@ layout("/mobile/platform.html"){
} }
</style> </style>
<div id="app"> <div id="app">
<van-nav-bar title="我的测评" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="我的测评" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<div> <div>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
@@ -22,7 +22,7 @@ layout("/mobile/platform.html"){
.welfare_card .name { .welfare_card .name {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
align-items: center align-items: center;
} }
.welfare_card .footer { .welfare_card .footer {
@@ -47,10 +47,8 @@ layout("/mobile/platform.html"){
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar title="福利列表" left-arrow <van-nav-bar title="福利列表" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.go(-1)"></van-nav-bar>
</van-sticky> </van-sticky>
<van-sticky> <van-sticky>
@@ -61,48 +59,70 @@ layout("/mobile/platform.html"){
</van-sticky> </van-sticky>
<template v-if="vLoading && !vLoading.value"> <template v-if="vLoading && !vLoading.value">
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" <van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
v-if="tableData && tableData.length>0" v-if="tableData && tableData.length>0"
v-model="loading" v-model="loading"
@load="pageData"> @load="pageData"
>
<template v-for="item in tableData" :key="item.id"> <template v-for="item in tableData" :key="item.id">
<div class="welfare_card" @click="welfareClick(item)"> <div class="welfare_card" @click="welfareClick(item)">
<div class="cover"> <div class="cover">
<van-image v-if="item.cover" :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.cover"></van-image> <van-image v-if="item.cover" :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.cover"></van-image>
<van-image v-else src="/assets/mobile/svg/welfare/welfareHome.svg" fit="contain"></van-image> <van-image v-else src="/assets/mobile/svg/welfare/welfareHome.svg" fit="contain"></van-image>
</div> </div>
<div class="name"> <div class="name">
<svg t="1715150952924" class="icon" viewBox="0 0 1024 1024" version="1.1" <svg
xmlns="http://www.w3.org/2000/svg" p-id="4175" width="20" height="20"> t="1715150952924"
<path d="M513.2288 510.72m-450.816 0a450.816 450.816 0 1 0 901.632 0 450.816 450.816 0 1 0-901.632 0Z" class="icon"
fill="#FFE1E9" p-id="4176"></path> viewBox="0 0 1024 1024"
<path d="M777.8304 321.6896h-198.4512l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.712 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v238.7456c0 45.1072 36.608 81.7152 81.7152 81.7152h301.2096c45.1072 0 81.7152-36.608 81.7152-81.7152V476.3136h27.2384c19.712 0 35.6352-15.9744 35.6352-35.6352V357.376a35.6864 35.6864 0 0 0-35.6864-35.6864z m-230.2464 342.0672c0 16.1792-13.1072 29.2864-29.2864 29.2864s-29.2864-13.1072-29.2864-29.2864v-97.7408c0-16.1792 13.1072-29.2864 29.2864-29.2864s29.2864 13.1072 29.2864 29.2864v97.7408z" version="1.1"
fill="#FF3369" p-id="4177"></path> xmlns="http://www.w3.org/2000/svg"
<path d="M776.6016 321.6896h-197.2224l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v238.7456c0 45.1072 36.608 81.7152 81.7152 81.7152H432.64c146.6368-31.8976 265.9328-136.7552 318.0032-274.7392v-45.7216h14.4896a442.2656 442.2656 0 0 0 11.4688-154.5728z m-229.0176 342.0672c0 16.1792-13.1072 29.2864-29.2864 29.2864-16.1792 0-29.2864-13.1072-29.2864-29.2864v-97.7408c0-16.1792 13.1072-29.2864 29.2864-29.2864 16.1792 0 29.2864 13.1072 29.2864 29.2864v97.7408z" p-id="4175"
fill="#FF4D7C" p-id="4178"></path> width="20"
<path d="M579.3792 321.6896l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v169.0624c76.6464-11.8272 146.688-43.52 204.9024-89.4976a29.27616 29.27616 0 0 1 22.1696-18.5856c62.8224-56.6784 109.2096-131.1744 131.1744-215.552h-64.8704z" height="20"
fill="#FF5F89" p-id="4179"></path> >
<path d="M488.3456 275.3024L436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 14.4384 8.6016 26.8288 20.8896 32.4096 103.68-33.7408 190.464-105.0112 244.3264-197.7344z" <path
fill="#FF7196" p-id="4180"></path> d="M513.2288 510.72m-450.816 0a450.816 450.816 0 1 0 901.632 0 450.816 450.816 0 1 0-901.632 0Z"
fill="#FFE1E9"
p-id="4176"
></path>
<path
d="M777.8304 321.6896h-198.4512l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.712 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v238.7456c0 45.1072 36.608 81.7152 81.7152 81.7152h301.2096c45.1072 0 81.7152-36.608 81.7152-81.7152V476.3136h27.2384c19.712 0 35.6352-15.9744 35.6352-35.6352V357.376a35.6864 35.6864 0 0 0-35.6864-35.6864z m-230.2464 342.0672c0 16.1792-13.1072 29.2864-29.2864 29.2864s-29.2864-13.1072-29.2864-29.2864v-97.7408c0-16.1792 13.1072-29.2864 29.2864-29.2864s29.2864 13.1072 29.2864 29.2864v97.7408z"
fill="#FF3369"
p-id="4177"
></path>
<path
d="M776.6016 321.6896h-197.2224l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v238.7456c0 45.1072 36.608 81.7152 81.7152 81.7152H432.64c146.6368-31.8976 265.9328-136.7552 318.0032-274.7392v-45.7216h14.4896a442.2656 442.2656 0 0 0 11.4688-154.5728z m-229.0176 342.0672c0 16.1792-13.1072 29.2864-29.2864 29.2864-16.1792 0-29.2864-13.1072-29.2864-29.2864v-97.7408c0-16.1792 13.1072-29.2864 29.2864-29.2864 16.1792 0 29.2864 13.1072 29.2864 29.2864v97.7408z"
fill="#FF4D7C"
p-id="4178"
></path>
<path
d="M579.3792 321.6896l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v169.0624c76.6464-11.8272 146.688-43.52 204.9024-89.4976a29.27616 29.27616 0 0 1 22.1696-18.5856c62.8224-56.6784 109.2096-131.1744 131.1744-215.552h-64.8704z"
fill="#FF5F89"
p-id="4179"
></path>
<path
d="M488.3456 275.3024L436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 14.4384 8.6016 26.8288 20.8896 32.4096 103.68-33.7408 190.464-105.0112 244.3264-197.7344z"
fill="#FF7196"
p-id="4180"
></path>
</svg> </svg>
{{item.name}} {{item.name}}
</div> </div>
<div class="footer"> <div class="footer">
<div class="time"> <div class="time">
{{moment(item.choiceTimeStart).format('YYYY/MM/DD HH:mm')}} {{moment(item.choiceTimeStart).format('YYYY/MM/DD HH:mm')}} ~ {{moment(item.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
~
{{moment(item.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
</div> </div>
<div class="status"> <div class="status">
<span v-if="item.isSelect" style="color: green">已选择</span> <span v-if="item.isSelect" style="color: green">已选择</span>
<span v-else style="color:red;">未选择</span> <span v-else style="color: red">未选择</span>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
</van-list> </van-list>
<van-empty v-else description="暂无数据"></van-empty> <van-empty v-else description="暂无数据"></van-empty>
</template> </template>
@@ -118,58 +138,44 @@ layout("/mobile/platform.html"){
<!--#include("/mobile/welfare/include/mixins.js"){}#--> <!--#include("/mobile/welfare/include/mixins.js"){}#-->
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins, welfareMixins], mixins: [mobileMixins, welfareMixins],
data() { data() {
return { return {
tabName: 'ing', tabName: "ing",
tarBarActive: 0 tarBarActive: 0
} }
}, },
methods: { methods: {
async welfareClick(o) { async welfareClick(o) {
const { const { id, provideMode, flexible, provideTimeEnd, provideTimeStart, choiceTimeEnd, choiceTimeStart } = o
id,
provideMode,
flexible,
provideTimeEnd,
provideTimeStart,
choiceTimeEnd,
choiceTimeStart
} = o
/* const resp = await $.get('/mobile/welfare/mine/isReceive', {projectId: id}) /* const resp = await $.get('/mobile/welfare/mine/isReceive', {projectId: id})
const isReceive = resp.data*/ const isReceive = resp.data*/
if (this.tabName === 'ing') { if (this.tabName === "ing") {
if (flexible) { if (flexible) {
if (moment().valueOf() < moment(provideTimeEnd).valueOf() && if (moment().valueOf() < moment(provideTimeEnd).valueOf() && moment().valueOf() > moment(provideTimeStart).valueOf()) {
moment().valueOf() > moment(provideTimeStart).valueOf()) {
if (moment().valueOf() > moment(choiceTimeEnd).valueOf()) { if (moment().valueOf() > moment(choiceTimeEnd).valueOf()) {
if (!o.isSelect) { if (!o.isSelect) {
vant.Dialog.alert({ vant.Dialog.alert({
title: '提醒', title: "提醒",
message: '您在规定时间内没有选择,无法领取!', message: "您在规定时间内没有选择,无法领取!"
}).then(() => { }).then(() => {})
});
return return
} }
} }
} }
location.href = '/mobile/welfare/list/receive?projectId=' + id location.href = "/mobile/welfare/list/receive?projectId=" + id
} else { } else {
location.href = '/mobile/welfare/list/receive_success?projectId=' + id + '&provideMode=' + provideMode location.href = "/mobile/welfare/list/receive_success?projectId=" + id + "&provideMode=" + provideMode
} }
} else if (this.tabName === 'end') { } else if (this.tabName === "end") {
location.href = '/mobile/welfare/list/receive?projectId=' + id + "&type=view" location.href = "/mobile/welfare/list/receive?projectId=" + id + "&type=view"
} }
}, },
async pageData() { async pageData() {
this.mLoading = true this.mLoading = true
const resp = await $.post('/mobile/welfare/list/pageData', this.pageForm) const resp = await $.post("/mobile/welfare/list/pageData", this.pageForm)
if (resp.code === 0) { if (resp.code === 0) {
if (resp.data.list.length === 0) { if (resp.data.list.length === 0) {
this.tableData = [] this.tableData = []
@@ -184,7 +190,7 @@ layout("/mobile/platform.html"){
this.pageForm.pageNumber++ this.pageForm.pageNumber++
} }
} }
this.loading = false; this.loading = false
this.mLoading = false this.mLoading = false
}, },
tabChange(val) { tabChange(val) {
@@ -198,22 +204,20 @@ layout("/mobile/platform.html"){
init() { init() {
this.startLoading() this.startLoading()
this.tarBarActive = Number(GetQueryString("tarBarActive")) this.tarBarActive = Number(GetQueryString("tarBarActive"))
this.pageForm.tabName = 'ing' this.pageForm.tabName = "ing"
this.pageData() this.pageData()
this.closeLoading() this.closeLoading()
} }
}, },
created() { created() {
this.init() this.init()
}, }
}) })
window.addEventListener('pageshow', e => { window.addEventListener("pageshow", (e) => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) { if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.onRefresh() vue.onRefresh()
} }
}) })
</script> </script>
<!--# <!--#
@@ -13,13 +13,11 @@ layout("/mobile/platform.html"){
width: 160px; width: 160px;
height: 40px; height: 40px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar title="地址管理" left-arrow <van-nav-bar title="地址管理" left-arrow @click-left="back"></van-nav-bar>
@click-left="history.go(-1)"></van-nav-bar>
</van-sticky> </van-sticky>
<div v-if="vLoading && !vLoading.value"> <div v-if="vLoading && !vLoading.value">
@@ -36,14 +34,13 @@ layout("/mobile/platform.html"){
<van-button round type="danger" class="bottom-button" @click="onAdd">新增地址</van-button> <van-button round type="danger" class="bottom-button" @click="onAdd">新增地址</van-button>
</van-empty> </van-empty>
</div> </div>
</div> </div>
<script> <script>
<!--#include("/mobile/welfare/include/mixins.js"){}#--> <!--#include("/mobile/welfare/include/mixins.js"){}#-->
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins, welfareMixins], mixins: [mobileMixins, welfareMixins],
data() { data() {
return { return {
@@ -51,11 +48,18 @@ layout("/mobile/platform.html"){
} }
}, },
methods: { methods: {
back() {
if (this.projectId) {
pjaxReplace("/mobile/welfare/list/receive?projectId=" + this.projectId)
} else {
pjaxReplace("/mobile/index")
}
},
onAdd() { onAdd() {
location.replace('/mobile/welfare/mine/addressEdit') pjaxReplace("/mobile/welfare/mine/addressEdit")
}, },
onEdit(item, index) { onEdit(item, index) {
location.replace('/mobile/welfare/mine/addressEdit?id=' + item.id) pjaxReplace("/mobile/welfare/mine/addressEdit?id=" + item.id)
} }
}, },
async created() { async created() {
@@ -49,75 +49,78 @@ layout("/mobile/platform.html"){
top: unset !important; top: unset !important;
transform: unset !important; transform: unset !important;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
<van-nav-bar @click-left="history.go(-1)" left-arrow <van-nav-bar @click-left="pjaxReplace('/mobile/index')" left-arrow title="我的福利"></van-nav-bar>
title="我的福利"></van-nav-bar>
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
<van-dropdown-item :options="yearOption" @change="yearChange" <van-dropdown-item :options="yearOption" @change="yearChange" v-model="pageForm.year"></van-dropdown-item>
v-model="pageForm.year"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</van-sticky> </van-sticky>
<template v-if="vLoading && !vLoading.value"> <template v-if="vLoading && !vLoading.value">
<van-list <van-list :finished="finished" @load="pageData" finished-text="没有更多了" v-if="tableData.length>=0" v-model="loading">
:finished="finished"
@load="pageData"
finished-text="没有更多了"
v-if="tableData.length>=0"
v-model="loading">
<template v-for="item in tableData"> <template v-for="item in tableData">
<div style="padding: 10px;margin:10px 10px 0 10px;position: relative;background: #FFFFFF;border-radius: 10px"> <div style="padding: 10px; margin: 10px 10px 0 10px; position: relative; background: #ffffff; border-radius: 10px">
<div style="font-weight: bold; display: flex; align-items: center"> <div style="font-weight: bold; display: flex; align-items: center">
<svg class="icon" height="20" p-id="4175" t="1715150952924" <svg
version="1.1" viewBox="0 0 1024 1024" width="20" class="icon"
xmlns="http://www.w3.org/2000/svg"> height="20"
<path d="M513.2288 510.72m-450.816 0a450.816 450.816 0 1 0 901.632 0 450.816 450.816 0 1 0-901.632 0Z" p-id="4175"
fill="#FFE1E9" p-id="4176"></path> t="1715150952924"
<path d="M777.8304 321.6896h-198.4512l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.712 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v238.7456c0 45.1072 36.608 81.7152 81.7152 81.7152h301.2096c45.1072 0 81.7152-36.608 81.7152-81.7152V476.3136h27.2384c19.712 0 35.6352-15.9744 35.6352-35.6352V357.376a35.6864 35.6864 0 0 0-35.6864-35.6864z m-230.2464 342.0672c0 16.1792-13.1072 29.2864-29.2864 29.2864s-29.2864-13.1072-29.2864-29.2864v-97.7408c0-16.1792 13.1072-29.2864 29.2864-29.2864s29.2864 13.1072 29.2864 29.2864v97.7408z" version="1.1"
fill="#FF3369" p-id="4177"></path> viewBox="0 0 1024 1024"
<path d="M776.6016 321.6896h-197.2224l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v238.7456c0 45.1072 36.608 81.7152 81.7152 81.7152H432.64c146.6368-31.8976 265.9328-136.7552 318.0032-274.7392v-45.7216h14.4896a442.2656 442.2656 0 0 0 11.4688-154.5728z m-229.0176 342.0672c0 16.1792-13.1072 29.2864-29.2864 29.2864-16.1792 0-29.2864-13.1072-29.2864-29.2864v-97.7408c0-16.1792 13.1072-29.2864 29.2864-29.2864 16.1792 0 29.2864 13.1072 29.2864 29.2864v97.7408z" width="20"
fill="#FF4D7C" p-id="4178"></path> xmlns="http://www.w3.org/2000/svg"
<path d="M579.3792 321.6896l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v169.0624c76.6464-11.8272 146.688-43.52 204.9024-89.4976a29.27616 29.27616 0 0 1 22.1696-18.5856c62.8224-56.6784 109.2096-131.1744 131.1744-215.552h-64.8704z" >
fill="#FF5F89" p-id="4179"></path> <path
<path d="M488.3456 275.3024L436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 14.4384 8.6016 26.8288 20.8896 32.4096 103.68-33.7408 190.464-105.0112 244.3264-197.7344z" d="M513.2288 510.72m-450.816 0a450.816 450.816 0 1 0 901.632 0 450.816 450.816 0 1 0-901.632 0Z"
fill="#FF7196" p-id="4180"></path> fill="#FFE1E9"
p-id="4176"
></path>
<path
d="M777.8304 321.6896h-198.4512l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.712 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v238.7456c0 45.1072 36.608 81.7152 81.7152 81.7152h301.2096c45.1072 0 81.7152-36.608 81.7152-81.7152V476.3136h27.2384c19.712 0 35.6352-15.9744 35.6352-35.6352V357.376a35.6864 35.6864 0 0 0-35.6864-35.6864z m-230.2464 342.0672c0 16.1792-13.1072 29.2864-29.2864 29.2864s-29.2864-13.1072-29.2864-29.2864v-97.7408c0-16.1792 13.1072-29.2864 29.2864-29.2864s29.2864 13.1072 29.2864 29.2864v97.7408z"
fill="#FF3369"
p-id="4177"
></path>
<path
d="M776.6016 321.6896h-197.2224l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v238.7456c0 45.1072 36.608 81.7152 81.7152 81.7152H432.64c146.6368-31.8976 265.9328-136.7552 318.0032-274.7392v-45.7216h14.4896a442.2656 442.2656 0 0 0 11.4688-154.5728z m-229.0176 342.0672c0 16.1792-13.1072 29.2864-29.2864 29.2864-16.1792 0-29.2864-13.1072-29.2864-29.2864v-97.7408c0-16.1792 13.1072-29.2864 29.2864-29.2864 16.1792 0 29.2864 13.1072 29.2864 29.2864v97.7408z"
fill="#FF4D7C"
p-id="4178"
></path>
<path
d="M579.3792 321.6896l62.6176-60.7744a29.2864 29.2864 0 0 0 0.6144-41.4208 29.2864 29.2864 0 0 0-41.4208-0.6144L514.4576 303.104 436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 19.712 15.9744 35.6352 35.6352 35.6352h27.2384v169.0624c76.6464-11.8272 146.688-43.52 204.9024-89.4976a29.27616 29.27616 0 0 1 22.1696-18.5856c62.8224-56.6784 109.2096-131.1744 131.1744-215.552h-64.8704z"
fill="#FF5F89"
p-id="4179"
></path>
<path
d="M488.3456 275.3024L436.3264 219.8528a29.28128 29.28128 0 0 0-41.3696-1.3312 29.2352 29.2352 0 0 0-1.28 41.3696L451.584 321.6896H258.7648c-19.6608 0-35.6352 15.9744-35.6352 35.6352v83.3024c0 14.4384 8.6016 26.8288 20.8896 32.4096 103.68-33.7408 190.464-105.0112 244.3264-197.7344z"
fill="#FF7196"
p-id="4180"
></path>
</svg> </svg>
{{item.name}} {{item.name}}
</div> </div>
<van-card> <van-card>
<template #thumb> <template #thumb>
<img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.cover" alt="" <img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.cover" alt="" style="width: 88px; height: 88px" v-if="item.cover" />
style="width: 88px;height: 88px" <img src="/assets/mobile/svg/welfare/welfareHome.svg" style="width: 88px; height: 88px" v-else />
v-if="item.cover">
<img src="/assets/mobile/svg/welfare/welfareHome.svg"
style="width: 88px;height: 88px"
v-else/>
</template> </template>
<div slot="tags" style="margin-top: 5px;padding-left: 30px;" <div slot="tags" style="margin-top: 5px; padding-left: 30px" v-if="item.gifts">
v-if="item.gifts"> <div :key="item.name" class="van-card__bottom" v-for="gift in item.gifts">
<div :key="item.name" class="van-card__bottom" <div class="van-card__price">{{gift.name}}</div>
v-for="gift in item.gifts">
<div class="van-card__price">
{{gift.name}}
</div>
<div class="van-card__num">x{{gift.num}}</div> <div class="van-card__num">x{{gift.num}}</div>
</div> </div>
</div> </div>
<div slot="footer" style="margin-top: 10px;"> <div slot="footer" style="margin-top: 10px">
<van-button @click="openEvaluate(item)" plain round size="small">评价商品 <van-button @click="openEvaluate(item)" plain round size="small">评价商品</van-button>
</van-button>
<!-- <van-button @click="openExpress(item)" plain round size="small"--> <!-- <van-button @click="openExpress(item)" plain round size="small"-->
<!-- v-if="item.provideMode==3">--> <!-- v-if="item.provideMode==3">-->
<!-- 物流信息--> <!-- 物流信息-->
<!-- </van-button>--> <!-- </van-button>-->
<van-button @click="openView(item)" plain round size="small">查看详情 <van-button @click="openView(item)" plain round size="small">查看详情</van-button>
</van-button>
</div> </div>
</van-card> </van-card>
</div> </div>
@@ -134,8 +137,7 @@ layout("/mobile/platform.html"){
<van-action-sheet title="查看详情" v-model="descPopup"> <van-action-sheet title="查看详情" v-model="descPopup">
<div class="van-cell-group--inset"> <div class="van-cell-group--inset">
<van-cell> <van-cell>
<van-icon class="van-cell__left-icon" color="red" name="location" <van-icon class="van-cell__left-icon" color="red" name="location" slot="icon"></van-icon>
slot="icon"></van-icon>
<div slot="title" style="font-weight: bold; font-size: 15px">已选福利</div> <div slot="title" style="font-weight: bold; font-size: 15px">已选福利</div>
</van-cell> </van-cell>
<van-cell style="padding: 0"> <van-cell style="padding: 0">
@@ -144,7 +146,7 @@ layout("/mobile/platform.html"){
:num="item.selectNum" :num="item.selectNum"
:thumb="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.imgUrl" :thumb="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.imgUrl"
:title="item.optionName" :title="item.optionName"
style="border-radius: 8px;background: #FFFFFF" style="border-radius: 8px; background: #ffffff"
v-for="item in selectedOptions" v-for="item in selectedOptions"
> >
<template #desc> <template #desc>
@@ -158,12 +160,10 @@ layout("/mobile/platform.html"){
<!--邮寄到家 填写收货地址--> <!--邮寄到家 填写收货地址-->
<div class="van-cell-group--inset" v-if="provideMode===3"> <div class="van-cell-group--inset" v-if="provideMode===3">
<van-cell> <van-cell>
<van-icon class="van-cell__left-icon" color="red" name="location" <van-icon class="van-cell__left-icon" color="red" name="location" slot="icon"></van-icon>
slot="icon"></van-icon>
<div slot="title" style="font-weight: bold; font-size: 15px">收货地址</div> <div slot="title" style="font-weight: bold; font-size: 15px">收货地址</div>
</van-cell> </van-cell>
<van-cell :value="receiveAddress" class="address-cell"> <van-cell :value="receiveAddress" class="address-cell"></van-cell>
</van-cell>
</div> </div>
<!--电子签字--> <!--电子签字-->
@@ -175,30 +175,25 @@ layout("/mobile/platform.html"){
</van-cell> </van-cell>
<van-cell title=""> <van-cell title="">
<template #label> <template #label>
<van-image :src="'/signature/getSignData?path=' + userSign" <van-image :src="'/signature/getSignData?path=' + userSign" style="width: 100%; height: 150px; border: 1px dashed"></van-image>
style="width: 100%;height: 150px;border: 1px dashed"></van-image>
</template> </template>
</van-cell> </van-cell>
</div> </div>
</van-action-sheet> </van-action-sheet>
<!--评价--> <!--评价-->
<van-popup :style="{ height: '60%',background:'#f9f9f9','padding-top':'30px'}" <van-popup
:style="{ height: '60%',background:'#f9f9f9','padding-top':'30px'}"
closeable closeable
position="bottom" position="bottom"
round round
safe-area-inset-bottom safe-area-inset-bottom
v-model="evaluatePopup"> v-model="evaluatePopup"
>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<van-radio-group v-model="evaluateFormData.optionId"> <van-radio-group v-model="evaluateFormData.optionId">
<van-cell-group> <van-cell-group>
<van-cell <van-cell :key="item.selectOptionId" @click="optionIdClick(item.selectOptionId)" clickable v-for="item in selectedOptions">
:key="item.selectOptionId"
@click="optionIdClick(item.selectOptionId)"
clickable v-for="item in selectedOptions">
<template #title> <template #title>
{{item.optionName}} {{item.optionName}}
<span style="color: red" v-if="!item.isPj">未评价</span> <span style="color: red" v-if="!item.isPj">未评价</span>
@@ -211,15 +206,10 @@ layout("/mobile/platform.html"){
</van-radio-group> </van-radio-group>
</div> </div>
<div class="evaluateForm"> <div class="evaluateForm">
<div style="text-align: center; margin: 20px 0; font-size: 20px; color: #f18d8d; font-weight: bold">您的评价让我们做的更好</div>
<div style="text-align: center;margin: 20px 0;font-size: 20px;color: #f18d8d;font-weight: bold;">
您的评价让我们做的更好
</div>
<div style="display: flex; justify-content: center; flex-direction: column; align-items: center"> <div style="display: flex; justify-content: center; flex-direction: column; align-items: center">
<div style="text-align: center;font-size: 13px;color: rgb(139 134 134)">为本次福利打分 <div style="text-align: center; font-size: 13px; color: rgb(139 134 134)">为本次福利打分</div>
</div>
<van-rate <van-rate
:gutter="10" :gutter="10"
:readonly="evaluateFormData.id" :readonly="evaluateFormData.id"
@@ -247,19 +237,24 @@ layout("/mobile/platform.html"){
</van-field> </van-field>
</div> </div>
<div style="padding: 10px 16px"> <div style="padding: 10px 16px">
<van-button @click="doSubmitEvaluate" <van-button @click="doSubmitEvaluate" block type="primary" v-if="!evaluateFormData.id">提交</van-button>
block
type="primary"
v-if="!evaluateFormData.id">提交
</van-button>
<div style="display: flex;align-items: center;color: #52c41a;justify-content: center;font-size: 20px" <div style="display: flex; align-items: center; color: #52c41a; justify-content: center; font-size: 20px" v-else>
v-else> <svg
<svg class="icon" height="32" p-id="2914" t="1715150529722" class="icon"
version="1.1" viewBox="0 0 1024 1024" width="32" height="32"
xmlns="http://www.w3.org/2000/svg"> p-id="2914"
<path d="M596.48 113.024a142.848 142.848 0 0 0-169.024 0l-49.472 36.288a62.848 62.848 0 0 1-27.648 11.52l-60.8 9.28a142.848 142.848 0 0 0-119.424 119.488l-9.344 60.8a62.848 62.848 0 0 1-11.52 27.648l-36.224 49.472a142.848 142.848 0 0 0 0 169.088l36.288 49.472a62.336 62.336 0 0 1 11.456 27.648l9.344 60.672a142.848 142.848 0 0 0 119.488 119.488l60.672 9.344a62.656 62.656 0 0 1 27.648 11.52l49.472 36.224a142.848 142.848 0 0 0 169.088 0l49.472-36.288a62.4 62.4 0 0 1 27.648-11.52l60.672-9.28a142.912 142.912 0 0 0 119.552-119.552l9.344-60.672a62.656 62.656 0 0 1 11.52-27.648l36.224-49.472a142.848 142.848 0 0 0 0-169.088l-36.288-49.472a62.848 62.848 0 0 1-11.456-27.648l-9.28-60.8a142.848 142.848 0 0 0-119.488-119.424l-60.672-9.344a62.912 62.912 0 0 1-27.648-11.52l-49.536-36.224zM474.88 177.472a62.72 62.72 0 0 1 74.368 0l49.472 36.288c18.56 13.632 40.128 22.528 62.976 26.048l60.544 9.28a62.848 62.848 0 0 1 52.672 52.672l9.28 60.608c3.52 22.784 12.416 44.352 26.048 62.976l36.288 49.408a62.72 62.72 0 0 1 0 74.368l-36.288 49.472c-13.632 18.56-22.592 40.192-26.048 62.976l-9.28 60.608a62.848 62.848 0 0 1-52.672 52.608l-60.608 9.28a142.784 142.784 0 0 0-62.976 26.112l-49.408 36.224a62.72 62.72 0 0 1-74.368 0l-49.472-36.224a142.784 142.784 0 0 0-62.976-26.112l-60.544-9.28a62.784 62.784 0 0 1-52.672-52.608l-9.28-60.672a142.848 142.848 0 0 0-26.112-62.912l-36.224-49.472a62.848 62.848 0 0 1 0-74.368l36.224-49.472a142.72 142.72 0 0 0 26.112-62.912l9.28-60.608a62.848 62.848 0 0 1 52.672-52.672l60.608-9.28c22.784-3.456 44.352-12.416 62.912-26.048l49.472-36.288z m212.096 269.44A40 40 0 0 0 630.4 390.4L458.688 562.112 393.6 497.088a40 40 0 0 0-56.576 56.512l93.376 93.312a40 40 0 0 0 56.512 0l200-200z" t="1715150529722"
fill="#52C41A" p-id="2915"></path> version="1.1"
viewBox="0 0 1024 1024"
width="32"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M596.48 113.024a142.848 142.848 0 0 0-169.024 0l-49.472 36.288a62.848 62.848 0 0 1-27.648 11.52l-60.8 9.28a142.848 142.848 0 0 0-119.424 119.488l-9.344 60.8a62.848 62.848 0 0 1-11.52 27.648l-36.224 49.472a142.848 142.848 0 0 0 0 169.088l36.288 49.472a62.336 62.336 0 0 1 11.456 27.648l9.344 60.672a142.848 142.848 0 0 0 119.488 119.488l60.672 9.344a62.656 62.656 0 0 1 27.648 11.52l49.472 36.224a142.848 142.848 0 0 0 169.088 0l49.472-36.288a62.4 62.4 0 0 1 27.648-11.52l60.672-9.28a142.912 142.912 0 0 0 119.552-119.552l9.344-60.672a62.656 62.656 0 0 1 11.52-27.648l36.224-49.472a142.848 142.848 0 0 0 0-169.088l-36.288-49.472a62.848 62.848 0 0 1-11.456-27.648l-9.28-60.8a142.848 142.848 0 0 0-119.488-119.424l-60.672-9.344a62.912 62.912 0 0 1-27.648-11.52l-49.536-36.224zM474.88 177.472a62.72 62.72 0 0 1 74.368 0l49.472 36.288c18.56 13.632 40.128 22.528 62.976 26.048l60.544 9.28a62.848 62.848 0 0 1 52.672 52.672l9.28 60.608c3.52 22.784 12.416 44.352 26.048 62.976l36.288 49.408a62.72 62.72 0 0 1 0 74.368l-36.288 49.472c-13.632 18.56-22.592 40.192-26.048 62.976l-9.28 60.608a62.848 62.848 0 0 1-52.672 52.608l-60.608 9.28a142.784 142.784 0 0 0-62.976 26.112l-49.408 36.224a62.72 62.72 0 0 1-74.368 0l-49.472-36.224a142.784 142.784 0 0 0-62.976-26.112l-60.544-9.28a62.784 62.784 0 0 1-52.672-52.608l-9.28-60.672a142.848 142.848 0 0 0-26.112-62.912l-36.224-49.472a62.848 62.848 0 0 1 0-74.368l36.224-49.472a142.72 142.72 0 0 0 26.112-62.912l9.28-60.608a62.848 62.848 0 0 1 52.672-52.672l60.608-9.28c22.784-3.456 44.352-12.416 62.912-26.048l49.472-36.288z m212.096 269.44A40 40 0 0 0 630.4 390.4L458.688 562.112 393.6 497.088a40 40 0 0 0-56.576 56.512l93.376 93.312a40 40 0 0 0 56.512 0l200-200z"
fill="#52C41A"
p-id="2915"
></path>
</svg> </svg>
评价完成 评价完成
</div> </div>
@@ -267,23 +262,22 @@ layout("/mobile/platform.html"){
</van-popup> </van-popup>
<!--快递单号--> <!--快递单号-->
<van-popup :style="{ height: '80%', background:'#f9f9f9','padding-top':'30px'}" <van-popup
:style="{ height: '80%', background:'#f9f9f9','padding-top':'30px'}"
closeable closeable
position="bottom" position="bottom"
round round
safe-area-inset-bottom safe-area-inset-bottom
v-model="expressPopup"> v-model="expressPopup"
>
<div class="van-cell-group--inset"> <div class="van-cell-group--inset">
<van-cell> <van-cell>
<van-icon class="van-cell__left-icon" color="red" name="location" <van-icon class="van-cell__left-icon" color="red" name="location" slot="icon"></van-icon>
slot="icon"></van-icon>
<div slot="title" style="font-weight: bold; font-size: 15px">物流信息</div> <div slot="title" style="font-weight: bold; font-size: 15px">物流信息</div>
</van-cell> </van-cell>
<van-cell :value="logisticsTrace.courierNumber" class="address-cell" <van-cell :value="logisticsTrace.courierNumber" class="address-cell" title="快递单号"></van-cell>
title="快递单号"></van-cell>
<van-cell class="logistics_cell" title="物流跟踪"> <van-cell class="logistics_cell" title="物流跟踪">
<van-steps :active="0" <van-steps :active="0" direction="vertical">
direction="vertical">
<van-step v-for="(item, index) in logisticsTrace.logisticsTraceDetailList"> <van-step v-for="(item, index) in logisticsTrace.logisticsTraceDetailList">
<h3>{{item.desc}}</h3> <h3>{{item.desc}}</h3>
<p>{{moment(item.time).format('YYYY-MM-DD HH:mm:ss')}}</p> <p>{{moment(item.time).format('YYYY-MM-DD HH:mm:ss')}}</p>
@@ -294,36 +288,27 @@ layout("/mobile/platform.html"){
</van-popup> </van-popup>
<!--快递物流信息--> <!--快递物流信息-->
<van-action-sheet class="courierNumberSheet" <van-action-sheet class="courierNumberSheet" title="快递物流信息" v-model="courierNumberShow">
title=快递物流信息
v-model="courierNumberShow">
<div style="padding: 16px 16px 16px"> <div style="padding: 16px 16px 16px">
<div v-for="(v,k) in optionCourierNumberInfo"> <div v-for="(v,k) in optionCourierNumberInfo">
<van-cell :title="k"> <van-cell :title="k">
<div slot="title" style="font-weight: bold"> <div slot="title" style="font-weight: bold">{{k}}</div>
{{k}}
</div>
</van-cell> </van-cell>
<van-collapse accordion v-model="activeName"> <van-collapse accordion v-model="activeName">
<van-collapse-item :key="item.courierNumber" :name="item.courierNumber" <van-collapse-item :key="item.courierNumber" :name="item.courierNumber" :title="item.courierNumber" v-for="item in v">
:title="item.courierNumber" v-for="item in v">
<template> <template>
<van-cell :value="item.courierNumber" class="address-cell" title="快递单号">
<van-cell :value="item.courierNumber" class="address-cell" <div>{{item.courierNumber || '暂无'}}</div>
title="快递单号">
<div>
{{item.courierNumber || '暂无'}}
</div>
</van-cell> </van-cell>
<van-cell class="logistics_cell" title="物流跟踪"> <van-cell class="logistics_cell" title="物流跟踪">
<van-steps :active="0" <van-steps
:active="0"
direction="vertical" direction="vertical"
v-if="item.logisticsTrace && item.logisticsTrace.logisticsTraceDetailList"> v-if="item.logisticsTrace && item.logisticsTrace.logisticsTraceDetailList"
<van-step >
v-for="(timeline, timelineIndex) in item.logisticsTrace.logisticsTraceDetailList"> <van-step v-for="(timeline, timelineIndex) in item.logisticsTrace.logisticsTraceDetailList">
<h3>{{timeline.desc}}</h3> <h3>{{timeline.desc}}</h3>
<p>{{moment(timeline.time) <p>{{moment(timeline.time) .format('YYYY-MM-DD HH:mm:ss')}}</p>
.format('YYYY-MM-DD HH:mm:ss')}}</p>
</van-step> </van-step>
</van-steps> </van-steps>
<van-empty v-else></van-empty> <van-empty v-else></van-empty>
@@ -333,22 +318,19 @@ layout("/mobile/platform.html"){
</template> </template>
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
</div> </div>
</div> </div>
</van-action-sheet> </van-action-sheet>
</div> </div>
<script> <script>
<!--#include("/mobile/welfare/include/mixins.js"){}#--> <!--#include("/mobile/welfare/include/mixins.js"){}#-->
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins, welfareMixins], mixins: [mobileMixins, welfareMixins],
data() { data() {
return { return {
pageDataUrl: '/platform/welfare/mine/pageData', pageDataUrl: "/platform/welfare/mine/pageData",
fullWelfareList: [], fullWelfareList: [],
welfareList: [], welfareList: [],
@@ -378,7 +360,6 @@ layout("/mobile/platform.html"){
activeName: null, activeName: null,
optionCourierNumberInfo: [] optionCourierNumberInfo: []
} }
}, },
@@ -394,16 +375,16 @@ layout("/mobile/platform.html"){
return this.selectedOptions[0].userSign return this.selectedOptions[0].userSign
} }
return null return null
}, }
}, },
methods: { methods: {
optionIdClick(selectOptionId) { optionIdClick(selectOptionId) {
this.$set(this.evaluateFormData, 'optionId', selectOptionId) this.$set(this.evaluateFormData, "optionId", selectOptionId)
this.finOneWelfareEvaluate(this.evaluateFormData.projectId, selectOptionId); this.finOneWelfareEvaluate(this.evaluateFormData.projectId, selectOptionId)
}, },
async getUserSelection(projectId) { async getUserSelection(projectId) {
const resp = await $.get('/platform/welfare/mine/getUserSelection', {projectId}) const resp = await $.get("/platform/welfare/mine/getUserSelection", { projectId })
return resp return resp
}, },
//查看选择详情 //查看选择详情
@@ -414,7 +395,7 @@ layout("/mobile/platform.html"){
const { code, data, msg } = await this.getUserSelection(projectId) const { code, data, msg } = await this.getUserSelection(projectId)
if (code === 0) { if (code === 0) {
if (data.length === 0) { if (data.length === 0) {
this.$modal.msg('您还没有选择福利,请先到职工福利->福利列表下选择') this.$modal.msg("您还没有选择福利,请先到职工福利->福利列表下选择")
return return
} }
this.descPopup = true this.descPopup = true
@@ -437,11 +418,7 @@ layout("/mobile/platform.html"){
this.evaluatePopup = true this.evaluatePopup = true
}, },
async finOneWelfareEvaluate(projectId, optionId) { async finOneWelfareEvaluate(projectId, optionId) {
const { const { data, code, msg } = await $.post("/platform/welfare/mine/finOneWelfareEvaluate", {
data,
code,
msg
} = await $.post("/platform/welfare/mine/finOneWelfareEvaluate", {
projectId: projectId, projectId: projectId,
optionId: optionId optionId: optionId
}) })
@@ -465,11 +442,7 @@ layout("/mobile/platform.html"){
this.$modal.msg("请为本次福利评分") this.$modal.msg("请为本次福利评分")
return return
} }
const { const { code, data, msg } = await $.post("/platform/welfare/mine/doEvaluate", this.evaluateFormData)
code,
data,
msg
} = await $.post('/platform/welfare/mine/doEvaluate', this.evaluateFormData)
if (code === 0) { if (code === 0) {
this.$modal.msgSuccess("评价成功") this.$modal.msgSuccess("评价成功")
this.evaluatePopup = false this.evaluatePopup = false
@@ -488,11 +461,11 @@ layout("/mobile/platform.html"){
break break
} }
case 1: { case 1: {
this.welfareList = this.fullWelfareList.filter(v => v.isReceive || [1].includes(v.provideMode)) this.welfareList = this.fullWelfareList.filter((v) => v.isReceive || [1].includes(v.provideMode))
break break
} }
case 2: { case 2: {
this.welfareList = this.fullWelfareList.filter(v => !v.isReceive) this.welfareList = this.fullWelfareList.filter((v) => !v.isReceive)
break break
} }
} }
@@ -500,31 +473,27 @@ layout("/mobile/platform.html"){
//获取物流信息 //获取物流信息
async getExpressInfo(row) { async getExpressInfo(row) {
const resp = await $.get('/platform/welfare/mine/getExpressInfo', {courierNumber: row.courierNumber}) const resp = await $.get("/platform/welfare/mine/getExpressInfo", { courierNumber: row.courierNumber })
if (resp.code === 0) { if (resp.code === 0) {
resp.data.courierNumber = row.courierNumber resp.data.courierNumber = row.courierNumber
resp.data.logisticsTraceDetailList.sort((a, b) => { resp.data.logisticsTraceDetailList.sort((a, b) => {
return b.time - a.time; return b.time - a.time
}) })
this.logisticsTrace = resp.data this.logisticsTrace = resp.data
} else { } else {
this.$message.error(resp.msg); this.$message.error(resp.msg)
} }
}, },
//打开物流 //打开物流
async openExpress(item) { async openExpress(item) {
const { const { code, data, msg } = await $.get("/platform/welfare/common/courierNumberInfo", {
code,
data,
msg
} = await $.get('/platform/welfare/common/courierNumberInfo', {
welfareId: item.projectId, welfareId: item.projectId,
userId: item.userId userId: item.userId
}) })
if (code === 0) { if (code === 0) {
if (data == null || data.length === 0) { if (data == null || data.length === 0) {
this.$modal.msg('您还没有选择福利套餐') this.$modal.msg("您还没有选择福利套餐")
return return
} }
this.optionCourierNumberInfo = data this.optionCourierNumberInfo = data
@@ -534,18 +503,17 @@ layout("/mobile/platform.html"){
} else { } else {
this.$modal.msgError(msg) this.$modal.msgError(msg)
} }
}, },
yearChange(val) { yearChange(val) {
this.pageForm.year = val this.pageForm.year = val
this.onRefresh() this.onRefresh()
}, }
}, },
created() { created() {
this.startLoading() this.startLoading()
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) { for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearOption.unshift({value: i, text: i + '年'},) this.yearOption.unshift({ value: i, text: i + "年" })
} }
this.$set(this.pageForm, "year", this.yearOption[0].value) this.$set(this.pageForm, "year", this.yearOption[0].value)
this.closeLoading() this.closeLoading()
@@ -5,27 +5,16 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="活动列表"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
<van-dropdown-item v-model="pageForm.year" :options="yearOption" <van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
@change="yearChange"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div style="margin: 60px auto"> <div style="margin: 60px auto">
<van-list <van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="mLoading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="list-card" @click="openView(o)"> <div v-for="o in tableData" class="list-card" @click="openView(o)">
<van-cell-group inset> <van-cell-group inset>
<van-cell title="主题" :border="false">{{o.hdname}}</van-cell> <van-cell title="主题" :border="false">{{o.hdname}}</van-cell>
@@ -37,12 +26,7 @@ layout("/mobile/platform.html"){
</van-cell-group> </van-cell-group>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
<div> <div>
@@ -51,20 +35,19 @@ layout("/mobile/platform.html"){
<van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/list">我的教工作品</van-tabbar-item> <van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/list">我的教工作品</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
</div> </div>
<script> <script>
let vue = new Vue({ let vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
tarBarActive: 0, tarBarActive: 0,
yearOption: [], yearOption: [],
pageForm: { pageForm: {
year: '', year: "",
hdtype: 1, hdtype: 1
} }
} }
}, },
@@ -77,7 +60,7 @@ layout("/mobile/platform.html"){
}, },
async onLoad() { async onLoad() {
this.mLoading = true this.mLoading = true
$.post('/mobile/wmhd/apply/pageData', this.pageForm).then(res => { $.post("/mobile/wmhd/apply/pageData", this.pageForm).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -92,29 +75,28 @@ layout("/mobile/platform.html"){
openView(o) { openView(o) {
const { hdid, hdjssj, hdkssj, hdflag } = o const { hdid, hdjssj, hdkssj, hdflag } = o
if (!hdflag) { if (!hdflag) {
vant.Toast('活动暂未开启!') vant.Toast("活动暂未开启!")
return; return
} }
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) { if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
vant.Toast('报名暂未开始!') vant.Toast("报名暂未开始!")
return return
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) { } else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
vant.Toast('报名已结束!') vant.Toast("报名已结束!")
return return
} }
window.location.href = '/platform/staffActivities?client=mobile&id=' + hdid window.location.href = "/platform/staffActivities?client=mobile&id=" + hdid
} }
}, },
async created() { async created() {
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) { for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearOption.unshift({value: i, text: i + '年'},) this.yearOption.unshift({ value: i, text: i + "年" })
} }
this.$set(this.pageForm, "year", this.yearOption[0].value) this.$set(this.pageForm, "year", this.yearOption[0].value)
} }
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -5,35 +5,23 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="我的审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="我的审核"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="RGB(8,23,118)"> <van-dropdown-menu active-color="RGB(8,23,118)">
<van-dropdown-item v-model="pageForm.year" @change="yearChange" <van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
:options="yearList"></van-dropdown-item> <van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" <van-dropdown-item
:options="auditList"></van-dropdown-item> v-model="pageForm.unionId"
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange" @change="yearChange"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H10')}" v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H10')}"
:options="mCommon.unionList"></van-dropdown-item> :options="mCommon.unionList"
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange" ></van-dropdown-item>
:options="mCommon.unitList"></van-dropdown-item> <van-dropdown-item v-model="pageForm.unitId" @change="yearChange" :options="mCommon.unitList"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div style="margin: 70px auto 0"> <div style="margin: 70px auto 0">
<van-list <van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="mLoading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="list-card" @click="openView(o)"> <div v-for="o in tableData" class="list-card" @click="openView(o)">
<van-cell-group inset> <van-cell-group inset>
<van-cell :border="false" title="姓名">{{o.username}}</van-cell> <van-cell :border="false" title="姓名">{{o.username}}</van-cell>
@@ -41,8 +29,7 @@ layout("/mobile/platform.html"){
<van-cell :border="false" title="单位">{{o.dwname}}</van-cell> <van-cell :border="false" title="单位">{{o.dwname}}</van-cell>
<van-cell :border="false" title="工会">{{o.ghname}}</van-cell> <van-cell :border="false" title="工会">{{o.ghname}}</van-cell>
<van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell> <van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell>
<van-cell :border="false" title="作品类别" v-if="o.zplbname">{{o.zplbname}} <van-cell :border="false" title="作品类别" v-if="o.zplbname">{{o.zplbname}}</van-cell>
</van-cell>
<van-cell :border="false" title="上传时间">{{o.hdsbsj}}</van-cell> <van-cell :border="false" title="上传时间">{{o.hdsbsj}}</van-cell>
<van-cell :border="false" title="审核状态"> <van-cell :border="false" title="审核状态">
<span :style="'color:'+o.stateColor">{{o.stateName}}</span> <span :style="'color:'+o.stateColor">{{o.stateName}}</span>
@@ -50,47 +37,39 @@ layout("/mobile/platform.html"){
</van-cell-group> </van-cell-group>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
<van-popup v-model="viewShow" position="right" <van-popup v-model="viewShow" position="right" :style="{ height: '100%',width:'100%' }">
:style="{ height: '100%',width:'100%' }"> <van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="viewShow=false"></van-nav-bar>
<van-nav-bar title="详细信息" left-arrow placeholder fixed
@click-left="viewShow=false"></van-nav-bar>
<mobile-wmhd-info ref="minfo"></mobile-wmhd-info> <mobile-wmhd-info ref="minfo"></mobile-wmhd-info>
</van-popup> </van-popup>
</div> </div>
<script> <script>
let vue = new Vue({ let vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
viewShow: false, viewShow: false,
pageForm: { pageForm: {
year: new Date().getFullYear(), year: new Date().getFullYear(),
isAudit: false, isAudit: false
}, },
unitList: [], unitList: [],
unionList: [], unionList: [],
yearList: [], yearList: [],
auditList: [ auditList: [
{text: '未审核', value: false}, { text: "未审核", value: false },
{text: '已审核', value: true}, { text: "已审核", value: true }
], ]
} }
}, },
components: { components: {
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()), "mobile-wmhd-info": httpVueLoader("/components/mobile/wmhd/info.vue?v=" + new Date().getTime())
}, },
methods: { methods: {
yearChange() { yearChange() {
@@ -102,7 +81,7 @@ layout("/mobile/platform.html"){
}, },
async onLoad() { async onLoad() {
this.mLoading = true this.mLoading = true
$.post('/mobile/wmhd/audit/pageData', this.pageForm).then(res => { $.post("/mobile/wmhd/audit/pageData", this.pageForm).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -115,8 +94,7 @@ layout("/mobile/platform.html"){
}) })
}, },
openView(o) { openView(o) {
if (o.auditState === "4000" || o.auditState === "4200") {
if (o.auditState === '4000' || o.auditState === '4200') {
window.location.href = "/mobile/wmhd/audit/auditHtml?id=" + o.id + "&auditState=" + o.auditState window.location.href = "/mobile/wmhd/audit/auditHtml?id=" + o.id + "&auditState=" + o.auditState
} else { } else {
this.viewShow = true this.viewShow = true
@@ -126,12 +104,16 @@ layout("/mobile/platform.html"){
} }
}, },
async flushUnits() { async flushUnits() {
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('wyh03')||@shiro.hasRole('wyh02')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') { if (
"${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('wyh03')||@shiro.hasRole('wyh02')||@shiro.hasRole('SchoolUnionMemberAdmin')}" ===
"true"
) {
await mCommon.getUnitList(this.pageForm.unionId) await mCommon.getUnitList(this.pageForm.unionId)
} else { } else {
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}") await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
} }
}, async init() { },
async init() {
let nowYear = new Date().getFullYear() let nowYear = new Date().getFullYear()
for (let i = nowYear; i >= nowYear - 9; i--) { for (let i = nowYear; i >= nowYear - 9; i--) {
this.yearList.push({ text: i, value: i }) this.yearList.push({ text: i, value: i })
@@ -151,7 +133,7 @@ layout("/mobile/platform.html"){
this.init() this.init()
} }
}) })
window.addEventListener('pageshow', e => { window.addEventListener("pageshow", (e) => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) { if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.flushUnits() vue.flushUnits()
vue.init() vue.init()
@@ -159,7 +141,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -1,31 +1,24 @@
<!--# <!--#
layout("/mobile/platform.html"){ layout("/mobile/platform.html"){
#--> #-->
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css"> <link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css" />
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script> <script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="校工会审核" left-arrow placeholder fixed <van-nav-bar title="校工会审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
@click-left="history.go(-1)"></van-nav-bar>
<mobile-wmhd-info ref="minfo" :id.sync="id" title="校工会审核" :handle="handle"> <mobile-wmhd-info ref="minfo" :id.sync="id" title="校工会审核" :handle="handle">
<template #handle> <template #handle>
<div class="van-cell-group__title"> <div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select">校工会审核 <div class="van-sidebar-item van-sidebar-item--select">校工会审核</div>
</div>
</div> </div>
<van-form> <van-form>
<van-field <van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="username" label="审核人员"></van-field>
readonly
value="${@shiro.getPrincipalProperty('username')}"
name="username"
label="审核人员"
></van-field>
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field> <van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
<van-field v-model="formData.auditOpinion" <van-field
v-model="formData.auditOpinion"
required required
rows="1" rows="1"
autosize autosize
@@ -39,51 +32,45 @@ layout("/mobile/platform.html"){
<div class="mb10">签&emsp;&emsp;字</div> <div class="mb10">签&emsp;&emsp;字</div>
</template> </template>
<template #input> <template #input>
<mobile-sign ref="signature" <mobile-sign ref="signature" :my_sign.sync="formData.auditSign"></mobile-sign>
:my_sign.sync="formData.auditSign"></mobile-sign>
</template> </template>
</van-field> </van-field>
<van-row gutter="20" style="margin-top: 30px; padding: 0 25px"> <van-row gutter="20" style="margin-top: 30px; padding: 0 25px">
<van-col span="8"> <van-col span="8">
<van-button block @click="doAudit(1)">拒 绝 <van-button block @click="doAudit(1)">拒 绝</van-button>
</van-button>
</van-col> </van-col>
<van-col span="8"> <van-col span="8">
<van-button block @click="doAudit(2)" type="warning">返回修改 <van-button block @click="doAudit(2)" type="warning">返回修改</van-button>
</van-button>
</van-col> </van-col>
<van-col span="8"> <van-col span="8">
<van-button block @click="doAudit(3)" type="info">通 过 <van-button block @click="doAudit(3)" type="info">通 过</van-button>
</van-button>
</van-col> </van-col>
</van-row> </van-row>
</van-form> </van-form>
</template> </template>
</mobile-wmhd-info> </mobile-wmhd-info>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
data() { data() {
return { return {
formData: {}, formData: {},
id: GetQueryString('id'), id: GetQueryString("id"),
handle: true, handle: true
} }
}, },
components: { components: {
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'), "mobile-sign": httpVueLoader("/components/sign/mobileSign.vue"),
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()), "mobile-wmhd-info": httpVueLoader("/components/mobile/wmhd/info.vue?v=" + new Date().getTime())
}, },
methods: { methods: {
async doAudit(pass) { async doAudit(pass) {
if (!this.formData.auditOpinion) { if (!this.formData.auditOpinion) {
this.$toast.fail('请填写审核意见'); this.$toast.fail("请填写审核意见")
return return
} }
this.$refs.signature.submitSign() this.$refs.signature.submitSign()
@@ -91,14 +78,14 @@ layout("/mobile/platform.html"){
this.formData.pass = pass this.formData.pass = pass
const resp = await $.post("/platform/hd/wmhd/school/audit/doReview", this.formData) const resp = await $.post("/platform/hd/wmhd/school/audit/doReview", this.formData)
if (resp.code === 0) { if (resp.code === 0) {
this.$toast.success('审核成功'); this.$toast.success("审核成功")
setTimeout(() => { setTimeout(() => {
window.history.go(-1) window.history.go(-1)
}, 1000) }, 1000)
} else { } else {
this.$toast.fail('审核失败'); this.$toast.fail("审核失败")
}
} }
},
}, },
async created() { async created() {
this.mLoading = true this.mLoading = true
@@ -109,7 +96,7 @@ layout("/mobile/platform.html"){
this.formData = { this.formData = {
id: id, id: id,
username: "${@shiro.getPrincipalProperty('username')}", username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'), auditTime: moment().format("YYYY-MM-DD"),
auditOpinion: "通过", auditOpinion: "通过",
auditSign: "" auditSign: ""
} }
@@ -118,7 +105,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -5,7 +5,7 @@ layout("/mobile/platform.html"){
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script> <script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="基层工会审核" left-arrow placeholder fixed @click-left="history.go(-1)"></van-nav-bar> <van-nav-bar title="基层工会审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<mobile-wmhd-info ref="minfo" :id.sync="id" title="基层工会审核" :handle="handle"> <mobile-wmhd-info ref="minfo" :id.sync="id" title="基层工会审核" :handle="handle">
<template #handle> <template #handle>
@@ -14,42 +14,32 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar <van-nav-bar title="作品列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
title="作品列表"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
></van-nav-bar>
<div class="search-fixed"> <div class="search-fixed">
<van-dropdown-menu active-color="#1989fa"> <van-dropdown-menu active-color="#1989fa">
<van-dropdown-item v-model="pageForm.year" :options="yearOption" <van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
@change="yearChange"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div style="margin: 60px auto"> <div style="margin: 60px auto">
<van-notice-bar mode="closeable">左滑可删除作品。</van-notice-bar> <van-notice-bar mode="closeable">左滑可删除作品。</van-notice-bar>
<van-list <van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="onLoad">
v-model="mLoading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="list-card" @click.stop="openView(o)"> <div v-for="o in tableData" class="list-card" @click.stop="openView(o)">
<van-swipe-cell :disabled="o.auditstate!=='3999'"> <van-swipe-cell :disabled="o.auditstate!=='3999'">
<van-cell-group inset> <van-cell-group inset>
<image class="register-icon" src="/assets/mobile/svg/wmhd/bianji.svg" <image
class="register-icon"
src="/assets/mobile/svg/wmhd/bianji.svg"
@click.stop="openEdit(o.id,o.hdid)" @click.stop="openEdit(o.id,o.hdid)"
v-if="o.auditstate==='3999'||o.auditstate==='4100'||o.auditstate==='4250'"></image> v-if="o.auditstate==='3999'||o.auditstate==='4100'||o.auditstate==='4250'"
></image>
<van-cell :border="false" title="姓名">{{o.sbrname}}</van-cell> <van-cell :border="false" title="姓名">{{o.sbrname}}</van-cell>
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell> <van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
<van-cell :border="false" title="单位">{{o.dwname}}</van-cell> <van-cell :border="false" title="单位">{{o.dwname}}</van-cell>
<van-cell :border="false" title="工会">{{o.ghname}}</van-cell> <van-cell :border="false" title="工会">{{o.ghname}}</van-cell>
<van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell> <van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell>
<van-cell :border="false" title="作品类别" v-if="o.zplbname">{{o.zplbname}} <van-cell :border="false" title="作品类别" v-if="o.zplbname">{{o.zplbname}}</van-cell>
</van-cell>
<!-- <van-cell :border="false" title="主题">{{o.hdsbzpzt}}</van-cell>--> <!-- <van-cell :border="false" title="主题">{{o.hdsbzpzt}}</van-cell>-->
<van-cell :border="false" title="上传时间">{{o.hdsbsj}}</van-cell> <van-cell :border="false" title="上传时间">{{o.hdsbsj}}</van-cell>
<van-cell :border="false" title="审核状态"> <van-cell :border="false" title="审核状态">
@@ -57,27 +47,16 @@ layout("/mobile/platform.html"){
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
<template #right> <template #right>
<van-button square text="删除" type="danger" @click="doDelete(o.id)" <van-button square text="删除" type="danger" @click="doDelete(o.id)" style="height: 100%"></van-button>
style="height: 100%;"></van-button>
</template> </template>
</van-swipe-cell> </van-swipe-cell>
</div> </div>
</van-list> </van-list>
<van-empty <van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div> </div>
<van-popup v-model="viewShow" position="right" <van-popup v-model="viewShow" position="right" :style="{ height: '100%',width:'100%' }">
:style="{ height: '100%',width:'100%' }"> <van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="viewShow=false"></van-nav-bar>
<van-nav-bar title="详细信息" left-arrow placeholder fixed
@click-left="viewShow=false"></van-nav-bar>
<mobile-wmhd-info ref="minfo"></mobile-wmhd-info> <mobile-wmhd-info ref="minfo"></mobile-wmhd-info>
</van-popup> </van-popup>
@@ -88,12 +67,11 @@ layout("/mobile/platform.html"){
<van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/list">我的教工作品</van-tabbar-item> <van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/list">我的教工作品</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
</div> </div>
<script> <script>
let vue = new Vue({ let vue = new Vue({
el: '#app', el: "#app",
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
@@ -101,28 +79,28 @@ layout("/mobile/platform.html"){
tarBarActive: 1, tarBarActive: 1,
yearOption: [], yearOption: [],
pageForm: { pageForm: {
year: '', year: "",
hdtype: 1, hdtype: 1
} }
} }
}, },
components: { components: {
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()), "mobile-wmhd-info": httpVueLoader("/components/mobile/wmhd/info.vue?v=" + new Date().getTime())
}, },
methods: { methods: {
openEdit(id, hdid) { openEdit(id, hdid) {
window.location.href = '/platform/staffActivities?client=mobile&id=' + hdid + '&zpid=' + id window.location.href = "/platform/staffActivities?client=mobile&id=" + hdid + "&zpid=" + id
}, },
async doDelete(id) { async doDelete(id) {
const confirm = await vant.Dialog.confirm({ const confirm = await vant.Dialog.confirm({
title: '提示', title: "提示",
message: '确定要删除此次作品吗?', message: "确定要删除此次作品吗?"
}) })
if (confirm === 'confirm') { if (confirm === "confirm") {
const data = await $.post("/platform/hd/wmhd/dodelete", { id: id }) const data = await $.post("/platform/hd/wmhd/dodelete", { id: id })
if (data.code == 0) { if (data.code == 0) {
await this.yearChange() await this.yearChange()
vant.Toast.success('删除成功'); vant.Toast.success("删除成功")
} }
} }
}, },
@@ -134,7 +112,7 @@ layout("/mobile/platform.html"){
}, },
async onLoad() { async onLoad() {
this.mLoading = true this.mLoading = true
$.post('/platform/hd/jzghd/sczp/pageData', this.pageForm).then(res => { $.post("/platform/hd/jzghd/sczp/pageData", this.pageForm).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list) this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) { if (this.tableData.length === res.data.totalCount) {
@@ -155,14 +133,13 @@ layout("/mobile/platform.html"){
}, },
async created() { async created() {
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) { for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearOption.unshift({value: i, text: i + '年'},) this.yearOption.unshift({ value: i, text: i + "年" })
} }
this.$set(this.pageForm, "year", this.yearOption[0].value) this.$set(this.pageForm, "year", this.yearOption[0].value)
} }
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->
@@ -1,23 +1,23 @@
<!--# <!--#
layout("/mobile/platform.html"){ layout("/mobile/platform.html"){
#--> #-->
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css"> <link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css" />
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script> <script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
<div id="app" v-cloak> <div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading> <m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar> <van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<mobile-wmhd-info ref="minfo"></mobile-wmhd-info> <mobile-wmhd-info ref="minfo"></mobile-wmhd-info>
</div> </div>
<script> <script>
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
data() { data() {
return {} return {}
}, },
components: { components: {
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()), "mobile-wmhd-info": httpVueLoader("/components/mobile/wmhd/info.vue?v=" + new Date().getTime())
}, },
methods: {}, methods: {},
async created() { async created() {
@@ -31,7 +31,6 @@ layout("/mobile/platform.html"){
}) })
</script> </script>
<!--# <!--#
} }
#--> #-->