|
|
|
@ -42,12 +42,13 @@ |
|
|
|
placeholder="请选择上级党组织" |
|
|
|
:props="{ checkStrictly: true, label: 'partyOrgName', value: 'id', children: 'children' }" |
|
|
|
@change="handleChangeOrg" |
|
|
|
:disabled="dataForm.id || dataForm.orgId ? true : false" |
|
|
|
clearable /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="党组织介绍" prop="introduction"> |
|
|
|
<el-input style="width:300px" v-model="dataForm.introduction" type="textarea" maxlength="500" placeholder="党组织介绍"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="位置坐标" |
|
|
|
<el-form-item label="党组织位置" |
|
|
|
prop="longitude" |
|
|
|
style="display: block"> |
|
|
|
<div class="item_width_1"> |
|
|
|
@ -70,7 +71,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div id="lon_lat_id" style="margin-top: 10px; display: none"> |
|
|
|
<!-- <div id="lon_lat_id" style="margin-top: 10px; display: none"> |
|
|
|
<span>经度</span> |
|
|
|
<el-input class="item_width_3" |
|
|
|
maxlength="50" |
|
|
|
@ -85,7 +86,7 @@ |
|
|
|
:readonly="true" |
|
|
|
v-model="dataForm.latitude"> |
|
|
|
</el-input> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
@ -123,7 +124,7 @@ |
|
|
|
latitude: '', //纬度 |
|
|
|
address: '', |
|
|
|
introduction: '', // 党组织介绍 |
|
|
|
|
|
|
|
orgId: '', |
|
|
|
customerId: '', |
|
|
|
staffId:'', |
|
|
|
orgPidName: '', |
|
|
|
@ -159,8 +160,8 @@ |
|
|
|
this.getInfo() |
|
|
|
} else { |
|
|
|
this.initMap() |
|
|
|
if(this.dataForm.orgPids) { |
|
|
|
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(':') |
|
|
|
if(this.dataForm.orgId) { |
|
|
|
this.dataForm.mySelectOrg = this.dataForm.orgId |
|
|
|
} else { |
|
|
|
this.dataForm.mySelectOrg = '' |
|
|
|
} |
|
|
|
@ -220,7 +221,7 @@ |
|
|
|
} |
|
|
|
this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType', {params: {agencyId: this.agencyId, orgType:value}}).then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
|
} |
|
|
|
this.agencyOrgList = this.removeEmptyChildren(res.data) |
|
|
|
}).catch(() => {}) |
|
|
|
@ -229,8 +230,8 @@ |
|
|
|
getOrgList() { |
|
|
|
return this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: {agencyId: this.agencyId}}).then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
|
} |
|
|
|
this.orgList = this.removeEmptyChildren(res.data) |
|
|
|
this.orgList.unshift({ |
|
|
|
partyOrgName: '一级组织', |
|
|
|
@ -268,14 +269,16 @@ |
|
|
|
getInfo() { |
|
|
|
this.$http.get(`/resi/partymember/icPartyOrg/${this.dataForm.id}`).then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
|
} |
|
|
|
this.dataForm = { |
|
|
|
...this.dataForm, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
// 党组织组织 |
|
|
|
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(':') |
|
|
|
this.dataForm.mySelectOrg = this.dataForm.id |
|
|
|
// this.dataForm.mySelectOrg.push(this.dataForm.id) |
|
|
|
console.log(JSON.stringify(this.dataForm.mySelectOrg)) |
|
|
|
// 行政组织 |
|
|
|
this.dataForm.agencyId = this.dataForm.agencyId |
|
|
|
this.initMap() |
|
|
|
@ -292,7 +295,7 @@ |
|
|
|
orgType:this.dataForm.partyOrgType} |
|
|
|
}).then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
|
} |
|
|
|
this.agencyOrgList = res.data |
|
|
|
}).catch(() => { |
|
|
|
@ -308,7 +311,7 @@ |
|
|
|
document.getElementById('app').innerHTML = '' |
|
|
|
if (document.getElementById('app')) { |
|
|
|
document.getElementById('mapSeach_id').style.display = "block" |
|
|
|
document.getElementById('lon_lat_id').style.display = "block" |
|
|
|
// document.getElementById('lon_lat_id').style.display = "block" |
|
|
|
} |
|
|
|
|
|
|
|
// 定义地图中心点坐标 |
|
|
|
@ -416,13 +419,16 @@ |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
|
if (!this.dataForm.latitude || !this.dataForm.longitude) { |
|
|
|
return this.$message.error('请滑动地图选择党组织位置') |
|
|
|
} |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|
if (!valid) { |
|
|
|
return false |
|
|
|
} |
|
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/resi/partymember/icPartyOrg/', this.dataForm).then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
@ -450,13 +456,6 @@ |
|
|
|
partyOrgType: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
], |
|
|
|
|
|
|
|
longitude: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
], |
|
|
|
latitude: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
], |
|
|
|
agencyId: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
] |
|
|
|
|