This commit is contained in:
Paidax
2024-11-22 16:56:54 +08:00
parent 9c21da4f0f
commit f5d37974cd
146 changed files with 8256 additions and 7800 deletions
+263 -172
View File
@@ -3,7 +3,6 @@ layout("/mobile/platform.html"){
#-->
<style>
.van-index-bar__sidebar {
display: none;
}
@@ -69,7 +68,8 @@ layout("/mobile/platform.html"){
width: 30%;
}
.van-cell__title, .van-cell__value{
.van-cell__title,
.van-cell__value {
flex: none;
}
@@ -97,52 +97,35 @@ layout("/mobile/platform.html"){
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>
<van-nav-bar title="加入社团" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" 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>
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-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?'没有更多了':''">
<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">
@@ -151,7 +134,7 @@ layout("/mobile/platform.html"){
</div>
<div style="color: grey">{{o.location}}</div>
</div>
<div style="color: #1867b0; white-space: nowrap;">
<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>
@@ -162,14 +145,20 @@ layout("/mobile/platform.html"){
<div style="margin-top: 4px">
<van-row>
<van-col span="12"><span style="color: grey">联&ensp;系&ensp;人:</span>{{o.fzrname}}</van-col>
<van-col span="12">
<span style="color: grey">联&ensp;系&ensp;人:</span>
{{o.fzrname}}
</van-col>
<van-col span="12">
<span style="color: grey">电&emsp;&emsp;话:</span>
<span>{{o.fzr_mobile}}</span>
</van-col>
</van-row>
<van-row>
<van-col span="12"><span style="color: grey">会&emsp;&emsp;长:</span>{{o.hz}}</van-col>
<van-col span="12">
<span style="color: grey">会&emsp;&emsp;长:</span>
{{o.hz}}
</van-col>
<van-col span="12">
<span style="color: grey">成立时间:</span>
<span>{{moment(o.foundTime).format('YYYY-MM-DD')}}</span>
@@ -181,17 +170,27 @@ layout("/mobile/platform.html"){
<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 @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
@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
@click="openInfo(o, 'join')"
color="#1867b0"
v-if="pageForm.isjr === false"
size="small"
style="margin-right: 8px"
type="primary"
>
我要加入
</van-button>
</div>
@@ -199,22 +198,11 @@ layout("/mobile/platform.html"){
</div>
</div>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
<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-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>
@@ -237,50 +225,130 @@ layout("/mobile/platform.html"){
<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-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"
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="是否有过特殊病史">
<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>
@@ -288,8 +356,7 @@ layout("/mobile/platform.html"){
</van-radio-group>
</template>
</van-field>
<van-field name="joinActivity" required
placeholder="是否愿意参加本协会的活动" label="是否愿意参加本协会的活动">
<van-field name="joinActivity" required placeholder="是否愿意参加本协会的活动" label="是否愿意参加本协会的活动">
<template #input>
<van-radio-group v-model="formData.joinActivity" direction="horizontal">
<van-radio :name="true">是</van-radio>
@@ -297,25 +364,30 @@ layout("/mobile/platform.html"){
</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">
<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>
<vant-file-upload :max="1" :files.sync="formData.photo"></vant-file-upload>
</template>
</van-field>
</van-cell-group>
@@ -326,12 +398,11 @@ layout("/mobile/platform.html"){
</van-tab>
</van-tabs>
</van-popup>
</div>
<script>
const vue = new Vue({
el: '#app',
el: "#app",
mixins: [mobileMixins],
data() {
return {
@@ -339,20 +410,23 @@ layout("/mobile/platform.html"){
infoActive: 0,
clickRow: {},
typeOptions: [],
clubType: [{text: '未加入', value: false}, {text: '已加入', value: true}],
clubType: [
{ text: "未加入", value: false },
{ text: "已加入", value: true }
],
infoShow: false,
detailData: {},
viewType: '',
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})
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() {
@@ -363,7 +437,7 @@ layout("/mobile/platform.html"){
},
async onLoad() {
this.loading = true
$.post('/platform/sys/club/sq/pageData', this.pageForm).then(res => {
$.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) {
@@ -377,8 +451,8 @@ layout("/mobile/platform.html"){
},
openInfo(row, type) {
this.viewType = type
this.infoActive = type === 'view' ? 0 : 1
if(type === 'join') {
this.infoActive = type === "view" ? 0 : 1
if (type === "join") {
this.formData = {
username: "${@shiro.getPrincipalProperty('username')}",
sex: "${@shiro.getPrincipalProperty('sex')}",
@@ -390,80 +464,97 @@ layout("/mobile/platform.html"){
position: "${@shiro.getPrincipalProperty('position')}",
mobile: "${@shiro.getPrincipalProperty('mobile')}",
email: "${@shiro.getPrincipalProperty('email')}",
homeAddress: "${@shiro.getPrincipalProperty('homeAddress')}",
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");
$.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('请选择是否有过特殊病史')
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('请选择是否愿意参加本协会的活动')
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('请上传两寸登记照')
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 = ''
const { code, data } = await $.post("/platform/sys/club/sq/getInClubByCurUser")
let str = ""
if (data && data.length > 0) {
str = '您已经加入了'
str = "您已经加入了"
data.forEach((item) => {
str += '【' + item.name + '】'
str += "【" + item.name + "】"
})
str += ','
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(() => {
});
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(() => {
});
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})
data.forEach((item) => {
this.typeOptions.push({ text: item.name, value: item.code })
})
this.typeOptions.unshift({text: '全部类型'})
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.pageForm.searchName = "club.name"
this.onLoad()
}
})