first commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<el-table-column align="center" header-align="center" type="index" label="序号" width="80px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<!-- 在 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"
|
||||
/>
|
||||
<!-- 开启 safe-area-inset-bottom 属性 -->
|
||||
<van-number-keyboard safe-area-inset-bottom/>
|
||||
<title>智慧工会平台</title>
|
||||
|
||||
<!-- 引入样式文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.8/lib/index.css"/>
|
||||
|
||||
<!-- Vant -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@next"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vant@next/lib/vant.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<script src="/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<script src="${base!}/assets/platform/js/scannerQrCodeJs.js"></script>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="https://webapi.amap.com/maps?v=2.0&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.Geolocation"></script>
|
||||
</head>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
${layoutContent}
|
||||
</body>
|
||||
</html>
|
||||
@@ -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="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
@@ -0,0 +1,522 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="${lang,escape}">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
|
||||
<meta name="description" content="${AppName!}">
|
||||
<title>${AppName!}</title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/myframe/css/myframe.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/themify-icons.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/common.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/main.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/elmain.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/panel.css">
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wangeditor/wangEditor.css">
|
||||
<link rel="stylesheet" type="text/css" href="${base!}/assets/platform/plugins/viewer/viewer.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wp-upload-vue/css/wpupload.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wp-upload-vue/font/iconfont.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/vivify.min.css">
|
||||
<link href="${base!}/assets/platform/plugins/vue-cron/vcrontab.css" rel="stylesheet"/>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue-cron/vcrontab.umd.min.js"></script>
|
||||
<!-- import Vue before Element -->
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<!-- <script src="https://cdn.staticfile.org/vue/2.6.0/vue.js"></script>-->
|
||||
|
||||
<!-- vue-count-to -->
|
||||
<script src="${base!}/assets/platform/plugins/vue-count-to/vue-count-to.min.js"></script>
|
||||
|
||||
<!-- wpupload -->
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/font/iconfont.js"></script>
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/js/wpupload.js"></script>
|
||||
|
||||
<!-- import JavaScript -->
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/i18n/${lang,escape}.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/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/plugins/video/js/video.min.js"></script>
|
||||
|
||||
<!--g2-->
|
||||
<script src="/assets/platform/plugins/g2/g2.min.js?v=4.1.9"></script>
|
||||
<script src="/assets/platform/plugins/g2/data-set.js"></script>
|
||||
<script src="/assets/platform/plugins/g2/g2plot.js?v=1.0.0"></script>
|
||||
|
||||
<!--echars-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/echarts.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/echarts/infographic.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/westeros.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/walden.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/macarons.js"></script><!--主题-->
|
||||
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
|
||||
<script src="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/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=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.PlaceSearch"></script>
|
||||
|
||||
<!--viewer-->
|
||||
<script src="${base!}/assets/platform/plugins/viewer/viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/viewer/jquery-viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-qrcode/vue-qrcode.min.js"></script>
|
||||
|
||||
|
||||
<!-- pjax是异步加载html片段的工具,模拟前端路由机制 -->
|
||||
<script src="${base!}/assets/platform/plugins/pjax/jquery.pjax.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/myframe/js/myframe.js"></script>
|
||||
<!-- Array数组增加findIndex等方法,TreeTable用得到,兼容IE8 -->
|
||||
<script src="${base!}/assets/platform/plugins/polyfill/polyfill.js"></script>
|
||||
<!-- 时间日期处理工具类 -->
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<!-- 浏览器通知 -->
|
||||
<script src="${base!}/assets/platform/plugins/push/push.min.js"></script>
|
||||
<script src="${base!}/assets/platform/js/main.js?v=1.0.0"></script>
|
||||
<script src="${base!}/assets/platform/js/gh.js"></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!}/components/plugins/sysDict/DictData.js"></script>
|
||||
|
||||
<script src="https://cdn.staticfile.org/xlsx/0.18.5/xlsx.full.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
const base = "${base!}";
|
||||
const APP_DOMAIN = "${AppDomain!}";
|
||||
const FILE_DOMAIN = "${AppFileDomain!}";
|
||||
const AppMapCenterPointX = "${config.AppMapCenterPointX!}";
|
||||
const AppMapCenterPointY = "${config.AppMapCenterPointY!}";
|
||||
const isDisPlayCode = "${config.isDisPlayCode!}" === 'true'
|
||||
var loginPjax = "${@shiro.getPrincipalProperty('loginPjax')}";
|
||||
const LOGO_URL = "${config.logoUrl!}"
|
||||
|
||||
ELEMENT.locale(ELEMENT.lang['${lang,escape}']);
|
||||
|
||||
Vue.component('vuedraggable', window.vuedraggable)
|
||||
Vue.component('guava', httpVueLoader('/components/plugins/Guava.vue'))
|
||||
Vue.component('sign', httpVueLoader('/components/sign/sign.vue?v=2.0.0'))
|
||||
Vue.component('file-upload', httpVueLoader('/components/plugins/FileUpload.vue'))
|
||||
Vue.component('image-upload', httpVueLoader('/components/plugins/ImageUpload.vue'))
|
||||
Vue.component('dict-tag', httpVueLoader('/components/plugins/sysDict/DictTag.vue'))
|
||||
Vue.component('text-editor', httpVueLoader('/components/plugins/textEditor.vue'))
|
||||
|
||||
Vue.use(httpVueLoader)
|
||||
Vue.component(VueQrcode.name, VueQrcode)
|
||||
|
||||
const viewImage = function (filepath) {
|
||||
let image = new Image();
|
||||
image.src = APP_DOMAIN + FILE_STREAM_PREVIEW_ADDRESS + '?id=' + filepath;
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
};
|
||||
window.viewImage = viewImage;
|
||||
Vue.prototype.$viewImage = viewImage
|
||||
|
||||
//防止用户快速重复点击造成数据混乱 提供vue指令和js节流函数两种方式
|
||||
//控制此元素在一定时间内是否可成为鼠标的点击目标对象
|
||||
Vue.directive('throttle', {
|
||||
inserted(el, binding) {
|
||||
el.addEventListener('click', () => {
|
||||
if (el.style.pointerEvents !== 'none') {
|
||||
el.style.pointerEvents = 'none'
|
||||
window.setTimeout(() => {
|
||||
el.style.pointerEvents = ''
|
||||
}, 1200)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//提案初始化的值
|
||||
proposal.getProposalAllStateCode()
|
||||
proposal.getProposalEnableStateCode()
|
||||
proposal.getProposalNeedSignStateCode()
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="gallery-loader" style="background-color:transparent;">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<div id="mainApp" class="app">
|
||||
<header class="header header-fixed navbar" id="headerNavbar">
|
||||
<div class="brand">
|
||||
<a href="javascript:;" data-pjax class="navbar-brand" @click="goHome">
|
||||
<img src="${base!}/assets/platform/img/logo.png" alt=""
|
||||
style="width: 60%;height: 80%"
|
||||
class="o_img <!--#if(!@shiro.getPrincipalProperty('loginSidebar')){#-->o_hide<!--#}#-->">
|
||||
<span class="heading-font o_img <!--#if(@shiro.getPrincipalProperty('loginSidebar')){#-->o_hide<!--#}#-->">
|
||||
<img :src="LOGO_URL">
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-nav">
|
||||
<li style="padding:0 10px" class="vivify popIn duration-1500">
|
||||
<el-popover
|
||||
width="450"
|
||||
popper-class="appCenterPopover"
|
||||
placement="top-start"
|
||||
v-model="menuPopover"
|
||||
trigger="hover">
|
||||
<el-card shadow="never" class="appCenterCard">
|
||||
<template #header>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<div>
|
||||
<el-link :underline="false">应用中心</el-link>
|
||||
<i class="el-icon-edit" style="cursor: pointer;color: #1867b0"
|
||||
v-if="${@shiro.hasRole('sysadmin')}"
|
||||
@click="goSetAppCenter"></i>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-link @click="goHome" type="primary" :underline="false">工作台</el-link>
|
||||
<el-link @click="setUserDefaultEntranceModuleId" type="primary" :underline="false">
|
||||
设置为默认模块
|
||||
</el-link>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-row gutter="20">
|
||||
<el-col v-for="item in entranceModules" :span="8" style="margin-bottom: 5px">
|
||||
<div class="entranceDetail"
|
||||
:class="item.id==selectEntranceModule.id?'entranceDetail-selected':''"
|
||||
@click="enterEntranceModules(item)">
|
||||
<div class="entranceIcon">
|
||||
<el-image :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.icon[0].id"
|
||||
style="height: 50px;width: 50px;border-radius: 50%"></el-image>
|
||||
</div>
|
||||
{{item.moduleName}}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button type="primary" size="mini" @click="menuPopover=!menuPopover">关闭</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<a href="javascript:" slot="reference" style="color: #FFFFFF;" @click="toggleMenuPopover">
|
||||
<i class="fa fa-th-large" aria-hidden="true"></i>
|
||||
{{selectEntranceModule ? selectEntranceModule.moduleName : '应用中心'}}
|
||||
</a>
|
||||
</el-popover>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="off-right">
|
||||
<a href="javascript:;" data-toggle="dropdown">
|
||||
<span class="hidden-xs ml10">${@shiro.getPrincipalProperty('username')}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="off-right">
|
||||
<a href="${base!}/platform/login/logout">
|
||||
<i class="ti-power-off"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
<section class="layout">
|
||||
<!-- sidebar menu -->
|
||||
<aside class="sidebar offscreen-left" id="asideMenu">
|
||||
<!-- main navigation -->
|
||||
<nav class="main-navigation" data-height="auto" data-size="6px" data-distance="0" data-rail-visible="true"
|
||||
data-wheel-step="10">
|
||||
|
||||
<ul id="leftMenu" class="nav leftMenu" style="display: initial;">
|
||||
<li v-for="fm in headerNavBarVueApp.firstMenus">
|
||||
|
||||
<a :href="fm.href && fm.href.startsWith('/')?fm.href:'javascript:;'">
|
||||
<i v-if="Object.keys(headerNavBarVueApp.secondMenus).includes(fm.path)"
|
||||
class="toggle-accordion"></i>
|
||||
<i :class="fm.icon?fm.icon:'ti-map'"></i>
|
||||
<span>
|
||||
{{fm.name}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
|
||||
<ul class="sub-menu"
|
||||
v-if="Object.keys(headerNavBarVueApp.secondMenus).includes(fm.path)">
|
||||
<li v-for="sm in headerNavBarVueApp.secondMenus[fm.path]">
|
||||
<a :href="sm.href && sm.href.startsWith('/')?sm.href:'javascript:;'">
|
||||
<span>
|
||||
<i class="toggle-accordion" v-if="headerNavBarVueApp.secondMenus[sm.path]"></i>
|
||||
<i v-if="headerNavBarVueApp.secondMenus[sm.path]"
|
||||
:class="sm.icon ? 'leftMenu__twoIcon ' + sm.icon : 'leftMenu__twoIcon ti-map'"
|
||||
></i>
|
||||
<i v-else class="leftMenu__twoIcon fa fa-circle-o"></i>
|
||||
{{sm.name}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<ul class="sub-menu" v-if="headerNavBarVueApp.secondMenus[sm.path]">
|
||||
<li v-for="tm in headerNavBarVueApp.secondMenus[sm.path]">
|
||||
<a :href="tm.href && tm.href.startsWith('/')?tm.href:'javascript:;'">
|
||||
<span>
|
||||
<i class="leftMenu__twoIcon fa fa-circle-o"></i>
|
||||
{{tm.name}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</aside>
|
||||
<!-- main content -->
|
||||
<section class="main-content" id="container">
|
||||
${layoutContent}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const headerNavBarVueApp = new Vue({
|
||||
el: '#headerNavbar',
|
||||
data() {
|
||||
return {
|
||||
entranceModules: [],
|
||||
selectEntranceModule: null,
|
||||
leftMenus: [],
|
||||
firstMenus: [],
|
||||
secondMenus: {},
|
||||
userDefaultModuleId: null,
|
||||
menuPopover: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getEntranceModule() {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getEntranceModule')
|
||||
if (resp.code === 0) {
|
||||
this.entranceModules = resp.data
|
||||
if (this.selectEntranceModule) {
|
||||
if (this.entranceModules.some(v => v.id === this.selectEntranceModule.id)) {
|
||||
this.selectEntranceModule = this.entranceModules.find(v => v.id === this.selectEntranceModule.id)
|
||||
this.openFirstMenu()
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.entranceModules) {
|
||||
if (this.userDefaultModuleId) {
|
||||
this.selectEntranceModule = this.entranceModules.find(v => v.id === this.userDefaultModuleId)
|
||||
} else {
|
||||
this.selectEntranceModule = this.entranceModules[0]
|
||||
}
|
||||
this.openFirstMenu()
|
||||
} else {
|
||||
this.goSetAppCenter()
|
||||
}
|
||||
}
|
||||
},
|
||||
openFirstMenu() {
|
||||
if (window.location.pathname === '/platform/home') {
|
||||
setTimeout(() => {
|
||||
this.$nextTick(() => {
|
||||
const aTag = document.querySelector('#leftMenu li a')
|
||||
if (aTag) {
|
||||
aTag.click()
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
const pathname = window.location.pathname
|
||||
const a_selector = "#leftMenu li a[href='" + pathname + "']"
|
||||
const getCurrentMenu = () => {
|
||||
const a = document.querySelector(a_selector)
|
||||
if (a) {
|
||||
$(a).attr('style', 'color: #1867b0')
|
||||
$(a).parent().parents("li").addClass("open")
|
||||
$(a).parent().parents('ul.sub-menu').attr('style', 'display:block')
|
||||
$(a).find("i").addClass("fa-dot-circle-o")
|
||||
clearInterval(getCurrentMenuInterval)
|
||||
}
|
||||
}
|
||||
const getCurrentMenuInterval = setInterval(getCurrentMenu, 100)
|
||||
}
|
||||
},
|
||||
async enterEntranceModules(item) {
|
||||
window.sessionStorage.setItem('selectEntranceModule', JSON.stringify(item))
|
||||
this.selectEntranceModule = item
|
||||
await this.getFirstMenus(item.id)
|
||||
this.goHome()
|
||||
this.openFirstMenu()
|
||||
this.menuPopover = false
|
||||
},
|
||||
async getSecondMenus() {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getSecondMenus')
|
||||
if (resp.code === 0) {
|
||||
this.secondMenus = resp.data
|
||||
}
|
||||
},
|
||||
async getFirstMenus(entranceModuleId) {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getFirstMenus', {entranceModuleId})
|
||||
if (resp.code === 0) {
|
||||
this.firstMenus = resp.data
|
||||
this.setAttr()
|
||||
}
|
||||
},
|
||||
setAttr(afterFunc = () => {
|
||||
}) {
|
||||
this.$nextTick(() => {
|
||||
const aTags = document.querySelectorAll('.main-navigation a')
|
||||
aTags.forEach(v => {
|
||||
if (v.href === 'javascript:;') {
|
||||
v.removeAttribute("data-pjax")
|
||||
} else {
|
||||
v.setAttribute("data-pjax", "")
|
||||
}
|
||||
if (v.getAttribute('class') === 'active') {
|
||||
v.setAttribute('class', '')
|
||||
}
|
||||
})
|
||||
|
||||
const openLiTags = document.querySelectorAll('.main-navigation li.open')
|
||||
openLiTags.forEach(v => {
|
||||
v.setAttribute('class', '')
|
||||
const childNodes = v.childNodes
|
||||
childNodes.forEach(c => {
|
||||
if (c.nodeType === 1 && c.tagName && c.tagName.toUpperCase() === 'UL'.toUpperCase() && c.className === 'sub-menu') {
|
||||
c.style.display = 'none'
|
||||
}
|
||||
})
|
||||
})
|
||||
afterFunc()
|
||||
})
|
||||
},
|
||||
goHome() {
|
||||
$.pjax({
|
||||
url: '/platform/home',
|
||||
container: '#container',
|
||||
fragment: '#container',
|
||||
timeout: 8000
|
||||
});
|
||||
this.setAttr()
|
||||
this.closeAllMenu()
|
||||
},
|
||||
goSetAppCenter() {
|
||||
$.pjax({
|
||||
url: '/platform/sys/entranceModule',
|
||||
container: '#container',
|
||||
fragment: '#container',
|
||||
timeout: 8000
|
||||
});
|
||||
this.setAttr()
|
||||
},
|
||||
closeAllMenu() {
|
||||
const subMenus = document.querySelectorAll('ul.sub-menu')
|
||||
subMenus.forEach(v => {
|
||||
v.style.display = 'none'
|
||||
})
|
||||
|
||||
const menus = document.querySelectorAll('.main-navigation li.open')
|
||||
menus.forEach(v => {
|
||||
v.setAttribute('class', '')
|
||||
})
|
||||
|
||||
const aTags = document.querySelectorAll('.main-navigation a.active')
|
||||
aTags.forEach(v => {
|
||||
v.setAttribute('class', '')
|
||||
})
|
||||
},
|
||||
async getUserDefaultEntranceModuleId() {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getUserDefaultEntranceModuleId')
|
||||
if (resp.code === 0) {
|
||||
this.userDefaultModuleId = resp.data
|
||||
}
|
||||
},
|
||||
async setUserDefaultEntranceModuleId() {
|
||||
const {id: moduleId, moduleName} = this.selectEntranceModule
|
||||
const msg = '您确定要将' + moduleName + '设置为默认模块吗?'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ('confirm' !== confirm) return
|
||||
const resp = await $.get('/platform/sys/entranceModule/setUserDefaultEntranceModuleId', {moduleId})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success(resp.msg)
|
||||
} else {
|
||||
this.$notify.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
toggleMenuPopover() {
|
||||
setTimeout(() => {
|
||||
this.menuPopover = !this.menuPopover
|
||||
}, 300)
|
||||
},
|
||||
async init() {
|
||||
await this.getUserDefaultEntranceModuleId()
|
||||
const selectEntranceModuleStr = window.sessionStorage.getItem('selectEntranceModule')
|
||||
if (selectEntranceModuleStr) {
|
||||
this.selectEntranceModule = JSON.parse(selectEntranceModuleStr)
|
||||
}
|
||||
await this.getEntranceModule()
|
||||
await this.getFirstMenus(this.selectEntranceModule.id)
|
||||
await this.getSecondMenus()
|
||||
this.setAttr()
|
||||
|
||||
// let pjax_url = window.sessionStorage.getItem('pjax_url')
|
||||
// pjax_url = pjax_url.replace(window.location.origin, '')
|
||||
// $.pjax({
|
||||
// url: pjax_url,
|
||||
// container: '#container',
|
||||
// fragment: '#container',
|
||||
// timeout: 8000
|
||||
// });
|
||||
// const a_selector = '#leftMenu li a[href="' + pjax_url + '"]'
|
||||
// const a = document.querySelector(a_selector)
|
||||
// setTimeout(() => {
|
||||
// $(a).parent().parents("li").addClass("open")
|
||||
// $(a).parent().parents('ul.sub-menu').attr('style', 'display:block')
|
||||
// }, 100)
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
|
||||
new Vue({
|
||||
el: '#asideMenu',
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,396 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.search-fixed {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
|
||||
.list-card .van-cell__value {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" @click-left="history.back()" fixed left-arrow
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<!-- <van-dropdown-item v-model="pageForm.isMenWomen" @change="yearChange"
|
||||
:options="sexList"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.groupName" @change="yearChange"
|
||||
:options="groupList"></van-dropdown-item>
|
||||
<van-dropdown-item :options="eventList" @change="yearChange"
|
||||
v-model="pageForm.eventId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="yearChange"
|
||||
v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/wbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply==0&&o.applyWay.includes(1)"></image>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/qxbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称" @click="openActivity(o)">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px;">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="您报队伍">
|
||||
{{o.activityTeamName?o.activityTeamName:'暂无'}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="可报队数" v-if="o.projectType==2">
|
||||
{{o.restrictTotalTeam}}队
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="每队可报人数" v-if="o.applyUserModel===1">
|
||||
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="成功报名人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-dialog @confirm="doActivityConfirm" show-cancel-button title="您确定要报名此活动吗?"
|
||||
v-model="activityDialog"
|
||||
@cancel="activityDialog = false" :before-close="onBeforeClose">
|
||||
<van-radio-group v-model="formData.teamId" v-if="projectType==2">
|
||||
<van-cell-group>
|
||||
<template v-for="i in teams">
|
||||
<van-cell :title="i.name" clickable>
|
||||
<template #right-icon>
|
||||
<van-radio :name="i.id"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</van-dialog>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
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.applyType !== 3) {
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '男' && nan.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictGirlNum) : this.restrictBoyNum)) {
|
||||
this.$toast("该" + title + "男运动员已报满!")
|
||||
return
|
||||
}
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '女' && nv.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictBoyNum) : this.restrictGirlNum)) {
|
||||
this.$toast("该" + title + "女运动员已报满!")
|
||||
return
|
||||
}
|
||||
}*/
|
||||
if (this.athletesMaxNum && (data.length >= this.athletesMaxNum)) {
|
||||
this.$toast("该" + title + "人员已报满!")
|
||||
return
|
||||
}
|
||||
if (this.formData.teamId != null) this.$set(this.formData, "teamName", this.teams.find(v => v.id == this.formData.teamId).name)
|
||||
await $.post("/mobile/activity/Sports/list/doActivity", this.formData)
|
||||
|
||||
await this.onRefresh()
|
||||
this.activityDialog = false
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
let {
|
||||
isManGirlNum,
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyUserModel,
|
||||
unionLimit,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
this.projectType = projectType
|
||||
this.formData.activityId = activityId
|
||||
this.formData.eventId = eventId
|
||||
this.applyType = applyType
|
||||
this.isManGirlNum = isManGirlNum
|
||||
|
||||
const res = await $.get("/mobile/activity/Sports/list/getScopeUser", {activityGroupId: activityGroupId})
|
||||
if (res.data == 0) {
|
||||
this.$toast("您不在报名人员内!")
|
||||
return
|
||||
}
|
||||
if ("${@shiro.getPrincipalProperty('unit').getUnionid()}" == "") {
|
||||
this.$toast("您的工会信息有误,无法报名,请联系工会管理员!")
|
||||
return
|
||||
}
|
||||
|
||||
/*if ((isInterest && "${@shiro.hasRole('H04')}" === 'false') || (isInterest && "${@shiro.hasRole('sysadmin')}" === 'false')) {
|
||||
this.$toast("您所报的是趣味运动,请联系工会管理员报名!")
|
||||
return
|
||||
}*/
|
||||
if (userApply == 1) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.yearChange()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
this.events = []
|
||||
const data = await $.get("/platform/activity/apply/getEvents", {activityId: activityId})
|
||||
this.events = data
|
||||
const {
|
||||
athletesMaxNum,
|
||||
startAgeDate,
|
||||
endAgeDate,
|
||||
isMenWomen,
|
||||
restrictBoyNum,
|
||||
restrictGirlNum
|
||||
} = this.events.find(v => v.id == eventId)
|
||||
if (isMenWomen) {
|
||||
this.restrictBoyNum = athletesMaxNum
|
||||
this.restrictGirlNum = athletesMaxNum
|
||||
} else {
|
||||
this.restrictBoyNum = restrictBoyNum ? restrictBoyNum : 0
|
||||
this.restrictGirlNum = restrictGirlNum ? restrictGirlNum : 0
|
||||
}
|
||||
this.athletesMaxNum = athletesMaxNum
|
||||
if (projectType == 1) {
|
||||
if (isMenWomen != null && isMenWomen === 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen === 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (restrictRegNumber > 0) {
|
||||
const {data} = await $.post("/platform/activity/apply/getActivityData", {activityId})
|
||||
const userApplyNum = data.filter(v => v.userId == "${@shiro.getPrincipalProperty('id')}").length
|
||||
if (userApplyNum >= restrictRegNumber) {
|
||||
this.$toast('单项项目,每人限报' + restrictRegNumber + '个!团体项目除外')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
activityId: this.formData.activityId,
|
||||
applyType: applyType,
|
||||
eventId: eventId
|
||||
})
|
||||
|
||||
if (applyUserModel === 1) {
|
||||
if (athletesMaxNum != null) {
|
||||
if (data.length >= athletesMaxNum) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + athletesMaxNum + "人")
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
unionLimit = JSON.parse(unionLimit)
|
||||
const limit = unionLimit.find(v => v.id === "${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
this.athletesMaxNum = limit.limitCount
|
||||
if (data.length >= limit.limitCount) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + limit.limitCount + "人")
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (startAgeDate != null) {
|
||||
const birthday = moment("${@shiro.getPrincipalProperty('birthday')}").valueOf()
|
||||
if (birthday < moment(startAgeDate).valueOf() || birthday > moment(endAgeDate).valueOf()) {
|
||||
this.$toast("您的年龄不在限制范围內!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (isMenWomen != null && isMenWomen == 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen == 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (projectType == 2) {
|
||||
const {data} = await $.get("/platform/activity/apply/getActivityTeamId", {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.teams = data
|
||||
if (data.length && data.length > 0) this.$set(this.formData, "teamId", data[0].id)
|
||||
|
||||
}
|
||||
this.activityDialog = true
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
|
||||
const {data} = await $.get('/platform/activity/apply/pageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
|
||||
}
|
||||
,
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString('id')
|
||||
const applyType = GetQueryString('applyType')
|
||||
this.pageForm.activityId = id
|
||||
this.pageForm.applyType = applyType
|
||||
const data = await $.post("/platform/activity/apply/getEvents", {activityId: id})
|
||||
data.forEach(v => {
|
||||
this.eventList.push({value: v.eventId, text: v.allName})
|
||||
})
|
||||
this.eventList.unshift({value: null, text: "按项目"})
|
||||
this.$set(this.pageForm, "eventId", this.eventList[0].value)
|
||||
this.$set(this.pageForm, "isMenWomen", 1)
|
||||
this.$set(this.pageForm, "groupName", null)
|
||||
this.$set(this.pageForm, "isAudit", null)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -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,150 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="报名详情" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="margin: 20px auto 0 auto">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/ybm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;"
|
||||
:style="{color:themeColor}">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
|
||||
<van-cell :border="false" title="每队可报人数" v-if="o.applyUserModel===1">
|
||||
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="已报名人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
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,550 @@
|
||||
<!--#
|
||||
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-radius: 8px;
|
||||
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,425 @@
|
||||
<!--#
|
||||
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-radius: 8px;
|
||||
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,462 @@
|
||||
<!--#
|
||||
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"
|
||||
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() {
|
||||
return (day) => {
|
||||
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.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,76 @@
|
||||
<!--活动信息公用页面-->
|
||||
|
||||
<div class="activity_img_back">
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover" width="100%"
|
||||
height="200"></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>
|
||||
<span v-if="o.signUpMethod===3">组队报名</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="组队人数" v-if="o.signUpMethod==3">
|
||||
<span style="color: red"> {{o.teamNum}}</span>人
|
||||
|
||||
</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="location.replace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<div style="margin: 10px auto 60px auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openReg(o)">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
fit="cover"
|
||||
width="100%"
|
||||
height="200"
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon name="fire" color="red"></van-icon>
|
||||
<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" :active-color="themeColor">
|
||||
<van-tabbar-item icon="home-o" url="/mobile/activity/unionActivity">全部活动</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o" url="/mobile/activity/myActivity">我的活动</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
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,283 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.activity_card {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .van-image, .activity_card .van-image img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_name {
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom {
|
||||
line-height: 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .left {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 80px);
|
||||
font-size: 12px;
|
||||
color: #c4bebe;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .right {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityStatus" :options="activityStatusList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityLevel" :options="activityLevelList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 80px auto">
|
||||
<van-list v-model="loading" :finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openReg(o)">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
fit="cover"
|
||||
width="100%"
|
||||
height="200"
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon name="fire" color="red"></van-icon>
|
||||
<div style="margin-left: 10px;width: calc(100% - 26px);text-overflow: ellipsis;overflow: hidden;white-space: nowrap">
|
||||
{{o.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left" style="width: 100%">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
报名时间:{{o.applyStartTime}}至{{o.applyEndTime}}
|
||||
<!-- {{moment(o.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.activityEndTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="right">-->
|
||||
<!-- <span v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"-->
|
||||
<!-- style="color: forestgreen">-->
|
||||
<!-- 报名中-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"-->
|
||||
<!-- style="color: #ee1919">-->
|
||||
<!-- 报名结束-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"-->
|
||||
<!-- style="color: forestgreen">-->
|
||||
<!-- 活动进行中-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"-->
|
||||
<!-- style="color: #ee1919">-->
|
||||
<!-- 活动结束-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<div class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
活动时间:{{o.startTime}}
|
||||
<!-- {{moment(o.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.activityEndTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="right">
|
||||
<span v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()"
|
||||
style="color: forestgreen">
|
||||
未开始报名
|
||||
</span>
|
||||
<span v-else-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
报名中
|
||||
</span>
|
||||
<span v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
报名结束
|
||||
</span>
|
||||
<span v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"
|
||||
style="color: forestgreen">
|
||||
活动进行中
|
||||
</span>
|
||||
<span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"
|
||||
style="color: #ee1919">
|
||||
活动结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="activity_content" style="font-size: 12px; color: #c4bebe;">-->
|
||||
<!-- <div class="left">-->
|
||||
<!-- <van-icon name="clock" size="1em"></van-icon>-->
|
||||
<!-- <span style="margin-left: 5px;">-->
|
||||
<!-- {{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tabBarIndex" :active-color="themeColor">
|
||||
<van-tabbar-item icon="home-o" url="/mobile/activity/unionActivity">全部活动
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o" url="/mobile/activity/myActivity">我的活动
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
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: 5},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '进行中', value: 3},
|
||||
{text: '已结束', value: 4}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/activity/unionActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
/* this.tableData.forEach(v => {
|
||||
if (v.cover) {
|
||||
const cover = JSON.parse(v.cover)
|
||||
v.cover = cover[0].filepath
|
||||
}
|
||||
|
||||
})*/
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
//跳转页面
|
||||
openReg(o) {
|
||||
console.log(o)
|
||||
if (moment(o.applyStartTime).valueOf() > moment().valueOf()) {
|
||||
this.$toast('活动未开始报名')
|
||||
return;
|
||||
}
|
||||
if (o.projectTypeCode === '50004') {
|
||||
window.location.href = '/mobile/activity/Sports/list/activityEventList?id=' + o.id
|
||||
} else {
|
||||
window.location.href = '/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=' + o.signUpMethod
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
this.$set(this.pageForm, "activityStatus", 1)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code: 40000})
|
||||
this.activityLevelList = []
|
||||
this.activityLevelList.push({value: null, text: "全部类别"})
|
||||
data.forEach(v => {
|
||||
this.activityLevelList.push({value: v.code, text: v.name})
|
||||
})
|
||||
|
||||
this.$set(this.pageForm, "activityLevel", this.activityLevelList[0].value)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -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,176 @@
|
||||
<!--#
|
||||
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"
|
||||
:disabled="isSign"
|
||||
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()&&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>
|
||||
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: 2000
|
||||
})
|
||||
// await this.getHasRegUserNum()
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleRegister', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.init()
|
||||
this.$toast.success(resp.msg)
|
||||
window.history.back()
|
||||
}, 2000)
|
||||
|
||||
} 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: 2000
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleCancelRegister', {activityId: this.activityId})
|
||||
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.init()
|
||||
this.$toast.success(resp.msg)
|
||||
window.history.back()
|
||||
}, 2000)
|
||||
} 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)
|
||||
}
|
||||
}
|
||||
},
|
||||
init() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.isRegisterForMe()
|
||||
this.getSignStatus()
|
||||
if (moment(this.o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() > moment(this.o.applyEndTime).valueOf()) {
|
||||
this.$toast.fail("不在活动范围内")
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,340 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.regCell .van-cell__label .van-tag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.userActionPopup {
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
.userActionPopup .van-cell__value {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.userActionPopup .addBtn {
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.userActionPopup .van-action-sheet__item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userActionPopup .userSelSuccess {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.van-search__action {
|
||||
background-color: #edf0ff
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<van-cell-group inset class="mt5">
|
||||
<van-cell title="报名人员" class="regCell">
|
||||
<template #label>
|
||||
<div>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
本活动限制总报名人数:({{o.totalUserNumberLimit}})人
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
当前分工会报名限额 <span style="color: orange">({{o.limitUnion.limitNum}})人</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt5" v-loading="tagCloseable">
|
||||
<div v-if="registerList && registerList.length>0">
|
||||
<template v-for="item in registerList">
|
||||
<van-tag type="primary" :closeable="tagCloseable" size="medium"
|
||||
:color="themeColor"
|
||||
@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" :color="themeColor">选择报名人员
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-action-sheet v-model="userActionSheet" title="选择报名人员" class="userActionPopup">
|
||||
<van-search v-model="searchKey" @search="onSearchUser" show-action
|
||||
placeholder="请输入姓名搜索">
|
||||
<template #action>
|
||||
<div @click="onSearchUser(searchKey)">搜索</div>
|
||||
</template>
|
||||
|
||||
</van-search>
|
||||
|
||||
<!-- <div class="van-hairline--bottom">-->
|
||||
<!-- 点击列表中的人员添加到活动人员中-->
|
||||
<!-- </div>-->
|
||||
<template v-if="searchLoading">
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
|
||||
<div class="van-action-sheet__content mt5"
|
||||
v-else-if="searchUserList && searchUserList.length>0">
|
||||
|
||||
<template>
|
||||
<template v-for="item in searchUserList"
|
||||
v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)"
|
||||
class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}({{item.loginName}})</span>
|
||||
</button>
|
||||
</template>
|
||||
<!--<van-empty description="没有更多了" style="position:absolute;height: 70%"
|
||||
v-else></van-empty>-->
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty description="暂无数据" style="position:absolute;height: 70%"
|
||||
v-else-if="searchUserList.length===0"></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="tagCloseable" @click="doSave()" style="border-radius: 10px" block
|
||||
type="info"
|
||||
:color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
<van-button v-else="!tagCloseable" @click="tagCloseable = true" style="border-radius: 10px"
|
||||
block type="info"
|
||||
:color="themeColor">
|
||||
修 改
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<!-- <div style="margin: 20px 20px 10px 20px" v-if="tagCloseable">-->
|
||||
<!-- <van-button-->
|
||||
<!-- :disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf()"-->
|
||||
<!-- @click="doSign()" style="border-radius: 10px" block type="info"-->
|
||||
<!-- :color="themeColor">-->
|
||||
<!-- 立即签到-->
|
||||
<!-- </van-button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
activityId: '',
|
||||
o: {},
|
||||
registerList: [],
|
||||
addRegisterList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: '',
|
||||
searchUserList: [],
|
||||
tagCloseable: true,
|
||||
searchLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getRegisterUser() {
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
if (this.o.signUpMethod === 3) {
|
||||
this.registerList = resp.data.filter(v => v.applyUserId === this.userId)
|
||||
} else {
|
||||
this.registerList = resp.data
|
||||
}
|
||||
this.addRegisterList = resp.data
|
||||
if (this.registerList.length > 0) {
|
||||
this.tagCloseable = false
|
||||
}
|
||||
}
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ''
|
||||
this.searchUserList = []
|
||||
this.userActionSheet = true
|
||||
},
|
||||
async onSearchUser(val) {
|
||||
if (!val) {
|
||||
this.$toast.fail("请输入搜索条件")
|
||||
return
|
||||
}
|
||||
this.searchLoading = true
|
||||
const resp = await $.get('/mobile/activity/unionActivity/searchNoRegisterUser', {
|
||||
activityId: this.activityId,
|
||||
searchKey: val
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {id, userName} = item
|
||||
this.registerList.push({id, userName})
|
||||
},
|
||||
async removeRegUser(item) {
|
||||
if (this.userId === item.id) {
|
||||
this.$toast.fail("自己不能删除")
|
||||
return
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要移除吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const index = this.registerList.findIndex(v => v.id === item.id)
|
||||
this.registerList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
//保存
|
||||
async doSave() {
|
||||
if (this.registerList.length === 0) {
|
||||
this.$toast('请添加报名人员后再提交!')
|
||||
return
|
||||
}
|
||||
if (this.o.signUpMethod === 3) {
|
||||
if (this.registerList.length !== this.o.teamNum) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是双人报名模式您需要报名' + this.o.teamNum + '人!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
if (!this.registerList.map(v => v.id).includes(this.userId)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是组队模式请您找' + this.o.teamNum + '朋友一起报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
// await this.getRegisterUser()
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
this.addRegisterList = resp.data
|
||||
let arr = []
|
||||
if (this.addRegisterList && this.addRegisterList.length > 0) {
|
||||
this.addRegisterList.forEach(v => {
|
||||
this.registerList.forEach(r => {
|
||||
if (v.id === r.id && v.applyUserId !== this.userId) {
|
||||
arr.push(r.userName)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
if (arr && arr.length > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '【' + arr.toString() + '】已成功报名您无需再报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
/* if (this.addRegisterList.map(v => v.id).includes(this.userId)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您已报名无需再报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}*/
|
||||
|
||||
}
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '此活动开启了签到,需要您活动当天前往签到点位核实活动报名人员后进行签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: message + '您确认要报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const params = {
|
||||
activityId: this.activityId,
|
||||
personIds: JSON.stringify(this.registerList.map(v => v.id))
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSaveUnionRegister', params)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
await this.getRegisterUser()
|
||||
await this.getHasRegUserNum()
|
||||
this.$toast.success(resp.msg)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
await this.getActivityInfo()
|
||||
await this.getRegisterUser()
|
||||
if (this.o.signUpMethod === 3 && this.registerList.length === 0) {
|
||||
this.registerList.push({id: this.userId, userName: this.userName})
|
||||
}
|
||||
this.title = (this.o.signUpMethod === 2 ? '分工会报名' : '组队报名')
|
||||
if (moment(this.o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() > moment(this.o.applyEndTime).valueOf()) {
|
||||
this.$toast.fail("不在活动范围内")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,378 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-doc-card .van-button--small {
|
||||
border-radius: 8px;
|
||||
width: 60px !important;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 90%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 60px;
|
||||
}
|
||||
|
||||
.userPopup .van-cell {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
.van-radio-group {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.van-cell-group__title {
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="社团审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入工号或姓名进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.radioType" :options="auditOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.clubId" :options="clubOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.userType" :options="userTypeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.username}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">社团名称:</span>
|
||||
<span>{{o.clubname}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">工  号:</span>
|
||||
<span>{{o.loginname}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">所属单位:</span>
|
||||
<span>{{o.unitname}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">申请时间:</span>
|
||||
<span>{{o.join_time}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="openView(o)"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">
|
||||
查看
|
||||
</van-button>
|
||||
<van-button
|
||||
v-if="o.status === 1"
|
||||
@click.stop="openAudit(o)"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">
|
||||
审核
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" :style="{width: '100%', height: '100%' }">
|
||||
<van-nav-bar
|
||||
title="详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
<club-user-apply-info ref="applyInfo" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
社团审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<!-- <van-field label="审核签字" required style="flex-flow: column">-->
|
||||
<!-- <template #label>-->
|
||||
<!-- <div class="mb10">审核签字</div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #input>-->
|
||||
<!-- <mobile-sign ref="signature" :my_sign.sync="formData.auditSign"></mobile-sign>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-field>-->
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doReview(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doReview(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</club-user-apply-info>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: false,
|
||||
clubOptions: [],
|
||||
userTypeOptions: [],
|
||||
auditOptions: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '已审核', value: 2},
|
||||
{text: '未审核', value: 3},
|
||||
],
|
||||
pageForm: {
|
||||
radioType: 3
|
||||
},
|
||||
infoShow: false,
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'club-user-apply-info': httpVueLoader('/components/mobile/club/mobileClubUserApplyInfo.vue?v=1.0.1'),
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openAudit(row) {
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditOpinion: null,
|
||||
auditSign: ""
|
||||
}
|
||||
this.infoShow = true
|
||||
this.handle = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.applyInfo.getInfo(row.id)
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.handle = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.applyInfo.getInfo(row.id)
|
||||
})
|
||||
},
|
||||
async doReview(flag) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
vant.Toast('请填写审核意见');
|
||||
return
|
||||
}
|
||||
// if (!this.formData.auditSign) {
|
||||
// vant.Toast('请签字')
|
||||
// return
|
||||
// }
|
||||
// this.$refs.signature.submitSign()
|
||||
this.formData.flag = flag
|
||||
const resp = await $.post("/platform/sys/club/sh/check", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/sys/club/sh/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async getMyMangeClub() {
|
||||
const {data} = await $.get("/platform/sys/club/users/getMyMangeClub")
|
||||
return data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const data = await this.getMyMangeClub()
|
||||
data.forEach(item => {
|
||||
this.clubOptions.push({text: item.name, value: item.id})
|
||||
})
|
||||
this.clubOptions.unshift({text: '全部社团'})
|
||||
const userType = await getDictOptions('UserType')
|
||||
userType.forEach(item => {
|
||||
this.userTypeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.userTypeOptions.unshift({text: '人员类型'})
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,474 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.van-cell__title, .van-cell__value{
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.van-cell__value {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="加入社团"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入社团名称进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.isjr" :options="clubType"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false" @load="onLoad"
|
||||
:finished-text="tableData.length>0?'没有更多了':''">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status==1">待社团审核</span>
|
||||
<span v-if="o.status==2" style="color: red">社团拒绝</span>
|
||||
<span v-if="o.status==3">待校工会审核</span>
|
||||
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status==5" style="color: green">审核通过</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12">
|
||||
<span style="color: grey">电  话:</span>
|
||||
<span>{{o.fzr_mobile}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">会  长:</span>{{o.hz}}</van-col>
|
||||
<van-col span="12">
|
||||
<span style="color: grey">成立时间:</span>
|
||||
<span>{{moment(o.foundTime).format('YYYY-MM-DD')}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click="openInfo(o, 'view')" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
查看
|
||||
</van-button>
|
||||
<van-button @click="rollback(o)" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary"
|
||||
v-if="pageForm.isjr === true && (o.status==1 || o.status==3)">撤销申请
|
||||
</van-button>
|
||||
<van-button @click="openInfo(o, 'join')"
|
||||
color="#1867b0" v-if="pageForm.isjr === false"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
我要加入
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" get-container="#app" position="right" :style="{ height: '100%', width: '100%' }">
|
||||
<van-nav-bar
|
||||
title="社团详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false"
|
||||
safe-area-inset-top></van-nav-bar>
|
||||
<van-tabs v-model="infoActive">
|
||||
<van-tab title="社团信息">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="社团名称">{{ detailData.name }}</van-cell>
|
||||
<van-cell title="成立时间">{{ detailData.foundtime }}</van-cell>
|
||||
<van-cell title="报名联系人">{{ detailData.fzrname }}</van-cell>
|
||||
<van-cell title="所属单位">{{ detailData.fzr_unit_name }}</van-cell>
|
||||
<van-cell title="联系人电话">{{ detailData.concatpersonmobile }}</van-cell>
|
||||
<van-cell title="联系人邮箱">{{ detailData.concatpersonemail }}</van-cell>
|
||||
<van-cell title="会费标准">{{ detailData.dues_standard }}</van-cell>
|
||||
<van-cell title="当前人数">{{ detailData.cynum }}</van-cell>
|
||||
<van-cell title="QQ群二维码" @click="showCode('QQ')">
|
||||
<span style="cursor: pointer; color: #236eb4">点击查看</span>
|
||||
</van-cell>
|
||||
<van-cell title="微信群二维码" @click="showCode('weChat')">
|
||||
<span style="cursor: pointer; color: #236eb4">点击查看</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
<van-tab v-if="viewType === 'join'" title="个人信息">
|
||||
<van-form @submit="needJoin" ref="form" :show-error-message="false">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly v-model="formData.username" name="username"
|
||||
label="姓名" :rules="[{ required: true }]"></van-field>
|
||||
<van-field readonly v-model="formData.sex" name="sex"
|
||||
label="性别" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.birthday" name="birthday" required
|
||||
@click="showPicker = true"
|
||||
placeholder="请填写出生年月" label="出生年月" :rules="[{ required: true }]">
|
||||
</van-field>
|
||||
<van-popup v-model="showPicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
title="选择年月日"
|
||||
@confirm="(val) => {formData.birthday = moment(val).format('YYYY-MM-DD'); showPicker = false}"
|
||||
@cancel="showPicker = false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
<van-field v-model="formData.birthPlace" name="birthPlace" required
|
||||
placeholder="请填写出生地" label="出生地" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.education" name="education" required
|
||||
placeholder="请填写文化程度" label="文化程度" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.hobby" name="hobby" required
|
||||
placeholder="请填写爱好" label="爱好" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.unitName" name="unitName" required
|
||||
readonly label="工作部门" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.position" name="position" required
|
||||
placeholder="请填写职务" label="职务" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.mobile" name="mobile" required
|
||||
placeholder="请填写电话" label="电话" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.email" name="email" required
|
||||
placeholder="请填写电子邮箱" label="电子邮箱" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.homeAddress" name="homeAddress" required
|
||||
placeholder="请填写家庭住址" label="家庭住址" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.QQNumber" name="QQNumber" required
|
||||
placeholder="请填写QQ" label="QQ" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.bodyHeight" name="bodyHeight" required
|
||||
placeholder="请填写身高" label="身高" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.bodyWeight" name="bodyWeight" required
|
||||
placeholder="请填写体重" label="体重" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.health" name="health" required
|
||||
placeholder="请填写身体状况" label="身体状况" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.sport" name="sport" required
|
||||
placeholder="请填写经常从事的运动" label="经常从事的运动" :rules="[{ required: true }]"></van-field>
|
||||
<van-field name="medicalHistory" required
|
||||
placeholder="是否有过特殊病史" label="是否有过特殊病史">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.medicalHistory" direction="horizontal">
|
||||
<van-radio :name="true">是</van-radio>
|
||||
<van-radio :name="false">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="joinActivity" required
|
||||
placeholder="是否愿意参加本协会的活动" label="是否愿意参加本协会的活动">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.joinActivity" direction="horizontal">
|
||||
<van-radio :name="true">是</van-radio>
|
||||
<van-radio :name="false">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-model="formData.otherThing" name="otherThing"
|
||||
rows="1"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="是否有特别需要说明的问题(身体或心理)" label="是否有特别需要说明的问题"></van-field>
|
||||
<van-field v-model="formData.remark" name="remark"
|
||||
rows="1"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="备注" label="备注"></van-field>
|
||||
<van-field name="photo" label="两寸登记照" required
|
||||
style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">两寸登记照</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload
|
||||
:max="1"
|
||||
:files.sync="formData.photo"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit" native-type="submit">申请加入</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
showPicker: false,
|
||||
infoActive: 0,
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
clubType: [{text: '未加入', value: false}, {text: '已加入', value: true}],
|
||||
infoShow: false,
|
||||
detailData: {},
|
||||
viewType: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showCode(type) {
|
||||
if(type === 'QQ' && this.clickRow.qqgroupcode) {
|
||||
const ids = JSON.parse(this.clickRow.qqgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
||||
vant.ImagePreview({images: ids})
|
||||
} else if(type === 'weChat' && this.clickRow.wechatgroupcode) {
|
||||
const ids = JSON.parse(this.clickRow.wechatgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
||||
vant.ImagePreview({images: ids})
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/sys/club/sq/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
openInfo(row, type) {
|
||||
this.viewType = type
|
||||
this.infoActive = type === 'view' ? 0 : 1
|
||||
if(type === 'join') {
|
||||
this.formData = {
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
||||
birthPlace: "${@shiro.getPrincipalProperty('birthPlace')}",
|
||||
education: "${@shiro.getPrincipalProperty('education')}",
|
||||
hobby: "${@shiro.getPrincipalProperty('hobby')}",
|
||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
position: "${@shiro.getPrincipalProperty('position')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
email: "${@shiro.getPrincipalProperty('email')}",
|
||||
homeAddress: "${@shiro.getPrincipalProperty('homeAddress')}",
|
||||
}
|
||||
}
|
||||
this.clickRow = row
|
||||
$.get("/platform/sys/club/mange/findOne", {id: row.id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.detailData = data.data
|
||||
this.infoShow = true
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async needJoin() {
|
||||
const row = this.clickRow
|
||||
if(this.formData.medicalHistory === '' || this.formData.medicalHistory === undefined || this.formData.medicalHistory === null) {
|
||||
vant.Toast('请选择是否有过特殊病史')
|
||||
return
|
||||
}
|
||||
if(this.formData.joinActivity === '' || this.formData.joinActivity === undefined || this.formData.joinActivity === null) {
|
||||
vant.Toast('请选择是否愿意参加本协会的活动')
|
||||
return
|
||||
}
|
||||
if(this.formData.photo === '' || this.formData.photo === undefined || this.formData.photo === null) {
|
||||
vant.Toast('请上传两寸登记照')
|
||||
return
|
||||
}
|
||||
const {code, data} = await $.post('/platform/sys/club/sq/getInClubByCurUser')
|
||||
let str = ''
|
||||
if (data && data.length > 0) {
|
||||
str = '您已经加入了'
|
||||
data.forEach((item) => {
|
||||
str += '【' + item.name + '】'
|
||||
})
|
||||
str += ','
|
||||
}
|
||||
str += '请确认是否申请加入【' + row.name + '】?'
|
||||
vant.Dialog.confirm({title: '提示', message: str,}).then(() => {
|
||||
this.formData.clubid = row.id
|
||||
this.formData.photo = this.formData.photo[0].filepath
|
||||
$.post("/platform/sys/club/sq/submit", this.formData, (data) => {
|
||||
if (data.code === 0) {
|
||||
vant.Toast(data.msg)
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
} else {
|
||||
vant.Toast(data.msg)
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
rollback(o) {
|
||||
vant.Dialog.confirm({title: '提示', message: '请确定是否撤销申请?',}).then(() => {
|
||||
const id = o.id
|
||||
$.post("/platform/sys/club/sq/revocation", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
vant.Toast('撤销申请成功');
|
||||
this.doSearch();
|
||||
} else {
|
||||
vant.Toast(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const data = await getClubType()
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.typeOptions.unshift({text: '全部类型'})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
this.$set(this.pageForm, "isjr", this.clubType[0].value)
|
||||
this.pageForm.searchName = 'club.name'
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,382 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-doc-card .van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 90%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.userPopup .van-cell {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="校工会审核"
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入社团名称进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="typeOptions" @change="doSearch"
|
||||
v-model="pageForm.clubType"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false" @load="onLoad"
|
||||
v-model="loading"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<!--<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status==1">待社团审核</span>
|
||||
<span v-if="o.status==2" style="color: red">社团拒绝</span>
|
||||
<span v-if="o.status==3">待校工会审核</span>
|
||||
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status==5" style="color: green">审核通过</span>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">电  话:</span>{{o.fzr_mobile}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
|
||||
<van-col span="12"><span style="color: grey">当前人数:</span>{{o.people_num}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col class="cus_overflow" span="24">
|
||||
<span style="color: grey">介绍链接:</span>
|
||||
<span @click.stop="window.open(o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href)"
|
||||
style="color: #236eb4">{{o.introduce_href}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">已审{{o.has_audit}}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">未审{{o.no_audit}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet @close="popClose" class="userPopup" title="申请人员列表" v-model:show="userShow">
|
||||
<div class="content">
|
||||
<div class="van-doc-card">
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div v-if="queryType === 'notAudit'">
|
||||
<van-tag @click="checkAll()" plain size="large" type="primary">全选</van-tag>
|
||||
<van-tag @click="toggleAll()" plain size="large" style="margin-left: 6px" type="primary">反选
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group ref="checkboxGroup" v-if="userList !== null" v-model="result">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
:key="obj.id"
|
||||
@click="toggle(index)" class="cus_cell"
|
||||
clickable
|
||||
v-for="(obj, index) in userList">
|
||||
|
||||
<div><span style="color: grey">姓  名:</span>{{obj.username}}</div>
|
||||
<div><span style="color: grey">工  号:</span>{{obj.loginname}}</div>
|
||||
<div><span style="color: grey">单  位:</span>{{obj.unitname}}</div>
|
||||
<div><span style="color: grey">性  别:</span>{{obj.sex}}</div>
|
||||
<div><span style="color: grey">联系方式:</span>{{obj.mobile}}</div>
|
||||
<!--<span style="display: inline-block; width: 86px">{{obj.username}}</span>
|
||||
<span class="unit">{{obj.unitname}}</span>
|
||||
<br/>
|
||||
<span style="display: inline-block; width: 85px">{{obj.sex}}</span>
|
||||
<span style="display: inline-block; width: 106px">13296575967</span>
|
||||
<span style="display: inline-block;">{{obj.loginname}}</span>-->
|
||||
<van-icon class="audit_icon" color="green"
|
||||
name="passed"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === true"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
name="close"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === false"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
<div style="margin-top: 4px; text-align: center" v-else>暂无申请人员</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
queryType: '',
|
||||
result: [],
|
||||
userList: [],
|
||||
userShow: false,
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async audit(type, auditType) {
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
vant.Toast('请先选择人员')
|
||||
return
|
||||
}
|
||||
const str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择!' : '您确定要一键全部审核吗?'
|
||||
vant.Dialog.confirm({title: '提示', message: str,}).then(async () => {
|
||||
let idList = this.result
|
||||
if (type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await $.post('/platform/sys/club/sh/check', {
|
||||
ids: JSON.stringify(idList),
|
||||
flag: auditType === 'pass',
|
||||
type: 2,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
this.userShow = false
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
checkAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(index) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
|
||||
id: o.id,
|
||||
auditType: 'hasAudit',
|
||||
type: 2,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userList.sort((a, b) => {
|
||||
return b.auditstate - a.auditstate
|
||||
})
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
async openView(o) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
|
||||
id: o.id,
|
||||
auditType: 'notAudit',
|
||||
type: 2,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无申请人员')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
return
|
||||
}
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
this.pageForm.type = 2
|
||||
$.post('/platform/sys/club/sh/getMyClub', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const data = await getClubType()
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.typeOptions.unshift({text: '全部类型'})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,271 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-field__control {
|
||||
color: #8b8f95;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 3px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
border-radius: 20px;
|
||||
width: 95%;
|
||||
margin: 5px auto;
|
||||
}
|
||||
|
||||
.bottomDiv {
|
||||
position: fixed;
|
||||
bottom: 10px;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.bottomBut {
|
||||
margin: 0 auto;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-y: scroll !important;
|
||||
}
|
||||
|
||||
.van-dialog {
|
||||
width: 95%;
|
||||
height: 85%;
|
||||
margin-top: 5%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="填写慰问申请" left-arrow placeholder fixed
|
||||
@click-left="location.replace('/mobile/condolence/apply')"></van-nav-bar>
|
||||
<van-form ref="addForm">
|
||||
<van-cell-group class="cell-card">
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="manager_name"
|
||||
label="经办人"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field readonly :value="formData.apply_time" name="apply_time"
|
||||
label="申请时间"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field @input="userRemoteMethod" name="be_user_name"
|
||||
v-model="formData.be_user_name" label="被慰问人" placeholder="请输入被慰问人姓名" input-align="right"
|
||||
: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 v-model="formData.bank_card" name="bank_card" label="银行卡号" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写银行卡号' }]"></van-field>
|
||||
|
||||
<van-field readonly clickable name="type" :value="condolence.type[formData.type]"
|
||||
label="慰问类型" input-align="right"
|
||||
@click="showTypePicker = true" placeholder="点击选择慰问类型"
|
||||
:rules="[{ required:true, message: '请选择慰问类型'}]"></van-field>
|
||||
<van-popup v-model:show="showTypePicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="transColumns(condolence.type)" @confirm="onTypeConfirm"
|
||||
@cancel="showTypePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field readonly clickable name="way" :value="condolence.way[formData.way]"
|
||||
label="慰问方式" input-align="right"
|
||||
@click="showWayPicker = true" placeholder="点击选择慰问方式"
|
||||
:rules="[{ required:true, message: '请选择慰问方式'}]"></van-field>
|
||||
<van-popup v-model:show="showWayPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="transColumns(condolence.way)" @confirm="onWayConfirm"
|
||||
@cancel="showWayPicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.money" name="money" type="number" label="慰问金额" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写慰问金额' }]"></van-field>
|
||||
|
||||
<van-field v-model="formData.personnel" name="personnel" label="参加慰问人员" input-align="right"></van-field>
|
||||
|
||||
<van-field v-model="formData.remark" name="remark" label="备  注" input-align="right"
|
||||
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
|
||||
|
||||
<van-field name="files" label="附  件">
|
||||
<template #input>
|
||||
<van-uploader v-model="files"
|
||||
accept=".jpg,.png,.jpeg,.txt,.pdf,.doc,.docx,.xls,.xlsx"
|
||||
:after-read="afterRead"></van-uploader>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-dialog id="dialog" v-model="showSign" title="请签字确认" show-cancel-button @confirm="onSubmit"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<div class="bottomDiv">
|
||||
<van-button class="bottomBut" @click="openDialog" round block type="info" color="#39acff">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
userList: [],
|
||||
formData: {},
|
||||
sign: "",
|
||||
showTypePicker: false,
|
||||
showWayPicker: false,
|
||||
sheetShow: false,
|
||||
showSign: false,
|
||||
typeColumns: [],
|
||||
wayColumns: [],
|
||||
files: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
transColumns(obj) {
|
||||
let arr = []
|
||||
for (let i in obj) {
|
||||
arr.push({value: i, text: obj[i]})
|
||||
}
|
||||
return arr
|
||||
},
|
||||
async userRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.userList = arr.map(v => {
|
||||
return {name: v.username, id: v.id}
|
||||
})
|
||||
this.sheetShow = 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
|
||||
},
|
||||
afterRead(file) {
|
||||
file.status = 'uploading';
|
||||
file.message = '上传中...';
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append("file", file.file, file.file.name);
|
||||
|
||||
$.ajax({
|
||||
url: "/platform/Common/uploadFile",
|
||||
type: "post",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (res) => {
|
||||
const {code, data} = res
|
||||
if (code === 0) {
|
||||
file.status = 'success';
|
||||
this.formData.files = [{
|
||||
id: data.id,
|
||||
filename: data.filename,
|
||||
filepath: data.filepath
|
||||
}]
|
||||
this.files = [{url: FILE_DOMAIN + data.filepath}]
|
||||
}
|
||||
},
|
||||
error: (err) => {
|
||||
file.status = 'failed';
|
||||
file.message = '上传失败';
|
||||
}
|
||||
});
|
||||
},
|
||||
onTypeConfirm(val) {
|
||||
this.formData.type = val.value;
|
||||
this.moneyChange(val.value)
|
||||
this.showTypePicker = false;
|
||||
},
|
||||
onWayConfirm(val) {
|
||||
this.formData.way = val.value;
|
||||
this.showWayPicker = false;
|
||||
},
|
||||
moneyChange(type) {
|
||||
if (type == 1) {
|
||||
this.$set(this.formData, 'way', '2')
|
||||
this.$set(this.formData, 'money', 200)
|
||||
} else if (['2', '3', '4'].includes(type)) {
|
||||
this.$set(this.formData, 'way', '2')
|
||||
if (['2', '3'].includes(type)) {
|
||||
this.$set(this.formData, 'money', 500)
|
||||
} else if (['4'].includes(type)) {
|
||||
this.$set(this.formData, 'money', 1000)
|
||||
}
|
||||
} else if (['5'].includes(type)) {
|
||||
this.$set(this.formData, 'money', 2000)
|
||||
} else if (['6'].includes(type)) {
|
||||
this.$set(this.formData, 'money', 200)
|
||||
}
|
||||
},
|
||||
openDialog() {
|
||||
this.showSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
},
|
||||
async onSubmit() {
|
||||
this.$refs.signature.submitSign()
|
||||
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
|
||||
this.$toast.loading('提交中...')
|
||||
|
||||
const res = await $.post('/platform/fw/condolence/apply/doAdd', {
|
||||
data: JSON.stringify(formData),
|
||||
sign: this.sign
|
||||
})
|
||||
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/condolence/apply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.formData.apply_time = moment().format('YYYY-MM-DD')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,57 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 3px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 95%;
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.van-field__control {
|
||||
color: #8b8f95;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
|
||||
.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>
|
||||
|
||||
<condolence-info :id.sync="id"></condolence-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
id: ""
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue'),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,124 @@
|
||||
<!--#
|
||||
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-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>
|
||||
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<van-cell v-for="item in tableData" class="cell-card" @click="openInfo(item.id)">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">{{ item.ma_username }}</div>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="color: gray">参加慰问人员:</div>
|
||||
<div class="text-overflow">{{ item.personnel }}</div>
|
||||
</div>
|
||||
<div style="position: absolute;right: 0;top: 5px">
|
||||
<span :style="'color:'+item.state_color">{{item.state_name}}</span>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<van-row gutter="30" style="font-size: 12px">
|
||||
<van-col span="8">
|
||||
<div style="color: gray">被慰问人</div>
|
||||
<div class="text-overflow">{{item.be_username}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">申请时间</div>
|
||||
<div class="text-overflow">{{item.apply_time}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">所属单位</div>
|
||||
<div class="text-overflow">{{item.be_unitname}}</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
|
||||
<div style="position: fixed;bottom: 0px;width: 100%;z-index:10;text-align: center">
|
||||
<van-button @click="openApply" size="large"
|
||||
style="width:88%;margin: 0 auto;margin-bottom: 4px;" color="#39acff">职工慰问申请
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [refreshSearchMixins],
|
||||
data() {
|
||||
return {
|
||||
typeOption: [
|
||||
{value: 1, text: '生日慰问'},
|
||||
{value: 2, text: '结婚慰问'},
|
||||
{value: 3, text: '生育慰问'},
|
||||
{value: 4, text: '退休离岗慰问'},
|
||||
{value: 5, text: '会员直系去世慰问'},
|
||||
{value: 6, text: '住院慰问'},
|
||||
{value: 7, 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()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,165 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-field__control {
|
||||
color: #8b8f95;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="填写困难帮扶申请" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<van-form ref="addForm">
|
||||
<van-cell-group>
|
||||
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="username" label="姓名"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.sex" name="sex" label="性别"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.sqsj" name="sqsj" label="申请时间"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field v-model="formData.lxfs" name="lxfs" label="手机号" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写手机号' }]"></van-field>
|
||||
|
||||
|
||||
<van-field v-model="formData.idcard" name="idcard" label="身份证号" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写身份证号' }]"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.birthday" name="user_age"
|
||||
label="出生日期"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field v-model="formData.yhmc" name="yhmc" label="开户银行" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写开户银行' }]"></van-field>
|
||||
|
||||
<van-field v-model="formData.yhkh" name="yhkh" label="银行卡号" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写银行卡号' }]"></van-field>
|
||||
|
||||
<van-field v-model="formData.jtrs" name="jtrs" label="家庭人数" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写家庭人数' }]"></van-field>
|
||||
|
||||
|
||||
|
||||
<van-field readonly v-if="formData.on_job" value="在职" label="在职状态" input-align="right"></van-field>
|
||||
<van-field readonly v-else value="退休" label="在职状态" input-align="right"></van-field>
|
||||
|
||||
|
||||
<van-field name="zyzkyy" label="主要致困原因" input-align="right"
|
||||
:rules="[{ required: true, message: '请选择审核状态' }]">
|
||||
<template #input>
|
||||
<van-checkbox-group v-model="formData.zyzkyy" direction="horizontal">
|
||||
<van-checkbox name="家庭收入低">家庭收入低</van-checkbox>
|
||||
<van-checkbox name="因病致困">因病致困</van-checkbox>
|
||||
<van-checkbox name="意外致困">意外致困</van-checkbox>
|
||||
<van-checkbox name="子女上学">子女上学</van-checkbox>
|
||||
|
||||
</van-checkbox-group>
|
||||
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
|
||||
|
||||
<van-field name="flag" label="有无低保" input-align="right"
|
||||
:rules="[{ required: true, message: '请选择审核状态' }]">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.flag" direction="horizontal">
|
||||
<van-radio :name="1">有低保</van-radio>
|
||||
<van-radio :name="2">无低保</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field v-model="formData.zyzkyybz" name="zyzkyybz" label="致困原因备注" input-align="right"
|
||||
rows="2" maxlength="200" type="textarea" show-word-limit></van-field>
|
||||
|
||||
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<div class="bottomDiv">
|
||||
<van-button class="bottomBut" @click="onSubmit" round block type="info" color="#39acff">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
sign: "",
|
||||
showSign: false,
|
||||
ybOptions: ['统筹', '社保'],
|
||||
zzyyOptions: ['家庭收入低','因病致困','意外致困','子女上学'],
|
||||
subDis: false,
|
||||
formData: {
|
||||
jtfc: [],
|
||||
jtcc: [],
|
||||
},
|
||||
pageForm: {
|
||||
year: '',
|
||||
searchName: "sqr.username",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit(){
|
||||
var formData = Object.assign({}, this.formData)
|
||||
formData.zyzkyy = JSON.stringify(formData.zyzkyy)
|
||||
formData.jtfc = []
|
||||
formData.jtcc = []
|
||||
|
||||
this.$toast.loading('提交中...')
|
||||
const res = await $.post('/mobile/defficulAid/apply/doAdd', formData, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/defficulAid/apply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.formData = {
|
||||
birthday: '${@shiro.getPrincipalProperty("birthday")}',
|
||||
lxfs: '${@shiro.getPrincipalProperty("mobile")}',
|
||||
idcard: '${@shiro.getPrincipalProperty("idcard")}',
|
||||
sex: '${@shiro.getPrincipalProperty("sex")}',
|
||||
sqsj:new Date().toISOString().replace(/T.*/,' ')
|
||||
}
|
||||
const zzzt = '${@shiro.getPrincipalProperty("zzzt")}'
|
||||
|
||||
if (zzzt == '在职') {
|
||||
this.$set(this.formData, "on_job", true)
|
||||
} else if (zzzt == '退休') {
|
||||
this.$set(this.formData, "on_job", false)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,112 @@
|
||||
<!--#
|
||||
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-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<van-cell v-for="item in tableData" class="cell-card">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">{{ item.ma_username }}</div>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="color: gray">姓名:</div>
|
||||
<div class="text-overflow">{{ item.sqrname }}</div>
|
||||
</div>
|
||||
<div style="position: absolute;right: 0;top: 5px">
|
||||
<span v-if="item.zt==1" style="color: #E4B46C">待基层工会审核</span>
|
||||
<span v-if="item.zt==2" style="color: #E4B46C">待二级单位审核</span>
|
||||
<span v-if="item.zt==3" style="color: #E4B46C">待校工会审核</span>
|
||||
<span v-if="item.zt==4" style="color: #66BD3D">审核通过</span>
|
||||
<span v-if="item.zt==5" style="color: red">审核不通过</span>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<van-row gutter="30" style="font-size: 12px">
|
||||
<van-col span="8">
|
||||
<div style="color: gray">工号</div>
|
||||
<div class="text-overflow">{{item.sqrloginname}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">单位</div>
|
||||
<div class="text-overflow">{{item.dwname}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">申请时间</div>
|
||||
<div class="text-overflow">{{item.sqsj}}</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
|
||||
<div style="position: fixed;bottom: 0px;width: 100%;z-index:10;text-align: center">
|
||||
<van-button @click="openApply" size="large"
|
||||
style="width:88%;margin: 0 auto;margin-bottom: 4px;" color="#39acff">困难帮扶申请
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [refreshSearchMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openApply(){
|
||||
window.location.href = '/mobile/defficulAid/apply/apply'
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
typeChange(val) {
|
||||
this.pageForm.type = val
|
||||
this.onRefresh()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,334 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
|
||||
|
||||
<title>智慧工会平台</title>
|
||||
|
||||
<!-- 引入样式 -->
|
||||
<link rel="stylesheet" href="//unpkg.com/vue-ydui/dist/ydui.base.css">
|
||||
<link rel="stylesheet" href="/assets/platform/plugins/ydui/ydui.rem.css">
|
||||
|
||||
<!-- 引入rem自适应类库 -->
|
||||
<script src="/assets/platform/plugins/ydui/ydui.flexible.js"></script>
|
||||
<script src="/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
|
||||
<!-- 引入 Vue -->
|
||||
<script src="/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<!-- 引入组件库 -->
|
||||
<script src="/assets/platform/plugins/ydui/ydui.rem.js"></script>
|
||||
<script src="/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
|
||||
<!-- Eleditor -->
|
||||
<script src="/assets/platform/plugins/eleditor/Eleditor.min.js"></script>
|
||||
|
||||
<!-- 引入样式 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.0/lib/index.css">
|
||||
<!-- 引入组件 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.0/lib/vant.min.js"></script>
|
||||
</head>
|
||||
|
||||
<style>
|
||||
[v-cloak] { display: none; }
|
||||
.yd-navbar-item span{
|
||||
color: #40A9FB;!important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'iconfont'; /* project id 1341271 */
|
||||
src: url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.eot');
|
||||
src: url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.eot?#iefix') format('embedded-opentype'),
|
||||
url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.woff2') format('woff2'),
|
||||
url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.woff') format('woff'),
|
||||
url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.ttf') format('truetype'),
|
||||
url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.svg#iconfont') format('svg');
|
||||
}
|
||||
.iconfont{
|
||||
font-family:"iconfont" !important;
|
||||
font-size: 0.6rem;
|
||||
/*color: rgb(255, 104, 93);*/
|
||||
font-style:normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.van-doc-demo-block__title {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgba(69,90,100,.6);
|
||||
padding: 5px 15px 10px;
|
||||
}
|
||||
.van-cell__title{
|
||||
color: #40A9FB;
|
||||
}
|
||||
.van-cell__value{
|
||||
color: black;
|
||||
}
|
||||
.hdCell{
|
||||
/* 一行显示*/
|
||||
-webkit-line-clamp: 1;
|
||||
/* 将对象作为弹性伸缩盒子模型显示 */
|
||||
display: -webkit-box;
|
||||
/*子元素的排列方式 */
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow:ellipsis;
|
||||
overflow: hidden;
|
||||
word-break:break-all;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<div id="v-back">
|
||||
<van-nav-bar
|
||||
title="活动详情"
|
||||
left-text=""
|
||||
left-arrow
|
||||
@click-left="history.back()"
|
||||
>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
|
||||
<div v-if="flag == '0'">
|
||||
<section style="margin-top: 1.2rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">基本信息</h2>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动地点" :value="viewData.hddz"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="主办单位" :value="viewData.unit"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动类型" :value="viewData.hdlx"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动项目" :value="viewData.hdxm"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="经费预算" :value="viewData.jfys"/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
<section style="margin-top: 0.18rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">时间信息</h2>
|
||||
<van-cell-group>
|
||||
<van-cell title="报名开始时间" :value="viewData.bmkssj"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="报名结束时间" :value="viewData.bmjssj"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动开始时间" :value="viewData.hdkssj"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动结束时间" :value="viewData.hdjssj"/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
<section style="margin-top: 0.18rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">活动形式</h2>
|
||||
<van-cell-group>
|
||||
<van-cell title="组合方式" :value="viewData.zhfs"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="颁奖模式" :value="viewData.bjms"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="竞赛模式" :value="viewData.jsfs"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="报名方式" :value="viewData.bmfs"/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
<section style="margin-top: 0.18rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">其他信息</h2>
|
||||
<van-cell-group v-show="viewData.jsfs=='竞赛类'">
|
||||
<van-cell @click="infoShow=true;valueText=viewData.bmbf" v-if="viewData.bmbf!=''&&viewData.bmbf!=null" title="报名办法" is-link><div v-html="viewData.bmbf" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.bmbf==''||viewData.bmbf==null" @click="infoShow=false" title="报名办法" value="暂无报名办法" is-link/>
|
||||
</van-cell-group>
|
||||
<van-cell-group v-show="viewData.jsfs=='竞赛类'">
|
||||
<van-cell @click="infoShow=true;valueText=viewData.jsbf" v-if="viewData.jsbf!=''&&viewData.jsbf!=null" title="竞赛办法" is-link><div v-html="viewData.jsbf" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.jsbf==''||viewData.jsbf==null" @click="infoShow=false" title="竞赛办法" value="暂无竞赛办法" is-link/>
|
||||
</van-cell-group>
|
||||
<van-cell-group v-show="viewData.jsfs=='竞赛类'">
|
||||
<van-cell @click="infoShow=true;valueText=viewData.jlbf" v-if="viewData.jlbf!=''&&viewData.jlbf!=null" title="奖励办法" is-link><div v-html="viewData.jlbf" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.jlbf==''||viewData.jlbf==null" @click="infoShow=false" title="奖励办法" value="暂无奖励办法" is-link/>
|
||||
</van-cell-group>
|
||||
<van-cell-group v-show="viewData.jsfs=='竞赛类'">
|
||||
<van-cell @click="infoShow=true;valueText=viewData.zysx" v-if="viewData.zysx!=''&&viewData.zysx!=null" title="其他注意事项" is-link><div v-html="viewData.zysx" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.zysx==''||viewData.zysx==null" @click="infoShow=false" title="其他注意事项" value="暂无其他注意事项" is-link/>
|
||||
</van-cell-group>
|
||||
<van-cell-group v-show="viewData.jsfs=='非竞赛类'">
|
||||
<van-cell @click="infoShow=true;valueText=viewData.hdtz" v-if="viewData.hdtz!=''&&viewData.hdtz!=null" title="活动通知" is-link><div v-html="viewData.hdtz" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.hdtz==''||viewData.hdtz==null" @click="infoShow=false" title="活动通知" value="暂无活动通知" is-link/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div v-if="flag == '1'">
|
||||
<section style="margin-top: 1.2rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">基本信息</h2>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动地点" :value="viewData.hddz"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="主办工会" :value="viewData.unionname"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动类型" :value="viewData.hdlx"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动项目" :value="viewData.hdxm"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="经费预算" :value="viewData.jfys"/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
<section style="margin-top: 0.18rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">时间信息</h2>
|
||||
<van-cell-group>
|
||||
<van-cell title="报名开始时间" :value="viewData.bmkssj"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="报名结束时间" :value="viewData.bmjssj"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动开始时间" :value="viewData.hdkssj"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动结束时间" :value="viewData.hdjssj"/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
<section style="margin-top: 0.18rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">其他信息</h2>
|
||||
<van-cell-group>
|
||||
<van-cell @click="infoShow=true;valueText=viewData.bmbf" v-if="viewData.bmbf!=''&&viewData.bmbf!=null" title="报名办法" is-link><div v-html="viewData.bmbf" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.bmbf==''||viewData.bmbf==null" @click="infoShow=false" title="报名办法" value="暂无报名办法" is-link/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell @click="infoShow=true;valueText=viewData.hdnr" v-if="viewData.hdnr!=''&&viewData.hdnr!=null" title="活动内容" is-link><div v-html="viewData.hdnr" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.hdnr==''||viewData.hdnr==null" @click="infoShow=false" title="活动内容" value="暂无活动内容" is-link/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell @click="infoShow=true;valueText=viewData.jlbf" v-if="viewData.jlbf!=''&&viewData.jlbf!=null" title="奖励办法" is-link><div v-html="viewData.jlbf" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.jlbf==''||viewData.jlbf==null" @click="infoShow=false" title="奖励办法" value="暂无奖励办法" is-link/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell @click="infoShow=true;valueText=viewData.zysx" v-if="viewData.zysx!=''&&viewData.zysx!=null" title="其他注意事项" is-link><div v-html="viewData.zysx" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.zysx==''||viewData.zysx==null" @click="infoShow=false" title="其他注意事项" value="暂无其他注意事项" is-link/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div v-if="flag == '2'">
|
||||
<section style="margin-top: 1.2rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">基本信息</h2>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动地点" :value="viewData.hddz"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="主要负责人" :value="viewData.username"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="联系电话" :value="viewData.phone"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动类型" :value="viewData.hdlx"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动项目" :value="viewData.hdxm"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="经费预算" :value="viewData.jfys"/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
<section style="margin-top: 0.18rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">时间信息</h2>
|
||||
<van-cell-group>
|
||||
<van-cell title="报名开始时间" :value="viewData.bmkssj"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="报名结束时间" :value="viewData.bmjssj"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动开始时间" :value="viewData.hdkssj"/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell title="活动结束时间" :value="viewData.hdjssj"/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
<section style="margin-top: 0.18rem" class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">其他信息</h2>
|
||||
<van-cell-group>
|
||||
<van-cell @click="infoShow=true;valueText=viewData.hdnr" v-if="viewData.hdnr!=''&&viewData.hdnr!=null" title="活动内容" is-link><div v-html="viewData.hdnr" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.hdnr==''||viewData.hdnr==null" @click="infoShow=false" title="活动内容" value="暂无活动内容" is-link/>
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-cell @click="infoShow=true;valueText=viewData.hdzz" v-if="viewData.hdzz!=''&&viewData.hdzz!=null" title="活动宗旨" is-link><div v-html="viewData.hdzz" class="hdCell"></div></van-cell>
|
||||
<van-cell v-if="viewData.hdzz==''||viewData.hdzz==null" @click="infoShow=false" title="活动宗旨" value="暂无活动宗旨" is-link/>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" round style="width: 80%;max-height:60%;padding: 0.4rem 0.32rem 0.4rem 0.4rem;"><div v-html="valueText"></div></van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 引入组件库 -->
|
||||
<script src="//unpkg.com/vue-ydui/dist/ydui.rem.js"></script>
|
||||
<script>Vue.config.productionTip=false</script>
|
||||
|
||||
<script>
|
||||
var Vue = window.Vue;
|
||||
var vant = window.vant;
|
||||
|
||||
// 注册 Lazyload 组件
|
||||
Vue.use(vant.Lazyload);
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data: function () {
|
||||
return {
|
||||
viewData:[],
|
||||
hdmc:"",
|
||||
infoShow:false,
|
||||
valueText:"",
|
||||
flag:"",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pageData:function () {
|
||||
var self=this;
|
||||
$.post("/platform/wxMobile/wxHdInfo/data",{},function (data) {
|
||||
if(data.code==0){
|
||||
self.viewData = data.data.hdInfo;
|
||||
self.flag = data.data.flag;
|
||||
if(data.data.flag=="0") {
|
||||
self.hdmc = "【"+data.data.hdInfo.xhdmc+"】";
|
||||
}else if(data.data.flag=="1") {
|
||||
self.hdmc = "【"+data.data.hdInfo.fhdmc+"】";
|
||||
}else if(data.data.flag=="2") {
|
||||
self.hdmc = "【"+data.data.hdInfo.hdmc+"】";
|
||||
}
|
||||
}
|
||||
},"json");
|
||||
},
|
||||
},
|
||||
created:function () {
|
||||
this.pageData();
|
||||
},
|
||||
updated: function () {
|
||||
|
||||
},
|
||||
watch:{
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,687 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.yd-navbar-item span {
|
||||
color: #40A9FB !important;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
|
||||
}
|
||||
|
||||
.van-tabs__nav--card {
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'iconfont'; /* project id 1341271 */
|
||||
src: url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.eot');
|
||||
src: url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.eot?#iefix') format('embedded-opentype'),
|
||||
url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.woff2') format('woff2'),
|
||||
url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.woff') format('woff'),
|
||||
url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.ttf') format('truetype'),
|
||||
url('//at.alicdn.com/t/font_1341271_xgu8wtr4c1q.svg#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 0.6rem;
|
||||
/*color: rgb(255, 104, 93);*/
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.yd-list-donetip {
|
||||
padding: 0 0 .25rem 0;
|
||||
}
|
||||
|
||||
.yd-confirm-ft > a.primary {
|
||||
color: #40A9FB;
|
||||
}
|
||||
|
||||
.van-pull-refresh__head {
|
||||
height: 80px;
|
||||
line-height: 100px;
|
||||
}
|
||||
|
||||
.van-pull-refresh {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.van-tabs--card {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动报名"
|
||||
left-arrow placeholder fixed
|
||||
@click-left="location.replace('/mobile/index')">
|
||||
</van-nav-bar>
|
||||
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="margin-top: 0.5rem;">
|
||||
|
||||
<div>
|
||||
|
||||
<van-tabs type="card" color="#40A9FB" @click="onClick">
|
||||
<van-tab title="校活动">
|
||||
|
||||
<yd-infinitescroll :callback="load" ref="infinitescroll">
|
||||
<yd-list theme="1" slot="list">
|
||||
<ul>
|
||||
<div style="margin-left: 34px;margin-bottom: 8px;font-size: 14px;color: #989898"></div>
|
||||
<li v-for="item,index in dataList"
|
||||
style="box-shadow:#B5B5B5 0px 0px 4px;background-color: white;margin: 0px 0.20rem 0.4rem 0.20rem;padding: 0.3rem 0.34rem">
|
||||
|
||||
<div style="display: flex;justify-content:space-around;">
|
||||
<div style="width: 80%">
|
||||
<div style="font-size: 1rem;font-family: 等线;color: #161616">{{item.xhdmc}}
|
||||
</div>
|
||||
<div style="margin-top: 0.5rem;font-size: .6rem;color: #606060;">
|
||||
{{item.hddz}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 20%;display: flex;align-items:center;justify-content: center">
|
||||
<div v-if="(item.cc=='1'||item.cc=='2')&&item.bmzt=='未报名'||item.bmzt==''||item.bmzt==null"
|
||||
@click="xhdBm(item.id,item.hdrs)" style="color:rgb(255, 104, 93)"><i
|
||||
slot="icon" class="iconfont" color="#FF685D"
|
||||
style="font-size: 1.5rem;"></i></div>
|
||||
<div v-if="(item.cc!='1'||item.cc!='2')&&item.bmzt=='报名待审核'"
|
||||
@click="qxXhdBm(item.id)" style="color: #FFA500"><i slot="icon"
|
||||
class="iconfont"
|
||||
color="#FFA500"
|
||||
style="font-size: 1.5rem;"></i>
|
||||
</div>
|
||||
<div v-if="(item.cc!='1'&&item.cc!='2')&&item.bmzt=='报名通过'"
|
||||
@click="qxXhdBm(item.id)" style="color:#90EE90"><i slot="icon"
|
||||
class="iconfont"
|
||||
color=" #90EE90"
|
||||
style="font-size: 1.5rem;font-weight: bolder"></i>
|
||||
</div>
|
||||
<div v-if="(item.cc!='1'||item.cc!='2')&&item.bmzt=='报名驳回'"
|
||||
@click="xhdBm(item.id,item.hdrs)" style="color:#B5B5B5"><i slot="icon"
|
||||
class="iconfont"
|
||||
color="#B5B5B5"
|
||||
style="font-size: 1.5rem;"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%;height: 1px;margin: 10px 0;background-color: #dcdcdc"></div>
|
||||
|
||||
<div @click="viewInfo(item.id,item.xhdmc)" style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray;margin-bottom: 10px">活动项目</div>
|
||||
<div class="text-overflow">{{item.name}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray;margin-bottom: 10px">报名结束时间</div>
|
||||
<div class="text-overflow">{{item.bmjssj}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray;margin-bottom: 10px">活动开始时间</div>
|
||||
<div class="text-overflow">{{item.hdkssj}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<van-empty
|
||||
v-if="xShow"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</ul>
|
||||
|
||||
</yd-list>
|
||||
<!-- 数据全部加载完毕显示 -->
|
||||
<span slot="doneTip">没有更多数据了</span>
|
||||
|
||||
</yd-infinitescroll>
|
||||
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="分会活动">
|
||||
<yd-infinitescroll :callback="fhLoad" ref="fhInfinitescroll">
|
||||
<yd-list theme="1" slot="list">
|
||||
|
||||
<ul>
|
||||
<div style="margin-left: 34px;margin-bottom: 8px;font-size: 14px;color: #989898"></div>
|
||||
<li v-for="item,index in fhDataList"
|
||||
style="box-shadow:#B5B5B5 0px 0px 4px;background-color: white;margin: 0px 0.20rem 0.4rem 0.20rem;padding: 0.3rem 0.34rem">
|
||||
|
||||
<div style="display: flex;justify-content:space-around;">
|
||||
<div style="width: 80%" @click="viewInfo(item.id,item.fhdmc)">
|
||||
<div style="font-size: 1rem;font-family: 等线;color: #161616">{{item.fhdmc}}
|
||||
</div>
|
||||
<div style="margin-top: 0.5rem;font-size: .6rem;color: #606060;">
|
||||
{{item.hddz}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 20%;display: flex;align-items:center;justify-content: center">
|
||||
<div v-if="item.sfbm=='0'" @click="fhdBm(item.id,item.hdrs)"
|
||||
style="color:rgb(255, 104, 93)"><i slot="icon" class="iconfont"
|
||||
color="#FF685D"
|
||||
style="font-size: 0.7rem;"></i>
|
||||
</div>
|
||||
<div v-if="item.sfbm>'0'" @click="qxFhBm(item.id,item.hdrs)"
|
||||
style="color:#90EE90;"><i slot="icon" class="iconfont" color="#90EE90"
|
||||
style="font-size: 0.7rem;font-weight: bolder"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%;height: 1px;margin: 10px 0;background-color: #dcdcdc"></div>
|
||||
|
||||
<div @click="viewInfo(item.id,item.fhdmc)" style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray;margin-bottom: 10px">活动项目</div>
|
||||
<div class="text-overflow">{{item.name}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray;margin-bottom: 10px">报名结束时间</div>
|
||||
<div class="text-overflow">{{item.bmjssj}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray;margin-bottom: 10px">活动开始时间</div>
|
||||
<div class="text-overflow">{{item.hdkssj}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<van-empty
|
||||
v-if="fhShow"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</ul>
|
||||
|
||||
</yd-list>
|
||||
<!-- 数据全部加载完毕显示 -->
|
||||
<span slot="doneTip">没有更多数据了</span>
|
||||
|
||||
</yd-infinitescroll>
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="协会活动">
|
||||
<yd-infinitescroll :callback="stLoad" ref="stInfinitescroll">
|
||||
<yd-list theme="1" slot="list">
|
||||
|
||||
<ul>
|
||||
<div style="margin-left: 34px;margin-bottom: 8px;font-size: 14px;color: #989898"></div>
|
||||
<li v-for="item,index in stDataList"
|
||||
style="box-shadow:#B5B5B5 0px 0px 4px;background-color: white;margin: 0px 0.20rem 0.4rem 0.20rem;padding: 0.3rem 0.34rem">
|
||||
|
||||
<div style="display: flex;justify-content:space-around;">
|
||||
<div style="width: 80%" @click="viewInfo(item.id,item.hdmc)">
|
||||
<div style="font-size: 1rem;font-family: 等线;color: #161616">{{item.hdmc}}
|
||||
</div>
|
||||
<div style="margin-top: 0.5rem;font-size: .6rem;color: #606060;">
|
||||
{{item.hddz}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 20%;display: flex;align-items:center;justify-content: center">
|
||||
<div v-if="item.sfbm=='0'" @click="sthdBm(item.id,item.cyrs)"
|
||||
style="color:rgb(255, 104, 93)"><i slot="icon" class="iconfont"
|
||||
color="#FF685D"
|
||||
style="font-size: 0.7rem;"></i>
|
||||
</div>
|
||||
<div v-if="item.sfbm>'0'" @click="qxsthBm(item.id,item.cyrs)"
|
||||
style="color:#90EE90;"><i slot="icon" class="iconfont" color="#90EE90"
|
||||
style="font-size: 0.7rem;font-weight: bolder"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%;height: 1px;margin: 10px 0;background-color: #dcdcdc"></div>
|
||||
|
||||
<div @click="viewInfo(item.id,item.hdmc)" style="display: flex;font-size: 12px">
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray;margin-bottom: 10px">活动项目</div>
|
||||
<div class="text-overflow">{{item.name}}</div>
|
||||
</div>
|
||||
<div style="width: 38%">
|
||||
<div style="color: gray;margin-bottom: 10px">报名结束时间</div>
|
||||
<div class="text-overflow">{{item.bmjssj}}</div>
|
||||
</div>
|
||||
<div style="width: 23%">
|
||||
<div style="color: gray;margin-bottom: 10px">活动开始时间</div>
|
||||
<div class="text-overflow">{{item.hdkssj}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<van-empty
|
||||
v-if="stShow"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</ul>
|
||||
|
||||
</yd-list>
|
||||
<!-- 数据全部加载完毕显示 -->
|
||||
<span slot="doneTip">没有更多数据了</span>
|
||||
|
||||
</yd-infinitescroll>
|
||||
</van-tab>
|
||||
|
||||
</van-tabs>
|
||||
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
<yd-backtop></yd-backtop>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 引入组件库 -->
|
||||
<script src="//unpkg.com/vue-ydui/dist/ydui.rem.js"></script>
|
||||
<script>Vue.config.productionTip = false</script>
|
||||
|
||||
<script>
|
||||
let Vue = window.Vue;
|
||||
let vant = window.vant;
|
||||
|
||||
// 注册 Lazyload 组件
|
||||
Vue.use(vant.Lazyload);
|
||||
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
active: "0",
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
searchWord: "",
|
||||
},
|
||||
fhPageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
searchWord: "",
|
||||
},
|
||||
stPageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
searchWord: "",
|
||||
},
|
||||
flag: "0",
|
||||
dataList: [],
|
||||
fhDataList: [],
|
||||
stDataList: [],
|
||||
isLoading: false,
|
||||
xShow: false,
|
||||
fhShow: false,
|
||||
stShow: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pageData() {
|
||||
let self = this;
|
||||
$.post("/mobile/hd/hdbm/data", self.pageForm, function (data) {
|
||||
if (data.code == 0) {
|
||||
if (data.data.hds.list.length == 0) {
|
||||
self.xShow = true;
|
||||
} else {
|
||||
self.dataList = [];
|
||||
self.xShow = false;
|
||||
self.dataList = data.data.hds.list;
|
||||
self.$refs.infinitescroll.$emit('ydui.infinitescroll.reInit');
|
||||
}
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
load() {
|
||||
let self = this;
|
||||
setTimeout(function () {
|
||||
self.pageForm.pageNumber = self.pageForm.pageNumber + 1;
|
||||
$.post("/mobile/hd/hdbm/data", self.pageForm, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.dataList = self.dataList.concat(data.data.hds.list);
|
||||
if (data.data.hds.list.length == 0) {
|
||||
self.$refs.infinitescroll.$emit('ydui.infinitescroll.loadedDone');
|
||||
return;
|
||||
} else {
|
||||
self.$refs.infinitescroll.$emit('ydui.infinitescroll.finishLoad');
|
||||
}
|
||||
}
|
||||
}, "json");
|
||||
}, 400);
|
||||
},
|
||||
fhLoad() {
|
||||
let self = this;
|
||||
setTimeout(function () {
|
||||
self.fhPageForm.pageNumber = self.fhPageForm.pageNumber + 1;
|
||||
$.post("/mobile/hd/hdbm/fhData", self.fhPageForm, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.fhDataList = self.fhDataList.concat(data.data.hds.list);
|
||||
if (data.data.hds.list.length == 0) {
|
||||
self.$refs.fhInfinitescroll.$emit('ydui.infinitescroll.loadedDone');
|
||||
return;
|
||||
} else {
|
||||
self.$refs.fhInfinitescroll.$emit('ydui.infinitescroll.finishLoad');
|
||||
}
|
||||
}
|
||||
}, "json");
|
||||
}, 400);
|
||||
},
|
||||
stLoad() {
|
||||
let self = this;
|
||||
setTimeout(function () {
|
||||
self.stPageForm.pageNumber = self.stPageForm.pageNumber + 1;
|
||||
$.post("/mobile/hd/hdbm/stData", self.stPageForm, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.stDataList = self.stDataList.concat(data.data.hds.list);
|
||||
if (data.data.hds.list.length == 0) {
|
||||
self.$refs.stInfinitescroll.$emit('ydui.infinitescroll.loadedDone');
|
||||
return;
|
||||
} else {
|
||||
self.$refs.stInfinitescroll.$emit('ydui.infinitescroll.finishLoad');
|
||||
}
|
||||
}
|
||||
}, "json");
|
||||
}, 400);
|
||||
},
|
||||
onClick(name, title) {
|
||||
let self = this;
|
||||
self.flag = name;
|
||||
if (name == "0") {
|
||||
self.clickXhd();
|
||||
} else if (name == "1") {
|
||||
self.clickFhd();
|
||||
} else if (name == "2") {
|
||||
self.clickSthd();
|
||||
}
|
||||
},
|
||||
|
||||
clickXhd() {
|
||||
let self = this;
|
||||
self.pageForm.pageNumber = 1;
|
||||
$.post("/mobile/hd/hdbm/data", self.pageForm, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.dataList = data.data.hds.list;
|
||||
if (self.dataList.length == 0) {
|
||||
self.xShow = true;
|
||||
} else {
|
||||
self.xShow = false;
|
||||
}
|
||||
self.$refs.infinitescroll.$emit('ydui.infinitescroll.reInit');
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
clickFhd() {
|
||||
let self = this;
|
||||
self.fhPageForm.pageNumber = 1;
|
||||
$.post("/mobile/hd/hdbm/fhData", self.fhPageForm, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.fhDataList = data.data.hds.list;
|
||||
if (self.fhDataList.length == 0) {
|
||||
self.fhShow = true;
|
||||
} else {
|
||||
self.fhShow = false;
|
||||
}
|
||||
self.$refs.fhInfinitescroll.$emit('ydui.infinitescroll.reInit');
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
clickSthd() {
|
||||
let self = this;
|
||||
self.stPageForm.pageNumber = 1;
|
||||
$.post("/mobile/hd/hdbm/stData", self.stPageForm, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.stDataList = data.data.hds.list;
|
||||
if (self.stDataList.length == 0) {
|
||||
self.stShow = true;
|
||||
} else {
|
||||
self.stShow = false;
|
||||
}
|
||||
self.$refs.stInfinitescroll.$emit('ydui.infinitescroll.reInit');
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
|
||||
xhdBm(id, hdrs) {
|
||||
let self = this;
|
||||
$.post("/mobile/hd/hdbm/findXhdBmrs", {hdid: id, hdrs: hdrs}, function (data) {
|
||||
if (data.code == 0) {
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确认是否要报名此活动吗?',
|
||||
}).then(() => {
|
||||
$.post("/mobile/hd/hdbm/xhdBm", {
|
||||
hdid: id,
|
||||
rysfid: "11",
|
||||
rylx: "1",
|
||||
shzt: "1",
|
||||
qxbm: "0"
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
let toast = vant.Toast.loading({
|
||||
mask: true,
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '报名中...'
|
||||
});
|
||||
setTimeout(function () {
|
||||
toast.message = "报名成功";
|
||||
}, 1000);
|
||||
setTimeout(function () {
|
||||
toast.clear();
|
||||
self.clickXhd();
|
||||
}, 2000);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
} else if (data.code == 1) {
|
||||
vant.Dialog.alert({
|
||||
message: '当前活动男队人数名额已满',
|
||||
})
|
||||
|
||||
} else if (data.code == 2) {
|
||||
vant.Dialog.alert({
|
||||
message: '当前活动女队人数名额已满',
|
||||
})
|
||||
|
||||
} else if (data.code == 3) {
|
||||
vant.Dialog.alert({
|
||||
message: '当前活动人数名额已满',
|
||||
})
|
||||
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
qxXhdBm(id) {
|
||||
let self = this;
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您是否要<span style=\'color: red\'>取消</span>此活动的报名?',
|
||||
}).then(() => {
|
||||
$.post("/mobile/hd/hdbm/qxXhdBm", {hdid: id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
let toast = vant.Toast.loading({
|
||||
mask: true,
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '取消中...'
|
||||
});
|
||||
setTimeout(function () {
|
||||
toast.message = "取消成功";
|
||||
}, 1000);
|
||||
setTimeout(function () {
|
||||
toast.clear();
|
||||
self.clickXhd();
|
||||
}, 2000);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
fhdBm(id, hdrs) {
|
||||
let self = this;
|
||||
$.post("/mobile/hd/hdbm/findFhdBmrs", {hdid: id, hdrs: hdrs}, function (data) {
|
||||
if (data.code == 0) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确认是否要报名此活动吗?',
|
||||
}).then(() => {
|
||||
$.post("/mobile/hd/hdbm/fhBm", {hdid: id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
let toast = vant.Toast.loading({
|
||||
mask: true,
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '报名中...'
|
||||
});
|
||||
setTimeout(function () {
|
||||
toast.message = "报名成功";
|
||||
}, 1000);
|
||||
setTimeout(function () {
|
||||
toast.clear();
|
||||
self.clickFhd();
|
||||
}, 2000);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
} else if (data.code == -1) {
|
||||
vant.Dialog.alert({
|
||||
message: '此活动人数已满',
|
||||
})
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
qxFhBm(id) {
|
||||
let self = this;
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: "您是否要<span style='color: red'>取消</span>此活动的报名?",
|
||||
}).then(() => {
|
||||
$.post("/mobile/hd/hdbm/qxFhBm", {hdid: id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
let toast = vant.Toast.loading({
|
||||
mask: true,
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '取消中...'
|
||||
});
|
||||
setTimeout(function () {
|
||||
toast.message = "取消成功";
|
||||
}, 1000);
|
||||
setTimeout(function () {
|
||||
toast.clear();
|
||||
self.clickFhd();
|
||||
}, 2000);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
sthdBm(id, hdrs) {
|
||||
let self = this;
|
||||
$.post("/mobile/hd/hdbm/findSthdBmrs", {hdid: id, hdrs: hdrs}, function (data) {
|
||||
if (data.code == 0) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: "确认是否要报名此活动吗?",
|
||||
}).then(() => {
|
||||
$.post("/mobile/hd/hdbm/sthdBm", {hdid: id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
let toast = vant.Toast.loading({
|
||||
mask: true,
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '报名中...'
|
||||
});
|
||||
setTimeout(function () {
|
||||
toast.message = "报名成功";
|
||||
}, 1000);
|
||||
setTimeout(function () {
|
||||
toast.clear();
|
||||
self.clickSthd();
|
||||
}, 2000);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
} else if (data.code == -1) {
|
||||
vant.Dialog.alert({
|
||||
message: '此活动人数已满',
|
||||
})
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
qxsthBm(id) {
|
||||
let self = this;
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: "您是否要<span style='color: red'>取消</span>此活动的报名?",
|
||||
}).then(() => {
|
||||
$.post("/mobile/hd/hdbm/qxSthdBm", {hdid: id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
let toast = vant.Toast.loading({
|
||||
mask: true,
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '取消中...'
|
||||
});
|
||||
setTimeout(function () {
|
||||
toast.message = "取消成功";
|
||||
}, 1000);
|
||||
setTimeout(function () {
|
||||
toast.clear();
|
||||
self.clickSthd();
|
||||
}, 2000);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
onRefresh() {
|
||||
let self = this;
|
||||
setTimeout(function () {
|
||||
self.clickXhd();
|
||||
self.clickFhd();
|
||||
self.clickSthd();
|
||||
self.isLoading = false;
|
||||
}, 600)
|
||||
},
|
||||
|
||||
viewInfo(id) {
|
||||
let self = this;
|
||||
location.href = "/platform/wxMobile/wxHdInfo?hdid=" + id + "&flag=" + self.flag;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData();
|
||||
},
|
||||
updated() {
|
||||
|
||||
},
|
||||
watch: {},
|
||||
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,329 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.swiper img {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.module {
|
||||
margin: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.module_title {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 12px 15px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgb(51, 51, 51);
|
||||
background-color: #edf5ed;
|
||||
}
|
||||
|
||||
.module_title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
background-color: green;
|
||||
height: 25px;
|
||||
left: 5px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
row-gap: 10px;
|
||||
background-color: white;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
.menu_item {
|
||||
width: calc(100% / 4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.menu_item_img {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.menu_item_name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
font-family: "微软雅黑", Helvetica, STHeiTi, sans-serif;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.number_text {
|
||||
font-size: 36px;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 38px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 36px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
|
||||
<div v-if="active === 0" style="background-color: #f6f7f9; min-height: 100vh">
|
||||
<van-notice-bar
|
||||
left-icon="volume-o" color="#1989fa" background="#ecf9ff"
|
||||
text="温馨提示:只显示当前年份的待办和已办事项"
|
||||
></van-notice-bar>
|
||||
|
||||
<van-tabs v-model="activeName" @click="initData">
|
||||
<van-tab title="待办" name="0">
|
||||
<div style="min-height: 80vh">
|
||||
<div v-for="o in needItems">
|
||||
<div v-if="o.count > 0" @click="toUrl(o)" class="van-doc-card">
|
||||
<div class="title">{{ o.title }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div>
|
||||
<div style="color: grey; font-size: 15px">{{ o.name }}</div>
|
||||
</div>
|
||||
<div class="number_text">
|
||||
<span>{{ o.count }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
style="margin-top: 44px"
|
||||
v-if="needItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无待办"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="已办" name="1">
|
||||
<div style="min-height: 80vh">
|
||||
<div @click="toHref(o)" class="van-doc-card" v-for="o in completedItems">
|
||||
<div class="title">{{ o.moduleName }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div>
|
||||
<span>{{ o.auditState }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div style="color: grey; font-size: 15px">{{ o.auditTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
style="margin-top: 44px"
|
||||
v-if="completedItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无已办"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 100px" v-if="active === 1">
|
||||
<van-swipe :autoplay="3000" class="swiper">
|
||||
<van-swipe-item v-for="(image, index) in images" :key="index">
|
||||
<img :src="image" width="100%"/>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<van-row v-for="m in moduleMenus" class="module">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
{{m.moduleName}}
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
<div v-for="m in m.menuList" :key="m.menuId" class="menu_item"
|
||||
@click="menuClick(m)">
|
||||
<img :src="CREATE_PREVIEW_URL(m.menuIcon)" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">{{m.menuName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-tabbar v-model="active" @change="tabbrChange">
|
||||
<van-tabbar-item :dot="needCount" icon="envelop-o">我的办理</van-tabbar-item>
|
||||
<van-tabbar-item icon="home-o">工作台</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
<!--<div v-for="m in moduleMenus" :key="m.moduleId" class="module">
|
||||
<div class="module_title">
|
||||
{{m.moduleName}}
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
<div v-for="m in m.menuList" :key="m.menuId" class="menu_item" @click="menuClick(m)">
|
||||
<img :src="CREATE_PREVIEW_URL(m.menuIcon)" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">{{m.menuName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
images: [
|
||||
"${AppDomain!}" + '/home1.png',
|
||||
"${AppDomain!}" + '/home2.png',
|
||||
"${AppDomain!}" + '/home3.png',
|
||||
],
|
||||
moduleMenus: [],
|
||||
roles: [],
|
||||
active: 1,
|
||||
needCount: 0,
|
||||
needItems: [],
|
||||
activeName: '0',
|
||||
completedItems: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getMenus() {
|
||||
const {data} = await $.post('/platform/sys/appMenu/appMenus')
|
||||
this.moduleMenus = data
|
||||
},
|
||||
menuClick(menu) {
|
||||
location.href = menu.url
|
||||
},
|
||||
tabbrChange(o) {
|
||||
this.needItems = []
|
||||
this.initData()
|
||||
},
|
||||
toUrl(o) {
|
||||
location.href = o.mobileHref
|
||||
},
|
||||
toHref(o) {
|
||||
location.href = o.mobileUrl + '?audit=1';
|
||||
},
|
||||
/**
|
||||
* 入学登记待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
/*async getRxdjAgenda() {
|
||||
const {data, code} = await $.get("/platform/rxdj/agent/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.number > 0))
|
||||
}
|
||||
},*/
|
||||
async getNeedItems() {
|
||||
const {data, code} = await $.get('/platform/needItems/getNeedItems')
|
||||
if (code === 0) {
|
||||
const obj = data.filter(v => {
|
||||
return v.mobileHref != null && v.count > 0
|
||||
})
|
||||
this.needItems = obj
|
||||
}
|
||||
},
|
||||
async getCompletes() {
|
||||
const {data, code} = await $.get('/platform/sys/completed/getCompletes')
|
||||
if (code === 0) {
|
||||
this.completedItems = data;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 会员个人核对待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getMemberCheckSelfAgenda() {
|
||||
const {data, code} = await $.get("/platform/memberSelf/agenda/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.count > 0))
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 福利个人核对待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getWelfareCheckSelfAgenda() {
|
||||
const {data, code} = await $.get("/platform/welfareSelf/agenda/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.count > 0))
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
await this.getNeedItems();
|
||||
await this.getMemberCheckSelfAgenda()
|
||||
await this.getWelfareCheckSelfAgenda()
|
||||
await this.getCompletes();
|
||||
this.needCount = this.needItems.length
|
||||
},
|
||||
async setNeedItems() {
|
||||
const {data, code} = await $.get('/platform/needItems/getNeedItems')
|
||||
if (code === 0) {
|
||||
const obj = data.filter(v => {
|
||||
return v.mobileHref != null && v.count > 0
|
||||
})
|
||||
window.localStorage.setItem('needItems', escape(JSON.stringify(obj)))
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeMount() {
|
||||
this.setNeedItems();
|
||||
},
|
||||
async created() {
|
||||
await this.getMenus();
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.getMenus()
|
||||
vue.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,45 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-field__control {
|
||||
color: #8b8f95;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
|
||||
.custom-image .van-empty__image {
|
||||
width: 220px;
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
.van-empty__description {
|
||||
margin-top: -10px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="申请入会" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<template v-if="formData.sfhy==1">
|
||||
<van-empty class="custom-image" image="/hy.svg" description="您已是会员"/>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<!--#include("/mobile/hy/common.html"){}#-->
|
||||
</template>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [memberMixins],
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.mzColumns = await this.getAllNation()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,88 @@
|
||||
<van-form @submit="onSubmit">
|
||||
<van-cell-group>
|
||||
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="username" label="姓名"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('sex')}" name="sex" label="性别"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.unit_name" name="unit_name" label="所属单位"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field v-model="formData.mobile" name="mobile" label="手机号" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写手机号' }]"></van-field>
|
||||
|
||||
<van-field readonly clickable name="rsbz" :value="formData.rsbz" label="人事编制" input-align="right"
|
||||
@click="showBzPicker = true" placeholder="点击选择人事编制"></van-field>
|
||||
<van-popup v-model:show="showBzPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="bzColumns" @confirm="onBzConfirm" @cancel="showBzPicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.email" name="email" label="Email" input-align="right"></van-field>
|
||||
|
||||
<van-field v-model="formData.jg" name="jg" label="籍贯" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写籍贯' }]"></van-field>
|
||||
|
||||
<van-field v-model="formData.zw" name="zw" label="职务" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写职务' }]"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.mz" name="mz" @click="showMzPicker = true" label="民族"
|
||||
input-align="right" :rules="[{ required:true, message: '请选择民族' }]"
|
||||
placeholder="点击选择民族"></van-field>
|
||||
<van-popup v-model:show="showMzPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="mzColumns" @confirm="onMzConfirm" @cancel="showMzPicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.gz" name="gz" type="number" label="工资" input-align="right"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.xl" name="xl" @click="showXlPicker = true" label="学历"
|
||||
input-align="right" :rules="[{ required:true, message: '请选择学历' }]"
|
||||
placeholder="点击选择学历"></van-field>
|
||||
<van-popup v-model:show="showXlPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="xlColumns" @confirm="onXlConfirm" @cancel="showXlPicker = false"
|
||||
confirm-button-text="确定" cancel-button-text="取消">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.zzmm" name="zzmm" label="政治面貌" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写政治面貌' }]"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.birthday" name="birthday" @click="showCsPicker = true" label="出生日期"
|
||||
input-align="right" :rules="[{ required:true, message: '请填写出生日期' }]"
|
||||
placeholder="点击选择出生日期"></van-field>
|
||||
<van-popup v-model:show="showCsPicker" position="bottom" round>
|
||||
<van-datetime-picker :max-date="maxDate" v-model="currentDate" :min-date="minDate" type="date"
|
||||
title="选择年月日" @confirm="onCsConfirm"
|
||||
@cancel="showCsPicker = false">
|
||||
</van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.csdd" name="csdd" label="出生地点" input-align="right"></van-field>
|
||||
|
||||
<van-field v-model="formData.grjl" name="grjl" label="个人经历" input-align="right"
|
||||
rows="6" maxlength="5000" type="textarea" show-word-limit>
|
||||
|
||||
<template #input>
|
||||
<div v-html="formData.grjl"></div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field v-model="formData.sqbz" name="sqbz" label="备注" input-align="right"
|
||||
rows="2" maxlength="200" type="textarea" show-word-limit></van-field>
|
||||
|
||||
<van-field name="uploader" label="电子照片">
|
||||
<template #input>
|
||||
<van-uploader v-model="imageList" :max-count="1" :max-size="2048 * 1024"
|
||||
:before-read="beforeRead" @oversize="onOversize"
|
||||
:after-read="afterRead"></van-uploader>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 16px;">
|
||||
<van-button round block type="info" native-type="submit">提 交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
@@ -0,0 +1,30 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-field__control {
|
||||
color: #8b8f95;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="个人档案管理" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/hy/common.html"){}#-->
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [memberMixins],
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.mzColumns = await this.getAllNation()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,261 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-cell {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
|
||||
#canvas {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 100%;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.clearBtn {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="基层工会审核详情"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
>
|
||||
</van-nav-bar>
|
||||
|
||||
<van-row style="margin-top: 5px;background-color: white;min-height: calc(100vh - 100px)">
|
||||
<div style="padding-top: 20px">
|
||||
<van-collapse v-model="Basic_Information" accordion>
|
||||
<van-collapse-item title="个人基本信息" name="1">
|
||||
<van-cell title="姓  名" :value="bfdata.sqrname"></van-cell>
|
||||
|
||||
<van-cell title="工  号" :value="bfdata.sqrloginname"></van-cell>
|
||||
|
||||
<van-cell title="身份证号" :value="bfdata.idcard"></van-cell>
|
||||
|
||||
<van-cell title="民  族" :value="bfdata.mz"></van-cell>
|
||||
|
||||
<van-cell title="政治面貌" :value="bfdata.zzmm"></van-cell>
|
||||
|
||||
<van-cell title="生  日" :value="bfdata.birthday"></van-cell>
|
||||
|
||||
<van-cell title="性  别" :value="bfdata.sex"></van-cell>
|
||||
|
||||
<van-cell title="职  称" :value="bfdata.zc"></van-cell>
|
||||
|
||||
<van-cell title="职  务" :value="bfdata.zw"></van-cell>
|
||||
|
||||
<van-cell title="人事编制" :value="bfdata.rsbz"></van-cell>
|
||||
|
||||
<van-cell title="参加工作时间" :value="bfdata.cjgzsj"></van-cell>
|
||||
|
||||
<van-cell title="医保状况" :value="bfdata.ybzk"></van-cell>
|
||||
|
||||
<van-cell title="所在单位" :value="bfdata.unitname"></van-cell>
|
||||
|
||||
<van-cell title="手机号码" :value="bfdata.lxfs"></van-cell>
|
||||
|
||||
<van-cell title="本人年收入" :value="bfdata.brnzsr"></van-cell>
|
||||
|
||||
<van-cell title="家庭年收入" :value="bfdata.jtnzsr"></van-cell>
|
||||
|
||||
<van-cell title="家庭人数" :value="bfdata.jtrs"></van-cell>
|
||||
|
||||
<van-cell title="现住房类型" :value="bfdata.xzflx"></van-cell>
|
||||
|
||||
<van-cell title="建筑面积" :value="bfdata.jzmj"></van-cell>
|
||||
|
||||
<van-cell title="目前住址" :value="bfdata.jtzz"></van-cell>
|
||||
|
||||
<van-cell title="婚姻状况" :value="bfdata.hyzt"></van-cell>
|
||||
|
||||
<van-cell title="发放补助银行" :value="bfdata.yhmc"></van-cell>
|
||||
|
||||
<van-cell title="银行卡号" :value="bfdata.yhkh"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="家庭房产信息">
|
||||
<van-collapse v-model="Source" border="false" accordion>
|
||||
<van-collapse-item v-for="o in bfdata.jtfc" :title="o.fcly">
|
||||
<van-cell title="地  址" :value="o.dz"></van-cell>
|
||||
|
||||
<van-cell title="面  积" :value="o.mj"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="家庭车产信息">
|
||||
<van-collapse v-model="Brand" accordion>
|
||||
<van-collapse-item v-for="o in bfdata.jtcc" :title="o.pp">
|
||||
<van-cell title="型  号" :value="o.xh"></van-cell>
|
||||
|
||||
<van-cell title="价  格" :value="o.jg"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="主要家庭成员">
|
||||
<van-collapse v-model="Name" border="false" accordion>
|
||||
<van-collapse-item v-for="o in bfdata.jtcys" :title="o.xm">
|
||||
<van-cell title="与本人关系" :value="o.gx"></van-cell>
|
||||
|
||||
<van-cell title="年  龄" :value="o.nl"></van-cell>
|
||||
|
||||
<van-cell title="工作单位" :value="o.gzdw"></van-cell>
|
||||
|
||||
<van-cell title="年收入(元)" :value="o.nsr"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="主要致困原因">
|
||||
<div v-for="o in bfdata.zyzkyy">{{o}}</div>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="备  注">
|
||||
<div>{{bfdata.zyzkyybz}}</div>
|
||||
</van-collapse-item>
|
||||
|
||||
</van-collapse>
|
||||
|
||||
<van-form ref="addForm">
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="sqr"
|
||||
label="审核人"
|
||||
></van-field>
|
||||
<van-field v-model="formData.time" label="审核时间"></van-field>
|
||||
<van-field
|
||||
type="textarea"
|
||||
autosize
|
||||
:rules="[{ required: true, message: '请填写意见' }]"
|
||||
v-model="formData.fghshyj"
|
||||
label="审核意见"
|
||||
placeholder="请填写意见"
|
||||
></van-field>
|
||||
<van-button round native-type="button" type="primary" size="large" @click="openDialog"> 通过</van-button>
|
||||
|
||||
<van-dialog v-model="showSign" title="请签字确认" show-cancel-button @confirm="signFor"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
</van-row>
|
||||
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
Basic_Information: ['1'],
|
||||
audit_opinion: [],
|
||||
notes: [],
|
||||
Source: [],
|
||||
Brand: [],
|
||||
Name: [],
|
||||
bfdata: {},
|
||||
formData: {},
|
||||
showPicker: false,
|
||||
minDate: new Date(),
|
||||
fghshsj: new Date(),
|
||||
showSign: false,
|
||||
sign: "",
|
||||
refreshing: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
signFor() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/knbf/sh/addDo", {
|
||||
fghshyj: this.formData.fghshyj,
|
||||
zt: this.bfdata.zt,
|
||||
sign: this.sign,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/knbf/sh'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
openDialog() {
|
||||
this.$refs['addForm'].validate().then(() => {
|
||||
this.showSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
})
|
||||
$('body').on('touchmove', '.slidebg', function () {
|
||||
$(document.body).on('touchmove.prevUC', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
$('body').on('touchend', '.slidebg', function () {
|
||||
$(document.body).off('touchmove.prevUC');
|
||||
});
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.formData = {
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
}
|
||||
$.post('/mobile/knbf/sh/findOne', {id: GetQueryString('id')}).then(res => {
|
||||
if (this.refreshing) {
|
||||
this.list = [];
|
||||
this.refreshing = false;
|
||||
}
|
||||
if (res.code === 0) {
|
||||
this.bfdata = res.data
|
||||
this.bfdata.jtcc = JSON.parse(res.data.jtcc)
|
||||
this.bfdata.jtfc = JSON.parse(res.data.jtfc)
|
||||
this.bfdata.zyzkyy = JSON.parse(res.data.zyzkyy)
|
||||
this.bfdata.zyzkyy = res.data.zyzkyy
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,137 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.handleicon {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="困难帮扶列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="location.href='/mobile/index'"
|
||||
></van-nav-bar>
|
||||
|
||||
<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)">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">{{ o.sqrname }}</div>
|
||||
<van-divider></van-divider>
|
||||
<van-row gutter="30" style="font-size: 12px">
|
||||
<van-col span="8">
|
||||
<div style="color: gray">申请时间</div>
|
||||
<div class="text-overflow">{{o.sqsj}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">所属单位</div>
|
||||
<div class="text-overflow">{{o.unitname}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">性 别</div>
|
||||
<div class="text-overflow">{{o.sex}}</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<div style="position: absolute;right: 0;top: 5px">
|
||||
<van-tag plain v-if="o.zt===1" type="warning">待基层工会审核</van-tag>
|
||||
<van-tag plain v-if="o.zt===3" type="warning">待校工会审核</van-tag>
|
||||
<van-tag plain v-if="o.zt===5" type="danger">审核不通过</van-tag>
|
||||
<van-tag plain v-if="o.zt===4" type="success">审核通过</van-tag>
|
||||
</div>
|
||||
|
||||
|
||||
</van-cell>
|
||||
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
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/knbf/sh/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++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/knbf/sh/detail?id=' + o.id + '&state=' + o.zt
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,296 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="校工会审核详情"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<van-collapse v-model="Basic_Information" accordion>
|
||||
<van-collapse-item title="个人基本信息" name="1">
|
||||
<van-cell title="姓  名" :value="bfdata.sqrname"></van-cell>
|
||||
|
||||
<van-cell title="工  号" :value="bfdata.sqrloginname"></van-cell>
|
||||
|
||||
<van-cell title="身份证号" :value="bfdata.idcard"></van-cell>
|
||||
|
||||
<van-cell title="民  族" :value="bfdata.mz"></van-cell>
|
||||
|
||||
<van-cell title="政治面貌" :value="bfdata.zzmm"></van-cell>
|
||||
|
||||
<van-cell title="生  日" :value="bfdata.birthday"></van-cell>
|
||||
|
||||
<van-cell title="性  别" :value="bfdata.sex"></van-cell>
|
||||
|
||||
<van-cell title="职  称" :value="bfdata.zc"></van-cell>
|
||||
|
||||
<van-cell title="职  务" :value="bfdata.zw"></van-cell>
|
||||
|
||||
<van-cell title="人事编制" :value="bfdata.rsbz"></van-cell>
|
||||
|
||||
<van-cell title="参加工作时间" :value="bfdata.cjgzsj"></van-cell>
|
||||
|
||||
<van-cell title="医保状况" :value="bfdata.ybzk"></van-cell>
|
||||
|
||||
<van-cell title="所在单位" :value="bfdata.unitname"></van-cell>
|
||||
|
||||
<van-cell title="手机号码" :value="bfdata.lxfs"></van-cell>
|
||||
|
||||
<van-cell title="本人年收入" :value="bfdata.brnzsr"></van-cell>
|
||||
|
||||
<van-cell title="家庭年收入" :value="bfdata.jtnzsr"></van-cell>
|
||||
|
||||
<van-cell title="家庭人数" :value="bfdata.jtrs"></van-cell>
|
||||
|
||||
<van-cell title="现住房类型" :value="bfdata.xzflx"></van-cell>
|
||||
|
||||
<van-cell title="建筑面积" :value="bfdata.jzmj"></van-cell>
|
||||
|
||||
<van-cell title="目前住址" :value="bfdata.jtzz"></van-cell>
|
||||
|
||||
<van-cell title="婚姻状况" :value="bfdata.hyzt"></van-cell>
|
||||
|
||||
<van-cell title="发放补助银行" :value="bfdata.yhmc"></van-cell>
|
||||
|
||||
<van-cell title="银行卡号" :value="bfdata.yhkh"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="家庭房产信息">
|
||||
<van-collapse v-model="Source" border="false" accordion>
|
||||
<van-collapse-item v-for="o in bfdata.jtfc" :title="o.fcly">
|
||||
<van-cell title="地  址" :value="o.dz"></van-cell>
|
||||
|
||||
<van-cell title="面  积" :value="o.mj"></van-cell>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="家庭车产信息">
|
||||
<van-collapse v-model="Brand" accordion>
|
||||
<van-collapse-item v-for="o in bfdata.jtcc" :title="o.pp">
|
||||
<van-cell title="型  号" :value="o.xh"></van-cell>
|
||||
|
||||
<van-cell title="价  格" :value="o.jg"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="主要家庭成员">
|
||||
<van-collapse v-model="Name" border="false" accordion>
|
||||
<van-collapse-item v-for="o in bfdata.jtcys" :title="o.xm">
|
||||
<van-cell title="与本人关系" :value="o.gx"></van-cell>
|
||||
|
||||
<van-cell title="年  龄" :value="o.nl"></van-cell>
|
||||
|
||||
<van-cell title="工作单位" :value="o.gzdw"></van-cell>
|
||||
|
||||
<van-cell title="年收入(元)" :value="o.nsr"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="主要致困原因">
|
||||
<div v-for="o in bfdata.zyzkyy">{{o}}</div>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="备  注">
|
||||
<div>
|
||||
{{bfdata.zyzkyybz}}
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="基层工会审核意见">
|
||||
<van-cell title="审核人" :value="bfdata.fghshrname"></van-cell>
|
||||
<van-cell title="审核时间" :value="bfdata.fghshsj"></van-cell>
|
||||
<van-cell title="审核意见" :value="bfdata.fghshyj"></van-cell>
|
||||
<van-cell title="签  字">
|
||||
<div>
|
||||
<img style="width: 100%" :src="bfdata.fqz"/>
|
||||
</div>
|
||||
<div v-if="bfdata.fghshqz==null">
|
||||
暂无
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-collapse-item>
|
||||
|
||||
</van-collapse>
|
||||
<van-form ref="addForm">
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="sqr"
|
||||
label="审核人"
|
||||
></van-field>
|
||||
<van-field v-model="formData.jb" label="档位" @click="jb = true"></van-field>
|
||||
<van-action-sheet v-model="jb" :actions="actions" @select="onSelect"></van-action-sheet>
|
||||
<van-field v-model="formData.xghbzje" type="number" label="补助金额"></van-field>
|
||||
<van-field v-model="formData.time" label="审核时间"></van-field>
|
||||
<van-field
|
||||
type="textarea"
|
||||
autosize
|
||||
:rules="[{ required: true, message: '请填写意见' }]"
|
||||
v-model="formData.xghshyj"
|
||||
label="审核意见"
|
||||
placeholder="请填写意见"
|
||||
></van-field>
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button round plain size="large" @click="RefuseDialog"> 拒绝</van-button>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<van-button round type="info" size="large" @click="openDialog"> 通过</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-dialog v-model="showSign" title="请签字确认" show-cancel-button @confirm="signFor"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
<van-dialog v-model="fChairmanSign" title="请签字确认" show-cancel-button @confirm="JjSign"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
|
||||
</van-form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
Basic_Information: ['1'],
|
||||
audit_opinion: [],
|
||||
notes: [],
|
||||
Source: [],
|
||||
Brand: [],
|
||||
Name: [],
|
||||
bfdata: {},
|
||||
formData: {},
|
||||
showPicker: false,
|
||||
showSign: false,
|
||||
fChairmanSign: false,
|
||||
sign: "",
|
||||
jb: false,
|
||||
actions: [{name: '甲级'}, {name: '乙级'}, {name: '丙级'}],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
onSelect(item) {
|
||||
this.jb = false;
|
||||
this.formData.jb = item.name
|
||||
},
|
||||
JjSign() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/knbf/sh/Refuse", {
|
||||
xghshyj: this.formData.xghshyj,
|
||||
sign: this.sign,
|
||||
zt: this.bfdata.zt,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/knbf/sh'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
signFor() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/knbf/sh/addDo", {
|
||||
xghshyj: this.formData.xghshyj,
|
||||
jb: this.formData.jb,
|
||||
zt: this.bfdata.zt,
|
||||
xghbzje: this.formData.xghbzje,
|
||||
sign: this.sign,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/knbf/sh'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
RefuseDialog() {
|
||||
this.$refs['addForm'].validate().then(() => {
|
||||
this.fChairmanSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
})
|
||||
},
|
||||
openDialog() {
|
||||
this.$refs['addForm'].validate().then(() => {
|
||||
this.showSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
})
|
||||
$('body').on('touchmove', '.slidebg', function () {
|
||||
$(document.body).on('touchmove.prevUC', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
$('body').on('touchend', '.slidebg', function () {
|
||||
$(document.body).off('touchmove.prevUC');
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.formData = {
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
}
|
||||
$.post('/mobile/knbf/sh/findOne', {id: GetQueryString('id')}).then(res => {
|
||||
if (this.refreshing) {
|
||||
this.list = [];
|
||||
this.refreshing = false;
|
||||
}
|
||||
if (res.code === 0) {
|
||||
this.bfdata = res.data
|
||||
this.bfdata.jtcc = JSON.parse(res.data.jtcc)
|
||||
this.bfdata.jtfc = JSON.parse(res.data.jtfc)
|
||||
this.bfdata.zyzkyy = JSON.parse(res.data.zyzkyy)
|
||||
this.bfdata.zyzkyy = res.data.zyzkyy
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,323 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<!---->
|
||||
<!--出纳-->
|
||||
<style>
|
||||
.van-field__control {
|
||||
color: #8b8f95;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
|
||||
.clearqmbtn {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.van-nav-bar {
|
||||
background-color: white;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
|
||||
html, body {
|
||||
background-color: rgb(250, 250, 250);
|
||||
}
|
||||
|
||||
.van-card__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
.van-cell::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.center {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.white_icon {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
|
||||
.van-action-sheet__cancel {
|
||||
color: #03A9F4;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar title="重大医疗补助出纳" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
<van-row style="margin-top: 5px;background-color: white;min-height: calc(100vh - 100px)">
|
||||
<div style="padding-top: 20px">
|
||||
<van-collapse v-model="Basic_Information" accordion>
|
||||
<van-collapse-item title="个人基本信息" name="1">
|
||||
<van-cell title="工  号" :value="zjdata.loginname"></van-cell>
|
||||
|
||||
<van-cell title="姓  名" :value="zjdata.user_name"></van-cell>
|
||||
|
||||
<van-cell title="性  别" :value="zjdata.sex"></van-cell>
|
||||
|
||||
<van-cell title="年龄(岁)" :value="zjdata.user_age"></van-cell>
|
||||
|
||||
<van-cell title="部  门" :value="zjdata.unit_name"></van-cell>
|
||||
|
||||
<van-cell title="在职状态" :value="zjdata.zzzt"></van-cell>
|
||||
|
||||
<van-cell title="申请时间" :value="zjdata.apply_time"></van-cell>
|
||||
|
||||
<van-cell title="联系电话" :value="zjdata.mobile"></van-cell>
|
||||
|
||||
<van-cell title="疾病诊断" :value="zjdata.disease_diagnosis"></van-cell>
|
||||
|
||||
<van-cell title="住院医疗总费用(元)" :value="zjdata.already_total_medical_expenses"></van-cell>
|
||||
|
||||
<van-cell title="统筹基金支付数(元)" :value="zjdata.already_overall_fund_payment"></van-cell>
|
||||
|
||||
<van-cell title="学校医疗补助已补助金额(元)" :value="zjdata.already_subsidized"></van-cell>
|
||||
|
||||
<van-cell title="发票号码" :value="zjdata.invoice_num"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="附件" name="2">
|
||||
<van-field name="uploader" label="发 票">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_invoice)" v-for="item in zjdata.files_invoice"
|
||||
width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="诊断书">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_medical_certificate)"
|
||||
v-for="item in zjdata.files_medical_certificate" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="医保结算单">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_medicare_settlement)"
|
||||
v-for="item in zjdata.files_medicare_settlement" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="出院小结">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_summary_discharge)"
|
||||
v-for="item in zjdata.files_summary_discharge" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="工会会计审核信息">
|
||||
<van-cell title="审核人员" :value="zjdata.ar_username"></van-cell>
|
||||
|
||||
<van-cell title="审核时间" :value="zjdata.accountant_review_time"></van-cell>
|
||||
|
||||
<van-cell title="补助金额" :value="zjdata.total_grant"></van-cell>
|
||||
|
||||
<van-cell title="审核意见" :value="zjdata.accountant_review_idea"></van-cell>
|
||||
|
||||
<van-cell title="签  字">
|
||||
<div>
|
||||
<img style="width: 100%" :src="zjdata.ar_s"/>
|
||||
</div>
|
||||
<div v-if="zjdata.ar_s==null">
|
||||
暂无
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="工会委员会副主席审核信息">
|
||||
<van-cell title="审核人员" :value="zjdata.vcr_username"></van-cell>
|
||||
|
||||
<van-cell title="审核时间" :value="zjdata.vice_chairman_review_time"></van-cell>
|
||||
|
||||
<van-cell title="审核意见" :value="zjdata.vice_chairman_review_idea"></van-cell>
|
||||
|
||||
<van-cell title="签  字">
|
||||
<div>
|
||||
<img style="width: 100%" :src="zjdata.vcr_s"/>
|
||||
</div>
|
||||
<div v-if="zjdata.vcr_s==null">
|
||||
暂无
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="工会委员会主席审核信息">
|
||||
<van-cell title="审核人员" :value="zjdata.chr_username"></van-cell>
|
||||
|
||||
<van-cell title="审核时间" :value="zjdata.chairman_review_time"></van-cell>
|
||||
|
||||
<van-cell title="审核意见" :value="zjdata.chairman_review_idea"></van-cell>
|
||||
<van-cell title="签  字">
|
||||
<div>
|
||||
<img style="width: 100%" :src="zjdata.cr_s"/>
|
||||
</div>
|
||||
<div v-if="zjdata.cr_s==null">
|
||||
暂无
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="sqr"
|
||||
label="审核人"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="付款时间"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.idea"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
|
||||
<van-button round type="info" size="large" @click="openDialog"> 通过</van-button>
|
||||
|
||||
</van-row>
|
||||
|
||||
<van-dialog v-model="showSign" title="请签字确认" show-cancel-button @confirm="onSubmit"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
</van-form>
|
||||
|
||||
|
||||
</div>
|
||||
</van-row>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
Basic_Information: [1],
|
||||
showSign: false,
|
||||
sign: "",
|
||||
zjdata: {},
|
||||
ImagePreview: [],
|
||||
formData: {},
|
||||
showImagePreview: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
getImg(images) {
|
||||
this.showImagePreview = true
|
||||
images = images.map(v => {
|
||||
return FILE_DOMAIN + v.filepath
|
||||
})
|
||||
this.ImagePreview = images
|
||||
},
|
||||
openDialog() {
|
||||
this.showSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
$('body').on('touchmove', '.slidebg', function () {
|
||||
$(document.body).on('touchmove.prevUC', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
$('body').on('touchend', '.slidebg', function () {
|
||||
$(document.body).off('touchmove.prevUC');
|
||||
});
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/medicalAid/serious/addDo", {
|
||||
time: this.formData.time,
|
||||
sign: this.sign,
|
||||
c_idea: this.formData.idea,
|
||||
state: this.zjdata.state_id,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/medicalAid/serious'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async getData() {
|
||||
const id = GetQueryString('id')
|
||||
this.formData = {
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
|
||||
}
|
||||
$.post("/platform/fw/medicalAid/common/findOne", {id: id}).then(res => {
|
||||
const {code, data} = res
|
||||
if (code === 0) {
|
||||
this.zjdata = res.data
|
||||
medicalAid.toFormData(data)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.getData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,136 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<!---->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cell-card {
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.handleicon {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="重大医疗补助列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="location.href='/mobile/index'"
|
||||
></van-nav-bar>
|
||||
|
||||
<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)">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">{{ o.user_name }}</div>
|
||||
<van-divider></van-divider>
|
||||
<van-row gutter="30" style="font-size: 12px">
|
||||
<van-col span="8">
|
||||
<div style="color: gray">申请时间</div>
|
||||
<div class="text-overflow">{{o.apply_time}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">所属单位</div>
|
||||
<div class="text-overflow">{{o.unit_name}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">疾病诊断</div>
|
||||
<div class="text-overflow">{{o.disease_diagnosis}}</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div style="position: absolute;right: 0;top: 5px">
|
||||
<span :style="'color:'+o.state_color">{{o.state_name}}</span>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
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/medicalAid/serious/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++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/medicalAid/serious/serious?id=' + o.id + '&state=' + o.state_id
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,266 @@
|
||||
<!--#
|
||||
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">
|
||||
<van-cell-group class="cell-card">
|
||||
<van-field readonly v-model="formData.user_name" name="user_name" label="姓  名"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.sex" name="sex"
|
||||
label="性  别"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.user_age" name="user_age"
|
||||
label="年龄(岁)"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field readonly v-model="formData.unit_name" name="unit_name"
|
||||
label="部  门"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field readonly v-if="formData.on_job" value="在职" label="在职状态" input-align="right"></van-field>
|
||||
<van-field readonly v-else value="退休" label="在职状态" input-align="right"></van-field>
|
||||
|
||||
|
||||
<van-field v-model="formData.mobile" name="mobile"
|
||||
label="联系电话"
|
||||
input-align="right"></van-field>
|
||||
<van-field required v-model="formData.disease_diagnosis" name="disease_diagnosis"
|
||||
label="疾病诊断" placeholder="请填写疾病诊断"
|
||||
input-align="right" :rules="[{ required:true, message: '请填写疾病诊断'}]"></van-field>
|
||||
|
||||
<van-field required v-model="formData.hospital" name="hospital"
|
||||
label="入住医院" placeholder="请填写入住医院"
|
||||
:rules="[{ required:true, message: '请填写入住医院'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required label="住院开始时间" :value="formData.starting_time"
|
||||
@click="show = true" placeholder="请填写住院开始时间" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写住院开始时间'}]"></van-field>
|
||||
<van-popup v-model="show" round position="bottom" :style="{ height: '40%' }">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
title="选择年月日"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onConfirm"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field required label="住院结束时间" :value="formData.end_time"
|
||||
@click="show1 = true" placeholder="请填写住院结束时间" input-align="right"
|
||||
:rules="[{ required:true, message: '请填写住院结束时间'}]"></van-field>
|
||||
<van-popup v-model="show1" round position="bottom" :style="{ height: '40%' }">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
title="选择年月日"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onConfirm1"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field readonly v-model="formData.hospital_stay" name="hospital_stay"
|
||||
label="住院天数" placeholder="请填写住院天数"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.bank_name" name="bank_name"
|
||||
label="开户银行名称" placeholder="请填写开户银行名称"
|
||||
:rules="[{ required:true, message: '请填写开户银行名称'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.bank_account" name="bank_account"
|
||||
label="银行账号" placeholder="请填写银行账号"
|
||||
:rules="[{ required:true, message: '请填写银行账号'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.total_medical_expenses" name="total_medical_expenses"
|
||||
label="本次住院医疗费总额" placeholder="请填写本次住院医疗费总额"
|
||||
:rules="[{ required:true, message: '请填写本次住院医疗费总额'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.overall_fund_payment" name="total_medical_expenses"
|
||||
label="统筹基金支付总额(医保支付)" placeholder="请填写统筹基金支付总额(医保支付)"
|
||||
:rules="[{ required:true, message: '请填写统筹基金支付总额(医保支付)'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.individual_pay" name="individual_pay"
|
||||
label="部分政策字符的个人支付" placeholder="请填写部分政策字符的个人支付"
|
||||
:rules="[{ required:true, message: '请填写部分政策字符的个人支付'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.overall_individual_pay" name="overall_individual_pay"
|
||||
label="统筹段的个人比例自付部分" placeholder="请填写统筹段的个人比例自付部分"
|
||||
:rules="[{ required:true, message: '请填写统筹段的个人比例自付部分'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.deductible" name="deductible"
|
||||
label="起付线自付费(门槛费)" placeholder="请填写起付线自付费(门槛费)"
|
||||
:rules="[{ required:true, message: '请填写起付线自付费(门槛费)'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.materials" name="materials"
|
||||
label="完全政策自付中内置材料和自费药费" placeholder="请填写完全政策自付中内置材料和自费药费"
|
||||
:rules="[{ required:true, message: '请填写完全政策自付中内置材料和自费药费'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.insured_amount" name="insured_amount"
|
||||
label="其他保险报销金额" placeholder="请填写其他保险报销金额"
|
||||
:rules="[{ required:true, message: '请填写其他保险报销金额'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field required v-model="formData.invoice_num" name="invoice_num"
|
||||
label="发票号码" placeholder="请填写发票号码"
|
||||
:rules="[{ required:true, message: '请填写发票号码'}]"
|
||||
input-align="right"></van-field>
|
||||
|
||||
<van-field name="files_invoice" label="发  票" required>
|
||||
<template #input>
|
||||
<upload :files.sync="formData.files_invoice"></upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="files_medical_certificate" label="诊断书" required>
|
||||
<template #input>
|
||||
<upload :files.sync="formData.files_medical_certificate"></upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="files_medicare_settlement" label="医保结算单" required>
|
||||
<template #input>
|
||||
<upload :files.sync="formData.files_medicare_settlement"></upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="files_summary_discharge" label="出院小结" required>
|
||||
<template #input>
|
||||
<upload :files.sync="formData.files_summary_discharge"></upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-dialog id="dialog" v-model="showSign" title="请签字确认" show-cancel-button @confirm="onSubmit"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<div class="bottomDiv">
|
||||
<van-button class="bottomBut" @click="openDialog" round block type="info" color="#39acff">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
sign: "",
|
||||
showSign: false,
|
||||
show: false,
|
||||
show1: false,
|
||||
files_invoice: [],
|
||||
formData: {},
|
||||
minDate: new Date(2000, 0, 1),
|
||||
maxDate: new Date(8080, 10, 1),
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'upload': httpVueLoader('/components/plugins/VantFileUpload.vue'),
|
||||
},
|
||||
methods: {
|
||||
openDialog() {
|
||||
this.$refs['addForm'].validate().then(() => {
|
||||
this.showSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
this.$refs.signature.submitSign()
|
||||
})
|
||||
})
|
||||
},
|
||||
async onSubmit() {
|
||||
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
|
||||
const {files_invoice, files_medical_certificate, files_medicare_settlement, files_summary_discharge} = this.formData
|
||||
|
||||
if (!files_invoice || !files_medical_certificate || !files_medicare_settlement || !files_summary_discharge) {
|
||||
this.$toast('请把附件填写完整')
|
||||
return
|
||||
}
|
||||
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.sign = null
|
||||
formData.hospital_time = formData.starting_time.toString() + ',' + formData.end_time.toString()
|
||||
|
||||
this.$toast.loading('提交中...')
|
||||
|
||||
const res = await $.post('/platform/fw/medicalAid/common/apply/doAdd', {
|
||||
data: JSON.stringify(formData),
|
||||
sign: this.sign
|
||||
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/medicalAid')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
|
||||
},
|
||||
onConfirm(date) {
|
||||
this.show = false;
|
||||
this.formData.starting_time = moment(date).format('YYYY-MM-DD');
|
||||
},
|
||||
onConfirm1(date) {
|
||||
this.show1 = false;
|
||||
this.formData.end_time = moment(date).format('YYYY-MM-DD');
|
||||
const end_time = Date.parse(this.formData.end_time);
|
||||
const starting_time = Date.parse(this.formData.starting_time)
|
||||
this.formData.hospital_stay = (end_time - starting_time) / (1 * 24 * 60 * 60 * 1000);
|
||||
},
|
||||
init() {
|
||||
this.formData = {
|
||||
files: [],
|
||||
hospital_time: [],
|
||||
user_name: '${@shiro.getPrincipalProperty("username")}',
|
||||
sex: '${@shiro.getPrincipalProperty("sex")}',
|
||||
user_age: '${@shiro.getPrincipalProperty("birthday")}' ? moment().diff(moment('${@shiro.getPrincipalProperty("birthday")}'), 'years') : '',
|
||||
unit_name: '${@shiro.getPrincipalProperty("unit").getName()}',
|
||||
mobile: '${@shiro.getPrincipalProperty("mobile")}',
|
||||
bank_account: '${@shiro.getPrincipalProperty("bank_number")}',
|
||||
bank_name: '${@shiro.getPrincipalProperty("bank_number")}' ? bankCardAttribution('${@shiro.getPrincipalProperty("bank_number")}').bankName : '',
|
||||
}
|
||||
const zzzt = '${@shiro.getPrincipalProperty("zzzt")}'
|
||||
|
||||
if (zzzt == '在职') {
|
||||
this.$set(this.formData, "on_job", true)
|
||||
} else if (zzzt == '退休') {
|
||||
this.$set(this.formData, "on_job", false)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,108 @@
|
||||
<!--#
|
||||
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-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<van-cell v-for="item in tableData" class="cell-card">
|
||||
<div class="text-overflow" style="font-weight: bold;color: #409EFF">{{ item.ma_username }}</div>
|
||||
<div style="display: flex;font-size: 12px">
|
||||
<div style="color: gray">姓名:</div>
|
||||
<div class="text-overflow">{{ item.user_name }}</div>
|
||||
</div>
|
||||
<div style="position: absolute;right: 0;top: 5px">
|
||||
<span :style="'color:'+item.state_color">{{item.state_name}}</span>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<van-row gutter="30" style="font-size: 12px">
|
||||
<van-col span="8">
|
||||
<div style="color: gray">疾病诊断</div>
|
||||
<div class="text-overflow">{{item.disease_diagnosis}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">申请时间</div>
|
||||
<div class="text-overflow">{{item.apply_time}}</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div style="color: gray">入住医院</div>
|
||||
<div class="text-overflow">{{item.hospital}}</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
|
||||
<div style="position: fixed;bottom: 0px;width: 100%;z-index:10;text-align: center">
|
||||
<van-button @click="openApply" size="large"
|
||||
style="width:88%;margin: 0 auto;margin-bottom: 4px;" color="#39acff">医疗补助申请
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [refreshSearchMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openApply(){
|
||||
window.location.href = '/mobile/medicalAid/apply'
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
typeChange(val) {
|
||||
this.pageForm.type = val
|
||||
this.onRefresh()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,344 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<!---->
|
||||
<!--工会委员会主席审核-->
|
||||
<style>
|
||||
.van-field__control {
|
||||
color: #8b8f95;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
|
||||
.clearqmbtn {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
|
||||
.van-nav-bar {
|
||||
background-color: white;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
|
||||
html, body {
|
||||
background-color: rgb(250, 250, 250);
|
||||
}
|
||||
|
||||
.van-card__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
.van-cell::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.center {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.white_icon {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar title="重大医疗补助主席审核" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
<van-row style="margin-top: 5px;background-color: white;min-height: calc(100vh - 100px)">
|
||||
<div style="padding-top: 20px">
|
||||
<van-collapse v-model="Basic_Information" accordion>
|
||||
<van-collapse-item title="个人基本信息" name="1">
|
||||
<van-cell title="工  号" :value="zjdata.loginname"></van-cell>
|
||||
|
||||
<van-cell title="姓  名" :value="zjdata.user_name"></van-cell>
|
||||
|
||||
<van-cell title="性  别" :value="zjdata.sex"></van-cell>
|
||||
|
||||
<van-cell title="年龄(岁)" :value="zjdata.user_age"></van-cell>
|
||||
|
||||
<van-cell title="部  门" :value="zjdata.unit_name"></van-cell>
|
||||
|
||||
<van-cell title="在职状态" :value="zjdata.zzzt"></van-cell>
|
||||
|
||||
<van-cell title="申请时间" :value="zjdata.apply_time"></van-cell>
|
||||
|
||||
<van-cell title="联系电话" :value="zjdata.mobile"></van-cell>
|
||||
|
||||
<van-cell title="疾病诊断" :value="zjdata.disease_diagnosis"></van-cell>
|
||||
|
||||
<van-cell title="住院医疗总费用(元)" :value="zjdata.already_total_medical_expenses"></van-cell>
|
||||
|
||||
<van-cell title="统筹基金支付数(元)" :value="zjdata.already_overall_fund_payment"></van-cell>
|
||||
|
||||
<van-cell title="学校医疗补助已补助金额(元)" :value="zjdata.already_subsidized"></van-cell>
|
||||
|
||||
<van-cell title="发票号码" :value="zjdata.invoice_num"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="附件" name="2">
|
||||
<van-field name="uploader" label="发 票">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_invoice)" v-for="item in zjdata.files_invoice"
|
||||
width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="诊断书">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_medical_certificate)"
|
||||
v-for="item in zjdata.files_medical_certificate" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="医保结算单">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_medicare_settlement)"
|
||||
v-for="item in zjdata.files_medicare_settlement" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="出院小结">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_summary_discharge)"
|
||||
v-for="item in zjdata.files_summary_discharge" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="工会会计审核信息">
|
||||
<van-cell title="审核人员" :value="zjdata.ar_username"></van-cell>
|
||||
|
||||
<van-cell title="审核时间" :value="zjdata.accountant_review_time"></van-cell>
|
||||
|
||||
<van-cell title="补助金额" :value="zjdata.total_grant"></van-cell>
|
||||
|
||||
<van-cell title="审核意见" :value="zjdata.accountant_review_idea"></van-cell>
|
||||
|
||||
<van-cell title="签  字">
|
||||
<div>
|
||||
<img style="width: 100%" :src="zjdata.ar_s"/>
|
||||
</div>
|
||||
<div v-if="zjdata.ar_s==null">
|
||||
暂无
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="工会委员会副主席审核信息">
|
||||
<van-cell title="审核人员" :value="zjdata.vcr_username"></van-cell>
|
||||
|
||||
<van-cell title="审核时间" :value="zjdata.vice_chairman_review_time"></van-cell>
|
||||
|
||||
<van-cell title="审核意见" :value="zjdata.vice_chairman_review_idea"></van-cell>
|
||||
|
||||
<van-cell title="签  字">
|
||||
<div>
|
||||
<img style="width: 100%" :src="zjdata.vcr_s"/>
|
||||
</div>
|
||||
<div v-if="zjdata.vcr_s==null">
|
||||
暂无
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
|
||||
<van-form>
|
||||
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="sqr"
|
||||
label="审核人"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.idea"
|
||||
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 round plain size="large" @click="ChairmanDialog">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button round type="info" block size="large" @click="openDialog">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-dialog v-model="showSign" title="请签字确认" show-cancel-button @confirm="onSubmit"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
<van-dialog v-model="ChairmanSign" title="请签字确认" show-cancel-button @confirm="zxSign"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
</van-form>
|
||||
|
||||
|
||||
</div>
|
||||
</van-row>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
Basic_Information: [1],
|
||||
showSign: false,
|
||||
ChairmanSign: false,
|
||||
sign: "",
|
||||
zjdata: {},
|
||||
ImagePreview: [],
|
||||
formData: {},
|
||||
showImagePreview: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
getImg(images) {
|
||||
this.showImagePreview = true
|
||||
images = images.map(v => {
|
||||
return FILE_DOMAIN + v.filepath
|
||||
})
|
||||
this.ImagePreview = images
|
||||
},
|
||||
openDialog() {
|
||||
this.showSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
},
|
||||
ChairmanDialog() {
|
||||
this.ChairmanSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
onSubmit() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/medicalAid/serious/addDo", {
|
||||
time: this.formData.time,
|
||||
zx_idea: this.formData.idea,
|
||||
sign: this.sign,
|
||||
state: this.zjdata.state_id,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/medicalAid/serious'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
zxSign() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/medicalAid/serious/Refuse", {
|
||||
time: this.formData.time,
|
||||
zx_idea: this.formData.idea,
|
||||
sign: this.sign,
|
||||
state: this.zjdata.state_id,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/medicalAid/serious'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async getData() {
|
||||
const id = GetQueryString('id')
|
||||
this.formData = {
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
|
||||
}
|
||||
$.post("/platform/fw/medicalAid/common/findOne", {id: id}).then(res => {
|
||||
const {code, data} = res
|
||||
if (code === 0) {
|
||||
this.zjdata = res.data
|
||||
medicalAid.toFormData(data)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.getData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,337 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<!---->
|
||||
|
||||
<!--工会委员会副主席审核-->
|
||||
<style>
|
||||
.van-field__control {
|
||||
color: #8b8f95;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
|
||||
.clearqmbtn {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.van-nav-bar {
|
||||
background-color: white;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
|
||||
html, body {
|
||||
background-color: rgb(250, 250, 250);
|
||||
}
|
||||
|
||||
.van-card__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
.van-cell::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.center {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.white_icon {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar title="重大医疗补助副主席审核" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<van-row style="margin-top: 5px;background-color: white;min-height: calc(100vh - 100px)">
|
||||
<div style="padding-top: 20px">
|
||||
<van-collapse v-model="Basic_Information" accordion>
|
||||
<van-collapse-item title="个人基本信息" name="1">
|
||||
<van-cell title="工  号" :value="zjdata.loginname"></van-cell>
|
||||
|
||||
<van-cell title="姓  名" :value="zjdata.user_name"></van-cell>
|
||||
|
||||
<van-cell title="性  别" :value="zjdata.sex"></van-cell>
|
||||
|
||||
<van-cell title="年龄(岁)" :value="zjdata.user_age"></van-cell>
|
||||
|
||||
<van-cell title="部  门" :value="zjdata.unit_name"></van-cell>
|
||||
|
||||
<van-cell title="在职状态" :value="zjdata.zzzt"></van-cell>
|
||||
|
||||
<van-cell title="申请时间" :value="zjdata.apply_time"></van-cell>
|
||||
|
||||
<van-cell title="联系电话" :value="zjdata.mobile"></van-cell>
|
||||
|
||||
<van-cell title="疾病诊断" :value="zjdata.disease_diagnosis"></van-cell>
|
||||
|
||||
<van-cell title="住院医疗总费用(元)" :value="zjdata.already_total_medical_expenses"></van-cell>
|
||||
|
||||
<van-cell title="统筹基金支付数(元)" :value="zjdata.already_overall_fund_payment"></van-cell>
|
||||
|
||||
<van-cell title="学校医疗补助已补助金额(元)" :value="zjdata.already_subsidized"></van-cell>
|
||||
|
||||
<van-cell title="发票号码" :value="zjdata.invoice_num"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="附件" name="2">
|
||||
<van-field name="uploader" label="发 票">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_invoice)" v-for="item in zjdata.files_invoice"
|
||||
width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="诊断书">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_medical_certificate)"
|
||||
v-for="item in zjdata.files_medical_certificate" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="医保结算单">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_medicare_settlement)"
|
||||
v-for="item in zjdata.files_medicare_settlement" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="出院小结">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_summary_discharge)"
|
||||
v-for="item in zjdata.files_summary_discharge" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="工会会计审核信息">
|
||||
<van-cell title="审核人员" :value="zjdata.ar_username"></van-cell>
|
||||
|
||||
<van-cell title="审核时间" :value="zjdata.accountant_review_time"></van-cell>
|
||||
|
||||
<van-cell title="补助金额" :value="zjdata.total_grant"></van-cell>
|
||||
|
||||
<van-cell title="审核意见" :value="zjdata.accountant_review_idea"></van-cell>
|
||||
|
||||
<van-cell title="签  字">
|
||||
<div>
|
||||
<img style="width: 100%" :src="zjdata.ar_s"/>
|
||||
</div>
|
||||
<div v-if="zjdata.ar_s==null">
|
||||
暂无
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
|
||||
|
||||
<van-form ref="addForm">
|
||||
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="sqr"
|
||||
label="审核人"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.idea"
|
||||
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 round plain size="large" @click="RefuseDialog">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button round type="info" block size="large" @click="openDialog">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-dialog v-model="showSign" title="请签字确认" show-cancel-button @confirm="onSubmit"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
<van-dialog v-model="fChairmanSign" title="请签字确认" show-cancel-button @confirm="fzxSign"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
</van-form>
|
||||
|
||||
|
||||
</div>
|
||||
</van-row>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
Basic_Information: [1],
|
||||
showSign: false,
|
||||
fChairmanSign: false,
|
||||
sign: "",
|
||||
zjdata: {},
|
||||
ImagePreview: [],
|
||||
formData: {},
|
||||
showImagePreview: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
getImg(images) {
|
||||
this.showImagePreview = true
|
||||
images = images.map(v => {
|
||||
return FILE_DOMAIN + v.filepath
|
||||
})
|
||||
this.ImagePreview = images
|
||||
},
|
||||
openDialog() {
|
||||
this.$refs['addForm'].validate().then(() => {
|
||||
this.showSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
RefuseDialog() {
|
||||
this.$refs['addForm'].validate().then(() => {
|
||||
this.fChairmanSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
onSubmit() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/medicalAid/serious/addDo", {
|
||||
time: this.formData.time,
|
||||
f_zxidea: this.formData.idea,
|
||||
sign: this.sign,
|
||||
state: this.zjdata.state_id,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/medicalAid/serious'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
fzxSign() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/medicalAid/serious/Refuse", {
|
||||
time: this.formData.time,
|
||||
f_zxidea: this.formData.idea,
|
||||
sign: this.sign,
|
||||
state: this.zjdata.state_id,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/medicalAid/serious'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
async getData() {
|
||||
const id = GetQueryString('id')
|
||||
this.formData = {
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
|
||||
}
|
||||
$.post("/platform/fw/medicalAid/common/findOne", {id: id}).then(res => {
|
||||
const {code, data} = res
|
||||
if (code === 0) {
|
||||
this.zjdata = res.data
|
||||
medicalAid.toFormData(data)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.getData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,309 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<!--会计审核页面-->
|
||||
<style>
|
||||
.van-field__control {
|
||||
color: #8b8f95;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
color: #39acff
|
||||
}
|
||||
|
||||
.clearqmbtn {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.van-nav-bar {
|
||||
background-color: white;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
html, body {
|
||||
background-color: rgb(250, 250, 250);
|
||||
}
|
||||
|
||||
.van-card__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
.van-cell::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.center {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.white_icon {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
|
||||
.van-collapse-item__wrapper .van-cell__title {
|
||||
color: #39acff
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar title="重大医疗补助会计审核" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<van-row style="margin-top: 5px;background-color: white;padding-top: 20px;min-height: calc(100vh - 100px)">
|
||||
<van-collapse v-model="activeNames" accordion>
|
||||
<van-collapse-item title="个人基本信息" name="1">
|
||||
<van-cell title="工  号" :value="zjdata.loginname"></van-cell>
|
||||
|
||||
<van-cell title="姓  名" :value="zjdata.user_name"></van-cell>
|
||||
|
||||
<van-cell title="性  别" :value="zjdata.sex"></van-cell>
|
||||
|
||||
<van-cell title="年龄(岁)" :value="zjdata.user_age"></van-cell>
|
||||
|
||||
<van-cell title="部  门" :value="zjdata.unit_name"></van-cell>
|
||||
|
||||
<van-cell title="在职状态" :value="zjdata.zzzt"></van-cell>
|
||||
|
||||
<van-cell title="申请时间" :value="zjdata.apply_time"></van-cell>
|
||||
|
||||
<van-cell title="联系电话" :value="zjdata.mobile"></van-cell>
|
||||
|
||||
<van-cell title="疾病诊断" :value="zjdata.disease_diagnosis"></van-cell>
|
||||
|
||||
<van-cell title="住院医疗总费用(元)" :value="zjdata.already_total_medical_expenses"></van-cell>
|
||||
|
||||
<van-cell title="统筹基金支付数(元)" :value="zjdata.already_overall_fund_payment"></van-cell>
|
||||
|
||||
<van-cell title="学校医疗补助已补助金额(元)" :value="zjdata.already_subsidized"></van-cell>
|
||||
|
||||
<van-cell title="发票号码" :value="zjdata.invoice_num"></van-cell>
|
||||
|
||||
</van-collapse-item>
|
||||
|
||||
<van-collapse-item title="附件" name="2">
|
||||
<van-field name="uploader" label="发 票">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_invoice)" v-for="item in zjdata.files_invoice"
|
||||
width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="诊断书">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_medical_certificate)"
|
||||
v-for="item in zjdata.files_medical_certificate" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="医保结算单">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_medicare_settlement)"
|
||||
v-for="item in zjdata.files_medicare_settlement" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="uploader" label="出院小结">
|
||||
<template #input>
|
||||
<van-image @click="getImg(zjdata.files_summary_discharge)"
|
||||
v-for="item in zjdata.files_summary_discharge" width="100" height="100"
|
||||
:src="FILE_DOMAIN+item.filepath">
|
||||
<van-image-preview v-model="showImagePreview"
|
||||
:images="ImagePreview"></van-image-preview>
|
||||
</van-image>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</van-collapse-item>
|
||||
|
||||
<van-collapse-item title="审核" name="3">
|
||||
|
||||
<van-form ref="addForm">
|
||||
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="sqr"
|
||||
label="审核人" input-align="right"></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间" input-align="right"></van-field>
|
||||
|
||||
<van-field v-model="formData.total_grant" type="number" label="补助金额"
|
||||
input-align="right" placeholder="请输入补助金额"></van-field>
|
||||
|
||||
<van-field v-model="formData.idea" rows="2" autosize label="审核意见"
|
||||
type="textarea" placeholder="请输入审核意见" input-align="right"></van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button round plain size="large" @click="RefuseDialog">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button round type="info" size="large" @click="openDialog">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-dialog v-model="showSign" title="请签字确认" show-cancel-button @confirm="onSubmit"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
<van-dialog v-model="fChairmanSign" title="请签字确认" show-cancel-button @confirm="kjSign"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
|
||||
</van-form>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
activeNames: '3',
|
||||
showSign: false,
|
||||
fChairmanSign: false,
|
||||
sign: "",
|
||||
zjdata: {},
|
||||
formData: {},
|
||||
ImagePreview: [],
|
||||
showImagePreview: false,
|
||||
}
|
||||
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
getImg(images) {
|
||||
this.showImagePreview = true
|
||||
images = images.map(v => {
|
||||
return FILE_DOMAIN + v.filepath
|
||||
})
|
||||
this.ImagePreview = images
|
||||
},
|
||||
openDialog() {
|
||||
this.$refs['addForm'].validate().then(() => {
|
||||
this.showSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
})
|
||||
},
|
||||
RefuseDialog() {
|
||||
this.$refs['addForm'].validate().then(() => {
|
||||
this.fChairmanSign = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
kjSign() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/medicalAid/serious/Refuse", {
|
||||
time: this.formData.time,
|
||||
total_grant: this.formData.total_grant,
|
||||
idea: this.formData.idea,
|
||||
sign: this.sign,
|
||||
state: this.zjdata.state_id,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/medicalAid/serious'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
$.post("/mobile/medicalAid/serious/addDo", {
|
||||
time: this.formData.time,
|
||||
total_grant: this.formData.total_grant,
|
||||
idea: this.formData.idea,
|
||||
state: this.zjdata.state_id,
|
||||
sign: this.sign,
|
||||
id: GetQueryString('id')
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/medicalAid/serious'
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
async getData() {
|
||||
const id = GetQueryString('id')
|
||||
const {data} = await $.get("/platform/fw/medicalAid/acc/review/getTotalGrant", {id})
|
||||
|
||||
this.formData = {
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
idea: '按照学校《教职工病伤医疗互助基金实施办法》规定,本次共补助金额为:\n' + capitalAmount(data.toFixed(0)) + '(' + data.toFixed(2) + ')。',
|
||||
total_grant: data.toFixed(2)
|
||||
}
|
||||
$.post("/platform/fw/medicalAid/common/findOne", {id: id}).then(res => {
|
||||
const {code, data} = res
|
||||
if (code === 0) {
|
||||
medicalAid.toFormData(data)
|
||||
this.zjdata = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.getData();
|
||||
}
|
||||
|
||||
})
|
||||
</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,130 @@
|
||||
<!--#
|
||||
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,377 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder
|
||||
title="修改个人信息"></van-nav-bar>
|
||||
|
||||
<van-form :show-error-message="true" @submit="doSubmit" class="mt5"
|
||||
input-align="right"
|
||||
ref="form"
|
||||
scroll-to-error
|
||||
validate-trigger="onSubmit">
|
||||
<van-cell-group inset>
|
||||
<van-field label="工号" left-icon="contact"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"></van-field>
|
||||
<van-field label="姓名" left-icon="contact"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></van-field>
|
||||
<van-field clickable label="性别"
|
||||
left-icon="ellipsis"
|
||||
placeholder="请选择性别"
|
||||
readonly
|
||||
v-model="formData.sex"></van-field>
|
||||
<van-popup position="bottom" v-model="sexPicker">
|
||||
<van-picker
|
||||
:columns="['男','女']"
|
||||
@cancel="sexPicker = false"
|
||||
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field @click="marriagePicker=true" label="婚否" left-icon="ellipsis"
|
||||
readonly placeholder="请选择婚否" v-model="formData.marriage"></van-field>
|
||||
<van-popup position="bottom" v-model="marriagePicker">
|
||||
<van-picker
|
||||
:columns="['已婚','未婚']"
|
||||
@cancel="marriagePicker = false"
|
||||
@confirm="(val)=>{formData.marriage = val;marriagePicker=false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--临时屏蔽-->
|
||||
<template v-if="false">
|
||||
<van-field :rules="[{ required:true, message: '请选择民族' }]" clickable label="民族"
|
||||
left-icon="bar-chart-o"
|
||||
placeholder="请选择民族" readonly
|
||||
v-model="formData.nation"></van-field>
|
||||
<van-popup position="bottom" v-model="nationPicker">
|
||||
<van-picker
|
||||
:columns="nationColumns"
|
||||
@cancel="nationPicker = false"
|
||||
@confirm="(v)=>{formData.nation = v;nationPicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field clickable
|
||||
label="学历"
|
||||
|
||||
left-icon="coupon-o"
|
||||
placeholder="请选择学历" readonly
|
||||
v-model="formData.education"></van-field>
|
||||
<van-popup position="bottom" v-model="educationPicker">
|
||||
<van-picker
|
||||
:columns="educationColumns"
|
||||
@cancel="educationPicker = false"
|
||||
@confirm="(v)=>{formData.education = v;educationPicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field clickable
|
||||
label="学位"
|
||||
left-icon="comment-o"
|
||||
placeholder="请选择学位" readonly
|
||||
v-model="formData.academicDegree"></van-field>
|
||||
<van-popup position="bottom" v-model="academicDegreePicker">
|
||||
<van-picker
|
||||
:columns="academicDegreeColumns"
|
||||
@cancel="academicDegreePicker = false"
|
||||
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="政治面貌" left-icon="label-o"
|
||||
placeholder="请填写政治面貌" readonly
|
||||
v-model="formData.political"></van-field>
|
||||
</template>
|
||||
|
||||
<van-field @click="idTypePicker=true" label="有效证件类型" left-icon="label-o"
|
||||
placeholder="请选择有效证件类型"
|
||||
readonly v-model="formData.idType">
|
||||
</van-field>
|
||||
<van-popup position="bottom" v-model="idTypePicker">
|
||||
<van-picker
|
||||
:columns="idTypeColumns"
|
||||
@cancel="idTypePicker = false"
|
||||
@confirm="(v)=>{formData.idType = v;idTypePicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field label="证件号"
|
||||
left-icon="idcard"
|
||||
placeholder="请填写身份证号码"
|
||||
:rules="[{ pattern :/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的证件号' }]"
|
||||
v-model="formData.idcard"></van-field>
|
||||
<van-field label="联系电话"
|
||||
left-icon="phone-o"
|
||||
placeholder="请填写联系电话"
|
||||
:rules="[{ pattern :/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, message: '请输入正确的手机号' }]"
|
||||
type="tel"
|
||||
v-model="formData.mobile"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="mt10" inset>
|
||||
<!-- <van-field label="户口所在地" left-icon="wap-home-o"-->
|
||||
<!-- placeholder="请填写户口所在地" readonly-->
|
||||
<!-- v-model="formData.registeredResidence"></van-field>-->
|
||||
<!-- <van-field label="现居住地" left-icon="home-o"-->
|
||||
<!-- placeholder="请填写现居住地" readonly-->
|
||||
<!-- v-model="formData.homeAddress"></van-field>-->
|
||||
<van-field label="工作单位" left-icon="cluster-o"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"></van-field>
|
||||
<van-field label="分工会" left-icon="cluster-o"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('union').getUnionname()}"></van-field>
|
||||
<!-- <van-field label="职务" left-icon="debit-pay"-->
|
||||
<!-- placeholder="请填写职务" readonly-->
|
||||
<!-- v-model="formData.position"></van-field>-->
|
||||
</van-cell-group>
|
||||
|
||||
<!-- <van-cell-group class="mt10 up_down" inset>
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button @click="family.push({})" icon="plus"
|
||||
native-type="button" round size="mini" style="width: 40px"
|
||||
type="primary"
|
||||
v-if="family && family.length>0 && family.length<3"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="family && family.length>0">
|
||||
<div class="mt5" v-for="o,i in family">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button @click="family.splice(i,1)"
|
||||
icon="minus" native-type="button" round size="mini"
|
||||
style="width: 40px"
|
||||
type="danger"></van-button>
|
||||
</div>
|
||||
<van-field :rules="[{ required:true, message: '请填写与本人关系' }]" label="关系" placeholder="请填写与本人关系"
|
||||
v-model="o.relation"></van-field>
|
||||
<van-field :rules="[{ required:true, message: '请填写姓名' }]" label="姓名" placeholder="请填写姓名"
|
||||
v-model="o.name"></van-field>
|
||||
<van-field :rules="[{ required:true, message: '请填写联系方式' }]" label="联系方式" placeholder="请填写联系方式"
|
||||
type="tel"
|
||||
v-model="o.mobile"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button @click="family.push({})"
|
||||
icon="plus" native-type="button" round size="mini"
|
||||
style="width: 50px"
|
||||
type="primary"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>-->
|
||||
|
||||
<!-- <van-cell-group class="mt10 up_down" inset>
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-notes-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>个人工作简历</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
|
||||
autosize
|
||||
readonly
|
||||
autosize
|
||||
input-align="left"
|
||||
maxlength="200"
|
||||
placeholder="请输入个人工作简历"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
style="padding: 0"
|
||||
type="textarea"
|
||||
v-model="formData.vita"
|
||||
></van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="mt10 up_down" inset>
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-award-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>特长</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
|
||||
autosize
|
||||
autosize
|
||||
readonly
|
||||
input-align="left"
|
||||
maxlength="200"
|
||||
placeholder="请填写个人特长"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
style="padding: 0"
|
||||
type="textarea"
|
||||
v-model="formData.specialSkill"
|
||||
></van-field>
|
||||
</div>
|
||||
</van-cell-group>-->
|
||||
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button :color="themeColor" block native-type="submit" style="border-radius: 10px"
|
||||
type="info">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const political = []
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sexPicker: false,
|
||||
marriagePicker: false,
|
||||
applyRecords: [],
|
||||
formData: {},
|
||||
nationPicker: false,
|
||||
educationPicker: false,
|
||||
academicDegreePicker: false,
|
||||
family: [],
|
||||
educationColumns: [
|
||||
'博士研究生', '硕士研究生', '本科', '专科', '中专中技', '高中', '初中以下'
|
||||
],
|
||||
academicDegreeColumns: [
|
||||
'学士', '硕士', '博士'
|
||||
],
|
||||
nationColumns: [],
|
||||
memberStatusColumn: {
|
||||
MEMBER: 1,
|
||||
APPLYING: 2,
|
||||
NOTMEBMER: 3,
|
||||
},
|
||||
memberStatus: null,
|
||||
idTypePicker: false,
|
||||
idTypeColumns: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: GetQueryString("taskId") ? '您的手机号信息已核对,确认提交?' : '您确定要提交吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const formData = clone(this.formData)
|
||||
formData.taskId = GetQueryString("taskId") ? GetQueryString("taskId") : null
|
||||
formData.family = JSON.stringify(this.family)
|
||||
const resp = await $.post("/platform/member/apply/submit/doEdit", formData)
|
||||
setTimeout(() => {
|
||||
this.$toast.success('提交成功');
|
||||
setTimeout(() => {
|
||||
history.back()
|
||||
// location.replace('/mobile/index')
|
||||
}, 300)
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
addFamily() {
|
||||
this.family.push({})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
if (resp.data.member === 1) {
|
||||
this.memberStatus = this.memberStatusColumn.MEMBER
|
||||
} else {
|
||||
if (resp.data.record != null) {
|
||||
this.memberStatus = this.memberStatusColumn.APPLYING
|
||||
} else {
|
||||
this.memberStatus = this.memberStatusColumn.NOTMEBMER
|
||||
}
|
||||
}
|
||||
this.$set(this.formData, "isMember", "${@shiro.getPrincipalProperty('member')}")
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, "marriage", "${@shiro.getPrincipalProperty('marriage')}")
|
||||
this.$set(this.formData, "position", "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, "nation", "${@shiro.getPrincipalProperty('nation')}")
|
||||
this.$set(this.formData, "mobile", resp.data.mobile)
|
||||
this.$set(this.formData, "political", "${@shiro.getPrincipalProperty('political')}")
|
||||
this.$set(this.formData, "id", "${@shiro.getPrincipalProperty('id')}")
|
||||
this.$set(this.formData, "education", "${@shiro.getPrincipalProperty('education')}")
|
||||
this.$set(this.formData, "academicDegree", "${@shiro.getPrincipalProperty('academicDegree')}")
|
||||
this.$set(this.formData, "idcard", resp.data.idcard)
|
||||
this.$set(this.formData, "idType", resp.data.idType)
|
||||
this.$set(this.formData, "registeredResidence", "${@shiro.getPrincipalProperty('registeredResidence')}")
|
||||
this.$set(this.formData, "homeAddress", "${@shiro.getPrincipalProperty('homeAddress')}")
|
||||
this.$set(this.formData, "vita", "${@shiro.getPrincipalProperty('vita')}")
|
||||
this.$set(this.formData, "specialSkill", "${@shiro.getPrincipalProperty('specialSkill')}")
|
||||
const {data} = await $.get("/mobile/member/getAllNation");
|
||||
this.nationColumns = data.map(v => {
|
||||
return v.mzmc
|
||||
})
|
||||
|
||||
const idTypeRespData = await getDictByCode("idType")
|
||||
console.log(idTypeRespData)
|
||||
this.idTypeColumns = idTypeRespData.map(v => {
|
||||
return v.name
|
||||
})
|
||||
// console.log(idTypeColumns)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,228 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-dropdown-menu__bar {
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.infoPop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="会员查询"
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
@input="doSearch"
|
||||
:show-action="true"
|
||||
maxlength="10"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="unionList" @change="unionChange"
|
||||
v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch"
|
||||
v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 112px;">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<van-cell-group @click="viewInfo(o.id)" inset>
|
||||
<van-cell :border="false" title="姓名">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px">{{o.username}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="性别">{{o.sex}}</van-cell>
|
||||
<van-cell :border="false" title="出生年月">{{o.birthday}}</van-cell>
|
||||
<!-- <van-cell :border="false" title="人员类型">{{o.personType}}</van-cell>-->
|
||||
<van-cell :border="false" title="联系电话">{{o.mobile}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.unionname}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-if="tableData.length === 0" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<div :style="{color:themeColor}"
|
||||
style="text-align: right;position: fixed;bottom: 20px;right: 20px">
|
||||
<van-button :color="themeColor" hairline size="mini" type="primary">
|
||||
总:{{pageForm.totalCount}}人
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-popup class="infoPop" v-model="infoShow" position="right">
|
||||
<van-nav-bar @click-left="infoShow = false" fixed left-arrow placeholder safe-area-inset-top
|
||||
title="会员详细信息"></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基本信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="年龄">{{ viewData.birthday }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.mz }}</van-cell>
|
||||
<van-cell title="文化程度">{{ viewData.xl }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.zzmm }}</van-cell>
|
||||
<van-cell title="部门">{{ viewData.unitname }}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.zc }}</van-cell>
|
||||
<van-cell title="职务">{{ viewData.zw }}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
个人简历
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell>
|
||||
<template>
|
||||
<div v-html="viewData.grjl" v-if="viewData.grjl!=null"></div>
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
pageForm: {
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async unionChange() {
|
||||
await this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/member/getMemberData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
async viewInfo(id) {
|
||||
const resp = await $.post('/mobile/member/viewInfo', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.infoShow = true
|
||||
}
|
||||
},
|
||||
async initUnion() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionList = await getUnionList(null)
|
||||
} else {
|
||||
this.unionList = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionList.unshift({text: "全部工会", value: null})
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async initUnit(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true' && this.pageForm.unionId === null) {
|
||||
this.unitList.unshift({text: "全部单位", value: null})
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.initUnit("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,112 @@
|
||||
<!--#
|
||||
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)
|
||||
if(resp.code===0){
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}else{
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
setTimeout(() => {
|
||||
this.$refs.info.getUserInfo(user_id)
|
||||
this.$refs.info.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
this.formData = {
|
||||
recordId: record_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,274 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="会员审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange"
|
||||
:options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.audit" @change="yearChange"
|
||||
:options="auditList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="申 请 人:">
|
||||
{{o.username}}({{o.loginname}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间:">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会:">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="申请方式:"> {{changeOrigin[o.applyOrigin]}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
<div style="text-align: right;margin-bottom: 10px;margin-right: 10px;margin-top: -35px;">
|
||||
|
||||
<van-button :color="themeColor" plain round size="small"
|
||||
type="primary"
|
||||
@click.stop="openView(o)" style="width: 60px">
|
||||
{{o.stateId===60?'审核':'查看'}}
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
<van-popup v-model="popupShow" position="right" :style="{ height: '100%', width: '100%'}">
|
||||
|
||||
<van-nav-bar title="校工会审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="yearChange();popupShow=false"></van-nav-bar>
|
||||
<member-menber-change-info ref="info" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<template v-if="info.originUnit">
|
||||
<van-field
|
||||
label="原科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originThreeUnit.name"
|
||||
></van-field>
|
||||
<van-field
|
||||
label="原单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="原工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnion.unionname"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentThreeUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnion.unionname"
|
||||
></van-field>
|
||||
</template>
|
||||
<van-field
|
||||
label="审核人员"
|
||||
name="username"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field required
|
||||
v-model="formData.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-change-info>
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
popupShow: false,
|
||||
mLoading: false,
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '全部', value: 0},
|
||||
{text: '已审核', value: 1},
|
||||
{text: '未审核', value: 2},
|
||||
],
|
||||
info: {
|
||||
originUnion: {},
|
||||
currentUnion: {}
|
||||
},
|
||||
pageForm: {
|
||||
source: 2,
|
||||
year: new Date().getFullYear(),
|
||||
audit: 2,
|
||||
},
|
||||
changeOriginL: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-change-info': httpVueLoader('/components/mobile/member/MobileMemberChangeInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/member/change/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '提醒',
|
||||
message: '确定要审核吗?',
|
||||
}).then(async () => {
|
||||
this.formData.currentUnitId = this.info.currentUnitId
|
||||
this.formData.currentUnionId = this.info.currentUnionId
|
||||
this.formData.currentThreeUnitId = this.info.currentThreeUnitId
|
||||
this.formData.auditPass = pass
|
||||
this.submitLoading = true
|
||||
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
|
||||
this.submitLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.yearChange()
|
||||
this.popupShow = false
|
||||
vant.Toast.success(resp.msg);
|
||||
} else {
|
||||
vant.Toast.fail(resp.msg);
|
||||
}
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
openView(o) {
|
||||
this.handle = o.stateId === 60
|
||||
this.formData = {
|
||||
recordId: o.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
this.popupShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getUserInfo(o.userId)
|
||||
this.$refs.info.getAuditInfo(o.id)
|
||||
setTimeout(() => {
|
||||
this.info = this.$refs.info.info
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
async getChangeOrigin() {
|
||||
const changeOrigin = {}
|
||||
const changeOriginOptions = await getEnumOptions("MemberChangeOrigin")
|
||||
changeOriginOptions.forEach(v => {
|
||||
changeOrigin[v.code] = v.description
|
||||
})
|
||||
return changeOrigin
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.changeOrigin = await this.getChangeOrigin()
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,114 @@
|
||||
<!--#
|
||||
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)
|
||||
if(resp.code===0){
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}else{
|
||||
this.$toast.fail('审核失败')
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
setTimeout(() => {
|
||||
this.$refs.info.getUserInfo(user_id)
|
||||
this.$refs.info.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
|
||||
this.formData = {
|
||||
recordId: record_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,274 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="会员审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange"
|
||||
:options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.audit" @change="yearChange"
|
||||
:options="auditList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="申 请 人:">
|
||||
{{o.username}}({{o.loginname}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间:">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会:">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="申请方式:"> {{changeOrigin[o.applyOrigin]}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
<div style="text-align: right;margin-bottom: 10px;margin-right: 10px;margin-top: -35px;">
|
||||
|
||||
<van-button :color="themeColor" plain round size="small"
|
||||
type="primary"
|
||||
@click.stop="openView(o)" style="width: 60px">
|
||||
{{o.stateId===50?'审核':'查看'}}
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
<van-popup v-model="popupShow" position="right" :style="{ height: '100%', width: '100%'}">
|
||||
|
||||
<van-nav-bar title="分工会审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="yearChange();popupShow=false"></van-nav-bar>
|
||||
<member-menber-change-info ref="info" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会审核
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<van-form>
|
||||
<template v-if="info.originUnit">
|
||||
<van-field
|
||||
label="原科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originThreeUnit.name"
|
||||
></van-field>
|
||||
<van-field
|
||||
label="原单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="原工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnion.unionname"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentThreeUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnion.unionname"
|
||||
></van-field>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
label="审核人员"
|
||||
name="username"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field required
|
||||
v-model="formData.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-change-info>
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
popupShow: false,
|
||||
mLoading: false,
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '全部', value: 0},
|
||||
{text: '已审核', value: 1},
|
||||
{text: '未审核', value: 2},
|
||||
],
|
||||
info: {
|
||||
originUnion: {},
|
||||
currentUnion: {}
|
||||
},
|
||||
pageForm: {
|
||||
source: 1,
|
||||
year: new Date().getFullYear(),
|
||||
audit: 2,
|
||||
},
|
||||
changeOriginL: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-change-info': httpVueLoader('/components/mobile/member/MobileMemberChangeInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/member/change/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '提醒',
|
||||
message: '确定要审核吗?',
|
||||
}).then(async () => {
|
||||
this.formData.auditPass = pass
|
||||
this.submitLoading = true
|
||||
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
|
||||
this.submitLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.yearChange()
|
||||
this.popupShow = false
|
||||
vant.Toast.success(resp.msg);
|
||||
} else {
|
||||
vant.Toast.fail(resp.msg);
|
||||
}
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
openView(o) {
|
||||
this.handle = o.stateId === 50
|
||||
this.formData = {
|
||||
recordId: o.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
this.popupShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getUserInfo(o.userId)
|
||||
this.$refs.info.getAuditInfo(o.id)
|
||||
setTimeout(() => {
|
||||
this.info = this.$refs.info.info
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
async getChangeOrigin() {
|
||||
const changeOrigin = {}
|
||||
const changeOriginOptions = await getEnumOptions("MemberChangeOrigin")
|
||||
changeOriginOptions.forEach(v => {
|
||||
changeOrigin[v.code] = v.description
|
||||
})
|
||||
return changeOrigin
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.changeOrigin = await this.getChangeOrigin()
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,57 @@
|
||||
<!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">
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.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"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jSignature/jSignature.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jSignature/flashcanvas.js"></script>
|
||||
<script src="${base!}/assets/platform/js/pinyin.js"></script>
|
||||
<script src="${base!}/assets/platform/js/viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/js/jquery-viewer.min.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/v.js"></script>
|
||||
<script src="${base!}/assets/platform/module/proposal/api.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mobileMixins.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mProposal.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mCondolence.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mCommon.js"></script>
|
||||
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<script src="${base!}/assets/platform/module/condolence/common.js"></script>
|
||||
<script src="${base!}/assets/platform/module/difficulty/common.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<script src="${base!}/assets/platform/js/scannerQrCodeJs.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="https://webapi.amap.com/maps?v=2.0&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.Geolocation"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
const APP_DOMAIN = "${AppDomain!}";
|
||||
const FILE_DOMAIN = "${AppFileDomain!}";
|
||||
|
||||
</script>
|
||||
${layoutContent}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,207 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.chart-card {
|
||||
background-color: #FFFFFF;
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
@click-left="location.href='/mobile/index/toHome?type=民主管理'"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
title="提案分析"
|
||||
></van-nav-bar>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="sessionList" @change="getData()"
|
||||
v-model="pageForm.sessionId"></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 @click="renderColumnData(null)" plain size="mini" type="info">全部类型</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
|
||||
@click-left="location.href='/mobile/index/toHome?type=民主管理'"
|
||||
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="sessionList" @change="sessionChange"
|
||||
v-model="pageForm.sessionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="delegationList" @change="doSearch"
|
||||
v-model="pageForm.delegationId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="delegateTypeList" @change="doSearch"
|
||||
v-model="pageForm.delegateTypeId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 120px;">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<van-cell-group @click="viewInfo(o.dbid)" inset>
|
||||
<van-cell :border="false" title="姓名">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis" style="font-size: 16px">{{o.username}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="代表团">{{o.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
|
||||
@click-left="history.back()"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="代表详细信息"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基本信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="年龄">{{ viewData.birthday }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.mz }}</van-cell>
|
||||
<van-cell title="文化程度">{{ viewData.xl }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.zzmm }}</van-cell>
|
||||
<van-cell title="部门">{{ viewData.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-html="viewData.grjl" v-if="viewData.grjl!=null"></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
|
||||
@click-left="location.href='/mobile/index/toHome?type=民主管理'"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
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="sessionList" @change="doSearch"
|
||||
v-model="pageForm.meetingId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="proposalTypeList" @change="doSearch"
|
||||
v-model="pageForm.proposalTypeId"></van-dropdown-item>
|
||||
<!-- <van-dropdown-item v-model="pageForm.proposalResultCode" :options="resultList"
|
||||
@change="doSearch"></van-dropdown-item>-->
|
||||
</van-dropdown-menu>
|
||||
|
||||
|
||||
<van-tabs @change="doSearch()" v-model="pageForm.isAudit">
|
||||
<van-tab :name="false" title="未附议"></van-tab>
|
||||
<van-tab :name="true" title="已附议"></van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div style="margin: 170px auto 0">
|
||||
<van-list
|
||||
:finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="onLoad"
|
||||
v-model="mLoading">
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<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 :style="'color:'+o.stateColor" class="title_span">|</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" plain round size="medium" 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
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></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,160 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
@click-left="history.back()"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
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="sessionList" @change="doSearch"
|
||||
v-model="pageForm.meetingId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="delegationList" @change="doSearch"
|
||||
v-model="pageForm.delegationId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="proposalTypeList" @change="doSearch"
|
||||
v-model="pageForm.proposalTypeId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="resultList" @change="doSearch"
|
||||
v-model="pageForm.proposalResultCode"></van-dropdown-item>
|
||||
<van-dropdown-item :options="stateList" @change="doSearch"
|
||||
v-model="pageForm.proposalStateCode"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 120px auto">
|
||||
<van-list
|
||||
:finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="onLoad"
|
||||
v-model="mLoading">
|
||||
<div @click="openView(o.id)" class="list-card" v-for="o in tableData">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="提案名称">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span class="van-ellipsis" style="font-size: 16px;color: red" v-if="o.resultName=='不予立案'">{{o.proposalName}}</span>
|
||||
<span class="van-ellipsis" style="font-size: 16px" style="color: #0000FF"
|
||||
v-else-if="o.resultName=='意见建议'">{{o.proposalName}}</span>
|
||||
<span class="van-ellipsis" style="font-size: 16px" style="color: green"
|
||||
v-else-if="o.resultName=='确定立案'">{{o.proposalName}}</span>
|
||||
<span class="van-ellipsis" style="font-size: 16px" style="color: #7f8481" v-else>{{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
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></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 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,421 @@
|
||||
<!--#
|
||||
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
|
||||
@click-left="location.href='/mobile/index/toHome?type=民主管理'"
|
||||
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="sessionList" @change="doSearch"
|
||||
v-model="pageForm.meetingId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="proposalTypeList" @change="doSearch"
|
||||
v-model="pageForm.proposalTypeId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="resultList" @change="doSearch"
|
||||
v-model="pageForm.proposalResultCode"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin-top: 120px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad"
|
||||
v-model="loading">
|
||||
|
||||
<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
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></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
|
||||
:id="'van-cell-'+x.id"
|
||||
:key="x.id"
|
||||
:title="x.username + '-' + x.dbtName"
|
||||
@click="fuyiToggle(x.id)"
|
||||
clickable
|
||||
v-show="c.isShow && x.isShow"
|
||||
>
|
||||
<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 => {
|
||||
console.log(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)
|
||||
})
|
||||
}
|
||||
})
|
||||
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,230 @@
|
||||
<!--#
|
||||
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
|
||||
@click-left="location.href='/mobile/index/toHome?type=民主管理'"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
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="sessionList" @change="doSearch"
|
||||
v-model="pageForm.meetingId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="proposalTypeList" @change="doSearch"
|
||||
v-model="pageForm.proposalTypeId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="resultList" @change="doSearch"
|
||||
v-model="pageForm.proposalResultCode"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs @click="doSearch" v-model="pageForm.isAudit">
|
||||
<van-tab :name="false" title="未审核"></van-tab>
|
||||
<van-tab :name="true" title="已审核"></van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
|
||||
<div style="margin: 170px auto 0">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad"
|
||||
v-model="mLoading">
|
||||
<div @click="openView(o.id)" 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 : '暂无'}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></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,338 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="location.href='/mobile/index/toHome?type=民主管理'" 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 :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" v-show="false"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showDelegationNamePicker">
|
||||
<van-picker :columns="delegationOptions" @cancel="showDelegationNamePicker = false"
|
||||
@confirm="onDelegationNameConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请选择所属委员会'}]" @click="showCommitteeNamePicker = true"
|
||||
clickable label="所属委员会"
|
||||
name="committeeName"
|
||||
placeholder="点击选择所属委员会"
|
||||
readonly required
|
||||
v-if="formData.mannerCode=='W03'" v-model="formData.committeeName"></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showCommitteeNamePicker">
|
||||
<van-picker :columns="committeeOptions" @cancel="showCommitteeNamePicker = false"
|
||||
@confirm="onCommitteeNameConfirm"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field @click="showTypeNamePicker = true" clickable label="提案类型"
|
||||
name="typeName"
|
||||
placeholder="点击选择提案类型"
|
||||
readonly
|
||||
v-model="formData.typeName"
|
||||
v-show="false"></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 :my_sign.sync="formData.sign" class="mt20" h="0.25" ref="signature"></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,540 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.container {
|
||||
/*height: calc(56vh);*/
|
||||
width: 100%;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.header-info {
|
||||
background: #FFFFFF;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header-info .no {
|
||||
font-weight: bolder;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: #FFFFFF;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.card .header {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
border-bottom: .1px solid #e2e2e2;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card .body {
|
||||
padding: 0 10px 10px 10px;
|
||||
}
|
||||
|
||||
.issue-card .issue {
|
||||
height: calc(0%);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 10px;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
font-family: 'Helvetica Neue', Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.issue-card .issue div {
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.issue-card .options {
|
||||
height: calc(0%);
|
||||
padding: 0 10px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.issue-card .options .option {
|
||||
padding: 10px 20px;
|
||||
background: #eeeeee8f;
|
||||
border: 1px solid rgba(234, 233, 233, 0.5);
|
||||
margin-bottom: 10px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.issue-card .options .option-selected {
|
||||
border: 1px solid #c59f48;
|
||||
background: #fffbf3;
|
||||
color: #c59f48;
|
||||
}
|
||||
|
||||
.issue-card .options .option-correct {
|
||||
border: 1px solid #ace59d;
|
||||
background: #cdf3a8;
|
||||
color: #ace59d;
|
||||
}
|
||||
|
||||
.answer-card .body .result {
|
||||
padding: 10px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.answer-card .body .result .success {
|
||||
color: #71d5a1;
|
||||
}
|
||||
|
||||
.answer-card .body .result .error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.answer-card .body .desc {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.footer-info {
|
||||
background: #ffffff;
|
||||
height: 50px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer-info div {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
/*line-height: 50px;*/
|
||||
}
|
||||
|
||||
.win-info-button {
|
||||
position: fixed;
|
||||
bottom: 60px;
|
||||
right: 10px;
|
||||
transform: translateY(-50%);
|
||||
padding: 5px;
|
||||
background-color: #007bff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.winPopup {
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.iconDiv {
|
||||
color: white;
|
||||
font-size: 66px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="container">
|
||||
<div class="header-info" v-if="false">
|
||||
<div class="no">
|
||||
序号:{{ currentIssueIndex + 1 + '/' + todayIssueList.length }}
|
||||
</div>
|
||||
<div class="no" v-if="questionData.qdtkssj && questionData.qdtjssj">
|
||||
<van-icon name="clock-o" size="16"/>
|
||||
答题时间:{{ questionData.qdtkssj + ' 至 ' + questionData.qdtjssj }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="question-card" v-for="(issue,issueIdx) in todayIssueList" :key="issue.issue">
|
||||
<template v-if="issueIdx===currentIssueIndex">
|
||||
<div class="card issue-card">
|
||||
<div class="header">
|
||||
<!-- <div class="issue-type">-->
|
||||
<!-- <span v-if="issue.itx===1 && issue.iisdx">单选题</span>-->
|
||||
<!-- <span v-if="issue.itx===1 && !issue.iisdx">多选题</span>-->
|
||||
<!-- </div>-->
|
||||
<div class="issue-type">
|
||||
序号:{{ currentIssueIndex + 1 + '/' + todayIssueList.length }}
|
||||
</div>
|
||||
<div class="score">
|
||||
分数:{{ issue.fraction }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="issue">
|
||||
<div style="font-size: 16px" v-html="issue.iname"></div>
|
||||
</div>
|
||||
<div class="options">
|
||||
<template v-for="wor in issue.wors">
|
||||
<div class="option"
|
||||
@click="optionSelect(issue,wor)"
|
||||
:key="wor.wid"
|
||||
:class="[currentSelectedWors.map(v=>v.wid).includes(wor.wid) ? 'option-selected':'']">
|
||||
{{ wor.wtxt }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card answer-card" v-if="hasAnswerIssueIds.includes(issue.iid)">
|
||||
<!-- <div class="header">-->
|
||||
<!-- 答案-->
|
||||
<!-- </div>-->
|
||||
<div class="body">
|
||||
<div class="result">
|
||||
<span v-if="currentIssueAnswerResult" class="success">回答正确</span>
|
||||
<span v-else class="error">回答错误</span>
|
||||
</div>
|
||||
<div class="desc">我的答案:{{ currentIssueMyAnswer }}</div>
|
||||
<div class="desc" v-if="!currentIssueAnswerResult">正确答案:{{ correctWorsText }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="footer-info"
|
||||
style="background: #FFFFFF;height: 50px;position: fixed;bottom: 0;left: 0;right: 0;display: flex;">
|
||||
<div class="prev">
|
||||
<van-button @click="changeIssue(false)" type="info" :disabled="currentIssueIndex<=0">
|
||||
上一题
|
||||
</van-button>
|
||||
</div>
|
||||
<div>
|
||||
得分:{{ getScore() }}
|
||||
</div>
|
||||
<div class="next">
|
||||
<!-- <template v-if="hasAnswerIssueIds.length === issueList.length">-->
|
||||
<!-- <van-button>-->
|
||||
<!-- 回答完毕-->
|
||||
<!-- </van-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-else>-->
|
||||
<van-button v-if="!hasAnswerIssueIds.includes(currentIssueId)"
|
||||
type="info"
|
||||
:disabled="currentSelectedWors.length===0" @click="confirmAnswer">
|
||||
确认答案
|
||||
</van-button>
|
||||
|
||||
<van-button v-else
|
||||
type="info"
|
||||
:disabled="currentIssueIndex === todayIssueList.length-1"
|
||||
@click="changeIssue(true)">
|
||||
下一题
|
||||
</van-button>
|
||||
<!-- </template>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="win-info-button" @click="showWinInfo">
|
||||
获奖信息
|
||||
</div>-->
|
||||
|
||||
<van-popup v-model="winPopupShow" class="winPopup" :style="{ height: '100%' }">
|
||||
<div>每人仅有一次机会</div>
|
||||
<img v-if="isWin" width="100%" height="60%" style="margin-top: 100px"
|
||||
src="/assets/mobile/img/question/win.png"/>
|
||||
<img v-if="!isWin" width="100%" height="80%" src="/assets/mobile/img/question/noWin.png"/>
|
||||
<div class="iconDiv">
|
||||
<van-icon @click="winPopupShow = false" name="close"></van-icon>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
questionData: {},
|
||||
currentIssueIndex: 0,
|
||||
currentIssue: null,
|
||||
currentSelectedWors: [],
|
||||
replyInfo: [],
|
||||
todayStr: moment(new Date()).format('YYYY-MM-DD') + ' 00:00:00',
|
||||
winPopupShow: false,
|
||||
winList: [],
|
||||
isWin: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentIssueId() {
|
||||
return this.currentIssue ? this.currentIssue.iid : null
|
||||
},
|
||||
issueList() {
|
||||
if (this.questionData && this.questionData.issues && this.questionData.issues.length) {
|
||||
return this.questionData.issues
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
todayIssueList() {
|
||||
if (this.issueList && this.issueList.length > 0) {
|
||||
return this.issueList.filter(v => v.displayDate === this.todayStr)
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
correctWorsText() {
|
||||
return this.currentIssue && this.currentIssue.wors.filter(v => v.correct).map(v => v.wtxt).join('、')
|
||||
},
|
||||
currentIssueMyAnswer() {
|
||||
return this.currentSelectedWors.map(v => v.wtxt).join('、')
|
||||
},
|
||||
//该题是否回答正确
|
||||
currentIssueAnswerResult() {
|
||||
const userSelectWorIds = this.currentSelectedWors.map(v => v.wid).slice().sort()
|
||||
if (this.currentIssue) {
|
||||
const correctWorIds = this.currentIssue.wors.filter(v => v.correct).map(v => v.wid).slice().sort()
|
||||
return userSelectWorIds.length === correctWorIds.length && correctWorIds.every(v => userSelectWorIds.includes(v))
|
||||
}
|
||||
return false
|
||||
},
|
||||
//已经回答的题目
|
||||
hasAnswerIssueIds() {
|
||||
if (this.replyInfo && this.replyInfo.length) {
|
||||
return this.replyInfo.map(v => v.issueId)
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
todayScore() {
|
||||
return this.todayIssueList.filter(v => {
|
||||
const correctWids = v.wors.filter(v => v.correct).map(v => v.wid)
|
||||
const rwids = this.replyInfo.filter(v => v.issueId === v.iid).map(v => v.rwid)
|
||||
if (rwids && rwids.length > 0 && rwids.every(r => correctWids.includes(r))) {
|
||||
return v
|
||||
}
|
||||
}).map(v => v.fraction).reduce((a, b) => {
|
||||
return a + b
|
||||
}, 0)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async getQuestionData() {
|
||||
const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id)
|
||||
this.questionData = resp.data
|
||||
},
|
||||
|
||||
//获取回答信息
|
||||
async getReply() {
|
||||
const resp = await $.get('/mobile/question/h5/answerInfo/' + this.id)
|
||||
this.replyInfo = resp.data
|
||||
},
|
||||
|
||||
//点击选项
|
||||
optionSelect(issue, wor) {
|
||||
if (this.hasAnswerIssueIds.includes(issue.iid)) {
|
||||
return
|
||||
}
|
||||
this.currentIssue = issue
|
||||
if (this.currentIssue.itx === 1) {
|
||||
if (this.currentIssue.iisdx) {
|
||||
//单选
|
||||
this.currentSelectedWors = [wor]
|
||||
} else {
|
||||
//多选
|
||||
const idx = this.currentSelectedWors.findIndex(v => v.wid === wor.wid)
|
||||
if (idx > -1) {
|
||||
this.currentSelectedWors.splice(idx, 1)
|
||||
} else {
|
||||
this.currentSelectedWors.push(wor)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//确认答案
|
||||
async confirmAnswer() {
|
||||
if (this.questionData.qdtkssj && this.questionData.qdtjssj) {
|
||||
const startTimes = this.questionData.qdtkssj.split(':')
|
||||
const endTimes = this.questionData.qdtjssj.split(':')
|
||||
const nows = moment(new Date()).format('HH:mm:ss').split(':')
|
||||
|
||||
let startTime = new Date()
|
||||
startTime.setHours(startTimes[0])
|
||||
startTime.setMinutes(startTimes[1])
|
||||
startTime.setSeconds(startTimes[2])
|
||||
|
||||
let endTime = new Date()
|
||||
endTime.setHours(endTimes[0])
|
||||
endTime.setMinutes(endTimes[1])
|
||||
endTime.setSeconds(endTimes[2])
|
||||
|
||||
let nowTime = new Date()
|
||||
nowTime.setHours(nows[0])
|
||||
nowTime.setMinutes(nows[1])
|
||||
nowTime.setSeconds(nows[2])
|
||||
|
||||
|
||||
if (nowTime < startTime || nowTime > endTime) {
|
||||
this.$modal.msg('不在答题时间范围内')
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.questionData.qrkdcs && this.questionData.qrkdcs > 0) {
|
||||
const {data: canAnswer} = await $.get('/mobile/question/h5/canAnswer', {questionId: this.questionData.qid})
|
||||
if (!canAnswer) {
|
||||
this.$modal.msg('今日答题次数已超上限')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
this.$modal.loading('提交中')
|
||||
|
||||
//用户选择的答案
|
||||
const userSelectWorIds = this.currentSelectedWors.map(v => v.wid).slice().sort()
|
||||
|
||||
const formData = []
|
||||
userSelectWorIds.forEach(v => {
|
||||
formData.push({
|
||||
qid: this.questionData.qid,
|
||||
issueId: this.currentIssue.iid,
|
||||
rwid: v,
|
||||
save: false
|
||||
})
|
||||
})
|
||||
|
||||
$.post('/mobile/question/h5/saveAnswer2', {replies: JSON.stringify(formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
const getReplyPromise = () => {
|
||||
return new Promise(async resolve => {
|
||||
await this.getReply()
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
getReplyPromise().then(() => {
|
||||
this.checkTodayReplyFinish()
|
||||
})
|
||||
this.$modal.closeLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
async checkTodayReplyFinish() {
|
||||
if (this.issueList.map(x => x.iid).every(x => this.replyInfo.map(v => v.issueId).includes(x))) {
|
||||
this.$modal.msg('全部答题完成')
|
||||
} else if (this.todayIssueList.map(x => x.iid).every(x => this.replyInfo.map(v => v.issueId).includes(x))) {
|
||||
|
||||
|
||||
const score = this.getScore()
|
||||
const {data: scoreMap} = await $.get('/mobile/question/h5/todayMaxScore', {questionId: this.questionData.qid})
|
||||
const scoreValues = Object.values(scoreMap)
|
||||
let msg = null
|
||||
if (scoreValues.length > 1) {
|
||||
const maxScore = Math.max(...scoreValues)
|
||||
msg = '今日答题已完成,您当前分数为' + score + ',历史最高分为' + maxScore + ',是否重新答题?'
|
||||
} else {
|
||||
msg = '今日答题已完成,您当前分数为' + score + ',是否重新答题?'
|
||||
}
|
||||
|
||||
msg = '今日答题已完成,您当前分数为' + score + "。"
|
||||
|
||||
this.$modal.confirm(msg).then(async () => {
|
||||
// const {code} = await $.post('/mobile/question/h5/answerAgain', {questionId: this.questionData.qid})
|
||||
// await this.getReply()
|
||||
const {ctMode} = this.questionData
|
||||
this.initCurrentIssueInfo(this.questionData.issues.find(v => v.displayDate && v.displayDate.includes(moment(new Date()).format('YYYY-MM-DD'))).iid)
|
||||
|
||||
/*if (ctMode === 2) {
|
||||
this.initCurrentIssueInfo(this.questionData.issues.find(v => v.displayDate && v.displayDate.includes(moment(new Date()).format('YYYY-MM-DD'))).iid)
|
||||
} else {
|
||||
this.initCurrentIssueInfo(this.questionData.issues[0].iid)
|
||||
}*/
|
||||
})
|
||||
} else if (this.replyInfo.map(v => v.issueId).length === 0) {
|
||||
|
||||
}
|
||||
},
|
||||
initCurrentIssueInfo(issueId) {
|
||||
if (issueId) {
|
||||
this.currentIssue = this.questionData.issues.find(v => v.iid === issueId)
|
||||
this.currentIssueIndex = this.todayIssueList.findIndex(v => v.iid === issueId)
|
||||
this.currentSelectedWors = this.currentIssue.wors.filter(v => this.replyInfo.filter(v => v.issueId === issueId).map(v => v.rwid).includes(v.wid))
|
||||
}
|
||||
},
|
||||
changeIssue(isNext) {
|
||||
const index = isNext ? this.currentIssueIndex + 1 : this.currentIssueIndex - 1
|
||||
const issueId = this.todayIssueList[index].iid
|
||||
this.currentSelectedWors = []
|
||||
this.initCurrentIssueInfo(issueId)
|
||||
},
|
||||
getScore() {
|
||||
let sum = 0
|
||||
if (this.replyInfo && this.replyInfo.length > 0) {
|
||||
this.todayIssueList.forEach(v => {
|
||||
const correctWids = v.wors.filter(x => x.correct).map(x => x.wid)
|
||||
const rwids = [...new Set(this.replyInfo.filter(x => x.issueId === v.iid).map(x => x.rwid))]
|
||||
const eq = correctWids.length === rwids.length && correctWids.sort().toString() === rwids.sort().toString();
|
||||
if (eq) {
|
||||
sum += v.fraction
|
||||
}
|
||||
})
|
||||
}
|
||||
return sum
|
||||
},
|
||||
async showWinInfo() {
|
||||
const {data} = await $.post('/mobile/question/h5/winInfo', {questionId: this.questionData.qid})
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const user = data.find(o => o.id === userId)
|
||||
this.isWin = user !== undefined
|
||||
this.winList = data
|
||||
console.log(this.isWin)
|
||||
vant.Dialog.alert({
|
||||
message: '每人仅有一次中奖机会喔,点击查询获奖信息。'
|
||||
}).then(() => {
|
||||
this.winPopupShow = true
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
await this.getQuestionData()
|
||||
await this.getReply()
|
||||
const {ctMode} = this.questionData
|
||||
|
||||
this.initCurrentIssueInfo(this.questionData.issues.find(v => v.displayDate && v.displayDate.includes(moment(new Date()).format('YYYY-MM-DD')))?.iid)
|
||||
/* if (ctMode === 2) {
|
||||
this.initCurrentIssueInfo(this.questionData.issues.find(v => v.displayDate && v.displayDate.includes(moment(new Date()).format('YYYY-MM-DD'))).iid)
|
||||
} else {
|
||||
this.initCurrentIssueInfo(this.questionData.issues[0].iid)
|
||||
}*/
|
||||
const {data: scoreMap} = await $.get('/mobile/question/h5/todayMaxScore', {questionId: this.questionData.qid})
|
||||
const scoreValues = Object.values(scoreMap)
|
||||
let msg = null
|
||||
console.log(scoreValues)
|
||||
if (scoreValues.length >= 1 && this.todayIssueList.map(x => x.iid).some(x => !this.replyInfo.map(v => v.issueId).includes(x))) {
|
||||
console.log(111)
|
||||
const maxScore = Math.max(...scoreValues)
|
||||
msg = '您历史的最高分数为' + maxScore + '分!'
|
||||
this.$modal.confirm(msg).then(async () => {
|
||||
|
||||
})
|
||||
} else {
|
||||
this.checkTodayReplyFinish()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,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,405 @@
|
||||
<!--#
|
||||
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: 5px 10px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.tag {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
background-color: #1867b0;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
top: 1px;
|
||||
border-radius: 6px;
|
||||
right: 5px;
|
||||
padding: 1px 7px;
|
||||
/*transform: rotate(0deg);*/
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="container">
|
||||
<van-nav-bar title="列表" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed" style="z-index: 100">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="queryForm.year" :options="yearList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.status" :options="questionStatusList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!-- <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" style="margin: 60px auto 80px auto">
|
||||
<div v-for="(item, index) in tableData" :id="item.qid" :key="item.qid">
|
||||
<div class="quizzes-item" @click="openAnswer(item)">
|
||||
<div>
|
||||
<div class="tag" style="background-color: #bc62c5" v-if="[1,3].includes(item.qflag)">活动未开启</div>
|
||||
<div class="tag"
|
||||
v-else-if="[2].includes(item.qflag) && moment(item.startTime).valueOf() > moment().valueOf()">
|
||||
活动未开始
|
||||
</div>
|
||||
<div class="tag"
|
||||
v-else-if="[2].includes(item.qflag) &&moment(item.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(item.endTime).valueOf()">
|
||||
活动进行中
|
||||
</div>
|
||||
<div class="tag" style="background-color: #f14646"
|
||||
v-else-if="[2].includes(item.qflag) &&moment().valueOf() > moment(item.endTime).valueOf()">
|
||||
活动结束
|
||||
</div>
|
||||
</div>
|
||||
<div class="quizzes-item-v">
|
||||
<div class="quizzes-item-info">
|
||||
<div class="quizzes-item-info-icon">
|
||||
<image src="/assets/mobile/svg/question/quizzes2.svg"/>
|
||||
</div>
|
||||
<div class="quizzes-item-info-v">
|
||||
<div class="quizzes-item-info-title">{{ item.qtitle }}</div>
|
||||
<div class="quizzes-item-info-right">
|
||||
<span class="quizzes-item-info-tip">创建时间:</span>
|
||||
<span class="quizzes-item-info-text">
|
||||
{{ moment(item.createTime).format('YYYY年MM月DD日') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="quizzes-item-info-right" v-if="item.qlx!==4">
|
||||
<span class="quizzes-item-info-tip">题目数量:</span>
|
||||
<span class="quizzes-item-info-text">
|
||||
{{item.ctMode === 1 ? item.topicTotal : item.ctNum }}
|
||||
</span>
|
||||
<span class="quizzes-item-info-text" style="position: absolute;right: 0">
|
||||
<van-tag @click.stop="showWinInfo(item)" type="primary" class="win_tag"
|
||||
v-if="item.qlx===2 && item.isRaffle && moment(item.startTime).diff(moment(new Date().getTime()),'days') < 0">获奖信息</van-tag>
|
||||
<!-- v-if="moment(item.startTime).diff(moment(new Date().getTime()),'days') < 0"-->
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="finished && !tableData.length" text="暂无问卷" icon-size="320"
|
||||
src="/static/img/notData.svg">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="winPopupShow" class="winPopup"
|
||||
:style="{ height: '100%' }"
|
||||
>
|
||||
<div style="display: flex;align-items: center">
|
||||
<img v-if="isWin" width="100%" height="60%" src="/assets/mobile/img/question/win.png"/>
|
||||
<img v-if="!isWin" width="100%" height="50%" src="/assets/mobile/img/question/noWin1.png"/>
|
||||
</div>
|
||||
<div class="iconDiv">
|
||||
<div v-if="isWin" style="font-size: 14px;!important;">恭喜您中奖了,本次活动中奖机会只有一次喔!</div>
|
||||
<van-icon @click="winPopupShow = false" name="close"></van-icon>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
questionStatus: '1',
|
||||
scrollTop: 0,
|
||||
statusBarHeight: 0,
|
||||
pageLoading: false,
|
||||
queryForm: {
|
||||
year: '',
|
||||
status: null
|
||||
},
|
||||
winPopupShow: false,
|
||||
isWin: false,
|
||||
|
||||
questionStatusList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '未开启', value: 4},
|
||||
{text: '未开始', value: 5},
|
||||
{text: '进行中', value: 2},
|
||||
{text: '已结束', value: 3}
|
||||
]
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init();
|
||||
this.queryForm.type = GetQueryString("type")
|
||||
this.doSearch()
|
||||
},
|
||||
methods: {
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async init() {
|
||||
this.$set(this.queryForm, "status", 1)
|
||||
this.$set(this.queryForm, "year", new Date().getFullYear())
|
||||
},
|
||||
async showWinInfo({qid}) {
|
||||
const {data} = await $.post('/mobile/question/h5/winInfo', {questionId: qid})
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const user = data.find(o => o.id === userId)
|
||||
this.isWin = user !== undefined
|
||||
this.winList = data
|
||||
console.log(this.isWin)
|
||||
this.winPopupShow = true
|
||||
|
||||
/*vant.Dialog.alert({
|
||||
message: '每人仅有一次中奖机会喔,立即查询获奖信息。'
|
||||
}).then(() => {
|
||||
this.winPopupShow = true
|
||||
});*/
|
||||
},
|
||||
pageData() {
|
||||
this.$modal.loading()
|
||||
this.tableLoading = true
|
||||
|
||||
$.post('/mobile/question/h5/pageData', {...this.pageForm, ...this.queryForm}).then(res => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
|
||||
|
||||
// $.post('/activity/question/h5/pageData', this.pageForm, {
|
||||
// params: this.queryForm
|
||||
// }).then(res => {
|
||||
// this.tableData = this.tableData.concat(res.data.list)
|
||||
// this.pageForm.totalCount = res.data.totalCount
|
||||
// if (this.tableData.length === this.pageForm.totalCount) {
|
||||
// this.finished = true
|
||||
// } else {
|
||||
// this.pageForm.pageNumber++
|
||||
// }
|
||||
// this.tableLoading = false
|
||||
// this.$modal.closeLoading()
|
||||
// }).finally(() => {
|
||||
// this.tableLoading = false
|
||||
// this.finished = true
|
||||
// this.$modal.closeLoading()
|
||||
// })
|
||||
},
|
||||
|
||||
tabChange(index) {
|
||||
this.page.current = index;
|
||||
// this.refresh();
|
||||
},
|
||||
lower(e) {
|
||||
if (!this.finished) this.loadData();
|
||||
},
|
||||
|
||||
async hasPermissionByIssue(groupId) {
|
||||
const resp = await this.$http.get('/platform/question/applets/list/hasPermission', {
|
||||
params: {groupId: groupId}
|
||||
})
|
||||
return resp
|
||||
},
|
||||
|
||||
async openAnswer(item) {
|
||||
const {qid, qlx, qflag, activityUserScopeId} = item
|
||||
if (qflag !== 2) {
|
||||
this.$modal.msg('该活动未开启!')
|
||||
return
|
||||
}
|
||||
|
||||
const now = new Date().getTime()
|
||||
if (now < item.startTime || now > item.endTime) {
|
||||
this.$modal.msg('不在开启时间内!')
|
||||
return
|
||||
}
|
||||
|
||||
if (activityUserScopeId) {
|
||||
const resp = await $.get('/mobile/question/h5/checkPermission/' + activityUserScopeId)
|
||||
if (!resp.data) {
|
||||
this.$modal.msg('您无权限参加')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (qlx === 1) {
|
||||
//调查
|
||||
location.href = '/mobile/question/h5/poll/index?id=' + qid
|
||||
} else if (qlx === 2) {
|
||||
//答题
|
||||
// location.href = '?id=' + qid
|
||||
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,235 @@
|
||||
<!--#
|
||||
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,176 @@
|
||||
<!--#
|
||||
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="location.href='/mobile/index'"
|
||||
></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" @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>
|
||||
<div style="width: 25%;display: flex;align-items: center" v-if="o.isAgree == undefined">
|
||||
<van-icon @click.stop="doAudit(false,o)" class="handleicon" name="close"
|
||||
size="30px" color="gray"></van-icon>
|
||||
<van-icon @click.stop="doAudit(true,o)" class="handleicon" name="passed"
|
||||
size="30px" color="#07c160"></van-icon>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex;align-items: center;" v-else>
|
||||
<span style="color: #FF4949" v-if="!o.isAgree">不通过</span>
|
||||
<span style="color: #13CE66" v-if="o.isAgree">通过</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.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: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
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('/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) {
|
||||
window.location.href = '/platform/mobile/proposal/compose/detail?id=' + id
|
||||
}
|
||||
}
|
||||
})
|
||||
</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,237 @@
|
||||
<!--#
|
||||
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="location.href='/mobile/index'"
|
||||
></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" @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',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
state: '0',
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
tableData: [],
|
||||
show: false,
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
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('/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
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,261 @@
|
||||
<!--#
|
||||
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'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (nowTime > moment(this.activity.activitySignUpEndTime).unix()) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动报名已结束',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
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,829 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-doc-card-my {
|
||||
margin: 14px;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px 16px 10px;
|
||||
min-height: 100px;
|
||||
max-height: 360px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #cccdd1;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-family: -webkit-pictograph, serif;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.popup {
|
||||
width: 90%;
|
||||
max-height: 70%;
|
||||
overflow-y: auto;
|
||||
border-radius: 10px;
|
||||
padding: 2px 10px 12px 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
width: 35px;
|
||||
height: 38px;
|
||||
margin-right: 20px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.van-card__content {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.van-card__title {
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
background-color: transparent;
|
||||
position: relative;
|
||||
transform: translate(0%, 50%);
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 20px;
|
||||
/*height: calc(100% - 40px - 46px - 60px);*/
|
||||
height: calc(100vh - 46px - 50px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card-two {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
.footer .van-button {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.amap-logo {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.amap-copyright {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.van-tabs__nav--complete {
|
||||
padding: 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-tabs v-if="activityStatus != '1' && assortList.length > 0" v-model="assort" type="card" color="#1867B0"
|
||||
style="margin-top: 10px" @click="tabClick">
|
||||
<van-tab v-for="item in assortList" :name="item" :title="item">
|
||||
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<!--<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 v-html="calcSignUpCount(o)"></span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">校  区:</span>
|
||||
<span>{{o.campus}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">活动地点:</span>
|
||||
<span>{{o.courseLocation}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">联 系 人:</span>
|
||||
<span>{{o.courseInstructor}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">活动时间:</span>
|
||||
<span v-if="o.courseTimeList && o.courseTimeList.length > 1"
|
||||
@click="trainClick(o)"
|
||||
style="color: #1867b0">点我查看</span>
|
||||
<span @click="trainClick(o)"
|
||||
v-if="o.courseTimeList && o.courseTimeList.length === 1"
|
||||
style="color: #1867b0">
|
||||
{{o.courseTimeList[0].courseStartTime.substring(11, 19) + ' ~ ' + o.courseTimeList[0].courseEndTime.substring(11, 19)}}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span @click.stop="showPic(FILE_DOMAIN + '/fileStreamPreview?id=' + tableData.wechat.id)"
|
||||
v-if="o.isSign === true && tableData.wechat"
|
||||
style="color: #dd6363">点我查看微信群二维码</span>
|
||||
</div>
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
v-if="activityStatus !== '1' && o.isSign === false"
|
||||
style="position: absolute; left: 74%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="signUp(o)">
|
||||
我要报名
|
||||
</van-button>
|
||||
|
||||
<van-button type="primary" color="#dd6363" round size="mini"
|
||||
v-if="o.isSign === true && moment().valueOf() < moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 74%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="cancel(o)">
|
||||
取消报名
|
||||
</van-button>
|
||||
|
||||
<image v-if="activityStatus !== '1' && o.isSign === true && moment().valueOf() >= moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 77%; top: 58%;"
|
||||
src="/assets/mobile/svg/train/sign_up.svg"></image>
|
||||
|
||||
<div @click="trainClick(o)" v-if="activityStatus === '1'"
|
||||
style="text-align: center; line-height: 40px; width: 40px; height: 40px;display: inline-block; font-size: 14px;
|
||||
position: absolute; right: -10px; top: 8%; background-color: #00c698; border-radius: 7px; color: white">
|
||||
签到
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
|
||||
<van-popup v-model:show="popupShow" class="popup">
|
||||
<!--<div @click="vant.Dialog.alert({message: '上课前30分钟,下课前30分钟。',theme: 'round-button',confirmButtonColor: '#1867b0'})"
|
||||
style="font-size: 12px; color: grey; text-align: right; position: relative; top: 8px; right: 6px; z-index: 2;">签到规则 ></div>-->
|
||||
|
||||
<div id="map" v-if="course.isMobileSign === true && course.signType === 3"
|
||||
style="width: 100%; height: 250px"></div>
|
||||
|
||||
<van-card
|
||||
:title="item.courseStartTime.substring(0, 10) + '(' +
|
||||
getWeek(item.courseStartTime.substring(0, 10)) + ')'"
|
||||
v-for="(item,index) in qdArray"
|
||||
thumb="/assets/mobile/svg/train/qd1.svg">
|
||||
<template #desc>
|
||||
<div style="margin-top: 7px">
|
||||
{{item.courseStartTime.substring(11, 19) + ' ~ ' +
|
||||
item.courseEndTime.substring(11, 19)}}
|
||||
</div>
|
||||
<div v-if="item.isMobileSign === true && activityStatus === '1'">
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
@click.stop="showQRCode(item, 2)"
|
||||
v-if="(item.isAttend === true && course.giftType === 1 && item.state === 1)
|
||||
|| (moment().unix() > moment(item.courseEndTime).unix() && item.state === 3 && 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="(item.isAttend === false && findTime(item) === false && item.state === 1)
|
||||
|| (moment().unix() > moment(item.courseEndTime).unix() && item.state === 3 && item.isAttend === 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="(item.isAttend === false && findTime(item) === true && item.state === 1)
|
||||
|| (moment().unix() > moment(item.courseEndTime).unix() && item.state === 3 && item.isAttend === false)"
|
||||
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="(item.isAttend === true && item.state === 1)
|
||||
|| (moment().unix() > moment(item.courseEndTime).unix() && item.state === 3 && 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 {
|
||||
assort: '',
|
||||
assortList: [],
|
||||
allColumnsData: [],
|
||||
dynamicColumnsData: [],
|
||||
trainType: '培训班',
|
||||
trainTypeList: [],
|
||||
actionShow: false,
|
||||
timeList: [],
|
||||
activityId: '',
|
||||
activityStatus: '0',
|
||||
joinPopup: false,
|
||||
popupShow: false,
|
||||
courseText: '',
|
||||
qdInfoList: [],
|
||||
course: [],
|
||||
qdArray: [],
|
||||
activityOptions: [{text: '全部', value: '0'}, {text: '我报名的', value: '1'}],
|
||||
courseOptions: [],
|
||||
courseType: '0',
|
||||
tempArray: [],
|
||||
activitySignUpStartTime: null,
|
||||
choose: {},
|
||||
activity: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'train-dynamic-form': httpVueLoader('/components/mobile/common/TrainDynamicForm.vue')
|
||||
},
|
||||
methods: {
|
||||
tabClick(name, title) {
|
||||
if(this.courseType === '0' && this.activityStatus !== '1') {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title)
|
||||
} else {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title && o.courseType === this.courseType)
|
||||
}
|
||||
},
|
||||
calcSignUpCount(o) {
|
||||
if (o.reserveMode === 2) {
|
||||
let lave = 0
|
||||
let lave2 = 0
|
||||
if ((o.hasRegisterNum - o.waitingNum) < o.coursePeopleNumber) {
|
||||
lave = o.coursePeopleNumber - (o.hasRegisterNum - o.waitingNum)
|
||||
lave2 = o.courseReservedNumber - o.waitingNum
|
||||
} else {
|
||||
lave = 0
|
||||
lave2 = (o.coursePeopleNumber + o.courseReservedNumber) - o.hasRegisterNum
|
||||
}
|
||||
let str = "(<span style='color: red'>余" + lave + "</span>/" + o.coursePeopleNumber + "人"
|
||||
+ ",<span style='color: red'>候补余" + lave2 + "</span>/" + o.courseReservedNumber + "人)"
|
||||
return str
|
||||
} else {
|
||||
let lave = o.coursePeopleNumber - (o.hasRegisterNum + o.courseReservedNumber)
|
||||
return "(<span style='color: red'>余" + lave + "</span>/" + o.coursePeopleNumber + "人)"
|
||||
}
|
||||
},
|
||||
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 date = new Date()
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
const time = moment().format('YYYY-MM-DD hh:mm:ss')
|
||||
|
||||
const start = new Date(o.courseStartTime).getTime() - 1000 * 60 * 30
|
||||
//const end = new Date(o.courseStartTime).getTime() + 1000 * 60 * 30
|
||||
const end = new Date(o.courseEndTime).getTime()
|
||||
|
||||
const now = new Date().getTime()
|
||||
if (now < start || now > end) {
|
||||
vant.Toast('请在规定时间签到')
|
||||
return
|
||||
}
|
||||
const that = this
|
||||
geolocation.getCurrentPosition(async function (status, result) {
|
||||
if (status === 'complete') {
|
||||
locations = [result.position.getLng(), result.position.getLat()]
|
||||
//用户当前位置
|
||||
const userPoint = new AMap.LngLat(result.position.getLng(), result.position.getLat())
|
||||
//课程位置
|
||||
const coursePoint = new AMap.LngLat(that.course.courseLocationCoordinates[0], that.course.courseLocationCoordinates[1])
|
||||
const distance = Math.round(userPoint.distance(coursePoint))
|
||||
if (distance > 250) {
|
||||
vant.Toast('请在250米内签到')
|
||||
return
|
||||
}
|
||||
const array = [result.position.getLng(), result.position.getLat()]
|
||||
const resp = await $.post('/platform/mobile/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
|
||||
//获取家属是多少人
|
||||
let per = 0
|
||||
this.dynamicColumnsData.forEach(item => {
|
||||
if (item.columnCode === 'xdqsrs') {
|
||||
per += Number(item.columnValue)
|
||||
}
|
||||
})
|
||||
const res = await $.post('/platform/mobile/trainSignUpActivity/validateSignUp', {
|
||||
cndId: this.choose.conditionStructureId,
|
||||
courseId: this.choose.id,
|
||||
currentFamilyNumber: per,
|
||||
})
|
||||
if (res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
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.assortList = Array.from(new Set(this.tableData.courseList.map(o => o.assort).filter(o => o !== '' && o !== undefined)))
|
||||
this.tempArray = clone(this.tableData)
|
||||
if(this.assortList.length > 0 && this.activityStatus !== '1') {
|
||||
this.tableData.courseList = this.tableData.courseList.filter(o => o.assort === this.assortList[0])
|
||||
}
|
||||
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()
|
||||
}
|
||||
if(this.assortList.length > 0 && this.activityStatus !== '1') {
|
||||
if(value === '0') {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === this.assort)
|
||||
} else {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter(item => item.courseType === value && item.assort === this.assort)
|
||||
}
|
||||
} else {
|
||||
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,251 @@
|
||||
<!--#
|
||||
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;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.tag {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
background-color: #1867b0;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
top: 1px;
|
||||
border-radius: 6px;
|
||||
right: -8px;
|
||||
padding: 1px 7px;
|
||||
transform: rotate(17deg);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed
|
||||
@click-left="location.replace('/mobile/index')"></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-menu>
|
||||
</div>
|
||||
|
||||
<!-- <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 style="margin: 60px auto 80px auto">
|
||||
<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 class="tag" v-if="moment(o.activitySignUpStartTime).unix() > moment().unix()">即将开始</div>-->
|
||||
<div>
|
||||
<div class="tag" style="background-color: #bc62c5" v-if="o.isDisabled">活动未开启</div>
|
||||
<div class="tag" v-else-if="!o.isDisabled && moment(o.activitySignUpStartTime).valueOf() > moment().valueOf()">未开始报名</div>
|
||||
<div class="tag" v-else-if="!o.isDisabled &&moment(o.activitySignUpEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.activitySignUpStartTime).valueOf()">报名中</div>
|
||||
<div class="tag" style="background-color: #f14646" v-else-if="!o.isDisabled &&moment(o.activityEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityStartTime).valueOf()">报名结束</div>
|
||||
<div class="tag" v-else-if="!o.isDisabled &&moment(o.activityStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityEndTime).valueOf()">活动进行中</div>
|
||||
<div class="tag" style="background-color: #f14646" v-else-if="!o.isDisabled &&moment().valueOf() > moment(o.activityEndTime).valueOf()">活动结束</div>
|
||||
</div>
|
||||
<div @click="welfareClick(o)">
|
||||
<div>
|
||||
<van-image :src="CREATE_PREVIEW_URL(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: '',
|
||||
|
||||
pageForm: {
|
||||
year: '',
|
||||
activityStatus: null
|
||||
},
|
||||
activityLevelList: [],
|
||||
activityStatusList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '未开启', value: 5},
|
||||
{text: '未开始', value: 6},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '进行中', value: 3},
|
||||
{text: '已结束', value: 4}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
|
||||
|
||||
async welfareClick(o) {
|
||||
console.log(o)
|
||||
if (o.isDisabled){
|
||||
this.$toast('活动未开启')
|
||||
return;
|
||||
}
|
||||
if (moment(o.applyStartTime).valueOf() > moment().valueOf()) {
|
||||
this.$toast('活动未开始报名')
|
||||
return;
|
||||
}
|
||||
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()
|
||||
},
|
||||
async init(){
|
||||
this.$set(this.pageForm, "activityStatus", 1)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
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,24 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="福利发放明细" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<welfare ref="welfare" :is_icon="false" @find="findOne"></welfare>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
components: {
|
||||
'welfare': httpVueLoader('/components/welfare/common.vue'),
|
||||
},
|
||||
methods: {
|
||||
findOne(id) {
|
||||
window.location.href = '/mobile/welfare/info?lp_id=' + id
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
const welfareMixins = {
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: '',
|
||||
addressList: [],
|
||||
isReceive: false,
|
||||
isChoice: false,
|
||||
isAutoSelect: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async selectAddressList() {
|
||||
const resp = await $.get('/mobile/welfare/mine/selectUserAddress')
|
||||
this.addressList = resp.data
|
||||
},
|
||||
async getReceive() {
|
||||
const resp = await $.get('/mobile/welfare/mine/isReceive', {projectId: this.projectId})
|
||||
// this.isReceive = resp.data
|
||||
},
|
||||
async getChoice() {
|
||||
const resp = await $.get('/mobile/welfare/mine/isChoice', {projectId: this.projectId})
|
||||
this.isChoice = resp.data
|
||||
},
|
||||
async getAutoSelect() {
|
||||
const resp = await $.get('/mobile/welfare/mine/isAutoSelect', {projectId: this.projectId})
|
||||
this.isAutoSelect = resp.data
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" url="/mobile/welfare/list/index">首页</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" url="/mobile/welfare/mine/index">我的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="单元格" value="内容"></van-cell>
|
||||
<van-cell title="单元格" value="内容" label="描述信息"></van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,243 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin: 10px 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.welfare_card {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.welfare_card .receive_img {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.van-card__header {
|
||||
height: 102px;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="福利列表" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.tabName" @change="tabChange">
|
||||
<van-tab title="进行中" name="ing"></van-tab>
|
||||
<van-tab title="已结束" name="end"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<template v-if="vLoading && !vLoading.value">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<template v-for="o in tableData">
|
||||
<div class="welfare_card">
|
||||
<van-card @click="welfareClick(o)">
|
||||
<template #thumb>
|
||||
<img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+o.cover" alt=""
|
||||
class="van-image__img"
|
||||
v-if="o.cover">
|
||||
<image v-else src="/assets/mobile/svg/welfare/welfareHome.svg"></image>
|
||||
|
||||
</template>
|
||||
<template #title>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;line-height: 30px;">
|
||||
{{o.name}}
|
||||
</div>
|
||||
</template>
|
||||
<template #desc>
|
||||
<div>
|
||||
<template v-if="new Date().getTime()>moment(o.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(o.choiceTimeEnd).valueOf()">
|
||||
<div style="flex: 1.5">
|
||||
选择开始时间:
|
||||
{{moment(o.choiceTimeStart).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div style="flex: 1.5">
|
||||
选择结束时间:
|
||||
{{moment(o.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="flex: 1.5">
|
||||
选择开始时间:
|
||||
{{moment(o.choiceTimeStart).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div style="flex: 1.5">
|
||||
选择结束时间:
|
||||
{{moment(o.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- <div class="van-ellipsis" style="flex: 1">福 利 名 称:{{o.gift}}</div>-->
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</van-card>
|
||||
<div class="receive_img">
|
||||
<template v-if="new Date().getTime()>moment(o.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(o.choiceTimeEnd).valueOf()">
|
||||
<image v-if="o.isSelect&&!o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/yxz.png"></image>
|
||||
<image v-else-if="!o.isSelect&&!o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/wxz.png"></image>
|
||||
<image v-else-if="o.isSelect&&o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/yxz.png"></image>
|
||||
<image v-else-if="o.isSelect&&!o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/wxz.png"></image>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!-- <div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179)"
|
||||
v-if="o.isReceive">已发放
|
||||
</div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179)"
|
||||
v-else>未发放
|
||||
</div>-->
|
||||
<div style="size: 10px">
|
||||
<image v-if="o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/ylq.png"></image>
|
||||
<image v-else src="/assets/mobile/svg/welfare/wlq.png"></image>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
tabName: 'ing',
|
||||
tarBarActive: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async welfareClick(o) {
|
||||
const {
|
||||
id,
|
||||
provideMode,
|
||||
flexible,
|
||||
provideTimeEnd,
|
||||
provideTimeStart,
|
||||
choiceTimeEnd,
|
||||
choiceTimeStart
|
||||
} = o
|
||||
const resp = await $.get('/mobile/welfare/mine/isReceive', {projectId: id})
|
||||
const isReceive = resp.data
|
||||
if (this.tabName === 'ing') {
|
||||
if (flexible) {
|
||||
if (moment().valueOf() < moment(provideTimeEnd).valueOf() &&
|
||||
moment().valueOf() > moment(provideTimeStart).valueOf()) {
|
||||
|
||||
if (moment().valueOf() > moment(choiceTimeEnd).valueOf()) {
|
||||
if (!o.isSelect) {
|
||||
vant.Dialog.alert({
|
||||
title: '提醒',
|
||||
message: '您在规定时间内没有选择,无法领取!',
|
||||
}).then(() => {
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
location.href = '/mobile/welfare/list/receive?projectId=' + id
|
||||
|
||||
} else {
|
||||
location.href = '/mobile/welfare/list/receive_success?projectId=' + id + '&provideMode=' + provideMode
|
||||
}
|
||||
} else if (this.tabName === 'end') {
|
||||
if (isReceive) {
|
||||
location.href = '/mobile/welfare/list/receive_success?projectId=' + id + '&provideMode=' + provideMode
|
||||
} else {
|
||||
this.$toast('福利发放已结束')
|
||||
}
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/welfare/list/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()
|
||||
},
|
||||
init() {
|
||||
this.startLoading()
|
||||
this.tarBarActive = Number(GetQueryString("tarBarActive"))
|
||||
this.pageForm.tabName = 'ing'
|
||||
this.onRefresh()
|
||||
this.closeLoading()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.onRefresh()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,57 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.desc {
|
||||
padding: 10px;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
@media (max-width: 750px) {
|
||||
img {
|
||||
background-size: contain;
|
||||
width: 90%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" left-arrow
|
||||
title="详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div class="desc" v-html="desc"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
desc: null
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
const id = GetQueryString("optionId")
|
||||
if (id) {
|
||||
this.desc = window.localStorage.getItem('welfare_option_desc_' + id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,72 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
background: #ffffff;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar :title="title" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div style="text-align: center;margin-top: 200px;">
|
||||
<svg t="1642388297798" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="3082" width="80" height="80">
|
||||
<path d="M37.36963 583.753525a440.246475 430.879529 90 1 0 861.759058 0 440.246475 430.879529 90 1 0-861.759058 0Z"
|
||||
fill="#07C160" p-id="3083"></path>
|
||||
<path d="M247.376566 529.799914L391.065522 674.425565l299.742281-299.742281 59.948456 59.948456-359.690737 358.754043L187.240771 589.748371z"
|
||||
fill="#FFFFFF" p-id="3084"></path>
|
||||
<path d="M955.330366 240.548613h-83.927839a30.723584 30.723584 0 0 0-31.472939 30.161567v1.124034a30.910923 30.910923 0 0 0 30.348906 31.472939H955.330366a30.723584 30.723584 0 0 0 31.2856-30.348906v-1.124033A30.536245 30.536245 0 0 0 955.330366 240.548613z m-72.125487-168.605033a32.222295 32.222295 0 0 0-43.837308 4.121457L786.725333 141.071644a31.285601 31.285601 0 0 0 48.146104 39.903191l52.080221-64.819268a30.536245 30.536245 0 0 0-2.810084-42.900614zM683.126907 0.005433a30.910923 30.910923 0 0 0-31.47294 30.161567v84.864533a30.723584 30.723584 0 0 0 30.348906 31.285601h1.124034a30.536245 30.536245 0 0 0 31.2856-30.161567V31.291033A30.723584 30.723584 0 0 0 684.25094 0.005433z"
|
||||
fill="#07C160" p-id="3085"></path>
|
||||
</svg>
|
||||
<div style="margin-top: 20px;">{{code=='2' ? '您已领取' : '您已选择'}}</div>
|
||||
<div style="margin: 20px auto 0px auto;width: 300px;word-break: break-all">
|
||||
福利品: {{selectOptionNames}}
|
||||
</div>
|
||||
<van-button style="margin-top: 20px;width: 100px" size="small" hairline type="primary"
|
||||
@click="back">返回
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
selectOptionNames: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getUserSelection() {
|
||||
const resp = await $.get('/mobile/welfare/mine/getUserSelect', {projectId: this.projectId})
|
||||
this.selectOptionNames = resp.data
|
||||
},
|
||||
back() {
|
||||
window.history.go(-1)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("projectId")
|
||||
if (id) {
|
||||
this.projectId = id
|
||||
this.getUserSelection()
|
||||
}
|
||||
this.provideMode = GetQueryString("provideMode")
|
||||
this.code = GetQueryString("code")
|
||||
this.title = this.code === '1' ? "选择结果" : '领取结果'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,79 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 0 16px;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.bottom-button {
|
||||
width: 160px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.van-button {
|
||||
position: initial !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="地址管理" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div v-if="vLoading && !vLoading.value">
|
||||
<van-address-list
|
||||
v-if="addressList && addressList.length>0 "
|
||||
v-model="chosenAddressId"
|
||||
:list="addressList"
|
||||
default-tag-text="默认"
|
||||
@add="onAdd"
|
||||
@edit="onEdit"
|
||||
></van-address-list>
|
||||
|
||||
<van-empty v-else description="暂无地址">
|
||||
<van-button round type="danger" class="bottom-button" @click="onAdd">新增地址</van-button>
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
chosenAddressId: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onAdd() {
|
||||
location.replace('/mobile/welfare/mine/addressEdit')
|
||||
},
|
||||
onEdit(item, index) {
|
||||
location.replace('/mobile/welfare/mine/addressEdit?id=' + item.id)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.startLoading()
|
||||
await this.selectAddressList()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.selectAddressList()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 0 16px;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="地址管理" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div v-if="vLoading && !vLoading.value">
|
||||
<van-address-edit
|
||||
ref="address"
|
||||
:area-list="areaList"
|
||||
:show-delete="addressId"
|
||||
:address-info="addressInfo"
|
||||
show-set-default
|
||||
show-search-result
|
||||
tel-maxlength="11"
|
||||
:area-columns-placeholder="['请选择', '请选择', '请选择']"
|
||||
@save="onSave"
|
||||
@delete="onDelete"
|
||||
></van-address-edit>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/areaList.js"){};include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
areaList: areaList,
|
||||
addressInfo: {},
|
||||
addressId: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async onSave(content) {
|
||||
const loading = this.$toast.loading({
|
||||
message: '保存中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
content.userName = content.name
|
||||
const resp = await $.post('/mobile/welfare/mine/doSaveUserAddress', content)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
let welfareProjectId = window.sessionStorage.getItem("welfareProjectId");
|
||||
if (welfareProjectId) {
|
||||
location.replace('/mobile/welfare/list/receive?projectId=' + welfareProjectId)
|
||||
window.sessionStorage.removeItem("welfareProjectId");
|
||||
} else {
|
||||
location.replace('/mobile/welfare/mine/address')
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
async onDelete(content) {
|
||||
const loading = this.$toast.loading({
|
||||
message: '删除中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post('/mobile/welfare/mine/deleteAddress', {id: content.id})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
window.location.replace('/mobile/welfare/mine/address')
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.startLoading()
|
||||
this.addressId = GetQueryString("id") === '' ? null : GetQueryString("id")
|
||||
if (this.addressId) {
|
||||
const resp = await $.get('/mobile/welfare/mine/findOneUserAddress', {id: this.addressId})
|
||||
if (resp.code === 0) {
|
||||
this.addressInfo = resp.data
|
||||
}
|
||||
this.closeLoading()
|
||||
} else {
|
||||
this.addressInfo.name = "${@shiro.getPrincipalProperty('username')}";
|
||||
this.closeLoading()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,63 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 0 16px;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="个人信息" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div class="mt10" v-if="vLoading && !vLoading.value">
|
||||
<van-cell-group class="van-cell-group--inset">
|
||||
<van-cell>
|
||||
<template #title>
|
||||
<div style="font-weight: bold;font-size: 15px">个人信息</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" is-link title="我的福利" url="/mobile/welfare/mine/myWelfare">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" color="red" name="star"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" is-link title="我的地址" url="/mobile/welfare/mine/address">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" color="red" name="location"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" is-link title="我的签名" url="/mobile/welfare/mine/sign">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" color="red" name="coupon"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.startLoading()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,210 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.base-one-circle {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
padding: 10px 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
background: radial-gradient(circle at left bottom, transparent 10px, #fff 0) top left / 40% 50% no-repeat,
|
||||
radial-gradient(circle at left top, transparent 10px, #fff 0) bottom left /40% 50% no-repeat,
|
||||
radial-gradient(circle at right bottom, transparent 10px, #fff 0) top right /60% 50% no-repeat,
|
||||
radial-gradient(circle at right top, transparent 10px, #fff 0) bottom right /60% 50% no-repeat;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.base-one-circle .left_img {
|
||||
min-width: 100px;
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.base-one-circle .right_content {
|
||||
flex: 1;
|
||||
max-width: calc(100% - 120px);
|
||||
width: calc(100% - 120px);
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.welfare_name {
|
||||
width: calc(100% - 50px);;
|
||||
max-width: 100%;
|
||||
word-break: break-word;
|
||||
height: 40px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.welfare_time {
|
||||
height: 25px;
|
||||
line-height: 15px;
|
||||
font-size: 12px;
|
||||
color: gray
|
||||
}
|
||||
|
||||
.welfare_gift {
|
||||
font-size: 12px;
|
||||
color: gray;
|
||||
margin-top: 10px;
|
||||
line-height: 15px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.receive_img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.van-image__img {
|
||||
border-radius: 10px;
|
||||
object-fit: revert;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我的福利" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!-- <van-tabs v-model="tabActive" @change="tabChange">
|
||||
<van-tab title="全部"></van-tab>
|
||||
<van-tab title="已领取"></van-tab>
|
||||
<van-tab title="未领取"></van-tab>
|
||||
</van-tabs>-->
|
||||
|
||||
<div class="content">
|
||||
<template v-for="item in welfareList">
|
||||
<div class="base-one-circle">
|
||||
<div class="left_img">
|
||||
<img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.cover" alt=""
|
||||
class="van-image__img"
|
||||
v-if="item.cover">
|
||||
<image v-else src="/assets/mobile/svg/welfare/welfareHome.svg"></image>
|
||||
</div>
|
||||
<div class="right_content" @click="openView(item)">
|
||||
<div class="welfare_name van-ellipsis">【{{item.name}}】</div>
|
||||
<div class="welfare_time">
|
||||
<template v-if="new Date().getTime()>moment(item.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(item.choiceTimeEnd).valueOf()">
|
||||
<div style="flex: 1">选择开始时间:{{item.choiceTimeStart}}</div>
|
||||
<div style="flex: 1">选择结束时间:{{item.choiceTimeEnd}}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="flex: 1">发放开始时间:{{item.provideTimeStart}}</div>
|
||||
<div style="flex: 1">发放结束时间:{{item.provideTimeEnd}}</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="welfare_gift">
|
||||
<div style="width: 60px;" v-if="item.isReceive">已领礼品:</div>
|
||||
<div style="width: 60px;" v-if="!item.isReceive">已选礼品:</div>
|
||||
<div style="width: calc(100% - 60px);word-break: break-word">
|
||||
{{item.flexible?item.welfareOptionName:item.gift}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="welfare_gift" v-if="item.provideMode===3">
|
||||
<div style="width: 60px;">快递单号:</div>
|
||||
<div>
|
||||
{{item.courierNumber}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="receive_img">
|
||||
<template v-if="new Date().getTime()>moment(item.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(item.choiceTimeEnd).valueOf()">
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-if="item.isSelect&&!item.isReceive">已选择
|
||||
</div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-else-if="!item.isSelect&&!item.isReceive">未选择
|
||||
</div>
|
||||
<!-- <image v-if="o.isSelect" src="/assets/mobile/svg/welfare/ylq.svg"></image>
|
||||
<image v-else src="/assets/mobile/svg/welfare/wlq.svg"></image>-->
|
||||
</template>
|
||||
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-else-if="item.isSelect&&item.isReceive">已选择
|
||||
</div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-else-if="item.isSelect&&!item.isReceive">未选择
|
||||
</div>
|
||||
<!-- <image v-if="o.isSelect" src="/assets/mobile/svg/welfare/ylq.svg"></image>
|
||||
<image v-else src="/assets/mobile/svg/welfare/wlq.svg"></image>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
fullWelfareList: [],
|
||||
welfareList: [],
|
||||
tabActive: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
location.replace('/mobile/welfare/list/receive?projectId=' + item.id + '&type=view')
|
||||
},
|
||||
async getData() {
|
||||
const resp = await $.post('/mobile/welfare/mine/getMyWelfare', {tabActive: this.tabActive})
|
||||
this.fullWelfareList = resp.data
|
||||
this.welfareList = resp.data
|
||||
},
|
||||
tabChange(val) {
|
||||
if (val === 0) {
|
||||
this.welfareList = this.fullWelfareList
|
||||
}
|
||||
switch (val) {
|
||||
case 0: {
|
||||
this.welfareList = this.fullWelfareList
|
||||
break
|
||||
}
|
||||
case 1: {
|
||||
this.welfareList = this.fullWelfareList.filter(v => v.isReceive || [1].includes(v.provideMode))
|
||||
break
|
||||
}
|
||||
case 2: {
|
||||
this.welfareList = this.fullWelfareList.filter(v => !v.isReceive)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.startLoading()
|
||||
this.getData()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,126 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
#signature {
|
||||
/*height: calc(100vh - 136px);*/
|
||||
height: 300px;
|
||||
background: #fff;
|
||||
border: 1px dashed grey;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.button-operation {
|
||||
display: flex;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
/*bottom: 0;*/
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.button-operation > div {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.button-operation > div > button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我的签名" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div id="signature"></div>
|
||||
<div class="button-operation">
|
||||
<div>
|
||||
<van-button type="danger" @click="reset">重写</van-button>
|
||||
</div>
|
||||
<div>
|
||||
<van-button type="info" @click="save">保存</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
userSign: {
|
||||
data: null
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
const val = $('#signature').jSignature("getData", "default")
|
||||
$('#signature').jSignature('clear')
|
||||
this.userSign.data = null
|
||||
},
|
||||
async save() {
|
||||
const slength = $("#signature").jSignature('getData', 'native').length
|
||||
if (slength === 0 && !this.userSign.data) {
|
||||
this.$toast('请先签字!')
|
||||
return
|
||||
}
|
||||
|
||||
const loading = this.$toast.loading({
|
||||
message: '保存中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.userSign.data = $('#signature').jSignature("getData", "default")
|
||||
const resp = await $.post('/mobile/welfare/mine/saveMySignature', this.userSign)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.userSign = resp.data
|
||||
this.$toast.success('保存成功!')
|
||||
}
|
||||
},
|
||||
async getSignature() {
|
||||
const resp = await $.get('/mobile/welfare/mine/getMySignature')
|
||||
if (resp.code === 0) {
|
||||
this.userSign = resp.data
|
||||
if (this.userSign.data) {
|
||||
$('#signature').jSignature("setData", resp.data.data)
|
||||
// $('#signature').jSignature("importData", resp.data.data)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
$('#signature').jSignature({
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
lineWidth: 1
|
||||
})
|
||||
document.body.addEventListener('touchmove', function (e) {
|
||||
e.preventDefault(); //阻止默认的处理方式(阻止下拉滑动的效果)
|
||||
}, {passive: false}); //passive 参数不能省略,用来兼容ios和android
|
||||
},
|
||||
created() {
|
||||
this.getSignature()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,84 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-dialog__confirm {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.van-dialog {
|
||||
width: 95%;
|
||||
height: 85%;
|
||||
margin-top: 5%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="福利签收" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<welfare ref="welfare" @sign="openDialog"></welfare>
|
||||
|
||||
<van-dialog id="dialog" v-model="showSign" title="请签字确认" show-cancel-button @confirm="signFor"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
showSign: false,
|
||||
data: {},
|
||||
sign: ""
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'welfare': httpVueLoader('/components/welfare/common.vue'),
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
signFor() {
|
||||
this.$refs.signature.submitSign()
|
||||
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
const {lp_id, txfl} = this.data
|
||||
|
||||
this.$toast.loading({message: '提交中...', forbidClick: true,});
|
||||
|
||||
$.post("/mobile/welfare/signing/signFor", {
|
||||
lp_id: lp_id,
|
||||
elasticity_name: txfl,
|
||||
sign: this.sign
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('签收成功');
|
||||
this.$refs.welfare.onRefresh()
|
||||
} else {
|
||||
this.$toast.fail('签收失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
openDialog(row) {
|
||||
this.data = row
|
||||
if (!row.txfl && row.hxlp.length > 0) {
|
||||
this.$toast('未选择弹性福利');
|
||||
return
|
||||
}
|
||||
this.showSign = true
|
||||
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,72 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="lp_ms" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<van-search v-model="pageForm.username" placeholder="请输入姓名" @search="onSearch"></van-search>
|
||||
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<van-tabs color="#409EFF" title-active-color="#409EFF" animated v-model="activeName" @click="switchTab">
|
||||
<van-tab title="全部" name="all"></van-tab>
|
||||
<van-tab title="已签收" name="already"></van-tab>
|
||||
<van-tab title="未签收" name="not"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-cell-group style="padding: 10px">
|
||||
|
||||
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-cell class="cell-card" v-for="item in tableData" :title="item.username">
|
||||
<template>
|
||||
<span>{{item.sign_time}}</span>
|
||||
</template>
|
||||
|
||||
<template #right-icon>
|
||||
<van-tag style="margin-left: 20px;" v-if="item.isqs" type="success" round>已签收</van-tag>
|
||||
<van-tag style="margin-left: 20px;" v-else type="warning" round>未签收</van-tag>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [refreshSearchMixins],
|
||||
data() {
|
||||
return {
|
||||
activeName: "all",
|
||||
lp_ms: "",
|
||||
pageForm: {
|
||||
pageSize: 50,
|
||||
username: "",
|
||||
lp_id: "",
|
||||
is_sign: "",
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async switchTab() {
|
||||
this.pageForm.is_sign = this.activeName
|
||||
await this.onRefresh()
|
||||
},
|
||||
async onSearch(val) {
|
||||
this.pageForm.username = val
|
||||
await this.onRefresh()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.lp_id = GetQueryString('lp_id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,362 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.v-tree-layout-left {
|
||||
overflow: unset !important;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .v-tree {
|
||||
width: 100%;
|
||||
height: calc(100vh - 170px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.v-tree:hover::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .custom-tree-node {
|
||||
width: 90%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .v-tree .v-node {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
/*width: 3px;*/
|
||||
/*background-color: transparent;*/
|
||||
display: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never" style="height: calc(100vh - 70px)">
|
||||
<tree-layout>
|
||||
<template #tree>
|
||||
<div style="padding:0 20px 20px;">
|
||||
<el-input placeholder="输入关键字进行查找" v-model="filterText"></el-input>
|
||||
</div>
|
||||
|
||||
<el-tree ref="tree" :data="treeData" class="v-tree" v-loading="treeLoading" node-key="id"
|
||||
:props="defaultProps"
|
||||
:default-expanded-keys="['7e3f5fcbc24f442dbb3a6cc9412e7960']" :expand-on-click-node="false"
|
||||
@node-click="handleNodeClick" accordion
|
||||
highlight-current :filter-node-method="filterNode">
|
||||
<div class="custom-tree-node" slot-scope="{ node, data }">
|
||||
|
||||
<div v-if="node.level==1" style="font-size: 16px;" class="v-node"><i
|
||||
class="el-icon-s-home"></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
<div v-if="node.level==2"
|
||||
style="font-size: 15px" :title="data.name" class="v-node">
|
||||
<i class="el-icon-star-on" v-if="checkData.name==data.name"></i>
|
||||
<i class="el-icon-star-off" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="node.level==3"
|
||||
style="font-size: 14px" :title="data.name" class="v-node">
|
||||
<i class="fa fa-dot-circle-o" v-if="checkData.name==data.name"></i>
|
||||
<i class="fa fa-circle-o" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="node.level>3"
|
||||
style="font-size: 14px" :title="data.name" class="v-node">
|
||||
<i class="fa fa-dot-circle-o" v-if="checkData.name==data.name"></i>
|
||||
<i class="fa fa-circle-o" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-tree>
|
||||
|
||||
</template>
|
||||
|
||||
<template v-if="node.level==1">
|
||||
<div v-if="node.level==1" style="padding:0 10px">
|
||||
<el-card shadow="never">
|
||||
<div class="text-right">
|
||||
<el-button size="medium" type="primary" @click="openBasicType()">
|
||||
<i class="el-icon-plus"></i>
|
||||
新建基础类型
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-table :data="basicTypeData" height="656px">
|
||||
<el-table-column label="序号" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" align="center" label="名称"></el-table-column>
|
||||
<el-table-column prop="code" align="center" label="代码"></el-table-column>
|
||||
<el-table-column prop="note" align="center" show-overflow-tooltip
|
||||
label="备注"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'edit',data:row}"
|
||||
:disabled="checkData.code==50000||checkData.code==40000">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
:disabled="checkData.code==50000||checkData.code==40000||checkData.code=='jcsjgl'">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change="(val)=>{pageForm.pageSize = val;pageData()}"
|
||||
@current-change="(val)=>{pageForm.pageNumber = val;pageData()}"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
</tree-layout>
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="basicTypeDialog" width="50%">
|
||||
<el-form :model="formData" ref="addForm" :rules="rules" label-width="100px">
|
||||
<el-row gutter="30">
|
||||
<el-form-item label="上级名称" prop="name" label-width="110px">
|
||||
<el-input maxlength="100" disabled :value="checkData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="基础类型名称" prop="name" label-width="110px">
|
||||
<el-input maxlength="100" placeholder="请输入基础类型名称" v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="基础类型代码" prop="code" label-width="110px">
|
||||
<el-input maxlength="100" placeholder="请输入基础类型名称" v-model="formData.code"
|
||||
type="text"
|
||||
:disabled="checkData.code==50000||checkData.code==40000||checkData.code=='jcsjgl'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="基础类型备注" prop="note" label-width="110px">
|
||||
<el-input maxlength="100" placeholder="请输入基础类型备注" v-model="formData.note"
|
||||
type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="display: flex;justify-content:flex-end;margin-top: 30px">
|
||||
<el-button type="primary" :loading="loading" @click="!formData.id?doAddType():doEditType()">提 交
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
checkData: {},
|
||||
filterText: '',
|
||||
treeData: [],
|
||||
basicTypeData: [],
|
||||
tableData: [],
|
||||
treeLoading: true,
|
||||
basicTypeDialog: false,
|
||||
loading: false,
|
||||
defaultProps: {
|
||||
children: 'child',
|
||||
label: 'name',
|
||||
},
|
||||
node: {
|
||||
level: 1
|
||||
},
|
||||
options: [{
|
||||
value: 'ziyuan',
|
||||
label: '资源',
|
||||
children: [{
|
||||
value: 'axure',
|
||||
label: 'Axure Components'
|
||||
}]
|
||||
}],
|
||||
rules: {
|
||||
name: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
code: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'tree-layout': httpVueLoader('/components/plugins/TreeLayout.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand: function (command) {
|
||||
const {type, data} = command
|
||||
if (type == 'edit') {
|
||||
this.openEditType(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data.id)
|
||||
}
|
||||
},
|
||||
pageData() {//加载机构数据
|
||||
sublime.showLoadingbar();//显示loading
|
||||
this.tabLoading = true
|
||||
this.pageForm.parentId = this.checkData.id
|
||||
$.post(loc() + "/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();//关闭loading
|
||||
this.tabLoading = false
|
||||
if (data.code == 0) {
|
||||
this.basicTypeData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
filterNode(value, data, node) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1
|
||||
return false
|
||||
},
|
||||
async handleNodeClick(data, node) {
|
||||
this.checkData = data
|
||||
this.checkNode = node
|
||||
console.log(this.checkData)
|
||||
this.pageData()
|
||||
},
|
||||
async loadTree(flush) {
|
||||
this.treeLoading = true
|
||||
const resp = await $.post(loc() + "/getTreeData")
|
||||
this.treeLoading = false
|
||||
if(resp.code===0){
|
||||
this.treeLoading = false
|
||||
this.treeData = resp.data
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
if (flush && resp.code === 0) {
|
||||
this.checkData = resp.data[0]
|
||||
this.pageData();
|
||||
}
|
||||
},
|
||||
async openBasicType() {
|
||||
const {id} = this.checkData
|
||||
this.formData = {
|
||||
parentId: id
|
||||
}
|
||||
this.basicTypeDialog = true
|
||||
if (this.$refs['addForm']) {
|
||||
this.$refs['addForm'].resetFields()
|
||||
}
|
||||
},
|
||||
doAddType() {
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doAdd", this.formData)
|
||||
this.loading = false
|
||||
if(resp.code===0){
|
||||
this.basicTypeDialog = false
|
||||
this.pageData();
|
||||
this.loadTree(true)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doEditType() {
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doEditType", this.formData)
|
||||
this.loading = false
|
||||
this.basicTypeDialog = false
|
||||
if(resp.code===0){
|
||||
this.pageData();
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openEditType(row) {
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
name: row.name,
|
||||
code: row.code,
|
||||
note: row.note
|
||||
}
|
||||
this.basicTypeDialog = true
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('确定要删除该机构吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {
|
||||
const resp = await $.post(loc() + "/doDelete", {id: id})
|
||||
if(resp.code===0){
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
this.loadTree(true)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.loadTree(true)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,713 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
|
||||
|
||||
<div class="d-search-item btn-group tool-button mr10">
|
||||
<el-checkbox-group @change="doSearch" v-model="pageForm.isMenWomen">
|
||||
<el-checkbox-button :key="2" :label="2">男子</el-checkbox-button>
|
||||
<el-checkbox-button :key="3" :label="3">女子</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div class="d-search-item btn-group tool-button mr10">
|
||||
<el-checkbox-group @change="doSearch" v-model="pageForm.isMenWomen">
|
||||
<el-checkbox-button :key="4" :label="4">单项</el-checkbox-button>
|
||||
<el-checkbox-button :key="5" :label="5">团体</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-search-item btn-group tool-button mr10">
|
||||
<el-select v-model="pageForm.group" @focus="focusGroup"
|
||||
placeholder="请选择比赛组别" clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in groupList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="d-search-item btn-group tool-button mr10">
|
||||
<el-select @focus="exerciseType" clearable filterable placeholder="请选择运动类型"
|
||||
style="width: 100%" v-model="pageForm.events">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in exerciseTypeList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="比赛项目列表" :app="this">
|
||||
|
||||
<template #label_end>
|
||||
|
||||
</template>
|
||||
|
||||
<template #func>
|
||||
<el-input type="number" v-model="pageForm.age" placeholder="输入年龄算出身年"
|
||||
@input="ageInput"
|
||||
style="width: auto">
|
||||
<template slot="prepend">年龄计算器</template>
|
||||
</el-input>
|
||||
<el-tag class="ml10">{{ pageForm.ageYear }}</el-tag>
|
||||
<el-date-picker
|
||||
class="ml10"
|
||||
v-model="pageForm.ageDate"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
<el-button class="ml10" type="primary" icon="el-icon-check"
|
||||
@click="doAssignmentDate">统赋年龄限制
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit-outline"
|
||||
@click="openAdd">
|
||||
创建比赛项目
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
ref="multipleTable"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:width="column.width"
|
||||
:prop="column.prop" :sortable="column.sortable"
|
||||
:sortable="column.sortable" show-overflow-tooltip>
|
||||
|
||||
<template scope="{row}" v-if="column.prop=='baname'">
|
||||
<span>{{row.baname!=null?row.baname:'暂无'}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='diname'">
|
||||
<span>{{row.diname!=null?row.diname:'暂无'}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='isMenWomen'">
|
||||
<span v-if="row.isMenWomen==1">男子</span>
|
||||
<span v-if="row.isMenWomen==2">女子</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='spname'">
|
||||
<span>{{row.spname!=null?row.spname:''}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='projectType'">
|
||||
<span>{{row.projectType=='1'?'单项':'团体'}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='note'">
|
||||
<span>{{row.note!=''?row.note:'暂无'}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='whetherEnable'">
|
||||
<el-switch @change="switchChange(row)" v-model="row.whetherEnable"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作"
|
||||
width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'edit',row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<template #edit>
|
||||
|
||||
<vi-title title="填写比赛项目信息"></vi-title>
|
||||
|
||||
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px"
|
||||
label-suffix=":">
|
||||
<el-row gutter="40">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="isInterest" label="是否趣味项目">
|
||||
<el-checkbox v-model="formData.isInterest">
|
||||
{{formData.isInterest?'是趣味':'不是趣味'}}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="projectCode" label="比赛项目编号">
|
||||
<el-input v-model="formData.projectCode"
|
||||
placeholder="请填写比赛项目编号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="isMenWomen" label="性别">
|
||||
<el-select v-model="formData.isMenWomen" placeholder="请选择男女分组"
|
||||
allow-create filterable
|
||||
default-first-option clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in menWomenList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="competitionCategory" label="比赛组别">
|
||||
<el-select v-model="formData.competitionCategory" @focus="focusGroup"
|
||||
placeholder="请选择比赛组别"
|
||||
clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in groupList"
|
||||
:key="item.id"
|
||||
:label="item.name+'('+item.code+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="distance" label="距离">
|
||||
<el-select v-model="formData.distance" @focus="focusDistance"
|
||||
placeholder="请选择距离"
|
||||
clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in distanceList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="exerciseType" label="运动类型">
|
||||
<el-select v-model="formData.exerciseType" @focus="exerciseType"
|
||||
@change="changeExercise_typeList" placeholder="请选择运动类型"
|
||||
filterable
|
||||
clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in exerciseTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="sports" label="运动项目">
|
||||
<el-select v-model="formData.sports" placeholder="请选择具体运动项目"
|
||||
clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in exerciseTypeList2"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="projectType" label="项目类型">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择具体运动项目"
|
||||
allow-create filterable
|
||||
default-first-option clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in projectTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="ageDate" label="年龄限制范围" v-if="formData.projectType==1">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.ageDate"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" @click="formData.id?doEdit():doAdd()">提 交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
multipleSelection: [],
|
||||
groupList: [],
|
||||
exerciseTypeList: [],
|
||||
distanceList: [],
|
||||
exerciseTypeList2: [],
|
||||
eventDialog: false,
|
||||
loading: false,
|
||||
title: "",
|
||||
pageForm: {
|
||||
age: 1,
|
||||
ageYear: null,
|
||||
activityId: null,
|
||||
ageDate: null,
|
||||
isMenWomen: []
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'projectCode', label: '项目编号', sortable: true},
|
||||
{prop: 'allName', label: '全称', width: "200"},
|
||||
{prop: 'isMenWomen', label: '男子/女子', sortable: true},
|
||||
{prop: 'baname', label: '比赛组别', sortable: true},
|
||||
{prop: 'diname', label: '距离', sortable: true},
|
||||
{prop: 'exename', label: '运动类型', sortable: true},
|
||||
{prop: 'spname', label: '运动项目', sortable: true},
|
||||
{prop: 'projectType', label: '项目类型', sortable: true},
|
||||
{prop: 'whetherEnable', label: '是否启用'},
|
||||
|
||||
],
|
||||
projectTypeList: [
|
||||
{id: '1', name: '单项'},
|
||||
{id: '2', name: '团体'},
|
||||
],
|
||||
menWomenList: [
|
||||
{id: 1, name: '男子'},
|
||||
{id: 2, name: '女子'},
|
||||
],
|
||||
formRules: {
|
||||
exerciseType: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
projectType: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
projectCode: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
/* competitionCategory: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
distance: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
exerciseType: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
*/
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
methods: {
|
||||
ageInput(val) {
|
||||
const year = new Date().getFullYear()
|
||||
this.$set(this.pageForm, "ageYear", year - val)
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
async doAssignmentDate() {
|
||||
const aa = this.multipleSelection.map(v => {
|
||||
if (v.isInterest) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
if (aa.find(v => v == true)) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '您勾选的列表中包含趣味项目,趣味项目暂不需要年龄限制',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '请先在旁边勾选需要设置的项目',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
if (this.pageForm.ageDate == null) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '请选择需要赋值的时间段',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('确定要勾选的项目赋年龄限制吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const data = await $.post(loc() + "/doAssignmentDate", {
|
||||
startAgeDate: this.pageForm.ageDate[0],
|
||||
endAgeDate: this.pageForm.ageDate[1],
|
||||
eventIds: JSON.stringify(this.multipleSelection.map(v => v.id))
|
||||
})
|
||||
this.$notify.success({title: '成功', message: data.msg});
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
this.doSearch()
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'edit') {
|
||||
this.openEdit(row)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(row)
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.formData = {}
|
||||
},
|
||||
|
||||
//查询比赛组别
|
||||
async focusGroup() {
|
||||
const resp = await $.post(loc() + "/focusGroup")
|
||||
if(resp.code===0){
|
||||
this.groupList = resp.data
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
//查询运动类型
|
||||
async exerciseType() {
|
||||
const resp = await $.post(loc() + "/exerciseType")
|
||||
if(resp.code===0){
|
||||
this.exerciseTypeList = resp.data
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
//查询距离
|
||||
async focusDistance() {
|
||||
const resp = await $.post(loc() + "/focusDistance")
|
||||
if(resp.code===0){
|
||||
this.distanceList = resp.data;
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
//根据运动id查询下面有哪些具体的运动项目
|
||||
async changeExercise_typeList() {
|
||||
const resp = await $.post(loc() + "/changeExercise_typeList", {exerciseType: this.formData.exerciseType})
|
||||
if(resp.code===0){
|
||||
this.exerciseTypeList2 = resp.data
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const {data} = await $.post(loc() + "/getProjectCodeIsExist", {projectCode: this.formData.projectCode})
|
||||
if (data) {
|
||||
this.$message.error("编号已存在");
|
||||
return
|
||||
}
|
||||
let allName = '';
|
||||
|
||||
this.menWomenList.find(v => {
|
||||
if (v.id === this.formData.isMenWomen) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.groupList.find(v => {
|
||||
if (v.id === this.formData.competitionCategory) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
this.distanceList.find(v => {
|
||||
if (v.id === this.formData.distance) {
|
||||
allName += v.name + '米'
|
||||
}
|
||||
})
|
||||
|
||||
/* this.exerciseTypeList.find(v => {
|
||||
if (v.id === this.formData.exerciseType) {
|
||||
allName += v.name
|
||||
}
|
||||
})*/
|
||||
|
||||
this.exerciseTypeList2.find(v => {
|
||||
if (v.id === this.formData.sports) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
this.projectTypeList.find(v => {
|
||||
if (v.id === this.formData.projectType) {
|
||||
allName += "(" + v.name + ")"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.formData.allName = allName
|
||||
if (this.formData.ageDate && this.formData.ageDate.length > 0) {
|
||||
this.formData.startAgeDate = this.formData.ageDate[0]
|
||||
this.formData.endAgeDate = this.formData.ageDate[1]
|
||||
}
|
||||
|
||||
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doAdd", this.formData)
|
||||
this.loading = false
|
||||
if(resp.code===0){
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tabLoading = true
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen)
|
||||
$.post(base + "/platform/activity/basic/event/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tabLoading = false
|
||||
if (data.code == 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async switchChange(data) {
|
||||
this.formData = data
|
||||
const resp = await $.post(loc() + "/doEdit", this.formData)
|
||||
if(resp.code===0){
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
doEdit() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.formData.oldProjectCode !== this.formData.projectCode) {
|
||||
const {data} = await $.post(loc() + "/getProjectCodeIsExist", {projectCode: this.formData.projectCode})
|
||||
if (data) {
|
||||
this.$message.error("编号已存在");
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let allName = '';
|
||||
|
||||
this.menWomenList.find(v => {
|
||||
if (v.id === this.formData.isMenWomen) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.groupList.find(v => {
|
||||
if (v.id === this.formData.competitionCategory) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
this.distanceList.find(v => {
|
||||
if (v.id === this.formData.distance) {
|
||||
allName += v.name + '米'
|
||||
}
|
||||
})
|
||||
|
||||
/* this.exerciseTypeList.find(v => {
|
||||
if (v.id === this.formData.exerciseType) {
|
||||
allName += v.name
|
||||
}
|
||||
})*/
|
||||
|
||||
this.exerciseTypeList2.find(v => {
|
||||
if (v.id === this.formData.sports) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
this.projectTypeList.find(v => {
|
||||
if (v.id === this.formData.projectType) {
|
||||
allName += "(" + v.name + ")"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.formData.allName = allName
|
||||
if (this.formData.ageDate && this.formData.ageDate.length > 0) {
|
||||
this.formData.startAgeDate = this.formData.ageDate[0]
|
||||
this.formData.endAgeDate = this.formData.ageDate[1]
|
||||
}
|
||||
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doEdit", this.formData)
|
||||
this.loading = true
|
||||
if(resp.code===0){
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openEdit(data) {
|
||||
this.focusGroup()
|
||||
this.exerciseType()
|
||||
this.focusDistance()
|
||||
this.formData = {
|
||||
id: data.id,
|
||||
isInterest: data.isInterest,
|
||||
competitionCategory: data.competitionCategory,
|
||||
distance: data.distance,
|
||||
exerciseType: data.exerciseType,
|
||||
sports: data.sports,
|
||||
projectType: data.projectType,
|
||||
note: data.note,
|
||||
isMenWomen: data.isMenWomen,
|
||||
projectCode: data.projectCode,
|
||||
oldProjectCode: data.projectCode
|
||||
|
||||
}
|
||||
if (data.startAgeDate != null) {
|
||||
this.$set(this.formData, "ageDate", [data.startAgeDate, data.endAgeDate])
|
||||
}
|
||||
|
||||
this.changeExercise_typeList()
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
this.$confirm('确定要删除该活动吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" === a) {//确认后再执行
|
||||
|
||||
this.$set(row, "loading", true)
|
||||
const resp = await $.post(loc() + "/doDelete", {id: id});
|
||||
this.$set(row, "loading", false)
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.ageInput(this.pageForm.age)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,45 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<user-scope ref="userScope"></user-scope>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'user-scope': httpVueLoader('/components/plugins/UserScope.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
async created() {
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,629 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-tag {
|
||||
border-radius: 50%;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.el-transfer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-transfer-panel {
|
||||
text-align: left;
|
||||
width: 35%;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.el-transfer-panel__list.is-filterable {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.v-tree-layout-left {
|
||||
overflow: unset !important;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .v-tree {
|
||||
width: 100%;
|
||||
height: calc(100vh - 170px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.v-tree:hover::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .custom-tree-node {
|
||||
width: 90%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .v-tree .v-node {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
/*width: 3px;*/
|
||||
/*background-color: transparent;*/
|
||||
display: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never" style="height: calc(100vh - 70px)">
|
||||
<tree-layout >
|
||||
<template #tree>
|
||||
<div style="padding:0 20px 20px;">
|
||||
<el-input
|
||||
placeholder="输入关键字进行查找" clearable
|
||||
v-model="filterText">
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tree ref="tree" :data="treeData" class="v-tree" v-loading="treeLoading" node-key="id"
|
||||
:props="defaultProps"
|
||||
default-expand-all :expand-on-click-node="false"
|
||||
@node-click="handleNodeClick" accordion @node-expand="nodeExpand"
|
||||
highlight-current :filter-node-method="filterNode">
|
||||
<div class="custom-tree-node" slot-scope="{ node, data }">
|
||||
|
||||
<div v-if="node.level==1" style="font-size: 16px;" class="v-node"><i
|
||||
class="el-icon-s-home"></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
<div v-if="node.level==2"
|
||||
style="font-size: 15px" :title="data.name" class="v-node">
|
||||
<i class="el-icon-star-on" v-if="checkData.name==data.name"></i>
|
||||
<i class="el-icon-star-off" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="node.level==3"
|
||||
style="font-size: 14px" :title="data.name" class="v-node">
|
||||
<i class="fa fa-dot-circle-o" v-if="checkData.name==data.name"></i>
|
||||
<i class="fa fa-circle-o" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="node.level>3"
|
||||
style="font-size: 14px" :title="data.name" class="v-node">
|
||||
<i class="fa fa-dot-circle-o" v-if="checkData.name==data.name"></i>
|
||||
<i class="fa fa-circle-o" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-tree>
|
||||
|
||||
</template>
|
||||
<template>
|
||||
<div v-if="checkNode.level===1" style="padding:0 10px">
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 120px;">
|
||||
<el-option label="单位名称" value="name"></el-option>
|
||||
<el-option label="单位代码" value="unitcode"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<div class="btn-group tool-button">
|
||||
<el-button icon="el-icon-plus" @click="openAdd">新建单位</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tabLoading" size="medium">
|
||||
<el-table-column align="center" :key="1" header-align="center" label="序号"
|
||||
type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="单位名称"
|
||||
prop="name"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="单位代码"
|
||||
prop="unitcode">
|
||||
<template scope="{row}">
|
||||
{{row.unitcode}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单位等级" header-align="center" prop="unitlevel"
|
||||
:show-overflow-tooltip="true" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.unitlevel==1" size="mini" type="success" round
|
||||
style=" vertical-align: middle;">1级
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.unitlevel==2" size="mini" type="warning" round
|
||||
style=" vertical-align: middle;">2级
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.unitlevel==3" size="mini" type="danger" round
|
||||
style=" vertical-align: middle;">3级
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.unitlevel>3" size="mini" type="info" round
|
||||
style=" vertical-align: middle;">{{scope.row.unitlevel}}级
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" prop="operating" label="操作"
|
||||
width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'edit',data:row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'delete',data:row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="checkNode.level===2" style="padding:0 10px">
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" clearable v-model="userPageForm.searchKeyword"
|
||||
@keyup.enter.native="doUserSearch">
|
||||
<el-select v-model="userPageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doUserSearch"></el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-tabs v-model="activeName1" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="单位人员" name="first"></el-tab-pane>
|
||||
<el-tab-pane label="单位负责人" name="second"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-table :data="userTableData" style="width: 100%" @sort-change="userPageOrder"
|
||||
size="medium">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(userPageForm.pageNumber - 1) * userPageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="姓名"
|
||||
prop="username"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="loginname"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="性别"
|
||||
prop="sex">
|
||||
<template scope="{row:{sex}}">
|
||||
<span v-if="sex">{{sex}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="手机号"
|
||||
prop="mobile">
|
||||
<template scope="{row:{mobile}}">
|
||||
<span v-if="mobile">{{mobile}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="是否会员"
|
||||
prop="member">
|
||||
<template scope="{row:{member}}">
|
||||
<span v-if="member==1" class="text-success">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<el-row v-if="activeName1 === 'first'" class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userPageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="userPageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="userPageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</tree-layout>
|
||||
</el-card>
|
||||
<template #edit>
|
||||
|
||||
<el-divider content-position="left"><span style="color: rgb(121, 187, 255)">请填写以下单位信息</span>
|
||||
</el-divider>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="top"
|
||||
label-width="120px"
|
||||
style="padding: 0 30px">
|
||||
<el-row gutter="30">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="上级单位">
|
||||
<el-input maxlength="100" disabled :value="checkData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位名称" prop="name">
|
||||
<el-input maxlength="100" placeholder="请输入单位名称" v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位代码" prop="unitcode">
|
||||
<el-input maxlength="100" placeholder="请输入协会编码" v-model="formData.unitcode"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位简称" prop="aliasName">
|
||||
<el-input maxlength="100" placeholder="请输入单位简称" v-model="formData.aliasName"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="telephone">
|
||||
<el-input maxlength="100" placeholder="请输入联系电话" v-model="formData.telephone"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位邮箱" prop="email">
|
||||
<el-input maxlength="100" placeholder="请输入单位邮箱" v-model="formData.email"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位网站" prop="website">
|
||||
<el-input maxlength="100" placeholder="请输入单位网站" v-model="formData.website"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单位地址" prop="address">
|
||||
<el-input maxlength="100" placeholder="请输入单位地址" v-model="formData.address"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单位介绍" prop="note">
|
||||
<el-input maxlength="500" type="textarea" placeholder="请输入单位介绍"
|
||||
v-model="formData.note"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<div style="display: flex;justify-content:flex-end;margin-top: 30px">
|
||||
<el-button type="primary" :loading="loading" @click="!formData.id?doAdd():doEdit()">提 交
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
activeName1: 'first',
|
||||
userTableData: [],
|
||||
userPageForm: {
|
||||
searchName: "username",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
loading: false,
|
||||
filterText: '',
|
||||
defaultProps: {
|
||||
children: 'child',
|
||||
label: 'name',
|
||||
},
|
||||
exKeys: ['0'],
|
||||
activeName: [],
|
||||
typeOptions: [],
|
||||
treeLoading: true,
|
||||
tabLoading: false,
|
||||
formData: {},
|
||||
detailData: {},
|
||||
treeData: [],
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
searchName: "name",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
code: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
checkNode: {level: 1},
|
||||
checkData: {},
|
||||
campusOptions: [],
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'tree-layout': httpVueLoader('/components/plugins/TreeLayout.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
this.doUserSearch()
|
||||
},
|
||||
|
||||
dropdownCommand: function (command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data.id)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data.id)
|
||||
}
|
||||
},
|
||||
filterNode(value, data, node) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1
|
||||
|
||||
return false
|
||||
},
|
||||
nodeExpand(data, node, e) {
|
||||
|
||||
},
|
||||
async handleNodeClick(data, node) {
|
||||
this.checkData = data
|
||||
this.checkNode = node
|
||||
if (node.level === 1) {
|
||||
this.doSearch()
|
||||
} else if (node.level === 2) {
|
||||
this.doUserSearch()
|
||||
}
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('确定要删除该单位吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doDelete", {id})
|
||||
if(resp.code===0){
|
||||
this.loadTree(false)
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
doEdit() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doEdit", this.formData)
|
||||
this.loading = false
|
||||
if(resp.code===0){
|
||||
this.loadTree(false)
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async openEdit(id) {
|
||||
const resp = await $.get(loc() + "/findOne", {id})
|
||||
if(resp.code===0){
|
||||
this.formData = data
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doAdd", this.formData)
|
||||
this.loading = true
|
||||
if(resp.code===0){
|
||||
this.loadTree(false)
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openAdd() {
|
||||
const {id, unitlevel} = this.checkData
|
||||
this.formData = {
|
||||
parentId: id,
|
||||
unitlevel: unitlevel + 1
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.tabKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageOrder(column) {//按字段排序
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange(val) {//页码更新操作
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageSizeChange(val) {//分页大小更新操作
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageData() {//加载分页数据
|
||||
sublime.showLoadingbar();//显示loading
|
||||
this.tabLoading = true
|
||||
this.pageForm.parentId = this.checkData.id
|
||||
$.post(loc() + "/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();//关闭loading
|
||||
this.tabLoading = false
|
||||
if (data.code == 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async loadTree(flush) {
|
||||
this.treeLoading = true
|
||||
const {code, data, msg} = await $.get(loc() + "/getUnitTreeData")
|
||||
this.treeLoading = false
|
||||
if (code == 0) {
|
||||
this.treeData = data
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
if (flush && code == 0) {
|
||||
this.checkData = data[0]
|
||||
this.pageData();
|
||||
}
|
||||
},
|
||||
|
||||
doUserSearch() {
|
||||
this.tabKey = new Date().getTime()
|
||||
this.userPageForm.pageNumber = 1
|
||||
this.userPageData()
|
||||
},
|
||||
userPageOrder(column) {
|
||||
this.userPageForm.pageOrderName = column.prop;
|
||||
this.userPageForm.pageOrderBy = column.order;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageNumberChange(val) {
|
||||
this.userPageForm.pageNumber = val;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageSizeChange(val) {
|
||||
this.userPageForm.pageSize = val;
|
||||
this.userPageData();
|
||||
},
|
||||
async userPageData() {
|
||||
this.userPageForm.unitId = this.checkData.id
|
||||
sublime.showLoadingbar()
|
||||
const resp = await $.post(loc() + "/findPersonByUnitId", this.userPageForm)
|
||||
sublime.closeLoadingbar();
|
||||
if(resp.code===0){
|
||||
if (this.activeName1 === 'first') {
|
||||
this.userTableData = resp.data.userList.list
|
||||
this.userPageForm.totalCount = resp.data.userList.totalCount;
|
||||
} else {
|
||||
this.userTableData = resp.data.principal
|
||||
this.userPageForm.totalCount = 0;
|
||||
}
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.loadTree(true)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,43 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<user-data-scope
|
||||
ref="userDataScope"
|
||||
:group_id.sync="formData.activityGroupId"
|
||||
></user-data-scope>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'user-data-scope': httpVueLoader('/components/plugins/UserDataScope.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
async created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
class typeUtil {
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部会议类型
|
||||
* @returns {Promise<*[]|*>}
|
||||
*/
|
||||
async getAllType() {
|
||||
const resp = await $.get('/platform/activity/site/type/findAll')
|
||||
if (resp.code === 0) {
|
||||
resp.data.forEach(v => {
|
||||
v['text'] = v['meetingTypeName']
|
||||
v['value'] = v['id']
|
||||
})
|
||||
return resp.data
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
async findMaxStateId() {
|
||||
const resp = await $.get('/platform/activity/site/type/findMaxStateId')
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user