人员数据治理调整
This commit is contained in:
+2
-1
@@ -68,7 +68,8 @@ public class PersonApiConfigServiceImpl extends BaseServiceImpl<PersonApiConfig>
|
|||||||
public Pagination pageData(PageForm pageForm, String configName, String sourceType, Boolean enabled) {
|
public Pagination pageData(PageForm pageForm, String configName, String sourceType, Boolean enabled) {
|
||||||
CndPlus cnd = CndPlus.create();
|
CndPlus cnd = CndPlus.create();
|
||||||
cnd.andEX("configName", "like", Strings.isBlank(configName) ? null : "%" + configName + "%");
|
cnd.andEX("configName", "like", Strings.isBlank(configName) ? null : "%" + configName + "%");
|
||||||
cnd.andEX("sourceType", "=", sourceType);
|
// 兼容其他调用方传入空字符串,空来源类型表示不按来源筛选。
|
||||||
|
cnd.andEX("sourceType", "=", Strings.isBlank(sourceType) ? null : sourceType.trim());
|
||||||
cnd.andEX("enabled", "=", enabled);
|
cnd.andEX("enabled", "=", enabled);
|
||||||
// 历史保存可能将删除标记写为NULL;仅明确标记为true的配置不在列表展示。
|
// 历史保存可能将删除标记写为NULL;仅明确标记为true的配置不在列表展示。
|
||||||
cnd.and(Cnd.exps("delFlag", "=", false).or("delFlag", "is", null)).desc("updatedAt");
|
cnd.and(Cnd.exps("delFlag", "=", false).or("delFlag", "is", null)).desc("updatedAt");
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ $.ajaxSetup({
|
|||||||
contentType: "application/x-www-form-urlencoded;charset=utf-8",
|
contentType: "application/x-www-form-urlencoded;charset=utf-8",
|
||||||
success: function (response, textStatus, jqXHR) {
|
success: function (response, textStatus, jqXHR) {
|
||||||
if (response.code !== 0) {
|
if (response.code !== 0) {
|
||||||
this.$message.error(response.msg)
|
// AJAX全局回调没有Vue实例上下文,使用Element全局消息组件展示业务错误。
|
||||||
|
if (window.ELEMENT && ELEMENT.Message) {
|
||||||
|
ELEMENT.Message.error(response.msg)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,15 @@
|
|||||||
methods: {
|
methods: {
|
||||||
pageData() {
|
pageData() {
|
||||||
this.$set(this, 'tableLoading', true)
|
this.$set(this, 'tableLoading', true)
|
||||||
return $.post(loc() + '/pageData', this.pageForm)
|
const params = {
|
||||||
|
pageNumber: this.pageForm.pageNumber,
|
||||||
|
pageSize: this.pageForm.pageSize,
|
||||||
|
}
|
||||||
|
// 未选择的查询条件不提交,避免空来源类型被后端拼成 sourceType=''。
|
||||||
|
if (this.pageForm.configName) params.configName = this.pageForm.configName
|
||||||
|
if (this.pageForm.sourceType) params.sourceType = this.pageForm.sourceType
|
||||||
|
if (this.pageForm.enabled !== '') params.enabled = this.pageForm.enabled
|
||||||
|
return $.post(loc() + '/pageData', params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$set(this, 'tableData', res.data.list)
|
this.$set(this, 'tableData', res.data.list)
|
||||||
|
|||||||
@@ -511,11 +511,37 @@
|
|||||||
this.$set(row, 'matchValue', '')
|
this.$set(row, 'matchValue', '')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 保存前递归检查两类规则树,避免无效规则进入后端后才返回校验异常。
|
||||||
|
validateRuleGroups(groups, ruleName) {
|
||||||
|
let message = ''
|
||||||
|
this.walkGroups(groups, (group) => {
|
||||||
|
if (message) return
|
||||||
|
;(group.conditions || []).some((condition) => {
|
||||||
|
if (!condition.mappedField) {
|
||||||
|
message = ruleName + '规则请选择映射字段'
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (!condition.operator) {
|
||||||
|
message = ruleName + '规则请选择匹配方式'
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return message
|
||||||
|
},
|
||||||
save() {
|
save() {
|
||||||
if (!this.form.configName || !this.form.apiConfigId) {
|
if (!this.form.configName || !this.form.apiConfigId) {
|
||||||
this.notifyWarning('请填写配置名称并选择API配置')
|
this.notifyWarning('请填写配置名称并选择API配置')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const ruleMessage =
|
||||||
|
this.validateRuleGroups(this.ruleGroups.UNION_MEMBER, '工会会员') ||
|
||||||
|
this.validateRuleGroups(this.ruleGroups.WELFARE_MEMBER, '福利会员')
|
||||||
|
if (ruleMessage) {
|
||||||
|
this.notifyWarning(ruleMessage)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$set(this, 'formLoading', true)
|
this.$set(this, 'formLoading', true)
|
||||||
$.post(memberBase + '/save', {
|
$.post(memberBase + '/save', {
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
|
|||||||
Reference in New Issue
Block a user