commit
This commit is contained in:
+1
@@ -92,6 +92,7 @@ public class MemberApplyBranchUnionApprovalController {
|
||||
info.userState,
|
||||
info.preparedBy,
|
||||
info.personType,
|
||||
info.applyDateTime,
|
||||
info.sign,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
|
||||
+1
@@ -91,6 +91,7 @@ public class MemberApplySchoolUnionApprovalController {
|
||||
info.preparedBy,
|
||||
info.personType,
|
||||
info.origin,
|
||||
info.applyDateTime,
|
||||
info.sign,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
|
||||
+9
-8
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.info;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.sys.models.Sys_dict;
|
||||
@@ -46,7 +47,7 @@ public class MemberInfoBoardController {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/member/board/index.html")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/member/info/board/index.html")
|
||||
@SaCheckPermission("h5.member.info.board")
|
||||
public void h5() {
|
||||
}
|
||||
@@ -55,7 +56,7 @@ public class MemberInfoBoardController {
|
||||
* @return 今年和去年的会员数
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("member.info.board")
|
||||
@SaCheckPermission(value = {"member.info.board", "h5.member.info.board"}, mode = SaMode.OR)
|
||||
public Result memberNumber() {
|
||||
int memberNum = memberInfoService.count(Sqls.create("select count(1) from sys_user where member = 1"));
|
||||
int lastYearMemberNum = memberInfoService.count(Sqls.create("select count(1) from member_history where year = year(now()) -1 "));
|
||||
@@ -66,7 +67,7 @@ public class MemberInfoBoardController {
|
||||
* @return 会员增长趋势
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("member.info.board")
|
||||
@SaCheckPermission(value = {"member.info.board", "h5.member.info.board"}, mode = SaMode.OR)
|
||||
public Result growthTrend() {
|
||||
List<Map> result = new ArrayList<>();
|
||||
int year = DateUtil.thisYear();
|
||||
@@ -83,7 +84,7 @@ public class MemberInfoBoardController {
|
||||
* @return 会员占比
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("member.info.board")
|
||||
@SaCheckPermission(value = {"member.info.board", "h5.member.info.board"}, mode = SaMode.OR)
|
||||
public Result memberPercentage() {
|
||||
List<Sys_dict> memberApplyPersonTypeDictList = sysDictService.getSubListByCode("PERSON_TYPE");
|
||||
List<String> personTypes = memberApplyPersonTypeDictList.stream().map(Sys_dict::getCode).collect(Collectors.toList());
|
||||
@@ -103,7 +104,7 @@ public class MemberInfoBoardController {
|
||||
* @return 男女占比
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("member.info.board")
|
||||
@SaCheckPermission(value = {"member.info.board", "h5.member.info.board"}, mode = SaMode.OR)
|
||||
public Result memberSexPercentage() {
|
||||
int men = memberInfoService.count(Sqls.create("select count(1) from sys_user where member = 1 and sex = '男' "));
|
||||
int women = memberInfoService.count(Sqls.create("select count(1) from sys_user where member = 1 and sex = '女' "));
|
||||
@@ -117,7 +118,7 @@ public class MemberInfoBoardController {
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("member.info.board")
|
||||
@SaCheckPermission(value = {"member.info.board", "h5.member.info.board"}, mode = SaMode.OR)
|
||||
public Result unionMember() {
|
||||
String str = """
|
||||
SELECT
|
||||
@@ -141,7 +142,7 @@ public class MemberInfoBoardController {
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("member.info.board")
|
||||
@SaCheckPermission(value = {"member.info.board", "h5.member.info.board"}, mode = SaMode.OR)
|
||||
public Result personTypeMember() {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -166,7 +167,7 @@ public class MemberInfoBoardController {
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("member.info.board")
|
||||
@SaCheckPermission(value = {"member.info.board", "h5.member.info.board"}, mode = SaMode.OR)
|
||||
public Object userStateMember() {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
|
||||
+12
-6
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.info;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.DesensitizedUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
@@ -39,10 +40,10 @@ import java.util.List;
|
||||
* @Date 2024/8/8 10:06
|
||||
* @注释 会员档案管理
|
||||
*/
|
||||
@At("/platform/member/info/group")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/member/info/group")
|
||||
public class MemberInfoGroupController {
|
||||
|
||||
@Inject
|
||||
@@ -54,11 +55,16 @@ public class MemberInfoGroupController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/member/info/group/index.html")
|
||||
@SaCheckPermission("h5.member.info.group")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("member.info.group")
|
||||
@SaCheckPermission(value = {"member.info.group", "h5.member.info.group"}, mode = SaMode.OR)
|
||||
@Ok("json:{dateFormat:'yyyy-MM-dd'}")
|
||||
public Result pageData(@Valid @Param("pageForm") MemberInfoPageForm pageForm) {
|
||||
public Result pageData(MemberInfoPageForm pageForm) {
|
||||
Sql sql = memberInfoService.getSql(pageForm);
|
||||
Pagination<NutMap> pagination = memberInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
for (NutMap row : pagination.getList()) {
|
||||
@@ -78,7 +84,7 @@ public class MemberInfoGroupController {
|
||||
@At
|
||||
@SaCheckPermission("member.info.group")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(type = "memberInfoGroup", tag = "备份会员数据", msg = "备份会员数据")
|
||||
@SLog(tag = "备份会员数据", msg = "备份会员数据")
|
||||
public Result archive(@Valid Integer year) {
|
||||
try {
|
||||
memberInfoService.archiveMember(year);
|
||||
|
||||
-91
@@ -1,91 +0,0 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.modelworker;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberModelWorkerPageForm;
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberModelWorkerService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:MemberModelWorkerController
|
||||
* @Date 2024/9/25 14:24
|
||||
* @注释
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@At("/platform/member/modelWorker/manage")
|
||||
public class MemberModelWorkerController {
|
||||
|
||||
@Inject
|
||||
private MemberModelWorkerService memberModelWorkerService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/modelworker/manage/index.html")
|
||||
@SaCheckPermission("member.modelWorker.manage")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("member.modelWorker.manage")
|
||||
public Result pageData(MemberModelWorkerPageForm pageForm) {
|
||||
Sql sql = memberModelWorkerService.getSql(pageForm);
|
||||
Pagination pagination = memberModelWorkerService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("member.modelWorker.manage")
|
||||
public Result setModelWorker(String userId) {
|
||||
if (StrUtil.isNotBlank(userId)) {
|
||||
memberModelWorkerService.update(Chain.make("isModelWorker", true), Cnd.where("id", "=", userId));
|
||||
return Result.success();
|
||||
} else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消劳模身份
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission(value = {"member.modelWorker.manage","member.branchUnion.manage.list","member.schoolUnion.manage.list"}, mode = SaMode.OR)
|
||||
public Result cancelModelWorker(@Param("userIds") String[] userIds) {
|
||||
List<String> list = Arrays.asList(userIds);
|
||||
if (Lang.isNotEmpty(list)) {
|
||||
memberModelWorkerService.update(Chain.make("isModelWorker", false), Cnd.where("id", "in", list));
|
||||
return Result.success();
|
||||
} else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("member.modelWorker.manage")
|
||||
public void doExport(MemberModelWorkerPageForm pageForm, HttpServletResponse response){
|
||||
memberModelWorkerService.doExport(pageForm, response);
|
||||
}
|
||||
}
|
||||
-6
@@ -43,12 +43,6 @@ public class MemberComprehensiveController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/member/query/index.html")
|
||||
@SaCheckPermission("h5.member.query")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("member.statistics.comprehensive")
|
||||
public Result pageData(MemberStatisticsPageForm pageForm) {
|
||||
|
||||
@@ -94,6 +94,7 @@ module.exports = {
|
||||
if (this.tableData.length >= this.localPageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
}
|
||||
this.$emit('update:page_form', {...this.localPageForm});
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
|
||||
+25
-22
@@ -37,32 +37,35 @@
|
||||
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families&&viewData.families.length"
|
||||
:data="viewData.families" size="mini" border
|
||||
:header-cell-style="{background:'#eff3f6'}"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="relation" label="与本人关系" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="单位" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="个人简况" :span="3">
|
||||
<template slot="label">个人简况</template>
|
||||
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
|
||||
<span v-else>无数据</span>
|
||||
</el-descriptions-item>
|
||||
<template v-if="viewData.loginname === $store.state.user.loginname">
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families && viewData.families.length"
|
||||
:data="viewData.families" size="mini" border
|
||||
:header-cell-style="{background:'#eff3f6'}"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="relation" label="与本人关系" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="单位" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="个人简况" :span="3">
|
||||
<template slot="label">个人简况</template>
|
||||
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
|
||||
<span v-else>无数据</span>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
|
||||
@@ -57,7 +57,6 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="变更记录(默认查询当天变更记录,如需查询更多变更记录,请选择上方【变更日期】后点击搜索)">
|
||||
<span v-if="tableData && tableData.length > 0" style="color: indianred">点击工号可显示人员信息;点击变更类型可显示当前记录的变更</span>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod"
|
||||
@@ -97,55 +96,51 @@ layout("/layouts/platform.html"){
|
||||
<template #view>
|
||||
<member-info ref="memberInfoRef"></member-info>
|
||||
</template>
|
||||
<template #edit>
|
||||
<member-change-info ref="memberChangeInfoRef"></member-change-info>
|
||||
</template>
|
||||
<template #public>
|
||||
<member-audit-change-info ref="memberAuditChangeInfoRef"></member-audit-change-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("../../member/common/audit/memberAuditChangeInfo.js"){}#-->
|
||||
<!--#include("../../member/common/change/memberChangeInfo.js"){}#-->
|
||||
<!--#include("../../member/common/info/memberInfo.js"){}#-->
|
||||
<!--#include("../../member/change/common/memberAllChangeInfo.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return{
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "最近一周",
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
picker.$emit("pick", [start, end])
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "最近一个月",
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
||||
picker.$emit("pick", [start, end])
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "最近三个月",
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
||||
picker.$emit("pick", [start, end])
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "最近一周",
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
picker.$emit("pick", [start, end])
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "最近一个月",
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
||||
picker.$emit("pick", [start, end])
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "最近三个月",
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
||||
picker.$emit("pick", [start, end])
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
pageForm: {
|
||||
searchKeyword: "",
|
||||
unionId: "",
|
||||
@@ -153,7 +148,7 @@ layout("/layouts/platform.html"){
|
||||
userState: "",
|
||||
preparedBy: "",
|
||||
personType: "",
|
||||
changeDateRange: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")]
|
||||
changeDateRange: []
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginname", label: "工号", sortable: true },
|
||||
@@ -175,11 +170,29 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-audit-change-info': MEMBER_AUDIT_CHANGE_INFO,
|
||||
'member-change-info': MEMBER_CHANGE_INFO,
|
||||
'member-info': MEMBER_INFO
|
||||
'member-info': MEMBER_INFO,
|
||||
'member-all-change-info': MEMBER_ALL_CHANGE_INFO,
|
||||
},
|
||||
methods: {
|
||||
setDefaultDateRange() {
|
||||
const end = new Date(); // 当前时间
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); // 当前时间往前推90天
|
||||
this.$set(this.pageForm, "changeDateRange", [start, end])
|
||||
this.pageForm.changeDateBefore = start
|
||||
this.pageForm.changeDateEnd = end
|
||||
this.doSearch()
|
||||
},
|
||||
changeDateRangeChange(val){
|
||||
if (val && val.length > 0) {
|
||||
this.pageForm.changeDateBefore = val[0]
|
||||
this.pageForm.changeDateEnd = val[1]
|
||||
} else {
|
||||
this.pageForm.changeDateBefore = null
|
||||
this.pageForm.changeDateEnd = null
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
// 查看当前人员信息
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
@@ -199,15 +212,16 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
getChangeTypes(changeTypes) {
|
||||
if (changeTypes) {
|
||||
const c = JSON.parse(changeTypes)
|
||||
return c
|
||||
.map((v) => {
|
||||
return this.changeTypeData.find((item) => item.code === v).name
|
||||
})
|
||||
.join(",")
|
||||
}
|
||||
return null
|
||||
const changeTypesList = JSON.parse(changeTypes)
|
||||
if (changeTypesList) {
|
||||
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
|
||||
return changeTypesList
|
||||
.map((v) => {
|
||||
return this.changeTypeData.find((item) => item.name === v).changeTypeName
|
||||
})
|
||||
.join(",")
|
||||
}
|
||||
return null
|
||||
},
|
||||
getChangeOrigin(changeOrigin) {
|
||||
if (changeOrigin) {
|
||||
@@ -215,16 +229,6 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
return null
|
||||
},
|
||||
changeDateRangeChange(val) {
|
||||
if (val && val.length > 0) {
|
||||
this.pageForm.changeDateBefore = val[0]
|
||||
this.pageForm.changeDateEnd = val[1]
|
||||
} else {
|
||||
this.pageForm.changeDateBefore = null
|
||||
this.pageForm.changeDateEnd = null
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
@@ -234,12 +238,6 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
}
|
||||
},
|
||||
async getEnumOptions() {
|
||||
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: "MemberChangeOrigin" })
|
||||
if (resp.code === 0) {
|
||||
this.changeOriginData = resp.data
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
this.unions = await this.$businessTool.listUnion(this.pageForm.unionId)
|
||||
@@ -248,13 +246,13 @@ layout("/layouts/platform.html"){
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
this.changeTypeData = await this.$businessTool.getAllDictOptions("MEMBER_CHANGE_TYPE")
|
||||
await this.getEnumOptions()
|
||||
this.doSearch()
|
||||
this.changeTypeData = await this.$businessTool.getEnumOptions("MemberChangeType")
|
||||
this.changeOriginData = await this.$businessTool.getEnumOptions("MemberChangeOrigin")
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
async created() {
|
||||
await this.initData()
|
||||
await this.setDefaultDateRange()
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
+3
-3
@@ -48,7 +48,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
@@ -150,7 +150,7 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.suggestionBoxInfoRef.onClose()
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
@@ -169,7 +169,7 @@ layout("/layouts/platform_h5.html"){
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
|
||||
+15
-16
@@ -4,14 +4,17 @@ layout("/layouts/platform_h5.html"){
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="入会分工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
|
||||
@@ -35,7 +38,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
@@ -80,14 +83,11 @@ layout("/layouts/platform_h5.html"){
|
||||
unitId: "",
|
||||
audit: false
|
||||
},
|
||||
tableData: [],
|
||||
unitList: [],
|
||||
auditList: [
|
||||
{ text: "已审核", value: true },
|
||||
{ text: "未审核", value: false }
|
||||
],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
// 审核相关
|
||||
formData: {},
|
||||
@@ -141,7 +141,7 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.suggestionBoxInfoRef.onClose()
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
@@ -160,14 +160,13 @@ layout("/layouts/platform_h5.html"){
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
initUnion() {
|
||||
|
||||
@@ -88,7 +88,7 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace('/platform/h5/member/apply/submit?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
this.$pjaxReplace('/platform/member/apply/submit/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
@@ -156,9 +156,7 @@ layout("/layouts/platform_h5.html"){
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin && !this.pageForm.unionId) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
}
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
|
||||
+9
-9
@@ -7,18 +7,21 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
:show-action="false"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/member/apply/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
|
||||
<table-list api="/platform/member/apply/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
@@ -35,7 +38,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
@@ -80,14 +83,11 @@ layout("/layouts/platform_h5.html"){
|
||||
unitId: "",
|
||||
audit: false
|
||||
},
|
||||
tableData: [],
|
||||
unitList: [],
|
||||
auditList: [
|
||||
{ text: "已审核", value: true },
|
||||
{ text: "未审核", value: false }
|
||||
],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
// 审核相关
|
||||
formData: {},
|
||||
@@ -141,7 +141,7 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.suggestionBoxInfoRef.onClose()
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
|
||||
+39
-57
@@ -2,7 +2,6 @@
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
@@ -14,22 +13,6 @@ layout("/layouts/platform_h5.html"){
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.direction-column-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 10px;
|
||||
}
|
||||
|
||||
.direction-column-field {
|
||||
max-width: 100%;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="入会申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
@@ -131,8 +114,8 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-field v-model="formData.unitName" label="工作单位" readonly></van-field>
|
||||
<van-field v-model="formData.unionName" label="所属工会" readonly></van-field>
|
||||
<van-field label="所属校区" v-model="formData.campus" readonly clickable
|
||||
@click="showCampusPicker = true" placeholder="请选择所属校区"
|
||||
:rules="[{ required:true, message: '请选择所属校区' }]"></van-field>
|
||||
@click="showCampusPicker = true" placeholder="请选择所属校区">
|
||||
</van-field>
|
||||
<van-popup v-model="showCampusPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -200,7 +183,6 @@ layout("/layouts/platform_h5.html"){
|
||||
@click="formData.families.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="formData.families && formData.families.length>0">
|
||||
<div v-for="o,i in formData.families" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
@@ -306,46 +288,46 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/member/apply/submit/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace('/platform/h5/member/apply/mine')
|
||||
} else {
|
||||
this.$toast.fail('操作失败')
|
||||
console.log(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/member/apply/submit/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace('/platform/member/apply/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail('操作失败')
|
||||
console.log(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onFinishTask() {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/member/apply/submit/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId,
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace('/platform/h5/member/apply/mine')
|
||||
} else {
|
||||
this.$toast.fail('操作失败')
|
||||
console.log(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/member/apply/submit/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId,
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace('/platform/member/apply/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail('操作失败')
|
||||
console.log(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDateConfirm(value) {
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="会员查询" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<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>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/member/info/group/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="姓名">{{row.username}}</table-column>
|
||||
<table-column label="工号">{{row.loginname}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="viewInfo(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<div :style="{color:'#1890ff'}" style="text-align: right; position: fixed; bottom: 20px; right: 20px">
|
||||
<van-button :color="'#1890ff'" hairline size="small" type="primary">总人数:{{pageForm.totalCount}}人
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="infoShow" title="会员详细信息">
|
||||
<member-info ref="memberInfoRef" :user-id="userId"></member-info>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("../../common/mobileMemberInfo.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: ""
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
|
||||
userId: "",
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"member-info": MOBILE_MEMBER_INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
viewInfo(row) {
|
||||
this.userId = row.id
|
||||
this.infoShow = true
|
||||
},
|
||||
unionChange() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
async initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.unionList = await this.$businessTool.listUnion(unionId)
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.unitList = await this.$businessTool.listUnit(unionId)
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin && !this.pageForm.unionId) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initUnion()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,135 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="会员查询" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<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>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/member/info/group/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="姓名">{{row.username}}</table-column>
|
||||
<table-column label="工号">{{row.loginname}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="viewInfo(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<div :style="{color:'#1890ff'}" style="text-align: right; position: fixed; bottom: 20px; right: 20px">
|
||||
<van-button :color="'#1890ff'" hairline size="small" type="primary">总人数:{{pageForm.totalCount}}人
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="infoShow" title="会员详细信息">
|
||||
<member-info ref="memberInfoRef" :user-id="userId"></member-info>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("../common/mobileMemberInfo.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: ""
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
|
||||
userId: "",
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"member-info": MOBILE_MEMBER_INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
viewInfo(row) {
|
||||
this.userId = row.id
|
||||
this.infoShow = true
|
||||
},
|
||||
unionChange() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
async initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.unionList = await this.$businessTool.listUnion(unionId)
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.unitList = await this.$businessTool.listUnit(unionId)
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin && !this.pageForm.unionId) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initUnion()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user