This commit is contained in:
Paidax
2025-09-18 18:31:40 +08:00
parent 9349eddf5d
commit 63f939daa1
12 changed files with 2295 additions and 2241 deletions
@@ -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')
@@ -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;
}
} }
@@ -185,10 +185,6 @@ layout("/layouts/platform.html"){
删除 删除
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :command="{type:'backups',data:scope.row}">
备份数据
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
@@ -287,8 +283,7 @@ layout("/layouts/platform.html"){
<el-form-item prop="groupId" label="参加人员范围"> <el-form-item prop="groupId" label="参加人员范围">
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div style="width: 99%"> <div style="width: 99%">
<el-select prop="groupId" placeholder="参加人员范围" <el-select prop="groupId" placeholder="参加人员范围" v-model="formData.groupId"
v-model="formData.groupId"
style="width: 99%;" style="width: 99%;"
clearable clearable
filterable> filterable>
@@ -298,8 +293,7 @@ layout("/layouts/platform.html"){
</div> </div>
<div> <div>
<!--<el-button @click="openUserScope" type="primary">设置</el-button>--> <!--<el-button @click="openUserScope" type="primary">设置</el-button>-->
<el-button @click="$refs.drawerUserScope.userScopeDialog = true" <el-button @click="$refs.drawerUserScope.userScopeDialog = true" type="primary">设置
type="primary">设置
</el-button> </el-button>
</div> </div>
</div> </div>
@@ -400,27 +394,88 @@ layout("/layouts/platform.html"){
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex">
<el-col :span="12" v-if="formData.activityModel=='stepCount'">
<el-form-item label="每日抽奖名额" prop="dailyLottery">
<el-input-number :min="0" :precision="0" :step="1"
placeholder="每日抽奖名额"
style="width: 100%"
v-model="formData.dailyLottery"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.activityModel=='stepCount'">
<el-form-item label="排行榜显示人数" prop="leaderboardNum">
<el-input-number :min="0" :precision="0" :step="1"
placeholder="排行榜显示人数"
style="width: 100%"
v-model="formData.leaderboardNum"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" v-if="formData.activityModel=='stepCount'">
<el-col :span="12">
<el-form-item label="是否多次抽奖" prop="repeatedlyLottery">
<el-switch
@change="repeatedlyLotteryChange"
active-color="#13ce66"
inactive-color="#ff4949"
v-model="formData.repeatedlyLottery">
</el-switch>
</el-form-item>
</el-col>
<el-col :span="12" v-if="!formData.repeatedlyLottery">
<el-form-item label="自动抽奖时间" prop="drawTime">
<el-date-picker
placeholder="选择自动抽奖时间"
style="width: 100%"
type="datetime"
v-model="formData.drawTime"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.repeatedlyLottery">
<el-form-item label="自动抽奖时间" prop="lotteryTime">
<el-time-picker
placeholder="选择时间"
style="width: 100%"
v-model="formData.lotteryTime"
value-format="HH:mm:ss">
</el-time-picker>
</el-form-item>
</el-col>
</el-row>
<template v-if="formData.activityModel=='stepCount'"> <template v-if="formData.activityModel=='stepCount'">
<vi-title title="抽奖资格"></vi-title>
<el-row type="flex"> <el-row type="flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否通知" prop="sendNotify"> <el-form-item label="健步步数" prop="walkingStepCount">
<el-input-number :min="0" :precision="0" :step="100"
style="width: 100%"
v-model="formData.walkingStepCount"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="增加抽奖机会" prop="lotteryChance">
<el-switch <el-switch
v-model="formData.sendNotify"
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949"> inactive-color="#ff4949"
v-model="formData.lotteryChance">
</el-switch> </el-switch>
<div class="text-primary">
开启后会根据活动时间在指定时间内提醒用户登录小程序上传步数
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<el-form-item label="活动介绍" prop="note"> <el-form-item label="活动介绍" prop="note">
<el-input type="textarea" rows="4" v-model="formData.note" maxlength="2000" <!--<el-input type="textarea" rows="4" v-model="formData.note" maxlength="2000"
placeholder="请填写活动介绍"></el-input> placeholder="请填写活动介绍"></el-input>-->
<div id="noteEditor"></div> <div id="noteEditor"></div>
</el-form-item> </el-form-item>
@@ -437,11 +492,10 @@ layout("/layouts/platform.html"){
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form>
</el-form>
<div style="float: right;margin: 20px 0"> <div style="float: right;margin: 20px 0">
<el-button @click="next" type="primary" v-if="formData.activityModel=='punch'">下一步 <el-button @click="next" type="primary" v-if="formData.activityModel=='punch'">下一步</el-button>
</el-button>
<el-button :disabled="subDis" @click="next" type="primary" <el-button :disabled="subDis" @click="next" type="primary"
v-else>提 v-else>提
交 交
@@ -514,17 +568,6 @@ layout("/layouts/platform.html"){
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="领取点位" prop="receivePoint" header-align="center"
align="center" width="120px">
<template scope="scope">
<el-switch
v-model="scope.row.receivePoint"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column label="点位描述" prop="ms" header-align="center" <el-table-column label="点位描述" prop="ms" header-align="center"
align="center" width="120px"> align="center" width="120px">
<template scope="scope"> <template scope="scope">
@@ -601,15 +644,8 @@ layout("/layouts/platform.html"){
<el-dialog <el-dialog
title="点位坐标" title="点位坐标"
:visible.sync="dwDialogVisible" custom-class="ViewDialogClass" :visible.sync="dwDialogVisible" custom-class="ViewDialogClass"
:close-on-click-modal="false" width="60%" top="2%"> :close-on-click-modal="false" width="60%">
<div style="margin-bottom: 10px">
<el-autocomplete
v-model="addressValue" style="width: 100%"
:fetch-suggestions="querySearchAsync"
placeholder="请输入关键词查询地址"
@select="handleSelect"></el-autocomplete>
</div>
<div style="width: 100%;height: 600px" id="dwMap"></div> <div style="width: 100%;height: 600px" id="dwMap"></div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@@ -686,6 +722,30 @@ layout("/layouts/platform.html"){
{{viewData.walkingStepCount?viewData.walkingStepCount:'暂无'}} {{viewData.walkingStepCount?viewData.walkingStepCount:'暂无'}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="增加抽奖机会:" v-if="viewData.activityModel=='stepCount'">
{{viewData.lotteryChance?'增加':'不增加'}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="排行榜显示人数:" v-if="viewData.activityModel=='stepCount'">
{{viewData.leaderboardNum}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否多次抽奖:" v-if="viewData.activityModel=='stepCount'">
{{viewData.repeatedlyLottery?'是':'否'}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="自动抽奖时间:" v-if="viewData.drawTime&&viewData.activityModel=='stepCount'">
{{moment(viewData.drawTime).format('YYYY-MM-DD HH:mm:ss')}}
</el-form-item>
<el-form-item label="自动抽奖时间:"
v-if="viewData.lotteryTime!='null'&&viewData.activityModel=='stepCount'">
{{viewData.lotteryTime}}
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row gutter="20"> <el-row gutter="20">
@@ -761,8 +821,6 @@ layout("/layouts/platform.html"){
imageSize: new AMap.Size(140, 30), imageSize: new AMap.Size(140, 30),
imageOffset: new AMap.Pixel(-95, -3) imageOffset: new AMap.Pixel(-95, -3)
}); });
let map = null
let marker = null
const vue = new Vue({ const vue = new Vue({
@@ -791,7 +849,7 @@ layout("/layouts/platform.html"){
totalCount: 0, totalCount: 0,
pageOrderName: "", pageOrderName: "",
pageOrderBy: "", pageOrderBy: "",
year: '' year: moment().format('YYYY'),
}, },
formRules: { formRules: {
tag: [{required: true, message: '请填写主活动名称', trigger: ['blur', 'change']}], tag: [{required: true, message: '请填写主活动名称', trigger: ['blur', 'change']}],
@@ -830,9 +888,7 @@ layout("/layouts/platform.html"){
}, },
use: false, use: false,
historicalActList: [], historicalActList: [],
historicalAct: '', historicalAct: ''
placeSearchComponent: null,
addressValue: '',
} }
}, },
components: { components: {
@@ -842,44 +898,6 @@ layout("/layouts/platform.html"){
'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue'), 'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue'),
}, },
methods: { methods: {
handleSelect(item) {
if (item.location) {
//定位到中心点
map.setCenter(item.location);
//TODO 获取数据,对数据进行操作如:添加marker等
this.clearMarker()
this.createMarker(item.location)
this.formData.pts[this.dw.index].lng = item.location.lng
this.formData.pts[this.dw.index].lat = item.location.lat
}
},
clearMarker() {
if (marker) {
map.remove(marker)
}
},
createMarker(position) {
marker = new AMap.Marker({
position: position,
offset: new AMap.Pixel(-13, -30)
})
map.add(marker)
map.setFitView(null, false, [150, 60, 100, 60]);
},
querySearchAsync(queryString, cb) {
if (!queryString) {
return
}
this.placeSearchComponent.search(queryString, function (status, result) {
// 查询成功时,result即对应匹配的POI信息
if (status !== 'error') {
result.poiList.pois.forEach(item => {
item.value = item.name + '【详细地址:' + item.address + '】'
})
cb(result.poiList.pois)
}
})
},
openUserScope() { openUserScope() {
this.userScopeDialog = true this.userScopeDialog = true
}, },
@@ -1058,15 +1076,13 @@ layout("/layouts/platform.html"){
} }
this.dwDialogVisible = true this.dwDialogVisible = true
this.$nextTick(() => { this.$nextTick(() => {
map = new AMap.Map("dwMap", { let map = new AMap.Map("dwMap", {
resizeEnable: true, resizeEnable: true,
center: [AppMapCenterPointX, AppMapCenterPointY], center: [AppMapCenterPointX, AppMapCenterPointY],
zoom: 16 zoom: 16
}); });
this.placeSearchComponent = new AMap.PlaceSearch({
// city 指定搜索所在城市,支持传入格式有:城市名、citycode和adcode let marker
city: ''
})
const {lng, lat} = this.formData.pts[index] const {lng, lat} = this.formData.pts[index]
@@ -1116,13 +1132,13 @@ layout("/layouts/platform.html"){
if (this.formData.activityModel !== 'punch') { if (this.formData.activityModel !== 'punch') {
this.$refs["form"].validate(async (valid) => { this.$refs["form"].validate(async (valid) => {
if (valid) { if (valid) {
if (moment(this.formData.hdsj[0].valueOf()) < moment(this.formData.bmsj[1]).valueOf()) { // if (moment(this.formData.hdsj[0].valueOf()) < moment(this.formData.bmsj[1]).valueOf()) {
this.$message({ // this.$message({
message: '报名时间必须早于活动时间!', // message: '报名时间必须早于活动时间!',
type: 'warning' // type: 'warning'
}); // });
// return // // return
} // }
this.formData._id ? this.doEdit() : this.doAdd() this.formData._id ? this.doEdit() : this.doAdd()
return return
} }
@@ -1131,14 +1147,14 @@ layout("/layouts/platform.html"){
if (this.formData.activityModel === 'punch' && this.stepActive === 0) { if (this.formData.activityModel === 'punch' && this.stepActive === 0) {
this.$refs["form"].validate(async (valid) => { this.$refs["form"].validate(async (valid) => {
if (valid) { if (valid) {
if (moment(this.formData.hdsj[0].valueOf()) < moment(this.formData.bmsj[1]).valueOf()) { // if (moment(this.formData.hdsj[0].valueOf()) < moment(this.formData.bmsj[1]).valueOf()) {
this.$message({ // this.$message({
message: '报名时间必须早于活动时间!', // message: '报名时间必须早于活动时间!',
type: 'warning' // type: 'warning'
}); // });
// return // // return
} // }
this.issueOptions = await Jsz.getIssueById(this.formData.questionId) // this.issueOptions = await Jsz.getIssueById(this.formData.questionId)
this.stepActive = 1 this.stepActive = 1
} }
}) })
@@ -1289,8 +1305,6 @@ layout("/layouts/platform.html"){
this.doDelete(data) this.doDelete(data)
} else if (type == 'sendMsg') { } else if (type == 'sendMsg') {
this.sendMsg(data) this.sendMsg(data)
} else if (type == 'backups') {
} }
}, },
sendMsg(row) { sendMsg(row) {
@@ -1299,10 +1313,10 @@ layout("/layouts/platform.html"){
doEdit() { doEdit() {
const {bmsj, hdsj, drawTime} = this.formData const {bmsj, hdsj, drawTime} = this.formData
if (this.pictureList.length === 0) { // if (this.pictureList.length === 0) {
this.$message.info('请上传封面图') // this.$message.info('请上传封面图')
return // return
} // }
this.formData.drawTime = moment(drawTime).valueOf() this.formData.drawTime = moment(drawTime).valueOf()
this.formData.apply_start_time = moment(bmsj[0]).valueOf() this.formData.apply_start_time = moment(bmsj[0]).valueOf()
@@ -1551,7 +1565,7 @@ layout("/layouts/platform.html"){
'formData.questionId': { 'formData.questionId': {
async handler(newVal, oldVal) { async handler(newVal, oldVal) {
if (oldVal !== undefined) { if (oldVal !== undefined) {
this.issueOptions = await Jsz.getIssueById(this.formData.questionId) // this.issueOptions = await Jsz.getIssueById(this.formData.questionId)
this.formData.pts.map(v => v.issueIds = []) this.formData.pts.map(v => v.issueIds = [])
} }
}, },
@@ -1573,7 +1587,7 @@ layout("/layouts/platform.html"){
async created() { async created() {
this.getActivityGroup() this.getActivityGroup()
this.typeOptions = await Jsz.getTypes() this.typeOptions = await Jsz.getTypes()
this.questionOptions = await Jsz.getQuestion() // this.questionOptions = await Jsz.getQuestion()
this.pageForm.year = (new Date().getFullYear()).toString() this.pageForm.year = (new Date().getFullYear()).toString()
await this.pageData(); await this.pageData();
@@ -116,7 +116,7 @@ layout("/layouts/platform.html"){
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
@@ -167,7 +167,7 @@ layout("/layouts/platform.html"){
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
@@ -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;
} }
`
} }