|
@ -1,155 +1,120 @@ |
|
|
<template> |
|
|
<template> |
|
|
<el-dialog |
|
|
<el-dialog :visible.sync="visible" |
|
|
:visible.sync="visible" |
|
|
:title="!dataForm.id ? '新增党组织' : '更新党组织'" |
|
|
:title="!dataForm.id ? '新增党组织' : '更新党组织'" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-press-escape="false"> |
|
|
:close-on-press-escape="false" |
|
|
<el-form class="form" |
|
|
> |
|
|
:model="dataForm" |
|
|
<el-form |
|
|
:rules="dataRule" |
|
|
class="form" |
|
|
ref="dataForm" |
|
|
:model="dataForm" |
|
|
@keyup.enter.native="dataFormSubmitHandle()" |
|
|
:rules="dataRule" |
|
|
:label-width="$i18n.locale === 'en-US' ? '120px' : '100px'"> |
|
|
ref="dataForm" |
|
|
<el-form-item prop="partyOrgType" |
|
|
@keyup.enter.native="dataFormSubmitHandle()" |
|
|
label="党组织类型"> |
|
|
:label-width="$i18n.locale === 'en-US' ? '120px' : '100px'" |
|
|
<el-select :disabled="dataForm.id || dataForm.orgId ? true : false" |
|
|
> |
|
|
v-model="dataForm.partyOrgType" |
|
|
<el-form-item prop="partyOrgType" label="党组织类型"> |
|
|
@change="changePartyOrgType" |
|
|
<el-select |
|
|
clearable |
|
|
:disabled="dataForm.id || dataForm.orgId ? true : false" |
|
|
placeholder="请选择党组织类型"> |
|
|
v-model="dataForm.partyOrgType" |
|
|
<el-option v-for="item in partyOrgTypeList" |
|
|
@change="changePartyOrgType" |
|
|
:key="item.value" |
|
|
clearable |
|
|
:label="item.name" |
|
|
placeholder="请选择党组织类型" |
|
|
:value="item.value"> |
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in partyOrgTypeList" |
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item prop="partyOrgName" label="党组织名称"> |
|
|
<el-form-item prop="partyOrgName" |
|
|
<el-input |
|
|
label="党组织名称"> |
|
|
v-model="dataForm.partyOrgName" |
|
|
<el-input v-model="dataForm.partyOrgName" |
|
|
placeholder="请输入党组织名称" |
|
|
placeholder="请输入党组织名称" |
|
|
style="width: 300px" |
|
|
style="width: 300px"></el-input> |
|
|
></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="党组织编码" prop="partyOrgCode"> |
|
|
<el-form-item label="党组织编码" |
|
|
<el-input |
|
|
prop="partyOrgCode"> |
|
|
v-model="dataForm.partyOrgCode" |
|
|
<el-input v-model="dataForm.partyOrgCode" |
|
|
placeholder="党组织编码" |
|
|
placeholder="党组织编码" |
|
|
style="width: 300px" |
|
|
style="width: 300px"></el-input> |
|
|
></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item v-if="dataForm.partyOrgType != '5'" |
|
|
v-if="dataForm.partyOrgType != '5'" |
|
|
prop="agencyId" |
|
|
prop="agencyId" |
|
|
label="行政组织"> |
|
|
label="行政组织" |
|
|
<el-cascader style="width: 300px" |
|
|
> |
|
|
v-model="dataForm.agencyId" |
|
|
<el-cascader |
|
|
:options="agencyOrgList" |
|
|
style="width: 300px" |
|
|
placeholder="请选择行政组织" |
|
|
v-model="dataForm.agencyId" |
|
|
:props="{ |
|
|
:options="agencyOrgList" |
|
|
|
|
|
placeholder="请选择行政组织" |
|
|
|
|
|
:props="{ |
|
|
|
|
|
emitPath: false, |
|
|
emitPath: false, |
|
|
checkStrictly: true, |
|
|
checkStrictly: true, |
|
|
label: 'name', |
|
|
label: 'name', |
|
|
value: 'id', |
|
|
value: 'id', |
|
|
children: 'children', |
|
|
children: 'children', |
|
|
}" |
|
|
}" |
|
|
:disabled="dataForm.id ? true : false" |
|
|
:disabled="dataForm.id ? true : false" |
|
|
:show-all-levels="false" |
|
|
:show-all-levels="false" |
|
|
@change="changeAgencyOrg" |
|
|
@change="changeAgencyOrg" |
|
|
clearable |
|
|
clearable /> |
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item v-if="!dataForm.sjdzzName" |
|
|
v-if="!dataForm.sjdzzName" |
|
|
prop="mySelectOrg" |
|
|
prop="mySelectOrg" |
|
|
label="上级党组织"> |
|
|
label="上级党组织" |
|
|
<el-cascader ref="myOrg" |
|
|
> |
|
|
style="width: 300px" |
|
|
<el-cascader |
|
|
v-model="dataForm.mySelectOrg" |
|
|
ref="myOrg" |
|
|
:options="orgList" |
|
|
style="width: 300px" |
|
|
placeholder="请选择上级党组织" |
|
|
v-model="dataForm.mySelectOrg" |
|
|
:props="{ |
|
|
:options="orgList" |
|
|
|
|
|
placeholder="请选择上级党组织" |
|
|
|
|
|
:props="{ |
|
|
|
|
|
checkStrictly: true, |
|
|
checkStrictly: true, |
|
|
label: 'partyOrgName', |
|
|
label: 'partyOrgName', |
|
|
value: 'id', |
|
|
value: 'id', |
|
|
children: 'children', |
|
|
children: 'children', |
|
|
}" |
|
|
}" |
|
|
@change="handleChangeOrg" |
|
|
@change="handleChangeOrg" |
|
|
:disabled="dataForm.id || dataForm.orgId ? true : false" |
|
|
:disabled="dataForm.id || dataForm.orgId ? true : false" |
|
|
clearable |
|
|
clearable /> |
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item v-if="dataForm.sjdzzName" label="上级党组织"> |
|
|
<el-form-item v-if="dataForm.sjdzzName" |
|
|
<el-input |
|
|
label="上级党组织"> |
|
|
:disabled="true" |
|
|
<el-input :disabled="true" |
|
|
v-model="dataForm.sjdzzName" |
|
|
v-model="dataForm.sjdzzName" |
|
|
style="width: 300px" |
|
|
style="width: 300px"></el-input> |
|
|
></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="党组织介绍" prop="introduction"> |
|
|
<el-form-item label="党组织介绍" |
|
|
<el-input |
|
|
prop="introduction"> |
|
|
style="width: 300px" |
|
|
<el-input style="width: 300px" |
|
|
v-model="dataForm.introduction" |
|
|
v-model="dataForm.introduction" |
|
|
type="textarea" |
|
|
type="textarea" |
|
|
maxlength="500" |
|
|
maxlength="500" |
|
|
placeholder="党组织介绍" |
|
|
placeholder="党组织介绍"></el-input> |
|
|
></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="党组织位置" prop="longitude" style="display: block"> |
|
|
<el-form-item label="地图位置" |
|
|
<div class="item_width_1"> |
|
|
prop="longitude" |
|
|
<div class="div_map"> |
|
|
label-width="150px" |
|
|
<div id="app"></div> |
|
|
style="display: block"> |
|
|
<div style="display: none" id="mapSeach_id" class="div_searchmap"> |
|
|
<div style="width: 500px"> |
|
|
<el-input |
|
|
<el-select v-model="searchValue" |
|
|
class="item_width_4" |
|
|
filterable |
|
|
maxlength="50" |
|
|
style="width: 500px" |
|
|
size="mini" |
|
|
remote |
|
|
placeholder="请输入关键字" |
|
|
:reserve-keyword="true" |
|
|
v-model="keyWords" |
|
|
placeholder="请输入关键词" |
|
|
> |
|
|
:remote-method="remoteMethod" |
|
|
</el-input> |
|
|
:loading="loading"> |
|
|
<el-button |
|
|
<el-option v-for="(item,index) in searchOptions" |
|
|
style="margin-left: 10px" |
|
|
@click.native="handleClickKey(index)" |
|
|
type="primary" |
|
|
:key="item.value" |
|
|
size="mini" |
|
|
:label="item.label" |
|
|
@click="handleSearchMap" |
|
|
:value="item.value"> |
|
|
>查询</el-button |
|
|
</el-option> |
|
|
> |
|
|
</el-select> |
|
|
</div> |
|
|
<div id="app_icparty" |
|
|
</div> |
|
|
class="div_map"></div> |
|
|
|
|
|
|
|
|
<!-- <div id="lon_lat_id" style="margin-top: 10px; display: none"> |
|
|
|
|
|
<span>经度</span> |
|
|
|
|
|
<el-input class="item_width_3" |
|
|
|
|
|
maxlength="50" |
|
|
|
|
|
placeholder="请输入经度" |
|
|
|
|
|
:readonly="true" |
|
|
|
|
|
v-model="dataForm.longitude"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
<span style="margin-left: 20px">纬度</span> |
|
|
|
|
|
<el-input class="item_width_3" |
|
|
|
|
|
maxlength="50" |
|
|
|
|
|
placeholder="请输入纬度" |
|
|
|
|
|
:readonly="true" |
|
|
|
|
|
v-model="dataForm.latitude"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</div> --> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<template slot="footer"> |
|
|
<template slot="footer"> |
|
|
<el-button @click="visible = false">{{ $t("cancel") }}</el-button> |
|
|
<el-button @click="visible = false">{{ $t("cancel") }}</el-button> |
|
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ |
|
|
<el-button type="primary" |
|
|
|
|
|
@click="dataFormSubmitHandle()">{{ |
|
|
$t("confirm") |
|
|
$t("confirm") |
|
|
}}</el-button> |
|
|
}}</el-button> |
|
|
</template> |
|
|
</template> |
|
@ -157,6 +122,8 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import daiMap from "@/utils/dai-map"; |
|
|
|
|
|
|
|
|
var map; |
|
|
var map; |
|
|
var search; |
|
|
var search; |
|
|
var markers; |
|
|
var markers; |
|
@ -165,7 +132,7 @@ var geocoder; // 新建一个正逆地址解析类 |
|
|
import debounce from "lodash/debounce"; |
|
|
import debounce from "lodash/debounce"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
visible: false, |
|
|
visible: false, |
|
|
keyWords: "", |
|
|
keyWords: "", |
|
@ -201,7 +168,7 @@ export default { |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
init() { |
|
|
init () { |
|
|
this.visible = true; |
|
|
this.visible = true; |
|
|
this.agencyId = localStorage.getItem("agencyId"); |
|
|
this.agencyId = localStorage.getItem("agencyId"); |
|
|
this.dataForm.customerId = localStorage.getItem("customerId"); |
|
|
this.dataForm.customerId = localStorage.getItem("customerId"); |
|
@ -238,7 +205,7 @@ export default { |
|
|
// }) |
|
|
// }) |
|
|
}, |
|
|
}, |
|
|
// 设置组织类型 新增党组织 |
|
|
// 设置组织类型 新增党组织 |
|
|
setPartyOrgType_xzxj() { |
|
|
setPartyOrgType_xzxj () { |
|
|
if (this.dataForm.partyOrgType === "0") { |
|
|
if (this.dataForm.partyOrgType === "0") { |
|
|
// 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|
|
// 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|
|
this.dataForm.partyOrgType = "1"; |
|
|
this.dataForm.partyOrgType = "1"; |
|
@ -253,7 +220,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//设置组织类型 |
|
|
//设置组织类型 |
|
|
setPartyOrgType() { |
|
|
setPartyOrgType () { |
|
|
// 社区级:community,街道级:street,区县级: district,市级: city 省级:province |
|
|
// 社区级:community,街道级:street,区县级: district,市级: city 省级:province |
|
|
// 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|
|
// 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|
|
this.level = localStorage.getItem("level") |
|
|
this.level = localStorage.getItem("level") |
|
@ -297,14 +264,14 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 选中行政组织 |
|
|
// 选中行政组织 |
|
|
changeAgencyOrg() { |
|
|
changeAgencyOrg () { |
|
|
if (!this.dataForm.orgId) { |
|
|
if (!this.dataForm.orgId) { |
|
|
// 有orgId 证明是从新增下级过来的,新增下级操作 上级党组织不需要查询 |
|
|
// 有orgId 证明是从新增下级过来的,新增下级操作 上级党组织不需要查询 |
|
|
this.getOrgList(); |
|
|
this.getOrgList(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 选中组织类型 组织类型为支部时不需要选择行政组织 |
|
|
// 选中组织类型 组织类型为支部时不需要选择行政组织 |
|
|
changePartyOrgType(value) { |
|
|
changePartyOrgType (value) { |
|
|
if (value == "5") { |
|
|
if (value == "5") { |
|
|
// 支部 不选择行政组织 |
|
|
// 支部 不选择行政组织 |
|
|
this.dataForm.agencyId = localStorage.getItem("agencyId"); |
|
|
this.dataForm.agencyId = localStorage.getItem("agencyId"); |
|
@ -329,7 +296,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 获取上级党组织列表 |
|
|
// 获取上级党组织列表 |
|
|
getOrgList() { |
|
|
getOrgList () { |
|
|
if (!this.dataForm.id) { |
|
|
if (!this.dataForm.id) { |
|
|
// 修改不做处理 |
|
|
// 修改不做处理 |
|
|
this.orgList = []; |
|
|
this.orgList = []; |
|
@ -352,9 +319,9 @@ export default { |
|
|
} |
|
|
} |
|
|
this.orgList = this.removeEmptyChildren(res.data); |
|
|
this.orgList = this.removeEmptyChildren(res.data); |
|
|
}) |
|
|
}) |
|
|
.catch(() => {}); |
|
|
.catch(() => { }); |
|
|
}, |
|
|
}, |
|
|
removeEmptyChildren(orgArray) { |
|
|
removeEmptyChildren (orgArray) { |
|
|
orgArray.forEach((orgInfo) => { |
|
|
orgArray.forEach((orgInfo) => { |
|
|
if (orgInfo && orgInfo.children) { |
|
|
if (orgInfo && orgInfo.children) { |
|
|
if (orgInfo.children.length === 0) { |
|
|
if (orgInfo.children.length === 0) { |
|
@ -367,7 +334,7 @@ export default { |
|
|
return orgArray; |
|
|
return orgArray; |
|
|
}, |
|
|
}, |
|
|
// 党组织选中事件 |
|
|
// 党组织选中事件 |
|
|
handleChangeOrg(e) { |
|
|
handleChangeOrg (e) { |
|
|
if (this.dataForm.mySelectOrg.length > 0 && this.dataForm.mySelectOrg) { |
|
|
if (this.dataForm.mySelectOrg.length > 0 && this.dataForm.mySelectOrg) { |
|
|
this.dataForm.orgPid = |
|
|
this.dataForm.orgPid = |
|
|
this.dataForm.mySelectOrg[this.dataForm.mySelectOrg.length - 1]; |
|
|
this.dataForm.mySelectOrg[this.dataForm.mySelectOrg.length - 1]; |
|
@ -384,7 +351,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 获取信息 |
|
|
// 获取信息 |
|
|
getInfo() { |
|
|
getInfo () { |
|
|
this.$http |
|
|
this.$http |
|
|
.get(`/resi/partymember/icPartyOrg/${this.dataForm.id}`) |
|
|
.get(`/resi/partymember/icPartyOrg/${this.dataForm.id}`) |
|
|
.then(({ data: res }) => { |
|
|
.then(({ data: res }) => { |
|
@ -407,9 +374,9 @@ export default { |
|
|
this.getOrgList(); |
|
|
this.getOrgList(); |
|
|
this.initMap(); |
|
|
this.initMap(); |
|
|
}) |
|
|
}) |
|
|
.catch(() => {}); |
|
|
.catch(() => { }); |
|
|
}, |
|
|
}, |
|
|
getInfoAgencyLisy() { |
|
|
getInfoAgencyLisy () { |
|
|
this.$http |
|
|
this.$http |
|
|
.get("/gov/org/customeragency/getOrgTreeByUserAndType", { |
|
|
.get("/gov/org/customeragency/getOrgTreeByUserAndType", { |
|
|
params: { |
|
|
params: { |
|
@ -425,10 +392,10 @@ export default { |
|
|
} |
|
|
} |
|
|
this.agencyOrgList = this.removeEmptyChildren(res.data); |
|
|
this.agencyOrgList = this.removeEmptyChildren(res.data); |
|
|
}) |
|
|
}) |
|
|
.catch(() => {}); |
|
|
.catch(() => { }); |
|
|
}, |
|
|
}, |
|
|
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|
|
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|
|
initMap() { |
|
|
initMap () { |
|
|
document.getElementById("app").innerHTML = ""; |
|
|
document.getElementById("app").innerHTML = ""; |
|
|
if (document.getElementById("app")) { |
|
|
if (document.getElementById("app")) { |
|
|
document.getElementById("mapSeach_id").style.display = "block"; |
|
|
document.getElementById("mapSeach_id").style.display = "block"; |
|
@ -465,7 +432,7 @@ export default { |
|
|
this.handleMoveCenter(); |
|
|
this.handleMoveCenter(); |
|
|
this.convert(); |
|
|
this.convert(); |
|
|
}, |
|
|
}, |
|
|
setMarker(lat, lng) { |
|
|
setMarker (lat, lng) { |
|
|
markers.setGeometries([]); |
|
|
markers.setGeometries([]); |
|
|
markers.add([ |
|
|
markers.add([ |
|
|
{ |
|
|
{ |
|
@ -479,7 +446,7 @@ export default { |
|
|
]); |
|
|
]); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handleSearchMap() { |
|
|
handleSearchMap () { |
|
|
infoWindowList.forEach((infoWindow) => { |
|
|
infoWindowList.forEach((infoWindow) => { |
|
|
infoWindow.close(); |
|
|
infoWindow.close(); |
|
|
}); |
|
|
}); |
|
@ -510,7 +477,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handleMoveCenter() { |
|
|
handleMoveCenter () { |
|
|
//修改地图中心点 |
|
|
//修改地图中心点 |
|
|
const center = map.getCenter(); |
|
|
const center = map.getCenter(); |
|
|
const lat = center.getLat(); |
|
|
const lat = center.getLat(); |
|
@ -526,7 +493,7 @@ export default { |
|
|
this.convert(lat, lng); |
|
|
this.convert(lat, lng); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
convert(lat, lng) { |
|
|
convert (lat, lng) { |
|
|
markers.setGeometries([]); |
|
|
markers.setGeometries([]); |
|
|
// var input = document.getElementById('location').value.split(':'); |
|
|
// var input = document.getElementById('location').value.split(':'); |
|
|
let location; |
|
|
let location; |
|
@ -574,8 +541,8 @@ export default { |
|
|
res.internalMsg |
|
|
res.internalMsg |
|
|
? res.internalMsg |
|
|
? res.internalMsg |
|
|
: res.msg |
|
|
: res.msg |
|
|
? res.msg |
|
|
? res.msg |
|
|
: "查询失败" |
|
|
: "查询失败" |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
this.$message({ |
|
|
this.$message({ |
|
@ -588,7 +555,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
}) |
|
|
}) |
|
|
.catch(() => {}); |
|
|
.catch(() => { }); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
1000, |
|
|
1000, |
|
@ -596,7 +563,7 @@ export default { |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
dataRule() { |
|
|
dataRule () { |
|
|
return { |
|
|
return { |
|
|
partyOrgName: [ |
|
|
partyOrgName: [ |
|
|
{ required: true, message: "党组织名称不能为空", trigger: "blur" }, |
|
|
{ required: true, message: "党组织名称不能为空", trigger: "blur" }, |
|
|