383 lines
15 KiB
HTML
383 lines
15 KiB
HTML
<!--#
|
|
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>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|