commit
This commit is contained in:
@@ -37,7 +37,7 @@ public class WxHttpUtil {
|
|||||||
private final NutMap jsonHeader = NutMap.NEW().setv("Content-Type", "application/json");
|
private final NutMap jsonHeader = NutMap.NEW().setv("Content-Type", "application/json");
|
||||||
|
|
||||||
|
|
||||||
public String env = "hj-2ggpsf3t8a32c4eb";
|
public String env = "cloudbase-1glnwh6qfc60671f";
|
||||||
|
|
||||||
|
|
||||||
public String queryUrl = "https://api.weixin.qq.com/tcb/databasequery?access_token=ACCESS_TOKEN";
|
public String queryUrl = "https://api.weixin.qq.com/tcb/databasequery?access_token=ACCESS_TOKEN";
|
||||||
|
|||||||
@@ -165,7 +165,8 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
|||||||
List<String> addWelfareMemberUserIds = new CopyOnWriteArrayList<>();
|
List<String> addWelfareMemberUserIds = new CopyOnWriteArrayList<>();
|
||||||
// 移除福利会员角色的用户id
|
// 移除福利会员角色的用户id
|
||||||
List<String> deleteWelfareMemberUserIds = new CopyOnWriteArrayList<>();
|
List<String> deleteWelfareMemberUserIds = new CopyOnWriteArrayList<>();
|
||||||
|
// 数据库没单位的,但是数据源有单位
|
||||||
|
List<Sys_user> renewUnitUser = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
// 创建一个固定大小的线程池 可以根据服务器性能调整线程池大小
|
// 创建一个固定大小的线程池 可以根据服务器性能调整线程池大小
|
||||||
int numberOfThreads = Runtime.getRuntime().availableProcessors() * 2;
|
int numberOfThreads = Runtime.getRuntime().availableProcessors() * 2;
|
||||||
@@ -195,6 +196,11 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user != null && StrUtil.isBlank(user.getUnitid()) && StrUtil.isNotBlank(source.getUnitid())) {
|
||||||
|
user.setUnitid(source.getUnitid());
|
||||||
|
renewUnitUser.add(user);
|
||||||
|
}
|
||||||
|
|
||||||
Sys_user u = new Sys_user();
|
Sys_user u = new Sys_user();
|
||||||
BeanUtils.copyProperties(source, u);
|
BeanUtils.copyProperties(source, u);
|
||||||
switch (sourceType) {
|
switch (sourceType) {
|
||||||
@@ -277,6 +283,12 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
|||||||
// 在职状态关乎变更类型,建议自己手动更新,不要使用自动更新功能,硬要使用,请点进 renewUserState 打开注释
|
// 在职状态关乎变更类型,建议自己手动更新,不要使用自动更新功能,硬要使用,请点进 renewUserState 打开注释
|
||||||
userPatUpService.renewUserState();
|
userPatUpService.renewUserState();
|
||||||
|
|
||||||
|
doClearRepeat(pullTime);
|
||||||
|
|
||||||
|
if (Lang.isNotEmpty(renewUnitUser)) {
|
||||||
|
dao().update(renewUnitUser, "unitid");
|
||||||
|
}
|
||||||
|
|
||||||
// 修改不在人事库的人员,删除角色
|
// 修改不在人事库的人员,删除角色
|
||||||
// userPatUpService.deleteNotInSourceUser(true);
|
// userPatUpService.deleteNotInSourceUser(true);
|
||||||
//清除缓存
|
//清除缓存
|
||||||
@@ -656,6 +668,57 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void doClearRepeat(String pullTime) {
|
||||||
|
|
||||||
|
//查出变更类型是新增的工号
|
||||||
|
List<UserHistory> histories = dao().query(UserHistory.class, Cnd.where("changeTime", "=", pullTime));
|
||||||
|
List<String> loginnameList = histories.stream().map(Sys_user::getLoginname).collect(Collectors.toList());
|
||||||
|
|
||||||
|
//查出这些工号在sys_user表中是否与user_source表中的姓名不一致
|
||||||
|
List<Sys_user> userList = dao().query(Sys_user.class, Cnd.where("loginname", "in", loginnameList));
|
||||||
|
|
||||||
|
List<UserSource> sourceList = dao().query(UserSource.class, Cnd.where("pulltime", "=", pullTime)
|
||||||
|
.and("loginname", "in", loginnameList));
|
||||||
|
|
||||||
|
//工号为键
|
||||||
|
Map<String, UserSource> sourceMap = sourceList.stream().collect(Collectors.toMap(Sys_user::getLoginname, v -> v));
|
||||||
|
|
||||||
|
List<Sys_user> needInsertUserList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<String> needDeleteUserIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<Sys_user_role> needInsertUserRoleList = new ArrayList<>();
|
||||||
|
|
||||||
|
userList.forEach(v -> {
|
||||||
|
UserSource source = sourceMap.get(v.getLoginname());
|
||||||
|
if (Lang.isEmpty(source)) return;
|
||||||
|
|
||||||
|
//如果工号相同,姓名不同,就删除sys_user的数据,并且删除角色
|
||||||
|
if (!v.getUsername().equals(source.getUsername())) {
|
||||||
|
needDeleteUserIdList.add(v.getId());
|
||||||
|
|
||||||
|
Sys_user user = new Sys_user();
|
||||||
|
BeanUtils.copyProperties(source, user);
|
||||||
|
|
||||||
|
needInsertUserList.add(user);
|
||||||
|
|
||||||
|
Sys_user_role userRole = new Sys_user_role();
|
||||||
|
userRole.setUserId(user.getId());
|
||||||
|
userRole.setRoleId(Roles.PUBLIC);
|
||||||
|
needInsertUserRoleList.add(userRole);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (Lang.isNotEmpty(needDeleteUserIdList)) {
|
||||||
|
dao().clear(Sys_user.class, Cnd.where("id", "in", needDeleteUserIdList));
|
||||||
|
dao().clear(Sys_user_role.class, Cnd.where("userId", "in", needDeleteUserIdList));
|
||||||
|
dao().fastInsert(needInsertUserList);
|
||||||
|
dao().insert(needInsertUserRoleList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据大批量更新
|
* 数据大批量更新
|
||||||
* @param needDoUpdateList 需要更新的数据
|
* @param needDoUpdateList 需要更新的数据
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ public class HdMangeCon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// String pic = Strings.isNotBlank(picid) ? picid : map.getString("pic");
|
// String pic = Strings.isNotBlank(picid) ? picid : map.getString("pic");
|
||||||
String pic = "cloud://hj-2ggpsf3t8a32c4eb.686a-hj-2ggpsf3t8a32c4eb-1317134219/activity/健身走1.jpg";
|
String pic = "cloud://cloudbase-1glnwh6qfc60671f.636c-cloudbase-1glnwh6qfc60671f-1317134219/activity/健身走.jpg";
|
||||||
|
|
||||||
String query = """
|
String query = """
|
||||||
db.collection('activity')
|
db.collection('activity')
|
||||||
|
|||||||
+15
@@ -4,6 +4,7 @@ import cn.wizzer.framework.base.Result;
|
|||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.MsgApi;
|
import io.v.nutz.base.utils.MsgApi;
|
||||||
import io.v.nutz.base.utils.Roles;
|
import io.v.nutz.base.utils.Roles;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
import io.v.nutz.sys.models.Sys_user_role;
|
import io.v.nutz.sys.models.Sys_user_role;
|
||||||
import io.v.nutz.sys.models.User;
|
import io.v.nutz.sys.models.User;
|
||||||
import io.v.nutz.web.commons.base.Globals;
|
import io.v.nutz.web.commons.base.Globals;
|
||||||
@@ -21,6 +22,7 @@ import org.nutz.dao.Dao;
|
|||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
@@ -137,4 +139,17 @@ public class MemberApplyController {
|
|||||||
public Object validateApply(){
|
public Object validateApply(){
|
||||||
return dao.count(MemberApplyRecord.class, Cnd.where("userId", "=", ShiroUtil.getUserId()).and("applyStateId", "in", List.of(10, 20, 30, 50, 60)));
|
return dao.count(MemberApplyRecord.class, Cnd.where("userId", "=", ShiroUtil.getUserId()).and("applyStateId", "in", List.of(10, 20, 30, 50, 60)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("member.apply.submit")
|
||||||
|
public Object getSelfUserInfo(){
|
||||||
|
Sys_user user = (Sys_user) ShiroUtil.getPrincipal();
|
||||||
|
if (Lang.isNotEmpty(user)) {
|
||||||
|
Sys_user sourceUser = dao.fetch(Sys_user.class, ShiroUtil.getUserId());
|
||||||
|
user.setMember(sourceUser.getMember());
|
||||||
|
}
|
||||||
|
return user;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -7,255 +7,255 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<guava>
|
<guava>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<div class="btn-group tool-button mt5">
|
<div class="btn-group tool-button mt5">
|
||||||
<el-input placeholder="请输入关键字查询" v-model="pageForm.keyWord"></el-input>
|
<el-input placeholder="请输入关键字查询" v-model="pageForm.keyWord"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group tool-button mt5">
|
<div class="btn-group tool-button mt5">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pull-right offscreen-right mt5">
|
<div class="pull-right offscreen-right mt5">
|
||||||
<el-dropdown @command="dropdownCommand">
|
<el-dropdown @command="dropdownCommand">
|
||||||
<el-button size="medium" type="danger">
|
<el-button size="medium" type="danger">
|
||||||
批量删除 
|
批量删除 
|
||||||
<span class="ti-angle-down"></span>
|
<span class="ti-angle-down"></span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item :command="{type:'delete2'}">
|
<el-dropdown-item :command="{type:'delete2'}">
|
||||||
删除已选
|
删除已选
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
||||||
<el-dropdown-item :command="{type:'delete3'}">
|
<el-dropdown-item :command="{type:'delete3'}">
|
||||||
全部删除
|
全部删除
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<el-table :data="tableData" style="width: 100%" row-key="_id" @sort-change="pageOrder"
|
<el-table :data="tableData" style="width: 100%" row-key="_id" @sort-change="pageOrder"
|
||||||
v-loading="tabLoading" @selection-change="handleSelectionChange">
|
v-loading="tabLoading" @selection-change="handleSelectionChange">
|
||||||
<el-table-column :reserve-selection="true"
|
<el-table-column :reserve-selection="true"
|
||||||
type="selection"
|
type="selection"
|
||||||
width="55">
|
width="55">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="工号" prop="loginname" header-align="center"
|
<el-table-column label="工号" prop="loginname" header-align="center"
|
||||||
align="center"></el-table-column>
|
align="center"></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="姓名" prop="username" header-align="center"
|
<el-table-column label="姓名" prop="username" header-align="center"
|
||||||
align="center"></el-table-column>
|
align="center"></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="openid" prop="openid" header-align="center"
|
<el-table-column label="openid" prop="openid" header-align="center"
|
||||||
align="center"></el-table-column>
|
align="center"></el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="240px">
|
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="240px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button type="danger" @click="doDelete(row._id)" size="mini"
|
<el-button type="danger" @click="doDelete(row._id)" size="mini"
|
||||||
icon="el-icon-delete"></el-button>
|
icon="el-icon-delete"></el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-row class="el-pagination-container">
|
<el-row class="el-pagination-container">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="pageSizeChange"
|
@size-change="pageSizeChange"
|
||||||
@current-change="pageNumberChange"
|
@current-change="pageNumberChange"
|
||||||
:current-page="pageForm.pageNumber"
|
:current-page="pageForm.pageNumber"
|
||||||
:page-sizes="[10, 20]"
|
:page-sizes="[10, 20]"
|
||||||
:page-size="pageForm.pageSize"
|
:page-size="pageForm.pageSize"
|
||||||
layout="total, sizes, prev, pager, next"
|
layout="total, sizes, prev, pager, next"
|
||||||
:total="pageForm.totalCount">
|
:total="pageForm.totalCount">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const vue = new Vue({
|
const vue = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
v: "index",
|
v: "index",
|
||||||
stepActive: 0,
|
stepActive: 0,
|
||||||
tabLoading: false,
|
tabLoading: false,
|
||||||
subDis: false,
|
subDis: false,
|
||||||
formData: {},
|
formData: {},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
pageForm: {
|
pageForm: {
|
||||||
searchName: "name",
|
searchName: "name",
|
||||||
searchKeyword: "",
|
searchKeyword: "",
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
pageOrderName: "",
|
pageOrderName: "",
|
||||||
pageOrderBy: ""
|
pageOrderBy: ""
|
||||||
},
|
},
|
||||||
multipleSelection: [],
|
multipleSelection: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dropdownCommand: function (command) {
|
dropdownCommand: function (command) {
|
||||||
const {type, data} = command
|
const {type, data} = command
|
||||||
if (type == 'delete2') {
|
if (type == 'delete2') {
|
||||||
this.doDelete2()
|
this.doDelete2()
|
||||||
} else if (type == 'delete3') {
|
} else if (type == 'delete3') {
|
||||||
this.doDelete3()
|
this.doDelete3()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async doDelete(id) {
|
async doDelete(id) {
|
||||||
this.$confirm('是否确定删除!', '提示', {
|
this.$confirm('是否确定删除!', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
callback: async (a, b) => {
|
callback: async (a, b) => {
|
||||||
if ("confirm" == a) {//确认后再执行
|
if ("confirm" == a) {//确认后再执行
|
||||||
const {
|
const {
|
||||||
code,
|
code,
|
||||||
data,
|
data,
|
||||||
msg
|
msg
|
||||||
} = await $.post("/platform/jsz/login/record/delete", {ids: JSON.stringify([id])})
|
} = await $.post("/platform/jsz/login/record/delete", {ids: JSON.stringify([id])})
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: msg,
|
message: msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
this.pageData()
|
this.pageData()
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: data.msg,
|
message: data.msg,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
async doDelete2() {
|
async doDelete2() {
|
||||||
|
|
||||||
if (!this.multipleSelection.length) {
|
if (!this.multipleSelection.length) {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请先勾选需要删除的人员!',
|
message: '请先勾选需要删除的人员!',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$confirm('是否确定删除!', '提示', {
|
this.$confirm('是否确定删除!', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
callback: async (a, b) => {
|
callback: async (a, b) => {
|
||||||
if ("confirm" == a) {//确认后再执行
|
if ("confirm" == a) {//确认后再执行
|
||||||
|
|
||||||
const arr = this.multipleSelection.map(v => {
|
const arr = this.multipleSelection.map(v => {
|
||||||
return v._id
|
return v._id
|
||||||
})
|
})
|
||||||
|
|
||||||
const {
|
const {
|
||||||
code,
|
code,
|
||||||
data,
|
data,
|
||||||
msg
|
msg
|
||||||
} = await $.post("/platform/jsz/login/record/delete", {ids: JSON.stringify(arr)})
|
} = await $.post("/platform/jsz/login/record/delete", {ids: JSON.stringify(arr)})
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.multipleSelection = []
|
this.multipleSelection = []
|
||||||
this.$message({
|
this.$message({
|
||||||
message: msg,
|
message: msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
this.pageData()
|
this.pageData()
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: data.msg,
|
message: data.msg,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async doDelete3() {
|
async doDelete3() {
|
||||||
this.$confirm('是否确定删除全部登录记录!', '提示', {
|
this.$confirm('是否确定删除全部登录记录!', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
callback: async (a, b) => {
|
callback: async (a, b) => {
|
||||||
if ("confirm" == a) {//确认后再执行
|
if ("confirm" == a) {//确认后再执行
|
||||||
const {code, data, msg} = await $.post("/platform/jsz/login/record/deleteAll")
|
const {code, data, msg} = await $.post("/platform/jsz/login/record/deleteAll")
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.multipleSelection = []
|
this.multipleSelection = []
|
||||||
this.$message({
|
this.$message({
|
||||||
message: msg,
|
message: msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
this.pageData()
|
this.pageData()
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: data.msg,
|
message: data.msg,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.multipleSelection = val;
|
this.multipleSelection = val;
|
||||||
},
|
},
|
||||||
doSearch() {
|
doSearch() {
|
||||||
this.tabKey = new Date().getTime()
|
this.tabKey = new Date().getTime()
|
||||||
this.pageForm.pageNumber = 1
|
this.pageForm.pageNumber = 1
|
||||||
this.pageData()
|
this.pageData()
|
||||||
},
|
},
|
||||||
pageOrder(column) {//按字段排序
|
pageOrder(column) {//按字段排序
|
||||||
this.pageForm.pageOrderName = column.prop;
|
this.pageForm.pageOrderName = column.prop;
|
||||||
this.pageForm.pageOrderBy = column.order;
|
this.pageForm.pageOrderBy = column.order;
|
||||||
this.pageData();
|
this.pageData();
|
||||||
},
|
},
|
||||||
pageNumberChange(val) {//页码更新操作
|
pageNumberChange(val) {//页码更新操作
|
||||||
this.pageForm.pageNumber = val;
|
this.pageForm.pageNumber = val;
|
||||||
this.pageData();
|
this.pageData();
|
||||||
},
|
},
|
||||||
pageSizeChange(val) {//分页大小更新操作
|
pageSizeChange(val) {//分页大小更新操作
|
||||||
this.pageForm.pageSize = val;
|
this.pageForm.pageSize = val;
|
||||||
this.pageData();
|
this.pageData();
|
||||||
},
|
},
|
||||||
pageData() {//加载分页数据
|
pageData() {//加载分页数据
|
||||||
sublime.showLoadingbar();//显示loading
|
sublime.showLoadingbar();//显示loading
|
||||||
this.tabLoading = true
|
this.tabLoading = true
|
||||||
$.post(base + "/platform/jsz/login/record/pageData", this.pageForm, (data) => {
|
$.post(base + "/platform/jsz/login/record/pageData", this.pageForm, (data) => {
|
||||||
sublime.closeLoadingbar();//关闭loading
|
sublime.closeLoadingbar();//关闭loading
|
||||||
this.tabLoading = false
|
this.tabLoading = false
|
||||||
if (data.code == 0) {
|
if (data.code == 0) {
|
||||||
this.tableData = data.data.list;
|
this.tableData = data.data.list;
|
||||||
this.pageForm.totalCount = data.data.totalCount;
|
this.pageForm.totalCount = data.data.totalCount;
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: data.msg,
|
message: data.msg,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, "json");
|
}, "json");
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.pageData();
|
this.pageData();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<!--#
|
<!--#
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,145 +3,145 @@ layout("/layouts/platform.html"){
|
|||||||
#-->
|
#-->
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<guava>
|
<guava>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">年度:</div>
|
<div class="search-item-label">年度:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
@change="yearChange"
|
@change="yearChange"
|
||||||
placeholder="选择年度"
|
placeholder="选择年度"
|
||||||
type="year"
|
type="year"
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
value-format="yyyy">
|
value-format="yyyy">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">活动:</div>
|
<div class="search-item-label">活动:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-select @change="doSearch" v-model="pageForm.activityId">
|
<el-select @change="doSearch" v-model="pageForm.activityId">
|
||||||
<el-option :label="item.name"
|
<el-option :label="item.name"
|
||||||
:value="item._id"
|
:value="item._id"
|
||||||
v-for="item in activityList"
|
v-for="item in activityList"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-query">
|
<div class="search-query">
|
||||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool :app="this" label="中奖榜">
|
<table-tool :app="this" label="中奖榜">
|
||||||
<template #func>
|
<template #func>
|
||||||
<el-radio-group size="small" v-model="pageForm.currentSelectedType">
|
<el-radio-group size="small" v-model="pageForm.currentSelectedType">
|
||||||
<el-radio-button label="yesterdayList">昨日榜</el-radio-button>
|
<el-radio-button label="yesterdayList">昨日榜</el-radio-button>
|
||||||
<el-radio-button label="totalList">总榜</el-radio-button>
|
<el-radio-button label="totalList">总榜</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|
||||||
<el-button @click="exportExcel" class="ml10" size="small" type="primary">导出</el-button>
|
<el-button @click="exportExcel" class="ml10" size="small" type="primary">导出</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="prizeData[pageForm.currentSelectedType]" :size="tableSize">
|
<el-table :data="prizeData[pageForm.currentSelectedType]" :size="tableSize">
|
||||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||||
width="80px"></el-table-column>
|
width="80px"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-for="column in tableColumns"
|
v-for="column in tableColumns"
|
||||||
>
|
>
|
||||||
<template scope="{row}" v-if="column.prop==='registerNum'">
|
<template scope="{row}" v-if="column.prop==='registerNum'">
|
||||||
<el-link @click="openView(row.id)" type="primary">
|
<el-link @click="openView(row.id)" type="primary">
|
||||||
{{row.registerNum}}
|
{{row.registerNum}}
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const vue = new Vue({
|
const vue = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
prizeData: {},
|
prizeData: {},
|
||||||
activityList: [],
|
activityList: [],
|
||||||
pageForm: {
|
pageForm: {
|
||||||
year: new Date().getFullYear().toString(),
|
year: new Date().getFullYear().toString(),
|
||||||
activityId: null,
|
activityId: null,
|
||||||
currentSelectedType: 'yesterdayList',
|
currentSelectedType: 'yesterdayList',
|
||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{label: '姓名', prop: 'username'},
|
{label: '姓名', prop: 'username'},
|
||||||
{label: '工号', prop: 'loginname'},
|
{label: '工号', prop: 'loginname'},
|
||||||
{label: '单位', prop: 'unitname'},
|
{label: '单位', prop: 'unitname'},
|
||||||
{label: '分工会', prop: 'unionname', sortable: true},
|
{label: '分工会', prop: 'unionname', sortable: true},
|
||||||
{label: '日期', prop: 'prizeData', sortable: true}
|
{label: '日期', prop: 'prizeData', sortable: true}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async pageData() {
|
async pageData() {
|
||||||
sublime.showLoadingbar()
|
sublime.showLoadingbar()
|
||||||
const resp = await $.post(loc() + '/prizeDataList', this.pageForm)
|
const resp = await $.post(loc() + '/prizeDataList', this.pageForm)
|
||||||
sublime.closeLoadingbar()
|
sublime.closeLoadingbar()
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.prizeData = resp.data
|
this.prizeData = resp.data
|
||||||
} else {
|
} else {
|
||||||
this.notifyWarning(resp.msg)
|
this.notifyWarning(resp.msg)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
yearChange(val) {
|
yearChange(val) {
|
||||||
this.getActivityList(val)
|
this.getActivityList(val)
|
||||||
},
|
},
|
||||||
async getActivityList(year) {
|
async getActivityList(year) {
|
||||||
this.pageForm.activityId = null
|
this.pageForm.activityId = null
|
||||||
this.activityList = []
|
this.activityList = []
|
||||||
if (year) {
|
if (year) {
|
||||||
const beforeTime = moment().year(year).startOf('year').valueOf()
|
const beforeTime = moment().year(year).startOf('year').valueOf()
|
||||||
const endTime = moment().year(year).endOf('year').valueOf()
|
const endTime = moment().year(year).endOf('year').valueOf()
|
||||||
this.pageForm = {...this.pageForm, beforeTime, endTime}
|
this.pageForm = {...this.pageForm, beforeTime, endTime}
|
||||||
}
|
}
|
||||||
|
|
||||||
const resp = await $.get('/jsz/common/getAllHd', this.pageForm)
|
const resp = await $.get('/platform/jsz/common/getAllHd', this.pageForm)
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
resp.data = resp.data.filter(v => v.activityModel === 'stepCount')
|
resp.data = resp.data.filter(v => v.activityModel === 'stepCount')
|
||||||
this.activityList = resp.data
|
this.activityList = resp.data
|
||||||
if (this.activityList) {
|
if (this.activityList) {
|
||||||
this.pageForm.activityId = this.activityList[0]._id
|
this.pageForm.activityId = this.activityList[0]._id
|
||||||
this.pageData()
|
this.pageData()
|
||||||
} else {
|
} else {
|
||||||
this.prizeData = {}
|
this.prizeData = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
const data = this.prizeData[this.pageForm.currentSelectedType]
|
const data = this.prizeData[this.pageForm.currentSelectedType]
|
||||||
if (!data) {
|
if (!data) {
|
||||||
this.notifyWarning('暂无数据!')
|
this.notifyWarning('暂无数据!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const {activityId, currentSelectedType} = this.pageForm
|
const {activityId, currentSelectedType} = this.pageForm
|
||||||
window.open(loc() + '/exportExcel?activityId=' + activityId + '¤tSelectedType=' + currentSelectedType)
|
window.open(loc() + '/exportExcel?activityId=' + activityId + '¤tSelectedType=' + currentSelectedType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
await this.getActivityList(this.pageForm.currentSelectedType)
|
await this.getActivityList(this.pageForm.currentSelectedType)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--#
|
<!--#
|
||||||
|
|||||||
@@ -4,217 +4,217 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<guava ref="guava">
|
<guava ref="guava">
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<div class="btn-group tool-button">
|
<div class="btn-group tool-button">
|
||||||
<el-date-picker :clearable="false"
|
<el-date-picker :clearable="false"
|
||||||
:picker-options="pickerOptions"
|
:picker-options="pickerOptions"
|
||||||
@change="getAllHd"
|
@change="getAllHd"
|
||||||
class="mr5" placeholder="选择年"
|
class="mr5" placeholder="选择年"
|
||||||
type="year" v-model="pageForm.year"
|
type="year" v-model="pageForm.year"
|
||||||
value-format="yyyy">
|
value-format="yyyy">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group tool-button">
|
<div class="btn-group tool-button">
|
||||||
<el-select filterable placeholder="请选择活动"
|
<el-select filterable placeholder="请选择活动"
|
||||||
@change="hdidChange" v-model="pageForm.hdid">
|
@change="hdidChange" v-model="pageForm.hdid">
|
||||||
<el-option :key="o._id" :label="o.name" :value="o._id"
|
<el-option :key="o._id" :label="o.name" :value="o._id"
|
||||||
v-for="o in hdOptions"></el-option>
|
v-for="o in hdOptions"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group tool-button">
|
<div class="btn-group tool-button">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:picker-options="activityDatePickerOptions"
|
:picker-options="activityDatePickerOptions"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
@change="activityDateChange"
|
@change="activityDateChange"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
v-model="pageForm.activityDate">
|
v-model="pageForm.activityDate">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group tool-button">
|
<div class="btn-group tool-button">
|
||||||
<el-select @change="unionChange" clearable filterable
|
<el-select @change="unionChange" clearable filterable
|
||||||
placeholder="请选择所属工会" style="width: 350px" v-model="pageForm.unionId">
|
placeholder="请选择所属工会" style="width: 350px" v-model="pageForm.unionId">
|
||||||
<el-option
|
<el-option
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.unionname"
|
:label="item.unionname"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
v-for="item in unionOptions">
|
v-for="item in unionOptions">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group tool-button">
|
<div class="btn-group tool-button">
|
||||||
<el-select @change="doSearch" clearable filterable
|
<el-select @change="doSearch" clearable filterable
|
||||||
placeholder="请选择所属单位" style="width: 350px" v-model="pageForm.unitId">
|
placeholder="请选择所属单位" style="width: 350px" v-model="pageForm.unitId">
|
||||||
<el-option
|
<el-option
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
v-for="item in unitOptions">
|
v-for="item in unitOptions">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group tool-button">
|
<div class="btn-group tool-button">
|
||||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="mt20" shadow="never">
|
<el-card class="mt20" shadow="never">
|
||||||
<table-tool :app="this" label="参与列表">
|
<table-tool :app="this" label="参与列表">
|
||||||
<template #func>
|
<template #func>
|
||||||
|
|
||||||
|
|
||||||
<el-button @click="exportExcel" class="ml10" size="small" type="primary">导出</el-button>
|
<el-button @click="exportExcel" class="ml10" size="small" type="primary">导出</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" :size="tableSize">
|
<el-table :data="tableData" :size="tableSize">
|
||||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||||
width="80px"></el-table-column>
|
width="80px"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-for="column in tableColumns"
|
v-for="column in tableColumns"
|
||||||
>
|
>
|
||||||
<template scope="{row}" v-if="column.prop==='registerNum'">
|
<template scope="{row}" v-if="column.prop==='registerNum'">
|
||||||
<el-link @click="openView(row.id)" type="primary">
|
<el-link @click="openView(row.id)" type="primary">
|
||||||
{{row.registerNum}}
|
{{row.registerNum}}
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let vue = new Vue({
|
let vue = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{label: '姓名', prop: 'username'},
|
{label: '姓名', prop: 'username'},
|
||||||
{label: '工号', prop: 'loginname'},
|
{label: '工号', prop: 'loginname'},
|
||||||
{label: '单位', prop: 'unitname'},
|
{label: '单位', prop: 'unitname'},
|
||||||
{label: '分工会', prop: 'unionname', sortable: true},
|
{label: '分工会', prop: 'unionname', sortable: true},
|
||||||
{label: '当前步数', prop: 'step', sortable: true},
|
{label: '当前步数', prop: 'step', sortable: true},
|
||||||
{label: '日期', prop: 'prizeData', sortable: true}
|
{label: '日期', prop: 'prizeData', sortable: true}
|
||||||
],
|
],
|
||||||
unionOptions: [],
|
unionOptions: [],
|
||||||
unitOptions: [],
|
unitOptions: [],
|
||||||
hdOptions: [],
|
hdOptions: [],
|
||||||
pageForm: {
|
pageForm: {
|
||||||
unionId: '',
|
unionId: '',
|
||||||
unitId: '',
|
unitId: '',
|
||||||
activityDate: [],
|
activityDate: [],
|
||||||
year: new Date().getFullYear() + '',
|
year: new Date().getFullYear() + '',
|
||||||
},
|
},
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
return (
|
return (
|
||||||
time.getFullYear() > new Date().getFullYear()
|
time.getFullYear() > new Date().getFullYear()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
activityDatePickerOptions: {
|
activityDatePickerOptions: {
|
||||||
disabledDate: time => {
|
disabledDate: time => {
|
||||||
/* return (
|
/* return (
|
||||||
time <= moment(this.pageForm.end_time).toDate() || time >= moment(this.pageForm.start_time).toDate()
|
time <= moment(this.pageForm.end_time).toDate() || time >= moment(this.pageForm.start_time).toDate()
|
||||||
);*/
|
);*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hdidChange(id) {
|
hdidChange(id) {
|
||||||
const aa = clone(this.hdOptions)
|
const aa = clone(this.hdOptions)
|
||||||
const bb = aa.find(v => v._id === id)
|
const bb = aa.find(v => v._id === id)
|
||||||
this.$set(this.pageForm, "activityDate", [bb.start_time, bb.end_time])
|
this.$set(this.pageForm, "activityDate", [bb.start_time, bb.end_time])
|
||||||
},
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
const {hdid, unionId, unitId, activityDate} = this.pageForm
|
const {hdid, unionId, unitId, activityDate} = this.pageForm
|
||||||
let activityDate1 = []
|
let activityDate1 = []
|
||||||
if (activityDate && activityDate.length > 0) {
|
if (activityDate && activityDate.length > 0) {
|
||||||
activityDate1 = JSON.stringify(activityDate)
|
activityDate1 = JSON.stringify(activityDate)
|
||||||
}
|
}
|
||||||
window.open(loc() + '/exportExcel?hdid=' + hdid + '&unionId=' + unionId + '&unitId=' + unitId + '&activityDate=' + activityDate1)
|
window.open(loc() + '/exportExcel?hdid=' + hdid + '&unionId=' + unionId + '&unitId=' + unitId + '&activityDate=' + activityDate1)
|
||||||
},
|
},
|
||||||
activityDateChange() {
|
activityDateChange() {
|
||||||
// this.$set(this.pageForm, "activityDate", [])
|
// this.$set(this.pageForm, "activityDate", [])
|
||||||
},
|
},
|
||||||
async unionChange(val) {
|
async unionChange(val) {
|
||||||
this.pageForm.unitId = null
|
this.pageForm.unitId = null
|
||||||
this.unitOptions = await getUnits(val)
|
this.unitOptions = await getUnits(val)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
},
|
},
|
||||||
async getAllHd() {
|
async getAllHd() {
|
||||||
this.pageForm.hdid = ''
|
this.pageForm.hdid = ''
|
||||||
this.activityOptions = []
|
this.activityOptions = []
|
||||||
const {year} = this.pageForm
|
const {year} = this.pageForm
|
||||||
if (year) {
|
if (year) {
|
||||||
const beforeTime = moment().year(year).startOf('year').valueOf();
|
const beforeTime = moment().year(year).startOf('year').valueOf();
|
||||||
const endTime = moment().year(year).endOf('year').valueOf();
|
const endTime = moment().year(year).endOf('year').valueOf();
|
||||||
this.pageForm = {...this.pageForm, beforeTime, endTime}
|
this.pageForm = {...this.pageForm, beforeTime, endTime}
|
||||||
}
|
}
|
||||||
|
|
||||||
const {data} = await $.get('/jsz/common/getAllHd', this.pageForm)
|
const {data} = await $.get('/platform/jsz/common/getAllHd', this.pageForm)
|
||||||
if (data == null || data.length === 0) {
|
if (data == null || data.length === 0) {
|
||||||
this.tableData = []
|
this.tableData = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data.map(v => {
|
data.map(v => {
|
||||||
v.start_time = moment(v.start_time).format('YYYY-MM-DD')
|
v.start_time = moment(v.start_time).format('YYYY-MM-DD')
|
||||||
v.end_time = moment(v.end_time).format('YYYY-MM-DD')
|
v.end_time = moment(v.end_time).format('YYYY-MM-DD')
|
||||||
if (v.tag !== "") {
|
if (v.tag !== "") {
|
||||||
v.name = (v.tag + "——" + v.name)
|
v.name = (v.tag + "——" + v.name)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.hdOptions = data
|
this.hdOptions = data
|
||||||
if (this.hdOptions) {
|
if (this.hdOptions) {
|
||||||
this.pageForm.hdid = this.hdOptions[0]._id
|
this.pageForm.hdid = this.hdOptions[0]._id
|
||||||
this.pageForm.start_time = this.hdOptions[0].start_time
|
this.pageForm.start_time = this.hdOptions[0].start_time
|
||||||
this.pageForm.end_time = this.hdOptions[0].end_time
|
this.pageForm.end_time = this.hdOptions[0].end_time
|
||||||
this.$set(this.pageForm, "activityDate", [this.pageForm.start_time, this.pageForm.end_time])
|
this.$set(this.pageForm, "activityDate", [this.pageForm.start_time, this.pageForm.end_time])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pageData() {
|
pageData() {
|
||||||
sublime.showLoadingbar();
|
sublime.showLoadingbar();
|
||||||
this.tableLoading = true
|
this.tableLoading = true
|
||||||
let pageForm = clone(this.pageForm)
|
let pageForm = clone(this.pageForm)
|
||||||
if (pageForm.activityDate && pageForm.activityDate.length > 0) {
|
if (pageForm.activityDate && pageForm.activityDate.length > 0) {
|
||||||
pageForm.activityDate = JSON.stringify(pageForm.activityDate)
|
pageForm.activityDate = JSON.stringify(pageForm.activityDate)
|
||||||
}
|
}
|
||||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||||
sublime.closeLoadingbar();
|
sublime.closeLoadingbar();
|
||||||
this.tableLoading = false
|
this.tableLoading = false
|
||||||
if (data.code == 0) {
|
if (data.code == 0) {
|
||||||
this.tableData = data.data.list;
|
this.tableData = data.data.list;
|
||||||
this.pageForm.totalCount = data.data.totalCount;
|
this.pageForm.totalCount = data.data.totalCount;
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(data.msg);
|
this.$message.error(data.msg);
|
||||||
}
|
}
|
||||||
}, "json");
|
}, "json");
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.unionOptions = await getUnions(null)
|
this.unionOptions = await getUnions(null)
|
||||||
this.unitOptions = await getUnits(null)
|
this.unitOptions = await getUnits(null)
|
||||||
await this.getAllHd()
|
await this.getAllHd()
|
||||||
this.pageData()
|
this.pageData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,16 +31,12 @@ layout("/layouts/platform.html"){
|
|||||||
<template scope="{row}" v-if="column.prop=='loginname'">
|
<template scope="{row}" v-if="column.prop=='loginname'">
|
||||||
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
|
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
|
||||||
</template>
|
</template>
|
||||||
<template scope="{row}" v-if="column.prop=='allocationUnionName'">
|
<!-- <template scope="{row}" v-else-if="column.prop=='sign'">-->
|
||||||
<el-tag v-if="row.allocationUnionName">{{ row.allocationUnionName }}</el-tag>
|
<!-- <el-image :src="CREATE_PREVIEW_URL(row.sign)"-->
|
||||||
<el-tag v-else type="danger">未分配</el-tag>
|
<!-- fit="cover"-->
|
||||||
</template>
|
<!-- style="height: 60px" v-if="row.sign"></el-image>-->
|
||||||
<template scope="{row}" v-else-if="column.prop=='sign'">
|
<!-- <el-tag type="warning" v-else>暂无</el-tag>-->
|
||||||
<el-image :src="CREATE_PREVIEW_URL(row.sign)"
|
<!-- </template>-->
|
||||||
fit="cover"
|
|
||||||
style="height: 60px" v-if="row.sign"></el-image>
|
|
||||||
<el-tag type="warning" v-else>暂无</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="220">
|
<el-table-column label="操作" width="220">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
|
|||||||
@@ -31,10 +31,6 @@ layout("/layouts/platform.html"){
|
|||||||
<template scope="{row}" v-if="column.prop=='loginname'">
|
<template scope="{row}" v-if="column.prop=='loginname'">
|
||||||
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
|
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
|
||||||
</template>
|
</template>
|
||||||
<template scope="{row}" v-if="column.prop=='allocationUnionName'">
|
|
||||||
<el-tag v-if="row.allocationUnionName">{{ row.allocationUnionName }}</el-tag>
|
|
||||||
<el-tag v-else type="danger">未分配</el-tag>
|
|
||||||
</template>
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='sign'">
|
<template scope="{row}" v-else-if="column.prop=='sign'">
|
||||||
<el-image :src="CREATE_PREVIEW_URL(row.sign)"
|
<el-image :src="CREATE_PREVIEW_URL(row.sign)"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
|
|||||||
@@ -1,9 +1,21 @@
|
|||||||
<!--#
|
<!--#
|
||||||
layout("/layouts/platform.html"){
|
layout("/layouts/platform.html"){
|
||||||
#-->
|
#-->
|
||||||
|
<style>
|
||||||
|
.el-descriptions-item__label {
|
||||||
|
width: 15% !important;
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<div class="process-title">入会申请</div> <span style="color: #0a84ff">提示:字段前带有 <span style="color: red">" * "</span> 号的请务必填写</span>
|
<div class="process-title">入会申请</div>
|
||||||
|
<div style="display: flex;justify-content: space-between;margin-bottom: 7px;padding: 0 30px">
|
||||||
|
<div>
|
||||||
|
<span style="color: #0a84ff">提示:字段前带有 <span style="color: red">" * "</span> 号的请务必填写</span>
|
||||||
|
</div>
|
||||||
|
<el-button @click="doExportProve" size="small" type="primary">导出开卡证明</el-button>
|
||||||
|
</div>
|
||||||
<el-form :model="formData" ref="formRef" label-width="0" :rules="formRules" size="small">
|
<el-form :model="formData" ref="formRef" label-width="0" :rules="formRules" size="small">
|
||||||
<el-descriptions :column="3" border class="descriptions-form">
|
<el-descriptions :column="3" border class="descriptions-form">
|
||||||
<el-descriptions-item label="工号">
|
<el-descriptions-item label="工号">
|
||||||
@@ -121,9 +133,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
<!--<el-descriptions-item label="家庭主要成员" :span="3">
|
||||||
<el-form-item prop="families">
|
<el-form-item prop="families">
|
||||||
<el-table :data="formData.families" border size="small">
|
<el-table :data="formData.families" border size="small" >
|
||||||
<el-table-column label="关系" prop="relation">
|
<el-table-column label="关系" prop="relation">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-input v-model="row.relation" maxlength="50"
|
<el-input v-model="row.relation" maxlength="50"
|
||||||
@@ -164,7 +176,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>-->
|
||||||
|
|
||||||
<el-descriptions-item label="个人简历" :span="3">
|
<el-descriptions-item label="个人简历" :span="3">
|
||||||
<el-form-item prop="vita">
|
<el-form-item prop="vita">
|
||||||
@@ -340,6 +352,9 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
doExportProve() {
|
||||||
|
window.open("/platform/member/apply/mine/doExportProve")
|
||||||
|
},
|
||||||
async validateApply() {
|
async validateApply() {
|
||||||
if (this.formData.id) {
|
if (this.formData.id) {
|
||||||
return
|
return
|
||||||
@@ -356,14 +371,17 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
init(){
|
async init(){
|
||||||
const user = JSON.parse(window.sessionStorage.getItem('user'))
|
let user
|
||||||
if (user.member) {
|
const resp = await $.post('/platform/member/apply/submit/getSelfUserInfo')
|
||||||
this.$message.warning({
|
if (resp.code === 0) {
|
||||||
duration: 10000,
|
if (!resp.data) {
|
||||||
showClose: true,
|
user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||||
message: '您已加入会员,请勿重复申请'
|
} else {
|
||||||
});
|
user = resp.data
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||||
}
|
}
|
||||||
this.member = user.member
|
this.member = user.member
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
|
|||||||
@@ -138,64 +138,10 @@ const MEMBER_CHANGE = {
|
|||||||
placeholder="请输入会员服务卡号" maxlength="19"></el-input>
|
placeholder="请输入会员服务卡号" maxlength="19"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item></el-descriptions-item>
|
<el-descriptions-item></el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
<!-- <template v-if="formData.member == 1">-->
|
<!--<el-descriptions-item label="家庭主要成员" :span="3">
|
||||||
<!-- <el-descriptions-item label="是否加入会员组别">-->
|
|
||||||
<!-- <el-form-item prop="member">-->
|
|
||||||
<!-- <el-radio-group v-model="formData.isJoinActivityMemberScope" size="small">-->
|
|
||||||
<!-- <el-radio border :label="true">是</el-radio>-->
|
|
||||||
<!-- <el-radio border :label="false">否</el-radio>-->
|
|
||||||
<!-- </el-radio-group>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <template v-if="formData.member == 0">-->
|
|
||||||
<!-- <el-descriptions-item label="是否退出会员组别">-->
|
|
||||||
<!-- <el-form-item prop="member">-->
|
|
||||||
<!-- <el-radio-group v-model="formData.isExitActivityMemberScope" size="small">-->
|
|
||||||
<!-- <el-radio border :label="true">是</el-radio>-->
|
|
||||||
<!-- <el-radio border :label="false">否</el-radio>-->
|
|
||||||
<!-- </el-radio-group>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <template v-if="formData.member != null && !formData.welfareMember">-->
|
|
||||||
<!-- <el-descriptions-item></el-descriptions-item>-->
|
|
||||||
<!-- <el-descriptions-item></el-descriptions-item>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <template v-if="formData.welfareMember == true">-->
|
|
||||||
<!-- <el-descriptions-item label="是否加入福利项目">-->
|
|
||||||
<!-- <el-form-item prop="isJoinWelfareProject">-->
|
|
||||||
<!-- <el-radio-group v-model="formData.isJoinWelfareProject" size="small">-->
|
|
||||||
<!-- <el-radio border :label="true">是</el-radio>-->
|
|
||||||
<!-- <el-radio border :label="false">否</el-radio>-->
|
|
||||||
<!-- </el-radio-group>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
|
|
||||||
<!-- <template v-if="formData.isJoinWelfareProject">-->
|
|
||||||
<!-- <el-descriptions-item label="选择福利项目">-->
|
|
||||||
<!-- <el-form-item prop="welfareProjectId">-->
|
|
||||||
<!-- <el-select clearable filterable placeholder="请选择福利项目" style="width: 100%"-->
|
|
||||||
<!-- v-model="formData.welfareProjectId">-->
|
|
||||||
<!-- <el-option v-for="item in welfareProjectList"-->
|
|
||||||
<!-- :key="id" :label="item.name" :value="item.id"></el-option>-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <template v-else>-->
|
|
||||||
<!-- <el-descriptions-item></el-descriptions-item>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
|
||||||
<el-form-item prop="families">
|
<el-form-item prop="families">
|
||||||
<el-table :data="formData.families" border size="small">
|
<el-table :data="formData.families" border size="small">
|
||||||
<el-table-column label="关系" prop="relation">
|
<el-table-column label="关系" prop="relation">
|
||||||
@@ -238,7 +184,7 @@ const MEMBER_CHANGE = {
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>-->
|
||||||
|
|
||||||
<el-descriptions-item label="个人简历" :span="3">
|
<el-descriptions-item label="个人简历" :span="3">
|
||||||
<el-form-item prop="vita">
|
<el-form-item prop="vita">
|
||||||
@@ -469,5 +415,11 @@ const MEMBER_CHANGE = {
|
|||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
this.init()
|
this.init()
|
||||||
}
|
},
|
||||||
|
style: /* language=CSS */ `
|
||||||
|
.el-descriptions-item__label {
|
||||||
|
width: 15% !important;
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user