dai 4 years ago
parent
commit
cc24e94a53
  1. 34
      src/views/components/resiForm.vue
  2. 19
      src/views/modules/communityParty/members/crateForm.vue
  3. 18
      src/views/modules/communityParty/regionalParty/unitsForm.vue
  4. 18
      src/views/modules/communityService/ninePlaces/places/placesForm.vue
  5. 385
      src/views/modules/communityService/sqzzz/cpts/edit.vue
  6. 24
      src/views/modules/partymember/icpartymemberpayrecorddetail.vue
  7. 19
      src/views/modules/partymember/icpartymemberpoint.vue
  8. 111
      src/views/modules/partymember/icpartyorg-add-or-update.vue
  9. 33
      src/views/modules/partymember/icpartyorgtree.vue
  10. 532
      src/views/modules/partymember/lookMember.vue
  11. 26
      src/views/modules/visual/communityParty/community.vue
  12. 5
      src/views/modules/visual/communityParty/gridParty.vue
  13. 14
      src/views/modules/visual/communityParty/options.js
  14. 162
      src/views/modules/visual/communityParty/party.vue
  15. 6
      src/views/modules/visual/components/screen-map/index.vue

34
src/views/components/resiForm.vue

@ -297,18 +297,27 @@ export default {
let initForm = (obj, arr) => {
let _form = {}
console.log('formInfo---obj', obj)
if (Object.keys(obj).length > 0) {
for(const n in obj) {
if (obj[n] == null) obj[n] = ''
}
_form = { ...obj }
return _form
}
// if (Object.keys(obj).length > 0) {
// for(const n in obj) {
// if (obj[n] == null) obj[n] = ''
// }
// _form = { ...obj }
// return _form
// }
const len = Object.keys(obj).length
arr.forEach(item => {
if (item.multiSelect) _form[item.columnName] = []
else if (item.itemType == 'radio' && item.defaultValue == '0') _form[item.columnName] = item.defaultValue
else _form[item.columnName] = ''
if (len) {
if (obj[item.columnName]) {
_form[item.columnName] = obj[item.columnName]
item.isChange = true
}
} else {
if (item.multiSelect) _form[item.columnName] = []
else if (item.itemType == 'radio' && item.defaultValue == '0') _form[item.columnName] = item.defaultValue
else _form[item.columnName] = ''
}
// if (item.optionSourceType === 'remote') {
// this.getOptionsLists(item.optionSourceValue).then(res => {
@ -343,9 +352,10 @@ export default {
let rules = initRules(this.formList)
console.log('rulessss', rules)
let tempFormList = [ ...this.formList ].map(item => {
const isChange = (item.itemType == 'radio' && item.defaultValue == '0') && true
return {
...item,
isChange: (item.itemType == 'radio' && item.defaultValue == '0') ? true : false
isChange: isChange || item.isChange || false
}
})
let constForm = {

19
src/views/modules/communityParty/members/crateForm.vue

@ -1,12 +1,12 @@
<template>
<div class="dialog-h-content scroll-h pd0">
<el-form label-width="120px" :model="form" :inline="true"
:disabled="disabled":rules="rules" ref="ruleForm"
:disabled="disabled" :rules="rules" ref="ruleForm"
class="form-wr">
<div class="flex-div">
<el-form-item label="所属党组织" prop="sszb" class="wd50">
<el-cascader
v-model="partyOrgs"
v-model="form.sszb"
:options="partyList"
:props="partyProps"
clearable
@ -188,7 +188,8 @@ export default {
partymenberid: '',
partyProps: {
label: 'partyOrgName',
value: 'id'
value: 'id',
emitPath: false
},
zwList: [
{
@ -239,8 +240,9 @@ export default {
handler(val) {
if (Object.keys(val).length > 0) {
this.form = { ...val }
if (val.icResiUserId) this.isAuto = true
if (val.icResiUserId || val.icResiUser) this.isAuto = true
console.log('val----------in', val)
console.log('isAuto----------in', this.isAuto)
this.partyOrgs = val.orgPids.split(':')
console.log('partyOrgs-----', this.partyOrgs)
this.partymenberid = val.id
@ -251,6 +253,7 @@ export default {
},
created() {
this.getEduList()
console.log('partyList', this.partyList)
},
mounted() {
const w = document.getElementsByClassName('dialog-h-content')[0]
@ -266,10 +269,10 @@ export default {
},
handlePartyChange(val) {
console.log('val------pp', val)
if (val.length > 0) {
const i = val.length - 1
this.form.sszb = val[i]
} else this.form.sszb = ''
// if (val.length > 0) {
// const i = val.length - 1
// this.form.sszb = val[i]
// } else this.form.sszb = ''
},
handleValidBlur(n) {
if (!isCard(this.form.idCard)) return

18
src/views/modules/communityParty/regionalParty/unitsForm.vue

@ -287,15 +287,15 @@ export default {
},
async addUnit () {
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (regPhone.test(this.formData.contactMobile) === false) {
this.btnDisable = false
this.$message({
type: 'warning',
message: '请输入正确的手机号码'
})
return false;
}
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
// if (regPhone.test(this.formData.contactMobile) === false) {
// this.btnDisable = false
// this.$message({
// type: 'warning',
// message: ''
// })
// return false;
// }
let url = '/heart/icpartyunit/save'
// let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/save"

18
src/views/modules/communityService/ninePlaces/places/placesForm.vue

@ -197,15 +197,15 @@ export default {
},
async addPlace () {
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (regPhone.test(this.formData.mobile) === false) {
this.btnDisable = false
this.$message({
type: 'warning',
message: '请输入正确的手机号码'
})
return false;
}
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
// if (regPhone.test(this.formData.mobile) === false) {
// this.btnDisable = false
// this.$message({
// type: 'warning',
// message: ''
// })
// return false;
// }
let url = ''

385
src/views/modules/communityService/sqzzz/cpts/edit.vue

@ -1,243 +1,185 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form
ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form"
>
<el-form-item
label="组织名称 "
prop="organizationName"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入组织名称 "
v-model="dataForm.organizationName"
>
<el-form ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="组织名称 "
prop="organizationName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入组织名称 "
v-model="dataForm.organizationName">
</el-input>
</el-form-item>
<el-form-item
label="分类名称 "
prop="categoryCode"
label-width="150px"
style="display: block"
>
<el-select
v-model="dataForm.categoryCode"
placeholder="请选择"
clearable
>
<el-option
v-for="item in categoryList"
:key="item.value"
:label="item.label"
:value="item.value"
>
<el-form-item label="分类名称 "
prop="categoryCode"
label-width="150px"
style="display: block">
<el-select v-model="dataForm.categoryCode"
placeholder="请选择"
clearable>
<el-option v-for="item in categoryList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="组织人数 "
prop="organizationPersonCount"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
type="number"
maxlength="50"
show-word-limit
placeholder="请输入组织人数 "
v-model="dataForm.organizationPersonCount"
>
<el-form-item label="组织人数 "
prop="organizationPersonCount"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="number"
maxlength="50"
show-word-limit
placeholder="请输入组织人数 "
v-model="dataForm.organizationPersonCount">
</el-input>
</el-form-item>
<el-form-item
label="组织成员 "
prop="organizationPersonnel"
label-width="150px"
style="display: block"
>
<el-form-item label="组织成员 "
prop="organizationPersonnel"
label-width="150px"
style="display: block">
<div class="m-staffs">
<div
class="item"
:key="'staff' + index"
v-for="(item, index) in dataForm.organizationPersonnel"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="成员姓名"
v-model="item.personName"
/>
<el-input
style="margin-left: 10px"
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="联系电话"
v-model="item.personPhone"
/>
<el-button
style="margin-left: 10px"
size="small"
@click="handleDelStaff(index)"
>删除</el-button
>
<div class="item"
:key="'staff' + index"
v-for="(item, index) in dataForm.organizationPersonnel">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="成员姓名"
v-model="item.personName" />
<el-input style="margin-left: 10px"
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="联系电话"
v-model="item.personPhone" />
<el-button style="margin-left: 10px"
size="small"
@click="handleDelStaff(index)">删除</el-button>
</div>
<div class="item-add">
<el-button size="small" @click="handleAddStaff">添加</el-button>
<el-button size="small"
@click="handleAddStaff">添加</el-button>
</div>
</div>
</el-form-item>
<el-form-item
label="服务事项"
prop="serviceItem"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
type="textarea"
maxlength="1000"
show-word-limit
:rows="3"
placeholder="请输入服务事项,不超过1000字"
v-model="dataForm.serviceItem"
></el-input>
<el-form-item label="服务事项"
prop="serviceItem"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="1000"
show-word-limit
:rows="3"
placeholder="请输入服务事项,不超过1000字"
v-model="dataForm.serviceItem"></el-input>
</el-form-item>
<el-form-item
label="负责人 "
prop="principalName"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入负责人 "
v-model="dataForm.principalName"
>
<el-form-item label="负责人 "
prop="principalName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入负责人 "
v-model="dataForm.principalName">
</el-input>
</el-form-item>
<el-form-item
label="联系电话 "
prop="principalPhone"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入联系电话 "
v-model="dataForm.principalPhone"
>
<el-form-item label="联系电话 "
prop="principalPhone"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入联系电话 "
v-model="dataForm.principalPhone">
</el-input>
</el-form-item>
<el-form-item
label="创建时间"
prop="organizationCreatedTime"
label-width="150px"
style="display: block"
>
<el-date-picker
v-model="dataForm.organizationCreatedTime"
placeholder="创建时间"
value-format="yyyy-MM-dd"
>
<el-form-item label="创建时间"
prop="organizationCreatedTime"
label-width="150px"
style="display: block">
<el-date-picker v-model="dataForm.organizationCreatedTime"
placeholder="创建时间"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item
label="位置坐标"
prop="longitude"
label-width="150px"
style="display: block"
>
<el-form-item label="位置坐标"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width: 500px">
<el-input
class="item_width_4"
maxlength="50"
placeholder="请输入关键字"
v-model="dataForm.address"
>
<el-input class="item_width_4"
maxlength="50"
placeholder="请输入关键字"
v-model="dataForm.address">
</el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
>
<div id="app" class="div_map"></div>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap">查询</el-button>
<div id="app"
class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude"
>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude"
>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude">
</el-input>
</div>
</div>
</el-form-item>
<el-form-item
label="备注"
prop="remark"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="dataForm.remark"
></el-input>
<el-form-item label="备注"
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="dataForm.remark"></el-input>
</el-form-item>
</el-form>
</div>
<div class="div_btn resi-btns">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button
v-if="formType != 'detail'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button v-if="formType != 'detail'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
@ -255,7 +197,7 @@ var infoWindowList;
let loading; //
export default {
data() {
data () {
return {
formType: "add", // addeditdetail
@ -281,7 +223,7 @@ export default {
},
components: {},
computed: {
dataRule() {
dataRule () {
return {
organizationName: [
{ required: true, message: "组织名称 不能为空", trigger: "blur" },
@ -316,15 +258,15 @@ export default {
props: {},
watch: {},
async created() {
async created () {
this.getCategoryList();
},
async mounted() {
async mounted () {
this.initMap();
},
methods: {
async getCategoryList() {
async getCategoryList () {
const url = "/sys/dict/data/dictlist";
const params = {
dictType: "self_org_category",
@ -336,19 +278,19 @@ export default {
this.$message.error(msg);
}
},
handleAddStaff() {
handleAddStaff () {
this.dataForm.organizationPersonnel = [
...this.dataForm.organizationPersonnel,
{ personName: "", personPhone: "" },
];
},
handleDelStaff(index) {
handleDelStaff (index) {
const { organizationPersonnel } = this.dataForm;
organizationPersonnel.splice(index, 1);
this.dataForm.organizationPersonnel = organizationPersonnel;
},
// init
initMap() {
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519);
// map TMap.Map()
@ -374,7 +316,7 @@ export default {
this.handleMoveCenter();
},
setMarker(lat, lng) {
setMarker (lat, lng) {
markers.setGeometries([]);
markers.add([
{
@ -388,7 +330,7 @@ export default {
]);
},
handleSearchMap() {
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
@ -416,7 +358,7 @@ export default {
});
},
handleMoveCenter() {
handleMoveCenter () {
//
const center = map.getCenter();
const lat = center.getLat();
@ -426,7 +368,7 @@ export default {
this.setMarker(lat, lng);
},
async initForm(type, row) {
async initForm (type, row) {
this.$refs.ref_form.resetFields();
this.formType = type;
@ -438,7 +380,7 @@ export default {
}
},
async handleComfirm() {
async handleComfirm () {
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
@ -448,26 +390,25 @@ export default {
app.util.validateRule(messageObj);
this.btnDisable = false;
} else {
if (!formVltHelper.userOrMobile(this.dataForm.principalPhone)) {
return this.$message({
type: "error",
message: "手机号格式有误",
});
}
// if (!formVltHelper.userOrMobile(this.dataForm.principalPhone)) {
// return this.$message({
// type: "error",
// message: "",
// });
// }
const {
dataForm: { organizationPersonnel },
} = this;
let vlt = organizationPersonnel.every((item) => {
return (
item.personName &&
item.personPhone &&
formVltHelper.userOrMobile(item.personPhone)
item.personPhone
);
});
if (!vlt) {
return this.$message({
type: "error",
message: "成员姓名/手机号为空或格式有误",
message: "成员姓名/手机号为空",
});
}
this.submit();
@ -475,7 +416,7 @@ export default {
});
},
async submit() {
async submit () {
let url = "";
if (this.formType === "add") {
url = "/heart/iccommunityselforganization/addcommunityselforganization";
@ -503,11 +444,11 @@ export default {
}
},
handleCancle() {
handleCancle () {
this.resetData();
this.$emit("dialogCancle");
},
resetData() {
resetData () {
this.orgId = "";
this.dataForm = {
organizationName: "",
@ -525,7 +466,7 @@ export default {
};
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
@ -533,7 +474,7 @@ export default {
});
},
//
endLoading() {
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();

24
src/views/modules/partymember/icpartymemberpayrecorddetail.vue

@ -4,13 +4,28 @@
<el-card ref="searchCard" class="search-card">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item prop="mySelectOrg" label="所属党组织">
<el-cascader
<!-- <el-cascader
v-model="mySelectOrg"
:options="orgList"
placeholder="请选择党组织"
:props="{ label: 'partyOrgName', value: 'id' }"
@change="handleChangeOrg"
clearable />
clearable /> -->
<el-cascader
class="list_item_width_1"
size="small"
v-model="mySelectOrg"
:options="orgList"
placeholder="请选择党组织"
:props="{
checkStrictly: true,
label: 'partyOrgName',
value: 'id',
children: 'children'
}"
@change="handleChangeOrg"
clearable
/>
</el-form-item>
<el-form-item label="姓名"
prop="name">
@ -44,13 +59,14 @@
<el-date-picker
v-model="dataForm.year"
type="year"
size="small"
placeholder="选择年"
value-format="yyyy"
@change="yearChangeHandler">
</el-date-picker>
</el-form-item>
<el-form-item label="" prop="month">
<el-select v-model="dataForm.month" placeholder="选择月份" clearable :disabled="dataForm.year === '' || dataForm.year === null">
<el-select v-model="dataForm.month" placeholder="选择月份" size="small" clearable :disabled="dataForm.year === '' || dataForm.year === null">
<el-option v-for="item in monthArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue">
</el-option>
</el-select>
@ -237,7 +253,7 @@
},
//
getOrgList() {
return this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: {agencyId: localStorage.getItem('agencyId')}}).then(({data: res}) => {
return this.$http.get('/resi/partymember/icPartyOrg/getSearchTreelist', {params: {agencyId: localStorage.getItem('agencyId')}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}

19
src/views/modules/partymember/icpartymemberpoint.vue

@ -10,8 +10,9 @@
>
<el-form-item prop="mySelectOrg" label="所属党组织">
<el-cascader
style="width: 300px"
class="list_item_width_1"
v-model="mySelectOrg"
size="small"
:options="orgList"
placeholder="请选择党组织"
:props="{
@ -57,8 +58,10 @@
<br />
<el-form-item label="评分年度" prop="year">
<el-date-picker
class="list_item_width_1"
v-model="dataForm.year"
type="year"
size="small"
placeholder="选择年"
value-format="yyyy"
>
@ -241,17 +244,27 @@ export default {
this.currentPage = val
this.getDataList()
},
deepArrTOnull(arr) {
let a = []
a = arr.map(item => {
return {
...item,
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
}
})
return a
},
//
getOrgList() {
return this.$http
.get('/resi/partymember/icPartyOrg/getTreelist', {
.get('/resi/partymember/icPartyOrg/getSearchTreelist', {
params: { agencyId: localStorage.getItem('agencyId') }
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.orgList = res.data
this.orgList = this.deepArrTOnull(res.data)
})
.catch(() => {})
},

111
src/views/modules/partymember/icpartyorg-add-or-update.vue

@ -8,7 +8,7 @@
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '100px'">
<el-form-item prop="partyOrgType" label="党组织类型">
<el-select :disabled="dataForm.id ? true : false" v-model="dataForm.partyOrgType" @change="changePartyOrgType" clearable placeholder="请选择党组织类型">
<el-select :disabled="dataForm.id || dataForm.orgId ? true : false" v-model="dataForm.partyOrgType" @change="changePartyOrgType" clearable placeholder="请选择党组织类型">
<el-option
v-for="item in partyOrgTypeList"
:key="item.value"
@ -32,9 +32,10 @@
:props="{ emitPath:false, checkStrictly: true, label: 'name', value: 'id', children: 'children' }"
:disabled="dataForm.id ? true : false"
:show-all-levels="false"
@change="changeAgencyOrg"
clearable />
</el-form-item>
<el-form-item prop="mySelectOrg" label="上级党组织">
<el-form-item v-if="!dataForm.sjdzzName" prop="mySelectOrg" label="上级党组织">
<el-cascader
style="width:300px"
v-model="dataForm.mySelectOrg"
@ -45,6 +46,9 @@
:disabled="dataForm.id || dataForm.orgId ? true : false"
clearable />
</el-form-item>
<el-form-item v-if="dataForm.sjdzzName" label="上级党组织">
<el-input :disabled="true" v-model="dataForm.sjdzzName" style="width:300px"></el-input>
</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>
@ -129,12 +133,14 @@
staffId:'',
orgPidName: '',
agencyName:'',
pid: ''
pid: '',
sjdzzName: '' //
},
orgListVisible: false,
agencyListVisible:false,
orgList: [],
agencyId: '',
level: '',
partyOrgTypeList: [],
agencyOrgList:[]
}
@ -151,34 +157,50 @@
this.agencyId = localStorage.getItem('agencyId')
this.dataForm.customerId = localStorage.getItem('customerId')
this.dataForm.staffId = localStorage.getItem('staffId')
//
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.dataForm.latitude = ''
//
this.setPartyOrgType()
this.getOrgList().then(() => {
if (this.dataForm.id) {
this.getInfo()
if (this.dataForm.id) {
this.setPartyOrgType()
this.getInfo()
} else {
this.setPartyOrgType()
this.initMap()
if(this.dataForm.orgId) {
this.dataForm.mySelectOrg = this.dataForm.orgId
this.dataForm.orgPid = this.dataForm.orgId
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + this.dataForm.orgId : this.dataForm.orgId
this.dataForm.partyOrgType = this.dataForm._partyOrgType
console.log(this.dataForm.partyOrgType, this.dataForm.orgPid, this.dataForm.orgPids)
this.setPartyOrgType_xzxj()
this.getInfoAgencyLisy()
} else {
this.initMap()
if(this.dataForm.orgId) {
this.dataForm.mySelectOrg = this.dataForm.orgId
this.dataForm.orgPid = this.dataForm.orgId
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + this.dataForm.orgId : this.dataForm.orgId
console.log(this.dataForm.orgPid)
console.log(this.dataForm.orgPids)
} else {
this.dataForm.mySelectOrg = ''
}
this.dataForm.mySelectOrg = ''
}
})
}
})
},
//
setPartyOrgType_xzxj() {
if (this.dataForm.partyOrgType === '0') { // 0,1,2,3,4,5
this.dataForm.partyOrgType = '1'
} else if (this.dataForm.partyOrgType === '1') {
this.dataForm.partyOrgType = '2'
} else if (this.dataForm.partyOrgType === '2') {
this.dataForm.partyOrgType = '3'
} else if (this.dataForm.partyOrgType === '3') {
this.dataForm.partyOrgType = '4'
} else if (this.dataForm.partyOrgType === '4') {
this.dataForm.partyOrgType = '5'
}
},
//
setPartyOrgType() {
// community:street,: district,: city :province
// 0,1,2,3,4,5
this.level = localStorage.getItem('level')
this.level = localStorage.getItem('level') ? localStorage.getItem('level') : ''
if (this.level == 'province') {
this.partyOrgTypeList = [
{value: '0', name: '省委'},
@ -216,30 +238,36 @@
]
}
},
//
changeAgencyOrg () {
if(!this.dataForm.orgId){ // orgId
this.getOrgList()
}
},
//
changePartyOrgType(value){
if(value != '5'){ //
this.dataForm.agencyId = ''
if(value == '5'){ //
this.dataForm.agencyId = localStorage.getItem('agencyId')
this.dataForm.agencyPids = ''
this.getOrgList()
} else {
//
this.getInfoAgencyLisy()
}
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.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.agencyOrgList = this.removeEmptyChildren(res.data)
}).catch(() => {})
},
//
//
getOrgList() {
return this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: {agencyId: this.agencyId, orgPid: this.dataForm.id ? this.dataForm.pid : ''}}).then(({data: res}) => {
if (!this.dataForm.id) { //
this.orgList = []
this.dataForm.mySelectOrg = '', //
this.dataForm.orgPid = '', // ID,0
this.dataForm.orgPids = ''
}
this.$http.get('/resi/partymember/icPartyOrg/getParentOrgList', {params: {agencyId: this.dataForm.agencyId, partyOrgType: this.dataForm.partyOrgType}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.orgList = this.removeEmptyChildren(res.data)
this.orgList.unshift({
partyOrgName: '一级组织',
id: '0'
});
}).catch(() => {
})
},
@ -282,23 +310,20 @@
this.dataForm.mySelectOrg = this.dataForm.orgPid
//
this.dataForm.agencyId = this.dataForm.agencyId
//
this.getInfoAgencyLisy()
//
this.getOrgList()
this.initMap()
}).catch(() => {
})
//
this.getInfoAgencyLisy()
},
getInfoAgencyLisy(){
this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType',
{params:
{agencyId: this.agencyId,
orgType:this.dataForm.partyOrgType}
}).then(({data: res}) => {
this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType', {params: {agencyId: this.agencyId, orgType: this.dataForm.partyOrgType}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.agencyOrgList = res.data
this.agencyOrgList = this.removeEmptyChildren(res.data)
}).catch(() => {
})
},

33
src/views/modules/partymember/icpartyorgtree.vue

@ -14,7 +14,8 @@
row-key="id"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}">
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
:height="tableHeight">
<el-table-column prop="partyOrgName" label="党组织名称"></el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
@ -24,12 +25,12 @@
size="small"
class="div-table-button--detail">{{'查看党员'}}</el-button>
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '5'"
@click="addOrUpdateHandle('', scope.row.id, scope.row.orgPids)"
@click="addOrUpdateHandle('', scope.row.id, scope.row.orgPids, '', scope.row.partyOrgType, scope.row.partyOrgName)"
type="text"
size="small"
class="div-table-button--add">新增下级</el-button>
<el-button v-if="scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)"
@click="addOrUpdateHandle(scope.row.id, '', '', scope.row.pid)"
@click="addOrUpdateHandle(scope.row.id, '', '', scope.row.pid, '', '')"
type="text"
size="small"
class="div-table-button--edit">修改</el-button>
@ -62,13 +63,16 @@
import AddOrUpdate from './icpartyorg-add-or-update'
import TableTreeColumn from '@/components/table-tree-column'
import lookMember from './lookMember'
import { mapGetters } from 'vuex'
export default {
data () {
return {
searchH: 0,
dataForm: {
id: '',
customerId: '',
orgPids: ''
orgPids: '',
agencyId: ''
},
tableLoading: false,
tableData: [],
@ -83,9 +87,24 @@
TableTreeColumn,
lookMember
},
computed: {
...mapGetters(['clientHeight', 'iframeHeight']),
tableHeight() {
const h = this.clientHeight - this.searchH - 230 + this.iframeHeigh
const _h = this.clientHeight - 230 - this.searchH
return this.$store.state.inIframe ? h : _h
}
},
mounted() {
this.$nextTick(() => {
this.searchH = this.$refs.searchCard.$el.offsetHeight
console.log('tableHeight', this.tableHeight)
})
},
async created () {
this.agencyId = localStorage.getItem('agencyId')
this.dataForm.customerId = localStorage.getItem('customerId')
this.dataForm.agencyId = localStorage.getItem('agencyId')
this.getTableData()
// this.pageLoading = true
},
@ -106,8 +125,7 @@
this.tableLoading = false
},
// /
addOrUpdateHandle (id, orgId, orgPids, pid) {
console.log('pid:::::', pid)
addOrUpdateHandle (id, orgId, orgPids, pid, partyOrgType, partyOrgName) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id
@ -115,7 +133,8 @@
this.$refs.addOrUpdate.dataForm.orgId = orgId //
this.$refs.addOrUpdate.dataForm.orgPids = orgPids
this.$refs.addOrUpdate.dataForm.pid = pid
this.$refs.addOrUpdate.dataForm._partyOrgType = partyOrgType
this.$refs.addOrUpdate.dataForm.sjdzzName = partyOrgName
this.$refs.addOrUpdate.init()
})
},

532
src/views/modules/partymember/lookMember.vue

@ -1,15 +1,127 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div>
<div class="div_table">
<el-table ref="ref_table"
:data="tableData"
border
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%"
highlight-current-row>
<div v-if="pageLoading" class="resi-container">
<el-card ref="searchCard" class="search-card">
<div class="">
<el-form ref="searchForm" :inline="true" :model="searchForm" size="small" label-width="100px" class="demo-form-inline">
<div>
<el-form-item label="所属党组织" prop="partyOrgId">
<!-- <el-select v-model="searchForm.partyOrgId" filterable placeholder="请选择" clearable>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option> -->
<!-- </el-select> -->
<el-cascader
v-model="partyOrgRange"
:options="optionsG"
:props="partyProps"
clearable
@change="handlePartyChange"></el-cascader>
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input v-model="searchForm.name" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="searchForm.mobile" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="身份证" prop="idCard">
<el-input v-model="searchForm.idCard" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="searchForm.address" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="职务" prop="partyZw">
<el-select v-model="searchForm.partyZw" filterable placeholder="请选择" clearable>
<el-option
v-for="item in zwList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div>
<!-- <el-form-item label="流动党员" prop="isLd">
<el-select v-model="searchForm.isLd" filterable placeholder="请选择" clearable>
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item> -->
<!-- <el-form-item label="流动党员证号" prop="ldzh">
<el-input v-model="searchForm.ldzh" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item> -->
<!-- <el-form-item label="是否缴费" prop="isPay">
<el-select v-model="searchForm.isPay" filterable placeholder="请选择" clearable>
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item> -->
<el-form-item label="党员中心户" prop="isDyzxh">
<el-select v-model="searchForm.isDyzxh" filterable placeholder="请选择" clearable>
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item>
<el-form-item>
<el-button class="diy-button--search" size="small" @click="handleSearch">查询</el-button>
<el-button class="diy-button--reset" size="small" @click="resetForm('searchForm')">重置</el-button>
</el-form-item>
</div>
<!-- <el-form-item label="免学习" prop="isMxx">
<el-select v-model="searchForm.isMxx" filterable placeholder="请选择" clearable>
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item> -->
<!-- <el-form-item label="最近一次缴费时间"
label-width="130px"
prop="startTime">
<el-date-picker v-model="timeRangePay"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
@change="handleTimeChangePay"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item> -->
<!-- <el-form-item label="入党时间"
prop="startTime">
<el-date-picker v-model="timeRange"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
@change="handleTimeChange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item> -->
</el-form>
</div>
</el-card>
<el-card class="resi-card-table">
<el-table
:data="tableData"
row-key="id"
v-loading="tableLoading"
border
:height="tableHeight"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%"
class="resi-table"
>
<el-table-column label="序号" type="index" align="center" width="50">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
@ -101,18 +213,51 @@
align="center"
min-width="180"
/>
<!-- <template slot-scope="scope">
<div class="div-content">{{ handleFilterSpan(scope.row, item) }}</div>
</template> -->
<!-- </el-table-column> -->
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button
@click="handleLook(scope.row)"
type="text"
size="small"
class="btn-color-look"
>查看</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</el-card>
<el-dialog
title="党员信息"
:visible.sync="dialogVisible"
width="60%"
top="5vh"
class="dialog-h"
append-to-body
:close-on-click-modal="false"
:before-close="handlerCancle"
>
<crate-form v-if="dialogVisible" :info="detailInfo" :partyList="optionsG"
:disabled="disabled"
@saveBase="handleSearch" @cancle="handlerCancle" />
</el-dialog>
</div>
</div>
<div class="div_btn">
@ -123,68 +268,347 @@
</template>
<script>
import axios from 'axios'
import { mapGetters } from 'vuex'
import { requestPost } from "@/js/dai/request";
import crateForm from '../communityParty/members/crateForm.vue'
export default {
data () {
return {
btnDisable: false,
//
tableData: [],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
importBtnTitle: '导入',
importLoading: false,
exportBtn: false,
exportBtnTitle: '导出',
tableLoading: false,
agencyId: '',
partyOrgId: '',
pageNo: 1,
btnLoading: false,
uploading: false,
disabled: false,
pageLoading: false,
dialogVisible: false,
currentPage: 1,
pageSize: 20,
total: 1,
total: null,
tableData: [],
searchH: 0,
unloadPencent: 0,
addLevel: '1',
addType: 'add',
value: '',
optionsEditG: [],
optionsG: [],
optionsC: [],
optionsEditC: [],
options: [
{
label: '是',
value: 1
},{
label: '否',
value: 2
}
],
zwList: [
{
label: '普通党员',
value: '0'
},
{
label: '支部书记',
value: '1'
},
{
label: '支部委员',
value: '2'
},
{
label: '党委委员',
value: '3'
},
],
demandOptions: [],
tableHeader: [
{
label: '党员姓名',
columnName: 'name',
align: 'center',
width: '160',
options: []
}, {
label: '所属网格',
align: 'center',
columnName: 'gridName',
width: '200',
options: []
}, {
label: '分类类别',
align: 'center',
columnName: 'categoryName',
width: '160',
options: []
}, {
label: '主要事迹',
columnName: 'mainDeed',
align: 'center',
width: '',
options: []
}
],
partyOrgRange: [],
timeRangePay: [],
timeRange: [],
customerId: '',
partyOrgId: '', //
searchForm: {
partyOrgId: '',
mobile: '',
idCard: '',
name: '',
address: '',
isLd: '',
ldzh: '',
partyZw: '',
isDyzxh: '',
isMxx: '',
culture: '',
isPay: '',
rdsjStartDate: '',
rdsjEndDate: '',
payStatrDate: '',
payEndDate: ''
},
detailInfo: {},
partyProps: {
label: 'partyOrgName',
value: 'id',
checkStrictly: true
}
}
},
props: {
},
computed: {
...mapGetters(['clientHeight', 'iframeHeight'])
...mapGetters(['clientHeight', 'iframeHeight']),
tableHeight() {
const h = this.clientHeight - this.searchH - 490 + this.iframeHeigh
const _h = this.clientHeight - 490 - this.searchH
return this.$store.state.inIframe ? h : _h
}
},
components: {
crateForm
},
components: {},
methods: {
initForm (agencyId, id) {
this.agencyId = agencyId
this.searchForm.partyOrgId = id
this.partyOrgId = id
console.log('this.searchForm.partyOrgId:::::', this.searchForm.partyOrgId)
this.tableLoading = true
this.loadTable()
this.pageLoading = true
this.getTableData()
this.getGridList('query')
},
//
handleCancle () {
this.$emit('lookMemberCancle')
},
//
async loadTable () {
let params = {
agencyId: this.agencyId,
partyOrgId: this.partyOrgId,
pageNo: this.pageNo,
pageSize: this.pageSize
handleSizeChange(val) {
console.log(`每页 ${val}`)
this.pageSize = val
this.getTableData()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
this.currentPage = val
this.getTableData()
},
handlePartyChange(val) {
console.log('val------pp', val)
this.searchForm.partyOrgId = val[val.length - 1]
},
handleFilterSpan(row, item) {
let _val = ''
if (item.options && item.options.length > 0) {
item.options.forEach((n) => {
if (n.value === row[item.columnName]) _val = n.label
})
}
const url = `/resi/partymember/icPartyMember/page`
const { data, code, internalMsg, msg } = await requestPost(url, params)
this.tableLoading = false
if (code !== 0) {
return this.$message.error(internalMsg ? internalMsg : msg ? msg : '查询失败')
return _val || row[item.columnName]
},
handleTimeChange (val) {
if (val.length > 0) {
this.searchForm.rdsjStartDate = val[0]
this.searchForm.rdsjEndDate = val[1]
} else {
this.searchForm.rdsjStartDate = ''
this.searchForm.rdsjEndDate = ''
}
if (code === 0) {
this.tableData = data.list ? data.list : []
this.total = data.total || 0;
},
handleTimeChangePay (val) {
if (val.length > 0) {
this.searchForm.payStatrDate = val[0]
this.searchForm.payEndDate = val[1]
} else {
this.searchForm.payStatrDate = ''
this.searchForm.payEndDate = ''
}
},
handleSizeChange (val) {
console.log(`每页 ${val}`)
this.pageSize = val
this.loadTable()
handleProgress(event, file, fileList) {
console.log('percentage', event, file.percentage)
this.uploading = true
this.unloadPencent = Number(file.percentage.toFixed(0))
},
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.loadTable();
download (data, fileName) {
console.log('data', data)
if (!data) {
return
}
var csvData = new Blob([data])
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName)
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement('a')
document.body.appendChild(a)
a.style = 'display: none'
var url = window.URL.createObjectURL(csvData)
a.href = url
a.download = fileName
a.click()
a.remove()
window.URL.revokeObjectURL(url)
}
},
handleSearch(val) {
console.log('searchhh--', val)
this.currentPage = 1
this.getTableData()
},
resetForm(formName) {
this.timeRangePay = []
this.timeRange = []
this.searchForm.payStatrDate = ''
this.searchForm.payEndDate = ''
this.searchForm.rdsjStartDate = ''
this.searchForm.rdsjEndDate = ''
this.$refs[formName].resetFields()
this.searchForm.partyOrgId = this.partyOrgId
this.handleSearch()
},
handlerCancle() {
this.detailInfo = {}
this.disabled = false
this.dialogVisible = false
},
async handleLook(row) {
this.disabled = true
await this.getDetail(row.id)
},
async getDetail(id) {
let params = {
id,
}
this.$http
.post(`/resi/partymember/icPartyMember/${id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.detailInfo = { ...res.data }
this.dialogVisible = true
}
})
.catch((err) => {
console.log('row4', err)
return this.$message.error('网络错误')
})
},
async getGridList(type, agencyId) {
// addorupdate query
await this.$http
.get('/resi/partymember/icPartyOrg/getSearchTreelist', { params: {agencyId: agencyId} })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = this.deepArrTOnull(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
deepArrTOnull(arr) {
let a = []
a = arr.map(item => {
return {
...item,
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
}
})
return a
},
async getCateList(type) {
const params = {
customerId: this.customerId,
type
}
// addorupdate query
await this.$http
.post('/resi/partymember/stylecategorydict/select-list', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
if (type === 'query') this.optionsC = res.data
else this.optionsEditC = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
async getTableData() {
this.tableLoading = true
let params = {
...this.searchForm,
agencyId: this.agencyId,
pageNo: this.currentPage,
pageSize: this.pageSize
}
await this.$http
.post('/resi/partymember/icPartyMember/page', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.tableData = res.data.list
this.total = res.data.total
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.tableLoading = false
}
},
}
</script>

26
src/views/modules/visual/communityParty/community.vue

@ -360,7 +360,16 @@ export default {
// this.pieEduOptions.series[1].width = 400
this.clickEduPie(0)
let fun = params => {
this.clickEduPie(params.dataIndex)
console.log('params------c', params)
if (params.seriesIndex == 0 || params.seriesIndex == 2) {
this.unitType = ''
this.getUnitList(this.agencyId)
this.$refs.eduChart.clear()
this.noInit = false
this.clickEduPie(0)
// return
} else this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
// this.noInit = true
@ -368,6 +377,7 @@ export default {
},
clickEduPie (seriesIndex) {
let _code = ''
let isClick = false
this.partyItem.forEach((element, index) => {
@ -517,10 +527,11 @@ export default {
if (code === 0) {
this.showMap = false
this.unitTotal = data.total
this.unitTableData = []
this.unitTableData = data.list.map((item, index) => {
return {
...item,
index: index + 1
urlIndex: index
}
})
this.unitTableData.forEach(item => {
@ -611,7 +622,7 @@ export default {
return {
...item,
color: "#00E5ED",
fillColor: "rgba(0, 229, 237, 0.16)"
fillColor: "rgba(0, 229, 237, 0)"
}
})
@ -693,7 +704,7 @@ export default {
icon: require('../../../../assets/img/shuju/measure/lxzz.png')
},
2: {
color: 'rgba(80, 194, 237, 1)',
color: '#50C2ED',
icon: require('../../../../assets/img/shuju/measure/qydw.png')
},
3: {
@ -701,7 +712,7 @@ export default {
icon: require('../../../../assets/img/shuju/measure/jgzs.png')
},
4: {
color: '#50C2ED',
color: '#0189d5',
icon: require('../../../../assets/img/shuju/measure/other.png')
},
5: {
@ -713,7 +724,7 @@ export default {
icon: require('../../../../assets/img/shuju/measure/jijin.png')
},
7: {
color: '#0189d5',
color: '#C015C3', //
icon: require('../../../../assets/img/shuju/measure/qita.png')
}
@ -824,7 +835,8 @@ export default {
url,
params,
(data, rspMsg) => {
this.agencyInfo = data
// this.agencyInfo = data
this.agencyInfo = { ...data, agencyLevel: data.level}
if (!data.latitude) {
this.agencyInfo.latitude = 36.072227
}

5
src/views/modules/visual/communityParty/gridParty.vue

@ -310,7 +310,10 @@ export default {
this.pieEduOptions.legend = { ...legend }
this.clickEduPie(0)
let fun = params => {
this.clickEduPie(params.dataIndex)
if (params.seriesIndex == 0 || params.seriesIndex == 2) {
this.$refs.eduChart.clear()
this.clickEduPie('-1')
} else this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
},

14
src/views/modules/visual/communityParty/options.js

@ -1,11 +1,11 @@
export function pieOption (_charts) {
const center= ['50%', '50%']
const center= ['60%', '50%']
return {
title: {
text: '0',
top: 125,
left: 196,
left: 235,
textAlign: 'center',
textStyle: {
width: '100%',
@ -87,8 +87,8 @@ export function pieOption (_charts) {
alignTo: 'edge',
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: '{a|{c}}\n{r|}\n{name|{b}}',
minMargin: 5,
edgeDistance: '10%',
// minMargin: 5,
edgeDistance: 20,
lineHeight: 15,
color: '#fff',
fontSize: 12,
@ -114,13 +114,13 @@ export function pieOption (_charts) {
labelLine: {
show: false,
smooth: 0.2,
length: 30,
length2: 0,
length: 20,
length2: 10,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < _charts.getWidth() / 2;
const isLeft = params.labelRect.x < _charts.getWidth() / 3;
const points = params.labelLinePoints;
// Update the end point.
if (points) {

162
src/views/modules/visual/communityParty/party.vue

@ -311,7 +311,21 @@ export default {
this.pieAgeOptions = pieOption(this.pieAgeChartS)
this.clickAgePie(0)
let fun = params => {
this.clickAgePie(params.dataIndex)
// if (params.seriesIndex == 0 || params.seriesIndex == 2) {
// this.ageCode = ''
// this.getAgeList()
// return
// }
if (params.seriesIndex == 0 || params.seriesIndex == 2) {
this.ageCode = ''
// this.getUnitList(this.agencyId)
this.getAgeList()
this.$refs.ageChart.clear()
this.noInit = false
this.clickAgePie(0)
// return
} else this.clickAgePie(params.dataIndex)
// this.clickAgePie(params.dataIndex)
}
this.$refs.ageChart.handleClick(fun)
// option && this.$refs.pieChart.setOption(option);
@ -359,138 +373,27 @@ export default {
// this.pieEduOptions.series[1].width = 400
this.clickEduPie(0)
let fun = params => {
// if (params.seriesIndex == 0 || params.seriesIndex == 2) {
// this.eduCode = ''
// this.getEduList()
// return
// }
this.clickEduPie(params.dataIndex)
if (params.seriesIndex == 0 || params.seriesIndex == 2) {
this.eduCode = ''
this.getEduList()
this.$refs.eduChart.clear()
this.noEduInit = false
this.clickEduPie(0)
// return
} else this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
// this.noInit = true
// option && this.$refs.pieChart.setOption(option);
},
initChartType() {
const eId = document.getElementById('echartType')
let _charts = echarts.init(eId)
let option = {
tooltip: {
trigger: 'item'
},
legend: {
show: true,
orient: 'vertical',
top: '20%',
right: 0,
textStyle: {
width: 90,
color: '#fff',
rich: {
a: {
width: 90
}
}
},
formatter: name => {
for (let a = 0; a < this.eduItem.length; a++) {
// this.data
if (this.eduItem[a].name === name) {
//
let params1 = name + "\n"; //returnlegend
console.log(params1);
let tmp = params1.split("\n");
let res = "" + params1;
for (let i in tmp) {
res = res.replace(tmp[i], "");
}
return res + params1;
}
}
}
},
title: {
text: '12000', //80%
subtext: '总数',
left: 196,
top: "center",
textAlign: 'center',
textStyle: {
color: "#fff",
fontSize: 28,
align: "center"
},
subtextStyle: {
fontSize: 16,
color: '#fff',
align: 'center'
}
},
series: [
{
// name: 'Access From',
type: 'pie',
// center: ['50%', '50%'],
radius: ['40%', '60%'],
avoidLabelOverlap: true,
// top: top + '%',
// height: '80%',
// left: 0,
width: 400,
label: {
position: 'outside',
alignTo: 'edge',
formatter: '{a|{c}}\n{r|}\n{name|{b}}',
minMargin: 5,
edgeDistance: 20,
lineHeight: 15,
color: '#fff',
fontSize: 15,
rich: {
name: {
padding: [0, 6, 0, 6]
},
a: {
fontSize: 15,
color: '#fff',
padding: [0, 6, 0, 6]
},
r: {
backgroundColor: 'auto',
borderRadius: 6,
width: 6,
height: 6,
// padding: [3, 3, 0, -12]
}
}
},
emphasis: {
label: {
show: true,
fontSize: '14',
fontWeight: 'bold'
}
},
labelLine: {
show: true,
length: 20,
length2: 0,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < _charts.getWidth() / 2;
const points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
},
data: this.eduItem
}
]
}
option && _charts.setOption(option);
},
clickAgePie (seriesIndex) {
let _code = ''
let isClick = false
@ -743,7 +646,8 @@ export default {
async getPartyOggList(node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
// const url = '/gov/org/customeragency/agencygridtree'
const url = '/resi/partymember/icPartyOrg/getTreelist'
// const url = '/resi/partymember/icPartyOrg/getTreelist'
const url ='/resi/partymember/icPartyOrg/getSearchTreelist'
let params = {
agencyId: this.$store.state.user.agencyId,
};
@ -830,6 +734,8 @@ export default {
this.orgType = orgType
this.noInit = false
this.noEduInit = false
this.$refs.ageChart.clear()
this.$refs.eduChart.clear()
this.getAgeCount(_arr[0], orgType)
this.getEduCount(_arr[0], orgType)
this.getAgeList(_arr[0], orgType)
@ -839,6 +745,8 @@ export default {
console.log('val-vvvpppppp', val)
this.noInit = false
this.noEduInit = false
this.$refs.ageChart.clear()
this.$refs.eduChart.clear()
if (val.length > 0) {
const i = val.length - 1
this.agencyId = val[i]

6
src/views/modules/visual/components/screen-map/index.vue

@ -557,11 +557,11 @@ const vueGis = {
//
setZoom (level) {
if (level === "district") {
this.zoom = 11;
} else if (level === "street") {
this.zoom = 12;
} else if (level === "community") {
} else if (level === "street") {
this.zoom = 13;
} else if (level === "community") {
this.zoom = 14;
}
},

Loading…
Cancel
Save