This commit is contained in:
=
2026-06-11 16:12:02 +08:00
parent d2f682d5b6
commit 4b224e48fd
25 changed files with 215 additions and 135 deletions
@@ -138,6 +138,7 @@ public class Sys_user extends BaseModel implements Serializable {
@Column
@Comment("职称")
@ColDefine(type = ColType.VARCHAR, width = 50)
@DataCenterColumn(name = "职称", key = "ZYJSZW")
private String professionalTitle;
@Column
@@ -161,7 +162,7 @@ public class Sys_user extends BaseModel implements Serializable {
private String positionSeries;
@Column
@Comment("岗级")
@Comment("岗级,职务级别")
@ColDefine(type = ColType.VARCHAR, width = 50)
@DataCenterColumn(name = "岗级", key = "ZYJSGWDJ")
private String positionLevel;
@@ -66,24 +66,57 @@ public class SysDataUnitPullServiceImpl extends BaseServiceImpl<Sys_unit> implem
public void updateUnits(List<String> unitIds) {
// 中间表数据
List<Record> unitMiddleList = dao().query("unit_middle", Cnd.NEW());
List<Sys_unit> sysUnits = dao().query(Sys_unit.class, Cnd.NEW());
Map<String, Sys_unit> unitMapById = sysUnits.stream()
.filter(unit -> StrUtil.isNotBlank(unit.getId()))
.collect(Collectors.toMap(Sys_unit::getId, unit -> unit, (oldValue, newValue) -> oldValue));
Map<String, Sys_unit> unitMapByCode = sysUnits.stream()
.filter(unit -> StrUtil.isNotBlank(unit.getUnitcode()))
.collect(Collectors.toMap(Sys_unit::getUnitcode, unit -> unit, (oldValue, newValue) -> oldValue));
// 需要新增的单位
List<Sys_unit> insertList = new ArrayList<>();
// 需要更新的单位
List<Sys_unit> updateList = new ArrayList<>();
int skipCount = 0;
Map<String, String> api2db = Arrays.stream(Api2UnitFiledMap.values())
.collect(Collectors.toMap(e -> e.apiField, e -> e.dbColumn));
for (Record row : unitMiddleList) {
JSONObject jsonRow = JSONUtil.parseObj(JSONUtil.toJsonStr(row));
String unitCode = getDataCenterField(jsonRow, "dwdm");
String unitLevel = getDataCenterField(jsonRow, "dwdj");
if (StrUtil.isBlank(unitCode)) {
skipCount++;
log.warn("单位数据编码为空,已跳过: {}", row);
continue;
}
if ("1".equals(unitLevel)) {
skipCount++;
continue;
}
Sys_unit unit = DataCenterUtil.mapJsonToBean(jsonRow, Sys_unit.class, api2db);
unit.setUnitcode(unit.getId());
unit.setId(unitCode);
unit.setUnitcode(unitCode);
unit.setUnitTypeCode(1);
unit.setParentId("0000");
unit.setUnitLevel(2);
if ("3".equals(unitLevel)) {
String parentUnitCode = getDataCenterField(jsonRow, "sjdwmcdm");
String defaultParentUnitCode = unitCode.length() > 4 ? unitCode.substring(0, 4) : "1";
unit.setParentId(StrUtil.isNotBlank(parentUnitCode) ? parentUnitCode : defaultParentUnitCode);
unit.setUnitLevel(3);
} else {
unit.setParentId("1");
unit.setUnitLevel(2);
}
if (unitIds.contains(unit.getId())) {
Sys_unit existUnit = unitMapById.get(unitCode);
if (existUnit == null) {
existUnit = unitMapByCode.get(unitCode);
}
if (existUnit != null) {
// 存在则更新
unit.setId(existUnit.getId());
updateList.add(unit);
} else {
// 不存在则新增
@@ -91,7 +124,23 @@ public class SysDataUnitPullServiceImpl extends BaseServiceImpl<Sys_unit> implem
}
}
log.info("本次拉取单位数据,新增{}条,更新{}条", insertList.size(), updateList.size());
log.info("本次跳过一级或无编码单位{}条", skipCount);
dao().insert(insertList);
dao().update(updateList);
}
/**
* 读取数据中心字段,兼容中间表字段大小写差异。
*
* @param jsonRow 中间表行数据
* @param fieldName 字段名
* @return 去除首尾空格后的字段值
*/
private String getDataCenterField(JSONObject jsonRow, String fieldName) {
String value = jsonRow.getStr(fieldName);
if (value == null) {
value = jsonRow.getStr(fieldName.toUpperCase());
}
return value == null ? null : value.trim();
}
}
@@ -24,7 +24,6 @@ import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeOrigin;
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeType;
import lombok.extern.slf4j.Slf4j;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.aop.Aop;
@@ -178,8 +177,6 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
List<Sys_user> needDoUpdateList = new CopyOnWriteArrayList<>();
List<Sys_user> needInitUserList = new CopyOnWriteArrayList<>();
List<Sys_user_history> histories = new CopyOnWriteArrayList<>();
List<String> addMemberUserIds = Collections.synchronizedList(new ArrayList<>());
List<String> removeMemberUserIds = Collections.synchronizedList(new ArrayList<>());
// 处理每条数据
for (Sys_user_source source : sources) {
@@ -189,10 +186,8 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
Sys_user u = new Sys_user();
BeanUtils.copyProperties(source, u);
//单位id取前四位数(二级单位)
if (u.getUnitId() != null && u.getUnitId().length() > 4) {
u.setUnitId(u.getUnitId().substring(0, 4));
}
// 数据中心可能返回三级单位编码,系统用户统一挂到二级单位。
u.setUnitId(normalizeSecondLevelUnitId(u.getUnitId()));
if (user == null) {
// 新增用户,初始化数据
@@ -200,22 +195,12 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
u.setSalt(salt);
u.setPassword(PwdUtil.getPassword(PwdUtil.generate(12), salt));
if (u.getMember()) {
addMemberUserIds.add(u.getId());
}
needInitUserList.add(u);
} else {
// 修改现有用户
u.setId(user.getId());
// 更新会员状态
boolean currentIsMember = user.getMember() != null && user.getMember();
if (!currentIsMember) {
addMemberUserIds.add(user.getId());
} else{
removeMemberUserIds.add(user.getId());
}
// 全量更新只同步数据中心基础资料,会员状态由会员业务流程维护。
u.setMember(null);
needDoUpdateList.add(u);
}
@@ -249,36 +234,6 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
});
}, executorService);
updateTasks.add(insertTask);
// 异步处理公共角色分配
if (!needInitUserList.isEmpty()) {
CompletableFuture<Void> roleTask = CompletableFuture.runAsync(() -> {
try {
log.info("为新用户分配公共角色");
List<Sys_user_role> roleList = needInitUserList.stream().map(item -> {
Sys_user_role userRole = new Sys_user_role();
userRole.setRoleId(publicRole.getId());
userRole.setUserId(item.getId());
return userRole;
}).collect(Collectors.toList());
if (!roleList.isEmpty()) {
// 分批处理角色分配
List<List<Sys_user_role>> roleBatches = ListUtil.split(roleList, 500);
roleBatches.forEach(batch -> {
try {
dao.fastInsert(batch);
} catch (Exception e) {
log.error("批量分配角色异常", e);
}
});
}
} catch (Exception e) {
log.error("分配公共角色异常", e);
}
}, executorService);
// 不等待角色分配完成
}
}
// 2. 更新现有用户 - 使用批量处理
@@ -311,7 +266,18 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
return "更新失败: " + e.getMessage();
}
// 3. 异步添加历史记录 - 不等待完成
// 3. 全量同步不变更会员状态,只按当前用户会员标记补齐基础角色。
List<Sys_user> roleUsers = dao.query(Sys_user.class, Cnd.NEW());
List<String> publicRoleUserIds = roleUsers.stream().map(Sys_user::getId).toList();
List<String> memberRoleUserIds = roleUsers.stream()
.filter(user -> Boolean.TRUE.equals(user.getMember()))
.map(Sys_user::getId)
.toList();
int addPublicRoleCount = addMissingUserRole(publicRole.getId(), publicRoleUserIds, "公共角色");
int addMemberRoleCount = addMissingUserRole(memberRole.getId(), memberRoleUserIds, "会员角色");
sysRoleService.clearCache();
// 4. 异步添加历史记录 - 不等待完成
if (Lang.isNotEmpty(histories)) {
executorService.execute(() -> {
log.info("添加历史记录: {} 条", histories.size());
@@ -327,58 +293,8 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
});
}
// 4. 异步添加会员角色 - 不等待完成
if (Lang.isNotEmpty(addMemberUserIds)) {
executorService.execute(() -> {
try {
log.info("添加会员角色: {} 个", addMemberUserIds.size());
List<Sys_user_role> roleList = addMemberUserIds.stream().map(id -> {
Sys_user_role userRole = new Sys_user_role();
userRole.setRoleId(memberRole.getId());
userRole.setUserId(id);
return userRole;
}).collect(Collectors.toList());
if (!roleList.isEmpty()) {
// 分批处理角色分配
List<List<Sys_user_role>> batches = ListUtil.split(roleList, 500);
batches.forEach(batch -> {
try {
dao.fastInsert(batch);
} catch (Exception e) {
log.error("批量添加会员角色异常", e);
}
});
}
} catch (Exception e) {
log.error("添加会员角色异常", e);
}
});
}
// 5. 异步移除会员角色 - 不等待完成
if (Lang.isNotEmpty(removeMemberUserIds)) {
executorService.execute(() -> {
try {
log.info("移除会员角色: {} 个", removeMemberUserIds.size());
// 批量处理,避免IN子句过长
List<List<String>> batches = ListUtil.split(removeMemberUserIds, 500);
for (List<String> batch : batches) {
try {
dao.update(Sys_user.class, Chain.make("member", false), Cnd.where("id", "in", batch));
dao.clear(Sys_user_role.class, Cnd.where("userId", "in", batch).and("roleId", "=", memberRole.getId()));
} catch (Exception e) {
log.error("批量移除会员角色异常", e);
}
}
} catch (Exception e) {
log.error("移除会员角色异常", e);
}
});
}
// 6. 处理其他任务
// 6.1 更新提案的校领导角色,发送订阅
// 5. 处理其他任务
// 5.1 更新提案的校领导角色,发送订阅
ProposalConfig config = dao.fetch(ProposalConfig.class, Cnd.where("delFlag", "=", false).desc("updatedAt"));
for (String unitId : config.getSchoolLeaderUnitIds()) {
RoleEventPublisher.broadcast(new RoleEventMsg(unitId, RoleConstant.PROPOSAL_BRANCH_SCHOOL_LEADER.name(), RoleEventMsg.RENEW_ROLE));
@@ -388,7 +304,69 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
log.info("全量更新用户数据完成,耗时: {} 毫秒", (endTime - startTime));
return "更新完成: 新增用户 " + needInitUserList.size() + " 个, 更新用户 " + needDoUpdateList.size()
+ " 个, 待添加会员 " + addMemberUserIds.size() + " 个, 待移除会员 " + removeMemberUserIds.size() + " 个";
+ " 个, 补齐公共角色 " + addPublicRoleCount + " 个, 补齐会员角色 " + addMemberRoleCount + " 个";
}
/**
* 补齐用户基础角色,只新增缺失的用户角色关系,避免全量更新误改会员状态或重复插入角色。
*
* @param roleId 角色ID
* @param userIds 需要拥有该角色的用户ID
* @param roleName 日志中的角色名称
* @return 本次新增的角色关系数量
*/
private int addMissingUserRole(String roleId, List<String> userIds, String roleName) {
List<String> distinctUserIds = userIds.stream()
.filter(Objects::nonNull)
.distinct()
.toList();
if (Lang.isEmpty(distinctUserIds)) {
return 0;
}
List<Sys_user_role> existingRoles = new ArrayList<>();
List<List<String>> userIdBatches = ListUtil.split(distinctUserIds, 500);
for (List<String> batch : userIdBatches) {
existingRoles.addAll(dao.query(Sys_user_role.class,
Cnd.where(Sys_user_role::getRoleId, "=", roleId)
.and(Sys_user_role::getUserId, "in", batch)));
}
Set<String> existingUserIds = existingRoles.stream()
.map(Sys_user_role::getUserId)
.collect(Collectors.toSet());
List<Sys_user_role> addRoles = distinctUserIds.stream()
.filter(userId -> !existingUserIds.contains(userId))
.map(userId -> {
Sys_user_role userRole = new Sys_user_role();
userRole.setRoleId(roleId);
userRole.setUserId(userId);
return userRole;
})
.toList();
if (Lang.isEmpty(addRoles)) {
return 0;
}
log.info("补齐{}: {} 个", roleName, addRoles.size());
List<List<Sys_user_role>> roleBatches = ListUtil.split(addRoles, 500);
for (List<Sys_user_role> batch : roleBatches) {
dao.fastInsert(batch);
}
return addRoles.size();
}
/**
* 将数据中心单位编码统一归一到系统使用的二级单位编码。
*
* @param unitId 数据中心或系统中的单位编码
* @return 二级单位编码
*/
private String normalizeSecondLevelUnitId(String unitId) {
if (unitId != null && unitId.length() > 4) {
return unitId.substring(0, 4);
}
return unitId;
}
/**
@@ -419,6 +397,10 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
// 遍历带有DataCenterColumn注解的字段进行比较
for (FieldMapping mapping : getFieldMappings()) {
try {
// 单位编码需要先归一到二级单位,统一放到单位变更逻辑中比较。
if ("unitId".equals(mapping.field.getName())) {
continue;
}
Object sourceValue = mapping.field.get(source);
Object userValue = mapping.field.get(user);
@@ -452,18 +434,20 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
// }
// 2. 单位变更
if (!ObjectUtil.equals(user.getUnitId(), source.getUnitId())) {
String oldUnitId = normalizeSecondLevelUnitId(user.getUnitId());
String newUnitId = normalizeSecondLevelUnitId(source.getUnitId());
if (!ObjectUtil.equals(oldUnitId, newUnitId)) {
changeTypes.add(MemberChangeType.UNIT_CHANGE.name());
NutMap change = NutMap.NEW();
change.put("fieldName", "单位");
change.put("field", "unitId");
change.put("sourceValue", unitIdNameMap.get(user.getUnitId()));
change.put("newValue", unitIdNameMap.get(user.getUnitId()));
change.put("sourceValue", unitIdNameMap.get(oldUnitId));
change.put("newValue", unitIdNameMap.get(newUnitId));
changeList.add(change);
// 单位异动发送订阅消息,清空原单位的所有角色
UserChangePublisher.broadcast(new UserChangeMsg(List.of(user.getId()),
UserChangeMsg.UNIT_CHANGE_OPERATION, user.getUnitId(), source.getUnitId()));
UserChangeMsg.UNIT_CHANGE_OPERATION, oldUnitId, newUnitId));
}
// 如果没有任何变更,返回null
@@ -49,6 +49,11 @@ public class EnrollmentRegistration extends BaseModel implements Serializable {
@Comment("工号")
private String loginName;
@Column
@ColDefine(type = ColType.VARCHAR,width = 100)
@Comment("职称")
private String professionalTitle;
@Column
@ColDefine(type = ColType.VARCHAR,width = 32)
@Comment("userId")
@@ -70,6 +70,7 @@ public class EnrollmentRegistrationSummaryServiceImpl extends BaseServiceImpl im
cnd.and("ins.state", "=", ProcessTaskStateEnum.FINISHED.getCode());
cnd.andEX("info.unionId","=",pageForm.getUnionId());
cnd.andEX("info.unitId","=",pageForm.getUnitId());
cnd.andEX("info.professionalTitle","=",pageForm.getProfessionalTitle());
cnd.andEX("info.registrationType","=",pageForm.getRegistrationType());
if (pageForm.getSolved() != null) {
if (pageForm.getSolved()) {
@@ -15,6 +15,7 @@ public class EnrollmentRegistrationPageForm extends PageForm {
private Integer year;
private String unionId;
private String unitId;
private String professionalTitle;
private String registrationType;
private Boolean solved;
}
@@ -51,7 +51,9 @@ layout("/layouts/platform.html"){
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="职称">
{{formData.professionalTitle}}
</el-descriptions-item>
<el-descriptions-item label="子女姓名">
<el-form-item prop="childrenName"
@@ -340,6 +342,9 @@ layout("/layouts/platform.html"){
if (this.bizId) {
this.findOne(this.bizId).then(async data => {
this.formData = data
if (!this.formData.professionalTitle) {
this.$set(this.formData, "professionalTitle", (this.$store.state.user && this.$store.state.user.professionalTitle) || "")
}
})
} else {
const {id, username, loginname, mobile, union, unit} = this.$store.state.user
@@ -347,6 +352,7 @@ layout("/layouts/platform.html"){
userId: id,
userName: username,
loginName: loginname,
professionalTitle: this.$store.state.user.professionalTitle || "",
unitName: unit.name,
unitId: unit.id,
unionName: union.name,
@@ -9,6 +9,7 @@ const ENROLLMENT_REGISTRATION_INFO = {
<el-descriptions :column="3" border>
<el-descriptions-item label="监护人(教工)姓名">{{viewData.userName}}</el-descriptions-item>
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
<el-descriptions-item label="职称">{{viewData.professionalTitle}}</el-descriptions-item>
<el-descriptions-item label="手机号码">{{viewData.mobile}}</el-descriptions-item>
<el-descriptions-item label="所在单位">{{viewData.unitName}}</el-descriptions-item>
<el-descriptions-item label="监护人与学生关系">
@@ -41,6 +41,14 @@ layout("/layouts/platform.html"){
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="职称">
<el-select clearable filterable placeholder="请选择职称"
style="width: 100%;"
v-model="pageForm.professionalTitle">
<el-option :label="item.name" :value="item.code"
v-for="item in dict.type.TECHNICAL_TITLE_LEVEL"></el-option>
</el-select>
</search-item>
<search-item label="是否解决">
<el-select clearable placeholder="请选择是否解决"
style="width: 100%;"
@@ -68,6 +76,7 @@ layout("/layouts/platform.html"){
<el-table-column prop="loginName" label="工号"></el-table-column>
<el-table-column prop="unionName" label="所属工会"></el-table-column>
<el-table-column prop="unitName" label="所属单位"></el-table-column>
<el-table-column prop="professionalTitle" label="职称"></el-table-column>
<el-table-column prop="mobile" label="手机号码"></el-table-column>
<el-table-column prop="registrationType" label="登记类型">
<template v-slot="{row}">
@@ -112,7 +121,7 @@ layout("/layouts/platform.html"){
new Vue({
el: "#app",
store,
dicts: ["ENROLLMENT_REGISTRATION_TYPE", "ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP", "ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL"],
dicts: ["ENROLLMENT_REGISTRATION_TYPE", "ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP", "ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL", "TECHNICAL_TITLE_LEVEL"],
mixins: [initTableMixins],
data() {
return {
@@ -56,10 +56,11 @@ layout("/layouts/platform.html"){
<el-tag :type="row.isReply ? 'success' : 'warning'" size="small">{{ row.isReply ? '已回复' : '待回复' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="160px">
<el-table-column label="操作" fixed="right" width="240px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="!row.isReply" @click="openReply(row)" size="mini" type="success">回复</el-button>
<el-button @click="handleDelete(row)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -187,6 +188,23 @@ layout("/layouts/platform.html"){
})
})
},
handleDelete(row) {
this.$confirm('确认删除该信件吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$axios.post('/platform/chairmanMailbox/query/delete', {
id: row.id
}).then((res) => {
if (res.code === 0) {
this.$message.success('删除成功')
this.loadStats()
this.pageData()
}
})
})
},
loadStats() {
this.$axios.post('/platform/chairmanMailbox/query/getStats').then((res) => {
if (res.code === 0) {
@@ -103,7 +103,7 @@ layout("/layouts/platform.html"){
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "教职工类别", sortable: true },
{ prop: "preparedBy", label: "编制类别", sortable: true },
<!-- { prop: "preparedBy", label: "编制类别", sortable: true }, -->
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "sign", label: "签字" },
@@ -31,10 +31,10 @@ const COMMON_QUERY = {
<dict-select v-model="pageForm.personTypes" placeholder="请选择教职工类别" @change="doSearch"
code="USER_PERSON_TYPE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="编制类别">
<!-- <search-item label="编制类别">
<dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
</search-item>
</search-item> -->
</template>
</search>
`,
@@ -86,7 +86,7 @@ layout("/layouts/platform.html"){
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "教职工类别", sortable: true },
{ prop: "preparedBy", label: "编制类别", sortable: true },
<!-- { prop: "preparedBy", label: "编制类别", sortable: true }, -->
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "sign", label: "签字" },
@@ -121,7 +121,7 @@ layout("/layouts/platform.html"){
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "教职工类别", sortable: true },
{ prop: "preparedBy", label: "编制类别", sortable: true },
<!-- { prop: "preparedBy", label: "编制类别", sortable: true }, -->
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "sign", label: "签字" },
@@ -105,7 +105,7 @@ layout("/layouts/platform.html"){
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "教职工类别", sortable: true },
{ prop: "preparedBy", label: "编制类别", sortable: true },
<!-- { prop: "preparedBy", label: "编制类别", sortable: true }, -->
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "sign", label: "签字" },
@@ -95,7 +95,7 @@ layout("/layouts/platform.html"){
{ prop: "sex", label: "性别", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "教职工类别", sortable: true },
{ prop: 'preparedBy', label: '编制类别', sortable: true },
<!-- { prop: 'preparedBy', label: '编制类别', sortable: true }, -->
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
@@ -26,10 +26,10 @@ const COMMON_QUERY = {
<dict-select v-model="pageForm.personTypes" placeholder="请选择教职工类别" @change="doSearch"
code="USER_PERSON_TYPE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="编制类别">
<!-- <search-item label="编制类别">
<dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
</search-item>
</search-item> -->
</search>
`,
store,
@@ -34,10 +34,10 @@ layout("/layouts/platform.html"){
<dict-select v-model="pageForm.personType" placeholder="请选择教职工类别" @change="doSearch"
code="USER_PERSON_TYPE"></dict-select>
</search-item>
<search-item label="编制类别">
<!-- <search-item label="编制类别">
<dict-select v-model="pageForm.preparedBy" placeholder="请选择编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE"></dict-select>
</search-item>
</search-item> -->
<search-item label="更新日期">
<el-date-picker :picker-options="pickerOptions" @change="changeDateRangeChange"
align="right" end-placeholder="结束日期" format="yyyy-MM-dd"
@@ -259,7 +259,7 @@ layout("/layouts/platform.html"){
{ prop: "political", label: "政治面貌", width: 120, sortable: true},
{ prop: "userState", label: "在职状态", width: 120, sortable: true },
{ prop: "personType", label: "教职工类别", width: 120, sortable: true },
{ prop: "preparedBy", label: "编制类别", width: 120, sortable: true },
<!-- { prop: "preparedBy", label: "编制类别", width: 120, sortable: true }, -->
{ prop: "postDoctoralJoinDate", label: "进站时间", sortable: true, checked: 0 },
{ prop: "unionName", label: "所属工会", width: 120, sortable: true },
{ prop: "unitName", label: "所属单位", width: 120, sortable: true },
@@ -69,7 +69,7 @@ layout("/layouts/platform.html"){
{ prop: "sex", label: "性别", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "教职工类别", sortable: true },
{ prop: "preparedBy", label: "编制类别", sortable: true },
<!-- { prop: "preparedBy", label: "编制类别", sortable: true }, -->
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
@@ -41,10 +41,10 @@ const COMMON_QUERY = {
<dict-select v-model="pageForm.personTypes" placeholder="请选择教职工类别" @change="doSearch"
code="USER_PERSON_TYPE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="编制类别">
<!-- <search-item label="编制类别">
<dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
</search-item>
</search-item> -->
</search>
`,
props: {
@@ -208,7 +208,7 @@ layout("/layouts/platform.html"){
{ prop: "sex", label: "性别", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "教职工类别", sortable: true },
{ prop: "preparedBy", label: "编制类别", sortable: true },
<!-- { prop: "preparedBy", label: "编制类别", sortable: true }, -->
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
],
@@ -159,7 +159,7 @@ layout("/layouts/platform.html"){
{ prop: "political", label: "政治面貌", width: 120, sortable: true},
{ prop: "userState", label: "在职状态", width: 120, sortable: true },
{ prop: "personType", label: "教职工类别", width: 120, sortable: true },
{ prop: "preparedBy", label: "编制类别", width: 120, sortable: true },
{ prop: "preparedBy", label: "编制类别", width: 120, sortable: true, checked: 0 },
{ prop: "postDoctoralJoinDate", label: "进站时间", sortable: true, checked: 0 },
{ prop: "unionName", label: "所属工会", width: 120, sortable: true },
{ prop: "unitName", label: "所属单位", width: 120, sortable: true },
@@ -87,7 +87,7 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row query-row-tag">
<!-- <el-row type="flex" align="middle" class="query-row query-row-tag">
<el-col class="query-row-title">编制类别:</el-col>
<el-col class="query-row-content query-row-content-tag">
<el-tag
@@ -110,7 +110,7 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
type="success">全部
</el-link>
</el-col>
</el-row>
</el-row> -->
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-content">
@@ -45,6 +45,7 @@ layout("/layouts/platform_h5.html"){
required></van-field>
<van-field label="工号" :rules="[{ required: true }]" v-model="formData.loginName" readonly
required></van-field>
<van-field label="职称" v-model="formData.professionalTitle" readonly></van-field>
<van-field label="手机号码" name="mobile" :rules="[{ required: true }]" v-model="formData.mobile"
required
placeholder="请输入手机号码"></van-field>
@@ -266,6 +267,9 @@ layout("/layouts/platform_h5.html"){
if (this.bizId) {
this.findOne(this.bizId).then(async data => {
this.formData = data
if (!this.formData.professionalTitle) {
this.$set(this.formData, "professionalTitle", (this.$store.state.user && this.$store.state.user.professionalTitle) || "")
}
//登记类型回显
const registrationType = this.registrationTypeOption.find(v => v.registrationType === data.registrationType)
if (registrationType) {
@@ -293,6 +297,7 @@ layout("/layouts/platform_h5.html"){
userId: id,
userName: username,
loginName: loginname,
professionalTitle: this.$store.state.user.professionalTitle || "",
unitName: unit.name,
unitId: unit.id,
unionName: union.name,
@@ -431,7 +431,7 @@ layout("/layouts/platform_h5.html"){
.then((res) => {
this.typeOptions = JSON.parse(JSON.stringify(res.data))
res.data.forEach((v) => {
this.typeColumns.push({ value: v.id, text: v.name + "(" + v.code + ")" })
this.typeColumns.push({ value: v.id, text: v.name })
})
})
},