This commit is contained in:
@jyuhsin
2025-09-09 11:19:04 +08:00
parent eb493d2881
commit bee7b352a6
23 changed files with 169 additions and 169 deletions
@@ -167,12 +167,12 @@ public class ClubUserJoinApplyController {
}
if (ObjectUtil.isNotEmpty(clubUser)) {
return Result.error("请勿重复申请!");
return Result.error(99, "请勿重复申请!");
}
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", userApply.getId()));
if (!processInstance.getState().equals(ProcessInstanceStateEnum.FINISHED.getCode())) {
return Result.error("您有该协会的申请记录尚未完成,请到我的申请里查看!");
return Result.error(99, "您有该协会的申请记录尚未完成,请到我的申请里查看!");
}
return Result.success();
}
@@ -112,6 +112,7 @@ public class ClubUserJoinMineController {
Sql sql = Sqls.create("""
SELECT
cua.*,
club.clubName,
u.loginname AS loginName,
u.username AS userName,
u.sex,
@@ -125,6 +126,7 @@ public class ClubUserJoinMineController {
FROM
club_user_apply cua
LEFT JOIN vw_user u ON u.id = cua.userId
LEFT JOIN sys_club club ON club.id = cua.clubId
WHERE cua.id = @id
""");
sql.setParam("id",id);
@@ -253,7 +253,6 @@ public class ClubStatisticsController {
exportEntities.add(new ExcelExportEntity("退休人数", "retire", 20));
exportEntities.add(new ExcelExportEntity("", "man", 20));
exportEntities.add(new ExcelExportEntity("", "woman", 20));
exportEntities.add(new ExcelExportEntity("理事机构人数", "governing_body", 20));
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
@@ -335,11 +334,11 @@ public class ClubStatisticsController {
club.clubCode,
club.clubName,
sum( CASE WHEN cu.userId is not null $myCondition THEN 1 ELSE 0 END ) AS total,
sum( CASE WHEN su.userState in ('在职', '在岗') $myCondition THEN 1 ELSE 0 END ) AS `work`,
sum( CASE WHEN su.userState in ('在职', '在岗') $myCondition THEN 1 ELSE 0 END ) AS `work`,
sum( CASE WHEN su.userState in ('退休') $myCondition THEN 1 ELSE 0 END ) AS retire,
sum( CASE WHEN su.sex like '%男%' $myCondition THEN 1 ELSE 0 END ) AS man,
sum( CASE WHEN su.sex like '%女%' $myCondition THEN 1 ELSE 0 END ) AS woman,
sum( CASE WHEN cu.roleCode != 'CLUB_MEMBER' AND 1 = 1 $myCondition THEN 1 ELSE 0 END ) AS governing_body
sum( CASE WHEN ('CLUB_PRESIDENT' MEMBER OF (cu.roleCode) or 'CLUB_VICE_PRESIDENT' MEMBER OF (cu.roleCode) or 'CLUB_SECRETARY' MEMBER OF (cu.roleCode) or 'CLUB_VICE_SECRETARY' MEMBER OF (cu.roleCode)) AND 1 = 1 $myCondition THEN 1 ELSE 0 END ) AS governing_body
FROM
sys_club club
LEFT JOIN club_user cu ON cu.clubId = club.id
@@ -22,4 +22,5 @@ public class ClubUserJoinVo extends ClubUserApply {
private String education;
private String academicDegree;
private String position;
private String clubName;
}
@@ -35,7 +35,7 @@ if (typeof Vue !== 'undefined') {
const fieldName = firstError.name;
// 滚动到字段
this.scrollToField(fieldName);
// this.scrollToField(fieldName);
// 获取 label
const field = this.fields?.find(f => f.name === fieldName);
@@ -92,7 +92,6 @@ const clubUserJoin = {
data() {
return {
viewData: {},
activeName: "first",
row: {},
doneTasks: [],
}
@@ -47,7 +47,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -44,7 +44,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="申请时间" prop="registerDate" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -45,7 +45,7 @@ layout("/layouts/platform.html"){
<el-table-column label="变更用户" prop="changeUserName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="旧身份" prop="oldRoleName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="新身份" prop="nowRoleName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -90,7 +90,7 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button @click="$refs.guava.index()">取 消</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提 交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提 交</el-button>
</div>
@@ -82,7 +82,7 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button @click="$refs.guava.index()">取 消</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提 交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提 交</el-button>
</div>
@@ -42,7 +42,7 @@ layout("/layouts/platform.html"){
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -42,7 +42,7 @@ layout("/layouts/platform.html"){
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -136,20 +136,20 @@ layout("/layouts/platform.html"){
taskId: GetQueryString("taskId"),
formData: {},
formRules: {
clubId: [{ required: true, message: "请选择", trigger: ["blur", "change"] }],
userName: [{ required: true, message: "请填写", trigger: ["blur", "change"] }],
loginName: [{ required: true, message: "请填写", trigger: ["blur", "change"] }],
sex: [{ required: true, message: "请填写", trigger: ["blur", "change"] }],
clubId: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
userName: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
loginName: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
sex: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
// birthday: [{ required: true, message: "请填写", trigger: ["blur", "change"] }],
// mobile: [{ required: true, message: "请填写", trigger: ["blur", "change"] }],
// email: [{ required: true, message: "请填写", trigger: ["blur", "change"] }],
position: [{ required: false, message: "请填写", trigger: ["blur", "change"] }],
technicalTitle: [{ required: false, message: "请填写", trigger: ["blur", "change"] }],
education: [{ required: false, message: "请填写", trigger: ["blur", "change"] }],
academicDegree: [{ required: false, message: "请填写", trigger: ["blur", "change"] }],
sameTimeJoinOtherClubSituation: [{ required: false, message: "请填写", trigger: ["blur", "change"] }],
awardsExperience: [{ required: false, message: "请填写", trigger: ["blur", "change"] }],
photo: [{ required: false, message: "请上传", trigger: ["blur", "change"] }]
position: [{ required: false, message: "必填", trigger: ["blur", "change"] }],
technicalTitle: [{ required: false, message: "必填", trigger: ["blur", "change"] }],
education: [{ required: false, message: "必填", trigger: ["blur", "change"] }],
academicDegree: [{ required: false, message: "必填", trigger: ["blur", "change"] }],
sameTimeJoinOtherClubSituation: [{ required: false, message: "必填", trigger: ["blur", "change"] }],
awardsExperience: [{ required: false, message: "必填", trigger: ["blur", "change"] }],
photo: [{ required: false, message: "必填", trigger: ["blur", "change"] }]
},
isAgree: false,
clubOptions: []
@@ -211,11 +211,9 @@ layout("/layouts/platform.html"){
},
checkApplyClub(val) {
this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId: val }).then((res) => {
if (res.code === 0) {
if (res.data) {
this.$message.warning("您已申请加入该协会,请勿重复申请")
this.formData.clubId = ""
}
if (res.code !== 0) {
this.$message.warning("您已申请加入该协会,请勿重复申请")
this.formData.clubId = ""
}
})
},
@@ -228,9 +226,6 @@ layout("/layouts/platform.html"){
},
init() {
this.bizId = GetQueryString("bizId")
if (GetQueryString("clubId")) {
this.$set(this.formData, "clubId", GetQueryString("clubId"))
}
if (this.bizId) {
this.$axios.post("/platform/club/join/apply/info", { id: this.bizId }).then((res) => {
if (res.code === 0) {
@@ -248,7 +243,7 @@ layout("/layouts/platform.html"){
this.$set(this.formData, "unionId", user.union ? user.union.id : null)
this.$set(this.formData, "unionName", user.union ? user.union.name : null)
this.$set(this.formData, "sex", user.sex)
this.$set(this.formData, "birthday", "${@auth.getPrincipalProperty('birthday'),'yyyy-MM-dd'}")
this.$set(this.formData, "birthday", user.birthday ? this.$moment(user.birthday).format('yyyy-MM-dd') : '')
this.$set(this.formData, "nation", user.nation)
this.$set(this.formData, "political", user.political)
this.$set(this.formData, "education", user.education)
@@ -57,7 +57,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column prop="applyDate" label="申请时间" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -92,7 +92,7 @@ layout("/layouts/platform.html"){
})
},
onEdit(row) {
location.href = '/platform/club/join/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id + '&clubId=' + row.clubId
location.href = '/platform/club/join/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
},
onDelete(id) {
this.$confirm("确定要删除此申请吗?", "提示", {
@@ -57,7 +57,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column prop="applyDate" label="申请时间" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -50,7 +50,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -116,7 +116,7 @@ layout("/layouts/platform.html"){
{prop: 'applyUnionName', label: '所属工会'},
{prop: 'applyUnitName', label: '所属单位'},
{prop: 'typeName', label: '慰问类型'},
{prop: 'taskName', label: '当前节点'},
{prop: 'curTaskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
formData: {},
@@ -137,7 +137,7 @@ layout("/layouts/platform.html"){
{prop: 'applyUnionName', label: '所属工会'},
{prop: 'applyUnitName', label: '所属单位'},
{prop: 'typeName', label: '慰问类型'},
{prop: 'taskName', label: '当前节点'},
{prop: 'curTaskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
unionList: [],
@@ -26,10 +26,10 @@ layout("/layouts/platform_h5.html"){
<div id="app">
<!-- 导航栏 -->
<van-nav-bar title="文体协会会员申请" left-text="返回" left-arrow @click-left="historyBack"></van-nav-bar>
<van-nav-bar title="文体协会会员申请" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
<!-- 表单容器 -->
<van-form ref="formRef" class="form-container" :show-error-message="false">
<van-form ref="formRef" class="form-container">
<!-- 协会信息 -->
<van-cell-group title="协会信息" class="form-section">
<van-field
@@ -62,14 +62,14 @@ layout("/layouts/platform_h5.html"){
required name="loginName"></van-field>
<van-field label="性别" :rules="[{ required: true }]" v-model="formData.sex" readonly required></van-field>
<van-field label="出生年月" v-model="formData.birthday" readonly placeholder="读取信息中心数据"></van-field>
<van-field label="联系电话" :rules="[{ required: true }]" name="mobile" name="mobile" v-model="formData.mobile" placeholder="请输入联系电话"></van-field>
<van-field label="联系电话" v-model="formData.mobile" placeholder="请输入联系电话"></van-field>
<van-field label="电子信箱" v-model="formData.email" placeholder="请输入电子信箱"></van-field>
</van-cell-group>
<!-- 工作信息 -->
<van-cell-group title="工作信息" class="form-section">
<van-field label="分工会" v-model="formData.unionName" readonly></van-field>
<van-field label="单位" v-model="formData.unitName" readonly></van-field>
<van-field label="部门" v-model="formData.unitName" readonly></van-field>
<van-field label="职务" v-model="formData.governmentPosition" readonly
placeholder="读取信息中心数据"></van-field>
<van-field label="职称" v-model="formData.technicalTitle" readonly
@@ -136,7 +136,7 @@ layout("/layouts/platform_h5.html"){
<!-- 提交按钮 -->
<div class="form-actions">
<van-button @click="onSave" round type="info">保存申请</van-button>
<van-button native-type="button" @click="onSave" round type="info" plain>保存申请</van-button>
<van-button @click="onSubmit" round type="info" v-if="!taskId">提交申请</van-button>
<van-button @click="onFinishTask" round type="info" v-else>提交申请</van-button>
</div>
@@ -192,27 +192,28 @@ layout("/layouts/platform_h5.html"){
})
},
async onSubmit() {
await this.$refs.formRef.validate()
if (!this.isAgree) {
this.$message.warning("请先阅读并同意协议")
return
}
this.$dialog.confirm({
title: "提示",
message: "您确定要提交申请吗?"
}).then(() => {
this.$axios.post("/platform/club/join/apply/submit", this.formData).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.$pjaxReplace("/platform/h5/club/mine")
}
this.$refs.formRef.validate().then(() => {
if (!this.isAgree) {
this.$toast('请先阅读并同意协议')
return
}
this.$dialog.confirm({
title: "提示",
message: "您确定要提交申请吗?"
}).then(() => {
this.$axios.post("/platform/club/join/apply/submit", this.formData).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.$pjaxReplace("/platform/h5/club/mine")
}
})
})
})
},
async onFinishTask() {
this.$refs.formRef.validate().then(() => {
if (!this.isAgree) {
this.$message.warning("请先阅读并同意协议")
this.$toast('请先阅读并同意协议')
return
}
this.$dialog.confirm({
@@ -229,12 +230,12 @@ layout("/layouts/platform_h5.html"){
}
})
})
}).catch()
})
},
checkApplyClub(clubId) {
this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId }).then(res => {
if (res.code === 0 && res.data) {
this.$toast.warning("您已申请加入该协会,请勿重复申请")
if (res.code !== 0) {
this.$toast(res.msg)
this.formData.clubId = ""
this.formData.clubName = ""
}
@@ -257,9 +258,6 @@ layout("/layouts/platform_h5.html"){
},
init() {
this.bizId = GetQueryString("bizId")
if (GetQueryString("clubId")) {
this.$set(this.formData, "clubId", GetQueryString("clubId"))
}
if (this.bizId) {
this.$axios.post("/platform/club/join/apply/info", { id: this.bizId }).then((res) => {
if (res.code === 0) {
@@ -277,7 +275,7 @@ layout("/layouts/platform_h5.html"){
this.$set(this.formData, "unionId", user.union ? user.union.id : null)
this.$set(this.formData, "unionName", user.union ? user.union.name : null)
this.$set(this.formData, "sex", user.sex)
this.$set(this.formData, "birthday", "${@auth.getPrincipalProperty('birthday'),'yyyy-MM-dd'}")
this.$set(this.formData, "birthday", user.birthday ? this.$moment(user.birthday).format('YYYY-MM-DD') : '')
this.$set(this.formData, "nation", user.nation)
this.$set(this.formData, "political", user.political)
this.$set(this.formData, "education", user.education)
@@ -3,43 +3,86 @@ const clubUserJoin = {
/*language=HTML*/
`
<div class="form-container">
<van-cell-group title="申请信息" class="form-section">
<van-cell title="姓名">{{ viewData.userName }}</van-cell>
<van-cell title="工号">{{ viewData.loginName }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="出生年月">{{ viewData.birthday }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子信箱">{{ viewData.email }}</van-cell>
<van-cell title="分工会">{{ viewData.unionName }}</van-cell>
<van-cell title="部门">{{ viewData.unitName }}</van-cell>
<van-cell title="职务">{{ viewData.governmentPosition }}</van-cell>
<van-cell title="职称">{{ viewData.technicalTitle }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
<van-cell class="direction-column-field" title="同时参加其他协会情况">{{ viewData.sameTimeJoinOtherClubSituation }}</van-cell>
<van-cell class="direction-column-field" title="文化、体育方面的活动经历、获奖情况">{{ viewData.awardsExperience }}</van-cell>
<van-cell class="direction-column-field" title="照片" v-if="viewData.avatar">
<template slot="default">
<van-image :src="viewData.avatar"></van-image>
</template>
</van-cell>
</van-cell-group>
<template v-if="activeView === 'info'">
<van-cell-group title="协会信息" class="form-section">
<van-cell title="协会名称">{{ viewData.clubName }}</van-cell>
</van-cell-group>
<van-cell-group title="基本信息" class="form-section">
<van-cell title="姓名">{{ viewData.userName }}</van-cell>
<van-cell title="工号">{{ viewData.loginName }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="出生年月">{{ viewData.birthday }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子信箱">{{ viewData.email }}</van-cell>
</van-cell-group>
<van-cell-group title="工作信息" class="form-section">
<van-cell title="分工会">{{ viewData.unionName }}</van-cell>
<van-cell title="部门">{{ viewData.unitName }}</van-cell>
<van-cell title="职务">{{ viewData.governmentPosition }}</van-cell>
<van-cell title="职称">{{ viewData.technicalTitle }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
</van-cell-group>
<van-cell-group title="其他信息" class="form-section">
<van-cell class="direction-column-field" title="同时参加其他协会情况">
{{ viewData.sameTimeJoinOtherClubSituation || '暂无' }}
</van-cell>
<van-cell class="direction-column-field" title="文化、体育方面的活动经历、获奖情况">
{{ viewData.awardsExperience || '暂无' }}
</van-cell>
</van-cell-group>
<van-cell-group title="照片" class="form-section">
<van-cell class="direction-column-field" v-if="viewData.avatar">
<template slot="default">
<van-image :src="viewData.avatar"></van-image>
</template>
</van-cell>
</van-cell-group>
</template>
<template v-if="activeView === 'history'" v-for="task in doneTasks">
<div class="mt10">
</div>
</template>
<template v-if="activeView === 'approval'">
</template>
<div class="form-actions">
<van-button @click="activeView = 'info'" round type="info">申请信息</van-button>
<van-button @click="activeView = 'history'" round type="info">审核历史</van-button>
<van-button @click="activeView = 'approval'" round type="info">去审核</van-button>
</div>
</div>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
viewData: {},
activeName: "first",
isScrollNow: "0"
activeView: 'info',
row: {},
doneTasks: [],
}
},
methods: {
onOpen(row) {
this.row = row
this.$axios.post("/platform/club/join/mine/info", { id: row.id }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
this.getDoneTasks()
},
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
}
},
style: /*language=CSS*/ `
@@ -13,52 +13,46 @@ layout("/layouts/platform_h5.html"){
<van-sticky offset-top="46px">
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了"
@load="pageData">
<div class="list-card" v-for="row in tableData" :key="row.id">
<div class="list-card-body">
<div class="list-card-body-content">
<van-cell title="姓名" :value="row.userName"></van-cell>
<van-cell title="工号" :value="row.loginName"></van-cell>
<van-cell title="协会名称" :value="row.clubName"></van-cell>
<van-cell title="申请模式" :value="row.mode ? '加入' : '退出'"></van-cell>
<van-cell title="申请时间" :value="row.applyDate"></van-cell>
<van-cell title="当前节点" :value="row.taskName"></van-cell>
<van-cell title="流程状态">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum"
label_key="message" size="small"></enum-tag>
</van-cell>
</div>
</div>
<div class="list-card-footer">
<van-button type="info" size="small" @click="openView(row)">查看</van-button>
<van-button type="info" v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)"
size="small">编辑
</van-button>
<van-button type="danger" v-if="row.canRevoke" @click="onRevoke(row)" size="small">撤销
</van-button>
<van-button type="danger" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onDelete(row.id)" size="small">
删除
</van-button>
</div>
<table-list api="/platform/club/join/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="clubName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="姓名">{{row.userName}}</table-column>
<table-column label="工号">{{row.loginName}}</table-column>
<table-column label="申请模式">{{row.mode ? '加入' : '退出'}}</table-column>
<table-column label="申请时间">{{row.applyDate}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" @click="onEdit(row)"
v-if="row.taskKey === 'startTask' || !row.instanceId">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" @click="onRevoke(row)"
v-if="row.canRevoke">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
<div class="action-btn delete" @click="onDelete(row)"
v-if="row.taskKey === 'startTask' || !row.instanceId">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
</van-list>
<van-empty v-else image="/assets/platform/plugins/vant-green/images/nodata/nodata.png"
description="暂无数据"></van-empty>
</div>
<van-popup :style="{ height: '100%',width: '100%'}" position="right" safe-area-inset-bottom v-model="viewShow">
<van-popup :style="{ height: '100%',width: '100%', 'background-color': '#F1F1F1'}" position="right" safe-area-inset-bottom v-model="viewShow">
<van-sticky>
<van-nav-bar @click-left="viewShow = false" left-arrow left-text="返回" title="详细信息"></van-nav-bar>
</van-sticky>
<div style="height: calc(100vh - 44px); overflow-y: auto">
<div style="height: calc(100vh - 46px); overflow-y: auto">
<info ref="infoRef"></info>
</div>
</van-popup>
@@ -75,16 +69,12 @@ layout("/layouts/platform_h5.html"){
data() {
return {
viewShow: false,
yearList: [],
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
year: ""
year: new Date().getFullYear()
},
tableLoading: false,
tableFinished: false,
tableData: []
}
},
methods: {
@@ -101,22 +91,22 @@ layout("/layouts/platform_h5.html"){
})
})
},
openView(row) {
onView(row) {
this.viewShow = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen(row)
})
},
onEdit(row) {
this.$pjaxReplace("/platform/h5/club/apply?taskId=" + (row.startTaskId || "") + "&bizId=" + row.id + "&clubId=" + row.clubId)
this.$pjaxReplace("/platform/h5/club/apply?taskId=" + (row.startTaskId || "") + "&bizId=" + row.id)
},
onDelete(row) {
onDelete(id) {
this.$dialog.confirm({
title: "提示",
message: "确定要删除此申请吗?"
})
.then(() => {
this.$axios.post("/platform/club/join/mine/delete", { id: row.id }).then((res) => {
this.$axios.post("/platform/club/join/mine/delete", { id: id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
@@ -125,43 +115,16 @@ layout("/layouts/platform_h5.html"){
}
})
})
.catch(() => {
})
.catch(() => {})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/club/join/mine/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
initData() {
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearList.unshift({ value: i, text: i + "年" })
}
this.$set(this.pageForm, "year", this.yearList[0].value)
}
},
created() {
this.initData()
this.pageData()
}
})
</script>