diff --git a/src/views/modules/communityParty/partyOrg/create.vue b/src/views/modules/communityParty/partyOrg/create.vue
index 868c0de27..511d3bcd2 100644
--- a/src/views/modules/communityParty/partyOrg/create.vue
+++ b/src/views/modules/communityParty/partyOrg/create.vue
@@ -84,8 +84,8 @@
+ placeholder="请输入党组织介绍"
+ v-model="dataForm.description">
@@ -281,13 +281,7 @@ export default {
this.epmetResultResolver.success((data) => {
this.parentPartyOrgs = data;
- if (this.dataForm.partyOrgLevel >= 6) {
- this.xingzhengSelectorVisible = false;
- } else {
- this.xingzhengSelectorVisible = true;
- }
- })
- .parse(rst);
+ }).parse(rst);
},
/**
@@ -300,10 +294,17 @@ export default {
this.loadParentPartyOrgs(this.dataForm.partyOrgLevel);
}
- // 如果新增下级组织,那么在选了level之后,要加载行政组织
+ // 如果是新增下级组织,那么在选了level之后,要加载行政组织
if (this.operation === 'createSubOrg') {
this.loadXingzhengOrgs();
}
+
+ // 级别为党总支及以下,则隐藏行政组织下拉框
+ if (this.dataForm.partyOrgLevel >= 6) {
+ this.xingzhengSelectorVisible = false;
+ } else {
+ this.xingzhengSelectorVisible = true;
+ }
},
/**
@@ -316,7 +317,12 @@ export default {
return;
}
- this.loadXingzhengOrgs();
+ await this.loadXingzhengOrgs();
+
+ if (this.dataForm.partyOrgPid === '0') {
+ // 根级党组织
+ this.dataForm.orgId = this.xingzhengOrgs[0].orgId;
+ }
},
/**
@@ -357,6 +363,8 @@ export default {
this.visible = false;
this.$emit("update:visiable", false);
this.initForm();
+ this.$refs.dataForm.resetFields();
+ this.xingzhengSelectorVisible = true;
},
/**
@@ -368,8 +376,6 @@ export default {
this.$refs.dataForm.validate((success) => {
if (success) {
this.submitCreatePartyOrg();
-
- this.$emit('refreshTree');
}
});
},
diff --git a/src/views/modules/communityParty/partyOrg/orgTree.vue b/src/views/modules/communityParty/partyOrg/orgTree.vue
index d3c307c7c..44d53522e 100644
--- a/src/views/modules/communityParty/partyOrg/orgTree.vue
+++ b/src/views/modules/communityParty/partyOrg/orgTree.vue
@@ -207,7 +207,7 @@ export default {
handleUpdateBtnClick(row) {
this.updateDlgShow = true;
this.$nextTick(() => {
- this.$refs['updateOrg'].init(row.id);
+ this.$refs['updateOrg'].init(row.id, row.partyOrgLevel);
});
},
diff --git a/src/views/modules/communityParty/partyOrg/update.vue b/src/views/modules/communityParty/partyOrg/update.vue
index b939b7572..92ec1a865 100644
--- a/src/views/modules/communityParty/partyOrg/update.vue
+++ b/src/views/modules/communityParty/partyOrg/update.vue
@@ -22,7 +22,8 @@
+ label="行政组织"
+ v-show="xingzhengSelectorVisible">
{{ this.orgName }}
@@ -120,6 +121,7 @@ export default {
mapSearchResultList: [], // 地图搜索结果列表
epmetResultResolver: null, // epmet请求结果解析器
visible: false,
+ xingzhengSelectorVisible: true, // 行政组织是否可见
}
},
mounted () {
@@ -132,7 +134,7 @@ export default {
* @param parentPartyOrgId 非必填,父党组织级别的ID,在添加下级党组织的时候传递,否则为空
* @returns {Promise}
*/
- async init (partyOrgId) {
+ async init (partyOrgId, partyOrgLevel) {
this.visible = true;
// 加载党组织简要信息
@@ -140,7 +142,6 @@ export default {
await this.getPartyOrgDetail(partyOrgId).then((poi) => {
partyOrgInfo = poi;
});
- console.info("党组织简要信息:", partyOrgInfo);
this.orgName = partyOrgInfo.orgName;
this.orgId = partyOrgInfo.orgId;
@@ -153,6 +154,12 @@ export default {
this.dataForm.longitude = partyOrgInfo.longitude;
this.dataForm.latitude = partyOrgInfo.latitude;
this.dataForm.address = partyOrgInfo.address;
+
+ if (partyOrgLevel >= 6) {
+ this.xingzhengSelectorVisible = false;
+ } else {
+ this.xingzhengSelectorVisible = true;
+ }
/** ● 加载负责人 **/
await this.loadPrincipals();
@@ -239,6 +246,7 @@ export default {
this.visible = false;
this.$emit("update:visiable", false);
this.initForm();
+ this.$refs.dataForm.resetFields();
},
/**