first commit
This commit is contained in:
@@ -0,0 +1,370 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.search-fixed {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
|
||||
.list-card .van-cell__value {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<!-- <van-dropdown-item v-model="pageForm.isMenWomen" @change="yearChange"
|
||||
:options="sexList"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.groupName" @change="yearChange"
|
||||
:options="groupList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.eventId" @change="yearChange" :options="eventList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/wbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply==0&&o.applyWay.includes(1)"></image>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/qxbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="您报队伍">{{o.activityTeamName?o.activityTeamName:'暂无'}}</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="可报队数" v-if="o.projectType==2">
|
||||
{{o.restrictTotalTeam}}队
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="每队可报人数">
|
||||
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
|
||||
<!-- <span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>-->
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="已报名总人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-dialog v-model="activityDialog" title="您确定要报名此活动吗?" show-cancel-button @confirm="doActivityConfirm"
|
||||
@cancel="activityDialog = false" :before-close="onBeforeClose">
|
||||
<van-radio-group v-model="formData.teamId" v-if="projectType==2">
|
||||
<van-cell-group>
|
||||
<template v-for="i in teams">
|
||||
<van-cell :title="i.name" clickable>
|
||||
<template #right-icon>
|
||||
<van-radio :name="i.id"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</van-dialog>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
teamId: null,
|
||||
teamName: null,
|
||||
activityId: "",
|
||||
eventId: ""
|
||||
},
|
||||
title: "",
|
||||
projectType: "",
|
||||
applyType: "",
|
||||
activityDialog: false,
|
||||
restrictBoyNum: "",
|
||||
restrictGirlNum: "",
|
||||
athletesMaxNum: "",
|
||||
events: [],
|
||||
eventList: [],
|
||||
groupList: [
|
||||
{text: '按组别', value: null},
|
||||
{text: '甲组', value: '甲组'},
|
||||
{text: '乙组', value: '乙组'},
|
||||
{text: '丙组', value: '丙组'},
|
||||
{text: '丁组', value: '丁组'},
|
||||
],
|
||||
sexList: [
|
||||
{text: '按性别', value: 1},
|
||||
{text: '男子', value: 2},
|
||||
{text: '女子', value: 3},
|
||||
{text: '团体', value: 4},
|
||||
],
|
||||
auditList: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已报名', value: "true"},
|
||||
{text: '未报名', value: "false"},
|
||||
],
|
||||
teams: [],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
isMenWomen: "1"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onBeforeClose(action, done) {
|
||||
return done(false)
|
||||
},
|
||||
async doActivityConfirm() {
|
||||
if (this.formData.teamId == null && this.projectType == 2) {
|
||||
this.$toast("请选择报名的小队")
|
||||
return
|
||||
} else {
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
teamId: this.formData.teamId,
|
||||
activityId: this.formData.activityId,
|
||||
eventId: this.formData.eventId,
|
||||
applyType: this.applyType
|
||||
})
|
||||
const nv = data.filter(v => v.sex == '女')
|
||||
const nan = data.filter(v => v.sex == '男')
|
||||
let title = this.projectType == 1 ? "项目" : "小队"
|
||||
|
||||
if (this.athletesMaxNum && (data.length >= this.athletesMaxNum)) {
|
||||
this.$toast("该" + title + "运动员已报满!")
|
||||
return
|
||||
}
|
||||
|
||||
if (this.applyType != 3) {
|
||||
if ("${@shiro.getPrincipalProperty('sex')}" == '女' && nv.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictBoyNum) : this.restrictGirlNum)) {
|
||||
this.$toast("该" + title + "女运动员已报满!")
|
||||
return
|
||||
}
|
||||
if ("${@shiro.getPrincipalProperty('sex')}" == '男' && nan.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictGirlNum) : this.restrictBoyNum)) {
|
||||
this.$toast("该" + title + "男运动员已报满!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (this.formData.teamId != null) this.$set(this.formData, "teamName", this.teams.find(v => v.id == this.formData.teamId).name)
|
||||
await $.post("/mobile/activity/Sports/list/doActivity", this.formData)
|
||||
|
||||
await this.onRefresh()
|
||||
this.activityDialog = false
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
const {
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyNum,
|
||||
name,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
|
||||
this.projectType = projectType
|
||||
this.formData.activityId = activityId
|
||||
this.formData.eventId = eventId
|
||||
this.applyType = applyType
|
||||
|
||||
const res = await $.get("/mobile/activity/Sports/list/getScopeUser", {activityGroupId: activityGroupId})
|
||||
if (res.data == 0) {
|
||||
this.$toast("您不在报名人员内!")
|
||||
return
|
||||
}
|
||||
if ("${@shiro.getPrincipalProperty('unit').getUnionid()}" == "") {
|
||||
this.$toast("您的工会信息有误,无法报名,请联系工会管理员!")
|
||||
return
|
||||
}
|
||||
if (userApply == 1) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const data = await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.yearChange()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
this.events = []
|
||||
const data = await $.get("/platform/activity/apply/getEvents", {activityId: activityId})
|
||||
this.events = data
|
||||
const {
|
||||
athletesMaxNum,
|
||||
startAgeDate,
|
||||
endAgeDate,
|
||||
isMenWomen,
|
||||
restrictBoyNum,
|
||||
restrictGirlNum
|
||||
} = this.events.find(v => v.id == eventId)
|
||||
this.restrictBoyNum = restrictBoyNum
|
||||
this.restrictGirlNum = restrictGirlNum
|
||||
this.athletesMaxNum = athletesMaxNum
|
||||
if (projectType == 1) {
|
||||
if (restrictRegNumber > 0) {
|
||||
const {data} = await $.post("/platform/activity/apply/getActivityData", {activityId})
|
||||
const userApplyNum = data.filter(v => v.userId == "${@shiro.getPrincipalProperty('id')}").length
|
||||
if (userApplyNum >= restrictRegNumber) {
|
||||
this.$toast('单项项目,每人限报' + restrictRegNumber + '个!团体项目除外')
|
||||
return
|
||||
}
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen == 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen == 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
|
||||
if (athletesMaxNum != null) {
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
activityId: this.formData.activityId,
|
||||
applyType: applyType,
|
||||
eventId: eventId
|
||||
})
|
||||
if (data.length >= athletesMaxNum) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + athletesMaxNum + "人")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (startAgeDate != null) {
|
||||
const birthday = moment("${@shiro.getPrincipalProperty('birthday')}").valueOf()
|
||||
if (birthday < moment(startAgeDate).valueOf() || birthday > moment(endAgeDate).valueOf()) {
|
||||
this.$toast("您的年龄不在限制范围內!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if (isMenWomen != null && isMenWomen == 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen == 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (projectType == 2) {
|
||||
const {data} = await $.get("/platform/activity/apply/getActivityTeamId", {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.teams = data
|
||||
if (data.length && data.length > 0) this.$set(this.formData, "teamId", data[0].id)
|
||||
|
||||
}
|
||||
this.activityDialog = true
|
||||
}
|
||||
,
|
||||
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
}
|
||||
,
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/platform/activity/apply/pageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
|
||||
}
|
||||
,
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString('id')
|
||||
const applyType = GetQueryString('applyType')
|
||||
this.pageForm.activityId = id
|
||||
this.pageForm.applyType = applyType
|
||||
const data = await $.post("/platform/activity/apply/getEvents", {activityId: id})
|
||||
data.forEach(v => {
|
||||
this.eventList.push({value: v.eventId, text: v.allName})
|
||||
})
|
||||
this.eventList.unshift({value: null, text: "按项目"})
|
||||
this.$set(this.pageForm, "eventId", this.eventList[0].value)
|
||||
this.$set(this.pageForm, "isMenWomen", 1)
|
||||
this.$set(this.pageForm, "groupName", null)
|
||||
this.$set(this.pageForm, "isAudit", null)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,108 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isActivity" :options="activityList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.applyEndTime,o.applyType)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.NAME}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动地址">{{o.address}}</van-cell>
|
||||
<van-cell :border="false" title="报名时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动状态">
|
||||
<van-tag type="danger" v-if="moment(o.applyEndTime).valueOf() <moment().valueOf()">报名结束
|
||||
</van-tag>
|
||||
<van-tag type="success" v-else-if="moment(o.applyEndTime).valueOf() >moment().valueOf()">报名中
|
||||
</van-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activityList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '已结束', value: 3},
|
||||
],
|
||||
pageForm: {
|
||||
year: '',
|
||||
isActivity: "1"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityData() {
|
||||
const {data} = await $.post("/platform/activity/apply/activityData", {
|
||||
year: this.pageForm.year,
|
||||
isActivity: this.pageForm.isActivity
|
||||
})
|
||||
this.tableData = data
|
||||
},
|
||||
openInfo(id, applyEndTime, applyType) {
|
||||
if (moment(applyEndTime).valueOf() < moment().valueOf()) {
|
||||
this.$toast("活动已结束,暂不能报名")
|
||||
return
|
||||
}
|
||||
window.location.href = '/mobile/activity/Sports/list/activityEventList?id=' + id + "&applyType=" + applyType
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.$set(this.pageForm, "isActivity", 2)
|
||||
await this.getActivityData()
|
||||
this.mLoading = false
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,147 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="报名详情" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/ybm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
|
||||
<van-cell :border="false" title="可报人数">
|
||||
<span v-if="o.applyType==3">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="已报名人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
projectInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityInfo() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/findOne', {id: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.o = resp.data
|
||||
this.$nextTick(() => {
|
||||
// document.getElementsByClassName('activity_img_back')[0].style.backgroundImage = "url(" + FILE_DOMAIN + this.o.cover + ")"
|
||||
})
|
||||
}
|
||||
},
|
||||
async getSchoolActivityProjectInfoByMine() {
|
||||
const resp = await $.get('/mobile/activity/myActivity/getSchoolActivityProjectInfoByMine', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.projectInfo = resp.data
|
||||
}
|
||||
},
|
||||
async getHasRegEventProject() {
|
||||
const resp = await $.get('/platform/activity/apply/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
const {
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyNum,
|
||||
name,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('取消成功')
|
||||
this.getHasRegEventProject()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.$set(this.pageForm, 'isAudit', 'true')
|
||||
this.$set(this.pageForm, 'activityId', id)
|
||||
this.$set(this.pageForm, 'pageSize', 100)
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getHasRegEventProject()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,549 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.in-sheet-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
max-height: 96%;
|
||||
height: 96%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 86%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.no_content {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-action-sheet__content {
|
||||
height: 88%;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 6em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
/*position: absolute;*/
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.van-cell__value--alone {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--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">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<!--<van-dropdown-item v-model="pageForm.meetingTime" :options="meetingTimeList"
|
||||
@change="doSearch"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
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 @click="openView(o.id, o.modulename)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey"> 联系人:</span>
|
||||
{{o.contact_person}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联系方式:</span>{{o.contact_phone}}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<!--<div class="cus_overflow" style="line-height: 20px; width: 83%">
|
||||
<span style="color: grey">开放时段:</span>
|
||||
{{o.meetingdescription}}
|
||||
</div>-->
|
||||
<!--<span class="showMore" @click.stop="desc = o.meetingdescription; popupShow = true">查看更多</span>-->
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">已审{{o.audit}}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o.id, o.modulename)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">未审{{o.no_audit}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--弹出框-->
|
||||
<van-popup v-model:show="popupShow" class="cus_popup">
|
||||
<pre style="margin: 0; white-space: break-spaces">{{desc}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-icon @click="popupShow = false" class="cus_icon" v-if="popupShow" name="close"></van-icon>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet v-model:show="userShow" :title="queryType === 'notAudit' ? '预约列表' : '预约列表'"
|
||||
class="userPopup" @close="popClose">
|
||||
<div :class="queryType == 'notAudit' ? 'content' : 'no_content'">
|
||||
<div v-if="queryType === 'notAudit'" style="text-align: right; width: 96%">
|
||||
<van-tag color="#1867b0" style="margin-right: 10px" @click="cancelAll" size="large" type="primary">
|
||||
取消选中
|
||||
</van-tag>
|
||||
<van-tag color="#1867b0" @click="allIn" size="large" type="primary">全选</van-tag>
|
||||
</div>
|
||||
<div class="van-doc-card in-sheet-card" v-for="(item, i) in userList">
|
||||
<!--<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 80%">
|
||||
<span>{{moment(item.startTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(item.endTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
</div>
|
||||
<div v-if="queryType === 'notAudit'">
|
||||
<span @click="checkAll(i)">全选</span>
|
||||
<span @click="toggleAll(i)" style="margin-left: 4px">反选</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<div style="width: 90%">
|
||||
<div>
|
||||
<span style="display: inline-block; min-width: 40px; max-width: 76px">{{item.username}}</span>
|
||||
<span style="display: inline-block; width: 20px">{{item.sex}}</span>
|
||||
<span style="display: inline-block; width: 76px">{{item.loginname}}</span>
|
||||
<span class="unit">{{item.unitname}}</span>
|
||||
</div>
|
||||
<div style="width: 94%; display: flex">
|
||||
<div style="color: grey;">预约时间:</div>
|
||||
<div>
|
||||
<div v-for="(d,index) in item.concat_day.split(',')">{{getTime(item, d)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">参加人员:</span><span>{{item.joinUser}}</span>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">预约事由:</span><span>{{item.reserve_cause}}</span>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">审核状态:</span><span>{{item.stateName}}</span>
|
||||
</div>
|
||||
<div v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
style="width: 94%;">
|
||||
<span style="color: grey">反馈意见:</span><span>{{item.back_option}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
clickable class="cus_cell"
|
||||
:key="item.id"
|
||||
@click="toggle(i)">
|
||||
|
||||
<van-icon class="audit_icon" color="green"
|
||||
v-if="queryType === 'hasAudit' && item.auditState == true"
|
||||
name="passed"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
v-if="queryType === 'hasAudit' && item.auditState == false"
|
||||
name="close"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="item.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
<!--<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: fixed; bottom: 50px; width: 95%">
|
||||
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回</van-button>
|
||||
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过</van-button>
|
||||
</div>-->
|
||||
</div>
|
||||
<div style="position: absolute; bottom: 20px; width: 100%;z-index: 9999">
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: center">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small"
|
||||
style="height: 38px;border-radius: 10px;margin-right: 20px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small"
|
||||
style="height: 38px;border-radius: 10px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-action-sheet>
|
||||
|
||||
<!--审核弹框-->
|
||||
<van-dialog v-model:show="auditShow" @confirm="auditDo" title="温馨提示" show-cancel-button>
|
||||
<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-field
|
||||
v-model="reason"
|
||||
rows="2"
|
||||
label="审核意见:"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入审核意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
desc: '',
|
||||
list: ['a', 'b'],
|
||||
result: [],
|
||||
reason: '',
|
||||
auditShow: false,
|
||||
popupShow: false,
|
||||
userShow: false,
|
||||
userList: [],
|
||||
userClickList: [],
|
||||
str: '',
|
||||
type: '',
|
||||
auditType: '',
|
||||
queryType: '',
|
||||
typeList: [],
|
||||
meetingTimeList: [{text: '全部时间', value: null}, {text: '即将开始', value: 0}, {text: '已结束', value: 1}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await $.post('/mobile/activity/site/audit/getLeaveUser', {
|
||||
siteId: o.id,
|
||||
auditType: 'hasAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
|
||||
this.userList.sort((a, b) => {
|
||||
return b.auditState - a.auditState
|
||||
})
|
||||
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
cancelAll() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false))
|
||||
},
|
||||
allIn() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(true))
|
||||
},
|
||||
checkAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(i) {
|
||||
this.$refs.checkboxes[i].toggle();
|
||||
},
|
||||
async auditDo() {
|
||||
let idList = this.result
|
||||
if (this.type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/site/audit/audit', {
|
||||
ids: JSON.stringify(idList),
|
||||
auditOpinion: this.reason,
|
||||
isPass: this.auditType === 'pass'
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Toast('操作失败')
|
||||
}
|
||||
this.userShow = false
|
||||
},
|
||||
audit(type, auditType) {
|
||||
this.type = type
|
||||
this.auditType = auditType
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
vant.Toast('请先选择人员')
|
||||
return
|
||||
}
|
||||
this.str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择' : '您确定要一键全部审核吗?'
|
||||
this.reason = auditType === 'pass' ? '同意' : '拒绝'
|
||||
this.auditShow = true
|
||||
},
|
||||
async openView(id, modulename) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await $.post('/mobile/activity/site/audit/getLeaveUser', {
|
||||
siteId: id,
|
||||
moduleName: modulename,
|
||||
auditType: 'canAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无预约数据')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
return
|
||||
}
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.$set(this.pageForm, "meetingTime", this.meetingTimeList[1].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,359 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 84%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.pop {
|
||||
max-height: 70%;
|
||||
width: 90%;
|
||||
padding: 0px 10px 10px 10px;
|
||||
}
|
||||
|
||||
.pop h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pop h4 {
|
||||
line-height: 26px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--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">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
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 @click="openView(o)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey"> 联系人:</span>
|
||||
{{o.contact_person}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">联系方式:</span>{{o.contact_phone}}</van-col>
|
||||
</van-row>
|
||||
<!--<van-row>
|
||||
<van-col span="24"><span style="color: grey">已预约人数:</span>{{o.count}}</van-col>
|
||||
</van-row>-->
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">开放时间:</span><span v-if="o.workday === true">工作日</span>
|
||||
{{o.open_time}}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup round v-model:show="show" class="pop">
|
||||
<div style="text-align: center;padding: 10px 0; font-size: 20px">爱心母婴室管理规定</div>
|
||||
<div>一、基本原则</div>
|
||||
<div style="padding-left: 30px;">
|
||||
<p>1.使用对象:有哺乳需求的本校在职女教职工。</p>
|
||||
<p>2.开放时间:工作日8:00--17:30。</p>
|
||||
<p>3.使用制度:实行预约登记制。凡有哺乳需求的女教职工提前向校工会提出使用申请,经审核通过并开通权限后即可使用。</p>
|
||||
<p>4.日常管理:由校工会负责。</p>
|
||||
</div>
|
||||
|
||||
<div>二、管理人员</div>
|
||||
<div style="padding-left: 30px;">
|
||||
<p>1.负责爱心母婴室使用登记管理。</p>
|
||||
<p>2.定期保养设备,确保正常使用。</p>
|
||||
<p>3.保持室内整洁、卫生安全,做好保洁消毒记录。</p>
|
||||
<p>4.定期收集意见和建议,不断改进服务。</p>
|
||||
</div>
|
||||
<div>三、使用人员</div>
|
||||
<div style="padding-left: 30px;">
|
||||
<p>1.遵守学校安全管理制度和爱心母婴室管理规定。</p>
|
||||
<p>2.严禁吸烟,安全使用电器,爱护公物,损坏赔偿。</p>
|
||||
<p>3.保持室内卫生清洁,勿大声喧哗,不影响楼内工作秩序。</p>
|
||||
<p>4.妥善保管自带物品,冰存的母乳须贴上姓名标签并及时取走。</p>
|
||||
<p>5.不得擅自携他人入内,不做和哺乳无关事宜,使用完毕及时离开。</p>
|
||||
<p>6.欢迎在《爱心母婴室使用意见簿》上留下您宝贵的意见和建议。</p>
|
||||
</div>
|
||||
<br/>
|
||||
<p>联系人:曾钰媛梦 84894774、15850692181</p>
|
||||
|
||||
<van-button color="#246fb4" @click="toReserve" type="primary" style="width: 100%">已知晓并遵守</van-button>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
show: false,
|
||||
siteId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
this.siteId = o.id
|
||||
if (o.sexlimit === 1 || o.sexlimit === 2) {
|
||||
const sex = o.sexlimit === 1 ? '男' : '女'
|
||||
if ("${@shiro.getPrincipalProperty('sex')}" === sex) {
|
||||
location.href = '/mobile/activity/site/info/reserve?id=' + o.id
|
||||
} else {
|
||||
vant.Toast('抱歉,该场地仅限' + sex + '性会员预约')
|
||||
}
|
||||
} else {
|
||||
location.href = '/mobile/activity/site/info/reserve?id=' + o.id
|
||||
}
|
||||
},
|
||||
toReserve() {
|
||||
location.href = '/mobile/activity/site/info/reserve?id=' + this.siteId
|
||||
this.show = false
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/info/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,426 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 84%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
.van-cell__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--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">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :title="pageForm.time" ref="item" @open="">
|
||||
<van-cell center title="查询全部">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="pageForm.timeSwitch" size="24" active-color="#246fb4"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-datetime-picker v-show="pageForm.timeSwitch === false"
|
||||
v-model="time" cancel-button-text=" " confirm-button-text=" "
|
||||
type="year-month"
|
||||
title="选择年月"
|
||||
:formatter="timeFormatter"
|
||||
></van-datetime-picker>
|
||||
<div style="padding: 5px 16px;margin-top: 6px">
|
||||
<van-button type="danger" color="#246fb4" block round @click="onConfirm" style="height: 36px">
|
||||
确认
|
||||
</van-button>
|
||||
</div>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
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 @click="openView(o.id, o.modulename)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">预约天数:</span>
|
||||
<span>{{o.days}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">预约时间:</span>
|
||||
<span v-for="(item,index) in o.concat_day.split(',')">
|
||||
<div :style="index !== 0 ? 'text-indent: 5em' : ''">{{getTime(o, item)}}</div>
|
||||
</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span v-if="[0].includes(o.stateaudittype)"
|
||||
style="color: #e6a23c">{{o.statename}}</span>
|
||||
<span v-if="o.stateaudittype==3" style="color: #67c23a">{{o.statename}}</span>
|
||||
<span v-if="o.stateaudittype==1" style="color: #f56c6c">{{o.statename}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.stateaudittype == '1'">
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核意见:</span>
|
||||
<span>{{JSON.parse(o.auditlist).find(x => x.auditState === false).auditOption}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="rollback(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">撤销预约</van-button>
|
||||
<van-button @click.stop="backOption(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">反馈意见</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
<van-dialog v-model="show" title="反馈意见" show-cancel-button @confirm="backDo">
|
||||
<van-field
|
||||
v-model="option"
|
||||
rows="4"
|
||||
label="反馈意见:"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入反馈意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
time: new Date(),
|
||||
option: '',
|
||||
show: false,
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
timeList: [],
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onConfirm() {
|
||||
if(this.pageForm.timeSwitch === true) {
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
}else {
|
||||
this.timeList = [{text: moment(this.time).format('YYYY-MM'), value: moment(this.time).format('YYYY-MM')}]
|
||||
}
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$refs.item.toggle()
|
||||
this.doSearch()
|
||||
},
|
||||
timeFormatter(type, val) {
|
||||
if (type === 'year') {
|
||||
return val + `年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return val + `月`;
|
||||
}
|
||||
return val;
|
||||
},
|
||||
async rollback(o) {
|
||||
const self = this
|
||||
const res = await $.post("/platform/activity/site/reserve/isCanRollBack", {id: o.id});
|
||||
if(res === true) {
|
||||
vant.Toast('此预约状态下不能进行撤回操作!')
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您是否要撤销此预约?',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/activity/site/info/rollback', {
|
||||
id: o.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if(resp.code === 0) {
|
||||
self.doSearch()
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
backOption(o) {
|
||||
this.info = o
|
||||
this.option = ''
|
||||
this.show = true
|
||||
},
|
||||
async backDo() {
|
||||
if(this.option === '') {
|
||||
vant.Toast('请填写反馈意见')
|
||||
return
|
||||
}
|
||||
const res = await $.post('/mobile/activity/site/info/backOption', {
|
||||
id: this.info.id,
|
||||
option: this.option
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
vant.Toast(res.msg)
|
||||
} else {
|
||||
vant.Toast('操作失败')
|
||||
}
|
||||
},
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/info/myReserve', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
//this.timeList.unshift({text: moment().format('YYYY-MM'), value: moment().format('YYYY-MM')})
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$set(this.pageForm, "timeSwitch", true)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,460 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.my_calendar {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #0e78c5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.day {
|
||||
background-color: #14497e;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
padding: 5px 6px;
|
||||
line-height: 22px;
|
||||
border-radius: 4px;
|
||||
margin-right: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 72%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.state {
|
||||
width: 80px;
|
||||
height: 36px;
|
||||
text-align: center;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 2px;
|
||||
color: #929292;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 10px 0px;
|
||||
background-color: white;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
border-radius: 6px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
tr {
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.van-action-sheet__content {
|
||||
padding: 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 10px 0px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
|
||||
.top-calendar {
|
||||
height: 70px;
|
||||
max-height: 70px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #0e78c5;
|
||||
}
|
||||
|
||||
.calendar-left {
|
||||
width: calc(100% - 20px);
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
.calendar-left-day {
|
||||
min-width: 65px;
|
||||
height: 100%;
|
||||
margin: 0 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.left-day-active {
|
||||
background-color: #0000cc;
|
||||
}
|
||||
|
||||
.day-info-month {
|
||||
|
||||
}
|
||||
|
||||
.day-info-week {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.calendar-right {
|
||||
width: 30px;
|
||||
max-width: 30px;
|
||||
text-align: center;
|
||||
height: 60%;
|
||||
border-left: 1px solid #fff3f3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.top_pop .van-popup {
|
||||
top: 46px;
|
||||
}
|
||||
|
||||
.van-action-sheet {
|
||||
max-height: 90%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
:title="site.name"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="top-calendar">
|
||||
<div class="calendar-left">
|
||||
<div class="calendar-left-day" :class="moment(item).unix() == selectDate.unix() ? 'left-day-active':''"
|
||||
@click="dayClick(item)"
|
||||
v-for="item in weekList">
|
||||
<div class="day-info-week">
|
||||
{{getWeekTextByDate(item)}}
|
||||
</div>
|
||||
<div class="day-info-month">
|
||||
{{moment(item).format('MM-DD')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="calendar-right">
|
||||
<van-icon size="16" color="white" name="arrow-down" @click="calendarVisible=true"></van-icon>
|
||||
<van-calendar class="top_pop" v-model="calendarVisible" color="#246fb4" position="top" @confirm="onConfirm"
|
||||
:default-date="selectDate.toDate()"
|
||||
:formatter="calendarFormatter"
|
||||
title="选择开始日期"></van-calendar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<table>
|
||||
<tr v-for="item in timeData">
|
||||
<td class="time">{{item.start_time + '-' + item.end_time}}</td>
|
||||
|
||||
<td>
|
||||
<div v-if="isCanRe(item)===3" class="state" style="background-color: #0e78c5;color: #fff3f3">
|
||||
已预约
|
||||
</div>
|
||||
<div v-if="isCanRe(item) === 2" class="state" style="background-color: #fff4f2; color: #cc5a45">约满
|
||||
</div>
|
||||
<div @click="chooseTime(item)" v-if="isCanRe(item) === 1" class="state"
|
||||
style="background-color: #e8ffef; color: #52986a">
|
||||
<span v-if="!times.map(o => o.fullDay).includes(selectDate.format('YYYY-MM-DD') + ' ' + item.start_time + '-' + item.end_time)">可预约</span>
|
||||
<span v-else>
|
||||
<van-icon name="passed" size="26" style="line-height: 36px;position: unset"></van-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="isCanRe(item) === 0" class="state">已过期</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="position: fixed; bottom: 0; width: 100%">
|
||||
<van-button @click="reserve" type="primary" color="#246fb4" style="width: 100%">确定预约</van-button>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="show" title="确认预约信息">
|
||||
|
||||
<van-cell title="预约人">{{person}}</van-cell>
|
||||
<van-cell title="性别">${@shiro.getPrincipalProperty('sex')}</van-cell>
|
||||
<van-cell title="工号">${@shiro.getPrincipalProperty('loginname')}</van-cell>
|
||||
<van-cell title="所属单位">{{unit}}</van-cell>
|
||||
<van-cell title="联系电话">{{phone}}</van-cell>
|
||||
<van-cell title="预约时间">
|
||||
<div v-for="time in times">
|
||||
<van-tag closeable size="medium" type="primary" @close="close(time.fullDay)">
|
||||
{{time.fullDay}}
|
||||
</van-tag>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="预约地点">{{site.name}}</van-cell>
|
||||
|
||||
<van-field
|
||||
v-model="joinUser"
|
||||
rows="2"
|
||||
autosize
|
||||
label="参加人员"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入参加人员"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="message"
|
||||
rows="4"
|
||||
autosize
|
||||
label="预约事由"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入预约事由"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
|
||||
<div style="margin: 20px 0px; display: flex; justify-content: space-between;padding: 0px 22px;">
|
||||
<van-button @click="message = '';show = false" color="#246fb4" style="width: 47%" size="small" plain
|
||||
type="info">关闭
|
||||
</van-button>
|
||||
<van-button @click="reserveDo" color="#246fb4" style="width: 47%" size="small" type="info">确认</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
moment.locale('zh_cn');
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
person: "${@shiro.getPrincipalProperty('username')}",
|
||||
unit: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
phone: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
message: '',
|
||||
show: false,
|
||||
site_id: '',
|
||||
site: {},
|
||||
timeData: [],
|
||||
times: [],
|
||||
weekList: [],
|
||||
joinUser: '',
|
||||
calendarVisible: false,
|
||||
selectDate: null,
|
||||
//已经预约的记录
|
||||
alreadyReserveRecord: [],
|
||||
holidays: ['2022-06-03', '2022-06-04', '2022-06-05', '2022-09-10', '2022-09-11', '2022-09-12',
|
||||
'2022-10-01', '2022-10-02', '2022-10-03', '2022-10-04', '2022-10-05', '2022-10-06', '2022-10-07',],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getWeekTextByDate() {
|
||||
return (date) => {
|
||||
const weekNum = moment(date).day()
|
||||
switch (weekNum) {
|
||||
case 0:
|
||||
return '周日'
|
||||
case 1:
|
||||
return '周一'
|
||||
case 2:
|
||||
return '周二'
|
||||
case 3:
|
||||
return '周三'
|
||||
case 4:
|
||||
return '周四'
|
||||
case 5:
|
||||
return '周五'
|
||||
case 6:
|
||||
return '周六'
|
||||
}
|
||||
}
|
||||
},
|
||||
calendarFormatter() {
|
||||
return (day) => {
|
||||
// 休息日不能选择
|
||||
let week = day.date.getDay()
|
||||
if (week === 0 || week === 6) {
|
||||
day.type = 'disabled'
|
||||
}
|
||||
return day
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close(f) {
|
||||
if (this.times.length === 1) {
|
||||
vant.Toast('必须保留一个时间段')
|
||||
return
|
||||
}
|
||||
const index = this.times.findIndex(v => v.fullDay === f)
|
||||
this.times.splice(index, 1)
|
||||
},
|
||||
onConfirm(date) {
|
||||
this.selectDate = moment(date)
|
||||
this.setWeekList(this.selectDate)
|
||||
this.calendarVisible = false
|
||||
},
|
||||
//这里要排除掉休息日
|
||||
setWeekList(startDate) {
|
||||
const wk = []
|
||||
wk.push(moment(startDate))
|
||||
let count = 1
|
||||
while (wk.length < 7) {
|
||||
const addDate = moment(startDate).add(count, 'd')
|
||||
//这里不是休息日才能加到数组里
|
||||
if (addDate.day() !== 0 && addDate.day() !== 6 && !this.holidays.includes(moment(addDate).format('YYYY-MM-DD'))) {
|
||||
wk.push(addDate)
|
||||
}
|
||||
count++
|
||||
}
|
||||
this.weekList = wk
|
||||
},
|
||||
dayClick(date) {
|
||||
this.selectDate = date
|
||||
this.getReserve()
|
||||
},
|
||||
reserve() {
|
||||
if (this.times.length === 0) {
|
||||
vant.Toast('请选择要预约的时段')
|
||||
return
|
||||
}
|
||||
this.show = true
|
||||
},
|
||||
async reserveDo() {
|
||||
const resp = await $.post('/mobile/activity/site/info/reserveDo', {
|
||||
siteId: this.site_id,
|
||||
times: JSON.stringify(this.times),
|
||||
message: this.message,
|
||||
joinUser: this.joinUser,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast('预约成功')
|
||||
if (resp.code === 0) {
|
||||
this.show = false
|
||||
this.times = []
|
||||
this.message = null
|
||||
await this.getMyReservation()
|
||||
await this.getReserve()
|
||||
await this.onLoad()
|
||||
}
|
||||
} else {
|
||||
vant.Toast('预约失败')
|
||||
}
|
||||
},
|
||||
chooseTime(item) {
|
||||
const cloneItem = clone(item)
|
||||
const map = this.times.map(o => o.fullDay)
|
||||
const index = map.indexOf(this.selectDate.format('YYYY-MM-DD') + ' ' + cloneItem.start_time + '-' + cloneItem.end_time)
|
||||
if (index > -1) {
|
||||
this.times.splice(index, 1)
|
||||
} else {
|
||||
cloneItem.day = this.selectDate.format('YYYY-MM-DD')
|
||||
cloneItem.fullDay = cloneItem.day + ' ' + cloneItem.start_time + '-' + cloneItem.end_time
|
||||
this.times.push(cloneItem)
|
||||
}
|
||||
},
|
||||
isCanRe(item) {
|
||||
const now = new Date()
|
||||
const end = moment().format('YYYY-MM-DD') + ' ' + item.end_time + ':00'
|
||||
|
||||
const itemFullTime = this.selectDate.format('YYYY-MM-DD') + " " + item.start_time + "-" + item.end_time
|
||||
|
||||
if (this.alreadyReserveRecord.includes(itemFullTime)) {
|
||||
return 3
|
||||
}
|
||||
|
||||
if (now.getTime() >= new Date(end).getTime() && this.selectDate.format('YYYY-MM-DD') === moment().format('YYYY-MM-DD')) {
|
||||
return 0
|
||||
} else {
|
||||
if (this.site.multiple) {
|
||||
return 1
|
||||
} else {
|
||||
return item.hasReserve === true ? 2 : 1
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/info/getDetail', {id: this.site_id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.site = res.data
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async getReserve() {
|
||||
const resp = await $.post('/mobile/activity/site/info/getReserve', {
|
||||
siteId: this.site_id,
|
||||
day: moment(this.selectDate).format('YYYY-MM-DD'),
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
resp.data.forEach(item => {
|
||||
item.isClick = true
|
||||
})
|
||||
this.timeData = resp.data
|
||||
}
|
||||
},
|
||||
async getMyReservation() {
|
||||
const resp = await $.post('/mobile/activity/site/info/getMyReservation', {
|
||||
site_id: this.site_id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.alreadyReserveRecord = resp.data.map(v => v.reserve_day + " " + v.start_time + "-" + v.end_time)
|
||||
}
|
||||
},
|
||||
//获取最新的一个工作日设为当前时间
|
||||
getLatestWorkDay() {
|
||||
//1.首先判断今天是不是工作日
|
||||
const weekNum = moment().day()
|
||||
let selectDate = null
|
||||
if (weekNum === 0) {
|
||||
//周日
|
||||
selectDate = moment().add(1, 'd')
|
||||
} else if (weekNum === 6) {
|
||||
//周六
|
||||
selectDate = moment().add(2, 'd')
|
||||
} else {
|
||||
selectDate = moment()
|
||||
}
|
||||
return selectDate
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.site_id = getQueryString('id')
|
||||
this.selectDate = this.getLatestWorkDay()
|
||||
this.setWeekList(this.selectDate)
|
||||
await this.getReserve()
|
||||
await this.onLoad()
|
||||
await this.getMyReservation()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,75 @@
|
||||
<!--活动信息公用页面-->
|
||||
|
||||
<div class="activity_img_back">
|
||||
<van-image
|
||||
fit="cover"
|
||||
width="100%"
|
||||
height="200"
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
></van-image>
|
||||
</div>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-cell title="活动名称" :value="o.name"></van-cell>
|
||||
<van-cell title="活动地址" :value="o.address"></van-cell>
|
||||
<van-cell title="报名时间">
|
||||
<template #label>
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="活动时间">
|
||||
<template #label>
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell v-if="o.userNumberLimit!=null">
|
||||
<template #title>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
活动人数
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
本工会名额
|
||||
</span>
|
||||
</template>
|
||||
<template>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
<span style="color: orange">{{o.totalUserNumberLimit }}</span>人
|
||||
</span>
|
||||
<span v-else="o.userNumberLimit===2">
|
||||
<span style="color: orange">{{unionLimitNum }}</span>人
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="当前报名" v-if="o.signUpMethod!=null">
|
||||
<template>
|
||||
<span style="color: red">{{hasRegUserNum}}</span>人
|
||||
</template>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="负  责  人">-->
|
||||
<!-- <template>-->
|
||||
<!-- {{o.createUserName}}({{o.createUserMobile}})-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
<van-cell title="报名方式" v-if="o.signUpMethod">
|
||||
<template>
|
||||
<span v-if="o.signUpMethod===1">个人报名</span>
|
||||
<span v-if="o.signUpMethod===2">分工会报名</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="活动内容" v-if="o.projectTypeCode!=='50004'">
|
||||
<template #label>
|
||||
{{o.activityContent}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="签到点位" v-if="o.needSign">
|
||||
<template #label>
|
||||
<div id="signMap" style="width: 100%;height: 300px"></div>
|
||||
<div style="margin-top: 10px;color: orange">
|
||||
活动开始后,请前往签到点位半径({{o.rangeMeter}})米内进行签到。
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
@@ -0,0 +1,130 @@
|
||||
const self_mixin = {
|
||||
data() {
|
||||
return {
|
||||
//已报名人数
|
||||
hasRegUserNum: 0,
|
||||
unionId: null,
|
||||
unionLimitNum: 0,
|
||||
isRegisterFull: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityInfo() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/findOne', {id: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
resp.data.location = JSON.parse(resp.data.location)
|
||||
resp.data.unionUserNumberLimit = JSON.parse(resp.data.unionUserNumberLimit)
|
||||
this.o = resp.data
|
||||
this.unionId = "${@shiro.getPrincipalProperty('unit').getUnionid()}"
|
||||
if (!this.unionId) {
|
||||
this.$toast.fail('您的所属工会信息缺失,请联系管理员')
|
||||
return
|
||||
}
|
||||
if (this.o.userNumberLimit === 2) {
|
||||
const unionLimit = resp.data.unionUserNumberLimit.find(v => v.id === this.unionId)
|
||||
this.unionLimitNum = unionLimit.limitNum
|
||||
}
|
||||
await this.getHasRegUserNum()
|
||||
this.$nextTick(() => {
|
||||
// document.getElementsByClassName('activity_img_back')[0].style.backgroundImage = "url(" + FILE_DOMAIN + this.o.cover + ")"
|
||||
if (this.o.needSign) {
|
||||
this.initMap()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async getHasRegUserNum() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/getHasRegUserNum', {activityId: this.activityId})
|
||||
this.hasRegUserNum = resp.data
|
||||
if (this.o.signUpMethod === 1) {
|
||||
if (this.o.userNumberLimit === 1) {
|
||||
if (this.hasRegUserNum === this.o.totalUserNumberLimit) {
|
||||
this.isRegisterFull = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
initMap() {
|
||||
let marker = null
|
||||
let circle = null
|
||||
this.$nextTick(() => {
|
||||
let map = new AMap.Map("signMap", {
|
||||
zoomEnable: true,
|
||||
dragEnable: false,
|
||||
resizeEnable: true,
|
||||
center: [114.402582, 30.521378],
|
||||
zoom: 16
|
||||
});
|
||||
|
||||
if (this.o.location && Array.isArray(this.o.location)) {
|
||||
const lng = parseFloat(this.o.location[0])
|
||||
const lat = parseFloat(this.o.location[1])
|
||||
marker = new AMap.Marker({
|
||||
position: [lng, lat],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
map.add(marker)
|
||||
// marker.setMap(map);
|
||||
// map.setZoomAndCenter(18, [lng, lat])
|
||||
|
||||
circle = new AMap.Circle({
|
||||
center: new AMap.LngLat(lng, lat), // 圆心位置
|
||||
radius: this.o.rangeMeter, //半径
|
||||
strokeColor: "#F33", //线颜色
|
||||
strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 1, //线粗细度
|
||||
fillColor: "#ee2200", //填充颜色
|
||||
fillOpacity: 0.35 //填充透明度
|
||||
})
|
||||
map.add(circle)
|
||||
map.setFitView()
|
||||
}
|
||||
|
||||
if (window.location.pathname === '/mobile/activity/myActivity/goSign' && !this.isSign) {
|
||||
map.plugin('AMap.Geolocation', function () {
|
||||
geolocation = new AMap.Geolocation({
|
||||
enableHighAccuracy: true,//是否使用高精度定位,默认:true
|
||||
timeout: 10000, //超过10秒后停止定位,默认:无穷大
|
||||
maximumAge: 0, //定位结果缓存0毫秒,默认:0
|
||||
convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
|
||||
showButton: true, //显示定位按钮,默认:true
|
||||
buttonPosition: 'LB', //定位按钮停靠位置,默认:'LB',左下角
|
||||
buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
|
||||
showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
|
||||
showCircle: false, //定位成功后用圆圈表示定位精度范围,默认:true
|
||||
panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
|
||||
zoomToAccuracy: true //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
|
||||
});
|
||||
map.addControl(geolocation)
|
||||
|
||||
geolocation.getCurrentPosition()
|
||||
|
||||
AMap.event.addListener(geolocation, 'error', (err) => {
|
||||
alert(JSON.stringify(err))
|
||||
}); //返回定位出错信息
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
getMapDistance(paramObj) {
|
||||
let lng1 = paramObj.lng1
|
||||
let lat1 = paramObj.lat1
|
||||
|
||||
let lng2 = paramObj.lng2
|
||||
let lat2 = paramObj.lat2
|
||||
|
||||
let radLat1 = lat1 * Math.PI / 180.0;
|
||||
let radLat2 = lat2 * Math.PI / 180.0;
|
||||
let a = radLat1 - radLat2;
|
||||
let b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
|
||||
let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
|
||||
Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
|
||||
s = s * 6378.137;// EARTH_RADIUS;
|
||||
s = Math.round(s * 10000) / 10000;
|
||||
s = s * 1000
|
||||
return s.toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.activity_card {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .van-image, .activity_card .van-image img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_name {
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom {
|
||||
line-height: 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .left {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 80px);
|
||||
font-size: 12px;
|
||||
color: #c4bebe;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .right {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="margin: 10px auto 60px auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openReg(o)">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
fit="cover"
|
||||
width="100%"
|
||||
height="200"
|
||||
:src="FILE_DOMAIN+o.cover"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon name="fire" color="red"></van-icon>
|
||||
<span style="margin-left: 10px;">{{o.name}}</span>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
报名中
|
||||
</span>
|
||||
<span v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
报名结束
|
||||
</span>
|
||||
<span v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
活动进行中
|
||||
</span>
|
||||
<span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
活动结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tabBarIndex">
|
||||
<van-tabbar-item icon="home-o" url="/mobile/activity/unionActivity">全部活动</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o" url="/mobile/activity/myActivity">我的活动</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: '/mobile/activity/myActivity',
|
||||
pageForm: {
|
||||
year: ''
|
||||
},
|
||||
tabBarIndex: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/activity/myActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
openReg(o) {
|
||||
// window.location.href = '/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=1'
|
||||
if (o.projectTypeCode === '50004') {
|
||||
window.location.href = '/mobile/activity/myActivity/goMyProject?id=' + o.id
|
||||
} else {
|
||||
window.location.href = '/mobile/activity/myActivity/goSign?id=' + o.id
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = new Date().getFullYear()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,213 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.activity_card {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .van-image, .activity_card .van-image img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_name {
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom {
|
||||
line-height: 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .left {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 80px);
|
||||
font-size: 12px;
|
||||
color: #c4bebe;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .right {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList" @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.activityLevel" :options="activityLevelList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 80px auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openReg(o)">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
fit="cover"
|
||||
width="100%"
|
||||
height="200"
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon name="fire" color="red"></van-icon>
|
||||
<span style="margin-left: 10px;">{{o.name}}</span>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
报名中
|
||||
</span>
|
||||
<span v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
报名结束
|
||||
</span>
|
||||
<span v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
活动进行中
|
||||
</span>
|
||||
<span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
活动结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tabBarIndex">
|
||||
<van-tabbar-item icon="home-o" url="/mobile/activity/unionActivity">全部活动</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o" url="/mobile/activity/myActivity">我的活动</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: '/mobile/activity/unionActivity/pageData',
|
||||
pageForm: {
|
||||
year: '',
|
||||
activityStatus: null
|
||||
},
|
||||
tabBarIndex: 0,
|
||||
activityLevelList: [],
|
||||
activityStatusList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '进行中', value: 3},
|
||||
{text: '已结束', value: 4}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/activity/unionActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
/*this.tableData.forEach(v => {
|
||||
if (v.cover) {
|
||||
const cover = JSON.parse(v.cover)
|
||||
v.cover = cover[0].filepath
|
||||
}
|
||||
|
||||
})*/
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
//跳转页面
|
||||
openReg(o) {
|
||||
if (o.projectTypeCode === '50004') {
|
||||
window.location.href = '/mobile/activity/Sports/list/activityEventList?id=' + o.id
|
||||
} else {
|
||||
window.location.href = '/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=' + o.signUpMethod
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.pageForm, "activityStatus", 2)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code: 40000})
|
||||
this.activityLevelList.push({value: null, text: "全部类别"})
|
||||
data.forEach(v => {
|
||||
this.activityLevelList.push({value: v.code, text: v.name})
|
||||
})
|
||||
|
||||
this.$set(this.pageForm, "activityLevel", this.activityLevelList[0].value)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="签到" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="o.needSign">
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
</script>
|
||||
|
||||
<script>
|
||||
let geolocation = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
isSign: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getSignStatus() {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/isSign', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
geolocation.getCurrentPosition(async (status, result) => {
|
||||
if (status !== 'complete') {
|
||||
this.$toast.fail('定位失败!')
|
||||
return
|
||||
}
|
||||
console.log(status)
|
||||
console.log(result)
|
||||
const lat = result.position.lat
|
||||
const lng = result.position.lng
|
||||
const params = {
|
||||
lat1: lat, lng1: lng, lat2: this.o.location[1], lng2: this.o.location[0]
|
||||
}
|
||||
const distance = this.getMapDistance(params)
|
||||
console.log(distance)
|
||||
console.log(this.o.rangeMeter)
|
||||
if (distance > this.o.rangeMeter) {
|
||||
this.$toast('距离活动打卡点还有' + distance + '米')
|
||||
return
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '签到中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/singleSignUp', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
await this.getSignStatus()
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getSignStatus()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,160 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="个人报名" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="!isRegister && !isRegisterFull" @click="doSave()" style="border-radius: 10px" block
|
||||
type="info"
|
||||
:color="themeColor">
|
||||
立即报名
|
||||
</van-button>
|
||||
<van-button v-else-if="!isRegister && isRegisterFull" @click="doSave()" style="border-radius: 10px" block
|
||||
disabled
|
||||
type="info"
|
||||
:color="themeColor">
|
||||
名额已满
|
||||
</van-button>
|
||||
<van-button v-else-if="isRegister && moment().valueOf() < moment(o.applyEndTime).valueOf()" @click="doCancel"
|
||||
style="border-radius: 10px" block type="info"
|
||||
color="red">
|
||||
取消报名
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="isRegister && moment().valueOf() < moment(o.endTime).valueOf() && moment().valueOf() > moment(o.startTime).valueOf()">
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
tagCloseable: true,
|
||||
isRegister: false,
|
||||
isSign: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async isRegisterForMe() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/isRegisterForMe', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isRegister = resp.data
|
||||
}
|
||||
},
|
||||
async doSave() {
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '报名后若未参加,将有可能影响到其它活动的报名,同时活动开启了现场签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要报名吗?' + message,
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleRegister', {activityId: this.activityId})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.isRegisterForMe()
|
||||
this.getHasRegUserNum()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doCancel() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消报名吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleCancelRegister', {activityId: this.activityId})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.isRegisterForMe()
|
||||
this.getHasRegUserNum()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async getSignStatus() {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/isSign', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/singleSignUp', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
await this.getSignStatus()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.isRegisterForMe()
|
||||
this.getSignStatus()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.regCell .van-cell__label .van-tag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.userActionPopup {
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
.userActionPopup .van-cell__value {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.userActionPopup .addBtn {
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.userActionPopup .van-action-sheet__item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userActionPopup .userSelSuccess {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="分工会报名" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<van-cell-group inset class="mt5">
|
||||
<van-cell title="报名人员" class="regCell">
|
||||
<template #label>
|
||||
<div>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
本活动限制总报名人数:({{o.totalUserNumberLimit}})人
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
当前分工会报名限额 <span style="color: orange">({{o.limitUnion.limitNum}})人</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt5">
|
||||
<div v-if="registerList && registerList.length>0">
|
||||
<template v-for="item in registerList">
|
||||
<van-tag type="primary" :closeable="tagCloseable" size="medium"
|
||||
@close="removeRegUser(item)">
|
||||
{{item.userName}}
|
||||
</van-tag>
|
||||
</template>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div style="text-align: center;margin-top: 20px;">
|
||||
无报名人员
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt5" style="text-align: right"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="tagCloseable" size="mini" type="info" @click="openUserActionSheet">选择报名人员
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-action-sheet v-model="userActionSheet" title="选择报名人员" class="userActionPopup">
|
||||
<van-search v-model="searchKey" @search="onSearchUser" placeholder="请输入姓名搜索"></van-search>
|
||||
|
||||
<!-- <div class="van-hairline--bottom">-->
|
||||
<!-- 点击列表中的人员添加到活动人员中-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="van-action-sheet__content mt5" v-if="searchUserList && searchUserList.length>0">
|
||||
<template v-if="searchLoading">
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
<template v-if="!searchLoading">
|
||||
<template v-for="item in searchUserList" v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)"
|
||||
class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}</span>
|
||||
</button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty v-else style="position:absolute;" description=""></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="tagCloseable" @click="doSave()" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
<van-button v-else="!tagCloseable" @click="tagCloseable = true" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
修 改
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<!-- <div style="margin: 20px 20px 10px 20px" v-if="tagCloseable">-->
|
||||
<!-- <van-button-->
|
||||
<!-- :disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf()"-->
|
||||
<!-- @click="doSign()" style="border-radius: 10px" block type="info"-->
|
||||
<!-- :color="themeColor">-->
|
||||
<!-- 立即签到-->
|
||||
<!-- </van-button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
registerList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: '',
|
||||
searchUserList: [],
|
||||
tagCloseable: true,
|
||||
searchLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getRegisterUser() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/selectRegisterList', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.registerList = resp.data
|
||||
if (this.registerList.length > 0) {
|
||||
this.tagCloseable = false
|
||||
}
|
||||
}
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ''
|
||||
this.searchUserList = []
|
||||
this.userActionSheet = true
|
||||
},
|
||||
async onSearchUser(val) {
|
||||
this.searchLoading = true
|
||||
const resp = await $.get('/mobile/activity/unionActivity/searchNoRegisterUser', {
|
||||
activityId: this.activityId,
|
||||
searchKey: val
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {id, userName} = item
|
||||
this.registerList.push({id, userName})
|
||||
},
|
||||
async removeRegUser(item) {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要移除吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const index = this.registerList.findIndex(v => v.id === item.id)
|
||||
this.registerList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
//保存
|
||||
async doSave() {
|
||||
if (this.registerList.length === 0) {
|
||||
this.$toast('请添加报名人员后再提交!')
|
||||
return
|
||||
}
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '此活动开启了签到,需要您活动当天前往签到点位核实活动报名人员后进行签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: message + '您确认要报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const params = {
|
||||
activityId: this.activityId,
|
||||
personIds: JSON.stringify(this.registerList.map(v => v.id))
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSaveUnionRegister', params)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
await this.getRegisterUser()
|
||||
await this.getHasRegUserNum()
|
||||
this.$toast.success(resp.msg)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getRegisterUser()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,105 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="活动列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="主题" :border="false">{{o.hdname}}</van-cell>
|
||||
<van-cell :border="false" title="创建人">{{o.cjr}}</van-cell>
|
||||
<van-cell :border="false" title="创建时间">{{o.hdcjsj}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.hdkssj}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.hdjssj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
hdtype: 2,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/wmhdMange/data', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
const {hdid, hdjssj, hdkssj} = o
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
|
||||
vant.Toast('报名暂未开始!')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
|
||||
vant.Toast('报名已结束!')
|
||||
return
|
||||
}
|
||||
window.location.href = '/childrenActivities?client=mobile&id=' + hdid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,104 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="活动列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动主题">{{o.hdname}}</van-cell>
|
||||
<van-cell :border="false" title="作品主题">{{o.zpzt}}</van-cell>
|
||||
<van-cell :border="false" title="子女姓名">{{o.znxm}}</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.zngx}}</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.hdlbname}}</van-cell>
|
||||
<van-cell :border="false" title="上传时间">{{o.sbsj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
hdtype: 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/childhd/sczp/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/cahd/list/view?id=' + o.id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,37 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<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>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<mobile-cahd-info ref="minfo"></mobile-cahd-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
components: {
|
||||
'mobile-cahd-info': httpVueLoader('/components/mobile/cahd/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
const id = GetQueryString("id")
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getInfo(id)
|
||||
}, 100)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,359 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-doc-card .van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.userPopup .van-cell {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--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">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入协会名称进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false" @load="onLoad"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<!--<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status==1">待协会审核</span>
|
||||
<span v-if="o.status==2" style="color: red">协会拒绝</span>
|
||||
<span v-if="o.status==3">待校工会审核</span>
|
||||
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status==5" style="color: green">审核通过</span>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">电  话:</span>{{o.fzr_mobile}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">会费标准:</span>{{o.dues_standard}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24" class="cus_overflow">
|
||||
<span style="color: grey">介绍链接:</span>
|
||||
<span style="color: #236eb4"
|
||||
@click.stop="window.open(o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href)">{{o.introduce_href}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">已审{{o.has_audit}}</van-button>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">未审{{o.no_audit}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet v-model:show="userShow" title="申请人员列表" class="userPopup" @close="popClose">
|
||||
<div class="content">
|
||||
<div class="van-doc-card">
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div v-if="queryType === 'notAudit'">
|
||||
<van-tag @click="checkAll()" plain type="primary" size="large">全选</van-tag>
|
||||
<van-tag @click="toggleAll()" plain type="primary" size="large" style="margin-left: 6px">反选</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup" v-if="userList !== null">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
v-for="(obj, index) in userList"
|
||||
clickable class="cus_cell"
|
||||
:key="obj.id"
|
||||
@click="toggle(index)">
|
||||
|
||||
<span style="display: inline-block; width: 86px">{{obj.username}}</span>
|
||||
<span class="unit">{{obj.unitname}}</span>
|
||||
<br/>
|
||||
<span style="display: inline-block; width: 85px">{{obj.sex}}</span>
|
||||
<span style="display: inline-block; width: 106px">13296575967</span>
|
||||
<span style="display: inline-block;">{{obj.loginname}}</span>
|
||||
<van-icon class="audit_icon" color="green" v-if="queryType === 'hasAudit' && obj.auditstate === true" name="passed"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey" v-if="queryType === 'hasAudit' && obj.auditstate === false" name="close"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
<div v-else style="margin-top: 4px; text-align: center">暂无请假人员</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过</van-button>
|
||||
</div>
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%">
|
||||
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回</van-button>
|
||||
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
queryType: '',
|
||||
result: [],
|
||||
userList: [],
|
||||
userShow: false,
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async audit (type, auditType) {
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
vant.Toast('请先选择人员')
|
||||
return
|
||||
}
|
||||
const str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择!' : '您确定要一键全部审核吗?'
|
||||
vant.Dialog.confirm({title: '提示', message: str,}).then(async () => {
|
||||
let idList = this.result
|
||||
if (type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await $.post('/platform/sys/club/sh/check', {
|
||||
ids: JSON.stringify(idList),
|
||||
flag: auditType === 'pass',
|
||||
type: 1,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
this.userShow = false
|
||||
}).catch(() => {});
|
||||
},
|
||||
checkAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(index) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
|
||||
id: o.id,
|
||||
auditType: 'hasAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userList.sort((a, b) => { return b.auditstate - a.auditstate })
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
async openView(o) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
|
||||
id: o.id,
|
||||
auditType: 'notAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无申请人员')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
return
|
||||
}
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/sys/club/sh/getMyClub', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const data = await getClubType()
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.typeOptions.unshift({text: '全部类型'})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,260 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--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">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入协会名称进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.isjr" :options="clubType"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false" @load="onLoad"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status==1">待协会审核</span>
|
||||
<span v-if="o.status==2" style="color: red">协会拒绝</span>
|
||||
<span v-if="o.status==3">待校工会审核</span>
|
||||
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status==5" style="color: green">审核通过</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">电  话:</span>{{o.fzr_mobile}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">会费标准:</span>{{o.dues_standard}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24" class="cus_overflow">
|
||||
<span style="color: grey">介绍链接:</span>
|
||||
<span style="color: #236eb4"
|
||||
@click="window.open(o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href)">{{o.introduce_href}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click="rollback(o)" v-if="pageForm.isjr === true"
|
||||
type="primary" size="small" color="#1867b0" style="margin-right: 8px">撤销申请</van-button>
|
||||
<van-button @click="needJoin(o)" v-if="(o.cynum + o.approvalnum) < o.number && pageForm.isjr === false"
|
||||
type="primary" size="small" color="#1867b0" style="margin-right: 8px">我要加入</van-button>
|
||||
<van-button @click="needJoin(o)" v-if="(o.cynum + o.approvalnum) >= o.number && pageForm.isjr === false"
|
||||
:disabled="(o.cynum + o.approvalnum) >= o.number"
|
||||
type="primary" size="small" color="#1867b0" style="margin-right: 8px">人数已满</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
clubType: [{text: '未加入', value: false}, {text: '已加入', value: true}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(id) {
|
||||
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/sys/club/sq/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async needJoin(o) {
|
||||
this.clickRow = o
|
||||
const {code, data} = await $.post('/platform/sys/club/sq/getInClubByCurUser')
|
||||
let str = '您还没有参加协会'
|
||||
if (data && data.length > 0) {
|
||||
str = '您已经加入了'
|
||||
data.forEach((item) => {
|
||||
str += '【' + item.name + '】'
|
||||
})
|
||||
}
|
||||
str += ',请确认是否申请加入【' + o.name + '】?'
|
||||
vant.Dialog.confirm({title: '提示', message: str,}).then(() => {
|
||||
const id = o.id
|
||||
$.post("/platform/sys/club/sq/submit", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
vant.Toast('提交申请成功');
|
||||
this.doSearch();
|
||||
} else {
|
||||
vant.Toast(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {});
|
||||
},
|
||||
rollback(o) {
|
||||
vant.Dialog.confirm({title: '提示', message: '请确定是否撤销申请?',}).then(() => {
|
||||
const id = o.id
|
||||
$.post("/platform/sys/club/sq/revocation", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
vant.Toast('撤销申请成功');
|
||||
this.doSearch();
|
||||
} else {
|
||||
vant.Toast(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const data = await getClubType()
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.typeOptions.unshift({text: '全部类型'})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
this.$set(this.pageForm, "isjr", this.clubType[0].value)
|
||||
this.pageForm.searchName = 'club.name'
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,385 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="填写慰问申请" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="manager_name"
|
||||
label="申请入"></van-field>
|
||||
|
||||
<van-field readonly :value="formData.apply_time" name="apply_time"
|
||||
label="申请时间"
|
||||
></van-field>
|
||||
|
||||
<van-field @input="userRemoteMethod" name="be_user_name"
|
||||
required
|
||||
v-model="formData.be_user_name" label="慰问对象" placeholder="请输入慰问对象"
|
||||
:rules="[{ required: true, message: '请填写慰问对象' }]"></van-field>
|
||||
|
||||
<van-action-sheet v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = []"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect">
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field @input="payeeUserRemoteMethod" name="payee_name"
|
||||
|
||||
v-model="formData.payee_name" label="收款人" placeholder="请输入收款人"></van-field>
|
||||
|
||||
<van-action-sheet v-model="payeeSheetShow"
|
||||
:actions="payeeUserList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="payeeUserList = []"
|
||||
:close-on-click-overlay="false"
|
||||
@select="payeeOnUserSelect">
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field v-model="formData.payee_bank_number" name="payee_bank_number" type="number"
|
||||
label="收款人银行卡" placeholder="请输入收款人银行卡"></van-field>
|
||||
<van-field v-model="formData.payee_bank_name" name="payee_bank_name"
|
||||
label="收款人开户行" placeholder="请输入收款人开户行"></van-field>
|
||||
|
||||
|
||||
<van-field readonly clickable name="type" :value="formData.typeName"
|
||||
required
|
||||
label="慰问类型"
|
||||
@click="showTypePicker = true" placeholder="点击选择慰问类型"
|
||||
:rules="[{ required:true, message: '请选择慰问类型'}]"></van-field>
|
||||
<van-popup v-model:show="showTypePicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="typeColumns" @confirm="onTypeConfirm"
|
||||
@cancel="showTypePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field readonly clickable name="way" :value="formData.wayName"
|
||||
label="慰问方式"
|
||||
required
|
||||
placeholder="点击选择慰问方式"
|
||||
:rules="[{ required:true, message: '请选择慰问方式'}]"></van-field>
|
||||
<van-popup v-model:show="showWayPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="wayColumns" @confirm="onWayConfirm"
|
||||
@cancel="showWayPicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field v-model="formData.money" name="money" type="number" label="慰问金额"
|
||||
:rules="[{ required:true, message: '请填写慰问金额' }]"></van-field>
|
||||
|
||||
<van-field
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写慰问时间' }]"
|
||||
readonly
|
||||
clickable
|
||||
name="occur_time"
|
||||
:value="formData.occur_time"
|
||||
label="慰问时间"
|
||||
placeholder="点击选择慰问时间"
|
||||
@click="showOccurTime = true"
|
||||
></van-field>
|
||||
<van-calendar v-model="showOccurTime"
|
||||
@confirm="onOccurTimeConfirm"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
:color="themeColor"></van-calendar>
|
||||
|
||||
<template
|
||||
v-if="['c7175af55693441e8233be4552cef9d5','0872ea0b95aa463fb8d98c46bdf72537'].includes(formData.type)">
|
||||
<van-field :value="formData.hospital_stay"
|
||||
readonly clickable required
|
||||
@click="hospital_stay = true"
|
||||
name="hospital_stay" label="住院时间"
|
||||
placeholder="请选择住院时间"
|
||||
:rules="[{ required:true, message: '请选择住院时间' }]"></van-field>
|
||||
<van-calendar v-model="hospital_stay" type="range" @confirm="onConfirm"
|
||||
:min-date="new Date('1999-01-01')"
|
||||
:color="themeColor"></van-calendar>
|
||||
|
||||
<van-field v-model="formData.the_hospital" name="the_hospital" name="type" label="所在医院"
|
||||
placeholder="请填写所在医院" required
|
||||
:rules="[{ required:true, message: '请填写所在医院' }]"></van-field>
|
||||
</template>
|
||||
|
||||
<van-field v-model="formData.remark" name="remark" label="申请事由" style="flex-flow: column"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写申请事由' }]"
|
||||
placeholder="请填写申请事由"
|
||||
input-align="left"
|
||||
rows="3" maxlength="200" type="textarea" show-word-limit autosize>
|
||||
<template #label>
|
||||
<div class="mb10">申请事由</div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>购置物品及价格</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button v-if="goods && goods.length>0 && goods.length<3" style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="goods.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="goods && goods.length>0">
|
||||
<div v-for="o,i in goods" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>物品{{toChinesNum(i+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
icon="minus" type="danger" round size="mini"
|
||||
@click="goods.splice(i,1)"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-field label="名称" v-model="o.name" placeholder="请填写物品名称"
|
||||
:rules="[{ required:true, message: '请填写物品名称' }]"></van-field>
|
||||
<van-field label="价格" v-model="o.price" placeholder="请填写物品价格"
|
||||
type="number"
|
||||
:rules="[{ required:true, message: '请填写物品价格' }]" @input="priceInput"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button style="width: 50px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="goods.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field name="files" label="附  件" required
|
||||
style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button @click="onSubmit()" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
goods: [],
|
||||
payeeSheetShow: false,
|
||||
payeeUserList: [],
|
||||
hospital_stay: false,
|
||||
userList: [],
|
||||
formData: {},
|
||||
showTypePicker: false,
|
||||
showWayPicker: false,
|
||||
sheetShow: false,
|
||||
typeColumns: [],
|
||||
wayColumns: [],
|
||||
files: [],
|
||||
showOccurTime: false,
|
||||
// minDate: moment().subtract(5, 'year')._d,
|
||||
minDate: new Date(2010, 1, 1),
|
||||
maxDate: new Date(),
|
||||
money: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"formData.money"(val) {
|
||||
if (val > this.money) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '金额超过规定金额' + this.money + "(元)",
|
||||
type: 'warning'
|
||||
});
|
||||
this.$set(this.formData, "money", this.money)
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
priceInput() {
|
||||
let num = 0
|
||||
this.goods.forEach(v => {
|
||||
num += parseFloat(v.price)
|
||||
})
|
||||
this.$set(this.formData, "money", num)
|
||||
},
|
||||
onOccurTimeConfirm(val) {
|
||||
this.$set(this.formData, "occur_time", moment(val).format("YYYY-MM-DD"))
|
||||
this.showOccurTime = false
|
||||
},
|
||||
onConfirm(date) {
|
||||
const [start, end] = date;
|
||||
this.hospital_stay = false;
|
||||
this.formData.hospital_stay = moment(start).format('YYYY-MM-DD') + "-" + moment(end).format('YYYY-MM-DD');
|
||||
this.$set(this.formData, "hospital_stay_1", moment(start).format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, "hospital_stay_2", moment(end).format('YYYY-MM-DD'))
|
||||
},
|
||||
async userRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.userList = arr.map(v => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")", id: v.id
|
||||
}
|
||||
})
|
||||
this.sheetShow = true
|
||||
}
|
||||
},
|
||||
async payeeUserRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.payeeUserList = arr.map(v => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")", id: v.id
|
||||
}
|
||||
})
|
||||
this.payeeSheetShow = true
|
||||
}
|
||||
},
|
||||
async queryUser(query) {
|
||||
const {data} = await $.get("/platform/fw/condolence/apply/queryUser", {query})
|
||||
return data
|
||||
},
|
||||
onUserSelect(u) {
|
||||
this.$set(this.formData, 'be_user', u.id)
|
||||
this.$set(this.formData, 'be_user_name', u.name)
|
||||
this.sheetShow = false
|
||||
},
|
||||
payeeOnUserSelect(u) {
|
||||
this.$set(this.formData, 'payee', u.id)
|
||||
this.$set(this.formData, 'payee_name', u.name)
|
||||
this.payeeSheetShow = false
|
||||
},
|
||||
async onTypeConfirm(val) {
|
||||
this.$set(this.formData, "typeName", val.text)
|
||||
this.$set(this.formData, "type", val.value)
|
||||
const {data, code, msg} = await $.get("/platform/condolence/type/findOne", {id: val.value})
|
||||
this.$set(this, "money", data.money)
|
||||
await this.moneyChange(val.value)
|
||||
this.showTypePicker = false;
|
||||
},
|
||||
onWayConfirm(val) {
|
||||
this.$set(this.formData, "wayName", val.text)
|
||||
this.$set(this.formData, "way", val.value)
|
||||
this.showWayPicker = false;
|
||||
},
|
||||
async moneyChange(id) {
|
||||
const {data, code, msg} = await $.get("/platform/condolence/type/findOne", {id})
|
||||
if (data) {
|
||||
this.$set(this.formData, "money", data.money)
|
||||
this.$set(this.formData, "wayName", data.way)
|
||||
this.$set(this.formData, "way", data.way)
|
||||
}
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.formData.files) {
|
||||
vant.Toast('请上传附件材料!')
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
/* if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
await this.$refs.signature.updateSign()
|
||||
const formData = clone(this.formData)
|
||||
formData.mobile = "${@shiro.getPrincipalProperty('mobile')}"
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
formData.goods = this.goods
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
this.$toast.loading('提交中...')
|
||||
const res = await $.post('/platform/fw/condolence/apply/doAdd', {
|
||||
data: JSON.stringify(formData),
|
||||
sign: formData.sign
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/condolence/apply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.signature) {
|
||||
this.$refs.signature.getMySign()
|
||||
}
|
||||
})
|
||||
},
|
||||
async created() {
|
||||
this.formData.apply_time = moment().format('YYYY-MM-DD')
|
||||
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach(v => {
|
||||
this.typeColumns.push({value: v.id, text: v.name + "(" + v.code + ")"})
|
||||
})
|
||||
for (let i in condolence.way) {
|
||||
this.wayColumns.push({value: condolence.way[i], text: condolence.way[i]})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,58 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问申请信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<condolence-info :id.sync="id"></condolence-info>
|
||||
<van-button :color="themeColor" block @click="doEdit" class="ml10 mr10" v-if="state_id==2010||state_id==2020">撤 回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
state_id: ""
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
doEdit() {
|
||||
vant.Dialog.confirm({
|
||||
title: '标题',
|
||||
message: '确认要撤回吗?',
|
||||
})
|
||||
.then(async () => {
|
||||
const resp = await $.post("/platform/fw/condolence/ucr/doEdit", {id: this.id});
|
||||
this.$toast.success('撤回成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/condolence/audit'
|
||||
}, 1000)
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
this.state_id = GetQueryString('state_id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,146 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.apply_btn {
|
||||
animation: come .5s;
|
||||
position: fixed;top: 20%;right: 0
|
||||
}
|
||||
|
||||
@keyframes come {
|
||||
from {
|
||||
right: -100px;
|
||||
}
|
||||
to {
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="慰问申请列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOption" @change="typeChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="被慰问人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.be_username}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="慰问类型">{{o.type_name}}</van-cell>
|
||||
<van-cell :border="false" title="慰问方式">{{o.way}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.be_unitname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<!-- <van-button v-show="visible" class="apply_btn" @click.stop="openApply" plain hairline>-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <svg t="1634200664904" class="icon" viewBox="0 0 1024 1024" version="1.1"-->
|
||||
<!-- xmlns="http://www.w3.org/2000/svg" p-id="3163" width="32" height="32">-->
|
||||
<!-- <path d="M837.632 160.768c64 0 117.248 53.248 117.248 117.248v470.528c0 64-53.248 117.248-117.248 117.248H187.904c-64 2.048-117.248-50.688-117.248-114.688V278.016c0-64 53.248-117.248 117.248-117.248h649.728z m66.048 590.848V274.944c0-32.768-28.16-60.416-60.416-60.416H184.832c-32.768 0-60.416 28.16-60.416 60.416v479.232c0 32.768 28.16 60.416 60.416 60.416h657.92c32.768-2.56 60.928-28.16 60.928-62.976zM387.072 317.44"-->
|
||||
<!-- fill="#2E77ED" p-id="3164"></path>-->
|
||||
<!-- <path d="M326.144 709.632c-14.848 0-26.624-12.288-26.624-27.136V455.68c0-14.848 12.288-27.136 27.136-27.136S353.28 440.832 353.28 455.68v226.816c-0.512 15.36-12.288 27.136-27.136 27.136z"-->
|
||||
<!-- fill="#FFBB12" p-id="3165"></path>-->
|
||||
<!-- <path d="M569.856 442.368c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 682.496c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 553.472c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136z"-->
|
||||
<!-- fill="#2E77ED" p-id="3166"></path>-->
|
||||
<!-- <path d="M228.352 509.44c-10.24-10.752-10.24-27.648 0-37.888l78.336-78.336c10.752-10.752 27.648-10.752 37.888 0s10.24 27.648 0 37.888L266.24 509.44c-10.24 10.752-27.136 10.752-37.888 0z"-->
|
||||
<!-- fill="#FFBB12" p-id="3167"></path>-->
|
||||
<!-- <path d="M306.688 393.216c10.752-10.24 27.648-10.24 37.888 0l78.336 78.336c10.752 10.752 10.752 27.648 0 37.888s-27.648 10.24-37.888 0L306.688 431.104c-10.24-10.752-10.24-27.648 0-37.888z"-->
|
||||
<!-- fill="#FFBB12" p-id="3168"></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </template>-->
|
||||
<!-- 申请-->
|
||||
<!-- </van-button>-->
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
visible: true,
|
||||
typeOption: [
|
||||
{value: null, text: '全部'}
|
||||
],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openApply() {
|
||||
window.location.href = '/mobile/condolence/apply/for'
|
||||
},
|
||||
openInfo(id) {
|
||||
window.location.href = '/mobile/condolence/apply/info?id=' + id
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
typeChange(val) {
|
||||
this.pageForm.type = val
|
||||
this.onRefresh()
|
||||
},
|
||||
listenTouch() {
|
||||
this.$nextTick(() => {
|
||||
const app = document.querySelector("#app")
|
||||
app.addEventListener('touchstart', () => {
|
||||
this.visible = false
|
||||
})
|
||||
app.addEventListener('touchend', () => {
|
||||
this.visible = true
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.listenTouch()
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach(v => {
|
||||
this.typeOption.push({value: v.id, text: v.name + v.code})
|
||||
})
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.$set(this.pageForm, "type", this.typeOption[0].value)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,138 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :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.type" @change="yearChange"
|
||||
: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>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="被慰问人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.be_username}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申 请 人">{{o.sqr_username}}</van-cell>
|
||||
<van-cell :border="false" title="所在单位">{{o.be_unitname}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会">{{o.be_unionname}}</van-cell>
|
||||
<van-cell :border="false" title="慰问类型">{{o.type_name}}</van-cell>
|
||||
<van-cell :border="false" title="慰问方式">{{o.way}}</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unitList: [],
|
||||
unionList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
handle: true,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/condolence/audit/auditHtml?state_id=' + o.state_id + '&id=' + o.id
|
||||
},
|
||||
yearChange() {
|
||||
this.tableData = []
|
||||
this.refreshing = true;
|
||||
this.finished = false;
|
||||
this.pageForm.pageNumber = 0
|
||||
this.flushUnits()
|
||||
},
|
||||
pageData() {
|
||||
this.mLoading = true
|
||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
|
||||
},
|
||||
async flushUnits() {
|
||||
//this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
await mCommon.getUnitList(this.pageForm.unionId)
|
||||
} else {
|
||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
await mCondolence.getType()
|
||||
await mCommon.getUnionList()
|
||||
if (mCondolence.typeList && mCondolence.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "type", mCondolence.typeList[0].value)
|
||||
}
|
||||
if (mCommon.unionList && mCommon.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
|
||||
}
|
||||
if (mCommon.unitList && mCommon.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,138 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<condolence-info ref="info" :id.sync="id" title="校工会会计审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会会计审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field readonly left-icon="contact"
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
<van-field v-model="formData.money" label="慰问金额" type="number" left-icon="balance-list-o"
|
||||
required :rules="[{ required:true, message: '请输入慰问金额' }]"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
left-icon="chat-o"
|
||||
rows="1"
|
||||
required
|
||||
:rules="[{ required:true, message: '请输入审核意见' }]"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</condolence-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
/* if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/condolence/fr/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/condolence/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
const {data} = await $.get("/platform/fw/condolence/findOne", {id: this.id})
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
opinion: null,
|
||||
sign: "",
|
||||
money: data.money
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,131 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<condolence-info ref="info" :id.sync="id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field readonly
|
||||
left-icon="contact"
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
rows="1"
|
||||
required
|
||||
left-icon="chat-o"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</condolence-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
/* if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/condolence/vcr/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/condolence/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
opinion: null,
|
||||
sign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,131 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<condolence-info ref="info" :id.sync="id" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
院级工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
left-icon="contact"
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
left-icon="chat-o"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button color="red" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</condolence-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
|
||||
/* if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/condolence/ucr/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/condolence/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
opinion: null,
|
||||
sign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,272 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难补助申请" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')} ( ${@shiro.getPrincipalProperty('loginname')} )"
|
||||
name="sqrname"
|
||||
label="申请人"></van-field>
|
||||
|
||||
<van-field name="apply_mode" label="申请模式">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.apply_mode" direction="horizontal" @change="applyModeChange">
|
||||
<van-radio :name="1">本人申请</van-radio>
|
||||
<van-radio :name="2">替他人申请</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field @input="userRemoteMethod" name="bbzrusername"
|
||||
v-model="formData.bbzrusername" label="受补助人" placeholder="请输入受补助人姓名"
|
||||
:rules="[{ required: true, message: '请填写受补助人姓名' }]"></van-field>
|
||||
|
||||
<van-action-sheet v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = []"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect">
|
||||
</van-action-sheet>
|
||||
<van-field label="身份证号" v-model="formData.idcard"></van-field>
|
||||
|
||||
|
||||
<van-field label="性别" v-model="formData.sex"></van-field>
|
||||
|
||||
<van-field label="职称" v-model="formData.zc"></van-field>
|
||||
<van-field label="职务" v-model="formData.zw"></van-field>
|
||||
|
||||
<van-field label="单位" v-model="formData.unitname"></van-field>
|
||||
|
||||
<van-field label="出生日期" v-model="formData.birthday"></van-field>
|
||||
|
||||
<van-field label="手机号码" v-model="formData.lxfs" type="tel"></van-field>
|
||||
|
||||
|
||||
<van-field name="sq_bzlx_name"
|
||||
@click="sq_bzlxShow = true"
|
||||
:value="formData.sq_bzlx_name" label="补助类型" placeholder="请选择补助类型"></van-field>
|
||||
<van-popup v-model:show="sq_bzlxShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="sq_bzlxList" @confirm="onSq_bzlxConfirm"
|
||||
@cancel="sq_bzlxShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field name="sq_knlx_name"
|
||||
@click="sq_knlxShow = true"
|
||||
:value="formData.sq_knlx_name" label="困难类型" placeholder="请选择困难类型"></van-field>
|
||||
<van-popup v-model:show="sq_knlxShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="sq_knlxist" @confirm="onSq_knlxConfirm"
|
||||
@cancel="sq_knlxShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<template v-if="formData.sq_knlx==1">
|
||||
<van-field label="所在医院" placeholder="请填写所在所在医院" v-model="formData.hospital"></van-field>
|
||||
<van-field label="住院时间" :value="formData.hospitalized_time_name"
|
||||
placeholder="请填写住院时间"
|
||||
@click="hospitalized_timeShow = true"></van-field>
|
||||
<van-calendar v-model="hospitalized_timeShow" :min-date="new Date('1999-01-01')" :show-confirm="false"
|
||||
type="range"
|
||||
@confirm="onHospitalized_timeConfirm"></van-calendar>
|
||||
</template>
|
||||
|
||||
<van-field v-model="formData.apply_reason" name="remark" label="申请理由" style="flex-flow: column"
|
||||
placeholder="请填写申请理由"
|
||||
input-align="left"
|
||||
rows="3" maxlength="200" type="textarea" show-word-limit autosize>
|
||||
<template #label>
|
||||
<div class="mb10">申请事由</div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field name="files" label="附  件" required style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sqsign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button @click="onSubmit()" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
<script src="/assets/platform/module/difficulty/common.js?v=1.0.0"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id"),
|
||||
hospitalized_timeShow: false,
|
||||
sq_bzlxShow: false,
|
||||
sq_bzlxList: [],
|
||||
minDate: {},
|
||||
sq_knlxShow: false,
|
||||
sq_knlxist: [],
|
||||
userList: [],
|
||||
formData: {
|
||||
apply_mode: 1
|
||||
},
|
||||
sheetShow: false,
|
||||
files: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
onHospitalized_timeConfirm(val) {
|
||||
this.$set(this.formData, "hospitalized_time_name", moment(val[0]).format('YYYY-MM-DD') + "至" + moment(val[1]).format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, "hospitalized_time", moment(val[0]).format('YYYY-MM-DD') + "至" + moment(val[1]).format('YYYY-MM-DD'))
|
||||
this.hospitalized_timeShow = false
|
||||
},
|
||||
onSq_bzlxConfirm(val) {
|
||||
this.$set(this.formData, "sq_bzlx_name", val.text)
|
||||
this.$set(this.formData, "sq_bzlx", val.value)
|
||||
for (let i in difficulty.getHard(val.value)) {
|
||||
this.sq_knlxist.push({value: i, text: difficulty.getHard(val.value)[i]})
|
||||
}
|
||||
this.$set(this.formData, "sq_knlx_name", null)
|
||||
this.$set(this.formData, "sq_knlx", null)
|
||||
this.sq_bzlxShow = false
|
||||
},
|
||||
onSq_knlxConfirm(val) {
|
||||
this.$set(this.formData, "sq_knlx_name", val.text)
|
||||
this.$set(this.formData, "sq_knlx", val.value)
|
||||
this.sq_knlxShow = false
|
||||
|
||||
},
|
||||
applyModeChange(val) {
|
||||
if (val === 1) {
|
||||
this.$set(this.formData, 'difficultyUser', "${@shiro.getPrincipalProperty('id')}")
|
||||
this.$set(this.formData, 'bbzrusername', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'sex', "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, 'zc', "${@shiro.getPrincipalProperty('jobTitle')}")
|
||||
this.$set(this.formData, 'zw', "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, 'unitname', "${@shiro.getPrincipalProperty('unit').getName()}")
|
||||
this.$set(this.formData, 'birthday', "${@shiro.getPrincipalProperty('birthday')}")
|
||||
this.$set(this.formData, 'lxfs', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, 'idcard', "${@shiro.getPrincipalProperty('idCard')}")
|
||||
} else if (val === 2) {
|
||||
this.formData = {}
|
||||
this.$set(this.formData, 'apply_mode', 2)
|
||||
this.$set(this.formData, 'bbzrusername', undefined)
|
||||
}
|
||||
},
|
||||
async userRemoteMethod(query) {
|
||||
if (query) {
|
||||
const {data} = await $.get("/platform/fw/condolence/apply/queryUser", {query})
|
||||
data.forEach(v => {
|
||||
v.name = v.username
|
||||
v.subname = v.loginname
|
||||
return v
|
||||
})
|
||||
this.userList = data
|
||||
this.sheetShow = true
|
||||
}
|
||||
},
|
||||
onUserSelect(val) {
|
||||
this.$set(this.formData, 'difficultyUser', val.id)
|
||||
this.$set(this.formData, 'bbzrusername', val.name)
|
||||
this.$set(this.formData, 'lxfs', val.mobile)
|
||||
this.$set(this.formData, 'sex', val.sex)
|
||||
this.$set(this.formData, 'unitname', val.unitname)
|
||||
this.$set(this.formData, 'zc', val.jobTitle)
|
||||
this.$set(this.formData, 'zw', val.position)
|
||||
this.$set(this.formData, 'birthday', val.birthday)
|
||||
this.$set(this.formData, "sq_bzlx_name", this.sq_bzlxList[0].text)
|
||||
this.$set(this.formData, "sq_bzlx", this.sq_bzlxList[0].value)
|
||||
this.sheetShow = false
|
||||
},
|
||||
|
||||
async onSubmit() {
|
||||
this.$refs.signature.submitSign()
|
||||
/* if (!this.formData.sqsign) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
const formData = clone(this.formData)
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
formData.applicantsign = formData.sqsign
|
||||
formData.bbzrusername = formData.difficultyUser
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
this.$toast.loading('提交中...')
|
||||
const res = await $.post('/platform/fw/difficulty/apply/doAdd', formData)
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/difficulty/apply/apply_list')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
async getApplyInfo(id) {
|
||||
const {data, code, msg} = await $.get("/platform/fw/difficulty/applylist/findOne", {id})
|
||||
if (data) {
|
||||
data.apply_mode = parseInt(data.apply_mode)
|
||||
this.formData = data
|
||||
if (this.formData.files && this.formData.files.length > 0) {
|
||||
this.formData.files = JSON.parse(data.files)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.signature) {
|
||||
this.$refs.signature.getMySign()
|
||||
}
|
||||
})
|
||||
},
|
||||
async created() {
|
||||
this.applyModeChange(1)
|
||||
for (let i in difficulty.subsidy) {
|
||||
this.sq_bzlxList.push({value: i, text: difficulty.subsidy[i]})
|
||||
}
|
||||
|
||||
this.$set(this.formData, "sq_bzlx_name", this.sq_bzlxList[0].text)
|
||||
this.$set(this.formData, "sq_bzlx", this.sq_bzlxList[0].value)
|
||||
for (let i in difficulty.getHard(this.formData.sq_bzlx)) {
|
||||
this.sq_knlxist.push({value: i, text: difficulty.getHard(this.formData.sq_bzlx)[i]})
|
||||
}
|
||||
this.formData.apply_time = moment().format('YYYY-MM-DD')
|
||||
|
||||
if (this.id) {
|
||||
this.getApplyInfo(this.id)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难帮扶申请信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<difficulty-info :id.sync="id"></difficulty-info>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/platform/module/difficulty/common.js?v=1.0.0"></script>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
state_id: ""
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
this.state_id = GetQueryString('state_id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,136 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.apply_btn {
|
||||
animation: come .5s;
|
||||
position: fixed;
|
||||
top: 20%;
|
||||
right: 0
|
||||
}
|
||||
|
||||
@keyframes come {
|
||||
from {
|
||||
right: -100px;
|
||||
}
|
||||
to {
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="困难帮扶申请列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.zt)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="受补助人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.sbzrname}}({{o.sbzrloginname}})
|
||||
</span>
|
||||
</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.lxfs}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.statecolor">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
visible: true,
|
||||
typeOption: [
|
||||
{value: null, text: '全部'}
|
||||
],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openInfo(id, state) {
|
||||
window.location.href = '/mobile/difficulty/apply/apply_info?id=' + id
|
||||
/* if ([95,96, 100].includes(state)) {
|
||||
window.location.href = '/mobile/difficulty/apply/index?id=' + id
|
||||
}else{
|
||||
window.location.href = '/mobile/difficulty/apply/apply_info?id=' + id
|
||||
}*/
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
listenTouch() {
|
||||
this.$nextTick(() => {
|
||||
const app = document.querySelector("#app")
|
||||
app.addEventListener('touchstart', () => {
|
||||
this.visible = false
|
||||
})
|
||||
app.addEventListener('touchend', () => {
|
||||
this.visible = true
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
$.get('/platform/fw/difficulty/applylist/pageData', this.pageForm, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.listenTouch()
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,132 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :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.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>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="受助人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.sbzrname}}({{o.sbzrloginname}})
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申 请 人">{{o.sqrname}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会">{{o.sqrunionname}}</van-cell>
|
||||
<van-cell :border="false" title="所在单位">{{o.unitname}}</van-cell>
|
||||
<van-cell :border="false" title="联系方式">{{o.lxfs}}</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.sqsj}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.statecolor">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unitList: [],
|
||||
unionList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
handle: true,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/difficulty/audit/auditHtml?zt=' + o.zt + '&id=' + o.id
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.flushUnits()
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
await mCommon.getUnitList(this.pageForm.unionId)
|
||||
} else {
|
||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
await mCondolence.getType()
|
||||
await mCommon.getUnionList()
|
||||
if (mCommon.unionList && mCommon.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
|
||||
}
|
||||
if (mCommon.unitList && mCommon.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,125 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<difficulty-info ref="info" :id.sync="id" title="校工会主席审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会主席审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<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.opinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</difficulty-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/difficulty/schoolmanager/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/difficulty/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null,
|
||||
auditSign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,124 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<difficulty-info ref="info" :id.sync="id" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
院级工会主席审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<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.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.auditSign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</difficulty-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/difficulty/unionchairman/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/difficulty/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null,
|
||||
auditSign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,683 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- 在 head 标签中添加 meta 标签,并设置 viewport-fit=cover 值 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
||||
<title></title>
|
||||
<!-- 引入样式文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css">
|
||||
<link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.2.0/weui.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css">
|
||||
|
||||
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
||||
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.6/lib/vant.min.js"></script>
|
||||
<script src="/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
</head>
|
||||
<style>
|
||||
html, body {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
max-width: 600px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
html::-webkit-scrollbar {
|
||||
display: none
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
|
||||
html, body {
|
||||
font-family: PingFang SC, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.page-v {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.detail-v {
|
||||
margin-top: 15px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.p15 {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.njuColor {
|
||||
color: rgb(106, 0, 95);
|
||||
}
|
||||
|
||||
.title-v {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.form-v {
|
||||
/*margin-top: 20px;*/
|
||||
}
|
||||
|
||||
.van-doc-demo-block__title {
|
||||
margin: 0;
|
||||
padding: 0 16px;
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.goods-card {
|
||||
margin: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.van-swipe-cell__wrapper {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.weui-msg {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: url('/assets/platform/img/checkin/bcc.jpg') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 230px;
|
||||
display: flex;
|
||||
color: #7ca4d8;
|
||||
}
|
||||
.van-tabbar-item__icon {
|
||||
font-size: 28px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.van-tabbar-item__text {
|
||||
transform: scale(0.9);
|
||||
}
|
||||
.header .container {
|
||||
font-size: 13px;
|
||||
letter-spacing: 1px;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
padding-right: 20px;
|
||||
padding-top: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.header .day {
|
||||
font-size: 60px;
|
||||
letter-spacing: 2px;
|
||||
color: white;
|
||||
}
|
||||
.van-tag {
|
||||
font-size: 25px;
|
||||
background-color: transparent;
|
||||
padding: 6px 16px;
|
||||
}
|
||||
.van-tag--primary.van-tag--plain {
|
||||
color: white;
|
||||
}
|
||||
.my_body {
|
||||
width: 94%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
top: -48px;
|
||||
}
|
||||
.van-calendar {
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
}
|
||||
.van-calendar__day {
|
||||
font-size: 18px;
|
||||
}
|
||||
.van-calendar__selected-day {
|
||||
width: 40px;
|
||||
height: 36px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
.sign_in_day {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 37px !important;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
color: #4ABE84;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 2px 7px 0px rgba(85, 110, 97, 0.35);
|
||||
border-radius: 7px;
|
||||
border: 1px solid rgba(74, 190, 132, 1);
|
||||
}
|
||||
.sign_in_day:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border: 13px solid #4ABE84;
|
||||
border-top-color: transparent;
|
||||
border-left-color: transparent;
|
||||
border-bottom-right-radius: 6px;
|
||||
/*border-radius: 0 0 0 7px;*/
|
||||
}
|
||||
.sign_in_day:after {
|
||||
content: '';
|
||||
width: 3px;
|
||||
height: 8px;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
bottom: 4px;
|
||||
border: 2px solid #fff;
|
||||
border-top-color: transparent;
|
||||
border-left-color: transparent;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.info {
|
||||
width: 88%;
|
||||
margin: 20px auto 10px;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.sign_pop {
|
||||
overflow-y: visible;
|
||||
width: 75%;
|
||||
height: 226px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
.sign_button {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
}
|
||||
.sign_button button {
|
||||
width: 90%;
|
||||
height: 36px;
|
||||
}
|
||||
.van-calendar__body {
|
||||
display: none;
|
||||
}
|
||||
.white_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
}
|
||||
.white_pop .van-cell {
|
||||
padding: 10px 34px;
|
||||
}
|
||||
.is_show_cell {
|
||||
padding: 0;
|
||||
}
|
||||
.van-calendar__selected-day {
|
||||
border: 1px solid #236eb4;
|
||||
box-shadow: 0px 2px 7px 0px #236eb4;
|
||||
}
|
||||
.zan_order {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
padding-right: 10px;
|
||||
color: grey;
|
||||
}
|
||||
.van-uploader__preview-image {
|
||||
width: 98px;
|
||||
height: 94px;
|
||||
}
|
||||
.van-uploader__upload {
|
||||
width: 98px;
|
||||
height: 94px;
|
||||
}
|
||||
.van-empty{
|
||||
transform: none;
|
||||
position: relative;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
|
||||
<van-nav-bar
|
||||
title="一路美景"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
|
||||
safe-area-inset-top
|
||||
>
|
||||
<template #right>
|
||||
<van-icon @click="signIn" color="#fff" size="20" name="photograph"></van-icon>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
|
||||
<div v-if="active === 0" class="page-v">
|
||||
<!--#include("/mobile/hd/checkin/friends.html"){}#-->
|
||||
</div>
|
||||
<div v-if="active === 1" class="page-v">
|
||||
<!--#include("/mobile/hd/checkin/my.html"){}#-->
|
||||
</div>
|
||||
|
||||
<van-tabbar
|
||||
style="max-width: 600px;position: fixed;left: 0;bottom: 0;right: 0;margin: auto"
|
||||
v-model="active" @change="tabbarChange"
|
||||
:active-color="boxData.hdcolor"
|
||||
inactive-color="#000"
|
||||
>
|
||||
<van-tabbar-item icon="thumb-circle-o">新鲜事</van-tabbar-item>
|
||||
<van-tabbar-item icon="user-o">我的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
|
||||
<!--发表内容弹框-->
|
||||
<van-popup v-model:show="writePopShow" class="white_pop" :style="{ height: '100%' }" @close="signClose">
|
||||
<div style="display: flex; justify-content: space-between; padding: 10px 20px; letter-spacing: 1px; align-items: center">
|
||||
<div @click="writePopClose" style="font-size: 16px">取消</div>
|
||||
<div>
|
||||
<van-button @click="signDo" color="#236eb4" size="mini" :disabled="message.trim() === '' && fileList.length === 0"
|
||||
style="border-radius: 6px; height: 28px; letter-spacing: 1px; font-size: 14px">发表</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<van-field
|
||||
v-model="message"
|
||||
rows="3" style="font-size: 15px"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="分享新鲜事..."
|
||||
></van-field>
|
||||
</div>
|
||||
<div style="padding: 10px 34px">
|
||||
<van-uploader v-model="fileList" multiple :after-read="afterRead" @delete="doDelete" :before-read="beforeRead"
|
||||
accept="image/*" :max-count="9" :multiple="true"></van-uploader>
|
||||
</div>
|
||||
<div style="margin-top: 40px">
|
||||
<van-cell-group border style="width: 82%; margin: 0 auto">
|
||||
<van-cell @click="actionShow = true" title="是否公开" class="is_show_cell" icon="user-o"
|
||||
is-link border :value="isOpenText" style="padding: 10px 0px; font-size: 15px"></van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<van-action-sheet v-model="actionShow" :actions="actions" cancel-text="取消" @select="(action) => { isOpenText = action.name }"
|
||||
close-on-click-action></van-action-sheet>
|
||||
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script>
|
||||
|
||||
const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
var xhrOnProgress = function (fun) {
|
||||
xhrOnProgress.onprogress = fun; //绑定监听
|
||||
//使用闭包实现监听绑
|
||||
return function () {
|
||||
//通过$.ajaxSettings.xhr();获得XMLHttpRequest对象
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
//判断监听函数是否为函数
|
||||
if (typeof xhrOnProgress.onprogress !== 'function')
|
||||
return xhr;
|
||||
//如果有监听函数并且xhr对象支持绑定时就把监听函数绑定上去
|
||||
if (xhrOnProgress.onprogress && xhr.upload) {
|
||||
xhr.upload.onprogress = xhrOnProgress.onprogress;
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}
|
||||
|
||||
function getSuffix(filename) {
|
||||
return /\.[^\.]+$/.exec(filename)
|
||||
}
|
||||
Vue.use(vant.Lazyload, {
|
||||
lazyComponent: true,
|
||||
});
|
||||
var vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
signCount: 0,
|
||||
tableData: [],
|
||||
finished: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
loading: false,
|
||||
isSignCurentDay: false,
|
||||
isLoading: false,
|
||||
isOrder: false,
|
||||
isOpenText: '公开',
|
||||
actions: [{ name: '公开' }, { name: '仅自己可见' }],
|
||||
actionShow: false,
|
||||
fileList: [],
|
||||
message: '',
|
||||
writePopShow: false,
|
||||
signShow: false,
|
||||
boxData: {},
|
||||
showPage: false,
|
||||
showPicker: false,
|
||||
showMsg: false,
|
||||
percent: 0,
|
||||
flag: true,
|
||||
showPlan: true,
|
||||
msg: '',
|
||||
fd: [],
|
||||
active: 1,
|
||||
isNull: function (val) {
|
||||
if (val === null || val === undefined || val === '') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg', 'heif'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
doctype: ['doc', 'docx', 'txt'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg', 'quicktime'],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
beforeRead(file) {
|
||||
if(!Array.isArray(file)) {
|
||||
file = [file]
|
||||
}
|
||||
for (const f of file) {
|
||||
const type = this.imgtype.includes(f.name.split('.')[1].toLowerCase());
|
||||
if (!type) {
|
||||
const str = this.imgtype.map(v => v.toLowerCase()).join("/")
|
||||
vant.Toast('上传文件只能是' + str + '格式!');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
},
|
||||
writePopClose() {
|
||||
if (this.fileList.length > 0) {
|
||||
const u = this.fileList.map(o => o.data.filepath)
|
||||
$.post('/mobile/checkin/delFile', {url: JSON.stringify(u)})
|
||||
}
|
||||
this.writePopShow = false
|
||||
},
|
||||
doDelete(file) {
|
||||
$.post('/mobile/checkin/delFile', {url: JSON.stringify([file.data.filepath])})
|
||||
},
|
||||
afterRead(file) {
|
||||
let formData = new FormData();
|
||||
if (Array.isArray(file)) {
|
||||
file.forEach(item => {
|
||||
item.status = 'uploading';
|
||||
item.message = '上传中...';
|
||||
formData.append("file", item.file, item.file.name);
|
||||
})
|
||||
} else {
|
||||
file.status = 'uploading';
|
||||
file.message = '上传中...';
|
||||
formData.append("file", file.file, file.file.name);
|
||||
}
|
||||
$.ajax({
|
||||
url: "/mobile/checkin/uploadFile",
|
||||
type: "post",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (res) => {
|
||||
const {code, data} = res
|
||||
if (code === 0) {
|
||||
if(Array.isArray(file)) {
|
||||
file.forEach(item => {
|
||||
const f = data.find(o => o.filename === item.file.name)
|
||||
item.status = 'success';
|
||||
item.data = f
|
||||
})
|
||||
} else {
|
||||
file.status = 'success';
|
||||
file.data = data[0]
|
||||
}
|
||||
}
|
||||
},
|
||||
error: (err) => {
|
||||
if(Array.isArray(file)) {
|
||||
file.forEach(item => {
|
||||
item.status = 'failed';
|
||||
item.message = '上传失败';
|
||||
})
|
||||
} else {
|
||||
file.status = 'failed';
|
||||
file.data = '上传失败'
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
onRefresh () {
|
||||
setTimeout(() => {
|
||||
vant.Toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
async zanOrder () {
|
||||
this.isOrder = !this.isOrder
|
||||
const toast = vant.Toast.loading({message: '获取排行中...', forbidClick: true, loadingType: 'spinner',});
|
||||
this.pageForm.order = this.isOrder
|
||||
setTimeout(() => {
|
||||
this.doSearch();
|
||||
toast.clear()
|
||||
}, 200)
|
||||
},
|
||||
async signDo () {
|
||||
const that = this
|
||||
|
||||
let array = []
|
||||
this.fileList.forEach(item => {
|
||||
array.push(item.data)
|
||||
})
|
||||
const formdata = {
|
||||
'hdid': getQueryVariable("id"),
|
||||
'content': this.message,
|
||||
'isOpen': this.isOpenText === '公开',
|
||||
'files': JSON.stringify(array),
|
||||
}
|
||||
console.log(array)
|
||||
const resp = await $.post('/mobile/checkin/doAdd', formdata)
|
||||
if (resp.code === 0) {
|
||||
this.signCount = resp.data
|
||||
that.doSearch()
|
||||
that.findOne()
|
||||
that.writePopShow = false
|
||||
vant.Toast('发表成功')
|
||||
} else {
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
}
|
||||
},
|
||||
async delContent(item) {
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要删除吗?',
|
||||
confirmButtonColor: '#236eb4',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/checkin/del', {
|
||||
id: item.id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.findOne()
|
||||
vant.Toast('删除成功')
|
||||
} else {
|
||||
vant.Toast('删除失败')
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.getContent()
|
||||
},
|
||||
tabbarChange (o) {
|
||||
this.doSearch();
|
||||
/*if (o !== 0) {
|
||||
this.pageForm.day = ''
|
||||
this.doSearch();
|
||||
}
|
||||
if(o === 2) {
|
||||
this.$nextTick(() => {
|
||||
$('.van-calendar__body').css('display', 'none')
|
||||
setTimeout(() => {
|
||||
$('.van-calendar__body').css('display', 'block')
|
||||
}, 80)
|
||||
})
|
||||
}*/
|
||||
},
|
||||
signIn () {
|
||||
this.writePopShow = true
|
||||
$('.van-calendar__body').css('display', 'none')
|
||||
},
|
||||
signClose () {
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
$('.van-calendar__body').css('display', 'block')
|
||||
}, 80)
|
||||
})
|
||||
this.message = ''
|
||||
this.fileList = []
|
||||
this.isOpenText = '公开'
|
||||
},
|
||||
openImage (o, index) {
|
||||
vant.ImagePreview({
|
||||
images: o.map(m => FILE_DOMAIN + m.url),
|
||||
startPosition: index,
|
||||
})
|
||||
},
|
||||
calendarSelect (date) {
|
||||
this.pageForm.day = moment(date).format("YYYY-MM-DD")
|
||||
this.getMyContent()
|
||||
},
|
||||
formatter (day) {
|
||||
const d = moment(day.date).format("YYYY-MM-DD")
|
||||
const map = this.boxData.content.map(o => moment(o.time).format("YYYY-MM-DD"))
|
||||
if(d === moment().format('YYYY-MM-DD')) {
|
||||
day.className = 'cur_day'
|
||||
}
|
||||
if (map.includes(d)) {
|
||||
day.className = 'sign_in_day'
|
||||
if (d === moment().format('YYYY-MM-DD')) {
|
||||
/*this.$nextTick(() => {
|
||||
$('.van-calendar__selected-day').removeAttr("style")
|
||||
$('.van-calendar__selected-day').css('background-color', 'revert').css('color', 'revert')
|
||||
.css('border', 'none').css('box-shadow', 'none')
|
||||
})*/
|
||||
}
|
||||
}
|
||||
return day
|
||||
},
|
||||
async getMyContent() {
|
||||
const resp = await $.post('/platform/hd/checkinManage/getContent', this.pageForm)
|
||||
if(resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
}
|
||||
},
|
||||
async getContent() {
|
||||
this.loading = true
|
||||
this.pageForm.hdid = getQueryVariable("id")
|
||||
this.pageForm.active = this.active
|
||||
const resp = await $.post('/platform/hd/checkinManage/getContent', this.pageForm)
|
||||
if(resp.code === 0) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
async zan(o) {
|
||||
o.me_zan = ! o.me_zan
|
||||
if (o.me_zan) {
|
||||
o.zan_count = o.zan_count + 1
|
||||
} else {
|
||||
if (o.zan_count > 0) {
|
||||
o.zan_count = o.zan_count - 1
|
||||
}
|
||||
}
|
||||
o.zan_id = await $.post('/platform/hd/checkinManage/clickZan', {
|
||||
id: o.zan_id,
|
||||
zan: o.me_zan,
|
||||
hdid: o.hdid,
|
||||
contentId: o.id,
|
||||
})
|
||||
},
|
||||
async findOne() {
|
||||
var self = this
|
||||
if (!this.isNull(getQueryVariable("id"))) {
|
||||
await $.get("/platform/hd/checkinManage/findOne", {hdid: getQueryVariable("id")}, function (data) {
|
||||
if (data.code === 0) {
|
||||
document.getElementsByTagName("title")[0].innerText = data.data.hdname;
|
||||
self.boxData = data.data
|
||||
self.isSignCurentDay = self.boxData.content.some(o => moment(o.time).format('YYYY-MM-DD') === (moment().format('YYYY-MM-DD')))
|
||||
self.showPage = true
|
||||
|
||||
if (!data.data.hdflag) {
|
||||
self.$toast.fail("当前活动未开启!");
|
||||
} else {
|
||||
if (!(new Date(data.data.hdkssj.replace(/-/g, '/')).getTime() < new Date().getTime() && new Date().getTime() < new Date(data.data.hdjssj.replace(/-/g, '/')).getTime())) {
|
||||
self.$toast.fail("不在活动时间范围内!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
async created () {
|
||||
var self = this
|
||||
|
||||
setTimeout(() => {
|
||||
$('.van-calendar__body').css('display', 'block')
|
||||
}, 500)
|
||||
|
||||
if (window.innerWidth > 800) {
|
||||
self.$notify({type: 'warning', message: '当前窗口宽度过大!部分区域显示会出现大小偏差'});
|
||||
}
|
||||
|
||||
//await self.findOne()
|
||||
await self.getContent()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,126 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
width: 90%;
|
||||
margin: 0 auto 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.van-cell {
|
||||
border-radius: 20px;
|
||||
padding: 4px 16px !important;
|
||||
}
|
||||
.van-cell-group {
|
||||
border-radius: 20px;
|
||||
padding: 12px 4px;
|
||||
}
|
||||
.van-divider {
|
||||
width: 90%;
|
||||
margin: 4px auto 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="活动列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="主  题" :border="false">{{o.hdname}}</van-cell>
|
||||
<van-divider></van-divider>
|
||||
<van-cell :border="false" title="创 建 人">{{o.cjr}}</van-cell>
|
||||
<van-cell :border="false" title="创建时间">{{o.hdcjsj}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.hdkssj}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.hdjssj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
hdtype: 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/checkinManage/data', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
const {hdid, hdjssj, hdkssj} = o
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
|
||||
vant.Toast('活动暂未开始!')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
|
||||
vant.Toast('活动已结束!')
|
||||
return
|
||||
}
|
||||
window.location.href = '/mobile/checkin/info?client=mobile&id=' + hdid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,61 @@
|
||||
<div>
|
||||
<van-pull-refresh
|
||||
v-model="isLoading"
|
||||
success-text="刷新成功"
|
||||
@refresh="onRefresh">
|
||||
|
||||
<div>
|
||||
<van-image class="back_img" width="100%" height="230" src="/assets/platform/img/checkin/bcc.jpg"></van-image>
|
||||
</div>
|
||||
<div class="zan_order" :style="isOrder === true ? 'color: #236eb4; font-size: 20px' : 'color: grey; font-size: 20px'">
|
||||
<van-icon name="filter-o"></van-icon>
|
||||
<span style="font-size: 14px" @click="zanOrder">获赞排行</span>
|
||||
</div>
|
||||
|
||||
<van-list
|
||||
v-model="loading" v-if="tableData.length > 0"
|
||||
:finished="finished" :immediate-check="false" @load="getContent"
|
||||
:finished-text="tableData.length>0?'没有更多了':''">
|
||||
|
||||
<!--<lazy-component>-->
|
||||
<div class="info" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<div>
|
||||
<van-image v-if="item.sex === '男'" width="40" round height="40" src="/assets/platform/img/checkin/man.png"></van-image>
|
||||
<van-image v-if="item.sex === '女'" width="40" round height="40" src="/assets/platform/img/checkin/woman.png"></van-image>
|
||||
</div>
|
||||
<div style="margin-left: 10px">
|
||||
<div style="color: #236eb4; font-weight: bold">{{item.username}}</div>
|
||||
<div style="font-size: 12px; color: grey">{{item.unitname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 8px">
|
||||
<div>{{item.content}}</div>
|
||||
<van-row style="margin-top: 4px">
|
||||
<van-col span="8" v-for="(file, index) in item.files" style="height: 104px">
|
||||
<van-image style="padding-right: 4px; width: 96%; height: 100px" @click="openImage(item.files, index)"
|
||||
:src="FILE_DOMAIN + file.url"></van-image>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 6px; align-items: center;">
|
||||
<div style="color: grey">{{moment(item.time).format('HH:mm')}}</div>
|
||||
<div :style="item.me_zan === false ? 'font-size: 20px' : 'font-size: 20px; color: red'">
|
||||
<div @click="zan(item)" style="display: flex; align-items: center">
|
||||
<van-icon name="good-job-o" style="font-size: 20px" :badge="item.zan_count"></van-icon>
|
||||
<span style="margin-left: 8px; font-size: 14px">赞</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--</lazy-component>-->
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.png"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
@@ -0,0 +1,256 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- 在 head 标签中添加 meta 标签,并设置 viewport-fit=cover 值 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
||||
<title>Title</title>
|
||||
<!-- 引入样式文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.5/lib/index.css">
|
||||
<link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.2.0/weui.min.css">
|
||||
|
||||
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.5/lib/vant.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
|
||||
<script src="/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
|
||||
</head>
|
||||
<style>
|
||||
html, body {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
max-width: 600px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
html::-webkit-scrollbar {
|
||||
display: none
|
||||
}
|
||||
|
||||
[v-clock] {
|
||||
display: none
|
||||
}
|
||||
|
||||
html, body {
|
||||
font-family: PingFang SC, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.page-v {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.detail-v {
|
||||
margin-top: 15px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.p15 {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.njuColor {
|
||||
color: rgb(106, 0, 95);
|
||||
}
|
||||
|
||||
.title-v {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.form-v {
|
||||
/*margin-top: 20px;*/
|
||||
}
|
||||
|
||||
.van-doc-demo-block__title {
|
||||
margin: 0;
|
||||
padding: 0 16px;
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.goods-card {
|
||||
margin: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.van-swipe-cell__wrapper {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div v-clock id="app">
|
||||
<div>
|
||||
<van-swipe v-if="boxData.fileList.length>0" class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item v-for="url in boxData.fileList">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
:src="url"
|
||||
></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
<van-image
|
||||
v-else
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
src="***"
|
||||
>
|
||||
<template v-slot:error>封面图片</template>
|
||||
</van-image>
|
||||
</div>
|
||||
<div v-if="active==0" class="page-v">
|
||||
<div class="detail-v">
|
||||
<div class="title-v p15">
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动介绍</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdjs"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">参加人员</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdcjry"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">奖励方式</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdjlfs"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动内容</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdnr"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动联系人</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15" style="line-height:24pt;">
|
||||
<div v-html="boxData.hdlxr"></div>
|
||||
</div>
|
||||
<div class="title-v p15" v-if="!isNull(boxData.hdother.replace(/<.*?>/g,''))">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">其他</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15" style="line-height:24pt;" v-if="!isNull(boxData.hdother.replace(/<.*?>/g,''))">
|
||||
<div v-html="boxData.hdother"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-tabbar
|
||||
style="max-width: 600px;position: fixed;left: 0;bottom: 0;right: 0;margin: auto"
|
||||
v-model="active"
|
||||
:active-color="boxData.hdcolor"
|
||||
inactive-color="#000"
|
||||
>
|
||||
<van-tabbar-item icon="label-o">介绍</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
<van-number-keyboard safe-area-inset-bottom/>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var xhrOnProgress = function (fun) {
|
||||
xhrOnProgress.onprogress = fun; //绑定监听
|
||||
//使用闭包实现监听绑
|
||||
return function () {
|
||||
//通过$.ajaxSettings.xhr();获得XMLHttpRequest对象
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
//判断监听函数是否为函数
|
||||
if (typeof xhrOnProgress.onprogress !== 'function')
|
||||
return xhr;
|
||||
//如果有监听函数并且xhr对象支持绑定时就把监听函数绑定上去
|
||||
if (xhrOnProgress.onprogress && xhr.upload) {
|
||||
xhr.upload.onprogress = xhrOnProgress.onprogress;
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}
|
||||
|
||||
function getSuffix(filename) {
|
||||
return /\.[^\.]+$/.exec(filename)
|
||||
}
|
||||
|
||||
var vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
fd: [],
|
||||
boxData: {},
|
||||
active: 0,
|
||||
isNull: function (val) {
|
||||
if (val == null || val == undefined || val == '') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
doctype: ['doc', 'docx', 'txt'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg', 'quicktime'],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created: function () {
|
||||
var self = this
|
||||
if (window.innerWidth > 800) {
|
||||
self.$notify({type: 'warning', message: '当前窗口宽度过大!部分区域显示会出现大小偏差'});
|
||||
}
|
||||
var wmhd_boxdata = localStorage.getItem("wmhd_boxdata")
|
||||
if (wmhd_boxdata != undefined && wmhd_boxdata != null) {
|
||||
this.boxData = JSON.parse(wmhd_boxdata)
|
||||
localStorage.removeItem("wmhd_boxdata")
|
||||
} else {
|
||||
this.boxData = {
|
||||
hdjs: '',
|
||||
hdcjry: '',
|
||||
hdjlfs: '',
|
||||
hdnr: '',
|
||||
hdlxr: '',
|
||||
hdother: '',
|
||||
hdcolor: '#6A005F',
|
||||
fileList: [],
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<div>
|
||||
<!--头部、背景图片-->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tableData.length > 0" class="info" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<div>
|
||||
<van-image v-if="item.sex === '男'" width="40" round height="40" src="/assets/platform/img/checkin/man.png"></van-image>
|
||||
<van-image v-if="item.sex === '女'" width="40" round height="40" src="/assets/platform/img/checkin/woman.png"></van-image>
|
||||
</div>
|
||||
<div style="margin-left: 10px">
|
||||
<div style="color: #236eb4; font-weight: bold">{{item.username}}</div>
|
||||
<div style="font-size: 12px; color: grey">{{item.unitname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 8px">
|
||||
<div>{{item.content}}</div>
|
||||
<van-row style="margin-top: 4px">
|
||||
<van-col span="8" v-for="(file, index) in item.files" style="height: 104px">
|
||||
<van-image style="padding-right: 4px; width: 96%; height: 100px" @click="openImage(item.files, index)"
|
||||
:src="FILE_DOMAIN + file.url"></van-image>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 6px; align-items: center;">
|
||||
<div>
|
||||
<span style="color: grey">{{moment(item.time).format('HH:mm')}}</span>
|
||||
<span @click="delContent(item)" style="font-size: 12px; margin-left: 6px; color: #236eb4">删除</span>
|
||||
</div>
|
||||
<div :style="item.me_zan === false ? 'font-size: 20px' : 'font-size: 20px; color: red'">
|
||||
<div @click="zan(item)" style="display: flex; align-items: center">
|
||||
<van-icon name="good-job-o" style="font-size: 20px" :badge="item.zan_count"></van-icon>
|
||||
<span style="margin-left: 8px; font-size: 14px">赞</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.png"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--签到成功确认框-->
|
||||
<van-popup v-model="signShow" round class="sign_pop">
|
||||
<van-image width="300px" round src="/assets/platform/img/checkin/sign.png" style="position: absolute; top: -150px;z-index: 9999"></van-image>
|
||||
<div style="line-height: 25px; margin-top: 30px; letter-spacing: 1px">
|
||||
<div style="font-size: 16px">恭喜获得天数+1</div>
|
||||
<div style="color: grey">您是今日第<span style="color: chocolate; font-weight: bold">{{signCount}}</span>位签到</div>
|
||||
<div class="sign_button">
|
||||
<van-button @click="signShow = false" round type="info" size="small" color="#236eb4">我知道了</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
@@ -0,0 +1,421 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
margin: 0 10px;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.icon_text {
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.v-header {
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
#v-back {
|
||||
background: url("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d1ed570f33cd32f875a8390b850f.jpg%401280w_1l_2o_100sh.png&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638425547&t=55618f9dea9872dc3c0c1ece65ea96d5") no-repeat;
|
||||
background-size: cover;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
#v-back2 {
|
||||
background: url("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d1ed570f33cd32f875a8390b850f.jpg%401280w_1l_2o_100sh.png&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638425547&t=55618f9dea9872dc3c0c1ece65ea96d5") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.user_info {
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.user_avatar {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
transform: translate(0, -50%);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.disabled-row img {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
.disabled-row .van-grid-item {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.oneDisabled {
|
||||
filter: grayscale(1);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="user_info">
|
||||
<van-row style="height: 200px">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="200px"
|
||||
src="/back2.png"
|
||||
></van-image>
|
||||
</van-row>
|
||||
|
||||
<van-row class="user_avatar" style="height: 80px">
|
||||
<van-col span="6" class="text-center">
|
||||
<van-image
|
||||
round
|
||||
width="70"
|
||||
height="70"
|
||||
:src="avatar"
|
||||
></van-image>
|
||||
</van-col>
|
||||
<van-col span="18">
|
||||
<div style="height: 40px;line-height: 40px">
|
||||
<span style="font-size: 22px; color: white">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</span>
|
||||
<span style="color: white">
|
||||
${@shiro.getPrincipalProperty('loginname')}
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-ellipsis" style="height: 40px;line-height: 40px;font-size: 14px;color: #969799">
|
||||
<!--#if(@shiro.getPrincipalProperty('union')!=null){#-->
|
||||
${@shiro.getPrincipalProperty('union').getUnionname()}
|
||||
<!--#}#-->
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '会员管理'">
|
||||
<div v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('public')||@shiro.hasRole('H01')}"
|
||||
class="van-sidebar-item van-sidebar-item--select">
|
||||
会员管理
|
||||
</div>
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item v-if="${@shiro.hasRole('H01')}" url="/mobile/member/detail">
|
||||
<image src="/assets/mobile/icon/member/da.png"></image>
|
||||
<span class="icon_text"> 会员档案</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item v-if="${@shiro.lacksRole('H01')}" url="/mobile/member/apply">
|
||||
<image src="/assets/mobile/icon/member/apply.png"></image>
|
||||
<span class="icon_text"> 申请入会</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')}"
|
||||
url="/mobile/member/audit">
|
||||
<image src="/assets/mobile/icon/member/audit.png"></image>
|
||||
<span class="icon_text"> 会员审核</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/member/dashBoard/index">
|
||||
<image src="/assets/mobile/icon/member/dashboard.png"></image>
|
||||
<span class="icon_text"> 会员看板</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '提案管理'">
|
||||
<van-row
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdb01') || @shiro.hasRole('jdh12')}">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
民主管理
|
||||
</div>
|
||||
<van-grid
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdbt01')||@shiro.hasRole('jdhdb01') || @shiro.hasRole('jdh12')}"
|
||||
:border="false" :column-num="3">
|
||||
<van-grid-item v-if="${@shiro.hasRole('jdhdb01')}"
|
||||
url="/platform/mobile/proposal/compose">
|
||||
<image src="/assets/mobile/icon/proposal/myProposal.png"></image>
|
||||
<span class="icon_text">个人提案阅览</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="${@shiro.hasRole('jdhdb01')}"
|
||||
url="/platform/mobile/proposal/seconded">
|
||||
<image src="/assets/mobile/icon/proposal/fy.png"></image>
|
||||
<span class="icon_text">附议提案</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdbt01')}"
|
||||
url="/platform/mobile/proposal/delegation">
|
||||
<image style="width: 59px" src="/assets/mobile/icon/proposal/tz.png"></image>
|
||||
<span class="icon_text">团长审议</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}"
|
||||
url="/platform/mobile/proposal/integrated">
|
||||
<image src="/assets/mobile/icon/proposal/search.png"></image>
|
||||
<span class="icon_text">提案查询</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}"
|
||||
url="/mobile/proposal/delegate/index">
|
||||
<image src="/assets/mobile/icon/proposal/cx.png"></image>
|
||||
<span class="icon_text">代表查询</span>
|
||||
</van-grid-item>
|
||||
|
||||
<!-- <van-grid-item url="/mobile/proposal/analysis/index">-->
|
||||
<!-- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"-->
|
||||
<!-- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">-->
|
||||
<!-- <svg t="1598769687916" class="icon" viewBox="0 0 1024 1024" version="1.1"-->
|
||||
<!-- xmlns="http://www.w3.org/2000/svg" p-id="1332" width="32" height="32"-->
|
||||
<!-- xmlns:xlink="http://www.w3.org/1999/xlink">-->
|
||||
<!-- <defs>-->
|
||||
<!-- <style type="text/css"></style>-->
|
||||
<!-- </defs>-->
|
||||
<!-- <path d="M283.84768 275.52256h473.088c37.376 0 67.584 30.208 67.584 67.584v439.296c0 37.376-30.208 67.584-67.584 67.584h-473.088c-37.376 0-67.584-30.208-67.584-67.584v-439.296c0-37.376 30.208-67.584 67.584-67.584z"-->
|
||||
<!-- fill="#CAE4FF" p-id="1333"></path>-->
|
||||
<!-- <path d="M253.9008 716.1856c-15.872 0-28.672-12.8-28.672-28.16 0-7.68 3.072-14.848 8.192-20.48l175.616-175.616c11.264-11.264 29.184-11.264 40.448 0l103.424 103.424 125.44-125.44-49.664-49.664 152.064-25.088-10.752 166.912-51.2-51.2-143.36 142.848c-0.512 1.024-1.536 2.048-2.56 2.56-11.264 11.264-29.184 11.264-40.448 0l-103.424-103.424-155.648 155.648c-4.608 4.608-12.288 7.68-19.456 7.68z"-->
|
||||
<!-- fill="#0972E7" p-id="1334"></path>-->
|
||||
<!-- <path d="M163.7888 983.4496c-37.376 0-67.072-30.208-67.584-67.584V208.2816c0-37.376 30.208-67.072 67.584-67.584h95.744v-81.92c0-15.872 12.8-28.672 28.672-28.16 15.872 0 28.16 12.8 28.16 28.16v81.92h172.544v-81.92c0-15.872 12.8-28.672 28.16-28.672 15.872 0 28.672 12.8 28.672 28.16v81.92h173.056v-81.92c0-15.872 12.8-28.672 28.16-28.672 15.872 0 28.672 12.8 28.672 28.16v81.92h95.744c37.376 0 67.072 30.208 67.584 67.584v708.096c0 37.376-30.208 67.072-67.584 67.584l-707.584 0.512z m704-71.168V212.3776H167.8848v699.904h699.904z"-->
|
||||
<!-- fill="#0972E7" p-id="1335"></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- <span class="icon_text"> 提案分析</span>-->
|
||||
<!-- </van-grid-item>-->
|
||||
</van-grid>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '活动管理'">
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
品牌活动
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivity/trainList">
|
||||
<image src="/assets/mobile/icon/train/train.png"></image>
|
||||
<span class="icon_text">品牌活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivity/trainList?type=my">
|
||||
<image src="/assets/mobile/icon/train/my.png"></image>
|
||||
<span class="icon_text">我的活动</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivityScannerQrCode"
|
||||
v-if="${@shiro.hasRole('codeScanner')}">
|
||||
<image src="/assets/mobile/icon/train/my.png"></image>
|
||||
<span class="icon_text">扫一扫</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
文体活动
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/activity/Sports/list/activityList">
|
||||
<image src="/assets/mobile/svg/activity/bm.svg"></image>
|
||||
<span style="font-size: 12px;margin-top: 10px">体育活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/unionActivity">
|
||||
<image src="/assets/mobile/icon/activity/bm.png"></image>
|
||||
<span class="icon_text">校活动报名</span>
|
||||
</van-grid-item>
|
||||
<!--<van-grid-item @click="toWxJsz">
|
||||
<image src="/assets/mobile/svg/activity/jsz.svg"></image>
|
||||
<span class="icon_text">健身走</span>
|
||||
</van-grid-item>-->
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
特色活动
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/question/h5/list?type=1">
|
||||
<image src="/assets/mobile/icon/question/dati.png"></image>
|
||||
<span class="icon_text">在线调查</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/question/h5/list?type=2">
|
||||
<image src="/assets/mobile/icon/question/zxdc.png"></image>
|
||||
<span class="icon_text">知识竞答</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/question/h5/list?type=4">
|
||||
<image src="/assets/mobile/icon/question/yxxz.png"></image>
|
||||
<span class="icon_text">意向选择</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
场地预约
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/activity/site/info">
|
||||
<image src="/assets/mobile/icon/site/apply.png"></image>
|
||||
<span class="icon_text">场地预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/site/info/my">
|
||||
<image src="/assets/mobile/icon/site/my.png"></image>
|
||||
<span class="icon_text">我的预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/site/audit"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('gh10')||@shiro.hasRole('xghng')||@shiro.hasRole('siteManage')||@shiro.hasRole('A06')||@shiro.hasRole('H04')}">
|
||||
<image src="/assets/mobile/icon/site/audit.png"></image>
|
||||
<span class="icon_text">场地预约审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '福利慰问'">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
职工慰问
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<template v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('H01')}">
|
||||
<van-grid-item url="/mobile/condolence/apply/for">
|
||||
<image src="/assets/mobile/icon/condolence/apply.png"></image>
|
||||
<span class="icon_text">慰问申请</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/condolence/apply">
|
||||
<image src="/assets/mobile/icon/condolence/list.png"></image>
|
||||
<span class="icon_text">慰问记录</span>
|
||||
</van-grid-item>
|
||||
</template>
|
||||
<van-grid-item
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')||@shiro.hasRole('xghkj')}"
|
||||
url="/mobile/condolence/audit">
|
||||
<image src="/assets/mobile/icon/condolence/audit.png"></image>
|
||||
<span class="icon_text">慰问审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
职工福利
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/welfare/list/index">
|
||||
<image src="/assets/mobile/icon/contribution/fl.png"></image>
|
||||
<span class="icon_text">职工福利</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '大病互助'"></div>
|
||||
<div v-if="paramType === '建言献策'">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
疗休养
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/index">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 疗休养</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/myRecuperation">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 我的疗休养</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/cloudbase/1.1.0/cloud.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
sex: '${@shiro.getPrincipalProperty("sex")}',
|
||||
avatar: '',
|
||||
paramType: getQueryString('type'),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loginOut() {
|
||||
window.location.href = "/mobile/login/out"
|
||||
},
|
||||
async toWxJsz() {
|
||||
const loginName = "${@shiro.getPrincipalProperty('loginname')}"
|
||||
const userName = "${@shiro.getPrincipalProperty('username')}"
|
||||
const query = 'loginName=' + encodeURIComponent(loginName) + '&userName=' + encodeURIComponent(userName)
|
||||
|
||||
let cloud = new window.cloud.Cloud({
|
||||
identityless: true, // true表示是未登录模式
|
||||
resourceAppid: 'wx9c693357de44cf59', // 小程序AppID
|
||||
resourceEnv: 'unionpal-0ge58oan8d6fa30e', // 云环境环境ID
|
||||
})
|
||||
await cloud.init(); // 云函数初始化
|
||||
/*const res = await cloud.callFunction({
|
||||
name: 'urlscheme', //提供UrlScheme服务的云函数名称
|
||||
data: {
|
||||
path: '/pages/login/login', // 想跳转的小程序路径
|
||||
query: query, // 地址栏query参数,可在微信 onLoad: function (options) {}生命周期里options接收这些参数
|
||||
} //向这个云函数中传入的自定义参数,注意:path地址前后/不能多加或者少加,query参数里不能有转义字符如果有需要解码
|
||||
});
|
||||
|
||||
console.log(res, '云函数返回数据');
|
||||
if (res && res.result.errCode == 0) {
|
||||
location.href = res.result.openlink; // 跳转
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}*/
|
||||
const res = await cloud.callFunction({
|
||||
name: 'urllink', //提供UrlScheme服务的云函数名称
|
||||
data: {
|
||||
path: '/pages/login/login', // 想跳转的小程序路径
|
||||
query: query, // 地址栏query参数,可在微信 onLoad: function (options) {}生命周期里options接收这些参数
|
||||
} //向这个云函数中传入的自定义参数,注意:path地址前后/不能多加或者少加,query参数里不能有转义字符如果有需要解码
|
||||
});
|
||||
/* alert(JSON.stringify(res))
|
||||
alert(res.result.urlLink)*/
|
||||
console.log(res, '云函数返回数据');
|
||||
if (res && res.result.errCode === 0) {
|
||||
location.href = res.result.urlLink
|
||||
// window.open(res.result.urlLink)
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.avatar = this.sex === '女' ? '/avatar_girl.svg' : '/avatar_boy.svg'
|
||||
// const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
// const userAvatar = "${@shiro.getPrincipalProperty('avatar')}"
|
||||
// console.log(userAvatar)
|
||||
// if (userAvatar) {
|
||||
// this.avatar = FILE_DOMAIN + "${@shiro.getPrincipalProperty('avatar')}"
|
||||
// } else {
|
||||
// this.avatar = this.sex === '女' ? '/avatar_girl.svg' : '/avatar_boy.svg'
|
||||
// }
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 34%;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
font-size: 18px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.label {
|
||||
border-left: 5px #1867b0 solid;
|
||||
border-radius: 4px;
|
||||
padding-left: 6px;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.van-tab__pane, .van-tab__pane-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.label_text {
|
||||
color: grey;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.yy-wrap .van-button {
|
||||
height: 32px;
|
||||
border-radius: 6px;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.time_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.time_info:nth-of-type(1) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="心理咨询预约"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<div class="info">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="80" height="80"
|
||||
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+doctorData.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
{{doctorData.username}}
|
||||
</div>
|
||||
<div>
|
||||
{{doctorData.jobTitle}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="active" :style="'height: ' + (window.screen.height - 46 - 40 - 84 - 24 - 44) + 'px'">
|
||||
<van-tab title="预约时段">
|
||||
<van-list
|
||||
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 style="color: #1867b0">{{getFormatTime(item)}}</div>
|
||||
<div class="yy-wrap">
|
||||
<van-button @click="apply(item)" :color="item.className">{{item.title}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading === false && timeData.length === 0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="抱歉,此咨询师暂时没有进行排班哦">
|
||||
</van-empty>
|
||||
</van-tab>
|
||||
<van-tab title="咨询师简介">
|
||||
<div class="label">咨询师擅长</div>
|
||||
<div class="label_text">{{doctorData.specialty ? doctorData.specialty : '暂无数据,该资料待补充'}}</div>
|
||||
<div class="label" style="margin-top: 20px">咨询师简介</div>
|
||||
<div class="label_text">{{doctorData.introduce ? doctorData.introduce : '暂无数据,该资料待补充'}}</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<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-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
:value="chooseData.startTime"
|
||||
label="开始时间"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.endTime"
|
||||
label="结束时间"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
|
||||
<van-field readonly
|
||||
:value="chooseData.username"
|
||||
label="咨询师姓名"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.mobile"
|
||||
label="咨询师电话"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
label="预约人姓名"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"
|
||||
label="预约人工号"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
label="预约人单位"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('mobile')}"
|
||||
label="预约人电话"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field
|
||||
v-model="appointmentUserNote"
|
||||
rows="3"
|
||||
autosize
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
placeholder="您可以输入预约备注"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
<div class="footer">
|
||||
<van-button @click="doSubmit()" color="#1867b0">提交预约</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
doctorId: '',
|
||||
doctorData: {},
|
||||
active: 0,
|
||||
timeData: [],
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
chooseData: {},
|
||||
appointmentUserNote: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
id: this.chooseData.id
|
||||
}
|
||||
const resp = await $.post('/mobile/legalAid/doApply', params)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('申请成功')
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/legalAid/myApplyList')
|
||||
}, 1000)
|
||||
} else if (resp.code === 1) {
|
||||
this.$toast.error(resp.msg)
|
||||
} else if (resp.code === 2) {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
apply(o) {
|
||||
if (o.title !== '可预约') {
|
||||
return
|
||||
}
|
||||
this.chooseData = o
|
||||
this.show = true
|
||||
},
|
||||
getFormatTime(o) {
|
||||
const simpleStartDate = moment(o.startTime).format('YYYY-MM-DD')
|
||||
const simpleStartHour = moment(o.startTime).format('HH:mm')
|
||||
const simpleEndHour = moment(o.endTime).format('HH:mm')
|
||||
const dayNameOfWeek = this.dayNames[new Date(simpleStartDate).getDay()]
|
||||
return simpleStartDate + ' ' + dayNameOfWeek + ' ' + simpleStartHour + '至' + simpleEndHour
|
||||
},
|
||||
async pageData() {
|
||||
this.pageForm.doctorId = this.doctorId
|
||||
const resp = await $.post('/mobile/legalAid/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (this.doctorId !== '') {
|
||||
this.doctorData = resp.data[0]
|
||||
} else {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async getDataByDoctorId() {
|
||||
this.mLoading = true
|
||||
this.pageForm.id = this.doctorId
|
||||
const resp = await $.post('/mobile/legalAid/getDataByDoctorId', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}";
|
||||
resp.data.list.forEach(v => {
|
||||
if (new Date().getTime() > v.startTimeTs) {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
} else {
|
||||
if (!v.appointmentUser) {
|
||||
v.className = '#1867b0'
|
||||
v.title = '可预约'
|
||||
} else if (v.appointmentUser === userId) {
|
||||
v.className = 'gray'
|
||||
v.title = '我已预约'
|
||||
} else {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
}
|
||||
}
|
||||
})
|
||||
this.timeData = this.timeData.concat(resp.data.list)
|
||||
if (this.timeData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.doctorId = getQueryVariable('doctorId')
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 38%;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
width: 74%;
|
||||
line-height: 22px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.desc {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="法律援助师列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<!--咨询师列表-->
|
||||
<div class="info" @click="toApply(item)" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="100" height="100"
|
||||
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
<span style="font-size: 20px">{{item.username}} </span>
|
||||
<span style="color: grey">{{item.sex}} </span> 
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<span style="color: grey">职称:</span>{{item.jobTitle}}
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">单位:</span>{{item.unitName}}
|
||||
</div>
|
||||
<div class="desc">
|
||||
<span style="color: grey">特长:</span>{{item.specialty}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const resp = await $.post('/mobile/legalAid/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
},
|
||||
toApply(o) {
|
||||
location.href = '/mobile/legalAid/apply?doctorId=' + o.userid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,251 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
background: #FFFFFF;
|
||||
width: 92%;
|
||||
margin: 0px auto 20px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.card-head {
|
||||
line-height: 30px;
|
||||
padding: 8px 16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
.cancel-button {
|
||||
text-align: right;
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.cancel-button .van-button {
|
||||
height: 27px !important;
|
||||
padding: 0 18px !important;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="我的预约记录"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.stateId" :options="stateList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="viewInfo(o)">
|
||||
<div class="card-head">
|
||||
心理咨询预约
|
||||
<span class="state-text">
|
||||
<van-tag size="medium" v-if="o.stateId===2300" type="success">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2200" type="error">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2100" type="warning">{{o.stateName}}</van-tag>
|
||||
</span>
|
||||
</div>
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="预约人">{{o.appointmentUserName}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.startTime}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.endTime}}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="cancel-button">
|
||||
<van-button v-if="moment().unix() < moment(o.startTime).unix()" @click.stop="doCancel(o.id)" round
|
||||
size="small" color="#1867b0">取消预约
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<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></div>
|
||||
<div class="van-card-header">
|
||||
预约时间段
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ viewData.endTime }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
预约人信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.appointmentLoginName }}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.appointmentUnitName }}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.appointmentMobile }}</van-cell>
|
||||
<van-cell title="预约备注">{{ viewData.appointmentUserNote }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
咨询师信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.doctorUnitName || '暂无'}}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.doctorJobTitle || '暂无'}}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.doctorMobile || '暂无'}}</van-cell>
|
||||
<van-cell title="个人简介">{{ viewData.doctorIntroduce || '暂无'}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
stateList: [
|
||||
{text: '全部预约状态', value: null},
|
||||
{text: '预约中', value: 2100},
|
||||
{text: '预约成功', value: 2300},
|
||||
{text: '预约失败', value: 2200}
|
||||
],
|
||||
show: false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/legalAid/MyPageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
viewInfo(o) {
|
||||
this.viewData = o
|
||||
this.show = true
|
||||
},
|
||||
async doCancel(id) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定取消此次预约吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/legalAid/doCancel', {id})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('取消成功')
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = this.yearList[0].value
|
||||
this.pageForm.stateId = null
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,74 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-loading {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-moz-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
-o-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-loading v-if="loading" type="spinner" color="#1989fa"></van-loading>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
classifyLists: [],
|
||||
classify: '',
|
||||
token: '',
|
||||
deviceType: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.login()
|
||||
},
|
||||
methods: {
|
||||
login() {
|
||||
this.loading = true
|
||||
tellGetToken_app((v, u) => {
|
||||
this.getTokenCall(v, u)
|
||||
})
|
||||
},
|
||||
getTokenCall(v, u) {
|
||||
this.classify = this.classifyLists[0]
|
||||
this.token = v
|
||||
this.deviceType = u
|
||||
document.title = '智慧工会平台'
|
||||
let obj = {back: true, close: true, rootView: true, title: true}
|
||||
|
||||
// window.location.href = '/mobile/app/index?token='+this.token
|
||||
$.get("/mobile/app/index", {token: this.token}).then((res) => {
|
||||
this.loading = false
|
||||
// alert(JSON.stringify(res))
|
||||
if (res.code === 0) {
|
||||
window.location.href = '/mobile/index/doLogin?username=' + res.data + '&password=dd3s@#2022&platformCaptcha='
|
||||
} else if (res.code === 1 || res.code==2) {
|
||||
Dialog.alert({
|
||||
title: '标题',
|
||||
message: res.msg,
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,312 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar title="会员申请" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<van-form ref="form" @submit="doSubmit" validate-trigger="onSubmit"
|
||||
class="mt5"
|
||||
scroll-to-error
|
||||
input-align="right"
|
||||
:show-error-message="false">
|
||||
<van-cell-group inset>
|
||||
<van-field label="姓名" value="${@shiro.getPrincipalProperty('username')}"
|
||||
left-icon="contact"
|
||||
readonly></van-field>
|
||||
<van-field label="性别" v-model="formData.sex" readonly
|
||||
@click="sexPicker = true"
|
||||
placeholder="请选择性别"
|
||||
clickable
|
||||
left-icon="ellipsis"></van-field>
|
||||
<van-popup v-model="sexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男','女']"
|
||||
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
|
||||
@cancel="sexPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="民族" v-model="formData.nation" readonly clickable
|
||||
left-icon="bar-chart-o"
|
||||
@click="nationPicker = true" placeholder="请选择民族"
|
||||
:rules="[{ required:true, message: '请选择民族' }]"></van-field>
|
||||
<van-popup v-model="nationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="nationColumns"
|
||||
@confirm="(v)=>{formData.nation = v;nationPicker = false}"
|
||||
@cancel="nationPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="学历" v-model="formData.education" readonly clickable
|
||||
left-icon="coupon-o"
|
||||
@click="educationPicker = true" placeholder="请选择学历"
|
||||
:rules="[{ required:true, message: '请选择学历' }]"></van-field>
|
||||
<van-popup v-model="educationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="educationColumns"
|
||||
@confirm="(v)=>{formData.education = v;educationPicker = false}"
|
||||
@cancel="educationPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="学位" v-model="formData.academicDegree" readonly clickable
|
||||
left-icon="comment-o"
|
||||
@click="academicDegreePicker = true" placeholder="请选择学位"
|
||||
:rules="[{ required:true, message: '请选择学位' }]"></van-field>
|
||||
<van-popup v-model="academicDegreePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="academicDegreeColumns"
|
||||
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
|
||||
@cancel="academicDegreePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="政治面貌" v-model="formData.political" placeholder="请填写政治面貌"
|
||||
left-icon="label-o"
|
||||
:rules="[{ required:true, message: '请填写政治面貌' }]"></van-field>
|
||||
<van-field label="身份证" v-model="formData.idcard" placeholder="请填写身份证号码"
|
||||
left-icon="idcard"
|
||||
:rules="[{ required:true, message: '请填写身份证号码' }]"></van-field>
|
||||
<van-field label="联系电话" v-model="formData.mobile" type="tel" placeholder="请填写联系电话"
|
||||
left-icon="phone-o"
|
||||
:rules="[{ required:true, message: '请填写联系电话' }]"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="户口所在地" v-model="formData.registeredResidence" placeholder="请填写户口所在地"
|
||||
left-icon="wap-home-o"
|
||||
:rules="[{ required:true, message: '请填写户口所在地' }]"></van-field>
|
||||
<van-field label="现居住地" v-model="formData.homeAddress" placeholder="请填写现居住地"
|
||||
left-icon="home-o"
|
||||
:rules="[{ required:true, message: '请填写现居住地' }]"></van-field>
|
||||
<van-field label="工作单位" value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
left-icon="cluster-o"
|
||||
readonly></van-field>
|
||||
<van-field label="职务" v-model="formData.position" placeholder="请填写职务"
|
||||
left-icon="debit-pay"
|
||||
:rules="[{ required:true, message: '请填写职务' }]"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button v-if="family && family.length>0 && family.length<3" style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="family && family.length>0">
|
||||
<div v-for="o,i in family" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
icon="minus" type="danger" round size="mini"
|
||||
@click="family.splice(i,1)"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-field label="关系" v-model="o.relation" placeholder="请填写与本人关系"
|
||||
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
|
||||
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
|
||||
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
|
||||
<van-field label="联系方式" v-model="o.mobile" type="tel" placeholder="请填写联系方式"
|
||||
:rules="[{ required:true, message: '请填写联系方式' }]"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button style="width: 50px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-notes-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>个人工作简历</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
v-model="formData.vita"
|
||||
:rules="[{ required:true, message: '请填写个人工作简历' }]"
|
||||
style="padding: 0"
|
||||
input-align="left"
|
||||
autosize
|
||||
rows="4"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
placeholder="请输入个人工作简历"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-award-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>特长</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
v-model="formData.specialSkill"
|
||||
:rules="[{ required:true, message: '请填写个人特长' }]"
|
||||
style="padding: 0"
|
||||
input-align="left"
|
||||
autosize
|
||||
rows="4"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
placeholder="请填写个人特长"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button native-type="submit" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const political = []
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sexPicker: false,
|
||||
applyRecords: [],
|
||||
formData: {},
|
||||
nationPicker: false,
|
||||
educationPicker: false,
|
||||
academicDegreePicker: false,
|
||||
family: [],
|
||||
educationColumns: [
|
||||
'博士研究生', '硕士研究生', '本科', '专科', '中专中技', '高中', '初中以下'
|
||||
],
|
||||
academicDegreeColumns: [
|
||||
'学士', '硕士', '博士'
|
||||
],
|
||||
nationColumns: [],
|
||||
memberStatusColumn: {
|
||||
MEMBER: 1,
|
||||
APPLYING: 2,
|
||||
NOTMEBMER: 3,
|
||||
},
|
||||
memberStatus: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const formData = clone(this.formData)
|
||||
formData.family = JSON.stringify(this.family)
|
||||
const resp = await $.post("/platform/member/apply/submit/doEdit", formData)
|
||||
const data = await $.get("/platform/member/apply/submit/doApply", {memberStates: 1})
|
||||
setTimeout(() => {
|
||||
this.$toast.success('提交成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/index')
|
||||
}, 300)
|
||||
}, 500)
|
||||
},
|
||||
addFamily() {
|
||||
this.family.push({})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.formData, "isMember", "${@shiro.getPrincipalProperty('member')}")
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, "position", "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, "nation", "${@shiro.getPrincipalProperty('nation')}")
|
||||
this.$set(this.formData, "mobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, "political", "${@shiro.getPrincipalProperty('political')}")
|
||||
this.$set(this.formData, "id", "${@shiro.getPrincipalProperty('id')}")
|
||||
this.$set(this.formData, "education", "${@shiro.getPrincipalProperty('education')}")
|
||||
this.$set(this.formData, "academicDegree", "${@shiro.getPrincipalProperty('academicDegree')}")
|
||||
this.$set(this.formData, "idcard", "${@shiro.getPrincipalProperty('idcard')}")
|
||||
this.$set(this.formData, "registeredResidence", "${@shiro.getPrincipalProperty('registeredResidence')}")
|
||||
this.$set(this.formData, "homeAddress", "${@shiro.getPrincipalProperty('homeAddress')}")
|
||||
this.$set(this.formData, "vita", "${@shiro.getPrincipalProperty('vita')}")
|
||||
this.$set(this.formData, "specialSkill", "${@shiro.getPrincipalProperty('specialSkill')}")
|
||||
const {data} = await $.get("/mobile/member/getAllNation");
|
||||
/* this.nationColumns = data.map(v => {
|
||||
return v.mzmc
|
||||
}) */
|
||||
this.nationColumns = nation
|
||||
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
if (resp.data.member === 1) {
|
||||
this.memberStatus = this.memberStatusColumn.MEMBER
|
||||
} else {
|
||||
if (resp.data.record != null) {
|
||||
this.memberStatus = this.memberStatusColumn.APPLYING
|
||||
} else {
|
||||
this.memberStatus = this.memberStatusColumn.NOTMEBMER
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,65 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="会员申请" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="padding: 16px 10px;">
|
||||
<div v-for="o in applyRecords" class="list-card" @click="view(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<van-icon name="records" :color="themeColor" size="25"></van-icon>
|
||||
<span :style="{color:themeColor}" style="font-size: 16px">会员申请</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申 请 人">{{o.username}}</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty v-if="mLoading==false&&applyRecords.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
applyRecords: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async view(o) {
|
||||
const {id, userId} = o
|
||||
window.location.href = '/mobile/member/detail?record_id=' + id + '&user_id=' + userId
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,125 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="会员审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="申 请 人:">{{o.username}}({{o.loginname}})</van-cell>
|
||||
<van-cell :border="false" title="申请时间:">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会:">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="人员类型:">{{o.personType}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
mLoading: false,
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
handle: true,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
$.post(loc() + '/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/* pageData() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
},*/
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/member/audit/findOne?stateId=' + o.stateId + '&record_id=' + o.id + '&user_id=' + o.userId
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,208 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.chart-card {
|
||||
background-color: #FFFFFF;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.flex-box {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-row gutter="20" style="margin: 0 10px 10px 10px;padding-top: 20px;">
|
||||
<van-col span="8">
|
||||
<div class="flex-box" style="justify-content: space-between;padding: 15px">
|
||||
<svg t="1634176912094" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="712" width="32" height="32">
|
||||
<path d="M327.6 682.7c-31.8-31.5-49.7-74.4-49.7-119.3V385.3c0-33.5 9.8-64.7 26.8-91-7.8-1.9-15.7-2.9-23.7-2.9H154.3c-56.6 0-102.9 46.9-102.9 104v163.7c0 38.8 21.5 74.4 55.7 92.3v319.9h83l30.6-202.5 30.6 202.5h76.4V682.7z m304.1-18.5c36.3-18.8 61.2-57.1 61.2-100.8V385.3c0-62.2-50.4-113.2-112-113.2h-138c-61.6 0-112 50.9-112 113.2v178.1c0 43.6 24.7 81.6 60.6 100.5V1012H482l33.3-220.3 33.3 220.3h83.1V664.2zM515.1 12c65.2 0 118 53.4 118 119.3 0 65.8-52.8 119.3-118 119.3s-118-53.4-118-119.3c0-66.1 52.8-119.3 118-119.3z m182.2 670.7v288.8h76.4L804.3 769l30.6 202.5H918V651.7c33-17.4 55.6-52.3 55.6-92.3V395.6c0-57.2-46.4-104-103-104H744.1c-8.2 0-16.2 1-23.7 2.9 17.6 27.1 26.9 58.7 26.8 91v178.1c0 45.4-18.5 88.2-49.9 119.1zM804.6 52.4c-60 0-108.5 49-108.5 109.5s48.5 109.6 108.5 109.6c59.8 0 108.3-49 108.3-109.6 0-60.6-48.5-109.5-108.3-109.5z m-584.1 0c59.8 0 108.5 49 108.5 109.5s-48.5 109.6-108.5 109.6c-59.9 0-108.3-49-108.3-109.6-0.1-60.6 48.4-109.5 108.3-109.5z"
|
||||
fill="#e0620d" p-id="713"></path>
|
||||
</svg>
|
||||
<div class="text-center" style="font-size: 11px">
|
||||
总会员
|
||||
<span>
|
||||
{{memberNumberMap.totalCount}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div class="flex-box" style="justify-content: space-between;padding: 15px">
|
||||
<svg t="1634178080836" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8757" width="32" height="32">
|
||||
<path d="M579.2 646.5H445.1c-14.4 0-26.2-11.8-26.2-26.2V436.7c0-14.4 11.8-26.2 26.2-26.2h134.1c14.4 0 26.2 11.8 26.2 26.2v183.6c0 14.4-11.8 26.2-26.2 26.2z"
|
||||
fill="#F7C9A4" p-id="8758"></path>
|
||||
<path d="M840.7 959.1V779c0-83.9-147.8-139.5-328.4-139.5-180.6 0-328.4 55.6-328.4 139.5v180.1h656.8z"
|
||||
fill="#E8E8DD" p-id="8759"></path>
|
||||
<path d="M381.5 420.5h-53.7c-26.5 0-48.1-21.7-48.1-48.1 0-26.5 21.7-48.1 48.1-48.1h53.7c26.5 0 48.1 21.7 48.1 48.1 0 26.4-21.7 48.1-48.1 48.1zM687 415.9h-53.7c-26.5 0-48.1-21.7-48.1-48.1 0-26.5 21.7-48.1 48.1-48.1H687c26.5 0 48.1 21.7 48.1 48.1 0.1 26.4-21.6 48.1-48.1 48.1z"
|
||||
fill="#F7C9A4" p-id="8760"></path>
|
||||
<path d="M800.7 959.1V779c0-83.9-81.2-139.5-288.4-139.5-202.6 0-288.4 55.6-288.4 139.5v180.1h576.8z"
|
||||
fill="#F2F2F1" p-id="8761"></path>
|
||||
<path d="M512.1 549.1c-95.4 0-173.5-55.2-173.5-156.2V258.7c0-101 78.1-183.7 173.5-183.7s173.5 82.7 173.5 183.8v134.1c0 101-78.1 156.2-173.5 156.2z"
|
||||
fill="#FFD9B6" p-id="8762"></path>
|
||||
<path d="M409 353.3a19.2 23.8 0 1 0 38.4 0 19.2 23.8 0 1 0-38.4 0Z" fill="#694B4B"
|
||||
p-id="8763"></path>
|
||||
<path d="M576 353.3a19.2 23.8 0 1 0 38.4 0 19.2 23.8 0 1 0-38.4 0Z" fill="#694B4B"
|
||||
p-id="8764"></path>
|
||||
<path d="M339.6 959.1v-112c0-7.7-6.3-14-14-14s-14 6.3-14 14V959h28zM711.3 959.1v-112c0-7.7-6.3-14-14-14s-14 6.3-14 14V959h28z"
|
||||
fill="#E5E5DB" p-id="8765"></path>
|
||||
<path d="M577.8 649.5H447.3c-8.6 12.2-8.6 32.2 0 44.5l49.5 70.2c8.6 12.2 22.8 12.2 31.4 0l49.5-70.2c8.7-12.3 8.7-32.3 0.1-44.5z"
|
||||
fill="#0AC2FD" p-id="8766"></path>
|
||||
<path d="M700.4 82.6h-243c-28.9 0-54 19.7-65.8 48.1-37.5 3.3-63.4 40-63.4 84.2l11.4 119.4H397c2.6 0 4.8-2.2 4.8-4.9v-65.1c0-3.1 2.2-5.7 4.9-5.7l212 20.8c2.7 0 4.9 2.6 4.9 5.7v40.5c0 3.7 2.9 6.7 6.5 6.7l45.4 2h7.1c19.4 0 36.3-230.3 36.3-230.3 1.3-12.5-8.3-21.4-18.5-21.4z"
|
||||
fill="#F7CCA5" p-id="8767"></path>
|
||||
<path d="M712.1 62.6h-254c-29.3 0-54.7 19.3-66.6 47.2-38 3.3-68.1 39.1-68.1 82.4l14 117.3H379c2.7 0 4.8-2.2 4.8-4.8v-63.8c0-3.1 2.2-5.6 5-5.6l246.8 22.3c2.7 0 5 2.5 5 5.6V303c0 3.6 2.9 6.5 6.6 6.5h46.1c12.3 0 37.6-225.9 37.6-225.9 1.1-12.3-8.5-21-18.8-21z"
|
||||
fill="#694B4B" p-id="8768"></path>
|
||||
<path d="M511.3 648.5l-36.5 79.4c-6.5 10.3-13.6 21.2-24.1 11.7l-103.4-75.7c-7.9-7.9-15.9-13.9-12.8-23.6l32.3-54.2c3.1-9.7 14-15 24.1-11.7L498.5 625c10.2 3.2 15.9 13.8 12.8 23.5z"
|
||||
fill="#E8E8DD" p-id="8769"></path>
|
||||
<path d="M513.2 647.9l35.9 79.6c6.4 10.4 13.4 21.3 24.1 11.9l103.9-75c7.9-7.8 16-13.8 12.9-23.5l-21-51.4c-3.1-9.7-13.9-15.1-24.1-11.9L526 624.3c-10 3.3-15.9 13.9-12.8 23.6z"
|
||||
fill="#E8E8DD" p-id="8770"></path>
|
||||
<path d="M549.3 959.7h-73.9c-7.7 0-14-3-14-6.7l30-206c0-3.7 6.3-6.7 14-6.7h13.9c7.7 0 14 3 14 6.7l30 206c0 3.7-6.3 6.7-14 6.7z"
|
||||
fill="#0AC2FD" p-id="8771"></path>
|
||||
<path d="M528.3 762.3h-33c-3 0-5.5-2.5-5.5-5.5s2.5-5.5 5.5-5.5h33c3 0 5.5 2.5 5.5 5.5s-2.5 5.5-5.5 5.5z"
|
||||
fill="#079FDB" p-id="8772"></path>
|
||||
</svg>
|
||||
<div class="text-center" style="font-size: 11px">
|
||||
男性会员
|
||||
<span>
|
||||
{{memberNumberMap.maleCount}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div class="flex-box" style="justify-content: space-between;padding: 15px">
|
||||
<svg t="1634178064546" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8382" width="32" height="32">
|
||||
<path d="M668.501333 761.685333h-2.048a97.621333 97.621333 0 0 1-97.621333-97.621333v-43.52h-109.397333v43.52a97.621333 97.621333 0 0 1-97.621334 97.621333h-6.314666a136.533333 136.533333 0 0 0-136.533334 136.533334v29.013333h586.069334v-29.013333a136.533333 136.533333 0 0 0-136.533334-136.533334z"
|
||||
fill="#FFE3BA" p-id="8383"></path>
|
||||
<path d="M427.690667 735.914667a180.224 180.224 0 0 0 170.666666-1.365334 96.938667 96.938667 0 0 1-30.208-70.485333v-43.52h-108.714666v43.52a96.938667 96.938667 0 0 1-31.744 71.850667zM805.034667 870.4a232.106667 232.106667 0 0 1-93.525334 19.626667H312.490667A232.106667 232.106667 0 0 1 218.965333 870.4v56.149333h586.069334V870.4z"
|
||||
fill="#FFC670" p-id="8384"></path>
|
||||
<path d="M512 108.032a254.805333 254.805333 0 0 1 254.805333 254.976v265.898667a38.229333 38.229333 0 0 1-38.229333 38.229333H295.424a38.229333 38.229333 0 0 1-38.229333-38.229333V363.008A254.805333 254.805333 0 0 1 512 108.032z"
|
||||
fill="#FFC670" p-id="8385"></path>
|
||||
<path d="M512 552.106667a529.066667 529.066667 0 0 1-254.805333-63.488v140.288a38.229333 38.229333 0 0 0 38.229333 38.229333h433.152a38.229333 38.229333 0 0 0 38.229333-38.229333v-140.288A529.066667 529.066667 0 0 1 512 552.106667z"
|
||||
fill="#FFB038" p-id="8386"></path>
|
||||
<path d="M694.101333 304.64v221.866667A182.101333 182.101333 0 0 1 512 708.608a182.101333 182.101333 0 0 1-182.101333-182.101333v-149.674667a131.072 131.072 0 0 0 184.32-119.466667 131.242667 131.242667 0 0 0 113.834666 65.877334 129.706667 129.706667 0 0 0 66.048-17.92z"
|
||||
fill="#FFF6E6" p-id="8387"></path>
|
||||
<path d="M638.122667 321.706667v204.8a182.101333 182.101333 0 0 1-153.6 179.712 189.610667 189.610667 0 0 0 27.989333 2.389333 182.101333 182.101333 0 0 0 181.589333-182.101333v-221.866667a130.389333 130.389333 0 0 1-55.978666 17.066667z"
|
||||
fill="#FFE3BA" p-id="8388"></path>
|
||||
<path d="M666.453333 750.933333H648.533333c0 73.557333-59.562667 116.053333-133.12 116.053334h-7.850666c-73.557333 0-133.12-42.496-133.12-116.053334H358.4a136.533333 136.533333 0 0 0-58.538667 13.141334v163.328h426.666667v-163.498667a136.533333 136.533333 0 0 0-60.074667-12.970667z"
|
||||
fill="#F6716F" p-id="8389"></path>
|
||||
<path d="M724.992 870.4A232.106667 232.106667 0 0 1 631.466667 890.709333H392.533333A232.106667 232.106667 0 0 1 299.008 870.4v56.149333h426.666667V870.4z"
|
||||
fill="#F0504D" p-id="8390"></path>
|
||||
<path d="M593.92 107.52a36.864 36.864 0 0 0 5.973333 57.002667l69.12 45.397333 27.306667-27.306667-45.397333-69.290666a37.034667 37.034667 0 0 0-57.002667-5.802667zM770.901333 285.354667a36.864 36.864 0 0 0-5.802666-57.002667l-68.266667-45.397333-27.306667 27.306666 45.397334 69.12a36.693333 36.693333 0 0 0 55.978666 5.973334z"
|
||||
fill="#F6716F" p-id="8391"></path>
|
||||
<path d="M631.466667 201.250133l55.381333-55.3984 46.08 46.097067-55.381333 55.3984z" fill="#FCFEFF"
|
||||
p-id="8392"></path>
|
||||
<path d="M877.397333 910.165333h-55.296v-11.946666a153.6 153.6 0 0 0-80.042666-134.485334 17.066667 17.066667 0 0 0-9.898667-15.36 153.6 153.6 0 0 0-65.706667-14.506666H648.533333a17.066667 17.066667 0 0 0-12.117333 5.12A81.92 81.92 0 0 1 597.333333 705.877333a212.992 212.992 0 0 0 35.328-21.674666h95.402667a55.466667 55.466667 0 0 0 55.296-55.296V363.008a277.504 277.504 0 0 0-6.826667-60.757333c2.048-1.536 4.096-3.072 5.973334-4.778667a54.101333 54.101333 0 0 0-8.533334-83.456l-25.429333-17.066667a17.066667 17.066667 0 0 0-4.096-17.066666L699.733333 133.802667a17.066667 17.066667 0 0 0-17.066666-4.096l-17.066667-25.6a53.930667 53.930667 0 0 0-83.285333-8.704 38.058667 38.058667 0 0 0-3.242667 4.096 271.189333 271.189333 0 0 0-338.944 263.509333v265.898667a55.466667 55.466667 0 0 0 55.296 55.296h95.402667a199.509333 199.509333 0 0 0 38.570666 23.210666 80.042667 80.042667 0 0 1-41.472 32.597334A17.066667 17.066667 0 0 0 375.466667 733.866667h-17.066667a153.6 153.6 0 0 0-65.706667 14.677333 17.066667 17.066667 0 0 0-9.898666 15.530667v2.218666a145.408 145.408 0 0 0-80.042667 129.365334v14.677333H146.602667a17.066667 17.066667 0 0 0 0 34.133333h730.794666a17.066667 17.066667 0 0 0 0-34.133333z m-595.456 0h-47.786666v-14.677333a112.64 112.64 0 0 1 47.786666-91.818667z m473.770667-667.477333a18.944 18.944 0 0 1 8.874667 14.506667 20.48 20.48 0 0 1-21.674667 21.845333 20.309333 20.309333 0 0 1-14.677333-8.874667l-19.456-29.696 17.066666-17.066666z m-68.266667-72.533333l22.016 22.016-31.914666 31.232-22.016-22.016z m-64.682666-56.32a20.650667 20.650667 0 0 1 14.677333 8.874666l19.456 29.696-17.066667 17.066667L609.28 150.186667a18.944 18.944 0 0 1-8.874667-13.653334 20.309333 20.309333 0 0 1 21.674667-22.698666zM295.424 650.069333a21.162667 21.162667 0 0 1-21.162667-21.162666V363.008A238.933333 238.933333 0 0 1 512 125.098667a242.346667 242.346667 0 0 1 54.442667 6.485333 55.125333 55.125333 0 0 0 0 7.509333 53.418667 53.418667 0 0 0 24.064 39.594667l25.088 17.066667a17.066667 17.066667 0 0 0 3.754666 18.090666L665.6 259.584a17.066667 17.066667 0 0 0 17.066667 3.925333l17.066666 25.258667a53.248 53.248 0 0 0 39.594667 24.064 25.6 25.6 0 0 0 5.12 0 233.984 233.984 0 0 1 5.290667 50.176v265.898667a21.162667 21.162667 0 0 1-21.162667 21.162666h-60.586667a198.656 198.656 0 0 0 43.178667-123.562666V313.002667a17.066667 17.066667 0 0 0-8.704-14.677334 17.066667 17.066667 0 0 0-17.066667 0A114.005333 114.005333 0 0 1 529.066667 256a17.066667 17.066667 0 0 0-31.914667 8.874667 114.176 114.176 0 0 1-160.256 104.448 17.066667 17.066667 0 0 0-24.064 15.530666v141.141334a198.656 198.656 0 0 0 43.178667 123.562666z m51.2-123.562666V409.6a150.698667 150.698667 0 0 0 36.010667 4.437333A148.138667 148.138667 0 0 0 525.312 307.2a148.821333 148.821333 0 0 0 102.4 41.301333 144.896 144.896 0 0 0 48.981333-8.362666v187.733333a165.034667 165.034667 0 0 1-330.069333 0z m115.2 192.682666a199.338667 199.338667 0 0 0 49.834667 6.485334 191.829333 191.829333 0 0 0 53.589333-7.68 115.712 115.712 0 0 0 64.170667 54.613333c-11.093333 53.077333-62.634667 77.141333-113.834667 77.141333h-7.850667c-51.2 0-102.4-23.722667-113.493333-75.946666a115.029333 115.029333 0 0 0 67.925333-54.613334z m245.76 190.976h-392.533333v-134.826666A119.466667 119.466667 0 0 1 358.4 768c8.362667 68.266667 67.242667 116.053333 149.162667 116.053333h7.850666C597.333333 883.882667 656.725333 836.266667 665.6 768h1.365333a119.466667 119.466667 0 0 1 41.472 7.509333z m80.042667 0h-45.568v-105.813333a119.466667 119.466667 0 0 1 45.909333 93.866667z"
|
||||
fill="#3D3D63" p-id="8393"></path>
|
||||
<path d="M587.776 586.581333a17.066667 17.066667 0 0 0-31.402667-13.824 48.298667 48.298667 0 0 1-88.746666 0 17.066667 17.066667 0 0 0-31.402667 13.824 82.773333 82.773333 0 0 0 151.552 0zM453.290667 454.826667v-19.797334a17.066667 17.066667 0 0 0-34.133334 0v19.797334a17.066667 17.066667 0 0 0 34.133334 0zM587.776 471.893333a17.066667 17.066667 0 0 0 17.066667-17.066666v-19.797334a17.066667 17.066667 0 1 0-34.133334 0v19.797334a17.066667 17.066667 0 0 0 17.066667 17.066666z"
|
||||
fill="#3D3D63" p-id="8394"></path>
|
||||
</svg>
|
||||
<div class="text-center" style="font-size: 11px">
|
||||
女性会员
|
||||
<span>
|
||||
{{memberNumberMap.femaleCount}}
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
|
||||
人员类型
|
||||
</div>
|
||||
<canvas id="personType" style="width: 100%" height="350"></canvas>
|
||||
</div>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
|
||||
增长趋势
|
||||
</div>
|
||||
<canvas id="memberTrend" style="width: 100%" height="350"></canvas>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<script src="https://gw.alipayobjects.com/os/lib/antv/f2/3.7.0/dist/f2.min.js"></script>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
memberNumberMap: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getMemberNumber() {
|
||||
const {data} = await $.get('/mobile/member/dashBoard/memberNumber')
|
||||
this.memberNumberMap = data
|
||||
},
|
||||
async growthTrend() {
|
||||
const {data} = await $.get('/mobile/member/dashBoard/growthTrend')
|
||||
const chart = new F2.Chart({
|
||||
id: 'memberTrend',
|
||||
pixelRatio: window.devicePixelRatio
|
||||
})
|
||||
chart.source(data)
|
||||
chart.scale({
|
||||
label: {
|
||||
range: [ 0, 1 ]
|
||||
},
|
||||
value: {
|
||||
tickCount: 5,
|
||||
min: 0
|
||||
}
|
||||
})
|
||||
// chart.axis('label', {
|
||||
// label: {
|
||||
// rotate: -1,
|
||||
// textAlign: 'end',
|
||||
// textBaseline: 'middle'
|
||||
// }
|
||||
// })
|
||||
chart.area().position('label*value').color('l(90) 0:#1890FF 1:#f7f7f7').shape('smooth')
|
||||
chart.line().position('label*value').color('l(90) 0:#1890FF 1:#f7f7f7').shape('smooth')
|
||||
chart.render()
|
||||
|
||||
|
||||
|
||||
},
|
||||
async getPersonTypeMember() {
|
||||
const {data} = await $.get('/platform/member/inquire/board/personTypeMember')
|
||||
const chart = new F2.Chart({
|
||||
id: 'personType',
|
||||
pixelRatio: window.devicePixelRatio
|
||||
})
|
||||
chart.source(data)
|
||||
chart.interval().position('label*value').color('label')
|
||||
chart.axis('label', {
|
||||
label: {
|
||||
rotate: -1,
|
||||
textAlign: 'end',
|
||||
textBaseline: 'middle'
|
||||
}
|
||||
})
|
||||
chart.render();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPersonTypeMember()
|
||||
this.getMemberNumber()
|
||||
this.growthTrend()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,49 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<!-- <van-nav-bar title="详细信息" left-arrow left-text="返回" placeholder fixed @click-left="location.href = document.referrer"></van-nav-bar>-->
|
||||
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<mobile-member-info ref="minfo"></mobile-member-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unionAudit: {},
|
||||
schoolAudit: {},
|
||||
personTypes: ["事业编制", "事业编制人事代理", "非事业编制人事代理", "校聘人才派遣", "人才/劳务派遣(天目湖校区)", "溧阳事业编制(天目湖校区)"],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-member-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const personType = "${@shiro.getPrincipalProperty('personType')}"
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getUserInfo(user_id ? user_id : userId)
|
||||
this.$refs.minfo.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
this.mLoading = false
|
||||
/* if (personType === "" || !this.personTypes.includes(personType)) {
|
||||
console.log(11)
|
||||
this.$toast.fail('您不具备申请会员的条件,具体事宜请咨询校工会');
|
||||
}*/
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,113 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="会员审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<member-menber-info ref="info" :id="id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<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.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.auditPass = pass
|
||||
const resp = await $.post("/platform/member/apply/audit/doAudit", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
setTimeout(() => {
|
||||
this.$refs.info.getUserInfo(user_id)
|
||||
this.$refs.info.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
this.formData = {
|
||||
recordId: record_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,115 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar fixed left-arrow placeholder title="会员审核"
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<member-menber-info ref="info" :id="id" title="院级工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
院级工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field
|
||||
label="审核人员"
|
||||
name="username"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field required
|
||||
v-model="formData.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.auditPass = pass
|
||||
const resp = await $.post("/platform/member/apply/audit/doAudit", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
setTimeout(() => {
|
||||
this.$refs.info.getUserInfo(user_id)
|
||||
this.$refs.info.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
|
||||
this.formData = {
|
||||
recordId: record_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,140 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
#app {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.icon_text {
|
||||
font-size: 16px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-image {
|
||||
max-height: 300px !important;
|
||||
}
|
||||
|
||||
.not_open {
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.item_div {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
padding: 10px 0px;
|
||||
color: white;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<!--轮播图-->
|
||||
<van-swipe :autoplay="3000" class="my-swipe" indicator-color="white">
|
||||
<van-swipe-item v-for="item in photoArray">
|
||||
<van-image width="100%" height="200px" :src="item.src"></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<!--宫格-->
|
||||
<van-grid :border="false" :column-num="2">
|
||||
<van-grid-item :class="item.isOpen ? '' : 'not_open'"
|
||||
:url="item.isOpen ? '/mobile/index/toHome?type=' + item.text : ''" v-for="item in gridArray">
|
||||
<div class="item_div" :style="'background-color: ' + item.backGroundColor ">
|
||||
<div>
|
||||
<van-image :src="item.src" height="32" width="40"></van-image>
|
||||
</div>
|
||||
<span class="icon_text">{{item.text}}</span>
|
||||
</div>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item>
|
||||
<div class="item_div" style="background-color: rgb(155,130,239)">
|
||||
<div>
|
||||
<van-image height="32" width="40" src="/assets/platform/img/quickentry/jcbd.png" @click="loginOut"></van-image>
|
||||
</div>
|
||||
<span class="icon_text">解除绑定</span>
|
||||
</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<!--<div>
|
||||
<van-button color="#1867b0">退出登录</van-button>
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
photoArray: [
|
||||
{src: '/assets/mobile/img/home/home1.png'},
|
||||
{src: '/assets/mobile/img/home/home3.png'},
|
||||
],
|
||||
gridArray: [
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/member.png',
|
||||
text: '会员管理',
|
||||
isOpen: true,
|
||||
backGroundColor: '#58ae62'
|
||||
},
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/proposal.png',
|
||||
text: '提案管理',
|
||||
isOpen: true,
|
||||
backGroundColor: '#a762c3'
|
||||
},
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/activity.png',
|
||||
text: '活动管理',
|
||||
isOpen: true,
|
||||
backGroundColor: '#4778cf'
|
||||
},
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/welfare.png',
|
||||
text: '福利慰问',
|
||||
isOpen: true,
|
||||
backGroundColor: '#c88f5c'
|
||||
},
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/db.png',
|
||||
text: '大病互助',
|
||||
isOpen: true,
|
||||
backGroundColor: '#dd5858'
|
||||
},
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/jy.png',
|
||||
text: '建言献策',
|
||||
isOpen: true,
|
||||
backGroundColor: '#2fbabf'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async loginOut() {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消绑定吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
window.location.href = "/mobile/login/clearWxOpenId"
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
@@ -0,0 +1,473 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
margin: 0 10px;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.icon_text {
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.v-header {
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
#v-back {
|
||||
background: url("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d1ed570f33cd32f875a8390b850f.jpg%401280w_1l_2o_100sh.png&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638425547&t=55618f9dea9872dc3c0c1ece65ea96d5") no-repeat;
|
||||
background-size: cover;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
#v-back2 {
|
||||
background: url("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d1ed570f33cd32f875a8390b850f.jpg%401280w_1l_2o_100sh.png&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638425547&t=55618f9dea9872dc3c0c1ece65ea96d5") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.user_info {
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.user_avatar {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
transform: translate(0, -50%);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.disabled-row img {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
.disabled-row .van-grid-item {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.oneDisabled {
|
||||
filter: grayscale(1);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="user_info">
|
||||
<van-row style="height: 200px">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="200px"
|
||||
src="/back2.png"
|
||||
></van-image>
|
||||
</van-row>
|
||||
|
||||
<van-row class="user_avatar" style="height: 80px">
|
||||
<van-col span="6" class="text-center">
|
||||
<van-image
|
||||
round
|
||||
width="70"
|
||||
height="70"
|
||||
:src="avatar"
|
||||
></van-image>
|
||||
</van-col>
|
||||
<van-col span="18">
|
||||
<div style="height: 40px;line-height: 40px">
|
||||
<span style="font-size: 22px; color: white">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</span>
|
||||
<span style="color:rgb(80 87 100)">
|
||||
${@shiro.getPrincipalProperty('loginname')}
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-ellipsis" style="height: 40px;line-height: 40px;font-size: 14px;color: #969799">
|
||||
<!--#if(@shiro.getPrincipalProperty('union')!=null){#-->
|
||||
${@shiro.getPrincipalProperty('union').getUnionname()}
|
||||
<!--#}#-->
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
|
||||
<van-row
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdb01') || @shiro.hasRole('jdh12')}">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
民主管理
|
||||
</div>
|
||||
<van-grid
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdbt01')||@shiro.hasRole('jdhdb01') || @shiro.hasRole('jdh12')}"
|
||||
:border="false" :column-num="3">
|
||||
<van-grid-item v-if="${@shiro.hasRole('jdhdb01')}"
|
||||
url="/platform/mobile/proposal/compose">
|
||||
<image src="/assets/mobile/icon/proposal/myProposal.png"></image>
|
||||
<span class="icon_text">个人提案阅览</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="${@shiro.hasRole('jdhdb01')}"
|
||||
url="/platform/mobile/proposal/seconded">
|
||||
<image src="/assets/mobile/icon/proposal/fy.png"></image>
|
||||
<span class="icon_text">附议提案</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdbt01')}"
|
||||
url="/platform/mobile/proposal/delegation">
|
||||
<image style="width: 59px" src="/assets/mobile/icon/proposal/tz.png"></image>
|
||||
<span class="icon_text">团长审议</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}"
|
||||
url="/platform/mobile/proposal/integrated">
|
||||
<image src="/assets/mobile/icon/proposal/search.png"></image>
|
||||
<span class="icon_text">提案查询</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}"
|
||||
url="/mobile/proposal/delegate/index">
|
||||
<image src="/assets/mobile/icon/proposal/cx.png"></image>
|
||||
<span class="icon_text">代表查询</span>
|
||||
</van-grid-item>
|
||||
|
||||
<!-- <van-grid-item url="/mobile/proposal/analysis/index">-->
|
||||
<!-- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"-->
|
||||
<!-- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">-->
|
||||
<!-- <svg t="1598769687916" class="icon" viewBox="0 0 1024 1024" version="1.1"-->
|
||||
<!-- xmlns="http://www.w3.org/2000/svg" p-id="1332" width="32" height="32"-->
|
||||
<!-- xmlns:xlink="http://www.w3.org/1999/xlink">-->
|
||||
<!-- <defs>-->
|
||||
<!-- <style type="text/css"></style>-->
|
||||
<!-- </defs>-->
|
||||
<!-- <path d="M283.84768 275.52256h473.088c37.376 0 67.584 30.208 67.584 67.584v439.296c0 37.376-30.208 67.584-67.584 67.584h-473.088c-37.376 0-67.584-30.208-67.584-67.584v-439.296c0-37.376 30.208-67.584 67.584-67.584z"-->
|
||||
<!-- fill="#CAE4FF" p-id="1333"></path>-->
|
||||
<!-- <path d="M253.9008 716.1856c-15.872 0-28.672-12.8-28.672-28.16 0-7.68 3.072-14.848 8.192-20.48l175.616-175.616c11.264-11.264 29.184-11.264 40.448 0l103.424 103.424 125.44-125.44-49.664-49.664 152.064-25.088-10.752 166.912-51.2-51.2-143.36 142.848c-0.512 1.024-1.536 2.048-2.56 2.56-11.264 11.264-29.184 11.264-40.448 0l-103.424-103.424-155.648 155.648c-4.608 4.608-12.288 7.68-19.456 7.68z"-->
|
||||
<!-- fill="#0972E7" p-id="1334"></path>-->
|
||||
<!-- <path d="M163.7888 983.4496c-37.376 0-67.072-30.208-67.584-67.584V208.2816c0-37.376 30.208-67.072 67.584-67.584h95.744v-81.92c0-15.872 12.8-28.672 28.672-28.16 15.872 0 28.16 12.8 28.16 28.16v81.92h172.544v-81.92c0-15.872 12.8-28.672 28.16-28.672 15.872 0 28.672 12.8 28.672 28.16v81.92h173.056v-81.92c0-15.872 12.8-28.672 28.16-28.672 15.872 0 28.672 12.8 28.672 28.16v81.92h95.744c37.376 0 67.072 30.208 67.584 67.584v708.096c0 37.376-30.208 67.072-67.584 67.584l-707.584 0.512z m704-71.168V212.3776H167.8848v699.904h699.904z"-->
|
||||
<!-- fill="#0972E7" p-id="1335"></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- <span class="icon_text"> 提案分析</span>-->
|
||||
<!-- </van-grid-item>-->
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
品牌活动报名
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivity/trainList">
|
||||
<image src="/assets/mobile/icon/train/train.png"></image>
|
||||
<span class="icon_text">品牌活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivity/trainList?type=my">
|
||||
<image src="/assets/mobile/icon/train/my.png"></image>
|
||||
<span class="icon_text">我的报名</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</van-row>
|
||||
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
文体活动
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<!-- <van-grid-item url="/mobile/activity/Sports/list/activityList">
|
||||
<image src="/assets/mobile/svg/activity/bm.svg"></image>
|
||||
<span style="font-size: 12px;margin-top: 10px">体育活动报名</span>
|
||||
</van-grid-item>-->
|
||||
<van-grid-item url="/mobile/activity/unionActivity">
|
||||
<image src="/assets/mobile/icon/activity/bm.png"></image>
|
||||
<span class="icon_text">校活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item @click="toWxJsz">
|
||||
<image src="/assets/mobile/svg/activity/jsz.svg"></image>
|
||||
<span class="icon_text">健身走</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>
|
||||
|
||||
<!--<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
疗休养管理
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/index">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 疗休养</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/myRecuperation">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 我的疗休养</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/checkin/info">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 一路美景</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>-->
|
||||
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
场地预约
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/activity/site/info">
|
||||
<image src="/assets/mobile/icon/site/apply.png"></image>
|
||||
<span class="icon_text">场地预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/site/info/my">
|
||||
<image src="/assets/mobile/icon/site/my.png"></image>
|
||||
<span class="icon_text">我的预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/site/audit"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('gh10')||@shiro.hasRole('xghng')||@shiro.hasRole('siteManage')||@shiro.hasRole('A06')||@shiro.hasRole('H04')}">
|
||||
<image src="/assets/mobile/icon/site/audit.png"></image>
|
||||
<span class="icon_text">场地预约审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>
|
||||
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
职工服务
|
||||
</div>
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<template v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('H01')}">
|
||||
<van-grid-item url="/mobile/condolence/apply/for">
|
||||
<image src="/assets/mobile/icon/condolence/apply.png"></image>
|
||||
<span class="icon_text">慰问申请</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/condolence/apply">
|
||||
<image src="/assets/mobile/icon/condolence/list.png"></image>
|
||||
<span class="icon_text">慰问记录</span>
|
||||
</van-grid-item>
|
||||
</template>
|
||||
<van-grid-item
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')||@shiro.hasRole('xghkj')}"
|
||||
url="/mobile/condolence/audit">
|
||||
<image src="/assets/mobile/icon/condolence/audit.png"></image>
|
||||
<span class="icon_text">慰问审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/difficulty/apply/index">
|
||||
<image src="/assets/mobile/icon/difficulty/apply.png"></image>
|
||||
<span class="icon_text">困难补助申请</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/difficulty/apply/apply_list">
|
||||
<image src="/assets/mobile/icon/difficulty/list.png"></image>
|
||||
<span class="icon_text">困难补助记录</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')||@shiro.hasRole('wyh02')}"
|
||||
url="/mobile/difficulty/audit">
|
||||
<image src="/assets/mobile/icon/difficulty/audit.png"></image>
|
||||
<span class="icon_text">困难补助审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<!--<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/psychologyPro/entrance">
|
||||
<image src="/assets/mobile/svg/psychology/apply.svg"></image>
|
||||
<span class="icon_text">心理咨询预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/psychologyPro/myApplyList">
|
||||
<image src="/assets/mobile/svg/psychology/apply.svg"></image>
|
||||
<span class="icon_text">我的预约</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/legalAid/entrance">
|
||||
<image src="/assets/mobile/svg/psychology/apply.svg"></image>
|
||||
<span class="icon_text">法律援助预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/legalAid/myApplyList">
|
||||
<image src="/assets/mobile/svg/psychology/apply.svg"></image>
|
||||
<span class="icon_text">我的预约</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/wmhd/apply">
|
||||
<image src="/assets/mobile/svg/wmhd/apply.svg"></image>
|
||||
<span class="icon_text">教工作品征集</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/wmhd/list">
|
||||
<image src="/assets/mobile/svg/wmhd/apply.svg"></image>
|
||||
<span class="icon_text">我的教工作品</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/cahd/apply">
|
||||
<image src="/assets/mobile/svg/cahd/apply.svg"></image>
|
||||
<span class="icon_text">亲子作品征集</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/cahd/list">
|
||||
<image src="/assets/mobile/svg/cahd/apply.svg"></image>
|
||||
<span class="icon_text">我的亲子作品</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/question/list" class="oneDisabled">
|
||||
<image src="/assets/mobile/svg/question/list.svg"></image>
|
||||
<span class="icon_text">问卷调查</span>
|
||||
</van-grid-item>
|
||||
</van-grid>-->
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<!-- <van-grid-item url="/mobile/rxdj/apply">
|
||||
<image src="/assets/mobile/svg/rxdj/apply.svg"></image>
|
||||
<span class="icon_text">子女入学摸底调查</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/zgfw/mobile/rxdj/apply">
|
||||
<image src="/assets/mobile/svg/rxdj/apply.svg"></image>
|
||||
<span class="icon_text">我的登记</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/zgfw/mobile/rxdj/audit/auditList?lx=1"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')}">
|
||||
<image src="/assets/mobile/svg/rxdj/apply.svg"></image>
|
||||
<span class="icon_text">院级工会审核</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/zgfw/mobile/rxdj/audit/auditList?lx=2"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('wyh02')||@shiro.hasRole('wyh03')}">
|
||||
<image src="/assets/mobile/svg/rxdj/apply.svg"></image>
|
||||
<span class="icon_text">校工会审核</span>
|
||||
</van-grid-item>-->
|
||||
<van-grid-item url="/mobile/welfare/list/index">
|
||||
<image src="/assets/mobile/icon/contribution/fl.png"></image>
|
||||
<span class="icon_text">职工福利</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<!--class="disabled-row"-->
|
||||
|
||||
<van-row>
|
||||
<div v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('public')||@shiro.hasRole('H01')}"
|
||||
class="van-sidebar-item van-sidebar-item--select">
|
||||
会员管理
|
||||
</div>
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item v-if="${@shiro.hasRole('H01')}" url="/mobile/member/detail">
|
||||
<image src="/assets/mobile/icon/member/da.png"></image>
|
||||
<span class="icon_text"> 会员档案</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item v-if="${@shiro.lacksRole('H01')}" url="/mobile/member/apply">
|
||||
<image src="/assets/mobile/icon/member/apply.png"></image>
|
||||
<span class="icon_text"> 申请入会</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')}"
|
||||
url="/mobile/member/audit">
|
||||
<image src="/assets/mobile/icon/member/audit.png"></image>
|
||||
<span class="icon_text"> 会员审核</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/member/dashBoard/index">
|
||||
<image src="/assets/mobile/icon/member/dashboard.png"></image>
|
||||
<span class="icon_text"> 会员看板</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
|
||||
</van-row>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/cloudbase/1.1.0/cloud.js"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
sex: '${@shiro.getPrincipalProperty("sex")}',
|
||||
avatar: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loginOut() {
|
||||
window.location.href = "/mobile/login/out"
|
||||
},
|
||||
async toWxJsz() {
|
||||
const loginName = "${@shiro.getPrincipalProperty('loginname')}"
|
||||
const userName = "${@shiro.getPrincipalProperty('username')}"
|
||||
const query = 'loginName=' + encodeURIComponent(loginName) + '&userName=' + encodeURIComponent(userName)
|
||||
|
||||
let cloud = new window.cloud.Cloud({
|
||||
identityless: true, // true表示是未登录模式
|
||||
resourceAppid: 'wx9c693357de44cf59', // 小程序AppID
|
||||
resourceEnv: 'unionpal-0ge58oan8d6fa30e', // 云环境环境ID
|
||||
})
|
||||
await cloud.init(); // 云函数初始化
|
||||
/*const res = await cloud.callFunction({
|
||||
name: 'urlscheme', //提供UrlScheme服务的云函数名称
|
||||
data: {
|
||||
path: '/pages/login/login', // 想跳转的小程序路径
|
||||
query: query, // 地址栏query参数,可在微信 onLoad: function (options) {}生命周期里options接收这些参数
|
||||
} //向这个云函数中传入的自定义参数,注意:path地址前后/不能多加或者少加,query参数里不能有转义字符如果有需要解码
|
||||
});
|
||||
|
||||
console.log(res, '云函数返回数据');
|
||||
if (res && res.result.errCode == 0) {
|
||||
location.href = res.result.openlink; // 跳转
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}*/
|
||||
const res = await cloud.callFunction({
|
||||
name: 'urllink', //提供UrlScheme服务的云函数名称
|
||||
data: {
|
||||
path: '/pages/login/login', // 想跳转的小程序路径
|
||||
query: query, // 地址栏query参数,可在微信 onLoad: function (options) {}生命周期里options接收这些参数
|
||||
} //向这个云函数中传入的自定义参数,注意:path地址前后/不能多加或者少加,query参数里不能有转义字符如果有需要解码
|
||||
});
|
||||
/* alert(JSON.stringify(res))
|
||||
alert(res.result.urlLink)*/
|
||||
console.log(res, '云函数返回数据');
|
||||
if (res && res.result.errCode === 0) {
|
||||
location.href = res.result.urlLink
|
||||
// window.open(res.result.urlLink)
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.avatar = this.sex === '女' ? '/avatar_girl.svg' : '/avatar_boy.svg'
|
||||
// const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
// const userAvatar = "${@shiro.getPrincipalProperty('avatar')}"
|
||||
// console.log(userAvatar)
|
||||
// if (userAvatar) {
|
||||
// this.avatar = FILE_DOMAIN + "${@shiro.getPrincipalProperty('avatar')}"
|
||||
// } else {
|
||||
// this.avatar = this.sex === '女' ? '/avatar_girl.svg' : '/avatar_boy.svg'
|
||||
// }
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
|
||||
/>
|
||||
<van-number-keyboard safe-area-inset-bottom/>
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/vant/2.12.5/index.min.css"/>
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/main.css">
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/vant/2.12.5/vant.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/basic.js"></script>
|
||||
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jSignature/jSignature.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jSignature/flashcanvas.js"></script>
|
||||
<script src="${base!}/assets/platform/js/pinyin.js"></script>
|
||||
<script src="${base!}/assets/platform/js/viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/js/jquery-viewer.min.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/v.js"></script>
|
||||
<script src="${base!}/assets/platform/module/proposal/api.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mobileMixins.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mProposal.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mCondolence.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mCommon.js"></script>
|
||||
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<!-- <script src="${base!}/assets/platform/module/basics/basics.js"></script>-->
|
||||
<script src="${base!}/assets/platform/module/condolence/common.js"></script>
|
||||
<script src="${base!}/assets/platform/module/difficulty/common.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<script src="${base!}/assets/platform/js/scannerQrCodeJs.js"></script>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="https://webapi.amap.com/maps?v=2.0&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.Geolocation"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
const APP_DOMAIN = "${AppDomain!}"
|
||||
const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
Vue.component('m-page-loading', httpVueLoader('/components/mobile/common/MLoading.vue'))
|
||||
Vue.component('m-table-loading', httpVueLoader('/components/mobile/common/MTableLoading.vue'))
|
||||
Vue.component('m-card', httpVueLoader('/components/mobile/common/MCard.vue'))
|
||||
Vue.component('vant-file-upload', httpVueLoader('/components/plugins/VantFileUpload.vue'))
|
||||
$.ajaxSetup({
|
||||
"cache": false,
|
||||
error: function () {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动太火爆,请稍后再试。。。',
|
||||
}).then(() => {
|
||||
const agent = window.navigator.userAgent.toLowerCase()
|
||||
if (agent.match(/MicroMessenger/i)) {
|
||||
WeixinJSBridge.call('closeWindow')
|
||||
} else {
|
||||
window.close()
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
const getSuffixType = (v, num) => {
|
||||
v.filename.substring(v.filename.lastIndexOf(".") + num)
|
||||
}
|
||||
|
||||
// const GetQueryString = (name) => {
|
||||
// const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
// const r = window.location.search.substr(1).match(reg);
|
||||
// if (r != null) return unescape(r[2]);
|
||||
// return "";
|
||||
// }
|
||||
|
||||
// function removeHTMLTag(str) {
|
||||
// str = str.replace(/<\/?[^>]*>/g, ''); //去除HTML tag
|
||||
// str = str.replace(/[ | ]*\n/g, '\n'); //去除行尾空白
|
||||
// str = str.replace(/\n[\s| | ]*\r/g, '\n'); //去除多余空行
|
||||
// str = str.replace(/ /ig, '');//去掉
|
||||
// return str;
|
||||
// }
|
||||
|
||||
// const toChinesNum = (num) => {
|
||||
// let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
||||
// let unit = ["", "十", "百", "千", "万"];
|
||||
// num = parseInt(num);
|
||||
// let getWan = (temp) => {
|
||||
// let strArr = temp.toString().split("").reverse();
|
||||
// let newNum = "";
|
||||
// for (let i = 0; i < strArr.length; i++) {
|
||||
// newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum;
|
||||
// }
|
||||
// return newNum;
|
||||
// }
|
||||
// let overWan = Math.floor(num / 10000);
|
||||
// let noWan = num % 10000;
|
||||
// if (noWan.toString().length < 4) {
|
||||
// noWan = "0" + noWan;
|
||||
// }
|
||||
// return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
|
||||
// }
|
||||
|
||||
|
||||
</script>
|
||||
${layoutContent}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,208 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.chart-card {
|
||||
background-color: #FFFFFF;
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
title="提案分析"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList"
|
||||
@change="getData()"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
`
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
|
||||
提案类型
|
||||
</div>
|
||||
<div id="pieDiv"></div>
|
||||
</div>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10"
|
||||
style="display: flex;align-items: center;justify-content: space-between">
|
||||
<div>
|
||||
<span>【{{clickTypeName}}】分析</span>
|
||||
<span style="font-size: 10px;color: orange">点击饼图查看详细信息</span>
|
||||
</div>
|
||||
<van-button size="mini" plain type="info" @click="renderColumnData(null)">全部类型</van-button>
|
||||
</div>
|
||||
<div id="columnDiv"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
sessionId: ''
|
||||
},
|
||||
sessionList: [],
|
||||
clickTypeName: '全部类型',
|
||||
reqData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
this.mLoading = true
|
||||
const {data} = await $.get('/mobile/proposal/analysis/getData', this.pageForm)
|
||||
this.reqData = data
|
||||
const pieData = data.map(v => {
|
||||
const o = {}
|
||||
o.code = v.typeCode
|
||||
o.name = v.typeName
|
||||
o.value = v.totalCount
|
||||
return o
|
||||
})
|
||||
|
||||
this.renderPieData(pieData)
|
||||
this.renderColumnData(null)
|
||||
},
|
||||
renderPieData(data) {
|
||||
const myPie = echarts.init(document.getElementById('pieDiv'), null, {
|
||||
height: 580
|
||||
})
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
top: '5%',
|
||||
left: 'center'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '提案类型',
|
||||
type: 'pie',
|
||||
radius: ['35%', '55%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '20',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data
|
||||
}
|
||||
]
|
||||
}
|
||||
myPie.setOption(option)
|
||||
window.onresize = function () {
|
||||
myPie.resize();
|
||||
};
|
||||
|
||||
myPie.on('click', (params) => {
|
||||
this.renderColumnData(params.data)
|
||||
console.log(params)
|
||||
});
|
||||
},
|
||||
renderColumnData(params) {
|
||||
const data = []
|
||||
if (params == null) {
|
||||
this.clickTypeName = '全部类型'
|
||||
let laCount = 0, jyCount = 0, caCount = 0, myCount = 0, ybCount = 0, bmyCount = 0;
|
||||
data.push(this.reqData.reduce((laCount, item) => laCount + item.laCount, 0))
|
||||
data.push(this.reqData.reduce((jyCount, item) => jyCount + item.jyCount, 0))
|
||||
data.push(this.reqData.reduce((caCount, item) => caCount + item.caCount, 0))
|
||||
data.push(this.reqData.reduce((myCount, item) => myCount + item.myCount, 0))
|
||||
data.push(this.reqData.reduce((ybCount, item) => ybCount + item.ybCount, 0))
|
||||
data.push(this.reqData.reduce((bmyCount, item) => bmyCount + item.bmyCount, 0))
|
||||
console.log(data)
|
||||
} else {
|
||||
const {code, name} = params
|
||||
this.clickTypeName = name
|
||||
const clickTypeData = this.reqData.find(v => v.typeCode === code)
|
||||
data.push(clickTypeData.laCount)
|
||||
data.push(clickTypeData.jyCount)
|
||||
data.push(clickTypeData.caCount)
|
||||
data.push(clickTypeData.myCount)
|
||||
data.push(clickTypeData.ybCount)
|
||||
data.push(clickTypeData.bmyCount)
|
||||
}
|
||||
|
||||
const myColumn = echarts.init(document.getElementById('columnDiv'), null, {
|
||||
height: 350
|
||||
});
|
||||
let option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['立案数', '作为建议、意见', '不予立案', '评分满意', '评分一般', '评分不满意'],
|
||||
axisLabel: {//坐标轴刻度标签的相关设置。
|
||||
interval: 0,
|
||||
rotate: "45"
|
||||
}
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data,
|
||||
type: 'bar',
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: 'rgba(180, 180, 180, 0.2)'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
myColumn.setOption(option);
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionList[0].value
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,145 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-dropdown-menu__bar {
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
title="代表查询"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList"
|
||||
@change="sessionChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegateTypeId" :options="delegateTypeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 120px;">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset @click="viewInfo(o.dbid)">
|
||||
<van-cell title="姓名" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.username}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="代表团">{{o.dbtname}}</van-cell>
|
||||
<van-cell :border="false" title="代表身份">{{o.rolename}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
|
||||
<div :style="{color:themeColor}" style="text-align: right;position: fixed;bottom: 20px;right: 20px">
|
||||
<van-button :color="themeColor" hairline size="mini" type="primary">
|
||||
总:{{pageForm.totalCount}}人
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
sessionId: '',
|
||||
delegationId: '',
|
||||
delegateTypeId: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
delegateTypeList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async sessionChange() {
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList && this.delegationList.length > 0) {
|
||||
this.pageForm.delegationId = this.delegationList[0].value
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/proposal/delegate/pageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
viewInfo(id) {
|
||||
// window.open('/mobile/proposal/delegate/viewInfo?id='+id)
|
||||
window.location.href = '/mobile/proposal/delegate/viewInfo?id=' + id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.delegateTypeList = await mProposal.getDelegateType()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionList[0].value
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList && this.delegationList.length > 0) {
|
||||
this.pageForm.delegationId = this.delegationList[0].value
|
||||
}
|
||||
if (this.delegateTypeList && this.delegateTypeList.length > 0) {
|
||||
this.pageForm.delegateTypeId = this.delegateTypeList[0].value
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,82 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
title="代表详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基本信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="年龄">{{ viewData.birthday }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.mz }}</van-cell>
|
||||
<van-cell title="文化程度">{{ viewData.xl }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.zzmm }}</van-cell>
|
||||
<van-cell title="部门">{{ viewData.dwname }}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.zc }}</van-cell>
|
||||
<van-cell title="职务">{{ viewData.zw }}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
个人简历
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell>
|
||||
<template>
|
||||
<div v-if="viewData.grjl!=null" v-html="viewData.grjl"></div>
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewData:{}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getData(id) {
|
||||
const {data} = await $.get('/platform/jdh/Common/findDbxx', {id})
|
||||
console.log(data)
|
||||
this.viewData = data
|
||||
console.log(this.viewData)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id !== '') {
|
||||
this.getData(id)
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,236 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 12px 0 12px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="附议提案"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
|
||||
@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.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>-->
|
||||
</van-dropdown-menu>
|
||||
|
||||
|
||||
<van-tabs v-model="pageForm.isAudit" @change="doSearch()">
|
||||
<van-tab title="未附议" :name="false"></van-tab>
|
||||
<van-tab title="已附议" :name="true"></van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div style="margin: 170px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading" :immediate-check="false"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
<div @click="openView(o.id,o.secondedId)">
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
|
||||
<span class="title_span" :style="'color:'+o.stateColor">|</span>提案名称:{{o.proposalName}}
|
||||
</div>
|
||||
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right" v-if="!o.isAgree">
|
||||
<van-tag :style="'color:'+o.stateColor" size="medium" plain round type="primary">附议
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
||||
<span style="color: grey">代 表 团:</span>{{o.delegationName}}
|
||||
</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
|
||||
</van-row>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title" style="margin-top: 11px">
|
||||
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
|
||||
<span style="color: grey;margin-left: 24%;">附 议 人:</span>{{o.secondedUserName}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- <van-cell-group inset>
|
||||
<van-cell title="提案名称" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.proposalName}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="提案编号">{{o.proposalCode}}</van-cell>
|
||||
<van-cell :border="false" title="附  议  人">{{o.secondedUserName}}</van-cell>
|
||||
<van-cell :border="false" title="提案类型">{{o.typeName}}</van-cell>
|
||||
<van-cell :border="false" title="提案状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>-->
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
auditList: [
|
||||
{text: '未附议', value: false},
|
||||
{text: '已附议', value: true},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/mobile/proposal/seconded/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length >= res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
doAudit(flag, row) {
|
||||
const {id, secondedId} = row
|
||||
let res = flag === true ? '通过' : '拒绝'
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定' + res + '吗?',
|
||||
}).then(() => {
|
||||
$.post('/platform/proposal/transact/seconded/doAudit', {
|
||||
secondedId: secondedId,
|
||||
proposalId: id,
|
||||
flag: flag
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('提交成功!')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
openView(id, secondedId) {
|
||||
window.location.href = '/platform/mobile/proposal/seconded/view?biz_key=' + secondedId + '&proposal_id=' + id + '&mobile=' + true
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.proposalTypeList = await mProposal.getProposalType()
|
||||
this.resultList = await mProposal.getProposalDict()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
}
|
||||
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.resultList && this.resultList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
this.onLoad()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,158 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="提案查询"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
|
||||
@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.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalStateCode" :options="stateList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 120px auto">
|
||||
<van-list
|
||||
v-model="mLoading" :immediate-check="false"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="提案名称" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span v-if="o.resultName=='不予立案'" style="font-size: 16px;color: red" class="van-ellipsis">{{o.proposalName}}</span>
|
||||
<span v-else-if="o.resultName=='意见建议'" style="color: #0000FF" style="font-size: 16px"
|
||||
class="van-ellipsis">{{o.proposalName}}</span>
|
||||
<span v-else-if="o.resultName=='确定立案'" style="color: green" style="font-size: 16px"
|
||||
class="van-ellipsis">{{o.proposalName}}</span>
|
||||
<span v-else style="color: #7f8481" style="font-size: 16px" class="van-ellipsis">{{o.proposalName}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="提案编号">{{o.proposalCode}}</van-cell>
|
||||
<van-cell :border="false" title="提  案  人">{{o.username}}</van-cell>
|
||||
<van-cell :border="false" title="提案类型">{{o.typeName}}</van-cell>
|
||||
<van-cell :border="false" title="代  表  团">{{o.delegationName}}</van-cell>
|
||||
<!-- <van-cell :border="false" title="立案结果">{{o.resultName ? o.resultName : '暂无'}}</van-cell>-->
|
||||
<van-cell :border="false" title="提案状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
stateList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
const res = await $.post('/platform/mobile/proposal/integrated/pageData', this.pageForm)
|
||||
this.mLoading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length >= res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
openView(id) {
|
||||
//window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
|
||||
window.location.href = '/platform/mobile/proposal/compose/view?biz_key=' + null + '&proposal_id=' + id + '&mobile=' + true
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.proposalTypeList = await mProposal.getProposalType()
|
||||
this.resultList = await mProposal.getProposalDict()
|
||||
this.stateList = await mProposal.getOpenProposalState()
|
||||
|
||||
|
||||
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.stateList && this.stateList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalStateCode", this.stateList[0].value)
|
||||
}
|
||||
if (this.resultList && this.resultList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
//this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.meetingId)
|
||||
if (this.delegationList && this.delegationList.length > 0) {
|
||||
this.pageForm.delegationId = this.delegationList[0].value
|
||||
}
|
||||
if (this.delegateTypeList && this.delegateTypeList.length > 0) {
|
||||
this.pageForm.delegateTypeId = this.delegateTypeList[0].value
|
||||
}
|
||||
}
|
||||
this.sessionList.unshift({text: '全部届次', value: ''});
|
||||
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,420 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
right: 50px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.register-sapn {
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
right: 38px;
|
||||
z-index: 1;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 12px 0 12px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="我的提案"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
|
||||
@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.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin-top: 120px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
|
||||
<span :style="'color:'+o.stateColor" class="title_span">|</span>提案名称:{{o.proposalName}}
|
||||
</div>
|
||||
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right">
|
||||
<van-tag :style="'color:'+o.stateColor" plain round size="medium" type="primary">{{
|
||||
o.stateName }}
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
||||
<span style="color: grey">代 表 团:</span>{{o.delegationName}}
|
||||
</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
|
||||
</van-row>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title" style="margin-top: 11px">
|
||||
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
|
||||
<van-button @click.stop="openFuyi(o)" color="#1867b0" size="small"
|
||||
style="position: absolute;right: 16px;top:78.9%"
|
||||
type="primary" v-if="o.stateCode < 200">邀请附议人
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
<van-popup :close-on-click-overlay="false" :lazy-render="false"
|
||||
:style="{ height: '80%'}"
|
||||
@click-close-icon="closeInvitePopup"
|
||||
closeable get-container="#app" position="bottom"
|
||||
round
|
||||
safe-area-inset-bottom v-model="fuyiShowPicker">
|
||||
|
||||
<van-search @search="onSearchSecondedUser"
|
||||
close-icon="close"
|
||||
placeholder="请输入姓名搜索"
|
||||
show-action
|
||||
style="width: 85%"
|
||||
v-model="searchSecondedUserKeyWord">
|
||||
<template #action>
|
||||
<div @click="onSearchSecondedUser">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
|
||||
<div style="padding:0px 20px;margin-top:20px;box-sizing: border-box;max-height: calc(100% - 150px);overflow-y: auto">
|
||||
<van-checkbox-group :checked-color="themeColor" style="font-size: 12px" v-model="helpDb">
|
||||
<van-cell-group>
|
||||
<van-index-bar :sticky="false" highlight-color="red" ref="indexBar">
|
||||
<template v-for="c,ci in dBData">
|
||||
<van-index-anchor :index="c.k" v-if="c.v && c.v.length>0 && c.isShow"></van-index-anchor>
|
||||
<template v-for="x,xi in c.v">
|
||||
<van-cell
|
||||
v-show="c.isShow && x.isShow"
|
||||
:id="'van-cell-'+x.id"
|
||||
:key="x.id"
|
||||
:title="x.username + '-' + x.dbtName"
|
||||
@click="fuyiToggle(x.id)"
|
||||
clickable
|
||||
>
|
||||
<template #right-icon>
|
||||
<van-checkbox :name="x" @click.stop="fuyiToggle(x.id)"
|
||||
ref="fuyiCheckboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</van-index-bar>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
|
||||
<van-row gutter="20" style="position:absolute;bottom: 20px;width: 100%">
|
||||
<van-col span="12" style="text-align: center">
|
||||
<van-button @click="cleanSelectedUser" color="red" style="width: 60%">清空</van-button>
|
||||
</van-col>
|
||||
<van-col span="12" style="text-align: center">
|
||||
<van-button :color="themeColor" @click="fuyiDwselclose" style="width: 60%">
|
||||
确定({{hasSelectedUser}})
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<!-- <div style="position: absolute;width: 80%;bottom: 20px;left: 50%;transform: translateX(-50%)">-->
|
||||
<!-- <van-button :color="themeColor" @click="cleanSelectedUser">清空</van-button>-->
|
||||
<!-- <van-button :color="themeColor" @click="fuyiDwselclose">确定</van-button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const py = new Pinyin()
|
||||
const pyArr = [...Array(26).keys()].map(i => String.fromCharCode(i + 65))
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
dBData: [],
|
||||
SecondedData: [],
|
||||
helpDb: [],
|
||||
formData: {
|
||||
helpDb: [],
|
||||
proposalId: ''
|
||||
},
|
||||
dbList: [],
|
||||
fuyiShowPicker: false,
|
||||
list: [],
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
searchSecondedUserKeyWord: '',
|
||||
hasSelectedUser: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeInvitePopup() {
|
||||
this.fuyiShowPicker = false
|
||||
this.cleanSelectedUser()
|
||||
},
|
||||
cleanSelectedUser() {
|
||||
this.$refs.fuyiCheckboxes.forEach(v => {
|
||||
if (v.checked) {
|
||||
v.toggle()
|
||||
}
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
const hasSelectedUser = this.$refs.fuyiCheckboxes.filter(v => v.checked).length
|
||||
|
||||
console.log(hasSelectedUser)
|
||||
this.hasSelectedUser = hasSelectedUser
|
||||
}, 100)
|
||||
|
||||
},
|
||||
|
||||
dbListTransToA2Z(list) {
|
||||
const py = new Pinyin()
|
||||
let arr = []
|
||||
pyArr.forEach(p => {
|
||||
const c = list.filter(x => {
|
||||
return py.getCamelChars(x.username).substr(0, 1) === p
|
||||
})
|
||||
arr.push({k: p, v: c})
|
||||
})
|
||||
return arr
|
||||
},
|
||||
|
||||
onSearchSecondedUser(val) {
|
||||
// if (!this.searchSecondedUserKeyWord) {
|
||||
// this.dBData = this.dbListTransToA2Z(this.dbList)
|
||||
// } else {
|
||||
// const filterUserList = this.dbList.filter(v => v.username.includes(this.searchSecondedUserKeyWord))
|
||||
// this.dBData = this.dbListTransToA2Z(filterUserList)
|
||||
// }
|
||||
|
||||
if (!this.searchSecondedUserKeyWord) {
|
||||
this.dBData.forEach(v => {
|
||||
v.isShow = true
|
||||
|
||||
})
|
||||
} else {
|
||||
const firstName = py.getCamelChars(this.searchSecondedUserKeyWord).substr(0, 1)
|
||||
this.dBData.forEach(x => {
|
||||
x.isShow = x.k === firstName
|
||||
if (x.isShow) {
|
||||
x.v.forEach(c => {
|
||||
c.isShow = c.username.includes(this.searchSecondedUserKeyWord)
|
||||
})
|
||||
x.v.sort()
|
||||
}
|
||||
})
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
|
||||
cellShow(username) {
|
||||
if (!this.searchSecondedUserKeyWord) {
|
||||
return true
|
||||
}
|
||||
const firstName = py.getCamelChars(username).substr(0, 1)
|
||||
|
||||
this.dBData.forEach(x => {
|
||||
x.isShow = x.k === firstName
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
fuyiToggle(id) {
|
||||
this.$refs.fuyiCheckboxes.some(v => {
|
||||
if (v.name.id === id) {
|
||||
v.toggle()
|
||||
return true
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
const hasSelectedUser = this.$refs.fuyiCheckboxes.filter(v => v.checked).length
|
||||
console.log(hasSelectedUser)
|
||||
this.hasSelectedUser = hasSelectedUser
|
||||
}, 100)
|
||||
|
||||
},
|
||||
async getSecondedList(proposalId, jdhid) {
|
||||
const {data} = await $.post("/platform/proposal/transact/compose/getSecondedList", {
|
||||
proposalId: proposalId,
|
||||
jdhid: jdhid
|
||||
})
|
||||
data.sort((a, b)=> a.username.localeCompare(b.username, 'zh'))
|
||||
this.dbList = data
|
||||
pyArr.forEach(p => {
|
||||
const c = this.dbList.filter(x => {
|
||||
x.isShow = true
|
||||
return py.getCamelChars(x.username).substr(0, 1) === p
|
||||
})
|
||||
this.dBData.push({k: p, v: c, isShow: true})
|
||||
})
|
||||
},
|
||||
fuyiDwselclose() {
|
||||
let aa = ''
|
||||
if (this.helpDb.length > 0) {
|
||||
this.formData.helpDb = this.helpDb.map(v => v.id)
|
||||
aa = this.helpDb.map(v => v.username).toString()
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '',
|
||||
message: this.helpDb.length > 0 ? ('您邀请了' + aa + ',' + this.helpDb.length + '位附议人您确定要邀请吗?确定后会有信息通知') : '您没有选择附议人请确认',
|
||||
}).then(async () => {
|
||||
const resp = await $.post("/platform/proposal/transact/compose/addSeconded", {
|
||||
proposalId: this.proposalId,
|
||||
users: JSON.stringify(this.formData.helpDb),
|
||||
})
|
||||
if (resp.code == 0) {
|
||||
this.$toast.success(resp.msg);
|
||||
this.doSearch()
|
||||
this.fuyiShowPicker = false
|
||||
}
|
||||
|
||||
}).catch(() => {
|
||||
this.fuyiShowPicker = false
|
||||
});
|
||||
|
||||
},
|
||||
openFuyi(row) {
|
||||
this.formData.helpDb = []
|
||||
this.helpDb = []
|
||||
this.dBData = []
|
||||
this.proposalId = row.id
|
||||
this.getSecondedList(row.id, row.teacherMeetingId)
|
||||
this.fuyiShowPicker = true
|
||||
this.searchSecondedUserKeyWord = ''
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/mobile/proposal/compose/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = '/platform/mobile/proposal/compose/view?biz_key=' + null + '&proposal_id=' + id + '&mobile=' + true
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.proposalTypeList = await mProposal.getProposalType()
|
||||
this.resultList = await mProposal.getProposalDict()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
}
|
||||
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.resultList && this.resultList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,221 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
.van-divider {
|
||||
margin: 12px 0 12px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
.van-col{
|
||||
line-height: 25px;
|
||||
}
|
||||
.title_span{
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="团长审议"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
|
||||
@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.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs v-model="pageForm.isAudit" @click="doSearch">
|
||||
<van-tab title="未审核" :name="false"></van-tab>
|
||||
<van-tab title="已审核" :name="true"></van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
|
||||
<div style="margin: 170px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openView(o.id)">
|
||||
<div @click="openView(o.id)">
|
||||
<div>
|
||||
<div class="van-ellipsis" style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
|
||||
<span class="title_span" :style="'color:'+o.stateColor">|</span>提案名称:{{o.proposalName}}
|
||||
</div>
|
||||
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right">
|
||||
<van-tag :style="'color:'+o.stateColor" size="medium" plain round type="primary">{{ o.stateName }}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><span style="color: grey">代 表 团:</span>{{o.delegationName}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
|
||||
</van-row>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title" style="margin-top: 11px">
|
||||
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/proposal/transact/delegation/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openAudit(id) {
|
||||
this.formData = {
|
||||
proposalId: id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
opinion: '',
|
||||
sign: '',
|
||||
}
|
||||
this.state = '0'
|
||||
this.show = true
|
||||
},
|
||||
validateForm(action, done) {
|
||||
done(false)
|
||||
},
|
||||
async doHandle() {
|
||||
this.$refs['handleForm'].validate().then(valid => {
|
||||
$.post('/platform/proposal/transact/audit/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
flag: this.state === 0
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.show = false
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('审核成功!')
|
||||
} else {
|
||||
vant.Toast.error('审核失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
openView(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
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.proposalTypeList = await mProposal.getProposalType()
|
||||
this.resultList = await mProposal.getProposalDict()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
}
|
||||
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.resultList && this.resultList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,337 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder
|
||||
title="撰写提案"></van-nav-bar>
|
||||
<van-form :show-error-message="false" input-align="right" ref="addForm">
|
||||
|
||||
|
||||
<van-cell-group class="mt10" inset>
|
||||
<van-field label="代表姓名" name="username" readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></van-field>
|
||||
|
||||
<van-field :value="formData.createTime" label="提案时间" name="createTime"
|
||||
readonly></van-field>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请填写提案名称'}]" label="提案名称" name="proposalName"
|
||||
placeholder="请填写提案名称"
|
||||
required v-model="formData.proposalName"></van-field>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请选择提案方式'}]" @click="showMannerCodePicker = true" clickable
|
||||
label="提案方式"
|
||||
name="mannerName"
|
||||
placeholder="点击选择提案方式"
|
||||
readonly required
|
||||
v-model="formData.mannerName"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showMannerCodePicker">
|
||||
<van-picker :columns="mannerList" @cancel="showMannerCodePicker = false" @confirm="onMannerCodeConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field :value="formData.teacherMeeting" label="所属教代会" name="teacherMeeting"
|
||||
readonly></van-field>
|
||||
|
||||
<van-field v-show="false" :rules="[{ required:true, message: '请选择所属代表团'}]" @click="${@shiro.hasRole('jdhdb01')} ? '' : showDelegationNamePicker = true"
|
||||
clickable label="所属代表团"
|
||||
name="delegationName"
|
||||
placeholder="点击选择所属代表团"
|
||||
readonly required
|
||||
v-if="formData.mannerCode!='W03'" v-model="formData.delegationName"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showDelegationNamePicker">
|
||||
<van-picker :columns="delegationOptions" @cancel="showDelegationNamePicker = false"
|
||||
@confirm="onDelegationNameConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请选择所属委员会'}]" @click="showCommitteeNamePicker = true"
|
||||
clickable label="所属委员会"
|
||||
name="committeeName"
|
||||
placeholder="点击选择所属委员会"
|
||||
readonly required
|
||||
v-if="formData.mannerCode=='W03'" v-model="formData.committeeName"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showCommitteeNamePicker">
|
||||
<van-picker :columns="committeeOptions" @cancel="showCommitteeNamePicker = false"
|
||||
@confirm="onCommitteeNameConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-show="false" @click="showTypeNamePicker = true" clickable
|
||||
label="提案类型"
|
||||
name="typeName"
|
||||
placeholder="点击选择提案类型"
|
||||
readonly
|
||||
v-model="formData.typeName"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showTypeNamePicker">
|
||||
<van-picker :columns="typeOptions" @cancel="showTypeNamePicker = false" @confirm="onTypeNameConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
:rules="[{ required:true, message: '请输入案由'}]"
|
||||
autosize
|
||||
clearable
|
||||
label="案  由"
|
||||
maxlength="1000"
|
||||
placeholder="请输入案由"
|
||||
required
|
||||
rows="5"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="formData.brief"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
:rules="[{ required:true, message: '请输入建议措施'}]"
|
||||
autosize
|
||||
clearable
|
||||
label="建议措施"
|
||||
maxlength="1000"
|
||||
placeholder="请输入建议措施"
|
||||
required
|
||||
rows="5"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="formData.measures"
|
||||
></van-field>
|
||||
|
||||
<!-- <van-field name="files" label="附  件" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>-->
|
||||
<van-cell title="签  字" v-if="isSign()">
|
||||
<template #label>
|
||||
<mobile-sign class="mt20" ref="signature" h="0.25" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<div style="display: flex;justify-content: space-around;padding: 20px 0 20px 0;">
|
||||
<van-button :color="themeColor" @click="doAdd" style="flex: 1;margin: 0 10px 0 10px">保存提案
|
||||
</van-button>
|
||||
<van-button :color="themeColor" @click="doSubmit" style="flex: 1;margin: 0 10px 0 10px"
|
||||
v-if="formData.mannerCode!='W01'">提交
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
showMannerCodePicker: false,
|
||||
showDelegationNamePicker: false,
|
||||
showCommitteeNamePicker: false,
|
||||
showTypeNamePicker: false,
|
||||
config: {},
|
||||
allMannerList: [],
|
||||
mannerList: [],
|
||||
meetingOptions: [],
|
||||
typeOptions: [],
|
||||
delegationOptions: [],
|
||||
committeeOptions: [],
|
||||
formData: {
|
||||
username: '${@shiro.getPrincipalProperty("username")}',
|
||||
createTime: moment().format('YYYY-MM-DD'),
|
||||
delegationId: '',
|
||||
sign: '',
|
||||
id: '',
|
||||
mannerCode: 'W01'
|
||||
},
|
||||
isSign: () => {
|
||||
return proposal.needSignState.map(v => v.stateCode).includes(proposal.UNSUBMIT)
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue'),
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.signature) {
|
||||
this.$refs.signature.getMySign()
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async doAdd() {
|
||||
let method = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
if (this.formData.sign !== "") {
|
||||
this.$refs.signature.submitSign()
|
||||
}
|
||||
|
||||
let data = clone(this.formData)
|
||||
if (data.files) {
|
||||
data.files = JSON.stringify(data.files)
|
||||
}
|
||||
|
||||
$.post('/platform/proposal/transact/compose' + method, {
|
||||
data: JSON.stringify(data),
|
||||
sign: data.sign
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$toast.success('成功');
|
||||
window.location.href = "/platform/mobile/proposal/compose"
|
||||
} else {
|
||||
this.$toast.fail('失败');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
const confirm = await this.$confirm('确定要提交此提案吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'info',
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
this.$refs.signature.submitSign()
|
||||
/* this.$refs.signature.submitSign()
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}
|
||||
await this.$refs.signature.updateSign()*/
|
||||
this.$refs.signature.submitSign()
|
||||
let data = clone(this.formData)
|
||||
if (data.files) {
|
||||
data.files = JSON.stringify(data.files)
|
||||
}
|
||||
const resp = await $.post("/platform/proposal/transact/writeproposal/doSubmit", {
|
||||
data: JSON.stringify(data),
|
||||
sign: data.sign
|
||||
})
|
||||
requestLaterFun(resp, () => {
|
||||
this.$notify.success({title: '成功', message: resp.msg})
|
||||
window.location.href = "/platform/mobile/proposal/compose"
|
||||
}, () => {
|
||||
this.$notify.warning({title: '警告', message: resp.msg})
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onTypeNameConfirm(val) {
|
||||
this.$set(this.formData, "typeName", val.text)
|
||||
this.$set(this.formData, "typeId", val.value)
|
||||
this.showTypeNamePicker = false;
|
||||
},
|
||||
onCommitteeNameConfirm(val) {
|
||||
this.$set(this.formData, "committeeName", val.text)
|
||||
this.$set(this.formData, "committeeId", val.value)
|
||||
this.showCommitteeNamePicker = false;
|
||||
},
|
||||
onDelegationNameConfirm(val) {
|
||||
this.$set(this.formData, "delegationName", val.text)
|
||||
this.$set(this.formData, "delegationId", val.value)
|
||||
this.showDelegationNamePicker = false;
|
||||
},
|
||||
onMannerCodeConfirm(val) {
|
||||
this.$set(this.formData, "mannerName", val.text)
|
||||
this.$set(this.formData, "mannerCode", val.value)
|
||||
this.showMannerCodePicker = false;
|
||||
},
|
||||
async getDictByCode() {
|
||||
const {data} = await $.get("/platform/proposal/basics/config/getDictByCode", {code: "proposal_manner"})
|
||||
return data
|
||||
},
|
||||
async initData() {
|
||||
this.allMannerList = await this.getDictByCode("proposal_manner");
|
||||
this.config = await proposal.getProposalConfig()
|
||||
this.meetingOptions = await proposal.getOpenMeeting()
|
||||
const typeOptions = await proposal.getProposalType()
|
||||
this.$set(this.formData, "teacherMeetingId", this.meetingOptions ? this.meetingOptions[0].id : null)
|
||||
this.$set(this.formData, "teacherMeeting", this.meetingOptions ? this.meetingOptions[0].jdhallname : null)
|
||||
const delegationOptions = await proposal.getDelegation(this.formData.teacherMeetingId)
|
||||
|
||||
|
||||
delegationOptions.forEach(v => {
|
||||
this.delegationOptions.push({value: v.id, text: v.dbtname})
|
||||
})
|
||||
typeOptions.forEach(v => {
|
||||
this.typeOptions.push({value: v.id, text: v.typeName})
|
||||
})
|
||||
|
||||
this.$set(this.formData, "delegationId", this.delegationOptions ? this.delegationOptions[0].value : '')
|
||||
this.$set(this.formData, "delegationName", this.delegationOptions ? this.delegationOptions[0].text : '')
|
||||
|
||||
|
||||
const jgcy = await $.post("/platform/proposal/transact/writeproposal/getJdhJgcy", {jdhid: this.formData.teacherMeetingId})
|
||||
const cbdwFzr = await $.post("/platform/proposal/transact/writeproposal/getCbdwFzr")
|
||||
if (jgcy.data > 0) {
|
||||
const jgName = await $.post("/platform/proposal/transact/writeproposal/getJgNameByuser")
|
||||
jgName.data.forEach(v => {
|
||||
this.committeeOptions.push({value: v.id, text: v.name})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if (this.allMannerList.length > 0) {
|
||||
this.config.manner.forEach(v => {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W01") {
|
||||
const data = this.allMannerList.find(z => z.code == v)
|
||||
this.mannerList.push({value: data.code, text: data.name})
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')||(@shiro.hasRole('jdhdb01')&&@shiro.hasRole('jdhdbt01'))}" === 'true' && v === "W02") {
|
||||
const data = this.allMannerList.find(z => z.code == v)
|
||||
this.mannerList.push({value: data.code, text: data.name})
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W03" && jgcy.data > 0) {
|
||||
const data = this.allMannerList.find(z => z.code == v)
|
||||
this.mannerList.push({value: data.code, text: data.name})
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W04" && cbdwFzr.data > 0) {
|
||||
const data = this.allMannerList.find(z => z.code == v)
|
||||
this.mannerList.push({value: data.code, text: data.name})
|
||||
}
|
||||
})
|
||||
this.$set(this.formData, "mannerId", this.mannerList ? this.mannerList[0].value : '')
|
||||
this.$set(this.formData, "mannerName", this.mannerList ? this.mannerList[0].text : '')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 34%;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
font-size: 18px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.label {
|
||||
border-left: 5px #1867b0 solid;
|
||||
border-radius: 4px;
|
||||
padding-left: 6px;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.van-tab__pane, .van-tab__pane-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.label_text {
|
||||
color: grey;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.yy-wrap .van-button {
|
||||
height: 32px;
|
||||
border-radius: 6px;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.time_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.time_info:nth-of-type(1) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="心理咨询预约"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<div class="info">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="80" height="80"
|
||||
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+doctorData.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
{{doctorData.username}}
|
||||
</div>
|
||||
<div>
|
||||
{{doctorData.jobTitle}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="active" :style="'height: ' + (window.screen.height - 46 - 40 - 84 - 24 - 44) + 'px'">
|
||||
<van-tab title="预约时段">
|
||||
<van-list
|
||||
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 style="color: #1867b0">{{getFormatTime(item)}}</div>
|
||||
<div class="yy-wrap">
|
||||
<van-button @click="apply(item)" :color="item.className">{{item.title}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading === false && timeData.length === 0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="抱歉,此咨询师暂时没有进行排班哦">
|
||||
</van-empty>
|
||||
</van-tab>
|
||||
<van-tab title="咨询师简介">
|
||||
<div class="label">咨询师擅长</div>
|
||||
<div class="label_text">{{doctorData.specialty ? doctorData.specialty : '暂无数据,该资料待补充'}}</div>
|
||||
<div class="label" style="margin-top: 20px">咨询师简介</div>
|
||||
<div class="label_text">{{doctorData.introduce ? doctorData.introduce : '暂无数据,该资料待补充'}}</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<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-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
:value="chooseData.startTime"
|
||||
label="开始时间"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.endTime"
|
||||
label="结束时间"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
|
||||
<van-field readonly
|
||||
:value="chooseData.username"
|
||||
label="咨询师姓名"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.mobile"
|
||||
label="咨询师电话"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
label="预约人姓名"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"
|
||||
label="预约人工号"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
label="预约人单位"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('mobile')}"
|
||||
label="预约人电话"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field
|
||||
v-model="appointmentUserNote"
|
||||
rows="3"
|
||||
autosize
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
placeholder="您可以输入预约备注"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
<div class="footer">
|
||||
<van-button @click="doSubmit()" color="#1867b0">提交预约</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
doctorId: '',
|
||||
doctorData: {},
|
||||
active: 0,
|
||||
timeData: [],
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
chooseData: {},
|
||||
appointmentUserNote: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
id: this.chooseData.id
|
||||
}
|
||||
const resp = await $.post('/mobile/psychologyPro/doApply', params)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('申请成功')
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/psychologyPro/myApplyList')
|
||||
}, 1000)
|
||||
} else if (resp.code === 1) {
|
||||
this.$toast.error(resp.msg)
|
||||
} else if (resp.code === 2) {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
apply(o) {
|
||||
if (o.title !== '可预约') {
|
||||
return
|
||||
}
|
||||
this.chooseData = o
|
||||
this.show = true
|
||||
},
|
||||
getFormatTime(o) {
|
||||
const simpleStartDate = moment(o.startTime).format('YYYY-MM-DD')
|
||||
const simpleStartHour = moment(o.startTime).format('HH:mm')
|
||||
const simpleEndHour = moment(o.endTime).format('HH:mm')
|
||||
const dayNameOfWeek = this.dayNames[new Date(simpleStartDate).getDay()]
|
||||
return simpleStartDate + ' ' + dayNameOfWeek + ' ' + simpleStartHour + '至' + simpleEndHour
|
||||
},
|
||||
async pageData() {
|
||||
this.pageForm.doctorId = this.doctorId
|
||||
const resp = await $.post('/mobile/psychologyPro/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (this.doctorId !== '') {
|
||||
this.doctorData = resp.data[0]
|
||||
} else {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async getDataByDoctorId() {
|
||||
this.mLoading = true
|
||||
this.pageForm.id = this.doctorId
|
||||
const resp = await $.post('/mobile/psychologyPro/getDataByDoctorId', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}";
|
||||
resp.data.list.forEach(v => {
|
||||
if (new Date().getTime() > v.startTimeTs) {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
} else {
|
||||
if (!v.appointmentUser) {
|
||||
v.className = '#1867b0'
|
||||
v.title = '可预约'
|
||||
} else if (v.appointmentUser === userId) {
|
||||
v.className = 'gray'
|
||||
v.title = '我已预约'
|
||||
} else {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
}
|
||||
}
|
||||
})
|
||||
this.timeData = this.timeData.concat(resp.data.list)
|
||||
if (this.timeData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.doctorId = getQueryVariable('doctorId')
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 38%;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
width: 74%;
|
||||
line-height: 22px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.desc {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="心理咨询师列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<!--咨询师列表-->
|
||||
<div class="info" @click="toApply(item)" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="100" height="100"
|
||||
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
<span style="font-size: 20px">{{item.username}} </span>
|
||||
<span style="color: grey">{{item.sex}} </span> 
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<span style="color: grey">职称:</span>{{item.jobTitle}}
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">单位:</span>{{item.unitName}}
|
||||
</div>
|
||||
<div class="desc">
|
||||
<span style="color: grey">特长:</span>{{item.specialty}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const resp = await $.post('/mobile/psychologyPro/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
},
|
||||
toApply(o) {
|
||||
location.href = '/mobile/psychologyPro/apply?doctorId=' + o.userid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,251 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
background: #FFFFFF;
|
||||
width: 92%;
|
||||
margin: 0px auto 20px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.card-head {
|
||||
line-height: 30px;
|
||||
padding: 8px 16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
.cancel-button {
|
||||
text-align: right;
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.cancel-button .van-button {
|
||||
height: 27px !important;
|
||||
padding: 0 18px !important;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="我的预约记录"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.stateId" :options="stateList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="viewInfo(o)">
|
||||
<div class="card-head">
|
||||
心理咨询预约
|
||||
<span class="state-text">
|
||||
<van-tag size="medium" v-if="o.stateId===2300" type="success">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2200" type="error">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2100" type="warning">{{o.stateName}}</van-tag>
|
||||
</span>
|
||||
</div>
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="预约人">{{o.appointmentUserName}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.startTime}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.endTime}}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="cancel-button">
|
||||
<van-button v-if="moment().unix() < moment(o.startTime).unix()" @click.stop="doCancel(o.id)" round
|
||||
size="small" color="#1867b0">取消预约
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<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></div>
|
||||
<div class="van-card-header">
|
||||
预约时间段
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ viewData.endTime }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
预约人信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.appointmentLoginName }}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.appointmentUnitName }}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.appointmentMobile }}</van-cell>
|
||||
<van-cell title="预约备注">{{ viewData.appointmentUserNote }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
咨询师信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.doctorUnitName || '暂无'}}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.doctorJobTitle || '暂无'}}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.doctorMobile || '暂无'}}</van-cell>
|
||||
<van-cell title="个人简介">{{ viewData.doctorIntroduce || '暂无'}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
stateList: [
|
||||
{text: '全部预约状态', value: null},
|
||||
{text: '预约中', value: 2100},
|
||||
{text: '预约成功', value: 2300},
|
||||
{text: '预约失败', value: 2200}
|
||||
],
|
||||
show: false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/psychologyPro/MyPageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
viewInfo(o) {
|
||||
this.viewData = o
|
||||
this.show = true
|
||||
},
|
||||
async doCancel(id) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定取消此次预约吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/psychologyPro/doCancel', {id})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('取消成功')
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = this.yearList[0].value
|
||||
this.pageForm.stateId = null
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,553 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.container {
|
||||
/*height: calc(56vh);*/
|
||||
width: 100%;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.header-info {
|
||||
background: #FFFFFF;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header-info .no {
|
||||
font-weight: bolder;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: #FFFFFF;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.card .header {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
border-bottom: .1px solid #e2e2e2;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card .body {
|
||||
padding: 0 10px 10px 10px;
|
||||
}
|
||||
|
||||
.issue-card .issue {
|
||||
height: calc(0%);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 10px;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
font-family: 'Helvetica Neue', Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.issue-card .issue div {
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.issue-card .options {
|
||||
height: calc(0%);
|
||||
padding: 0 10px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.issue-card .options .option {
|
||||
padding: 10px 20px;
|
||||
background: #eeeeee8f;
|
||||
border: 1px solid rgba(234, 233, 233, 0.5);
|
||||
margin-bottom: 10px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.issue-card .options .option-selected {
|
||||
border: 1px solid #c59f48;
|
||||
background: #fffbf3;
|
||||
color: #c59f48;
|
||||
}
|
||||
|
||||
.issue-card .options .option-correct {
|
||||
border: 1px solid #ace59d;
|
||||
background: #cdf3a8;
|
||||
color: #ace59d;
|
||||
}
|
||||
|
||||
.answer-card .body .result {
|
||||
padding: 10px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.answer-card .body .result .success {
|
||||
color: #71d5a1;
|
||||
}
|
||||
|
||||
.answer-card .body .result .error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.answer-card .body .desc {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.footer-info {
|
||||
background: #ffffff;
|
||||
height: 50px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer-info div {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
/*line-height: 50px;*/
|
||||
}
|
||||
|
||||
.win-info-button {
|
||||
position: fixed;
|
||||
bottom: 60px;
|
||||
right: 10px;
|
||||
transform: translateY(-50%);
|
||||
padding: 5px;
|
||||
background-color: #007bff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.winPopup {
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.iconDiv {
|
||||
color: white;
|
||||
font-size: 66px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="container">
|
||||
<div class="header-info" v-if="false">
|
||||
<div class="no">
|
||||
序号:{{ currentIssueIndex + 1 + '/' + todayIssueList.length }}
|
||||
</div>
|
||||
<div class="no" v-if="questionData.qdtkssj && questionData.qdtjssj">
|
||||
<van-icon name="clock-o" size="16"/>
|
||||
答题时间:{{ questionData.qdtkssj + ' 至 ' + questionData.qdtjssj }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="question-card" v-for="(issue,issueIdx) in todayIssueList" :key="issue.issue">
|
||||
<template v-if="issueIdx===currentIssueIndex">
|
||||
<div class="card issue-card">
|
||||
<div class="header">
|
||||
<!-- <div class="issue-type">-->
|
||||
<!-- <span v-if="issue.itx===1 && issue.iisdx">单选题</span>-->
|
||||
<!-- <span v-if="issue.itx===1 && !issue.iisdx">多选题</span>-->
|
||||
<!-- </div>-->
|
||||
<div class="issue-type">
|
||||
序号:{{ currentIssueIndex + 1 + '/' + todayIssueList.length }}
|
||||
</div>
|
||||
<div class="score">
|
||||
分数:{{ issue.fraction }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="issue">
|
||||
<div style="font-size: 16px" v-html="issue.iname"></div>
|
||||
</div>
|
||||
<div class="options">
|
||||
<template v-for="wor in issue.wors">
|
||||
<div class="option"
|
||||
@click="optionSelect(issue,wor)"
|
||||
:key="wor.wid"
|
||||
:class="[currentSelectedWors.map(v=>v.wid).includes(wor.wid) ? 'option-selected':'']">
|
||||
{{ wor.wtxt }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card answer-card" v-if="hasAnswerIssueIds.includes(issue.iid)">
|
||||
<!-- <div class="header">-->
|
||||
<!-- 答案-->
|
||||
<!-- </div>-->
|
||||
<div class="body">
|
||||
<div class="result">
|
||||
<span v-if="currentIssueAnswerResult" class="success">回答正确</span>
|
||||
<span v-else class="error">回答错误</span>
|
||||
</div>
|
||||
<div class="desc">我的答案:{{ currentIssueMyAnswer }}</div>
|
||||
<div class="desc" v-if="!currentIssueAnswerResult">正确答案:{{ correctWorsText }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="footer-info"
|
||||
style="background: #FFFFFF;height: 50px;position: fixed;bottom: 0;left: 0;right: 0;display: flex;">
|
||||
<div class="prev">
|
||||
<van-button @click="changeIssue(false)" type="info" :disabled="currentIssueIndex<=0">
|
||||
上一题
|
||||
</van-button>
|
||||
</div>
|
||||
<div>
|
||||
得分:{{ getScore() }}
|
||||
</div>
|
||||
<div class="next">
|
||||
<!-- <template v-if="hasAnswerIssueIds.length === issueList.length">-->
|
||||
<!-- <van-button>-->
|
||||
<!-- 回答完毕-->
|
||||
<!-- </van-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-else>-->
|
||||
<van-button v-if="!hasAnswerIssueIds.includes(currentIssueId)"
|
||||
type="info"
|
||||
:disabled="currentSelectedWors.length===0" @click="confirmAnswer">
|
||||
确认答案
|
||||
</van-button>
|
||||
|
||||
<van-button v-else
|
||||
type="info"
|
||||
:disabled="currentIssueIndex === todayIssueList.length-1"
|
||||
@click="changeIssue(true)">
|
||||
下一题
|
||||
</van-button>
|
||||
<!-- </template>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="win-info-button" @click="showWinInfo">
|
||||
获奖信息
|
||||
</div>-->
|
||||
|
||||
<van-popup v-model="winPopupShow" class="winPopup" :style="{ height: '100%' }">
|
||||
<div>每人仅有一次机会</div>
|
||||
<img v-if="isWin" width="100%" height="60%" style="margin-top: 100px"
|
||||
src="/assets/mobile/img/question/win.png"/>
|
||||
<img v-if="!isWin" width="100%" height="80%" src="/assets/mobile/img/question/noWin.png"/>
|
||||
<div class="iconDiv">
|
||||
<van-icon @click="winPopupShow = false" name="close"></van-icon>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
questionData: {},
|
||||
currentIssueIndex: 0,
|
||||
currentIssue: null,
|
||||
currentSelectedWors: [],
|
||||
replyInfo: [],
|
||||
todayStr: moment(new Date()).format('YYYY-MM-DD') + ' 00:00:00',
|
||||
winPopupShow: false,
|
||||
winList: [],
|
||||
isWin: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentIssueId() {
|
||||
return this.currentIssue ? this.currentIssue.iid : null
|
||||
},
|
||||
issueList() {
|
||||
if (this.questionData && this.questionData.issues && this.questionData.issues.length) {
|
||||
return this.questionData.issues
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
todayIssueList() {
|
||||
if (this.issueList && this.issueList.length > 0) {
|
||||
return this.issueList.filter(v => v.displayDate === this.todayStr)
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
correctWorsText() {
|
||||
return this.currentIssue && this.currentIssue.wors.filter(v => v.correct).map(v => v.wtxt).join('、')
|
||||
},
|
||||
currentIssueMyAnswer() {
|
||||
return this.currentSelectedWors.map(v => v.wtxt).join('、')
|
||||
},
|
||||
//该题是否回答正确
|
||||
currentIssueAnswerResult() {
|
||||
const userSelectWorIds = this.currentSelectedWors.map(v => v.wid).slice().sort()
|
||||
if (this.currentIssue) {
|
||||
const correctWorIds = this.currentIssue.wors.filter(v => v.correct).map(v => v.wid).slice().sort()
|
||||
return userSelectWorIds.length === correctWorIds.length && correctWorIds.every(v => userSelectWorIds.includes(v))
|
||||
}
|
||||
return false
|
||||
},
|
||||
//已经回答的题目
|
||||
hasAnswerIssueIds() {
|
||||
if (this.replyInfo && this.replyInfo.length) {
|
||||
return this.replyInfo.map(v => v.issueId)
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
todayScore() {
|
||||
return this.todayIssueList.filter(v => {
|
||||
const correctWids = v.wors.filter(v => v.correct).map(v => v.wid)
|
||||
const rwids = this.replyInfo.filter(v => v.issueId === v.iid).map(v => v.rwid)
|
||||
if (rwids && rwids.length > 0 && rwids.every(r => correctWids.includes(r))) {
|
||||
return v
|
||||
}
|
||||
}).map(v => v.fraction).reduce((a, b) => {
|
||||
return a + b
|
||||
}, 0)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async getQuestionData() {
|
||||
const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id)
|
||||
this.questionData = resp.data
|
||||
},
|
||||
|
||||
//获取回答信息
|
||||
async getReply() {
|
||||
const resp = await $.get('/mobile/question/h5/answerInfo/' + this.id)
|
||||
this.replyInfo = resp.data
|
||||
},
|
||||
|
||||
//点击选项
|
||||
optionSelect(issue, wor) {
|
||||
if (this.hasAnswerIssueIds.includes(issue.iid)) {
|
||||
return
|
||||
}
|
||||
this.currentIssue = issue
|
||||
if (this.currentIssue.itx === 1) {
|
||||
if (this.currentIssue.iisdx) {
|
||||
//单选
|
||||
this.currentSelectedWors = [wor]
|
||||
} else {
|
||||
//多选
|
||||
const idx = this.currentSelectedWors.findIndex(v => v.wid === wor.wid)
|
||||
if (idx > -1) {
|
||||
this.currentSelectedWors.splice(idx, 1)
|
||||
} else {
|
||||
this.currentSelectedWors.push(wor)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//确认答案
|
||||
async confirmAnswer() {
|
||||
if (this.questionData.qdtkssj && this.questionData.qdtjssj) {
|
||||
const startTimes = this.questionData.qdtkssj.split(':')
|
||||
const endTimes = this.questionData.qdtjssj.split(':')
|
||||
const nows = moment(new Date()).format('HH:mm:ss').split(':')
|
||||
|
||||
let startTime = new Date()
|
||||
startTime.setHours(startTimes[0])
|
||||
startTime.setMinutes(startTimes[1])
|
||||
startTime.setSeconds(startTimes[2])
|
||||
|
||||
let endTime = new Date()
|
||||
endTime.setHours(endTimes[0])
|
||||
endTime.setMinutes(endTimes[1])
|
||||
endTime.setSeconds(endTimes[2])
|
||||
|
||||
let nowTime = new Date()
|
||||
nowTime.setHours(nows[0])
|
||||
nowTime.setMinutes(nows[1])
|
||||
nowTime.setSeconds(nows[2])
|
||||
|
||||
|
||||
if (nowTime < startTime || nowTime > endTime) {
|
||||
this.$modal.msg('不在答题时间范围内')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (this.questionData.answerTotalSum && this.questionData.answerTotalSum > 0) {
|
||||
const {data: canAnswer} = await $.get('/mobile/question/h5/canAnswer', {questionId: this.questionData.qid})
|
||||
if (!canAnswer) {
|
||||
this.$modal.msg('答题次数已超上限')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (this.questionData.qrkdcs && this.questionData.qrkdcs > 0) {
|
||||
const {data: canAnswer} = await $.get('/mobile/question/h5/canAnswer', {questionId: this.questionData.qid})
|
||||
if (!canAnswer) {
|
||||
this.$modal.msg('今日答题次数已超上限')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.$modal.loading('提交中')
|
||||
|
||||
//用户选择的答案
|
||||
const userSelectWorIds = this.currentSelectedWors.map(v => v.wid).slice().sort()
|
||||
|
||||
const formData = []
|
||||
userSelectWorIds.forEach(v => {
|
||||
formData.push({
|
||||
qid: this.questionData.qid,
|
||||
issueId: this.currentIssue.iid,
|
||||
rwid: v,
|
||||
save: false
|
||||
})
|
||||
})
|
||||
|
||||
$.post('/mobile/question/h5/saveAnswer2', {replies: JSON.stringify(formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
const getReplyPromise = () => {
|
||||
return new Promise(async resolve => {
|
||||
await this.getReply()
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
getReplyPromise().then(() => {
|
||||
this.checkTodayReplyFinish()
|
||||
})
|
||||
this.$modal.closeLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
async checkTodayReplyFinish() {
|
||||
if (this.issueList.map(x => x.iid).every(x => this.replyInfo.map(v => v.issueId).includes(x))) {
|
||||
// this.$modal.msg('全部答题完成')
|
||||
this.$modal.confirm('全部答题完成,是否重新答题?').then(async () => {
|
||||
const {code} = await $.post('/mobile/question/h5/answerAgain', {questionId: this.questionData.qid})
|
||||
await this.getReply()
|
||||
const {ctMode} = this.questionData
|
||||
this.initCurrentIssueInfo(this.questionData.issues.find(v => v.displayDate && v.displayDate.includes(moment(new Date()).format('YYYY-MM-DD'))).iid)
|
||||
})
|
||||
|
||||
} else if (this.todayIssueList.map(x => x.iid).every(x => this.replyInfo.map(v => v.issueId).includes(x))) {
|
||||
const score = this.getScore()
|
||||
const {data: scoreMap} = await $.get('/mobile/question/h5/todayMaxScore', {questionId: this.questionData.qid})
|
||||
const scoreValues = Object.values(scoreMap)
|
||||
let msg = null
|
||||
if (scoreValues.length > 1) {
|
||||
const maxScore = Math.max(...scoreValues)
|
||||
msg = '今日答题已完成,您当前分数为' + score + ',历史最高分为' + maxScore + ',是否重新答题?'
|
||||
} else {
|
||||
msg = '今日答题已完成,您当前分数为' + score + ',是否重新答题?'
|
||||
}
|
||||
|
||||
this.$modal.confirm(msg).then(async () => {
|
||||
const {code} = await $.post('/mobile/question/h5/answerAgain', {questionId: this.questionData.qid})
|
||||
await this.getReply()
|
||||
const {ctMode} = this.questionData
|
||||
this.initCurrentIssueInfo(this.questionData.issues.find(v => v.displayDate && v.displayDate.includes(moment(new Date()).format('YYYY-MM-DD'))).iid)
|
||||
|
||||
/*if (ctMode === 2) {
|
||||
this.initCurrentIssueInfo(this.questionData.issues.find(v => v.displayDate && v.displayDate.includes(moment(new Date()).format('YYYY-MM-DD'))).iid)
|
||||
} else {
|
||||
this.initCurrentIssueInfo(this.questionData.issues[0].iid)
|
||||
}*/
|
||||
})
|
||||
} else if (this.replyInfo.map(v => v.issueId).length === 0) {
|
||||
|
||||
}
|
||||
},
|
||||
initCurrentIssueInfo(issueId) {
|
||||
if (issueId) {
|
||||
this.currentIssue = this.questionData.issues.find(v => v.iid === issueId)
|
||||
this.currentIssueIndex = this.todayIssueList.findIndex(v => v.iid === issueId)
|
||||
this.currentSelectedWors = this.currentIssue.wors.filter(v => this.replyInfo.filter(v => v.issueId === issueId).map(v => v.rwid).includes(v.wid))
|
||||
}
|
||||
},
|
||||
changeIssue(isNext) {
|
||||
const index = isNext ? this.currentIssueIndex + 1 : this.currentIssueIndex - 1
|
||||
const issueId = this.todayIssueList[index].iid
|
||||
this.currentSelectedWors = []
|
||||
this.initCurrentIssueInfo(issueId)
|
||||
},
|
||||
getScore() {
|
||||
let sum = 0
|
||||
if (this.replyInfo && this.replyInfo.length > 0) {
|
||||
this.todayIssueList.forEach(v => {
|
||||
const correctWids = v.wors.filter(x => x.correct).map(x => x.wid)
|
||||
const rwids = this.replyInfo.filter(x => x.issueId === v.iid).map(x => x.rwid)
|
||||
const eq = correctWids.length === rwids.length && correctWids.sort().toString() === rwids.sort().toString();
|
||||
if (eq) {
|
||||
sum += v.fraction
|
||||
}
|
||||
})
|
||||
}
|
||||
return sum
|
||||
},
|
||||
async showWinInfo() {
|
||||
const {data} = await $.post('/mobile/question/h5/winInfo', {questionId: this.questionData.qid})
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const user = data.find(o => o.id === userId)
|
||||
this.isWin = user !== undefined
|
||||
this.winList = data
|
||||
console.log(this.isWin)
|
||||
vant.Dialog.alert({
|
||||
message: '每人仅有一次中奖机会喔,点击查询获奖信息。'
|
||||
}).then(() => {
|
||||
this.winPopupShow = true
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
await this.getQuestionData()
|
||||
await this.getReply()
|
||||
const {ctMode} = this.questionData
|
||||
|
||||
this.initCurrentIssueInfo(this.questionData.issues.find(v => v.displayDate && v.displayDate.includes(moment(new Date()).format('YYYY-MM-DD')))?.iid)
|
||||
/* if (ctMode === 2) {
|
||||
this.initCurrentIssueInfo(this.questionData.issues.find(v => v.displayDate && v.displayDate.includes(moment(new Date()).format('YYYY-MM-DD'))).iid)
|
||||
} else {
|
||||
this.initCurrentIssueInfo(this.questionData.issues[0].iid)
|
||||
}*/
|
||||
const {data: scoreMap} = await $.get('/mobile/question/h5/todayMaxScore', {questionId: this.questionData.qid})
|
||||
const scoreValues = Object.values(scoreMap)
|
||||
let msg = null
|
||||
console.log(scoreValues)
|
||||
if (scoreValues.length >= 1 && this.todayIssueList.map(x => x.iid).some(x => !this.replyInfo.map(v => v.issueId).includes(x))) {
|
||||
console.log(111)
|
||||
const maxScore = Math.max(...scoreValues)
|
||||
msg = '您历史的最高分数为' + maxScore + '分!'
|
||||
this.$modal.confirm(msg).then(async () => {
|
||||
|
||||
})
|
||||
} else {
|
||||
this.checkTodayReplyFinish()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,391 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.page-survey {
|
||||
background-color: rgba(242, 242, 242, 1);
|
||||
}
|
||||
|
||||
.page-survey .survey-container {
|
||||
height: 100%;
|
||||
overflow: visible;
|
||||
padding-top: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.survey-container .question-list {
|
||||
flex: auto;
|
||||
padding-bottom: 84px;
|
||||
}
|
||||
|
||||
.question {
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.question-head {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.question-tags {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.question-title {
|
||||
position: relative;
|
||||
font-size: 1.125em;
|
||||
font-weight: normal;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.question-seq {
|
||||
display: block;
|
||||
margin-right: 8px;
|
||||
font-size: 18px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.question-title .text {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.question-body {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.van-checkbox {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
.page-control {
|
||||
padding: 20px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-gap: 20px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.survey-head {
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.survey-head .title {
|
||||
font-size: 22px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.survey-head .desc {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="root">
|
||||
<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>
|
||||
<template v-if="!mLoading">
|
||||
<div v-if="finishAnswer">
|
||||
{{finishAnswer}}
|
||||
<van-empty description="您已经答完该问卷">
|
||||
<div>
|
||||
<van-button type="info" @click="viewScore">查看成绩</van-button>
|
||||
<van-button type="info" @click="viewAnswerSheet">查看答卷</van-button>
|
||||
<!-- <van-button type="info" @click="answerAgain">再答一次</van-button>-->
|
||||
</div>
|
||||
</van-empty>
|
||||
</div>
|
||||
<div v-else class="page-survey" style="touch-action: manipulation;min-height: 100vh;">
|
||||
<div class="survey-container">
|
||||
|
||||
<div class="survey-head">
|
||||
<div class="title">
|
||||
{{questionData.qtitle}}
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{titleMsg}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="question-list">
|
||||
<section v-for="(issue,issueIdx) in issueList" :key="issue.iid" class="question"
|
||||
:id="'issue'+issue.iid">
|
||||
<div class="question-head">
|
||||
<div class="question-tags">
|
||||
<template v-if="issue.itx===1">
|
||||
<van-tag :type="issue.iisdx?'primary':'warning'">{{issue.iisdx?'单选':'多选'}}
|
||||
</van-tag>
|
||||
</template>
|
||||
<van-tag v-if="issue.fraction" type="primary">{{issue.fraction}}分</van-tag>
|
||||
</div>
|
||||
<h2 class="question-title">
|
||||
<span class="question-seq">
|
||||
<b>
|
||||
{{issueIdx+1}}
|
||||
</b>
|
||||
</span>
|
||||
<div class="text" v-html="issue.iname"></div>
|
||||
</h2>
|
||||
|
||||
</div>
|
||||
<div class="question-body">
|
||||
<van-checkbox-group v-model="issue.userSelect" :ref="'checkboxGroup'+issue.iid">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
v-for="(item,index) in issue.wors"
|
||||
clickable
|
||||
:key="item"
|
||||
:title="item.wtxt"
|
||||
@click="toggle(issue,item.wid)"
|
||||
>
|
||||
<template #icon>
|
||||
<van-checkbox :name="item.wid" :ref="'checkboxes'+item.wid"
|
||||
:shape="issue.iisdx?'round':'square'"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="page-control">
|
||||
<van-button type="info" block @click="save()">保存</van-button>
|
||||
<van-button type="info" block @click="submit()">提交</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const BASE_URL = '/mobile/question/h5ctgu'
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
questionData: {
|
||||
issues: []
|
||||
},
|
||||
currentIssueIndex: 0,
|
||||
replyInfo: [],
|
||||
finishAnswer: false,
|
||||
mLoading: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
issueList() {
|
||||
return this.questionData.issues
|
||||
},
|
||||
titleMsg() {
|
||||
debugger
|
||||
const radios = this.issueList.filter(v => v.itx === 1 && v.iisdx)
|
||||
const checkBoxes = this.issueList.filter(v => v.itx === 1 && !v.iisdx)
|
||||
|
||||
const radioScore = radios.length > 0 ? radios[0].fraction : 0
|
||||
const checkBoxesScore = checkBoxes.length > 0 ? checkBoxes[0].fraction : 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 sumScore = radioScoreSum + checkBoxesScoreSum
|
||||
|
||||
return "说明:单选题" + radios.length + "题,每题" + radioScore + "分,合计" + radioScoreSum + "分;多选题" + checkBoxes.length + "题,每题" + checkBoxesScore + "分,合计" + checkBoxesScoreSum + "分;总分" + sumScore + "分。"
|
||||
|
||||
},
|
||||
|
||||
fullScore() {
|
||||
return this.issueList.map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b)
|
||||
},
|
||||
radioNum() {
|
||||
return this.issueList.filter(v => v.idx === 1 && v.iisdx).map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b)
|
||||
},
|
||||
checkBoxNum() {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getQuestionData() {
|
||||
const resp = await $.get(BASE_URL + '/questionInfo/' + this.id)
|
||||
this.questionData = resp.data
|
||||
this.questionData.issues.forEach(i => {
|
||||
// i.userSelect = null
|
||||
})
|
||||
|
||||
},
|
||||
toggle(issue, worId) {
|
||||
//单选
|
||||
if (issue.iisdx) {
|
||||
vue.$refs['checkboxGroup' + issue.iid][0].toggleAll(false)
|
||||
} else {
|
||||
|
||||
}
|
||||
console.log(issue.userSelect)
|
||||
this.$refs['checkboxes' + worId][0].toggle()
|
||||
setTimeout(() => {
|
||||
console.log(issue.userSelect)
|
||||
})
|
||||
},
|
||||
|
||||
save() {
|
||||
this.$modal.confirm('保存后下次可继续做答,您确定要保存吗?').then(async () => {
|
||||
const replies = this.questionData.issues.map(v => {
|
||||
return {
|
||||
qid: v.iid,
|
||||
issueId: v.iid,
|
||||
userSelect: v.userSelect,
|
||||
}
|
||||
})
|
||||
|
||||
const {code} = await $.post(BASE_URL + '/saveAnswer', {
|
||||
replies: JSON.stringify(replies),
|
||||
questionId: this.questionData.qid,
|
||||
isSave: true
|
||||
})
|
||||
this.$modal.closeLoading()
|
||||
if (code === 0) {
|
||||
this.$modal.msg('保存成功')
|
||||
} else {
|
||||
this.$modal.msg('保存失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
const iids = this.questionData.issues.filter(v => !v.userSelect).map(v => v.iid)
|
||||
|
||||
if (iids.length > 0) {
|
||||
vant.Toast('您还有' + iids.length + '题未作答,请答完后再提交!')
|
||||
document.getElementById('issue' + iids[0]).scrollIntoView({behavior: 'smooth', block: 'center','inline':'start'});
|
||||
return
|
||||
}
|
||||
|
||||
const msg = '一旦提交不可修改,您确定要提交吗?'
|
||||
|
||||
this.$modal.confirm(msg).then(async () => {
|
||||
const replies = this.questionData.issues.map(v => {
|
||||
return {
|
||||
qid: v.iid,
|
||||
issueId: v.iid,
|
||||
userSelect: v.userSelect,
|
||||
}
|
||||
})
|
||||
|
||||
const {code} = await $.post(BASE_URL + '/saveAnswer', {
|
||||
replies: JSON.stringify(replies),
|
||||
questionId: this.questionData.qid,
|
||||
isSave: false
|
||||
})
|
||||
this.$modal.closeLoading()
|
||||
if (code === 0) {
|
||||
this.$modal.msg('提交成功')
|
||||
await this.checkUserFinishAnswer()
|
||||
if (this.finishAnswer) {
|
||||
//查看分数
|
||||
this.viewScore()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取回答信息
|
||||
async getReply() {
|
||||
const resp = await $.get(BASE_URL + '/answerInfo/' + this.id)
|
||||
this.replyInfo = resp.data
|
||||
},
|
||||
//用户是否全部答完提交
|
||||
async checkUserFinishAnswer() {
|
||||
this.mLoading = true
|
||||
const resp = await $.get(BASE_URL + '/checkUserFinishAnswer', {questionId: this.id})
|
||||
setTimeout(async () => {
|
||||
this.mLoading = false
|
||||
this.finishAnswer = resp.data
|
||||
if (resp.data) {
|
||||
|
||||
} else {
|
||||
await this.getReply()
|
||||
await this.assignmentAnswer()
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
|
||||
//答案赋值
|
||||
assignmentAnswer() {
|
||||
this.questionData.issues.forEach(issue => {
|
||||
const rwids = this.replyInfo.filter(v => v.issueId === issue.iid).map(v => v.rwid)
|
||||
rwids.forEach(rwid => {
|
||||
this.toggle(issue, rwid)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
answerAgain() {
|
||||
this.finishAnswer = false
|
||||
setTimeout(() => {
|
||||
this.questionData.issues.forEach(issue => {
|
||||
issue.wors.forEach(wor => {
|
||||
this.$refs['checkboxes' + wor.wid][0].toggle(false)
|
||||
})
|
||||
})
|
||||
}, 0)
|
||||
},
|
||||
|
||||
viewScore() {
|
||||
window.location.href = BASE_URL + '/score?id=' + this.id
|
||||
},
|
||||
viewAnswerSheet(){
|
||||
window.location.href = BASE_URL + '/answerSheet?id=' + this.id
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
await this.getQuestionData()
|
||||
await this.checkUserFinishAnswer()
|
||||
// await this.getReply()
|
||||
// this.assignmentAnswer()
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('pageshow', async e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.id = GetQueryString("id")
|
||||
await vue.getQuestionData()
|
||||
await vue.checkUserFinishAnswer()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,464 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.middle-subject {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #f6f7f9;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-info-padding {
|
||||
padding: 10px;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.middle-subject-info-scroll {
|
||||
/*height: 100%;*/
|
||||
height: calc(100vh - 110px);
|
||||
max-height: calc(100vh - 110px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.middle-subject-info-head {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-icon {
|
||||
width: 30px;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
background-color: #1678ff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 0 0 5px 5px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.middle-subject-title {
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bolder;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.middle-subject-other {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.middle-subject-topic {
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 1rem;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 2px 2px 12px 4px rgba(0, 0, 0, 0.1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-topic-title {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.middle-subject-topic-submit {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-desc {
|
||||
color: rgb(160, 160, 160);
|
||||
text-align: left;
|
||||
margin-left: 20px;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.itx_field {
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dcdfe6;
|
||||
box-sizing: border-box;
|
||||
color: #606266;
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
outline: none;
|
||||
padding: 0 15px;
|
||||
transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.middle-subject-topic-submit .u-btn {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.middle-subject-info-search {
|
||||
position: absolute;
|
||||
bottom: 45%;
|
||||
right: 0;
|
||||
height: 40px;
|
||||
z-index: 999;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 0 20px rgb(230, 230, 230);
|
||||
border-radius: 20px 0 0 20px;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-icon {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-info {
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
height: inherit;
|
||||
z-index: 999;
|
||||
align-items: center;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
max-height: 64px;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 0 20px rgb(230, 230, 230);
|
||||
z-index: 999;
|
||||
padding: 10px 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save .van-button {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.wsm {
|
||||
max-height: 80px;
|
||||
/*overflow: scroll;*/
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.wsm * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wsm p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wsmPopup {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="middle-subject">
|
||||
<van-nav-bar title="在线调查" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="middle-subject-info">
|
||||
<div class="middle-subject-info-scroll">
|
||||
<div class="middle-subject-info-padding">
|
||||
<div class="middle-subject-info-head">
|
||||
<div class="middle-subject-title">{{ questionData.qtitle }}</div>
|
||||
<div class="middle-subject-other">
|
||||
<template v-if="questionData.qlx!==3">
|
||||
<!-- <span>创建人:{{ questionData.username }}</span>-->
|
||||
<!-- <span>总题数:{{ issueList.length }}</span>-->
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-body">
|
||||
<div class="middle-subject-topic" v-for="(issue,issueIndex) in issueList" :key="issue.qid">
|
||||
<div v-if="!issue.iisdx" class="middle-subject-topic-icon">
|
||||
<span>多选</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span v-if="issue.iisbd" style="color: red;">*</span>
|
||||
<span class="middle-subject-topic-title">
|
||||
{{ issueIndex + 1 }}.
|
||||
{{ removeHTMLTag(issue.iname) }}
|
||||
<span v-if="issue.iminselect">(最少选择:{{issue.iminselect}})</span>
|
||||
<span v-if="issue.imaxselect">(最多选择:{{issue.imaxselect}})</span>
|
||||
<div v-if="issue.its" class="middle-subject-topic-desc"
|
||||
style="margin-left: 17px;font-size: 12px;font-weight: 500;">
|
||||
{{ issue.its }}
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 选择题 -->
|
||||
<template v-if="issue.itx===1">
|
||||
<!-- 单选题 -->
|
||||
<van-radio-group v-if="issue.iisdx" v-model="issue.rwid" :disabled="replyFinish">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="wor.wid">
|
||||
<van-radio :ref="wor.wid" :name="wor.wid">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-radio>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px"
|
||||
:src="'/file_server/fileStreamPreview?id='+wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
<div class="wsm" v-html="wor.wsm" @click="openWsm(wor.wsm)"></div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-radio-group>
|
||||
|
||||
<!-- 多选题 -->
|
||||
<van-checkbox-group v-else-if="!issue.iisdx" v-model="issue.rwid"
|
||||
:disabled="replyFinish"
|
||||
:max="issue.imaxselect ? issue.imaxselect:0">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="worIndex">
|
||||
<van-checkbox :ref="wor.wid" :name="wor.wid" shape="square">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-checkbox>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px"
|
||||
:src="'/file_server/fileStreamPreview?id='+wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
<div class="wsm" v-html=" wor.wsm" @click="openWsm(wor.wsm)"></div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
</template>
|
||||
|
||||
<!-- 填空题 -->
|
||||
<template v-if="issue.itx===2">
|
||||
<van-field v-model="issue.rval" type="text" border
|
||||
class="itx_field"
|
||||
cursor-spacing="100"
|
||||
:show-confirmbar="false"
|
||||
:disabled="replyFinish" :auto-height="true" maxlength="2000"></van-field>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-footer">
|
||||
<div class="middle-subject-info-footer-save">
|
||||
<van-button size="medium" type="primary" @click="saveAnswer"
|
||||
:disabled="replyFinish">保存
|
||||
</van-button>
|
||||
<van-button size="medium" type="info" :disabled="replyFinish"
|
||||
@click="submitAnswer">
|
||||
提交
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="wsmPopup" round :style="{ height: '80%',width:'90%' }">
|
||||
<div v-html="wsmContent" class="wsmPopup"></div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
questionData: {},
|
||||
issueList: [],
|
||||
replyInfo: [],
|
||||
wsmContent: null,
|
||||
wsmPopup: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
letterList() {
|
||||
const alphabet = Array.from(new Array(26), (ele, index) => {
|
||||
return String.fromCharCode(65 + index);
|
||||
})
|
||||
return alphabet
|
||||
},
|
||||
replyFinish() {
|
||||
return this.replyInfo.some(v => !v.save)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openWsm(content) {
|
||||
this.wsmContent = content
|
||||
this.wsmPopup = true
|
||||
},
|
||||
|
||||
async getQuestionData() {
|
||||
const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id)
|
||||
this.questionData = resp.data
|
||||
this.issueList = this.questionData && this.questionData.issues
|
||||
},
|
||||
saveAnswer() {
|
||||
const formData = this.formatFormData()
|
||||
formData.forEach(v => v.save = true)
|
||||
this.$modal.loading('保存中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('保存成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('保存失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAnswer() {
|
||||
const formData = this.formatFormData()
|
||||
formData.forEach(v => v.save = false)
|
||||
this.$modal.confirm('您确定要提交吗?提交后不能修改!').then(() => {
|
||||
this.$modal.loading('提交中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('提交成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('提交失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
validAnswer() {
|
||||
|
||||
},
|
||||
|
||||
//格式化提交数据
|
||||
formatFormData() {
|
||||
const formData = []
|
||||
this.issueList.forEach(v => {
|
||||
if (v.itx === 1 && v.iisdx) {
|
||||
//单选
|
||||
if (v.rwid) {
|
||||
formData.push({
|
||||
"rwid": v.rwid,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 1 && !v.iisdx) {
|
||||
//多选
|
||||
if (v.rwid) {
|
||||
v.rwid.forEach(r => {
|
||||
formData.push({
|
||||
"rwid": r,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 2) {
|
||||
if (v.rval) {
|
||||
formData.push({
|
||||
"rval": v.rval,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return formData
|
||||
},
|
||||
//获取回答信息并赋值
|
||||
async getReply() {
|
||||
const resp = await $.get('/mobile/question/h5/answerInfo/' + this.id)
|
||||
this.replyInfo = resp.data
|
||||
this.issueList.forEach((issue, issueIndex) => {
|
||||
if (issue.itx === 1 && issue.iisdx) {
|
||||
//单选
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rw ? rw.rwid : null)
|
||||
} else if (issue.itx === 1 && !issue.iisdx) {
|
||||
//多选
|
||||
const rws = this.replyInfo.filter(answer => answer.issueId === issue.iid).map(v => v.rwid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rws ? rws : [])
|
||||
} else if (issue.itx === 2) {
|
||||
//填空题
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rval', rw ? rw.rval : null)
|
||||
}
|
||||
})
|
||||
},
|
||||
defaultChecked() {
|
||||
const itx = this.issueList[0]['itx']
|
||||
const iisdx = this.issueList[0]['iisdx']
|
||||
|
||||
//判断用户是否选过 并且是选择题才可以
|
||||
if (this.replyInfo.length === 0 && itx === 1) {
|
||||
if (iisdx) {
|
||||
const defaultOption = this.issueList[0]['wors'].find(v => v.wismr === true)
|
||||
this.$set(this.issueList[0], 'rwid', defaultOption ? defaultOption.rwid : null)
|
||||
} else {
|
||||
const defaultOptionIds = this.issueList[0]['wors'].filter(v => v.wismr === true).map(v => v.wid)
|
||||
this.$set(this.issueList[0], 'rwid', defaultOptionIds ? defaultOptionIds : [])
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
await this.getQuestionData()
|
||||
await this.getReply()
|
||||
// await this.defaultChecked()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,323 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.page-survey {
|
||||
background-color: rgba(242, 242, 242, 1);
|
||||
}
|
||||
|
||||
.page-survey .survey-container {
|
||||
height: 100%;
|
||||
overflow: visible;
|
||||
padding-top: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.survey-container .question-list {
|
||||
flex: auto;
|
||||
padding-bottom: 84px;
|
||||
}
|
||||
|
||||
.question {
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.question-head {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.question-tags {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.question-title {
|
||||
position: relative;
|
||||
font-size: 1.125em;
|
||||
font-weight: normal;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.question-seq {
|
||||
display: block;
|
||||
margin-right: 8px;
|
||||
font-size: 18px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.question-title .text {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.question-body {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.van-checkbox {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
.page-control {
|
||||
padding: 20px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-gap: 20px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.survey-head {
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.survey-head .title {
|
||||
font-size: 22px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.survey-head .desc {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Indie Flower';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(/assets/platform/fonts/m8JVjfNVeKWVnh3QMuKkFcZVaUuH.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
.survey-head .score{
|
||||
color: red;
|
||||
font-family: 'Indie Flower', cursive;
|
||||
font-size: 30px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.question-footer {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.van-checkbox--disabled .van-checkbox__icon--checked .van-icon {
|
||||
color: #fff;
|
||||
background-color: #1989fa;
|
||||
border-color: #1989fa;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="page-survey" style="touch-action: manipulation;min-height: 100vh;">
|
||||
<div class="survey-container">
|
||||
|
||||
<div class="survey-head">
|
||||
<div class="title">
|
||||
{{questionData.qtitle}}
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{titleMsg}}
|
||||
</div>
|
||||
<div class="score">
|
||||
{{score}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="question-list">
|
||||
<section v-for="(issue,issueIdx) in issueList" :key="issue.iid" class="question"
|
||||
:id="'issue'+issue.iid">
|
||||
<div class="question-head">
|
||||
<div class="question-tags">
|
||||
<template v-if="issue.itx===1">
|
||||
<van-tag :type="issue.iisdx?'primary':'warning'">{{issue.iisdx?'单选':'多选'}}
|
||||
</van-tag>
|
||||
</template>
|
||||
<van-tag v-if="issue.fraction" type="primary">{{issue.fraction}}分</van-tag>
|
||||
</div>
|
||||
<h2 class="question-title">
|
||||
<span class="question-seq">
|
||||
<b>
|
||||
{{issueIdx+1}}
|
||||
</b>
|
||||
</span>
|
||||
<div class="text" v-html="issue.iname"></div>
|
||||
</h2>
|
||||
|
||||
</div>
|
||||
<div class="question-body">
|
||||
<van-checkbox-group v-model="issue.userSelect" :ref="'checkboxGroup'+issue.iid" disabled>
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
v-for="(item,index) in issue.wors"
|
||||
clickable
|
||||
:key="item"
|
||||
:title="item.wtxt"
|
||||
>
|
||||
<template #label>
|
||||
<div>
|
||||
{{item.correct?'正确答案':''}}
|
||||
</div>
|
||||
</template>
|
||||
<template #icon>
|
||||
<van-checkbox :name="item.wid" :ref="'checkboxes'+item.wid"
|
||||
:shape="issue.iisdx?'round':'square'"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
<div class="question-footer" v-if="replyInfo">
|
||||
<div>
|
||||
<div style="display: flex;align-items: center;"
|
||||
:style="{color:(issue.isEqual?'#15db81':'red')}">
|
||||
{{issue.isEqual?'回答正确':'回答错误'}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
const BASE_URL = '/mobile/question/h5ctgu'
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
questionData: {
|
||||
issues: []
|
||||
},
|
||||
currentIssueIndex: 0,
|
||||
replyInfo: [],
|
||||
finishAnswer: false,
|
||||
mLoading: true,
|
||||
score: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
issueList() {
|
||||
return this.questionData.issues
|
||||
},
|
||||
titleMsg() {
|
||||
// const radios = this.issueList.filter(v => v.itx === 1 && v.iisdx)
|
||||
// const checkBoxes = this.issueList.filter(v => v.itx === 1 && !v.iisdx)
|
||||
//
|
||||
// const radioScore = radios ? radios[0].fraction : 0
|
||||
// const checkBoxesScore = checkBoxes ? checkBoxes[0].fraction : 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 sumScore = radioScoreSum + checkBoxesScoreSum
|
||||
//
|
||||
// return "说明:单选题" + radios.length + "题,每题" + radioScore + "分,合计" + radioScoreSum + "分;多选题" + checkBoxes.length + "题,每题" + checkBoxesScore + "分,合计" + checkBoxesScoreSum + "分;总分" + sumScore + "分。"
|
||||
return null
|
||||
},
|
||||
|
||||
fullScore() {
|
||||
return this.issueList.map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b)
|
||||
},
|
||||
radioNum() {
|
||||
return this.issueList.filter(v => v.idx === 1 && v.iisdx).map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b)
|
||||
},
|
||||
checkBoxNum() {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getQuestionData() {
|
||||
const resp = await $.get(BASE_URL + '/questionInfo/' + this.id)
|
||||
this.questionData = resp.data
|
||||
},
|
||||
toggle(issue, worId) {
|
||||
//单选
|
||||
if (issue.iisdx) {
|
||||
vue.$refs['checkboxGroup' + issue.iid][0].toggleAll(false)
|
||||
} else {
|
||||
|
||||
}
|
||||
this.$refs['checkboxes' + worId][0].toggle()
|
||||
},
|
||||
async getReply() {
|
||||
const resp = await $.get(BASE_URL + '/answerInfo/' + this.id)
|
||||
this.replyInfo = resp.data
|
||||
},
|
||||
//用户是否全部答完提交
|
||||
async checkUserFinishAnswer() {
|
||||
this.mLoading = true
|
||||
const resp = await $.get(BASE_URL + '/checkUserFinishAnswer', {questionId: this.id})
|
||||
this.finishAnswer = resp.data
|
||||
if (resp.data) {
|
||||
await this.getReply()
|
||||
await this.assignmentAnswer()
|
||||
} else {
|
||||
// await this.getReply()
|
||||
// await this.assignmentAnswer()
|
||||
}
|
||||
},
|
||||
//答案赋值
|
||||
assignmentAnswer() {
|
||||
this.questionData.issues.forEach(issue => {
|
||||
const rwids = this.replyInfo.filter(v => v.issueId === issue.iid).map(v => v.rwid)
|
||||
rwids.forEach(rwid => {
|
||||
this.toggle(issue, rwid)
|
||||
})
|
||||
|
||||
const wids = issue.wors.filter(v => v.correct).map(v => v.wid)
|
||||
const userSelects = this.replyInfo.filter(v => v.issueId === issue.iid).map(v => v.rwid)
|
||||
const isEqual = wids.length === userSelects.length && wids.every(value => userSelects.includes(value))
|
||||
issue.isEqual = isEqual
|
||||
|
||||
})
|
||||
},
|
||||
checkIsCorrect(issue) {
|
||||
const wids = issue.wors.filter(v => v.correct).map(v => v.wid)
|
||||
const userSelects = this.replyInfo.filter(v => v.issueId === issue.iid).map(v => v.rwid)
|
||||
const isEqual = wids.length === userSelects.length && wids.every(value => userSelects.includes(value))
|
||||
return isEqual
|
||||
},
|
||||
async getScore() {
|
||||
const resp = await $.get(BASE_URL + '/getScore', {questionId: this.id})
|
||||
this.score = resp.data.score
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
await this.getScore()
|
||||
await this.getQuestionData()
|
||||
await this.checkUserFinishAnswer()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,163 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.transcript-container {
|
||||
background-image: url(/assets/mobile/img/question/score.jpg);
|
||||
background-size: 100% 100%;
|
||||
min-height: 100%;
|
||||
padding: 15px;
|
||||
width: 100%;
|
||||
max-width: 1128px;
|
||||
box-sizing: border-box;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.transcript-header {
|
||||
margin-bottom: 15px;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.score-detail-group {
|
||||
align-self: stretch;
|
||||
background: rgba(255, 255, 255, 0.01);
|
||||
-webkit-backdrop-filter: blur(50px);
|
||||
backdrop-filter: blur(50px);
|
||||
border-radius: 20px;
|
||||
padding: 20px 0;
|
||||
margin: 20px 0 0 0 !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
flex: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.score-total {
|
||||
margin: 40px 0;
|
||||
transform: translate3d(0px, 0px, 0px);
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
height: 120px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.score-number {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.score-text-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
line-height: 32px;
|
||||
margin-bottom: 30px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.score-text-info {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.total-number {
|
||||
font-size: 64px;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.total-percent {
|
||||
margin-top: 10px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="知识竞答分数" left-arrow placeholder fixed
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
<div class="transcript-container">
|
||||
<div class="transcript-header transcript-header-mobile">
|
||||
<div class="score-text-container">
|
||||
<div class="score-text-title">
|
||||
{{title}}
|
||||
</div>
|
||||
<div class="score-text-info">
|
||||
{{message}}
|
||||
<!-- <ul>-->
|
||||
<!-- <li>姓名:{{user.username}}</li>-->
|
||||
<!-- <li>工号:{{user.loginname}}</li>-->
|
||||
<!-- <li>单位:{{user.unitname}}</li>-->
|
||||
<!-- <li>工会:{{user.unionname}}</li>-->
|
||||
<!-- </ul>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="score-detail-group">
|
||||
<div class="score-total" style="transform: translate3d(0px, 0px, 0px);">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 88 188">
|
||||
<path fill="#fff"
|
||||
d="M41.035 41.216c1.313-.407 2.5-.657 3.844-.875 2.812-.438 5.687-.438 8.437-.094a21.44 21.44 0 01-3.188 5.25s-.125.125-.125.156c-5.468 6.062-11.999 8.78-20.123 8.75-.625-7.25 4.968-11.125 11.155-13.187zM25.63 76.244c-2.281-8.999 5.062-14.561 12.562-17.436 2.75-.937 5.655-1.437 8.53-1.625C44.38 66.87 35.223 74.682 25.63 76.244zm1.844 9.562c2.218-3.25 4.562-5.25 7.905-7.28 2.594-1.532 5.406-2.657 8.312-3.406-.656 10.53-7.78 19.998-17.623 24.06-2.375-4.75-1.25-9.03 1.406-13.374zm3.687 35.06c-5.75-7.843-.531-16.311 5.53-22.06 2.313-2.032 4.907-3.72 7.688-5.063 1.28 10.499-4.344 21.717-13.218 27.123zm9.28 19.717c-7.218-6.718-3.468-16.155 1.532-22.935 1.968-2.438 4.28-4.594 6.812-6.5 3.156 10.124-.656 22.467-8.343 29.435zm7.781.438c.625-2.406 1.406-4.312 2.563-6.5 1.5-2.812 3.437-5.406 5.624-7.749a24.494 24.494 0 012.25 6.249c1.937 8.75.125 17.812-4.906 25.186-6.25-3.906-6.874-10.499-5.53-17.186zm22.218 31.748c-9.75-3.969-9.906-14.562-7.594-23.374.969-3.187 2.375-6.187 4.125-8.968 6.718 8.656 8.093 22.592 3.468 32.342zM38.504 34.216c.938-8.655 9.437-10.999 16.936-11.03 2.782.093 5.5.625 8.156 1.437a22.477 22.477 0 01-3.968 4.469c-5.656 4.843-13.874 6.78-21.124 5.124zm7.031-16.155c7.562.219 12.687-4.874 15.686-11.343 1-2.125 1.75-4.406 2.313-6.718-2.438.062-4.844.469-7.156 1.281-6.937 2.437-12.937 9-10.843 16.78zM25.63 33.591c-.406-1.375-.812-2.718-1.312-4.062-1.032-2.906-2.313-5.75-3.719-8.468a28.868 28.868 0 00-3.843 7.812c-2.813 8.968-.531 18.123 7.218 23.686 4.593-5.75 3.468-12.343 1.656-18.968zm-6.25 42.091c3.969-7.562-.718-17.28-4.874-23.717a63.492 63.492 0 00-5.656-7.562C4.257 55.653 6.975 71.12 19.38 75.682zm-2.687 10.124c-2.156-3.53-4.437-6.25-7.312-9.218-2.28-2.312-4.718-4.5-7.312-6.468-.812 5.03-.375 10.905 1.469 15.686 3.156 7.75 7.812 12.75 16.28 14.155 1.125-5.374-.5-9.53-3.125-14.155zm8.5 37.154c.156-8.843-9.03-16.155-15.718-20.436a73.267 73.267 0 00-8.812-4.875 33.031 33.031 0 002.125 9.624c3.594 9.281 11.937 16.874 22.405 15.687zm9.843 20.904c-1.844-8.78-12.656-13.842-20.249-16.53a77.954 77.954 0 00-9.843-2.749 32.908 32.908 0 004.281 8.968c5.718 8.405 15.718 13.874 25.81 10.311zm-2.626 7.656c-2.53-.594-4.936-1-7.53-1.312-3.468-.407-6.968-.563-10.405-.532a33.547 33.547 0 006.25 7.969c.124.125.937.906 1.03.937 8.437 6.75 17.437 9.437 27.342 3.937-3.5-6.655-9.75-9.093-16.686-10.999zm34.373 26.436c-5.937-7.469-18.53-7.781-27.185-7.031a72.233 72.233 0 00-10.624 1.656 36.742 36.742 0 008.249 6.812c9.187 5.468 21.436 6.562 29.56-1.437zM33.067 31.216c6.593-4.593 6.468-14.811 5.53-21.904A60.312 60.312 0 0036.818.5c-8.75 7.843-12.25 21.905-3.75 30.717z"></path>
|
||||
<path fill="#fff"
|
||||
d="M33.629 37.56c3.5-7.219 7.062-13 11.843-19.405-5.031 6.28-8.718 11.968-12.468 19.123-8.124 16.5-11.405 30.154-11.905 48.56.312 23.748 5.374 41.184 17.967 61.276 13.062 18.999 26.654 30.592 47.528 40.435.469-1.063.937-2.125 1.406-3.156-20.342-9.437-33.623-20.561-46.528-38.904-12.561-19.53-17.748-36.497-18.467-59.683.125-18.186 3.093-31.716 10.624-48.246z"></path>
|
||||
</svg>
|
||||
<div class="score-number">
|
||||
<div class="total-number">{{score}}分</div>
|
||||
<div v-if="answerCount>1" class="total-percent">历史最高分:{{maxScore}}</div>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 88 188"
|
||||
style="transform: rotateY(180deg);">
|
||||
<path fill="#fff"
|
||||
d="M41.035 41.216c1.313-.407 2.5-.657 3.844-.875 2.812-.438 5.687-.438 8.437-.094a21.44 21.44 0 01-3.188 5.25s-.125.125-.125.156c-5.468 6.062-11.999 8.78-20.123 8.75-.625-7.25 4.968-11.125 11.155-13.187zM25.63 76.244c-2.281-8.999 5.062-14.561 12.562-17.436 2.75-.937 5.655-1.437 8.53-1.625C44.38 66.87 35.223 74.682 25.63 76.244zm1.844 9.562c2.218-3.25 4.562-5.25 7.905-7.28 2.594-1.532 5.406-2.657 8.312-3.406-.656 10.53-7.78 19.998-17.623 24.06-2.375-4.75-1.25-9.03 1.406-13.374zm3.687 35.06c-5.75-7.843-.531-16.311 5.53-22.06 2.313-2.032 4.907-3.72 7.688-5.063 1.28 10.499-4.344 21.717-13.218 27.123zm9.28 19.717c-7.218-6.718-3.468-16.155 1.532-22.935 1.968-2.438 4.28-4.594 6.812-6.5 3.156 10.124-.656 22.467-8.343 29.435zm7.781.438c.625-2.406 1.406-4.312 2.563-6.5 1.5-2.812 3.437-5.406 5.624-7.749a24.494 24.494 0 012.25 6.249c1.937 8.75.125 17.812-4.906 25.186-6.25-3.906-6.874-10.499-5.53-17.186zm22.218 31.748c-9.75-3.969-9.906-14.562-7.594-23.374.969-3.187 2.375-6.187 4.125-8.968 6.718 8.656 8.093 22.592 3.468 32.342zM38.504 34.216c.938-8.655 9.437-10.999 16.936-11.03 2.782.093 5.5.625 8.156 1.437a22.477 22.477 0 01-3.968 4.469c-5.656 4.843-13.874 6.78-21.124 5.124zm7.031-16.155c7.562.219 12.687-4.874 15.686-11.343 1-2.125 1.75-4.406 2.313-6.718-2.438.062-4.844.469-7.156 1.281-6.937 2.437-12.937 9-10.843 16.78zM25.63 33.591c-.406-1.375-.812-2.718-1.312-4.062-1.032-2.906-2.313-5.75-3.719-8.468a28.868 28.868 0 00-3.843 7.812c-2.813 8.968-.531 18.123 7.218 23.686 4.593-5.75 3.468-12.343 1.656-18.968zm-6.25 42.091c3.969-7.562-.718-17.28-4.874-23.717a63.492 63.492 0 00-5.656-7.562C4.257 55.653 6.975 71.12 19.38 75.682zm-2.687 10.124c-2.156-3.53-4.437-6.25-7.312-9.218-2.28-2.312-4.718-4.5-7.312-6.468-.812 5.03-.375 10.905 1.469 15.686 3.156 7.75 7.812 12.75 16.28 14.155 1.125-5.374-.5-9.53-3.125-14.155zm8.5 37.154c.156-8.843-9.03-16.155-15.718-20.436a73.267 73.267 0 00-8.812-4.875 33.031 33.031 0 002.125 9.624c3.594 9.281 11.937 16.874 22.405 15.687zm9.843 20.904c-1.844-8.78-12.656-13.842-20.249-16.53a77.954 77.954 0 00-9.843-2.749 32.908 32.908 0 004.281 8.968c5.718 8.405 15.718 13.874 25.81 10.311zm-2.626 7.656c-2.53-.594-4.936-1-7.53-1.312-3.468-.407-6.968-.563-10.405-.532a33.547 33.547 0 006.25 7.969c.124.125.937.906 1.03.937 8.437 6.75 17.437 9.437 27.342 3.937-3.5-6.655-9.75-9.093-16.686-10.999zm34.373 26.436c-5.937-7.469-18.53-7.781-27.185-7.031a72.233 72.233 0 00-10.624 1.656 36.742 36.742 0 008.249 6.812c9.187 5.468 21.436 6.562 29.56-1.437zM33.067 31.216c6.593-4.593 6.468-14.811 5.53-21.904A60.312 60.312 0 0036.818.5c-8.75 7.843-12.25 21.905-3.75 30.717z"></path>
|
||||
<path fill="#fff"
|
||||
d="M33.629 37.56c3.5-7.219 7.062-13 11.843-19.405-5.031 6.28-8.718 11.968-12.468 19.123-8.124 16.5-11.405 30.154-11.905 48.56.312 23.748 5.374 41.184 17.967 61.276 13.062 18.999 26.654 30.592 47.528 40.435.469-1.063.937-2.125 1.406-3.156-20.342-9.437-33.623-20.561-46.528-38.904-12.561-19.53-17.748-36.497-18.467-59.683.125-18.186 3.093-31.716 10.624-48.246z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const BASE_URL = '/mobile/question/h5ctgu'
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
score: 0,
|
||||
maxScore: 0,
|
||||
title: null,
|
||||
user: {},
|
||||
message: null,
|
||||
answerCount: 0,
|
||||
questionId: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getScore() {
|
||||
const resp = await $.get(BASE_URL + '/getScore', {questionId: this.questionId})
|
||||
this.score = resp.data.score
|
||||
this.maxScore = resp.data.maxScore
|
||||
this.title = resp.data.title
|
||||
this.user = resp.data.user
|
||||
this.answerCount = resp.data.answerCount
|
||||
this.message = resp.data.message
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.questionId = GetQueryString("id")
|
||||
this.getScore()
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,105 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="问卷调查" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
<div>
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<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 style="font-size: 12px" v-html="item.qsm"></div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
tableData: [],
|
||||
appid: 'wx9fd2b07ea126f9f6',
|
||||
redirect_uri: location.protocol + "//" + location.host,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
await this.onLoad()
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/question/list/pageData', this.pageForm).then(res => {
|
||||
this.loading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = this.redirect_uri + '/platform/zgfw/mobile/questionnaire?qid=' + id
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,347 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.container {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.top-back {
|
||||
width: 100%;
|
||||
background-color: rgb(22, 120, 255);
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.title {
|
||||
position: fixed;
|
||||
left: 40px;
|
||||
top: 110px;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
min-height: calc(100vh - 46px - 44px);
|
||||
max-height: calc(100vh - 46px - 44px);
|
||||
overflow-y: scroll;
|
||||
background: #f3f3f3;
|
||||
}
|
||||
|
||||
.quizzes-item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.quizzes-item-v {
|
||||
box-sizing: border-box;
|
||||
padding: 1rem;
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
||||
.quizzes-item-info {
|
||||
position: relative;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.quizzes-item-info-icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.quizzes-item-info-icon img {
|
||||
width: 6rem;
|
||||
height: 5rem;
|
||||
}
|
||||
|
||||
.quizzes-item-info-title {
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.quizzes-item-info-right {
|
||||
font-size: 13px;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.quizzes-item-info-tip {
|
||||
color: #606266;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.quizzes-item-info-text {
|
||||
color: #232426;
|
||||
}
|
||||
|
||||
.winPopup {
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
}
|
||||
.winPopup img{
|
||||
transform: translateY(-50%);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.winPopup .van-popup__close-icon{
|
||||
|
||||
}
|
||||
|
||||
.iconDiv {
|
||||
color: white;
|
||||
font-size: 66px;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
bottom: 90px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.win_tag{
|
||||
position: relative;
|
||||
top: 16px;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="container">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="列表" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-tabs v-model="queryForm.status" @change="doSearch">
|
||||
<van-tab title="进行中" name="1"></van-tab>
|
||||
<van-tab title="已结束" name="2"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<div class="content">
|
||||
<div v-for="(item, index) in tableData" :id="item.qid" :key="item.qid">
|
||||
<div class="quizzes-item" @click="openAnswer(item)">
|
||||
<div class="quizzes-item-v">
|
||||
<div class="quizzes-item-info">
|
||||
<div class="quizzes-item-info-icon">
|
||||
<image src="/assets/mobile/svg/question/quizzes2.svg"/>
|
||||
</div>
|
||||
<div class="quizzes-item-info-v">
|
||||
<div class="quizzes-item-info-title">{{ item.qtitle }}</div>
|
||||
<div class="quizzes-item-info-right">
|
||||
<span class="quizzes-item-info-tip">创建时间:</span>
|
||||
<span class="quizzes-item-info-text">
|
||||
{{ moment(item.createTime).format('YYYY年MM月DD日') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="quizzes-item-info-right" v-if="item.qlx!==4">
|
||||
<span class="quizzes-item-info-tip">题目数量:</span>
|
||||
<span class="quizzes-item-info-text">
|
||||
{{item.ctMode === 1 ? item.topicTotal : item.ctNum }}
|
||||
</span>
|
||||
<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>
|
||||
<!-- v-if="moment(item.startTime).diff(moment(new Date().getTime()),'days') < 0"-->
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="finished && !tableData.length" text="暂无问卷" icon-size="320"
|
||||
src="/static/img/notData.svg">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="winPopupShow" class="winPopup"
|
||||
:style="{ height: '100%' }"
|
||||
>
|
||||
<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="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"/>
|
||||
</div>
|
||||
<div class="iconDiv">
|
||||
<div v-if="isWin" style="font-size: 14px;!important;">恭喜您中奖了,本次活动中奖机会只有一次喔!</div>
|
||||
<van-icon @click="winPopupShow = false" name="close"></van-icon>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
questionStatus: '1',
|
||||
scrollTop: 0,
|
||||
statusBarHeight: 0,
|
||||
pageLoading: false,
|
||||
queryForm: {
|
||||
status: '1'
|
||||
},
|
||||
winPopupShow:false,
|
||||
isWin:false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.queryForm.type = GetQueryString("type")
|
||||
this.doSearch()
|
||||
},
|
||||
methods: {
|
||||
async showWinInfo({qid}) {
|
||||
const {data} = await $.post('/mobile/question/h5/winInfo', {questionId: qid})
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const user = data.find(o => o.id === userId)
|
||||
this.isWin = user !== undefined
|
||||
this.winList = data
|
||||
console.log(this.isWin)
|
||||
this.winPopupShow = true
|
||||
|
||||
/*vant.Dialog.alert({
|
||||
message: '每人仅有一次中奖机会喔,立即查询获奖信息。'
|
||||
}).then(() => {
|
||||
this.winPopupShow = true
|
||||
});*/
|
||||
},
|
||||
pageData() {
|
||||
this.$modal.loading()
|
||||
this.tableLoading = true
|
||||
|
||||
$.post('/mobile/question/h5/pageData', {...this.pageForm, ...this.queryForm}).then(res => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
|
||||
|
||||
// $.post('/activity/question/h5/pageData', this.pageForm, {
|
||||
// params: this.queryForm
|
||||
// }).then(res => {
|
||||
// this.tableData = this.tableData.concat(res.data.list)
|
||||
// this.pageForm.totalCount = res.data.totalCount
|
||||
// if (this.tableData.length === this.pageForm.totalCount) {
|
||||
// this.finished = true
|
||||
// } else {
|
||||
// this.pageForm.pageNumber++
|
||||
// }
|
||||
// this.tableLoading = false
|
||||
// this.$modal.closeLoading()
|
||||
// }).finally(() => {
|
||||
// this.tableLoading = false
|
||||
// this.finished = true
|
||||
// this.$modal.closeLoading()
|
||||
// })
|
||||
},
|
||||
|
||||
tabChange(index) {
|
||||
this.page.current = index;
|
||||
// this.refresh();
|
||||
},
|
||||
lower(e) {
|
||||
if (!this.finished) this.loadData();
|
||||
},
|
||||
|
||||
async hasPermissionByIssue(groupId) {
|
||||
const resp = await this.$http.get('/platform/question/applets/list/hasPermission', {
|
||||
params: {groupId: groupId}
|
||||
})
|
||||
return resp
|
||||
},
|
||||
|
||||
async openAnswer(item) {
|
||||
const {qid, qlx, qflag, activityUserScopeId} = item
|
||||
if (qflag !== 2) {
|
||||
this.$modal.msg('该问卷未发布')
|
||||
return
|
||||
}
|
||||
|
||||
const now = new Date().getTime()
|
||||
if (now < item.startTime || now > item.endTime) {
|
||||
this.$modal.msg('不在开启时间内')
|
||||
return
|
||||
}
|
||||
|
||||
if (activityUserScopeId) {
|
||||
const resp = await $.get('/mobile/question/h5/checkPermission/' + activityUserScopeId)
|
||||
if (!resp.data) {
|
||||
this.$modal.msg('您无权限参加')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (qlx === 1) {
|
||||
//调查
|
||||
location.href = '/mobile/question/h5/poll/index?id=' + qid
|
||||
} else if (qlx === 2) {
|
||||
//答题
|
||||
location.href = '/mobile/question/h5/answer/index_ctgu?id=' + qid
|
||||
} else if (qlx === 3) {
|
||||
//购物
|
||||
location.href = '/mobile/question/h5/shop/index?id=' + qid
|
||||
} else if (qlx === 4) {
|
||||
//蛋糕卡
|
||||
location.href = '/mobile/question/h5/cake/index?id=' + qid
|
||||
}
|
||||
|
||||
|
||||
// if (qlx === 4) {
|
||||
// if (item.startTime > new Date().getTime() || item.endTime < new Date().getTime()) {
|
||||
// uni.showToast({
|
||||
// title: "不在开启时间内",
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
// if (item.startTime)
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/quizzes/cakeAnswer/cakeAnswer?id=" + id
|
||||
// });
|
||||
// } else if (qlx === 2) {
|
||||
// if (activityUserScopeId) {
|
||||
// const resp = await this.hasPermissionByIssue(activityUserScopeId)
|
||||
// if (resp.code !== 0) {
|
||||
// uni.showToast({
|
||||
// title: resp.msg,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/quizzes/choiceAnswer/choiceAnswer?id=" + id
|
||||
// });
|
||||
// } else {
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/quizzes/answer?id=" + id
|
||||
// });
|
||||
// }
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,427 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<!--在线调查-->
|
||||
<style>
|
||||
.middle-subject {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #f6f7f9;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-info-padding {
|
||||
padding: 10px;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.middle-subject-info-scroll {
|
||||
/*height: 100%;*/
|
||||
height: calc(100vh - 110px);
|
||||
max-height: calc(100vh - 110px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.middle-subject-info-head {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-icon {
|
||||
width: 30px;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
background-color: #1678ff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 0 0 5px 5px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.middle-subject-title {
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bolder;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.middle-subject-other {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.middle-subject-topic {
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 1rem;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
/*box-shadow: 2px 2px 12px 4px rgba(0, 0, 0, 0.1);*/
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-topic-title {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.middle-subject-topic-submit {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-desc {
|
||||
color: rgb(160, 160, 160);
|
||||
text-align: left;
|
||||
margin-left: 20px;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.itx_field {
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dcdfe6;
|
||||
box-sizing: border-box;
|
||||
color: #606266;
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
outline: none;
|
||||
padding: 0 15px;
|
||||
transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.middle-subject-topic-submit .u-btn {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.middle-subject-info-search {
|
||||
position: absolute;
|
||||
bottom: 45%;
|
||||
right: 0;
|
||||
height: 40px;
|
||||
z-index: 999;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 0 20px rgb(230, 230, 230);
|
||||
border-radius: 20px 0 0 20px;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-icon {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-info {
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
height: inherit;
|
||||
z-index: 999;
|
||||
align-items: center;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
max-height: 64px;
|
||||
background-color: #FFF;
|
||||
/*box-shadow: 0 0 20px rgb(230, 230, 230);*/
|
||||
z-index: 999;
|
||||
padding: 10px 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save .van-button {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 70%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="middle-subject">
|
||||
<van-nav-bar title="在线调查" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="middle-subject-info">
|
||||
<div class="middle-subject-info-scroll">
|
||||
<div class="middle-subject-info-padding">
|
||||
<div class="middle-subject-info-head">
|
||||
<div class="middle-subject-title">{{ questionData.qtitle }}</div>
|
||||
<div class="middle-subject-other">
|
||||
<template v-if="questionData.qlx!==3">
|
||||
<!-- <span>创建人:{{ questionData.username }}</span>-->
|
||||
<!-- <span>总题数:{{ issueList.length }}</span>-->
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-body">
|
||||
<div class="middle-subject-topic" v-for="(issue,issueIndex) in issueList" :key="issue.qid">
|
||||
<div v-if="!issue.iisdx" class="middle-subject-topic-icon">
|
||||
<span>多选</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span v-if="issue.iisbd" style="color: red;">*</span>
|
||||
<span class="middle-subject-topic-title">
|
||||
{{ issueIndex + 1 }}.
|
||||
{{ removeHTMLTag(issue.iname) }}
|
||||
<span v-if="issue.iminselect">(最少选择:{{issue.iminselect}})</span>
|
||||
<span v-if="issue.imaxselect">(最多选择:{{issue.imaxselect}})</span>
|
||||
<div v-if="issue.its" class="middle-subject-topic-desc"
|
||||
style="margin-left: 17px;font-size: 12px;font-weight: 500;">
|
||||
{{ issue.its }}
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 选择题 -->
|
||||
<template v-if="issue.itx===1">
|
||||
<!-- 单选题 -->
|
||||
<van-radio-group v-if="issue.iisdx" v-model="issue.rwid" :disabled="replyFinish">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="wor.wid">
|
||||
<van-radio :ref="wor.wid" :name="wor.wid">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-radio>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px" :src="wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
{{ wor.wsm }}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-radio-group>
|
||||
|
||||
<!-- 多选题 -->
|
||||
<van-checkbox-group v-else-if="!issue.iisdx" v-model="issue.rwid"
|
||||
:disabled="replyFinish"
|
||||
:max="issue.imaxselect ? issue.imaxselect:0">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="worIndex">
|
||||
<van-checkbox :ref="wor.wid" :name="wor.wid" shape="square">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-checkbox>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px" :src="wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
{{ wor.wsm }}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
</template>
|
||||
|
||||
<!-- 填空题 -->
|
||||
<template v-if="issue.itx===2">
|
||||
<van-field v-model="issue.rval" type="text" border
|
||||
class="itx_field"
|
||||
cursor-spacing="100"
|
||||
:show-confirmbar="false"
|
||||
:disabled="replyFinish" :auto-height="true" maxlength="2000"/>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-footer">
|
||||
<div class="middle-subject-info-footer-save">
|
||||
<van-button size="medium" type="primary" @click="saveAnswer"
|
||||
:disabled="replyFinish">保存
|
||||
</van-button>
|
||||
<van-button size="medium" type="info" :disabled="replyFinish"
|
||||
@click="submitAnswer">
|
||||
提交
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
questionData: {},
|
||||
issueList: [],
|
||||
replyInfo: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
letterList() {
|
||||
const alphabet = Array.from(new Array(26), (ele, index) => {
|
||||
return String.fromCharCode(65 + index);
|
||||
})
|
||||
return alphabet
|
||||
},
|
||||
replyFinish() {
|
||||
return this.replyInfo.some(v => !v.save)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getQuestionData() {
|
||||
const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id)
|
||||
this.questionData = resp.data
|
||||
this.issueList = this.questionData && this.questionData.issues
|
||||
},
|
||||
saveAnswer() {
|
||||
const formData = this.formatFormData()
|
||||
formData.forEach(v => v.save = true)
|
||||
this.$modal.loading('保存中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('保存成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('保存失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAnswer() {
|
||||
const v1 = this.issueList.some(v => v.itx === 1 && v.iisbd && v.rwid == null)
|
||||
if (v1) {
|
||||
this.$modal.msg('请选择后再提交')
|
||||
return
|
||||
}
|
||||
const v2 = this.issueList.some(v => v.itx === 2 && v.iisbd && (v.rval == null || v.rval === ''))
|
||||
if (v2) {
|
||||
this.$modal.msg('请填写后再提交')
|
||||
return
|
||||
}
|
||||
|
||||
const formData = this.formatFormData()
|
||||
formData.forEach(v => v.save = false)
|
||||
this.$modal.confirm('您确定要提交吗?提交后不能修改!').then(() => {
|
||||
this.$modal.loading('提交中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('提交成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('提交失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
validAnswer() {
|
||||
|
||||
},
|
||||
|
||||
//格式化提交数据
|
||||
formatFormData() {
|
||||
const formData = []
|
||||
this.issueList.forEach(v => {
|
||||
if (v.itx === 1 && v.iisdx) {
|
||||
//单选
|
||||
if (v.rwid) {
|
||||
formData.push({
|
||||
"rwid": v.rwid,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 1 && !v.iisdx) {
|
||||
//多选
|
||||
if (v.rwid) {
|
||||
v.rwid.forEach(r => {
|
||||
formData.push({
|
||||
"rwid": r,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 2) {
|
||||
if (v.rval) {
|
||||
debugger
|
||||
formData.push({
|
||||
"rwid": v.wors[0].wid,
|
||||
"rval": v.rval,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return formData
|
||||
},
|
||||
//获取回答信息并赋值
|
||||
async getReply() {
|
||||
const resp = await $.get('/mobile/question/h5/answerInfo/' + this.id)
|
||||
this.replyInfo = resp.data
|
||||
this.issueList.forEach((issue, issueIndex) => {
|
||||
if (issue.itx === 1 && issue.iisdx) {
|
||||
//单选
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rw ? rw.rwid : null)
|
||||
} else if (issue.itx === 1 && !issue.iisdx) {
|
||||
//多选
|
||||
const rws = this.replyInfo.filter(answer => answer.issueId === issue.iid).map(v => v.rwid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rws ? rws : [])
|
||||
} else if (issue.itx === 2) {
|
||||
//填空题
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rval', rw ? rw.rval : null)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
await this.getQuestionData()
|
||||
await this.getReply()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,106 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="我的登记"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div style="margin: 20px auto 0">
|
||||
<van-list
|
||||
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)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="登记类型" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.dj_djlx==1?'幼儿园':o.dj_djlx==2?'幼升小':'小升初'}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="子女姓名">{{o.dj_znname}}</van-cell>
|
||||
<van-cell :border="false" title="出生日期" v-if="o.dj_djlx===2">{{o.dj_znzsny}}</van-cell>
|
||||
<van-cell :border="false" title="教职工姓名">{{o.jzgname}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.dwname}}</van-cell>
|
||||
<van-cell :border="false" title="所属分工会">{{o.jzgfghname}}</van-cell>
|
||||
<van-cell :border="false" title="手机号码">{{o.dj_iphone}}</van-cell>
|
||||
<van-cell :border="false" title="申请状态">
|
||||
<span v-if="o.dj_sqzt==1" style="color: #e6a23c">待院级工会审核</span>
|
||||
<span v-if="o.dj_sqzt==3" style="color: #f56c6c">院级工会审核拒绝</span>
|
||||
<span v-if="o.dj_sqzt==2" style="color: #e6a23c">待校工会审核</span>
|
||||
<span v-if="o.dj_sqzt==4" style="color: #f56c6c">校工会审核拒绝</span>
|
||||
<span v-if="o.dj_sqzt==5" style="color: #67c23a">审核通过</span>
|
||||
<span v-if="o.dj_sqzt==0">待重新提交</span>
|
||||
</van-cell>
|
||||
<image class="register-icon" src="/assets/mobile/svg/rxdj/applyEdit.svg"
|
||||
@click.stop="openEdit(o)"
|
||||
v-if="o.dj_sqzt==1||o.dj_sqzt==0"
|
||||
></image>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/zgfw/rxdjxx/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = "/platform/zgfw/mobile/rxdj/apply/info?dj_id=" + o.dj_id
|
||||
|
||||
},
|
||||
openEdit(o) {
|
||||
window.location.href = "/platform/zgfw/mobile/rxdj/psms?client=mobile&dj_id=" + o.dj_id + "&dj_djlx=" + o.dj_djlx
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="登记信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<rxdj-mobile-info :dj_id="dj_id" title="登记信息"></rxdj-mobile-info>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
dj_id: GetQueryString('dj_id'),
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'rxdj-mobile-info': httpVueLoader('/components/zgfw/rxdj/mobileRxdj.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
async created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,98 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="登记列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div style="margin: 20px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="年度">{{o.bmyear}}</van-cell>
|
||||
<van-cell title="登记类型" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.bmlx==1?'幼儿园':o.bmlx==2?'幼升小':'小升初'}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
|
||||
<van-cell :border="false" title="开始时间">{{o.bmkssj}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.bmjssj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post(loc() + '/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
const {bmlx, bmyear, bmkssj, bmjssj} = o
|
||||
if (moment().format("YYYY-MM-DD") < bmkssj) {
|
||||
vant.Toast('报名暂未开始!')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD") > bmjssj) {
|
||||
vant.Toast('报名已结束!')
|
||||
return
|
||||
}
|
||||
switch (bmlx) {
|
||||
case 1:
|
||||
window.location.href = '/platform/zgfw/mobile/rxdj/kindergarten?client=mobile'
|
||||
break;
|
||||
case 2:
|
||||
window.location.href = '/platform/zgfw/mobile/rxdj/psms?client=mobile&dj_djlx=' + bmlx
|
||||
break;
|
||||
case 3:
|
||||
window.location.href = '/platform/zgfw/mobile/rxdj/psms?client=mobile&dj_djlx=' + bmlx
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,146 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="我的审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<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.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('wyh02')||@shiro.hasRole('wyh03')}"
|
||||
:options="mCommon.unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange"
|
||||
:options="mCommon.unitList"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="登记类型" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.dj_djlx==1?'幼儿园':o.dj_djlx==2?'幼升小':'小升初'}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="子女姓名">{{o.dj_znname}}</van-cell>
|
||||
<van-cell :border="false" title="出生日期" v-if="o.dj_djlx===2">{{o.dj_znzsny}}</van-cell>
|
||||
<van-cell :border="false" title="教职工姓名">{{o.jzgname}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.dj_szdw}}</van-cell>
|
||||
<van-cell :border="false" title="所属分工会">{{o.jzgfghname}}</van-cell>
|
||||
<van-cell :border="false" title="手机号码">{{o.dj_iphone}}</van-cell>
|
||||
<van-cell :border="false" title="申请状态">
|
||||
<span v-if="o.dj_sqzt==1" style="color: #e6a23c">待院级工会审核</span>
|
||||
<span v-if="o.dj_sqzt==3" style="color: #f56c6c">院级工会审核拒绝</span>
|
||||
<span v-if="o.dj_sqzt==2" style="color: #e6a23c">待校工会审核</span>
|
||||
<span v-if="o.dj_sqzt==4" style="color: #f56c6c">校工会审核拒绝</span>
|
||||
<span v-if="o.dj_sqzt==5" style="color: #67c23a">审核通过</span>
|
||||
<span v-if="o.dj_sqzt==0">待重新提交</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
lx: GetQueryString('lx'),
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
|
||||
unitList: [],
|
||||
unionList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.flushUnits()
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/zgfw/mobile/rxdj/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = "/platform/zgfw/mobile/rxdj/audit/auditHtml?dj_id=" + o.dj_id + "&dj_sqzt=" + o.dj_sqzt
|
||||
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('wyh03')||@shiro.hasRole('wyh02')||@shiro.hasRole('H03')}" === 'true') {
|
||||
await mCommon.getUnitList(this.pageForm.unionId)
|
||||
} else {
|
||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
}, async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
await mCommon.getUnionList()
|
||||
|
||||
if (mCommon.unionList && mCommon.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
|
||||
}
|
||||
if (mCommon.unitList && mCommon.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.flushUnits()
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,112 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="history.back()" title="校工会审核" fixed placeholder left-arrow></van-nav-bar>
|
||||
<rxdj-mobile-info :dj_id="dj_id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="handle">
|
||||
<van-form>
|
||||
<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.dj_xghshyj"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
</van-form>
|
||||
|
||||
<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(4)">拒绝
|
||||
</van-button>
|
||||
<van-button color="RGB(8,23,118)" plain style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(1)">
|
||||
退回
|
||||
</van-button>
|
||||
<van-button color="RGB(8,23,118)" style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(5)">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</rxdj-mobile-info>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
dj_id: GetQueryString('dj_id'),
|
||||
handle: true,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'rxdj-mobile-info': httpVueLoader('/components/zgfw/rxdj/mobileRxdj.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doHandle(s) {
|
||||
this.formData.dj_sqzt = s
|
||||
if (this.formData.dj_xghshyj == "") {
|
||||
vant.Toast('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '标题',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast({
|
||||
duration: 0,
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
const res = await $.post('/platform/zgfw/rxdj/sh/doxghSh', this.formData)
|
||||
if (res.code === 0) {
|
||||
window.setTimeout(() => {
|
||||
loading.type = 'success'
|
||||
loading.message = '提交成功'
|
||||
window.history.back()
|
||||
}, 500)
|
||||
}
|
||||
|
||||
}).catch(() => {
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.formData = {
|
||||
dj_id: this.dj_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
dj_xghshyj: '',
|
||||
}
|
||||
const {data} = await $.get("/platform/zgfw/mobile/rxdj/audit/GetRxdjDjSqzt", {dj_id: this.dj_id})
|
||||
this.handle = data == 2
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,114 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="院级工会审核" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
<rxdj-mobile-info :dj_id="dj_id" title="院级工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="handle">
|
||||
<van-form>
|
||||
<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.dj_fghshyj"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
</van-form>
|
||||
|
||||
<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(3)">拒绝
|
||||
</van-button>
|
||||
<van-button color="RGB(8,23,118)" plain style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(0)">
|
||||
退回
|
||||
</van-button>
|
||||
<van-button color="RGB(8,23,118)" style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(2)">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</rxdj-mobile-info>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
dj_id: GetQueryString('dj_id'),
|
||||
handle: true,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'rxdj-mobile-info': httpVueLoader('/components/zgfw/rxdj/mobileRxdj.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doHandle(s) {
|
||||
this.formData.dj_sqzt = s
|
||||
if (this.formData.dj_fghshyj == "") {
|
||||
vant.Toast('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '标题',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast({
|
||||
duration: 0,
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
const res = await $.post('/platform/zgfw/rxdj/sh/dofghSh', this.formData)
|
||||
if (res.code === 0) {
|
||||
setTimeout(() => {
|
||||
loading.type = 'success'
|
||||
loading.message = '提交成功'
|
||||
window.history.back()
|
||||
|
||||
}, 500)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}).catch(() => {
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.formData = {
|
||||
dj_id: this.dj_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
dj_fghshyj: '',
|
||||
}
|
||||
const {data} = await $.get("/platform/zgfw/mobile/rxdj/audit/GetRxdjDjSqzt", {dj_id: this.dj_id})
|
||||
this.handle = data == 1
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,233 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 10px 16px 0;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.van-cell-group--inset .van-cell {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-cell-group--inset .group-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.scanner-wrap {
|
||||
margin: 20px 16px 0;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="扫描二维码"
|
||||
left-arrow
|
||||
></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-cell-group class="van-cell-group--inset">
|
||||
<van-cell>
|
||||
<span slot="title" class="group-title">用户信息</span>
|
||||
</van-cell>
|
||||
<van-cell title="姓名" icon="manager" :value="userInfo.username || '--'"></van-cell>
|
||||
<van-cell title="工号" icon="card" :value="userInfo.loginname || '--'"></van-cell>
|
||||
<van-cell title="性别" icon="more" :value="userInfo.sex || '--'"></van-cell>
|
||||
<van-cell title="单位" icon="wap-home" :value="userInfo.unitname || '--'"></van-cell>
|
||||
<van-cell title="分工会" icon="wap-home" :value="userInfo.unionname || '--'"></van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="van-cell-group--inset" v-if="showSignInfo">
|
||||
<van-cell>
|
||||
<span slot="title" class="group-title">签到信息</span>
|
||||
</van-cell>
|
||||
<van-cell title="是否签到" icon="more">
|
||||
<van-tag type="success" size="large" v-if="signInfo.isAttend===true">已签到</van-tag>
|
||||
<van-tag type="warning" size="large" v-else-if="signInfo.isAttend===false">未签到</van-tag>
|
||||
<span v-else-if="signInfo.isAttend===null">--</span>
|
||||
</van-cell>
|
||||
<van-cell title="签到时间" icon="clock" :value="signInfo.attendTime || '--'"></van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="van-cell-group--inset" v-if="showGiftInfo">
|
||||
<van-cell>
|
||||
<span slot="title" class="group-title">礼品发放信息</span>
|
||||
</van-cell>
|
||||
<van-cell title="是否发放" icon="more">
|
||||
<van-tag type="success" size="large" v-if="signInfo.isReceive===true">已发放</van-tag>
|
||||
<van-tag type="warning" size="large" v-else-if="signInfo.isReceive===false">未发放</van-tag>
|
||||
<span v-else-if="signInfo.isReceive===null">--</span>
|
||||
</van-cell>
|
||||
<van-cell title="发放时间" icon="clock" :value="signInfo.receiveTime || '--'"></van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="scanner-wrap">
|
||||
<van-button @click="scanner" type="primary" color="#1867b0" block icon="scan">扫描用户二维码</van-button>
|
||||
</div>
|
||||
|
||||
<div class="scanner-wrap" v-if="scannerResult.type===1">
|
||||
<van-button @click="confirmSign" type="primary" color="#1867b0" block icon="checked"
|
||||
:disabled="signInfo.isAttend===true">确认签到
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<div class="scanner-wrap" v-if="scannerResult.type===2">
|
||||
<van-button @click="grantGift" type="primary" color="#1867b0" block icon="point-gift"
|
||||
:disabled="signInfo.isReceive===true">发放礼品
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
signInfo: {
|
||||
isAttend: null,
|
||||
attendTime: null,
|
||||
isReceive: null,
|
||||
receiveTime: null
|
||||
},
|
||||
activityInfo: {},
|
||||
scannerResult: {},
|
||||
scannerResultKeys: ['userId', 'signId', 'activityId', 'activityCourseId', 'isMobileSign', 'signType', 'isReceiveGift', 'giftType']
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showSignInfo() {
|
||||
const {isMobileSign, signType} = this.scannerResult
|
||||
return isMobileSign === true && signType === 2
|
||||
},
|
||||
showGiftInfo() {
|
||||
const {isReceiveGift, giftType} = this.scannerResult
|
||||
return isReceiveGift === true && giftType === 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scanner() {
|
||||
this.userInfo = {}
|
||||
this.signInfo = {
|
||||
isAttend: null,
|
||||
attendTime: null
|
||||
}
|
||||
wxScannerQrCode.scanner().then(res => {
|
||||
this.checkScannerResult(res)
|
||||
}).catch(err => {
|
||||
vant.Dialog.alert({message: err}).then(() => {
|
||||
})
|
||||
})
|
||||
},
|
||||
checkScannerResult(resultStr) {
|
||||
const errMsg = '您扫描的信息不符合要求'
|
||||
if (typeof resultStr === 'string') {
|
||||
try {
|
||||
const result = JSON.parse(resultStr)
|
||||
const validResultKey = this.scannerResultKeys.every(k => {
|
||||
return result.hasOwnProperty(k)
|
||||
})
|
||||
if (validResultKey) {
|
||||
this.scannerResult = result
|
||||
const {
|
||||
userId,
|
||||
signId,
|
||||
activityId,
|
||||
isMobileSign,
|
||||
signType,
|
||||
isReceiveGift,
|
||||
giftType
|
||||
} = result
|
||||
if ((isMobileSign === true && signType === 2) || (isReceiveGift === true || giftType === 1)) {
|
||||
this.qrCodeInfo(userId, signId, activityId)
|
||||
} else {
|
||||
vant.Dialog.alert({message: '此活动不支持该方式'})
|
||||
}
|
||||
} else {
|
||||
vant.Dialog.alert({message: errMsg})
|
||||
}
|
||||
} catch (err) {
|
||||
vant.Dialog.alert({message: errMsg})
|
||||
}
|
||||
} else {
|
||||
vant.Dialog.alert({message: errMsg})
|
||||
}
|
||||
},
|
||||
async qrCodeInfo(userId, signId, activityId) {
|
||||
const toast = this.$toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
});
|
||||
const resp = await $.get(loc() + '/qrCodeInfo', {userId, signId, activityId})
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
if (resp.code === 0) {
|
||||
this.userInfo = resp.data.userInfo
|
||||
this.signInfo = resp.data.signInfo
|
||||
this.activityInfo = resp.data.activityInfo
|
||||
} else {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}, 500)
|
||||
},
|
||||
async signInfo() {
|
||||
const toast = this.$toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
});
|
||||
const resp = await $.get(loc() + '/signInfo', {signId: this.scannerResult.signId})
|
||||
toast.clear()
|
||||
if (resp.code === 0) {
|
||||
this.signInfo = resp.data.signInfo
|
||||
} else {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
},
|
||||
confirmSign() {
|
||||
vant.Dialog.confirm({title: '提示', message: '您确认该用户已签到吗?',}).then(async () => {
|
||||
const resp = await $.post(loc() + '/confirmSignByQrCode', {signId: this.scannerResult.signId})
|
||||
if (resp.code === 0) {
|
||||
this.signInfo = resp.data
|
||||
this.$toast.success('签到成功')
|
||||
} else {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
grantGift() {
|
||||
vant.Dialog.confirm({title: '提示', message: '您确认该用户已领取礼品吗?',}).then(async () => {
|
||||
const resp = await $.post(loc() + '/grantGiftByQrCode', {signId: this.scannerResult.signId})
|
||||
if (resp.code === 0) {
|
||||
this.signInfo = resp.data
|
||||
this.$toast.success('发放成功')
|
||||
// await this.signInfo()
|
||||
} else {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await wxScannerQrCode.initWxConfig(window.location.href)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,102 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-cell {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="提案详情"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<div style="padding-top: 20px">
|
||||
<van-collapse v-model="activeNames">
|
||||
<van-collapse-item title="提案基本信息" name="1">
|
||||
<van-cell title="提案名称">
|
||||
<div>
|
||||
{{tableData.proposalName}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="提案人">
|
||||
<div>
|
||||
{{tableData.createUserName}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="所在部门">
|
||||
<div>
|
||||
{{tableData.unionName}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="提案类型">
|
||||
<div>
|
||||
{{tableData.typeName}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="立案结果">
|
||||
<span>{{tableData.resultName ? tableData.resultName : '暂无'}}</span>
|
||||
</van-cell>
|
||||
<van-cell title="附议人">
|
||||
<div>
|
||||
<span v-if="!tableData.seconded">暂无</span>
|
||||
<span v-else v-for="(item,index) in tableData.seconded">
|
||||
{{ item.username }}
|
||||
{{ index + 1 === tableData.seconded.length ? '' : '、' }}
|
||||
</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-collapse v-model="ayActiveNames" border="false">
|
||||
<van-collapse-item title="案由" name="1">
|
||||
<div v-html="tableData.brief"></div>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
|
||||
<van-collapse v-model="jyActiveNames" border="false">
|
||||
<van-collapse-item title="建议或措施" name="1">
|
||||
<div v-html="tableData.measures"></div>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
ayActiveNames: [],
|
||||
jyActiveNames: [],
|
||||
activeNames: ['1'],
|
||||
tableData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkParams() {
|
||||
if (GetQueryString('id') === '') {
|
||||
vant.Toast.fail('参数不合法');
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.checkParams()) {
|
||||
$.post('/platform/mobile/proposal/compose/findOne', {id: GetQueryString('id')}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,290 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.handleicon {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="提案列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
|
||||
@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.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs v-model="active" @click="onClickActive">
|
||||
<van-tab title="未审核">
|
||||
<div>
|
||||
<van-list
|
||||
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)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 75%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
||||
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
||||
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow ">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">立案结果</div>
|
||||
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
<van-tab title="已审核">
|
||||
<div>
|
||||
<van-list
|
||||
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)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 75%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
||||
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
||||
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow ">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">立案结果</div>
|
||||
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
isAuditList: [
|
||||
{"text": "未审核", "value": false},
|
||||
{"text": "已审核", "value": true}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
await this.onLoad()
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
doSearch() {
|
||||
this.onLoad()
|
||||
},
|
||||
onClickActive(name) {
|
||||
|
||||
this.$set(this.pageForm, "isAudit", name)
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.tableData = []
|
||||
this.loading = true
|
||||
$.post('/platform/mobile/proposal/seconded/pageData', this.pageForm).then(res => {
|
||||
this.loading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.finished = true
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doAudit(flag, row) {
|
||||
const {id, secondedId} = row
|
||||
let res = flag === true ? '通过' : '拒绝'
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定' + res + '吗?',
|
||||
}).then(() => {
|
||||
$.post('/platform/proposal/transact/seconded/doAudit', {
|
||||
secondedId: secondedId,
|
||||
proposalId: id,
|
||||
flag: flag
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('提交成功!')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
openView(id, secondedId) {
|
||||
// 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
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
const a = await getProposalType()
|
||||
if (a) {
|
||||
a.forEach(v => {
|
||||
this.proposalTypeList.push({"text": v.typeName, "value": v.id})
|
||||
})
|
||||
this.proposalTypeList.unshift({"text": "所有类型", "value": null})
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", this.sessionList[0].value)
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList) {
|
||||
this.$set(this.pageForm, "delegationId", this.delegationList[0].value)
|
||||
}
|
||||
|
||||
}
|
||||
const aa = await getDictOptions("proposal_result")
|
||||
console.log(aa)
|
||||
if (a) {
|
||||
aa.forEach(v => {
|
||||
this.resultList.push({"text": v.name, "value": v.code})
|
||||
})
|
||||
this.resultList.unshift({"text": "所有结果", "value": null})
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,172 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="个人提案"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<van-cell v-for="o in tableData" class="cell-card">
|
||||
<div style="width: 100%;display: flex;flex-direction:row">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF;width: calc(100% - 50px)"
|
||||
@click="openView(o.id)">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
|
||||
<div 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"/>
|
||||
<div style="font-size: 8px">提交</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">提案状态</div>
|
||||
<div class="text-overflow">{{o.stateName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
config: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit(row) {
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '是否提交提案?',
|
||||
})
|
||||
.then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
message: '正在提交...',
|
||||
});
|
||||
|
||||
const {code, msg} = await $.post('/platform/proposal/transact/compose/doSubmit', {
|
||||
id: row.id,
|
||||
mannerCode: row.mannerCode
|
||||
})
|
||||
if (code === 0) {
|
||||
toast.icon = 'success'
|
||||
toast.message = '提交成功'
|
||||
await this.onRefresh()
|
||||
} else {
|
||||
toast.icon = 'fail'
|
||||
toast.message = msg
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
vant.Toast.clear();
|
||||
}, 500)
|
||||
});
|
||||
},
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
await this.onLoad()
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/mobile/proposal/compose/pageData', this.pageForm).then(res => {
|
||||
this.loading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.config = await getProposalConfig()
|
||||
console.log(this.config)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,394 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="团长审议"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
|
||||
@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.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs v-model="active" @click="onClickActive">
|
||||
<van-tab title="未审核">
|
||||
<div>
|
||||
<van-list
|
||||
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)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 75%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
||||
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
||||
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow ">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">立案结果</div>
|
||||
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
<van-tab title="已审核">
|
||||
<div>
|
||||
<van-list
|
||||
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)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 75%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
||||
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
||||
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow ">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">立案结果</div>
|
||||
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
|
||||
<!-- <div>
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list
|
||||
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)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 85%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">{{o.proposalName}}</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
</div>
|
||||
<div style="width: 15%;display: flex;align-items: center">
|
||||
<van-icon @click.stop="openAudit(o.id)">
|
||||
<svg t="1598756637099" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="2148" width="32" height="32">
|
||||
<path d="M876.214237 0z" fill="#ED8A19" p-id="2149"></path>
|
||||
<path d="M841.762712 121.491525h69.423729v69.423729h-69.423729z" fill="#E0E1E2"
|
||||
p-id="2150"></path>
|
||||
<path d="M856.949153 5.883661l0 0zM911.186441 0h-34.972204a34.538305 34.538305 0 0 0-19.265084 5.883661 34.434169 34.434169 0 0 0-15.186441 28.567864V121.491525h69.423729V0z"
|
||||
fill="#D75A4A" p-id="2151"></path>
|
||||
<path d="M911.186441 190.915254h69.423728v659.525424h-69.423728z" fill="#DB7B1B"
|
||||
p-id="2152"></path>
|
||||
<path d="M911.186441 121.491525h69.423728v69.423729h-69.423728z" fill="#C4C4C4"
|
||||
p-id="2153"></path>
|
||||
<path d="M980.610169 121.491525V34.451525A34.434169 34.434169 0 0 0 946.158644 0H911.186441v121.491525h69.423728z"
|
||||
fill="#B74C44" p-id="2154"></path>
|
||||
<path d="M373.152542 0h156.20339v86.779661h-156.20339z" fill="#303644"
|
||||
p-id="2155"></path>
|
||||
<path d="M841.762712 850.440678V34.711864h-312.40678v52.067797h-156.20339V34.711864h-329.762711v971.932204h815.728813v-125.830509z"
|
||||
fill="#424A60" p-id="2156"></path>
|
||||
<path d="M529.355932 34.711864v52.067797h-156.20339V34.711864h-121.491525v104.135594h399.186441V34.711864z"
|
||||
fill="#7383BF" p-id="2157"></path>
|
||||
<path d="M650.847458 121.491525v17.355933h-399.186441V121.491525h-121.491525v798.372882h642.169491V121.491525z"
|
||||
fill="#EDEADA" p-id="2158"></path>
|
||||
<path d="M251.661017 312.40678h156.20339a17.355932 17.355932 0 1 0 0-34.711865h-156.20339a17.355932 17.355932 0 1 0 0 34.711865zM251.661017 433.898305h86.779661a17.355932 17.355932 0 1 0 0-34.711864h-86.779661a17.355932 17.355932 0 1 0 0 34.711864zM598.779661 399.186441h-121.491525a17.355932 17.355932 0 1 0 0 34.711864h121.491525a17.355932 17.355932 0 1 0 0-34.711864zM395.541695 404.219661c-3.141424 3.280271-5.03322 7.792814-5.03322 12.322712 0 4.512542 1.891797 9.025085 5.03322 12.322712a17.182373 17.182373 0 0 0 12.322712 5.03322c4.512542 0 9.025085-1.909153 12.322712-5.03322 3.124068-3.297627 5.03322-7.810169 5.03322-12.322712 0-4.529898-1.909153-9.042441-5.03322-12.322712-6.595254-6.421695-18.050169-6.421695-24.645424 0zM680.526102 404.219661c-6.595254-6.421695-18.050169-6.421695-24.645424 0-3.141424 3.280271-5.03322 7.792814-5.03322 12.322712 0 4.512542 1.891797 9.025085 5.03322 12.322712a17.182373 17.182373 0 0 0 12.322712 5.03322c4.686102 0 9.025085-1.909153 12.322712-5.03322 3.124068-3.297627 5.03322-7.810169 5.03322-12.322712 0-4.529898-1.909153-9.042441-5.03322-12.322712zM442.576271 520.677966h-121.491525a17.355932 17.355932 0 1 0 0 34.711865h121.491525a17.355932 17.355932 0 1 0 0-34.711865zM239.338305 525.711186a17.112949 17.112949 0 0 0-5.03322 12.322712c0 4.512542 1.891797 9.025085 5.03322 12.322712 3.280271 3.124068 7.810169 5.03322 12.322712 5.033221s9.025085-1.909153 12.322712-5.033221a17.546847 17.546847 0 0 0 0-24.645424c-6.595254-6.421695-18.050169-6.421695-24.645424 0z"
|
||||
fill="#CEC9AE" p-id="2159"></path>
|
||||
<path d="M347.552542 627.191322c-38.026847 19.785763-50.818169 57.621695-55.469559 96.880814l-21.538712-18.05017c-17.026169-14.266576-41.723661 10.15322-24.541288 24.558644l48.700746 40.803797c11.489627 9.632542 29.088542 3.662102 29.626576-12.270644 1.266983-37.610305 3.072-82.319186 40.751729-101.93139 19.855186-10.361492 2.290983-40.317831-17.529492-29.991051zM509.639593 715.411525c-9.025085-16.141017-28.498441-24.142102-46.652746-19.004745-23.690847 6.69939-51.738034 35.440814-68.312949 1.839728-9.910237-20.080814-39.831864-2.481898-29.973695 17.512136 8.920949 18.084881 26.033898 31.205966 46.322983 33.531661 10.535051 1.197559 19.386576-0.225627 29.296814-3.922441 7.046508-2.638102 33.375458-23.118102 39.345898-12.444203 10.916881 19.54278 40.890576 2.048 29.973695-17.512136z"
|
||||
fill="#7383BF" p-id="2160"></path>
|
||||
<path d="M980.610169 850.440678h-138.847457l69.423729 121.491525z" fill="#EBD6BD"
|
||||
p-id="2161"></path>
|
||||
<path d="M893.830508 1006.644068a17.355932 17.355932 0 1 0 34.711865 0v-69.423729h-34.711865v69.423729z"
|
||||
fill="#4C4C4C" p-id="2162"></path>
|
||||
<path d="M841.762712 190.915254h69.423729v659.525424h-69.423729z" fill="#ED8A19"
|
||||
p-id="2163"></path>
|
||||
</svg>
|
||||
</van-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">提案状态</div>
|
||||
<div class="text-overflow">{{o.stateName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-dialog v-model="show" title="团长审核" @confirm="doHandle" @cancel="show=!show" show-cancel-button
|
||||
:before-close="validateForm">
|
||||
<van-form ref="handleForm" @submit="doHandle">
|
||||
<van-field
|
||||
maxlength="50"
|
||||
rows="5"
|
||||
autosize
|
||||
type="textarea"
|
||||
show-word-limit
|
||||
v-model="formData.opinion"
|
||||
name="tzsyqk"
|
||||
label="意见"
|
||||
placeholder="请输入您的意见"
|
||||
:rules="[{ required: true, message: '请输入审核意见' }]"
|
||||
></van-field>
|
||||
<van-field name="state" label="结果">
|
||||
<template #input>
|
||||
<van-radio-group v-model="state" direction="horizontal">
|
||||
<van-radio name="0">通过</van-radio>
|
||||
<van-radio name="2">退回</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</van-dialog>
|
||||
|
||||
-->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
isAuditList: [
|
||||
{"text": "未审核", "value": false},
|
||||
{"text": "已审核", "value": true}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
await this.onLoad()
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
doSearch() {
|
||||
this.onLoad()
|
||||
},
|
||||
onClickActive(name) {
|
||||
|
||||
this.$set(this.pageForm, "isAudit", name)
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.tableData = []
|
||||
this.loading = true
|
||||
$.post('/platform/mobile/proposal/delegation/pageData', this.pageForm).then(res => {
|
||||
this.loading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openAudit(id) {
|
||||
this.formData = {
|
||||
proposalId: id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
opinion: '',
|
||||
sign: '',
|
||||
}
|
||||
this.state = '0'
|
||||
this.show = true
|
||||
},
|
||||
validateForm(action, done) {
|
||||
done(false)
|
||||
},
|
||||
async doHandle() {
|
||||
this.$refs['handleForm'].validate().then(valid => {
|
||||
$.post('/platform/proposal/transact/audit/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
flag: this.state === 0
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.show = false
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('审核成功!')
|
||||
} else {
|
||||
vant.Toast.error('审核失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
openView(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
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
const a = await getProposalType()
|
||||
if (a) {
|
||||
a.forEach(v => {
|
||||
this.proposalTypeList.push({"text": v.typeName, "value": v.id})
|
||||
})
|
||||
this.proposalTypeList.unshift({"text": "所有类型", "value": null})
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", this.sessionList[0].value)
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList) {
|
||||
this.$set(this.pageForm, "delegationId", this.delegationList[0].value)
|
||||
}
|
||||
|
||||
}
|
||||
const aa = await getDictOptions("proposal_result")
|
||||
if (a) {
|
||||
aa.forEach(v => {
|
||||
this.resultList.push({"text": v.name, "value": v.code})
|
||||
})
|
||||
this.resultList.unshift({"text": "所有结果", "value": null})
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,93 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
margin: 10px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.choose_button .button_text {
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--顶部轮播图-->
|
||||
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item>
|
||||
<van-image height="180" src="/assets/mobile/img/therapyRecuperation/index1.jpeg"></van-image>
|
||||
</van-swipe-item>
|
||||
<van-swipe-item>
|
||||
<van-image height="180" src="/assets/mobile/img/therapyRecuperation/index1.jpeg"></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<!--按钮导航-->
|
||||
<div class="choose_button van-doc-card">
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item @click="toLineList(item.value)" v-for="item in chooseButton">
|
||||
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
||||
<div class="button_text">{{item.label}}</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<!--疗休养描述-->
|
||||
<div class="van-doc-card" style="margin-top: 20px">
|
||||
<van-image width="190" height="43" src="/assets/mobile/img/therapyRecuperation/title.png"></van-image>
|
||||
<div>
|
||||
<p>
|
||||
<span style="background-color: rgb(255, 255, 255);"><strong>一、疗休养对象及活动地点</strong></span><br/>
|
||||
</p>
|
||||
<p>
|
||||
<span style="font-size: 14px;"> 疗休养对象及活动地点</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
chooseButton: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toLineList(index) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/mobileLineListPage?index=' + index
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,574 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.container img {
|
||||
background-size:contain;
|
||||
width:100%;
|
||||
height: auto;
|
||||
margin: 5px auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.header{
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.content {
|
||||
line-height: 26px;
|
||||
padding: 0px 20px 56px 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 19px;
|
||||
color: #505050;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
border-color: grey;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.van-skeleton {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.van-skeleton__content {
|
||||
height: 600px;
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
.van-skeleton__row, .van-skeleton__title {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.family_join {
|
||||
background-color: #ff976a;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 20px;
|
||||
height: calc(100% - 40px - 46px - 60px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.van-tabs__wrap {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab.van-tab--active {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab {
|
||||
border-right: 0 !important;
|
||||
}
|
||||
|
||||
.top_icon {
|
||||
position: fixed;
|
||||
bottom: 80px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.van-field__control {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.companionList_empty_text {
|
||||
text-align: center;
|
||||
padding: 10px 0px;
|
||||
font-size: 14px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.header div span {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.header :last-child {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养-线路介绍"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--线路详情-->
|
||||
<van-skeleton title :loading="skeLoading" :row="12">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<van-tag size="large" color="#1867b0" style="color: white;margin-right: 6px">{{moment(lineData.playEndTime).diff(moment(lineData.playStartTime), 'day')}}日</van-tag>
|
||||
{{lineData.lineName}}
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<div>
|
||||
<span class="line_label">成团人数:</span>
|
||||
{{lineData.minimumGroupSize ? lineData.minimumGroupSize : 0}}人
|
||||
</div>
|
||||
<div>
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + lineData.signUpUserFamilyNum + '(家属' + lineData.signUpUserFamilyNum + '人)'}}
|
||||
</div>
|
||||
<div>
|
||||
<span>报名时间:</span>
|
||||
{{moment(lineData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.signUpEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div>
|
||||
<span>出行时间:</span>
|
||||
{{moment(lineData.playStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.playEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div v-html="lineData.content" class="content"></div>
|
||||
</div>
|
||||
</van-skeleton>
|
||||
|
||||
<!--置顶图标-->
|
||||
<image v-if="btnFlag" @click="backTop" src="/assets/mobile/svg/therapyRecuperation/top.svg" class="top_icon"></image>
|
||||
|
||||
<!--底部报名按钮-->
|
||||
<div class="footer" v-if="fromUrlByMy != 'edit'">
|
||||
<van-button v-if="moment().unix() <= moment(lineData.signUpEndTime).unix()" @click="join" class="join">我要报名</van-button>
|
||||
<van-button v-if="moment().unix() > moment(lineData.signUpEndTime).unix()" class="join">报名结束</van-button>
|
||||
</div>
|
||||
|
||||
<!--报名弹出框-->
|
||||
<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>
|
||||
<div class="join_content">
|
||||
|
||||
<van-form @submit="joinSubmit">
|
||||
|
||||
<!--基础信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="身份证号" name="idCard" :rules="[{ required: true, message: '请填写身份证号' }]" placeholder="请填写身份证号" v-model="formData.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" :rules="[{ required: true, message: '请填写手机号' }]" placeholder="请填写手机号" v-model="formData.mobile"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field label="报名线路" readonly v-model="formData.lineName"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--床位信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
床位信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field @click="self = true; roomVisible = true" readonly is-link label="房间" name="bedType" placeholder="请选择房间" v-model="formData.bedInfo.bedType"
|
||||
:rules="[{ required: true, message: '请选择房间' }]"></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, message: '请选择床位' }]"></van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'" :rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开" v-model="formData.bedInfo.otherSleepUser"
|
||||
:rules="[{ required: true, message: '请填写意向拼房人' }]"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--随行人信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header" style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="float:left;">随行人信息</span>
|
||||
<div>
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length > 0" class="van-card-body">
|
||||
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
|
||||
<van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)">
|
||||
<van-field label="姓名" name="userName" placeholder="请填写姓名" v-model="item.userName"
|
||||
:rules="[{ required: true, message: '请填写姓名' }]"></van-field>
|
||||
<!--<van-field label="工号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>-->
|
||||
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age"
|
||||
:rules="[{ required: true, message: '请填写年龄' }]"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.sex">
|
||||
<van-radio name="男" shape="square">男</van-radio>
|
||||
<van-radio name="女" shape="square">女</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="身份证号" name="idCard" placeholder="请填写身份证号" :rules="[{ required: true, message: '请填写身份证号' }]" v-model="item.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" placeholder="请填写手机号" :rules="[{ required: true, message: '请填写手机号' }]" v-model="item.mobile"></van-field>
|
||||
<van-field @click="companionVisible = true" readonly is-link label="与本人关系" name="relation"
|
||||
placeholder="随行人与本人关系" v-model="item.relation"
|
||||
:rules="[{ required: true, message: '请选择与本人关系' }]"></van-field>
|
||||
|
||||
<van-field @click="self = false; roomVisible = true" readonly is-link label="房间" name="bedType" placeholder="请选择房间"
|
||||
v-model="item.bedInfo.bedType"></van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'" @click="self = false; bedVisible = true" readonly 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>
|
||||
<van-radio-group direction="horizontal" v-model="item.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开" v-model="item.bedInfo.otherSleepUser"></van-field>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length == 0" class="companionList_empty_text">
|
||||
<span>
|
||||
如有随行人出行,请添加随行人
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<!--房间类型弹出框-->
|
||||
<van-popup position="bottom" round v-model="roomVisible">
|
||||
<van-picker
|
||||
title="入住房间" show-toolbar
|
||||
:columns="roomColumns"
|
||||
@confirm="roomConfirm"
|
||||
@cancel="roomCancel">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--床位弹出框-->
|
||||
<van-popup position="bottom" round v-model="bedVisible">
|
||||
<van-picker
|
||||
title="床位" show-toolbar
|
||||
:columns="bedColumns"
|
||||
@confirm="bedConfirm"
|
||||
@cancel="bedVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--随行人关系弹出框-->
|
||||
<van-popup position="bottom" round v-model="companionVisible">
|
||||
<van-picker
|
||||
title="与本人关系" show-toolbar
|
||||
:columns="companionColumns"
|
||||
@confirm="(value, index) => {formData.companionList[active].relation = value; companionVisible = false}"
|
||||
@cancel="companionVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
roomColumns: ['大床房', '标准间'],
|
||||
bedColumns: ['1', '2'],
|
||||
companionColumns: ['亲属', '朋友'],
|
||||
bedVisible: false,
|
||||
roomVisible: false,
|
||||
companionVisible: false,
|
||||
joinPopup: false,
|
||||
skeLoading: true,
|
||||
id: '',
|
||||
lineData: {},
|
||||
formData: {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
lineName: '',
|
||||
takePartInLineId: '',
|
||||
takePartInUnionId: '',
|
||||
companionList:[],
|
||||
bedInfo: {},
|
||||
},
|
||||
self: true,
|
||||
btnFlag: false,
|
||||
index: 0,
|
||||
scrollTop: 0,
|
||||
fromUrlByMy: '',
|
||||
enrollId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
roomCancel() {
|
||||
if(!this.self) {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = ''
|
||||
}
|
||||
this.roomVisible = false
|
||||
},
|
||||
roomConfirm(value, index) {
|
||||
if(this.self) {
|
||||
this.formData.bedInfo.bedType = value
|
||||
} else {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = value
|
||||
}
|
||||
this.roomVisible = false
|
||||
},
|
||||
bedConfirm(value, index) {
|
||||
if(this.self) {
|
||||
this.formData.bedInfo.bedNum = value
|
||||
} else {
|
||||
this.formData.companionList[this.active].bedInfo.bedNum = value
|
||||
}
|
||||
this.bedVisible = false
|
||||
},
|
||||
validator(value) {
|
||||
return value != null
|
||||
},
|
||||
async joinSubmit() {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if(item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForLine', {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if(resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
}
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, 500)
|
||||
if(resp.code === 0) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
addCompanion() {
|
||||
this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}})
|
||||
},
|
||||
delCompanion() {
|
||||
this.formData.companionList.splice(this.active, 1)
|
||||
},
|
||||
async join() {
|
||||
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
id: this.enrollId,
|
||||
takePartInLineId: this.lineData.id,
|
||||
takePartInUnionId: this.takePartInUnionId
|
||||
}),
|
||||
})
|
||||
if(re.code !== 0) {
|
||||
vant.Toast(re.msg)
|
||||
return
|
||||
}
|
||||
if(this.fromUrlByMy !== 'editDo') {
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "${@shiro.getPrincipalProperty('idcard')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
lineName: this.lineData.lineName,
|
||||
takePartInLineId: this.lineData.id,
|
||||
takePartInUnionId: this.takePartInUnionId,
|
||||
companionList:[],
|
||||
bedInfo: {},
|
||||
}
|
||||
}
|
||||
this.joinPopup = true
|
||||
},
|
||||
async getData() {
|
||||
const res = await $.get('/platform/theRapyRecuperation/line/enroll/selectLineAllInfo', {
|
||||
lineId: this.id,
|
||||
usUnionId: this.takePartInUnionId
|
||||
})
|
||||
if(res.code === 0) {
|
||||
this.lineData = res.data
|
||||
this.formData.lineName = this.lineData.lineName
|
||||
this.formData.takePartInLineId = this.lineData.id
|
||||
this.skeLoading = false
|
||||
}
|
||||
},
|
||||
// 点击图片回到顶部方法,加计时器是为了过渡顺滑
|
||||
backTop () {
|
||||
const that = this
|
||||
let timer = setInterval(() => {
|
||||
let speed = Math.floor(-that.scrollTop / 5)
|
||||
document.documentElement.scrollTop = document.body.scrollTop = that.scrollTop + speed
|
||||
if (that.scrollTop === 0) {
|
||||
clearInterval(timer)
|
||||
}
|
||||
}, 16)
|
||||
},
|
||||
// 为了计算距离顶部的高度,当高度大于100显示回顶部图标,小于100则隐藏
|
||||
scrollToTop () {
|
||||
const that = this
|
||||
that.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
|
||||
that.btnFlag = that.scrollTop > 100;
|
||||
},
|
||||
//修改时查询报名信息,进行回显
|
||||
async findSignUpInfoById() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
|
||||
if(res.code === 0) {
|
||||
this.formData = res.data
|
||||
if(this.formData.bedInfo === null) {
|
||||
this.formData.bedInfo = {}
|
||||
}
|
||||
if(this.formData.companionList) {
|
||||
this.formData.companionList.forEach(item => {
|
||||
if(item.bedInfo === null) {
|
||||
item.bedInfo = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = getQueryString('id') ? getQueryString('id') : ''
|
||||
this.index = getQueryString('index') ? getQueryString('index') : ''
|
||||
//编辑传出来的参数
|
||||
this.fromUrlByMy = getQueryString('fromUrlByMy') ? getQueryString('fromUrlByMy') : ''
|
||||
this.enrollId = getQueryString('enrollId') ? getQueryString('enrollId') : ''
|
||||
this.takePartInUnionId = getQueryString('takePartInUnionId') ? getQueryString('takePartInUnionId') : ''
|
||||
if(this.enrollId) {
|
||||
await this.findSignUpInfoById()
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
mounted () {
|
||||
window.addEventListener('scroll', this.scrollToTop)
|
||||
},
|
||||
destroyed () {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,338 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
margin: 10px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 16px 10px;
|
||||
display: flex;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.content-right {
|
||||
width: calc(100% - 150px);
|
||||
max-width: calc(100% - 150px);
|
||||
padding-left: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cr-title {
|
||||
/*max-height: 40px;*/
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.choose_button .button_text {
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.van-tag {
|
||||
padding: 2px 7px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #1867b0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.no_active {
|
||||
background-color: #e7e9f0;
|
||||
color: #69707a;
|
||||
}
|
||||
|
||||
.van-list {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-row {
|
||||
text-align: center;
|
||||
color: #1867b0;
|
||||
font-weight: bold;
|
||||
padding: 0px 0px 10px 0px;
|
||||
font-family: cursive;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="疗休养线路"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--按钮导航-->
|
||||
<div class="choose_button van-doc-card">
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item @click="pageForm.theRapyRecuperationType = item.value; getData()" v-for="item in chooseButton">
|
||||
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
||||
<div :style="pageForm.theRapyRecuperationType == item.value ? 'color: #1867b0; font-weight: bold' : 'color: black; font-weight: normal'"
|
||||
class="button_text">{{item.label}}</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:immediate-check="true"
|
||||
@load="onLoad"
|
||||
finished-text="没有更多了"
|
||||
v-model="loading">
|
||||
<div @click="findOne(o)" class="list-card" v-for="o in tableData">
|
||||
<div class="content">
|
||||
<van-image
|
||||
height="100"
|
||||
radius="8"
|
||||
:src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + o.fileId"
|
||||
width="150">
|
||||
</van-image>
|
||||
<div v-if="pageForm.theRapyRecuperationType != '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.lineName}}</span>
|
||||
<div>
|
||||
<van-tag color="#1867b0">{{moment(o.playEndTime).diff(moment(o.playStartTime), 'day')}}日</van-tag>
|
||||
<van-tag color="#1867b0">{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.usUnionName}}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<!--<div class="union">
|
||||
<span>组织形式:</span>{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.usUnionName}}
|
||||
</div>-->
|
||||
<div class="concat">
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' + o.signUpUserFamilyNum + '人)'}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系方式:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType == '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.travelAgencyName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="concat">
|
||||
<span>联系人:</span>{{o.contact}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系电话:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<!--<div class="mobile">
|
||||
<span>邮箱:</span>{{o.email}}
|
||||
</div>-->
|
||||
<div class="union" style="margin-top: 0">
|
||||
<span>官网:</span><span style="color: #0e5996"
|
||||
@click.stop="window.open(o.officialWebsite.indexOf('http') !== -1 ? o.officialWebsite : 'https://' + o.officialWebsite)">{{o.officialWebsite}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="pageForm.theRapyRecuperationType == '2'">
|
||||
<van-row gutter="20">
|
||||
<van-col @click="" span="12" style="border-right: 1px lightgrey solid"></van-col>
|
||||
<van-col span="12">
|
||||
<van-button @click="join(o)" plain round size="mini" type="info">我要报名</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<div v-if="['0', '1', 0 , 1].includes(pageForm.theRapyRecuperationType)" class="footer">
|
||||
<van-button @click="pageForm.lineUnionType = 2; unionPop = true" :class="pageForm.lineUnionType == 2 ? 'active' : 'no_active'">其他工会线路</van-button>
|
||||
<van-button @click="pageForm.lineUnionType = 1; getData()" :class="pageForm.lineUnionType == 1 ? 'active' : 'no_active'">本工会线路</van-button>
|
||||
</div>
|
||||
|
||||
<van-popup position="bottom" round v-model:show="unionPop">
|
||||
<van-picker
|
||||
title="选择分工会" show-toolbar
|
||||
:columns="unionColumns"
|
||||
@confirm="onConfirm"
|
||||
@cancel="unionPop = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unionColumns: [],
|
||||
unionPop: false,
|
||||
chooseButton: [],
|
||||
pageForm: {
|
||||
theRapyRecuperationType: 0,
|
||||
lineUnionType: 1,
|
||||
unionId: "${@shiro.getPrincipalProperty('union').getId()}",
|
||||
},
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
lineData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async join(o) {
|
||||
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
takePartInTravelAgencyId: o.id,
|
||||
}),
|
||||
})
|
||||
if(re.code !== 0) {
|
||||
vant.Toast(re.msg)
|
||||
return
|
||||
}
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const sendData = {
|
||||
takePartInTravelAgencyId: o.id,
|
||||
}
|
||||
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForTravelAgency', {
|
||||
enroll: JSON.stringify(sendData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if(resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
}
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, 500)
|
||||
if(resp.code === 0) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.pageForm.theRapyRecuperationType
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
onConfirm(value, index) {
|
||||
this.pageForm.unionId = value.value
|
||||
this.getData()
|
||||
this.unionPop = false
|
||||
},
|
||||
async findOne(o) {
|
||||
if(this.pageForm.theRapyRecuperationType != '2') {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.id + '&index=' + this.pageForm.theRapyRecuperationType
|
||||
+ '&takePartInUnionId=' + o.takePartInUnionId
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
this.loading = true
|
||||
if(this.pageForm.lineUnionType === 1) {
|
||||
this.pageForm.unionId = "${@shiro.getPrincipalProperty('union').getId()}"
|
||||
}
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/pageData', this.pageForm)
|
||||
|
||||
if (res.code === 0 && res.data) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageForm.theRapyRecuperationType = getQueryString('index')
|
||||
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
||||
const unions = await getUnions(null)
|
||||
unions.forEach(item => {
|
||||
this.unionColumns.push({text: item.unionname, value: item.id})
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,433 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
margin: 10px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 16px 10px;
|
||||
display: flex;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.content-right {
|
||||
width: calc(100% - 150px);
|
||||
max-width: calc(100% - 150px);
|
||||
padding-left: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cr-title {
|
||||
/*max-height: 40px;*/
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.choose_button .button_text {
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #1867b0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.no_active {
|
||||
background-color: #e7e9f0;
|
||||
color: #69707a;
|
||||
}
|
||||
|
||||
.van-row {
|
||||
text-align: center;
|
||||
color: #1867b0;
|
||||
font-weight: bold;
|
||||
padding: 0px 0px 10px 0px;
|
||||
font-family: cursive;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.van-list {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.popVisible {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.pop_footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.pop_footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.van-tag {
|
||||
padding: 2px 7px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.cus_content {
|
||||
height: calc(100% - 40px - 46px - 60px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="我的疗休养"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--按钮导航-->
|
||||
<div class="choose_button van-doc-card">
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item @click="pageForm.theRapyRecuperationType = item.value; getData()" v-for="item in chooseButton">
|
||||
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
||||
<div :style="pageForm.theRapyRecuperationType == item.value ? 'color: #1867b0; font-weight: bold' : 'color: black; font-weight: normal'"
|
||||
class="button_text">{{item.label}}</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:immediate-check="true"
|
||||
@load="onLoad"
|
||||
finished-text="没有更多了"
|
||||
v-model="loading">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<div @click="findOne(o)" class="content">
|
||||
|
||||
<van-image
|
||||
height="100"
|
||||
radius="8"
|
||||
:src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + o.fileId"
|
||||
width="150"
|
||||
></van-image>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType != '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.lineName}}</span>
|
||||
<div>
|
||||
<van-tag color="#1867b0">{{moment(o.playEndTime).diff(moment(o.playStartTime), 'day')}}日</van-tag>
|
||||
<van-tag color="#1867b0">{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.signUpUnionName}}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<!--<div class="union">
|
||||
<span>分工会:</span>{{o.signUpUnionName}}
|
||||
</div>-->
|
||||
<!--<div class="concat">
|
||||
<span>时间:</span>{{o.YEAR}}
|
||||
</div>-->
|
||||
<!--<div class="concat">
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' + o.signUpUserFamilyNum + '人)'}}
|
||||
</div>-->
|
||||
<div class="mobile">
|
||||
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系方式:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>随行家属:</span>{{o.companionUserNames ? o.companionUserNames : '无'}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType == '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.travelAgencyName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="concat">
|
||||
<span>联系人:</span>{{o.contact}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系电话:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<!--<div class="mobile">
|
||||
<span>邮箱:</span>{{o.email}}
|
||||
</div>-->
|
||||
<div class="union" style="margin-top: 0">
|
||||
<span>官网:</span><span style="color: #0e5996"
|
||||
@click.stop="window.open(o.officialWebsite.indexOf('http') !== -1 ? o.officialWebsite : 'https://' + o.officialWebsite)">{{o.officialWebsite}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-row gutter="20" v-if="o.isTakePartIn == true">
|
||||
<van-col v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() < moment(o.changeEndTime).unix()" @click="edit(o)" span="8" style="border-right: 1px lightgrey solid">修 改</van-col>
|
||||
<van-col v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() >= moment(o.changeEndTime).unix()" span="8"
|
||||
style="color: grey; border-right: 1px lightgrey solid">修 改</van-col>
|
||||
<van-col @click="cancel(o)" :span="pageForm.theRapyRecuperationType != '2' ? 8 : 12" style="border-right: 1px lightgrey solid">取 消</van-col>
|
||||
<van-col @click="satisfaction(o)" :span="pageForm.theRapyRecuperationType != '2' ? 8 : 12">满意度反馈</van-col>
|
||||
</van-row>
|
||||
<van-row gutter="20" v-if="o.isTakePartIn == false">
|
||||
<van-col v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() < moment(o.changeEndTime).unix()" @click="edit(o)" span="12" style="border-right: 1px lightgrey solid">修 改</van-col>
|
||||
<van-col v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() >= moment(o.changeEndTime).unix()" span="12"
|
||||
style="color: grey; border-right: 1px lightgrey solid">修 改</van-col>
|
||||
<van-col v-if="pageForm.theRapyRecuperationType == '2'" span="12"></van-col>
|
||||
<van-col @click="cancel(o)" span="12">取 消</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<div class="footer">
|
||||
<van-button @click="pageForm.signUpStateId = 1; getData()" :class="pageForm.signUpStateId == 1 ? 'active' : 'no_active'">已报名</van-button>
|
||||
<van-button @click="pageForm.signUpStateId = 2; getData()" :class="pageForm.signUpStateId == 2 ? 'active' : 'no_active'">已参加</van-button>
|
||||
<van-button @click="pageForm.signUpStateId = 3; getData()" :class="pageForm.signUpStateId == 3 ? 'active' : 'no_active'">未参加</van-button>
|
||||
</div>
|
||||
|
||||
<van-popup class="popVisible" position="right" v-model="popVisible">
|
||||
<van-nav-bar @click-left="popVisible = false" fixed left-arrow placeholder title="满意度评分"></van-nav-bar>
|
||||
<div class="cus_content">
|
||||
<van-field name="rate" label="旅行社评分">
|
||||
<template #input>
|
||||
<van-rate v-model="satisfactionForm.evaluationForTravelAgency" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="rate" label="路线评分">
|
||||
<template #input>
|
||||
<van-rate v-model="satisfactionForm.evaluationForLine" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="rate" label="风景评分">
|
||||
<template #input>
|
||||
<van-rate v-model="satisfactionForm.evaluationForJourney" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-model="satisfactionForm.feedbackContent"
|
||||
rows="4"
|
||||
autosize
|
||||
label="其他建议"
|
||||
type="textarea"
|
||||
maxlength="100"
|
||||
placeholder="请输入其他建议"
|
||||
show-word-limit>
|
||||
</van-field>
|
||||
</div>
|
||||
|
||||
<div class="pop_footer">
|
||||
<van-button @click="satisfactionSubmit" class="cus_button">提交评分</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
popVisible: false,
|
||||
chooseButton: [],
|
||||
pageForm: {
|
||||
theRapyRecuperationType: 0,
|
||||
signUpStateId: 1,
|
||||
},
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
satisfactionForm: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
satisfaction(o) {
|
||||
this.satisfactionForm = {
|
||||
id: o.id,
|
||||
evaluationForJourney: o.evaluationForJourney ? o.evaluationForJourney * 1 : '',
|
||||
evaluationForLine: o.evaluationForLine ? o.evaluationForLine * 1 : '',
|
||||
evaluationForTravelAgency: o.evaluationForTravelAgency ? o.evaluationForTravelAgency * 1 : '',
|
||||
feedbackContent: o.feedbackContent ? o.feedbackContent : '',
|
||||
}
|
||||
this.popVisible = true
|
||||
},
|
||||
async satisfactionSubmit() {
|
||||
for (const key in this.satisfactionForm) {
|
||||
if(key !== 'feedbackContent' && this.satisfactionForm[key] === '') {
|
||||
vant.Toast('请先评分再提交')
|
||||
return
|
||||
}
|
||||
}
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/doFeedBack', this.satisfactionForm)
|
||||
if(res.code === 0) {
|
||||
this.popVisible = false
|
||||
vant.Toast('操作成功')
|
||||
this.getData()
|
||||
}else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
},
|
||||
async edit(o) {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
takePartInLineId: o.takePartInLineId,
|
||||
id: o.id,
|
||||
takePartInUnionId: o.takePartInUnionId
|
||||
}),
|
||||
})
|
||||
if(res.code === 0) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.takePartInLineId +
|
||||
'&index=' + this.pageForm.theRapyRecuperationType + '&enrollId=' + o.id + '&fromUrlByMy=editDo' +
|
||||
'&takePartInUnionId=' + o.takePartInUnionId
|
||||
} else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
},
|
||||
async cancel(o) {
|
||||
if(this.pageForm.theRapyRecuperationType != '2') {
|
||||
const re = await $.post('/platform/theRapyRecuperation/line/enroll/canDelete/' + o.id)
|
||||
if(re.code !== 0) {
|
||||
vant.Toast(re.msg)
|
||||
return
|
||||
}
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: '您确定要取消此报名吗?',
|
||||
}).then(async () => {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + o.id)
|
||||
if(res.code === 0) {
|
||||
vant.Toast('取消成功')
|
||||
this.getData()
|
||||
}else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
async findOne(o) {
|
||||
if(this.pageForm.theRapyRecuperationType != '2') {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.takePartInLineId + '&fromUrlByMy=edit&takePartInUnionId=' + o.takePartInUnionId
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
this.loading = true
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/mySignUpPageData', this.pageForm)
|
||||
|
||||
if (res.code === 0 && res.data) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageForm.theRapyRecuperationType = getQueryString('index') ? getQueryString('index') : 1
|
||||
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,263 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-image {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
padding: 13px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.van-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-tab {
|
||||
-webkit-flex: none;
|
||||
}
|
||||
|
||||
.van-tab--active {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-tabs__nav--line {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
padding: 13px 13px 50px 13px;
|
||||
background-color: white;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.content_title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pre_text {
|
||||
white-space: break-spaces;
|
||||
padding-left: 7px;
|
||||
/*margin-top: 30px;*/
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.custable {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.custable td {
|
||||
text-align: center;
|
||||
height: 10px;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
padding: 0 10px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center !important;
|
||||
font-weight: bold;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.custable tr:nth-child(odd) {
|
||||
background-color: #eff1f5;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-top: 1px solid #000000;
|
||||
border-left: 1px solid #000000;
|
||||
border-collapse: collapse; /*设置单元格的边框合并为1*/
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid #000000;
|
||||
border-right: 1px solid #000000;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #000000;
|
||||
border-right: 1px solid #000000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动详情" left-arrow
|
||||
@click-left="location.replace('/platform/mobile/trainSignUpActivity/trainList')"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--<van-image :height="$(window).height() * 0.28" v-if="this.activity.cover && this.activity.cover.filepath" :src="'${AppFileDomain!}' + this.activity.cover.filepath"></van-image>
|
||||
<van-image :height="$(window).height() * 0.28" v-else src=""></van-image>-->
|
||||
<van-image height="186" src="/assets/mobile/img/3quhtakfd4heeqsk6irqhft60p.png"></van-image>
|
||||
<div class="title">{{activity.activityName}}</div>
|
||||
|
||||
<van-tabs v-model:active="tabActive" shrink>
|
||||
<van-tab title="详细信息" name="a">
|
||||
<!--<div class="content_title">关于{{activity.activityName}}的通知</div>-->
|
||||
<div class="pre_text" v-html="activity.introduce"></div>
|
||||
<!--<div v-for="(value, key, index) in activityMap" style="margin-bottom: 30px">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
{{key}}<span style="color: #1867b0">(左划查看更多)</span>
|
||||
</div>
|
||||
<div style="width: 100%; overflow-x: auto">
|
||||
<table class="custable">
|
||||
<tr>
|
||||
<td>序号</td>
|
||||
<td>{{trainType}}名称</td>
|
||||
<!–<td>课次</td>–>
|
||||
<td>时间</td>
|
||||
<td>{{trainType}}地点</td>
|
||||
<td>{{trainType === '培训班' ? '讲师' : '负责人'}}</td>
|
||||
</tr>
|
||||
<tr v-for="(o, num) in value">
|
||||
<td>{{num + 1}}</td>
|
||||
<td>{{o.courseName}}</td>
|
||||
<!–<td>{{o.courseTimeList.length}}</td>–>
|
||||
<td style="line-height: 26px;">
|
||||
<div v-for="t in o.timeList">{{t}}</div>
|
||||
</td>
|
||||
<td>{{o.courseLocation}}</td>
|
||||
<td>{{o.courseInstructor}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>-->
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-button @click="toSign" color="#1867b0" block style="position: fixed; bottom: 0; z-index: 2">去报名</van-button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
trainType: '培训班',
|
||||
trainTypeList: [],
|
||||
tabActive: 'a',
|
||||
activityId: '',
|
||||
activity: {},
|
||||
activityMap: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne() {
|
||||
const resp = await $.get('/platform/mobile/trainSignUpActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: 0
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activity = resp.data
|
||||
const type = this.trainTypeList.find(o => o.code === this.activity.trainType)
|
||||
this.trainType = type ? type.name : '培训班'
|
||||
//将数据按校区分组
|
||||
for (const item of this.activity.courseList) {
|
||||
|
||||
//item.courseName = item.courseName.indexOf('校区') !== -1 ? item.courseName.substr(item.courseName.indexOf('校区') + 2) : item.courseName
|
||||
const key = item.campus
|
||||
if (this.activityMap[key] === undefined) {
|
||||
let array = []
|
||||
array.push(item)
|
||||
this.activityMap[key] = array
|
||||
} else {
|
||||
this.activityMap[key].push(item)
|
||||
}
|
||||
|
||||
let timeArray = []
|
||||
if (item.courseTimeList && item.courseTimeList.length > 0) {
|
||||
for (const time of item.courseTimeList) {
|
||||
const t = this.getWeek(time.courseDate.substr(0, 10)) + ' ' + time.courseStartTime.substr(11, 5) + '~' + time.courseEndTime.substr(11, 5)
|
||||
timeArray.push(t)
|
||||
}
|
||||
item.timeList = Array.from(new Set(timeArray))
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async toSign() {
|
||||
const nowTime = moment().unix()
|
||||
if (nowTime < moment(this.activity.activitySignUpStartTime).unix()) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动报名还未开始',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
// vant.Toast('活动报名还未开始')
|
||||
return
|
||||
}
|
||||
if (nowTime > moment(this.activity.activitySignUpEndTime).unix()) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动报名已结束',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
// vant.Toast('活动报名已结束')
|
||||
return
|
||||
}
|
||||
|
||||
if (this.activity.activityGroupId != null) {
|
||||
const isExist = await getScopeUser(this.activity.activityGroupId)
|
||||
if (!isExist) {
|
||||
if(this.activity.activityGroupName.indexOf('两癌筛查') !== -1) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '哇偶,只有年龄满35周岁不足64周岁的女神才可以报名喔',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
}else {
|
||||
vant.Dialog.alert({
|
||||
title: '参加人员范围',
|
||||
message: this.activity.activityGroupName,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
window.location.href = '/platform/mobile/trainSignUpActivity/trainInfo?activityId=' + this.activity.id + '&endTime=' + this.activity.activitySignUpEndTime
|
||||
},
|
||||
getWeek(dateString) {
|
||||
var dateArray = dateString.split("-");
|
||||
const date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
|
||||
return "周" + "日一二三四五六".charAt(date.getDay());
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.trainTypeList = await getDictOptions("trainSignUpType")
|
||||
this.activityId = getQueryString('activityId')
|
||||
this.findOne()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,743 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-doc-card-my {
|
||||
margin: 14px;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px 16px 10px;
|
||||
min-height: 100px;
|
||||
max-height: 360px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #cccdd1;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-family: -webkit-pictograph, serif;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.popup {
|
||||
width: 90%;
|
||||
max-height: 70%;
|
||||
overflow-y: auto;
|
||||
border-radius: 10px;
|
||||
padding: 2px 10px 12px 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
width: 35px;
|
||||
height: 38px;
|
||||
margin-right: 20px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.van-card__content {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.van-card__title {
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
background-color: transparent;
|
||||
position: relative;
|
||||
transform: translate(0%, 50%);
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 20px;
|
||||
/*height: calc(100% - 40px - 46px - 60px);*/
|
||||
height: calc(100vh - 46px - 50px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card-two {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
.footer .van-button {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.amap-logo {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.amap-copyright {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar :title="trainType + '列表'" left-arrow
|
||||
@click-left="location.replace('/platform/mobile/trainSignUpActivity/trainList?type=' + type)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-dropdown-menu active-color="#1867b0">
|
||||
<van-dropdown-item @change="tabChange" v-model="activityStatus"
|
||||
:options="activityOptions"></van-dropdown-item>
|
||||
<van-dropdown-item @change="courseChange" v-model="courseType" :options="courseOptions"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<!--<van-notice-bar
|
||||
left-icon="volume-o"
|
||||
text="温馨提示:每人只能填报一项活动">
|
||||
</van-notice-bar>-->
|
||||
|
||||
<template>
|
||||
<div id="parentDiv" v-model="loading" v-if="tableData.courseList && tableData.courseList.length>0">
|
||||
|
||||
<template v-for="o in tableData.courseList">
|
||||
<div style="position: relative"
|
||||
:class="activityStatus !== '1' ? 'van-doc-card' : 'van-doc-card-my'">
|
||||
<div>
|
||||
<van-tag type="primary" size="medium">
|
||||
{{getCourseTypeName(o)}}
|
||||
</van-tag>
|
||||
<span style="font-weight: bold; font-size: 14px">
|
||||
{{o.courseName}}
|
||||
<span v-if="activityStatus !== '1'">
|
||||
(
|
||||
<span style="color: red">余{{o.coursePeopleNumber - (o.hasRegisterNum + o.courseReservedNumber)}}</span>
|
||||
/{{o.coursePeopleNumber}}人)
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">校  区:</span>
|
||||
<span>{{o.campus}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">地  点:</span>
|
||||
<span>{{o.courseLocation}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">联 系 人:</span>
|
||||
<span>{{o.courseInstructor}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">时  间:</span>
|
||||
<span v-if="o.courseTimeList && o.courseTimeList.length > 1" @click="trainClick(o)"
|
||||
style="color: #1867b0">点我查看</span>
|
||||
<span @click="trainClick(o)" v-if="o.courseTimeList && o.courseTimeList.length === 1"
|
||||
style="color: #1867b0">
|
||||
{{o.courseTimeList[0].courseStartTime.substring(11, 19) + ' ~ ' + o.courseTimeList[0].courseEndTime.substring(11, 19)}}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span @click.stop="showPic(FILE_DOMAIN + '/fileStreamPreview?id=' + tableData.wechat.id)"
|
||||
v-if="o.isSign === true && tableData.wechat"
|
||||
style="color: #dd6363">点我查看微信群二维码</span>
|
||||
</div>
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
v-if="activityStatus !== '1' && o.isSign === false"
|
||||
style="position: absolute; left: 74%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="signUp(o)">
|
||||
我要报名
|
||||
</van-button>
|
||||
|
||||
<van-button type="primary" color="#dd6363" round size="mini"
|
||||
v-if="o.isSign === true && moment().valueOf() < moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 74%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="cancel(o)">
|
||||
取消报名
|
||||
</van-button>
|
||||
|
||||
<image v-if="activityStatus !== '1' && o.isSign === true && moment().valueOf() >= moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 77%; top: 58%;"
|
||||
src="/assets/mobile/svg/train/sign_up.svg"></image>
|
||||
|
||||
<div @click="trainClick(o)" v-if="activityStatus === '1'"
|
||||
style="text-align: center; line-height: 40px; width: 40px; height: 40px;display: inline-block; font-size: 14px;
|
||||
position: absolute; right: -10px; top: 8%; background-color: #00c698; border-radius: 7px; color: white">
|
||||
签到
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
|
||||
<van-popup v-model:show="popupShow" class="popup">
|
||||
<!--<div @click="vant.Dialog.alert({message: '上课前30分钟,下课前30分钟。',theme: 'round-button',confirmButtonColor: '#1867b0'})"
|
||||
style="font-size: 12px; color: grey; text-align: right; position: relative; top: 8px; right: 6px; z-index: 2;">签到规则 ></div>-->
|
||||
|
||||
<div id="map" v-if="course.isMobileSign === true && course.signType === 3"
|
||||
style="width: 100%; height: 250px"></div>
|
||||
|
||||
<van-card
|
||||
:title="item.courseStartTime.substring(0, 10) + '(' +
|
||||
getWeek(item.courseStartTime.substring(0, 10)) + ')'" v-for="(item,index) in qdArray"
|
||||
thumb="/assets/mobile/svg/train/qd1.svg">
|
||||
<template #desc>
|
||||
<div style="margin-top: 7px">
|
||||
{{item.courseStartTime.substring(11, 19) + ' ~ ' + item.courseEndTime.substring(11, 19)}}
|
||||
</div>
|
||||
<div v-if="item.courseLocationCoordinates && item.isMobileSign === true">
|
||||
<van-button type="primary" color="#1867b0" round size="mini" @click.stop="showQRCode(item, 2)"
|
||||
v-if="activityStatus === '1' && item.isAttend === true && course.giftType === 1"
|
||||
style="position: absolute; right: 65px; top: 25%; width: 60px; height: 25px">
|
||||
礼品码
|
||||
</van-button>
|
||||
<van-button type="primary" color="#e1e1e1" round size="mini"
|
||||
v-if="activityStatus === '1' && item.isAttend === false && findTime(item) === false"
|
||||
style="position: absolute; right: 0; top: 25%; width: 60px; height: 25px">
|
||||
未签到
|
||||
</van-button>
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
v-if="activityStatus === '1' && item.isAttend === false && findTime(item) === true"
|
||||
style="position: absolute; right: 0; top: 25%; width: 60px; height: 25px"
|
||||
@click.stop="signIn(item)">
|
||||
签 到
|
||||
</van-button>
|
||||
<van-button type="primary" color="#61ce98" round size="mini"
|
||||
v-if="activityStatus === '1' && item.isAttend === true"
|
||||
style="position: absolute; right: 0; top: 25%; width: 60px; height: 25px">
|
||||
已签到
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-card>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<van-popup class="joinPopup" position="right" v-model:show="joinPopup">
|
||||
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="活动报名"></van-nav-bar>
|
||||
<div class="join_content">
|
||||
<van-form @submit="joinSubmit" :show-error-message="false">
|
||||
<div class="van-doc-card-two" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<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.unitName"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field label="性别" readonly v-model="formData.sex"></van-field>
|
||||
<van-field label="联系方式" required :rules="[{ required: true, message: '请填写联系方式' }]"
|
||||
placeholder="请填写联系方式" v-model="formData.mobile"></van-field>
|
||||
<train-dynamic-form v-model="dynamicColumnsData" ref="trainDynamicForm"></train-dynamic-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
let pointArray = []
|
||||
let locations = null
|
||||
let map = null
|
||||
let geolocation = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
allColumnsData: [],
|
||||
dynamicColumnsData: [],
|
||||
trainType: '培训班',
|
||||
trainTypeList: [],
|
||||
actionShow: false,
|
||||
timeList: [],
|
||||
activityId: '',
|
||||
activityStatus: '0',
|
||||
joinPopup: false,
|
||||
popupShow: false,
|
||||
courseText: '',
|
||||
qdInfoList: [],
|
||||
course: [],
|
||||
qdArray: [],
|
||||
activityOptions: [{text: '全部', value: '0'}, {text: '我报名的', value: '1'}],
|
||||
courseOptions: [],
|
||||
courseType: '0',
|
||||
tempArray: [],
|
||||
activitySignUpStartTime: null,
|
||||
choose: {},
|
||||
activity: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'train-dynamic-form': httpVueLoader('/components/mobile/common/TrainDynamicForm.vue')
|
||||
},
|
||||
methods: {
|
||||
getCourseTypeName(o) {
|
||||
const b = this.courseOptions.find(item => item.value === o.courseType)
|
||||
return b ? b.text : ''
|
||||
},
|
||||
//二维码
|
||||
showQRCode(item, type) {
|
||||
const o = {
|
||||
userId: item.userId,
|
||||
signId: item.id,
|
||||
activityId: item.activityId,
|
||||
activityCourseId: item.activityCourseId,
|
||||
isMobileSign: item.isMobileSign,
|
||||
signType: item.signType,
|
||||
isReceiveGift: item.isReceiveGift,
|
||||
giftType: item.giftType,
|
||||
type: type,
|
||||
}
|
||||
// 生成二维码的 base64 编码
|
||||
const content = jrQrcode.getQrBase64(JSON.stringify(o))
|
||||
vant.ImagePreview([content])
|
||||
},
|
||||
showPic(url) {
|
||||
vant.ImagePreview([url])
|
||||
},
|
||||
findTime(o) {
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
return o.courseStartTime.substr(0, 10) === today
|
||||
},
|
||||
findQd() {
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
const day = this.qdInfoList.find(item => {
|
||||
return item.courseStartTime.substr(0, 10) === today
|
||||
})
|
||||
if (day === undefined) {
|
||||
return 3
|
||||
} else {
|
||||
return day.isAttend ? 2 : 1
|
||||
}
|
||||
},
|
||||
async signIn(o) {
|
||||
if (o.signType === 1) {
|
||||
//调相机扫一扫
|
||||
wxScannerQrCode.scanner().then(async res => {
|
||||
if (res) {
|
||||
const course = JSON.parse(res)
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/codeSign', {
|
||||
codeCourseId: course.courseId,
|
||||
clickCourseId: o.courseId,
|
||||
id: o.id,
|
||||
})
|
||||
if(resp.code === 0) {
|
||||
vant.Dialog.alert({message: '签到成功'})
|
||||
await this.pageData()
|
||||
o.isAttend = true
|
||||
} else {
|
||||
vant.Dialog.alert({message: resp.msg})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
vant.Dialog.alert({message: err})
|
||||
})
|
||||
}
|
||||
if (o.signType === 2) {
|
||||
this.showQRCode(o, 1)
|
||||
}
|
||||
if (o.signType === 3) {
|
||||
//获取当前时间,年月日
|
||||
const formatString = 'YYYY-MM-DD HH:mm:ss'
|
||||
const parsedTime = moment(o.courseStartTime, formatString)
|
||||
// 使用 subtract() 方法获取给定时间之前的 30 分钟
|
||||
const thirtyMinutesAgo = parsedTime.subtract(30, 'minutes').valueOf()
|
||||
const end = moment(o.courseEndTime, formatString).valueOf()
|
||||
const now = moment().valueOf()
|
||||
|
||||
if (now < thirtyMinutesAgo || now > end) {
|
||||
vant.Toast('请在规定时间签到')
|
||||
return
|
||||
}
|
||||
const that = this
|
||||
geolocation.getCurrentPosition(async function (status, result) {
|
||||
if (status === 'complete') {
|
||||
locations = [result.position.getLng(), result.position.getLat()]
|
||||
//用户当前位置
|
||||
const userPoint = new AMap.LngLat(result.position.getLng(), result.position.getLat())
|
||||
//课程位置
|
||||
const coursePoint = new AMap.LngLat(that.course.courseLocationCoordinates[0], that.course.courseLocationCoordinates[1])
|
||||
const distance = Math.round(userPoint.distance(coursePoint))
|
||||
if (distance > 250) {
|
||||
vant.Toast('请在250米内签到')
|
||||
return
|
||||
}
|
||||
const array = [result.position.getLng(), result.position.getLat()]
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/doQd', {
|
||||
id: o.id,
|
||||
courseId: that.course.id,
|
||||
point: JSON.stringify(array),
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
await that.pageData()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
that.popupShow = false
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//获取当前坐标点
|
||||
getPoint() {
|
||||
/*return new Promise((resolve, reject) => {
|
||||
window.navigator.geolocation.getCurrentPosition(position => {
|
||||
pointArray = [position.coords.longitude, position.coords.latitude]
|
||||
resolve(pointArray)
|
||||
}, error => {
|
||||
vant.Toast(error.message)
|
||||
pointArray = []
|
||||
reject([])
|
||||
})
|
||||
})*/
|
||||
geolocation.getCurrentPosition(function(status,result){
|
||||
if(status === 'complete'){
|
||||
//alert(result.position)
|
||||
locations = result.position
|
||||
}else{
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: "您确定要<span style='color: red'>取消【" + o.courseName + "】</span>吗?\n一旦确认,可不能反悔了哟!",
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/cancelSignUp', {
|
||||
activityId: o.activityId,
|
||||
courseId: o.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
async signUp(o) {
|
||||
this.choose = o
|
||||
const res = await $.post('/platform/mobile/trainSignUpActivity/validateSignUp', {
|
||||
cndId: o.conditionStructureId,
|
||||
courseId: o.id,
|
||||
})
|
||||
if(res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if(res.code !== 3) {
|
||||
return
|
||||
}
|
||||
}
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
}
|
||||
this.$set(this.formData, "activityId", o.activityId)
|
||||
this.$set(this.formData, "courseId", o.id)
|
||||
|
||||
const column = this.allColumnsData.find(x => x.id === o.courseType)
|
||||
this.dynamicColumnsData = column ? column.trainMobileSignColumnList : []
|
||||
this.dynamicColumnsData.forEach(item => {
|
||||
item.columnValue = ''
|
||||
})
|
||||
this.joinPopup = true
|
||||
},
|
||||
async joinSubmit() {
|
||||
let valid = false
|
||||
try {
|
||||
await this.$refs.trainDynamicForm.$refs.form.validate()
|
||||
valid = true
|
||||
} catch (e) {
|
||||
valid = false
|
||||
}
|
||||
if (!valid) return
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您选择了【' + this.choose.courseName + '】\n一旦确认,可不能反悔了哟',
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const mobileColumnsValue = this.dynamicColumnsData.map(v => {
|
||||
return {
|
||||
columnName: v.columnName,
|
||||
columnValue: v.columnValue,
|
||||
columnCode: v.columnCode,
|
||||
columnFormType: v.columnFormType
|
||||
}
|
||||
})
|
||||
this.formData.mobileColumnsValue = JSON.stringify(mobileColumnsValue)
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/doSignUp', this.formData)
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.joinPopup = false
|
||||
}
|
||||
toast.clear()
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
trainClick(o) {
|
||||
this.timeList = o.courseTimeList
|
||||
this.course = o
|
||||
this.qdArray = this.activityStatus === '0' ? o.courseTimeList : this.qdInfoList.filter(item => {
|
||||
return item.courseId === o.id
|
||||
})
|
||||
if (o.signType === 3) {
|
||||
this.initMap(o)
|
||||
}
|
||||
this.popupShow = true
|
||||
},
|
||||
initMap(o) {
|
||||
if (o.courseLocationCoordinates && o.courseLocationCoordinates.length < 2) {
|
||||
return
|
||||
}
|
||||
this.$nextTick(async () => {
|
||||
// 地图初始化应该在地图容器div已经添加到DOM树之后
|
||||
map = new AMap.Map('map', {
|
||||
zoom: 12,
|
||||
center: o.courseLocationCoordinates,
|
||||
resizeEnable: true,
|
||||
scrollWheel: true,
|
||||
})
|
||||
|
||||
AMap.plugin('AMap.Geolocation', function() {
|
||||
geolocation = new AMap.Geolocation({
|
||||
// 是否使用高精度定位,默认:true
|
||||
enableHighAccuracy: true,
|
||||
// 设置定位超时时间,默认:无穷大
|
||||
timeout: 10000,
|
||||
// 定位按钮的停靠位置的偏移量,默认:Pixel(10, 20)
|
||||
buttonOffset: new AMap.Pixel(10, 20),
|
||||
// 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
|
||||
//zoomToAccuracy: true,
|
||||
// 定位按钮的排放位置, RB表示右下
|
||||
buttonPosition: 'RB',
|
||||
showCircle: false,
|
||||
//showButton: false,
|
||||
})
|
||||
map.addControl(geolocation);
|
||||
})
|
||||
|
||||
// 创建一个 Marker 实例:
|
||||
var marker = new AMap.Marker({
|
||||
position: new AMap.LngLat(o.courseLocationCoordinates[0], o.courseLocationCoordinates[1]), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
|
||||
title: '签到点'
|
||||
});
|
||||
|
||||
//获取当前坐标点
|
||||
await this.getPoint()
|
||||
|
||||
var circle = new AMap.Circle({
|
||||
center: new AMap.LngLat(o.courseLocationCoordinates[0], o.courseLocationCoordinates[1]), // 圆心位置
|
||||
radius: 250, // 圆半径
|
||||
borderWeight: 1,
|
||||
strokeOpacity: 1,
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
map.add(circle);
|
||||
// 缩放地图到合适的视野级别
|
||||
map.setFitView([circle])
|
||||
|
||||
// 多个点实例组成的数组
|
||||
var markerList = [marker];
|
||||
map.add(markerList);
|
||||
})
|
||||
},
|
||||
async pageData() {
|
||||
|
||||
const resp = await $.get('/platform/mobile/trainSignUpActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: this.activityStatus
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
this.tempArray = clone(this.tableData)
|
||||
const type = this.trainTypeList.find(o => o.code === this.tableData.trainType)
|
||||
this.trainType = type ? type.name : '培训班'
|
||||
} else {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
}
|
||||
await this.getQdInfoList()
|
||||
this.courseChange(this.courseType, 1)
|
||||
this.loading = false;
|
||||
},
|
||||
async getQdInfoList() {
|
||||
const resp = await $.get('/platform/mobile/trainSignUpActivity/getQdInfoList', {
|
||||
activityId: this.activityId,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.qdInfoList = resp.data
|
||||
}
|
||||
},
|
||||
getWeek(dateString) {
|
||||
var dateArray = dateString.split("-");
|
||||
const date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
|
||||
return "周" + "日一二三四五六".charAt(date.getDay());
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await $.post('/platform/trainSingUp/manage/type/getAllType', {})
|
||||
this.allColumnsData = resp.data
|
||||
return resp.data
|
||||
},
|
||||
async getCourseText() {
|
||||
const courseArray = await this.getAllType()
|
||||
this.courseOptions = []
|
||||
this.courseOptions.push({text: '全部类型', value: '0'})
|
||||
for (const item of courseArray) {
|
||||
if (item.personMaxRegisterNum > 0) {
|
||||
this.courseText += item.value + '报名最多选' + item.personMaxRegisterNum + '项,'
|
||||
}
|
||||
this.courseOptions.push({text: item.lxname, value: item.id})
|
||||
}
|
||||
this.courseText = this.courseText.substr(0, this.courseText.length - 1)
|
||||
},
|
||||
courseChange(value, item) {
|
||||
if (item === undefined) {
|
||||
this.tableData.courseList = []
|
||||
this.startLoading()
|
||||
}
|
||||
this.tableData.courseList = value === '0' ? this.tempArray.courseList : this.tempArray.courseList.filter(item => item.courseType === value)
|
||||
this.closeLoading()
|
||||
},
|
||||
async getActivity() {
|
||||
const resp = await $.get('/platform/mobile/trainSignUpActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: 0
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activity = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.trainTypeList = await getDictOptions("trainSignUpType")
|
||||
this.activityId = GetQueryString('activityId')
|
||||
this.type = GetQueryString('type')
|
||||
const time = GetQueryString('endTime')
|
||||
if (this.type === 'my') {
|
||||
this.activityOptions = [{text: '我报名的', value: '1'}]
|
||||
this.activityStatus = '1'
|
||||
} else {
|
||||
this.activityOptions = [{text: '全部', value: '0'}, {text: '我报名的', value: '1'}]
|
||||
this.activityStatus = new Date().getTime() > new Date(time).getTime() ? '1' : '0'
|
||||
}
|
||||
this.activitySignUpStartTime = GetQueryString('activitySignUpStartTime')
|
||||
vant.Toast.setDefaultOptions({duration: 2000});
|
||||
this.startLoading()
|
||||
this.pageData()
|
||||
this.getCourseText()
|
||||
this.getActivity()
|
||||
this.closeLoading()
|
||||
|
||||
await wxScannerQrCode.initWxConfig(window.location.href)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,180 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin: 10px auto 0;
|
||||
width: 96%;
|
||||
border-radius: 10px;
|
||||
padding: 14px 12px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
flex: 0.6;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 5px 0px;
|
||||
border-color: #1867b0;
|
||||
}
|
||||
|
||||
.van-image__img {
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.van-image__error, .van-image__loading {
|
||||
height: 200px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动列表" left-arrow
|
||||
@click-left="location.replace('/mobile/index')"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.activityStatus" @change="tabChange">
|
||||
<van-tab title="全部" name="0"></van-tab>
|
||||
<van-tab v-if="type !== 'my'" title="报名进行中" name="1"></van-tab>
|
||||
<van-tab v-if="type === 'my'" title="进行中" name="3"></van-tab>
|
||||
<van-tab title="已结束" name="2"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
<div @click="welfareClick(o)">
|
||||
<div>
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover.id"
|
||||
style="display: contents"
|
||||
v-if="o.cover && o.cover.filepath"></van-image>
|
||||
<van-image src=""
|
||||
style="display: contents"
|
||||
v-else></van-image>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-ellipsis" style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
{{o.activityName}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="train-title">
|
||||
<span style="color: grey">年   度:</span>
|
||||
<span>{{o.year}}</span>
|
||||
</div>
|
||||
<div class="train-title">
|
||||
<span style="color: grey">活动对象:</span>
|
||||
<span>{{o.activityGroupName}}</span>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title">
|
||||
<span style="color: grey">报名时间:</span>
|
||||
<span>{{moment(o.activitySignUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.activitySignUpEndTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
</div>
|
||||
<div style="margin-top: 6px">
|
||||
<span style="color: grey">活动时间:</span>
|
||||
<span>{{moment(o.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.activityEndTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
type: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async welfareClick(o) {
|
||||
if (this.type === 'my') {
|
||||
window.location.href = '/platform/mobile/trainSignUpActivity/trainInfo' +
|
||||
'?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime + '&type=my' + '&startTime=' + o.activitySignUpStartTime
|
||||
} else {
|
||||
window.location.href = '/platform/mobile/trainSignUpActivity/activityInfo?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.type = GetQueryString('type')
|
||||
this.pageForm.type = this.type
|
||||
this.startLoading()
|
||||
this.pageForm.activityStatus = this.type === 'my' ? '3' : '1'
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,162 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
#app {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.topTitle {
|
||||
font-size: 16px;
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
max-width: calc(100% - 100px);
|
||||
}
|
||||
|
||||
.list-item > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.newest-video, .nav-button {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="视频资料"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="newest-video">
|
||||
<h4>{{typeName}}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-button">
|
||||
<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 type="info" :plain="pageForm.searchType !== null" size="small" @click="searchTypeClick(null)">全部
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin: 20px auto 0 auto;position: relative">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="goVideoPage(o)">
|
||||
<div style="display: flex;padding-bottom: 10px" class="van-hairline--bottom">
|
||||
<van-image
|
||||
style="margin-right: 10px"
|
||||
width="90"
|
||||
height="90"
|
||||
:src="'${AppFileDomain!}'+o.cover"
|
||||
></van-image>
|
||||
<div class="list-item">
|
||||
<div style="font-size: 14px">{{o.title}}</div>
|
||||
<div class="van-ellipsis" style="color: darkgray;font-size: 13px">
|
||||
{{removeHTMLTag(o.description)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-tag plain type="primary">{{o.videoCount}}个视频</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/platform/trainEdu/include/include.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
typeName: null,
|
||||
videoTypeList: [],
|
||||
pageForm: {
|
||||
searchType: null
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const toast = vant.Toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
});
|
||||
const {data} = await $.get('/mobile/trainEducation/getAlbumList', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
toast.close()
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
searchTypeClick(val) {
|
||||
this.pageForm.searchType = val
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
goVideoPage(item) {
|
||||
window.location.href = '/mobile/trainEducation/videoPage?id=' + item.id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.videoTypeList = await getVideoType()
|
||||
const typeId = this.GetQueryString("id")
|
||||
const type = this.videoTypeList.find(v => parseInt(v.id) === parseInt(typeId))
|
||||
this.typeName = type.typeName
|
||||
if (typeId) {
|
||||
this.$set(this.pageForm, 'typeId', typeId)
|
||||
await this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,116 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.newest-video {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
max-width: calc(100% - 100px);
|
||||
}
|
||||
|
||||
.list-item > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="培训教育"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
></van-nav-bar>
|
||||
|
||||
<van-swiper>
|
||||
<van-swiper-item>
|
||||
<van-image
|
||||
fit="contain"
|
||||
:src="topImg" alt="">
|
||||
</van-image>
|
||||
</van-swiper-item>
|
||||
</van-swiper>
|
||||
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item v-for="item in videoTypeList"
|
||||
:url="'/mobile/trainEducation/AlbumList?id=' + item.id"
|
||||
:key="item.id"
|
||||
:icon="'${AppFileDomain!}'+item.icon"
|
||||
:text="item.typeName"></van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||
|
||||
<div class="newest-video">
|
||||
<h4>最新视频</h4>
|
||||
</div>
|
||||
|
||||
<div v-for="o in tableData" class="list-card" @click="goVideoPage(o)">
|
||||
<div style="display: flex;padding-bottom: 10px" class="van-hairline--bottom">
|
||||
<van-image
|
||||
style="margin-right: 10px"
|
||||
width="90"
|
||||
height="90"
|
||||
:src="'${AppFileDomain!}'+o.cover"
|
||||
></van-image>
|
||||
<div class="list-item">
|
||||
<div style="font-size: 14px">{{o.title}}</div>
|
||||
<div class="van-ellipsis" style="color: darkgray;font-size: 13px">
|
||||
{{removeHTMLTag(o.description)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-tag plain type="primary">{{o.videoCount}}个视频</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/platform/trainEdu/include/include.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
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'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goVideoPage(item) {
|
||||
window.location.href = '/mobile/trainEducation/videoPage?id=' + item.id
|
||||
},
|
||||
async getNewVideo() {
|
||||
this.tableData = []
|
||||
const {data} = await $.get('/mobile/trainEducation/getNewestVideo')
|
||||
this.tableData.push(data)
|
||||
console.log(data)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.videoTypeList = await getVideoType()
|
||||
await this.getNewVideo()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,301 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<script src="https://cdn-go.cn/cdn/vod-js-sdk-v6/latest/vod-js-sdk-v6.js"></script>
|
||||
<link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.3.0/tcplayer.min.css" rel="stylesheet"/>
|
||||
<!--如果需要在 Chrome 和 Firefox 等现代浏览器中通过 H5 播放 HLS 格式的视频,需要在 tcplayer.vx.x.x.min.js 之前引入 hls.min.x.xx.xm.js。-->
|
||||
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.3.0/libs/hls.min.0.13.2m.js"></script>
|
||||
<!--播放器脚本文件-->
|
||||
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.3.0/tcplayer.v4.3.0.min.js"></script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.video-container {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
#player-container-id {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.van-tabs__wrap {
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
}
|
||||
|
||||
.album-description img {
|
||||
background-size: contain;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.video-list .van-cell__value {
|
||||
width: 50px;
|
||||
flex: unset;
|
||||
}
|
||||
|
||||
.video-list .van-cell__title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.descriptionCell .van-cell__title {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.descriptionCell p {
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title=""
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="video-container">
|
||||
<video v-if="isPlay" id="player-container-id" preload="auto" playsinline
|
||||
webkit-playsinline>
|
||||
</video>
|
||||
|
||||
<van-image
|
||||
v-else
|
||||
style="width: 100%;height: 100%"
|
||||
:src="'${AppFileDomain!}'+albumInfo.cover"
|
||||
></van-image>
|
||||
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="tabIndex" sticky>
|
||||
<van-tab title="介绍">
|
||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||
|
||||
<div style="padding: 16px">
|
||||
{{albumInfo.title}}
|
||||
</div>
|
||||
|
||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||
|
||||
<van-cell class="descriptionCell">
|
||||
<template #title>
|
||||
<div style="font-size: 14px">课程介绍</div>
|
||||
</template>
|
||||
<template #label>
|
||||
<div class="album-description" v-html="albumInfo.description"></div>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
</van-tab>
|
||||
<van-tab title="目录">
|
||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||
|
||||
<van-cell-group class="video-list">
|
||||
<van-cell v-for="(o,i) in videoList" @click="playVideo(o)">
|
||||
<template #title>
|
||||
<van-tag plain type="primary" style="margin-right: 10px">视频</van-tag>
|
||||
<span style="margin-right: 10px">
|
||||
{{i+1}}.
|
||||
</span>
|
||||
<span>
|
||||
{{o.title}}
|
||||
</span>
|
||||
</template>
|
||||
<template #label>
|
||||
{{getWatchStatus(o)}}
|
||||
</template>
|
||||
<template>
|
||||
<span v-if="o.id === currentVideo.id">
|
||||
播放中
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
<!-- <van-tab title="评价">-->
|
||||
<!-- <div style="height: 5px;background-color: #f6f7f9"></div>-->
|
||||
<!-- <van-cell title="我的评价">-->
|
||||
<!-- <template>-->
|
||||
<!-- <van-rate v-model="myComment.level" icon="like" void-icon="like-o"></van-rate>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
<!-- </van-tab>-->
|
||||
</van-tabs>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
let player = null
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
typeName: null,
|
||||
videoTypeList: [],
|
||||
albumId: null,
|
||||
albumInfo: {},
|
||||
videoList: [],
|
||||
tabIndex: 0,
|
||||
currentVideo: {},
|
||||
myComment: {},
|
||||
watchRecordList: [],
|
||||
lastTime: 0,
|
||||
isPlay: false
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getVideoInfo() {
|
||||
const {data} = await $.get('/mobile/trainEducation/getVideoList', {albumId: this.albumId})
|
||||
this.videoList = data
|
||||
|
||||
},
|
||||
async getAlbumInfo() {
|
||||
const {data} = await $.get('/mobile/trainEducation/getAlbumInfo', {id: this.albumId})
|
||||
this.albumInfo = data
|
||||
},
|
||||
//播放视频
|
||||
async playVideo(o) {
|
||||
this.isPlay = true
|
||||
this.currentVideo = o
|
||||
|
||||
this.$nextTick(()=>{
|
||||
if (!player) {
|
||||
player = TCPlayer('player-container-id', {})
|
||||
}
|
||||
player.src(o.mediaUrl)
|
||||
})
|
||||
|
||||
|
||||
// await this.addWatchRecord()
|
||||
await this.getMyWatchRecord()
|
||||
|
||||
//接着上次继续看
|
||||
const v = this.watchRecordList.find(v => v.videoId === o.id)
|
||||
if (v) {
|
||||
this.lastTime = v.watchDuration
|
||||
setTimeout(() => {
|
||||
player.currentTime(v.watchDuration)
|
||||
})
|
||||
} else {
|
||||
player.currentTime(0)
|
||||
await this.addWatchRecord()
|
||||
await this.getMyWatchRecord()
|
||||
}
|
||||
|
||||
// player.play()
|
||||
this.playPause()
|
||||
this.playEnd()
|
||||
this.playTimeUpdate()
|
||||
this.playSeeked()
|
||||
},
|
||||
|
||||
//快进 快退
|
||||
playSeeked() {
|
||||
player.on('seeked', () => {
|
||||
this.lastTime = player.currentTime()
|
||||
this.addWatchRecord()
|
||||
})
|
||||
},
|
||||
playTimeUpdate() {
|
||||
this.lastTime = player.currentTime()
|
||||
player.on('timeupdate', () => {
|
||||
const nowTime = player.currentTime()
|
||||
if (nowTime - this.lastTime > 5) {
|
||||
this.lastTime = nowTime
|
||||
this.addWatchRecord()
|
||||
}
|
||||
})
|
||||
},
|
||||
playPause() {
|
||||
player.on('pause', () => {
|
||||
this.addWatchRecord()
|
||||
})
|
||||
},
|
||||
|
||||
playEnd() {
|
||||
player.on('ended', () => {
|
||||
this.addWatchRecord()
|
||||
this.getMyWatchRecord()
|
||||
const currentIndex = this.videoList.findIndex(v => v.id === this.currentVideo.id)
|
||||
const nextVideo = this.videoList[currentIndex + 1]
|
||||
if (nextVideo) {
|
||||
this.playVideo(nextVideo)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//播放记录
|
||||
async addWatchRecord() {
|
||||
// if (player.currentTime() < 2) {
|
||||
// return
|
||||
// }
|
||||
const params = {
|
||||
videoId: this.currentVideo.id,
|
||||
currentTime: parseInt(player.currentTime()),
|
||||
albumId: this.currentVideo.albumId
|
||||
}
|
||||
await $.post('/mobile/trainEducation/addWatchRecord', params)
|
||||
},
|
||||
//监听页面关闭 隐藏
|
||||
watchPage() {
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.visibilityState === 'hidden') {
|
||||
if (player && this.currentVideo) {
|
||||
this.addWatchRecord()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async getMyWatchRecord() {
|
||||
const {data} = await $.get('/mobile/trainEducation/getMyWatchRecord')
|
||||
this.watchRecordList = data
|
||||
},
|
||||
getWatchStatus(video) {
|
||||
const v = this.watchRecordList.find(v => v.videoId === video.id)
|
||||
if (!v) {
|
||||
return '学习进度:还未开始学习'
|
||||
}
|
||||
if (v.videoId === this.currentVideo.id) {
|
||||
return '学习进度:正在学习中'
|
||||
}
|
||||
const percentage = (parseInt((v.watchDuration / (video.fileDuration - 1)).toFixed(2) * 100)) + "%"
|
||||
return "学习进度:" + percentage
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.watchPage()
|
||||
const id = this.GetQueryString("id")
|
||||
if (id) {
|
||||
this.albumId = id
|
||||
this.getAlbumInfo()
|
||||
this.getVideoInfo()
|
||||
this.getMyWatchRecord()
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
const welfareMixins = {
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: '',
|
||||
addressList: [],
|
||||
isReceive: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async selectAddressList() {
|
||||
const resp = await $.get('/mobile/welfare/mine/selectUserAddress')
|
||||
this.addressList = resp.data
|
||||
},
|
||||
async getReceive() {
|
||||
const resp = await $.get('/mobile/welfare/mine/isReceive', {projectId: this.projectId})
|
||||
this.isReceive = resp.data
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" url="/mobile/welfare/list/index">首页</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" url="/mobile/welfare/mine/index">我的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="单元格" value="内容"></van-cell>
|
||||
<van-cell title="单元格" value="内容" label="描述信息"></van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.desc {
|
||||
padding: 10px;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
@media (max-width: 750px) {
|
||||
img {
|
||||
background-size: contain;
|
||||
width: 90%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" left-arrow
|
||||
title="详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div class="desc" v-html="desc"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
desc: null
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
const id = GetQueryString("optionId")
|
||||
if (id) {
|
||||
this.desc = window.localStorage.getItem('welfare_option_desc_' + id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,514 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 10px 16px !important;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.selection:not(:last-child) {
|
||||
border-bottom: 1px dashed lightgrey;
|
||||
}
|
||||
|
||||
.selection .van-checkbox-group .van-cell, .selection .van-radio-group .van-cell {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.selection .van-checkbox-group .van-cell .van-cell__title, .selection .van-radio-group .van-cell .van-cell__title {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.address-cell .van-cell__title {
|
||||
flex: unset;
|
||||
width: 70px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.address-cell .van-cell__value {
|
||||
text-align: left;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.van-collapse-item .van-collapse-item__title {
|
||||
|
||||
}
|
||||
|
||||
.selection .van-radio {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.selection .van-cell__label {
|
||||
display: flex;
|
||||
height: 80px;
|
||||
max-height: 80px;
|
||||
}
|
||||
|
||||
.selection .van-cell__label .welfare_img {
|
||||
width: 100px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.selection .van-cell__label .welfare_desc {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 4;
|
||||
-webkit-box-orient: vertical;
|
||||
width: calc(100% - 100px);
|
||||
padding: 0 10px;
|
||||
line-height: 20px;
|
||||
max-height: 80px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.selection .van-cell__label .welfare_desc .more {
|
||||
/*content:"更多";*/
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 10px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
#signature {
|
||||
height: 50vh;
|
||||
background: #fff;
|
||||
border: 1px dashed grey;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#signature .signature_reset {
|
||||
position: absolute;
|
||||
bottom: 2px;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="福利详情" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<template v-show="vLoading && !vLoading.value">
|
||||
|
||||
<!--基本信息-->
|
||||
<van-collapse class="van-cell-group--inset" v-model="activeNames">
|
||||
<van-collapse-item name="1">
|
||||
<template #title>
|
||||
<div style="font-weight: bold;font-size: 15px;display: flex;align-items: center">
|
||||
<van-icon class="van-cell__left-icon" color="red" name="star"></van-icon>
|
||||
福利信息
|
||||
</div>
|
||||
</template>
|
||||
<van-cell-group class="--van-cell-group--inset">
|
||||
<!-- <van-cell>-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <van-icon class="van-cell__left-icon" name="star" color="red"></van-icon>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #title>-->
|
||||
<!-- <div style="font-weight: bold;font-size: 15px">福利信息</div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
|
||||
<van-cell :border="false" :value="projectInfo.name" title="福利名称"></van-cell>
|
||||
<van-cell :border="false" :value="projectInfo.festival" title="发放节日"></van-cell>
|
||||
<van-cell :border="false" :value="projectInfo.gift" title="福利礼品"
|
||||
v-if="!projectInfo.flexible"></van-cell>
|
||||
<van-cell :border="false" :value="projectInfo.provideAddress" title="发放地点"></van-cell>
|
||||
<van-cell :border="false" title="发放形式">
|
||||
<template>
|
||||
{{welfareProvideMode.find(v=>v.code==projectInfo.provideMode) &&
|
||||
welfareProvideMode.find(v=>v.code==projectInfo.provideMode).description}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="签收形式">
|
||||
<template>
|
||||
{{welfareSignMode.find(v=>v.code==projectInfo.signMode) &&
|
||||
welfareSignMode.find(v=>v.code==projectInfo.signMode).description}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="发放时间">
|
||||
<template #label>
|
||||
{{projectInfo.provideTimeStart + ' 至 ' + projectInfo.provideTimeEnd}}
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
|
||||
|
||||
<!--礼品套餐-->
|
||||
<div v-if="projectInfo.flexible && [2,3,4].includes(projectInfo.provideMode) && projectInfo.welfareProjectSubjects && projectInfo.welfareProjectSubjects.length>0"
|
||||
class="van-cell-group--inset"
|
||||
style="margin:10px auto">
|
||||
<van-cell>
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" name="fire" color="red"></van-icon>
|
||||
</template>
|
||||
<template #title>
|
||||
<div style="font-weight: bold;font-size: 15px">选择福利</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<div v-for="(subject,sidx) in projectInfo.welfareProjectSubjects" class="selection">
|
||||
<van-cell :border="false">
|
||||
<!-- <span>({{sidx+1}}).</span>-->
|
||||
{{subject.subjectName}}
|
||||
</van-cell>
|
||||
<van-radio-group v-model="subject.selection" v-if="subject.subjectType==='radio'">
|
||||
<van-cell v-for="(option, oidx) in subject.options"
|
||||
:border="false"
|
||||
clickable
|
||||
@click="subject.selection = option.id"
|
||||
:key="option.id"
|
||||
:title="option.optionName">
|
||||
<template #label>
|
||||
<div class="welfare_img" v-if="option.imgUrl">
|
||||
<!-- @click.stop="vant.ImagePreview({images:[FILE_DOMAIN+option.imgUrl],overlayStyle:{background:'rgba(0,0,0,.9)'}})"-->
|
||||
<van-image
|
||||
:src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+option.imgUrl"
|
||||
height="80"
|
||||
width="100"
|
||||
></van-image>
|
||||
<!-- 查看图片-->
|
||||
</div>
|
||||
<div class="welfare_desc" v-if="option.description">
|
||||
{{removeHTMLTag(option.description).substr(0,40)+'...'}}
|
||||
<a @click.stop="viewDesc(option.id,option.description)" class="more" href="#"
|
||||
v-if="removeHTMLTag(option.description).length>40">查看更多</a>
|
||||
</div>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<van-radio :name="option.id"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-radio-group>
|
||||
|
||||
<van-checkbox-group v-model="subject.selection" v-if="subject.subjectType==='checkBox'">
|
||||
<van-cell
|
||||
v-for="(option, oidx) in subject.options"
|
||||
:border="false"
|
||||
clickable
|
||||
@click="checkBoxToggle('checkboxes-'+option.id)"
|
||||
:key="option.id"
|
||||
:title="option.optionName"
|
||||
>
|
||||
<template #label>
|
||||
<span v-if="option.imgUrl"
|
||||
@click.stop="vant.ImagePreview({images:[FILE_DOMAIN+option.imgUrl],overlayStyle:{background:'rgba(0,0,0,.9)'}})">查看图片</span>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<van-checkbox :name="option.id" shape="square"
|
||||
:ref="'checkboxes-'+option.id"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--邮寄到家-->
|
||||
<div v-if="projectInfo.provideMode===3" class="van-cell-group--inset">
|
||||
<van-cell>
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" name="location" color="red"></van-icon>
|
||||
</template>
|
||||
<template #title>
|
||||
<div style="font-weight: bold;font-size: 15px">收货地址</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="收获地址" is-link class="address-cell" @click="selectAddressPopup = true">
|
||||
<template>
|
||||
<span v-if="$.isEmptyObject(selectAddress)">请选择地址</span>
|
||||
<span v-else>
|
||||
{{selectAddress.province + selectAddress.city + selectAddress.county + selectAddress.address}}
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
</div>
|
||||
|
||||
<!--电子签字-->
|
||||
<div v-if="projectInfo.signMode===2" class="van-cell-group--inset">
|
||||
<van-cell>
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" name="location" color="red"></van-icon>
|
||||
</template>
|
||||
<template #title>
|
||||
<div style="font-weight: bold;font-size: 15px">电子签名</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="">
|
||||
<template #label>
|
||||
<!-- <img v-if="mySignature"
|
||||
@click="vant.ImagePreview({images:[mySignature],overlayStyle:{background:'#fff'},showIndex:false})"
|
||||
:src="mySignature" style="height:350px;width: 100% " alt="">
|
||||
|
||||
<div v-else id="signature">
|
||||
<van-tag type="danger" class="signature_reset" @click="resetSignature">重写</van-tag>
|
||||
</div>-->
|
||||
|
||||
<div id="signature">
|
||||
<van-tag type="danger" class="signature_reset" @click="resetSignature">重写</van-tag>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</van-cell>
|
||||
</div>
|
||||
|
||||
<div v-if="
|
||||
moment().valueOf() < moment(projectInfo.provideTimeEnd).valueOf()
|
||||
&&
|
||||
moment().valueOf() > moment(projectInfo.provideTimeStart).valueOf()"
|
||||
style="margin: 20px 20px 10px 20px">
|
||||
<van-button
|
||||
|
||||
@click="doReceive" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
{{isReceive?'重新选择':'选择'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<van-popup v-model="selectAddressPopup" closeable position="bottom" :style="{ height: '70%' }"
|
||||
safe-area-inset-bottom>
|
||||
<div style="height: 100%">
|
||||
<div style="font-size: 15px;font-weight: bold;text-align: center;padding-top: 16px;">配送至</div>
|
||||
<template v-if="addressList && addressList.length>0">
|
||||
<van-cell v-for="item in addressList" icon="location-o" clickable
|
||||
@click="selectAddress = item;selectAddressPopup=false">
|
||||
<template #title>
|
||||
{{item.address}}
|
||||
</template>
|
||||
<template #label>
|
||||
<div>{{"地区:" + item.province + item.city + item.county}}</div>
|
||||
<div>{{"收件人:" + item.name}}</div>
|
||||
<div>{{"联系方式:" + item.tel}}</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
<van-empty v-else description="暂无地址"></van-empty>
|
||||
|
||||
<div style="position: absolute;bottom: 0;left: 0;box-sizing: border-box;width: 100%;padding: 0 16px;background: #fff">
|
||||
<van-button @click="location.href = '/mobile/welfare/mine/address'" block round type="danger"
|
||||
style="height: 40px;margin: 5px 0">
|
||||
地址管理
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
activeNames: [],
|
||||
tabName: 'ing',
|
||||
tarBarActive: 0,
|
||||
projectId: null,
|
||||
projectInfo: {},
|
||||
welfareProvideMode: [],
|
||||
welfareSignMode: [],
|
||||
selectAddressPopup: false,
|
||||
selectAddress: {},
|
||||
mySignature: null,
|
||||
userSign: {
|
||||
data: null
|
||||
},
|
||||
imagePreview: false,
|
||||
userSelection: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne() {
|
||||
const resp = await $.get('/mobile/welfare/list/findOne', {projectId: this.projectId})
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.flexible) {
|
||||
await this.getUserSelection()
|
||||
await this.initSubject(resp.data)
|
||||
}
|
||||
this.projectInfo = resp.data
|
||||
|
||||
if (this.projectInfo.provideMode === 3) {
|
||||
await this.selectAddressList()
|
||||
const defaultAddress = this.addressList.find(v => v.isDefault)
|
||||
this.selectAddress = defaultAddress ? defaultAddress : {}
|
||||
}
|
||||
if (this.projectInfo.signMode === 2) {
|
||||
const resp = await $.get('/mobile/welfare/mine/getMySignature')
|
||||
this.userSign = resp.data
|
||||
setTimeout(() => {
|
||||
$('#signature').jSignature({
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
lineWidth: 1
|
||||
})
|
||||
if (this.userSign.data) {
|
||||
$('#signature').jSignature("setData", this.userSign.data)
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async initSubject(data) {
|
||||
if (data.welfareProjectSubjects && data.welfareProjectSubjects.length > 0) {
|
||||
data.welfareProjectSubjects && data.welfareProjectSubjects.forEach(v => {
|
||||
if (v.subjectType === 'checkBox') {
|
||||
if (this.userSelection && this.userSelection.length > 0) {
|
||||
v.selection = this.userSelection.filter(s => s.subjectId === v.id).map(s => s.selectOptionId)
|
||||
} else {
|
||||
v.selection = []
|
||||
}
|
||||
}
|
||||
if (v.subjectType === 'radio') {
|
||||
if (this.userSelection && this.userSelection.length > 0) {
|
||||
const selection = this.userSelection.find(s => s.subjectId === v.id)
|
||||
if (selection) {
|
||||
v.selection = selection.selectOptionId
|
||||
}
|
||||
} else {
|
||||
v.selection = null
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
checkBoxToggle(checkBoxRefId) {
|
||||
this.$refs[checkBoxRefId][0].toggle()
|
||||
},
|
||||
addressClick(item) {
|
||||
this.selectAddress = item
|
||||
},
|
||||
validateOption(welfareProjectSubjects) {
|
||||
return !welfareProjectSubjects.some(v => {
|
||||
if (v.subjectType === 'checkBox' && v.selection.length === 0) {
|
||||
return true
|
||||
}
|
||||
return v.subjectType === 'radio' && (v.selection === '' || v.selection == null);
|
||||
})
|
||||
},
|
||||
resetSignature() {
|
||||
$('#signature').jSignature('clear')
|
||||
this.userSign.data = null
|
||||
},
|
||||
async saveSignature() {
|
||||
const sign = $('#signature').jSignature("getData", "default")
|
||||
this.userSign.data = sign
|
||||
await $.post('/mobile/welfare/mine/saveMySignature', this.userSign)
|
||||
},
|
||||
|
||||
async doReceive() {
|
||||
// if (this.isReceive) {
|
||||
// // this.$toast('您已领取,请勿重复领取!')
|
||||
// // return
|
||||
// const confirm = await vant.Dialog.confirm({
|
||||
// title: '提示',
|
||||
// message: '你确认要修改吗?',
|
||||
// })
|
||||
// if (!confirm) {
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
const {flexible, provideMode, signMode, welfareProjectSubjects} = this.projectInfo
|
||||
|
||||
if (flexible && welfareProjectSubjects && welfareProjectSubjects.length > 0) {
|
||||
if (!this.validateOption(welfareProjectSubjects)) {
|
||||
this.$toast('请选择福利')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (provideMode === 3 && $.isEmptyObject(this.selectAddress)) {
|
||||
this.$toast('请选择收货地址')
|
||||
return
|
||||
}
|
||||
|
||||
/*if (signMode === 2 && !this.mySignature) {
|
||||
this.$toast('请在我的页面签署电子签名后再领取')
|
||||
return
|
||||
}*/
|
||||
if (signMode === 2 && $("#signature").jSignature('getData', 'native').length === 0 && !this.userSign.data) {
|
||||
this.$toast('请先签字!')
|
||||
return
|
||||
}
|
||||
|
||||
let formData = {}
|
||||
formData.projectId = this.projectInfo.id
|
||||
formData.answers = JSON.stringify(this.projectInfo.welfareProjectSubjects)
|
||||
const {province, city, county, address, name, tel} = this.selectAddress
|
||||
formData.receiveAddress = "收获地址:" + province + city + county + address + "," + "收件人:" + name + "," + "联系方式:" + tel
|
||||
formData.mySignature = this.userSign.data
|
||||
let msg = this.isReceive ? '您确认要修改吗?' : '您确认要选择吗?'
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '标题',
|
||||
message: msg,
|
||||
})
|
||||
if (confirm) {
|
||||
const loading = this.$toast.loading({
|
||||
message: '领取中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
|
||||
if (signMode === 2) {
|
||||
this.saveSignature()
|
||||
}
|
||||
|
||||
const resp = await $.post('/mobile/welfare/mine/doReceive', formData)
|
||||
await this.getReceive()
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
window.location.href = '/mobile/welfare/list/receive_success?projectId=' + this.projectId + '&provideMode=' + this.projectInfo.provideMode
|
||||
// this.$toast.success('领取成功')
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
async getUserSelection() {
|
||||
const resp = await $.get('/mobile/welfare/mine/getUserSelection', {projectId: this.projectId})
|
||||
this.userSelection = resp.data
|
||||
},
|
||||
viewDesc(optionId, desc) {
|
||||
window.localStorage.setItem("welfare_option_desc_" + optionId, desc)
|
||||
window.location.href = '/mobile/welfare/list/option_desc?optionId=' + optionId
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.startLoading()
|
||||
const id = GetQueryString("projectId")
|
||||
if (id) {
|
||||
this.projectId = id
|
||||
this.findOne()
|
||||
await this.getReceive()
|
||||
this.welfareProvideMode = await getEnumOptions("WelfareProvideMode")
|
||||
this.welfareSignMode = await getEnumOptions("WelfareSignMode")
|
||||
}
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user