commit
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[5,10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
@@ -1,527 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="${lang,escape}">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
|
||||
<meta name="description" content="${AppName!}">
|
||||
<title>${AppName!}</title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/myframe/css/myframe.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/themify-icons.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/common.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/main.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/elmain.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/panel.css">
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wangeditor/wangEditor.css">
|
||||
<link rel="stylesheet" type="text/css" href="${base!}/assets/platform/plugins/viewer/viewer.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wp-upload-vue/css/wpupload.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wp-upload-vue/font/iconfont.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/vivify.min.css">
|
||||
<link href="${base!}/assets/platform/plugins/vue-cron/vcrontab.css" rel="stylesheet"/>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue-cron/vcrontab.umd.min.js"></script>
|
||||
<!-- import Vue before Element -->
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<!-- <script src="https://cdn.staticfile.org/vue/2.6.0/vue.js"></script>-->
|
||||
|
||||
<!-- vue-count-to -->
|
||||
<script src="${base!}/assets/platform/plugins/vue-count-to/vue-count-to.min.js"></script>
|
||||
|
||||
<!-- wpupload -->
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/font/iconfont.js"></script>
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/js/wpupload.js"></script>
|
||||
|
||||
<!-- import JavaScript -->
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/i18n/${lang,escape}.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<!-- <script src="${base!}/assets/platform/plugins/jquery/jquery-3.5.0.js"></script>-->
|
||||
<script src="${base!}/assets/platform/plugins/slimscroll/jquery.slimscroll.min.js"></script>
|
||||
|
||||
<!--后面就改这一段吧-->
|
||||
<script src="${base!}/assets/platform/plugins/dd3s/dd3s.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
|
||||
|
||||
<!--g2-->
|
||||
<script src="/assets/platform/plugins/g2/g2.min.js?v=4.1.9"></script>
|
||||
<script src="/assets/platform/plugins/g2/data-set.js"></script>
|
||||
<script src="/assets/platform/plugins/g2/g2plot.js?v=1.0.0"></script>
|
||||
|
||||
<!--echars-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/echarts.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/echarts/infographic.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/westeros.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/walden.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/macarons.js"></script><!--主题-->
|
||||
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>-->
|
||||
<!-- <script src="${base!}/assets/platform/js/cdn.staticfile.org_echarts_5.2.2_echarts.js"></script>-->
|
||||
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>-->
|
||||
<!-- <script src="${base!}/assets/platform/js/cdn.staticfile.org_echarts_5.2.2_i18n_langZH.js"></script>-->
|
||||
|
||||
|
||||
<script src="${base!}/assets/platform/module/mixins/initTableMixins.js?v=1.0.3"></script>
|
||||
<script src="${base!}/assets/platform/js/includeModel.js?v=1.0.8"></script>
|
||||
<script src="${base!}/assets/platform/js/component.js?v=1.0.2"></script>
|
||||
<script src="${base!}/assets/platform/js/v.js?v=1.0.5"></script>
|
||||
<script src="${base!}/assets/platform/plugins/wangeditor/wangEditor.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/wangeditor@4.6.15/dist/wangEditor.min.js"></script>-->
|
||||
<script type="text/javascript"
|
||||
src="https://webapi.amap.com/maps?v=1.4.15&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.PlaceSearch"></script>
|
||||
|
||||
<!--viewer-->
|
||||
<script src="${base!}/assets/platform/plugins/viewer/viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/viewer/jquery-viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-qrcode/vue-qrcode.min.js"></script>
|
||||
|
||||
|
||||
<!-- pjax是异步加载html片段的工具,模拟前端路由机制 -->
|
||||
<script src="${base!}/assets/platform/plugins/pjax/jquery.pjax.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/myframe/js/myframe.js"></script>
|
||||
<!-- Array数组增加findIndex等方法,TreeTable用得到,兼容IE8 -->
|
||||
<script src="${base!}/assets/platform/plugins/polyfill/polyfill.js"></script>
|
||||
<!-- 时间日期处理工具类 -->
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<!-- 浏览器通知 -->
|
||||
<script src="${base!}/assets/platform/plugins/push/push.min.js"></script>
|
||||
<script src="${base!}/assets/platform/js/main.js?v=1.0.0"></script>
|
||||
<script src="${base!}/assets/platform/js/offscreen.js"></script>
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@4.0.2"></script>-->
|
||||
<script src="${base!}/assets/platform/plugins/vue-charts/echartTheme.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/skins/palette.3.css" id="skin">
|
||||
|
||||
<!--拖拽js-->
|
||||
<script src="${base!}/assets/platform/js/directive/v-sticky.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jquery.qrcode.min.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
|
||||
|
||||
<!--字典混入-->
|
||||
<script src="${base!}/components/plugins/sysDict/DictData.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/xlsx/xlsx.full.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/xss/xss.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
const base = "${base!}";
|
||||
const APP_DOMAIN = "${AppDomain!}";
|
||||
const FILE_DOMAIN = "${AppFileDomain!}";
|
||||
const AppMapCenterPointX = "${config.AppMapCenterPointX!}";
|
||||
const AppMapCenterPointY = "${config.AppMapCenterPointY!}";
|
||||
const isDisPlayCode = "${config.isDisPlayCode!}" === 'true'
|
||||
var loginPjax = "${@shiro.getPrincipalProperty('loginPjax')}";
|
||||
const LOGO_URL = "${config.logoUrl!}"
|
||||
|
||||
ELEMENT.locale(ELEMENT.lang['${lang,escape}']);
|
||||
|
||||
Vue.component('vuedraggable', window.vuedraggable)
|
||||
Vue.component('guava', httpVueLoader('/components/plugins/Guava.vue'))
|
||||
Vue.component('sign', httpVueLoader('/components/sign/sign.vue?v=' + new Date().getTime()))
|
||||
Vue.component('file-upload', httpVueLoader('/components/plugins/FileUpload.vue'))
|
||||
Vue.component('image-upload', httpVueLoader('/components/plugins/ImageUpload.vue'))
|
||||
Vue.component('dict-tag', httpVueLoader('/components/plugins/sysDict/DictTag.vue'))
|
||||
Vue.component('border-table', httpVueLoader('/components/plugins/BorderTable.vue'))
|
||||
Vue.component('text-editor', httpVueLoader('/components/plugins/TextEditor.vue?v='+new Date().getTime()))
|
||||
|
||||
Vue.use(httpVueLoader)
|
||||
Vue.component(VueQrcode.name, VueQrcode)
|
||||
|
||||
const viewImage = function (filepath) {
|
||||
let image = new Image();
|
||||
image.src = APP_DOMAIN + FILE_STREAM_PREVIEW_ADDRESS + '?id=' + filepath;
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
};
|
||||
window.viewImage = viewImage;
|
||||
Vue.prototype.$viewImage = viewImage
|
||||
|
||||
//防止用户快速重复点击造成数据混乱 提供vue指令和js节流函数两种方式
|
||||
//控制此元素在一定时间内是否可成为鼠标的点击目标对象
|
||||
Vue.directive('throttle', {
|
||||
inserted(el, binding) {
|
||||
el.addEventListener('click', () => {
|
||||
if (el.style.pointerEvents !== 'none') {
|
||||
el.style.pointerEvents = 'none'
|
||||
window.setTimeout(() => {
|
||||
el.style.pointerEvents = ''
|
||||
}, 1200)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//提案初始化的值
|
||||
proposal.getProposalAllStateCode()
|
||||
proposal.getProposalEnableStateCode()
|
||||
proposal.getProposalNeedSignStateCode()
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="gallery-loader" style="background-color:transparent;">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<div id="mainApp" class="app">
|
||||
<header class="header header-fixed navbar" id="headerNavbar">
|
||||
<div class="brand">
|
||||
<a href="javascript:;" data-pjax class="navbar-brand" @click="goHome">
|
||||
<img src="${base!}/assets/platform/img/logo.png" alt=""
|
||||
style="width: 60%;height: 80%"
|
||||
class="o_img <!--#if(!@shiro.getPrincipalProperty('loginSidebar')){#-->o_hide<!--#}#-->">
|
||||
<span class="heading-font o_img <!--#if(@shiro.getPrincipalProperty('loginSidebar')){#-->o_hide<!--#}#-->">
|
||||
<img style="height: 100%" :src="LOGO_URL">
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-nav">
|
||||
<li style="padding:0 10px" class="vivify popIn duration-1500">
|
||||
<el-popover
|
||||
width="450"
|
||||
popper-class="appCenterPopover"
|
||||
placement="top-start"
|
||||
v-model="menuPopover"
|
||||
trigger="hover">
|
||||
<el-card shadow="never" class="appCenterCard">
|
||||
<template #header>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<div>
|
||||
<el-link :underline="false">应用中心</el-link>
|
||||
<i class="el-icon-edit" style="cursor: pointer;color: #1867b0"
|
||||
v-if="${@shiro.hasRole('sysadmin')}"
|
||||
@click="goSetAppCenter"></i>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-link @click="goHome" type="primary" :underline="false">工作台</el-link>
|
||||
<el-link @click="setUserDefaultEntranceModuleId" type="primary" :underline="false">
|
||||
设置为默认模块
|
||||
</el-link>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-row gutter="20">
|
||||
<el-col v-for="item in entranceModules" :span="8" style="margin-bottom: 5px">
|
||||
<div class="entranceDetail"
|
||||
:class="item.id==selectEntranceModule.id?'entranceDetail-selected':''"
|
||||
@click="enterEntranceModules(item)">
|
||||
<div class="entranceIcon">
|
||||
<el-image :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.icon[0].id"
|
||||
style="height: 50px;width: 50px;border-radius: 50%"></el-image>
|
||||
</div>
|
||||
{{item.moduleName}}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button type="primary" size="mini" @click="menuPopover=!menuPopover">关闭</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<a href="javascript:" slot="reference" style="color: #FFFFFF;" @click="toggleMenuPopover">
|
||||
<i class="fa fa-th-large" aria-hidden="true"></i>
|
||||
{{selectEntranceModule ? selectEntranceModule.moduleName : '应用中心'}}
|
||||
</a>
|
||||
</el-popover>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="off-right">
|
||||
<a href="javascript:;" data-toggle="dropdown">
|
||||
<span class="hidden-xs ml10">${@shiro.getPrincipalProperty('username')}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="off-right">
|
||||
<a href="${base!}/platform/login/logout">
|
||||
<i class="ti-power-off"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
<section class="layout">
|
||||
<!-- sidebar menu -->
|
||||
<aside class="sidebar offscreen-left" id="asideMenu">
|
||||
<!-- main navigation -->
|
||||
<nav class="main-navigation" data-height="auto" data-size="6px" data-distance="0" data-rail-visible="true"
|
||||
data-wheel-step="10">
|
||||
|
||||
<ul id="leftMenu" class="nav leftMenu" style="display: initial;">
|
||||
<li v-for="fm in headerNavBarVueApp.firstMenus">
|
||||
|
||||
<a :href="fm.href && fm.href.startsWith('/')?fm.href:'javascript:;'">
|
||||
<i v-if="Object.keys(headerNavBarVueApp.secondMenus).includes(fm.path)"
|
||||
class="toggle-accordion"></i>
|
||||
<i :class="fm.icon?fm.icon:'ti-map'"></i>
|
||||
<span>
|
||||
{{fm.name}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
|
||||
<ul class="sub-menu"
|
||||
v-if="Object.keys(headerNavBarVueApp.secondMenus).includes(fm.path)">
|
||||
<li v-for="sm in headerNavBarVueApp.secondMenus[fm.path]">
|
||||
<a :href="sm.href && sm.href.startsWith('/')?sm.href:'javascript:;'">
|
||||
<span>
|
||||
<i class="toggle-accordion" v-if="headerNavBarVueApp.secondMenus[sm.path]"></i>
|
||||
<i v-if="headerNavBarVueApp.secondMenus[sm.path]"
|
||||
:class="sm.icon ? 'leftMenu__twoIcon ' + sm.icon : 'leftMenu__twoIcon ti-map'"
|
||||
></i>
|
||||
<i v-else class="leftMenu__twoIcon fa fa-circle-o"></i>
|
||||
{{sm.name}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<ul class="sub-menu" v-if="headerNavBarVueApp.secondMenus[sm.path]">
|
||||
<li v-for="tm in headerNavBarVueApp.secondMenus[sm.path]">
|
||||
<a :href="tm.href && tm.href.startsWith('/')?tm.href:'javascript:;'">
|
||||
<span>
|
||||
<i class="leftMenu__twoIcon fa fa-circle-o"></i>
|
||||
{{tm.name}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</aside>
|
||||
<!-- main content -->
|
||||
<section class="main-content" id="container">
|
||||
${layoutContent}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const headerNavBarVueApp = new Vue({
|
||||
el: '#headerNavbar',
|
||||
data() {
|
||||
return {
|
||||
entranceModules: [],
|
||||
selectEntranceModule: null,
|
||||
leftMenus: [],
|
||||
firstMenus: [],
|
||||
secondMenus: {},
|
||||
userDefaultModuleId: null,
|
||||
menuPopover: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getEntranceModule() {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getEntranceModule')
|
||||
if (resp.code === 0) {
|
||||
this.entranceModules = resp.data
|
||||
if (this.selectEntranceModule) {
|
||||
if (this.entranceModules.some(v => v.id === this.selectEntranceModule.id)) {
|
||||
this.selectEntranceModule = this.entranceModules.find(v => v.id === this.selectEntranceModule.id)
|
||||
this.openFirstMenu()
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.entranceModules) {
|
||||
if (this.userDefaultModuleId) {
|
||||
this.selectEntranceModule = this.entranceModules.find(v => v.id === this.userDefaultModuleId)
|
||||
} else {
|
||||
this.selectEntranceModule = this.entranceModules[0]
|
||||
}
|
||||
this.openFirstMenu()
|
||||
} else {
|
||||
this.goSetAppCenter()
|
||||
}
|
||||
}
|
||||
},
|
||||
openFirstMenu() {
|
||||
if (window.location.pathname === '/platform/home') {
|
||||
setTimeout(() => {
|
||||
this.$nextTick(() => {
|
||||
const aTag = document.querySelector('#leftMenu li a')
|
||||
if (aTag) {
|
||||
aTag.click()
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
const pathname = window.location.pathname
|
||||
const a_selector = "#leftMenu li a[href='" + pathname + "']"
|
||||
const getCurrentMenu = () => {
|
||||
const a = document.querySelector(a_selector)
|
||||
if (a) {
|
||||
$(a).attr('style', 'color: #1867b0')
|
||||
$(a).parent().parents("li").addClass("open")
|
||||
$(a).parent().parents('ul.sub-menu').attr('style', 'display:block')
|
||||
$(a).find("i").addClass("fa-dot-circle-o")
|
||||
clearInterval(getCurrentMenuInterval)
|
||||
}
|
||||
}
|
||||
const getCurrentMenuInterval = setInterval(getCurrentMenu, 100)
|
||||
}
|
||||
},
|
||||
async enterEntranceModules(item) {
|
||||
window.sessionStorage.setItem('selectEntranceModule', JSON.stringify(item))
|
||||
this.selectEntranceModule = item
|
||||
await this.getFirstMenus(item.id)
|
||||
this.goHome()
|
||||
this.openFirstMenu()
|
||||
this.menuPopover = false
|
||||
},
|
||||
async getSecondMenus() {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getSecondMenus')
|
||||
if (resp.code === 0) {
|
||||
this.secondMenus = resp.data
|
||||
}
|
||||
},
|
||||
async getFirstMenus(entranceModuleId) {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getFirstMenus', {entranceModuleId})
|
||||
if (resp.code === 0) {
|
||||
this.firstMenus = resp.data
|
||||
this.setAttr()
|
||||
}
|
||||
},
|
||||
setAttr(afterFunc = () => {
|
||||
}) {
|
||||
this.$nextTick(() => {
|
||||
const aTags = document.querySelectorAll('.main-navigation a')
|
||||
aTags.forEach(v => {
|
||||
if (v.href === 'javascript:;') {
|
||||
v.removeAttribute("data-pjax")
|
||||
} else {
|
||||
v.setAttribute("data-pjax", "")
|
||||
}
|
||||
if (v.getAttribute('class') === 'active') {
|
||||
v.setAttribute('class', '')
|
||||
}
|
||||
})
|
||||
|
||||
const openLiTags = document.querySelectorAll('.main-navigation li.open')
|
||||
openLiTags.forEach(v => {
|
||||
v.setAttribute('class', '')
|
||||
const childNodes = v.childNodes
|
||||
childNodes.forEach(c => {
|
||||
if (c.nodeType === 1 && c.tagName && c.tagName.toUpperCase() === 'UL'.toUpperCase() && c.className === 'sub-menu') {
|
||||
c.style.display = 'none'
|
||||
}
|
||||
})
|
||||
})
|
||||
afterFunc()
|
||||
})
|
||||
},
|
||||
goHome() {
|
||||
$.pjax({
|
||||
url: '/platform/home',
|
||||
container: '#container',
|
||||
fragment: '#container',
|
||||
timeout: 8000
|
||||
});
|
||||
this.setAttr()
|
||||
this.closeAllMenu()
|
||||
},
|
||||
goSetAppCenter() {
|
||||
$.pjax({
|
||||
url: '/platform/sys/entranceModule',
|
||||
container: '#container',
|
||||
fragment: '#container',
|
||||
timeout: 8000
|
||||
});
|
||||
this.setAttr()
|
||||
},
|
||||
closeAllMenu() {
|
||||
const subMenus = document.querySelectorAll('ul.sub-menu')
|
||||
subMenus.forEach(v => {
|
||||
v.style.display = 'none'
|
||||
})
|
||||
|
||||
const menus = document.querySelectorAll('.main-navigation li.open')
|
||||
menus.forEach(v => {
|
||||
v.setAttribute('class', '')
|
||||
})
|
||||
|
||||
const aTags = document.querySelectorAll('.main-navigation a.active')
|
||||
aTags.forEach(v => {
|
||||
v.setAttribute('class', '')
|
||||
})
|
||||
},
|
||||
async getUserDefaultEntranceModuleId() {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getUserDefaultEntranceModuleId')
|
||||
if (resp.code === 0) {
|
||||
this.userDefaultModuleId = resp.data
|
||||
}
|
||||
},
|
||||
async setUserDefaultEntranceModuleId() {
|
||||
const {id: moduleId, moduleName} = this.selectEntranceModule
|
||||
const msg = '您确定要将' + moduleName + '设置为默认模块吗?'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ('confirm' !== confirm) return
|
||||
const resp = await $.get('/platform/sys/entranceModule/setUserDefaultEntranceModuleId', {moduleId})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success(resp.msg)
|
||||
} else {
|
||||
this.$notify.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
toggleMenuPopover() {
|
||||
setTimeout(() => {
|
||||
this.menuPopover = !this.menuPopover
|
||||
}, 300)
|
||||
},
|
||||
async init() {
|
||||
await this.getUserDefaultEntranceModuleId()
|
||||
const selectEntranceModuleStr = window.sessionStorage.getItem('selectEntranceModule')
|
||||
if (selectEntranceModuleStr) {
|
||||
this.selectEntranceModule = JSON.parse(selectEntranceModuleStr)
|
||||
}
|
||||
await this.getEntranceModule()
|
||||
await this.getFirstMenus(this.selectEntranceModule.id)
|
||||
await this.getSecondMenus()
|
||||
this.setAttr()
|
||||
|
||||
// let pjax_url = window.sessionStorage.getItem('pjax_url')
|
||||
// pjax_url = pjax_url.replace(window.location.origin, '')
|
||||
// $.pjax({
|
||||
// url: pjax_url,
|
||||
// container: '#container',
|
||||
// fragment: '#container',
|
||||
// timeout: 8000
|
||||
// });
|
||||
// const a_selector = '#leftMenu li a[href="' + pjax_url + '"]'
|
||||
// const a = document.querySelector(a_selector)
|
||||
// setTimeout(() => {
|
||||
// $(a).parent().parents("li").addClass("open")
|
||||
// $(a).parent().parents('ul.sub-menu').attr('style', 'display:block')
|
||||
// }, 100)
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
|
||||
const asideMenuApp = new Vue({
|
||||
el: '#asideMenu',
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,396 +0,0 @@
|
||||
<!--#
|
||||
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" @click-left="history.back()" fixed left-arrow
|
||||
placeholder></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 :options="eventList" @change="yearChange"
|
||||
v-model="pageForm.eventId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="yearChange"
|
||||
v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-model="loading"
|
||||
@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 :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px;">
|
||||
{{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="每队可报人数" v-if="o.applyUserModel===1">
|
||||
<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 @confirm="doActivityConfirm" show-cancel-button title="您确定要报名此活动吗?"
|
||||
v-model="activityDialog"
|
||||
@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>
|
||||
var 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.applyType !== 3) {
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '男' && nan.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictGirlNum) : this.restrictBoyNum)) {
|
||||
this.$toast("该" + title + "男运动员已报满!")
|
||||
return
|
||||
}
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '女' && nv.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictBoyNum) : this.restrictGirlNum)) {
|
||||
this.$toast("该" + title + "女运动员已报满!")
|
||||
return
|
||||
}
|
||||
}*/
|
||||
if (this.athletesMaxNum && (data.length >= this.athletesMaxNum)) {
|
||||
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) {
|
||||
let {
|
||||
isManGirlNum,
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyUserModel,
|
||||
unionLimit,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
this.projectType = projectType
|
||||
this.formData.activityId = activityId
|
||||
this.formData.eventId = eventId
|
||||
this.applyType = applyType
|
||||
this.isManGirlNum = isManGirlNum
|
||||
|
||||
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 ((isInterest && "${@shiro.hasRole('H04')}" === 'false') || (isInterest && "${@shiro.hasRole('sysadmin')}" === 'false')) {
|
||||
this.$toast("您所报的是趣味运动,请联系工会管理员报名!")
|
||||
return
|
||||
}*/
|
||||
if (userApply == 1) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
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)
|
||||
if (isMenWomen) {
|
||||
this.restrictBoyNum = athletesMaxNum
|
||||
this.restrictGirlNum = athletesMaxNum
|
||||
} else {
|
||||
this.restrictBoyNum = restrictBoyNum ? restrictBoyNum : 0
|
||||
this.restrictGirlNum = restrictGirlNum ? restrictGirlNum : 0
|
||||
}
|
||||
this.athletesMaxNum = athletesMaxNum
|
||||
if (projectType == 1) {
|
||||
if (isMenWomen != null && isMenWomen === 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen === 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
activityId: this.formData.activityId,
|
||||
applyType: applyType,
|
||||
eventId: eventId
|
||||
})
|
||||
|
||||
if (applyUserModel === 1) {
|
||||
if (athletesMaxNum != null) {
|
||||
if (data.length >= athletesMaxNum) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + athletesMaxNum + "人")
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
unionLimit = JSON.parse(unionLimit)
|
||||
const limit = unionLimit.find(v => v.id === "${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
this.athletesMaxNum = limit.limitCount
|
||||
if (data.length >= limit.limitCount) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + limit.limitCount + "人")
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,108 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,150 +0,0 @@
|
||||
<!--#
|
||||
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: 20px 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="每队可报人数" v-if="o.applyUserModel===1">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var 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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,495 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #ececec;
|
||||
}
|
||||
|
||||
|
||||
.tips .content {
|
||||
height: calc(80vh - 49px);
|
||||
overflow-y: scroll;
|
||||
position: relative;
|
||||
/*padding: 5px*/
|
||||
}
|
||||
|
||||
.tips .content h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: unset;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.tips .button-wrap {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
overflow-x: auto;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
font-size: 14px;
|
||||
color: #646566;
|
||||
}
|
||||
|
||||
.table-container table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.table-container table td {
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
border: 1px solid #ddd;
|
||||
min-width: 100px; /* 设置单元格固定宽度 */
|
||||
}
|
||||
|
||||
.table-container table tr:first-child td {
|
||||
/*border-top: none;*/
|
||||
}
|
||||
|
||||
.table-container table tr td {
|
||||
/*border-left: none;*/
|
||||
}
|
||||
|
||||
|
||||
.table-container table td {
|
||||
/*background-color: #f2f2f2;*/
|
||||
}
|
||||
|
||||
.siteUsageTabs .van-tabs__wrap {
|
||||
/*border-top-left-radius: 10px;*/
|
||||
/*border-top-right-radius: 10px;*/
|
||||
}
|
||||
|
||||
.siteUsageTabs .van-tab__text {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.siteUsageTabs .van-tab--active .van-tab__text {
|
||||
color: rgb(0, 78, 100);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.siteUsageTabs .van-tabs__line {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div>
|
||||
<van-nav-bar title="职工之家场地预约" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<div class="van-sidebar-item van-sidebar-item--select" style="margin-top: 10px!important;">
|
||||
近一周预约情况
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="tabActive" class="siteUsageTabs">
|
||||
<van-tab :title="k" v-for="(v,k) in allSiteUsageInfo" :item="k">
|
||||
<template #title>
|
||||
<svg t="1702637676312" class="icon" viewBox="0 0 1111 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="7468" width="20" height="20">
|
||||
<path d="M463.784229 127.356343a9.698743 9.698743 0 0 1-9.713372-9.669486c0-5.3248 4.344686-9.654857 9.713372-9.654857h103.658057c5.339429 0 9.698743 4.330057 9.698743 9.654857 0 5.3248-4.359314 9.654857-9.698743 9.654857h-103.658057z m150.176914 0a9.698743 9.698743 0 0 1-9.713372-9.669486c0-5.3248 4.359314-9.654857 9.713372-9.654857h34.040686c5.354057 0 9.713371 4.330057 9.713371 9.654857 0 5.3248-4.359314 9.654857-9.713371 9.654857H613.961143zM51.243886 36.571429a14.599314 14.599314 0 0 0-14.555429 14.584685v549.653943l3.364572-1.243428c67.978971-25.1904 125.952-66.706286 172.295314-123.406629 71.723886-87.771429 103.892114-197.778286 118.272-274.578286 15.4624-82.7392 14.218971-147.265829 14.160457-149.972114a18.139429 18.139429 0 0 1 3.349943-11.044571l2.735543-3.9936H51.243886z m703.619657 4.008228c2.296686 3.2768 3.466971 7.109486 3.364571 11.044572-0.073143 2.633143-1.579886 65.8432 14.160457 149.942857 14.336 76.8 46.4896 186.748343 118.286629 274.578285 46.928457 57.431771 105.632914 99.240229 174.4896 124.298972 2.048 0.731429 3.949714 1.872457 5.792914 3.4816l4.125257 3.554743V51.170743a14.599314 14.599314 0 0 0-14.555428-14.584686H752.054857l2.779429 4.008229zM36.688457 752.7424c0 8.045714 6.538971 14.584686 14.555429 14.584686h215.508114l0.146286-2.369829a18.578286 18.578286 0 0 1 5.983085-12.682971c51.258514-47.162514 60.298971-119.456914 46.518858-170.174172-4.8128-17.495771-20.3776-60.430629-61.513143-80.866743l-12.551315-6.2464-9.025828 10.708115C185.782857 565.496686 123.318857 609.206857 50.673371 635.611429a18.870857 18.870857 0 0 1-6.436571 1.170285c-1.418971 0-2.779429-0.321829-4.447086-0.731428l-3.101257-0.775315v117.4528z m755.712 14.584686l-3.569371-4.183772c-43.680914-51.156114-59.538286-124.269714-41.428115-190.829714 11.790629-43.344457 37.156571-78.599314 71.402058-99.240229l15.594057-9.376914-9.654857-15.433143a597.825829 597.825829 0 0 1-48.405943-96.241371c-17.759086-44.704914-31.6416-93.622857-41.194057-145.393372-16.325486-88.298057-14.5408-153.365943-14.453029-156.086857 0.117029-3.584 1.2288-7.021714 3.232914-9.991314l2.691657-3.949714H376.290743l2.735543 3.949714c2.048 2.954971 3.1744 6.407314 3.291428 9.976686 0.087771 2.720914 1.872457 67.774171-14.482285 156.086857-9.537829 51.755886-23.405714 100.688457-41.179429 145.408a601.512229 601.512229 0 0 1-48.391314 96.241371l-9.654857 15.433143 15.5648 9.376914c34.230857 20.626286 59.582171 55.851886 71.402057 99.210972 18.154057 66.603886 2.296686 139.717486-41.398857 190.858971l-3.569372 4.183772h481.792z m268.127086 0a14.599314 14.599314 0 0 0 14.555428-14.584686v-124.416l-4.139885 3.627886c-2.530743 2.194286-6.685257 4.827429-12.214857 4.827428a19.017143 19.017143 0 0 1-6.392686-1.141028c-72.630857-26.433829-135.080229-70.158629-185.636572-129.9456l-9.040457-10.708115-12.551314 6.2464c-41.150171 20.450743-56.700343 63.370971-61.483886 80.881372-13.809371 50.702629-4.783543 122.997029 46.533486 170.159543 3.569371 3.262171 5.690514 7.767771 5.968457 12.668343l0.146286 2.384457h224.256zM51.243886 803.913143A51.273143 51.273143 0 0 1 0 752.7424V51.170743A51.273143 51.273143 0 0 1 51.243886 0h1009.283657A51.273143 51.273143 0 0 1 1111.771429 51.170743v701.571657a51.273143 51.273143 0 0 1-51.243886 51.170743H51.243886z m-6.977829 105.003886a18.768457 18.768457 0 0 1-18.768457-18.724572c0-10.327771 8.426057-18.724571 18.768457-18.724571h234.8032c10.3424 0 18.768457 8.3968 18.768457 18.724571 0 10.313143-8.426057 18.724571-18.768457 18.724572H44.266057z m394.210743 0a18.768457 18.768457 0 0 1-18.753829-18.724572c0-10.327771 8.411429-18.724571 18.753829-18.724571h234.832457c10.3424 0 18.753829 8.3968 18.753829 18.724571 0 10.313143-8.411429 18.724571-18.753829 18.724572H438.4768z m394.210743 0a18.753829 18.753829 0 0 1-18.753829-18.724572c0-10.327771 8.411429-18.724571 18.753829-18.724571h234.832457c10.3424 0 18.753829 8.3968 18.753829 18.724571 0 10.313143-8.411429 18.724571-18.753829 18.724572H832.687543zM236.982857 1024a18.768457 18.768457 0 0 1-18.768457-18.724571c0-10.313143 8.426057-18.724571 18.768457-18.724572h234.832457c10.3424 0 18.768457 8.411429 18.768457 18.724572 0 10.327771-8.426057 18.724571-18.768457 18.724571H236.982857z m394.210743 0a18.753829 18.753829 0 0 1-18.753829-18.724571c0-10.313143 8.411429-18.724571 18.753829-18.724572H866.011429c10.3424 0 18.753829 8.411429 18.753828 18.724572 0 10.327771-8.411429 18.724571-18.753828 18.724571H631.1936z"
|
||||
fill="#44BBE0" p-id="7469"></path>
|
||||
</svg>
|
||||
{{k}}
|
||||
</template>
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>开始时间</td>
|
||||
<td>结束时间</td>
|
||||
<td>预约人姓名</td>
|
||||
<td>预约人部门</td>
|
||||
<td>预约事由</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in v" :key="item.id">
|
||||
<td>{{item.reserve_start_time}}</td>
|
||||
<td>{{item.reserve_end_time}}</td>
|
||||
<td>{{item.reserve_person_username}}</td>
|
||||
<td>{{item.reserve_person_unitname}}</td>
|
||||
<td>{{item.reserve_cause}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<div class="van-sidebar-item van-sidebar-item--select" style="margin-top: 10px!important;">
|
||||
填写预约信息
|
||||
</div>
|
||||
<van-form @submit="onSubmit">
|
||||
<van-cell-group class="">
|
||||
<van-field readonly :value="formData.reserve_person_username" name="reserve_person_username"
|
||||
label="预约人姓名"></van-field>
|
||||
<van-field readonly :value="formData.reserve_person_loginname" name="reserve_person_loginname"
|
||||
label="预约人工号"></van-field>
|
||||
<van-field readonly :value="formData.reserve_person_sex" name="reserve_person_sex"
|
||||
label="预约人性别"></van-field>
|
||||
<van-field readonly :value="formData.reserve_person_phone" name="reserve_person_phone"
|
||||
label="预约人电话"></van-field>
|
||||
<van-field readonly :value="formData.reserve_person_unitname" name="reserve_person_unitname"
|
||||
label="预约人部门"></van-field>
|
||||
<van-field readonly :value="formData.reserve_person_unionname" name="reserve_person_unionname"
|
||||
label="预约人工会"></van-field>
|
||||
|
||||
<van-field readonly
|
||||
clickable
|
||||
name="site_name"
|
||||
:value="formData.site_name"
|
||||
label="预约场地"
|
||||
placeholder="点击选择预约场地"
|
||||
:rules="[{ required: true, message: '请选择' }]"
|
||||
required
|
||||
@click="showSitePicker = true"
|
||||
>
|
||||
</van-field>
|
||||
|
||||
<van-field readonly clickable
|
||||
label="预约开始时间"
|
||||
:value="formData.reserve_start_time"
|
||||
name="reserve_start_time"
|
||||
:rules="[{ required: true, message: '请选择' }]"
|
||||
placeholder="请选择预约开始时间"
|
||||
required
|
||||
@click="startTimePicker = true">
|
||||
</van-field>
|
||||
<van-field readonly clickable
|
||||
label="预约结束时间"
|
||||
:value="formData.reserve_end_time"
|
||||
name="reserve_end_time"
|
||||
:rules="[{ required: true, message: '请选择' }]"
|
||||
placeholder="请选择预约结束时间"
|
||||
required
|
||||
@click="endTimePicker = true">
|
||||
</van-field>
|
||||
<!-- <van-field v-model="formData.reserve_activity"-->
|
||||
<!-- name="reserve_activity"-->
|
||||
<!-- :rules="[{ required: true, message: '请填写' }]"-->
|
||||
<!-- placeholder="请填写预约活动项目"-->
|
||||
<!-- required-->
|
||||
<!-- label="预约活动项目"></van-field>-->
|
||||
<van-field v-model="formData.reserve_cause"
|
||||
name="reserve_cause"
|
||||
rows="1"
|
||||
autosize
|
||||
type="textarea"
|
||||
:rules="[{ required: true, message: '请填写' }]"
|
||||
placeholder="请填写预约事由"
|
||||
required
|
||||
label="预约事由"></van-field>
|
||||
<van-field v-model="formData.reserve_join_user_num"
|
||||
name="reserve_join_user_num"
|
||||
:rules="[{ required: true, message: '请填写' }]"
|
||||
placeholder="请填写预约参加人数"
|
||||
required
|
||||
label="参加人数"></van-field>
|
||||
<!-- <van-field v-model="formData.reserve_demand"-->
|
||||
<!-- name="reserve_demand"-->
|
||||
<!-- rows="1"-->
|
||||
<!-- autosize-->
|
||||
<!-- type="textarea"-->
|
||||
<!-- :rules="[{ required: true, message: '请填写' }]"-->
|
||||
<!-- placeholder="请填写预约场地需求"-->
|
||||
<!-- required-->
|
||||
<!-- label="场地需求"></van-field>-->
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 16px;">
|
||||
<van-button round block type="info" native-type="submit">提交</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
|
||||
<van-popup v-model="showTips" :style="{ height: '80%',width:'90%' }" round>
|
||||
<div class="tips">
|
||||
<div class="content">
|
||||
<div style="padding: 0 20px">
|
||||
<h4>职工之家场地预约</h4>
|
||||
<h4>主管部门:校工会</h4>
|
||||
<h3 style="text-align: center">欢迎使用《职工之家场地预约申请流程》服务!</h3>
|
||||
<h4 style="font-weight: bold">流程说明:</h4>
|
||||
<h4 style="font-weight: bold">
|
||||
一、为提高职工之家场地使用效率,充分保障我校相关活动正常有序开展,特制订本管理规定。</h4>
|
||||
<h4 style="font-weight: bold">
|
||||
二、职工之家场地是服务于学校及各部门教职工重大会议及重要文化活动的重要场所,由校工会遵循“申请与统筹协调”相结合的原则统一调度与管理。</h4>
|
||||
<h4 style="font-weight: bold">三、场地管理</h4>
|
||||
<div style="padding-left: 30px;">
|
||||
<h4>
|
||||
1.校工会现有场地3个,位于校工会一层。其中多功能厅座位80个,党员之家会议室座位20个,研讨室座位12个。</h4>
|
||||
<h4>
|
||||
2.职工之家场地的使用安排遵循校级活动优先的原则,兼顾院系活动。如无校级重大会议及活动安排,则按照预约时间顺序安排使用。</h4>
|
||||
<h4>
|
||||
3.校工会负责场地的使用协调、保障场地及设备日常维护;仅提供开水服务,会场布置(大屏设备调试等)及善后工作由各使用单位自行负责。</h4>
|
||||
<h4>
|
||||
4.各使用单位应负责参会人员在会场内的组织和管理工作,保证会后公共设施完好并物归原位,做好使用期间的安全防范等工作。</h4>
|
||||
</div>
|
||||
<h4 style="font-weight: bold">四、职工之家场地申请使用程序</h4>
|
||||
<div style="padding-left: 30px;">
|
||||
<h4>
|
||||
1.使用单位至少提前两天使用南京体育学院信息门户中的“智慧工会系统”申请,经审批通过后方可使用。</h4>
|
||||
<h4>
|
||||
2.需要使用多媒体设备(电子大屏、音视频设备)的单位,请与信息化中心联系,并委派专人提前一天到校工会调试,校工会原则上不提供现场值守服务。</h4>
|
||||
<h4>3.校工会对每次使用情况进行登记、检查与反馈。</h4>
|
||||
</div>
|
||||
<h4 style="font-weight: bold">
|
||||
五、各单位、个人在会场时应自觉遵守以下要求,拒不执行者,校工会有权取消其使用资格。</h4>
|
||||
<div style="padding-left: 30px;">
|
||||
<h4>1.全场禁止吸烟,禁止餐饮。</h4>
|
||||
<h4>
|
||||
2.讲究卫生,禁止随地吐痰、乱丢垃圾;自觉维护良好的秩序,严禁大声喧哗;使用结束后应保持场地干净整洁,会议物品应及时清理。</h4>
|
||||
<h4>
|
||||
3.爱护场地内部的设备、设施、家具和陈设。使用后负责将物品摆放回原位并保证电子大屏及音响等多媒体设备完好,造成损坏须照价赔偿。</h4>
|
||||
<h4>
|
||||
4.如需张贴会标、条幅,须按照管理人员要求在指定位置张贴悬挂,会后应及时拆除;因随意张贴损坏墙面等设施应给予修复或照价赔偿。</h4>
|
||||
<h4>5.严禁使用礼花、喷雾、鞭炮等危险物品。</h4>
|
||||
<h4>
|
||||
6.遇到紧急或异常情况,使用单位应及时报告,并采取应急措施,积极配合有关部门做好善后处理工作。</h4>
|
||||
</div>
|
||||
<h4 style="font-weight: bold">六、本管理规定的解释权归校工会。</h4>
|
||||
<h4 style="font-weight: bold">七、相关事项联系方式:</h4>
|
||||
<div style="padding-left: 30px;">
|
||||
<h4>多功能厅、研讨室使用咨询——校工会办公室</h4>
|
||||
<h4>联系电话:84755127</h4>
|
||||
<h4>党员之家会议室使用咨询——党委组织部、综合考核办公室</h4>
|
||||
<h4>联系电话:84755117 </h4>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button-wrap">
|
||||
<van-button type="info" block @click="showTips=false">开始办理</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
<van-popup v-model="startTimePicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
v-model="startTime"
|
||||
type="datetime"
|
||||
title="选择预约开始时间"
|
||||
@confirm="onStartTimeConfirm"
|
||||
@cancel="startTimePicker = false"
|
||||
:min-date="startMinDate"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
<van-popup v-model="endTimePicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
v-model="endTime"
|
||||
type="datetime"
|
||||
title="选择预约结束时间"
|
||||
@confirm="onEndTimeConfirm"
|
||||
@cancel="endTimePicker = false"
|
||||
:min-date="endMinDate"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
<van-popup v-model="showSitePicker" position="bottom">
|
||||
<van-picker
|
||||
title="请选择需要预约的场地"
|
||||
show-toolbar
|
||||
:columns="siteColumns"
|
||||
@confirm="onSiteConfirm"
|
||||
@cancel="showSitePicker = false">
|
||||
<template #option="option">
|
||||
<div style="display: flex; flex-direction: column; align-items: center;">
|
||||
<div>{{ option.name }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
showTips: true,
|
||||
formData: {},
|
||||
showSitePicker: false,
|
||||
startTimePicker: false,
|
||||
endTimePicker: false,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
siteColumns: [],
|
||||
showSiteUsage: false,
|
||||
allSiteUsageInfo: {},
|
||||
tabActive: null,
|
||||
// startMinDate: moment().add(1, 'days').toDate(),
|
||||
// endMinDate: moment().add(1, 'days').add(30, 'minute').toDate(),
|
||||
startMinDate: moment().add(0, 'days').toDate(),
|
||||
endMinDate: moment().add(0, 'days').add(30, 'minute').toDate(),
|
||||
// endMaxDate: moment().add(2, 'days').toDate()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit(values) {
|
||||
console.log(this.formData)
|
||||
const resp = await $.get('/platform/activity/site/apply/checkApplyTime', {
|
||||
time: this.formData.reserve_start_time,
|
||||
endTime: this.formData.reserve_end_time,
|
||||
siteId: this.formData.site_id
|
||||
})
|
||||
if (resp.code === 1) {
|
||||
this.$toast(resp.msg)
|
||||
this.formData.reserve_start_time = ''
|
||||
this.formData.reserve_end_time = ''
|
||||
return
|
||||
}
|
||||
|
||||
const {site_name, reserve_start_time, reserve_end_time} = this.formData
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要提交' + site_name + '\n' + reserve_start_time + "\n至\n" + reserve_end_time + '\n的预约吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast.loading({
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
});
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = await $.post('/platform/activity/site/apply/insert', {"siteReserve": JSON.stringify(this.formData)})
|
||||
loading.clear()
|
||||
if (code === 0) {
|
||||
this.$toast.success(msg)
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/activity/site/mine'
|
||||
}, 500)
|
||||
} else {
|
||||
this.$toast.fail(msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
onStartTimeConfirm(time) {
|
||||
const hours = time.getHours();
|
||||
const minutes = time.getMinutes();
|
||||
const day = time.getDay()
|
||||
|
||||
if (time.getFullYear() === 2024 && time.getMonth() === 3 && time.getDate() === 28){
|
||||
|
||||
} else if (day === 0 || day === 6){
|
||||
this.$toast('周六周日预约不了喔')
|
||||
return
|
||||
}
|
||||
|
||||
// if (day === 0 || day === 6) {
|
||||
// this.$toast('周六周日预约不了喔')
|
||||
// return
|
||||
// }
|
||||
|
||||
if (time.getFullYear() === 2024 && time.getMonth() === 2 && (time.getDate() === 14 || time.getDate() === 15)) {
|
||||
this.$toast('由于2024年3月14,15两日开展教代会会议故无法申请该两天的场地。')
|
||||
return
|
||||
}
|
||||
|
||||
if (hours < 8 || (hours === 8 && minutes < 30)) {
|
||||
this.$toast('请预约上午8点半之后的时间')
|
||||
return
|
||||
}
|
||||
this.formData.reserve_start_time = moment(time).format('YYYY-MM-DD HH:mm:ss');
|
||||
this.startTimePicker = false;
|
||||
},
|
||||
onEndTimeConfirm(time) {
|
||||
if (!this.formData.reserve_start_time) {
|
||||
this.$toast('请先选择预约开始时间')
|
||||
return
|
||||
}
|
||||
|
||||
const day = time.getDay()
|
||||
const hours = time.getHours();
|
||||
const minutes = time.getMinutes();
|
||||
|
||||
if (time.getFullYear() === 2024 && time.getMonth() === 3 && time.getDate() === 28){
|
||||
|
||||
} else if (day === 0 || day === 6){
|
||||
this.$toast('周六周日预约不了喔')
|
||||
return
|
||||
}
|
||||
|
||||
// if (day === 0 || day === 6) {
|
||||
// this.$toast('周六周日预约不了喔')
|
||||
// return
|
||||
// }
|
||||
|
||||
if (time.getFullYear() === 2024 && time.getMonth() === 2 && (time.getDate() === 14 || time.getDate() === 15)) {
|
||||
this.$toast('由于2024年3月14,15两日开展教代会会议故无法申请该两天的场地。')
|
||||
return
|
||||
}
|
||||
|
||||
if (hours > 17 || (hours >= 17 && minutes > 0)) {
|
||||
this.$toast('结束时间不能超过下午5点')
|
||||
return
|
||||
}
|
||||
|
||||
const isSameDay = moment(this.formData.reserve_start_time).isSame(moment(time), 'day')
|
||||
if (!isSameDay) {
|
||||
this.$toast('不能跨天预约喔')
|
||||
return
|
||||
}
|
||||
|
||||
this.formData.reserve_end_time = moment(time).format('YYYY-MM-DD HH:mm:ss');
|
||||
this.endTimePicker = false;
|
||||
},
|
||||
onSiteConfirm(value, index) {
|
||||
this.$set(this.formData, 'site_name', value.name)
|
||||
this.$set(this.formData, 'site_id', value.id)
|
||||
this.showSitePicker = false
|
||||
},
|
||||
async listSite() {
|
||||
const {data} = await $.get(loc() + '/listSite')
|
||||
this.siteColumns = data
|
||||
},
|
||||
async applyUserInfo() {
|
||||
const {data} = await $.get('/platform/activity/site/apply/applyUserInfo')
|
||||
this.$set(this.formData, 'reserve_person_id', data.reserve_person_id)
|
||||
this.$set(this.formData, 'reserve_person_username', data.reserve_person_username)
|
||||
this.$set(this.formData, 'reserve_person_loginname', data.reserve_person_loginname)
|
||||
this.$set(this.formData, 'reserve_person_sex', data.reserve_person_sex)
|
||||
this.$set(this.formData, 'reserve_person_phone', data.reserve_person_phone)
|
||||
this.$set(this.formData, 'reserve_person_unitname', data.reserve_person_unitname)
|
||||
this.$set(this.formData, 'reserve_person_unionname', data.reserve_person_unionname)
|
||||
this.$set(this.formData, 'reserve_person_unionid', data.reserve_person_unionid)
|
||||
},
|
||||
async init() {
|
||||
const id = GetQueryString('id')
|
||||
if (id) {
|
||||
|
||||
} else {
|
||||
await this.applyUserInfo()
|
||||
}
|
||||
},
|
||||
async allSiteUsage() {
|
||||
const {data} = await $.get('/platform/activity/site/apply/allSiteUsage')
|
||||
this.allSiteUsageInfo = data
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listSite()
|
||||
this.allSiteUsage()
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,551 +0,0 @@
|
||||
<!--#
|
||||
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.unitname ? (o.unitname +
|
||||
'') : '' + '' + 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()
|
||||
var 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
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无数据')
|
||||
return
|
||||
}
|
||||
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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,361 +0,0 @@
|
||||
<!--#
|
||||
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.unitname ? o.unitname :
|
||||
'') + ' ' + 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()
|
||||
var 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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,34 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="职工之家场地预约详细信息" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<site_h5_info :id="id"></site_h5_info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
components: {
|
||||
'site_h5_info': httpVueLoader('/components/activity/site/SiteH5Info.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id")
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,192 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #ececec;
|
||||
}
|
||||
|
||||
.table-list {
|
||||
margin-top: 64px;
|
||||
}
|
||||
|
||||
.table-item {
|
||||
margin: 16px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 16px;
|
||||
font-size: 14px;
|
||||
color: #5b5a5a;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.table-item .header-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
width: calc(100% - 100px);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.table-item .header-title-extra {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.cell {
|
||||
display: flex;
|
||||
padding: 2px;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.cell .title {
|
||||
|
||||
}
|
||||
|
||||
.cell .content {
|
||||
|
||||
}
|
||||
|
||||
.extra {
|
||||
padding: 10px 0 0 0;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="table-list">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="table-item">
|
||||
<div>
|
||||
<div class="header-title">
|
||||
{{item.reserve_cause}}
|
||||
</div>
|
||||
<van-tag class="header-title-extra" :type="tagType(item.reserve_state)">
|
||||
{{item.state_name}}
|
||||
</van-tag>
|
||||
|
||||
<div class="cell">
|
||||
<div class="title">预约场地:</div>
|
||||
<div class="content">{{item.site_name}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">开始时间:</div>
|
||||
<div class="content">{{item.reserve_start_time}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">结束时间:</div>
|
||||
<div class="content">{{item.reserve_end_time}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人姓名:</div>
|
||||
<div class="content">{{item.reserve_person_username}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人工号:</div>
|
||||
<div class="content">{{item.reserve_person_loginname}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人部门:</div>
|
||||
<div class="content">{{item.reserve_person_unitname}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人工会:</div>
|
||||
<div class="content">{{item.reserve_person_unionname}}</div>
|
||||
</div>
|
||||
<div class="extra">
|
||||
<van-button size="small" type="info" @click="openView(item.id)">查看详情</van-button>
|
||||
<van-button size="small" type="danger" @click="revoke(item)" v-if="item.reserve_state===6098">撤销预约</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
pageDataUrl:'/platform/activity/site/reserve/pageData'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
return (reserveState) => {
|
||||
if (reserveState === 6138) {
|
||||
return 'success';
|
||||
} else if ([6108, 6128].includes(reserveState)) {
|
||||
return 'danger';
|
||||
}
|
||||
return 'primary';
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async revoke(item) {
|
||||
const {id, site_name, reserve_start_time, reserve_end_time} = item
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤销' + site_name + '\n' + reserve_start_time + "\n至\n" + reserve_end_time + '\n的预约吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast.loading({
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
});
|
||||
|
||||
const {
|
||||
code,
|
||||
msg
|
||||
} = await $.post('/platform/activity/site/apply/revoke', {id})
|
||||
loading.clear()
|
||||
if (code === 0) {
|
||||
this.doSearch()
|
||||
this.$toast.success(msg)
|
||||
} else {
|
||||
this.$toast.fail(msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = loc() + '/detail?id=' + id
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
// this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,433 +0,0 @@
|
||||
<!--#
|
||||
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;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.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()
|
||||
var 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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,467 +0,0 @@
|
||||
<!--#
|
||||
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-form @submit="reserveDo">
|
||||
<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="message"
|
||||
rows="1"
|
||||
autosize
|
||||
label="预约事由"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
required
|
||||
placeholder="请输入预约事由"
|
||||
show-word-limit
|
||||
:rules="[{required:true,message:'请填写预约事由'}]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="joinUser"
|
||||
rows="2"
|
||||
autosize
|
||||
label="参加人员"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入参加人员"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
|
||||
|
||||
<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()
|
||||
var 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) => {
|
||||
// 休息日不能选择
|
||||
if (this.site.workday === true) {
|
||||
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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,126 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="职工之家场地预约校工会审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<site_h5_info :id="id">
|
||||
<template #audit>
|
||||
<div class="van-cell-group__title mt10">
|
||||
<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 :value="moment().format('YYYY-MM-DD')"
|
||||
label="审核时间"
|
||||
readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.schoolOption"
|
||||
rows="1"
|
||||
required
|
||||
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="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
<!-- <van-col span="8">-->
|
||||
<!-- <van-button color="red" block plain @click="doAudit(2)">返回修改-->
|
||||
<!-- </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>
|
||||
</site_h5_info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
components: {
|
||||
'site_h5_info': httpVueLoader('/components/activity/site/SiteH5Info.vue'),
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id"),
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (this.formData.schoolOption == null || this.formData.schoolOption === '') {
|
||||
this.$toast('请填写审核意见')
|
||||
return
|
||||
}
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要' + (pass ? '通过' : '拒绝') + '吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast.loading({
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
})
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = await $.post('/platform/activity/site/review/doProcess',
|
||||
{
|
||||
id: this.id,
|
||||
schoolOption: this.formData.schoolOption,
|
||||
isPass: pass
|
||||
}
|
||||
)
|
||||
loading.clear()
|
||||
if (code === 0) {
|
||||
this.$toast.success(msg)
|
||||
setTimeout(() => {
|
||||
window.history.back()
|
||||
}, 500)
|
||||
} else {
|
||||
this.$toast.fail(msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,214 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #ececec;
|
||||
}
|
||||
|
||||
.table-list {
|
||||
margin-top: 64px;
|
||||
}
|
||||
|
||||
.table-item {
|
||||
margin: 16px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 16px;
|
||||
font-size: 14px;
|
||||
color: #5b5a5a;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.table-item .header-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
width: calc(100% - 100px);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.table-item .header-title-extra {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.cell {
|
||||
display: flex;
|
||||
padding: 2px;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.cell .title {
|
||||
|
||||
}
|
||||
|
||||
.cell .content {
|
||||
|
||||
}
|
||||
|
||||
.extra {
|
||||
padding: 10px 0 0 0;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar .van-dropdown-menu__item {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div>
|
||||
<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 :title="pageForm.time" ref="dropItemYearMonth">
|
||||
<van-datetime-picker
|
||||
v-model="currentDate"
|
||||
type="year-month"
|
||||
:max-date="maxDate"
|
||||
title="选择年月"
|
||||
@confirm="onConfirmDate"
|
||||
@cancel="onCancelDate"
|
||||
></van-datetime-picker>
|
||||
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" :options="auditOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div class="table-list">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="table-item">
|
||||
<div>
|
||||
<div class="header-title">
|
||||
{{item.reserve_cause}}
|
||||
</div>
|
||||
|
||||
<van-tag class="header-title-extra" :type="tagType(item.reserve_state)">
|
||||
{{item.state_name}}
|
||||
</van-tag>
|
||||
|
||||
<div class="cell">
|
||||
<div class="title">预约场地:</div>
|
||||
<div class="content">{{item.site_name}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">开始时间:</div>
|
||||
<div class="content">{{item.reserve_start_time}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">结束时间:</div>
|
||||
<div class="content">{{item.reserve_end_time}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人姓名:</div>
|
||||
<div class="content">{{item.reserve_person_username}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人工号:</div>
|
||||
<div class="content">{{item.reserve_person_loginname}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人部门:</div>
|
||||
<div class="content">{{item.reserve_person_unitname}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人工会:</div>
|
||||
<div class="content">{{item.reserve_person_unionname}}</div>
|
||||
</div>
|
||||
<div class="extra">
|
||||
<van-button size="small" type="info" @click="openView(item.id)">查看详情</van-button>
|
||||
<van-button size="small" type="info" @click="openAudit(item.id)"
|
||||
v-if="item.reserve_state===6118">审核预约
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
isAudit: false,
|
||||
time: moment().format('YYYY-MM')
|
||||
},
|
||||
pageDataUrl: '/platform/activity/site/review/pageData',
|
||||
maxDate: new Date(),
|
||||
currentDate: new Date(),
|
||||
auditOptions: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已审核', value: true},
|
||||
{text: '未审核', value: false},
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
return (reserveState) => {
|
||||
if (reserveState === 6138) {
|
||||
return 'success';
|
||||
} else if (reserveState === 6128) {
|
||||
return 'danger';
|
||||
}
|
||||
return 'primary';
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async openAudit(id) {
|
||||
window.location.href = loc() + '/audit?id=' + id
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = '/mobile/activity/site/mine/detail?id=' + id
|
||||
},
|
||||
onCancelDate() {
|
||||
this.$refs.dropItemYearMonth.toggle();
|
||||
},
|
||||
onConfirmDate(val) {
|
||||
this.pageForm.time = moment(val).format('YYYY-MM')
|
||||
this.$refs.dropItemYearMonth.toggle()
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.doSearch()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,126 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="职工之家场地预约分工会审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<site_h5_info :id="id">
|
||||
<template #audit>
|
||||
<div class="van-cell-group__title mt10">
|
||||
<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 :value="moment().format('YYYY-MM-DD')"
|
||||
label="审核时间"
|
||||
readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.unionOption"
|
||||
rows="1"
|
||||
required
|
||||
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="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
<!-- <van-col span="8">-->
|
||||
<!-- <van-button color="red" block plain @click="doAudit(2)">返回修改-->
|
||||
<!-- </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>
|
||||
</site_h5_info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
components: {
|
||||
'site_h5_info': httpVueLoader('/components/activity/site/SiteH5Info.vue'),
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id"),
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (this.formData.unionOption == null || this.formData.unionOption === '') {
|
||||
this.$toast('请填写审核意见')
|
||||
return
|
||||
}
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要' + (pass ? '通过' : '拒绝') + '吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast.loading({
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
})
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = await $.post('/platform/activity/site/unionProcess/doProcess',
|
||||
{
|
||||
id: this.id,
|
||||
unionOption: this.formData.unionOption,
|
||||
isPass: pass
|
||||
}
|
||||
)
|
||||
loading.clear()
|
||||
if (code === 0) {
|
||||
this.$toast.success(msg)
|
||||
setTimeout(() => {
|
||||
window.history.back()
|
||||
}, 500)
|
||||
} else {
|
||||
this.$toast.fail(msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,214 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #ececec;
|
||||
}
|
||||
|
||||
.table-list {
|
||||
margin-top: 64px;
|
||||
}
|
||||
|
||||
.table-item {
|
||||
margin: 16px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 16px;
|
||||
font-size: 14px;
|
||||
color: #5b5a5a;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.table-item .header-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
width: calc(100% - 100px);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.table-item .header-title-extra {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.cell {
|
||||
display: flex;
|
||||
padding: 2px;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.cell .title {
|
||||
|
||||
}
|
||||
|
||||
.cell .content {
|
||||
|
||||
}
|
||||
|
||||
.extra {
|
||||
padding: 10px 0 0 0;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar .van-dropdown-menu__item{
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div>
|
||||
<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(0, 78, 100)">
|
||||
<van-dropdown-item :title="pageForm.time" ref="dropItemYearMonth">
|
||||
<van-datetime-picker
|
||||
v-model="currentDate"
|
||||
type="year-month"
|
||||
:max-date="maxDate"
|
||||
title="选择年月"
|
||||
@confirm="onConfirmDate"
|
||||
@cancel="onCancelDate"
|
||||
></van-datetime-picker>
|
||||
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" :options="auditOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div class="table-list">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="table-item">
|
||||
<div>
|
||||
<div class="header-title">
|
||||
{{item.reserve_cause}}
|
||||
</div>
|
||||
<van-tag class="header-title-extra" :type="tagType(item.reserve_state)">
|
||||
{{item.state_name}}
|
||||
</van-tag>
|
||||
|
||||
<div class="cell">
|
||||
<div class="title">预约场地:</div>
|
||||
<div class="content">{{item.site_name}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">开始时间:</div>
|
||||
<div class="content">{{item.reserve_start_time}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">结束时间:</div>
|
||||
<div class="content">{{item.reserve_end_time}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人姓名:</div>
|
||||
<div class="content">{{item.reserve_person_username}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人工号:</div>
|
||||
<div class="content">{{item.reserve_person_loginname}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人部门:</div>
|
||||
<div class="content">{{item.reserve_person_unitname}}</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="title">预约人工会:</div>
|
||||
<div class="content">{{item.reserve_person_unionname}}</div>
|
||||
</div>
|
||||
<div class="extra">
|
||||
<van-button size="small" type="info" @click="openView(item.id)">查看详情</van-button>
|
||||
<van-button size="small" type="info" @click="openAudit(item.id)"
|
||||
v-if="item.reserve_state===6098">审核预约
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
isAudit: false,
|
||||
time: moment().format('YYYY-MM')
|
||||
},
|
||||
pageDataUrl: '/platform/activity/site/unionProcess/pageData',
|
||||
maxDate: new Date(),
|
||||
currentDate: new Date(),
|
||||
auditOptions: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已审核', value: true},
|
||||
{text: '未审核', value: false},
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
return (reserveState) => {
|
||||
if (reserveState === 6138) {
|
||||
return 'success';
|
||||
} else if ([6108, 6128].includes(reserveState)) {
|
||||
return 'danger';
|
||||
}
|
||||
return 'primary';
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async openAudit(id) {
|
||||
window.location.href = loc() + '/audit?id=' + id
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = '/mobile/activity/site/mine/detail?id=' + id
|
||||
},
|
||||
onCancelDate() {
|
||||
this.$refs.dropItemYearMonth.toggle();
|
||||
},
|
||||
onConfirmDate(val) {
|
||||
this.pageForm.time = moment(val).format('YYYY-MM')
|
||||
this.$refs.dropItemYearMonth.toggle()
|
||||
this.doSearch()
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
// this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.doSearch()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,130 +0,0 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,215 +0,0 @@
|
||||
<!--#
|
||||
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="location.replace('/mobile/index')"></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 + '/fileStreamPreview?id=' + o.cover"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon name="fire" color="red"></van-icon>
|
||||
<div style="margin-left: 10px;width: calc(100% - 26px);text-overflow: ellipsis;overflow: hidden;white-space: nowrap">
|
||||
{{o.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left" style="width: 100%">
|
||||
<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')}}-->
|
||||
报名时间:{{o.applyStartTime}}至{{o.applyEndTime}}
|
||||
</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 class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
活动时间:{{o.startTime}}
|
||||
<!-- {{moment(o.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.activityEndTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="right">
|
||||
<span v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()" style="color: forestgreen">
|
||||
未开始报名
|
||||
</span>
|
||||
<span v-else-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" :active-color="themeColor">
|
||||
<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>
|
||||
|
||||
var 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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,283 +0,0 @@
|
||||
<!--#
|
||||
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.go(-1)"></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>
|
||||
<div style="margin-left: 10px;width: calc(100% - 26px);text-overflow: ellipsis;overflow: hidden;white-space: nowrap">
|
||||
{{o.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left" style="width: 100%">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
报名时间:{{o.applyStartTime}}至{{o.applyEndTime}}
|
||||
<!-- {{moment(o.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.activityEndTime).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 class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
活动时间:{{o.startTime}}
|
||||
<!-- {{moment(o.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.activityEndTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="right">
|
||||
<span v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()"
|
||||
style="color: forestgreen">
|
||||
未开始报名
|
||||
</span>
|
||||
<span v-else-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 class="activity_content" style="font-size: 12px; color: #c4bebe;">-->
|
||||
<!-- <div class="left">-->
|
||||
<!-- <van-icon name="clock" size="1em"></van-icon>-->
|
||||
<!-- <span style="margin-left: 5px;">-->
|
||||
<!-- {{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
<!-- </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" :active-color="themeColor">
|
||||
<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>
|
||||
|
||||
var 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: 5},
|
||||
{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) {
|
||||
console.log(o)
|
||||
if (moment(o.applyStartTime).valueOf() > moment().valueOf()) {
|
||||
this.$toast('活动未开始报名')
|
||||
return;
|
||||
}
|
||||
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 init() {
|
||||
this.$set(this.pageForm, "activityStatus", 1)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code: 40000})
|
||||
this.activityLevelList = []
|
||||
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)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,110 +0,0 @@
|
||||
<!--#
|
||||
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
|
||||
var 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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,180 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
/*height: 200px;*/
|
||||
width: 100%;
|
||||
}
|
||||
.activity_name .van-cell__title{
|
||||
width: 100px;
|
||||
flex: unset;
|
||||
}
|
||||
.activity_name .van-cell__value{
|
||||
width: calc(100% - 100px);
|
||||
flex: unset;
|
||||
}
|
||||
|
||||
</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>
|
||||
var 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
|
||||
})
|
||||
await this.getHasRegUserNum()
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleRegister', {activityId: this.activityId})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
window.history.back()
|
||||
}, 1000)
|
||||
|
||||
} 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)
|
||||
setTimeout(() => {
|
||||
window.history.back()
|
||||
}, 1000)
|
||||
} 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()
|
||||
if (moment(this.o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() > moment(this.o.applyEndTime).valueOf()) {
|
||||
this.$toast.fail("不在活动范围内")
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,367 +0,0 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
|
||||
.van-search__action {
|
||||
background-color: #edf0ff
|
||||
}
|
||||
|
||||
.activity_name .van-cell__title{
|
||||
width: 100px;
|
||||
flex: unset;
|
||||
}
|
||||
.activity_name .van-cell__value{
|
||||
width: calc(100% - 100px);
|
||||
flex: unset;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="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 #title>
|
||||
报名人员({{registerList.length}}人)
|
||||
</template>
|
||||
<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" v-loading="tagCloseable">
|
||||
<div v-if="registerList && registerList.length>0" style="max-height: 300px;overflow-y: scroll">
|
||||
<template v-for="item in registerList">
|
||||
<div style="display: flex;align-items: center">
|
||||
<!-- <van-tag type="primary" :closeable="tagCloseable" size="medium"-->
|
||||
<!-- :color="themeColor"-->
|
||||
<!-- @close="removeRegUser(item)">-->
|
||||
<!-- {{item.userName}}-->
|
||||
<!-- </van-tag>-->
|
||||
<div style="min-width: 100px;max-width: 100px;font-size: 14px;color: #000000">
|
||||
{{item.userName}}
|
||||
</div>
|
||||
<van-field v-model="item.notes" label="" maxlength="20"
|
||||
:readonly="!tagCloseable"
|
||||
placeholder="如未能到现场请填写备注原因"></van-field>
|
||||
<van-button icon="delete" type="danger" size="small" @click="removeRegUser(item)"
|
||||
v-if="tagCloseable"
|
||||
></van-button>
|
||||
</div>
|
||||
</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" :color="themeColor">选择报名人员
|
||||
</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" show-action
|
||||
placeholder="请输入姓名搜索">
|
||||
<template #action>
|
||||
<div @click="onSearchUser(searchKey)">搜索</div>
|
||||
</template>
|
||||
|
||||
</van-search>
|
||||
|
||||
<!-- <div class="van-hairline--bottom">-->
|
||||
<!-- 点击列表中的人员添加到活动人员中-->
|
||||
<!-- </div>-->
|
||||
<template v-if="searchLoading">
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
|
||||
<div class="van-action-sheet__content mt5"
|
||||
style="height: calc(100% - 107px);overflow-y: scroll"
|
||||
v-else-if="searchUserList && searchUserList.length>0">
|
||||
|
||||
<template>
|
||||
<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}}({{item.loginName}})</span>
|
||||
</button>
|
||||
</template>
|
||||
<!--<van-empty description="没有更多了" style="position:absolute;height: 70%"
|
||||
v-else></van-empty>-->
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty description="暂无数据" style="position:absolute;height: 70%"
|
||||
v-else-if="searchUserList.length===0"></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"){}#-->
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
activityId: '',
|
||||
o: {},
|
||||
registerList: [],
|
||||
addRegisterList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: '',
|
||||
searchUserList: [],
|
||||
tagCloseable: true,
|
||||
searchLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getRegisterUser() {
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
if (this.o.signUpMethod === 3) {
|
||||
this.registerList = resp.data.filter(v => v.applyUserId === this.userId)
|
||||
} else {
|
||||
this.registerList = resp.data
|
||||
}
|
||||
this.addRegisterList = resp.data
|
||||
if (this.registerList.length > 0) {
|
||||
this.tagCloseable = false
|
||||
}
|
||||
}
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ''
|
||||
this.searchUserList = []
|
||||
this.userActionSheet = true
|
||||
this.onSearchUser(null)
|
||||
},
|
||||
async onSearchUser(val) {
|
||||
// if (!val) {
|
||||
// this.$toast.fail("请输入搜索条件")
|
||||
// return
|
||||
// }
|
||||
this.searchLoading = true
|
||||
const resp = await $.get('/mobile/activity/unionActivity/searchNoRegisterUser', {
|
||||
activityId: this.activityId,
|
||||
searchKey: val
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {id, userName} = item
|
||||
this.registerList.push({id, userName})
|
||||
this.$toast('添加成功')
|
||||
},
|
||||
async removeRegUser(item) {
|
||||
if (this.userId === item.id) {
|
||||
this.$toast.fail("自己不能删除")
|
||||
return
|
||||
}
|
||||
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
|
||||
}
|
||||
if (this.o.signUpMethod === 3) {
|
||||
if (this.registerList.length !== this.o.teamNum) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是双人报名模式您需要报名' + this.o.teamNum + '人!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
if (!this.registerList.map(v => v.id).includes(this.userId)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是组队模式请您找' + this.o.teamNum + '朋友一起报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
// await this.getRegisterUser()
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
this.addRegisterList = resp.data
|
||||
let arr = []
|
||||
if (this.addRegisterList && this.addRegisterList.length > 0) {
|
||||
this.addRegisterList.forEach(v => {
|
||||
this.registerList.forEach(r => {
|
||||
if (v.id === r.id && v.applyUserId !== this.userId) {
|
||||
arr.push(r.userName)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
if (arr && arr.length > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '【' + arr.toString() + '】已成功报名您无需再报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
/* if (this.addRegisterList.map(v => v.id).includes(this.userId)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您已报名无需再报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
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)),
|
||||
persons: JSON.stringify(this.registerList)
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
await this.getActivityInfo()
|
||||
await this.getRegisterUser()
|
||||
if (this.o.signUpMethod === 3 && this.registerList.length === 0) {
|
||||
this.registerList.push({id: this.userId, userName: this.userName})
|
||||
}
|
||||
this.title = (this.o.signUpMethod === 2 ? '分工会报名' : '组队报名')
|
||||
if (moment(this.o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() > moment(this.o.applyEndTime).valueOf()) {
|
||||
this.$toast.fail("不在活动范围内")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,132 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.test{width:9em; overflow:hidden; white-space:nowrap;text-overflow: ellipsis;font-size: 10px;text-align: center;color: #a0a1a1
|
||||
}
|
||||
.test:hover{text-overflow:inherit; overflow:visible;}
|
||||
</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-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入教职工姓名或者教职工编号进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<div style="display: flex">
|
||||
<div style="width: calc(100% - 100px);background: rgb(255,255,255)">
|
||||
<h4 style="margin-left: 5%;color: rgb(122,110,96)">一份祝福拉进同事的距离~</h4>
|
||||
<h5 style="margin-left: 5%;color: rgb(122,110,96)">{{tableData.length}}同事即将生日</h5>
|
||||
</div>
|
||||
<div style="width: 100px;max-width: 100px">
|
||||
<van-image width="100px"
|
||||
height="100px"
|
||||
src="/assets/mobile/img/birthday/birthday1.png"
|
||||
></van-image>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin-top: 160px;margin-bottom: 50px">
|
||||
|
||||
<div>
|
||||
<van-checkbox-group v-model="result">
|
||||
<van-grid :column-num="3" :border="false" style="background-color: white">
|
||||
<van-grid-item
|
||||
v-for="o in tableData"
|
||||
:key="o.userId" style="padding: 5px;">
|
||||
<span style="font-size: 10px">{{o.birthday.substr(0,2)}}-{{o.birthday.substr(2,4)}}</span>
|
||||
|
||||
<div style="background-image: url('/assets/mobile/img/birthday/birthday2.png');
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
">
|
||||
<span style="font-size: 20px;font-weight: bold;font-family: cursive">{{o.username.substr(0,1)}}</span>
|
||||
</div>
|
||||
<span style="font-size: 10px">{{o.username}}</span>
|
||||
<div class="test">
|
||||
<span>{{o.unitName}}</span>
|
||||
</div>
|
||||
<!-- <span v-if="o.unitName.length>7" style="font-size: 10px;">{{o.unitName.substr(0,7)+"..."}}</span>-->
|
||||
<!-- <span v-else style="font-size: 10px">{{o.unitName}}</span>-->
|
||||
<van-checkbox
|
||||
style="margin-left: 80px;margin-top: -35px"
|
||||
icon-size="20px"
|
||||
:name="o.userId" ref="checkboxes">
|
||||
</van-checkbox>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar route>
|
||||
<van-tabbar-item replace @click="sendBlessings()" style="font-size: 16px;">送上祝福</van-tabbar-item>
|
||||
<van-tabbar-item replace @click="showMine()" style="font-size: 16px">我收到的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
pageForm: {},
|
||||
checked: true,
|
||||
result: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
const res = await $.post('/mobile/birthday/greeting/pageData', this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
},
|
||||
//送上祝福
|
||||
sendBlessings() {
|
||||
if(this.result.length===0){
|
||||
this.$toast.fail("请选择教职工");
|
||||
return;
|
||||
}
|
||||
localStorage.setItem("greetingResult",this.result);
|
||||
window.location.href = '/mobile/birthday/greeting/greeting_list'
|
||||
},
|
||||
toggle(index) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
showMine() {
|
||||
window.location.href = '/mobile/birthday/greeting/greeting_info'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.onLoad();
|
||||
},
|
||||
components: {
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,134 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.van-cell {
|
||||
padding: 4px 16px;
|
||||
}
|
||||
.van-cell-group--inset {
|
||||
margin: 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-search
|
||||
v-model="pageForm.username"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入教职工姓名进行查询"
|
||||
>
|
||||
</van-search>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 70px">
|
||||
<van-list v-model="mLoading" :finished="finished" :finished-text="giftInfo.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div v-for="o in giftInfo" :key="o.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="font-size: 15px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
margin-left: 15px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;">
|
||||
<span style="color: #3ea1ec">{{o.username}}</span>
|
||||
<span style="color: #3ea1ec">|</span>
|
||||
<span style="font-size: 10px;font-weight: normal;color: #a0a1a1">{{o.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 10px">
|
||||
<van-cell-group inset >
|
||||
<van-cell :border="false" title="赠送日期">{{o.giftTime}}</van-cell>
|
||||
<van-cell :border="false" title="祝福语">
|
||||
<span v-if="o.message.length==0">无</span>
|
||||
<span v-if="o.message.length>0">{{o.message}}</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="生日贺卡" @click="showHk(o)"
|
||||
v-if="o.isSend==1" is-link value="点击展示"></van-cell>
|
||||
<van-cell :border="false" title="赠送礼物">
|
||||
<van-image style="width: 50px;height: 50px" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id" @click="showGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"></van-image>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&giftInfo.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el:'#app',
|
||||
mixins: [mobileMixins],
|
||||
data(){
|
||||
return{
|
||||
show: false,
|
||||
images:'',
|
||||
giftInfo:[],
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doSearch(){
|
||||
this.pageForm.pageNumber = 1
|
||||
this.giftInfo = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
const res = await $.post('/mobile/birthday/greeting/giftInfo', this.pageForm)
|
||||
this.mLoading = false
|
||||
if (res.code === 0) {
|
||||
res.data.list.forEach(v => {
|
||||
if(!(typeof v.files =='object')){
|
||||
v.files = JSON.parse(v.files)
|
||||
}
|
||||
})
|
||||
this.giftInfo = this.giftInfo.concat(res.data.list)
|
||||
if (this.giftInfo.length >= res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
showGift(data){
|
||||
vant.ImagePreview([data])
|
||||
},
|
||||
showHk(o){
|
||||
window.location.href='/mobile/birthday/greeting/hk?id='+o.id
|
||||
},
|
||||
},
|
||||
created(){
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,173 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.sub{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" style="background-color: white">
|
||||
<van-nav-bar title="精选礼物" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<div>
|
||||
<span style="color: rgb(114,90,69);margin-left: 10px;font-size: 14px;font-weight: bold">正在为
|
||||
<span v-for="o in tableData"> {{o.username}} </span>挑选礼物
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-grid :column-num="6" :border="false">
|
||||
<van-grid-item
|
||||
v-for="o in tableData"
|
||||
:key="o.userId" style="padding: 5px;">
|
||||
<div style="background-color: rgb(203,200,222);
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 25px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
">
|
||||
<span style="font-size: 20px">{{o.username.substr(0,1)}}</span>
|
||||
</div>
|
||||
<span style="font-size: 10px">{{o.username}}</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div><h3 style="margin-left: 10px">精选礼物</h3></div>
|
||||
<div>
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item
|
||||
v-for="(o,index) in listGift"
|
||||
:key="o.id" style="padding: 5px;">
|
||||
<div class="sub">
|
||||
<van-image :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id" @click="sendGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"></van-image>
|
||||
</div>
|
||||
<span style="font-size: 10px">{{o.giftName}}</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<van-dialog v-model="show" title="送上礼物" show-cancel-button :before-close="beforeClose">
|
||||
<div>
|
||||
<img :src="images" style="display: flex;align-items: center;justify-content: center;height: 100px;margin: 0 auto"/>
|
||||
</div>
|
||||
<div style="margin-top: 10px;margin-bottom: 10px">
|
||||
<van-field
|
||||
v-model="form.message"
|
||||
rows="2"
|
||||
autosize
|
||||
label="祝福语"
|
||||
type="textarea"
|
||||
maxlength="100"
|
||||
placeholder="请输入祝福语"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
<div style="margin-top: 10px;margin-bottom: 10px">
|
||||
<van-row>
|
||||
<van-col span="16">
|
||||
<van-cell center title="是否发送贺卡">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="form.isSend" @click="send" size="24"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button round type="info" @click="showHk()">贺卡展示</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el:'#app',
|
||||
data(){
|
||||
return{
|
||||
pageForm:{
|
||||
greetingResult:localStorage.getItem("greetingResult"),
|
||||
},
|
||||
tableData:[],
|
||||
listGift:[],
|
||||
show: false,
|
||||
images:'',
|
||||
form:{
|
||||
giftId:'',
|
||||
message:'',
|
||||
isSend:false,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async loadList(){
|
||||
const res = await $.post('/mobile/birthday/greeting/loadList',this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
},
|
||||
async giftList(){
|
||||
const res = await $.get('/mobile/birthday/greeting/giftList')
|
||||
if (res.code === 0) {
|
||||
res.data.forEach(v => {
|
||||
if(!(typeof v.files =='object')){
|
||||
v.files = JSON.parse(v.files)
|
||||
}
|
||||
})
|
||||
this.listGift = res.data
|
||||
}
|
||||
},
|
||||
sendGift(data,id){
|
||||
this.show=true;
|
||||
this.images=data;
|
||||
this.form.giftId=id;
|
||||
this.form.greetingResult=this.pageForm.greetingResult;
|
||||
},
|
||||
beforeClose : async function (action, done) { // 点击事件 - 备注按钮提示框
|
||||
if (action === 'confirm') { // 确认
|
||||
const res = await $.post('/mobile/birthday/greeting/sendBlessing', this.form)
|
||||
if (res.code === 0) {
|
||||
done(); // 关闭提示框
|
||||
this.$toast.success("赠送成功")
|
||||
} else {
|
||||
done();
|
||||
this.$toast.fail("操作失败")
|
||||
}
|
||||
} else if (action === 'cancel') { // 取消
|
||||
this.show = false;
|
||||
this.images = '';
|
||||
this.form = {};
|
||||
done(); // 关闭提示框
|
||||
}
|
||||
},
|
||||
send(){
|
||||
console.log(this.form.isSend)
|
||||
},
|
||||
showHk(){
|
||||
window.location.href='/mobile/birthday/greeting/hk'
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.loadList();
|
||||
this.giftList();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,105 +0,0 @@
|
||||
<!--#
|
||||
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.go(-1)"
|
||||
></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.username}}</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('/mobile/cahd/apply/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 {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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,138 +0,0 @@
|
||||
<!--#
|
||||
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="location.href='/mobile/index'"
|
||||
></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-notice-bar mode="closeable">左滑可删除作品。</van-notice-bar>
|
||||
<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-swipe-cell>
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/wmhd/bianji.svg"
|
||||
@click.stop="openEdit(o.id,o.hdid)"></image>
|
||||
<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>
|
||||
<template #right>
|
||||
<van-button square text="删除" type="danger" @click="doDelete(o.id)"
|
||||
style="height: 100%;"></van-button>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</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: {
|
||||
openEdit(id, hdid) {
|
||||
window.location.href = '/childrenActivities?client=mobile&id=' + hdid + '&zpid=' + id
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定要删除此次作品吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const data = await $.post("/platform/hd/childhd/zpxx/dodelete", {id: id})
|
||||
if (data.code == 0) {
|
||||
await this.yearChange()
|
||||
vant.Toast.success('删除成功');
|
||||
}
|
||||
}
|
||||
},
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,37 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,75 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.container .van-button {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 184px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 8px 24px;
|
||||
box-sizing: border-box;
|
||||
font-weight: 700;
|
||||
font-size: 17px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
line-height: 1.41176471;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: calc(100vh - 46px);
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="代表证" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="container">
|
||||
<van-button @click="showCard('jdh')" style="margin-bottom: 40px;">教代会代表证</van-button>
|
||||
<van-button @click="showCard('gdh')">工代会代表证</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async showCard(type) {
|
||||
//先查看当前登录用户是不是代表
|
||||
const resp = await $.post('/platform/card/isDb', {type: type})
|
||||
if(resp.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
})
|
||||
return
|
||||
}
|
||||
//获取代表证
|
||||
vant.ImagePreview(['/platform/card/showCard?type=' + type])
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,377 +0,0 @@
|
||||
<!--#
|
||||
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-radius: 8px;
|
||||
width: 60px !important;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.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: 90%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 60px;
|
||||
}
|
||||
|
||||
.userPopup .van-cell {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
.van-radio-group {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.van-cell-group__title {
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
</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.radioType" :options="auditOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.clubId" :options="clubOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.userType" :options="userTypeOptions"
|
||||
@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)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.username}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">社团名称:</span>
|
||||
<span>{{o.clubname}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">工  号:</span>
|
||||
<span>{{o.loginname}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">所属单位:</span>
|
||||
<span>{{o.unitname}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">申请时间:</span>
|
||||
<span>{{o.join_time}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="openView(o)"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">
|
||||
查看
|
||||
</van-button>
|
||||
<van-button @click.stop="openAudit(o)"
|
||||
v-if="o.status == 1 || o.status == 3"
|
||||
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-popup v-model="infoShow" position="right" :style="{width: '100%', height: '100%' }">
|
||||
<van-nav-bar
|
||||
title="详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
<club-user-apply-info ref="applyInfo" :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="12">
|
||||
<van-button :color="themeColor" plain block @click="doReview(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doReview(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</club-user-apply-info>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: false,
|
||||
clubOptions: [],
|
||||
userTypeOptions: [],
|
||||
auditOptions: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '已审核', value: 2},
|
||||
{text: '未审核', value: 3},
|
||||
],
|
||||
pageForm: {
|
||||
radioType: 3
|
||||
},
|
||||
infoShow: false,
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'club-user-apply-info': httpVueLoader('/components/mobile/club/mobileClubUserApplyInfo.vue?v=1.0.1'),
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openAudit(row) {
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditOpinion: null,
|
||||
auditSign: ""
|
||||
}
|
||||
this.infoShow = true
|
||||
this.handle = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.applyInfo.getInfo(row.id)
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.handle = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.applyInfo.getInfo(row.id)
|
||||
})
|
||||
},
|
||||
async doReview(flag) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
vant.Toast('请填写审核意见');
|
||||
return
|
||||
}
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签字')
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
this.formData.flag = flag
|
||||
const resp = await $.post("/platform/sys/club/sh/check", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/sys/club/sh/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 getMyMangeClub() {
|
||||
const {data} = await $.get("/platform/sys/club/users/getMyMangeClub")
|
||||
return data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const data = await this.getMyMangeClub()
|
||||
data.forEach(item => {
|
||||
this.clubOptions.push({text: item.name, value: item.id})
|
||||
})
|
||||
this.clubOptions.unshift({text: '全部社团'})
|
||||
const userType = await getDictOptions('UserType')
|
||||
userType.forEach(item => {
|
||||
this.userTypeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.userTypeOptions.unshift({text: '人员类型'})
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,474 +0,0 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.van-cell__title, .van-cell__value{
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.van-cell__value {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
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;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
</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>
|
||||
|
||||
<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>
|
||||
<span>{{o.fzr_mobile}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">会  长:</span>{{o.hz}}</van-col>
|
||||
<van-col span="12">
|
||||
<span style="color: grey">成立时间:</span>
|
||||
<span>{{moment(o.foundTime).format('YYYY-MM-DD')}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click="openInfo(o, 'view')" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
查看
|
||||
</van-button>
|
||||
<van-button @click="rollback(o)" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary"
|
||||
v-if="pageForm.isjr === true && (o.status==1 || o.status==3)">撤销申请
|
||||
</van-button>
|
||||
<van-button @click="openInfo(o, 'join')"
|
||||
color="#1867b0" v-if="pageForm.isjr === false"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
我要加入
|
||||
</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="infoShow" get-container="#app" position="right" :style="{ height: '100%', width: '100%' }">
|
||||
<van-nav-bar
|
||||
title="社团详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false"
|
||||
safe-area-inset-top></van-nav-bar>
|
||||
<van-tabs v-model="infoActive">
|
||||
<van-tab title="社团信息">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="社团名称">{{ detailData.name }}</van-cell>
|
||||
<van-cell title="成立时间">{{ detailData.foundtime }}</van-cell>
|
||||
<van-cell title="报名联系人">{{ detailData.fzrname }}</van-cell>
|
||||
<van-cell title="所属单位">{{ detailData.fzr_unit_name }}</van-cell>
|
||||
<van-cell title="联系人电话">{{ detailData.concatpersonmobile }}</van-cell>
|
||||
<van-cell title="联系人邮箱">{{ detailData.concatpersonemail }}</van-cell>
|
||||
<van-cell title="会费标准">{{ detailData.dues_standard }}</van-cell>
|
||||
<van-cell title="当前人数">{{ detailData.cynum }}</van-cell>
|
||||
<van-cell title="QQ群二维码" @click="showCode('QQ')">
|
||||
<span style="cursor: pointer; color: #236eb4">点击查看</span>
|
||||
</van-cell>
|
||||
<van-cell title="微信群二维码" @click="showCode('weChat')">
|
||||
<span style="cursor: pointer; color: #236eb4">点击查看</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
<van-tab v-if="viewType === 'join'" title="个人信息">
|
||||
<van-form @submit="needJoin" ref="form" :show-error-message="false">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly v-model="formData.username" name="username"
|
||||
label="姓名" :rules="[{ required: true }]"></van-field>
|
||||
<van-field readonly v-model="formData.sex" name="sex"
|
||||
label="性别" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.birthday" name="birthday" required
|
||||
@click="showPicker = true"
|
||||
placeholder="请填写出生年月" label="出生年月" :rules="[{ required: true }]">
|
||||
</van-field>
|
||||
<van-popup v-model="showPicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
title="选择年月日"
|
||||
@confirm="(val) => {formData.birthday = moment(val).format('YYYY-MM-DD'); showPicker = false}"
|
||||
@cancel="showPicker = false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
<van-field v-model="formData.birthPlace" name="birthPlace" required
|
||||
placeholder="请填写出生地" label="出生地" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.education" name="education" required
|
||||
placeholder="请填写文化程度" label="文化程度" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.hobby" name="hobby" required
|
||||
placeholder="请填写爱好" label="爱好" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.unitName" name="unitName" required
|
||||
readonly label="工作部门" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.position" name="position" required
|
||||
placeholder="请填写职务" label="职务" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.mobile" name="mobile" required
|
||||
placeholder="请填写电话" label="电话" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.email" name="email" required
|
||||
placeholder="请填写电子邮箱" label="电子邮箱" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.homeAddress" name="homeAddress" required
|
||||
placeholder="请填写家庭住址" label="家庭住址" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.QQNumber" name="QQNumber" required
|
||||
placeholder="请填写QQ" label="QQ" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.bodyHeight" name="bodyHeight" required
|
||||
placeholder="请填写身高" label="身高" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.bodyWeight" name="bodyWeight" required
|
||||
placeholder="请填写体重" label="体重" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.health" name="health" required
|
||||
placeholder="请填写身体状况" label="身体状况" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.sport" name="sport" required
|
||||
placeholder="请填写经常从事的运动" label="经常从事的运动" :rules="[{ required: true }]"></van-field>
|
||||
<van-field name="medicalHistory" required
|
||||
placeholder="是否有过特殊病史" label="是否有过特殊病史">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.medicalHistory" direction="horizontal">
|
||||
<van-radio :name="true">是</van-radio>
|
||||
<van-radio :name="false">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="joinActivity" required
|
||||
placeholder="是否愿意参加本协会的活动" label="是否愿意参加本协会的活动">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.joinActivity" direction="horizontal">
|
||||
<van-radio :name="true">是</van-radio>
|
||||
<van-radio :name="false">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-model="formData.otherThing" name="otherThing"
|
||||
rows="1"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="是否有特别需要说明的问题(身体或心理)" label="是否有特别需要说明的问题"></van-field>
|
||||
<van-field v-model="formData.remark" name="remark"
|
||||
rows="1"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="备注" label="备注"></van-field>
|
||||
<van-field name="photo" label="两寸登记照" required
|
||||
style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">两寸登记照</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload
|
||||
:max="1"
|
||||
:files.sync="formData.photo"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit" native-type="submit">申请加入</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
showPicker: false,
|
||||
infoActive: 0,
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
clubType: [{text: '未加入', value: false}, {text: '已加入', value: true}],
|
||||
infoShow: false,
|
||||
detailData: {},
|
||||
viewType: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showCode(type) {
|
||||
if(type === 'QQ' && this.clickRow.qqgroupcode) {
|
||||
const ids = JSON.parse(this.clickRow.qqgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
||||
vant.ImagePreview({images: ids})
|
||||
} else if(type === 'weChat' && this.clickRow.wechatgroupcode) {
|
||||
const ids = JSON.parse(this.clickRow.wechatgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
||||
vant.ImagePreview({images: ids})
|
||||
}
|
||||
},
|
||||
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
|
||||
})
|
||||
},
|
||||
openInfo(row, type) {
|
||||
this.viewType = type
|
||||
this.infoActive = type === 'view' ? 0 : 1
|
||||
if(type === 'join') {
|
||||
this.formData = {
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
||||
birthPlace: "${@shiro.getPrincipalProperty('birthPlace')}",
|
||||
education: "${@shiro.getPrincipalProperty('education')}",
|
||||
hobby: "${@shiro.getPrincipalProperty('hobby')}",
|
||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
position: "${@shiro.getPrincipalProperty('position')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
email: "${@shiro.getPrincipalProperty('email')}",
|
||||
homeAddress: "${@shiro.getPrincipalProperty('homeAddress')}",
|
||||
}
|
||||
}
|
||||
this.clickRow = row
|
||||
$.get("/platform/sys/club/mange/findOne", {id: row.id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.detailData = data.data
|
||||
this.infoShow = true
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async needJoin() {
|
||||
const row = this.clickRow
|
||||
if(this.formData.medicalHistory === '' || this.formData.medicalHistory === undefined || this.formData.medicalHistory === null) {
|
||||
vant.Toast('请选择是否有过特殊病史')
|
||||
return
|
||||
}
|
||||
if(this.formData.joinActivity === '' || this.formData.joinActivity === undefined || this.formData.joinActivity === null) {
|
||||
vant.Toast('请选择是否愿意参加本协会的活动')
|
||||
return
|
||||
}
|
||||
if(this.formData.photo === '' || this.formData.photo === undefined || this.formData.photo === null) {
|
||||
vant.Toast('请上传两寸登记照')
|
||||
return
|
||||
}
|
||||
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 += ','
|
||||
}
|
||||
str += '请确认是否申请加入【' + row.name + '】?'
|
||||
vant.Dialog.confirm({title: '提示', message: str,}).then(() => {
|
||||
this.formData.clubid = row.id
|
||||
this.formData.photo = this.formData.photo[0].filepath
|
||||
$.post("/platform/sys/club/sq/submit", this.formData, (data) => {
|
||||
if (data.code === 0) {
|
||||
vant.Toast(data.msg)
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
} 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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,382 +0,0 @@
|
||||
<!--#
|
||||
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: 90%;
|
||||
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
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="校工会审核"
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入社团名称进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="typeOptions" @change="doSearch"
|
||||
v-model="pageForm.clubType"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false" @load="onLoad"
|
||||
v-model="loading"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @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.number}}人</van-col>
|
||||
<van-col span="12"><span style="color: grey">当前人数:</span>{{o.people_num}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col class="cus_overflow" span="24">
|
||||
<span style="color: grey">介绍链接:</span>
|
||||
<span @click.stop="window.open(o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href)"
|
||||
style="color: #236eb4">{{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"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">已审{{o.has_audit}}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">未审{{o.no_audit}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet @close="popClose" class="userPopup" title="申请人员列表" v-model:show="userShow">
|
||||
<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 size="large" type="primary">全选</van-tag>
|
||||
<van-tag @click="toggleAll()" plain size="large" style="margin-left: 6px" type="primary">反选
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group ref="checkboxGroup" v-if="userList !== null" v-model="result">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
:key="obj.id"
|
||||
@click="toggle(index)" class="cus_cell"
|
||||
clickable
|
||||
v-for="(obj, index) in userList">
|
||||
|
||||
<div><span style="color: grey">姓  名:</span>{{obj.username}}</div>
|
||||
<div><span style="color: grey">工  号:</span>{{obj.loginname}}</div>
|
||||
<div><span style="color: grey">单  位:</span>{{obj.unitname}}</div>
|
||||
<div><span style="color: grey">性  别:</span>{{obj.sex}}</div>
|
||||
<div><span style="color: grey">联系方式:</span>{{obj.mobile}}</div>
|
||||
<!--<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"
|
||||
name="passed"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === true"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
name="close"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === false"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
<div style="margin-top: 4px; text-align: center" v-else>暂无申请人员</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<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 style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<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>
|
||||
var 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: 2,
|
||||
})
|
||||
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',
|
||||
type: 2,
|
||||
})
|
||||
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',
|
||||
type: 2,
|
||||
})
|
||||
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
|
||||
this.pageForm.type = 2
|
||||
$.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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,516 +0,0 @@
|
||||
<!--#
|
||||
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-field v-model="formData.mobile" name="mobile" type="tel"
|
||||
label="联系电话" placeholder="输入慰问对象后自动获取" maxlength="11" required
|
||||
:rules="[{ required: true, message: '请输入慰问对象联系电话' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码' }]"></van-field>
|
||||
|
||||
<van-action-sheet v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = [];formData.be_user_name=null;"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect">
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field @input="payeeUserRemoteMethod" name="payee_name"
|
||||
required
|
||||
v-model="formData.payee_name" label="收款人" placeholder="请输入收款人"
|
||||
:rules="[{ required: true, message: '请填写收款人' }]"></van-field>
|
||||
|
||||
<van-action-sheet v-model="payeeSheetShow"
|
||||
:actions="payeeUserList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="payeeOnCancel"
|
||||
: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="请输入收款人银行卡" required
|
||||
:rules="[{ required: true, message: '请输入收款人银行卡' }]"></van-field>
|
||||
<van-field v-model="formData.payee_bank_name" name="payee_bank_name"
|
||||
label="收款人开户行" placeholder="请输入收款人开户行" required
|
||||
:rules="[{ required: true, message: '请输入收款人开户行' }]"></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="慰问金额" readonly
|
||||
placeholder="选择慰问类型自动匹配金额"
|
||||
: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>
|
||||
|
||||
<van-field v-if="formData.way === '慰问品 (C)'"
|
||||
v-model="formData.goods_desc" name="goods_desc" label="慰问品"
|
||||
placeholder="请输入选择的慰问品的名称、编号、规格等" required
|
||||
:rules="[{ required:true, message: '请输入慰问品名称、编号、规格等' }]">
|
||||
<template #button>
|
||||
<van-button size="small" type="primary" @click.stop="previewGoodsAlbum">预览</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<!--生育(孩次),与 PC 端保持相同的类型显示逻辑。-->
|
||||
<van-field v-if="formData.type === '29cf78eea88d40128f639b9ae7b6aaaa'"
|
||||
readonly clickable required
|
||||
:value="formData.birth_child_num"
|
||||
name="birth_child_num" label="孩次"
|
||||
placeholder="请选择孩次"
|
||||
@click="showChildPicker = true"
|
||||
:rules="[{ required:true, message: '请选择孩次' }]">
|
||||
</van-field>
|
||||
<van-popup v-model:show="showChildPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="childColumns" @confirm="onChildConfirm"
|
||||
@cancel="showChildPicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<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-if="['0872ea0b95aa463fb8d98c46bdf72537'].includes(formData.type)"
|
||||
v-model="formData.inpatientSurgicalName"
|
||||
name="inpatientSurgicalName" label="手术名称"
|
||||
placeholder="请填写手术名称"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写手术名称' }]">
|
||||
</van-field>
|
||||
|
||||
<!--直系亲属去世-->
|
||||
<van-field v-if="['925020dd63754aaea985c5672982a7f4'].includes(formData.type)"
|
||||
v-model="formData.deadImmediateFamily"
|
||||
name="deadImmediateFamily" label="直系亲属"
|
||||
placeholder="配偶、父亲、母亲、子女"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写直系亲属' }]">
|
||||
</van-field>
|
||||
|
||||
<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">
|
||||
<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>
|
||||
<div v-if="uploadFileDesc" class="text-danger" style="color: #da3e16;">上传附件说明:{{uploadFileDesc}}</div>
|
||||
</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="display: flex; gap: 10px; margin: 20px 20px 10px 20px">
|
||||
<van-button @click="saveDraft()" style="border-radius: 10px; flex: 1" block plain type="primary"
|
||||
:color="themeColor" text="保存"></van-button>
|
||||
<van-button @click="onSubmit()" style="border-radius: 10px; flex: 1" block type="info"
|
||||
:color="themeColor">
|
||||
提交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
goods: [],
|
||||
payeeSheetShow: false,
|
||||
payeeUserList: [],
|
||||
hospital_stay: false,
|
||||
userList: [],
|
||||
formData: {
|
||||
mobile: '',
|
||||
goodsAlbum: [],
|
||||
goods_desc: ''
|
||||
},
|
||||
showTypePicker: false,
|
||||
showWayPicker: false,
|
||||
showChildPicker: false,
|
||||
sheetShow: false,
|
||||
typeColumns: [],
|
||||
wayColumns: [],
|
||||
childColumns: [
|
||||
{value: '一孩', text: '一孩'},
|
||||
{value: '二孩', text: '二孩'},
|
||||
{value: '三孩', text: '三孩'}
|
||||
],
|
||||
files: [],
|
||||
showOccurTime: false,
|
||||
// minDate: moment().subtract(5, 'year')._d,
|
||||
minDate: new Date(2010, 1, 1),
|
||||
maxDate: new Date(),
|
||||
money: 0,
|
||||
uploadFileDesc: '',
|
||||
editId: ''
|
||||
}
|
||||
},
|
||||
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?v=' + new Date().getTime()),
|
||||
},
|
||||
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
|
||||
},
|
||||
// 选择慰问对象后读取其联系电话,避免提交时使用申请人的手机号。
|
||||
async getUserData(userId) {
|
||||
if (!userId) {
|
||||
return {}
|
||||
}
|
||||
const {data} = await $.get("/platform/fw/condolence/apply/getUserData", {userId})
|
||||
return data || {}
|
||||
},
|
||||
async onUserSelect(u) {
|
||||
this.$set(this.formData, 'be_user', u.id)
|
||||
this.$set(this.formData, 'be_user_name', u.name)
|
||||
const userData = await this.getUserData(u.id)
|
||||
this.$set(this.formData, 'mobile', userData.mobile || '')
|
||||
this.sheetShow = false
|
||||
},
|
||||
payeeOnCancel(){
|
||||
if (!this.formData.payee){
|
||||
this.$set(this.formData, 'payee_name', '')
|
||||
}
|
||||
this.payeeUserList = []
|
||||
},
|
||||
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;
|
||||
},
|
||||
onChildConfirm(val) {
|
||||
this.$set(this.formData, "birth_child_num", val.value)
|
||||
this.showChildPicker = false
|
||||
},
|
||||
async moneyChange(id) {
|
||||
const {data, code, msg} = await $.get("/platform/condolence/type/findOne", {id})
|
||||
if (data) {
|
||||
// 编辑回填时先同步金额上限,避免金额监听器因上限仍为 0 将金额重置为 0。
|
||||
this.$set(this, "money", data.money)
|
||||
this.$set(this.formData, "money", data.money)
|
||||
this.$set(this.formData, "wayName", data.way)
|
||||
this.$set(this.formData, "way", data.way)
|
||||
this.$set(this.formData, "goodsAlbum", data.goodsAlbum || [])
|
||||
this.$set(this, "uploadFileDesc", data.uploadFileDesc || '')
|
||||
}
|
||||
},
|
||||
// 预览慰问品画册,未配置 PDF 时给出明确提示。
|
||||
previewGoodsAlbum() {
|
||||
const goodsAlbum = this.formData.goodsAlbum
|
||||
if (!goodsAlbum || !goodsAlbum.length) {
|
||||
vant.Toast('暂无慰问品画册')
|
||||
return
|
||||
}
|
||||
const pdfStreamUrl = encodeURIComponent(FILE_STREAM_PREVIEW_ADDRESS + '?id=' + goodsAlbum[0].id)
|
||||
window.location.href = '/mobile/condolence/apply/preview?file=' + pdfStreamUrl
|
||||
},
|
||||
async loadEditData(id) {
|
||||
const resp = await $.get('/platform/fw/condolence/findOne', {id: id})
|
||||
if (!resp.data) {
|
||||
this.$toast.fail('获取申请信息失败')
|
||||
return
|
||||
}
|
||||
const data = resp.data
|
||||
condolence.toFormData(data)
|
||||
this.$set(data, 'typeName', data.typename)
|
||||
this.$set(data, 'wayName', data.way)
|
||||
this.$set(data, 'be_user_name', data.be_username)
|
||||
this.$set(data, 'payee_name', data.payee_username)
|
||||
// 编辑时回填当前申请保存的签字图片,交由签字组件导入画布。
|
||||
this.$set(data, 'sign', data.manager_sign_data || '')
|
||||
this.$set(data, 'goods', data.Goods || data.goods || [])
|
||||
if (data.starting_time && data.end_time) {
|
||||
this.$set(data, 'hospital_stay', data.starting_time + '-' + data.end_time)
|
||||
this.$set(data, 'hospital_stay_1', data.starting_time)
|
||||
this.$set(data, 'hospital_stay_2', data.end_time)
|
||||
}
|
||||
// 先设置金额上限,再回填表单,避免金额监听器使用初始值 0 校验编辑数据。
|
||||
const typeResp = await $.get('/platform/condolence/type/findOne', {id: data.type})
|
||||
if (typeResp.data) {
|
||||
this.$set(this, 'money', typeResp.data.money)
|
||||
}
|
||||
this.$set(this, 'formData', data)
|
||||
this.$set(this, 'goods', data.goods || [])
|
||||
this.$set(this, 'editId', id)
|
||||
await this.moneyChange(data.type)
|
||||
// 编辑数据和签字画布均为异步初始化,下一次渲染后再次导入原申请签字,确保画布完成回显。
|
||||
if (data.manager_sign_data) {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.signature) {
|
||||
this.$refs.signature.importSign(data.manager_sign_data)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.formData.files) {
|
||||
vant.Toast('请上传附件材料!')
|
||||
return
|
||||
}
|
||||
// 签字组件不是 Vant 原生表单控件,提交前单独校验画布,避免空签字绕过表单校验。
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
this.$toast.fail('请签字!')
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
/* if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
await this.$refs.signature.updateSign()
|
||||
const formData = clone(this.formData)
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
formData.goods = this.goods
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
this.$toast.loading('提交中...')
|
||||
const url = this.editId ? '/platform/fw/condolence/apply/doEdit' : '/platform/fw/condolence/apply/doAdd'
|
||||
const res = await $.post(url, {
|
||||
data: JSON.stringify(formData),
|
||||
sign: formData.sign,
|
||||
hospital_stay_1: formData.hospital_stay_1,
|
||||
hospital_stay_2: formData.hospital_stay_2
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(this.editId ? '修改成功' : '申请成功');
|
||||
setTimeout(() => {
|
||||
|
||||
location.replace('/mobile/condolence/apply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
async saveDraft() {
|
||||
// 保存草稿前先读取当前画布签字,否则签字只停留在画布中,不会写入申请数据。
|
||||
if (this.$refs.signature) {
|
||||
this.$refs.signature.submitSign()
|
||||
}
|
||||
const formData = clone(this.formData)
|
||||
formData.files = JSON.stringify(formData.files || [])
|
||||
formData.goods = this.goods
|
||||
this.$toast.loading({message: '保存中...', forbidClick: true})
|
||||
const res = await $.post('/platform/fw/condolence/apply/doSave', {
|
||||
data: JSON.stringify(formData),
|
||||
sign: formData.sign || '',
|
||||
hospital_stay_1: formData.hospital_stay_1,
|
||||
hospital_stay_2: formData.hospital_stay_2
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('保存成功')
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/condolence/apply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '保存失败')
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
// 新增申请加载用户默认签字,编辑申请由详情数据回填原申请签字。
|
||||
if (this.$refs.signature && !GetQueryString('id')) {
|
||||
this.$refs.signature.getMySign()
|
||||
}
|
||||
})
|
||||
},
|
||||
async created() {
|
||||
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]})
|
||||
}
|
||||
const id = GetQueryString('id')
|
||||
if (id) {
|
||||
await this.loadEditData(id)
|
||||
} else {
|
||||
this.$set(this.formData, 'apply_time', moment().format('YYYY-MM-DD'))
|
||||
}
|
||||
}
|
||||
})
|
||||
</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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,38 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var 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()),
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
this.state_id = GetQueryString('state_id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,219 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.list-card {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px 0 20px;
|
||||
overflow: hidden;
|
||||
background-color: #ffffff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.apply_btn {
|
||||
animation: come .5s;
|
||||
position: fixed;top: 20%;right: 0
|
||||
}
|
||||
|
||||
.apply-card-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
border-top: 1px solid #eeeeee;
|
||||
margin: 0 16px;
|
||||
padding: 10px 0 4px;
|
||||
}
|
||||
|
||||
.apply-card-actions .action-btn {
|
||||
margin-left: 10px;
|
||||
padding: 4px 2px;
|
||||
color: #1989fa;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.apply-card-actions .action-btn.delete {
|
||||
color: #ee0a24;
|
||||
}
|
||||
|
||||
.apply-card-actions .action-btn .fa {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
@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)">
|
||||
<van-cell-group>
|
||||
<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 class="apply-card-actions" @click.stop>
|
||||
<div class="action-btn" @click.stop="openInfo(o)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click.stop="openEdit(o)" v-if="canEdit(o)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click.stop="doDelete(o)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
visible: true,
|
||||
typeOption: [
|
||||
{value: null, text: '全部'}
|
||||
],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
// 首次加载时直接携带当前年份,避免列表组件先于 created 回调发起无年份条件的查询。
|
||||
year: new Date().getFullYear(),
|
||||
type: null
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openApply() {
|
||||
window.location.href = '/mobile/condolence/apply/for'
|
||||
},
|
||||
openInfo(row) {
|
||||
window.location.href = '/mobile/condolence/apply/info?id=' + row.id + '&state_id=' + row.state_id
|
||||
},
|
||||
openEdit(row) {
|
||||
window.location.href = '/mobile/condolence/apply/for?id=' + row.id
|
||||
},
|
||||
// 编辑权限与详情页保持一致,退回修改和可编辑的初始状态才显示编辑按钮。
|
||||
canEdit(row) {
|
||||
return [-1, 1990, 1995, 2000, 2010, 2012].includes(Number(row.state_id))
|
||||
},
|
||||
async doDelete(row) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定要删除吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/platform/fw/condolence/doDelete', {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('删除成功')
|
||||
this.$set(this, 'tableData', this.tableData.filter(item => item.id !== row.id))
|
||||
} else {
|
||||
this.$toast.fail(resp.msg || '删除失败')
|
||||
}
|
||||
}
|
||||
},
|
||||
yearChange(val) {
|
||||
this.$set(this.pageForm, 'year', val)
|
||||
this.onRefresh()
|
||||
},
|
||||
typeChange(val) {
|
||||
this.$set(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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,152 +0,0 @@
|
||||
<!--#
|
||||
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.go(-1)"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu :active-color="themeColor">
|
||||
<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>
|
||||
var 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()
|
||||
if (GetQueryString("audit") === '1') {
|
||||
this.pageForm.isAudit = true
|
||||
}
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.init()
|
||||
vue.yearChange()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,141 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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)
|
||||
|
||||
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('审核成功')
|
||||
setTimeout(() => {
|
||||
window.history.back()
|
||||
}, 1000)
|
||||
} else {
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,34 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问品画册" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<iframe v-if="pdfUrl" :src="pdfUrl"
|
||||
style="width: 100%; height: calc(100vh - 46px); border: 0; display: block;"></iframe>
|
||||
<van-empty v-else description="暂无预览文件"></van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pdfUrl: ''
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const file = GetQueryString('file')
|
||||
if (file) {
|
||||
// 预览地址通过参数传入,使用当前页面 iframe 承载 PDF.js,保留应用返回导航。
|
||||
this.$set(this, 'pdfUrl', '/assets/platform/plugins/pdfJs/web/viewer.html?file=' + file)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,136 +0,0 @@
|
||||
<!--#
|
||||
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 mt10">
|
||||
<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="red" block plain @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>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue?v=' + new Date().getTime()),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
// 审核签字由独立画布维护,不能只依赖 van-field 的 required 属性。
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
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)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
history.back()
|
||||
}, 1000)
|
||||
} else {
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,137 +0,0 @@
|
||||
<!--#
|
||||
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 mt10">
|
||||
<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>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue?v=' + new Date().getTime()),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
// 审核签字由独立画布维护,不能只依赖 van-field 的 required 属性。
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
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)
|
||||
if (resp.code === 0) {
|
||||
await doCompletes();
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
history.back()
|
||||
}, 1000)
|
||||
} else {
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,227 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list-item .left-img {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-item .right-content {
|
||||
flex: 2;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.right-content {
|
||||
height: 90px;
|
||||
width: calc(100% - 130px);
|
||||
}
|
||||
|
||||
.right-content > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.right-content .r-title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.right-content .r-content {
|
||||
font-size: 13px;
|
||||
color: #7f8481;
|
||||
}
|
||||
|
||||
.avatar .van-image__img {
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.list-card {
|
||||
margin: 10px 10px;
|
||||
}
|
||||
|
||||
|
||||
.list-card .van-cell {
|
||||
border-radius: 10px;
|
||||
padding: 18px 16px;
|
||||
}
|
||||
|
||||
.van-cell-group {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
</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 style="margin: 20px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="isNullTypeCodeData.length>0?'没有更多了':''">
|
||||
<div class="list-card" @click="openContribution(o)" v-for="o in isNullTypeCodeData">
|
||||
<van-cell-group>
|
||||
<van-cell :border="false">
|
||||
<div class="list-item">
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionFiles[0].id"
|
||||
></van-image>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="r-title">{{o.contributionName}}</div>
|
||||
<div class="van-ellipsis r-content">
|
||||
{{removeHTMLTag(o.contributionIntroduce)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-row type="flex" justify="space-between"
|
||||
style="white-space: nowrap">
|
||||
<van-col span="12">
|
||||
已筹:
|
||||
<sapn style="color: red">
|
||||
{{o.totalMoney?o.totalMoney:0}}
|
||||
</sapn>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="12" class="text-right">
|
||||
人次:
|
||||
<sapn style="color: red">{{o.totalUser}}</sapn>
|
||||
人
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-for="o in contributionTypeData" class="list-card" @click="openContribution(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false">
|
||||
<div class="list-item">
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionTypeFiles[0].id"
|
||||
></van-image>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="r-title">{{o.typeName}}
|
||||
<van-tag type="danger" round>专题</van-tag>
|
||||
</div>
|
||||
<div class="van-ellipsis r-content">
|
||||
{{removeHTMLTag(o.contributionTypeIntroduce)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-row type="flex" justify="space-between">
|
||||
<van-col span="24">
|
||||
子项目数:
|
||||
<sapn style="color: red">{{o.sonNum}}</sapn>
|
||||
个
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&isNullTypeCodeData.length==0&&contributionTypeData.length==0"
|
||||
class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
isNullTypeCodeData: [],
|
||||
contributionTypeData: [],
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openContribution(data) {
|
||||
const time = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
if (!data.sonNum) {
|
||||
if (time < data.contributionStartTime) {
|
||||
this.$toast(data.contributionStartTime + '开始捐款');
|
||||
return;
|
||||
}
|
||||
if (time > data.contributionEndTime) {
|
||||
this.$toast('捐款在' + data.contributionEndTime + '结束');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (data.contributionTypeCode == null && data.sonNum == 0) {
|
||||
window.location.href = '/mobile/contribution/view/contributionView?id=' + data.id
|
||||
} else if (data.sonNum > 0 && data.typeCode) {
|
||||
window.location.href = '/mobile/contribution/son/sonList?typeCode=' + data.typeCode
|
||||
} else {
|
||||
this.$toast('暂无项目');
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
async isNullTypeCodePageData() {
|
||||
const {data} = await $.post("/mobile/contribution/isNullTypeCodePageData")
|
||||
data.forEach(v => {
|
||||
v.sonNum = 0
|
||||
v.contributionFiles = JSON.parse(v.contributionFiles)
|
||||
})
|
||||
this.isNullTypeCodeData = data
|
||||
},
|
||||
async pageData() {
|
||||
await this.isNullTypeCodePageData()
|
||||
const {data} = await $.get("/mobile/contribution/getContributionTypeData")
|
||||
data.forEach(v => {
|
||||
v.contributionTypeCode = v.typeCode
|
||||
v.contributionTypeFiles = JSON.parse(v.contributionTypeFiles)
|
||||
})
|
||||
this.contributionTypeData = data
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,147 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.bth {
|
||||
bottom: 10px;
|
||||
width: 90%;
|
||||
position: fixed;
|
||||
transform: translateX(-50%);
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
.backdrop {
|
||||
width: 100%;
|
||||
height: 170px;
|
||||
}
|
||||
|
||||
.typeName {
|
||||
margin-left: 10px;
|
||||
height: 70px;
|
||||
|
||||
}
|
||||
|
||||
.typeName .typeNameLabel {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.con-col {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.con-introduce {
|
||||
border-top-left-radius: 30px;
|
||||
border-top-right-radius: 30px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 50px;
|
||||
padding-bottom: 10px;
|
||||
height: calc(100% - 250px);
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
|
||||
</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>
|
||||
<div style="background-color:#ffffff;">
|
||||
<van-image
|
||||
class="backdrop"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + viewData.contributionFiles[0].id"
|
||||
></van-image>
|
||||
<div class="typeName">
|
||||
<div class="typeNameLabel">{{viewData.contributionName}}</div>
|
||||
<van-row>
|
||||
<van-col span="12" class="con-col">
|
||||
<div>已筹</div>
|
||||
<div style="color: red">{{viewData.totalMoney?viewData.totalMoney:0}}</div>
|
||||
</van-col>
|
||||
<van-col span="12" class="con-col">
|
||||
<div>人次</div>
|
||||
<div style="color: red">{{viewData.totalUser}}</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="con-introduce">
|
||||
<van-cell-group style=" border-top-left-radius: 30px; border-top-right-radius: 30px;">
|
||||
<van-cell style=" border-top-left-radius: 30px; border-top-right-radius: 30px;">
|
||||
<template #title>
|
||||
<span class="custom-title">项目介绍</span>
|
||||
<span v-if="viewData.contributionMode==='sdc'" style="color: red">(捐款方式为水滴筹将直接跳转放到相应页面)</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
<div v-html="viewData.contributionIntroduce"
|
||||
style="margin: 15px;white-space: pre-wrap;word-break: break-word;"></div>
|
||||
|
||||
|
||||
</div>
|
||||
<div style="position: fixed;width: 100%;bottom: 0px;height: 60px">
|
||||
<van-button type="info" class="bth" block round @click="doContribution"
|
||||
v-if="viewData.isContributionEnable" :color="themeColor">我要捐款
|
||||
</van-button>
|
||||
<van-button type="info" class="bth" block round
|
||||
v-if="!viewData.isContributionEnable">暂未开放
|
||||
</van-button>
|
||||
</div>
|
||||
<!-- <van-row>
|
||||
<van-col span="24">
|
||||
|
||||
</van-col>
|
||||
|
||||
</van-row>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doContribution() {
|
||||
if (this.viewData.contributionMode === 'sdc') {
|
||||
window.location.href = this.viewData.contributionUrl
|
||||
} else {
|
||||
window.location.href = '/mobile/contribution/doContribution?id=' + this.viewData.id
|
||||
}
|
||||
},
|
||||
async getContributionById(id) {
|
||||
const {data} = await $.post("/mobile/contribution/getContributionById", {id: id})
|
||||
data.contributionFiles = JSON.parse(data.contributionFiles)
|
||||
this.viewData = data
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = this.GetQueryString("id")
|
||||
this.getContributionById(id)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,208 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.bth {
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
height: 45px;
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.van-tag--large {
|
||||
height: 30px;
|
||||
width: 60px;
|
||||
font-size: 25px;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.van-cell-group {
|
||||
margin: 10px 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
<van-form @submit="onSubmit">
|
||||
|
||||
<van-cell-group>
|
||||
<van-row type="flex" gutter="20">
|
||||
<van-col span="8" v-for="key in moneyData" @click="dateClick(key)"
|
||||
style="text-align: center;border-radius: 20px;">
|
||||
<van-tag :plain="activeDate!=key" size="large" type="primary">
|
||||
<div style="position: absolute;left: 0;right: 0">{{key}}</div>
|
||||
</van-tag>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<div class="van-hairline--top">
|
||||
<van-field v-model="formData.money" label="捐赠金额" type="number" input-align="right"
|
||||
placeholder="请输入捐赠金额" @input="moneyInput">
|
||||
<template #button>
|
||||
元
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-field v-model="formData.username" label="真实姓名:" input-align="right" readonly>
|
||||
</van-field>
|
||||
<van-field v-model="formData.loginname" label="真实工号:" input-align="right" readonly>
|
||||
</van-field>
|
||||
<van-field v-model="formData.mobile" label="联系电话:" input-align="right"
|
||||
placeholder="请输入手机号或电话号">
|
||||
</van-field>
|
||||
|
||||
</van-cell-group>
|
||||
<van-radio-group v-model="formData.payMode">
|
||||
<van-cell-group>
|
||||
<van-cell title="微信支付" clickable @click="formData.payMode = 'WeChat'"
|
||||
icon="/assets/mobile/svg/wx.png">
|
||||
<template #right-icon>
|
||||
<van-radio name="WeChat"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="支付宝支付" clickable @click="formData.payMode = 'Alipay'"
|
||||
icon="/assets/mobile/svg/zfb.png">
|
||||
<template #right-icon>
|
||||
<van-radio name="Alipay"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
|
||||
<van-cell-group>
|
||||
<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.contributionFiles"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<div class="bth">
|
||||
<van-row style="display: flex;padding-left: 15px;" type="flex" justify="space-between">
|
||||
<van-col span="16" style="align-self:center;">合计:
|
||||
<sapn style="color: red">{{formData.money?formData.money:0}}</sapn>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="8" style="align-self:center;padding-right: 20px;">
|
||||
<van-button plain type="info" style="float: right;border-radius: 15px;"
|
||||
:color="themeColor">确认捐款
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
|
||||
</van-form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activeDate: null,
|
||||
moneyData: {
|
||||
70: 70,
|
||||
700: 700,
|
||||
7000: 7000,
|
||||
1952: 1952,
|
||||
1975: 1975,
|
||||
1987: 1987,
|
||||
},
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dateClick(key) {
|
||||
this.activeDate = key
|
||||
this.formData.money = key
|
||||
|
||||
},
|
||||
moneyInput(val) {
|
||||
this.$set(this.formData, "money", val)
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.formData.money) {
|
||||
this.$toast.fail('捐赠金额不能为空');
|
||||
return
|
||||
}
|
||||
if (!this.formData.contributionFiles) {
|
||||
this.$toast.fail('捐赠凭证不能为空');
|
||||
return
|
||||
}
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '请确认',
|
||||
message: '确认要为' + this.formData.contributionName + '捐款吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const data = await $.post("/mobile/contribution/doContributionApply", {contributionApply: JSON.stringify(this.formData)})
|
||||
if (data.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '捐赠成功,已收到您为“' + this.formData.contributionName + '”捐赠的善款',
|
||||
confirmButtonColor: '#1867b0'
|
||||
}).then(() => {
|
||||
window.history.back()
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async init(id) {
|
||||
const {data} = await $.post("/mobile/contribution/getContributionById", {id: id})
|
||||
this.formData = {
|
||||
contributionId: id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
payMode: "WeChat",
|
||||
money: null,
|
||||
contributionName: data.contributionName,
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = this.GetQueryString("id")
|
||||
this.init(id)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,210 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.backdrop {
|
||||
width: 100%;
|
||||
height: 170px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list-item .left-img {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-item .right-content {
|
||||
flex: 2;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.right-content {
|
||||
height: 90px;
|
||||
width: calc(100% - 130px);
|
||||
}
|
||||
|
||||
.right-content > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.right-content .r-title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.right-content .r-content {
|
||||
font-size: 13px;
|
||||
color: #7f8481;
|
||||
}
|
||||
|
||||
.typeName {
|
||||
margin-left: 10px;
|
||||
height: 70px;
|
||||
|
||||
}
|
||||
|
||||
.typeName .typeNameLabel {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.typeName .typeNameContent {
|
||||
font-size: 15px;
|
||||
color: #7f8481;
|
||||
}
|
||||
|
||||
.avatar .van-image__img {
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.list-card .van-cell {
|
||||
border-radius: 10px;
|
||||
padding: 18px 16px;
|
||||
}
|
||||
|
||||
.van-cell-group {
|
||||
border-radius: 10px;
|
||||
height: 130px;
|
||||
}
|
||||
</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 style=" background-color:#ffffff;">
|
||||
<van-image
|
||||
class="backdrop"
|
||||
fit="cover"
|
||||
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + typeData.contributionTypeFiles[0].id"
|
||||
></van-image>
|
||||
<div class="typeName">
|
||||
<div class="typeNameLabel">{{typeData.typeName}}
|
||||
<van-tag type="danger" round>专题</van-tag>
|
||||
</div>
|
||||
<div class="van-multi-ellipsis--l2 typeNameContent">
|
||||
{{removeHTMLTag(typeData.contributionTypeIntroduce)}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px auto 0 auto">
|
||||
<van-list :finished="finished">
|
||||
<div v-for="o in sonData" class="list-card" @click="openContribution(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false">
|
||||
<div class="list-item">
|
||||
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionFiles[0].id"
|
||||
></van-image>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="r-title">{{o.contributionName}}</div>
|
||||
<div class="van-ellipsis r-content">
|
||||
{{removeHTMLTag(o.contributionIntroduce)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-row type="flex" justify="space-between"
|
||||
style="white-space: nowrap">
|
||||
<van-col span="12">
|
||||
已筹:
|
||||
<sapn style="color: red">
|
||||
{{o.totalMoney?o.totalMoney:0}}
|
||||
</sapn>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="12" class="text-right">
|
||||
人次:
|
||||
<sapn style="color: red">{{o.totalUser}}</sapn>
|
||||
人
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sonData: [],
|
||||
typeData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openContribution(data) {
|
||||
const time = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
if (!data.sonNum) {
|
||||
if (time < data.contributionStartTime) {
|
||||
this.$toast(data.contributionStartTime + '开始捐款');
|
||||
return;
|
||||
}
|
||||
if (time > data.contributionEndTime) {
|
||||
this.$toast('捐款在' + data.contributionEndTime + '结束');
|
||||
return;
|
||||
}
|
||||
}
|
||||
window.location.href = '/mobile/contribution/view/contributionView?id=' + data.id
|
||||
},
|
||||
async pageData(typeCode) {
|
||||
const {data} = await $.get("/mobile/contribution/son/pageData", {typeCode: typeCode})
|
||||
data.forEach(v => {
|
||||
v.contributionFiles = JSON.parse(v.contributionFiles)
|
||||
})
|
||||
this.sonData = data
|
||||
},
|
||||
async getTypeByCode(typeCode) {
|
||||
const {data} = await $.get("/mobile/contribution/son/getTypeByCode", {typeCode: typeCode})
|
||||
this.typeData = data
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const typeCode = this.GetQueryString("typeCode")
|
||||
this.pageData(typeCode)
|
||||
this.getTypeByCode(typeCode)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,300 +0,0 @@
|
||||
<!--#
|
||||
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="formData.sqrusername"
|
||||
name="sqrusername"
|
||||
label="姓名"></van-field>
|
||||
<van-field readonly
|
||||
:value="formData.sqrloginname"
|
||||
name="sqrloginname"
|
||||
label="工号"></van-field>
|
||||
<van-field readonly
|
||||
:value="formData.sex"
|
||||
name="sex"
|
||||
label="性别"></van-field>
|
||||
<van-field readonly
|
||||
:value="formData.birthday"
|
||||
name="birthday"
|
||||
label="出生年月"></van-field>
|
||||
<van-field readonly
|
||||
:value="formData.lxfs"
|
||||
name="lxfs"
|
||||
label="联系电话"></van-field>
|
||||
<van-field readonly
|
||||
:value="formData.unitname"
|
||||
name="unitname"
|
||||
label="所在单位"></van-field>
|
||||
<van-field readonly
|
||||
:value="formData.unionname"
|
||||
name="unionname"
|
||||
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 name="sq_bzlx_name"
|
||||
readonly
|
||||
@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"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true, message: '必填' }]"
|
||||
@click="sq_knlxShow = true"
|
||||
:value="formData.sq_knlx_name"
|
||||
rows="3" maxlength="200" type="textarea"
|
||||
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>
|
||||
|
||||
<van-field v-model="formData.apply_reason" name="remark" label="申请理由" style="flex-flow: column"
|
||||
placeholder="请填写申请理由"
|
||||
input-align="left"
|
||||
:rules="[{ required: true, message: '必填' }]"
|
||||
required
|
||||
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"
|
||||
:rules="[{ required: true, message: '必填' }]">
|
||||
<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" name="applicantsign">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.applicantsign"></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.1"></script>
|
||||
|
||||
<script>
|
||||
var 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() {
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
this.$toast('请签字')
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
this.$toast.loading('提交中...')
|
||||
const res = await $.post('/platform/fw/difficulty/apply/doAdd', {"knbf": JSON.stringify(this.formData)})
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/difficulty/apply/apply_list')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$toast('带星号项必填')
|
||||
})
|
||||
},
|
||||
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)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async getUserData() {
|
||||
const {data, code, msg} = await $.post("/platform/fw/difficulty/apply/getUserData")
|
||||
if (code === 0) {
|
||||
this.$set(this.formData, 'sqrusername', data.username)
|
||||
this.$set(this.formData, 'sqrloginname', data.loginname)
|
||||
this.$set(this.formData, 'sex', data.sex)
|
||||
this.$set(this.formData, 'birthday', data.birthday)
|
||||
this.$set(this.formData, 'lxfs', data.mobile)
|
||||
this.$set(this.formData, 'unitname', data.unitname)
|
||||
this.$set(this.formData, 'unionname', data.unionname)
|
||||
|
||||
} else {
|
||||
this.$notify.error({title: '失败', message: msg});
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
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)
|
||||
} else {
|
||||
await this.getUserData()
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,38 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,134 +0,0 @@
|
||||
<!--#
|
||||
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="姓名">{{o.sqrname}}</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.sqrloginname}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.sqrunitname}}</van-cell>
|
||||
<van-cell :border="false" title="所属分工会">{{o.sqrunionname}}</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>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var 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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,138 +0,0 @@
|
||||
<!--#
|
||||
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.go(-1)"></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="姓名">{{o.sqrname}}</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.sqrloginname}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.sqrunitname}}</van-cell>
|
||||
<van-cell :border="false" title="所属分工会">{{o.sqrunionname}}</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>
|
||||
var 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.doSearch()
|
||||
// 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()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
// vue.init()
|
||||
// vue.yearChange()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,128 +0,0 @@
|
||||
<!--#
|
||||
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.xghbzje" label="补助金额"></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="12">
|
||||
<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="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</difficulty-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var 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)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
history.back()
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
setTimeout(() => {
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null,
|
||||
auditSign: "",
|
||||
xghbzje: this.$refs.info.viewData.xghbzje
|
||||
}
|
||||
}, 300)
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,124 +0,0 @@
|
||||
<!--#
|
||||
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="12">
|
||||
<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="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</difficulty-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var 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
|
||||
}
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
this.$toast('请签字')
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/difficulty/twoOrganization/doReview", this.formData)
|
||||
if(resp.code===0){
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
// location.href = '/mobile/difficulty/audit'
|
||||
history.back()
|
||||
}, 1000)
|
||||
}else{
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,261 +0,0 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动详情" left-arrow
|
||||
@click-left="location.replace('/platform/mobile/fellowshipActivity/fellowshipList')"></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>-->
|
||||
<div>
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + this.activity.cover.id"
|
||||
style="display: contents"
|
||||
v-if="this.activity.cover && this.activity.cover.id"></van-image>
|
||||
<van-image src=""
|
||||
style="display: contents"
|
||||
v-else></van-image>
|
||||
</div>
|
||||
<!-- <van-image height="186" src="/assets/mobile/img/fellowship_back.jpg"></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;
|
||||
}
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
trainType: '交友联谊',
|
||||
trainTypeList: [],
|
||||
tabActive: 'a',
|
||||
activityId: '',
|
||||
activity: {},
|
||||
activityMap: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne() {
|
||||
const resp = await $.get('/platform/mobile/fellowshipActivity/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) {
|
||||
vant.Dialog.alert({
|
||||
title: '参加人员范围',
|
||||
message: this.activity.activityGroupName,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
window.location.href = '/platform/mobile/fellowshipActivity/fellowshipInfo?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("fellowshipType")
|
||||
this.activityId = getQueryString('activityId')
|
||||
this.findOne()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,923 +0,0 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar :title="trainType + '列表'" left-arrow
|
||||
@click-left="location.replace('/platform/mobile/fellowshipActivity/fellowshipList?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="${@shiro.hasRole('sysadmin')}&&o.isSign === true && moment().valueOf() < moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 50%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="cancel(o)">
|
||||
取消报名
|
||||
</van-button>
|
||||
|
||||
<van-button type="primary" :color="themeColor" 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="viewPopupShow=true">
|
||||
活动详情
|
||||
</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">
|
||||
<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="出生年月" :value="formData.birthday"
|
||||
required
|
||||
:rules="[{ required:true, message: '请选择出生年月' }]"
|
||||
readonly
|
||||
clickable
|
||||
@click="birthdayShow = true"></van-field>
|
||||
<van-calendar v-model="birthdayShow"
|
||||
:color="themeColor"
|
||||
:min-date="minDate" :max-date="maxDate"
|
||||
@confirm="onBirthdayConfirm"></van-calendar>
|
||||
<van-field label="联系方式" v-model="formData.mobile"
|
||||
required
|
||||
placeholder="请填写联系方式"
|
||||
:rules="[{ required:true, message: '请填写联系方式' }]"></van-field>
|
||||
<van-field label="籍贯" v-model="formData.hometown"
|
||||
required
|
||||
placeholder="请填写籍贯"
|
||||
:rules="[{ required:true, message: '请填写籍贯' }]"></van-field>
|
||||
<van-field label="学历" v-model="formData.education"
|
||||
required
|
||||
placeholder="请填写学历"
|
||||
:rules="[{ required:true, message: '请填写学历' }]"></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>
|
||||
|
||||
<van-popup v-model:show="viewPopupShow" style="width: 100%;height: 100%" position="right">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动详情" left-arrow
|
||||
@click-left="viewPopupShow=false"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + this.activity.cover.id"
|
||||
style="display: contents"
|
||||
v-if="this.activity.cover && this.activity.cover.id"></van-image>
|
||||
<van-image src=""
|
||||
style="display: contents"
|
||||
v-else></van-image>
|
||||
</div>
|
||||
<!-- <van-image height="186" src="/assets/mobile/img/fellowship_back.jpg"></van-image>-->
|
||||
<div class="title">{{activity.activityName}}</div>
|
||||
|
||||
<van-tabs v-model:active="tabActive" shrink>
|
||||
<van-tab title="详细信息" name="a">
|
||||
<div class="pre_text" v-html="activity.introduce"></div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
let pointArray = []
|
||||
let locations = null
|
||||
let map = null
|
||||
let geolocation = null
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tabActive: 'a',
|
||||
minDate: new Date(1970, 1, 1),
|
||||
maxDate: new Date(2000, 11, 25),
|
||||
birthdayShow: false,
|
||||
allColumnsData: [],
|
||||
dynamicColumnsData: [],
|
||||
trainType: '交友联谊',
|
||||
trainTypeList: [],
|
||||
actionShow: false,
|
||||
timeList: [],
|
||||
activityId: '',
|
||||
activityStatus: '0',
|
||||
joinPopup: false,
|
||||
popupShow: false,
|
||||
viewPopupShow: 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: {
|
||||
onBirthdayConfirm(data) {
|
||||
this.birthdayShow = false
|
||||
this.formData.birthday = moment(data).format('YYYY-MM-DD')
|
||||
},
|
||||
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) {
|
||||
vant.Dialog.alert({message: '功能马上推出,敬请期待!'})
|
||||
return
|
||||
//调相机扫一扫
|
||||
/* wxScannerQrCode.scanner().then(async res => {
|
||||
if (res) {
|
||||
const course = JSON.parse(res)
|
||||
const resp = await $.post('/platform/mobile/fellowshipActivity/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 date = new Date()
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
const time = moment().format('YYYY-MM-DD hh:mm:ss')
|
||||
|
||||
const start = new Date(o.courseStartTime).getTime() - 1000 * 60 * 30
|
||||
//const end = new Date(o.courseStartTime).getTime() + 1000 * 60 * 30
|
||||
const end = new Date(o.courseEndTime).getTime()
|
||||
|
||||
const now = new Date().getTime()
|
||||
if (now < start || 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/fellowshipActivity/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>吗?",
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/mobile/fellowshipActivity/cancelSignUp', {
|
||||
activityId: o.activityId,
|
||||
courseId: o.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
async signUp(o) {
|
||||
this.choose = o
|
||||
if (o.conditionStructureId) {
|
||||
const {
|
||||
code,
|
||||
data: {flag, msg}
|
||||
} = await $.post('/platform/mobile/fellowshipActivity/validateSignUp', {id: o.conditionStructureId})
|
||||
if (code === 0) {
|
||||
if (flag === false) {
|
||||
vant.Toast('报名条件:' + msg)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
vant.Toast('系统错误,请联系管理员!')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (moment().valueOf() < moment(this.tempArray.activitySignUpStartTime).valueOf()) {
|
||||
vant.Toast('报名未开始')
|
||||
return
|
||||
}
|
||||
|
||||
if (moment().valueOf() > moment(this.tempArray.activitySignUpEndTime).valueOf()) {
|
||||
vant.Toast('报名已结束')
|
||||
return
|
||||
}
|
||||
|
||||
if (o.isSign) {
|
||||
return
|
||||
}
|
||||
if (o.coursePeopleNumber === (o.hasRegisterNum + o.courseReservedNumber)) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '当前报名人数已满',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
// vant.Toast('当前班报名人数已满')
|
||||
return
|
||||
}
|
||||
if (!o.canSignThisCourseType) {
|
||||
const str = this.activity.restrictLimit !== 3 ? '您选择的类型的交友联谊已达上限,不能再报该类型的交友联谊了!' : this.activity.activityName + '限制报' + this.activity.limitNum + '个活动,已达上限!'
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: str,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.get('/platform/mobile/fellowshipActivity/isSignFullByUnionId', {courseId: o.id})
|
||||
if (resp.code !== 0) {
|
||||
vant.Toast(resp.msg)
|
||||
return
|
||||
}
|
||||
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||
birthday: moment("${@shiro.getPrincipalProperty('birthday')}").format('YYYY-MM-DD'),
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
hometown: "${@shiro.getPrincipalProperty('hometown')}",
|
||||
education: "${@shiro.getPrincipalProperty('education')}",
|
||||
}
|
||||
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/fellowshipActivity/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/fellowshipActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: this.activityStatus
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
//如果这个课程开始了就不显示
|
||||
if (resp.data && resp.data.courseList.length > 0) {
|
||||
resp.data.courseList = resp.data.courseList.filter(item => {
|
||||
if (item.courseTimeList && item.courseTimeList.length > 0) {
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
const start = moment(item.courseTimeList[0].courseStartTime).format('YYYY-MM-DD')
|
||||
return moment(today).valueOf() <= moment(start).valueOf()
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
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/fellowshipActivity/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/fellowship/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/fellowshipActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: 0
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activity = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.trainTypeList = await getDictOptions("fellowshipType")
|
||||
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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,186 +0,0 @@
|
||||
<!--#
|
||||
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="history.go(-1)"></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>{{o.year}}
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">活动对象:</span>{{o.activityGroupName}}
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">报名时间:</span>
|
||||
{{moment(o.activitySignUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.activitySignUpEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div style="margin-top: 6px"><span style="color: grey">活动时间:</span>
|
||||
{{moment(o.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.activityEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var 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/fellowshipActivity/fellowshipInfo' +
|
||||
'?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime + '&type=my' + '&startTime=' + o.activitySignUpStartTime
|
||||
} else {
|
||||
window.location.href = '/platform/mobile/fellowshipActivity/activityInfo?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/platform/mobile/fellowshipActivity/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()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.type = GetQueryString('type')
|
||||
vue.pageForm.type = this.type
|
||||
vue.startLoading()
|
||||
vue.pageForm.activityStatus = this.type === 'my' ? '3' : '1'
|
||||
vue.pageData()
|
||||
vue.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,683 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,126 +0,0 @@
|
||||
<!--#
|
||||
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="location.href='/mobile/index'"
|
||||
></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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,61 +0,0 @@
|
||||
<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>
|
||||
@@ -1,256 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,59 +0,0 @@
|
||||
<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>
|
||||
@@ -1,373 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.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
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 10px;
|
||||
overflow-y: auto;
|
||||
height: calc(100vh - 46px - 20px - 60px);
|
||||
}
|
||||
|
||||
.basic .van-cell {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.van-cell__label {
|
||||
color: #323233;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.empty_text {
|
||||
text-align: center;
|
||||
padding: 10px 0px;
|
||||
font-size: 14px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.pre_text {
|
||||
white-space: break-spaces;
|
||||
padding-left: 7px;
|
||||
/*margin-top: 30px;*/
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="体检套餐选择" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<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-radio-group v-model="formData.subjectId" class="basic">
|
||||
<van-cell-group>
|
||||
<van-cell title="" :key="item.id" v-for="item in project.healthCheckupProjectSubjects">
|
||||
<template #label>
|
||||
<div style="display: flex; justify-content: space-between; margin-left: 8px">
|
||||
<div>{{ item.optionName }}</div>
|
||||
<div @click="viewDesc(item)" style="color: #0e78c5">查看说明</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<van-radio :name="item.id"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</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="campusVisible = true" readonly is-link label="院区" name="campus"
|
||||
placeholder="请选择体检院区" v-model="formData.campusName"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择家属是否体检' }]" label="家属体检" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.isFamily">
|
||||
<van-radio name="是" shape="square">是</van-radio>
|
||||
<van-radio name="否" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin-bottom: 16px" v-if="formData.isFamily === '是'">
|
||||
<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 }]"></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 :rules="[{ required: true, message: '请选择婚否' }]" label="婚否" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.marry">
|
||||
<van-radio name="未婚" shape="square">未婚</van-radio>
|
||||
<van-radio name="已婚" shape="square">已婚</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="年龄" name="age" placeholder="请填写年龄" type="digit"
|
||||
:rules="[{ required: true }]" v-model="item.age"></van-field>
|
||||
<van-field label="身份证号" name="idCard" placeholder="请填写身份证号" type="digit"
|
||||
:rules="[{ required: true }]" v-model="item.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" placeholder="请填写手机号" type="digit"
|
||||
:rules="[{ required: true }]" v-model="item.mobile"></van-field>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length == 0" class="empty_text">
|
||||
<span>
|
||||
如有家属,请添加家属
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit">提交选择</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
<!--体检院区弹出框-->
|
||||
<van-popup position="bottom" round v-model="campusVisible">
|
||||
<van-picker
|
||||
title="院区" show-toolbar
|
||||
:columns="campusList" value-key="campusName"
|
||||
@confirm="(value, index) => {formData.campusName = value.campusName; formData.campus = value.id; campusVisible = false}"
|
||||
@cancel="campusVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--查看说明-->
|
||||
<van-popup position="bottom" round v-model="descVisible" :style="{ height: '60%' }">
|
||||
<div v-html="desc" class="pre_text"></div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
selectId: '',
|
||||
active: 0,
|
||||
project: {},
|
||||
formData: {
|
||||
companionList: [],
|
||||
isFamily: '否',
|
||||
},
|
||||
campusList: [],
|
||||
campusVisible: false,
|
||||
descVisible: false,
|
||||
desc: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewDesc(o) {
|
||||
if(o.description) {
|
||||
this.desc = o.description
|
||||
this.descVisible = true
|
||||
} else {
|
||||
vant.Toast('暂无详细说明')
|
||||
}
|
||||
},
|
||||
async joinSubmit() {
|
||||
if(!this.formData.subjectId) {
|
||||
vant.Toast('请选择体检套餐')
|
||||
return
|
||||
}
|
||||
const p = this.project.healthCheckupProjectSubjects.find(o => o.id === this.formData.subjectId)
|
||||
const res = await $.post('/mobile/healthCheckup/validCondition', {
|
||||
cndId: p.conditionStructureId,
|
||||
})
|
||||
if(res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: '您确定要选择' + p.optionName + '吗?',
|
||||
}).then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
if(cloneData.isFmaily === '否') {
|
||||
cloneData.companionList = []
|
||||
}
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if (item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
cloneData.projectId = this.id
|
||||
const resp = await $.post('/mobile/healthCheckup/doSubmit', {
|
||||
userSelection: 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 = '/mobile/healthCheckup/mine'
|
||||
}
|
||||
}, 1000)
|
||||
}).catch(() => {})
|
||||
},
|
||||
addCompanion() {
|
||||
this.formData.companionList.push({userName: '', sex: '', marry: '',})
|
||||
},
|
||||
delCompanion() {
|
||||
this.formData.companionList.splice(this.active, 1)
|
||||
},
|
||||
//查询有哪些体检套餐
|
||||
async findSubject() {
|
||||
const resp = await $.post('/platform/healthCheckup/project/mange/findOne', {id: this.id})
|
||||
this.project = resp.data
|
||||
//const sex = "${@shiro.getPrincipalProperty('sex')}";
|
||||
//this.project.healthCheckupProjectSubjects = this.project.healthCheckupProjectSubjects.filter(o => o.sex === sex || o.sex === '' || o.sex === null)
|
||||
},
|
||||
//获取院区
|
||||
async getCampus() {
|
||||
const resp = await $.post('/mobile/healthCheckup/getCampus')
|
||||
this.campusList = resp.data
|
||||
},
|
||||
//获取报名信息
|
||||
async getSelectInfo() {
|
||||
const resp = await $.post('/mobile/healthCheckup/getSelectInfo', {id: this.selectId})
|
||||
this.formData = resp.data
|
||||
const o = this.campusList.find(o => o.id === this.formData.campus)
|
||||
this.formData.campusName = o.campusName
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString('projectId')
|
||||
this.selectId = GetQueryString('selectId')
|
||||
await this.getCampus()
|
||||
if(GetQueryString('selectId')) {
|
||||
await this.getSelectInfo()
|
||||
}
|
||||
await this.findSubject()
|
||||
},
|
||||
})
|
||||
window.onload = () => {
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,208 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.operateDiv {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.operateDiv .van-button {
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tag {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
background-color: #1867b0;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
top: 0px;
|
||||
border-radius: 6px;
|
||||
right: -3px;
|
||||
padding: 0px 6px;
|
||||
transform: rotate(16deg);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="体检套餐列表" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.tabName" @change="tabChange">
|
||||
<van-tab title="进行中" name="ing"></van-tab>
|
||||
<van-tab title="已结束" name="end"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<template v-if="vLoading && !vLoading.value">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<div @click="toCheckUp(o)" class="content">
|
||||
<van-image
|
||||
height="76"
|
||||
radius="8"
|
||||
:src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+o.cover"
|
||||
width="100">
|
||||
</van-image>
|
||||
<div class="content-right">
|
||||
<div v-if="o.selectCount <= 0" class="tag">未选择</div>
|
||||
<div v-else class="tag" style="background-color: green">已选择</div>
|
||||
<div class="cr-title">
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<div class="concat">
|
||||
<span>开始时间:</span>
|
||||
{{moment(o.choiceTimeStart).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>结束时间:</span>
|
||||
{{moment(o.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tabName: 'ing',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toCheckUp(o) {
|
||||
if(o.selectCount > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此项活动您已选择',
|
||||
})
|
||||
return
|
||||
}
|
||||
//当前时间
|
||||
const nowDate = moment().unix()
|
||||
//结束时间
|
||||
const endDate = moment(o.choiceTimeEnd).unix()
|
||||
if(nowDate > endDate) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '选择时间已过',
|
||||
})
|
||||
} else {
|
||||
location.href = '/mobile/healthCheckup/checkUp?projectId=' + o.id
|
||||
}
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/healthCheckup/pageData', 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
|
||||
this.mLoading = false
|
||||
},
|
||||
init() {
|
||||
this.startLoading()
|
||||
this.pageForm.tabName = 'ing'
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
})
|
||||
window.onload = () => {
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,207 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.operateDiv {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.operateDiv .van-button {
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我选择的体检套餐" left-arrow
|
||||
@click-left="location.href='/mobile/index'"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.tabName" @change="tabChange">
|
||||
<van-tab title="进行中" name="ing"></van-tab>
|
||||
<van-tab title="已结束" name="end"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<template v-if="vLoading && !vLoading.value">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<div class="content">
|
||||
<van-image
|
||||
height="76"
|
||||
radius="8"
|
||||
:src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+o.cover"
|
||||
width="100">
|
||||
</van-image>
|
||||
<div class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<div class="concat">
|
||||
<span>开始时间:</span>
|
||||
{{moment(o.choiceTimeStart).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>结束时间:</span>
|
||||
{{moment(o.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operateDiv">
|
||||
|
||||
<van-button @click="edit(o)" v-if="moment().unix() < moment(o.choiceTimeEnd).unix()"
|
||||
type="info" size="small" color="#1867b0">
|
||||
修 改
|
||||
</van-button>
|
||||
<van-button @click="cancel(o)" v-if="moment().unix() < moment(o.choiceTimeEnd).unix()"
|
||||
type="info" size="small" color="#1867b0">
|
||||
取 消
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
edit(o) {
|
||||
location.href = '/mobile/healthCheckup/checkUp?projectId=' + o.projectId +
|
||||
'&selectId=' + o.id
|
||||
},
|
||||
async cancel(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: '您确定要取消此选择吗?',
|
||||
}).then(async () => {
|
||||
const res = await $.post('/mobile/healthCheckup/cancel', {id: o.id, projectId: o.projectId})
|
||||
if(res.code === 0) {
|
||||
vant.Toast('取消成功')
|
||||
this.getData()
|
||||
}else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
}).catch(() => {})
|
||||
},
|
||||
doSearch() {
|
||||
this.loading = true
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/healthCheckup/mineData', 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
|
||||
this.mLoading = false
|
||||
},
|
||||
init() {
|
||||
this.startLoading()
|
||||
this.pageForm.tabName = 'ing'
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
})
|
||||
window.onload = () => {
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,358 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.swiper img {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.module {
|
||||
margin: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.module_title {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 12px 15px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgb(51, 51, 51);
|
||||
background-color: #edf5ed;
|
||||
}
|
||||
|
||||
.module_title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
background-color: green;
|
||||
height: 25px;
|
||||
left: 5px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
row-gap: 10px;
|
||||
background-color: white;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
.menu_item {
|
||||
width: calc(100% / 4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.menu_item_img {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.menu_item_name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
font-family: "微软雅黑", Helvetica, STHeiTi, sans-serif;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.number_text {
|
||||
font-size: 36px;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 38px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 36px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
|
||||
<div v-if="active === 0" style="background-color: #f6f7f9; min-height: 100vh">
|
||||
<van-notice-bar
|
||||
left-icon="volume-o" color="#1989fa" background="#ecf9ff"
|
||||
text="温馨提示:只显示当前年份的待办和已办事项"
|
||||
></van-notice-bar>
|
||||
|
||||
<van-tabs v-model="activeName" @click="initData">
|
||||
<van-tab title="待办" name="0">
|
||||
<div style="min-height: 80vh">
|
||||
<div v-for="o in needItems">
|
||||
<div v-if="o.count > 0" @click="toUrl(o)" class="van-doc-card">
|
||||
<div class="title">{{ o.title }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div>
|
||||
<div style="color: grey; font-size: 15px">{{ o.name }}</div>
|
||||
</div>
|
||||
<div class="number_text">
|
||||
<span>{{ o.count }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
style="margin-top: 44px"
|
||||
v-if="needItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无待办"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="已办" name="1">
|
||||
<div style="min-height: 80vh">
|
||||
<div @click="toHref(o)" class="van-doc-card" v-for="o in completedItems">
|
||||
<div class="title">{{ o.moduleName }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div>
|
||||
<span>{{ o.auditState }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div style="color: grey; font-size: 15px">{{ o.auditTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
style="margin-top: 44px"
|
||||
v-if="completedItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无已办"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 100px" v-if="active === 1">
|
||||
<van-swipe :autoplay="3000" class="swiper">
|
||||
<van-swipe-item v-for="(image, index) in images" :key="index">
|
||||
<img :src="image" width="100%"/>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<van-row v-for="m in moduleMenus" class="module">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
{{m.moduleName}}
|
||||
</div>
|
||||
|
||||
<!-- v-if="(m.url == '/mobile/member/edit' && ${@shiro.lacksRole('H01')}) || m.url != '/mobile/member/edit'"-->
|
||||
<div class="menu">
|
||||
<div v-for="m in m.menuList" :key="m.menuId" class="menu_item"
|
||||
@click="menuClick(m)">
|
||||
<img :src="CREATE_PREVIEW_URL(m.menuIcon)" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">{{m.menuName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-tabbar v-model="active" @change="tabbrChange">
|
||||
<van-tabbar-item :dot="needCount" icon="envelop-o">我的办理</van-tabbar-item>
|
||||
<van-tabbar-item icon="home-o">工作台</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
<!--<div v-for="m in moduleMenus" :key="m.moduleId" class="module">
|
||||
<div class="module_title">
|
||||
{{m.moduleName}}
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
<div v-for="m in m.menuList" :key="m.menuId" class="menu_item" @click="menuClick(m)">
|
||||
<img :src="CREATE_PREVIEW_URL(m.menuIcon)" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">{{m.menuName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/cloudbase/1.1.0/cloud.js"></script>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
images: [
|
||||
"${AppDomain!}" + '/home1.png',
|
||||
"${AppDomain!}" + '/home2.png',
|
||||
"${AppDomain!}" + '/home3.png',
|
||||
],
|
||||
moduleMenus: [],
|
||||
roles: [],
|
||||
active: 1,
|
||||
needCount: 0,
|
||||
needItems: [],
|
||||
activeName: '0',
|
||||
completedItems: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getMenus() {
|
||||
const {data} = await $.post('/platform/sys/appMenu/appMenus')
|
||||
this.moduleMenus = data
|
||||
},
|
||||
async menuClick(menu) {
|
||||
if (menu.url === '1' || menu.menuName === '健步走') {
|
||||
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: 'wxf750f43635f770e0', // 小程序AppID
|
||||
resourceEnv: 'jsz-2g1aj6un572bcf2a', // 云环境环境ID
|
||||
})
|
||||
await cloud.init(); // 云函数初始化
|
||||
const res = await cloud.callFunction({
|
||||
name: 'urllink', //提供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.urlLink
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
} else {
|
||||
location.href = menu.url
|
||||
}
|
||||
},
|
||||
tabbrChange(o) {
|
||||
this.needItems = []
|
||||
this.initData()
|
||||
},
|
||||
toUrl(o) {
|
||||
location.href = o.mobileHref
|
||||
},
|
||||
toHref(o) {
|
||||
location.href = o.mobileUrl + '?audit=1';
|
||||
},
|
||||
/**
|
||||
* 入学登记待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
/*async getRxdjAgenda() {
|
||||
const {data, code} = await $.get("/platform/rxdj/agent/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.number > 0))
|
||||
}
|
||||
},*/
|
||||
async getNeedItems() {
|
||||
const {data, code} = await $.get('/platform/needItems/getNeedItems')
|
||||
if (code === 0) {
|
||||
const obj = data.filter(v => {
|
||||
return v.mobileHref != null && v.count > 0
|
||||
})
|
||||
this.needItems = obj
|
||||
}
|
||||
},
|
||||
async getCompletes() {
|
||||
const {data, code} = await $.get('/platform/sys/completed/getCompletes')
|
||||
if (code === 0) {
|
||||
this.completedItems = data;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 会员个人核对待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getMemberCheckSelfAgenda() {
|
||||
const {data, code} = await $.get("/platform/memberSelf/agenda/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.count > 0))
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 福利个人核对待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getWelfareCheckSelfAgenda() {
|
||||
const {data, code} = await $.get("/platform/welfareSelf/agenda/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.count > 0))
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
await this.getNeedItems();
|
||||
await this.getMemberCheckSelfAgenda()
|
||||
await this.getWelfareCheckSelfAgenda()
|
||||
await this.getCompletes();
|
||||
this.needCount = this.needItems.length
|
||||
},
|
||||
async setNeedItems() {
|
||||
const {data, code} = await $.get('/platform/needItems/getNeedItems')
|
||||
if (code === 0) {
|
||||
const obj = data.filter(v => {
|
||||
return v.mobileHref != null && v.count > 0
|
||||
})
|
||||
window.localStorage.setItem('needItems', escape(JSON.stringify(obj)))
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeMount() {
|
||||
this.setNeedItems();
|
||||
},
|
||||
async created() {
|
||||
await this.getMenus();
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.getMenus()
|
||||
vue.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,298 +0,0 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
height: 26px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.card_title {
|
||||
margin: 5px 0 5px 16px;
|
||||
}
|
||||
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 16px !important;
|
||||
text-indent: 4px !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
left: 5px !important;
|
||||
}
|
||||
|
||||
.van-cell-group--inset {
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.pre_text {
|
||||
white-space: break-spaces;
|
||||
padding-left: 7px;
|
||||
/*margin-top: 30px;*/
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="保险列表" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.activityStatus" @change="tabChange">
|
||||
<van-tab title="全部" :name="0"></van-tab>
|
||||
<van-tab title="进行中" :name="1"></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>
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
{{o.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="train-title"><span
|
||||
style="color: grey">年  度:</span>{{moment(o.startTime).format('YYYY')}}
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">登记范围:</span>{{o.activityGroupName}}
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">登记时间:</span>
|
||||
{{moment(o.stratTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.endTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">详细信息
|
||||
</van-button>
|
||||
<van-button v-if="o.count === 0" @click.stop="needChoose(o)"
|
||||
class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">我要选择
|
||||
</van-button>
|
||||
<van-button v-if="o.count > 0" @click.stop="cancelChoose(o)"
|
||||
class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">取消选择
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right"
|
||||
:style="{ height: '100%', width: '100%', 'background-color': '#f6f7f9' }">
|
||||
<van-nav-bar
|
||||
title="详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false">
|
||||
</van-nav-bar>
|
||||
<van-tabs v-model="active">
|
||||
<van-tab v-if="viewData.moreInfo" title="通知内容">
|
||||
<div class="pre_text" v-html="viewData.moreInfo"></div>
|
||||
</van-tab>
|
||||
<van-tab title="基础信息">
|
||||
<van-cell-group inset style="margin-top: 10px">
|
||||
<van-cell title="保险名称" :value="viewData.name"></van-cell>
|
||||
<van-cell title="登记开始时间" :value="viewData.startTime"></van-cell>
|
||||
<van-cell title="登记结束时间" :value="viewData.endTime"></van-cell>
|
||||
<van-cell title="登记范围" :value="viewData.activityGroupName"></van-cell>
|
||||
<van-cell title="创建人" :value="viewData.username"></van-cell>
|
||||
<van-cell title="创建时间" :value="viewData.createTime"></van-cell>
|
||||
<van-cell title="介绍链接">
|
||||
<template #right-icon>
|
||||
<span style="cursor: pointer; color: #236eb4"
|
||||
@click="window.open(viewData.href.indexOf('http') !== -1 ? viewData.href : 'https://' + viewData.href)">{{viewData.href}}</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="支付二维码" is-link value="点击查看"
|
||||
@click="showPic"></van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 1,
|
||||
pageForm: {
|
||||
activityStatus: 1
|
||||
},
|
||||
infoShow: false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showPic() {
|
||||
if (this.viewData.payCode && this.viewData.payCode.length > 0) {
|
||||
const url = FILE_DOMAIN + '/fileStreamPreview?id=' + this.viewData.payCode[0].id
|
||||
vant.ImagePreview([url])
|
||||
}
|
||||
},
|
||||
openView(row) {
|
||||
this.viewData = clone(row)
|
||||
if (this.viewData.payCode) {
|
||||
this.viewData.payCode = JSON.parse(this.viewData.payCode)
|
||||
}
|
||||
this.active = this.viewData.moreInfo ? 1 : 2
|
||||
this.infoShow = true
|
||||
},
|
||||
cancelChoose(row) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要取消【' + row.name + '】吗?',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/insurance/manage/cancelChoose', {
|
||||
id: row.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
async needChoose(row) {
|
||||
if (row.groupId != null) {
|
||||
const isExist = await getScopeUser(row.groupId)
|
||||
if (!isExist) {
|
||||
vant.Dialog.alert({
|
||||
title: '参加人员范围',
|
||||
message: row.activityGroupName,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要选择【' + row.name + '】吗?',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/insurance/manage/needChoose', {
|
||||
id: row.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
tabChange() {
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/insurance/manage/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
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
window.onload = () => {
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,421 +0,0 @@
|
||||
<!--#
|
||||
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: 24px;
|
||||
white-space: break-spaces;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.time_info .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"
|
||||
: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>
|
||||
<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>
|
||||
<pre class="label_text">{{doctorData.specialty ? doctorData.specialty : '暂无数据,该资料待补充'}}</pre>
|
||||
<div class="label" style="margin-top: 20px">咨询师简介</div>
|
||||
<pre class="label_text">{{doctorData.introduce ? doctorData.introduce : '暂无数据,该资料待补充'}}</pre>
|
||||
</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 :rules="[{ required: true, message: '请填写手机号' }]"
|
||||
required placeholder="请填写手机号"
|
||||
type="tel"
|
||||
v-model=chooseData.userMobile
|
||||
label="预约人电话"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
|
||||
<div v-if="chooseData.askType">
|
||||
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true"
|
||||
required :rules="[{ required: true, message: '请选择咨询方式' }]"
|
||||
placeholder="请选择咨询方式"></van-field>
|
||||
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm"
|
||||
@cancel="appointmentAskTypeShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<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 '';
|
||||
}
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
appointmentAskTypeShow: false,
|
||||
askTypeList: [],
|
||||
askTypeArray: [],
|
||||
show: false,
|
||||
doctorId: '',
|
||||
doctorData: {},
|
||||
active: 0,
|
||||
timeData: [],
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
chooseData: {
|
||||
userMobile: null
|
||||
},
|
||||
appointmentUserNote: '',
|
||||
appointmentAskTypeText: '',
|
||||
appointmentAskTypeValue: '',
|
||||
typeId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
askTypeConfirm(val) {
|
||||
this.$set(this, "appointmentAskTypeText", val.text)
|
||||
this.$set(this, "appointmentAskTypeValue", val.value)
|
||||
this.appointmentAskTypeShow = false
|
||||
},
|
||||
async doSubmit() {
|
||||
if (!this.chooseData.userMobile.trim()) {
|
||||
this.$toast.fail("请填写手机号");
|
||||
return
|
||||
}
|
||||
if (!this.appointmentAskTypeValue) {
|
||||
this.$toast.fail("请选择咨询方式");
|
||||
return
|
||||
}
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
appointmentAskTypeValue: this.appointmentAskTypeValue,
|
||||
userMobile: this.chooseData.userMobile,
|
||||
id: this.chooseData.id,
|
||||
isAdd: true,
|
||||
}
|
||||
const resp = await $.post('/mobile/legalAidPro/doApply', params)
|
||||
if (resp.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您已预约成功!',
|
||||
confirmButtonColor: '#1867b0'
|
||||
}).then(() => {
|
||||
location.replace('/mobile/legalAidPro/myApplyList')
|
||||
});
|
||||
} else if (resp.code === 1) {
|
||||
this.$toast.error(resp.msg)
|
||||
} else if (resp.code === 2) {
|
||||
this.$toast.error(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
apply(o) {
|
||||
if (o.title !== '可预约') {
|
||||
return
|
||||
}
|
||||
this.askTypeArray = []
|
||||
if (o.askType) {
|
||||
const array = JSON.parse(o.askType)
|
||||
this.askTypeList.map(o => {
|
||||
if (array.includes(o.code)) {
|
||||
this.askTypeArray.push({text: o.name, value: o.code})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.askTypeArray && this.askTypeArray.length === 1) {
|
||||
this.appointmentAskTypeText = this.askTypeArray[0].text
|
||||
this.appointmentAskTypeValue = this.askTypeArray[0].value
|
||||
}
|
||||
this.chooseData = o
|
||||
this.$set(this.chooseData, "userMobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
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/legalAidPro/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
|
||||
this.pageForm.typeId = this.typeId
|
||||
const resp = await $.post('/mobile/legalAidPro/getDataByDoctorId', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const record = resp.data.list.find(v => v.appointmentUser === userId)
|
||||
if (record) {
|
||||
resp.data.list.forEach(v => {
|
||||
if (new Date().getTime() > v.startTimeTs) {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
} else {
|
||||
if (v.appointmentUser === userId) {
|
||||
v.className = 'gray'
|
||||
v.title = '我已预约'
|
||||
} else {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
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')
|
||||
this.typeId = getQueryVariable('typeId')
|
||||
this.askTypeList = await getDictOptions("psychology_asktype")
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,106 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.note-field textarea {
|
||||
text-align: right;
|
||||
color: #969799;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="预约详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="goBack()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
预约时间段
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ viewData.endTime }}</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 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-field
|
||||
class="note-field"
|
||||
v-model="viewData.appointmentUserNote"
|
||||
readonly
|
||||
rows="3"
|
||||
autosize
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
placeholder="您可以输入预约备注"
|
||||
></van-field>
|
||||
<!-- <van-cell title="备注">{{ viewData.appointmentUserNote }}</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 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>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
window.history.back()
|
||||
const id = this.GetQueryString("id")
|
||||
window.localStorage.removeItem("psychology-info-" + id)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = this.GetQueryString("id")
|
||||
const data = window.localStorage.getItem("psychology-info-" + id)
|
||||
this.viewData = JSON.parse(data)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,132 +0,0 @@
|
||||
<!--#
|
||||
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: 28%;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
width: 72%;
|
||||
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;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="法律咨询师列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<!--咨询师列表-->
|
||||
<div class="info" @click="toApply(item)" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="80" :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>
|
||||
|
||||
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
typeList: [
|
||||
{text: '时间不限', value: 'no'},
|
||||
{text: '本周', value: 'thisWeek'},
|
||||
{text: '下周', value: 'nextWeek'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await $.post('/mobile/legalAidPro/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
},
|
||||
toApply(o) {
|
||||
location.href = '/mobile/legalAidPro/apply?doctorId=' + o.userid + '&typeId=' + this.pageForm.typeId
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,471 +0,0 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.cancel-button .van-button {
|
||||
height: 24px !important;
|
||||
padding: 0 12px !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;
|
||||
}
|
||||
|
||||
.label {
|
||||
border-left: 5px #1867b0 solid;
|
||||
border-radius: 4px;
|
||||
padding-left: 6px;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.label_text {
|
||||
color: grey;
|
||||
line-height: 24px;
|
||||
white-space: break-spaces;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
</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()" style="margin-right: 4px"
|
||||
@click.stop="update(o)" round size="small" color="#1867b0">修改
|
||||
</van-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="预约咨询方式">{{ getAskTypeName() }}</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="咨询方式">
|
||||
<div v-if="!viewData.askType || getDoctorAskTypeName().length === 0">暂无</div>
|
||||
<div v-else>
|
||||
<div v-for="item in getDoctorAskTypeName()">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell @click="doctorIntroduceShow = true" title="个人简介" is-link>
|
||||
<div style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: break-word;">
|
||||
{{ viewData.doctorIntroduce || '暂无'}}
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model:show="doctorIntroduceShow" position="bottom" round style="padding: 20px; width: auto">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<div class="label">咨询师简介</div>
|
||||
<div @click="doctorIntroduceShow = false">
|
||||
<van-icon name="cross"></van-icon>
|
||||
</div>
|
||||
</div>
|
||||
<pre class="label_text">{{viewData.doctorIntroduce ? viewData.doctorIntroduce : '暂无数据,该资料待补充'}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model="infoShow" class="apply_pop" position="right">
|
||||
<van-nav-bar
|
||||
title="预约信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false">
|
||||
</van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-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.doctorUserName"
|
||||
label="咨询师姓名"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.doctorMobile"
|
||||
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 :rules="[{ required: true, message: '请填写电话' }]"
|
||||
required
|
||||
type="tel"
|
||||
v-model=chooseData.userMobile
|
||||
label="预约人电话"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
|
||||
<div v-if="chooseData.askType">
|
||||
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true"
|
||||
placeholder="请选择咨询方式"></van-field>
|
||||
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm"
|
||||
@cancel="appointmentAskTypeShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
appointmentAskTypeText: '',
|
||||
appointmentUserNote: '',
|
||||
appointmentAskTypeShow: false,
|
||||
appointmentAskTypeValue: '',
|
||||
askTypeArray: [],
|
||||
chooseData: {},
|
||||
infoShow: false,
|
||||
doctorIntroduceShow: false,
|
||||
stateList: [
|
||||
{text: '全部预约状态', value: null},
|
||||
{text: '预约中', value: 2100},
|
||||
{text: '预约成功', value: 2300},
|
||||
{text: '预约失败', value: 2200}
|
||||
],
|
||||
askTypeList: [],
|
||||
show: false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update(o) {
|
||||
this.askTypeArray = []
|
||||
if (o.askType) {
|
||||
const array = JSON.parse(o.askType)
|
||||
this.askTypeList.map(o => {
|
||||
if (array.includes(o.code)) {
|
||||
this.askTypeArray.push({text: o.name, value: o.code})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (o.appointmentAskTypeValue) {
|
||||
const type = this.askTypeList.find(x => x.code === o.appointmentAskTypeValue)
|
||||
this.appointmentAskTypeText = type ? type.name : ''
|
||||
}
|
||||
this.chooseData = o
|
||||
this.appointmentUserNote = o.appointmentUserNote
|
||||
this.$set(this.chooseData, "userMobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.infoShow = true
|
||||
},
|
||||
askTypeConfirm(val) {
|
||||
this.$set(this, "appointmentAskTypeText", val.text)
|
||||
this.$set(this, "appointmentAskTypeValue", val.value)
|
||||
this.appointmentAskTypeShow = false
|
||||
},
|
||||
async doSubmit() {
|
||||
if (!this.chooseData.userMobile) {
|
||||
this.$toast.fail("请输入手机号");
|
||||
return
|
||||
}
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
appointmentAskTypeValue: this.appointmentAskTypeValue,
|
||||
userMobile: this.chooseData.userMobile,
|
||||
id: this.chooseData.id,
|
||||
isAdd: false,
|
||||
}
|
||||
const resp = await $.post('/mobile/legalAidPro/doApply', params)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('修改成功')
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/legalAidPro/myApplyList')
|
||||
}, 1000)
|
||||
} else if (resp.code === 1) {
|
||||
this.$toast.error(resp.msg)
|
||||
} else if (resp.code === 2) {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
getAskTypeName() {
|
||||
if (this.viewData.appointmentAskTypeValue) {
|
||||
const type = this.askTypeList.find(o => o.code === this.viewData.appointmentAskTypeValue + '')
|
||||
return type ? type.name : '暂无'
|
||||
} else {
|
||||
return '暂无'
|
||||
}
|
||||
},
|
||||
getDoctorAskTypeName() {
|
||||
const askTypeArray = []
|
||||
if (this.viewData.askType) {
|
||||
const array = JSON.parse(this.viewData.askType)
|
||||
this.askTypeList.map(o => {
|
||||
if (array.includes(o.code)) {
|
||||
askTypeArray.push(o)
|
||||
}
|
||||
})
|
||||
}
|
||||
return askTypeArray
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/legalAidPro/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/legalAidPro/doCancel', {id})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('取消成功')
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageForm.year = this.yearList[0].value
|
||||
this.pageForm.stateId = null
|
||||
this.pageData()
|
||||
this.askTypeList = await getDictOptions("psychology_asktype")
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,74 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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 + '&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
@@ -1,504 +0,0 @@
|
||||
<!--#
|
||||
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-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;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.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
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="会议请假审核"
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入会议名称、会议地点进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="meetingTimeList" @change="doSearch"
|
||||
v-model="pageForm.meetingTime"></van-dropdown-item>
|
||||
<van-dropdown-item :options="typeList" @change="doSearch"
|
||||
v-model="pageForm.typeId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false"
|
||||
@load="onLoad"
|
||||
v-model="loading">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id, o.modulename)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 70%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.meetingname}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<span style="color: grey">会议时间:</span>
|
||||
{{o.starttime}}
|
||||
<!--<van-col span="12"><span style="color: grey">结束时间:</span></van-col>-->
|
||||
</van-row>
|
||||
<van-row>
|
||||
|
||||
<!--<van-col span="12">{{o.endtime}}</van-col>-->
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 8px;">
|
||||
<div class="cus_overflow" style="line-height: 20px; width: 83%">
|
||||
<span style="color: grey">会议描述:</span>
|
||||
{{o.meetingdescription}}
|
||||
</div>
|
||||
<span @click.stop="desc = o.meetingdescription; popupShow = true" class="showMore">查看更多</span>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">已审{{o.audit}}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o.id, o.modulename)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">未审{{o.no_audit}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--弹出框-->
|
||||
<van-popup class="cus_popup" v-model:show="popupShow">
|
||||
<pre style="margin: 0; white-space: break-spaces">{{desc}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-icon @click="popupShow = false" class="cus_icon" name="close" v-if="popupShow"></van-icon>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet :title="queryType === 'notAudit' ? '请假人员列表' : '请假人员列表'" @close="popClose" class="userPopup"
|
||||
v-model:show="userShow">
|
||||
<div class="content">
|
||||
<div class="van-doc-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>-->
|
||||
<span>{{'会议时间:' + moment(item.startTime).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="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
会议名称:
|
||||
<van-tag size="medium" type="primary">{{item.timePeriodName}}</van-tag>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<van-checkbox-group ref="checkboxGroup" v-if="item.users !== null" v-model="result">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
:key="obj.id"
|
||||
@click="toggle(i, index)" class="cus_cell"
|
||||
clickable
|
||||
v-for="(obj, index) in item.users">
|
||||
<span style="display: inline-block; width: 40px">{{obj.username}}</span>
|
||||
<span style="display: inline-block; width: 20px">{{obj.sex}}</span>
|
||||
<span style="display: inline-block; width: 60px">{{obj.loginname}}</span>
|
||||
<span class="unit">{{obj.unitname}}</span>
|
||||
<van-icon class="audit_icon" color="green" name="passed"
|
||||
v-if="queryType === 'hasAudit' && obj.auditState === true"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey" name="close"
|
||||
v-if="queryType === 'hasAudit' && obj.auditState === false"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
<div style="margin-top: 4px; text-align: center" v-else>暂无请假人员</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<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 style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<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>
|
||||
|
||||
<!--审核弹框-->
|
||||
<van-dialog @confirm="auditDo" show-cancel-button title="温馨提示" v-model:show="auditShow">
|
||||
<div style="padding-top: 8px; text-align: center; font-size: 14px; color: #646566">{{str}}</div>
|
||||
<van-divider style="margin: 12px 0 1px 0px;"></van-divider>
|
||||
<van-field
|
||||
autosize
|
||||
label="审核意见:"
|
||||
maxlength="50"
|
||||
placeholder="请输入审核意见"
|
||||
rows="2"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="reason"
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
var 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: {
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await $.post('/mobile/meeting/audit/getLeaveUser', {
|
||||
meetingId: o.id,
|
||||
auditType: 'hasAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userList.forEach(item => {
|
||||
if (item.users && item.users.length > 1) {
|
||||
item.users.sort((a, b) => {
|
||||
return b.auditState - a.auditState
|
||||
})
|
||||
}
|
||||
})
|
||||
this.userShow = 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, index) {
|
||||
if (i > 0) {
|
||||
let length = 0
|
||||
for (let m = 0; m < i; m++) {
|
||||
length += this.userList[m].users.length
|
||||
}
|
||||
index = length + index
|
||||
}
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
async auditDo() {
|
||||
let idList = this.result
|
||||
if (this.type === 'all') {
|
||||
this.userList.forEach(item => {
|
||||
if (item.users !== null && item.users !== undefined) {
|
||||
idList = idList.concat(item.users.map(o => o.id))
|
||||
}
|
||||
})
|
||||
}
|
||||
const resp = await $.post('/mobile/meeting/audit/audit', {
|
||||
tpuIds: JSON.stringify(idList),
|
||||
auditOpinion: this.reason,
|
||||
isPass: this.auditType === 'pass'
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
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/meeting/audit/getLeaveUser', {
|
||||
meetingId: 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/meeting/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 meetUtil.getAllMeetingType()
|
||||
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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,532 +0,0 @@
|
||||
<!--#
|
||||
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: 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%;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.leave_pop {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 82%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 4.6em;
|
||||
}
|
||||
|
||||
.checkDiv {
|
||||
font-size: 33px;
|
||||
color: #1867b0;
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.auditState {
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: -3px;
|
||||
border-radius: 4px;
|
||||
padding: 1px 8px;
|
||||
border: 1px #1867b0 solid;
|
||||
background: #1867b0;
|
||||
opacity: 0.6;
|
||||
color: white;
|
||||
transform: skewY(5deg);
|
||||
}
|
||||
|
||||
.van-field--min-height .van-field__control {
|
||||
min-height: auto;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.border_div {
|
||||
width: 33px;
|
||||
height: 33px;
|
||||
border: 1px lightgrey solid;
|
||||
border-radius: 14px;
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 28px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="我的会议"
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入会议名称、会议地点进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyWord"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="meetingList" @change="doSearch"
|
||||
v-model="pageForm.tabNameIndex"></van-dropdown-item>
|
||||
<van-dropdown-item :options="meetingTimeList" @change="doSearch"
|
||||
v-model="pageForm.meetingTime"></van-dropdown-item>
|
||||
<van-dropdown-item :options="typeList" @change="doSearch"
|
||||
v-model="pageForm.typeId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false"
|
||||
@load="onLoad"
|
||||
v-model="loading"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @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.meetingName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="color: #1867b0; white-space: nowrap;">
|
||||
{{o.meetingTypeName}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<span style="color: grey">会议地点:</span>
|
||||
{{o.location}}
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<span style="color: grey">会议时间:</span>
|
||||
{{o.startTime}}
|
||||
<!--<van-col span="12"><span style="color: grey">结束时间:</span></van-col>-->
|
||||
</van-row>
|
||||
<van-row>
|
||||
<!--<van-col span="12">{{o.endTime}}</van-col>-->
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 8px">
|
||||
<div class="cus_overflow" style="line-height: 20px; width: 83%">
|
||||
<span style="color: grey">会议描述:</span>
|
||||
{{o.meetingDescription}}
|
||||
</div>
|
||||
<span @click.stop="popupShow = true; clickRow = o"
|
||||
class="showMore">查看更多</span>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<!--<div style="display: flex; align-items: center">
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span :style="'color: ' + o.stateColor">{{o.stateName}}</span>
|
||||
</div>-->
|
||||
<div>
|
||||
<!--<van-button @click="needLeave(o)" v-if="o.isCanLeave === null && o.isJoin === null"
|
||||
type="primary" size="small" color="#1867b0" style="margin-right: 8px">我要请假</van-button>
|
||||
<van-button v-if="o.isJoin === false" size="small" disabled color="grey" style="margin-right: 8px">已请假</van-button>
|
||||
<van-button type="primary" v-if="o.isJoin !== false" size="small" color="#1867b0">我要签到</van-button>
|
||||
<van-button v-if="o.isJoin === true" size="small" disabled color="grey">已签到</van-button>-->
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
|
||||
@click="needLeave(o, false)"
|
||||
color="#1867b0" size="small" style="margin-right: 8px"
|
||||
type="primary">查看请假状态
|
||||
</van-button>
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
|
||||
@click="needLeave(o, true)"
|
||||
color="#1867b0" size="small" style="margin-right: 8px"
|
||||
type="primary">我要请假
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--弹出框-->
|
||||
<van-popup class="cus_popup" v-model:show="popupShow">
|
||||
<pre style="margin: 0; white-space: break-spaces; line-height: 28px">{{clickRow.meetingDescription}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-icon @click="popupShow = false" class="cus_icon" name="close" v-if="popupShow"></van-icon>
|
||||
|
||||
<!--请假弹框-->
|
||||
<van-action-sheet class="leave_pop" title="会议信息" v-model="leaveShow">
|
||||
<div v-if="flag === true"
|
||||
style="padding: 0px 0px 10px 0px; text-align: center; font-size: 14px; color: #646566">
|
||||
请<span style="color: red">点击选择</span>请假时间段,填写请假原因
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
<div class="van-doc-card" v-for="(item, index) in timeList">
|
||||
<div>
|
||||
<div><span style="color: grey">会议名称:</span>{{item.timePeriodName}}</div>
|
||||
</div>
|
||||
<div @click="leaveClick(item, index)"
|
||||
style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<div>
|
||||
<span style="color: grey">会议时间:</span>
|
||||
{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<!--<div><span style="color: grey">结束时间:</span>{{moment(item.endTime).format('YYYY-MM-DD HH:mm')}}</div>-->
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="flag === true" class="border_div"></div>
|
||||
<van-icon v-if="flag === true" :class="'checkDiv checkDiv' + index"
|
||||
name="success" style="display: none;"></van-icon>
|
||||
<span class="auditState"
|
||||
v-if="item.isJoin === false">{{item.stateName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.isJoin === false">
|
||||
<div><span style="color: grey">审核状态:</span>{{item.stateName}}</div>
|
||||
</div>
|
||||
<div>
|
||||
<span style="float: left; color: grey">请假原因:</span>
|
||||
<van-field :disabled="item.isJoin === false" placeholder="请输入请假原因" rows="1"
|
||||
style="font-size: 12px; padding: 0; width: 70%; line-height: 20px"
|
||||
type="textarea" autosize
|
||||
v-model="item.leaveReason"></van-field>
|
||||
</div>
|
||||
<div v-if="flag === false && item.stateCode === clickRow.firstState && item.stateAuditType !== 1"
|
||||
style="text-align: right">
|
||||
<van-button @click.stop="cancelLeave(item)" border color="#1867b0" size="small">
|
||||
取消请假
|
||||
</van-button>
|
||||
</div>
|
||||
<div v-if="flag === false && item.stateAuditType === 1" style="text-align: right">
|
||||
<van-button @click.stop="refreshApply(item)" border color="#1867b0"
|
||||
size="small">重新申请
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="flag === true">
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 20px; width: 100%">
|
||||
<van-button @click="leaveShow = false" color="lightgrey" size="small"
|
||||
style="width: 40%; border-radius: revert; height: 38px">取消
|
||||
</van-button>
|
||||
<van-button @click="leave" color="#1867b0" size="small"
|
||||
style="width: 40%; border-radius: revert; height: 38px">确定
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
timeList: [],
|
||||
checked: [],
|
||||
checkboxRefs: [],
|
||||
leaveReason: '',
|
||||
leaveShow: false,
|
||||
popupShow: false,
|
||||
tabNameIndex: 0,
|
||||
clickRow: {},
|
||||
meetingList: [{text: '全部', value: '0'}, {text: '我参与的', value: '1'}, {
|
||||
text: '我请假的',
|
||||
value: '2'
|
||||
}],
|
||||
typeList: [],
|
||||
meetingTimeList: [{text: '全部时间', value: null}, {
|
||||
text: '即将开始',
|
||||
value: 0
|
||||
}, {text: '已结束', value: 1}],
|
||||
flag: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refreshApply(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要重新申请吗?',
|
||||
}).then(async () => {
|
||||
await this.needLeave(this.clickRow, true)
|
||||
this.timeList.forEach((re, index) => {
|
||||
if (re.stateAuditType === 1) {
|
||||
re.isJoin = null
|
||||
re.stateCode = null
|
||||
re.leaveReason = null
|
||||
$('.checkDiv' + index).css('display', 'none')
|
||||
this.checked = this.checked.filter(function (item, index) {
|
||||
return item.id !== re.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
|
||||
},
|
||||
cancelLeave(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要取消请假吗?',
|
||||
}).then(async () => {
|
||||
const res = await $.post('/mobile/meeting/mine/cancelLeave', {id: o.id})
|
||||
if (res.code === 0) {
|
||||
vant.Toast('操作成功')
|
||||
this.doSearch()
|
||||
this.leaveShow = false
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
leaveClick(item, index) {
|
||||
if (item.isJoin === false) {
|
||||
return
|
||||
}
|
||||
const isExist = this.checked.some(o => o.tpuId === item.tpuId)
|
||||
if (!isExist) {
|
||||
$('.checkDiv' + index).css('display', '')
|
||||
this.checked.push(item)
|
||||
} else {
|
||||
$('.checkDiv' + index).css('display', 'none')
|
||||
this.checked = this.checked.filter(o => o.tpuId !== item.tpuId)
|
||||
}
|
||||
},
|
||||
toggle(item, index) {
|
||||
if (item.auditIdList === null) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
}
|
||||
},
|
||||
openView(id) {
|
||||
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/meeting/mine/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 needLeave(o, flag) {
|
||||
this.flag = flag
|
||||
this.clickRow = o
|
||||
if (moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false) {
|
||||
vant.Toast('抱歉,已过请假截止时间');
|
||||
return
|
||||
}
|
||||
this.leaveReason = ''
|
||||
this.checked = []
|
||||
const res = await $.post('/mobile/meeting/mine/findMyMeetPeriod', {meetingId: o.id})
|
||||
if (res.code === 0) {
|
||||
this.timeList = res.data
|
||||
if (this.timeList.length === 0) {
|
||||
vant.Toast('您暂无可请假的假时间段');
|
||||
return
|
||||
}
|
||||
|
||||
this.leaveShow = true
|
||||
this.$nextTick(function () {
|
||||
this.timeList.forEach((re, index) => {
|
||||
if (re.isJoin === false) {
|
||||
this.checked.push(re)
|
||||
$('.checkDiv' + index).css('display', '')
|
||||
}
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
vant.Toast('系统错误,请联系管理员');
|
||||
},
|
||||
async leave() {
|
||||
if (this.checked.length === 0) {
|
||||
vant.Toast('请选择请假时间段');
|
||||
return
|
||||
}
|
||||
const array = this.timeList.find(o => o.stateCode === null || o.stateCode < this.clickRow.firstState)
|
||||
if (array === undefined) {
|
||||
vant.Toast('您的所有请假均已处于审核阶段');
|
||||
return
|
||||
}
|
||||
const paramArray = []
|
||||
let valid = false
|
||||
this.checked.forEach(item => {
|
||||
if (item.leaveReason === '' || item.leaveReason === undefined) {
|
||||
vant.Toast('请填写请假原因');
|
||||
valid = true
|
||||
return
|
||||
}
|
||||
if (!item.stateCode) {
|
||||
paramArray.push(
|
||||
{
|
||||
id: item.tpuId,
|
||||
meetingId: this.clickRow.id,
|
||||
leaveReason: item.leaveReason
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
if (paramArray.length === 0) {
|
||||
vant.Toast('请选择请假时间段');
|
||||
return
|
||||
}
|
||||
if (valid) {
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/mobile/meeting/mine/askForLeave', {
|
||||
meetingId: this.clickRow.id,
|
||||
data: JSON.stringify(paramArray)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast('操作成功');
|
||||
this.doSearch()
|
||||
this.leaveShow = false
|
||||
}
|
||||
$('.checkDiv').css('display', 'none')
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await meetUtil.getAllMeetingType()
|
||||
this.typeList.unshift({'text': '全部会议类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.$set(this.pageForm, "tabNameIndex", this.meetingList[0].value)
|
||||
this.$set(this.pageForm, "meetingTime", this.meetingTimeList[1].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,320 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#app {
|
||||
max-height: 100vh;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 400px;
|
||||
max-height: 400px;
|
||||
background-color: white
|
||||
}
|
||||
|
||||
.body {
|
||||
background-color: white;
|
||||
margin-top: 6px;
|
||||
height: calc(100vh - (400px + 6px + 26px + 70px));
|
||||
max-height: calc(100vh - (400px + 6px + 26px + 70px));
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
margin-top: 6px;
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.meeting_info {
|
||||
height: 200px;
|
||||
width: 86%;
|
||||
margin: 0 auto;
|
||||
transform: translateY(-60%);
|
||||
background-color: white;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
padding: 10px 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.header .text {
|
||||
color: white;
|
||||
text-align: center;
|
||||
letter-spacing: 3px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.meeting_info .meeting_name {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.meeting_info .meeting_address {
|
||||
text-align: center;
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-button--block {
|
||||
margin: 0 auto;
|
||||
width: 92%;
|
||||
}
|
||||
|
||||
.tag {
|
||||
color: #1867b0;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.span_text {
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-col span {
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 6.4em;
|
||||
height: 6.4em;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 10px;
|
||||
-webkit-mask-size: 100%;
|
||||
-webkit-mask-position: 50% 50%;
|
||||
background-color: currentColor;
|
||||
}
|
||||
|
||||
.icon_ok {
|
||||
-webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E);
|
||||
color: #07c160;
|
||||
}
|
||||
|
||||
.icon_no {
|
||||
-webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.763-15.864l.11%207.596h1.305l.11-7.596h-1.525zm.759%2010.967c.512%200%20.902-.383.902-.882%200-.5-.39-.882-.902-.882a.878.878%200%2000-.896.882c0%20.499.396.882.896.882z%22%2F%3E%3C%2Fsvg%3E);
|
||||
color: #fa5151;
|
||||
}
|
||||
|
||||
.weui-msg__text-area {
|
||||
margin-bottom: 32px;
|
||||
padding: 0 32px;
|
||||
-webkit-box-flex: 1;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.weui-msg__text-area .weui-msg__title {
|
||||
margin-bottom: 16px;
|
||||
font-weight: 500;
|
||||
font-size: 22px;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
|
||||
.weui-msg__desc {
|
||||
font-size: 17px;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.meeting_index {
|
||||
width: 40px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: lightgrey;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.meeting_peri {
|
||||
width: 90%;
|
||||
line-height: 19px;
|
||||
margin-left: 10px
|
||||
}
|
||||
|
||||
.meeting_primary {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.weui-btn_primary:not(.weui-btn_disabled):visited {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.weui-btn_primary {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.weui-btn {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 184px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 8px 24px;
|
||||
box-sizing: border-box;
|
||||
font-weight: 700;
|
||||
font-size: 17px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
line-height: 1.88235294;
|
||||
border-radius: 8px;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<div v-if="isCanAudit">
|
||||
<div class="header">
|
||||
<div style="height: 300px; background-color: #1867b0; border-radius: 0 0 16% 16%;">
|
||||
<div class="text">会议签到</div>
|
||||
</div>
|
||||
<div class="meeting_info">
|
||||
<div class="meeting_name">{{meetingInfo.meetingName}}</div>
|
||||
<div class="meeting_address">{{meetingInfo.location}}</div>
|
||||
<div style="position: relative; top: 55px">
|
||||
<van-row>
|
||||
<van-col span="24"><span>会议类型:</span>{{typeName}}</van-col>
|
||||
</van-row>
|
||||
<div style="position: relative; top: 30px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; font-size: 14px;">会议时间:</span>
|
||||
{{moment(meetingInfo.startTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; font-size: 14px;">结束时间:</span>
|
||||
{{moment(meetingInfo.endTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div><span class="tag">|</span>会议名称</div>
|
||||
<div style="overflow-y: auto; height: 100%; font-size: 13px;margin-top: 16px">
|
||||
<div class="meeting_primary" v-for="(item,index) in meetingInfo.meetingTimePeriods">
|
||||
<div :style="item.id === mtpId ? 'background-color: #43b26a; font-size: 15px' : ''"
|
||||
class="meeting_index" v-if="item.id === mtpId">
|
||||
当前
|
||||
</div>
|
||||
<div class="meeting_index" style="font-weight: normal" v-else>
|
||||
{{index + 1}}
|
||||
</div>
|
||||
<div class="meeting_peri">
|
||||
<div>{{item.timePeriodName}}</div>
|
||||
<div>{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button :disabled="signInfo.isSignIn" @click="signIn" block color="#1867b0" round type="primary">
|
||||
{{signInfo.isSignIn ? '您已签到' : '点击签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center; padding-top: calc(100% - 50%)" v-cloak v-else>
|
||||
<div style="margin-bottom: 32px;">
|
||||
<span :class="isIncorrect === true ? 'icon icon_ok' : 'icon icon_no'"></span>
|
||||
</div>
|
||||
<div class="weui-msg__text-area">
|
||||
<h2 class="weui-msg__title">{{isIncorrect === true ? '操作成功' : '温馨提示'}}</h2>
|
||||
<p class=".weui-msg__desc">{{incorrectMag}}</p>
|
||||
</div>
|
||||
<p style="margin-top: 190px">
|
||||
<span @click="back" class="weui-btn weui-btn_primary" role="button">点击返回</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
meetingInfo: {},
|
||||
signInfo: {},
|
||||
isCanAudit: true,
|
||||
incorrectMag: '',
|
||||
meetingId: '',
|
||||
mtpId: '',
|
||||
isIncorrect: true,
|
||||
typeName: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const res = await $.get('/mobile/meeting/mine/getMeetingInfo', {
|
||||
meetingId: this.meetingId,
|
||||
mtpId: this.mtpId,
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.meetingInfo = res.data.meetingInfo
|
||||
this.signInfo = res.data.signInfo
|
||||
const typeList = await meetUtil.getAllMeetingType()
|
||||
const type = typeList.find(o => o.id === this.meetingInfo.typeId)
|
||||
this.typeName = type !== undefined ? type.meetingTypeName : ''
|
||||
} else {
|
||||
this.isCanAudit = false
|
||||
this.incorrectMag = res.msg
|
||||
this.isIncorrect = false
|
||||
}
|
||||
$('#app').css('opacity', '1')
|
||||
},
|
||||
async signIn() {
|
||||
const res = await $.post('/mobile/meeting/mine/signIn', {
|
||||
mtpId: this.mtpId,
|
||||
})
|
||||
this.isIncorrect = res.code === 0
|
||||
this.isCanAudit = false
|
||||
this.incorrectMag = res.msg
|
||||
},
|
||||
back() {
|
||||
const str = this.incorrectMag === '你不是当前会议人员' ? 'http://' + window.location.host : '/mobile/meeting/mine/go_sign?meetingId=' + this.meetingId + '&mtpId=' + this.mtpId
|
||||
location.href = str
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.meetingId = getQueryString('meetingId')
|
||||
this.mtpId = getQueryString('mtpId')
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,360 +0,0 @@
|
||||
<!--#
|
||||
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="姓名" value="${@shiro.getPrincipalProperty('loginname')}"
|
||||
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.birthday" clickable
|
||||
left-icon="comment-o"
|
||||
@click="birthdayPicker = true" placeholder="请选择出生日期"
|
||||
:rules="[{ required:true, message: '请选择出生日期' }]"></van-field>
|
||||
<van-popup v-model="birthdayPicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
v-model="birthday"
|
||||
type="data"
|
||||
title="选择出生日期"
|
||||
@confirm="onBirthdayConfirm"
|
||||
@cancel="startTimePicker = false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="出生地点" v-model="formData.birthPlace" placeholder="请填写出生地点"
|
||||
:rules="[{ required:true, message: '请填写出生地点' }]"
|
||||
left-icon="label-o"></van-field>
|
||||
|
||||
<van-field label="民族" v-model="formData.nation" 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.wage" placeholder="请填写工资"
|
||||
:rules="[{ required:true, message: '请填写工资' }]"
|
||||
left-icon="balance-o"></van-field>
|
||||
|
||||
<van-field label="政治面貌" v-model="formData.political" placeholder="请填写政治面貌"
|
||||
left-icon="label-o"
|
||||
:rules="[{ required:true, message: '请填写政治面貌' }]"></van-field>
|
||||
|
||||
|
||||
<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="所属单位" value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
left-icon="cluster-o"
|
||||
readonly></van-field>
|
||||
|
||||
<!-- <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-field label="职务" v-model="formData.position" placeholder="请填写职务"
|
||||
left-icon="star-o"
|
||||
:rules="[{ required:true, message: '请填写职务' }]"></van-field>
|
||||
|
||||
<van-field label="籍贯" v-model="formData.hometown" placeholder="请填写籍贯"
|
||||
left-icon="home-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 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 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-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 = []
|
||||
var 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,
|
||||
birthdayPicker:false,
|
||||
birthday: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({})
|
||||
},
|
||||
onBirthdayConfirm(time) {
|
||||
this.formData.birthday = moment(time).format('YYYY-MM-DD');
|
||||
this.birthdayPicker = false;
|
||||
},
|
||||
},
|
||||
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')}")
|
||||
// this.$set(this.formData, "birthPlace", "${@shiro.getPrincipalProperty('birthPlace')}")
|
||||
// const {data} = await $.get("/mobile/member/getAllNation");
|
||||
/* this.nationColumns = data.map(v => {
|
||||
return v.mzmc
|
||||
}) */
|
||||
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
if(resp.code === 0){
|
||||
this.formData = resp.data
|
||||
this.$set(this.formData, "family", resp.data.family ? JSON.parse(resp.data.family) : [])
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
this.nationColumns = nation
|
||||
}
|
||||
})
|
||||
</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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,65 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,130 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,208 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,49 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,376 +0,0 @@
|
||||
<!--#
|
||||
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="true" @submit="doSubmit" class="mt5"
|
||||
input-align="right"
|
||||
ref="form"
|
||||
scroll-to-error
|
||||
validate-trigger="onSubmit">
|
||||
<van-cell-group inset>
|
||||
<van-field label="工号" left-icon="contact"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"></van-field>
|
||||
<van-field label="姓名" left-icon="contact"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></van-field>
|
||||
<van-field clickable label="性别"
|
||||
left-icon="ellipsis"
|
||||
placeholder="请选择性别"
|
||||
readonly
|
||||
v-model="formData.sex"></van-field>
|
||||
<van-popup position="bottom" v-model="sexPicker">
|
||||
<van-picker
|
||||
:columns="['男','女']"
|
||||
@cancel="sexPicker = false"
|
||||
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field @click="marriagePicker=true" label="婚否" left-icon="ellipsis"
|
||||
readonly placeholder="请选择婚否" v-model="formData.marriage"></van-field>
|
||||
<van-popup position="bottom" v-model="marriagePicker">
|
||||
<van-picker
|
||||
:columns="['已婚','未婚']"
|
||||
@cancel="marriagePicker = false"
|
||||
@confirm="(val)=>{formData.marriage = val;marriagePicker=false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--临时屏蔽-->
|
||||
<template v-if="false">
|
||||
<van-field :rules="[{ required:true, message: '请选择民族' }]" clickable label="民族"
|
||||
left-icon="bar-chart-o"
|
||||
placeholder="请选择民族" readonly
|
||||
v-model="formData.nation"></van-field>
|
||||
<van-popup position="bottom" v-model="nationPicker">
|
||||
<van-picker
|
||||
:columns="nationColumns"
|
||||
@cancel="nationPicker = false"
|
||||
@confirm="(v)=>{formData.nation = v;nationPicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field clickable
|
||||
label="学历"
|
||||
|
||||
left-icon="coupon-o"
|
||||
placeholder="请选择学历" readonly
|
||||
v-model="formData.education"></van-field>
|
||||
<van-popup position="bottom" v-model="educationPicker">
|
||||
<van-picker
|
||||
:columns="educationColumns"
|
||||
@cancel="educationPicker = false"
|
||||
@confirm="(v)=>{formData.education = v;educationPicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field clickable
|
||||
label="学位"
|
||||
left-icon="comment-o"
|
||||
placeholder="请选择学位" readonly
|
||||
v-model="formData.academicDegree"></van-field>
|
||||
<van-popup position="bottom" v-model="academicDegreePicker">
|
||||
<van-picker
|
||||
:columns="academicDegreeColumns"
|
||||
@cancel="academicDegreePicker = false"
|
||||
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="政治面貌" left-icon="label-o"
|
||||
placeholder="请填写政治面貌" readonly
|
||||
v-model="formData.political"></van-field>
|
||||
</template>
|
||||
|
||||
<!-- <van-field @click="idTypePicker=true" label="有效证件类型" left-icon="label-o"-->
|
||||
<!-- placeholder="请选择有效证件类型"-->
|
||||
<!-- readonly v-model="formData.idType">-->
|
||||
<!-- </van-field>-->
|
||||
<van-popup position="bottom" v-model="idTypePicker">
|
||||
<van-picker
|
||||
:columns="idTypeColumns"
|
||||
@cancel="idTypePicker = false"
|
||||
@confirm="(v)=>{formData.idType = v;idTypePicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field label="证件号"
|
||||
left-icon="idcard"
|
||||
placeholder="请填写身份证号码"
|
||||
v-model="formData.idcard"></van-field>
|
||||
<van-field label="联系电话"
|
||||
left-icon="phone-o"
|
||||
placeholder="请填写联系电话"
|
||||
:rules="[{ pattern :/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, message: '请输入正确的手机号' }]"
|
||||
type="tel"
|
||||
v-model="formData.mobile"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="mt10" inset>
|
||||
<!-- <van-field label="户口所在地" left-icon="wap-home-o"-->
|
||||
<!-- placeholder="请填写户口所在地" readonly-->
|
||||
<!-- v-model="formData.registeredResidence"></van-field>-->
|
||||
<!-- <van-field label="现居住地" left-icon="home-o"-->
|
||||
<!-- placeholder="请填写现居住地" readonly-->
|
||||
<!-- v-model="formData.homeAddress"></van-field>-->
|
||||
<van-field label="工作单位" left-icon="cluster-o"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"></van-field>
|
||||
<van-field label="分工会" left-icon="cluster-o"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('union').getUnionname()}"></van-field>
|
||||
<!-- <van-field label="职务" left-icon="debit-pay"-->
|
||||
<!-- placeholder="请填写职务" readonly-->
|
||||
<!-- v-model="formData.position"></van-field>-->
|
||||
</van-cell-group>
|
||||
|
||||
<!-- <van-cell-group class="mt10 up_down" inset>
|
||||
<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 @click="family.push({})" icon="plus"
|
||||
native-type="button" round size="mini" style="width: 40px"
|
||||
type="primary"
|
||||
v-if="family && family.length>0 && family.length<3"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="family && family.length>0">
|
||||
<div class="mt5" v-for="o,i in family">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button @click="family.splice(i,1)"
|
||||
icon="minus" native-type="button" round size="mini"
|
||||
style="width: 40px"
|
||||
type="danger"></van-button>
|
||||
</div>
|
||||
<van-field :rules="[{ required:true, message: '请填写与本人关系' }]" label="关系" placeholder="请填写与本人关系"
|
||||
v-model="o.relation"></van-field>
|
||||
<van-field :rules="[{ required:true, message: '请填写姓名' }]" label="姓名" placeholder="请填写姓名"
|
||||
v-model="o.name"></van-field>
|
||||
<van-field :rules="[{ required:true, message: '请填写联系方式' }]" label="联系方式" placeholder="请填写联系方式"
|
||||
type="tel"
|
||||
v-model="o.mobile"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button @click="family.push({})"
|
||||
icon="plus" native-type="button" round size="mini"
|
||||
style="width: 50px"
|
||||
type="primary"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>-->
|
||||
|
||||
<!-- <van-cell-group class="mt10 up_down" inset>
|
||||
<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
|
||||
|
||||
autosize
|
||||
readonly
|
||||
autosize
|
||||
input-align="left"
|
||||
maxlength="200"
|
||||
placeholder="请输入个人工作简历"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
style="padding: 0"
|
||||
type="textarea"
|
||||
v-model="formData.vita"
|
||||
></van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="mt10 up_down" inset>
|
||||
<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
|
||||
|
||||
autosize
|
||||
autosize
|
||||
readonly
|
||||
input-align="left"
|
||||
maxlength="200"
|
||||
placeholder="请填写个人特长"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
style="padding: 0"
|
||||
type="textarea"
|
||||
v-model="formData.specialSkill"
|
||||
></van-field>
|
||||
</div>
|
||||
</van-cell-group>-->
|
||||
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button :color="themeColor" block native-type="submit" style="border-radius: 10px"
|
||||
type="info">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const political = []
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sexPicker: false,
|
||||
marriagePicker: false,
|
||||
applyRecords: [],
|
||||
formData: {},
|
||||
nationPicker: false,
|
||||
educationPicker: false,
|
||||
academicDegreePicker: false,
|
||||
family: [],
|
||||
educationColumns: [
|
||||
'博士研究生', '硕士研究生', '本科', '专科', '中专中技', '高中', '初中以下'
|
||||
],
|
||||
academicDegreeColumns: [
|
||||
'学士', '硕士', '博士'
|
||||
],
|
||||
nationColumns: [],
|
||||
memberStatusColumn: {
|
||||
MEMBER: 1,
|
||||
APPLYING: 2,
|
||||
NOTMEBMER: 3,
|
||||
},
|
||||
memberStatus: null,
|
||||
idTypePicker: false,
|
||||
idTypeColumns: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: GetQueryString("taskId") ? '您的手机号信息已核对,确认提交?' : '您确定要提交吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const formData = clone(this.formData)
|
||||
formData.taskId = GetQueryString("taskId") ? GetQueryString("taskId") : null
|
||||
formData.family = JSON.stringify(this.family)
|
||||
const resp = await $.post("/platform/member/apply/submit/doEdit", formData)
|
||||
setTimeout(() => {
|
||||
this.$toast.success('提交成功');
|
||||
setTimeout(() => {
|
||||
history.back()
|
||||
// location.replace('/mobile/index')
|
||||
}, 300)
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
addFamily() {
|
||||
this.family.push({})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
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
|
||||
}
|
||||
}
|
||||
this.$set(this.formData, "isMember", "${@shiro.getPrincipalProperty('member')}")
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, "marriage", resp.data.marriage)
|
||||
this.$set(this.formData, "position", "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, "nation", "${@shiro.getPrincipalProperty('nation')}")
|
||||
this.$set(this.formData, "mobile", resp.data.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", resp.data.idcard)
|
||||
this.$set(this.formData, "idType", resp.data.idType)
|
||||
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
|
||||
})
|
||||
|
||||
const idTypeRespData = await getDictByCode("idType")
|
||||
console.log(idTypeRespData)
|
||||
this.idTypeColumns = idTypeRespData.map(v => {
|
||||
return v.name
|
||||
})
|
||||
// console.log(idTypeColumns)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,228 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-dropdown-menu__bar {
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.infoPop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="会员查询"
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
@input="doSearch"
|
||||
:show-action="true"
|
||||
maxlength="10"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="unionList" @change="unionChange"
|
||||
v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch"
|
||||
v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 112px;">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<van-cell-group @click="viewInfo(o.id)" inset>
|
||||
<van-cell :border="false" title="姓名">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px">{{o.username}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="性别">{{o.sex}}</van-cell>
|
||||
<van-cell :border="false" title="出生年月">{{o.birthday}}</van-cell>
|
||||
<!-- <van-cell :border="false" title="人员类型">{{o.personType}}</van-cell>-->
|
||||
<van-cell :border="false" title="联系电话">{{o.mobile}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.unionname}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-if="tableData.length === 0" description="暂无数据"></van-empty>
|
||||
</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>
|
||||
|
||||
<van-popup class="infoPop" v-model="infoShow" position="right">
|
||||
<van-nav-bar @click-left="infoShow = false" fixed left-arrow placeholder safe-area-inset-top
|
||||
title="会员详细信息"></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.unitname }}</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-html="viewData.grjl" v-if="viewData.grjl!=null"></div>
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
pageForm: {
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async unionChange() {
|
||||
await this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/member/getMemberData', 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 viewInfo(id) {
|
||||
const resp = await $.post('/mobile/member/viewInfo', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.infoShow = true
|
||||
}
|
||||
},
|
||||
async initUnion() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionList = await getUnionList(null)
|
||||
} else {
|
||||
this.unionList = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionList.unshift({text: "全部工会", value: null})
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async initUnit(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true' && this.pageForm.unionId === null) {
|
||||
this.unitList.unshift({text: "全部单位", value: null})
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.initUnit("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,112 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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)
|
||||
if(resp.code===0){
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}else{
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,274 +0,0 @@
|
||||
<!--#
|
||||
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.audit" @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="申请方式:"> {{changeOrigin[o.applyOrigin]}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
<div style="text-align: right;margin-bottom: 10px;margin-right: 10px;margin-top: -35px;">
|
||||
|
||||
<van-button :color="themeColor" plain round size="small"
|
||||
type="primary"
|
||||
@click.stop="openView(o)" style="width: 60px">
|
||||
{{o.stateId===60?'审核':'查看'}}
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
</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>
|
||||
<van-popup v-model="popupShow" position="right" :style="{ height: '100%', width: '100%'}">
|
||||
|
||||
<van-nav-bar title="校工会审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="yearChange();popupShow=false"></van-nav-bar>
|
||||
<member-menber-change-info ref="info" 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>
|
||||
<template v-if="info.originUnit">
|
||||
<van-field
|
||||
label="原科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originThreeUnit.name"
|
||||
></van-field>
|
||||
<van-field
|
||||
label="原单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="原工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnion.unionname"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentThreeUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnion.unionname"
|
||||
></van-field>
|
||||
</template>
|
||||
<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-change-info>
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
popupShow: false,
|
||||
mLoading: false,
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '全部', value: 0},
|
||||
{text: '已审核', value: 1},
|
||||
{text: '未审核', value: 2},
|
||||
],
|
||||
info: {
|
||||
originUnion: {},
|
||||
currentUnion: {}
|
||||
},
|
||||
pageForm: {
|
||||
source: 2,
|
||||
year: new Date().getFullYear(),
|
||||
audit: 2,
|
||||
},
|
||||
changeOriginL: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-change-info': httpVueLoader('/components/mobile/member/MobileMemberChangeInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/member/change/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 doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '提醒',
|
||||
message: '确定要审核吗?',
|
||||
}).then(async () => {
|
||||
this.formData.currentUnitId = this.info.currentUnitId
|
||||
this.formData.currentUnionId = this.info.currentUnionId
|
||||
this.formData.currentThreeUnitId = this.info.currentThreeUnitId
|
||||
this.formData.auditPass = pass
|
||||
this.submitLoading = true
|
||||
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
|
||||
this.submitLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.yearChange()
|
||||
this.popupShow = false
|
||||
vant.Toast.success(resp.msg);
|
||||
} else {
|
||||
vant.Toast.fail(resp.msg);
|
||||
}
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
openView(o) {
|
||||
this.handle = o.stateId === 60
|
||||
this.formData = {
|
||||
recordId: o.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
this.popupShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getUserInfo(o.userId)
|
||||
this.$refs.info.getAuditInfo(o.id)
|
||||
setTimeout(() => {
|
||||
this.info = this.$refs.info.info
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
async getChangeOrigin() {
|
||||
const changeOrigin = {}
|
||||
const changeOriginOptions = await getEnumOptions("MemberChangeOrigin")
|
||||
changeOriginOptions.forEach(v => {
|
||||
changeOrigin[v.code] = v.description
|
||||
})
|
||||
return changeOrigin
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.changeOrigin = await this.getChangeOrigin()
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,114 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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)
|
||||
if(resp.code===0){
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}else{
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,274 +0,0 @@
|
||||
<!--#
|
||||
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.audit" @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="申请方式:"> {{changeOrigin[o.applyOrigin]}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
<div style="text-align: right;margin-bottom: 10px;margin-right: 10px;margin-top: -35px;">
|
||||
|
||||
<van-button :color="themeColor" plain round size="small"
|
||||
type="primary"
|
||||
@click.stop="openView(o)" style="width: 60px">
|
||||
{{o.stateId===50?'审核':'查看'}}
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
</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>
|
||||
<van-popup v-model="popupShow" position="right" :style="{ height: '100%', width: '100%'}">
|
||||
|
||||
<van-nav-bar title="分工会审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="yearChange();popupShow=false"></van-nav-bar>
|
||||
<member-menber-change-info ref="info" 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>
|
||||
<template v-if="info.originUnit">
|
||||
<van-field
|
||||
label="原科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originThreeUnit.name"
|
||||
></van-field>
|
||||
<van-field
|
||||
label="原单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="原工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnion.unionname"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentThreeUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnion.unionname"
|
||||
></van-field>
|
||||
</template>
|
||||
|
||||
<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-change-info>
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
popupShow: false,
|
||||
mLoading: false,
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '全部', value: 0},
|
||||
{text: '已审核', value: 1},
|
||||
{text: '未审核', value: 2},
|
||||
],
|
||||
info: {
|
||||
originUnion: {},
|
||||
currentUnion: {}
|
||||
},
|
||||
pageForm: {
|
||||
source: 1,
|
||||
year: new Date().getFullYear(),
|
||||
audit: 2,
|
||||
},
|
||||
changeOriginL: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-change-info': httpVueLoader('/components/mobile/member/MobileMemberChangeInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/member/change/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 doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '提醒',
|
||||
message: '确定要审核吗?',
|
||||
}).then(async () => {
|
||||
this.formData.auditPass = pass
|
||||
this.submitLoading = true
|
||||
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
|
||||
this.submitLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.yearChange()
|
||||
this.popupShow = false
|
||||
vant.Toast.success(resp.msg);
|
||||
} else {
|
||||
vant.Toast.fail(resp.msg);
|
||||
}
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
openView(o) {
|
||||
this.handle = o.stateId === 50
|
||||
this.formData = {
|
||||
recordId: o.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
this.popupShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getUserInfo(o.userId)
|
||||
this.$refs.info.getAuditInfo(o.id)
|
||||
setTimeout(() => {
|
||||
this.info = this.$refs.info.info
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
async getChangeOrigin() {
|
||||
const changeOrigin = {}
|
||||
const changeOriginOptions = await getEnumOptions("MemberChangeOrigin")
|
||||
changeOriginOptions.forEach(v => {
|
||||
changeOrigin[v.code] = v.description
|
||||
})
|
||||
return changeOrigin
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.changeOrigin = await this.getChangeOrigin()
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,184 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
#app {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.icon_text {
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-image {
|
||||
max-height: 300px !important;
|
||||
}
|
||||
|
||||
.not_open {
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 38px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 36px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.number_text {
|
||||
font-size: 36px;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.van-empty__description {
|
||||
font-size: 18px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.van-info--dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<div v-if="active === 0" style="background-color: #f6f7f9; min-height: 100vh">
|
||||
<van-notice-bar
|
||||
left-icon="volume-o" color="#1989fa" background="#ecf9ff"
|
||||
text="温馨提示:只显示当前年份的待办事项"
|
||||
></van-notice-bar>
|
||||
<div @click="toUrl(o)" class="van-doc-card" v-for="o in needItems">
|
||||
<div class="title">{{ o.title }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div>
|
||||
<div style="color: grey; font-size: 15px">{{ o.label }}</div>
|
||||
</div>
|
||||
<div class="number_text">
|
||||
<span>{{ o.number }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
v-if="needItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无待办"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<div v-if="active === 1">
|
||||
<!--轮播图-->
|
||||
<van-swipe class="my-swipe" :autoplay="2000" indicator-color="white">
|
||||
<van-swipe-item v-for="item in photoArray">
|
||||
<van-image width="100%" :height="$(document).height() * 0.26"
|
||||
:src="item.src"></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<!--宫格-->
|
||||
<van-grid :column-num="3" :border="false">
|
||||
|
||||
<van-grid-item v-for="item in gridArray" :class="item.isOpen ? '' : 'not_open'"
|
||||
:url="item.isOpen ? '/mobile/index/toHome?type=' + item.text : ''">
|
||||
<van-image width="48" height="48" :src="item.src"></van-image>
|
||||
<span class="icon_text">{{item.text}}</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item>
|
||||
<image src="/assets/mobile/svg/qxbd.svg" @click="loginOut" width="48" height="48"></image>
|
||||
<span class="icon_text">解除绑定</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<van-tabbar v-model="active" @change="tabbrChange">
|
||||
<van-tabbar-item :dot="needCount" icon="envelop-o">待办</van-tabbar-item>
|
||||
<van-tabbar-item icon="home-o">工作台</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
active: 1,
|
||||
needCount: 0,
|
||||
needItems: [],
|
||||
photoArray: [
|
||||
{src: '/assets/mobile/img/home/home1.png'},
|
||||
{src: '/assets/mobile/img/home/home2.png'},
|
||||
{src: '/assets/mobile/img/home/home3.png'},
|
||||
],
|
||||
gridArray: [
|
||||
// {src: '/assets/mobile/img/home/8活动报名.jpg', text: '活动报名', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/7会员申请.jpg', text: '会员管理', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/9我的福利.jpg', text: '我的福利', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/1民主管理.jpg', text: '民主管理', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/6文体活动.jpg', text: '文体活动', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/3职工权益.jpg', text: '职工权益', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/2日常办公.jpg', text: '日常办公', isOpen: true,},
|
||||
// {src: '/assets/mobile/img/home/4教育培训.jpg', text: '教育培训', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/5校园文化.jpg', text: '校园文化', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/11女工计生.png', text: '女工计生', isOpen: true,},
|
||||
// {src: '/assets/mobile/img/home/10心理咨询.jpg', text: '法律援助', isOpen: true,},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async loginOut() {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消绑定吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
window.location.href = "/platform/login/logout"
|
||||
}
|
||||
},
|
||||
tabbrChange(o) {
|
||||
this.needItems = []
|
||||
this.initData()
|
||||
},
|
||||
toUrl(o) {
|
||||
location.href = o.url
|
||||
},
|
||||
/**
|
||||
* 入学登记待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getRxdjAgenda() {
|
||||
const {data, code} = await $.get("/platform/rxdj/agent/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.number > 0))
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
await this.getRxdjAgenda()
|
||||
this.needCount = this.needItems.length
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
<!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.25/index.min.css"/>-->
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/cdn.staticfile.org_vant_2.12.25_index.min.css"/>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/index.min.css"/>
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/themify-icons.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/font-awesome.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.13.2/vant.min.js"></script>-->
|
||||
<script src="${base!}/assets/mobile/js/cdn.staticfile.org_vant_2.12.25_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/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/mobile/js/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!}"
|
||||
</script>
|
||||
${layoutContent}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,206 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,82 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,137 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="团长审核" fixed placeholder safe-area-inset-top @click-left="history.back()"
|
||||
:left-arrow="leftArrow"></van-nav-bar>
|
||||
<proposal-info :proposal_id="proposalId" title="团长审核" :handle="handle" ref="info">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
团长审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-cell-group class="info">
|
||||
<van-cell title="审核时间" :value="formData.auditTime"></van-cell>
|
||||
<van-field
|
||||
input-align="right"
|
||||
v-model="formData.opinion"
|
||||
rows="2"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
placeholder="请输入审核意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-row type="flex" :gutter="20" style="padding: 20px 0px">
|
||||
<van-col span="12" style="padding: 0 10px">
|
||||
<van-button plain size="large" @click="doAudit(0)">退回</van-button>
|
||||
</van-col>
|
||||
<van-col span="12" style="padding: 0 10px">
|
||||
<van-button :color="themeColor" block size="large" @click="doAudit(1)">通过</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</proposal-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
leftArrow: false,
|
||||
handle: true,
|
||||
proposalId: GetQueryString('proposal_id'),
|
||||
formData: {
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
opinion: '',
|
||||
proposalId: GetQueryString('proposal_id')
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'proposal-info': httpVueLoader('/components/proposal/mobile/ProposalInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doAudit(flag) {
|
||||
if (this.formData.opinion === '') {
|
||||
vant.Toast('请输入审核意见');
|
||||
return
|
||||
}
|
||||
|
||||
const res = flag === 1 ? '通过' : '退回'
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定' + res + '该提案吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast({
|
||||
duration: 0,
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
|
||||
const resp = await $.post("/platform/proposal/transact/audit/doAudit", {
|
||||
audit: JSON.stringify(this.formData),
|
||||
flag: flag
|
||||
})
|
||||
|
||||
if (resp.code === 0) {
|
||||
setTimeout(async () => {
|
||||
loading.type = 'success'
|
||||
loading.message = '提交成功'
|
||||
loading.close()
|
||||
this.handle = await mProposal.GetProposalStateCode(this.proposalId) === 200
|
||||
this.$refs.info.openView(this.proposalId)
|
||||
}, 1200)
|
||||
} else {
|
||||
loading.type = 'fail'
|
||||
loading.message = '提交失败,请联系管理员'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
if (GetQueryString("mobile")) this.leftArrow = true
|
||||
const proposal_id = GetQueryString("proposal_id")
|
||||
const biz_key = GetQueryString("biz_key")
|
||||
if (proposal_id === '' || biz_key === '') {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '非法参数',
|
||||
showConfirmButton: false
|
||||
}).then(() => {
|
||||
})
|
||||
return
|
||||
}
|
||||
this.handle = await mProposal.GetProposalStateCode(this.proposalId) === 200
|
||||
const lastIndex = window.location.href.lastIndexOf('&')
|
||||
if (window.location.href.substr(lastIndex + 1, 6) === 'ticket') {
|
||||
window.document.location.replace(window.location.href.substring(0, lastIndex))
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,236 +0,0 @@
|
||||
<!--#
|
||||
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(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
|
||||
})
|
||||
},
|
||||
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 = '/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)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.onLoad()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,480 +0,0 @@
|
||||
<!--#
|
||||
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, .van-button--mini {
|
||||
border-radius: 15px;
|
||||
height: 23px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.train-title .van-button--small, .van-button--mini {
|
||||
max-width: 100px;
|
||||
width: auto;
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
|
||||
</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">
|
||||
<div>
|
||||
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
|
||||
</div>
|
||||
<div>
|
||||
<van-button v-if="o.mannerCode==='W01' && o.stateCode < 200"
|
||||
@click.stop="openFuyi(o)" color="#1867b0" size="small"
|
||||
type="primary">邀请附议人
|
||||
</van-button>
|
||||
|
||||
<van-button v-if="showSubmitBtn(o)"
|
||||
@click.stop="doSubmit(o)" color="#1867b0" size="mini"
|
||||
type="primary">提交
|
||||
</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 :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" :key="c.k">
|
||||
<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" :key="x.id">
|
||||
<van-cell
|
||||
v-if="c.isShow && x.isShow"
|
||||
:id="'van-cell-'+x.id"
|
||||
:key="x.id"
|
||||
:title="x.username + '-' + x.loginname + '-' + x.dbtName"
|
||||
@click="fuyiToggle(x.id)"
|
||||
clickable
|
||||
>
|
||||
<template #right-icon>
|
||||
<van-checkbox :name="x.id" @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))
|
||||
var 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,
|
||||
proposalConfig: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async showSubmitBtn(row) {
|
||||
const {alreadySecondedCount, stateCode} = row
|
||||
if (row.mannerCode === 'W01') {
|
||||
if (stateCode !== 150) {
|
||||
return false
|
||||
}
|
||||
const {submitMode, seconderNum} = this.proposalConfig
|
||||
if (submitMode === 'AMT' || submitMode === "manual") {
|
||||
return alreadySecondedCount === seconderNum
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
return stateCode === 100
|
||||
}
|
||||
|
||||
// [proposal.UNSUBMIT].includes(row.stateCode) && row.mannerCode != 'W01' || (!config.isAutoSubmit && row.mannerCode == 'W01')
|
||||
},
|
||||
|
||||
|
||||
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) || c.loginname.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) {
|
||||
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() {
|
||||
const userIds = this.helpDb
|
||||
const userNames = this.dbList.filter(v => userIds.includes(v.id)).map(v => v.username).join('、')
|
||||
vant.Dialog.confirm({
|
||||
title: '',
|
||||
message: this.helpDb.length > 0 ? ('您邀请了' + userNames + this.helpDb.length + '位附议人,您确定要邀请吗?确定后会有信息通知') : '您没有选择附议人请确认',
|
||||
}).then(async () => {
|
||||
const resp = await $.post("/platform/proposal/transact/compose/addSeconded", {
|
||||
proposalId: this.proposalId,
|
||||
users: JSON.stringify(userIds),
|
||||
})
|
||||
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(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
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = '/mobile/proposal/compose/view?biz_key=' + null + '&proposal_id=' + id + '&mobile=' + true
|
||||
},
|
||||
doSubmit({id, mannerCode}) {
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要提交吗?',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/proposal/transact/compose/doSubmit', {
|
||||
id,
|
||||
mannerCode
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('提交成功')
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.proposalConfig = await mProposal.getProposalConfig()
|
||||
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)
|
||||
}
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
// vue.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,42 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="提案信息" fixed placeholder :left-arrow="leftArrow" safe-area-inset-top
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<proposal-info :proposal_id="proposalId" ref="pi"></proposal-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
leftArrow: false,
|
||||
proposalId: GetQueryString('proposal_id')
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'proposal-info': httpVueLoader('/components/proposal/mobile/ProposalInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
if (GetQueryString("mobile")) this.leftArrow = true
|
||||
const proposal_id = GetQueryString("proposal_id")
|
||||
const biz_key = GetQueryString("biz_key")
|
||||
if (proposal_id === '' || biz_key === '') {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '非法参数',
|
||||
showConfirmButton: false
|
||||
}).then(() => {
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,174 +0,0 @@
|
||||
<!--#
|
||||
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>
|
||||
var 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(loc()+'/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 = '/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()
|
||||
const stateResp = await $.get("/platform/proposal/common/getOpenProposalState")
|
||||
this.stateList = stateResp.data.map(v => {
|
||||
return {
|
||||
text: v.stateName,
|
||||
value: v.stateCode
|
||||
}
|
||||
})
|
||||
this.stateList.unshift({text: '状态(全部)', value: null})
|
||||
|
||||
|
||||
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)
|
||||
let delegationList = await mProposal.getDelegation(this.pageForm.meetingId)
|
||||
delegationList = delegationList.map(v => {
|
||||
return {
|
||||
text: v.dbtname,
|
||||
value: v.id
|
||||
}
|
||||
})
|
||||
delegationList.unshift({text: '代表团(全部)', value: null})
|
||||
this.delegationList = delegationList
|
||||
|
||||
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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,108 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="附议提案" fixed placeholder :left-arrow="leftArrow" safe-area-inset-top
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<proposal-info :proposal_id="proposalId" ref="pi"></proposal-info>
|
||||
|
||||
<van-row v-if="secondedInfo.isAgree==null">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
附议提案
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;justify-content: space-around;padding: 5px 0 20px 0;">
|
||||
<van-button :color="themeColor" plain style="flex: 1;margin: 0 10px 0 10px" @click="openDialog(false)">拒绝
|
||||
</van-button>
|
||||
<van-button :color="themeColor" style="flex: 1;margin: 0 10px 0 10px" @click="openDialog(true)">同意
|
||||
</van-button>
|
||||
</div>
|
||||
</van-row>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
leftArrow: false,
|
||||
proposalId: GetQueryString('proposal_id'),
|
||||
secondedInfo: {
|
||||
isAgree: false
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'proposal-info': httpVueLoader('/components/proposal/mobile/ProposalInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
openDialog(flag) {
|
||||
const res = flag === true ? '通过' : '拒绝'
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定' + res + '附议该提案吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast({
|
||||
duration: 0,
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
const resp = await $.post("/platform/proposal/transact/seconded/doAudit", {
|
||||
secondedId: this.secondedInfo.id,
|
||||
proposalId: this.proposalId,
|
||||
flag: flag
|
||||
})
|
||||
|
||||
if (resp.code === 0) {
|
||||
setTimeout(async () => {
|
||||
loading.type = 'success'
|
||||
loading.message = '提交成功'
|
||||
loading.close()
|
||||
this.$refs.pi.openView(this.proposalId)
|
||||
this.getSecondedCount()
|
||||
}, 1200)
|
||||
} else {
|
||||
loading.type = 'fail'
|
||||
loading.message = '提交失败,请联系管理员'
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
getSecondedCount() {
|
||||
const biz_key = GetQueryString("biz_key")
|
||||
$.post("/mobile/proposal/seconded/getSecondedCount", {
|
||||
proposalId: this.proposalId,
|
||||
id: biz_key
|
||||
}).then(res => {
|
||||
this.secondedInfo = res.data
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
if (GetQueryString("mobile")) this.leftArrow = true
|
||||
const proposal_id = GetQueryString("proposal_id")
|
||||
const biz_key = GetQueryString("biz_key")
|
||||
if (proposal_id === '' || biz_key === '') {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '非法参数',
|
||||
showConfirmButton: false
|
||||
}).then(() => {
|
||||
})
|
||||
return
|
||||
}
|
||||
this.getSecondedCount();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,241 +0,0 @@
|
||||
<!--#
|
||||
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>附议
|
||||
</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>
|
||||
var 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(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
|
||||
})
|
||||
},
|
||||
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 = '/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()
|
||||
},
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.onLoad()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,353 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<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 @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>
|
||||
var 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 mProposal.needSignState.map(v => v.stateCode).includes(100)
|
||||
},
|
||||
}
|
||||
},
|
||||
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.brief || this.formData.brief.length < this.config.words) {
|
||||
vant.Toast('提案案由最少需要' + this.config.words + '字')
|
||||
return
|
||||
}
|
||||
|
||||
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 = "/mobile/proposal/compose"
|
||||
} else {
|
||||
this.$toast.fail('失败');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
async doSubmit() {
|
||||
this.$refs["addForm"].validate().then(async () => {
|
||||
if (!this.formData.brief || this.formData.brief.length < this.config.words) {
|
||||
vant.Toast('提案案由最少需要' + this.config.words + '字')
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定要提交此提案吗?',
|
||||
}).then(async () => {
|
||||
if (this.formData.sign !== "") {
|
||||
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
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('成功');
|
||||
window.location.href = "/mobile/proposal/compose"
|
||||
} else {
|
||||
this.$toast.fail('失败');
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
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 mProposal.getProposalConfig()
|
||||
|
||||
vant.Dialog.alert({
|
||||
title: '撰写须知',
|
||||
message: this.config.writeRemind,
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
|
||||
this.meetingOptions = await mProposal.getOpenMeeting()
|
||||
const typeOptions = await mProposal.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 mProposal.getDelegation(this.formData.teacherMeetingId)
|
||||
|
||||
|
||||
delegationOptions.forEach(v => {
|
||||
this.delegationOptions.push({value: v.id, text: v.dbtname})
|
||||
})
|
||||
this.typeOptions = typeOptions.filter(v => v.value)
|
||||
console.log(this.typeOptions)
|
||||
|
||||
// typeOptions.forEach(v => {
|
||||
// this.typeOptions.push({value: v.id, text: v.typeName})
|
||||
// })
|
||||
|
||||
this.$set(this.formData, "delegationId", this.delegationOptions.length > 0 ? this.delegationOptions[0].value : '')
|
||||
this.$set(this.formData, "delegationName", this.delegationOptions.length > 0 ? 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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,430 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
margin: 0 0 10px 0;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
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: 24px;
|
||||
white-space: break-spaces;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.time_info .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"
|
||||
:src="CREATE_PREVIEW_URL(doctorData.avatar)"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
{{doctorData.username}}
|
||||
</div>
|
||||
<div>
|
||||
{{doctorData.sex}}
|
||||
</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>
|
||||
<van-button @click="apply(item)" :color="item.className" size="small">{{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" style="margin-top: 20px">简介</div>
|
||||
<pre class="label_text">{{doctorData.introduce ? doctorData.introduce : '暂无数据,该资料待补充'}}</pre>
|
||||
<div class="label">擅长方向</div>
|
||||
<pre class="label_text">{{doctorData.specialty ? doctorData.specialty : '暂无数据,该资料待补充'}}</pre>
|
||||
<div class="label" style="margin-top: 20px">工作理念</div>
|
||||
<pre class="label_text">{{doctorData.workingIdeal ? doctorData.workingIdeal : '暂无数据,该资料待补充'}}</pre>
|
||||
</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 :rules="[{ required: true, message: '请填写手机号' }]"
|
||||
required placeholder="请填写手机号"
|
||||
type="tel"
|
||||
v-model=chooseData.userMobile
|
||||
label="预约人电话"></van-field>-->
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
|
||||
<div v-if="chooseData.askType">
|
||||
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true"
|
||||
required :rules="[{ required: true, message: '请选择咨询方式' }]"
|
||||
placeholder="请选择咨询方式"></van-field>
|
||||
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm"
|
||||
@cancel="appointmentAskTypeShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<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 {
|
||||
appointmentAskTypeShow: false,
|
||||
askTypeList: [],
|
||||
askTypeArray: [],
|
||||
show: false,
|
||||
doctorId: '',
|
||||
doctorData: {},
|
||||
active: 0,
|
||||
timeData: [],
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
chooseData: {
|
||||
userMobile: null
|
||||
},
|
||||
appointmentUserNote: '',
|
||||
appointmentAskTypeText: '',
|
||||
appointmentAskTypeValue: '',
|
||||
typeId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
askTypeConfirm(val) {
|
||||
this.$set(this, "appointmentAskTypeText", val.text)
|
||||
this.$set(this, "appointmentAskTypeValue", val.value)
|
||||
this.appointmentAskTypeShow = false
|
||||
},
|
||||
async doSubmit() {
|
||||
/* if (!this.chooseData.userMobile.trim()) {
|
||||
this.$toast.fail("请填写手机号");
|
||||
return
|
||||
}*/
|
||||
if (!this.appointmentAskTypeValue) {
|
||||
this.$toast.fail("请选择咨询方式");
|
||||
return
|
||||
}
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
appointmentAskTypeValue: this.appointmentAskTypeValue,
|
||||
userMobile: this.chooseData.userMobile,
|
||||
id: this.chooseData.id,
|
||||
isAdd: true,
|
||||
}
|
||||
const resp = await $.post('/mobile/psychologyPro/doApply', params)
|
||||
if (resp.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您已预约成功!',
|
||||
confirmButtonColor: '#1867b0'
|
||||
}).then(() => {
|
||||
location.replace('/mobile/psychologyPro/myApplyList')
|
||||
});
|
||||
} else if (resp.code === 1) {
|
||||
this.$toast.error(resp.msg)
|
||||
} else if (resp.code === 2) {
|
||||
this.$toast.error(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async apply(o) {
|
||||
if (o.title !== '可预约') {
|
||||
return
|
||||
}
|
||||
|
||||
//查询最近半年有没有预约3次,半年内不超过3次
|
||||
const {data: applyNum} = await $.post("/platform/psychology/appointmentApply/getAppointmentApplyNum")
|
||||
if (applyNum) {
|
||||
this.$toast("您半年内已预约三次暂时无法在预约")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
this.askTypeArray = []
|
||||
if (o.askType) {
|
||||
const array = JSON.parse(o.askType)
|
||||
this.askTypeList.map(o => {
|
||||
if (array.includes(o.code)) {
|
||||
this.askTypeArray.push({text: o.name, value: o.code})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.askTypeArray && this.askTypeArray.length === 1) {
|
||||
this.appointmentAskTypeText = this.askTypeArray[0].text
|
||||
this.appointmentAskTypeValue = this.askTypeArray[0].value
|
||||
}
|
||||
this.chooseData = o
|
||||
// this.$set(this.chooseData, "userMobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
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
|
||||
this.pageForm.typeId = this.typeId
|
||||
const resp = await $.post('/mobile/psychologyPro/getDataByDoctorId', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const record = resp.data.list.find(v => v.appointmentUser === userId)
|
||||
if (record) {
|
||||
resp.data.list.forEach(v => {
|
||||
if (new Date().getTime() > v.startTimeTs) {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
} else {
|
||||
if (v.appointmentUser === userId) {
|
||||
v.className = 'gray'
|
||||
v.title = '我已预约'
|
||||
} else {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
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')
|
||||
this.typeId = getQueryVariable('typeId')
|
||||
this.askTypeList = await getDictOptions("psychology_asktype")
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,259 +0,0 @@
|
||||
<!--#
|
||||
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: 28%;*/
|
||||
/*}*/
|
||||
|
||||
/*.other_info {*/
|
||||
/* width: 72%;*/
|
||||
/* 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;*/
|
||||
/*}*/
|
||||
|
||||
/*.van-dropdown-menu__item {*/
|
||||
/* flex: auto;*/
|
||||
/*}*/
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.therapist-card {
|
||||
background: white;
|
||||
margin: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
padding: 16px;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #f1f3f5;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
border: 2px solid #f8f9fa;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 17px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 4px;
|
||||
color: #212529;
|
||||
}
|
||||
|
||||
.meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.gender {
|
||||
font-size: 13px;
|
||||
color: #868e96;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
font-size: 13px;
|
||||
color: #868e96;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #495057;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.section-title i {
|
||||
margin-right: 8px;
|
||||
color: #adb5bd;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.section-content {
|
||||
font-size: 14px;
|
||||
color: #495057;
|
||||
line-height: 1.7;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="心理咨询师列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<div style="height: calc(100vh - 50px - 46px - 50px );overflow-y: auto">
|
||||
<div class="therapist-card" v-for="item in tableData" :key="item.id" @click="toApply(item)">
|
||||
<div class="card-header">
|
||||
<img :src="CREATE_PREVIEW_URL(item.avatar)" alt="任瑞" class="avatar"
|
||||
onerror="this.src='https://via.placeholder.com/80'">
|
||||
<div class="info">
|
||||
<div class="name">{{item.username}}</div>
|
||||
<div>
|
||||
<span class="gender female"><i class="fa fa-venus"></i> {{item.sex}}</span>
|
||||
</div>
|
||||
<div class="unit">{{item.unitName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="section">
|
||||
<div class="section-title"><i class="fa fa-graduation-cap"></i>简介</div>
|
||||
<div class="section-content">
|
||||
{{item.introduce}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title"><i class="fa fa-heart"></i>擅长领域</div>
|
||||
<div class="section-content">{{item.specialty}}</div>
|
||||
</div>
|
||||
|
||||
<div class="section" v-if="item.workingIdeal">
|
||||
<div class="section-title"><i class="fa fa-quote-left"></i>工作理念</div>
|
||||
<div class="section-content">{{item.workingIdeal}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--咨询师列表-->
|
||||
<!-- <div class="info" @click="toApply(item)" v-for="item in tableData" style="margin-bottom: 20px">-->
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <!–头像–>-->
|
||||
<!-- <div class="avatar">-->
|
||||
<!-- <van-image width="80" :src="CREATE_PREVIEW_URL(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 class="desc">-->
|
||||
<!-- <span style="color: grey">擅长方向:</span>{{item.specialty}}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span style="color: grey">简介:</span>{{item.introduce}}-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"-->
|
||||
<!-- description="暂无数据">-->
|
||||
<!-- </van-empty>-->
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/psychologyPro/entrance">心理咨询预约</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/psychologyPro/myApplyList">我的预约</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
typeList: [
|
||||
{text: '时间不限', value: 'no'},
|
||||
{text: '本周', value: 'thisWeek'},
|
||||
{text: '下周', value: 'nextWeek'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
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 + '&typeId=' + this.pageForm.typeId
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,481 +0,0 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.cancel-button .van-button {
|
||||
height: 24px !important;
|
||||
padding: 0 12px !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;
|
||||
}
|
||||
|
||||
.label {
|
||||
border-left: 5px #1867b0 solid;
|
||||
border-radius: 4px;
|
||||
padding-left: 6px;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.label_text {
|
||||
color: grey;
|
||||
line-height: 24px;
|
||||
white-space: break-spaces;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
</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">
|
||||
<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===2330" type="success">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2320" type="error">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2310" 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()" style="margin-right: 4px"
|
||||
@click.stop="update(o)" round size="small" color="#1867b0">修改
|
||||
</van-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="预约咨询方式">{{ getAskTypeName() }}</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.doctorMobile || '暂无'}}</van-cell>
|
||||
<van-cell title="擅长方向">{{ viewData.doctorSpecialty || '暂无'}}</van-cell>
|
||||
<van-cell title="工作理念">{{ viewData.doctorWorkingIdeal || '暂无'}}</van-cell>
|
||||
<van-cell title="咨询方式">
|
||||
<div v-if="!viewData.askType || getDoctorAskTypeName().length === 0">暂无</div>
|
||||
<div v-else>
|
||||
<div v-for="item in getDoctorAskTypeName()">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell @click="doctorIntroduceShow = true" title="咨询师简介" is-link>
|
||||
<div style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: break-word;">
|
||||
{{ viewData.doctorIntroduce || '暂无'}}
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model:show="doctorIntroduceShow" position="bottom" round style="padding: 20px; width: auto">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<div class="label">咨询师简介</div>
|
||||
<div @click="doctorIntroduceShow = false">
|
||||
<van-icon name="cross"></van-icon>
|
||||
</div>
|
||||
</div>
|
||||
<pre class="label_text">{{viewData.doctorIntroduce ? viewData.doctorIntroduce : '暂无数据,该资料待补充'}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model="infoShow" class="apply_pop" position="right">
|
||||
<van-nav-bar
|
||||
title="预约信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false">
|
||||
</van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-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.doctorUserName"
|
||||
label="咨询师姓名"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.doctorMobile"
|
||||
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 :rules="[{ required: true, message: '请填写电话' }]"
|
||||
required
|
||||
type="tel"
|
||||
v-model=chooseData.userMobile
|
||||
label="预约人电话"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
|
||||
<div v-if="chooseData.askType">
|
||||
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true"
|
||||
placeholder="请选择咨询方式"></van-field>
|
||||
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm"
|
||||
@cancel="appointmentAskTypeShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/psychologyPro/entrance">心理咨询预约</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/psychologyPro/myApplyList">我的预约</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1,
|
||||
appointmentAskTypeText: '',
|
||||
appointmentUserNote: '',
|
||||
appointmentAskTypeShow: false,
|
||||
appointmentAskTypeValue: '',
|
||||
askTypeArray: [],
|
||||
chooseData: {},
|
||||
infoShow: false,
|
||||
doctorIntroduceShow: false,
|
||||
stateList: [
|
||||
{text: '全部预约状态', value: null},
|
||||
{text: '预约中', value: 2100},
|
||||
{text: '预约成功', value: 2300},
|
||||
{text: '预约失败', value: 2200}
|
||||
],
|
||||
askTypeList: [],
|
||||
show: false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update(o) {
|
||||
this.askTypeArray = []
|
||||
if (o.askType) {
|
||||
const array = JSON.parse(o.askType)
|
||||
this.askTypeList.map(o => {
|
||||
if (array.includes(o.code)) {
|
||||
this.askTypeArray.push({text: o.name, value: o.code})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (o.appointmentAskTypeValue) {
|
||||
const type = this.askTypeList.find(x => x.code === o.appointmentAskTypeValue)
|
||||
this.appointmentAskTypeText = type ? type.name : ''
|
||||
}
|
||||
this.chooseData = o
|
||||
this.appointmentUserNote = o.appointmentUserNote
|
||||
this.$set(this.chooseData, "userMobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.infoShow = true
|
||||
},
|
||||
askTypeConfirm(val) {
|
||||
this.$set(this, "appointmentAskTypeText", val.text)
|
||||
this.$set(this, "appointmentAskTypeValue", val.value)
|
||||
this.appointmentAskTypeShow = false
|
||||
},
|
||||
async doSubmit() {
|
||||
if (!this.chooseData.userMobile) {
|
||||
this.$toast.fail("请输入手机号");
|
||||
return
|
||||
}
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
appointmentAskTypeValue: this.appointmentAskTypeValue,
|
||||
userMobile: this.chooseData.userMobile,
|
||||
id: this.chooseData.id,
|
||||
isAdd: false,
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
},
|
||||
getAskTypeName() {
|
||||
if (this.viewData.appointmentAskTypeValue) {
|
||||
const type = this.askTypeList.find(o => o.code === this.viewData.appointmentAskTypeValue + '')
|
||||
return type ? type.name : '暂无'
|
||||
} else {
|
||||
return '暂无'
|
||||
}
|
||||
},
|
||||
getDoctorAskTypeName() {
|
||||
const askTypeArray = []
|
||||
if (this.viewData.askType) {
|
||||
const array = JSON.parse(this.viewData.askType)
|
||||
this.askTypeList.map(o => {
|
||||
if (array.includes(o.code)) {
|
||||
askTypeArray.push(o)
|
||||
}
|
||||
})
|
||||
}
|
||||
return askTypeArray
|
||||
},
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageForm.year = this.yearList[0].value
|
||||
this.pageForm.stateId = null
|
||||
this.pageData()
|
||||
this.askTypeList = await getDictOptions("psychology_asktype")
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user