first commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<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>
|
||||
@@ -0,0 +1,694 @@
|
||||
<!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?v=1.0.0">
|
||||
<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/css/common.css?v=1.0.3">
|
||||
<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">
|
||||
|
||||
<script>
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: '4fa1e1aeabba7eb9518129cf57ab17c1'
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- import Vue before Element -->
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vuex/vuex.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vuex-persistedstate/vuex-persistedstate.umd.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/slimscroll/jquery.slimscroll.min.js"></script>
|
||||
|
||||
|
||||
<!--后面就改这一段吧-->
|
||||
<script src="${base!}/assets/platform/js/utils.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/dd3s/dd3s.js"></script>
|
||||
<script src="${base!}/assets/platform/js/jsz.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="${base!}/assets/platform/plugins/echarts/echarts.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/echarts/langZH.js"></script>
|
||||
<!-- <script src="https://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/module/mixins/initTableMixins.js?v=1.0.3"></script>
|
||||
<script src="${base!}/assets/platform/module/mixins/styleMixin.js"></script>
|
||||
<script src="${base!}/assets/platform/js/includeModel.js?v=1.0.5"></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=57f0d098ba1b881ecc436c4cfd23bbbf&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/js/gh.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/plugins/xlsx/xlsx.full.min.js"></script>
|
||||
<script src="${base!}/assets/platform/js/main.js?v=1.0.1"></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>
|
||||
|
||||
|
||||
<!-- <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.6/theme-chalk/index.min.css">-->
|
||||
<!-- <script src="https://cdn.staticfile.org/element-ui/2.15.6/index.min.js"></script>-->
|
||||
|
||||
<!--#
|
||||
var isLeftMenu = false;
|
||||
if(@shiro.getPrincipalProperty('menuTheme') == "top"){
|
||||
isLeftMenu = false;
|
||||
}else if(@shiro.getPrincipalProperty('menuTheme') == "left"){
|
||||
isLeftMenu = true;
|
||||
}
|
||||
#-->
|
||||
<script type="text/javascript">
|
||||
var base = "${base!}";
|
||||
var loginPjax = "${@shiro.getPrincipalProperty('loginPjax')}";
|
||||
const AppMapCenterPointX = "${config.AppMapCenterPointX!}";
|
||||
const AppMapCenterPointY = "${config.AppMapCenterPointY!}";
|
||||
var isLeftMenu = "${isLeftMenu!}";
|
||||
var isDisPlayCode = "${config.isDisPlayCode!}" === 'true'
|
||||
ELEMENT.locale(ELEMENT.lang['${lang,escape}']);
|
||||
// Vue.component('v-chart', VueECharts)
|
||||
// VueECharts.registerTheme('mine', echartsTheme)
|
||||
const APP_DOMAIN = "${AppDomain!}"
|
||||
const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
Vue.component('vuedraggable', window.vuedraggable)
|
||||
Vue.component('guava', httpVueLoader('/components/plugins/Guava.vue'))
|
||||
Vue.component('sign', httpVueLoader('/components/sign/sign.vue?v=2.0.0'))
|
||||
Vue.component('file-upload', httpVueLoader('/components/plugins/FileUpload.vue'))
|
||||
Vue.component('text-editor', httpVueLoader('/components/plugins/textEditor.vue'))
|
||||
Vue.component('border-table', httpVueLoader('/components/plugins/BorderTable.vue'))
|
||||
Vue.component('image-upload', httpVueLoader('/components/plugins/ImageUpload.vue'))
|
||||
Vue.component('custom-message', httpVueLoader('/components/plugins/CustomMessage.vue'))
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
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
|
||||
</script>
|
||||
<script>
|
||||
Vue.use(httpVueLoader)
|
||||
Vue.component(VueQrcode.name, VueQrcode)
|
||||
</script>
|
||||
<script>
|
||||
//防止用户快速重复点击造成数据混乱 提供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)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
let query = window.location.search.substring(1);
|
||||
let vars = query.split("&");
|
||||
for (let i = 0; i < vars.length; i++) {
|
||||
let pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
//函数在一定时间内只会触发一次 FN.ABC
|
||||
function throttle(func, wait) {
|
||||
let previous = 0;
|
||||
return function () {
|
||||
let now = Date.now();
|
||||
let context = this;
|
||||
let args = arguments;
|
||||
if (now - previous > wait) {
|
||||
func.apply(context, args);
|
||||
previous = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const hasProposalAdminRole = "${@shiro.hasAnyRoles('sysadmin','jdh10')}" === 'true'
|
||||
</script>
|
||||
|
||||
<script>
|
||||
window.sessionStorage.setItem('moduleMenus', JSON.stringify(${json(@shiro.userModuleMenus())}))
|
||||
window.sessionStorage.setItem('menus', JSON.stringify(${json(@shiro.getPrincipalProperty('menus'))}))
|
||||
window.store = new Vuex.Store({
|
||||
plugins: [
|
||||
createPersistedState({
|
||||
key: "zhgh-vuex",
|
||||
paths: ["openedMenus", "activeMenuIndex", "activeMenuModuleId"],
|
||||
storage: window.sessionStorage
|
||||
})
|
||||
],
|
||||
state: {
|
||||
//当前激活的菜单
|
||||
activeMenuIndex: null,
|
||||
//激活的菜单模块
|
||||
activeMenuModuleId: null,
|
||||
moduleMenus: JSON.parse(window.sessionStorage.getItem("moduleMenus")),
|
||||
menus: JSON.parse(window.sessionStorage.getItem("menus"))
|
||||
},
|
||||
mutations: {
|
||||
//设置激活的菜单
|
||||
setActiveMenuIndex(state, payload) {
|
||||
state.activeMenuIndex = payload
|
||||
},
|
||||
//设置激活的菜单模块
|
||||
setActiveMenuModuleId(state, payload) {
|
||||
state.activeMenuModuleId = payload
|
||||
},
|
||||
//设置打开的菜单
|
||||
setOpenedMenus(state, payload) {
|
||||
state.openedMenus = payload
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
pjaxRoute({commit, dispatch, state, getters}, href) {
|
||||
const {pathname, search} = new URL(href, window.location.origin)
|
||||
const matchMenu = state.menus.find(v => v.href === pathname)
|
||||
if (!matchMenu) {
|
||||
commit("setActiveMenuIndex", null)
|
||||
commit("setOpenedMenus", [])
|
||||
if (!state.activeModuleId && state.moduleMenus) {
|
||||
commit("setActiveMenuModuleId", state.moduleMenus[0].id)
|
||||
}
|
||||
pjaxReplace(pathname === "/platform/home" ? pathname : pathname)
|
||||
return
|
||||
}
|
||||
|
||||
//拷贝一份
|
||||
let cloneMenu = JSON.parse(JSON.stringify(matchMenu))
|
||||
//找出所有父菜单包括自己
|
||||
let parentMenus = []
|
||||
while (cloneMenu && cloneMenu.parentId) {
|
||||
cloneMenu = state.menus.find((m) => m.id === cloneMenu.parentId)
|
||||
if (cloneMenu) {
|
||||
parentMenus.unshift(cloneMenu)
|
||||
}
|
||||
}
|
||||
parentMenus.push(matchMenu)
|
||||
|
||||
//获取到该菜单所属的模块
|
||||
const moduleId = state.moduleMenus.find(v => v.containsMenu.includes(parentMenus[0].id))?.id
|
||||
|
||||
//判断下是否跨模块跳转
|
||||
if (moduleId !== state.activeMenuModuleId) {
|
||||
commit("setActiveMenuModuleId", moduleId)
|
||||
}
|
||||
Vue.nextTick(() => {
|
||||
//重新设置展开菜单
|
||||
commit("setOpenedMenus", parentMenus.map((menu) => menu.id))
|
||||
//设置当前激活菜单
|
||||
commit("setActiveMenuIndex", matchMenu.id)
|
||||
//跳转
|
||||
pjaxReplace(matchMenu.href ? matchMenu.href + (search || "") : "/platform/home")
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background-color: rgb(240, 242, 245);
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.w-e-toolbar {
|
||||
z-index: 1 !important;
|
||||
}
|
||||
|
||||
.w-e-text-container {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.viewer-container {
|
||||
z-index: 9999999999;
|
||||
}
|
||||
|
||||
.header {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.app .header-fixed + .layout {
|
||||
/*padding-top: 0;*/
|
||||
}
|
||||
|
||||
.el-table-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.layout {
|
||||
max-height: calc(100vh - 50px);
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.small-menu .brand {
|
||||
width: 70px !important;
|
||||
}
|
||||
|
||||
input[type="file"] {
|
||||
display: none
|
||||
}
|
||||
|
||||
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.space-around {
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.space-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
#app > .transition-row {
|
||||
min-height: calc(100vh - 50px);
|
||||
}
|
||||
|
||||
#app > .transition-row > .transition-item {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</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 src="${base!}/assets/platform/img/logoa.png">
|
||||
</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"
|
||||
@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">
|
||||
<div class="entranceDetail"
|
||||
:class="item.id==selectEntranceModuleId?'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" style="display: flex;">
|
||||
<!-- sidebar menu -->
|
||||
<div id="asideMenu" class="sidebar">
|
||||
<el-menu unique-opened :default-active="activeMenuIndex" :default-openeds="openedMenus" @select="menuSelect"
|
||||
style="width: 250px;">
|
||||
<menu-list :menus="leftMenus" :depth="0"></menu-list>
|
||||
</el-menu>
|
||||
</div>
|
||||
<!-- main content -->
|
||||
<section class="main-content" id="container">
|
||||
${layoutContent}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const leftMenuApp = new Vue({
|
||||
el: '#asideMenu',
|
||||
components: {
|
||||
"menu-list": {
|
||||
name: "menu-list",
|
||||
template:
|
||||
/*language=HTML*/
|
||||
`
|
||||
<div>
|
||||
<template v-for="(item, index) in menus">
|
||||
<el-submenu :index="item.id" v-if="item.children && item.children.length > 0">
|
||||
<template #title>
|
||||
<i class="fa fa-tags"></i>
|
||||
<span>{{ item.name }}</span>
|
||||
</template>
|
||||
<menu-list :menus="item.children" :depth="depth + 1"/>
|
||||
</el-submenu>
|
||||
<el-menu-item :index="item.id" v-else>
|
||||
<a :href="item.href" data-pjax>
|
||||
<i :class="item.icon ? item.icon : 'fa fa-link'"></i>
|
||||
<span style="white-space: normal;
|
||||
word-break: break-all;
|
||||
line-height: 1.4;
|
||||
margin-right: 60px;
|
||||
display: inline-block;">{{ item.name }}</span>
|
||||
</a>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
</div>
|
||||
`,
|
||||
props: ["menus", "depth"]
|
||||
}
|
||||
},
|
||||
store,
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
leftMenus() {
|
||||
if (this.selectEntranceModuleId) {
|
||||
return this.moduleMenus.find(v => v.id === this.selectEntranceModuleId)?.menus
|
||||
}
|
||||
return []
|
||||
},
|
||||
|
||||
moduleMenus() {
|
||||
return this.$store.state.moduleMenus
|
||||
},
|
||||
selectEntranceModuleId() {
|
||||
return this.$store.state.activeMenuModuleId || null
|
||||
},
|
||||
selectEntranceModule() {
|
||||
if (this.selectEntranceModuleId && this.moduleMenus && this.moduleMenus.length > 0) {
|
||||
return this.moduleMenus.find(v => v.id === this.selectEntranceModuleId)
|
||||
}
|
||||
return {}
|
||||
},
|
||||
//当前选中菜单
|
||||
activeMenuIndex() {
|
||||
return this.$store.state.activeMenuIndex
|
||||
},
|
||||
//当前打开的菜单 数组 包含所有父菜单
|
||||
openedMenus() {
|
||||
return this.$store.state.openedMenus
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
menuSelect(index, indexPath) {
|
||||
this.$store.commit("setActiveMenuIndex", index)
|
||||
this.$store.commit("setOpenedMenus", indexPath)
|
||||
},
|
||||
|
||||
goHome() {
|
||||
|
||||
},
|
||||
assignmentMenu() {
|
||||
const menuIndexPath = window.sessionStorage.getItem('menuIndexPath')
|
||||
if (menuIndexPath) {
|
||||
this.openedMenus = JSON.parse(menuIndexPath)
|
||||
} else {
|
||||
this.openedMenus = []
|
||||
}
|
||||
const menuIndex = window.sessionStorage.getItem('menuIndex')
|
||||
if (menuIndex) {
|
||||
this.activeMenuIndex = menuIndex
|
||||
} else {
|
||||
this.activeMenuIndex = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.assignmentMenu()
|
||||
}
|
||||
})
|
||||
|
||||
const headerNavBarVueApp = new Vue({
|
||||
el: '#headerNavbar',
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
userDefaultModuleId: null,
|
||||
menuPopover: false,
|
||||
appModuleId: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
entranceModules() {
|
||||
return this.$store.state.moduleMenus
|
||||
},
|
||||
selectEntranceModuleId() {
|
||||
return this.$store.state.activeMenuModuleId || null
|
||||
},
|
||||
selectEntranceModule() {
|
||||
if (this.selectEntranceModuleId && this.entranceModules) {
|
||||
return this.entranceModules.find(v => v.id === this.selectEntranceModuleId)
|
||||
}
|
||||
return {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async enterEntranceModules(item) {
|
||||
this.$store.commit('setActiveMenuModuleId', item.id)
|
||||
},
|
||||
goHome() {
|
||||
$.pjax({
|
||||
url: '/platform/home',
|
||||
container: '#container',
|
||||
fragment: '#container',
|
||||
timeout: 8000
|
||||
});
|
||||
this.$store.commit('setActiveMenuIndex', null)
|
||||
this.$store.commit("setOpenedMenus", [])
|
||||
|
||||
|
||||
},
|
||||
goSetAppCenter() {
|
||||
$.pjax({
|
||||
url: '/platform/sys/entranceModule',
|
||||
container: '#container',
|
||||
fragment: '#container',
|
||||
timeout: 8000
|
||||
});
|
||||
},
|
||||
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)
|
||||
this.appModuleId = this.selectEntranceModule.id
|
||||
}
|
||||
this.setAttr()
|
||||
},
|
||||
|
||||
findParentNodes(data, targetHref, parents = []) {
|
||||
for (const node of data) {
|
||||
if (node && node.href === targetHref) {
|
||||
return parents.concat(node);
|
||||
}
|
||||
if (node && node.children) {
|
||||
const found = this.findParentNodes(node.children, targetHref, parents.concat(node));
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
matchMenu(path = window.location.pathname) {
|
||||
const parentNodes = this.findParentNodes(JSON.parse(window.sessionStorage.getItem('moduleMenus')).flatMap(v => v.menus), path)
|
||||
if (parentNodes) {
|
||||
const menuIndexPath = parentNodes.map(v => v.id)
|
||||
const menuIndex = menuIndexPath[menuIndexPath.length - 1]
|
||||
const menuParentIndex = menuIndexPath[0]
|
||||
const module = JSON.parse(window.sessionStorage.getItem('moduleMenus')).find(v => v.containsMenu.includes(menuParentIndex))
|
||||
this.enterEntranceModules(module)
|
||||
this.$store.commit('setActiveMenuIndex', menuIndex)
|
||||
this.$store.commit("setOpenedMenus", menuIndexPath)
|
||||
leftMenuApp.assignmentMenu()
|
||||
} else {
|
||||
this.enterEntranceModules(JSON.parse(window.sessionStorage.getItem('moduleMenus'))[0])
|
||||
this.$store.commit('setActiveMenuIndex', null)
|
||||
this.$store.commit("setOpenedMenus", [])
|
||||
leftMenuApp.assignmentMenu()
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
// this.matchMenu()
|
||||
this.$store.dispatch('pjaxRoute', window.location)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,370 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.search-fixed {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
|
||||
.list-card .van-cell__value {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<!-- <van-dropdown-item v-model="pageForm.isMenWomen" @change="yearChange"
|
||||
:options="sexList"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.groupName" @change="yearChange"
|
||||
:options="groupList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.eventId" @change="yearChange" :options="eventList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/wbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply==0&&o.applyWay.includes(1)"></image>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/qxbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="您报队伍">{{o.activityTeamName?o.activityTeamName:'暂无'}}</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="可报队数" v-if="o.projectType==2">
|
||||
{{o.restrictTotalTeam}}队
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="每队可报人数">
|
||||
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
|
||||
<!-- <span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>-->
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="已报名总人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-dialog v-model="activityDialog" title="您确定要报名此活动吗?" show-cancel-button @confirm="doActivityConfirm"
|
||||
@cancel="activityDialog = false" :before-close="onBeforeClose">
|
||||
<van-radio-group v-model="formData.teamId" v-if="projectType==2">
|
||||
<van-cell-group>
|
||||
<template v-for="i in teams">
|
||||
<van-cell :title="i.name" clickable>
|
||||
<template #right-icon>
|
||||
<van-radio :name="i.id"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</van-dialog>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
teamId: null,
|
||||
teamName: null,
|
||||
activityId: "",
|
||||
eventId: ""
|
||||
},
|
||||
title: "",
|
||||
projectType: "",
|
||||
applyType: "",
|
||||
activityDialog: false,
|
||||
restrictBoyNum: "",
|
||||
restrictGirlNum: "",
|
||||
athletesMaxNum: "",
|
||||
events: [],
|
||||
eventList: [],
|
||||
groupList: [
|
||||
{text: '按组别', value: null},
|
||||
{text: '甲组', value: '甲组'},
|
||||
{text: '乙组', value: '乙组'},
|
||||
{text: '丙组', value: '丙组'},
|
||||
{text: '丁组', value: '丁组'},
|
||||
],
|
||||
sexList: [
|
||||
{text: '按性别', value: 1},
|
||||
{text: '男子', value: 2},
|
||||
{text: '女子', value: 3},
|
||||
{text: '团体', value: 4},
|
||||
],
|
||||
auditList: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已报名', value: "true"},
|
||||
{text: '未报名', value: "false"},
|
||||
],
|
||||
teams: [],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
isMenWomen: "1"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onBeforeClose(action, done) {
|
||||
return done(false)
|
||||
},
|
||||
async doActivityConfirm() {
|
||||
if (this.formData.teamId == null && this.projectType == 2) {
|
||||
this.$toast("请选择报名的小队")
|
||||
return
|
||||
} else {
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
teamId: this.formData.teamId,
|
||||
activityId: this.formData.activityId,
|
||||
eventId: this.formData.eventId,
|
||||
applyType: this.applyType
|
||||
})
|
||||
const nv = data.filter(v => v.sex == '女')
|
||||
const nan = data.filter(v => v.sex == '男')
|
||||
let title = this.projectType == 1 ? "项目" : "小队"
|
||||
|
||||
if (this.athletesMaxNum && (data.length >= this.athletesMaxNum)) {
|
||||
this.$toast("该" + title + "运动员已报满!")
|
||||
return
|
||||
}
|
||||
|
||||
if (this.applyType != 3) {
|
||||
if ("${@shiro.getPrincipalProperty('sex')}" == '女' && nv.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictBoyNum) : this.restrictGirlNum)) {
|
||||
this.$toast("该" + title + "女运动员已报满!")
|
||||
return
|
||||
}
|
||||
if ("${@shiro.getPrincipalProperty('sex')}" == '男' && nan.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictGirlNum) : this.restrictBoyNum)) {
|
||||
this.$toast("该" + title + "男运动员已报满!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (this.formData.teamId != null) this.$set(this.formData, "teamName", this.teams.find(v => v.id == this.formData.teamId).name)
|
||||
await $.post("/mobile/activity/Sports/list/doActivity", this.formData)
|
||||
|
||||
await this.onRefresh()
|
||||
this.activityDialog = false
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
const {
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyNum,
|
||||
name,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
|
||||
this.projectType = projectType
|
||||
this.formData.activityId = activityId
|
||||
this.formData.eventId = eventId
|
||||
this.applyType = applyType
|
||||
|
||||
const res = await $.get("/mobile/activity/Sports/list/getScopeUser", {activityGroupId: activityGroupId})
|
||||
if (res.data == 0) {
|
||||
this.$toast("您不在报名人员内!")
|
||||
return
|
||||
}
|
||||
if ("${@shiro.getPrincipalProperty('unit').getUnionid()}" == "") {
|
||||
this.$toast("您的工会信息有误,无法报名,请联系工会管理员!")
|
||||
return
|
||||
}
|
||||
if (userApply == 1) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const data = await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.yearChange()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
this.events = []
|
||||
const data = await $.get("/platform/activity/apply/getEvents", {activityId: activityId})
|
||||
this.events = data
|
||||
const {
|
||||
athletesMaxNum,
|
||||
startAgeDate,
|
||||
endAgeDate,
|
||||
isMenWomen,
|
||||
restrictBoyNum,
|
||||
restrictGirlNum
|
||||
} = this.events.find(v => v.id == eventId)
|
||||
this.restrictBoyNum = restrictBoyNum
|
||||
this.restrictGirlNum = restrictGirlNum
|
||||
this.athletesMaxNum = athletesMaxNum
|
||||
if (projectType == 1) {
|
||||
if (restrictRegNumber > 0) {
|
||||
const {data} = await $.post("/platform/activity/apply/getActivityData", {activityId})
|
||||
const userApplyNum = data.filter(v => v.userId == "${@shiro.getPrincipalProperty('id')}").length
|
||||
if (userApplyNum >= restrictRegNumber) {
|
||||
this.$toast('单项项目,每人限报' + restrictRegNumber + '个!团体项目除外')
|
||||
return
|
||||
}
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen == 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen == 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
|
||||
if (athletesMaxNum != null) {
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
activityId: this.formData.activityId,
|
||||
applyType: applyType,
|
||||
eventId: eventId
|
||||
})
|
||||
if (data.length >= athletesMaxNum) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + athletesMaxNum + "人")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (startAgeDate != null) {
|
||||
const birthday = moment("${@shiro.getPrincipalProperty('birthday')}").valueOf()
|
||||
if (birthday < moment(startAgeDate).valueOf() || birthday > moment(endAgeDate).valueOf()) {
|
||||
this.$toast("您的年龄不在限制范围內!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if (isMenWomen != null && isMenWomen == 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen == 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (projectType == 2) {
|
||||
const {data} = await $.get("/platform/activity/apply/getActivityTeamId", {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.teams = data
|
||||
if (data.length && data.length > 0) this.$set(this.formData, "teamId", data[0].id)
|
||||
|
||||
}
|
||||
this.activityDialog = true
|
||||
}
|
||||
,
|
||||
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
}
|
||||
,
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/platform/activity/apply/pageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
|
||||
}
|
||||
,
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString('id')
|
||||
const applyType = GetQueryString('applyType')
|
||||
this.pageForm.activityId = id
|
||||
this.pageForm.applyType = applyType
|
||||
const data = await $.post("/platform/activity/apply/getEvents", {activityId: id})
|
||||
data.forEach(v => {
|
||||
this.eventList.push({value: v.eventId, text: v.allName})
|
||||
})
|
||||
this.eventList.unshift({value: null, text: "按项目"})
|
||||
this.$set(this.pageForm, "eventId", this.eventList[0].value)
|
||||
this.$set(this.pageForm, "isMenWomen", 1)
|
||||
this.$set(this.pageForm, "groupName", null)
|
||||
this.$set(this.pageForm, "isAudit", null)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,108 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isActivity" :options="activityList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.applyEndTime,o.applyType)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.NAME}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动地址">{{o.address}}</van-cell>
|
||||
<van-cell :border="false" title="报名时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动状态">
|
||||
<van-tag type="danger" v-if="moment(o.applyEndTime).valueOf() <moment().valueOf()">报名结束
|
||||
</van-tag>
|
||||
<van-tag type="success" v-else-if="moment(o.applyEndTime).valueOf() >moment().valueOf()">报名中
|
||||
</van-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activityList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '已结束', value: 3},
|
||||
],
|
||||
pageForm: {
|
||||
year: '',
|
||||
isActivity: "1"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityData() {
|
||||
const {data} = await $.post("/platform/activity/apply/activityData", {
|
||||
year: this.pageForm.year,
|
||||
isActivity: this.pageForm.isActivity
|
||||
})
|
||||
this.tableData = data
|
||||
},
|
||||
openInfo(id, applyEndTime, applyType) {
|
||||
if (moment(applyEndTime).valueOf() < moment().valueOf()) {
|
||||
this.$toast("活动已结束,暂不能报名")
|
||||
return
|
||||
}
|
||||
window.location.href = '/mobile/activity/Sports/list/activityEventList?id=' + id + "&applyType=" + applyType
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.$set(this.pageForm, "isActivity", 2)
|
||||
await this.getActivityData()
|
||||
this.mLoading = false
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,147 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="报名详情" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/ybm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
|
||||
<van-cell :border="false" title="可报人数">
|
||||
<span v-if="o.applyType==3">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="已报名人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
projectInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityInfo() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/findOne', {id: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.o = resp.data
|
||||
this.$nextTick(() => {
|
||||
// document.getElementsByClassName('activity_img_back')[0].style.backgroundImage = "url(" + FILE_DOMAIN + this.o.cover + ")"
|
||||
})
|
||||
}
|
||||
},
|
||||
async getSchoolActivityProjectInfoByMine() {
|
||||
const resp = await $.get('/mobile/activity/myActivity/getSchoolActivityProjectInfoByMine', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.projectInfo = resp.data
|
||||
}
|
||||
},
|
||||
async getHasRegEventProject() {
|
||||
const resp = await $.get('/platform/activity/apply/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
const {
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyNum,
|
||||
name,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('取消成功')
|
||||
this.getHasRegEventProject()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.$set(this.pageForm, 'isAudit', 'true')
|
||||
this.$set(this.pageForm, 'activityId', id)
|
||||
this.$set(this.pageForm, 'pageSize', 100)
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getHasRegEventProject()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,549 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.in-sheet-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
max-height: 96%;
|
||||
height: 96%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 86%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.no_content {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-action-sheet__content {
|
||||
height: 88%;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 6em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
/*position: absolute;*/
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.van-cell__value--alone {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="场地预约审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<!--<van-dropdown-item v-model="pageForm.meetingTime" :options="meetingTimeList"
|
||||
@change="doSearch"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id, o.modulename)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey"> 联系人:</span>
|
||||
{{o.contact_person}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联系方式:</span>{{o.contact_phone}}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<!--<div class="cus_overflow" style="line-height: 20px; width: 83%">
|
||||
<span style="color: grey">开放时段:</span>
|
||||
{{o.meetingdescription}}
|
||||
</div>-->
|
||||
<!--<span class="showMore" @click.stop="desc = o.meetingdescription; popupShow = true">查看更多</span>-->
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">已审{{o.audit}}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o.id, o.modulename)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">未审{{o.no_audit}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--弹出框-->
|
||||
<van-popup v-model:show="popupShow" class="cus_popup">
|
||||
<pre style="margin: 0; white-space: break-spaces">{{desc}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-icon @click="popupShow = false" class="cus_icon" v-if="popupShow" name="close"></van-icon>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet v-model:show="userShow" :title="queryType === 'notAudit' ? '预约列表' : '预约列表'"
|
||||
class="userPopup" @close="popClose">
|
||||
<div :class="queryType == 'notAudit' ? 'content' : 'no_content'">
|
||||
<div v-if="queryType === 'notAudit'" style="text-align: right; width: 96%">
|
||||
<van-tag color="#1867b0" style="margin-right: 10px" @click="cancelAll" size="large" type="primary">
|
||||
取消选中
|
||||
</van-tag>
|
||||
<van-tag color="#1867b0" @click="allIn" size="large" type="primary">全选</van-tag>
|
||||
</div>
|
||||
<div class="van-doc-card in-sheet-card" v-for="(item, i) in userList">
|
||||
<!--<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 80%">
|
||||
<span>{{moment(item.startTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(item.endTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
</div>
|
||||
<div v-if="queryType === 'notAudit'">
|
||||
<span @click="checkAll(i)">全选</span>
|
||||
<span @click="toggleAll(i)" style="margin-left: 4px">反选</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<div style="width: 90%">
|
||||
<div>
|
||||
<span style="display: inline-block; min-width: 40px; max-width: 76px">{{item.username}}</span>
|
||||
<span style="display: inline-block; width: 20px">{{item.sex}}</span>
|
||||
<span style="display: inline-block; width: 76px">{{item.loginname}}</span>
|
||||
<span class="unit">{{item.unitname}}</span>
|
||||
</div>
|
||||
<div style="width: 94%; display: flex">
|
||||
<div style="color: grey;">预约时间:</div>
|
||||
<div>
|
||||
<div v-for="(d,index) in item.concat_day.split(',')">{{getTime(item, d)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div style="width: 94%;">
|
||||
<span style="color: grey">参加人员:</span><span>{{item.joinUser}}</span>
|
||||
</div>-->
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">预约事由:</span><span>{{item.reserve_cause}}</span>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">审核状态:</span><span>{{item.stateName}}</span>
|
||||
</div>
|
||||
<div v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
style="width: 94%;">
|
||||
<span style="color: grey">反馈意见:</span><span>{{item.back_option}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
clickable class="cus_cell"
|
||||
:key="item.id"
|
||||
@click="toggle(i)">
|
||||
|
||||
<van-icon class="audit_icon" color="green"
|
||||
v-if="queryType === 'hasAudit' && item.auditState == true"
|
||||
name="passed"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
v-if="queryType === 'hasAudit' && item.auditState == false"
|
||||
name="close"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="item.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
<!--<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: fixed; bottom: 50px; width: 95%">
|
||||
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回</van-button>
|
||||
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过</van-button>
|
||||
</div>-->
|
||||
</div>
|
||||
<div style="position: absolute; bottom: 20px; width: 100%;z-index: 9999">
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: center">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small"
|
||||
style="height: 38px;border-radius: 10px;margin-right: 20px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small"
|
||||
style="height: 38px;border-radius: 10px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-action-sheet>
|
||||
|
||||
<!--审核弹框-->
|
||||
<van-dialog v-model:show="auditShow" @confirm="auditDo" title="温馨提示" show-cancel-button>
|
||||
<div style="padding-top: 8px; text-align: center; font-size: 14px; color: #646566">{{str}}</div>
|
||||
<van-divider style="margin: 12px 0 1px 0px;"></van-divider>
|
||||
<van-field
|
||||
v-model="reason"
|
||||
rows="2"
|
||||
label="审核意见:"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入审核意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
desc: '',
|
||||
list: ['a', 'b'],
|
||||
result: [],
|
||||
reason: '',
|
||||
auditShow: false,
|
||||
popupShow: false,
|
||||
userShow: false,
|
||||
userList: [],
|
||||
userClickList: [],
|
||||
str: '',
|
||||
type: '',
|
||||
auditType: '',
|
||||
queryType: '',
|
||||
typeList: [],
|
||||
meetingTimeList: [{text: '全部时间', value: null}, {text: '即将开始', value: 0}, {text: '已结束', value: 1}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await $.post('/mobile/activity/site/audit/getLeaveUser', {
|
||||
siteId: o.id,
|
||||
auditType: 'hasAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
|
||||
this.userList.sort((a, b) => {
|
||||
return b.auditState - a.auditState
|
||||
})
|
||||
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
cancelAll() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false))
|
||||
},
|
||||
allIn() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(true))
|
||||
},
|
||||
checkAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(i) {
|
||||
this.$refs.checkboxes[i].toggle();
|
||||
},
|
||||
async auditDo() {
|
||||
let idList = this.result
|
||||
if (this.type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/site/audit/audit', {
|
||||
ids: JSON.stringify(idList),
|
||||
auditOpinion: this.reason,
|
||||
isPass: this.auditType === 'pass'
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Toast('操作失败')
|
||||
}
|
||||
this.userShow = false
|
||||
},
|
||||
audit(type, auditType) {
|
||||
this.type = type
|
||||
this.auditType = auditType
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
vant.Toast('请先选择人员')
|
||||
return
|
||||
}
|
||||
this.str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择' : '您确定要一键全部审核吗?'
|
||||
this.reason = auditType === 'pass' ? '同意' : '拒绝'
|
||||
this.auditShow = true
|
||||
},
|
||||
async openView(id, modulename) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await $.post('/mobile/activity/site/audit/getLeaveUser', {
|
||||
siteId: id,
|
||||
moduleName: modulename,
|
||||
auditType: 'canAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无预约数据')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
return
|
||||
}
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.$set(this.pageForm, "meetingTime", this.meetingTimeList[1].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,344 @@
|
||||
<!--#
|
||||
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: 14px;
|
||||
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>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<div>
|
||||
<span>场地地址:</span>
|
||||
<span>{{o.address}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span> 联系人:</span>
|
||||
<span>{{o.contact_person}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>联系方式:</span>
|
||||
<span>{{o.contact_phone}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>面向对象:</span>
|
||||
<span v-if="o.reservetarget == 1">分工会</span>
|
||||
<span v-if="o.reservetarget == 2">个人</span>
|
||||
<span v-if="o.reservetarget == 3">集体</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>场地介绍:</span>
|
||||
<span @click.stop="viewIntroduce(o)" style="color: #0e5996; text-decoration: underline;">点我查看</span>
|
||||
</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 round v-model:show="show" class="pop">
|
||||
<div style="text-align: center; margin: 10px; font-size: 18px">场地介绍</div>
|
||||
<div v-html="viewData.introduce"></div>
|
||||
<van-button color="#246fb4" @click="show = false" type="primary" style="width: 100%">关闭</van-button>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
show: false,
|
||||
siteId: '',
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewIntroduce(o) {
|
||||
this.viewData = o
|
||||
this.show = true
|
||||
},
|
||||
openView(o) {
|
||||
if(o.reservetarget === 1 && "${@shiro.hasAnyRoles('gh01', 'H04')}" === 'false' && "${@shiro.hasRole('sysadmin')}" === 'false') {
|
||||
vant.Toast('该场地只能分工会主席预约')
|
||||
return
|
||||
}
|
||||
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
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/info/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,426 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 84%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
.van-cell__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="我的预约"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :title="pageForm.time" ref="item" @open="">
|
||||
<van-cell center title="查询全部">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="pageForm.timeSwitch" size="24" active-color="#246fb4"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-datetime-picker v-show="pageForm.timeSwitch === false"
|
||||
v-model="time" cancel-button-text=" " confirm-button-text=" "
|
||||
type="year-month"
|
||||
title="选择年月"
|
||||
:formatter="timeFormatter"
|
||||
></van-datetime-picker>
|
||||
<div style="padding: 5px 16px;margin-top: 6px">
|
||||
<van-button type="danger" color="#246fb4" block round @click="onConfirm" style="height: 36px">
|
||||
确认
|
||||
</van-button>
|
||||
</div>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id, o.modulename)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">预约天数:</span>
|
||||
<span>{{o.days}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">预约时间:</span>
|
||||
<span v-for="(item,index) in o.concat_day.split(',')">
|
||||
<div :style="index !== 0 ? 'text-indent: 5em' : ''">{{getTime(o, item)}}</div>
|
||||
</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span v-if="[0].includes(o.stateaudittype)"
|
||||
style="color: #e6a23c">{{o.statename}}</span>
|
||||
<span v-if="o.stateaudittype==3" style="color: #67c23a">{{o.statename}}</span>
|
||||
<span v-if="o.stateaudittype==1" style="color: #f56c6c">{{o.statename}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.stateaudittype == '1'">
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核意见:</span>
|
||||
<span>{{JSON.parse(o.auditlist).find(x => x.auditState === false).auditOption}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="rollback(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">撤销预约</van-button>
|
||||
<van-button @click.stop="backOption(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">反馈意见</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
<van-dialog v-model="show" title="反馈意见" show-cancel-button @confirm="backDo">
|
||||
<van-field
|
||||
v-model="option"
|
||||
rows="4"
|
||||
label="反馈意见:"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入反馈意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
time: new Date(),
|
||||
option: '',
|
||||
show: false,
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
timeList: [],
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onConfirm() {
|
||||
if(this.pageForm.timeSwitch === true) {
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
}else {
|
||||
this.timeList = [{text: moment(this.time).format('YYYY-MM'), value: moment(this.time).format('YYYY-MM')}]
|
||||
}
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$refs.item.toggle()
|
||||
this.doSearch()
|
||||
},
|
||||
timeFormatter(type, val) {
|
||||
if (type === 'year') {
|
||||
return val + `年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return val + `月`;
|
||||
}
|
||||
return val;
|
||||
},
|
||||
async rollback(o) {
|
||||
const self = this
|
||||
const res = await $.post("/platform/activity/site/reserve/isCanRollBack", {id: o.id});
|
||||
if(res === true) {
|
||||
vant.Toast('此预约状态下不能进行撤回操作!')
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您是否要撤销此预约?',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/activity/site/info/rollback', {
|
||||
id: o.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if(resp.code === 0) {
|
||||
self.doSearch()
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
backOption(o) {
|
||||
this.info = o
|
||||
this.option = ''
|
||||
this.show = true
|
||||
},
|
||||
async backDo() {
|
||||
if(this.option === '') {
|
||||
vant.Toast('请填写反馈意见')
|
||||
return
|
||||
}
|
||||
const res = await $.post('/mobile/activity/site/info/backOption', {
|
||||
id: this.info.id,
|
||||
option: this.option
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
vant.Toast(res.msg)
|
||||
} else {
|
||||
vant.Toast('操作失败')
|
||||
}
|
||||
},
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/info/myReserve', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
//this.timeList.unshift({text: moment().format('YYYY-MM'), value: moment().format('YYYY-MM')})
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$set(this.pageForm, "timeSwitch", true)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,467 @@
|
||||
<!--#
|
||||
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 0;
|
||||
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 0;
|
||||
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;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.left-day-active {
|
||||
background-color: #0000cc;
|
||||
}
|
||||
.left-day-disabled {
|
||||
background-color: lightgrey;
|
||||
}
|
||||
.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%;
|
||||
}
|
||||
.van-empty {
|
||||
position: revert;
|
||||
transform: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak v-if="isLoad">
|
||||
<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="getDayClass(item)"
|
||||
@click="dayClick(item)"
|
||||
v-for="item in weekList">
|
||||
<div class="day-info-week">
|
||||
{{getWeekTextByDate(item.day)}}
|
||||
</div>
|
||||
<div class="day-info-month">
|
||||
{{moment(item.day).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"
|
||||
:first-day-of-week="1"
|
||||
title="选择开始日期"></van-calendar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<table v-if="weekList.find(o => moment(o.day).unix() === moment(selectDate).unix())?.disabled === false">
|
||||
<tr v-for="item in timeData">
|
||||
<td class="time">{{item.start_time + '-' + item.end_time}}</td>
|
||||
<td>
|
||||
<div v-if="item.disabled === true" class="state">{{ item.tooltip }}</div>
|
||||
<div @click="chooseTime(item)" v-else 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>
|
||||
</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>
|
||||
<div v-if="isCanRe(item) === 4" class="state">不可预约</div>
|
||||
</td>-->
|
||||
</tr>
|
||||
</table>
|
||||
<van-empty v-else image="error" :description="moment(selectDate).format('YYYY-MM-DD') + '不能预约'"></van-empty>
|
||||
</div>
|
||||
|
||||
<div style="position: fixed; bottom: 0; width: 100%">
|
||||
<van-button @click="reserve" type="primary" color="#246fb4" style="width: 100%">确定预约</van-button>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="show" title="确认预约信息">
|
||||
|
||||
<van-cell title="预约人">{{formData.reserve_person}}</van-cell>
|
||||
<van-cell title="性别">{{formData.sex}}</van-cell>
|
||||
<van-cell title="工号">{{formData.loginname}}</van-cell>
|
||||
<van-cell title="所属单位">{{formData.reserve_person_unit}}</van-cell>
|
||||
<van-cell title="联系电话">{{formData.reserve_person_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 name="stepper" label="预约人数">
|
||||
<template #input>
|
||||
<van-stepper v-model="formData.joinCount"></van-stepper>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-model="formData.message"
|
||||
rows="4"
|
||||
autosize
|
||||
label="预约事由"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入预约事由"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
|
||||
<div style="margin: 20px 0px; display: flex; justify-content: space-between;padding: 0px 22px;">
|
||||
<van-button @click="formData.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;
|
||||
}
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
isLoad: false,
|
||||
formData: {},
|
||||
show: false,
|
||||
site_id: '',
|
||||
site: {},
|
||||
timeData: [],
|
||||
times: [],
|
||||
weekList: [],
|
||||
joinUser: '',
|
||||
calendarVisible: false,
|
||||
selectDate: null,
|
||||
//已经预约的记录
|
||||
alreadyReserveRecord: [],
|
||||
allowDayList: [],
|
||||
}
|
||||
},
|
||||
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(day) {
|
||||
return (day) => {
|
||||
if(!this.allowDayList.includes(moment(day.date).format('YYYY-MM-DD'))) {
|
||||
day.type = 'disabled'
|
||||
}
|
||||
return day
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDayClass(row) {
|
||||
let classStr = 'calendar-left-day'
|
||||
if(row.disabled) {
|
||||
classStr += ' left-day-disabled'
|
||||
} else {
|
||||
classStr += moment(row.day).unix() === this.selectDate.unix() ? ' left-day-active' : ''
|
||||
}
|
||||
return classStr
|
||||
},
|
||||
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.getReserve()
|
||||
this.calendarVisible = false
|
||||
},
|
||||
setWeekList(startDate) {
|
||||
const wk = []
|
||||
let count = 0
|
||||
while (wk.length < 8) {
|
||||
const addDate = moment(startDate).add(count, 'd')
|
||||
let dis = false
|
||||
if(this.allowDayList.length > 0 && !this.allowDayList.includes(moment(addDate).format('YYYY-MM-DD'))) {
|
||||
dis = true
|
||||
}
|
||||
wk.push({
|
||||
day: addDate,
|
||||
disabled: dis
|
||||
})
|
||||
count++
|
||||
}
|
||||
this.weekList = wk
|
||||
},
|
||||
dayClick(item) {
|
||||
this.selectDate = item.day
|
||||
if(item.disabled) {
|
||||
this.$toast(moment(item.day).format('YYYY-MM-DD') + '不可预约')
|
||||
} else {
|
||||
this.getReserve()
|
||||
}
|
||||
},
|
||||
reserve() {
|
||||
if (this.times.length === 0) {
|
||||
vant.Toast('请选择要预约的时段')
|
||||
return
|
||||
}
|
||||
this.$set(this.formData, "reserve_person", '${@shiro.getPrincipalProperty("username")}')
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, "loginname", "${@shiro.getPrincipalProperty('loginname')}")
|
||||
this.$set(this.formData, "reserve_person_unit", '${@shiro.getPrincipalProperty("unit").getName()}')
|
||||
this.$set(this.formData, "reserve_person_phone", '${@shiro.getPrincipalProperty("mobile")}')
|
||||
|
||||
if(this.site.reserveTarget === 1 || this.site.reserveTarget === 3) {
|
||||
this.$set(this.formData, "joinCount", this.site.maxNum)
|
||||
} else {
|
||||
this.$set(this.formData, "joinCount", 1)
|
||||
}
|
||||
|
||||
this.show = true
|
||||
},
|
||||
async reserveDo() {
|
||||
this.$set(this.formData, 'start_time', this.times[0].start_time)
|
||||
this.$set(this.formData, 'end_time', this.times[0].end_time)
|
||||
this.$set(this.formData, 'site_id', this.site_id)
|
||||
const resp = await $.post('/platform/activity/site/reserve/doAdd', {
|
||||
data: JSON.stringify(this.formData),
|
||||
days: JSON.stringify(this.times.map(o => o.day))
|
||||
})
|
||||
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(resp.msg)
|
||||
}
|
||||
},
|
||||
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 {
|
||||
this.times = []
|
||||
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 itemFullTime = this.selectDate.format('YYYY-MM-DD') + " " + item.start_time + "-" + item.end_time
|
||||
|
||||
if(this.site.notApplyTimeList && this.site.notApplyTimeList.length > 0) {
|
||||
const sTime = this.selectDate.format('YYYY-MM-DD') + " " + item.start_time
|
||||
const eTime = this.selectDate.format('YYYY-MM-DD') + " " + item.end_time
|
||||
|
||||
for (let i = 0; i < this.site.notApplyTimeList.length; i++) {
|
||||
const notApplyStartTime = this.site.notApplyTimeList[i].date + " " + this.site.notApplyTimeList[i].startTime
|
||||
const notApplyEndTime = this.site.notApplyTimeList[i].date + " " + this.site.notApplyTimeList[i].endTime
|
||||
|
||||
const a = moment(sTime).isAfter(moment(notApplyStartTime)) && moment(sTime).isBefore(moment(notApplyEndTime))
|
||||
const b = moment(eTime).isAfter(moment(notApplyStartTime)) && moment(eTime).isBefore(moment(notApplyEndTime))
|
||||
const c = moment(sTime).isBefore(moment(notApplyStartTime)) && moment(eTime).isAfter(moment(notApplyEndTime))
|
||||
|
||||
if(a || b || c) {
|
||||
this.$set(item, 'disabled', true)
|
||||
this.$set(item, 'tooltip', '不可预约')
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.alreadyReserveRecord.includes(itemFullTime)) {
|
||||
this.$set(item, 'disabled', true)
|
||||
this.$set(item, 'tooltip', '已预约')
|
||||
}
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
const resp = await $.post('/mobile/activity/site/info/getDetail', {id: this.site_id})
|
||||
if (resp.code === 0) {
|
||||
this.site = resp.data
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
async getReserve() {
|
||||
const { data } = await $.get("/platform/activity/site/reserve/getTimesByDay", {
|
||||
siteId: this.site_id,
|
||||
day: moment(this.selectDate).format('YYYY-MM-DD'),
|
||||
})
|
||||
this.timeData = 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)
|
||||
}
|
||||
},
|
||||
async getAllowTime(year = null, month = null) {
|
||||
const m = moment(this.selectDate, "YYYY年M月")
|
||||
const { data } = await $.get("/platform/activity/site/reserve/getAllowTime", {
|
||||
siteId: this.site_id,
|
||||
year: year != null ? year : m.year(),
|
||||
month: month != null ? month : m.month() + 1,
|
||||
})
|
||||
this.allowDayList = data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.site_id = getQueryString('id')
|
||||
this.selectDate = moment()
|
||||
await this.getReserve()
|
||||
await this.onLoad()
|
||||
await this.getAllowTime()
|
||||
await this.setWeekList(this.selectDate)
|
||||
await this.getMyReservation()
|
||||
this.isLoad = true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,75 @@
|
||||
<!--活动信息公用页面-->
|
||||
|
||||
<div class="activity_img_back">
|
||||
<van-image
|
||||
fit="cover"
|
||||
width="100%"
|
||||
height="200"
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
></van-image>
|
||||
</div>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-cell title="活动名称" :value="o.name"></van-cell>
|
||||
<van-cell title="活动地址" :value="o.address"></van-cell>
|
||||
<van-cell title="报名时间">
|
||||
<template #label>
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="活动时间">
|
||||
<template #label>
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell v-if="o.userNumberLimit!=null">
|
||||
<template #title>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
活动人数
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
本工会名额
|
||||
</span>
|
||||
</template>
|
||||
<template>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
<span style="color: orange">{{o.totalUserNumberLimit }}</span>人
|
||||
</span>
|
||||
<span v-else="o.userNumberLimit===2">
|
||||
<span style="color: orange">{{unionLimitNum }}</span>人
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="当前报名" v-if="o.signUpMethod!=null">
|
||||
<template>
|
||||
<span style="color: red">{{hasRegUserNum}}</span>人
|
||||
</template>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="负  责  人">-->
|
||||
<!-- <template>-->
|
||||
<!-- {{o.createUserName}}({{o.createUserMobile}})-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
<van-cell title="报名方式" v-if="o.signUpMethod">
|
||||
<template>
|
||||
<span v-if="o.signUpMethod===1">个人报名</span>
|
||||
<span v-if="o.signUpMethod===2">分工会报名</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="活动内容" v-if="o.projectTypeCode!=='50004'">
|
||||
<template #label>
|
||||
{{o.activityContent}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="签到点位" v-if="o.needSign">
|
||||
<template #label>
|
||||
<div id="signMap" style="width: 100%;height: 300px"></div>
|
||||
<div style="margin-top: 10px;color: orange">
|
||||
活动开始后,请前往签到点位半径({{o.rangeMeter}})米内进行签到。
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
@@ -0,0 +1,130 @@
|
||||
const self_mixin = {
|
||||
data() {
|
||||
return {
|
||||
//已报名人数
|
||||
hasRegUserNum: 0,
|
||||
unionId: null,
|
||||
unionLimitNum: 0,
|
||||
isRegisterFull: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityInfo() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/findOne', {id: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
resp.data.location = JSON.parse(resp.data.location)
|
||||
resp.data.unionUserNumberLimit = JSON.parse(resp.data.unionUserNumberLimit)
|
||||
this.o = resp.data
|
||||
this.unionId = "${@shiro.getPrincipalProperty('unit').getUnionid()}"
|
||||
if (!this.unionId) {
|
||||
this.$toast.fail('您的所属工会信息缺失,请联系管理员')
|
||||
return
|
||||
}
|
||||
if (this.o.userNumberLimit === 2) {
|
||||
const unionLimit = resp.data.unionUserNumberLimit.find(v => v.id === this.unionId)
|
||||
this.unionLimitNum = unionLimit.limitNum
|
||||
}
|
||||
await this.getHasRegUserNum()
|
||||
this.$nextTick(() => {
|
||||
// document.getElementsByClassName('activity_img_back')[0].style.backgroundImage = "url(" + FILE_DOMAIN + this.o.cover + ")"
|
||||
if (this.o.needSign) {
|
||||
this.initMap()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async getHasRegUserNum() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/getHasRegUserNum', {activityId: this.activityId})
|
||||
this.hasRegUserNum = resp.data
|
||||
if (this.o.signUpMethod === 1) {
|
||||
if (this.o.userNumberLimit === 1) {
|
||||
if (this.hasRegUserNum === this.o.totalUserNumberLimit) {
|
||||
this.isRegisterFull = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
initMap() {
|
||||
let marker = null
|
||||
let circle = null
|
||||
this.$nextTick(() => {
|
||||
let map = new AMap.Map("signMap", {
|
||||
zoomEnable: true,
|
||||
dragEnable: false,
|
||||
resizeEnable: true,
|
||||
center: [114.402582, 30.521378],
|
||||
zoom: 16
|
||||
});
|
||||
|
||||
if (this.o.location && Array.isArray(this.o.location)) {
|
||||
const lng = parseFloat(this.o.location[0])
|
||||
const lat = parseFloat(this.o.location[1])
|
||||
marker = new AMap.Marker({
|
||||
position: [lng, lat],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
map.add(marker)
|
||||
// marker.setMap(map);
|
||||
// map.setZoomAndCenter(18, [lng, lat])
|
||||
|
||||
circle = new AMap.Circle({
|
||||
center: new AMap.LngLat(lng, lat), // 圆心位置
|
||||
radius: this.o.rangeMeter, //半径
|
||||
strokeColor: "#F33", //线颜色
|
||||
strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 1, //线粗细度
|
||||
fillColor: "#ee2200", //填充颜色
|
||||
fillOpacity: 0.35 //填充透明度
|
||||
})
|
||||
map.add(circle)
|
||||
map.setFitView()
|
||||
}
|
||||
|
||||
if (window.location.pathname === '/mobile/activity/myActivity/goSign' && !this.isSign) {
|
||||
map.plugin('AMap.Geolocation', function () {
|
||||
geolocation = new AMap.Geolocation({
|
||||
enableHighAccuracy: true,//是否使用高精度定位,默认:true
|
||||
timeout: 10000, //超过10秒后停止定位,默认:无穷大
|
||||
maximumAge: 0, //定位结果缓存0毫秒,默认:0
|
||||
convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
|
||||
showButton: true, //显示定位按钮,默认:true
|
||||
buttonPosition: 'LB', //定位按钮停靠位置,默认:'LB',左下角
|
||||
buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
|
||||
showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
|
||||
showCircle: false, //定位成功后用圆圈表示定位精度范围,默认:true
|
||||
panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
|
||||
zoomToAccuracy: true //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
|
||||
});
|
||||
map.addControl(geolocation)
|
||||
|
||||
geolocation.getCurrentPosition()
|
||||
|
||||
AMap.event.addListener(geolocation, 'error', (err) => {
|
||||
alert(JSON.stringify(err))
|
||||
}); //返回定位出错信息
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
getMapDistance(paramObj) {
|
||||
let lng1 = paramObj.lng1
|
||||
let lat1 = paramObj.lat1
|
||||
|
||||
let lng2 = paramObj.lng2
|
||||
let lat2 = paramObj.lat2
|
||||
|
||||
let radLat1 = lat1 * Math.PI / 180.0;
|
||||
let radLat2 = lat2 * Math.PI / 180.0;
|
||||
let a = radLat1 - radLat2;
|
||||
let b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
|
||||
let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
|
||||
Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
|
||||
s = s * 6378.137;// EARTH_RADIUS;
|
||||
s = Math.round(s * 10000) / 10000;
|
||||
s = s * 1000
|
||||
return s.toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.activity_card {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .van-image, .activity_card .van-image img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_name {
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom {
|
||||
line-height: 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .left {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 80px);
|
||||
font-size: 12px;
|
||||
color: #c4bebe;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .right {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="margin: 10px auto 60px auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openReg(o)">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
fit="cover"
|
||||
width="100%"
|
||||
height="200"
|
||||
:src="FILE_DOMAIN+o.cover"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon name="fire" color="red"></van-icon>
|
||||
<span style="margin-left: 10px;">{{o.name}}</span>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
报名中
|
||||
</span>
|
||||
<span v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
报名结束
|
||||
</span>
|
||||
<span v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
活动进行中
|
||||
</span>
|
||||
<span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
活动结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tabBarIndex">
|
||||
<van-tabbar-item icon="home-o" url="/mobile/activity/unionActivity">全部活动</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o" url="/mobile/activity/myActivity">我的活动</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: '/mobile/activity/myActivity',
|
||||
pageForm: {
|
||||
year: ''
|
||||
},
|
||||
tabBarIndex: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/activity/myActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
openReg(o) {
|
||||
// window.location.href = '/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=1'
|
||||
if (o.projectTypeCode === '50004') {
|
||||
window.location.href = '/mobile/activity/myActivity/goMyProject?id=' + o.id
|
||||
} else {
|
||||
window.location.href = '/mobile/activity/myActivity/goSign?id=' + o.id
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = new Date().getFullYear()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,213 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.activity_card {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .van-image, .activity_card .van-image img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_name {
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom {
|
||||
line-height: 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .left {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 80px);
|
||||
font-size: 12px;
|
||||
color: #c4bebe;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .right {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList" @change="formChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityStatus" :options="activityStatusList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityLevel" :options="activityLevelList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 80px auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openReg(o)">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
fit="cover"
|
||||
width="100%"
|
||||
height="200"
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon name="fire" color="red"></van-icon>
|
||||
<span style="margin-left: 10px;">{{o.name}}</span>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
报名中
|
||||
</span>
|
||||
<span v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
报名结束
|
||||
</span>
|
||||
<span v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
活动进行中
|
||||
</span>
|
||||
<span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
活动结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tabBarIndex">
|
||||
<van-tabbar-item icon="home-o" url="/mobile/activity/unionActivity">全部活动</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o" url="/mobile/activity/myActivity">我的活动</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: '/mobile/activity/unionActivity/pageData',
|
||||
pageForm: {
|
||||
year: '',
|
||||
activityStatus: null
|
||||
},
|
||||
tabBarIndex: 0,
|
||||
activityLevelList: [],
|
||||
activityStatusList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '进行中', value: 3},
|
||||
{text: '已结束', value: 4}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/activity/unionActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
/*this.tableData.forEach(v => {
|
||||
if (v.cover) {
|
||||
const cover = JSON.parse(v.cover)
|
||||
v.cover = cover[0].filepath
|
||||
}
|
||||
|
||||
})*/
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
//跳转页面
|
||||
openReg(o) {
|
||||
if (o.projectTypeCode === '50004') {
|
||||
window.location.href = '/mobile/activity/Sports/list/activityEventList?id=' + o.id
|
||||
} else {
|
||||
window.location.href = '/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=' + o.signUpMethod
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.pageForm, "activityStatus", 2)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code: 40000})
|
||||
this.activityLevelList.push({value: null, text: "全部类别"})
|
||||
data.forEach(v => {
|
||||
this.activityLevelList.push({value: v.code, text: v.name})
|
||||
})
|
||||
|
||||
this.$set(this.pageForm, "activityLevel", this.activityLevelList[0].value)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="签到" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="o.needSign">
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
</script>
|
||||
|
||||
<script>
|
||||
let geolocation = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
isSign: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getSignStatus() {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/isSign', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
geolocation.getCurrentPosition(async (status, result) => {
|
||||
if (status !== 'complete') {
|
||||
this.$toast.fail('定位失败!')
|
||||
return
|
||||
}
|
||||
console.log(status)
|
||||
console.log(result)
|
||||
const lat = result.position.lat
|
||||
const lng = result.position.lng
|
||||
const params = {
|
||||
lat1: lat, lng1: lng, lat2: this.o.location[1], lng2: this.o.location[0]
|
||||
}
|
||||
const distance = this.getMapDistance(params)
|
||||
console.log(distance)
|
||||
console.log(this.o.rangeMeter)
|
||||
if (distance > this.o.rangeMeter) {
|
||||
this.$toast('距离活动打卡点还有' + distance + '米')
|
||||
return
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '签到中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/singleSignUp', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
await this.getSignStatus()
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getSignStatus()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,160 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="个人报名" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="!isRegister && !isRegisterFull" @click="doSave()" style="border-radius: 10px" block
|
||||
type="info"
|
||||
:color="themeColor">
|
||||
立即报名
|
||||
</van-button>
|
||||
<van-button v-else-if="!isRegister && isRegisterFull" @click="doSave()" style="border-radius: 10px" block
|
||||
disabled
|
||||
type="info"
|
||||
:color="themeColor">
|
||||
名额已满
|
||||
</van-button>
|
||||
<van-button v-else-if="isRegister && moment().valueOf() < moment(o.applyEndTime).valueOf()" @click="doCancel"
|
||||
style="border-radius: 10px" block type="info"
|
||||
color="red">
|
||||
取消报名
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="isRegister && moment().valueOf() < moment(o.endTime).valueOf() && moment().valueOf() > moment(o.startTime).valueOf()">
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
tagCloseable: true,
|
||||
isRegister: false,
|
||||
isSign: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async isRegisterForMe() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/isRegisterForMe', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isRegister = resp.data
|
||||
}
|
||||
},
|
||||
async doSave() {
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '报名后若未参加,将有可能影响到其它活动的报名,同时活动开启了现场签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要报名吗?' + message,
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleRegister', {activityId: this.activityId})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.isRegisterForMe()
|
||||
this.getHasRegUserNum()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doCancel() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消报名吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleCancelRegister', {activityId: this.activityId})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.isRegisterForMe()
|
||||
this.getHasRegUserNum()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async getSignStatus() {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/isSign', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/singleSignUp', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
await this.getSignStatus()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.isRegisterForMe()
|
||||
this.getSignStatus()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.regCell .van-cell__label .van-tag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.userActionPopup {
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
.userActionPopup .van-cell__value {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.userActionPopup .addBtn {
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.userActionPopup .van-action-sheet__item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userActionPopup .userSelSuccess {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="分工会报名" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<van-cell-group inset class="mt5">
|
||||
<van-cell title="报名人员" class="regCell">
|
||||
<template #label>
|
||||
<div>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
本活动限制总报名人数:({{o.totalUserNumberLimit}})人
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
当前分工会报名限额 <span style="color: orange">({{o.limitUnion.limitNum}})人</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt5">
|
||||
<div v-if="registerList && registerList.length>0">
|
||||
<template v-for="item in registerList">
|
||||
<van-tag type="primary" :closeable="tagCloseable" size="medium"
|
||||
@close="removeRegUser(item)">
|
||||
{{item.userName}}
|
||||
</van-tag>
|
||||
</template>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div style="text-align: center;margin-top: 20px;">
|
||||
无报名人员
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt5" style="text-align: right"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="tagCloseable" size="mini" type="info" @click="openUserActionSheet">选择报名人员
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-action-sheet v-model="userActionSheet" title="选择报名人员" class="userActionPopup">
|
||||
<van-search v-model="searchKey" @search="onSearchUser" placeholder="请输入姓名搜索"></van-search>
|
||||
|
||||
<!-- <div class="van-hairline--bottom">-->
|
||||
<!-- 点击列表中的人员添加到活动人员中-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="van-action-sheet__content mt5" v-if="searchUserList && searchUserList.length>0">
|
||||
<template v-if="searchLoading">
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
<template v-if="!searchLoading">
|
||||
<template v-for="item in searchUserList" v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)"
|
||||
class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}</span>
|
||||
</button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty v-else style="position:absolute;" description=""></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="tagCloseable" @click="doSave()" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
<van-button v-else="!tagCloseable" @click="tagCloseable = true" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
修 改
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<!-- <div style="margin: 20px 20px 10px 20px" v-if="tagCloseable">-->
|
||||
<!-- <van-button-->
|
||||
<!-- :disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf()"-->
|
||||
<!-- @click="doSign()" style="border-radius: 10px" block type="info"-->
|
||||
<!-- :color="themeColor">-->
|
||||
<!-- 立即签到-->
|
||||
<!-- </van-button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
registerList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: '',
|
||||
searchUserList: [],
|
||||
tagCloseable: true,
|
||||
searchLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getRegisterUser() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/selectRegisterList', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.registerList = resp.data
|
||||
if (this.registerList.length > 0) {
|
||||
this.tagCloseable = false
|
||||
}
|
||||
}
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ''
|
||||
this.searchUserList = []
|
||||
this.userActionSheet = true
|
||||
},
|
||||
async onSearchUser(val) {
|
||||
this.searchLoading = true
|
||||
const resp = await $.get('/mobile/activity/unionActivity/searchNoRegisterUser', {
|
||||
activityId: this.activityId,
|
||||
searchKey: val
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {id, userName} = item
|
||||
this.registerList.push({id, userName})
|
||||
},
|
||||
async removeRegUser(item) {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要移除吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const index = this.registerList.findIndex(v => v.id === item.id)
|
||||
this.registerList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
//保存
|
||||
async doSave() {
|
||||
if (this.registerList.length === 0) {
|
||||
this.$toast('请添加报名人员后再提交!')
|
||||
return
|
||||
}
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '此活动开启了签到,需要您活动当天前往签到点位核实活动报名人员后进行签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: message + '您确认要报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const params = {
|
||||
activityId: this.activityId,
|
||||
personIds: JSON.stringify(this.registerList.map(v => v.id))
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSaveUnionRegister', params)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
await this.getRegisterUser()
|
||||
await this.getHasRegUserNum()
|
||||
this.$toast.success(resp.msg)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getRegisterUser()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,105 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="活动列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="主题" :border="false">{{o.hdname}}</van-cell>
|
||||
<van-cell :border="false" title="创建人">{{o.cjr}}</van-cell>
|
||||
<van-cell :border="false" title="创建时间">{{o.hdcjsj}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.hdkssj}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.hdjssj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
hdtype: 2,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/wmhdMange/data', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
const {hdid, hdjssj, hdkssj} = o
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
|
||||
vant.Toast('报名暂未开始!')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
|
||||
vant.Toast('报名已结束!')
|
||||
return
|
||||
}
|
||||
window.location.href = '/childrenActivities?client=mobile&id=' + hdid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,104 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="活动列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动主题">{{o.hdname}}</van-cell>
|
||||
<van-cell :border="false" title="作品主题">{{o.zpzt}}</van-cell>
|
||||
<van-cell :border="false" title="子女姓名">{{o.znxm}}</van-cell>
|
||||
<van-cell :border="false" title="教职工姓名">{{o.sbrname}}</van-cell>
|
||||
<van-cell :border="false" title="工资号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="与子女关系">{{o.zngx}}</van-cell>
|
||||
<van-cell :border="false" title="单位">{{o.dwname}}</van-cell>
|
||||
<van-cell :border="false" title="分工会">{{o.ghname}}</van-cell>
|
||||
<van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell>
|
||||
<van-cell :border="false" title="上传时间">{{o.sbsj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
hdtype: 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/childhd/sczp/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/cahd/list/view?id=' + o.id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,37 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<mobile-cahd-info ref="minfo"></mobile-cahd-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
components: {
|
||||
'mobile-cahd-info': httpVueLoader('/components/mobile/cahd/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
const id = GetQueryString("id")
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getInfo(id)
|
||||
}, 100)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,370 @@
|
||||
<!--#
|
||||
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 {
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.userPopup .van-cell {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="协会审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入协会名称进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.applyType" :options="applyTypeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false" @load="onLoad"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<!--<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status==1">待协会审核</span>
|
||||
<span v-if="o.status==2" style="color: red">协会拒绝</span>
|
||||
<span v-if="o.status==3">待校工会审核</span>
|
||||
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status==5" style="color: green">审核通过</span>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<!--<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">电  话:</span>{{o.fzr_mobile}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">会费标准:</span>{{o.dues_standard}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
|
||||
</van-row>
|
||||
</div>-->
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">已审{{o.has_audit}}</van-button>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">未审{{o.no_audit}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet v-model:show="userShow" title="申请人员列表" class="userPopup" @close="popClose">
|
||||
<div class="content">
|
||||
<div class="van-doc-card">
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div v-if="queryType === 'notAudit'">
|
||||
<van-tag @click="checkAll()" plain type="primary" size="large">全选</van-tag>
|
||||
<van-tag @click="toggleAll()" plain type="primary" size="large" style="margin-left: 6px">反选</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup" v-if="userList !== null">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
v-for="(obj, index) in userList"
|
||||
clickable class="cus_cell"
|
||||
:key="obj.id"
|
||||
@click="toggle(index)">
|
||||
|
||||
<span style="display: inline-block; width: 86px">{{obj.username}}</span>
|
||||
<span class="unit">{{obj.unitname}}</span>
|
||||
<br/>
|
||||
<span style="display: inline-block; width: 85px">{{obj.sex}}</span>
|
||||
<span style="display: inline-block;">{{obj.loginname}}</span>
|
||||
<van-icon class="audit_icon" color="green" v-if="queryType === 'hasAudit' && obj.auditstate === true" name="passed"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey" v-if="queryType === 'hasAudit' && obj.auditstate === false" name="close"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
<div v-else style="margin-top: 4px; text-align: center">暂无请假人员</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过</van-button>
|
||||
</div>
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%">
|
||||
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回</van-button>
|
||||
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
queryType: '',
|
||||
result: [],
|
||||
userList: [],
|
||||
userShow: false,
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
type: '',
|
||||
auditType: '',
|
||||
applyTypeOptions: [
|
||||
{text: '申请加入', value: '1'},
|
||||
{text: '申请退会', value: '2'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async audit (type, auditType) {
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
vant.Toast('请先选择人员')
|
||||
return
|
||||
}
|
||||
const str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择!' : '您确定要一键全部审核吗?'
|
||||
vant.Dialog.confirm({title: '提示', message: str,}).then(async () => {
|
||||
let idList = this.result
|
||||
if (type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await $.post('/platform/sys/club/sh/check', {
|
||||
ids: JSON.stringify(idList),
|
||||
flag: auditType === 'pass',
|
||||
type: 1,
|
||||
applyType: this.pageForm.applyType,
|
||||
})
|
||||
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: 1,
|
||||
applyType: this.pageForm.applyType,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无已审人员')
|
||||
} else {
|
||||
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: 1,
|
||||
applyType: this.pageForm.applyType,
|
||||
})
|
||||
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 = 1
|
||||
$.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.$set(this.pageForm, "applyType", '1')
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,308 @@
|
||||
<!--#
|
||||
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 {
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="加入协会"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入协会名称进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.isjr" :options="clubType"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false" @load="onLoad"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<!--<van-row>
|
||||
<van-col span="12">
|
||||
<span style="color: grey">联 系 人:</span>
|
||||
<span>{{o.fzrname}}</span>
|
||||
</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>
|
||||
<span>{{o.dues_standard}}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span style="color: grey">限定人数:</span>
|
||||
<span>{{o.number}}人</span>
|
||||
</van-col>
|
||||
</van-row>-->
|
||||
<van-row>
|
||||
<van-col span="12" class="cus_overflow">
|
||||
<span style="color: grey">入会状态:</span>
|
||||
<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>
|
||||
<span v-if="!o.status">暂未申请</span>
|
||||
</van-col>
|
||||
<van-col span="12" class="cus_overflow">
|
||||
<span style="color: grey">退会状态:</span>
|
||||
<span v-if="o.exitstatus==1">待协会审核</span>
|
||||
<span v-if="o.exitstatus==2" style="color: red">协会拒绝</span>
|
||||
<span v-if="o.exitstatus==3">待校工会审核</span>
|
||||
<span v-if="o.exitstatus==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.exitstatus==5" style="color: green">审核通过</span>
|
||||
<span v-if="!o.exitstatus">暂未申请</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click="rollback(o)" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary"
|
||||
v-if="pageForm.isjr === true && o.status==1">
|
||||
撤销加入申请
|
||||
</van-button>
|
||||
<van-button @click="needJoin(o)"
|
||||
color="#1867b0" v-if="pageForm.isjr === false"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
我要加入
|
||||
</van-button>
|
||||
|
||||
<van-button @click="cancelExitClub(o)" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary"
|
||||
v-if="pageForm.isjr === true && o.status!=1 && o.exitstatus==1">
|
||||
撤销退会申请
|
||||
</van-button>
|
||||
<van-button @click="exitClub(o)"
|
||||
color="#1867b0" v-if="pageForm.isjr === true && o.exitstatus!=1"
|
||||
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>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
clubType: [{text: '未加入', value: false}, {text: '已加入', value: true}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
exitClub(row) {
|
||||
vant.Dialog.confirm({title: '提示', message: '您确定要申请退会吗?',}).then(async () => {
|
||||
const resp = await $.post('/platform/sys/club/sq/exitClub', {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
}).catch(() => {})
|
||||
},
|
||||
cancelExitClub(id) {
|
||||
vant.Dialog.confirm({title: '提示', message: '您确定要撤销退会申请吗?',}).then(async () => {
|
||||
const resp = await $.post('/platform/sys/club/sq/cancelExitClub', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
}).catch(() => {})
|
||||
},
|
||||
openView(id) {
|
||||
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/sys/club/sq/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async needJoin(o) {
|
||||
this.clickRow = o
|
||||
const {code, data} = await $.post('/platform/sys/club/sq/getInClubByCurUser')
|
||||
let str = '您还没有参加协会'
|
||||
if (data && data.length > 0) {
|
||||
str = '您已经加入了'
|
||||
data.forEach((item) => {
|
||||
str += '【' + item.name + '】'
|
||||
})
|
||||
}
|
||||
str += ',请确认是否申请加入【' + o.name + '】?'
|
||||
vant.Dialog.confirm({title: '提示', message: str,}).then(() => {
|
||||
const id = o.id
|
||||
$.post("/platform/sys/club/sq/submit", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
vant.Toast('提交申请成功');
|
||||
this.doSearch();
|
||||
} else {
|
||||
vant.Toast(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {});
|
||||
},
|
||||
rollback(o) {
|
||||
vant.Dialog.confirm({title: '提示', message: '请确定是否撤销申请?',}).then(() => {
|
||||
const id = o.id
|
||||
$.post("/platform/sys/club/sq/revocation", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
vant.Toast('撤销申请成功');
|
||||
this.doSearch();
|
||||
} else {
|
||||
vant.Toast(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const data = await getClubType()
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.typeOptions.unshift({text: '全部类型'})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
this.$set(this.pageForm, "isjr", this.clubType[0].value)
|
||||
this.pageForm.searchName = 'club.name'
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,385 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<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 0;
|
||||
}
|
||||
|
||||
.van-radio-group {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.van-cell-group__title {
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
.van-form .van-field__control {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</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.applyType" :options="applyTypeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<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-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.username}}</span>
|
||||
</div>
|
||||
<div style="color: #1867b0;"></div>
|
||||
</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.applytime}}</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 == 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 class="info-show" 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>
|
||||
<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 class="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" v-model="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>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: false,
|
||||
clubOptions: [],
|
||||
auditOptions: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '已审核', value: 2},
|
||||
{text: '未审核', value: 3},
|
||||
],
|
||||
pageForm: {
|
||||
radioType: 3
|
||||
},
|
||||
infoShow: false,
|
||||
formData: {},
|
||||
applyTypeOptions: [
|
||||
{text: '申请加入', value: '1'},
|
||||
{text: '申请退会', value: '2'},
|
||||
],
|
||||
}
|
||||
},
|
||||
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
|
||||
}*/
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要审核吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
//this.$refs.signature.submitSign()
|
||||
this.formData.flag = flag
|
||||
this.formData.type = 2
|
||||
this.formData.applyType = this.pageForm.applyType
|
||||
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
|
||||
this.pageForm.type = 2
|
||||
$.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: '全部协会'})
|
||||
this.$set(this.pageForm, "applyType", '1')
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,385 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="填写慰问申请" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="manager_name"
|
||||
label="申请入"></van-field>
|
||||
|
||||
<van-field readonly :value="formData.apply_time" name="apply_time"
|
||||
label="申请时间"
|
||||
></van-field>
|
||||
|
||||
<van-field @input="userRemoteMethod" name="be_user_name"
|
||||
required
|
||||
v-model="formData.be_user_name" label="慰问对象" placeholder="请输入慰问对象"
|
||||
:rules="[{ required: true, message: '请填写慰问对象' }]"></van-field>
|
||||
|
||||
<van-action-sheet v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = []"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect">
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field @input="payeeUserRemoteMethod" name="payee_name"
|
||||
|
||||
v-model="formData.payee_name" label="收款人" placeholder="请输入收款人"></van-field>
|
||||
|
||||
<van-action-sheet v-model="payeeSheetShow"
|
||||
:actions="payeeUserList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="payeeUserList = []"
|
||||
:close-on-click-overlay="false"
|
||||
@select="payeeOnUserSelect">
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field v-model="formData.payee_bank_number" name="payee_bank_number" type="number"
|
||||
label="收款人银行卡" placeholder="请输入收款人银行卡"></van-field>
|
||||
<van-field v-model="formData.payee_bank_name" name="payee_bank_name"
|
||||
label="收款人开户行" placeholder="请输入收款人开户行"></van-field>
|
||||
|
||||
|
||||
<van-field readonly clickable name="type" :value="formData.typeName"
|
||||
required
|
||||
label="慰问类型"
|
||||
@click="showTypePicker = true" placeholder="点击选择慰问类型"
|
||||
:rules="[{ required:true, message: '请选择慰问类型'}]"></van-field>
|
||||
<van-popup v-model:show="showTypePicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="typeColumns" @confirm="onTypeConfirm"
|
||||
@cancel="showTypePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field readonly clickable name="way" :value="formData.wayName"
|
||||
label="慰问方式"
|
||||
required
|
||||
placeholder="点击选择慰问方式"
|
||||
:rules="[{ required:true, message: '请选择慰问方式'}]"></van-field>
|
||||
<van-popup v-model:show="showWayPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="wayColumns" @confirm="onWayConfirm"
|
||||
@cancel="showWayPicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field v-model="formData.money" name="money" type="number" label="慰问金额"
|
||||
:rules="[{ required:true, message: '请填写慰问金额' }]"></van-field>
|
||||
|
||||
<van-field
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写慰问时间' }]"
|
||||
readonly
|
||||
clickable
|
||||
name="occur_time"
|
||||
:value="formData.occur_time"
|
||||
label="慰问时间"
|
||||
placeholder="点击选择慰问时间"
|
||||
@click="showOccurTime = true"
|
||||
></van-field>
|
||||
<van-calendar v-model="showOccurTime"
|
||||
@confirm="onOccurTimeConfirm"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
:color="themeColor"></van-calendar>
|
||||
|
||||
<template
|
||||
v-if="['c7175af55693441e8233be4552cef9d5','0872ea0b95aa463fb8d98c46bdf72537'].includes(formData.type)">
|
||||
<van-field :value="formData.hospital_stay"
|
||||
readonly clickable required
|
||||
@click="hospital_stay = true"
|
||||
name="hospital_stay" label="住院时间"
|
||||
placeholder="请选择住院时间"
|
||||
:rules="[{ required:true, message: '请选择住院时间' }]"></van-field>
|
||||
<van-calendar v-model="hospital_stay" type="range" @confirm="onConfirm"
|
||||
:min-date="new Date('1999-01-01')"
|
||||
:color="themeColor"></van-calendar>
|
||||
|
||||
<van-field v-model="formData.the_hospital" name="the_hospital" name="type" label="所在医院"
|
||||
placeholder="请填写所在医院" required
|
||||
:rules="[{ required:true, message: '请填写所在医院' }]"></van-field>
|
||||
</template>
|
||||
|
||||
<van-field v-model="formData.remark" name="remark" label="申请事由" style="flex-flow: column"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写申请事由' }]"
|
||||
placeholder="请填写申请事由"
|
||||
input-align="left"
|
||||
rows="3" maxlength="200" type="textarea" show-word-limit autosize>
|
||||
<template #label>
|
||||
<div class="mb10">申请事由</div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>购置物品及价格</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button v-if="goods && goods.length>0 && goods.length<3" style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="goods.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="goods && goods.length>0">
|
||||
<div v-for="o,i in goods" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>物品{{toChinesNum(i+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
icon="minus" type="danger" round size="mini"
|
||||
@click="goods.splice(i,1)"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-field label="名称" v-model="o.name" placeholder="请填写物品名称"
|
||||
:rules="[{ required:true, message: '请填写物品名称' }]"></van-field>
|
||||
<van-field label="价格" v-model="o.price" placeholder="请填写物品价格"
|
||||
type="number"
|
||||
:rules="[{ required:true, message: '请填写物品价格' }]" @input="priceInput"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button style="width: 50px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="goods.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field name="files" label="附  件" required
|
||||
style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button @click="onSubmit()" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
goods: [],
|
||||
payeeSheetShow: false,
|
||||
payeeUserList: [],
|
||||
hospital_stay: false,
|
||||
userList: [],
|
||||
formData: {},
|
||||
showTypePicker: false,
|
||||
showWayPicker: false,
|
||||
sheetShow: false,
|
||||
typeColumns: [],
|
||||
wayColumns: [],
|
||||
files: [],
|
||||
showOccurTime: false,
|
||||
// minDate: moment().subtract(5, 'year')._d,
|
||||
minDate: new Date(2010, 1, 1),
|
||||
maxDate: new Date(),
|
||||
money: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"formData.money"(val) {
|
||||
if (val > this.money) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '金额超过规定金额' + this.money + "(元)",
|
||||
type: 'warning'
|
||||
});
|
||||
this.$set(this.formData, "money", this.money)
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
priceInput() {
|
||||
let num = 0
|
||||
this.goods.forEach(v => {
|
||||
num += parseFloat(v.price)
|
||||
})
|
||||
this.$set(this.formData, "money", num)
|
||||
},
|
||||
onOccurTimeConfirm(val) {
|
||||
this.$set(this.formData, "occur_time", moment(val).format("YYYY-MM-DD"))
|
||||
this.showOccurTime = false
|
||||
},
|
||||
onConfirm(date) {
|
||||
const [start, end] = date;
|
||||
this.hospital_stay = false;
|
||||
this.formData.hospital_stay = moment(start).format('YYYY-MM-DD') + "-" + moment(end).format('YYYY-MM-DD');
|
||||
this.$set(this.formData, "hospital_stay_1", moment(start).format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, "hospital_stay_2", moment(end).format('YYYY-MM-DD'))
|
||||
},
|
||||
async userRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.userList = arr.map(v => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")", id: v.id
|
||||
}
|
||||
})
|
||||
this.sheetShow = true
|
||||
}
|
||||
},
|
||||
async payeeUserRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.payeeUserList = arr.map(v => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")", id: v.id
|
||||
}
|
||||
})
|
||||
this.payeeSheetShow = true
|
||||
}
|
||||
},
|
||||
async queryUser(query) {
|
||||
const {data} = await $.get("/platform/fw/condolence/apply/queryUser", {query})
|
||||
return data
|
||||
},
|
||||
onUserSelect(u) {
|
||||
this.$set(this.formData, 'be_user', u.id)
|
||||
this.$set(this.formData, 'be_user_name', u.name)
|
||||
this.sheetShow = false
|
||||
},
|
||||
payeeOnUserSelect(u) {
|
||||
this.$set(this.formData, 'payee', u.id)
|
||||
this.$set(this.formData, 'payee_name', u.name)
|
||||
this.payeeSheetShow = false
|
||||
},
|
||||
async onTypeConfirm(val) {
|
||||
this.$set(this.formData, "typeName", val.text)
|
||||
this.$set(this.formData, "type", val.value)
|
||||
const {data, code, msg} = await $.get("/platform/condolence/type/findOne", {id: val.value})
|
||||
this.$set(this, "money", data.money)
|
||||
await this.moneyChange(val.value)
|
||||
this.showTypePicker = false;
|
||||
},
|
||||
onWayConfirm(val) {
|
||||
this.$set(this.formData, "wayName", val.text)
|
||||
this.$set(this.formData, "way", val.value)
|
||||
this.showWayPicker = false;
|
||||
},
|
||||
async moneyChange(id) {
|
||||
const {data, code, msg} = await $.get("/platform/condolence/type/findOne", {id})
|
||||
if (data) {
|
||||
this.$set(this.formData, "money", data.money)
|
||||
this.$set(this.formData, "wayName", data.way)
|
||||
this.$set(this.formData, "way", data.way)
|
||||
}
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.formData.files) {
|
||||
vant.Toast('请上传附件材料!')
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
/* if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
await this.$refs.signature.updateSign()
|
||||
const formData = clone(this.formData)
|
||||
formData.mobile = "${@shiro.getPrincipalProperty('mobile')}"
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
formData.goods = this.goods
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
this.$toast.loading('提交中...')
|
||||
const res = await $.post('/platform/fw/condolence/apply/doAdd', {
|
||||
data: JSON.stringify(formData),
|
||||
sign: formData.sign
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/condolence/apply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.signature) {
|
||||
this.$refs.signature.getMySign()
|
||||
}
|
||||
})
|
||||
},
|
||||
async created() {
|
||||
this.formData.apply_time = moment().format('YYYY-MM-DD')
|
||||
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach(v => {
|
||||
this.typeColumns.push({value: v.id, text: v.name + "(" + v.code + ")"})
|
||||
})
|
||||
for (let i in condolence.way) {
|
||||
this.wayColumns.push({value: condolence.way[i], text: condolence.way[i]})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,58 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问申请信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<condolence-info :id.sync="id"></condolence-info>
|
||||
<van-button :color="themeColor" block @click="doEdit" class="ml10 mr10" v-if="state_id==2010||state_id==2020">撤 回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
state_id: ""
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
doEdit() {
|
||||
vant.Dialog.confirm({
|
||||
title: '标题',
|
||||
message: '确认要撤回吗?',
|
||||
})
|
||||
.then(async () => {
|
||||
const resp = await $.post("/platform/fw/condolence/ucr/doEdit", {id: this.id});
|
||||
this.$toast.success('撤回成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/condolence/audit'
|
||||
}, 1000)
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
this.state_id = GetQueryString('state_id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,146 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.apply_btn {
|
||||
animation: come .5s;
|
||||
position: fixed;top: 20%;right: 0
|
||||
}
|
||||
|
||||
@keyframes come {
|
||||
from {
|
||||
right: -100px;
|
||||
}
|
||||
to {
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="慰问申请列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOption" @change="typeChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="被慰问人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.be_username}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="慰问类型">{{o.type_name}}</van-cell>
|
||||
<van-cell :border="false" title="慰问方式">{{o.way}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.be_unitname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<!-- <van-button v-show="visible" class="apply_btn" @click.stop="openApply" plain hairline>-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <svg t="1634200664904" class="icon" viewBox="0 0 1024 1024" version="1.1"-->
|
||||
<!-- xmlns="http://www.w3.org/2000/svg" p-id="3163" width="32" height="32">-->
|
||||
<!-- <path d="M837.632 160.768c64 0 117.248 53.248 117.248 117.248v470.528c0 64-53.248 117.248-117.248 117.248H187.904c-64 2.048-117.248-50.688-117.248-114.688V278.016c0-64 53.248-117.248 117.248-117.248h649.728z m66.048 590.848V274.944c0-32.768-28.16-60.416-60.416-60.416H184.832c-32.768 0-60.416 28.16-60.416 60.416v479.232c0 32.768 28.16 60.416 60.416 60.416h657.92c32.768-2.56 60.928-28.16 60.928-62.976zM387.072 317.44"-->
|
||||
<!-- fill="#2E77ED" p-id="3164"></path>-->
|
||||
<!-- <path d="M326.144 709.632c-14.848 0-26.624-12.288-26.624-27.136V455.68c0-14.848 12.288-27.136 27.136-27.136S353.28 440.832 353.28 455.68v226.816c-0.512 15.36-12.288 27.136-27.136 27.136z"-->
|
||||
<!-- fill="#FFBB12" p-id="3165"></path>-->
|
||||
<!-- <path d="M569.856 442.368c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 682.496c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 553.472c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136z"-->
|
||||
<!-- fill="#2E77ED" p-id="3166"></path>-->
|
||||
<!-- <path d="M228.352 509.44c-10.24-10.752-10.24-27.648 0-37.888l78.336-78.336c10.752-10.752 27.648-10.752 37.888 0s10.24 27.648 0 37.888L266.24 509.44c-10.24 10.752-27.136 10.752-37.888 0z"-->
|
||||
<!-- fill="#FFBB12" p-id="3167"></path>-->
|
||||
<!-- <path d="M306.688 393.216c10.752-10.24 27.648-10.24 37.888 0l78.336 78.336c10.752 10.752 10.752 27.648 0 37.888s-27.648 10.24-37.888 0L306.688 431.104c-10.24-10.752-10.24-27.648 0-37.888z"-->
|
||||
<!-- fill="#FFBB12" p-id="3168"></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </template>-->
|
||||
<!-- 申请-->
|
||||
<!-- </van-button>-->
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
visible: true,
|
||||
typeOption: [
|
||||
{value: null, text: '全部'}
|
||||
],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openApply() {
|
||||
window.location.href = '/mobile/condolence/apply/for'
|
||||
},
|
||||
openInfo(id) {
|
||||
window.location.href = '/mobile/condolence/apply/info?id=' + id
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
typeChange(val) {
|
||||
this.pageForm.type = val
|
||||
this.onRefresh()
|
||||
},
|
||||
listenTouch() {
|
||||
this.$nextTick(() => {
|
||||
const app = document.querySelector("#app")
|
||||
app.addEventListener('touchstart', () => {
|
||||
this.visible = false
|
||||
})
|
||||
app.addEventListener('touchend', () => {
|
||||
this.visible = true
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.listenTouch()
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach(v => {
|
||||
this.typeOption.push({value: v.id, text: v.name + v.code})
|
||||
})
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.$set(this.pageForm, "type", this.typeOption[0].value)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,138 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" @change="yearChange"
|
||||
:options="mCondolence.typeList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange"
|
||||
:options="mCommon.unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange"
|
||||
:options="mCommon.unitList"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list v-model="mLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="被慰问人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.be_username}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申 请 人">{{o.sqr_username}}</van-cell>
|
||||
<van-cell :border="false" title="所在单位">{{o.be_unitname}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会">{{o.be_unionname}}</van-cell>
|
||||
<van-cell :border="false" title="慰问类型">{{o.type_name}}</van-cell>
|
||||
<van-cell :border="false" title="慰问方式">{{o.way}}</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unitList: [],
|
||||
unionList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
handle: true,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/condolence/audit/auditHtml?state_id=' + o.state_id + '&id=' + o.id
|
||||
},
|
||||
yearChange() {
|
||||
this.tableData = []
|
||||
this.refreshing = true;
|
||||
this.finished = false;
|
||||
this.pageForm.pageNumber = 0
|
||||
this.flushUnits()
|
||||
},
|
||||
pageData() {
|
||||
this.mLoading = true
|
||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
|
||||
},
|
||||
async flushUnits() {
|
||||
//this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
await mCommon.getUnitList(this.pageForm.unionId)
|
||||
} else {
|
||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
await mCondolence.getType()
|
||||
await mCommon.getUnionList()
|
||||
if (mCondolence.typeList && mCondolence.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "type", mCondolence.typeList[0].value)
|
||||
}
|
||||
if (mCommon.unionList && mCommon.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
|
||||
}
|
||||
if (mCommon.unitList && mCommon.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,138 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<condolence-info ref="info" :id.sync="id" title="校工会会计审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会会计审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field readonly left-icon="contact"
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
<van-field v-model="formData.money" label="慰问金额" type="number" left-icon="balance-list-o"
|
||||
required :rules="[{ required:true, message: '请输入慰问金额' }]"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
left-icon="chat-o"
|
||||
rows="1"
|
||||
required
|
||||
:rules="[{ required:true, message: '请输入审核意见' }]"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</condolence-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
/* if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/condolence/fr/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/condolence/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
const {data} = await $.get("/platform/fw/condolence/findOne", {id: this.id})
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
opinion: null,
|
||||
sign: "",
|
||||
money: data.money
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,131 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<condolence-info ref="info" :id.sync="id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field readonly
|
||||
left-icon="contact"
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
rows="1"
|
||||
required
|
||||
left-icon="chat-o"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</condolence-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
/* if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/condolence/vcr/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/condolence/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
opinion: null,
|
||||
sign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,131 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<condolence-info ref="info" :id.sync="id" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
院级工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
left-icon="contact"
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
left-icon="chat-o"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button color="red" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</condolence-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
|
||||
/* if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/condolence/ucr/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/condolence/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
opinion: null,
|
||||
sign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,272 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难补助申请" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')} ( ${@shiro.getPrincipalProperty('loginname')} )"
|
||||
name="sqrname"
|
||||
label="申请人"></van-field>
|
||||
|
||||
<van-field name="apply_mode" label="申请模式">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.apply_mode" direction="horizontal" @change="applyModeChange">
|
||||
<van-radio :name="1">本人申请</van-radio>
|
||||
<van-radio :name="2">替他人申请</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field @input="userRemoteMethod" name="bbzrusername"
|
||||
v-model="formData.bbzrusername" label="受补助人" placeholder="请输入受补助人姓名"
|
||||
:rules="[{ required: true, message: '请填写受补助人姓名' }]"></van-field>
|
||||
|
||||
<van-action-sheet v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = []"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect">
|
||||
</van-action-sheet>
|
||||
<van-field label="身份证号" v-model="formData.idcard"></van-field>
|
||||
|
||||
|
||||
<van-field label="性别" v-model="formData.sex"></van-field>
|
||||
|
||||
<van-field label="职称" v-model="formData.zc"></van-field>
|
||||
<van-field label="职务" v-model="formData.zw"></van-field>
|
||||
|
||||
<van-field label="单位" v-model="formData.unitname"></van-field>
|
||||
|
||||
<van-field label="出生日期" v-model="formData.birthday"></van-field>
|
||||
|
||||
<van-field label="手机号码" v-model="formData.lxfs" type="tel"></van-field>
|
||||
|
||||
|
||||
<van-field name="sq_bzlx_name"
|
||||
@click="sq_bzlxShow = true"
|
||||
:value="formData.sq_bzlx_name" label="补助类型" placeholder="请选择补助类型"></van-field>
|
||||
<van-popup v-model:show="sq_bzlxShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="sq_bzlxList" @confirm="onSq_bzlxConfirm"
|
||||
@cancel="sq_bzlxShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field name="sq_knlx_name"
|
||||
@click="sq_knlxShow = true"
|
||||
:value="formData.sq_knlx_name" label="困难类型" placeholder="请选择困难类型"></van-field>
|
||||
<van-popup v-model:show="sq_knlxShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="sq_knlxist" @confirm="onSq_knlxConfirm"
|
||||
@cancel="sq_knlxShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<template v-if="formData.sq_knlx==1">
|
||||
<van-field label="所在医院" placeholder="请填写所在所在医院" v-model="formData.hospital"></van-field>
|
||||
<van-field label="住院时间" :value="formData.hospitalized_time_name"
|
||||
placeholder="请填写住院时间"
|
||||
@click="hospitalized_timeShow = true"></van-field>
|
||||
<van-calendar v-model="hospitalized_timeShow" :min-date="new Date('1999-01-01')" :show-confirm="false"
|
||||
type="range"
|
||||
@confirm="onHospitalized_timeConfirm"></van-calendar>
|
||||
</template>
|
||||
|
||||
<van-field v-model="formData.apply_reason" name="remark" label="申请理由" style="flex-flow: column"
|
||||
placeholder="请填写申请理由"
|
||||
input-align="left"
|
||||
rows="3" maxlength="200" type="textarea" show-word-limit autosize>
|
||||
<template #label>
|
||||
<div class="mb10">申请事由</div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field name="files" label="附  件" required style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sqsign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button @click="onSubmit()" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
<script src="/assets/platform/module/difficulty/common.js?v=1.0.0"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id"),
|
||||
hospitalized_timeShow: false,
|
||||
sq_bzlxShow: false,
|
||||
sq_bzlxList: [],
|
||||
minDate: {},
|
||||
sq_knlxShow: false,
|
||||
sq_knlxist: [],
|
||||
userList: [],
|
||||
formData: {
|
||||
apply_mode: 1
|
||||
},
|
||||
sheetShow: false,
|
||||
files: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
onHospitalized_timeConfirm(val) {
|
||||
this.$set(this.formData, "hospitalized_time_name", moment(val[0]).format('YYYY-MM-DD') + "至" + moment(val[1]).format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, "hospitalized_time", moment(val[0]).format('YYYY-MM-DD') + "至" + moment(val[1]).format('YYYY-MM-DD'))
|
||||
this.hospitalized_timeShow = false
|
||||
},
|
||||
onSq_bzlxConfirm(val) {
|
||||
this.$set(this.formData, "sq_bzlx_name", val.text)
|
||||
this.$set(this.formData, "sq_bzlx", val.value)
|
||||
for (let i in difficulty.getHard(val.value)) {
|
||||
this.sq_knlxist.push({value: i, text: difficulty.getHard(val.value)[i]})
|
||||
}
|
||||
this.$set(this.formData, "sq_knlx_name", null)
|
||||
this.$set(this.formData, "sq_knlx", null)
|
||||
this.sq_bzlxShow = false
|
||||
},
|
||||
onSq_knlxConfirm(val) {
|
||||
this.$set(this.formData, "sq_knlx_name", val.text)
|
||||
this.$set(this.formData, "sq_knlx", val.value)
|
||||
this.sq_knlxShow = false
|
||||
|
||||
},
|
||||
applyModeChange(val) {
|
||||
if (val === 1) {
|
||||
this.$set(this.formData, 'difficultyUser', "${@shiro.getPrincipalProperty('id')}")
|
||||
this.$set(this.formData, 'bbzrusername', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'sex', "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, 'zc', "${@shiro.getPrincipalProperty('jobTitle')}")
|
||||
this.$set(this.formData, 'zw', "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, 'unitname', "${@shiro.getPrincipalProperty('unit').getName()}")
|
||||
this.$set(this.formData, 'birthday', "${@shiro.getPrincipalProperty('birthday')}")
|
||||
this.$set(this.formData, 'lxfs', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, 'idcard', "${@shiro.getPrincipalProperty('idCard')}")
|
||||
} else if (val === 2) {
|
||||
this.formData = {}
|
||||
this.$set(this.formData, 'apply_mode', 2)
|
||||
this.$set(this.formData, 'bbzrusername', undefined)
|
||||
}
|
||||
},
|
||||
async userRemoteMethod(query) {
|
||||
if (query) {
|
||||
const {data} = await $.get("/platform/fw/condolence/apply/queryUser", {query})
|
||||
data.forEach(v => {
|
||||
v.name = v.username
|
||||
v.subname = v.loginname
|
||||
return v
|
||||
})
|
||||
this.userList = data
|
||||
this.sheetShow = true
|
||||
}
|
||||
},
|
||||
onUserSelect(val) {
|
||||
this.$set(this.formData, 'difficultyUser', val.id)
|
||||
this.$set(this.formData, 'bbzrusername', val.name)
|
||||
this.$set(this.formData, 'lxfs', val.mobile)
|
||||
this.$set(this.formData, 'sex', val.sex)
|
||||
this.$set(this.formData, 'unitname', val.unitname)
|
||||
this.$set(this.formData, 'zc', val.jobTitle)
|
||||
this.$set(this.formData, 'zw', val.position)
|
||||
this.$set(this.formData, 'birthday', val.birthday)
|
||||
this.$set(this.formData, "sq_bzlx_name", this.sq_bzlxList[0].text)
|
||||
this.$set(this.formData, "sq_bzlx", this.sq_bzlxList[0].value)
|
||||
this.sheetShow = false
|
||||
},
|
||||
|
||||
async onSubmit() {
|
||||
this.$refs.signature.submitSign()
|
||||
/* if (!this.formData.sqsign) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}*/
|
||||
const formData = clone(this.formData)
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
formData.applicantsign = formData.sqsign
|
||||
formData.bbzrusername = formData.difficultyUser
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
this.$toast.loading('提交中...')
|
||||
const res = await $.post('/platform/fw/difficulty/apply/doAdd', formData)
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/difficulty/apply/apply_list')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
async getApplyInfo(id) {
|
||||
const {data, code, msg} = await $.get("/platform/fw/difficulty/applylist/findOne", {id})
|
||||
if (data) {
|
||||
data.apply_mode = parseInt(data.apply_mode)
|
||||
this.formData = data
|
||||
if (this.formData.files && this.formData.files.length > 0) {
|
||||
this.formData.files = JSON.parse(data.files)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.signature) {
|
||||
this.$refs.signature.getMySign()
|
||||
}
|
||||
})
|
||||
},
|
||||
async created() {
|
||||
this.applyModeChange(1)
|
||||
for (let i in difficulty.subsidy) {
|
||||
this.sq_bzlxList.push({value: i, text: difficulty.subsidy[i]})
|
||||
}
|
||||
|
||||
this.$set(this.formData, "sq_bzlx_name", this.sq_bzlxList[0].text)
|
||||
this.$set(this.formData, "sq_bzlx", this.sq_bzlxList[0].value)
|
||||
for (let i in difficulty.getHard(this.formData.sq_bzlx)) {
|
||||
this.sq_knlxist.push({value: i, text: difficulty.getHard(this.formData.sq_bzlx)[i]})
|
||||
}
|
||||
this.formData.apply_time = moment().format('YYYY-MM-DD')
|
||||
|
||||
if (this.id) {
|
||||
this.getApplyInfo(this.id)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难帮扶申请信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<difficulty-info :id.sync="id"></difficulty-info>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/platform/module/difficulty/common.js?v=1.0.0"></script>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
state_id: ""
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
this.state_id = GetQueryString('state_id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,136 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.apply_btn {
|
||||
animation: come .5s;
|
||||
position: fixed;
|
||||
top: 20%;
|
||||
right: 0
|
||||
}
|
||||
|
||||
@keyframes come {
|
||||
from {
|
||||
right: -100px;
|
||||
}
|
||||
to {
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="困难帮扶申请列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.zt)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="受补助人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.sbzrname}}({{o.sbzrloginname}})
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.sqsj}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.unitname}}</van-cell>
|
||||
<van-cell :border="false" title="联系方式">{{o.lxfs}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.statecolor">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
visible: true,
|
||||
typeOption: [
|
||||
{value: null, text: '全部'}
|
||||
],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openInfo(id, state) {
|
||||
window.location.href = '/mobile/difficulty/apply/apply_info?id=' + id
|
||||
/* if ([95,96, 100].includes(state)) {
|
||||
window.location.href = '/mobile/difficulty/apply/index?id=' + id
|
||||
}else{
|
||||
window.location.href = '/mobile/difficulty/apply/apply_info?id=' + id
|
||||
}*/
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
listenTouch() {
|
||||
this.$nextTick(() => {
|
||||
const app = document.querySelector("#app")
|
||||
app.addEventListener('touchstart', () => {
|
||||
this.visible = false
|
||||
})
|
||||
app.addEventListener('touchend', () => {
|
||||
this.visible = true
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
$.get('/platform/fw/difficulty/applylist/pageData', this.pageForm, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.listenTouch()
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,132 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange"
|
||||
:options="mCommon.unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange"
|
||||
:options="mCommon.unitList"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="受助人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.sbzrname}}({{o.sbzrloginname}})
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申 请 人">{{o.sqrname}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会">{{o.sqrunionname}}</van-cell>
|
||||
<van-cell :border="false" title="所在单位">{{o.unitname}}</van-cell>
|
||||
<van-cell :border="false" title="联系方式">{{o.lxfs}}</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.sqsj}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.statecolor">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unitList: [],
|
||||
unionList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
handle: true,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/difficulty/audit/auditHtml?zt=' + o.zt + '&id=' + o.id
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.flushUnits()
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
await mCommon.getUnitList(this.pageForm.unionId)
|
||||
} else {
|
||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
await mCondolence.getType()
|
||||
await mCommon.getUnionList()
|
||||
if (mCommon.unionList && mCommon.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
|
||||
}
|
||||
if (mCommon.unitList && mCommon.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,125 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<difficulty-info ref="info" :id.sync="id" title="校工会主席审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会主席审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</difficulty-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/difficulty/schoolmanager/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/difficulty/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null,
|
||||
auditSign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,124 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<difficulty-info ref="info" :id.sync="id" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
院级工会主席审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.auditSign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</difficulty-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/difficulty/unionchairman/doReview", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/difficulty/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null,
|
||||
auditSign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,683 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- 在 head 标签中添加 meta 标签,并设置 viewport-fit=cover 值 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
||||
<title></title>
|
||||
<!-- 引入样式文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css">
|
||||
<link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.2.0/weui.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css">
|
||||
|
||||
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
||||
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.6/lib/vant.min.js"></script>
|
||||
<script src="/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
</head>
|
||||
<style>
|
||||
html, body {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
max-width: 600px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
html::-webkit-scrollbar {
|
||||
display: none
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
|
||||
html, body {
|
||||
font-family: PingFang SC, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.page-v {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.detail-v {
|
||||
margin-top: 15px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.p15 {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.njuColor {
|
||||
color: rgb(106, 0, 95);
|
||||
}
|
||||
|
||||
.title-v {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.form-v {
|
||||
/*margin-top: 20px;*/
|
||||
}
|
||||
|
||||
.van-doc-demo-block__title {
|
||||
margin: 0;
|
||||
padding: 0 16px;
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.goods-card {
|
||||
margin: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.van-swipe-cell__wrapper {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.weui-msg {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: url('/assets/platform/img/checkin/bcc.jpg') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 230px;
|
||||
display: flex;
|
||||
color: #7ca4d8;
|
||||
}
|
||||
.van-tabbar-item__icon {
|
||||
font-size: 28px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.van-tabbar-item__text {
|
||||
transform: scale(0.9);
|
||||
}
|
||||
.header .container {
|
||||
font-size: 13px;
|
||||
letter-spacing: 1px;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
padding-right: 20px;
|
||||
padding-top: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.header .day {
|
||||
font-size: 60px;
|
||||
letter-spacing: 2px;
|
||||
color: white;
|
||||
}
|
||||
.van-tag {
|
||||
font-size: 25px;
|
||||
background-color: transparent;
|
||||
padding: 6px 16px;
|
||||
}
|
||||
.van-tag--primary.van-tag--plain {
|
||||
color: white;
|
||||
}
|
||||
.my_body {
|
||||
width: 94%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
top: -48px;
|
||||
}
|
||||
.van-calendar {
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
}
|
||||
.van-calendar__day {
|
||||
font-size: 18px;
|
||||
}
|
||||
.van-calendar__selected-day {
|
||||
width: 40px;
|
||||
height: 36px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
.sign_in_day {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 37px !important;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
color: #4ABE84;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 2px 7px 0px rgba(85, 110, 97, 0.35);
|
||||
border-radius: 7px;
|
||||
border: 1px solid rgba(74, 190, 132, 1);
|
||||
}
|
||||
.sign_in_day:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border: 13px solid #4ABE84;
|
||||
border-top-color: transparent;
|
||||
border-left-color: transparent;
|
||||
border-bottom-right-radius: 6px;
|
||||
/*border-radius: 0 0 0 7px;*/
|
||||
}
|
||||
.sign_in_day:after {
|
||||
content: '';
|
||||
width: 3px;
|
||||
height: 8px;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
bottom: 4px;
|
||||
border: 2px solid #fff;
|
||||
border-top-color: transparent;
|
||||
border-left-color: transparent;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.info {
|
||||
width: 88%;
|
||||
margin: 20px auto 10px;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.sign_pop {
|
||||
overflow-y: visible;
|
||||
width: 75%;
|
||||
height: 226px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
.sign_button {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
}
|
||||
.sign_button button {
|
||||
width: 90%;
|
||||
height: 36px;
|
||||
}
|
||||
.van-calendar__body {
|
||||
display: none;
|
||||
}
|
||||
.white_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
}
|
||||
.white_pop .van-cell {
|
||||
padding: 10px 34px;
|
||||
}
|
||||
.is_show_cell {
|
||||
padding: 0;
|
||||
}
|
||||
.van-calendar__selected-day {
|
||||
border: 1px solid #236eb4;
|
||||
box-shadow: 0px 2px 7px 0px #236eb4;
|
||||
}
|
||||
.zan_order {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
padding-right: 10px;
|
||||
color: grey;
|
||||
}
|
||||
.van-uploader__preview-image {
|
||||
width: 98px;
|
||||
height: 94px;
|
||||
}
|
||||
.van-uploader__upload {
|
||||
width: 98px;
|
||||
height: 94px;
|
||||
}
|
||||
.van-empty{
|
||||
transform: none;
|
||||
position: relative;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
|
||||
<van-nav-bar
|
||||
title="一路美景"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
|
||||
safe-area-inset-top
|
||||
>
|
||||
<template #right>
|
||||
<van-icon @click="signIn" color="#fff" size="20" name="photograph"></van-icon>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
|
||||
<div v-if="active === 0" class="page-v">
|
||||
<!--#include("/mobile/hd/checkin/friends.html"){}#-->
|
||||
</div>
|
||||
<div v-if="active === 1" class="page-v">
|
||||
<!--#include("/mobile/hd/checkin/my.html"){}#-->
|
||||
</div>
|
||||
|
||||
<van-tabbar
|
||||
style="max-width: 600px;position: fixed;left: 0;bottom: 0;right: 0;margin: auto"
|
||||
v-model="active" @change="tabbarChange"
|
||||
:active-color="boxData.hdcolor"
|
||||
inactive-color="#000"
|
||||
>
|
||||
<van-tabbar-item icon="thumb-circle-o">新鲜事</van-tabbar-item>
|
||||
<van-tabbar-item icon="user-o">我的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
|
||||
<!--发表内容弹框-->
|
||||
<van-popup v-model:show="writePopShow" class="white_pop" :style="{ height: '100%' }" @close="signClose">
|
||||
<div style="display: flex; justify-content: space-between; padding: 10px 20px; letter-spacing: 1px; align-items: center">
|
||||
<div @click="writePopClose" style="font-size: 16px">取消</div>
|
||||
<div>
|
||||
<van-button @click="signDo" color="#236eb4" size="mini" :disabled="message.trim() === '' && fileList.length === 0"
|
||||
style="border-radius: 6px; height: 28px; letter-spacing: 1px; font-size: 14px">发表</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<van-field
|
||||
v-model="message"
|
||||
rows="3" style="font-size: 15px"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="分享新鲜事..."
|
||||
></van-field>
|
||||
</div>
|
||||
<div style="padding: 10px 34px">
|
||||
<van-uploader v-model="fileList" multiple :after-read="afterRead" @delete="doDelete" :before-read="beforeRead"
|
||||
accept="image/*" :max-count="9" :multiple="true"></van-uploader>
|
||||
</div>
|
||||
<div style="margin-top: 40px">
|
||||
<van-cell-group border style="width: 82%; margin: 0 auto">
|
||||
<van-cell @click="actionShow = true" title="是否公开" class="is_show_cell" icon="user-o"
|
||||
is-link border :value="isOpenText" style="padding: 10px 0px; font-size: 15px"></van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<van-action-sheet v-model="actionShow" :actions="actions" cancel-text="取消" @select="(action) => { isOpenText = action.name }"
|
||||
close-on-click-action></van-action-sheet>
|
||||
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script>
|
||||
|
||||
const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
var xhrOnProgress = function (fun) {
|
||||
xhrOnProgress.onprogress = fun; //绑定监听
|
||||
//使用闭包实现监听绑
|
||||
return function () {
|
||||
//通过$.ajaxSettings.xhr();获得XMLHttpRequest对象
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
//判断监听函数是否为函数
|
||||
if (typeof xhrOnProgress.onprogress !== 'function')
|
||||
return xhr;
|
||||
//如果有监听函数并且xhr对象支持绑定时就把监听函数绑定上去
|
||||
if (xhrOnProgress.onprogress && xhr.upload) {
|
||||
xhr.upload.onprogress = xhrOnProgress.onprogress;
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}
|
||||
|
||||
function getSuffix(filename) {
|
||||
return /\.[^\.]+$/.exec(filename)
|
||||
}
|
||||
Vue.use(vant.Lazyload, {
|
||||
lazyComponent: true,
|
||||
});
|
||||
var vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
signCount: 0,
|
||||
tableData: [],
|
||||
finished: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
loading: false,
|
||||
isSignCurentDay: false,
|
||||
isLoading: false,
|
||||
isOrder: false,
|
||||
isOpenText: '公开',
|
||||
actions: [{ name: '公开' }, { name: '仅自己可见' }],
|
||||
actionShow: false,
|
||||
fileList: [],
|
||||
message: '',
|
||||
writePopShow: false,
|
||||
signShow: false,
|
||||
boxData: {},
|
||||
showPage: false,
|
||||
showPicker: false,
|
||||
showMsg: false,
|
||||
percent: 0,
|
||||
flag: true,
|
||||
showPlan: true,
|
||||
msg: '',
|
||||
fd: [],
|
||||
active: 1,
|
||||
isNull: function (val) {
|
||||
if (val === null || val === undefined || val === '') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg', 'heif'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
doctype: ['doc', 'docx', 'txt'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg', 'quicktime'],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
beforeRead(file) {
|
||||
if(!Array.isArray(file)) {
|
||||
file = [file]
|
||||
}
|
||||
for (const f of file) {
|
||||
const type = this.imgtype.includes(f.name.split('.')[1].toLowerCase());
|
||||
if (!type) {
|
||||
const str = this.imgtype.map(v => v.toLowerCase()).join("/")
|
||||
vant.Toast('上传文件只能是' + str + '格式!');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
},
|
||||
writePopClose() {
|
||||
if (this.fileList.length > 0) {
|
||||
const u = this.fileList.map(o => o.data.filepath)
|
||||
$.post('/mobile/checkin/delFile', {url: JSON.stringify(u)})
|
||||
}
|
||||
this.writePopShow = false
|
||||
},
|
||||
doDelete(file) {
|
||||
$.post('/mobile/checkin/delFile', {url: JSON.stringify([file.data.filepath])})
|
||||
},
|
||||
afterRead(file) {
|
||||
let formData = new FormData();
|
||||
if (Array.isArray(file)) {
|
||||
file.forEach(item => {
|
||||
item.status = 'uploading';
|
||||
item.message = '上传中...';
|
||||
formData.append("file", item.file, item.file.name);
|
||||
})
|
||||
} else {
|
||||
file.status = 'uploading';
|
||||
file.message = '上传中...';
|
||||
formData.append("file", file.file, file.file.name);
|
||||
}
|
||||
$.ajax({
|
||||
url: "/mobile/checkin/uploadFile",
|
||||
type: "post",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (res) => {
|
||||
const {code, data} = res
|
||||
if (code === 0) {
|
||||
if(Array.isArray(file)) {
|
||||
file.forEach(item => {
|
||||
const f = data.find(o => o.filename === item.file.name)
|
||||
item.status = 'success';
|
||||
item.data = f
|
||||
})
|
||||
} else {
|
||||
file.status = 'success';
|
||||
file.data = data[0]
|
||||
}
|
||||
}
|
||||
},
|
||||
error: (err) => {
|
||||
if(Array.isArray(file)) {
|
||||
file.forEach(item => {
|
||||
item.status = 'failed';
|
||||
item.message = '上传失败';
|
||||
})
|
||||
} else {
|
||||
file.status = 'failed';
|
||||
file.data = '上传失败'
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
onRefresh () {
|
||||
setTimeout(() => {
|
||||
vant.Toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
async zanOrder () {
|
||||
this.isOrder = !this.isOrder
|
||||
const toast = vant.Toast.loading({message: '获取排行中...', forbidClick: true, loadingType: 'spinner',});
|
||||
this.pageForm.order = this.isOrder
|
||||
setTimeout(() => {
|
||||
this.doSearch();
|
||||
toast.clear()
|
||||
}, 200)
|
||||
},
|
||||
async signDo () {
|
||||
const that = this
|
||||
|
||||
let array = []
|
||||
this.fileList.forEach(item => {
|
||||
array.push(item.data)
|
||||
})
|
||||
const formdata = {
|
||||
'hdid': getQueryVariable("id"),
|
||||
'content': this.message,
|
||||
'isOpen': this.isOpenText === '公开',
|
||||
'files': JSON.stringify(array),
|
||||
}
|
||||
console.log(array)
|
||||
const resp = await $.post('/mobile/checkin/doAdd', formdata)
|
||||
if (resp.code === 0) {
|
||||
this.signCount = resp.data
|
||||
that.doSearch()
|
||||
that.findOne()
|
||||
that.writePopShow = false
|
||||
vant.Toast('发表成功')
|
||||
} else {
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
}
|
||||
},
|
||||
async delContent(item) {
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要删除吗?',
|
||||
confirmButtonColor: '#236eb4',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/checkin/del', {
|
||||
id: item.id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.findOne()
|
||||
vant.Toast('删除成功')
|
||||
} else {
|
||||
vant.Toast('删除失败')
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.getContent()
|
||||
},
|
||||
tabbarChange (o) {
|
||||
this.doSearch();
|
||||
/*if (o !== 0) {
|
||||
this.pageForm.day = ''
|
||||
this.doSearch();
|
||||
}
|
||||
if(o === 2) {
|
||||
this.$nextTick(() => {
|
||||
$('.van-calendar__body').css('display', 'none')
|
||||
setTimeout(() => {
|
||||
$('.van-calendar__body').css('display', 'block')
|
||||
}, 80)
|
||||
})
|
||||
}*/
|
||||
},
|
||||
signIn () {
|
||||
this.writePopShow = true
|
||||
$('.van-calendar__body').css('display', 'none')
|
||||
},
|
||||
signClose () {
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
$('.van-calendar__body').css('display', 'block')
|
||||
}, 80)
|
||||
})
|
||||
this.message = ''
|
||||
this.fileList = []
|
||||
this.isOpenText = '公开'
|
||||
},
|
||||
openImage (o, index) {
|
||||
vant.ImagePreview({
|
||||
images: o.map(m => FILE_DOMAIN + m.url),
|
||||
startPosition: index,
|
||||
})
|
||||
},
|
||||
calendarSelect (date) {
|
||||
this.pageForm.day = moment(date).format("YYYY-MM-DD")
|
||||
this.getMyContent()
|
||||
},
|
||||
formatter (day) {
|
||||
const d = moment(day.date).format("YYYY-MM-DD")
|
||||
const map = this.boxData.content.map(o => moment(o.time).format("YYYY-MM-DD"))
|
||||
if(d === moment().format('YYYY-MM-DD')) {
|
||||
day.className = 'cur_day'
|
||||
}
|
||||
if (map.includes(d)) {
|
||||
day.className = 'sign_in_day'
|
||||
if (d === moment().format('YYYY-MM-DD')) {
|
||||
/*this.$nextTick(() => {
|
||||
$('.van-calendar__selected-day').removeAttr("style")
|
||||
$('.van-calendar__selected-day').css('background-color', 'revert').css('color', 'revert')
|
||||
.css('border', 'none').css('box-shadow', 'none')
|
||||
})*/
|
||||
}
|
||||
}
|
||||
return day
|
||||
},
|
||||
async getMyContent() {
|
||||
const resp = await $.post('/platform/hd/checkinManage/getContent', this.pageForm)
|
||||
if(resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
}
|
||||
},
|
||||
async getContent() {
|
||||
this.loading = true
|
||||
this.pageForm.hdid = getQueryVariable("id")
|
||||
this.pageForm.active = this.active
|
||||
const resp = await $.post('/platform/hd/checkinManage/getContent', this.pageForm)
|
||||
if(resp.code === 0) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
async zan(o) {
|
||||
o.me_zan = ! o.me_zan
|
||||
if (o.me_zan) {
|
||||
o.zan_count = o.zan_count + 1
|
||||
} else {
|
||||
if (o.zan_count > 0) {
|
||||
o.zan_count = o.zan_count - 1
|
||||
}
|
||||
}
|
||||
o.zan_id = await $.post('/platform/hd/checkinManage/clickZan', {
|
||||
id: o.zan_id,
|
||||
zan: o.me_zan,
|
||||
hdid: o.hdid,
|
||||
contentId: o.id,
|
||||
})
|
||||
},
|
||||
async findOne() {
|
||||
var self = this
|
||||
if (!this.isNull(getQueryVariable("id"))) {
|
||||
await $.get("/platform/hd/checkinManage/findOne", {hdid: getQueryVariable("id")}, function (data) {
|
||||
if (data.code === 0) {
|
||||
document.getElementsByTagName("title")[0].innerText = data.data.hdname;
|
||||
self.boxData = data.data
|
||||
self.isSignCurentDay = self.boxData.content.some(o => moment(o.time).format('YYYY-MM-DD') === (moment().format('YYYY-MM-DD')))
|
||||
self.showPage = true
|
||||
|
||||
if (!data.data.hdflag) {
|
||||
self.$toast.fail("当前活动未开启!");
|
||||
} else {
|
||||
if (!(new Date(data.data.hdkssj.replace(/-/g, '/')).getTime() < new Date().getTime() && new Date().getTime() < new Date(data.data.hdjssj.replace(/-/g, '/')).getTime())) {
|
||||
self.$toast.fail("不在活动时间范围内!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
async created () {
|
||||
var self = this
|
||||
|
||||
setTimeout(() => {
|
||||
$('.van-calendar__body').css('display', 'block')
|
||||
}, 500)
|
||||
|
||||
if (window.innerWidth > 800) {
|
||||
self.$notify({type: 'warning', message: '当前窗口宽度过大!部分区域显示会出现大小偏差'});
|
||||
}
|
||||
|
||||
//await self.findOne()
|
||||
await self.getContent()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,126 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
width: 90%;
|
||||
margin: 0 auto 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.van-cell {
|
||||
border-radius: 20px;
|
||||
padding: 4px 16px !important;
|
||||
}
|
||||
.van-cell-group {
|
||||
border-radius: 20px;
|
||||
padding: 12px 4px;
|
||||
}
|
||||
.van-divider {
|
||||
width: 90%;
|
||||
margin: 4px auto 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="活动列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="主  题" :border="false">{{o.hdname}}</van-cell>
|
||||
<van-divider></van-divider>
|
||||
<van-cell :border="false" title="创 建 人">{{o.cjr}}</van-cell>
|
||||
<van-cell :border="false" title="创建时间">{{o.hdcjsj}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.hdkssj}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.hdjssj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
hdtype: 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/checkinManage/data', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
const {hdid, hdjssj, hdkssj} = o
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
|
||||
vant.Toast('活动暂未开始!')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
|
||||
vant.Toast('活动已结束!')
|
||||
return
|
||||
}
|
||||
window.location.href = '/mobile/checkin/info?client=mobile&id=' + hdid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,61 @@
|
||||
<div>
|
||||
<van-pull-refresh
|
||||
v-model="isLoading"
|
||||
success-text="刷新成功"
|
||||
@refresh="onRefresh">
|
||||
|
||||
<div>
|
||||
<van-image class="back_img" width="100%" height="230" src="/assets/platform/img/checkin/bcc.jpg"></van-image>
|
||||
</div>
|
||||
<div class="zan_order" :style="isOrder === true ? 'color: #236eb4; font-size: 20px' : 'color: grey; font-size: 20px'">
|
||||
<van-icon name="filter-o"></van-icon>
|
||||
<span style="font-size: 14px" @click="zanOrder">获赞排行</span>
|
||||
</div>
|
||||
|
||||
<van-list
|
||||
v-model="loading" v-if="tableData.length > 0"
|
||||
:finished="finished" :immediate-check="false" @load="getContent"
|
||||
:finished-text="tableData.length>0?'没有更多了':''">
|
||||
|
||||
<!--<lazy-component>-->
|
||||
<div class="info" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<div>
|
||||
<van-image v-if="item.sex === '男'" width="40" round height="40" src="/assets/platform/img/checkin/man.png"></van-image>
|
||||
<van-image v-if="item.sex === '女'" width="40" round height="40" src="/assets/platform/img/checkin/woman.png"></van-image>
|
||||
</div>
|
||||
<div style="margin-left: 10px">
|
||||
<div style="color: #236eb4; font-weight: bold">{{item.username}}</div>
|
||||
<div style="font-size: 12px; color: grey">{{item.unitname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 8px">
|
||||
<div>{{item.content}}</div>
|
||||
<van-row style="margin-top: 4px">
|
||||
<van-col span="8" v-for="(file, index) in item.files" style="height: 104px">
|
||||
<van-image style="padding-right: 4px; width: 96%; height: 100px" @click="openImage(item.files, index)"
|
||||
:src="FILE_DOMAIN + file.url"></van-image>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 6px; align-items: center;">
|
||||
<div style="color: grey">{{moment(item.time).format('HH:mm')}}</div>
|
||||
<div :style="item.me_zan === false ? 'font-size: 20px' : 'font-size: 20px; color: red'">
|
||||
<div @click="zan(item)" style="display: flex; align-items: center">
|
||||
<van-icon name="good-job-o" style="font-size: 20px" :badge="item.zan_count"></van-icon>
|
||||
<span style="margin-left: 8px; font-size: 14px">赞</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--</lazy-component>-->
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.png"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
@@ -0,0 +1,256 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- 在 head 标签中添加 meta 标签,并设置 viewport-fit=cover 值 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
||||
<title>Title</title>
|
||||
<!-- 引入样式文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.5/lib/index.css">
|
||||
<link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.2.0/weui.min.css">
|
||||
|
||||
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.5/lib/vant.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
|
||||
<script src="/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
|
||||
</head>
|
||||
<style>
|
||||
html, body {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
max-width: 600px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
html::-webkit-scrollbar {
|
||||
display: none
|
||||
}
|
||||
|
||||
[v-clock] {
|
||||
display: none
|
||||
}
|
||||
|
||||
html, body {
|
||||
font-family: PingFang SC, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.page-v {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.detail-v {
|
||||
margin-top: 15px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.p15 {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.njuColor {
|
||||
color: rgb(106, 0, 95);
|
||||
}
|
||||
|
||||
.title-v {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.form-v {
|
||||
/*margin-top: 20px;*/
|
||||
}
|
||||
|
||||
.van-doc-demo-block__title {
|
||||
margin: 0;
|
||||
padding: 0 16px;
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.goods-card {
|
||||
margin: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.van-swipe-cell__wrapper {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div v-clock id="app">
|
||||
<div>
|
||||
<van-swipe v-if="boxData.fileList.length>0" class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item v-for="url in boxData.fileList">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
:src="url"
|
||||
></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
<van-image
|
||||
v-else
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
src="***"
|
||||
>
|
||||
<template v-slot:error>封面图片</template>
|
||||
</van-image>
|
||||
</div>
|
||||
<div v-if="active==0" class="page-v">
|
||||
<div class="detail-v">
|
||||
<div class="title-v p15">
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动介绍</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdjs"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">参加人员</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdcjry"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">奖励方式</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdjlfs"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动内容</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdnr"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动联系人</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15" style="line-height:24pt;">
|
||||
<div v-html="boxData.hdlxr"></div>
|
||||
</div>
|
||||
<div class="title-v p15" v-if="!isNull(boxData.hdother.replace(/<.*?>/g,''))">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">其他</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15" style="line-height:24pt;" v-if="!isNull(boxData.hdother.replace(/<.*?>/g,''))">
|
||||
<div v-html="boxData.hdother"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-tabbar
|
||||
style="max-width: 600px;position: fixed;left: 0;bottom: 0;right: 0;margin: auto"
|
||||
v-model="active"
|
||||
:active-color="boxData.hdcolor"
|
||||
inactive-color="#000"
|
||||
>
|
||||
<van-tabbar-item icon="label-o">介绍</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
<van-number-keyboard safe-area-inset-bottom/>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var xhrOnProgress = function (fun) {
|
||||
xhrOnProgress.onprogress = fun; //绑定监听
|
||||
//使用闭包实现监听绑
|
||||
return function () {
|
||||
//通过$.ajaxSettings.xhr();获得XMLHttpRequest对象
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
//判断监听函数是否为函数
|
||||
if (typeof xhrOnProgress.onprogress !== 'function')
|
||||
return xhr;
|
||||
//如果有监听函数并且xhr对象支持绑定时就把监听函数绑定上去
|
||||
if (xhrOnProgress.onprogress && xhr.upload) {
|
||||
xhr.upload.onprogress = xhrOnProgress.onprogress;
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}
|
||||
|
||||
function getSuffix(filename) {
|
||||
return /\.[^\.]+$/.exec(filename)
|
||||
}
|
||||
|
||||
var vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
fd: [],
|
||||
boxData: {},
|
||||
active: 0,
|
||||
isNull: function (val) {
|
||||
if (val == null || val == undefined || val == '') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
doctype: ['doc', 'docx', 'txt'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg', 'quicktime'],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created: function () {
|
||||
var self = this
|
||||
if (window.innerWidth > 800) {
|
||||
self.$notify({type: 'warning', message: '当前窗口宽度过大!部分区域显示会出现大小偏差'});
|
||||
}
|
||||
var wmhd_boxdata = localStorage.getItem("wmhd_boxdata")
|
||||
if (wmhd_boxdata != undefined && wmhd_boxdata != null) {
|
||||
this.boxData = JSON.parse(wmhd_boxdata)
|
||||
localStorage.removeItem("wmhd_boxdata")
|
||||
} else {
|
||||
this.boxData = {
|
||||
hdjs: '',
|
||||
hdcjry: '',
|
||||
hdjlfs: '',
|
||||
hdnr: '',
|
||||
hdlxr: '',
|
||||
hdother: '',
|
||||
hdcolor: '#6A005F',
|
||||
fileList: [],
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<div>
|
||||
<!--头部、背景图片-->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tableData.length > 0" class="info" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<div>
|
||||
<van-image v-if="item.sex === '男'" width="40" round height="40" src="/assets/platform/img/checkin/man.png"></van-image>
|
||||
<van-image v-if="item.sex === '女'" width="40" round height="40" src="/assets/platform/img/checkin/woman.png"></van-image>
|
||||
</div>
|
||||
<div style="margin-left: 10px">
|
||||
<div style="color: #236eb4; font-weight: bold">{{item.username}}</div>
|
||||
<div style="font-size: 12px; color: grey">{{item.unitname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 8px">
|
||||
<div>{{item.content}}</div>
|
||||
<van-row style="margin-top: 4px">
|
||||
<van-col span="8" v-for="(file, index) in item.files" style="height: 104px">
|
||||
<van-image style="padding-right: 4px; width: 96%; height: 100px" @click="openImage(item.files, index)"
|
||||
:src="FILE_DOMAIN + file.url"></van-image>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 6px; align-items: center;">
|
||||
<div>
|
||||
<span style="color: grey">{{moment(item.time).format('HH:mm')}}</span>
|
||||
<span @click="delContent(item)" style="font-size: 12px; margin-left: 6px; color: #236eb4">删除</span>
|
||||
</div>
|
||||
<div :style="item.me_zan === false ? 'font-size: 20px' : 'font-size: 20px; color: red'">
|
||||
<div @click="zan(item)" style="display: flex; align-items: center">
|
||||
<van-icon name="good-job-o" style="font-size: 20px" :badge="item.zan_count"></van-icon>
|
||||
<span style="margin-left: 8px; font-size: 14px">赞</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.png"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--签到成功确认框-->
|
||||
<van-popup v-model="signShow" round class="sign_pop">
|
||||
<van-image width="300px" round src="/assets/platform/img/checkin/sign.png" style="position: absolute; top: -150px;z-index: 9999"></van-image>
|
||||
<div style="line-height: 25px; margin-top: 30px; letter-spacing: 1px">
|
||||
<div style="font-size: 16px">恭喜获得天数+1</div>
|
||||
<div style="color: grey">您是今日第<span style="color: chocolate; font-weight: bold">{{signCount}}</span>位签到</div>
|
||||
<div class="sign_button">
|
||||
<van-button @click="signShow = false" round type="info" size="small" color="#236eb4">我知道了</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
@@ -0,0 +1,483 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
margin: 0 10px;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.icon_text {
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.v-header {
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
#v-back {
|
||||
background: url("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d1ed570f33cd32f875a8390b850f.jpg%401280w_1l_2o_100sh.png&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638425547&t=55618f9dea9872dc3c0c1ece65ea96d5") no-repeat;
|
||||
background-size: cover;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
#v-back2 {
|
||||
background: url("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d1ed570f33cd32f875a8390b850f.jpg%401280w_1l_2o_100sh.png&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638425547&t=55618f9dea9872dc3c0c1ece65ea96d5") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.user_info {
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.user_avatar {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
transform: translate(0, -50%);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.disabled-row img {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
.disabled-row .van-grid-item {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.oneDisabled {
|
||||
filter: grayscale(1);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="user_info">
|
||||
<van-row style="height: 200px">
|
||||
<van-image
|
||||
height="200px"
|
||||
src="/back2.png"
|
||||
width="100%"
|
||||
></van-image>
|
||||
</van-row>
|
||||
|
||||
<van-row class="user_avatar" style="height: 80px">
|
||||
<van-col class="text-center" span="6">
|
||||
<van-image
|
||||
:src="avatar"
|
||||
height="70"
|
||||
round
|
||||
width="70"
|
||||
></van-image>
|
||||
</van-col>
|
||||
<van-col span="18">
|
||||
<div style="height: 40px;line-height: 40px">
|
||||
<span style="font-size: 22px; color: white">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</span>
|
||||
<span style="color: white">
|
||||
${@shiro.getPrincipalProperty('loginname')}
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-ellipsis"
|
||||
style="height: 40px;line-height: 40px;font-size: 14px;color: #969799">
|
||||
<!--#if(@shiro.getPrincipalProperty('union')!=null){#-->
|
||||
${@shiro.getPrincipalProperty('union').getUnionname()}
|
||||
<!--#}#-->
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '会员管理'">
|
||||
<div class="van-sidebar-item van-sidebar-item--select"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('public')||@shiro.hasRole('H01')}">
|
||||
会员管理
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/member/detail" v-if="${@shiro.hasRole('H01')}">
|
||||
<image src="/assets/mobile/icon/member/da.png"></image>
|
||||
<span class="icon_text">会员档案</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/member/apply" v-if="${@shiro.lacksRole('H01')}">
|
||||
<image src="/assets/mobile/icon/member/apply.png"></image>
|
||||
<span class="icon_text">申请入会</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item
|
||||
url="/mobile/member/audit"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')}">
|
||||
<image src="/assets/mobile/icon/member/audit.png"></image>
|
||||
<span class="icon_text">会员审核</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/member/dashBoard/index">
|
||||
<image src="/assets/mobile/icon/member/dashboard.png"></image>
|
||||
<span class="icon_text">会员看板</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '提案管理'">
|
||||
<van-row
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdb01') || @shiro.hasRole('jdh12')}">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
民主管理
|
||||
</div>
|
||||
<van-grid
|
||||
:border="false"
|
||||
:column-num="3"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdbt01')||@shiro.hasRole('jdhdb01') || @shiro.hasRole('jdh12')}">
|
||||
<van-grid-item url="/platform/mobile/proposal/compose"
|
||||
v-if="${@shiro.hasRole('jdhdb01')}">
|
||||
<image src="/assets/mobile/icon/proposal/myProposal.png"></image>
|
||||
<span class="icon_text">个人提案阅览</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/mobile/proposal/seconded"
|
||||
v-if="${@shiro.hasRole('jdhdb01')}">
|
||||
<image src="/assets/mobile/icon/proposal/fy.png"></image>
|
||||
<span class="icon_text">附议提案</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item
|
||||
url="/platform/mobile/proposal/delegation"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdbt01')}">
|
||||
<image src="/assets/mobile/icon/proposal/tz.png" style="width: 59px"></image>
|
||||
<span class="icon_text">团长审议</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/mobile/proposal/integrated"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}">
|
||||
<image src="/assets/mobile/icon/proposal/search.png"></image>
|
||||
<span class="icon_text">提案查询</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/proposal/delegate/index"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}">
|
||||
<image src="/assets/mobile/icon/proposal/cx.png"></image>
|
||||
<span class="icon_text">代表查询</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '活动管理'">
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
品牌活动
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivity/trainList">
|
||||
<image src="/assets/mobile/icon/train/train.png"></image>
|
||||
<span class="icon_text">品牌活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivity/trainList?type=my">
|
||||
<image src="/assets/mobile/icon/train/my.png"></image>
|
||||
<span class="icon_text">我的活动</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivityScannerQrCode"
|
||||
v-if="${@shiro.hasRole('codeScanner')}">
|
||||
<image src="/assets/mobile/icon/train/scan.png"></image>
|
||||
<span class="icon_text">扫一扫</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
文体活动
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/activity/Sports/list/activityList">
|
||||
<image src="/assets/mobile/icon/activity/sport.png"></image>
|
||||
<span style="font-size: 12px;margin-top: 10px">体育活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/unionActivity">
|
||||
<image src="/assets/mobile/icon/activity/school.png"></image>
|
||||
<span class="icon_text">校活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/wmhd/apply">
|
||||
<image src="/assets/mobile/icon/wmhd/apply.png"></image>
|
||||
<span class="icon_text">教工作品征集</span>
|
||||
</van-grid-item>
|
||||
<!--<van-grid-item @click="toWxJsz">
|
||||
<image src="/assets/mobile/svg/activity/jsz.svg"></image>
|
||||
<span class="icon_text">健身走</span>
|
||||
</van-grid-item>-->
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
特色活动
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/question/h5/list?type=1">
|
||||
<image src="/assets/mobile/icon/question/dati.png"></image>
|
||||
<span class="icon_text">在线调查</span>
|
||||
</van-grid-item>
|
||||
|
||||
|
||||
<van-grid-item url="/mobile/question/h5/list?type=2">
|
||||
<image src="/assets/mobile/icon/question/zxdc.png"></image>
|
||||
<span class="icon_text">知识竞答</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/question/h5/list?type=4">
|
||||
<image src="/assets/mobile/icon/question/yxxz.png"></image>
|
||||
<span class="icon_text">意向选择</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
场地预约
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/activity/site/info">
|
||||
<image src="/assets/mobile/icon/site/apply.png"></image>
|
||||
<span class="icon_text">场地预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/site/info/my">
|
||||
<image src="/assets/mobile/icon/site/my.png"></image>
|
||||
<span class="icon_text">我的预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/site/audit"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('gh10')||@shiro.hasRole('xghng')||@shiro.hasRole('siteManage')||@shiro.hasRole('A06')||@shiro.hasRole('H04')}">
|
||||
<image src="/assets/mobile/icon/site/audit.png"></image>
|
||||
<span class="icon_text">场地预约审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>
|
||||
|
||||
<van-row v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H01')}">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
会议管理
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/meeting/mine/myMeeting"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')||@shiro.hasRole('H01')}">
|
||||
<image src="/assets/mobile/icon/meeting/会议(我的会议).png"></image>
|
||||
<span class="icon_text">我的会议</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/meeting/audit"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('jdhdbt01')}">
|
||||
<image src="/assets/mobile/icon/meeting/会议(会议审核).png"></image>
|
||||
<span class="icon_text">会议审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '福利慰问'">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
职工慰问
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<template
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('H01')}">
|
||||
<van-grid-item url="/mobile/condolence/apply/for">
|
||||
<image src="/assets/mobile/icon/condolence/apply.png"></image>
|
||||
<span class="icon_text">慰问申请</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/condolence/apply">
|
||||
<image src="/assets/mobile/icon/condolence/list.png"></image>
|
||||
<span class="icon_text">慰问记录</span>
|
||||
</van-grid-item>
|
||||
</template>
|
||||
<van-grid-item
|
||||
url="/mobile/condolence/audit"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')||@shiro.hasRole('xghkj')}">
|
||||
<image src="/assets/mobile/icon/condolence/audit.png"></image>
|
||||
<span class="icon_text">慰问审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
职工福利
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/welfare/list/index">
|
||||
<image src="/assets/mobile/icon/contribution/fl.png"></image>
|
||||
<span class="icon_text">职工福利</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '大病互助'"></div>
|
||||
|
||||
<div v-if="paramType === '活动管理'">
|
||||
<!--<div class="van-sidebar-item van-sidebar-item--select">
|
||||
疗休养
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/index">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 疗休养</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/myRecuperation">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 我的疗休养</span>
|
||||
</van-grid-item>
|
||||
</van-grid>-->
|
||||
|
||||
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
职工评议
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/wakeshome/review/appraisal/index">
|
||||
<image src="/assets/mobile/icon/jjpy/建家评议 (1).png"></image>
|
||||
<span class="icon_text">职工评议</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/wakeshome/review/appraisal/mine">
|
||||
<image src="/assets/mobile/icon/jjpy/建家评议 (我的).png"></image>
|
||||
<span class="icon_text">我的评议</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '培训教育'">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
培训教育
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/index">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 疗休养</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/myRecuperation">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 我的疗休养</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div v-if="paramType === '协会组织'">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
协会组织
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/sys/club/sq/mobile">
|
||||
<image src="/assets/mobile/icon/club/apply.png"></image>
|
||||
<span class="icon_text">协会入会</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/sys/club/sh/mobile">
|
||||
<image src="/assets/mobile/icon/club/club.png"></image>
|
||||
<span class="icon_text">入会审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/cloudbase/1.1.0/cloud.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
sex: '${@shiro.getPrincipalProperty("sex")}',
|
||||
avatar: '',
|
||||
paramType: getQueryString('type'),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loginOut() {
|
||||
window.location.href = "/mobile/login/out"
|
||||
},
|
||||
async toWxJsz() {
|
||||
const loginName = "${@shiro.getPrincipalProperty('loginname')}"
|
||||
const userName = "${@shiro.getPrincipalProperty('username')}"
|
||||
const query = 'loginName=' + encodeURIComponent(loginName) + '&userName=' + encodeURIComponent(userName)
|
||||
|
||||
let cloud = new window.cloud.Cloud({
|
||||
identityless: true, // true表示是未登录模式
|
||||
resourceAppid: 'wx9c693357de44cf59', // 小程序AppID
|
||||
resourceEnv: 'unionpal-0ge58oan8d6fa30e', // 云环境环境ID
|
||||
})
|
||||
await cloud.init(); // 云函数初始化
|
||||
/*const res = await cloud.callFunction({
|
||||
name: 'urlscheme', //提供UrlScheme服务的云函数名称
|
||||
data: {
|
||||
path: '/pages/login/login', // 想跳转的小程序路径
|
||||
query: query, // 地址栏query参数,可在微信 onLoad: function (options) {}生命周期里options接收这些参数
|
||||
} //向这个云函数中传入的自定义参数,注意:path地址前后/不能多加或者少加,query参数里不能有转义字符如果有需要解码
|
||||
});
|
||||
|
||||
console.log(res, '云函数返回数据');
|
||||
if (res && res.result.errCode == 0) {
|
||||
location.href = res.result.openlink; // 跳转
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}*/
|
||||
const res = await cloud.callFunction({
|
||||
name: 'urllink', //提供UrlScheme服务的云函数名称
|
||||
data: {
|
||||
path: '/pages/login/login', // 想跳转的小程序路径
|
||||
query: query, // 地址栏query参数,可在微信 onLoad: function (options) {}生命周期里options接收这些参数
|
||||
} //向这个云函数中传入的自定义参数,注意:path地址前后/不能多加或者少加,query参数里不能有转义字符如果有需要解码
|
||||
});
|
||||
/* alert(JSON.stringify(res))
|
||||
alert(res.result.urlLink)*/
|
||||
console.log(res, '云函数返回数据');
|
||||
if (res && res.result.errCode === 0) {
|
||||
location.href = res.result.urlLink
|
||||
// window.open(res.result.urlLink)
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.avatar = this.sex === '女' ? '/avatar_girl.svg' : '/avatar_boy.svg'
|
||||
// const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
// const userAvatar = "${@shiro.getPrincipalProperty('avatar')}"
|
||||
// console.log(userAvatar)
|
||||
// if (userAvatar) {
|
||||
// this.avatar = FILE_DOMAIN + "${@shiro.getPrincipalProperty('avatar')}"
|
||||
// } else {
|
||||
// this.avatar = this.sex === '女' ? '/avatar_girl.svg' : '/avatar_boy.svg'
|
||||
// }
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 34%;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
font-size: 18px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.label {
|
||||
border-left: 5px #1867b0 solid;
|
||||
border-radius: 4px;
|
||||
padding-left: 6px;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.van-tab__pane, .van-tab__pane-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.label_text {
|
||||
color: grey;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.yy-wrap .van-button {
|
||||
height: 32px;
|
||||
border-radius: 6px;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.time_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.time_info:nth-of-type(1) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="心理咨询预约"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<div class="info">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="80" height="80"
|
||||
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+doctorData.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
{{doctorData.username}}
|
||||
</div>
|
||||
<div>
|
||||
{{doctorData.jobTitle}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="active" :style="'height: ' + (window.screen.height - 46 - 40 - 84 - 24 - 44) + 'px'">
|
||||
<van-tab title="预约时段">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="timeData.length > 0 ? '没有更多了' : ''"
|
||||
@load="getDataByDoctorId">
|
||||
<div v-if="timeData.length > 0" class="time_info" v-for="item in timeData">
|
||||
<div style="color: #1867b0">{{getFormatTime(item)}}</div>
|
||||
<div class="yy-wrap">
|
||||
<van-button @click="apply(item)" :color="item.className">{{item.title}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading === false && timeData.length === 0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="抱歉,此咨询师暂时没有进行排班哦">
|
||||
</van-empty>
|
||||
</van-tab>
|
||||
<van-tab title="咨询师简介">
|
||||
<div class="label">咨询师擅长</div>
|
||||
<div class="label_text">{{doctorData.specialty ? doctorData.specialty : '暂无数据,该资料待补充'}}</div>
|
||||
<div class="label" style="margin-top: 20px">咨询师简介</div>
|
||||
<div class="label_text">{{doctorData.introduce ? doctorData.introduce : '暂无数据,该资料待补充'}}</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<van-nav-bar
|
||||
title="预约信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="show = false">
|
||||
</van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
:value="chooseData.startTime"
|
||||
label="开始时间"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.endTime"
|
||||
label="结束时间"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
|
||||
<van-field readonly
|
||||
:value="chooseData.username"
|
||||
label="咨询师姓名"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.mobile"
|
||||
label="咨询师电话"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
label="预约人姓名"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"
|
||||
label="预约人工号"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
label="预约人单位"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('mobile')}"
|
||||
label="预约人电话"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field
|
||||
v-model="appointmentUserNote"
|
||||
rows="3"
|
||||
autosize
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
placeholder="您可以输入预约备注"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
<div class="footer">
|
||||
<van-button @click="doSubmit()" color="#1867b0">提交预约</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
doctorId: '',
|
||||
doctorData: {},
|
||||
active: 0,
|
||||
timeData: [],
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
chooseData: {},
|
||||
appointmentUserNote: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
id: this.chooseData.id
|
||||
}
|
||||
const resp = await $.post('/mobile/legalAid/doApply', params)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('申请成功')
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/legalAid/myApplyList')
|
||||
}, 1000)
|
||||
} else if (resp.code === 1) {
|
||||
this.$toast.error(resp.msg)
|
||||
} else if (resp.code === 2) {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
apply(o) {
|
||||
if (o.title !== '可预约') {
|
||||
return
|
||||
}
|
||||
this.chooseData = o
|
||||
this.show = true
|
||||
},
|
||||
getFormatTime(o) {
|
||||
const simpleStartDate = moment(o.startTime).format('YYYY-MM-DD')
|
||||
const simpleStartHour = moment(o.startTime).format('HH:mm')
|
||||
const simpleEndHour = moment(o.endTime).format('HH:mm')
|
||||
const dayNameOfWeek = this.dayNames[new Date(simpleStartDate).getDay()]
|
||||
return simpleStartDate + ' ' + dayNameOfWeek + ' ' + simpleStartHour + '至' + simpleEndHour
|
||||
},
|
||||
async pageData() {
|
||||
this.pageForm.doctorId = this.doctorId
|
||||
const resp = await $.post('/mobile/legalAid/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (this.doctorId !== '') {
|
||||
this.doctorData = resp.data[0]
|
||||
} else {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async getDataByDoctorId() {
|
||||
this.mLoading = true
|
||||
this.pageForm.id = this.doctorId
|
||||
const resp = await $.post('/mobile/legalAid/getDataByDoctorId', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}";
|
||||
resp.data.list.forEach(v => {
|
||||
if (new Date().getTime() > v.startTimeTs) {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
} else {
|
||||
if (!v.appointmentUser) {
|
||||
v.className = '#1867b0'
|
||||
v.title = '可预约'
|
||||
} else if (v.appointmentUser === userId) {
|
||||
v.className = 'gray'
|
||||
v.title = '我已预约'
|
||||
} else {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
}
|
||||
}
|
||||
})
|
||||
this.timeData = this.timeData.concat(resp.data.list)
|
||||
if (this.timeData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.doctorId = getQueryVariable('doctorId')
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 38%;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
width: 74%;
|
||||
line-height: 22px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.desc {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="法律援助师列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<!--咨询师列表-->
|
||||
<div class="info" @click="toApply(item)" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="100" height="100"
|
||||
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
<span style="font-size: 20px">{{item.username}} </span>
|
||||
<span style="color: grey">{{item.sex}} </span> 
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<span style="color: grey">职称:</span>{{item.jobTitle}}
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">单位:</span>{{item.unitName}}
|
||||
</div>
|
||||
<div class="desc">
|
||||
<span style="color: grey">特长:</span>{{item.specialty}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const resp = await $.post('/mobile/legalAid/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
},
|
||||
toApply(o) {
|
||||
location.href = '/mobile/legalAid/apply?doctorId=' + o.userid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,251 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
background: #FFFFFF;
|
||||
width: 92%;
|
||||
margin: 0px auto 20px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.card-head {
|
||||
line-height: 30px;
|
||||
padding: 8px 16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
.cancel-button {
|
||||
text-align: right;
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.cancel-button .van-button {
|
||||
height: 27px !important;
|
||||
padding: 0 18px !important;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="我的预约记录"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.stateId" :options="stateList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="viewInfo(o)">
|
||||
<div class="card-head">
|
||||
心理咨询预约
|
||||
<span class="state-text">
|
||||
<van-tag size="medium" v-if="o.stateId===2300" type="success">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2200" type="error">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2100" type="warning">{{o.stateName}}</van-tag>
|
||||
</span>
|
||||
</div>
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="预约人">{{o.appointmentUserName}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.startTime}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.endTime}}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="cancel-button">
|
||||
<van-button v-if="moment().unix() < moment(o.startTime).unix()" @click.stop="doCancel(o.id)" round
|
||||
size="small" color="#1867b0">取消预约
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<van-nav-bar
|
||||
title="预约详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="show = false"
|
||||
safe-area-inset-top></van-nav-bar>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
预约时间段
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ viewData.endTime }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
预约人信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.appointmentLoginName }}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.appointmentUnitName }}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.appointmentMobile }}</van-cell>
|
||||
<van-cell title="预约备注">{{ viewData.appointmentUserNote }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
咨询师信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.doctorUnitName || '暂无'}}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.doctorJobTitle || '暂无'}}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.doctorMobile || '暂无'}}</van-cell>
|
||||
<van-cell title="个人简介">{{ viewData.doctorIntroduce || '暂无'}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
stateList: [
|
||||
{text: '全部预约状态', value: null},
|
||||
{text: '预约中', value: 2100},
|
||||
{text: '预约成功', value: 2300},
|
||||
{text: '预约失败', value: 2200}
|
||||
],
|
||||
show: false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/legalAid/MyPageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
viewInfo(o) {
|
||||
this.viewData = o
|
||||
this.show = true
|
||||
},
|
||||
async doCancel(id) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定取消此次预约吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/legalAid/doCancel', {id})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('取消成功')
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = this.yearList[0].value
|
||||
this.pageForm.stateId = null
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,74 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-loading {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-moz-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
-o-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-loading v-if="loading" type="spinner" color="#1989fa"></van-loading>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
classifyLists: [],
|
||||
classify: '',
|
||||
token: '',
|
||||
deviceType: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.login()
|
||||
},
|
||||
methods: {
|
||||
login() {
|
||||
this.loading = true
|
||||
tellGetToken_app((v, u) => {
|
||||
this.getTokenCall(v, u)
|
||||
})
|
||||
},
|
||||
getTokenCall(v, u) {
|
||||
this.classify = this.classifyLists[0]
|
||||
this.token = v
|
||||
this.deviceType = u
|
||||
document.title = '智慧工会平台'
|
||||
let obj = {back: true, close: true, rootView: true, title: true}
|
||||
|
||||
// window.location.href = '/mobile/app/index?token='+this.token
|
||||
$.get("/mobile/app/index", {token: this.token}).then((res) => {
|
||||
this.loading = false
|
||||
// alert(JSON.stringify(res))
|
||||
if (res.code === 0) {
|
||||
window.location.href = '/mobile/index/doLogin?username=' + res.data + '&password=dd3s@#2022&platformCaptcha='
|
||||
} else if (res.code === 1 || res.code==2) {
|
||||
Dialog.alert({
|
||||
title: '标题',
|
||||
message: res.msg,
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,504 @@
|
||||
<!--#
|
||||
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()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
desc: '',
|
||||
list: ['a', 'b'],
|
||||
result: [],
|
||||
reason: '',
|
||||
auditShow: false,
|
||||
popupShow: false,
|
||||
userShow: false,
|
||||
userList: [],
|
||||
userClickList: [],
|
||||
str: '',
|
||||
type: '',
|
||||
auditType: '',
|
||||
queryType: '',
|
||||
typeList: [],
|
||||
meetingTimeList: [{text: '全部时间', value: null}, {text: '即将开始', value: 0}, {text: '已结束', value: 1}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,639 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
|
||||
.custom-image1 {
|
||||
height: 50% !important;
|
||||
}
|
||||
|
||||
</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, true, true)"
|
||||
color="#1867b0" size="small" style="margin-right: 8px"
|
||||
v-if="${@shiro.hasRole('jdhdbt01')||@shiro.hasRole('H04')}"
|
||||
type="primary">替他人请假
|
||||
</van-button>
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
|
||||
@click="needLeave(o, false, 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, false)"
|
||||
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">
|
||||
|
||||
<van-field
|
||||
v-if="helpLeave"
|
||||
v-model="needLeaveUser.userName"
|
||||
label="请假人"
|
||||
readonly=""
|
||||
@click="helpUserShow = true"
|
||||
placeholder="请点击选择请假人"
|
||||
input-align="right"
|
||||
></van-field>
|
||||
<div v-if="timeList.length > 0" class="van-doc-card" v-for="(item, index) in timeList">
|
||||
<div>
|
||||
<div>
|
||||
<span style="color: grey">会议名称:</span>
|
||||
<span>{{item.timePeriodName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="leaveClick(item, index)"
|
||||
style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<div>
|
||||
<span style="color: grey">会议时间:</span>
|
||||
<span>{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
</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>
|
||||
<span>{{item.stateName}}</span>
|
||||
</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; margin-left: 69px"
|
||||
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>
|
||||
|
||||
<van-popup position="bottom" round v-model="helpUserShow" :style="{ height: '70%' }" closeable class="sign_pop">
|
||||
<van-search v-model="searchResult" show-action style="padding: 10px;margin-top: 45px" placeholder="请输入工号或姓名搜索"
|
||||
@input="delaySearch">
|
||||
</van-search>
|
||||
<van-cell-group v-if="userList && userList.length > 0">
|
||||
<div>
|
||||
<van-checkbox-group style="text-align: center">
|
||||
<van-cell-group>
|
||||
<van-cell v-for="(item, index) in userList" :key="item.index" clickable
|
||||
:title="item.name"
|
||||
@click="toResult(item.loginname)">
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
<van-empty
|
||||
v-else
|
||||
class="custom-image1"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
searchResult: '',
|
||||
userList: [],
|
||||
helpUserShow: false,
|
||||
needLeaveUser: {
|
||||
userName: '',
|
||||
userId: '',
|
||||
},
|
||||
helpLeave: false,
|
||||
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: {
|
||||
async delaySearch(query) {
|
||||
if (query) {
|
||||
const data = await this.searchUser(query)
|
||||
data.forEach(v => {
|
||||
v.name = v.username + '(' + v.loginname + ')'
|
||||
return v
|
||||
})
|
||||
this.userList = data
|
||||
}
|
||||
},
|
||||
async searchUser(query) {
|
||||
const res = await $.post('/mobile/meeting/mine/searchUser', {query: query, meetId: this.clickRow.id})
|
||||
return res.data
|
||||
},
|
||||
toResult(loginname) {
|
||||
this.timeList = []
|
||||
const data = this.userList.find(o => o.loginname === loginname)
|
||||
this.$set(this.needLeaveUser, 'userName', data.username)
|
||||
this.$set(this.needLeaveUser, 'userId', data.id)
|
||||
this.helpUserShow = false
|
||||
this.findTimeList(this.clickRow)
|
||||
},
|
||||
refreshApply(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要重新申请吗?',
|
||||
}).then(async () => {
|
||||
await this.needLeave(this.clickRow, true, false)
|
||||
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, helpLeave) {
|
||||
this.flag = flag
|
||||
this.clickRow = o
|
||||
this.helpLeave = helpLeave
|
||||
this.timeList = []
|
||||
this.needLeaveUser = {
|
||||
userName: '',
|
||||
userId: '',
|
||||
}
|
||||
if (moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false) {
|
||||
vant.Toast('抱歉,已过请假截止时间');
|
||||
return
|
||||
}
|
||||
this.leaveReason = ''
|
||||
this.checked = []
|
||||
if(helpLeave) {
|
||||
this.leaveShow = true
|
||||
} else {
|
||||
await this.findTimeList(o)
|
||||
}
|
||||
},
|
||||
async findTimeList(o) {
|
||||
const res = await $.post('/mobile/meeting/mine/findMyMeetPeriod', {
|
||||
meetingId: o.id,
|
||||
helpLeave: this.helpLeave,
|
||||
userId: this.needLeaveUser.userId
|
||||
})
|
||||
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
|
||||
for (const item of this.checked) {
|
||||
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
|
||||
}
|
||||
if(this.helpLeave) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要替' + this.needLeaveUser.userName + '请假吗?',
|
||||
})
|
||||
if (confirm !== 'confirm') {
|
||||
return
|
||||
}
|
||||
}
|
||||
const resp = await $.post('/mobile/meeting/mine/askForLeave', {
|
||||
meetingId: this.clickRow.id,
|
||||
data: JSON.stringify(paramArray),
|
||||
helpLeave: this.helpLeave
|
||||
})
|
||||
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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,386 @@
|
||||
<!--#
|
||||
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: 170px;
|
||||
}
|
||||
|
||||
.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;
|
||||
padding-right: 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);
|
||||
}
|
||||
|
||||
.body .van-cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.body .van-field__control--custom {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.body .van-field__label {
|
||||
min-width: 170px;
|
||||
}
|
||||
</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">
|
||||
<van-field name="checkbox">
|
||||
<template #label>
|
||||
<div class="meeting_peri">
|
||||
<div>{{item.timePeriodName}}</div>
|
||||
<div>{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<van-radio-group v-model="item.isJoinByMsg" direction="horizontal">
|
||||
<van-radio :name="true">参加</van-radio>
|
||||
<van-radio :name="false">不参加</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button @click="submit" block color="#1867b0" round type="primary">
|
||||
提交
|
||||
</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>
|
||||
|
||||
<van-dialog v-model="notJoinShow" title="提示" show-cancel-button :before-close="onBeforeClose">
|
||||
<van-field
|
||||
v-model="notJoinReason"
|
||||
rows="2"
|
||||
autosize
|
||||
label="不参加原因"
|
||||
type="textarea"
|
||||
maxlength="100"
|
||||
placeholder="请输入不参加原因"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
</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;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
notJoinShow: false,
|
||||
notJoinReason: '',
|
||||
meetingInfo: {},
|
||||
isCanAudit: true,
|
||||
incorrectMag: '',
|
||||
meetingId: '',
|
||||
mtpId: '',
|
||||
isIncorrect: true,
|
||||
typeName: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const res = await $.post('/mobile/meeting/notify/getMeetingInfo', {
|
||||
meetingId: this.meetingId,
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.meetingInfo = res.data
|
||||
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 submit() {
|
||||
for (let item of this.meetingInfo.meetingTimePeriods) {
|
||||
if(item.isJoinByMsg === null || item.isJoinByMsg === undefined) {
|
||||
this.$modal.msg('请选择是否参加')
|
||||
return
|
||||
}
|
||||
}
|
||||
const join = this.meetingInfo.meetingTimePeriods.filter(o => o.isJoinByMsg === false)
|
||||
if(join.length > 0) {
|
||||
this.notJoinShow = true
|
||||
} else {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要参加吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
await this.joinDo()
|
||||
}
|
||||
}
|
||||
},
|
||||
async onBeforeClose(action, done) {
|
||||
if (action === "confirm") {
|
||||
if (this.notJoinReason) {
|
||||
await this.joinDo()
|
||||
} else {
|
||||
this.$modal.msg('请填写不参加原因')
|
||||
return done(false)
|
||||
}
|
||||
} else {
|
||||
done(true)
|
||||
}
|
||||
},
|
||||
async joinDo() {
|
||||
const resp = await $.post('/mobile/meeting/notify/joinDo', {
|
||||
notJoinReason: this.notJoinReason,
|
||||
data: JSON.stringify(this.meetingInfo.meetingTimePeriods),
|
||||
meetingId: this.meetingInfo.id
|
||||
})
|
||||
this.isIncorrect = resp.code === 0
|
||||
this.isCanAudit = false
|
||||
this.incorrectMag = resp.msg
|
||||
this.notJoinShow = false
|
||||
},
|
||||
async readDo() {
|
||||
await $.post('/mobile/meeting/notify/readDo', {meetingId: this.meetingInfo.id})
|
||||
},
|
||||
back() {
|
||||
const str = this.incorrectMag === '你不是当前会议人员' ? 'http://' + window.location.host : '/mobile/meeting/notify?meetingId=' + this.meetingId + '&mtpId=' + this.mtpId
|
||||
location.href = str
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.meetingId = getQueryString('meetingId')
|
||||
await this.pageData()
|
||||
await this.readDo()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,320 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
|
||||
const 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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,312 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar title="会员申请" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<van-form ref="form" @submit="doSubmit" validate-trigger="onSubmit"
|
||||
class="mt5"
|
||||
scroll-to-error
|
||||
input-align="right"
|
||||
:show-error-message="false">
|
||||
<van-cell-group inset>
|
||||
<van-field label="姓名" value="${@shiro.getPrincipalProperty('username')}"
|
||||
left-icon="contact"
|
||||
readonly></van-field>
|
||||
<van-field label="性别" v-model="formData.sex" readonly
|
||||
@click="sexPicker = true"
|
||||
placeholder="请选择性别"
|
||||
clickable
|
||||
left-icon="ellipsis"></van-field>
|
||||
<van-popup v-model="sexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男','女']"
|
||||
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
|
||||
@cancel="sexPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="民族" v-model="formData.nation" readonly clickable
|
||||
left-icon="bar-chart-o"
|
||||
@click="nationPicker = true" placeholder="请选择民族"
|
||||
:rules="[{ required:true, message: '请选择民族' }]"></van-field>
|
||||
<van-popup v-model="nationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="nationColumns"
|
||||
@confirm="(v)=>{formData.nation = v;nationPicker = false}"
|
||||
@cancel="nationPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="学历" v-model="formData.education" readonly clickable
|
||||
left-icon="coupon-o"
|
||||
@click="educationPicker = true" placeholder="请选择学历"
|
||||
:rules="[{ required:true, message: '请选择学历' }]"></van-field>
|
||||
<van-popup v-model="educationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="educationColumns"
|
||||
@confirm="(v)=>{formData.education = v;educationPicker = false}"
|
||||
@cancel="educationPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="学位" v-model="formData.academicDegree" readonly clickable
|
||||
left-icon="comment-o"
|
||||
@click="academicDegreePicker = true" placeholder="请选择学位"
|
||||
:rules="[{ required:true, message: '请选择学位' }]"></van-field>
|
||||
<van-popup v-model="academicDegreePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="academicDegreeColumns"
|
||||
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
|
||||
@cancel="academicDegreePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="政治面貌" v-model="formData.political" placeholder="请填写政治面貌"
|
||||
left-icon="label-o"
|
||||
:rules="[{ required:true, message: '请填写政治面貌' }]"></van-field>
|
||||
<van-field label="身份证" v-model="formData.idcard" placeholder="请填写身份证号码"
|
||||
left-icon="idcard"
|
||||
:rules="[{ required:true, message: '请填写身份证号码' }]"></van-field>
|
||||
<van-field label="联系电话" v-model="formData.mobile" type="tel" placeholder="请填写联系电话"
|
||||
left-icon="phone-o"
|
||||
:rules="[{ required:true, message: '请填写联系电话' }]"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="户口所在地" v-model="formData.registeredResidence" placeholder="请填写户口所在地"
|
||||
left-icon="wap-home-o"
|
||||
:rules="[{ required:true, message: '请填写户口所在地' }]"></van-field>
|
||||
<van-field label="现居住地" v-model="formData.homeAddress" placeholder="请填写现居住地"
|
||||
left-icon="home-o"
|
||||
:rules="[{ required:true, message: '请填写现居住地' }]"></van-field>
|
||||
<van-field label="工作单位" value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
left-icon="cluster-o"
|
||||
readonly></van-field>
|
||||
<van-field label="职务" v-model="formData.position" placeholder="请填写职务"
|
||||
left-icon="debit-pay"
|
||||
:rules="[{ required:true, message: '请填写职务' }]"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button v-if="family && family.length>0 && family.length<3" style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="family && family.length>0">
|
||||
<div v-for="o,i in family" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
icon="minus" type="danger" round size="mini"
|
||||
@click="family.splice(i,1)"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-field label="关系" v-model="o.relation" placeholder="请填写与本人关系"
|
||||
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
|
||||
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
|
||||
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
|
||||
<van-field label="联系方式" v-model="o.mobile" type="tel" placeholder="请填写联系方式"
|
||||
:rules="[{ required:true, message: '请填写联系方式' }]"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button style="width: 50px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-notes-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>个人工作简历</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
v-model="formData.vita"
|
||||
:rules="[{ required:true, message: '请填写个人工作简历' }]"
|
||||
style="padding: 0"
|
||||
input-align="left"
|
||||
autosize
|
||||
rows="4"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
placeholder="请输入个人工作简历"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-award-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>特长</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
v-model="formData.specialSkill"
|
||||
:rules="[{ required:true, message: '请填写个人特长' }]"
|
||||
style="padding: 0"
|
||||
input-align="left"
|
||||
autosize
|
||||
rows="4"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
placeholder="请填写个人特长"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button native-type="submit" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const political = []
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sexPicker: false,
|
||||
applyRecords: [],
|
||||
formData: {},
|
||||
nationPicker: false,
|
||||
educationPicker: false,
|
||||
academicDegreePicker: false,
|
||||
family: [],
|
||||
educationColumns: [
|
||||
'博士研究生', '硕士研究生', '本科', '专科', '中专中技', '高中', '初中以下'
|
||||
],
|
||||
academicDegreeColumns: [
|
||||
'学士', '硕士', '博士'
|
||||
],
|
||||
nationColumns: [],
|
||||
memberStatusColumn: {
|
||||
MEMBER: 1,
|
||||
APPLYING: 2,
|
||||
NOTMEBMER: 3,
|
||||
},
|
||||
memberStatus: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const formData = clone(this.formData)
|
||||
formData.family = JSON.stringify(this.family)
|
||||
const resp = await $.post("/platform/member/apply/submit/doEdit", formData)
|
||||
const data = await $.get("/platform/member/apply/submit/doApply", {memberStates: 1})
|
||||
setTimeout(() => {
|
||||
this.$toast.success('提交成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/index')
|
||||
}, 300)
|
||||
}, 500)
|
||||
},
|
||||
addFamily() {
|
||||
this.family.push({})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.formData, "isMember", "${@shiro.getPrincipalProperty('member')}")
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, "position", "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, "nation", "${@shiro.getPrincipalProperty('nation')}")
|
||||
this.$set(this.formData, "mobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, "political", "${@shiro.getPrincipalProperty('political')}")
|
||||
this.$set(this.formData, "id", "${@shiro.getPrincipalProperty('id')}")
|
||||
this.$set(this.formData, "education", "${@shiro.getPrincipalProperty('education')}")
|
||||
this.$set(this.formData, "academicDegree", "${@shiro.getPrincipalProperty('academicDegree')}")
|
||||
this.$set(this.formData, "idcard", "${@shiro.getPrincipalProperty('idcard')}")
|
||||
this.$set(this.formData, "registeredResidence", "${@shiro.getPrincipalProperty('registeredResidence')}")
|
||||
this.$set(this.formData, "homeAddress", "${@shiro.getPrincipalProperty('homeAddress')}")
|
||||
this.$set(this.formData, "vita", "${@shiro.getPrincipalProperty('vita')}")
|
||||
this.$set(this.formData, "specialSkill", "${@shiro.getPrincipalProperty('specialSkill')}")
|
||||
const {data} = await $.get("/mobile/member/getAllNation");
|
||||
/* this.nationColumns = data.map(v => {
|
||||
return v.mzmc
|
||||
}) */
|
||||
this.nationColumns = nation
|
||||
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
if (resp.data.member === 1) {
|
||||
this.memberStatus = this.memberStatusColumn.MEMBER
|
||||
} else {
|
||||
if (resp.data.record != null) {
|
||||
this.memberStatus = this.memberStatusColumn.APPLYING
|
||||
} else {
|
||||
this.memberStatus = this.memberStatusColumn.NOTMEBMER
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,65 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="会员申请" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="padding: 16px 10px;">
|
||||
<div v-for="o in applyRecords" class="list-card" @click="view(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<van-icon name="records" :color="themeColor" size="25"></van-icon>
|
||||
<span :style="{color:themeColor}" style="font-size: 16px">会员申请</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申 请 人">{{o.username}}</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty v-if="mLoading==false&&applyRecords.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
applyRecords: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async view(o) {
|
||||
const {id, userId} = o
|
||||
window.location.href = '/mobile/member/detail?record_id=' + id + '&user_id=' + userId
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,125 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="会员审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="申 请 人:">{{o.username}}({{o.loginname}})</van-cell>
|
||||
<van-cell :border="false" title="申请时间:">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会:">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="人员类型:">{{o.personType}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
mLoading: false,
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
handle: true,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
$.post(loc() + '/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/* pageData() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
},*/
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/member/audit/findOne?stateId=' + o.stateId + '&record_id=' + o.id + '&user_id=' + o.userId
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,208 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.chart-card {
|
||||
background-color: #FFFFFF;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.flex-box {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-row gutter="20" style="margin: 0 10px 10px 10px;padding-top: 20px;">
|
||||
<van-col span="8">
|
||||
<div class="flex-box" style="justify-content: space-between;padding: 15px">
|
||||
<svg t="1634176912094" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="712" width="32" height="32">
|
||||
<path d="M327.6 682.7c-31.8-31.5-49.7-74.4-49.7-119.3V385.3c0-33.5 9.8-64.7 26.8-91-7.8-1.9-15.7-2.9-23.7-2.9H154.3c-56.6 0-102.9 46.9-102.9 104v163.7c0 38.8 21.5 74.4 55.7 92.3v319.9h83l30.6-202.5 30.6 202.5h76.4V682.7z m304.1-18.5c36.3-18.8 61.2-57.1 61.2-100.8V385.3c0-62.2-50.4-113.2-112-113.2h-138c-61.6 0-112 50.9-112 113.2v178.1c0 43.6 24.7 81.6 60.6 100.5V1012H482l33.3-220.3 33.3 220.3h83.1V664.2zM515.1 12c65.2 0 118 53.4 118 119.3 0 65.8-52.8 119.3-118 119.3s-118-53.4-118-119.3c0-66.1 52.8-119.3 118-119.3z m182.2 670.7v288.8h76.4L804.3 769l30.6 202.5H918V651.7c33-17.4 55.6-52.3 55.6-92.3V395.6c0-57.2-46.4-104-103-104H744.1c-8.2 0-16.2 1-23.7 2.9 17.6 27.1 26.9 58.7 26.8 91v178.1c0 45.4-18.5 88.2-49.9 119.1zM804.6 52.4c-60 0-108.5 49-108.5 109.5s48.5 109.6 108.5 109.6c59.8 0 108.3-49 108.3-109.6 0-60.6-48.5-109.5-108.3-109.5z m-584.1 0c59.8 0 108.5 49 108.5 109.5s-48.5 109.6-108.5 109.6c-59.9 0-108.3-49-108.3-109.6-0.1-60.6 48.4-109.5 108.3-109.5z"
|
||||
fill="#e0620d" p-id="713"></path>
|
||||
</svg>
|
||||
<div class="text-center" style="font-size: 11px">
|
||||
总会员
|
||||
<span>
|
||||
{{memberNumberMap.totalCount}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div class="flex-box" style="justify-content: space-between;padding: 15px">
|
||||
<svg t="1634178080836" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8757" width="32" height="32">
|
||||
<path d="M579.2 646.5H445.1c-14.4 0-26.2-11.8-26.2-26.2V436.7c0-14.4 11.8-26.2 26.2-26.2h134.1c14.4 0 26.2 11.8 26.2 26.2v183.6c0 14.4-11.8 26.2-26.2 26.2z"
|
||||
fill="#F7C9A4" p-id="8758"></path>
|
||||
<path d="M840.7 959.1V779c0-83.9-147.8-139.5-328.4-139.5-180.6 0-328.4 55.6-328.4 139.5v180.1h656.8z"
|
||||
fill="#E8E8DD" p-id="8759"></path>
|
||||
<path d="M381.5 420.5h-53.7c-26.5 0-48.1-21.7-48.1-48.1 0-26.5 21.7-48.1 48.1-48.1h53.7c26.5 0 48.1 21.7 48.1 48.1 0 26.4-21.7 48.1-48.1 48.1zM687 415.9h-53.7c-26.5 0-48.1-21.7-48.1-48.1 0-26.5 21.7-48.1 48.1-48.1H687c26.5 0 48.1 21.7 48.1 48.1 0.1 26.4-21.6 48.1-48.1 48.1z"
|
||||
fill="#F7C9A4" p-id="8760"></path>
|
||||
<path d="M800.7 959.1V779c0-83.9-81.2-139.5-288.4-139.5-202.6 0-288.4 55.6-288.4 139.5v180.1h576.8z"
|
||||
fill="#F2F2F1" p-id="8761"></path>
|
||||
<path d="M512.1 549.1c-95.4 0-173.5-55.2-173.5-156.2V258.7c0-101 78.1-183.7 173.5-183.7s173.5 82.7 173.5 183.8v134.1c0 101-78.1 156.2-173.5 156.2z"
|
||||
fill="#FFD9B6" p-id="8762"></path>
|
||||
<path d="M409 353.3a19.2 23.8 0 1 0 38.4 0 19.2 23.8 0 1 0-38.4 0Z" fill="#694B4B"
|
||||
p-id="8763"></path>
|
||||
<path d="M576 353.3a19.2 23.8 0 1 0 38.4 0 19.2 23.8 0 1 0-38.4 0Z" fill="#694B4B"
|
||||
p-id="8764"></path>
|
||||
<path d="M339.6 959.1v-112c0-7.7-6.3-14-14-14s-14 6.3-14 14V959h28zM711.3 959.1v-112c0-7.7-6.3-14-14-14s-14 6.3-14 14V959h28z"
|
||||
fill="#E5E5DB" p-id="8765"></path>
|
||||
<path d="M577.8 649.5H447.3c-8.6 12.2-8.6 32.2 0 44.5l49.5 70.2c8.6 12.2 22.8 12.2 31.4 0l49.5-70.2c8.7-12.3 8.7-32.3 0.1-44.5z"
|
||||
fill="#0AC2FD" p-id="8766"></path>
|
||||
<path d="M700.4 82.6h-243c-28.9 0-54 19.7-65.8 48.1-37.5 3.3-63.4 40-63.4 84.2l11.4 119.4H397c2.6 0 4.8-2.2 4.8-4.9v-65.1c0-3.1 2.2-5.7 4.9-5.7l212 20.8c2.7 0 4.9 2.6 4.9 5.7v40.5c0 3.7 2.9 6.7 6.5 6.7l45.4 2h7.1c19.4 0 36.3-230.3 36.3-230.3 1.3-12.5-8.3-21.4-18.5-21.4z"
|
||||
fill="#F7CCA5" p-id="8767"></path>
|
||||
<path d="M712.1 62.6h-254c-29.3 0-54.7 19.3-66.6 47.2-38 3.3-68.1 39.1-68.1 82.4l14 117.3H379c2.7 0 4.8-2.2 4.8-4.8v-63.8c0-3.1 2.2-5.6 5-5.6l246.8 22.3c2.7 0 5 2.5 5 5.6V303c0 3.6 2.9 6.5 6.6 6.5h46.1c12.3 0 37.6-225.9 37.6-225.9 1.1-12.3-8.5-21-18.8-21z"
|
||||
fill="#694B4B" p-id="8768"></path>
|
||||
<path d="M511.3 648.5l-36.5 79.4c-6.5 10.3-13.6 21.2-24.1 11.7l-103.4-75.7c-7.9-7.9-15.9-13.9-12.8-23.6l32.3-54.2c3.1-9.7 14-15 24.1-11.7L498.5 625c10.2 3.2 15.9 13.8 12.8 23.5z"
|
||||
fill="#E8E8DD" p-id="8769"></path>
|
||||
<path d="M513.2 647.9l35.9 79.6c6.4 10.4 13.4 21.3 24.1 11.9l103.9-75c7.9-7.8 16-13.8 12.9-23.5l-21-51.4c-3.1-9.7-13.9-15.1-24.1-11.9L526 624.3c-10 3.3-15.9 13.9-12.8 23.6z"
|
||||
fill="#E8E8DD" p-id="8770"></path>
|
||||
<path d="M549.3 959.7h-73.9c-7.7 0-14-3-14-6.7l30-206c0-3.7 6.3-6.7 14-6.7h13.9c7.7 0 14 3 14 6.7l30 206c0 3.7-6.3 6.7-14 6.7z"
|
||||
fill="#0AC2FD" p-id="8771"></path>
|
||||
<path d="M528.3 762.3h-33c-3 0-5.5-2.5-5.5-5.5s2.5-5.5 5.5-5.5h33c3 0 5.5 2.5 5.5 5.5s-2.5 5.5-5.5 5.5z"
|
||||
fill="#079FDB" p-id="8772"></path>
|
||||
</svg>
|
||||
<div class="text-center" style="font-size: 11px">
|
||||
男性会员
|
||||
<span>
|
||||
{{memberNumberMap.maleCount}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div class="flex-box" style="justify-content: space-between;padding: 15px">
|
||||
<svg t="1634178064546" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8382" width="32" height="32">
|
||||
<path d="M668.501333 761.685333h-2.048a97.621333 97.621333 0 0 1-97.621333-97.621333v-43.52h-109.397333v43.52a97.621333 97.621333 0 0 1-97.621334 97.621333h-6.314666a136.533333 136.533333 0 0 0-136.533334 136.533334v29.013333h586.069334v-29.013333a136.533333 136.533333 0 0 0-136.533334-136.533334z"
|
||||
fill="#FFE3BA" p-id="8383"></path>
|
||||
<path d="M427.690667 735.914667a180.224 180.224 0 0 0 170.666666-1.365334 96.938667 96.938667 0 0 1-30.208-70.485333v-43.52h-108.714666v43.52a96.938667 96.938667 0 0 1-31.744 71.850667zM805.034667 870.4a232.106667 232.106667 0 0 1-93.525334 19.626667H312.490667A232.106667 232.106667 0 0 1 218.965333 870.4v56.149333h586.069334V870.4z"
|
||||
fill="#FFC670" p-id="8384"></path>
|
||||
<path d="M512 108.032a254.805333 254.805333 0 0 1 254.805333 254.976v265.898667a38.229333 38.229333 0 0 1-38.229333 38.229333H295.424a38.229333 38.229333 0 0 1-38.229333-38.229333V363.008A254.805333 254.805333 0 0 1 512 108.032z"
|
||||
fill="#FFC670" p-id="8385"></path>
|
||||
<path d="M512 552.106667a529.066667 529.066667 0 0 1-254.805333-63.488v140.288a38.229333 38.229333 0 0 0 38.229333 38.229333h433.152a38.229333 38.229333 0 0 0 38.229333-38.229333v-140.288A529.066667 529.066667 0 0 1 512 552.106667z"
|
||||
fill="#FFB038" p-id="8386"></path>
|
||||
<path d="M694.101333 304.64v221.866667A182.101333 182.101333 0 0 1 512 708.608a182.101333 182.101333 0 0 1-182.101333-182.101333v-149.674667a131.072 131.072 0 0 0 184.32-119.466667 131.242667 131.242667 0 0 0 113.834666 65.877334 129.706667 129.706667 0 0 0 66.048-17.92z"
|
||||
fill="#FFF6E6" p-id="8387"></path>
|
||||
<path d="M638.122667 321.706667v204.8a182.101333 182.101333 0 0 1-153.6 179.712 189.610667 189.610667 0 0 0 27.989333 2.389333 182.101333 182.101333 0 0 0 181.589333-182.101333v-221.866667a130.389333 130.389333 0 0 1-55.978666 17.066667z"
|
||||
fill="#FFE3BA" p-id="8388"></path>
|
||||
<path d="M666.453333 750.933333H648.533333c0 73.557333-59.562667 116.053333-133.12 116.053334h-7.850666c-73.557333 0-133.12-42.496-133.12-116.053334H358.4a136.533333 136.533333 0 0 0-58.538667 13.141334v163.328h426.666667v-163.498667a136.533333 136.533333 0 0 0-60.074667-12.970667z"
|
||||
fill="#F6716F" p-id="8389"></path>
|
||||
<path d="M724.992 870.4A232.106667 232.106667 0 0 1 631.466667 890.709333H392.533333A232.106667 232.106667 0 0 1 299.008 870.4v56.149333h426.666667V870.4z"
|
||||
fill="#F0504D" p-id="8390"></path>
|
||||
<path d="M593.92 107.52a36.864 36.864 0 0 0 5.973333 57.002667l69.12 45.397333 27.306667-27.306667-45.397333-69.290666a37.034667 37.034667 0 0 0-57.002667-5.802667zM770.901333 285.354667a36.864 36.864 0 0 0-5.802666-57.002667l-68.266667-45.397333-27.306667 27.306666 45.397334 69.12a36.693333 36.693333 0 0 0 55.978666 5.973334z"
|
||||
fill="#F6716F" p-id="8391"></path>
|
||||
<path d="M631.466667 201.250133l55.381333-55.3984 46.08 46.097067-55.381333 55.3984z" fill="#FCFEFF"
|
||||
p-id="8392"></path>
|
||||
<path d="M877.397333 910.165333h-55.296v-11.946666a153.6 153.6 0 0 0-80.042666-134.485334 17.066667 17.066667 0 0 0-9.898667-15.36 153.6 153.6 0 0 0-65.706667-14.506666H648.533333a17.066667 17.066667 0 0 0-12.117333 5.12A81.92 81.92 0 0 1 597.333333 705.877333a212.992 212.992 0 0 0 35.328-21.674666h95.402667a55.466667 55.466667 0 0 0 55.296-55.296V363.008a277.504 277.504 0 0 0-6.826667-60.757333c2.048-1.536 4.096-3.072 5.973334-4.778667a54.101333 54.101333 0 0 0-8.533334-83.456l-25.429333-17.066667a17.066667 17.066667 0 0 0-4.096-17.066666L699.733333 133.802667a17.066667 17.066667 0 0 0-17.066666-4.096l-17.066667-25.6a53.930667 53.930667 0 0 0-83.285333-8.704 38.058667 38.058667 0 0 0-3.242667 4.096 271.189333 271.189333 0 0 0-338.944 263.509333v265.898667a55.466667 55.466667 0 0 0 55.296 55.296h95.402667a199.509333 199.509333 0 0 0 38.570666 23.210666 80.042667 80.042667 0 0 1-41.472 32.597334A17.066667 17.066667 0 0 0 375.466667 733.866667h-17.066667a153.6 153.6 0 0 0-65.706667 14.677333 17.066667 17.066667 0 0 0-9.898666 15.530667v2.218666a145.408 145.408 0 0 0-80.042667 129.365334v14.677333H146.602667a17.066667 17.066667 0 0 0 0 34.133333h730.794666a17.066667 17.066667 0 0 0 0-34.133333z m-595.456 0h-47.786666v-14.677333a112.64 112.64 0 0 1 47.786666-91.818667z m473.770667-667.477333a18.944 18.944 0 0 1 8.874667 14.506667 20.48 20.48 0 0 1-21.674667 21.845333 20.309333 20.309333 0 0 1-14.677333-8.874667l-19.456-29.696 17.066666-17.066666z m-68.266667-72.533333l22.016 22.016-31.914666 31.232-22.016-22.016z m-64.682666-56.32a20.650667 20.650667 0 0 1 14.677333 8.874666l19.456 29.696-17.066667 17.066667L609.28 150.186667a18.944 18.944 0 0 1-8.874667-13.653334 20.309333 20.309333 0 0 1 21.674667-22.698666zM295.424 650.069333a21.162667 21.162667 0 0 1-21.162667-21.162666V363.008A238.933333 238.933333 0 0 1 512 125.098667a242.346667 242.346667 0 0 1 54.442667 6.485333 55.125333 55.125333 0 0 0 0 7.509333 53.418667 53.418667 0 0 0 24.064 39.594667l25.088 17.066667a17.066667 17.066667 0 0 0 3.754666 18.090666L665.6 259.584a17.066667 17.066667 0 0 0 17.066667 3.925333l17.066666 25.258667a53.248 53.248 0 0 0 39.594667 24.064 25.6 25.6 0 0 0 5.12 0 233.984 233.984 0 0 1 5.290667 50.176v265.898667a21.162667 21.162667 0 0 1-21.162667 21.162666h-60.586667a198.656 198.656 0 0 0 43.178667-123.562666V313.002667a17.066667 17.066667 0 0 0-8.704-14.677334 17.066667 17.066667 0 0 0-17.066667 0A114.005333 114.005333 0 0 1 529.066667 256a17.066667 17.066667 0 0 0-31.914667 8.874667 114.176 114.176 0 0 1-160.256 104.448 17.066667 17.066667 0 0 0-24.064 15.530666v141.141334a198.656 198.656 0 0 0 43.178667 123.562666z m51.2-123.562666V409.6a150.698667 150.698667 0 0 0 36.010667 4.437333A148.138667 148.138667 0 0 0 525.312 307.2a148.821333 148.821333 0 0 0 102.4 41.301333 144.896 144.896 0 0 0 48.981333-8.362666v187.733333a165.034667 165.034667 0 0 1-330.069333 0z m115.2 192.682666a199.338667 199.338667 0 0 0 49.834667 6.485334 191.829333 191.829333 0 0 0 53.589333-7.68 115.712 115.712 0 0 0 64.170667 54.613333c-11.093333 53.077333-62.634667 77.141333-113.834667 77.141333h-7.850667c-51.2 0-102.4-23.722667-113.493333-75.946666a115.029333 115.029333 0 0 0 67.925333-54.613334z m245.76 190.976h-392.533333v-134.826666A119.466667 119.466667 0 0 1 358.4 768c8.362667 68.266667 67.242667 116.053333 149.162667 116.053333h7.850666C597.333333 883.882667 656.725333 836.266667 665.6 768h1.365333a119.466667 119.466667 0 0 1 41.472 7.509333z m80.042667 0h-45.568v-105.813333a119.466667 119.466667 0 0 1 45.909333 93.866667z"
|
||||
fill="#3D3D63" p-id="8393"></path>
|
||||
<path d="M587.776 586.581333a17.066667 17.066667 0 0 0-31.402667-13.824 48.298667 48.298667 0 0 1-88.746666 0 17.066667 17.066667 0 0 0-31.402667 13.824 82.773333 82.773333 0 0 0 151.552 0zM453.290667 454.826667v-19.797334a17.066667 17.066667 0 0 0-34.133334 0v19.797334a17.066667 17.066667 0 0 0 34.133334 0zM587.776 471.893333a17.066667 17.066667 0 0 0 17.066667-17.066666v-19.797334a17.066667 17.066667 0 1 0-34.133334 0v19.797334a17.066667 17.066667 0 0 0 17.066667 17.066666z"
|
||||
fill="#3D3D63" p-id="8394"></path>
|
||||
</svg>
|
||||
<div class="text-center" style="font-size: 11px">
|
||||
女性会员
|
||||
<span>
|
||||
{{memberNumberMap.femaleCount}}
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
|
||||
人员类型
|
||||
</div>
|
||||
<canvas id="personType" style="width: 100%" height="350"></canvas>
|
||||
</div>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
|
||||
增长趋势
|
||||
</div>
|
||||
<canvas id="memberTrend" style="width: 100%" height="350"></canvas>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<script src="https://gw.alipayobjects.com/os/lib/antv/f2/3.7.0/dist/f2.min.js"></script>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
memberNumberMap: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getMemberNumber() {
|
||||
const {data} = await $.get('/mobile/member/dashBoard/memberNumber')
|
||||
this.memberNumberMap = data
|
||||
},
|
||||
async growthTrend() {
|
||||
const {data} = await $.get('/mobile/member/dashBoard/growthTrend')
|
||||
const chart = new F2.Chart({
|
||||
id: 'memberTrend',
|
||||
pixelRatio: window.devicePixelRatio
|
||||
})
|
||||
chart.source(data)
|
||||
chart.scale({
|
||||
label: {
|
||||
range: [ 0, 1 ]
|
||||
},
|
||||
value: {
|
||||
tickCount: 5,
|
||||
min: 0
|
||||
}
|
||||
})
|
||||
// chart.axis('label', {
|
||||
// label: {
|
||||
// rotate: -1,
|
||||
// textAlign: 'end',
|
||||
// textBaseline: 'middle'
|
||||
// }
|
||||
// })
|
||||
chart.area().position('label*value').color('l(90) 0:#1890FF 1:#f7f7f7').shape('smooth')
|
||||
chart.line().position('label*value').color('l(90) 0:#1890FF 1:#f7f7f7').shape('smooth')
|
||||
chart.render()
|
||||
|
||||
|
||||
|
||||
},
|
||||
async getPersonTypeMember() {
|
||||
const {data} = await $.get('/platform/member/inquire/board/personTypeMember')
|
||||
const chart = new F2.Chart({
|
||||
id: 'personType',
|
||||
pixelRatio: window.devicePixelRatio
|
||||
})
|
||||
chart.source(data)
|
||||
chart.interval().position('label*value').color('label')
|
||||
chart.axis('label', {
|
||||
label: {
|
||||
rotate: -1,
|
||||
textAlign: 'end',
|
||||
textBaseline: 'middle'
|
||||
}
|
||||
})
|
||||
chart.render();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPersonTypeMember()
|
||||
this.getMemberNumber()
|
||||
this.growthTrend()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,49 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<!-- <van-nav-bar title="详细信息" left-arrow left-text="返回" placeholder fixed @click-left="location.href = document.referrer"></van-nav-bar>-->
|
||||
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<mobile-member-info ref="minfo"></mobile-member-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unionAudit: {},
|
||||
schoolAudit: {},
|
||||
personTypes: ["事业编制", "事业编制人事代理", "非事业编制人事代理", "校聘人才派遣", "人才/劳务派遣(天目湖校区)", "溧阳事业编制(天目湖校区)"],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-member-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const personType = "${@shiro.getPrincipalProperty('personType')}"
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getUserInfo(user_id ? user_id : userId)
|
||||
this.$refs.minfo.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
this.mLoading = false
|
||||
/* if (personType === "" || !this.personTypes.includes(personType)) {
|
||||
console.log(11)
|
||||
this.$toast.fail('您不具备申请会员的条件,具体事宜请咨询校工会');
|
||||
}*/
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,113 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="会员审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<member-menber-info ref="info" :id="id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.auditPass = pass
|
||||
const resp = await $.post("/platform/member/apply/audit/doAudit", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
setTimeout(() => {
|
||||
this.$refs.info.getUserInfo(user_id)
|
||||
this.$refs.info.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
this.formData = {
|
||||
recordId: record_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,115 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar fixed left-arrow placeholder title="会员审核"
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<member-menber-info ref="info" :id="id" title="院级工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
院级工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field
|
||||
label="审核人员"
|
||||
name="username"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field required
|
||||
v-model="formData.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.auditPass = pass
|
||||
const resp = await $.post("/platform/member/apply/audit/doAudit", this.formData)
|
||||
requestLaterFun(resp, (data) => {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}, () => {
|
||||
this.$toast.fail('审核失败');
|
||||
}, () => {
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
setTimeout(() => {
|
||||
this.$refs.info.getUserInfo(user_id)
|
||||
this.$refs.info.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
|
||||
this.formData = {
|
||||
recordId: record_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,310 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
margin: 16px;
|
||||
padding: 4px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.main_content {
|
||||
height: 260px;
|
||||
background-color: #4298FB;
|
||||
border-bottom-left-radius: 50% 30px;
|
||||
border-bottom-right-radius: 50% 30px;
|
||||
}
|
||||
|
||||
.year {
|
||||
padding: 50px 0 0 30px;
|
||||
font-size: 22px;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.basic {
|
||||
margin: 20px 20px 0 30px;
|
||||
font-weight: bold;
|
||||
color: #264260;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.activity_count {
|
||||
height: 260px;
|
||||
margin: 40px 20px 10px 20px;
|
||||
background: url("/assets/mobile/img/mine/back.png") no-repeat;
|
||||
background-size: contain;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.activity_count_year {
|
||||
padding: 20px 0 0 20px;
|
||||
}
|
||||
|
||||
.activity_count_parent_div {
|
||||
display: grid; /* 使用 Grid 布局 */
|
||||
grid-template-columns: repeat(2, 1fr); /* 创建两列,每列占据可用空间的等分 */
|
||||
gap: 10px; /* 设置子元素之间的间隔 */
|
||||
font-size: 13px;
|
||||
padding: 0 30px;
|
||||
}
|
||||
.activity_count_child_div {
|
||||
text-align: center;
|
||||
}
|
||||
.activity_count_child_div div:nth-child(1) {
|
||||
color: #1B6FC5;
|
||||
font-size: 26px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.activity_type_parent_div {
|
||||
display: grid; /* 使用 Grid 布局 */
|
||||
grid-template-columns: repeat(2, 1fr); /* 创建两列,每列占据可用空间的等分 */
|
||||
gap: 10px; /* 设置子元素之间的间隔 */
|
||||
margin: 0 20px;
|
||||
}
|
||||
.activity_type_child_div{
|
||||
position: relative;
|
||||
}
|
||||
.activity_type_child_div div {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
left: 20px;
|
||||
font-size: 20px;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
.cover {
|
||||
margin: 0 10px;
|
||||
display: flex;
|
||||
padding: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.cover img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
.cover .van-image__error {
|
||||
border-radius: 10px;
|
||||
}
|
||||
.activity_name {
|
||||
font-weight: bold;
|
||||
}
|
||||
.activity_time {
|
||||
color: grey;
|
||||
font-size: 13px;
|
||||
}
|
||||
.van-divider {
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<div class="main_content">
|
||||
<div class="year">
|
||||
<van-icon name="notes-o" style="position: relative; top: 3px"></van-icon>
|
||||
<span @click="yearShow = true">{{ pageForm.year ? pageForm.year : '全部' }}</span>
|
||||
</div>
|
||||
<div class="basic">
|
||||
<div>
|
||||
<div>Hi~</div>
|
||||
<div>${@shiro.getPrincipalProperty('username')}老师,欢迎您!</div>
|
||||
</div>
|
||||
<div @click="showInfo(0)" style="color: white; font-size: 18px">
|
||||
个人信息
|
||||
</div>
|
||||
</div>
|
||||
<div class="activity_count">
|
||||
<div class="activity_count_year">{{ pageForm.year ? pageForm.year : '全部' }}年度</div>
|
||||
<div style="margin: 10px 0 20px 60px">您一共参与了</div>
|
||||
<div class="activity_count_parent_div">
|
||||
<div class="activity_count_child_div">
|
||||
<div>{{activityCount.trainVideoCount}}</div>
|
||||
<div>次培训教育</div>
|
||||
</div>
|
||||
<div class="activity_count_child_div">
|
||||
<div>{{activityCount.trainSignUpCount}}</div>
|
||||
<div>次品牌活动</div>
|
||||
</div>
|
||||
<div class="activity_count_child_div">
|
||||
<div>{{activityCount.sportActivityCount}}</div>
|
||||
<div>次体育活动</div>
|
||||
</div>
|
||||
<div class="activity_count_child_div">
|
||||
<div>{{activityCount.cultureActivityCount}}</div>
|
||||
<div>次文化活动</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="activity_type_parent_div">
|
||||
<div @click="showInfo(1)" class="activity_type_child_div">
|
||||
<img src="/assets/mobile/img/mine/1.png" style="width: 100%"/>
|
||||
<div>培训教育</div>
|
||||
</div>
|
||||
<div @click="showInfo(2)" class="activity_type_child_div">
|
||||
<img src="/assets/mobile/img/mine/2.png" style="width: 100%"/>
|
||||
<div>品牌活动</div>
|
||||
</div>
|
||||
<div @click="showInfo(3)" class="activity_type_child_div">
|
||||
<img src="/assets/mobile/img/mine/3.png" style="width: 100%"/>
|
||||
<div>体育活动</div>
|
||||
</div>
|
||||
<div @click="showInfo(4)" class="activity_type_child_div">
|
||||
<img src="/assets/mobile/img/mine/4.png" style="width: 100%"/>
|
||||
<div>文化活动</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-popup v-model:show="popupShow" position="right" :style="{ width: '100%', height: '100%' }">
|
||||
<van-nav-bar
|
||||
:title="infoTitle"
|
||||
left-arrow
|
||||
placeholder
|
||||
@click-left="popupShow = false">
|
||||
</van-nav-bar>
|
||||
<template v-if="activeName === 0">
|
||||
<van-cell icon="coupon-o" title="工号" :value="userInfo.loginname"></van-cell>
|
||||
<van-cell icon="manager-o" title="性别" :value="userInfo.sex"></van-cell>
|
||||
<van-cell icon="phone-o" title="手机号" :value="userInfo.mobile"></van-cell>
|
||||
<van-cell icon="bar-chart-o" title="所属单位" :value="userInfo.unitname"></van-cell>
|
||||
<van-cell icon="cluster-o" title="所属工会" :value="userInfo.unionname"></van-cell>
|
||||
</template>
|
||||
<div style="max-height: calc(100vh - 130px - 44px - 60px); overflow: auto" v-else-if="activeName !== 0">
|
||||
<div v-if="activityData.length > 0" v-for="item in activityData">
|
||||
<div class="cover">
|
||||
<van-image width="100" height="70"
|
||||
:src="getImageUrl(item.cover)">
|
||||
</van-image>
|
||||
<div class="ml10" style="display: flex; flex-direction: column; justify-content: space-between;">
|
||||
<div class="activity_name">
|
||||
<van-tag type="primary" v-if="moment().unix() < moment(item.activityStartTime).unix()">未开始</van-tag>
|
||||
<van-tag type="primary" v-else-if="moment().unix() >= moment(item.activityStartTime).unix() && moment().unix() <= moment(item.activityEndTime).unix()">进行中</van-tag>
|
||||
<van-tag type="primary" v-else-if="moment().unix() > moment(item.activityEndTime).unix()">已结束</van-tag>
|
||||
<span>{{ item.activityName }}</span>
|
||||
</div>
|
||||
<div class="activity_time">
|
||||
<div>开始时间:{{ moment(item.activityStartTime).format('YYYY-MM-DD HH:mm') }}</div>
|
||||
<div>结束时间:{{ moment(item.activityEndTime).format('YYYY-MM-DD HH:mm') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<van-empty
|
||||
v-if="activityData.length === 0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<van-action-sheet
|
||||
v-model="yearShow"
|
||||
:actions="yearActions"
|
||||
cancel-text="取消"
|
||||
close-on-click-action
|
||||
@cancel="yearShow = false"
|
||||
@select="yearSelect"
|
||||
></van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
infoTitle: '个人基本信息',
|
||||
popupShow: false,
|
||||
yearActions: [],
|
||||
yearShow: false,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
activeName: 0,
|
||||
userInfo: {},
|
||||
activityData: [],
|
||||
activityCount: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async showInfo(name) {
|
||||
this.activeName = name
|
||||
if(name === 0) {
|
||||
this.infoTitle = '个人基本信息'
|
||||
} else {
|
||||
let method
|
||||
switch (name) {
|
||||
case 1:
|
||||
this.infoTitle = '培训教育'
|
||||
method = '/getTrainVideo'
|
||||
break
|
||||
case 2:
|
||||
this.infoTitle = '品牌活动'
|
||||
method = '/getTrainActivity'
|
||||
break
|
||||
case 3:
|
||||
this.infoTitle = '体育活动'
|
||||
method = '/getSportActivity'
|
||||
break
|
||||
case 4:
|
||||
this.infoTitle = '文化活动'
|
||||
method = '/getCultureActivity'
|
||||
break
|
||||
}
|
||||
const resp = await $.post('/mobile/mine' + method, this.pageForm)
|
||||
this.activityData = resp.data
|
||||
}
|
||||
this.popupShow = true
|
||||
this.$forceUpdate()
|
||||
},
|
||||
getImageUrl(url) {
|
||||
try {
|
||||
const u = JSON.parse(url)
|
||||
return FILE_DOMAIN + '/fileStreamPreview?id=' + u?.id
|
||||
}catch (e) {
|
||||
return FILE_DOMAIN + '/fileStreamPreview?id=' + url
|
||||
}
|
||||
},
|
||||
async yearSelect(action, index) {
|
||||
if (action.name === '全部') {
|
||||
this.pageForm.year = null
|
||||
} else {
|
||||
this.pageForm.year = action.name.replaceAll('年', '')
|
||||
}
|
||||
await this.getActivityCount()
|
||||
},
|
||||
async getUserInfo() {
|
||||
const resp = await $.get('/platform/member/common/userInfo', {userId: "${@shiro.getPrincipalProperty('id')}"})
|
||||
this.userInfo = resp.data
|
||||
},
|
||||
async getActivityCount() {
|
||||
const resp = await $.post('/mobile/mine/getActivityCount', this.pageForm)
|
||||
this.activityCount = resp.data
|
||||
},
|
||||
async init() {
|
||||
await this.getUserInfo()
|
||||
await this.getActivityCount()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
for (let i = new Date().getFullYear() - 6; i <= new Date().getFullYear(); i++) {
|
||||
this.yearActions.unshift({name: i + '年'},)
|
||||
}
|
||||
this.yearActions.unshift({name: '全部'})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,157 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
#app {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.icon_text {
|
||||
font-size: 16px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-image {
|
||||
max-height: 300px !important;
|
||||
}
|
||||
|
||||
.not_open {
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.item_div {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
padding: 10px 0px;
|
||||
color: white;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<!--轮播图-->
|
||||
<van-swipe :autoplay="3000" class="my-swipe" indicator-color="white">
|
||||
<van-swipe-item v-for="item in photoArray">
|
||||
<van-image width="100%" height="200px" :src="item.src"></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<!--宫格-->
|
||||
<van-grid :border="false" :column-num="2">
|
||||
<!-- :class="item.isOpen ? '' : 'not_open'" -->
|
||||
<van-grid-item :class=" '' "
|
||||
:url="item.isOpen ? '/mobile/index/toHome?type=' + item.text : ''" v-for="item in gridArray">
|
||||
<div class="item_div" :style="'background-color: ' + item.backGroundColor ">
|
||||
<div>
|
||||
<van-image :src="item.src" height="32" width="40"></van-image>
|
||||
</div>
|
||||
<span class="icon_text">{{item.text}}</span>
|
||||
</div>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item>
|
||||
<div class="item_div" style="background-color: rgb(155,130,239)">
|
||||
<div>
|
||||
<van-image height="32" width="40" src="/assets/platform/img/quickentry/education.png"
|
||||
@click="location.href='/mobile/trainEducation/index'"></van-image>
|
||||
</div>
|
||||
<span class="icon_text">培训教育</span>
|
||||
</div>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item>
|
||||
<div class="item_div" style="background-color: #FE8DB8">
|
||||
<div>
|
||||
<van-image height="32" width="40" src="/assets/platform/img/quickentry/jcbd.png" @click="loginOut"></van-image>
|
||||
</div>
|
||||
<span class="icon_text">解除绑定</span>
|
||||
</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<!--<div>
|
||||
<van-button color="#1867b0">退出登录</van-button>
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
photoArray: [
|
||||
{src: '/assets/mobile/img/home/home1.png'},
|
||||
{src: '/assets/mobile/img/home/home3.png'},
|
||||
],
|
||||
gridArray: [
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/member.png',
|
||||
text: '会员管理',
|
||||
isOpen: true,
|
||||
backGroundColor: '#58ae62'
|
||||
},
|
||||
/* {
|
||||
src: '/assets/platform/img/quickentry/proposal.png',
|
||||
text: '提案管理',
|
||||
isOpen: true,
|
||||
backGroundColor: '#a762c3'
|
||||
},*/
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/activity.png',
|
||||
text: '活动管理',
|
||||
isOpen: true,
|
||||
backGroundColor: '#4778cf'
|
||||
},
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/welfare.png',
|
||||
text: '福利慰问',
|
||||
isOpen: false,
|
||||
backGroundColor: '#c88f5c'
|
||||
},
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/db.png',
|
||||
text: '大病互助',
|
||||
isOpen: false,
|
||||
backGroundColor: '#dd5858'
|
||||
},
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/jy.png',
|
||||
text: '建言献策',
|
||||
isOpen: false,
|
||||
backGroundColor: '#2fbabf'
|
||||
},
|
||||
{
|
||||
src: '/assets/platform/img/quickentry/proposal.png',
|
||||
text: '协会组织',
|
||||
isOpen: true,
|
||||
backGroundColor: '#EEC04D'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async loginOut() {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消绑定吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
window.location.href = "/mobile/login/clearWxOpenId"
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
@@ -0,0 +1,473 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
margin: 0 10px;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.icon_text {
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.v-header {
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
#v-back {
|
||||
background: url("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d1ed570f33cd32f875a8390b850f.jpg%401280w_1l_2o_100sh.png&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638425547&t=55618f9dea9872dc3c0c1ece65ea96d5") no-repeat;
|
||||
background-size: cover;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
#v-back2 {
|
||||
background: url("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d1ed570f33cd32f875a8390b850f.jpg%401280w_1l_2o_100sh.png&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638425547&t=55618f9dea9872dc3c0c1ece65ea96d5") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.user_info {
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.user_avatar {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
transform: translate(0, -50%);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.disabled-row img {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
.disabled-row .van-grid-item {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.oneDisabled {
|
||||
filter: grayscale(1);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="user_info">
|
||||
<van-row style="height: 200px">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="200px"
|
||||
src="/back2.png"
|
||||
></van-image>
|
||||
</van-row>
|
||||
|
||||
<van-row class="user_avatar" style="height: 80px">
|
||||
<van-col span="6" class="text-center">
|
||||
<van-image
|
||||
round
|
||||
width="70"
|
||||
height="70"
|
||||
:src="avatar"
|
||||
></van-image>
|
||||
</van-col>
|
||||
<van-col span="18">
|
||||
<div style="height: 40px;line-height: 40px">
|
||||
<span style="font-size: 22px; color: white">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</span>
|
||||
<span style="color:rgb(80 87 100)">
|
||||
${@shiro.getPrincipalProperty('loginname')}
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-ellipsis" style="height: 40px;line-height: 40px;font-size: 14px;color: #969799">
|
||||
<!--#if(@shiro.getPrincipalProperty('union')!=null){#-->
|
||||
${@shiro.getPrincipalProperty('union').getUnionname()}
|
||||
<!--#}#-->
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
|
||||
<van-row
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdb01') || @shiro.hasRole('jdh12')}">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
民主管理
|
||||
</div>
|
||||
<van-grid
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdbt01')||@shiro.hasRole('jdhdb01') || @shiro.hasRole('jdh12')}"
|
||||
:border="false" :column-num="3">
|
||||
<van-grid-item v-if="${@shiro.hasRole('jdhdb01')}"
|
||||
url="/platform/mobile/proposal/compose">
|
||||
<image src="/assets/mobile/icon/proposal/myProposal.png"></image>
|
||||
<span class="icon_text">个人提案阅览</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="${@shiro.hasRole('jdhdb01')}"
|
||||
url="/platform/mobile/proposal/seconded">
|
||||
<image src="/assets/mobile/icon/proposal/fy.png"></image>
|
||||
<span class="icon_text">附议提案</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')||@shiro.hasRole('jdhdbt01')}"
|
||||
url="/platform/mobile/proposal/delegation">
|
||||
<image style="width: 59px" src="/assets/mobile/icon/proposal/tz.png"></image>
|
||||
<span class="icon_text">团长审议</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}"
|
||||
url="/platform/mobile/proposal/integrated">
|
||||
<image src="/assets/mobile/icon/proposal/search.png"></image>
|
||||
<span class="icon_text">提案查询</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('tamange')}"
|
||||
url="/mobile/proposal/delegate/index">
|
||||
<image src="/assets/mobile/icon/proposal/cx.png"></image>
|
||||
<span class="icon_text">代表查询</span>
|
||||
</van-grid-item>
|
||||
|
||||
<!-- <van-grid-item url="/mobile/proposal/analysis/index">-->
|
||||
<!-- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"-->
|
||||
<!-- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">-->
|
||||
<!-- <svg t="1598769687916" class="icon" viewBox="0 0 1024 1024" version="1.1"-->
|
||||
<!-- xmlns="http://www.w3.org/2000/svg" p-id="1332" width="32" height="32"-->
|
||||
<!-- xmlns:xlink="http://www.w3.org/1999/xlink">-->
|
||||
<!-- <defs>-->
|
||||
<!-- <style type="text/css"></style>-->
|
||||
<!-- </defs>-->
|
||||
<!-- <path d="M283.84768 275.52256h473.088c37.376 0 67.584 30.208 67.584 67.584v439.296c0 37.376-30.208 67.584-67.584 67.584h-473.088c-37.376 0-67.584-30.208-67.584-67.584v-439.296c0-37.376 30.208-67.584 67.584-67.584z"-->
|
||||
<!-- fill="#CAE4FF" p-id="1333"></path>-->
|
||||
<!-- <path d="M253.9008 716.1856c-15.872 0-28.672-12.8-28.672-28.16 0-7.68 3.072-14.848 8.192-20.48l175.616-175.616c11.264-11.264 29.184-11.264 40.448 0l103.424 103.424 125.44-125.44-49.664-49.664 152.064-25.088-10.752 166.912-51.2-51.2-143.36 142.848c-0.512 1.024-1.536 2.048-2.56 2.56-11.264 11.264-29.184 11.264-40.448 0l-103.424-103.424-155.648 155.648c-4.608 4.608-12.288 7.68-19.456 7.68z"-->
|
||||
<!-- fill="#0972E7" p-id="1334"></path>-->
|
||||
<!-- <path d="M163.7888 983.4496c-37.376 0-67.072-30.208-67.584-67.584V208.2816c0-37.376 30.208-67.072 67.584-67.584h95.744v-81.92c0-15.872 12.8-28.672 28.672-28.16 15.872 0 28.16 12.8 28.16 28.16v81.92h172.544v-81.92c0-15.872 12.8-28.672 28.16-28.672 15.872 0 28.672 12.8 28.672 28.16v81.92h173.056v-81.92c0-15.872 12.8-28.672 28.16-28.672 15.872 0 28.672 12.8 28.672 28.16v81.92h95.744c37.376 0 67.072 30.208 67.584 67.584v708.096c0 37.376-30.208 67.072-67.584 67.584l-707.584 0.512z m704-71.168V212.3776H167.8848v699.904h699.904z"-->
|
||||
<!-- fill="#0972E7" p-id="1335"></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- <span class="icon_text"> 提案分析</span>-->
|
||||
<!-- </van-grid-item>-->
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
品牌活动报名
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivity/trainList">
|
||||
<image src="/assets/mobile/icon/train/train.png"></image>
|
||||
<span class="icon_text">品牌活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/mobile/trainSignUpActivity/trainList?type=my">
|
||||
<image src="/assets/mobile/icon/train/my.png"></image>
|
||||
<span class="icon_text">我的报名</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</van-row>
|
||||
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
文体活动
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<!-- <van-grid-item url="/mobile/activity/Sports/list/activityList">
|
||||
<image src="/assets/mobile/svg/activity/bm.svg"></image>
|
||||
<span style="font-size: 12px;margin-top: 10px">体育活动报名</span>
|
||||
</van-grid-item>-->
|
||||
<van-grid-item url="/mobile/activity/unionActivity">
|
||||
<image src="/assets/mobile/icon/activity/bm.png"></image>
|
||||
<span class="icon_text">校活动报名</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item @click="toWxJsz">
|
||||
<image src="/assets/mobile/svg/activity/jsz.svg"></image>
|
||||
<span class="icon_text">健身走</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>
|
||||
|
||||
<!--<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
疗休养管理
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/index">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 疗休养</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/platform/mobile/theRapyRecuperation/myRecuperation">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 我的疗休养</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/checkin/info">
|
||||
<image src="/assets/mobile/svg/proposal/cx.svg"></image>
|
||||
<span class="icon_text"> 一路美景</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>-->
|
||||
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
场地预约
|
||||
</div>
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/activity/site/info">
|
||||
<image src="/assets/mobile/icon/site/apply.png"></image>
|
||||
<span class="icon_text">场地预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/site/info/my">
|
||||
<image src="/assets/mobile/icon/site/my.png"></image>
|
||||
<span class="icon_text">我的预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/activity/site/audit"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('gh10')||@shiro.hasRole('xghng')||@shiro.hasRole('siteManage')||@shiro.hasRole('A06')||@shiro.hasRole('H04')}">
|
||||
<image src="/assets/mobile/icon/site/audit.png"></image>
|
||||
<span class="icon_text">场地预约审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-row>
|
||||
|
||||
<van-row>
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
职工服务
|
||||
</div>
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<template v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('H01')}">
|
||||
<van-grid-item url="/mobile/condolence/apply/for">
|
||||
<image src="/assets/mobile/icon/condolence/apply.png"></image>
|
||||
<span class="icon_text">慰问申请</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/condolence/apply">
|
||||
<image src="/assets/mobile/icon/condolence/list.png"></image>
|
||||
<span class="icon_text">慰问记录</span>
|
||||
</van-grid-item>
|
||||
</template>
|
||||
<van-grid-item
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')||@shiro.hasRole('xghkj')}"
|
||||
url="/mobile/condolence/audit">
|
||||
<image src="/assets/mobile/icon/condolence/audit.png"></image>
|
||||
<span class="icon_text">慰问审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/difficulty/apply/index">
|
||||
<image src="/assets/mobile/icon/difficulty/apply.png"></image>
|
||||
<span class="icon_text">困难补助申请</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/difficulty/apply/apply_list">
|
||||
<image src="/assets/mobile/icon/difficulty/list.png"></image>
|
||||
<span class="icon_text">困难补助记录</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')||@shiro.hasRole('wyh02')}"
|
||||
url="/mobile/difficulty/audit">
|
||||
<image src="/assets/mobile/icon/difficulty/audit.png"></image>
|
||||
<span class="icon_text">困难补助审核</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<!--<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/psychologyPro/entrance">
|
||||
<image src="/assets/mobile/svg/psychology/apply.svg"></image>
|
||||
<span class="icon_text">心理咨询预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/psychologyPro/myApplyList">
|
||||
<image src="/assets/mobile/svg/psychology/apply.svg"></image>
|
||||
<span class="icon_text">我的预约</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/legalAid/entrance">
|
||||
<image src="/assets/mobile/svg/psychology/apply.svg"></image>
|
||||
<span class="icon_text">法律援助预约</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/legalAid/myApplyList">
|
||||
<image src="/assets/mobile/svg/psychology/apply.svg"></image>
|
||||
<span class="icon_text">我的预约</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<van-grid-item url="/mobile/wmhd/apply">
|
||||
<image src="/assets/mobile/svg/wmhd/apply.svg"></image>
|
||||
<span class="icon_text">教工作品征集</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/wmhd/list">
|
||||
<image src="/assets/mobile/svg/wmhd/apply.svg"></image>
|
||||
<span class="icon_text">我的教工作品</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/cahd/apply">
|
||||
<image src="/assets/mobile/svg/cahd/apply.svg"></image>
|
||||
<span class="icon_text">亲子作品征集</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/cahd/list">
|
||||
<image src="/assets/mobile/svg/cahd/apply.svg"></image>
|
||||
<span class="icon_text">我的亲子作品</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/mobile/question/list" class="oneDisabled">
|
||||
<image src="/assets/mobile/svg/question/list.svg"></image>
|
||||
<span class="icon_text">问卷调查</span>
|
||||
</van-grid-item>
|
||||
</van-grid>-->
|
||||
|
||||
<van-grid :border="false" :column-num="3">
|
||||
<!-- <van-grid-item url="/mobile/rxdj/apply">
|
||||
<image src="/assets/mobile/svg/rxdj/apply.svg"></image>
|
||||
<span class="icon_text">子女入学摸底调查</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/zgfw/mobile/rxdj/apply">
|
||||
<image src="/assets/mobile/svg/rxdj/apply.svg"></image>
|
||||
<span class="icon_text">我的登记</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/zgfw/mobile/rxdj/audit/auditList?lx=1"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')}">
|
||||
<image src="/assets/mobile/svg/rxdj/apply.svg"></image>
|
||||
<span class="icon_text">院级工会审核</span>
|
||||
</van-grid-item>
|
||||
<van-grid-item url="/platform/zgfw/mobile/rxdj/audit/auditList?lx=2"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('wyh02')||@shiro.hasRole('wyh03')}">
|
||||
<image src="/assets/mobile/svg/rxdj/apply.svg"></image>
|
||||
<span class="icon_text">校工会审核</span>
|
||||
</van-grid-item>-->
|
||||
<van-grid-item url="/mobile/welfare/list/index">
|
||||
<image src="/assets/mobile/icon/contribution/fl.png"></image>
|
||||
<span class="icon_text">职工福利</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
</van-row>
|
||||
<!--class="disabled-row"-->
|
||||
|
||||
<van-row>
|
||||
<div v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('public')||@shiro.hasRole('H01')}"
|
||||
class="van-sidebar-item van-sidebar-item--select">
|
||||
会员管理
|
||||
</div>
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item v-if="${@shiro.hasRole('H01')}" url="/mobile/member/detail">
|
||||
<image src="/assets/mobile/icon/member/da.png"></image>
|
||||
<span class="icon_text"> 会员档案</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item v-if="${@shiro.lacksRole('H01')}" url="/mobile/member/apply">
|
||||
<image src="/assets/mobile/icon/member/apply.png"></image>
|
||||
<span class="icon_text"> 申请入会</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('A06')}"
|
||||
url="/mobile/member/audit">
|
||||
<image src="/assets/mobile/icon/member/audit.png"></image>
|
||||
<span class="icon_text"> 会员审核</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item url="/mobile/member/dashBoard/index">
|
||||
<image src="/assets/mobile/icon/member/dashboard.png"></image>
|
||||
<span class="icon_text"> 会员看板</span>
|
||||
</van-grid-item>
|
||||
|
||||
</van-grid>
|
||||
|
||||
</van-row>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/cloudbase/1.1.0/cloud.js"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
sex: '${@shiro.getPrincipalProperty("sex")}',
|
||||
avatar: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loginOut() {
|
||||
window.location.href = "/mobile/login/out"
|
||||
},
|
||||
async toWxJsz() {
|
||||
const loginName = "${@shiro.getPrincipalProperty('loginname')}"
|
||||
const userName = "${@shiro.getPrincipalProperty('username')}"
|
||||
const query = 'loginName=' + encodeURIComponent(loginName) + '&userName=' + encodeURIComponent(userName)
|
||||
|
||||
let cloud = new window.cloud.Cloud({
|
||||
identityless: true, // true表示是未登录模式
|
||||
resourceAppid: 'wx9c693357de44cf59', // 小程序AppID
|
||||
resourceEnv: 'unionpal-0ge58oan8d6fa30e', // 云环境环境ID
|
||||
})
|
||||
await cloud.init(); // 云函数初始化
|
||||
/*const res = await cloud.callFunction({
|
||||
name: 'urlscheme', //提供UrlScheme服务的云函数名称
|
||||
data: {
|
||||
path: '/pages/login/login', // 想跳转的小程序路径
|
||||
query: query, // 地址栏query参数,可在微信 onLoad: function (options) {}生命周期里options接收这些参数
|
||||
} //向这个云函数中传入的自定义参数,注意:path地址前后/不能多加或者少加,query参数里不能有转义字符如果有需要解码
|
||||
});
|
||||
|
||||
console.log(res, '云函数返回数据');
|
||||
if (res && res.result.errCode == 0) {
|
||||
location.href = res.result.openlink; // 跳转
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}*/
|
||||
const res = await cloud.callFunction({
|
||||
name: 'urllink', //提供UrlScheme服务的云函数名称
|
||||
data: {
|
||||
path: '/pages/login/login', // 想跳转的小程序路径
|
||||
query: query, // 地址栏query参数,可在微信 onLoad: function (options) {}生命周期里options接收这些参数
|
||||
} //向这个云函数中传入的自定义参数,注意:path地址前后/不能多加或者少加,query参数里不能有转义字符如果有需要解码
|
||||
});
|
||||
/* alert(JSON.stringify(res))
|
||||
alert(res.result.urlLink)*/
|
||||
console.log(res, '云函数返回数据');
|
||||
if (res && res.result.errCode === 0) {
|
||||
location.href = res.result.urlLink
|
||||
// window.open(res.result.urlLink)
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.avatar = this.sex === '女' ? '/avatar_girl.svg' : '/avatar_boy.svg'
|
||||
// const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
// const userAvatar = "${@shiro.getPrincipalProperty('avatar')}"
|
||||
// console.log(userAvatar)
|
||||
// if (userAvatar) {
|
||||
// this.avatar = FILE_DOMAIN + "${@shiro.getPrincipalProperty('avatar')}"
|
||||
// } else {
|
||||
// this.avatar = this.sex === '女' ? '/avatar_girl.svg' : '/avatar_boy.svg'
|
||||
// }
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
<!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="${base!}/assets/platform/plugins/vant/index.min.css"/>-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/main.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/vant.css">
|
||||
|
||||
<script>
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: '4fa1e1aeabba7eb9518129cf57ab17c1'
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vant/vant.js"></script>
|
||||
<!-- <script src="${base!}/assets/platform/plugins/vant/vant.min.js"></script>-->
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/basic.js?v=0.0.1"></script>
|
||||
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jSignature/jSignature.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jSignature/flashcanvas.js"></script>
|
||||
<script src="${base!}/assets/platform/js/pinyin.js"></script>
|
||||
<script src="${base!}/assets/platform/js/viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/js/jquery-viewer.min.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/v.js"></script>
|
||||
<script src="${base!}/assets/platform/module/proposal/api.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mobileMixins.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mProposal.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mCondolence.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mCommon.js"></script>
|
||||
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<!-- <script src="${base!}/assets/platform/module/basics/basics.js"></script>-->
|
||||
<script src="${base!}/assets/platform/module/condolence/common.js"></script>
|
||||
<script src="${base!}/assets/platform/module/difficulty/common.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<script src="${base!}/assets/platform/js/scannerQrCodeJs.js"></script>
|
||||
|
||||
<!-- <script type="text/javascript"-->
|
||||
<!-- src="https://webapi.amap.com/maps?v=2.0&key=57f0d098ba1b881ecc436c4cfd23bbbf&plugin=AMap.PolyEditor,AMap.Geolocation"></script>-->
|
||||
|
||||
<script src="https://cdn-go.cn/cdn/vod-js-sdk-v6/latest/vod-js-sdk-v6.js"></script>
|
||||
<link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.min.css" rel="stylesheet"/>
|
||||
<!--如果需要在 Chrome 和 Firefox 等现代浏览器中通过 H5 播放 HLS 格式的视频,需要在 tcplayer.vx.x.x.min.js 之前引入 hls.min.x.xx.xm.js。-->
|
||||
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/libs/hls.min.0.13.2m.js"></script>
|
||||
<!--播放器脚本文件-->
|
||||
<!-- <script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.v4.3.0.min.js"></script>-->
|
||||
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.v4.5.2.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
const APP_DOMAIN = "${AppDomain!}"
|
||||
const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
Vue.component('m-page-loading', httpVueLoader('/components/mobile/common/MLoading.vue'))
|
||||
Vue.component('m-table-loading', httpVueLoader('/components/mobile/common/MTableLoading.vue'))
|
||||
Vue.component('m-card', httpVueLoader('/components/mobile/common/MCard.vue'))
|
||||
Vue.component('vant-file-upload', httpVueLoader('/components/plugins/VantFileUpload.vue'))
|
||||
$.ajaxSetup({
|
||||
"cache": false,
|
||||
error: function () {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动太火爆,请稍后再试。。。',
|
||||
}).then(() => {
|
||||
const agent = window.navigator.userAgent.toLowerCase()
|
||||
if (agent.match(/MicroMessenger/i)) {
|
||||
WeixinJSBridge.call('closeWindow')
|
||||
} else {
|
||||
window.close()
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
const getSuffixType = (v, num) => {
|
||||
v.filename.substring(v.filename.lastIndexOf(".") + num)
|
||||
}
|
||||
|
||||
// const GetQueryString = (name) => {
|
||||
// const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
// const r = window.location.search.substr(1).match(reg);
|
||||
// if (r != null) return unescape(r[2]);
|
||||
// return "";
|
||||
// }
|
||||
|
||||
// function removeHTMLTag(str) {
|
||||
// str = str.replace(/<\/?[^>]*>/g, ''); //去除HTML tag
|
||||
// str = str.replace(/[ | ]*\n/g, '\n'); //去除行尾空白
|
||||
// str = str.replace(/\n[\s| | ]*\r/g, '\n'); //去除多余空行
|
||||
// str = str.replace(/ /ig, '');//去掉
|
||||
// return str;
|
||||
// }
|
||||
|
||||
// const toChinesNum = (num) => {
|
||||
// let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
||||
// let unit = ["", "十", "百", "千", "万"];
|
||||
// num = parseInt(num);
|
||||
// let getWan = (temp) => {
|
||||
// let strArr = temp.toString().split("").reverse();
|
||||
// let newNum = "";
|
||||
// for (let i = 0; i < strArr.length; i++) {
|
||||
// newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum;
|
||||
// }
|
||||
// return newNum;
|
||||
// }
|
||||
// let overWan = Math.floor(num / 10000);
|
||||
// let noWan = num % 10000;
|
||||
// if (noWan.toString().length < 4) {
|
||||
// noWan = "0" + noWan;
|
||||
// }
|
||||
// return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
|
||||
// }
|
||||
|
||||
|
||||
</script>
|
||||
${layoutContent}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,208 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.chart-card {
|
||||
background-color: #FFFFFF;
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
title="提案分析"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList"
|
||||
@change="getData()"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
`
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
|
||||
提案类型
|
||||
</div>
|
||||
<div id="pieDiv"></div>
|
||||
</div>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10"
|
||||
style="display: flex;align-items: center;justify-content: space-between">
|
||||
<div>
|
||||
<span>【{{clickTypeName}}】分析</span>
|
||||
<span style="font-size: 10px;color: orange">点击饼图查看详细信息</span>
|
||||
</div>
|
||||
<van-button size="mini" plain type="info" @click="renderColumnData(null)">全部类型</van-button>
|
||||
</div>
|
||||
<div id="columnDiv"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
sessionId: ''
|
||||
},
|
||||
sessionList: [],
|
||||
clickTypeName: '全部类型',
|
||||
reqData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
this.mLoading = true
|
||||
const {data} = await $.get('/mobile/proposal/analysis/getData', this.pageForm)
|
||||
this.reqData = data
|
||||
const pieData = data.map(v => {
|
||||
const o = {}
|
||||
o.code = v.typeCode
|
||||
o.name = v.typeName
|
||||
o.value = v.totalCount
|
||||
return o
|
||||
})
|
||||
|
||||
this.renderPieData(pieData)
|
||||
this.renderColumnData(null)
|
||||
},
|
||||
renderPieData(data) {
|
||||
const myPie = echarts.init(document.getElementById('pieDiv'), null, {
|
||||
height: 580
|
||||
})
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
top: '5%',
|
||||
left: 'center'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '提案类型',
|
||||
type: 'pie',
|
||||
radius: ['35%', '55%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '20',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data
|
||||
}
|
||||
]
|
||||
}
|
||||
myPie.setOption(option)
|
||||
window.onresize = function () {
|
||||
myPie.resize();
|
||||
};
|
||||
|
||||
myPie.on('click', (params) => {
|
||||
this.renderColumnData(params.data)
|
||||
console.log(params)
|
||||
});
|
||||
},
|
||||
renderColumnData(params) {
|
||||
const data = []
|
||||
if (params == null) {
|
||||
this.clickTypeName = '全部类型'
|
||||
let laCount = 0, jyCount = 0, caCount = 0, myCount = 0, ybCount = 0, bmyCount = 0;
|
||||
data.push(this.reqData.reduce((laCount, item) => laCount + item.laCount, 0))
|
||||
data.push(this.reqData.reduce((jyCount, item) => jyCount + item.jyCount, 0))
|
||||
data.push(this.reqData.reduce((caCount, item) => caCount + item.caCount, 0))
|
||||
data.push(this.reqData.reduce((myCount, item) => myCount + item.myCount, 0))
|
||||
data.push(this.reqData.reduce((ybCount, item) => ybCount + item.ybCount, 0))
|
||||
data.push(this.reqData.reduce((bmyCount, item) => bmyCount + item.bmyCount, 0))
|
||||
console.log(data)
|
||||
} else {
|
||||
const {code, name} = params
|
||||
this.clickTypeName = name
|
||||
const clickTypeData = this.reqData.find(v => v.typeCode === code)
|
||||
data.push(clickTypeData.laCount)
|
||||
data.push(clickTypeData.jyCount)
|
||||
data.push(clickTypeData.caCount)
|
||||
data.push(clickTypeData.myCount)
|
||||
data.push(clickTypeData.ybCount)
|
||||
data.push(clickTypeData.bmyCount)
|
||||
}
|
||||
|
||||
const myColumn = echarts.init(document.getElementById('columnDiv'), null, {
|
||||
height: 350
|
||||
});
|
||||
let option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['立案数', '作为建议、意见', '不予立案', '评分满意', '评分一般', '评分不满意'],
|
||||
axisLabel: {//坐标轴刻度标签的相关设置。
|
||||
interval: 0,
|
||||
rotate: "45"
|
||||
}
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data,
|
||||
type: 'bar',
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: 'rgba(180, 180, 180, 0.2)'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
myColumn.setOption(option);
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionList[0].value
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,145 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-dropdown-menu__bar {
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
title="代表查询"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList"
|
||||
@change="sessionChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegateTypeId" :options="delegateTypeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 120px;">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset @click="viewInfo(o.dbid)">
|
||||
<van-cell title="姓名" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.username}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="代表团">{{o.dbtname}}</van-cell>
|
||||
<van-cell :border="false" title="代表身份">{{o.rolename}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
|
||||
<div :style="{color:themeColor}" style="text-align: right;position: fixed;bottom: 20px;right: 20px">
|
||||
<van-button :color="themeColor" hairline size="mini" type="primary">
|
||||
总:{{pageForm.totalCount}}人
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
sessionId: '',
|
||||
delegationId: '',
|
||||
delegateTypeId: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
delegateTypeList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async sessionChange() {
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList && this.delegationList.length > 0) {
|
||||
this.pageForm.delegationId = this.delegationList[0].value
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/proposal/delegate/pageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
viewInfo(id) {
|
||||
// window.open('/mobile/proposal/delegate/viewInfo?id='+id)
|
||||
window.location.href = '/mobile/proposal/delegate/viewInfo?id=' + id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.delegateTypeList = await mProposal.getDelegateType()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionList[0].value
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList && this.delegationList.length > 0) {
|
||||
this.pageForm.delegationId = this.delegationList[0].value
|
||||
}
|
||||
if (this.delegateTypeList && this.delegateTypeList.length > 0) {
|
||||
this.pageForm.delegateTypeId = this.delegateTypeList[0].value
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,82 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
title="代表详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基本信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="年龄">{{ viewData.birthday }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.mz }}</van-cell>
|
||||
<van-cell title="文化程度">{{ viewData.xl }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.zzmm }}</van-cell>
|
||||
<van-cell title="部门">{{ viewData.dwname }}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.zc }}</van-cell>
|
||||
<van-cell title="职务">{{ viewData.zw }}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
个人简历
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell>
|
||||
<template>
|
||||
<div v-if="viewData.grjl!=null" v-html="viewData.grjl"></div>
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewData:{}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getData(id) {
|
||||
const {data} = await $.get('/platform/jdh/Common/findDbxx', {id})
|
||||
console.log(data)
|
||||
this.viewData = data
|
||||
console.log(this.viewData)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id !== '') {
|
||||
this.getData(id)
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,236 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 12px 0 12px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="附议提案"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<!-- <van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>-->
|
||||
</van-dropdown-menu>
|
||||
|
||||
|
||||
<van-tabs v-model="pageForm.isAudit" @change="doSearch()">
|
||||
<van-tab title="未附议" :name="false"></van-tab>
|
||||
<van-tab title="已附议" :name="true"></van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div style="margin: 170px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading" :immediate-check="false"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
<div @click="openView(o.id,o.secondedId)">
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
|
||||
<span class="title_span" :style="'color:'+o.stateColor">|</span>提案名称:{{o.proposalName}}
|
||||
</div>
|
||||
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right" v-if="!o.isAgree">
|
||||
<van-tag :style="'color:'+o.stateColor" size="medium" plain round type="primary">附议
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
||||
<span style="color: grey">代 表 团:</span>{{o.delegationName}}
|
||||
</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
|
||||
</van-row>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title" style="margin-top: 11px">
|
||||
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
|
||||
<span style="color: grey;margin-left: 24%;">附 议 人:</span>{{o.secondedUserName}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- <van-cell-group inset>
|
||||
<van-cell title="提案名称" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.proposalName}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="提案编号">{{o.proposalCode}}</van-cell>
|
||||
<van-cell :border="false" title="附  议  人">{{o.secondedUserName}}</van-cell>
|
||||
<van-cell :border="false" title="提案类型">{{o.typeName}}</van-cell>
|
||||
<van-cell :border="false" title="提案状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>-->
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
auditList: [
|
||||
{text: '未附议', value: false},
|
||||
{text: '已附议', value: true},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/mobile/proposal/seconded/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length >= res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
doAudit(flag, row) {
|
||||
const {id, secondedId} = row
|
||||
let res = flag === true ? '通过' : '拒绝'
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定' + res + '吗?',
|
||||
}).then(() => {
|
||||
$.post('/platform/proposal/transact/seconded/doAudit', {
|
||||
secondedId: secondedId,
|
||||
proposalId: id,
|
||||
flag: flag
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('提交成功!')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
openView(id, secondedId) {
|
||||
window.location.href = '/platform/mobile/proposal/seconded/view?biz_key=' + secondedId + '&proposal_id=' + id + '&mobile=' + true
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.proposalTypeList = await mProposal.getProposalType()
|
||||
this.resultList = await mProposal.getProposalDict()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
}
|
||||
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.resultList && this.resultList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
this.onLoad()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,158 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="提案查询"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalStateCode" :options="stateList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 120px auto">
|
||||
<van-list
|
||||
v-model="mLoading" :immediate-check="false"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="提案名称" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span v-if="o.resultName=='不予立案'" style="font-size: 16px;color: red" class="van-ellipsis">{{o.proposalName}}</span>
|
||||
<span v-else-if="o.resultName=='意见建议'" style="color: #0000FF" style="font-size: 16px"
|
||||
class="van-ellipsis">{{o.proposalName}}</span>
|
||||
<span v-else-if="o.resultName=='确定立案'" style="color: green" style="font-size: 16px"
|
||||
class="van-ellipsis">{{o.proposalName}}</span>
|
||||
<span v-else style="color: #7f8481" style="font-size: 16px" class="van-ellipsis">{{o.proposalName}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="提案编号">{{o.proposalCode}}</van-cell>
|
||||
<van-cell :border="false" title="提  案  人">{{o.username}}</van-cell>
|
||||
<van-cell :border="false" title="提案类型">{{o.typeName}}</van-cell>
|
||||
<van-cell :border="false" title="代  表  团">{{o.delegationName}}</van-cell>
|
||||
<!-- <van-cell :border="false" title="立案结果">{{o.resultName ? o.resultName : '暂无'}}</van-cell>-->
|
||||
<van-cell :border="false" title="提案状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
stateList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
const res = await $.post('/platform/mobile/proposal/integrated/pageData', this.pageForm)
|
||||
this.mLoading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length >= res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
openView(id) {
|
||||
//window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
|
||||
window.location.href = '/platform/mobile/proposal/compose/view?biz_key=' + null + '&proposal_id=' + id + '&mobile=' + true
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.proposalTypeList = await mProposal.getProposalType()
|
||||
this.resultList = await mProposal.getProposalDict()
|
||||
this.stateList = await mProposal.getOpenProposalState()
|
||||
|
||||
|
||||
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.stateList && this.stateList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalStateCode", this.stateList[0].value)
|
||||
}
|
||||
if (this.resultList && this.resultList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
//this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.meetingId)
|
||||
if (this.delegationList && this.delegationList.length > 0) {
|
||||
this.pageForm.delegationId = this.delegationList[0].value
|
||||
}
|
||||
if (this.delegateTypeList && this.delegateTypeList.length > 0) {
|
||||
this.pageForm.delegateTypeId = this.delegateTypeList[0].value
|
||||
}
|
||||
}
|
||||
this.sessionList.unshift({text: '全部届次', value: ''});
|
||||
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,420 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
right: 50px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.register-sapn {
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
right: 38px;
|
||||
z-index: 1;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 12px 0 12px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="我的提案"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin-top: 120px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
|
||||
<span :style="'color:'+o.stateColor" class="title_span">|</span>提案名称:{{o.proposalName}}
|
||||
</div>
|
||||
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right">
|
||||
<van-tag :style="'color:'+o.stateColor" plain round size="medium" type="primary">{{
|
||||
o.stateName }}
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
||||
<span style="color: grey">代 表 团:</span>{{o.delegationName}}
|
||||
</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
|
||||
</van-row>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title" style="margin-top: 11px">
|
||||
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
|
||||
<van-button @click.stop="openFuyi(o)" color="#1867b0" size="small"
|
||||
style="position: absolute;right: 16px;top:78.9%"
|
||||
type="primary" v-if="o.stateCode < 200">邀请附议人
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
<van-popup :close-on-click-overlay="false" :lazy-render="false"
|
||||
:style="{ height: '80%'}"
|
||||
@click-close-icon="closeInvitePopup"
|
||||
closeable get-container="#app" position="bottom"
|
||||
round
|
||||
safe-area-inset-bottom v-model="fuyiShowPicker">
|
||||
|
||||
<van-search @search="onSearchSecondedUser"
|
||||
close-icon="close"
|
||||
placeholder="请输入姓名搜索"
|
||||
show-action
|
||||
style="width: 85%"
|
||||
v-model="searchSecondedUserKeyWord">
|
||||
<template #action>
|
||||
<div @click="onSearchSecondedUser">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
|
||||
<div style="padding:0px 20px;margin-top:20px;box-sizing: border-box;max-height: calc(100% - 150px);overflow-y: auto">
|
||||
<van-checkbox-group :checked-color="themeColor" style="font-size: 12px" v-model="helpDb">
|
||||
<van-cell-group>
|
||||
<van-index-bar :sticky="false" highlight-color="red" ref="indexBar">
|
||||
<template v-for="c,ci in dBData">
|
||||
<van-index-anchor :index="c.k" v-if="c.v && c.v.length>0 && c.isShow"></van-index-anchor>
|
||||
<template v-for="x,xi in c.v">
|
||||
<van-cell
|
||||
v-show="c.isShow && x.isShow"
|
||||
:id="'van-cell-'+x.id"
|
||||
:key="x.id"
|
||||
:title="x.username + '-' + x.dbtName"
|
||||
@click="fuyiToggle(x.id)"
|
||||
clickable
|
||||
>
|
||||
<template #right-icon>
|
||||
<van-checkbox :name="x" @click.stop="fuyiToggle(x.id)"
|
||||
ref="fuyiCheckboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</van-index-bar>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
|
||||
<van-row gutter="20" style="position:absolute;bottom: 20px;width: 100%">
|
||||
<van-col span="12" style="text-align: center">
|
||||
<van-button @click="cleanSelectedUser" color="red" style="width: 60%">清空</van-button>
|
||||
</van-col>
|
||||
<van-col span="12" style="text-align: center">
|
||||
<van-button :color="themeColor" @click="fuyiDwselclose" style="width: 60%">
|
||||
确定({{hasSelectedUser}})
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<!-- <div style="position: absolute;width: 80%;bottom: 20px;left: 50%;transform: translateX(-50%)">-->
|
||||
<!-- <van-button :color="themeColor" @click="cleanSelectedUser">清空</van-button>-->
|
||||
<!-- <van-button :color="themeColor" @click="fuyiDwselclose">确定</van-button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const py = new Pinyin()
|
||||
const pyArr = [...Array(26).keys()].map(i => String.fromCharCode(i + 65))
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
dBData: [],
|
||||
SecondedData: [],
|
||||
helpDb: [],
|
||||
formData: {
|
||||
helpDb: [],
|
||||
proposalId: ''
|
||||
},
|
||||
dbList: [],
|
||||
fuyiShowPicker: false,
|
||||
list: [],
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
searchSecondedUserKeyWord: '',
|
||||
hasSelectedUser: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeInvitePopup() {
|
||||
this.fuyiShowPicker = false
|
||||
this.cleanSelectedUser()
|
||||
},
|
||||
cleanSelectedUser() {
|
||||
this.$refs.fuyiCheckboxes.forEach(v => {
|
||||
if (v.checked) {
|
||||
v.toggle()
|
||||
}
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
const hasSelectedUser = this.$refs.fuyiCheckboxes.filter(v => v.checked).length
|
||||
|
||||
console.log(hasSelectedUser)
|
||||
this.hasSelectedUser = hasSelectedUser
|
||||
}, 100)
|
||||
|
||||
},
|
||||
|
||||
dbListTransToA2Z(list) {
|
||||
const py = new Pinyin()
|
||||
let arr = []
|
||||
pyArr.forEach(p => {
|
||||
const c = list.filter(x => {
|
||||
return py.getCamelChars(x.username).substr(0, 1) === p
|
||||
})
|
||||
arr.push({k: p, v: c})
|
||||
})
|
||||
return arr
|
||||
},
|
||||
|
||||
onSearchSecondedUser(val) {
|
||||
// if (!this.searchSecondedUserKeyWord) {
|
||||
// this.dBData = this.dbListTransToA2Z(this.dbList)
|
||||
// } else {
|
||||
// const filterUserList = this.dbList.filter(v => v.username.includes(this.searchSecondedUserKeyWord))
|
||||
// this.dBData = this.dbListTransToA2Z(filterUserList)
|
||||
// }
|
||||
|
||||
if (!this.searchSecondedUserKeyWord) {
|
||||
this.dBData.forEach(v => {
|
||||
v.isShow = true
|
||||
|
||||
})
|
||||
} else {
|
||||
const firstName = py.getCamelChars(this.searchSecondedUserKeyWord).substr(0, 1)
|
||||
this.dBData.forEach(x => {
|
||||
x.isShow = x.k === firstName
|
||||
if (x.isShow) {
|
||||
x.v.forEach(c => {
|
||||
c.isShow = c.username.includes(this.searchSecondedUserKeyWord)
|
||||
})
|
||||
x.v.sort()
|
||||
}
|
||||
})
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
|
||||
cellShow(username) {
|
||||
if (!this.searchSecondedUserKeyWord) {
|
||||
return true
|
||||
}
|
||||
const firstName = py.getCamelChars(username).substr(0, 1)
|
||||
|
||||
this.dBData.forEach(x => {
|
||||
x.isShow = x.k === firstName
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
fuyiToggle(id) {
|
||||
this.$refs.fuyiCheckboxes.some(v => {
|
||||
if (v.name.id === id) {
|
||||
v.toggle()
|
||||
return true
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
const hasSelectedUser = this.$refs.fuyiCheckboxes.filter(v => v.checked).length
|
||||
console.log(hasSelectedUser)
|
||||
this.hasSelectedUser = hasSelectedUser
|
||||
}, 100)
|
||||
|
||||
},
|
||||
async getSecondedList(proposalId, jdhid) {
|
||||
const {data} = await $.post("/platform/proposal/transact/compose/getSecondedList", {
|
||||
proposalId: proposalId,
|
||||
jdhid: jdhid
|
||||
})
|
||||
data.sort((a, b)=> a.username.localeCompare(b.username, 'zh'))
|
||||
this.dbList = data
|
||||
pyArr.forEach(p => {
|
||||
const c = this.dbList.filter(x => {
|
||||
x.isShow = true
|
||||
return py.getCamelChars(x.username).substr(0, 1) === p
|
||||
})
|
||||
this.dBData.push({k: p, v: c, isShow: true})
|
||||
})
|
||||
},
|
||||
fuyiDwselclose() {
|
||||
let aa = ''
|
||||
if (this.helpDb.length > 0) {
|
||||
this.formData.helpDb = this.helpDb.map(v => v.id)
|
||||
aa = this.helpDb.map(v => v.username).toString()
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '',
|
||||
message: this.helpDb.length > 0 ? ('您邀请了' + aa + ',' + this.helpDb.length + '位附议人您确定要邀请吗?确定后会有信息通知') : '您没有选择附议人请确认',
|
||||
}).then(async () => {
|
||||
const resp = await $.post("/platform/proposal/transact/compose/addSeconded", {
|
||||
proposalId: this.proposalId,
|
||||
users: JSON.stringify(this.formData.helpDb),
|
||||
})
|
||||
if (resp.code == 0) {
|
||||
this.$toast.success(resp.msg);
|
||||
this.doSearch()
|
||||
this.fuyiShowPicker = false
|
||||
}
|
||||
|
||||
}).catch(() => {
|
||||
this.fuyiShowPicker = false
|
||||
});
|
||||
|
||||
},
|
||||
openFuyi(row) {
|
||||
this.formData.helpDb = []
|
||||
this.helpDb = []
|
||||
this.dBData = []
|
||||
this.proposalId = row.id
|
||||
this.getSecondedList(row.id, row.teacherMeetingId)
|
||||
this.fuyiShowPicker = true
|
||||
this.searchSecondedUserKeyWord = ''
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/mobile/proposal/compose/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = '/platform/mobile/proposal/compose/view?biz_key=' + null + '&proposal_id=' + id + '&mobile=' + true
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.proposalTypeList = await mProposal.getProposalType()
|
||||
this.resultList = await mProposal.getProposalDict()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
}
|
||||
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.resultList && this.resultList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,221 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
.van-divider {
|
||||
margin: 12px 0 12px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
.van-col{
|
||||
line-height: 25px;
|
||||
}
|
||||
.title_span{
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="团长审议"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.meetingId" :options="sessionList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs v-model="pageForm.isAudit" @click="doSearch">
|
||||
<van-tab title="未审核" :name="false"></van-tab>
|
||||
<van-tab title="已审核" :name="true"></van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
|
||||
<div style="margin: 170px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openView(o.id)">
|
||||
<div @click="openView(o.id)">
|
||||
<div>
|
||||
<div class="van-ellipsis" style="font-size: 13px;font-weight: bold;flex: 1;width:80%;overflow: hidden;white-space: nowrap">
|
||||
<span class="title_span" :style="'color:'+o.stateColor">|</span>提案名称:{{o.proposalName}}
|
||||
</div>
|
||||
<div style="position: absolute; right: 14px;top: 12.3px;text-align: right">
|
||||
<van-tag :style="'color:'+o.stateColor" size="medium" plain round type="primary">{{ o.stateName }}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">提案编号:</span>{{o.proposalCode}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案类型:</span>{{o.typeName}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><span style="color: grey">代 表 团:</span>{{o.delegationName}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">提案届次:</span>{{o.meetingName}}</van-col>
|
||||
</van-row>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title" style="margin-top: 11px">
|
||||
<span style="color: grey">立案结果:</span>{{o.resultName ? o.resultName : '暂无'}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/proposal/transact/delegation/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openAudit(id) {
|
||||
this.formData = {
|
||||
proposalId: id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
opinion: '',
|
||||
sign: '',
|
||||
}
|
||||
this.state = '0'
|
||||
this.show = true
|
||||
},
|
||||
validateForm(action, done) {
|
||||
done(false)
|
||||
},
|
||||
async doHandle() {
|
||||
this.$refs['handleForm'].validate().then(valid => {
|
||||
$.post('/platform/proposal/transact/audit/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
flag: this.state === 0
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.show = false
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('审核成功!')
|
||||
} else {
|
||||
vant.Toast.error('审核失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
// window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
|
||||
window.location.href = '/platform/mobile/proposal/delegation/view?biz_key=' + id + '&proposal_id=' + id + '&mobile=' + true
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
this.proposalTypeList = await mProposal.getProposalType()
|
||||
this.resultList = await mProposal.getProposalDict()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "meetingId", this.sessionList[0].value)
|
||||
}
|
||||
if (this.proposalTypeList && this.proposalTypeList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.resultList && this.resultList.length > 0) {
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,337 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder
|
||||
title="撰写提案"></van-nav-bar>
|
||||
<van-form :show-error-message="false" input-align="right" ref="addForm">
|
||||
|
||||
|
||||
<van-cell-group class="mt10" inset>
|
||||
<van-field label="代表姓名" name="username" readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></van-field>
|
||||
|
||||
<van-field :value="formData.createTime" label="提案时间" name="createTime"
|
||||
readonly></van-field>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请填写提案名称'}]" label="提案名称" name="proposalName"
|
||||
placeholder="请填写提案名称"
|
||||
required v-model="formData.proposalName"></van-field>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请选择提案方式'}]" @click="showMannerCodePicker = true" clickable
|
||||
label="提案方式"
|
||||
name="mannerName"
|
||||
placeholder="点击选择提案方式"
|
||||
readonly required
|
||||
v-model="formData.mannerName"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showMannerCodePicker">
|
||||
<van-picker :columns="mannerList" @cancel="showMannerCodePicker = false" @confirm="onMannerCodeConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field :value="formData.teacherMeeting" label="所属教代会" name="teacherMeeting"
|
||||
readonly></van-field>
|
||||
|
||||
<van-field v-show="false" :rules="[{ required:true, message: '请选择所属代表团'}]" @click="${@shiro.hasRole('jdhdb01')} ? '' : showDelegationNamePicker = true"
|
||||
clickable label="所属代表团"
|
||||
name="delegationName"
|
||||
placeholder="点击选择所属代表团"
|
||||
readonly required
|
||||
v-if="formData.mannerCode!='W03'" v-model="formData.delegationName"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showDelegationNamePicker">
|
||||
<van-picker :columns="delegationOptions" @cancel="showDelegationNamePicker = false"
|
||||
@confirm="onDelegationNameConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请选择所属委员会'}]" @click="showCommitteeNamePicker = true"
|
||||
clickable label="所属委员会"
|
||||
name="committeeName"
|
||||
placeholder="点击选择所属委员会"
|
||||
readonly required
|
||||
v-if="formData.mannerCode=='W03'" v-model="formData.committeeName"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showCommitteeNamePicker">
|
||||
<van-picker :columns="committeeOptions" @cancel="showCommitteeNamePicker = false"
|
||||
@confirm="onCommitteeNameConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-show="false" @click="showTypeNamePicker = true" clickable
|
||||
label="提案类型"
|
||||
name="typeName"
|
||||
placeholder="点击选择提案类型"
|
||||
readonly
|
||||
v-model="formData.typeName"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showTypeNamePicker">
|
||||
<van-picker :columns="typeOptions" @cancel="showTypeNamePicker = false" @confirm="onTypeNameConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
:rules="[{ required:true, message: '请输入案由'}]"
|
||||
autosize
|
||||
clearable
|
||||
label="案  由"
|
||||
maxlength="1000"
|
||||
placeholder="请输入案由"
|
||||
required
|
||||
rows="5"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="formData.brief"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
:rules="[{ required:true, message: '请输入建议措施'}]"
|
||||
autosize
|
||||
clearable
|
||||
label="建议措施"
|
||||
maxlength="1000"
|
||||
placeholder="请输入建议措施"
|
||||
required
|
||||
rows="5"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="formData.measures"
|
||||
></van-field>
|
||||
|
||||
<!-- <van-field name="files" label="附  件" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>-->
|
||||
<van-cell title="签  字" v-if="isSign()">
|
||||
<template #label>
|
||||
<mobile-sign class="mt20" ref="signature" h="0.25" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<div style="display: flex;justify-content: space-around;padding: 20px 0 20px 0;">
|
||||
<van-button :color="themeColor" @click="doAdd" style="flex: 1;margin: 0 10px 0 10px">保存提案
|
||||
</van-button>
|
||||
<van-button :color="themeColor" @click="doSubmit" style="flex: 1;margin: 0 10px 0 10px"
|
||||
v-if="formData.mannerCode!='W01'">提交
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
showMannerCodePicker: false,
|
||||
showDelegationNamePicker: false,
|
||||
showCommitteeNamePicker: false,
|
||||
showTypeNamePicker: false,
|
||||
config: {},
|
||||
allMannerList: [],
|
||||
mannerList: [],
|
||||
meetingOptions: [],
|
||||
typeOptions: [],
|
||||
delegationOptions: [],
|
||||
committeeOptions: [],
|
||||
formData: {
|
||||
username: '${@shiro.getPrincipalProperty("username")}',
|
||||
createTime: moment().format('YYYY-MM-DD'),
|
||||
delegationId: '',
|
||||
sign: '',
|
||||
id: '',
|
||||
mannerCode: 'W01'
|
||||
},
|
||||
isSign: () => {
|
||||
return proposal.needSignState.map(v => v.stateCode).includes(proposal.UNSUBMIT)
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue'),
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.signature) {
|
||||
this.$refs.signature.getMySign()
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async doAdd() {
|
||||
let method = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
if (this.formData.sign !== "") {
|
||||
this.$refs.signature.submitSign()
|
||||
}
|
||||
|
||||
let data = clone(this.formData)
|
||||
if (data.files) {
|
||||
data.files = JSON.stringify(data.files)
|
||||
}
|
||||
|
||||
$.post('/platform/proposal/transact/compose' + method, {
|
||||
data: JSON.stringify(data),
|
||||
sign: data.sign
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$toast.success('成功');
|
||||
window.location.href = "/platform/mobile/proposal/compose"
|
||||
} else {
|
||||
this.$toast.fail('失败');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
const confirm = await this.$confirm('确定要提交此提案吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'info',
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
this.$refs.signature.submitSign()
|
||||
/* this.$refs.signature.submitSign()
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}
|
||||
await this.$refs.signature.updateSign()*/
|
||||
this.$refs.signature.submitSign()
|
||||
let data = clone(this.formData)
|
||||
if (data.files) {
|
||||
data.files = JSON.stringify(data.files)
|
||||
}
|
||||
const resp = await $.post("/platform/proposal/transact/writeproposal/doSubmit", {
|
||||
data: JSON.stringify(data),
|
||||
sign: data.sign
|
||||
})
|
||||
requestLaterFun(resp, () => {
|
||||
this.$notify.success({title: '成功', message: resp.msg})
|
||||
window.location.href = "/platform/mobile/proposal/compose"
|
||||
}, () => {
|
||||
this.$notify.warning({title: '警告', message: resp.msg})
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onTypeNameConfirm(val) {
|
||||
this.$set(this.formData, "typeName", val.text)
|
||||
this.$set(this.formData, "typeId", val.value)
|
||||
this.showTypeNamePicker = false;
|
||||
},
|
||||
onCommitteeNameConfirm(val) {
|
||||
this.$set(this.formData, "committeeName", val.text)
|
||||
this.$set(this.formData, "committeeId", val.value)
|
||||
this.showCommitteeNamePicker = false;
|
||||
},
|
||||
onDelegationNameConfirm(val) {
|
||||
this.$set(this.formData, "delegationName", val.text)
|
||||
this.$set(this.formData, "delegationId", val.value)
|
||||
this.showDelegationNamePicker = false;
|
||||
},
|
||||
onMannerCodeConfirm(val) {
|
||||
this.$set(this.formData, "mannerName", val.text)
|
||||
this.$set(this.formData, "mannerCode", val.value)
|
||||
this.showMannerCodePicker = false;
|
||||
},
|
||||
async getDictByCode() {
|
||||
const {data} = await $.get("/platform/proposal/basics/config/getDictByCode", {code: "proposal_manner"})
|
||||
return data
|
||||
},
|
||||
async initData() {
|
||||
this.allMannerList = await this.getDictByCode("proposal_manner");
|
||||
this.config = await proposal.getProposalConfig()
|
||||
this.meetingOptions = await proposal.getOpenMeeting()
|
||||
const typeOptions = await proposal.getProposalType()
|
||||
this.$set(this.formData, "teacherMeetingId", this.meetingOptions ? this.meetingOptions[0].id : null)
|
||||
this.$set(this.formData, "teacherMeeting", this.meetingOptions ? this.meetingOptions[0].jdhallname : null)
|
||||
const delegationOptions = await proposal.getDelegation(this.formData.teacherMeetingId)
|
||||
|
||||
|
||||
delegationOptions.forEach(v => {
|
||||
this.delegationOptions.push({value: v.id, text: v.dbtname})
|
||||
})
|
||||
typeOptions.forEach(v => {
|
||||
this.typeOptions.push({value: v.id, text: v.typeName})
|
||||
})
|
||||
|
||||
this.$set(this.formData, "delegationId", this.delegationOptions ? this.delegationOptions[0].value : '')
|
||||
this.$set(this.formData, "delegationName", this.delegationOptions ? this.delegationOptions[0].text : '')
|
||||
|
||||
|
||||
const jgcy = await $.post("/platform/proposal/transact/writeproposal/getJdhJgcy", {jdhid: this.formData.teacherMeetingId})
|
||||
const cbdwFzr = await $.post("/platform/proposal/transact/writeproposal/getCbdwFzr")
|
||||
if (jgcy.data > 0) {
|
||||
const jgName = await $.post("/platform/proposal/transact/writeproposal/getJgNameByuser")
|
||||
jgName.data.forEach(v => {
|
||||
this.committeeOptions.push({value: v.id, text: v.name})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if (this.allMannerList.length > 0) {
|
||||
this.config.manner.forEach(v => {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W01") {
|
||||
const data = this.allMannerList.find(z => z.code == v)
|
||||
this.mannerList.push({value: data.code, text: data.name})
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')||(@shiro.hasRole('jdhdb01')&&@shiro.hasRole('jdhdbt01'))}" === 'true' && v === "W02") {
|
||||
const data = this.allMannerList.find(z => z.code == v)
|
||||
this.mannerList.push({value: data.code, text: data.name})
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W03" && jgcy.data > 0) {
|
||||
const data = this.allMannerList.find(z => z.code == v)
|
||||
this.mannerList.push({value: data.code, text: data.name})
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('jdhdb01')}" === 'true' && v === "W04" && cbdwFzr.data > 0) {
|
||||
const data = this.allMannerList.find(z => z.code == v)
|
||||
this.mannerList.push({value: data.code, text: data.name})
|
||||
}
|
||||
})
|
||||
this.$set(this.formData, "mannerId", this.mannerList ? this.mannerList[0].value : '')
|
||||
this.$set(this.formData, "mannerName", this.mannerList ? this.mannerList[0].text : '')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 34%;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
font-size: 18px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.label {
|
||||
border-left: 5px #1867b0 solid;
|
||||
border-radius: 4px;
|
||||
padding-left: 6px;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.van-tab__pane, .van-tab__pane-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.label_text {
|
||||
color: grey;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.yy-wrap .van-button {
|
||||
height: 32px;
|
||||
border-radius: 6px;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.time_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.time_info:nth-of-type(1) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="心理咨询预约"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<div class="info">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="80" height="80"
|
||||
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+doctorData.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
{{doctorData.username}}
|
||||
</div>
|
||||
<div>
|
||||
{{doctorData.jobTitle}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="active" :style="'height: ' + (window.screen.height - 46 - 40 - 84 - 24 - 44) + 'px'">
|
||||
<van-tab title="预约时段">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="timeData.length > 0 ? '没有更多了' : ''"
|
||||
@load="getDataByDoctorId">
|
||||
<div v-if="timeData.length > 0" class="time_info" v-for="item in timeData">
|
||||
<div style="color: #1867b0">{{getFormatTime(item)}}</div>
|
||||
<div class="yy-wrap">
|
||||
<van-button @click="apply(item)" :color="item.className">{{item.title}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading === false && timeData.length === 0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="抱歉,此咨询师暂时没有进行排班哦">
|
||||
</van-empty>
|
||||
</van-tab>
|
||||
<van-tab title="咨询师简介">
|
||||
<div class="label">咨询师擅长</div>
|
||||
<div class="label_text">{{doctorData.specialty ? doctorData.specialty : '暂无数据,该资料待补充'}}</div>
|
||||
<div class="label" style="margin-top: 20px">咨询师简介</div>
|
||||
<div class="label_text">{{doctorData.introduce ? doctorData.introduce : '暂无数据,该资料待补充'}}</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<van-nav-bar
|
||||
title="预约信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="show = false">
|
||||
</van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
:value="chooseData.startTime"
|
||||
label="开始时间"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.endTime"
|
||||
label="结束时间"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
|
||||
<van-field readonly
|
||||
:value="chooseData.username"
|
||||
label="咨询师姓名"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.mobile"
|
||||
label="咨询师电话"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
label="预约人姓名"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"
|
||||
label="预约人工号"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
label="预约人单位"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('mobile')}"
|
||||
label="预约人电话"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field
|
||||
v-model="appointmentUserNote"
|
||||
rows="3"
|
||||
autosize
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
placeholder="您可以输入预约备注"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
<div class="footer">
|
||||
<van-button @click="doSubmit()" color="#1867b0">提交预约</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
doctorId: '',
|
||||
doctorData: {},
|
||||
active: 0,
|
||||
timeData: [],
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
chooseData: {},
|
||||
appointmentUserNote: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
id: this.chooseData.id
|
||||
}
|
||||
const resp = await $.post('/mobile/psychologyPro/doApply', params)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('申请成功')
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/psychologyPro/myApplyList')
|
||||
}, 1000)
|
||||
} else if (resp.code === 1) {
|
||||
this.$toast.error(resp.msg)
|
||||
} else if (resp.code === 2) {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
apply(o) {
|
||||
if (o.title !== '可预约') {
|
||||
return
|
||||
}
|
||||
this.chooseData = o
|
||||
this.show = true
|
||||
},
|
||||
getFormatTime(o) {
|
||||
const simpleStartDate = moment(o.startTime).format('YYYY-MM-DD')
|
||||
const simpleStartHour = moment(o.startTime).format('HH:mm')
|
||||
const simpleEndHour = moment(o.endTime).format('HH:mm')
|
||||
const dayNameOfWeek = this.dayNames[new Date(simpleStartDate).getDay()]
|
||||
return simpleStartDate + ' ' + dayNameOfWeek + ' ' + simpleStartHour + '至' + simpleEndHour
|
||||
},
|
||||
async pageData() {
|
||||
this.pageForm.doctorId = this.doctorId
|
||||
const resp = await $.post('/mobile/psychologyPro/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (this.doctorId !== '') {
|
||||
this.doctorData = resp.data[0]
|
||||
} else {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async getDataByDoctorId() {
|
||||
this.mLoading = true
|
||||
this.pageForm.id = this.doctorId
|
||||
const resp = await $.post('/mobile/psychologyPro/getDataByDoctorId', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}";
|
||||
resp.data.list.forEach(v => {
|
||||
if (new Date().getTime() > v.startTimeTs) {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
} else {
|
||||
if (!v.appointmentUser) {
|
||||
v.className = '#1867b0'
|
||||
v.title = '可预约'
|
||||
} else if (v.appointmentUser === userId) {
|
||||
v.className = 'gray'
|
||||
v.title = '我已预约'
|
||||
} else {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
}
|
||||
}
|
||||
})
|
||||
this.timeData = this.timeData.concat(resp.data.list)
|
||||
if (this.timeData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.doctorId = getQueryVariable('doctorId')
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 38%;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
width: 74%;
|
||||
line-height: 22px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.desc {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="心理咨询师列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<!--咨询师列表-->
|
||||
<div class="info" @click="toApply(item)" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="100" height="100"
|
||||
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
<span style="font-size: 20px">{{item.username}} </span>
|
||||
<span style="color: grey">{{item.sex}} </span> 
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<span style="color: grey">职称:</span>{{item.jobTitle}}
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">单位:</span>{{item.unitName}}
|
||||
</div>
|
||||
<div class="desc">
|
||||
<span style="color: grey">特长:</span>{{item.specialty}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const resp = await $.post('/mobile/psychologyPro/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
},
|
||||
toApply(o) {
|
||||
location.href = '/mobile/psychologyPro/apply?doctorId=' + o.userid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,251 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
background: #FFFFFF;
|
||||
width: 92%;
|
||||
margin: 0px auto 20px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.card-head {
|
||||
line-height: 30px;
|
||||
padding: 8px 16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
.cancel-button {
|
||||
text-align: right;
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.cancel-button .van-button {
|
||||
height: 27px !important;
|
||||
padding: 0 18px !important;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="我的预约记录"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.stateId" :options="stateList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="viewInfo(o)">
|
||||
<div class="card-head">
|
||||
心理咨询预约
|
||||
<span class="state-text">
|
||||
<van-tag size="medium" v-if="o.stateId===2300" type="success">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2200" type="error">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2100" type="warning">{{o.stateName}}</van-tag>
|
||||
</span>
|
||||
</div>
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="预约人">{{o.appointmentUserName}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.startTime}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.endTime}}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="cancel-button">
|
||||
<van-button v-if="moment().unix() < moment(o.startTime).unix()" @click.stop="doCancel(o.id)" round
|
||||
size="small" color="#1867b0">取消预约
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<van-nav-bar
|
||||
title="预约详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="show = false"
|
||||
safe-area-inset-top></van-nav-bar>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
预约时间段
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ viewData.endTime }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
预约人信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.appointmentLoginName }}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.appointmentUnitName }}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.appointmentMobile }}</van-cell>
|
||||
<van-cell title="预约备注">{{ viewData.appointmentUserNote }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
咨询师信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.doctorUnitName || '暂无'}}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.doctorJobTitle || '暂无'}}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.doctorMobile || '暂无'}}</van-cell>
|
||||
<van-cell title="个人简介">{{ viewData.doctorIntroduce || '暂无'}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
stateList: [
|
||||
{text: '全部预约状态', value: null},
|
||||
{text: '预约中', value: 2100},
|
||||
{text: '预约成功', value: 2300},
|
||||
{text: '预约失败', value: 2200}
|
||||
],
|
||||
show: false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/psychologyPro/MyPageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
viewInfo(o) {
|
||||
this.viewData = o
|
||||
this.show = true
|
||||
},
|
||||
async doCancel(id) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定取消此次预约吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/psychologyPro/doCancel', {id})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('取消成功')
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = this.yearList[0].value
|
||||
this.pageForm.stateId = null
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,738 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'Indie Flower';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(/assets/platform/fonts/m8JVjfNVeKWVnh3QMuKkFcZVaUuH.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
.page-survey {
|
||||
background-color: rgba(242, 242, 242, 1);
|
||||
}
|
||||
|
||||
.page-survey .survey-container {
|
||||
height: 100%;
|
||||
overflow: visible;
|
||||
padding-top: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.survey-container .question-list {
|
||||
flex: auto;
|
||||
padding-bottom: 84px;
|
||||
}
|
||||
|
||||
.question {
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.question-head {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.question-tags {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.question-title {
|
||||
position: relative;
|
||||
font-size: 1.125em;
|
||||
font-weight: normal;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.question-seq {
|
||||
display: block;
|
||||
margin-right: 8px;
|
||||
font-size: 18px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.question-title .text {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.question-body {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.question-footer {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.van-checkbox {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
.page-control {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
column-gap: 20px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.survey-head-top {
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.survey-head-top .randomCount {
|
||||
font-family: 'Arial', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
line-height: 1.5;
|
||||
color: #000000;
|
||||
background-color: #f0f0f0;
|
||||
border: 1px solid #000000;
|
||||
border-radius: 5px;
|
||||
padding: 5px 20px;
|
||||
}
|
||||
|
||||
.survey-head-top .score {
|
||||
/*font-family: 'Comic Sans MS', cursive;*/
|
||||
/*font-family: 'Indie Flower', cursive;*/
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
||||
.survey-head {
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.survey-head .title {
|
||||
font-size: 22px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.survey-head .desc {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="root">
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="知识竞答" left-arrow placeholder fixed
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
<template v-if="!mLoading">
|
||||
<div class="page-survey" style="touch-action: manipulation;min-height: 100vh;">
|
||||
<div class="survey-container">
|
||||
<!-- v-if="questionData.qlx==2 && (questionData.ctMode==1 || questionData.ctMode==2)"-->
|
||||
<div class="survey-head-top" v-if="finishAnswer && ( currentScore || currentScore===0 )">
|
||||
<!-- <template>-->
|
||||
<!-- <div v-if="questionData.qlx==2 && questionData.ctMode==2 && isSameDay && randomCount > 0"-->
|
||||
<!-- class="randomCount"-->
|
||||
<!-- @click="openRandomCount">-->
|
||||
<!-- 第<span>{{randomCount}}</span>轮-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-if="questionData.qlx==2 && (questionData.ctMode==1 || (questionData.ctMode==2 && !isSameDay))"-->
|
||||
<!-- class="randomCount"-->
|
||||
<!-- @click="openRandomCount">-->
|
||||
<!-- <!–定时定题 可切换时间查看以前的题目–>-->
|
||||
<!-- <span>{{currentDate}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<div class="score" v-if="finishAnswer && ( currentScore || currentScore===0 )">
|
||||
最新得分{{currentScore}}
|
||||
<!-- {{questionData.calcScoreMode==1?'最高成绩':'得分'}}{{currentScore}}-->
|
||||
</div>
|
||||
<div class="" style="margin-left: 5px;color: #1989fa" @click="viewHistoryScore">
|
||||
查看历史得分
|
||||
</div>
|
||||
<!-- <div class="timer" v-if="questionData.enableTimer && !finishAnswer">-->
|
||||
<!-- <span>剩余时间:{{remainder}}</span>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="survey-head">
|
||||
<div class="title">
|
||||
{{questionData.qtitle}}
|
||||
</div>
|
||||
<!-- <div class="desc">-->
|
||||
<!-- {{titleMsg}}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="question-list">
|
||||
<section v-for="(issue,issueIdx) in issueList" :key="issue.iid" class="question"
|
||||
:id="'issue'+issue.iid">
|
||||
<div class="question-head">
|
||||
<div class="question-tags">
|
||||
<template v-if="issue.itx===1">
|
||||
<van-tag :type="issue.iisdx?'primary':'warning'" size="large">
|
||||
{{issue.iisdx?'单选':'多选'}}
|
||||
</van-tag>
|
||||
</template>
|
||||
<van-tag v-if="issue.fraction" type="primary" size="large">{{issue.fraction}}分
|
||||
</van-tag>
|
||||
</div>
|
||||
<h2 class="question-title">
|
||||
<span class="question-seq">
|
||||
<b>
|
||||
{{issueIdx+1}}.
|
||||
</b>
|
||||
</span>
|
||||
<div class="text" v-html="issue.iname"></div>
|
||||
</h2>
|
||||
|
||||
</div>
|
||||
<div class="question-body">
|
||||
<van-checkbox-group v-model="issue.userSelect" :ref="'checkboxGroup'+issue.iid">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
v-for="(item,index) in issue.wors"
|
||||
clickable
|
||||
:key="item"
|
||||
:title="item.wtxt"
|
||||
@click="cellToggle(issue,item.wid)"
|
||||
>
|
||||
<template #label v-if="finishAnswer || finishAllAnswer">
|
||||
<div>
|
||||
{{item.correct?'正确答案':''}}
|
||||
</div>
|
||||
</template>
|
||||
<template #icon>
|
||||
<van-checkbox :name="item.wid" :ref="'checkboxes'+item.wid"
|
||||
:disabled="finishAnswer || finishAllAnswer"
|
||||
:shape="issue.iisdx?'round':'square'"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
|
||||
</div>
|
||||
<div class="question-footer" v-if="finishAnswer || finishAllAnswer">
|
||||
<div>
|
||||
<div style="display: flex;align-items: center;"
|
||||
:style="{color:(issue.isEqual?'#15db81':'red')}">
|
||||
{{issue.isEqual?'回答正确':'回答错误'}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="page-control" v-if="!finishAnswer">
|
||||
<!--非计时模式才能保存 否则没意义了-->
|
||||
<van-button type="info" block @click="save()" v-if="!questionData.enableTimer">保存</van-button>
|
||||
<van-button type="info" block @click="submit()">提交</van-button>
|
||||
</div>
|
||||
<div class="page-control" style="grid-template-columns: auto"
|
||||
v-if="canAnswerAgain && finishAnswer && moment().format('YYYY-MM-DD') === currentDate">
|
||||
<van-button type="info" block @click="answerAgain">
|
||||
再答一次
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<van-action-sheet
|
||||
v-model="randomCountSheetShow"
|
||||
:actions="randomActions"
|
||||
@select="randomCountSelect"
|
||||
cancel-text="取消"
|
||||
close-on-click-action
|
||||
></van-action-sheet>
|
||||
|
||||
<van-action-sheet v-model="historyScorePopup" title="历史得分记录">
|
||||
<van-cell-group style="min-height: 500px">
|
||||
<van-cell v-for="item in historyScores">
|
||||
<div slot="title">第{{item.answerNum}}次</div>
|
||||
<div style="font-weight: bold;color: #000000">{{item.score}}分</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const BASE_URL = '/mobile/question/h5'
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
questionData: {
|
||||
issues: []
|
||||
},
|
||||
currentIssueIndex: 0,
|
||||
replyInfo: [],
|
||||
finishAnswer: false,
|
||||
finishAllAnswer: false,
|
||||
mLoading: true,
|
||||
|
||||
//用户已答题总轮数
|
||||
randomCount: null,
|
||||
currentRandomCountScore: 0,
|
||||
sumScore: 0,
|
||||
randomCountSheetShow: false,
|
||||
randomActions: [],
|
||||
currentRandomCount: null,
|
||||
|
||||
//能否再次答题
|
||||
canAnswerAgain: false,
|
||||
|
||||
//当前的时间(针对定时定题)
|
||||
currentDate: moment().format('YYYY-MM-DD'),
|
||||
|
||||
//当前分数
|
||||
currentScore: null,
|
||||
|
||||
//获取用户已回答的轮数 针对单天随机
|
||||
userHasAnswerRandomNum: 0,
|
||||
|
||||
//倒计时计时器
|
||||
timerInterval: null,
|
||||
//答题时间(使用秒)
|
||||
countDownSeconds: 0,
|
||||
//剩余时间
|
||||
remainder: null,
|
||||
|
||||
//历史分数
|
||||
historyScores:[],
|
||||
historyScorePopup:false
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
issueList() {
|
||||
return this.questionData.issues
|
||||
},
|
||||
titleMsg() {
|
||||
const radios = this.issueList.filter(v => v.itx === 1 && v.iisdx)
|
||||
const checkBoxes = this.issueList.filter(v => v.itx === 1 && !v.iisdx)
|
||||
|
||||
const radioScore = radios && radios.length > 0 ? radios[0].fraction : 0
|
||||
const checkBoxesScore = checkBoxes && checkBoxes.length > 0 ? checkBoxes[0].fraction : 0
|
||||
|
||||
const radioScoreSum = radios.map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b, 0)
|
||||
const checkBoxesScoreSum = checkBoxes.map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b, 0)
|
||||
|
||||
const sumScore = radioScoreSum + checkBoxesScoreSum
|
||||
|
||||
let radiosText = ''
|
||||
let checkBoxesText = ''
|
||||
|
||||
if (radios && radios.length > 0) {
|
||||
radiosText = "单选题" + radios.length + "题,每题" + radioScore + "分,合计" + radioScoreSum + "分;"
|
||||
}
|
||||
if (checkBoxes && checkBoxes.length > 0) {
|
||||
checkBoxesText = "多选题" + checkBoxes.length + "题,每题" + checkBoxesScore + "分,合计" + checkBoxesScoreSum + "分;总分" + sumScore + "分。"
|
||||
}
|
||||
return "说明:" + radiosText + checkBoxesText
|
||||
},
|
||||
|
||||
fullScore() {
|
||||
return this.issueList.map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b)
|
||||
},
|
||||
radioNum() {
|
||||
return this.issueList.filter(v => v.idx === 1 && v.iisdx).map(v => v.fraction ? v.fraction : 0).reduce((a, b) => a + b)
|
||||
},
|
||||
checkBoxNum() {
|
||||
|
||||
},
|
||||
|
||||
//判断是否为同一天
|
||||
isSameDay() {
|
||||
if (this.questionData.startTime && this.questionData.endTime) {
|
||||
return moment(this.questionData.startTime).isSame(moment(this.questionData.endTime), 'day')
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
viewHistoryScore(){
|
||||
$.get(BASE_URL+"/historyScore",{questionId:this.id}).then(res=>{
|
||||
if(res.code===0){
|
||||
this.historyScores = res.data
|
||||
this.historyScorePopup = true
|
||||
}
|
||||
})
|
||||
},
|
||||
openRandomCount() {
|
||||
this.randomCountSheetShow = true
|
||||
this.randomActions = []
|
||||
|
||||
if (this.questionData.qlx == 2 && this.questionData.ctMode == 2 && this.isSameDay) {
|
||||
for (let i = 0; i < this.userHasAnswerRandomNum; i++) {
|
||||
this.randomActions.push({
|
||||
name: '第' + (i + 1) + '轮',
|
||||
val: i + 1
|
||||
})
|
||||
}
|
||||
} else if (this.questionData.qlx == 2 && (this.questionData.ctMode == 1 || (this.questionData.ctMode == 2 && !this.isSameDay))) {
|
||||
const {startTime, endTime} = this.questionData
|
||||
const startMoment = moment(startTime)
|
||||
const endMoment = moment(endTime)
|
||||
const now = moment()
|
||||
// 计算两个日期之间相差的天数
|
||||
const daysDifference = endMoment.diff(startMoment, 'days')
|
||||
for (let i = 0; i <= daysDifference; i++) {
|
||||
this.randomActions.push({
|
||||
name: startMoment.clone().add(i, 'days').format('YYYY-MM-DD'),
|
||||
val: startMoment.clone().add(i, 'days').format('YYYY-MM-DD'),
|
||||
disabled: moment(startMoment.clone().add(i, 'days').format('YYYY-MM-DD')).isAfter(now)
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async randomCountSelect(val) {
|
||||
if (this.questionData.qlx == 2 && this.questionData.ctMode == 2 && this.isSameDay) {
|
||||
this.randomCount = val.val
|
||||
} else if (this.questionData.qlx == 2 && this.questionData.ctMode == 2 && !this.isSameDay) {
|
||||
this.currentDate = val.val
|
||||
} else if (this.questionData.qlx == 2 && this.questionData.ctMode == 1) {
|
||||
this.currentDate = val.val
|
||||
}
|
||||
await this.getQuestionData()
|
||||
await this.checkUserFinishAnswer()
|
||||
await this.checkCanAnswerAgain()
|
||||
await this.getScore()
|
||||
},
|
||||
|
||||
async getQuestionData() {
|
||||
const resp = await $.get(BASE_URL + '/questionInfo/' + this.id, {
|
||||
currentDate: this.currentDate,
|
||||
randomCount: this.randomCount
|
||||
})
|
||||
this.questionData = resp.data
|
||||
},
|
||||
cellToggle(issue, worId) {
|
||||
if (this.finishAnswer || this.finishAllAnswer) {
|
||||
return
|
||||
}
|
||||
this.toggle(issue, worId)
|
||||
},
|
||||
|
||||
toggle(issue, worId) {
|
||||
//单选
|
||||
if (issue.iisdx) {
|
||||
vue.$refs['checkboxGroup' + issue.iid][0].toggleAll(false)
|
||||
} else {
|
||||
|
||||
}
|
||||
console.log(issue.userSelect)
|
||||
this.$refs['checkboxes' + worId][0].toggle()
|
||||
setTimeout(() => {
|
||||
console.log(issue.userSelect)
|
||||
})
|
||||
},
|
||||
|
||||
save() {
|
||||
this.$modal.confirm('保存后下次可继续做答,您确定要保存吗?').then(async () => {
|
||||
const replies = this.questionData.issues.map(v => {
|
||||
return {
|
||||
qid: v.iid,
|
||||
issueId: v.iid,
|
||||
userSelect: v.userSelect,
|
||||
}
|
||||
})
|
||||
|
||||
const {code} = await $.post(BASE_URL + '/saveAnswer', {
|
||||
replies: JSON.stringify(replies),
|
||||
questionId: this.questionData.qid,
|
||||
isSave: true,
|
||||
randomCount: this.randomCount
|
||||
})
|
||||
this.$modal.closeLoading()
|
||||
if (code === 0) {
|
||||
this.$modal.msg('保存成功')
|
||||
} else {
|
||||
this.$modal.msg('保存失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
const iids = this.questionData.issues.filter(v => !v.userSelect).map(v => v.iid)
|
||||
|
||||
if (iids.length > 0) {
|
||||
this.$toast('您还有' + iids.length + '题未作答,请答完后再提交!')
|
||||
document.getElementById('issue' + iids[0]).scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'center',
|
||||
'inline': 'start'
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
const msg = '一旦提交不可修改,您确定要提交吗?'
|
||||
|
||||
this.$modal.confirm(msg).then(async () => {
|
||||
this.autoSubmit()
|
||||
// const replies = this.questionData.issues.map(v => {
|
||||
// return {
|
||||
// qid: this.id,
|
||||
// issueId: v.iid,
|
||||
// userSelect: v.userSelect,
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// const {code} = await $.post(BASE_URL + '/saveAnswer', {
|
||||
// replies: JSON.stringify(replies),
|
||||
// questionId: this.questionData.qid,
|
||||
// isSave: false,
|
||||
// randomCount: this.randomCount
|
||||
// })
|
||||
// this.$modal.closeLoading()
|
||||
// if (code === 0) {
|
||||
// this.$modal.msg('提交成功')
|
||||
// await this.getUserHasAnswerRandomNum()
|
||||
// await this.checkUserFinishAnswer()
|
||||
// await this.getReply()
|
||||
// await this.assignmentAnswer()
|
||||
// await this.checkUserFinishAnswer()
|
||||
// await this.checkCanAnswerAgain()
|
||||
// await this.getScore()
|
||||
// }
|
||||
})
|
||||
},
|
||||
|
||||
async autoSubmit() {
|
||||
const replies = this.questionData.issues.map(v => {
|
||||
return {
|
||||
qid: this.id,
|
||||
issueId: v.iid,
|
||||
userSelect: v.userSelect,
|
||||
}
|
||||
})
|
||||
|
||||
let takeTime = null
|
||||
if (this.questionData.enableTimer) {
|
||||
takeTime = this.questionData.timerMinute * 60 - this.countDownSeconds
|
||||
}
|
||||
|
||||
const {code} = await $.post(BASE_URL + '/saveAnswer', {
|
||||
replies: JSON.stringify(replies),
|
||||
questionId: this.questionData.qid,
|
||||
isSave: false,
|
||||
randomCount: this.randomCount,
|
||||
takeTime: takeTime
|
||||
})
|
||||
this.$modal.closeLoading()
|
||||
if (code === 0) {
|
||||
this.$modal.msg('提交成功')
|
||||
await this.getUserHasAnswerRandomNum()
|
||||
await this.checkUserFinishAnswer()
|
||||
await this.getReply()
|
||||
await this.assignmentAnswer()
|
||||
await this.checkUserFinishAnswer()
|
||||
await this.checkCanAnswerAgain()
|
||||
await this.getScore()
|
||||
}
|
||||
},
|
||||
|
||||
//获取回答信息
|
||||
async getReply() {
|
||||
const resp = await $.get(BASE_URL + '/answerInfo/' + this.id, {
|
||||
randomCount: this.randomCount,
|
||||
currentDate: this.currentDate
|
||||
})
|
||||
this.replyInfo = resp.data
|
||||
},
|
||||
//用户是否全部答完提交
|
||||
async checkUserFinishAnswer() {
|
||||
this.mLoading = true
|
||||
const resp = await $.get(BASE_URL + '/checkUserFinishAnswer', {
|
||||
questionId: this.id,
|
||||
randomCount: this.randomCount,
|
||||
currentDate: this.currentDate
|
||||
})
|
||||
this.mLoading = false
|
||||
this.finishAnswer = resp.data
|
||||
await this.getReply()
|
||||
await this.assignmentAnswer()
|
||||
},
|
||||
|
||||
//答案赋值
|
||||
assignmentAnswer() {
|
||||
this.questionData.issues.forEach(issue => {
|
||||
const rwids = this.replyInfo.filter(v => v.issueId === issue.iid).map(v => v.rwid)
|
||||
rwids.forEach(rwid => {
|
||||
this.toggle(issue, rwid)
|
||||
})
|
||||
const wids = issue.wors.filter(v => v.correct).map(v => v.wid)
|
||||
const userSelects = this.replyInfo.filter(v => v.issueId === issue.iid).map(v => v.rwid)
|
||||
const isEqual = wids.length === userSelects.length && wids.every(value => userSelects.includes(value))
|
||||
issue.isEqual = isEqual
|
||||
})
|
||||
},
|
||||
|
||||
answerAgain() {
|
||||
if(this.questionData.ctMode===3){
|
||||
$.post(BASE_URL+'/answerAgainCommon',{id:this.id}).then(resp=>{
|
||||
if(resp.code===0){
|
||||
this.questionData = resp.data
|
||||
this.finishAnswer = false
|
||||
setTimeout(() => {
|
||||
this.questionData.issues.forEach(issue => {
|
||||
issue.wors.forEach(wor => {
|
||||
this.$refs['checkboxes' + wor.wid][0].toggle(false)
|
||||
})
|
||||
})
|
||||
}, 0)
|
||||
this.checkTimer()
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.finishAnswer = false
|
||||
setTimeout(() => {
|
||||
this.questionData.issues.forEach(issue => {
|
||||
issue.wors.forEach(wor => {
|
||||
this.$refs['checkboxes' + wor.wid][0].toggle(false)
|
||||
})
|
||||
})
|
||||
}, 0)
|
||||
this.checkTimer()
|
||||
}
|
||||
},
|
||||
|
||||
async getUserHasAnswerRandomNum() {
|
||||
const resp = await $.get(BASE_URL + '/getUserHasAnswerRandomNum', {
|
||||
questionId: this.id
|
||||
})
|
||||
this.userHasAnswerRandomNum = resp.data
|
||||
this.randomCount = this.userHasAnswerRandomNum
|
||||
},
|
||||
|
||||
async checkCanAnswerAgain() {
|
||||
const resp = await $.get(BASE_URL + '/checkCanAnswerAgain', {
|
||||
questionId: this.id,
|
||||
randomCount: this.randomCount,
|
||||
currentDate: this.currentDate
|
||||
})
|
||||
this.canAnswerAgain = resp.data
|
||||
},
|
||||
|
||||
async getScore() {
|
||||
const resp = await $.get(BASE_URL + '/getScore/', {
|
||||
questionId: this.id,
|
||||
randomCount: this.randomCount,
|
||||
currentDate: this.currentDate
|
||||
})
|
||||
this.currentScore = resp.data
|
||||
},
|
||||
checkTimer() {
|
||||
if(this.questionData.enableTimer){
|
||||
if (this.timerInterval) {
|
||||
clearInterval(this.timerInterval)
|
||||
}
|
||||
if (!this.finishAnswer) {
|
||||
this.$dialog.alert({
|
||||
title: '提示',
|
||||
message: '本次答题时间' + this.questionData.timerMinute + '分钟,请尽快完成!'
|
||||
}).then(() => {
|
||||
this.countDownSeconds = this.questionData.timerMinute * 60
|
||||
this.updateCountdown()
|
||||
this.timerInterval = setInterval(() => {
|
||||
this.updateCountdown()
|
||||
}, 1000)
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
updateCountdown() {
|
||||
// 计算剩余的分钟和秒数
|
||||
let mins = Math.floor(this.countDownSeconds / 60)
|
||||
let secs = this.countDownSeconds % 60
|
||||
// 格式化时间,确保分钟和秒数始终是两位数
|
||||
mins = mins < 10 ? '0' + mins : mins;
|
||||
secs = secs < 10 ? '0' + secs : secs;
|
||||
this.remainder = mins + ':' + secs
|
||||
// 如果倒计时结束,显示结束信息
|
||||
if (this.countDownSeconds <= 0) {
|
||||
this.remainder = '时间到'
|
||||
clearInterval(this.timerInterval)
|
||||
this.$dialog.alert({
|
||||
title: '提示',
|
||||
message: '答题时间到,请点击确认提交答案!'
|
||||
}).then(() => {
|
||||
this.autoSubmit()
|
||||
})
|
||||
} else {
|
||||
this.countDownSeconds = this.countDownSeconds - 1
|
||||
}
|
||||
},
|
||||
|
||||
getHistoryScore(){
|
||||
$.get(BASE_URL+"/historyScore",{questionId:this.id}).then(res=>{
|
||||
if(res.code===0){
|
||||
this.historyScores = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
if (this.timerInterval) {
|
||||
clearInterval(this.timerInterval)
|
||||
}
|
||||
this.id = GetQueryString("id")
|
||||
await this.getQuestionData()
|
||||
await this.checkCanAnswerAgain()
|
||||
await this.getUserHasAnswerRandomNum()
|
||||
await this.checkUserFinishAnswer()
|
||||
await this.getScore()
|
||||
await this.checkTimer()
|
||||
this.getHistoryScore()
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('pageshow', async e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.id = GetQueryString("id")
|
||||
await vue.getQuestionData()
|
||||
// await vue.getRanDomModeNum()
|
||||
// await vue.getSumScore()
|
||||
// await vue.checkUserFinishAnswer()
|
||||
// await vue.getCurrentRandomCountScore()
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,464 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.middle-subject {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #f6f7f9;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-info-padding {
|
||||
padding: 10px;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.middle-subject-info-scroll {
|
||||
/*height: 100%;*/
|
||||
height: calc(100vh - 110px);
|
||||
max-height: calc(100vh - 110px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.middle-subject-info-head {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-icon {
|
||||
width: 30px;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
background-color: #1678ff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 0 0 5px 5px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.middle-subject-title {
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bolder;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.middle-subject-other {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.middle-subject-topic {
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 1rem;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 2px 2px 12px 4px rgba(0, 0, 0, 0.1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-topic-title {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.middle-subject-topic-submit {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-desc {
|
||||
color: rgb(160, 160, 160);
|
||||
text-align: left;
|
||||
margin-left: 20px;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.itx_field {
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dcdfe6;
|
||||
box-sizing: border-box;
|
||||
color: #606266;
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
outline: none;
|
||||
padding: 0 15px;
|
||||
transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.middle-subject-topic-submit .u-btn {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.middle-subject-info-search {
|
||||
position: absolute;
|
||||
bottom: 45%;
|
||||
right: 0;
|
||||
height: 40px;
|
||||
z-index: 999;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 0 20px rgb(230, 230, 230);
|
||||
border-radius: 20px 0 0 20px;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-icon {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-info {
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
height: inherit;
|
||||
z-index: 999;
|
||||
align-items: center;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
max-height: 64px;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 0 20px rgb(230, 230, 230);
|
||||
z-index: 999;
|
||||
padding: 10px 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save .van-button {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.wsm {
|
||||
max-height: 80px;
|
||||
/*overflow: scroll;*/
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.wsm * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wsm p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wsmPopup {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="middle-subject">
|
||||
<van-nav-bar title="在线调查" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="middle-subject-info">
|
||||
<div class="middle-subject-info-scroll">
|
||||
<div class="middle-subject-info-padding">
|
||||
<div class="middle-subject-info-head">
|
||||
<div class="middle-subject-title">{{ questionData.qtitle }}</div>
|
||||
<div class="middle-subject-other">
|
||||
<template v-if="questionData.qlx!==3">
|
||||
<!-- <span>创建人:{{ questionData.username }}</span>-->
|
||||
<!-- <span>总题数:{{ issueList.length }}</span>-->
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-body">
|
||||
<div class="middle-subject-topic" v-for="(issue,issueIndex) in issueList" :key="issue.qid">
|
||||
<div v-if="!issue.iisdx" class="middle-subject-topic-icon">
|
||||
<span>多选</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span v-if="issue.iisbd" style="color: red;">*</span>
|
||||
<span class="middle-subject-topic-title">
|
||||
{{ issueIndex + 1 }}.
|
||||
{{ removeHTMLTag(issue.iname) }}
|
||||
<span v-if="issue.iminselect">(最少选择:{{issue.iminselect}})</span>
|
||||
<span v-if="issue.imaxselect">(最多选择:{{issue.imaxselect}})</span>
|
||||
<div v-if="issue.its" class="middle-subject-topic-desc"
|
||||
style="margin-left: 17px;font-size: 12px;font-weight: 500;">
|
||||
{{ issue.its }}
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 选择题 -->
|
||||
<template v-if="issue.itx===1">
|
||||
<!-- 单选题 -->
|
||||
<van-radio-group v-if="issue.iisdx" v-model="issue.rwid" :disabled="replyFinish">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="wor.wid">
|
||||
<van-radio :ref="wor.wid" :name="wor.wid">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-radio>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px"
|
||||
:src="'/file_server/fileStreamPreview?id='+wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
<div class="wsm" v-html="wor.wsm" @click="openWsm(wor.wsm)"></div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-radio-group>
|
||||
|
||||
<!-- 多选题 -->
|
||||
<van-checkbox-group v-else-if="!issue.iisdx" v-model="issue.rwid"
|
||||
:disabled="replyFinish"
|
||||
:max="issue.imaxselect ? issue.imaxselect:0">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="worIndex">
|
||||
<van-checkbox :ref="wor.wid" :name="wor.wid" shape="square">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-checkbox>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px"
|
||||
:src="'/file_server/fileStreamPreview?id='+wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
<div class="wsm" v-html=" wor.wsm" @click="openWsm(wor.wsm)"></div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
</template>
|
||||
|
||||
<!-- 填空题 -->
|
||||
<template v-if="issue.itx===2">
|
||||
<van-field v-model="issue.rval" type="text" border
|
||||
class="itx_field"
|
||||
cursor-spacing="100"
|
||||
:show-confirmbar="false"
|
||||
:disabled="replyFinish" :auto-height="true" maxlength="2000"></van-field>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-footer">
|
||||
<div class="middle-subject-info-footer-save">
|
||||
<van-button size="medium" type="primary" @click="saveAnswer"
|
||||
:disabled="replyFinish">保存
|
||||
</van-button>
|
||||
<van-button size="medium" type="info" :disabled="replyFinish"
|
||||
@click="submitAnswer">
|
||||
提交
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="wsmPopup" round :style="{ height: '80%',width:'90%' }">
|
||||
<div v-html="wsmContent" class="wsmPopup"></div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
questionData: {},
|
||||
issueList: [],
|
||||
replyInfo: [],
|
||||
wsmContent: null,
|
||||
wsmPopup: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
letterList() {
|
||||
const alphabet = Array.from(new Array(26), (ele, index) => {
|
||||
return String.fromCharCode(65 + index);
|
||||
})
|
||||
return alphabet
|
||||
},
|
||||
replyFinish() {
|
||||
return this.replyInfo.some(v => !v.save)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openWsm(content) {
|
||||
this.wsmContent = content
|
||||
this.wsmPopup = true
|
||||
},
|
||||
|
||||
async getQuestionData() {
|
||||
const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id)
|
||||
this.questionData = resp.data
|
||||
this.issueList = this.questionData && this.questionData.issues
|
||||
},
|
||||
saveAnswer() {
|
||||
const formData = this.formatFormData()
|
||||
formData.forEach(v => v.save = true)
|
||||
this.$modal.loading('保存中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('保存成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('保存失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAnswer() {
|
||||
const formData = this.formatFormData()
|
||||
formData.forEach(v => v.save = false)
|
||||
this.$modal.confirm('您确定要提交吗?提交后不能修改!').then(() => {
|
||||
this.$modal.loading('提交中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('提交成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('提交失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
validAnswer() {
|
||||
|
||||
},
|
||||
|
||||
//格式化提交数据
|
||||
formatFormData() {
|
||||
const formData = []
|
||||
this.issueList.forEach(v => {
|
||||
if (v.itx === 1 && v.iisdx) {
|
||||
//单选
|
||||
if (v.rwid) {
|
||||
formData.push({
|
||||
"rwid": v.rwid,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 1 && !v.iisdx) {
|
||||
//多选
|
||||
if (v.rwid) {
|
||||
v.rwid.forEach(r => {
|
||||
formData.push({
|
||||
"rwid": r,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 2) {
|
||||
if (v.rval) {
|
||||
formData.push({
|
||||
"rval": v.rval,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return formData
|
||||
},
|
||||
//获取回答信息并赋值
|
||||
async getReply() {
|
||||
const resp = await $.get('/mobile/question/h5/answerInfo/' + this.id)
|
||||
this.replyInfo = resp.data
|
||||
this.issueList.forEach((issue, issueIndex) => {
|
||||
if (issue.itx === 1 && issue.iisdx) {
|
||||
//单选
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rw ? rw.rwid : null)
|
||||
} else if (issue.itx === 1 && !issue.iisdx) {
|
||||
//多选
|
||||
const rws = this.replyInfo.filter(answer => answer.issueId === issue.iid).map(v => v.rwid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rws ? rws : [])
|
||||
} else if (issue.itx === 2) {
|
||||
//填空题
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rval', rw ? rw.rval : null)
|
||||
}
|
||||
})
|
||||
},
|
||||
defaultChecked() {
|
||||
const itx = this.issueList[0]['itx']
|
||||
const iisdx = this.issueList[0]['iisdx']
|
||||
|
||||
//判断用户是否选过 并且是选择题才可以
|
||||
if (this.replyInfo.length === 0 && itx === 1) {
|
||||
if (iisdx) {
|
||||
const defaultOption = this.issueList[0]['wors'].find(v => v.wismr === true)
|
||||
this.$set(this.issueList[0], 'rwid', defaultOption ? defaultOption.rwid : null)
|
||||
} else {
|
||||
const defaultOptionIds = this.issueList[0]['wors'].filter(v => v.wismr === true).map(v => v.wid)
|
||||
this.$set(this.issueList[0], 'rwid', defaultOptionIds ? defaultOptionIds : [])
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
await this.getQuestionData()
|
||||
await this.getReply()
|
||||
// await this.defaultChecked()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,105 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="问卷调查" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
<div>
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<van-cell v-for="item in tableData" class="cell-card" @click="openView(item.qid)">
|
||||
<div class="text-overflow" style="font-weight: bold">{{item.qtitle}}</div>
|
||||
<div style="font-size: 12px" v-html="item.qsm"></div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
tableData: [],
|
||||
appid: 'wx9fd2b07ea126f9f6',
|
||||
redirect_uri: location.protocol + "//" + location.host,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
await this.onLoad()
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/question/list/pageData', this.pageForm).then(res => {
|
||||
this.loading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = this.redirect_uri + '/platform/zgfw/mobile/questionnaire?qid=' + id
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,388 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.container {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.top-back {
|
||||
width: 100%;
|
||||
background-color: rgb(22, 120, 255);
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.title {
|
||||
position: fixed;
|
||||
left: 40px;
|
||||
top: 110px;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
min-height: calc(100vh - 46px - 44px);
|
||||
max-height: calc(100vh - 46px - 44px);
|
||||
overflow-y: scroll;
|
||||
background: #f3f3f3;
|
||||
}
|
||||
|
||||
.quizzes-item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.quizzes-item-v {
|
||||
box-sizing: border-box;
|
||||
padding: 1rem;
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
||||
.quizzes-item-info {
|
||||
position: relative;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.quizzes-item-info-icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.quizzes-item-info-icon img {
|
||||
width: 6rem;
|
||||
height: 5rem;
|
||||
}
|
||||
|
||||
.quizzes-item-info-title {
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.quizzes-item-info-right {
|
||||
font-size: 13px;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.quizzes-item-info-tip {
|
||||
color: #606266;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.quizzes-item-info-text {
|
||||
color: #232426;
|
||||
}
|
||||
|
||||
.winPopup {
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.winPopup img {
|
||||
transform: translateY(-50%);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.winPopup .van-popup__close-icon {
|
||||
|
||||
}
|
||||
|
||||
.iconDiv {
|
||||
color: white;
|
||||
font-size: 66px;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
bottom: 90px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.win_tag {
|
||||
position: relative;
|
||||
top: 16px;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="container">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="列表" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-tabs v-model="queryForm.status" @change="doSearch">
|
||||
<van-tab title="进行中" name="1"></van-tab>
|
||||
<van-tab title="已结束" name="2"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<div class="content">
|
||||
<div v-for="(item, index) in tableData" :id="item.qid" :key="item.qid">
|
||||
<div class="quizzes-item" @click="openAnswer(item)">
|
||||
<div class="quizzes-item-v">
|
||||
<div class="quizzes-item-info">
|
||||
<div class="quizzes-item-info-icon">
|
||||
<image src="/assets/mobile/svg/question/quizzes2.svg"/>
|
||||
</div>
|
||||
<div class="quizzes-item-info-v">
|
||||
<div class="quizzes-item-info-title">{{ item.qtitle }}</div>
|
||||
<div class="quizzes-item-info-right">
|
||||
<span class="quizzes-item-info-tip">活动开始时间:</span>
|
||||
<span class="quizzes-item-info-text">
|
||||
{{ moment(item.startTime).format('YYYY年MM月DD日') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="quizzes-item-info-right">
|
||||
<span class="quizzes-item-info-tip">活动结束时间:</span>
|
||||
<span class="quizzes-item-info-text">
|
||||
{{ moment(item.endTime).format('YYYY年MM月DD日') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="quizzes-item-info-right" v-if="item.isRaffle">
|
||||
<!-- <span class="quizzes-item-info-tip">题目数量:</span>-->
|
||||
<!-- <span class="quizzes-item-info-text">-->
|
||||
<!-- {{item.ctMode === 1 ? item.topicTotal : item.ctNum }}-->
|
||||
<!-- </span>-->
|
||||
<span class="quizzes-item-info-text" style="position: absolute;right: 0;bottom: 0">
|
||||
<van-tag @click.stop="showWinInfo(item)" type="primary" class="win_tag"
|
||||
v-if="item.qlx===2 && item.isRaffle && item.zjTotal>0">获奖信息</van-tag>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="finished && !tableData.length" text="暂无问卷" icon-size="320"
|
||||
src="/static/img/notData.svg">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="winPopupShow" class="winPopup"
|
||||
:style="{ height: '100%' }"
|
||||
>
|
||||
<div style="display: flex;align-items: center">
|
||||
<img v-if="isWin" width="100%" height="60%" src="/assets/mobile/img/question/win.png"/>
|
||||
<img v-if="!isWin" width="100%" height="50%"
|
||||
src="/assets/mobile/img/question/noWin1-removebg-preview.png"/>
|
||||
</div>
|
||||
<div class="iconDiv">
|
||||
<div v-if="isWin" style="font-size: 14px;!important;">恭喜您中奖了,本次活动中奖机会只有一次喔!</div>
|
||||
<van-icon @click="winPopupShow = false" name="close"></van-icon>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<van-dialog v-model="tipShow" title="提示">
|
||||
<div>活动期间,每天答题次数不限,每天答题的最终成绩取最高分。每天答题得90分(含)以上者,可参加线上抽奖活动。</div>
|
||||
<div>6月17日至6月23日每天线上抽取“幸运奖”100名'。</div>
|
||||
</van-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
questionStatus: '1',
|
||||
scrollTop: 0,
|
||||
statusBarHeight: 0,
|
||||
pageLoading: false,
|
||||
queryForm: {
|
||||
status: '1'
|
||||
},
|
||||
winPopupShow: false,
|
||||
isWin: false,
|
||||
|
||||
tipShow:false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.queryForm.type = GetQueryString("type")
|
||||
this.doSearch()
|
||||
},
|
||||
methods: {
|
||||
async showWinInfo({qid}) {
|
||||
const {data} = await $.post('/mobile/question/h5/winInfo', {questionId: qid})
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const user = data.find(o => o.id === userId)
|
||||
this.isWin = user !== undefined
|
||||
this.winList = data
|
||||
console.log(this.isWin)
|
||||
this.winPopupShow = true
|
||||
|
||||
/*vant.Dialog.alert({
|
||||
message: '每人仅有一次中奖机会喔,立即查询获奖信息。'
|
||||
}).then(() => {
|
||||
this.winPopupShow = true
|
||||
});*/
|
||||
},
|
||||
pageData() {
|
||||
this.$modal.loading()
|
||||
this.tableLoading = true
|
||||
|
||||
$.post('/mobile/question/h5/pageData', {...this.pageForm, ...this.queryForm}).then(res => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
|
||||
|
||||
// $.post('/activity/question/h5/pageData', this.pageForm, {
|
||||
// params: this.queryForm
|
||||
// }).then(res => {
|
||||
// this.tableData = this.tableData.concat(res.data.list)
|
||||
// this.pageForm.totalCount = res.data.totalCount
|
||||
// if (this.tableData.length === this.pageForm.totalCount) {
|
||||
// this.finished = true
|
||||
// } else {
|
||||
// this.pageForm.pageNumber++
|
||||
// }
|
||||
// this.tableLoading = false
|
||||
// this.$modal.closeLoading()
|
||||
// }).finally(() => {
|
||||
// this.tableLoading = false
|
||||
// this.finished = true
|
||||
// this.$modal.closeLoading()
|
||||
// })
|
||||
},
|
||||
|
||||
tabChange(index) {
|
||||
this.page.current = index;
|
||||
// this.refresh();
|
||||
},
|
||||
lower(e) {
|
||||
if (!this.finished) this.loadData();
|
||||
},
|
||||
|
||||
async hasPermissionByIssue(groupId) {
|
||||
const resp = await this.$http.get('/platform/question/applets/list/hasPermission', {
|
||||
params: {groupId: groupId}
|
||||
})
|
||||
return resp
|
||||
},
|
||||
|
||||
async openAnswer(item) {
|
||||
const {qid, qlx, qflag, activityUserScopeId} = item
|
||||
|
||||
if (qflag !== 2) {
|
||||
this.$modal.msg('该问卷未发布')
|
||||
return
|
||||
}
|
||||
|
||||
const now = new Date().getTime()
|
||||
if (now < item.startTime || now > item.endTime) {
|
||||
this.$modal.msg('不在开启时间内')
|
||||
return
|
||||
}
|
||||
|
||||
if (activityUserScopeId) {
|
||||
const resp = await $.get('/mobile/question/h5/checkPermission/' + activityUserScopeId)
|
||||
if (!resp.data) {
|
||||
this.$modal.msg('您无权限参加')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (qid === '827cc4ef9cde47ed97bc21f6be75f91a') {
|
||||
this.$dialog.alert({
|
||||
title:'提示',
|
||||
messageAlign:'left',
|
||||
message: '<div style="text-indent: 2em;">活动期间,每天答题次数不限,每天答题的最终成绩取最高分。每天答题得90分(含)以上者,可参加线上抽奖活动。<div>' +
|
||||
'<div style="text-indent: 2em;">6月17日至6月23日每天线上抽取“幸运奖”100名。</div>'+
|
||||
'<div style="text-indent: 2em;">答题并提交成功后,可于次日查看获奖信息。</div>'
|
||||
,
|
||||
}).then(()=>{
|
||||
if (qlx === 1) {
|
||||
//调查
|
||||
location.href = '/mobile/question/h5/poll/index?id=' + qid
|
||||
} else if (qlx === 2) {
|
||||
//答题
|
||||
location.href = '/mobile/question/h5/answer/index?id=' + qid
|
||||
} else if (qlx === 3) {
|
||||
//购物
|
||||
location.href = '/mobile/question/h5/shop/index?id=' + qid
|
||||
} else if (qlx === 4) {
|
||||
//蛋糕卡
|
||||
location.href = '/mobile/question/h5/cake/index?id=' + qid
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (qlx === 1) {
|
||||
//调查
|
||||
location.href = '/mobile/question/h5/poll/index?id=' + qid
|
||||
} else if (qlx === 2) {
|
||||
//答题
|
||||
location.href = '/mobile/question/h5/answer/index?id=' + qid
|
||||
} else if (qlx === 3) {
|
||||
//购物
|
||||
location.href = '/mobile/question/h5/shop/index?id=' + qid
|
||||
} else if (qlx === 4) {
|
||||
//蛋糕卡
|
||||
location.href = '/mobile/question/h5/cake/index?id=' + qid
|
||||
}
|
||||
|
||||
|
||||
// if (qlx === 4) {
|
||||
// if (item.startTime > new Date().getTime() || item.endTime < new Date().getTime()) {
|
||||
// uni.showToast({
|
||||
// title: "不在开启时间内",
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
// if (item.startTime)
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/quizzes/cakeAnswer/cakeAnswer?id=" + id
|
||||
// });
|
||||
// } else if (qlx === 2) {
|
||||
// if (activityUserScopeId) {
|
||||
// const resp = await this.hasPermissionByIssue(activityUserScopeId)
|
||||
// if (resp.code !== 0) {
|
||||
// uni.showToast({
|
||||
// title: resp.msg,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/quizzes/choiceAnswer/choiceAnswer?id=" + id
|
||||
// });
|
||||
// } else {
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/quizzes/answer?id=" + id
|
||||
// });
|
||||
// }
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,416 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<!--在线调查-->
|
||||
<style>
|
||||
.middle-subject {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #f6f7f9;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-info-padding {
|
||||
padding: 10px;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.middle-subject-info-scroll {
|
||||
/*height: 100%;*/
|
||||
height: calc(100vh - 110px);
|
||||
max-height: calc(100vh - 110px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.middle-subject-info-head {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-icon {
|
||||
width: 30px;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
background-color: #1678ff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 0 0 5px 5px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.middle-subject-title {
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bolder;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.middle-subject-other {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.middle-subject-topic {
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 1rem;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 2px 2px 12px 4px rgba(0, 0, 0, 0.1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-topic-title {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.middle-subject-topic-submit {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-desc {
|
||||
color: rgb(160, 160, 160);
|
||||
text-align: left;
|
||||
margin-left: 20px;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.itx_field {
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dcdfe6;
|
||||
box-sizing: border-box;
|
||||
color: #606266;
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
outline: none;
|
||||
padding: 0 15px;
|
||||
transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.middle-subject-topic-submit .u-btn {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.middle-subject-info-search {
|
||||
position: absolute;
|
||||
bottom: 45%;
|
||||
right: 0;
|
||||
height: 40px;
|
||||
z-index: 999;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 0 20px rgb(230, 230, 230);
|
||||
border-radius: 20px 0 0 20px;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-icon {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-info {
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
height: inherit;
|
||||
z-index: 999;
|
||||
align-items: center;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
max-height: 64px;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 0 20px rgb(230, 230, 230);
|
||||
z-index: 999;
|
||||
padding: 10px 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save .van-button {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 70%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="middle-subject">
|
||||
<van-nav-bar title="在线调查" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="middle-subject-info">
|
||||
<div class="middle-subject-info-scroll">
|
||||
<div class="middle-subject-info-padding">
|
||||
<div class="middle-subject-info-head">
|
||||
<div class="middle-subject-title">{{ questionData.qtitle }}</div>
|
||||
<div class="middle-subject-other">
|
||||
<template v-if="questionData.qlx!==3">
|
||||
<!-- <span>创建人:{{ questionData.username }}</span>-->
|
||||
<!-- <span>总题数:{{ issueList.length }}</span>-->
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-body">
|
||||
<div class="middle-subject-topic" v-for="(issue,issueIndex) in issueList" :key="issue.qid">
|
||||
<div v-if="!issue.iisdx" class="middle-subject-topic-icon">
|
||||
<span>多选</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span v-if="issue.iisbd" style="color: red;">*</span>
|
||||
<span class="middle-subject-topic-title">
|
||||
{{ issueIndex + 1 }}.
|
||||
{{ removeHTMLTag(issue.iname) }}
|
||||
<span v-if="issue.iminselect">(最少选择:{{issue.iminselect}})</span>
|
||||
<span v-if="issue.imaxselect">(最多选择:{{issue.imaxselect}})</span>
|
||||
<div v-if="issue.its" class="middle-subject-topic-desc"
|
||||
style="margin-left: 17px;font-size: 12px;font-weight: 500;">
|
||||
{{ issue.its }}
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 选择题 -->
|
||||
<template v-if="issue.itx===1">
|
||||
<!-- 单选题 -->
|
||||
<van-radio-group v-if="issue.iisdx" v-model="issue.rwid" :disabled="replyFinish">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="wor.wid">
|
||||
<van-radio :ref="wor.wid" :name="wor.wid">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-radio>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px" :src="wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
{{ wor.wsm }}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-radio-group>
|
||||
|
||||
<!-- 多选题 -->
|
||||
<van-checkbox-group v-else-if="!issue.iisdx" v-model="issue.rwid"
|
||||
:disabled="replyFinish"
|
||||
:max="issue.imaxselect ? issue.imaxselect:0">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="worIndex">
|
||||
<van-checkbox :ref="wor.wid" :name="wor.wid" shape="square">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-checkbox>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px" :src="wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
{{ wor.wsm }}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
</template>
|
||||
|
||||
<!-- 填空题 -->
|
||||
<template v-if="issue.itx===2">
|
||||
<van-field v-model="issue.rval" type="text" border
|
||||
class="itx_field"
|
||||
cursor-spacing="100"
|
||||
:show-confirmbar="false"
|
||||
:disabled="replyFinish" :auto-height="true" maxlength="2000"/>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-footer">
|
||||
<div class="middle-subject-info-footer-save">
|
||||
<van-button size="medium" type="primary" @click="saveAnswer"
|
||||
:disabled="replyFinish">保存
|
||||
</van-button>
|
||||
<van-button size="medium" type="info" :disabled="replyFinish"
|
||||
@click="submitAnswer">
|
||||
提交
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
questionData: {},
|
||||
issueList: [],
|
||||
replyInfo: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
letterList() {
|
||||
const alphabet = Array.from(new Array(26), (ele, index) => {
|
||||
return String.fromCharCode(65 + index);
|
||||
})
|
||||
return alphabet
|
||||
},
|
||||
replyFinish() {
|
||||
return this.replyInfo.some(v => !v.save)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getQuestionData() {
|
||||
const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id)
|
||||
this.questionData = resp.data
|
||||
this.issueList = this.questionData && this.questionData.issues
|
||||
},
|
||||
saveAnswer() {
|
||||
const formData = this.formatFormData()
|
||||
formData.forEach(v => v.save = true)
|
||||
this.$modal.loading('保存中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('保存成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('保存失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAnswer() {
|
||||
const formData = this.formatFormData()
|
||||
formData.forEach(v => v.save = false)
|
||||
this.$modal.confirm('您确定要提交吗?提交后不能修改!').then(() => {
|
||||
this.$modal.loading('提交中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('提交成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('提交失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
validAnswer() {
|
||||
|
||||
},
|
||||
|
||||
//格式化提交数据
|
||||
formatFormData() {
|
||||
const formData = []
|
||||
this.issueList.forEach(v => {
|
||||
if (v.itx === 1 && v.iisdx) {
|
||||
//单选
|
||||
if (v.rwid) {
|
||||
formData.push({
|
||||
"rwid": v.rwid,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 1 && !v.iisdx) {
|
||||
//多选
|
||||
if (v.rwid) {
|
||||
v.rwid.forEach(r => {
|
||||
formData.push({
|
||||
"rwid": r,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 2) {
|
||||
if (v.rval) {
|
||||
debugger
|
||||
formData.push({
|
||||
"rwid": v.wors[0].wid,
|
||||
"rval": v.rval,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return formData
|
||||
},
|
||||
//获取回答信息并赋值
|
||||
async getReply() {
|
||||
const resp = await $.get('/mobile/question/h5/answerInfo/' + this.id)
|
||||
this.replyInfo = resp.data
|
||||
this.issueList.forEach((issue, issueIndex) => {
|
||||
if (issue.itx === 1 && issue.iisdx) {
|
||||
//单选
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rw ? rw.rwid : null)
|
||||
} else if (issue.itx === 1 && !issue.iisdx) {
|
||||
//多选
|
||||
const rws = this.replyInfo.filter(answer => answer.issueId === issue.iid).map(v => v.rwid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rws ? rws : [])
|
||||
} else if (issue.itx === 2) {
|
||||
//填空题
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rval', rw ? rw.rval : null)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
await this.getQuestionData()
|
||||
await this.getReply()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,502 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.middle-subject {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #f6f7f9;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-info-padding {
|
||||
padding: 10px;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.middle-subject-info-scroll {
|
||||
/*height: 100%;*/
|
||||
height: calc(100vh - 110px);
|
||||
max-height: calc(100vh - 110px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.middle-subject-info-head {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-icon {
|
||||
width: 30px;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
background-color: #1678ff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 0 0 5px 5px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.middle-subject-title {
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bolder;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.middle-subject-other {
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.middle-subject-topic {
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 1rem;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 2px 2px 12px 4px rgba(0, 0, 0, 0.1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.middle-subject-topic-title {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.middle-subject-topic-submit {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.middle-subject-topic-desc {
|
||||
color: rgb(160, 160, 160);
|
||||
text-align: left;
|
||||
margin-left: 20px;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.itx_field {
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dcdfe6;
|
||||
box-sizing: border-box;
|
||||
color: #606266;
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
outline: none;
|
||||
padding: 0 15px;
|
||||
transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.middle-subject-topic-submit .u-btn {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.middle-subject-info-search {
|
||||
position: absolute;
|
||||
bottom: 45%;
|
||||
right: 0;
|
||||
height: 40px;
|
||||
z-index: 999;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 0 20px rgb(230, 230, 230);
|
||||
border-radius: 20px 0 0 20px;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-icon {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.middle-subject-info-search-info {
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
height: inherit;
|
||||
z-index: 999;
|
||||
align-items: center;
|
||||
box-shadow: 0 0 10px #1678ff;
|
||||
border-radius: 20px 0 0 20px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
max-height: 64px;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 0 20px rgb(230, 230, 230);
|
||||
z-index: 999;
|
||||
padding: 10px 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-save .van-button {
|
||||
/*width: 40%;*/
|
||||
width: calc((100% - 100px) / 2);
|
||||
}
|
||||
|
||||
.middle-subject-info-footer-pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.van-radio__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.totalMoney {
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
overflow-x: scroll;
|
||||
color: red;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="middle-subject">
|
||||
<van-nav-bar title="在线调查" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="middle-subject-info">
|
||||
<div class="middle-subject-info-scroll">
|
||||
<div class="middle-subject-info-padding">
|
||||
<div class="middle-subject-info-head">
|
||||
<div class="middle-subject-title">{{ questionData.qtitle }}</div>
|
||||
<div class="middle-subject-other">
|
||||
<template v-if="questionData.qlx!==3">
|
||||
<!-- <span>创建人:{{ questionData.username }}</span>-->
|
||||
<!-- <span>总题数:{{ issueList.length }}</span>-->
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-body">
|
||||
<div class="middle-subject-topic" v-for="(issue,issueIndex) in issueList" :key="issue.qid">
|
||||
<div v-if="!issue.iisdx" class="middle-subject-topic-icon">
|
||||
<span>多选</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span v-if="issue.iisbd" style="color: red;">*</span>
|
||||
<span class="middle-subject-topic-title">
|
||||
{{ issueIndex + 1 }}.
|
||||
{{ removeHTMLTag(issue.iname) }}
|
||||
<span v-if="issue.iminselect">(最少选择:{{issue.iminselect}})</span>
|
||||
<span v-if="issue.imaxselect">(最多选择:{{issue.imaxselect}})</span>
|
||||
<div v-if="issue.its" class="middle-subject-topic-desc"
|
||||
style="margin-left: 17px;font-size: 12px;font-weight: 500;">
|
||||
{{ issue.its }}
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 选择题 -->
|
||||
<template v-if="issue.itx===1">
|
||||
<!-- 单选题 -->
|
||||
<van-radio-group v-if="issue.iisdx" v-model="issue.rwid" :disabled="replyFinish">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="wor.wid">
|
||||
<van-radio :ref="wor.wid" :name="wor.wid">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-radio>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px" :src="wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
{{ wor.wsm }}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row style="margin-top: 10px;">
|
||||
<van-col :span="8"
|
||||
style="height: 28px;line-height: 28px;font-size: 14px;color: #d16565">
|
||||
单价:¥{{ wor.price }}
|
||||
</van-col>
|
||||
<van-col :span="16" style="display: flex;justify-content: right"
|
||||
v-if="issue.rwid === wor.wid">
|
||||
<view style="height: 28px;line-height: 28px;font-size: 14px;color: #d16565;">
|
||||
数量:
|
||||
</view>
|
||||
<van-stepper v-model="wor.number" :disabled="replyFinish" integer
|
||||
disable-input :default-value="0"
|
||||
:min="0"></van-stepper>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-radio-group>
|
||||
|
||||
<!-- 多选题 -->
|
||||
<van-checkbox-group v-else-if="!issue.iisdx" v-model="issue.rwid"
|
||||
:disabled="replyFinish"
|
||||
:max="issue.imaxselect ? issue.imaxselect:0">
|
||||
<div v-for="(wor,worIndex) in issue.wors" :key="wor.wid">
|
||||
<van-checkbox :ref="wor.wid" :name="wor.wid" shape="square">
|
||||
{{ letterList[worIndex] }}. {{ wor.wtxt }}
|
||||
</van-checkbox>
|
||||
<div class="middle-subject-topic-desc">
|
||||
<van-row gutter="16">
|
||||
<van-col span="8" v-if="wor.wimg">
|
||||
<image style="height: 80px;width: 80px" :src="wor.wimg"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</van-col>
|
||||
<van-col span="16" v-if="wor.wsm">
|
||||
{{ wor.wsm }}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row style="margin-top: 10px;">
|
||||
<van-col :span="8"
|
||||
style="height: 28px;line-height: 28px;font-size: 14px;color: #d16565">
|
||||
单价:¥{{ wor.price }}
|
||||
</van-col>
|
||||
<van-col :span="16" style="display: flex;justify-content: right"
|
||||
v-if="issue.rwid && issue.rwid.includes(wor.wid)">
|
||||
<view style="height: 28px;line-height: 28px;font-size: 14px;color: #d16565;">
|
||||
数量:
|
||||
</view>
|
||||
<van-stepper v-model="wor.number" :disabled="replyFinish" integer
|
||||
disable-input :default-value="0"
|
||||
:min="0"></van-stepper>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
</template>
|
||||
|
||||
<!-- 填空题 -->
|
||||
<template v-if="issue.itx===2">
|
||||
<van-field v-model="issue.rval" type="text" border
|
||||
class="itx_field"
|
||||
cursor-spacing="100"
|
||||
:show-confirmbar="false"
|
||||
:disabled="replyFinish" :auto-height="true" maxlength="2000"></van-field>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle-subject-info-footer">
|
||||
<div class="middle-subject-info-footer-save">
|
||||
<div class="totalMoney">
|
||||
¥{{ totalMoney }}
|
||||
</div>
|
||||
<van-button size="medium" type="primary" @click="saveAnswer" :disabled="replyFinish">
|
||||
保存
|
||||
</van-button>
|
||||
<van-button size="medium" type="info" :disabled="replyFinish" @click="submitAnswer">
|
||||
提交
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
questionData: {},
|
||||
issueList: [],
|
||||
replyInfo: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
letterList() {
|
||||
const alphabet = Array.from(new Array(26), (ele, index) => {
|
||||
return String.fromCharCode(65 + index);
|
||||
})
|
||||
return alphabet
|
||||
},
|
||||
replyFinish() {
|
||||
return this.replyInfo.some(v => !v.save)
|
||||
},
|
||||
totalMoney() {
|
||||
let sum = 0
|
||||
this.issueList.forEach(v => {
|
||||
if (v.itx === 1 && v.iisdx && v.rwid) {
|
||||
//单选
|
||||
const sel = v.wors.find(w => w.wid === v.rwid)
|
||||
sum += sel.number * sel.price
|
||||
} else if (v.itx === 1 && !v.iisdx && v.rwid) {
|
||||
//多选
|
||||
sum += v.wors.filter(w => v.rwid.includes(w.wid)).map(w => isNaN(w.price * w.number) ? 0 : w.price * w.number).reduce((a, b) => a + b, 0)
|
||||
}
|
||||
})
|
||||
return sum
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getQuestionData() {
|
||||
const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id)
|
||||
this.questionData = resp.data
|
||||
this.issueList = this.questionData && this.questionData.issues
|
||||
},
|
||||
saveAnswer() {
|
||||
const formData = this.formatFormData(true)
|
||||
if (formData.length === 0) {
|
||||
this.$modal.msg('请先选择后再保存')
|
||||
return
|
||||
}
|
||||
if (formData.some(v => v.number === 0)) {
|
||||
this.$modal.msg('最少选择一项')
|
||||
return
|
||||
}
|
||||
|
||||
this.$modal.loading('保存中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('保存成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('保存失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAnswer() {
|
||||
const formData = this.formatFormData(false)
|
||||
if (formData.length === 0) {
|
||||
this.$modal.msg('请先选择后再提交')
|
||||
return
|
||||
}
|
||||
if (formData.some(v => v.number === 0)) {
|
||||
this.$modal.msg('最少选择一项')
|
||||
return
|
||||
}
|
||||
this.$modal.confirm('您确定要提交吗?提交后不能修改!').then(() => {
|
||||
this.$modal.loading('提交中')
|
||||
$.post('/mobile/question/h5/saveAnswer', {repliesArray: JSON.stringify(formData)}).then(res => {
|
||||
this.$modal.closeLoading()
|
||||
if (res.code === 0) {
|
||||
this.$modal.msg('提交成功')
|
||||
this.getReply()
|
||||
} else {
|
||||
this.$modal.msg('提交失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
//格式化提交数据
|
||||
formatFormData(save) {
|
||||
const formData = []
|
||||
this.issueList.forEach(v => {
|
||||
if (v.itx === 1 && v.iisdx) {
|
||||
//单选
|
||||
if (v.rwid) {
|
||||
formData.push({
|
||||
"rwid": v.rwid,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid,
|
||||
"number": v.wors.find(w => w.wid === v.rwid).number,
|
||||
"save": save
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 1 && !v.iisdx) {
|
||||
//多选
|
||||
if (v.rwid) {
|
||||
v.rwid.forEach(r => {
|
||||
formData.push({
|
||||
"rwid": r,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid,
|
||||
"number": v.wors.find(w => w.wid === r).number,
|
||||
"save": save
|
||||
})
|
||||
})
|
||||
}
|
||||
} else if (v.itx === 2) {
|
||||
if (v.rval) {
|
||||
formData.push({
|
||||
"rval": v.rval,
|
||||
"qid": this.questionData.qid,
|
||||
"issueId": v.iid,
|
||||
"save": save
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return formData
|
||||
},
|
||||
//获取回答信息并赋值
|
||||
async getReply() {
|
||||
const resp = await $.get('/mobile/question/h5/answerInfo/' + this.id)
|
||||
this.replyInfo = resp.data
|
||||
this.issueList.forEach((issue, issueIndex) => {
|
||||
if (issue.itx === 1 && issue.iisdx) {
|
||||
//单选
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rw ? rw.rwid : null)
|
||||
if (rw) {
|
||||
const worIndex = issue.wors.findIndex(v => v.wid === rw.rwid)
|
||||
this.$set(this.issueList[issueIndex]['wors'][worIndex], 'number', rw ? rw.number : 0)
|
||||
}
|
||||
} else if (issue.itx === 1 && !issue.iisdx) {
|
||||
//多选
|
||||
const rws = this.replyInfo.filter(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rwid', rws ? rws.map(v => v.rwid) : [])
|
||||
if (rws) {
|
||||
rws.forEach(rw => {
|
||||
const worIndex = issue.wors.findIndex(v => v.wid === rw.rwid)
|
||||
this.$set(issue.wors[worIndex], 'number', rw ? rw.number : 0)
|
||||
})
|
||||
}
|
||||
} else if (issue.itx === 2) {
|
||||
//填空题
|
||||
const rw = this.replyInfo.find(answer => answer.issueId === issue.iid)
|
||||
this.$set(this.issueList[issueIndex], 'rval', rw ? rw.rval : null)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
await this.getQuestionData()
|
||||
await this.getReply()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,106 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="我的登记"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div style="margin: 20px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click.stop="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="登记类型" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.dj_djlx==1?'幼儿园':o.dj_djlx==2?'幼升小':'小升初'}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="子女姓名">{{o.dj_znname}}</van-cell>
|
||||
<van-cell :border="false" title="出生日期" v-if="o.dj_djlx===2">{{o.dj_znzsny}}</van-cell>
|
||||
<van-cell :border="false" title="教职工姓名">{{o.jzgname}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.dwname}}</van-cell>
|
||||
<van-cell :border="false" title="所属分工会">{{o.jzgfghname}}</van-cell>
|
||||
<van-cell :border="false" title="手机号码">{{o.dj_iphone}}</van-cell>
|
||||
<van-cell :border="false" title="申请状态">
|
||||
<span v-if="o.dj_sqzt==1" style="color: #e6a23c">待院级工会审核</span>
|
||||
<span v-if="o.dj_sqzt==3" style="color: #f56c6c">院级工会审核拒绝</span>
|
||||
<span v-if="o.dj_sqzt==2" style="color: #e6a23c">待校工会审核</span>
|
||||
<span v-if="o.dj_sqzt==4" style="color: #f56c6c">校工会审核拒绝</span>
|
||||
<span v-if="o.dj_sqzt==5" style="color: #67c23a">审核通过</span>
|
||||
<span v-if="o.dj_sqzt==0">待重新提交</span>
|
||||
</van-cell>
|
||||
<image class="register-icon" src="/assets/mobile/svg/rxdj/applyEdit.svg"
|
||||
@click.stop="openEdit(o)"
|
||||
v-if="o.dj_sqzt==1||o.dj_sqzt==0"
|
||||
></image>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/zgfw/rxdjxx/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = "/platform/zgfw/mobile/rxdj/apply/info?dj_id=" + o.dj_id
|
||||
|
||||
},
|
||||
openEdit(o) {
|
||||
window.location.href = "/platform/zgfw/mobile/rxdj/psms?client=mobile&dj_id=" + o.dj_id + "&dj_djlx=" + o.dj_djlx
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="登记信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<rxdj-mobile-info :dj_id="dj_id" title="登记信息"></rxdj-mobile-info>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
dj_id: GetQueryString('dj_id'),
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'rxdj-mobile-info': httpVueLoader('/components/zgfw/rxdj/mobileRxdj.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
async created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,98 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="登记列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div style="margin: 20px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="年度">{{o.bmyear}}</van-cell>
|
||||
<van-cell title="登记类型" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.bmlx==1?'幼儿园':o.bmlx==2?'幼升小':'小升初'}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
|
||||
<van-cell :border="false" title="开始时间">{{o.bmkssj}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.bmjssj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post(loc() + '/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
const {bmlx, bmyear, bmkssj, bmjssj} = o
|
||||
if (moment().format("YYYY-MM-DD") < bmkssj) {
|
||||
vant.Toast('报名暂未开始!')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD") > bmjssj) {
|
||||
vant.Toast('报名已结束!')
|
||||
return
|
||||
}
|
||||
switch (bmlx) {
|
||||
case 1:
|
||||
window.location.href = '/platform/zgfw/mobile/rxdj/kindergarten?client=mobile'
|
||||
break;
|
||||
case 2:
|
||||
window.location.href = '/platform/zgfw/mobile/rxdj/psms?client=mobile&dj_djlx=' + bmlx
|
||||
break;
|
||||
case 3:
|
||||
window.location.href = '/platform/zgfw/mobile/rxdj/psms?client=mobile&dj_djlx=' + bmlx
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,146 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="我的审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="RGB(8,23,118)">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('wyh02')||@shiro.hasRole('wyh03')}"
|
||||
:options="mCommon.unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange"
|
||||
:options="mCommon.unitList"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="登记类型" :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" style="font-size: 16px" class="van-ellipsis">{{o.dj_djlx==1?'幼儿园':o.dj_djlx==2?'幼升小':'小升初'}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="子女姓名">{{o.dj_znname}}</van-cell>
|
||||
<van-cell :border="false" title="出生日期" v-if="o.dj_djlx===2">{{o.dj_znzsny}}</van-cell>
|
||||
<van-cell :border="false" title="教职工姓名">{{o.jzgname}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.dj_szdw}}</van-cell>
|
||||
<van-cell :border="false" title="所属分工会">{{o.jzgfghname}}</van-cell>
|
||||
<van-cell :border="false" title="手机号码">{{o.dj_iphone}}</van-cell>
|
||||
<van-cell :border="false" title="申请状态">
|
||||
<span v-if="o.dj_sqzt==1" style="color: #e6a23c">待院级工会审核</span>
|
||||
<span v-if="o.dj_sqzt==3" style="color: #f56c6c">院级工会审核拒绝</span>
|
||||
<span v-if="o.dj_sqzt==2" style="color: #e6a23c">待校工会审核</span>
|
||||
<span v-if="o.dj_sqzt==4" style="color: #f56c6c">校工会审核拒绝</span>
|
||||
<span v-if="o.dj_sqzt==5" style="color: #67c23a">审核通过</span>
|
||||
<span v-if="o.dj_sqzt==0">待重新提交</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
lx: GetQueryString('lx'),
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
|
||||
unitList: [],
|
||||
unionList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.flushUnits()
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/zgfw/mobile/rxdj/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = "/platform/zgfw/mobile/rxdj/audit/auditHtml?dj_id=" + o.dj_id + "&dj_sqzt=" + o.dj_sqzt
|
||||
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('wyh03')||@shiro.hasRole('wyh02')||@shiro.hasRole('H03')}" === 'true') {
|
||||
await mCommon.getUnitList(this.pageForm.unionId)
|
||||
} else {
|
||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
}, async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
await mCommon.getUnionList()
|
||||
|
||||
if (mCommon.unionList && mCommon.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
|
||||
}
|
||||
if (mCommon.unitList && mCommon.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.flushUnits()
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,112 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="history.back()" title="校工会审核" fixed placeholder left-arrow></van-nav-bar>
|
||||
<rxdj-mobile-info :dj_id="dj_id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="handle">
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.dj_xghshyj"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
</van-form>
|
||||
|
||||
<div style="display: flex;justify-content: space-around;padding: 5px 0 20px 0;">
|
||||
|
||||
|
||||
<van-button type="danger" plain style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(4)">拒绝
|
||||
</van-button>
|
||||
<van-button color="RGB(8,23,118)" plain style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(1)">
|
||||
退回
|
||||
</van-button>
|
||||
<van-button color="RGB(8,23,118)" style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(5)">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</rxdj-mobile-info>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
dj_id: GetQueryString('dj_id'),
|
||||
handle: true,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'rxdj-mobile-info': httpVueLoader('/components/zgfw/rxdj/mobileRxdj.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doHandle(s) {
|
||||
this.formData.dj_sqzt = s
|
||||
if (this.formData.dj_xghshyj == "") {
|
||||
vant.Toast('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '标题',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast({
|
||||
duration: 0,
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
const res = await $.post('/platform/zgfw/rxdj/sh/doxghSh', this.formData)
|
||||
if (res.code === 0) {
|
||||
window.setTimeout(() => {
|
||||
loading.type = 'success'
|
||||
loading.message = '提交成功'
|
||||
window.history.back()
|
||||
}, 500)
|
||||
}
|
||||
|
||||
}).catch(() => {
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.formData = {
|
||||
dj_id: this.dj_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
dj_xghshyj: '',
|
||||
}
|
||||
const {data} = await $.get("/platform/zgfw/mobile/rxdj/audit/GetRxdjDjSqzt", {dj_id: this.dj_id})
|
||||
this.handle = data == 2
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,114 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="院级工会审核" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
<rxdj-mobile-info :dj_id="dj_id" title="院级工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="handle">
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.dj_fghshyj"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
</van-form>
|
||||
|
||||
<div style="display: flex;justify-content: space-around;padding: 5px 0 20px 0;">
|
||||
<van-button type="danger" plain style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(3)">拒绝
|
||||
</van-button>
|
||||
<van-button color="RGB(8,23,118)" plain style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(0)">
|
||||
退回
|
||||
</van-button>
|
||||
<van-button color="RGB(8,23,118)" style="flex: 1;margin: 0 10px 0 10px" @click="doHandle(2)">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</rxdj-mobile-info>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
dj_id: GetQueryString('dj_id'),
|
||||
handle: true,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'rxdj-mobile-info': httpVueLoader('/components/zgfw/rxdj/mobileRxdj.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doHandle(s) {
|
||||
this.formData.dj_sqzt = s
|
||||
if (this.formData.dj_fghshyj == "") {
|
||||
vant.Toast('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '标题',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast({
|
||||
duration: 0,
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
const res = await $.post('/platform/zgfw/rxdj/sh/dofghSh', this.formData)
|
||||
if (res.code === 0) {
|
||||
setTimeout(() => {
|
||||
loading.type = 'success'
|
||||
loading.message = '提交成功'
|
||||
window.history.back()
|
||||
|
||||
}, 500)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}).catch(() => {
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.formData = {
|
||||
dj_id: this.dj_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
dj_fghshyj: '',
|
||||
}
|
||||
const {data} = await $.get("/platform/zgfw/mobile/rxdj/audit/GetRxdjDjSqzt", {dj_id: this.dj_id})
|
||||
this.handle = data == 1
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,233 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 10px 16px 0;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.van-cell-group--inset .van-cell {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-cell-group--inset .group-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.scanner-wrap {
|
||||
margin: 20px 16px 0;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="扫描二维码"
|
||||
left-arrow
|
||||
></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-cell-group class="van-cell-group--inset">
|
||||
<van-cell>
|
||||
<span slot="title" class="group-title">用户信息</span>
|
||||
</van-cell>
|
||||
<van-cell title="姓名" icon="manager" :value="userInfo.username || '--'"></van-cell>
|
||||
<van-cell title="工号" icon="card" :value="userInfo.loginname || '--'"></van-cell>
|
||||
<van-cell title="性别" icon="more" :value="userInfo.sex || '--'"></van-cell>
|
||||
<van-cell title="单位" icon="wap-home" :value="userInfo.unitname || '--'"></van-cell>
|
||||
<van-cell title="分工会" icon="wap-home" :value="userInfo.unionname || '--'"></van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="van-cell-group--inset" v-if="showSignInfo">
|
||||
<van-cell>
|
||||
<span slot="title" class="group-title">签到信息</span>
|
||||
</van-cell>
|
||||
<van-cell title="是否签到" icon="more">
|
||||
<van-tag type="success" size="large" v-if="signInfo.isAttend===true">已签到</van-tag>
|
||||
<van-tag type="warning" size="large" v-else-if="signInfo.isAttend===false">未签到</van-tag>
|
||||
<span v-else-if="signInfo.isAttend===null">--</span>
|
||||
</van-cell>
|
||||
<van-cell title="签到时间" icon="clock" :value="signInfo.attendTime || '--'"></van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="van-cell-group--inset" v-if="showGiftInfo">
|
||||
<van-cell>
|
||||
<span slot="title" class="group-title">礼品发放信息</span>
|
||||
</van-cell>
|
||||
<van-cell title="是否发放" icon="more">
|
||||
<van-tag type="success" size="large" v-if="signInfo.isReceive===true">已发放</van-tag>
|
||||
<van-tag type="warning" size="large" v-else-if="signInfo.isReceive===false">未发放</van-tag>
|
||||
<span v-else-if="signInfo.isReceive===null">--</span>
|
||||
</van-cell>
|
||||
<van-cell title="发放时间" icon="clock" :value="signInfo.receiveTime || '--'"></van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="scanner-wrap">
|
||||
<van-button @click="scanner" type="primary" color="#1867b0" block icon="scan">扫描用户二维码</van-button>
|
||||
</div>
|
||||
|
||||
<div class="scanner-wrap" v-if="scannerResult.type===1">
|
||||
<van-button @click="confirmSign" type="primary" color="#1867b0" block icon="checked"
|
||||
:disabled="signInfo.isAttend===true">确认签到
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<div class="scanner-wrap" v-if="scannerResult.type===2">
|
||||
<van-button @click="grantGift" type="primary" color="#1867b0" block icon="point-gift"
|
||||
:disabled="signInfo.isReceive===true">发放礼品
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
signInfo: {
|
||||
isAttend: null,
|
||||
attendTime: null,
|
||||
isReceive: null,
|
||||
receiveTime: null
|
||||
},
|
||||
activityInfo: {},
|
||||
scannerResult: {},
|
||||
scannerResultKeys: ['userId', 'signId', 'activityId', 'activityCourseId', 'isMobileSign', 'signType', 'isReceiveGift', 'giftType']
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showSignInfo() {
|
||||
const {isMobileSign, signType} = this.scannerResult
|
||||
return isMobileSign === true && signType === 2
|
||||
},
|
||||
showGiftInfo() {
|
||||
const {isReceiveGift, giftType} = this.scannerResult
|
||||
return isReceiveGift === true && giftType === 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scanner() {
|
||||
this.userInfo = {}
|
||||
this.signInfo = {
|
||||
isAttend: null,
|
||||
attendTime: null
|
||||
}
|
||||
wxScannerQrCode.scanner().then(res => {
|
||||
this.checkScannerResult(res)
|
||||
}).catch(err => {
|
||||
vant.Dialog.alert({message: err}).then(() => {
|
||||
})
|
||||
})
|
||||
},
|
||||
checkScannerResult(resultStr) {
|
||||
const errMsg = '您扫描的信息不符合要求'
|
||||
if (typeof resultStr === 'string') {
|
||||
try {
|
||||
const result = JSON.parse(resultStr)
|
||||
const validResultKey = this.scannerResultKeys.every(k => {
|
||||
return result.hasOwnProperty(k)
|
||||
})
|
||||
if (validResultKey) {
|
||||
this.scannerResult = result
|
||||
const {
|
||||
userId,
|
||||
signId,
|
||||
activityId,
|
||||
isMobileSign,
|
||||
signType,
|
||||
isReceiveGift,
|
||||
giftType
|
||||
} = result
|
||||
if ((isMobileSign === true && signType === 2) || (isReceiveGift === true || giftType === 1)) {
|
||||
this.qrCodeInfo(userId, signId, activityId)
|
||||
} else {
|
||||
vant.Dialog.alert({message: '此活动不支持该方式'})
|
||||
}
|
||||
} else {
|
||||
vant.Dialog.alert({message: errMsg})
|
||||
}
|
||||
} catch (err) {
|
||||
vant.Dialog.alert({message: errMsg})
|
||||
}
|
||||
} else {
|
||||
vant.Dialog.alert({message: errMsg})
|
||||
}
|
||||
},
|
||||
async qrCodeInfo(userId, signId, activityId) {
|
||||
const toast = this.$toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
});
|
||||
const resp = await $.get(loc() + '/qrCodeInfo', {userId, signId, activityId})
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
if (resp.code === 0) {
|
||||
this.userInfo = resp.data.userInfo
|
||||
this.signInfo = resp.data.signInfo
|
||||
this.activityInfo = resp.data.activityInfo
|
||||
} else {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}, 500)
|
||||
},
|
||||
async signInfo() {
|
||||
const toast = this.$toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
});
|
||||
const resp = await $.get(loc() + '/signInfo', {signId: this.scannerResult.signId})
|
||||
toast.clear()
|
||||
if (resp.code === 0) {
|
||||
this.signInfo = resp.data.signInfo
|
||||
} else {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
},
|
||||
confirmSign() {
|
||||
vant.Dialog.confirm({title: '提示', message: '您确认该用户已签到吗?',}).then(async () => {
|
||||
const resp = await $.post(loc() + '/confirmSignByQrCode', {signId: this.scannerResult.signId})
|
||||
if (resp.code === 0) {
|
||||
this.signInfo = resp.data
|
||||
this.$toast.success('签到成功')
|
||||
} else {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
grantGift() {
|
||||
vant.Dialog.confirm({title: '提示', message: '您确认该用户已领取礼品吗?',}).then(async () => {
|
||||
const resp = await $.post(loc() + '/grantGiftByQrCode', {signId: this.scannerResult.signId})
|
||||
if (resp.code === 0) {
|
||||
this.signInfo = resp.data
|
||||
this.$toast.success('发放成功')
|
||||
// await this.signInfo()
|
||||
} else {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await wxScannerQrCode.initWxConfig(window.location.href)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,102 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-cell {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="提案详情"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<div style="padding-top: 20px">
|
||||
<van-collapse v-model="activeNames">
|
||||
<van-collapse-item title="提案基本信息" name="1">
|
||||
<van-cell title="提案名称">
|
||||
<div>
|
||||
{{tableData.proposalName}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="提案人">
|
||||
<div>
|
||||
{{tableData.createUserName}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="所在部门">
|
||||
<div>
|
||||
{{tableData.unionName}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="提案类型">
|
||||
<div>
|
||||
{{tableData.typeName}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="立案结果">
|
||||
<span>{{tableData.resultName ? tableData.resultName : '暂无'}}</span>
|
||||
</van-cell>
|
||||
<van-cell title="附议人">
|
||||
<div>
|
||||
<span v-if="!tableData.seconded">暂无</span>
|
||||
<span v-else v-for="(item,index) in tableData.seconded">
|
||||
{{ item.username }}
|
||||
{{ index + 1 === tableData.seconded.length ? '' : '、' }}
|
||||
</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-collapse v-model="ayActiveNames" border="false">
|
||||
<van-collapse-item title="案由" name="1">
|
||||
<div v-html="tableData.brief"></div>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
|
||||
<van-collapse v-model="jyActiveNames" border="false">
|
||||
<van-collapse-item title="建议或措施" name="1">
|
||||
<div v-html="tableData.measures"></div>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
ayActiveNames: [],
|
||||
jyActiveNames: [],
|
||||
activeNames: ['1'],
|
||||
tableData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkParams() {
|
||||
if (GetQueryString('id') === '') {
|
||||
vant.Toast.fail('参数不合法');
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.checkParams()) {
|
||||
$.post('/platform/mobile/proposal/compose/findOne', {id: GetQueryString('id')}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,290 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.handleicon {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="提案列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs v-model="active" @click="onClickActive">
|
||||
<van-tab title="未审核">
|
||||
<div>
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad"
|
||||
>
|
||||
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id,o.secondedId)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 75%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
||||
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
||||
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow ">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">立案结果</div>
|
||||
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
<van-tab title="已审核">
|
||||
<div>
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad"
|
||||
>
|
||||
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id,o.secondedId)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 75%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
||||
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
||||
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow ">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">立案结果</div>
|
||||
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
isAuditList: [
|
||||
{"text": "未审核", "value": false},
|
||||
{"text": "已审核", "value": true}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
await this.onLoad()
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
doSearch() {
|
||||
this.onLoad()
|
||||
},
|
||||
onClickActive(name) {
|
||||
|
||||
this.$set(this.pageForm, "isAudit", name)
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.tableData = []
|
||||
this.loading = true
|
||||
$.post('/platform/mobile/proposal/seconded/pageData', this.pageForm).then(res => {
|
||||
this.loading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.finished = true
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doAudit(flag, row) {
|
||||
const {id, secondedId} = row
|
||||
let res = flag === true ? '通过' : '拒绝'
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定' + res + '吗?',
|
||||
}).then(() => {
|
||||
$.post('/platform/proposal/transact/seconded/doAudit', {
|
||||
secondedId: secondedId,
|
||||
proposalId: id,
|
||||
flag: flag
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('提交成功!')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
openView(id, secondedId) {
|
||||
// window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
|
||||
window.location.href = '/platform/mobile/proposal/seconded/view?biz_key=' + secondedId + '&proposal_id=' + id + '&mobile=' + true
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
const a = await getProposalType()
|
||||
if (a) {
|
||||
a.forEach(v => {
|
||||
this.proposalTypeList.push({"text": v.typeName, "value": v.id})
|
||||
})
|
||||
this.proposalTypeList.unshift({"text": "所有类型", "value": null})
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", this.sessionList[0].value)
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList) {
|
||||
this.$set(this.pageForm, "delegationId", this.delegationList[0].value)
|
||||
}
|
||||
|
||||
}
|
||||
const aa = await getDictOptions("proposal_result")
|
||||
console.log(aa)
|
||||
if (a) {
|
||||
aa.forEach(v => {
|
||||
this.resultList.push({"text": v.name, "value": v.code})
|
||||
})
|
||||
this.resultList.unshift({"text": "所有结果", "value": null})
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,172 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="个人提案"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<van-cell v-for="o in tableData" class="cell-card">
|
||||
<div style="width: 100%;display: flex;flex-direction:row">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF;width: calc(100% - 50px)"
|
||||
@click="openView(o.id)">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
|
||||
<div v-if="o.stateCode==100&&!config.isAutoSubmit" @click="doSubmit(o)"
|
||||
style="width: 50px;display: flex;flex-direction:column;align-items: center;justify-content: center;font-size: 20px;color: #409EFF">
|
||||
<van-icon name="share"/>
|
||||
<div style="font-size: 8px">提交</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">提案状态</div>
|
||||
<div class="text-overflow">{{o.stateName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
config: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit(row) {
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '是否提交提案?',
|
||||
})
|
||||
.then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
message: '正在提交...',
|
||||
});
|
||||
|
||||
const {code, msg} = await $.post('/platform/proposal/transact/compose/doSubmit', {
|
||||
id: row.id,
|
||||
mannerCode: row.mannerCode
|
||||
})
|
||||
if (code === 0) {
|
||||
toast.icon = 'success'
|
||||
toast.message = '提交成功'
|
||||
await this.onRefresh()
|
||||
} else {
|
||||
toast.icon = 'fail'
|
||||
toast.message = msg
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
vant.Toast.clear();
|
||||
}, 500)
|
||||
});
|
||||
},
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
await this.onLoad()
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/mobile/proposal/compose/pageData', this.pageForm).then(res => {
|
||||
this.loading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.config = await getProposalConfig()
|
||||
console.log(this.config)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,394 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="团长审议"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入提案名称或者提案编号进行查询"
|
||||
>
|
||||
|
||||
</van-search>
|
||||
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.delegationId" :options="delegationList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalTypeId" :options="proposalTypeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs v-model="active" @click="onClickActive">
|
||||
<van-tab title="未审核">
|
||||
<div>
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 75%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
||||
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
||||
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow ">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">立案结果</div>
|
||||
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
<van-tab title="已审核">
|
||||
<div>
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad"
|
||||
>
|
||||
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 75%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">
|
||||
{{o.proposalName}}
|
||||
</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
<div style="font-size: 12px">附议人:{{o.secondedUserName}}</div>
|
||||
<div style="font-size: 12px">教代会届次:{{o.meetingName}}</div>
|
||||
<div style="font-size: 12px">代表团:{{o.delegationName}}</div>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow ">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">立案结果</div>
|
||||
<div class="text-overflow">{{ o.resultName ? o.resultName : '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
|
||||
<!-- <div>
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad"
|
||||
>
|
||||
<van-cell v-for="o in tableData" class="cell-card" @click="openView(o.id)">
|
||||
<div style="display: flex">
|
||||
<div style="width: 85%">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">{{o.proposalName}}</div>
|
||||
<div style="font-size: 12px">编号:{{o.proposalCode}}</div>
|
||||
</div>
|
||||
<div style="width: 15%;display: flex;align-items: center">
|
||||
<van-icon @click.stop="openAudit(o.id)">
|
||||
<svg t="1598756637099" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="2148" width="32" height="32">
|
||||
<path d="M876.214237 0z" fill="#ED8A19" p-id="2149"></path>
|
||||
<path d="M841.762712 121.491525h69.423729v69.423729h-69.423729z" fill="#E0E1E2"
|
||||
p-id="2150"></path>
|
||||
<path d="M856.949153 5.883661l0 0zM911.186441 0h-34.972204a34.538305 34.538305 0 0 0-19.265084 5.883661 34.434169 34.434169 0 0 0-15.186441 28.567864V121.491525h69.423729V0z"
|
||||
fill="#D75A4A" p-id="2151"></path>
|
||||
<path d="M911.186441 190.915254h69.423728v659.525424h-69.423728z" fill="#DB7B1B"
|
||||
p-id="2152"></path>
|
||||
<path d="M911.186441 121.491525h69.423728v69.423729h-69.423728z" fill="#C4C4C4"
|
||||
p-id="2153"></path>
|
||||
<path d="M980.610169 121.491525V34.451525A34.434169 34.434169 0 0 0 946.158644 0H911.186441v121.491525h69.423728z"
|
||||
fill="#B74C44" p-id="2154"></path>
|
||||
<path d="M373.152542 0h156.20339v86.779661h-156.20339z" fill="#303644"
|
||||
p-id="2155"></path>
|
||||
<path d="M841.762712 850.440678V34.711864h-312.40678v52.067797h-156.20339V34.711864h-329.762711v971.932204h815.728813v-125.830509z"
|
||||
fill="#424A60" p-id="2156"></path>
|
||||
<path d="M529.355932 34.711864v52.067797h-156.20339V34.711864h-121.491525v104.135594h399.186441V34.711864z"
|
||||
fill="#7383BF" p-id="2157"></path>
|
||||
<path d="M650.847458 121.491525v17.355933h-399.186441V121.491525h-121.491525v798.372882h642.169491V121.491525z"
|
||||
fill="#EDEADA" p-id="2158"></path>
|
||||
<path d="M251.661017 312.40678h156.20339a17.355932 17.355932 0 1 0 0-34.711865h-156.20339a17.355932 17.355932 0 1 0 0 34.711865zM251.661017 433.898305h86.779661a17.355932 17.355932 0 1 0 0-34.711864h-86.779661a17.355932 17.355932 0 1 0 0 34.711864zM598.779661 399.186441h-121.491525a17.355932 17.355932 0 1 0 0 34.711864h121.491525a17.355932 17.355932 0 1 0 0-34.711864zM395.541695 404.219661c-3.141424 3.280271-5.03322 7.792814-5.03322 12.322712 0 4.512542 1.891797 9.025085 5.03322 12.322712a17.182373 17.182373 0 0 0 12.322712 5.03322c4.512542 0 9.025085-1.909153 12.322712-5.03322 3.124068-3.297627 5.03322-7.810169 5.03322-12.322712 0-4.529898-1.909153-9.042441-5.03322-12.322712-6.595254-6.421695-18.050169-6.421695-24.645424 0zM680.526102 404.219661c-6.595254-6.421695-18.050169-6.421695-24.645424 0-3.141424 3.280271-5.03322 7.792814-5.03322 12.322712 0 4.512542 1.891797 9.025085 5.03322 12.322712a17.182373 17.182373 0 0 0 12.322712 5.03322c4.686102 0 9.025085-1.909153 12.322712-5.03322 3.124068-3.297627 5.03322-7.810169 5.03322-12.322712 0-4.529898-1.909153-9.042441-5.03322-12.322712zM442.576271 520.677966h-121.491525a17.355932 17.355932 0 1 0 0 34.711865h121.491525a17.355932 17.355932 0 1 0 0-34.711865zM239.338305 525.711186a17.112949 17.112949 0 0 0-5.03322 12.322712c0 4.512542 1.891797 9.025085 5.03322 12.322712 3.280271 3.124068 7.810169 5.03322 12.322712 5.033221s9.025085-1.909153 12.322712-5.033221a17.546847 17.546847 0 0 0 0-24.645424c-6.595254-6.421695-18.050169-6.421695-24.645424 0z"
|
||||
fill="#CEC9AE" p-id="2159"></path>
|
||||
<path d="M347.552542 627.191322c-38.026847 19.785763-50.818169 57.621695-55.469559 96.880814l-21.538712-18.05017c-17.026169-14.266576-41.723661 10.15322-24.541288 24.558644l48.700746 40.803797c11.489627 9.632542 29.088542 3.662102 29.626576-12.270644 1.266983-37.610305 3.072-82.319186 40.751729-101.93139 19.855186-10.361492 2.290983-40.317831-17.529492-29.991051zM509.639593 715.411525c-9.025085-16.141017-28.498441-24.142102-46.652746-19.004745-23.690847 6.69939-51.738034 35.440814-68.312949 1.839728-9.910237-20.080814-39.831864-2.481898-29.973695 17.512136 8.920949 18.084881 26.033898 31.205966 46.322983 33.531661 10.535051 1.197559 19.386576-0.225627 29.296814-3.922441 7.046508-2.638102 33.375458-23.118102 39.345898-12.444203 10.916881 19.54278 40.890576 2.048 29.973695-17.512136z"
|
||||
fill="#7383BF" p-id="2160"></path>
|
||||
<path d="M980.610169 850.440678h-138.847457l69.423729 121.491525z" fill="#EBD6BD"
|
||||
p-id="2161"></path>
|
||||
<path d="M893.830508 1006.644068a17.355932 17.355932 0 1 0 34.711865 0v-69.423729h-34.711865v69.423729z"
|
||||
fill="#4C4C4C" p-id="2162"></path>
|
||||
<path d="M841.762712 190.915254h69.423729v659.525424h-69.423729z" fill="#ED8A19"
|
||||
p-id="2163"></path>
|
||||
</svg>
|
||||
</van-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">教代会届次</div>
|
||||
<div class="text-overflow">{{o.meetingName}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray">提案类型</div>
|
||||
<div class="text-overflow">{{o.typeName}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray">提案状态</div>
|
||||
<div class="text-overflow">{{o.stateName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-dialog v-model="show" title="团长审核" @confirm="doHandle" @cancel="show=!show" show-cancel-button
|
||||
:before-close="validateForm">
|
||||
<van-form ref="handleForm" @submit="doHandle">
|
||||
<van-field
|
||||
maxlength="50"
|
||||
rows="5"
|
||||
autosize
|
||||
type="textarea"
|
||||
show-word-limit
|
||||
v-model="formData.opinion"
|
||||
name="tzsyqk"
|
||||
label="意见"
|
||||
placeholder="请输入您的意见"
|
||||
:rules="[{ required: true, message: '请输入审核意见' }]"
|
||||
></van-field>
|
||||
<van-field name="state" label="结果">
|
||||
<template #input>
|
||||
<van-radio-group v-model="state" direction="horizontal">
|
||||
<van-radio name="0">通过</van-radio>
|
||||
<van-radio name="2">退回</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</van-dialog>
|
||||
|
||||
-->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
pageForm: {
|
||||
isAudit: false
|
||||
},
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
sessionList: [],
|
||||
delegationList: [],
|
||||
proposalTypeList: [],
|
||||
resultList: [],
|
||||
isAuditList: [
|
||||
{"text": "未审核", "value": false},
|
||||
{"text": "已审核", "value": true}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
await this.onLoad()
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
doSearch() {
|
||||
this.onLoad()
|
||||
},
|
||||
onClickActive(name) {
|
||||
|
||||
this.$set(this.pageForm, "isAudit", name)
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.tableData = []
|
||||
this.loading = true
|
||||
$.post('/platform/mobile/proposal/delegation/pageData', this.pageForm).then(res => {
|
||||
this.loading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openAudit(id) {
|
||||
this.formData = {
|
||||
proposalId: id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
opinion: '',
|
||||
sign: '',
|
||||
}
|
||||
this.state = '0'
|
||||
this.show = true
|
||||
},
|
||||
validateForm(action, done) {
|
||||
done(false)
|
||||
},
|
||||
async doHandle() {
|
||||
this.$refs['handleForm'].validate().then(valid => {
|
||||
$.post('/platform/proposal/transact/audit/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
flag: this.state === 0
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.show = false
|
||||
this.pageForm = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
}
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
vant.Toast.success('审核成功!')
|
||||
} else {
|
||||
vant.Toast.error('审核失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
// window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
|
||||
window.location.href = '/platform/mobile/proposal/delegation/view?biz_key=' + id + '&proposal_id=' + id + '&mobile=' + true
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
const a = await getProposalType()
|
||||
if (a) {
|
||||
a.forEach(v => {
|
||||
this.proposalTypeList.push({"text": v.typeName, "value": v.id})
|
||||
})
|
||||
this.proposalTypeList.unshift({"text": "所有类型", "value": null})
|
||||
this.$set(this.pageForm, "proposalTypeId", this.proposalTypeList[0].value)
|
||||
}
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", this.sessionList[0].value)
|
||||
this.delegationList = await mProposal.getDelegation(this.pageForm.sessionId)
|
||||
if (this.delegationList) {
|
||||
this.$set(this.pageForm, "delegationId", this.delegationList[0].value)
|
||||
}
|
||||
|
||||
}
|
||||
const aa = await getDictOptions("proposal_result")
|
||||
if (a) {
|
||||
aa.forEach(v => {
|
||||
this.resultList.push({"text": v.name, "value": v.code})
|
||||
})
|
||||
this.resultList.unshift({"text": "所有结果", "value": null})
|
||||
this.$set(this.pageForm, "proposalResultCode", this.resultList[0].value)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,93 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
margin: 10px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.choose_button .button_text {
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--顶部轮播图-->
|
||||
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item>
|
||||
<van-image height="180" src="/assets/mobile/img/therapyRecuperation/index1.jpeg"></van-image>
|
||||
</van-swipe-item>
|
||||
<van-swipe-item>
|
||||
<van-image height="180" src="/assets/mobile/img/therapyRecuperation/index1.jpeg"></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<!--按钮导航-->
|
||||
<div class="choose_button van-doc-card">
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item @click="toLineList(item.value)" v-for="item in chooseButton">
|
||||
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
||||
<div class="button_text">{{item.label}}</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<!--疗休养描述-->
|
||||
<div class="van-doc-card" style="margin-top: 20px">
|
||||
<van-image width="190" height="43" src="/assets/mobile/img/therapyRecuperation/title.png"></van-image>
|
||||
<div>
|
||||
<p>
|
||||
<span style="background-color: rgb(255, 255, 255);"><strong>一、疗休养对象及活动地点</strong></span><br/>
|
||||
</p>
|
||||
<p>
|
||||
<span style="font-size: 14px;"> 疗休养对象及活动地点</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
chooseButton: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toLineList(index) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/mobileLineListPage?index=' + index
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,574 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.container img {
|
||||
background-size:contain;
|
||||
width:100%;
|
||||
height: auto;
|
||||
margin: 5px auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.header{
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.content {
|
||||
line-height: 26px;
|
||||
padding: 0px 20px 56px 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 19px;
|
||||
color: #505050;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
border-color: grey;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.van-skeleton {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.van-skeleton__content {
|
||||
height: 600px;
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
.van-skeleton__row, .van-skeleton__title {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.family_join {
|
||||
background-color: #ff976a;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 20px;
|
||||
height: calc(100% - 40px - 46px - 60px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.van-tabs__wrap {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab.van-tab--active {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab {
|
||||
border-right: 0 !important;
|
||||
}
|
||||
|
||||
.top_icon {
|
||||
position: fixed;
|
||||
bottom: 80px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.van-field__control {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.companionList_empty_text {
|
||||
text-align: center;
|
||||
padding: 10px 0px;
|
||||
font-size: 14px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.header div span {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.header :last-child {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养-线路介绍"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--线路详情-->
|
||||
<van-skeleton title :loading="skeLoading" :row="12">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<van-tag size="large" color="#1867b0" style="color: white;margin-right: 6px">{{moment(lineData.playEndTime).diff(moment(lineData.playStartTime), 'day')}}日</van-tag>
|
||||
{{lineData.lineName}}
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<div>
|
||||
<span class="line_label">成团人数:</span>
|
||||
{{lineData.minimumGroupSize ? lineData.minimumGroupSize : 0}}人
|
||||
</div>
|
||||
<div>
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + lineData.signUpUserFamilyNum + '(家属' + lineData.signUpUserFamilyNum + '人)'}}
|
||||
</div>
|
||||
<div>
|
||||
<span>报名时间:</span>
|
||||
{{moment(lineData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.signUpEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div>
|
||||
<span>出行时间:</span>
|
||||
{{moment(lineData.playStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.playEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div v-html="lineData.content" class="content"></div>
|
||||
</div>
|
||||
</van-skeleton>
|
||||
|
||||
<!--置顶图标-->
|
||||
<image v-if="btnFlag" @click="backTop" src="/assets/mobile/svg/therapyRecuperation/top.svg" class="top_icon"></image>
|
||||
|
||||
<!--底部报名按钮-->
|
||||
<div class="footer" v-if="fromUrlByMy != 'edit'">
|
||||
<van-button v-if="moment().unix() <= moment(lineData.signUpEndTime).unix()" @click="join" class="join">我要报名</van-button>
|
||||
<van-button v-if="moment().unix() > moment(lineData.signUpEndTime).unix()" class="join">报名结束</van-button>
|
||||
</div>
|
||||
|
||||
<!--报名弹出框-->
|
||||
<van-popup v-model:show="joinPopup" position="right" class="joinPopup">
|
||||
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="疗休养报名"></van-nav-bar>
|
||||
<div class="join_content">
|
||||
|
||||
<van-form @submit="joinSubmit">
|
||||
|
||||
<!--基础信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="身份证号" name="idCard" :rules="[{ required: true, message: '请填写身份证号' }]" placeholder="请填写身份证号" v-model="formData.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" :rules="[{ required: true, message: '请填写手机号' }]" placeholder="请填写手机号" v-model="formData.mobile"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field label="报名线路" readonly v-model="formData.lineName"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--床位信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
床位信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field @click="self = true; roomVisible = true" readonly is-link label="房间" name="bedType" placeholder="请选择房间" v-model="formData.bedInfo.bedType"
|
||||
:rules="[{ required: true, message: '请选择房间' }]"></van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'" @click="self = true; bedVisible = true" readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位" v-model="formData.bedInfo.bedNum"
|
||||
:rules="[{ required: true, message: '请选择床位' }]"></van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'" :rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开" v-model="formData.bedInfo.otherSleepUser"
|
||||
:rules="[{ required: true, message: '请填写意向拼房人' }]"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--随行人信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header" style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="float:left;">随行人信息</span>
|
||||
<div>
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length > 0" class="van-card-body">
|
||||
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
|
||||
<van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)">
|
||||
<van-field label="姓名" name="userName" placeholder="请填写姓名" v-model="item.userName"
|
||||
:rules="[{ required: true, message: '请填写姓名' }]"></van-field>
|
||||
<!--<van-field label="工号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>-->
|
||||
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age"
|
||||
:rules="[{ required: true, message: '请填写年龄' }]"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.sex">
|
||||
<van-radio name="男" shape="square">男</van-radio>
|
||||
<van-radio name="女" shape="square">女</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="身份证号" name="idCard" placeholder="请填写身份证号" :rules="[{ required: true, message: '请填写身份证号' }]" v-model="item.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" placeholder="请填写手机号" :rules="[{ required: true, message: '请填写手机号' }]" v-model="item.mobile"></van-field>
|
||||
<van-field @click="companionVisible = true" readonly is-link label="与本人关系" name="relation"
|
||||
placeholder="随行人与本人关系" v-model="item.relation"
|
||||
:rules="[{ required: true, message: '请选择与本人关系' }]"></van-field>
|
||||
|
||||
<van-field @click="self = false; roomVisible = true" readonly is-link label="房间" name="bedType" placeholder="请选择房间"
|
||||
v-model="item.bedInfo.bedType"></van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'" @click="self = false; bedVisible = true" readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位" v-model="item.bedInfo.bedNum"></van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'" :rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开" v-model="item.bedInfo.otherSleepUser"></van-field>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length == 0" class="companionList_empty_text">
|
||||
<span>
|
||||
如有随行人出行,请添加随行人
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<!--房间类型弹出框-->
|
||||
<van-popup position="bottom" round v-model="roomVisible">
|
||||
<van-picker
|
||||
title="入住房间" show-toolbar
|
||||
:columns="roomColumns"
|
||||
@confirm="roomConfirm"
|
||||
@cancel="roomCancel">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--床位弹出框-->
|
||||
<van-popup position="bottom" round v-model="bedVisible">
|
||||
<van-picker
|
||||
title="床位" show-toolbar
|
||||
:columns="bedColumns"
|
||||
@confirm="bedConfirm"
|
||||
@cancel="bedVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--随行人关系弹出框-->
|
||||
<van-popup position="bottom" round v-model="companionVisible">
|
||||
<van-picker
|
||||
title="与本人关系" show-toolbar
|
||||
:columns="companionColumns"
|
||||
@confirm="(value, index) => {formData.companionList[active].relation = value; companionVisible = false}"
|
||||
@cancel="companionVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
roomColumns: ['大床房', '标准间'],
|
||||
bedColumns: ['1', '2'],
|
||||
companionColumns: ['亲属', '朋友'],
|
||||
bedVisible: false,
|
||||
roomVisible: false,
|
||||
companionVisible: false,
|
||||
joinPopup: false,
|
||||
skeLoading: true,
|
||||
id: '',
|
||||
lineData: {},
|
||||
formData: {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
lineName: '',
|
||||
takePartInLineId: '',
|
||||
takePartInUnionId: '',
|
||||
companionList:[],
|
||||
bedInfo: {},
|
||||
},
|
||||
self: true,
|
||||
btnFlag: false,
|
||||
index: 0,
|
||||
scrollTop: 0,
|
||||
fromUrlByMy: '',
|
||||
enrollId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
roomCancel() {
|
||||
if(!this.self) {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = ''
|
||||
}
|
||||
this.roomVisible = false
|
||||
},
|
||||
roomConfirm(value, index) {
|
||||
if(this.self) {
|
||||
this.formData.bedInfo.bedType = value
|
||||
} else {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = value
|
||||
}
|
||||
this.roomVisible = false
|
||||
},
|
||||
bedConfirm(value, index) {
|
||||
if(this.self) {
|
||||
this.formData.bedInfo.bedNum = value
|
||||
} else {
|
||||
this.formData.companionList[this.active].bedInfo.bedNum = value
|
||||
}
|
||||
this.bedVisible = false
|
||||
},
|
||||
validator(value) {
|
||||
return value != null
|
||||
},
|
||||
async joinSubmit() {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if(item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForLine', {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if(resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
}
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, 500)
|
||||
if(resp.code === 0) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
addCompanion() {
|
||||
this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}})
|
||||
},
|
||||
delCompanion() {
|
||||
this.formData.companionList.splice(this.active, 1)
|
||||
},
|
||||
async join() {
|
||||
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
id: this.enrollId,
|
||||
takePartInLineId: this.lineData.id,
|
||||
takePartInUnionId: this.takePartInUnionId
|
||||
}),
|
||||
})
|
||||
if(re.code !== 0) {
|
||||
vant.Toast(re.msg)
|
||||
return
|
||||
}
|
||||
if(this.fromUrlByMy !== 'editDo') {
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "${@shiro.getPrincipalProperty('idcard')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
lineName: this.lineData.lineName,
|
||||
takePartInLineId: this.lineData.id,
|
||||
takePartInUnionId: this.takePartInUnionId,
|
||||
companionList:[],
|
||||
bedInfo: {},
|
||||
}
|
||||
}
|
||||
this.joinPopup = true
|
||||
},
|
||||
async getData() {
|
||||
const res = await $.get('/platform/theRapyRecuperation/line/enroll/selectLineAllInfo', {
|
||||
lineId: this.id,
|
||||
usUnionId: this.takePartInUnionId
|
||||
})
|
||||
if(res.code === 0) {
|
||||
this.lineData = res.data
|
||||
this.formData.lineName = this.lineData.lineName
|
||||
this.formData.takePartInLineId = this.lineData.id
|
||||
this.skeLoading = false
|
||||
}
|
||||
},
|
||||
// 点击图片回到顶部方法,加计时器是为了过渡顺滑
|
||||
backTop () {
|
||||
const that = this
|
||||
let timer = setInterval(() => {
|
||||
let speed = Math.floor(-that.scrollTop / 5)
|
||||
document.documentElement.scrollTop = document.body.scrollTop = that.scrollTop + speed
|
||||
if (that.scrollTop === 0) {
|
||||
clearInterval(timer)
|
||||
}
|
||||
}, 16)
|
||||
},
|
||||
// 为了计算距离顶部的高度,当高度大于100显示回顶部图标,小于100则隐藏
|
||||
scrollToTop () {
|
||||
const that = this
|
||||
that.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
|
||||
that.btnFlag = that.scrollTop > 100;
|
||||
},
|
||||
//修改时查询报名信息,进行回显
|
||||
async findSignUpInfoById() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
|
||||
if(res.code === 0) {
|
||||
this.formData = res.data
|
||||
if(this.formData.bedInfo === null) {
|
||||
this.formData.bedInfo = {}
|
||||
}
|
||||
if(this.formData.companionList) {
|
||||
this.formData.companionList.forEach(item => {
|
||||
if(item.bedInfo === null) {
|
||||
item.bedInfo = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = getQueryString('id') ? getQueryString('id') : ''
|
||||
this.index = getQueryString('index') ? getQueryString('index') : ''
|
||||
//编辑传出来的参数
|
||||
this.fromUrlByMy = getQueryString('fromUrlByMy') ? getQueryString('fromUrlByMy') : ''
|
||||
this.enrollId = getQueryString('enrollId') ? getQueryString('enrollId') : ''
|
||||
this.takePartInUnionId = getQueryString('takePartInUnionId') ? getQueryString('takePartInUnionId') : ''
|
||||
if(this.enrollId) {
|
||||
await this.findSignUpInfoById()
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
mounted () {
|
||||
window.addEventListener('scroll', this.scrollToTop)
|
||||
},
|
||||
destroyed () {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,338 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
margin: 10px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 16px 10px;
|
||||
display: flex;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.content-right {
|
||||
width: calc(100% - 150px);
|
||||
max-width: calc(100% - 150px);
|
||||
padding-left: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cr-title {
|
||||
/*max-height: 40px;*/
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.choose_button .button_text {
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.van-tag {
|
||||
padding: 2px 7px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #1867b0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.no_active {
|
||||
background-color: #e7e9f0;
|
||||
color: #69707a;
|
||||
}
|
||||
|
||||
.van-list {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-row {
|
||||
text-align: center;
|
||||
color: #1867b0;
|
||||
font-weight: bold;
|
||||
padding: 0px 0px 10px 0px;
|
||||
font-family: cursive;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="疗休养线路"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--按钮导航-->
|
||||
<div class="choose_button van-doc-card">
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item @click="pageForm.theRapyRecuperationType = item.value; getData()" v-for="item in chooseButton">
|
||||
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
||||
<div :style="pageForm.theRapyRecuperationType == item.value ? 'color: #1867b0; font-weight: bold' : 'color: black; font-weight: normal'"
|
||||
class="button_text">{{item.label}}</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:immediate-check="true"
|
||||
@load="onLoad"
|
||||
finished-text="没有更多了"
|
||||
v-model="loading">
|
||||
<div @click="findOne(o)" class="list-card" v-for="o in tableData">
|
||||
<div class="content">
|
||||
<van-image
|
||||
height="100"
|
||||
radius="8"
|
||||
:src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + o.fileId"
|
||||
width="150">
|
||||
</van-image>
|
||||
<div v-if="pageForm.theRapyRecuperationType != '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.lineName}}</span>
|
||||
<div>
|
||||
<van-tag color="#1867b0">{{moment(o.playEndTime).diff(moment(o.playStartTime), 'day')}}日</van-tag>
|
||||
<van-tag color="#1867b0">{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.usUnionName}}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<!--<div class="union">
|
||||
<span>组织形式:</span>{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.usUnionName}}
|
||||
</div>-->
|
||||
<div class="concat">
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' + o.signUpUserFamilyNum + '人)'}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系方式:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType == '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.travelAgencyName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="concat">
|
||||
<span>联系人:</span>{{o.contact}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系电话:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<!--<div class="mobile">
|
||||
<span>邮箱:</span>{{o.email}}
|
||||
</div>-->
|
||||
<div class="union" style="margin-top: 0">
|
||||
<span>官网:</span><span style="color: #0e5996"
|
||||
@click.stop="window.open(o.officialWebsite.indexOf('http') !== -1 ? o.officialWebsite : 'https://' + o.officialWebsite)">{{o.officialWebsite}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="pageForm.theRapyRecuperationType == '2'">
|
||||
<van-row gutter="20">
|
||||
<van-col @click="" span="12" style="border-right: 1px lightgrey solid"></van-col>
|
||||
<van-col span="12">
|
||||
<van-button @click="join(o)" plain round size="mini" type="info">我要报名</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<div v-if="['0', '1', 0 , 1].includes(pageForm.theRapyRecuperationType)" class="footer">
|
||||
<van-button @click="pageForm.lineUnionType = 2; unionPop = true" :class="pageForm.lineUnionType == 2 ? 'active' : 'no_active'">其他工会线路</van-button>
|
||||
<van-button @click="pageForm.lineUnionType = 1; getData()" :class="pageForm.lineUnionType == 1 ? 'active' : 'no_active'">本工会线路</van-button>
|
||||
</div>
|
||||
|
||||
<van-popup position="bottom" round v-model:show="unionPop">
|
||||
<van-picker
|
||||
title="选择分工会" show-toolbar
|
||||
:columns="unionColumns"
|
||||
@confirm="onConfirm"
|
||||
@cancel="unionPop = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unionColumns: [],
|
||||
unionPop: false,
|
||||
chooseButton: [],
|
||||
pageForm: {
|
||||
theRapyRecuperationType: 0,
|
||||
lineUnionType: 1,
|
||||
unionId: "${@shiro.getPrincipalProperty('union').getId()}",
|
||||
},
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
lineData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async join(o) {
|
||||
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
takePartInTravelAgencyId: o.id,
|
||||
}),
|
||||
})
|
||||
if(re.code !== 0) {
|
||||
vant.Toast(re.msg)
|
||||
return
|
||||
}
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const sendData = {
|
||||
takePartInTravelAgencyId: o.id,
|
||||
}
|
||||
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForTravelAgency', {
|
||||
enroll: JSON.stringify(sendData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if(resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
}
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, 500)
|
||||
if(resp.code === 0) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.pageForm.theRapyRecuperationType
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
onConfirm(value, index) {
|
||||
this.pageForm.unionId = value.value
|
||||
this.getData()
|
||||
this.unionPop = false
|
||||
},
|
||||
async findOne(o) {
|
||||
if(this.pageForm.theRapyRecuperationType != '2') {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.id + '&index=' + this.pageForm.theRapyRecuperationType
|
||||
+ '&takePartInUnionId=' + o.takePartInUnionId
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
this.loading = true
|
||||
if(this.pageForm.lineUnionType === 1) {
|
||||
this.pageForm.unionId = "${@shiro.getPrincipalProperty('union').getId()}"
|
||||
}
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/pageData', this.pageForm)
|
||||
|
||||
if (res.code === 0 && res.data) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageForm.theRapyRecuperationType = getQueryString('index')
|
||||
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
||||
const unions = await getUnions(null)
|
||||
unions.forEach(item => {
|
||||
this.unionColumns.push({text: item.unionname, value: item.id})
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,433 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
margin: 10px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 16px 10px;
|
||||
display: flex;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.content-right {
|
||||
width: calc(100% - 150px);
|
||||
max-width: calc(100% - 150px);
|
||||
padding-left: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cr-title {
|
||||
/*max-height: 40px;*/
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.choose_button .button_text {
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #1867b0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.no_active {
|
||||
background-color: #e7e9f0;
|
||||
color: #69707a;
|
||||
}
|
||||
|
||||
.van-row {
|
||||
text-align: center;
|
||||
color: #1867b0;
|
||||
font-weight: bold;
|
||||
padding: 0px 0px 10px 0px;
|
||||
font-family: cursive;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.van-list {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.popVisible {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.pop_footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.pop_footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.van-tag {
|
||||
padding: 2px 7px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.cus_content {
|
||||
height: calc(100% - 40px - 46px - 60px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="我的疗休养"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--按钮导航-->
|
||||
<div class="choose_button van-doc-card">
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item @click="pageForm.theRapyRecuperationType = item.value; getData()" v-for="item in chooseButton">
|
||||
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
||||
<div :style="pageForm.theRapyRecuperationType == item.value ? 'color: #1867b0; font-weight: bold' : 'color: black; font-weight: normal'"
|
||||
class="button_text">{{item.label}}</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:immediate-check="true"
|
||||
@load="onLoad"
|
||||
finished-text="没有更多了"
|
||||
v-model="loading">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<div @click="findOne(o)" class="content">
|
||||
|
||||
<van-image
|
||||
height="100"
|
||||
radius="8"
|
||||
:src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + o.fileId"
|
||||
width="150"
|
||||
></van-image>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType != '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.lineName}}</span>
|
||||
<div>
|
||||
<van-tag color="#1867b0">{{moment(o.playEndTime).diff(moment(o.playStartTime), 'day')}}日</van-tag>
|
||||
<van-tag color="#1867b0">{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.signUpUnionName}}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<!--<div class="union">
|
||||
<span>分工会:</span>{{o.signUpUnionName}}
|
||||
</div>-->
|
||||
<!--<div class="concat">
|
||||
<span>时间:</span>{{o.YEAR}}
|
||||
</div>-->
|
||||
<!--<div class="concat">
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' + o.signUpUserFamilyNum + '人)'}}
|
||||
</div>-->
|
||||
<div class="mobile">
|
||||
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系方式:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>随行家属:</span>{{o.companionUserNames ? o.companionUserNames : '无'}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType == '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.travelAgencyName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="concat">
|
||||
<span>联系人:</span>{{o.contact}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系电话:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<!--<div class="mobile">
|
||||
<span>邮箱:</span>{{o.email}}
|
||||
</div>-->
|
||||
<div class="union" style="margin-top: 0">
|
||||
<span>官网:</span><span style="color: #0e5996"
|
||||
@click.stop="window.open(o.officialWebsite.indexOf('http') !== -1 ? o.officialWebsite : 'https://' + o.officialWebsite)">{{o.officialWebsite}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-row gutter="20" v-if="o.isTakePartIn == true">
|
||||
<van-col v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() < moment(o.changeEndTime).unix()" @click="edit(o)" span="8" style="border-right: 1px lightgrey solid">修 改</van-col>
|
||||
<van-col v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() >= moment(o.changeEndTime).unix()" span="8"
|
||||
style="color: grey; border-right: 1px lightgrey solid">修 改</van-col>
|
||||
<van-col @click="cancel(o)" :span="pageForm.theRapyRecuperationType != '2' ? 8 : 12" style="border-right: 1px lightgrey solid">取 消</van-col>
|
||||
<van-col @click="satisfaction(o)" :span="pageForm.theRapyRecuperationType != '2' ? 8 : 12">满意度反馈</van-col>
|
||||
</van-row>
|
||||
<van-row gutter="20" v-if="o.isTakePartIn == false">
|
||||
<van-col v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() < moment(o.changeEndTime).unix()" @click="edit(o)" span="12" style="border-right: 1px lightgrey solid">修 改</van-col>
|
||||
<van-col v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() >= moment(o.changeEndTime).unix()" span="12"
|
||||
style="color: grey; border-right: 1px lightgrey solid">修 改</van-col>
|
||||
<van-col v-if="pageForm.theRapyRecuperationType == '2'" span="12"></van-col>
|
||||
<van-col @click="cancel(o)" span="12">取 消</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<div class="footer">
|
||||
<van-button @click="pageForm.signUpStateId = 1; getData()" :class="pageForm.signUpStateId == 1 ? 'active' : 'no_active'">已报名</van-button>
|
||||
<van-button @click="pageForm.signUpStateId = 2; getData()" :class="pageForm.signUpStateId == 2 ? 'active' : 'no_active'">已参加</van-button>
|
||||
<van-button @click="pageForm.signUpStateId = 3; getData()" :class="pageForm.signUpStateId == 3 ? 'active' : 'no_active'">未参加</van-button>
|
||||
</div>
|
||||
|
||||
<van-popup class="popVisible" position="right" v-model="popVisible">
|
||||
<van-nav-bar @click-left="popVisible = false" fixed left-arrow placeholder title="满意度评分"></van-nav-bar>
|
||||
<div class="cus_content">
|
||||
<van-field name="rate" label="旅行社评分">
|
||||
<template #input>
|
||||
<van-rate v-model="satisfactionForm.evaluationForTravelAgency" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="rate" label="路线评分">
|
||||
<template #input>
|
||||
<van-rate v-model="satisfactionForm.evaluationForLine" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="rate" label="风景评分">
|
||||
<template #input>
|
||||
<van-rate v-model="satisfactionForm.evaluationForJourney" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-model="satisfactionForm.feedbackContent"
|
||||
rows="4"
|
||||
autosize
|
||||
label="其他建议"
|
||||
type="textarea"
|
||||
maxlength="100"
|
||||
placeholder="请输入其他建议"
|
||||
show-word-limit>
|
||||
</van-field>
|
||||
</div>
|
||||
|
||||
<div class="pop_footer">
|
||||
<van-button @click="satisfactionSubmit" class="cus_button">提交评分</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
popVisible: false,
|
||||
chooseButton: [],
|
||||
pageForm: {
|
||||
theRapyRecuperationType: 0,
|
||||
signUpStateId: 1,
|
||||
},
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
satisfactionForm: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
satisfaction(o) {
|
||||
this.satisfactionForm = {
|
||||
id: o.id,
|
||||
evaluationForJourney: o.evaluationForJourney ? o.evaluationForJourney * 1 : '',
|
||||
evaluationForLine: o.evaluationForLine ? o.evaluationForLine * 1 : '',
|
||||
evaluationForTravelAgency: o.evaluationForTravelAgency ? o.evaluationForTravelAgency * 1 : '',
|
||||
feedbackContent: o.feedbackContent ? o.feedbackContent : '',
|
||||
}
|
||||
this.popVisible = true
|
||||
},
|
||||
async satisfactionSubmit() {
|
||||
for (const key in this.satisfactionForm) {
|
||||
if(key !== 'feedbackContent' && this.satisfactionForm[key] === '') {
|
||||
vant.Toast('请先评分再提交')
|
||||
return
|
||||
}
|
||||
}
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/doFeedBack', this.satisfactionForm)
|
||||
if(res.code === 0) {
|
||||
this.popVisible = false
|
||||
vant.Toast('操作成功')
|
||||
this.getData()
|
||||
}else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
},
|
||||
async edit(o) {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
takePartInLineId: o.takePartInLineId,
|
||||
id: o.id,
|
||||
takePartInUnionId: o.takePartInUnionId
|
||||
}),
|
||||
})
|
||||
if(res.code === 0) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.takePartInLineId +
|
||||
'&index=' + this.pageForm.theRapyRecuperationType + '&enrollId=' + o.id + '&fromUrlByMy=editDo' +
|
||||
'&takePartInUnionId=' + o.takePartInUnionId
|
||||
} else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
},
|
||||
async cancel(o) {
|
||||
if(this.pageForm.theRapyRecuperationType != '2') {
|
||||
const re = await $.post('/platform/theRapyRecuperation/line/enroll/canDelete/' + o.id)
|
||||
if(re.code !== 0) {
|
||||
vant.Toast(re.msg)
|
||||
return
|
||||
}
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: '您确定要取消此报名吗?',
|
||||
}).then(async () => {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + o.id)
|
||||
if(res.code === 0) {
|
||||
vant.Toast('取消成功')
|
||||
this.getData()
|
||||
}else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
async findOne(o) {
|
||||
if(this.pageForm.theRapyRecuperationType != '2') {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.takePartInLineId + '&fromUrlByMy=edit&takePartInUnionId=' + o.takePartInUnionId
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
this.loading = true
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/mySignUpPageData', this.pageForm)
|
||||
|
||||
if (res.code === 0 && res.data) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageForm.theRapyRecuperationType = getQueryString('index') ? getQueryString('index') : 1
|
||||
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,263 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-image {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
padding: 13px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.van-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-tab {
|
||||
-webkit-flex: none;
|
||||
}
|
||||
|
||||
.van-tab--active {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-tabs__nav--line {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
padding: 13px 13px 50px 13px;
|
||||
background-color: white;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.content_title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pre_text {
|
||||
white-space: break-spaces;
|
||||
padding-left: 7px;
|
||||
/*margin-top: 30px;*/
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.custable {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.custable td {
|
||||
text-align: center;
|
||||
height: 10px;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
padding: 0 10px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center !important;
|
||||
font-weight: bold;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.custable tr:nth-child(odd) {
|
||||
background-color: #eff1f5;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-top: 1px solid #000000;
|
||||
border-left: 1px solid #000000;
|
||||
border-collapse: collapse; /*设置单元格的边框合并为1*/
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid #000000;
|
||||
border-right: 1px solid #000000;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #000000;
|
||||
border-right: 1px solid #000000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动详情" left-arrow
|
||||
@click-left="location.replace('/platform/mobile/trainSignUpActivity/trainList')"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--<van-image :height="$(window).height() * 0.28" v-if="this.activity.cover && this.activity.cover.filepath" :src="'${AppFileDomain!}' + this.activity.cover.filepath"></van-image>
|
||||
<van-image :height="$(window).height() * 0.28" v-else src=""></van-image>-->
|
||||
<van-image height="186" src="/assets/mobile/img/3quhtakfd4heeqsk6irqhft60p.png"></van-image>
|
||||
<div class="title">{{activity.activityName}}</div>
|
||||
|
||||
<van-tabs v-model:active="tabActive" shrink>
|
||||
<van-tab title="详细信息" name="a">
|
||||
<!--<div class="content_title">关于{{activity.activityName}}的通知</div>-->
|
||||
<div class="pre_text" v-html="activity.introduce"></div>
|
||||
<!--<div v-for="(value, key, index) in activityMap" style="margin-bottom: 30px">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
{{key}}<span style="color: #1867b0">(左划查看更多)</span>
|
||||
</div>
|
||||
<div style="width: 100%; overflow-x: auto">
|
||||
<table class="custable">
|
||||
<tr>
|
||||
<td>序号</td>
|
||||
<td>{{trainType}}名称</td>
|
||||
<!–<td>课次</td>–>
|
||||
<td>时间</td>
|
||||
<td>{{trainType}}地点</td>
|
||||
<td>{{trainType === '培训班' ? '讲师' : '负责人'}}</td>
|
||||
</tr>
|
||||
<tr v-for="(o, num) in value">
|
||||
<td>{{num + 1}}</td>
|
||||
<td>{{o.courseName}}</td>
|
||||
<!–<td>{{o.courseTimeList.length}}</td>–>
|
||||
<td style="line-height: 26px;">
|
||||
<div v-for="t in o.timeList">{{t}}</div>
|
||||
</td>
|
||||
<td>{{o.courseLocation}}</td>
|
||||
<td>{{o.courseInstructor}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>-->
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-button @click="toSign" color="#1867b0" block style="position: fixed; bottom: 0; z-index: 2">去报名</van-button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
trainType: '培训班',
|
||||
trainTypeList: [],
|
||||
tabActive: 'a',
|
||||
activityId: '',
|
||||
activity: {},
|
||||
activityMap: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne() {
|
||||
const resp = await $.get('/platform/mobile/trainSignUpActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: 0
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activity = resp.data
|
||||
const type = this.trainTypeList.find(o => o.code === this.activity.trainType)
|
||||
this.trainType = type ? type.name : '培训班'
|
||||
//将数据按校区分组
|
||||
for (const item of this.activity.courseList) {
|
||||
|
||||
//item.courseName = item.courseName.indexOf('校区') !== -1 ? item.courseName.substr(item.courseName.indexOf('校区') + 2) : item.courseName
|
||||
const key = item.campus
|
||||
if (this.activityMap[key] === undefined) {
|
||||
let array = []
|
||||
array.push(item)
|
||||
this.activityMap[key] = array
|
||||
} else {
|
||||
this.activityMap[key].push(item)
|
||||
}
|
||||
|
||||
let timeArray = []
|
||||
if (item.courseTimeList && item.courseTimeList.length > 0) {
|
||||
for (const time of item.courseTimeList) {
|
||||
const t = this.getWeek(time.courseDate.substr(0, 10)) + ' ' + time.courseStartTime.substr(11, 5) + '~' + time.courseEndTime.substr(11, 5)
|
||||
timeArray.push(t)
|
||||
}
|
||||
item.timeList = Array.from(new Set(timeArray))
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async toSign() {
|
||||
const nowTime = moment().unix()
|
||||
if (nowTime < moment(this.activity.activitySignUpStartTime).unix()) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动报名还未开始',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
// vant.Toast('活动报名还未开始')
|
||||
return
|
||||
}
|
||||
if (nowTime > moment(this.activity.activitySignUpEndTime).unix()) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动报名已结束',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
// vant.Toast('活动报名已结束')
|
||||
return
|
||||
}
|
||||
|
||||
if (this.activity.activityGroupId != null) {
|
||||
const isExist = await getScopeUser(this.activity.activityGroupId)
|
||||
if (!isExist) {
|
||||
if(this.activity.activityGroupName.indexOf('两癌筛查') !== -1) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '哇偶,只有年龄满35周岁不足64周岁的女神才可以报名喔',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
}else {
|
||||
vant.Dialog.alert({
|
||||
title: '参加人员范围',
|
||||
message: this.activity.activityGroupName,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
window.location.href = '/platform/mobile/trainSignUpActivity/trainInfo?activityId=' + this.activity.id + '&endTime=' + this.activity.activitySignUpEndTime
|
||||
},
|
||||
getWeek(dateString) {
|
||||
var dateArray = dateString.split("-");
|
||||
const date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
|
||||
return "周" + "日一二三四五六".charAt(date.getDay());
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.trainTypeList = await getDictOptions("trainSignUpType")
|
||||
this.activityId = getQueryString('activityId')
|
||||
this.findOne()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,744 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-doc-card-my {
|
||||
margin: 14px;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px 16px 10px;
|
||||
min-height: 100px;
|
||||
max-height: 360px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #cccdd1;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-family: -webkit-pictograph, serif;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.popup {
|
||||
width: 90%;
|
||||
max-height: 70%;
|
||||
overflow-y: auto;
|
||||
border-radius: 10px;
|
||||
padding: 2px 10px 12px 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
width: 35px;
|
||||
height: 38px;
|
||||
margin-right: 20px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.van-card__content {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.van-card__title {
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
background-color: transparent;
|
||||
position: relative;
|
||||
transform: translate(0%, 50%);
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 20px;
|
||||
/*height: calc(100% - 40px - 46px - 60px);*/
|
||||
height: calc(100vh - 46px - 50px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card-two {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
.footer .van-button {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.amap-logo {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.amap-copyright {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar :title="trainType + '列表'" left-arrow
|
||||
@click-left="location.replace('/platform/mobile/trainSignUpActivity/trainList?type=' + type)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-dropdown-menu active-color="#1867b0">
|
||||
<van-dropdown-item @change="tabChange" v-model="activityStatus"
|
||||
:options="activityOptions"></van-dropdown-item>
|
||||
<van-dropdown-item @change="courseChange" v-model="courseType" :options="courseOptions"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<!--<van-notice-bar
|
||||
left-icon="volume-o"
|
||||
text="温馨提示:每人只能填报一项活动">
|
||||
</van-notice-bar>-->
|
||||
|
||||
<template>
|
||||
<div id="parentDiv" v-model="loading" v-if="tableData.courseList && tableData.courseList.length>0">
|
||||
|
||||
<template v-for="o in tableData.courseList">
|
||||
<div style="position: relative"
|
||||
:class="activityStatus !== '1' ? 'van-doc-card' : 'van-doc-card-my'">
|
||||
<div>
|
||||
<van-tag type="primary" size="medium">
|
||||
{{getCourseTypeName(o)}}
|
||||
</van-tag>
|
||||
<span style="font-weight: bold; font-size: 14px">
|
||||
{{o.courseName}}
|
||||
<span v-if="activityStatus !== '1'">
|
||||
(
|
||||
<span style="color: red">余{{o.coursePeopleNumber - (o.hasRegisterNum + o.courseReservedNumber)}}</span>
|
||||
/{{o.coursePeopleNumber}}人)
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="o.campus">
|
||||
<span class="train-title">校  区:</span>
|
||||
<span>{{o.campus}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title" v-if="activity.addressName">{{activity.addressName}}:</span>
|
||||
<span class="train-title" v-else>地  点:</span>
|
||||
<span>{{o.courseLocation}}</span>
|
||||
</div>
|
||||
<div v-if="activity.id !== '69d7e3a952784b328b911b60cee08b14'">
|
||||
<span class="train-title">联 系 人:</span>
|
||||
<span>{{o.courseInstructor}}</span>
|
||||
</div>
|
||||
<!-- <div v-if="activity.addressName!='上车'">-->
|
||||
<!-- <span class="train-title">时  间:</span>-->
|
||||
<!-- <span v-if="o.courseTimeList && o.courseTimeList.length > 1" @click="trainClick(o)"-->
|
||||
<!-- style="color: #1867b0">点我查看</span>-->
|
||||
<!-- <span @click="trainClick(o)" v-if="o.courseTimeList && o.courseTimeList.length === 1"-->
|
||||
<!-- style="color: #1867b0">-->
|
||||
<!-- {{o.courseTimeList[0].courseStartTime.substring(11, 19) + ' ~ ' + o.courseTimeList[0].courseEndTime.substring(11, 19)}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<div>
|
||||
<span @click.stop="showPic(FILE_DOMAIN + '/fileStreamPreview?id=' + tableData.wechat.id)"
|
||||
v-if="o.isSign === true && tableData.wechat"
|
||||
style="color: #dd6363">点我查看微信群二维码</span>
|
||||
</div>
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
v-if="activityStatus !== '1' && o.isSign === false"
|
||||
style="position: absolute; left: 74%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="signUp(o)">
|
||||
我要报名
|
||||
</van-button>
|
||||
|
||||
<van-button type="primary" color="#dd6363" round size="mini"
|
||||
v-if="o.isSign === true && moment().valueOf() < moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 74%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="cancel(o)">
|
||||
取消报名
|
||||
</van-button>
|
||||
|
||||
<image v-if="activityStatus !== '1' && o.isSign === true && moment().valueOf() >= moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 77%; top: 58%;"
|
||||
src="/assets/mobile/svg/train/sign_up.svg"></image>
|
||||
|
||||
<div @click="trainClick(o)" v-if="activityStatus === '1'"
|
||||
style="text-align: center; line-height: 40px; width: 40px; height: 40px;display: inline-block; font-size: 14px;
|
||||
position: absolute; right: -10px; top: 8%; background-color: #00c698; border-radius: 7px; color: white">
|
||||
签到
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
|
||||
<van-popup v-model:show="popupShow" class="popup">
|
||||
<!--<div @click="vant.Dialog.alert({message: '上课前30分钟,下课前30分钟。',theme: 'round-button',confirmButtonColor: '#1867b0'})"
|
||||
style="font-size: 12px; color: grey; text-align: right; position: relative; top: 8px; right: 6px; z-index: 2;">签到规则 ></div>-->
|
||||
|
||||
<div id="map" v-if="course.isMobileSign === true && course.signType === 3"
|
||||
style="width: 100%; height: 250px"></div>
|
||||
|
||||
<van-card
|
||||
:title="item.courseStartTime.substring(0, 10) + '(' +
|
||||
getWeek(item.courseStartTime.substring(0, 10)) + ')'" v-for="(item,index) in qdArray"
|
||||
thumb="/assets/mobile/svg/train/qd1.svg">
|
||||
<template #desc>
|
||||
<div style="margin-top: 7px">
|
||||
{{item.courseStartTime.substring(11, 19) + ' ~ ' + item.courseEndTime.substring(11, 19)}}
|
||||
</div>
|
||||
<div v-if="item.courseLocationCoordinates && item.isMobileSign === true">
|
||||
<van-button type="primary" color="#1867b0" round size="mini" @click.stop="showQRCode(item, 2)"
|
||||
v-if="activityStatus === '1' && item.isAttend === true && course.giftType === 1"
|
||||
style="position: absolute; right: 65px; top: 25%; width: 60px; height: 25px">
|
||||
礼品码
|
||||
</van-button>
|
||||
<van-button type="primary" color="#e1e1e1" round size="mini"
|
||||
v-if="activityStatus === '1' && item.isAttend === false && findTime(item) === false"
|
||||
style="position: absolute; right: 0; top: 25%; width: 60px; height: 25px">
|
||||
未签到
|
||||
</van-button>
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
v-if="activityStatus === '1' && item.isAttend === false && findTime(item) === true"
|
||||
style="position: absolute; right: 0; top: 25%; width: 60px; height: 25px"
|
||||
@click.stop="signIn(item)">
|
||||
签 到
|
||||
</van-button>
|
||||
<van-button type="primary" color="#61ce98" round size="mini"
|
||||
v-if="activityStatus === '1' && item.isAttend === true"
|
||||
style="position: absolute; right: 0; top: 25%; width: 60px; height: 25px">
|
||||
已签到
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-card>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<van-popup class="joinPopup" position="right" v-model:show="joinPopup">
|
||||
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="活动报名"></van-nav-bar>
|
||||
<div class="join_content">
|
||||
<van-form @submit="joinSubmit" :show-error-message="false">
|
||||
<div class="van-doc-card-two" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="所在单位" readonly v-model="formData.unitName"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field label="性别" readonly v-model="formData.sex"></van-field>
|
||||
<van-field label="联系方式" required :rules="[{ required: true, message: '请填写联系方式' }]"
|
||||
placeholder="请填写联系方式" v-model="formData.mobile"></van-field>
|
||||
<train-dynamic-form v-model="dynamicColumnsData" ref="trainDynamicForm"></train-dynamic-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
let pointArray = []
|
||||
let locations = null
|
||||
let map = null
|
||||
let geolocation = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
allColumnsData: [],
|
||||
dynamicColumnsData: [],
|
||||
trainType: '培训班',
|
||||
trainTypeList: [],
|
||||
actionShow: false,
|
||||
timeList: [],
|
||||
activityId: '',
|
||||
activityStatus: '0',
|
||||
joinPopup: false,
|
||||
popupShow: false,
|
||||
courseText: '',
|
||||
qdInfoList: [],
|
||||
course: [],
|
||||
qdArray: [],
|
||||
activityOptions: [{text: '全部', value: '0'}, {text: '我报名的', value: '1'}],
|
||||
courseOptions: [],
|
||||
courseType: '0',
|
||||
tempArray: [],
|
||||
activitySignUpStartTime: null,
|
||||
choose: {},
|
||||
activity: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'train-dynamic-form': httpVueLoader('/components/mobile/common/TrainDynamicForm.vue?v=' + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
getCourseTypeName(o) {
|
||||
const b = this.courseOptions.find(item => item.value === o.courseType)
|
||||
return b ? b.text : ''
|
||||
},
|
||||
//二维码
|
||||
showQRCode(item, type) {
|
||||
const o = {
|
||||
userId: item.userId,
|
||||
signId: item.id,
|
||||
activityId: item.activityId,
|
||||
activityCourseId: item.activityCourseId,
|
||||
isMobileSign: item.isMobileSign,
|
||||
signType: item.signType,
|
||||
isReceiveGift: item.isReceiveGift,
|
||||
giftType: item.giftType,
|
||||
type: type,
|
||||
}
|
||||
// 生成二维码的 base64 编码
|
||||
const content = jrQrcode.getQrBase64(JSON.stringify(o))
|
||||
vant.ImagePreview([content])
|
||||
},
|
||||
showPic(url) {
|
||||
vant.ImagePreview([url])
|
||||
},
|
||||
findTime(o) {
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
return o.courseStartTime.substr(0, 10) === today
|
||||
},
|
||||
findQd() {
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
const day = this.qdInfoList.find(item => {
|
||||
return item.courseStartTime.substr(0, 10) === today
|
||||
})
|
||||
if (day === undefined) {
|
||||
return 3
|
||||
} else {
|
||||
return day.isAttend ? 2 : 1
|
||||
}
|
||||
},
|
||||
async signIn(o) {
|
||||
if (o.signType === 1) {
|
||||
//调相机扫一扫
|
||||
wxScannerQrCode.scanner().then(async res => {
|
||||
if (res) {
|
||||
const course = JSON.parse(res)
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/codeSign', {
|
||||
codeCourseId: course.courseId,
|
||||
clickCourseId: o.courseId,
|
||||
id: o.id,
|
||||
})
|
||||
if(resp.code === 0) {
|
||||
vant.Dialog.alert({message: '签到成功'})
|
||||
await this.pageData()
|
||||
o.isAttend = true
|
||||
} else {
|
||||
vant.Dialog.alert({message: resp.msg})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
vant.Dialog.alert({message: err})
|
||||
})
|
||||
}
|
||||
if (o.signType === 2) {
|
||||
this.showQRCode(o, 1)
|
||||
}
|
||||
if (o.signType === 3) {
|
||||
//获取当前时间,年月日
|
||||
const formatString = 'YYYY-MM-DD HH:mm:ss'
|
||||
const parsedTime = moment(o.courseStartTime, formatString)
|
||||
// 使用 subtract() 方法获取给定时间之前的 30 分钟
|
||||
const thirtyMinutesAgo = parsedTime.subtract(30, 'minutes').valueOf()
|
||||
const end = moment(o.courseEndTime, formatString).valueOf()
|
||||
const now = moment().valueOf()
|
||||
|
||||
if (now < thirtyMinutesAgo || now > end) {
|
||||
vant.Toast('请在规定时间签到')
|
||||
return
|
||||
}
|
||||
const that = this
|
||||
geolocation.getCurrentPosition(async function (status, result) {
|
||||
if (status === 'complete') {
|
||||
locations = [result.position.getLng(), result.position.getLat()]
|
||||
//用户当前位置
|
||||
const userPoint = new AMap.LngLat(result.position.getLng(), result.position.getLat())
|
||||
//课程位置
|
||||
const coursePoint = new AMap.LngLat(that.course.courseLocationCoordinates[0], that.course.courseLocationCoordinates[1])
|
||||
const distance = Math.round(userPoint.distance(coursePoint))
|
||||
if (distance > 250) {
|
||||
vant.Toast('请在250米内签到')
|
||||
return
|
||||
}
|
||||
const array = [result.position.getLng(), result.position.getLat()]
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/doQd', {
|
||||
id: o.id,
|
||||
courseId: that.course.id,
|
||||
point: JSON.stringify(array),
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
await that.pageData()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
that.popupShow = false
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//获取当前坐标点
|
||||
getPoint() {
|
||||
/*return new Promise((resolve, reject) => {
|
||||
window.navigator.geolocation.getCurrentPosition(position => {
|
||||
pointArray = [position.coords.longitude, position.coords.latitude]
|
||||
resolve(pointArray)
|
||||
}, error => {
|
||||
vant.Toast(error.message)
|
||||
pointArray = []
|
||||
reject([])
|
||||
})
|
||||
})*/
|
||||
geolocation.getCurrentPosition(function(status,result){
|
||||
if(status === 'complete'){
|
||||
//alert(result.position)
|
||||
locations = result.position
|
||||
}else{
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: "您确定要<span style='color: red'>取消【" + o.courseName + "】</span>吗?\n一旦确认,可不能反悔了哟!",
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/cancelSignUp', {
|
||||
activityId: o.activityId,
|
||||
courseId: o.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
async signUp(o) {
|
||||
this.choose = o
|
||||
const res = await $.post('/platform/mobile/trainSignUpActivity/validateSignUp', {
|
||||
cndId: o.conditionStructureId,
|
||||
courseId: o.id,
|
||||
})
|
||||
if(res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if(res.code !== 3) {
|
||||
return
|
||||
}
|
||||
}
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
}
|
||||
this.$set(this.formData, "activityId", o.activityId)
|
||||
this.$set(this.formData, "courseId", o.id)
|
||||
|
||||
const column = this.allColumnsData.find(x => x.id === o.courseType)
|
||||
this.dynamicColumnsData = column ? column.trainMobileSignColumnList : []
|
||||
this.dynamicColumnsData.forEach(item => {
|
||||
item.columnValue = ''
|
||||
})
|
||||
this.joinPopup = true
|
||||
},
|
||||
async joinSubmit() {
|
||||
let valid = false
|
||||
try {
|
||||
await this.$refs.trainDynamicForm.$refs.form.validate()
|
||||
valid = true
|
||||
} catch (e) {
|
||||
valid = false
|
||||
}
|
||||
if (!valid) return
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您选择了【' + this.choose.courseName + '】\n一旦确认,可不能反悔了哟',
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const mobileColumnsValue = this.dynamicColumnsData.map(v => {
|
||||
return {
|
||||
columnName: v.columnName,
|
||||
columnValue: v.columnValue,
|
||||
columnCode: v.columnCode,
|
||||
columnFormType: v.columnFormType
|
||||
}
|
||||
})
|
||||
this.formData.mobileColumnsValue = JSON.stringify(mobileColumnsValue)
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/doSignUp', this.formData)
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.joinPopup = false
|
||||
}
|
||||
toast.clear()
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
trainClick(o) {
|
||||
this.timeList = o.courseTimeList
|
||||
this.course = o
|
||||
this.qdArray = this.activityStatus === '0' ? o.courseTimeList : this.qdInfoList.filter(item => {
|
||||
return item.courseId === o.id
|
||||
})
|
||||
if (o.signType === 3) {
|
||||
this.initMap(o)
|
||||
}
|
||||
this.popupShow = true
|
||||
},
|
||||
initMap(o) {
|
||||
if (o.courseLocationCoordinates && o.courseLocationCoordinates.length < 2) {
|
||||
return
|
||||
}
|
||||
this.$nextTick(async () => {
|
||||
// 地图初始化应该在地图容器div已经添加到DOM树之后
|
||||
map = new AMap.Map('map', {
|
||||
zoom: 12,
|
||||
center: o.courseLocationCoordinates,
|
||||
resizeEnable: true,
|
||||
scrollWheel: true,
|
||||
})
|
||||
|
||||
AMap.plugin('AMap.Geolocation', function() {
|
||||
geolocation = new AMap.Geolocation({
|
||||
// 是否使用高精度定位,默认:true
|
||||
enableHighAccuracy: true,
|
||||
// 设置定位超时时间,默认:无穷大
|
||||
timeout: 10000,
|
||||
// 定位按钮的停靠位置的偏移量,默认:Pixel(10, 20)
|
||||
buttonOffset: new AMap.Pixel(10, 20),
|
||||
// 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
|
||||
//zoomToAccuracy: true,
|
||||
// 定位按钮的排放位置, RB表示右下
|
||||
buttonPosition: 'RB',
|
||||
showCircle: false,
|
||||
//showButton: false,
|
||||
})
|
||||
map.addControl(geolocation);
|
||||
})
|
||||
|
||||
// 创建一个 Marker 实例:
|
||||
var marker = new AMap.Marker({
|
||||
position: new AMap.LngLat(o.courseLocationCoordinates[0], o.courseLocationCoordinates[1]), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
|
||||
title: '签到点'
|
||||
});
|
||||
|
||||
//获取当前坐标点
|
||||
await this.getPoint()
|
||||
|
||||
var circle = new AMap.Circle({
|
||||
center: new AMap.LngLat(o.courseLocationCoordinates[0], o.courseLocationCoordinates[1]), // 圆心位置
|
||||
radius: 250, // 圆半径
|
||||
borderWeight: 1,
|
||||
strokeOpacity: 1,
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
map.add(circle);
|
||||
// 缩放地图到合适的视野级别
|
||||
map.setFitView([circle])
|
||||
|
||||
// 多个点实例组成的数组
|
||||
var markerList = [marker];
|
||||
map.add(markerList);
|
||||
})
|
||||
},
|
||||
async pageData() {
|
||||
|
||||
const resp = await $.get('/platform/mobile/trainSignUpActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: this.activityStatus
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
this.tempArray = clone(this.tableData)
|
||||
const type = this.trainTypeList.find(o => o.code === this.tableData.trainType)
|
||||
this.trainType = type ? type.name : '培训班'
|
||||
} else {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
}
|
||||
await this.getQdInfoList()
|
||||
this.courseChange(this.courseType, 1)
|
||||
this.loading = false;
|
||||
},
|
||||
async getQdInfoList() {
|
||||
const resp = await $.get('/platform/mobile/trainSignUpActivity/getQdInfoList', {
|
||||
activityId: this.activityId,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.qdInfoList = resp.data
|
||||
}
|
||||
},
|
||||
getWeek(dateString) {
|
||||
var dateArray = dateString.split("-");
|
||||
const date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
|
||||
return "周" + "日一二三四五六".charAt(date.getDay());
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await $.post('/platform/trainSingUp/manage/type/getAllType', {})
|
||||
this.allColumnsData = resp.data
|
||||
return resp.data
|
||||
},
|
||||
async getCourseText() {
|
||||
const courseArray = await this.getAllType()
|
||||
this.courseOptions = []
|
||||
this.courseOptions.push({text: '全部类型', value: '0'})
|
||||
for (const item of courseArray) {
|
||||
if (item.personMaxRegisterNum > 0) {
|
||||
this.courseText += item.value + '报名最多选' + item.personMaxRegisterNum + '项,'
|
||||
}
|
||||
this.courseOptions.push({text: item.lxname, value: item.id})
|
||||
}
|
||||
this.courseText = this.courseText.substr(0, this.courseText.length - 1)
|
||||
},
|
||||
courseChange(value, item) {
|
||||
if (item === undefined) {
|
||||
this.tableData.courseList = []
|
||||
this.startLoading()
|
||||
}
|
||||
this.tableData.courseList = value === '0' ? this.tempArray.courseList : this.tempArray.courseList.filter(item => item.courseType === value)
|
||||
this.closeLoading()
|
||||
},
|
||||
async getActivity() {
|
||||
const resp = await $.get('/platform/mobile/trainSignUpActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: 0
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activity = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.trainTypeList = await getDictOptions("trainSignUpType")
|
||||
this.activityId = GetQueryString('activityId')
|
||||
this.type = GetQueryString('type')
|
||||
const time = GetQueryString('endTime')
|
||||
if (this.type === 'my') {
|
||||
this.activityOptions = [{text: '我报名的', value: '1'}]
|
||||
this.activityStatus = '1'
|
||||
} else {
|
||||
this.activityOptions = [{text: '全部', value: '0'}, {text: '我报名的', value: '1'}]
|
||||
this.activityStatus = new Date().getTime() > new Date(time).getTime() ? '1' : '0'
|
||||
}
|
||||
this.activitySignUpStartTime = GetQueryString('activitySignUpStartTime')
|
||||
vant.Toast.setDefaultOptions({duration: 2000});
|
||||
this.startLoading()
|
||||
this.pageData()
|
||||
this.getCourseText()
|
||||
this.getActivity()
|
||||
this.closeLoading()
|
||||
|
||||
//await wxScannerQrCode.initWxConfig(window.location.href)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,180 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin: 10px auto 0;
|
||||
width: 96%;
|
||||
border-radius: 10px;
|
||||
padding: 14px 12px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
flex: 0.6;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 5px 0px;
|
||||
border-color: #1867b0;
|
||||
}
|
||||
|
||||
.van-image__img {
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.van-image__error, .van-image__loading {
|
||||
height: 200px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动列表" left-arrow
|
||||
@click-left="location.replace('/mobile/index')"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.activityStatus" @change="tabChange">
|
||||
<van-tab title="全部" name="0"></van-tab>
|
||||
<van-tab v-if="type !== 'my'" title="报名进行中" name="1"></van-tab>
|
||||
<van-tab v-if="type === 'my'" title="进行中" name="3"></van-tab>
|
||||
<van-tab title="已结束" name="2"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
<div @click="welfareClick(o)">
|
||||
<div>
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover.id"
|
||||
style="display: contents"
|
||||
v-if="o.cover && o.cover.filepath"></van-image>
|
||||
<van-image src=""
|
||||
style="display: contents"
|
||||
v-else></van-image>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-ellipsis" style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
{{o.activityName}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="train-title">
|
||||
<span style="color: grey">年   度:</span>
|
||||
<span>{{o.year}}</span>
|
||||
</div>
|
||||
<div class="train-title">
|
||||
<span style="color: grey">活动对象:</span>
|
||||
<span>{{o.activityGroupName}}</span>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title">
|
||||
<span style="color: grey">报名时间:</span>
|
||||
<span>{{moment(o.activitySignUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.activitySignUpEndTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
</div>
|
||||
<div style="margin-top: 6px">
|
||||
<span style="color: grey">活动时间:</span>
|
||||
<span>{{moment(o.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.activityEndTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
type: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async welfareClick(o) {
|
||||
if (this.type === 'my') {
|
||||
window.location.href = '/platform/mobile/trainSignUpActivity/trainInfo' +
|
||||
'?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime + '&type=my' + '&startTime=' + o.activitySignUpStartTime
|
||||
} else {
|
||||
window.location.href = '/platform/mobile/trainSignUpActivity/activityInfo?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.type = GetQueryString('type')
|
||||
this.pageForm.type = this.type
|
||||
this.startLoading()
|
||||
this.pageForm.activityStatus = this.type === 'my' ? '3' : '1'
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,161 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
#app {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.topTitle {
|
||||
font-size: 16px;
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
max-width: calc(100% - 100px);
|
||||
}
|
||||
|
||||
.list-item > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.newest-video, .nav-button {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="视频资料"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="newest-video">
|
||||
<h4>{{typeName}}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-button">
|
||||
<van-button type="info" :plain="pageForm.searchType !== 'new'" size="small" @click="searchTypeClick('new')">
|
||||
最新视频
|
||||
</van-button>
|
||||
<van-button type="info" :plain="pageForm.searchType !== 'most'" size="small" @click="searchTypeClick('most')">
|
||||
播放最多
|
||||
</van-button>
|
||||
<van-button type="info" :plain="pageForm.searchType !== null" size="small" @click="searchTypeClick(null)">全部
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin: 20px auto 0 auto;position: relative">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="goVideoPage(o)">
|
||||
<div style="display: flex;padding-bottom: 10px" class="van-hairline--bottom">
|
||||
<van-image
|
||||
style="margin-right: 10px"
|
||||
width="90"
|
||||
height="90"
|
||||
:src="FILE_DOMAIN+'/fileStreamPreview?id='+o.cover"
|
||||
></van-image>
|
||||
<div class="list-item">
|
||||
<div style="font-size: 14px">{{o.title}}</div>
|
||||
<div class="van-ellipsis" style="color: darkgray;font-size: 13px">
|
||||
{{removeHTMLTag(o.description)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-tag plain type="primary">{{o.videoCount}}个视频</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/platform/trainEdu/include/include.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
typeName: null,
|
||||
videoTypeList: [],
|
||||
pageForm: {
|
||||
searchType: null
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const {data} = await $.get('/mobile/trainEducation/getAlbumList', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.mLoading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
searchTypeClick(val) {
|
||||
this.pageForm.searchType = val
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
goVideoPage(item) {
|
||||
window.location.href = '/mobile/trainEducation/videoPage?id=' + item.id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.videoTypeList = await getVideoType()
|
||||
const typeId = this.GetQueryString("id")
|
||||
const type = this.videoTypeList.find(v => v.id === typeId)
|
||||
this.typeName = type.typeName
|
||||
if (typeId) {
|
||||
this.$set(this.pageForm, 'typeId', typeId)
|
||||
await this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,124 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.newest-video {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
max-width: calc(100% - 100px);
|
||||
}
|
||||
|
||||
.list-item > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="培训教育"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<van-swiper>
|
||||
<van-swiper-item>
|
||||
<van-image
|
||||
fit="contain"
|
||||
:src="topImg" alt="">
|
||||
</van-image>
|
||||
</van-swiper-item>
|
||||
</van-swiper>
|
||||
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item v-for="item in videoTypeList"
|
||||
:url="'/mobile/trainEducation/AlbumList?id=' + item.id"
|
||||
:key="item.id"
|
||||
:icon="FILE_DOMAIN+'/fileStreamPreview?id='+item.icon"
|
||||
:text="item.typeName"></van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||
|
||||
<div class="newest-video">
|
||||
<h4>最新视频</h4>
|
||||
</div>
|
||||
|
||||
<div v-for="o in tableData" class="list-card" @click="goVideoPage(o)">
|
||||
<div style="display: flex;padding-bottom: 10px" class="van-hairline--bottom">
|
||||
<van-image
|
||||
style="margin-right: 10px"
|
||||
width="90"
|
||||
height="90"
|
||||
:src="FILE_DOMAIN+'/fileStreamPreview?id='+o.cover"
|
||||
></van-image>
|
||||
<div class="list-item">
|
||||
<div style="font-size: 14px">{{o.title}}</div>
|
||||
<div class="van-ellipsis" style="color: darkgray;font-size: 13px">
|
||||
{{removeHTMLTag(o.description)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-tag plain type="primary">{{o.videoCount}}个视频</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/platform/trainEdu/include/include.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
videoTypeList: [],
|
||||
topImg: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F05%2F55%2F78%2F725b1593ced0c43.jpg&refer=http%3A%2F%2Fbpic.588ku.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642838257&t=cce87815db1b5e740bce9dc9357c7eaa'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goVideoPage(item) {
|
||||
window.location.href = '/mobile/trainEducation/videoPage?id=' + item.id
|
||||
},
|
||||
async getNewVideo() {
|
||||
this.tableData = []
|
||||
const {data} = await $.get('/mobile/trainEducation/getNewestVideo')
|
||||
this.tableData.push(data)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const videoTypeList = await getVideoType()
|
||||
if (videoTypeList.length > 0) {
|
||||
videoTypeList.map(v => {
|
||||
if (v.files) {
|
||||
v.icon = JSON.parse(v.files)[0].id
|
||||
}
|
||||
})
|
||||
}
|
||||
this.videoTypeList = videoTypeList
|
||||
await this.getNewVideo()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,427 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.bottom-wrap {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 10px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.bottom-wrap button {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<!--<script src="/assets/platform/plugins/vod/vod-js-sdk-v6.js"></script>-->
|
||||
<!--<link href="/assets/platform/plugins/vod/tcplayer.min.css"/>-->
|
||||
<!--<script src="/assets/platform/plugins/vod/hls.min.0.13.2m.js"></script>-->
|
||||
<!--<script src="/assets/platform/plugins/vod/tcplayer.v4.3.0.min.js"></script>-->
|
||||
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.video-container {
|
||||
height: 300px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#player-container-id {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.van-tabs__wrap {
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
}
|
||||
|
||||
.album-description img {
|
||||
background-size: contain;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.video-list .van-cell__value {
|
||||
width: 50px;
|
||||
flex: unset;
|
||||
}
|
||||
|
||||
.video-list .van-cell__title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.descriptionCell .van-cell__title {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.descriptionCell p {
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.myWatchRecord {
|
||||
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="video-container">
|
||||
<video id="player-container-id" preload="auto"
|
||||
autoplay
|
||||
playsinline
|
||||
webkit-playsinline>
|
||||
</video>
|
||||
|
||||
<!-- <div v-if="!isPlay" style=" height: 100%;-->
|
||||
<!-- background: #000;-->
|
||||
<!-- position: absolute;-->
|
||||
<!-- top: 0;-->
|
||||
<!-- left: 0;-->
|
||||
<!-- right: 0;-->
|
||||
<!-- bottom: 0;">-->
|
||||
<!-- <van-image-->
|
||||
<!-- style="width: 90%;-->
|
||||
<!-- height: 100%;-->
|
||||
<!-- z-index: 999;"-->
|
||||
<!-- fit="contain"-->
|
||||
<!-- :src="FILE_DOMAIN+'/fileStreamPreview?id='+albumInfo.cover"-->
|
||||
<!-- ></van-image>-->
|
||||
<!-- <div class="tcp-skin">-->
|
||||
<!-- <div class="vjs-big-play-button">-->
|
||||
<!-- <div class="vjs-button-icon">-->
|
||||
<!-- <svg height="100%" width="100%" viewBox="0 0 484 348">-->
|
||||
<!-- <path class="draw-fill" transform="translate(4 4)"-->
|
||||
<!-- d="M383,124C350-42,122.3-40.5,90.6,123.5c-110.4,18.5-131,185,.6,216.5H381.6C519.7,310.7,494.1,137.8,383,124Z"></path>-->
|
||||
<!-- <path transform="translate(4 4)"-->
|
||||
<!-- d="M200.4,110.2c-9.4-5.8-19.6,2.7-19.4,11.7V256.2c0,8,10.4,16.7,19.4,10.8,2.2-1.4,111.8-65.9,114-67.3,7.4-4,10.1-15.8,0-22.2Z"-->
|
||||
<!-- style="fill:#fff ;"></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="tabIndex" sticky>
|
||||
<!-- <van-tab title="目录">-->
|
||||
<!-- <div style="height: 5px;background-color: #f6f7f9"></div>-->
|
||||
|
||||
<!-- <van-cell-group class="video-list">-->
|
||||
<!-- <van-cell v-for="(o,i) in videoList" :key="o.id" @click="playVideo(o)">-->
|
||||
<!-- <template #title>-->
|
||||
<!-- <van-tag plain type="primary" style="margin-right: 10px">视频</van-tag>-->
|
||||
<!-- <span style="margin-right: 10px">-->
|
||||
<!-- {{i+1}}.-->
|
||||
<!-- </span>-->
|
||||
<!-- <span>-->
|
||||
<!-- {{o.title}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #label>-->
|
||||
<!-- <!– {{getWatchStatus(o)}}–>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template>-->
|
||||
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
<!-- </van-cell-group>-->
|
||||
<!-- </van-tab>-->
|
||||
<van-tab title="介绍">
|
||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||
|
||||
<div style="padding: 16px">
|
||||
{{albumInfo.title}}
|
||||
</div>
|
||||
|
||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||
|
||||
<van-cell class="descriptionCell">
|
||||
<template #title>
|
||||
<div style="font-size: 14px">课程介绍</div>
|
||||
</template>
|
||||
<template #label>
|
||||
<div class="album-description" v-html="albumInfo.description"></div>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
</van-tab>
|
||||
<van-tab title="学习记录">
|
||||
<div style="height: 5px;background-color: #f6f7f9"></div>
|
||||
<van-cell-group class="video-list">
|
||||
<van-cell v-for="(o,i) in videoList" :key="o.id">
|
||||
<template #title>
|
||||
<van-tag plain type="primary" style="margin-right: 10px">视频</van-tag>
|
||||
<span style="margin-right: 10px">
|
||||
{{i+1}}.
|
||||
</span>
|
||||
<span>
|
||||
{{o.title}}
|
||||
</span>
|
||||
</template>
|
||||
<template #label>
|
||||
<div v-if="o.everyDayMaxWatchNum && o.everyDayMaxWatchNum>0"
|
||||
style="padding: 10px 0;color: #0a84ff;white-space: normal">
|
||||
本视频在活动结束时每天最多只会统计
|
||||
<span style="color: #0a84ff;font-weight: bold">{{o.everyDayMaxWatchNum}}</span>
|
||||
次完整观看记录,您可以无限制的观看。
|
||||
</div>
|
||||
<div v-for="(v,index) in groupBy(watchRecordList,v=>v.watchTime)" :key="index"
|
||||
class="myWatchRecord">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div>
|
||||
{{moment(v.key).format('YYYY年MM月DD日')}}
|
||||
</div>
|
||||
<div style="color: #000000;">
|
||||
观看次数
|
||||
<span style="font-weight: bold">{{v.items && v.items.filter(v=>v.finish).length}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<!-- <div class="bottom-wrap" v-show="isPlay">-->
|
||||
<!-- <van-button type="info" block @click="endLearn">上传学习记录</van-button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
// let player = null
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
typeName: null,
|
||||
videoTypeList: [],
|
||||
albumId: null,
|
||||
albumInfo: {},
|
||||
videoList: [],
|
||||
tabIndex: 0,
|
||||
currentVideo: {},
|
||||
myComment: {},
|
||||
watchRecordList: [],
|
||||
lastTime: 0,
|
||||
isPlay: false,
|
||||
|
||||
player: null,
|
||||
|
||||
vvv: []
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
methods: {
|
||||
async getVideoInfo() {
|
||||
const {data} = await $.get('/mobile/trainEducation/getVideoList', {albumId: this.albumId})
|
||||
this.vvv = data
|
||||
this.videoList = data
|
||||
},
|
||||
async getAlbumInfo() {
|
||||
const {data} = await $.get('/mobile/trainEducation/getAlbumInfo', {id: this.albumId})
|
||||
this.albumInfo = data
|
||||
},
|
||||
|
||||
//播放视频
|
||||
async playVideo(o) {
|
||||
this.isPlay = true
|
||||
|
||||
//判断当前视频是否看完
|
||||
if (this.player && this.player.currentTime() < this.currentVideo.fileDuration) {
|
||||
this.$modal.msg('看完本视频后才能接着看下一个')
|
||||
return
|
||||
}
|
||||
|
||||
this.currentVideo = o
|
||||
|
||||
const playVideo_ = (time = 0) => {
|
||||
this.$nextTick(async () => {
|
||||
let controlBar = TCPlayer.getComponent('controlBar');
|
||||
controlBar.prototype.options_ = {
|
||||
children: ['playToggle', 'volumePanel', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'liveDisplay', 'remainingTimeDisplay', 'customControlSpacer', 'chaptersButton', 'descriptionsButton', 'fullscreenToggle']
|
||||
}
|
||||
if (!this.player) {
|
||||
this.player = TCPlayer('player-container-id', {})
|
||||
}
|
||||
this.player.src(o.mediaUrl)
|
||||
this.player.play()
|
||||
|
||||
setTimeout(() => {
|
||||
this.player.currentTime(time)
|
||||
}, 100)
|
||||
|
||||
this.playEnd()
|
||||
})
|
||||
}
|
||||
|
||||
const v = this.watchRecordList.find(v => v.videoId === o.id)
|
||||
|
||||
if (v && v.finish) {
|
||||
playVideo_(0)
|
||||
// this.$modal.confirm('本视频您已学习完成,是否重新观看,不会影响到完成的学习记录').then(() => {
|
||||
// playVideo_(0)
|
||||
// })
|
||||
} else if (v && !v.finish) {
|
||||
playVideo_(v.watchDuration)
|
||||
} else {
|
||||
playVideo_(0)
|
||||
}
|
||||
},
|
||||
|
||||
playEnd() {
|
||||
this.player.on('ended', async () => {
|
||||
// const v = this.watchRecordList.find(v => v.videoId === this.currentVideo.id)
|
||||
// if (v.finish) {
|
||||
// return
|
||||
// }
|
||||
|
||||
const loading = this.$toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
message: '已完整学习本视频,自动上传中'
|
||||
})
|
||||
const resp = await this.addWatchRecord()
|
||||
if (resp.code === 0) {
|
||||
loading.message = '上传成功'
|
||||
loading.type = 'success'
|
||||
}
|
||||
setTimeout(() => {
|
||||
loading.clear()
|
||||
}, 2000)
|
||||
})
|
||||
},
|
||||
|
||||
//播放记录
|
||||
async addWatchRecord() {
|
||||
const params = {
|
||||
videoId: this.currentVideo.id,
|
||||
currentTime: parseInt(this.player.currentTime()),
|
||||
albumId: this.currentVideo.albumId
|
||||
}
|
||||
const resp = await $.post('/mobile/trainEducation/addWatchRecord', params)
|
||||
if (resp.code === 0) {
|
||||
this.getMyWatchRecord()
|
||||
return resp
|
||||
} else {
|
||||
this.$modal.msgError(resp.msg)
|
||||
}
|
||||
},
|
||||
//监听页面关闭 隐藏
|
||||
// watchPage() {
|
||||
// document.addEventListener('visibilitychange', () => {
|
||||
// if (document.visibilityState === 'hidden') {
|
||||
// if (this.player && this.currentVideo) {
|
||||
// this.addWatchRecord()
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
async getMyWatchRecord() {
|
||||
const {data} = await $.get('/mobile/trainEducation/getMyWatchRecord', {
|
||||
albumId: this.albumId
|
||||
})
|
||||
this.watchRecordList = data
|
||||
},
|
||||
getWatchStatus(video) {
|
||||
const v = this.watchRecordList.find(v => v.videoId === video.id)
|
||||
if (!v) {
|
||||
return '学习进度:还未开始学习'
|
||||
}
|
||||
if (v.finish) {
|
||||
return '学习进度:已完成'
|
||||
}
|
||||
if (v.videoId === this.currentVideo.id) {
|
||||
return '学习进度:正在学习中'
|
||||
}
|
||||
const percentage = (parseInt((v.watchDuration / (video.fileDuration - 1)).toFixed(2) * 100)) + "%"
|
||||
if (percentage === 0) {
|
||||
return '学习进度:还未开始学习'
|
||||
}
|
||||
return "学习进度:" + percentage
|
||||
},
|
||||
|
||||
endLearn() {
|
||||
const v = this.watchRecordList.find(v => v.videoId === this.currentVideo.id)
|
||||
console.log(v)
|
||||
// if (v && v.finish) {
|
||||
// this.$modal.msg('本视频您已学习完成,无需重复上传')
|
||||
// return
|
||||
// }
|
||||
|
||||
this.$modal.confirm('您是否要结束本视频学习?').then(() => {
|
||||
//暂停
|
||||
this.player.pause()
|
||||
//上传记录
|
||||
this.$modal.loading('上传中')
|
||||
this.addWatchRecord().then(resp => {
|
||||
console.log(resp)
|
||||
this.$modal.closeLoading()
|
||||
if (resp.code === 0) {
|
||||
this.$modal.msgSuccess('上传成功')
|
||||
} else {
|
||||
this.$modal.msgError('上传失败')
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
// this.watchPage()
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.albumId = id
|
||||
await this.getAlbumInfo()
|
||||
await this.getVideoInfo()
|
||||
await this.getMyWatchRecord()
|
||||
if (this.videoList && this.videoList.length > 0) {
|
||||
this.playVideo(this.videoList[0])
|
||||
} else {
|
||||
this.$toast('暂无视频学习')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user