dai 3 years ago
parent
commit
ed959b0df6
  1. 75
      src/components/table-tree-column/index.vue
  2. 16
      src/main.js
  3. 5
      src/router/index.js
  4. 2
      src/utils/request.js
  5. 33
      src/views/main-shuju/main.vue
  6. 1
      src/views/main.vue
  7. 344
      src/views/modules/communityParty/members/cpts/points.vue
  8. 305
      src/views/modules/communityParty/members/cpts/record.vue
  9. 449
      src/views/modules/communityParty/members/crateForm.vue
  10. 945
      src/views/modules/communityParty/members/index.vue
  11. 2
      src/views/modules/communityParty/regionalParty/activitysDetail.vue
  12. 2
      src/views/modules/communityParty/regionalParty/activitysForm.vue
  13. 160
      src/views/modules/partymember/icpartymemberpayrecord-add-or-update.vue
  14. 78
      src/views/modules/partymember/icpartymemberpayrecord.vue
  15. 160
      src/views/modules/partymember/icpartymemberpayrecorddetail-add-or-update.vue
  16. 284
      src/views/modules/partymember/icpartymemberpayrecorddetail.vue
  17. 228
      src/views/modules/partymember/icpartymemberpoint.vue
  18. 496
      src/views/modules/partymember/icpartyorg-add-or-update.vue
  19. 84
      src/views/modules/partymember/icpartyorg.vue
  20. 235
      src/views/modules/partymember/icpartyorgtree.vue
  21. 95
      src/views/modules/partymember/lookMember.vue
  22. 28
      src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue
  23. 592
      src/views/modules/visual/communityParty/community.vue
  24. 4
      src/views/modules/visual/communityParty/dialogInfo.vue
  25. 736
      src/views/modules/visual/communityParty/gridParty.vue
  26. 251
      src/views/modules/visual/communityParty/memberInfo.vue
  27. 123
      src/views/modules/visual/communityParty/party.vue
  28. 257
      src/views/modules/visual/communityParty/unitInfo.vue
  29. 214
      src/views/modules/visual/components/screen-map/index.vue

75
src/components/table-tree-column/index.vue

@ -0,0 +1,75 @@
<template>
<el-table-column :prop="prop" v-bind="$attrs">
<template slot-scope="scope">
<span @click.prevent="toggleHandle(scope.$index, scope.row)" :style="{ 'padding-left': ((scope.row._level || 0) * 10) + 'px' }">
<i :class="[ scope.row._expanded ? 'el-icon-caret-bottom' : 'el-icon-caret-right' ]" :style="{ 'visibility': hasChild(scope.row) ? 'visible' : 'hidden' }"></i>
{{ scope.row[prop] }}
</span>
</template>
</el-table-column>
</template>
<script>
import isArray from 'lodash/isArray'
export default {
name: 'table-tree-column',
props: {
prop: {
type: String
},
treeKey: {
type: String,
default: 'id'
},
parentKey: {
type: String,
default: 'pid'
},
childKey: {
type: String,
default: 'children'
}
},
methods: {
hasChild (row) {
return (isArray(row[this.childKey]) && row[this.childKey].length >= 1) || false
},
//
toggleHandle (index, row) {
if (!this.hasChild(row)) {
return false
}
var data = this.$parent.store.states.data.slice(0)
data[index]._expanded = !data[index]._expanded
if (data[index]._expanded) {
row[this.childKey].forEach(item => {
item._level = (row._level || 0) + 1
item._expanded = false
})
data = data.splice(0, index + 1).concat(row[this.childKey]).concat(data)
} else {
data = this.removeChildNode(data, row[this.treeKey])
}
this.$parent.store.commit('setData', data)
this.$nextTick(() => {
this.$parent.doLayout()
})
},
//
removeChildNode (data, pid) {
var pids = isArray(pid) ? pid : [pid]
if (pid.length <= 0) {
return data
}
var ids = []
for (var i = 0; i < data.length; i++) {
if (pids.indexOf(data[i][this.parentKey]) !== -1 && pids.indexOf(data[i][this.treeKey]) === -1) {
ids.push(data.splice(i, 1)[0][this.treeKey])
i--
}
}
return this.removeChildNode(data, ids)
}
}
}
</script>

16
src/main.js

@ -70,6 +70,22 @@ Vue.use(Element, {
i18n: (key, value) => i18n.t(key, value),
});
// 弹窗底部滚动问题 弹窗需配合v-if使用
Vue.directive('fixed', {
inserted() {
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop
document.body.style.cssText += 'position:fixed;width:100%;top:-' + scrollTop + 'px;'
},
unbind () {
let body = document.body
body.style.position = ''
let top = body.style.top
document.body.scrollTop = document.documentElement.scrollTop = -parseInt(top)
body.style.top = ''
}
})
// 挂载全局
Vue.prototype.$http = http;
// Vue.prototype.$getDictLabel = getDictLabel

5
src/router/index.js

@ -268,6 +268,11 @@ router.beforeEach((to, from, next) => {
name: "社区党建",
// url: "visual/basicinfo/basicInfoMain",
children: [
{
url: "/visual/communityParty/gridParty",
name: "网格党建平面图",
id: "5feawfwaefwa579",
},
{
url: "/visual/communityParty/party",
name: "党员信息统计",

2
src/utils/request.js

@ -21,7 +21,7 @@ http.interceptors.request.use(config => {
// 默认参数
var defaults = {}
// 防止缓存,GET请求默认带_t参数
if (config.method === 'get') {
if (config.method == 'get') {
config.params = {
...config.params,
...{ '_t': new Date().getTime() }

33
src/views/main-shuju/main.vue

@ -118,6 +118,7 @@ export default {
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
localStorage.setItem("agencyId", data.agencyId);
localStorage.setItem("level", data.level);
if (!localStorage.getItem("customerName")) {
localStorage.setItem("customerName", data.customerName || "");
}
@ -130,3 +131,35 @@ export default {
</script>
<style lang="scss" src="@/assets/scss/main-shuju.scss" scoped></style>
<style lang="scss">
.info-h {
height: calc(100vh - 320px);
// overflow: auto;
}
.info-scroll {
&::-webkit-scrollbar {
width: 8px;
// background: linear-gradient(270deg, #0063FE, #0095FF);
}
&::-webkit-scrollbar-corner,
/* 滚动条角落 */
&::-webkit-scrollbar-thumb,
&::-webkit-scrollbar-track { /*滚动条的轨道*/
border-radius: 4px;
}
&::-webkit-scrollbar-corner,
&::-webkit-scrollbar-track {
/* 滚动条轨道 */
background: rgba(12, 129, 254, .24);
// box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5);
}
&::-webkit-scrollbar-thumb {
/* 滚动条手柄 */
background: linear-gradient(270deg, #1257c9, #0095FF);
}
}
</style>

1
src/views/main.vue

@ -154,6 +154,7 @@ export default {
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
localStorage.setItem("agencyId", data.agencyId);
localStorage.setItem("level", data.level);
if (!localStorage.getItem("customerName")) {
localStorage.setItem("customerName", data.customerName || "");
}

344
src/views/modules/communityParty/members/cpts/points.vue

@ -0,0 +1,344 @@
<template>
<div class="p-wr">
<el-form label-width="140px" :model="form" :inline="true"
:disabled="disabled" :rules="rules" ref="ruleForm"
class="form-wr">
<el-form-item label="评分周期" prop="year">
<div class="flex-div">
<!-- <div class="mr10">评分周期</div> -->
<div class="mr10">
<el-date-picker
v-model="form.year"
type="year"
value-format="yyyy"
placeholder="选择年"
@change="handleYearChange">
</el-date-picker>
</div>
<div class="mr10">
<el-form-item prop="quarter">
<el-select v-model="form.quarter" placeholder="请选择" class="input-width" clearable
@change="handleQuaterChange">
<el-option
v-for="item in quarterList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-button
type="primary"
size="small"
:disabled="btnDisabled"
@click="hadnleSubmitbase"
>保存</el-button>
</div>
</div>
</el-form-item>
<el-form-item label="基础积分分值" prop="basePoint">
<el-input v-model="form.basePoint" type="number" placeholder="请输入" class="input-width" clearable />
</el-form-item>
<el-form-item label="基础积分选项" prop="baseOptions" class="wd-wr" :style="'width:' + formItemWd">
<el-checkbox-group v-model="form.baseOptions">
<el-checkbox v-for="item in baseOptions" :key="item.value" :label="item.value">
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<div>
<el-form-item label="民主评议积分分值" prop="reviewPoint">
<el-input v-model="form.reviewPoint" type="number" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="民主评议积分选项" prop="reviewOptions" class="wd-wr" :style="'width:' + formItemWd">
<el-checkbox-group v-model="form.reviewOptions">
<el-checkbox v-for="item in pyiOptions" :key="item.value" :label="item.value">
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
<div>
<el-form-item label="激励积分分值" prop="inspirePoint">
<el-input v-model="form.inspirePoint" type="number" placeholder="请输入" class="input-width" clearable />
</el-form-item>
<el-form-item label="激励积分选项" prop="inspireOptions" class="wd-wr" :style="'width:' + formItemWd">
<el-checkbox-group v-model="form.inspireOptions">
<el-checkbox v-for="item in jiliOptions" :key="item.value" :label="item.value">
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
<div>
<el-form-item label="警示扣分分值" prop="warnPoint">
<el-input v-model="form.warnPoint" type="number" placeholder="请输入" class="input-width" clearable />
</el-form-item>
<el-form-item label="警示扣分选项" prop="warnOptions" class="wd-wr" :style="'width:' + formItemWd">
<el-checkbox-group v-model="form.warnOptions">
<el-checkbox v-for="item in jinshiOptions" :key="item.value" :label="item.value">
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
</el-form>
</div>
</template>
<script>
export default {
props: {
partyId: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
btnDisabled: false,
year: '',
quarter: '',
form: {
partyMemberId: '',
year: '',
quarter: '',
basePoint: '',
baseOptions: [],
reviewPoint: '',
reviewOptions: [],
inspirePoint: '',
inspireOptions: [],
warnPoint: '',
warnOptions: [],
},
rules: {
year: [{ required: true, message: '年度不能为空', trigger: 'blur' }],
quarter: [{ required: true, message: '季度不能为空', trigger: 'blur' }]
},
formItemWd: '500px',
quarterList: [
{
label: '第一季度',
value: '1'
},
{
label: '第二季度',
value: '2'
},
{
label: '第三季度',
value: '3'
},
{
label: '第四季度',
value: '4'
}
],
baseOptions: [
{
label: '参加三会一课',
value: '1'
},
{
label: '参加主题党日',
value: '2'
},
{
label: '足额缴纳党费',
value: 3
},
{
label: '积极参加学习培训',
value: '4'
},
{
label: '自觉执行党组织会议',
value: '5'
},
{
label: '严守党的政治纪律和政治规矩',
value: '6'
},
],
jiliOptions: [
{
label: '发挥先锋模范作用',
value: '1'
},
{
label: '维护社会和谐稳定',
value: '2'
},
{
label: '参与社会治理',
value: '3'
},
{
label: '联系服务群众',
value: '4'
}
],
jinshiOptions: [
{
label: '不服从党组织安排',
value: '1'
},
{
label: '不按时足额缴纳党费',
value: '2'
},
{
label: '无故长期脱离组织管理',
value: '3'
},
{
label: '在工作中出现不良影响',
value: '4'
},
{
label: '违反党的纪律',
value: '5'
}
],
pyiOptions: [
{
label: '个人自评',
value: '1'
},
{
label: '党员互评',
value: '2'
},
{
label: '民主测评',
value: '3'
}
]
}
},
watch: {
partyId: {
handler(val) {
console.log('val------points', val)
if (val.length > 0) this.btnDisabled = false
else this.btnDisabled = true
},
immediate: true
}
},
mounted() {
const w = document.getElementsByClassName('p-wr')[0]
this.formItemWd = w.clientWidth - 360 + 'px'
console.log('www----', w)
},
methods: {
handleQuaterChange(val) {
if (this.form.year) {
this.getInfo()
}
this.quarter = val
},
handleYearChange(val) {
this.year = val
},
hadnleSubmitbase() {
if (!this.partyId) return
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
this.$emit('save', { ...this.form, partyMemberId: this.partyId })
} else {
console.log('error submit!!');
return false;
}
});
},
async getInfo() {
const params = {
year: this.form.year,
quarter: this.form.quarter,
partyMemberId: this.partyId
}
await this.$http
.post('/resi/partymember/icPartyMemberPoint/echoPartyMemberPoint', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
if (res.data.length > 0) {
let _info = res.data[0]
const info = {
..._info,
baseOptions: _info.baseOptions.length > 0 ? _info.baseOptions.split(','): [],
reviewOptions: _info.reviewOptions.length > 0 ? _info.reviewOptions.split(',') : [],
inspireOptions: _info.inspireOptions.length > 0 ? _info.inspireOptions.split(',') : [],
warnOptions: _info.warnOptions.length > 0 ? _info.warnOptions.split(',') : []
}
for(const n in info) {
this.form[n] = info[n]
}
} else {
this.$refs['ruleForm'].resetFields()
this.form.quarter = this.quarter
this.form.year = this.year
}
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
}
}
</script>
<style lang="scss" scoped>
.flex-div {
display: flex;
align-items: center;
}
.mb20 {
margin-bottom: 20px;
}
.mr10 {
margin-right: 10px;
}
.pdl74 {
padding-left: 74px;
}
.wd-wr {
/deep/ .el-form-item__content {
width: calc(100% - 140px);
}
/deep/ .el-checkbox {
margin-right: 10px;
font-weight: 400;
// line-height: 20px;
.el-checkbox__label {
padding-left: 5px;
}
}
}
.input-width {
width: 160px;
}
</style>

305
src/views/modules/communityParty/members/cpts/record.vue

@ -0,0 +1,305 @@
<template>
<div style="padding-right: 20px;">
<div class="mt10">
<el-button size="small" class="diy-button--add" :disabled="btnDisabled || disabled"
@click="handleAdd">新增</el-button>
</div>
<el-table
:data="tableData"
row-key="id"
border
style="width: 100%"
class="resi-table"
height="400px"
:header-cell-style="getRowClass"
>
<el-table-column label="序号" type="index" align="center" width="50">
</el-table-column>
<el-table-column
prop="name"
label="缴费日期"
align="center"
width="250px"
>
<template slot-scope="scope">
<el-date-picker
v-if="scope.row.isEdit"
v-model="scope.row.payDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
<div v-else class="div-content">{{ scope.row.payDate }}</div>
</template>
</el-table-column>
<el-table-column
prop="name"
label="缴费金额"
align="center"
width="180px"
>
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit" type="number" v-model="scope.row.money" placeholder="请输入"
class="input-width" clearable></el-input>
<div v-else class="div-content">{{ scope.row.money }}</div>
</template>
</el-table-column>
<el-table-column
prop="name"
label="缴费年度"
align="center"
min-width="250px"
>
<template slot-scope="scope">
<el-date-picker
v-if="scope.row.isEdit"
v-model="scope.row.timeRange"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="handleTimeChangePay($event, scope.row)">
</el-date-picker>
<div v-else class="div-content">{{ scope.row.startDate + ' - ' + scope.row.endDate }}</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<template v-if="scope.row.isEdit">
<el-button
@click="handleEdit(scope.row)"
type="text"
size="small"
class="btn-color-edit"
>保存</el-button>
<el-button
@click="handleChange(scope.row, 'cancle')"
type="text"
size="small"
class="btn-color-edit"
>取消</el-button>
</template>
<template v-else>
<el-button
@click="handleChange(scope.row, 'edit')"
type="text"
size="small"
:disabled="disabled"
class="btn-color-edit"
>修改</el-button>
<el-popconfirm
title="删除之后无法恢复,确认删除?"
@onConfirm="del(scope.row)"
>
<el-button
slot="reference"
type="text"
size="small"
class="btn-color-del"
style="margin-left: 10px;"
>删除</el-button
>
</el-popconfirm>
<!-- <el-button type="text" size="small" :disabled="disabled" class="btn-color-del"
@click="del(scope.row)">删除</el-button> -->
</template>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
props: {
partyId: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
btnDisabled: false,
btnType: 'add',
isEdit: false,
tableData: [],
tempRow: {}
}
},
watch: {
partyId: {
handler(val) {
console.log('val------points', val)
if (val.length > 0) {
this.btnDisabled = false
this.getList()
} else this.btnDisabled = true
},
immediate: true
}
},
created() {
// if (this.partyId) this.getList()
},
methods: {
getRowClass({ rowIndex, columnIndex }) {
if (rowIndex === 0) {
return 'background: #2195fe; color: #fff;'
}
},
handleChange(row, type) {
console.log('type----', type)
if (type == 'cancle') {
row = { ...this.tempRow }
row.isEdit = false
row.timeRange = []
if (this.btnType == 'add') this.tableData.pop()
this.getList()
console.log('row----', row)
} else {
this.tempRow = { ...row }
row.isEdit = true
row.timeRange = [row.startDate, row.endDate]
}
this.btnType = type
this.isEdit = !this.isEdit
},
handleTimeChangePay(val, row) {
console.log('vall', val)
console.log('varowll', row)
if (val != null && val.length > 0) {
row.startDate = val[0]
row.endDate = val[1]
} else {
row.startDate = ''
row.endDate = ''
row.timeRange = []
}
},
async handleEdit(row) {
if (this.btnType == 'add') this.save(row)
else this.edit(row)
},
handleAdd() {
this.btnType = 'add'
this.isEdit = true
const item = {
isEdit: true,
partyMemberId: this.partyId,
payDate: '',
money: '',
startDate: '',
endDate: '',
timeRange: ''
}
this.tableData.push(item)
},
async save(row) {
const params = {
partyMemberId: this.partyId,
payDate: row.payDate,
money: row.money,
startDate: row.startDate,
endDate: row.endDate,
}
await this.$http
.post('/resi/partymember/icPartyMemberPayRecord/save', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
row.isEdit = false
this.isEdit = false
this.getList()
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async edit(row) {
const params = {
...row
}
await this.$http
.post('/resi/partymember/icPartyMemberPayRecord/update', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
row.isEdit = false
this.isEdit = false
this.getList()
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async del(row) {
const params = {
...row
}
await this.$http
.post('/resi/partymember/icPartyMemberPayRecord/delete', [row.id])
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('删除成功')
this.getList()
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async getList() {
const params = {
page: 1,
limit: 9999,
partyMemberId: this.partyId
}
await this.$http
.get('/resi/partymember/icPartyMemberPayRecord/page', { params: params, } )
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.tableData = res.data.list.map(item => {
return {
...item,
isEdit: false,
timeRange: []
}
})
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
}
}
</script>
<style lang="scss" scoped>
.mt10 {
margin-bottom: 10px;
}
</style>

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

@ -0,0 +1,449 @@
<template>
<div class="dialog-h-content scroll-h pd0">
<el-form label-width="120px" :model="form" :inline="true"
: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"
:options="partyList"
:props="partyProps"
clearable
class="input-width"
@change="handlePartyChange"></el-cascader>
</el-form-item>
<el-form-item label="党员中心户" prop="isDyzxh" class="wd50">
<el-radio-group v-model="form.isDyzxh">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="flex-div">
<el-form-item label="姓名" prop="name" class="wd50">
<el-input v-model="form.name" placeholder="请输入" :disabled="disabled" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="免学习" prop="isMxx" class="wd50">
<el-radio-group v-model="form.isMxx">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="flex-div">
<el-form-item label="手机号" prop="mobile" class="wd50">
<el-input v-model="form.mobile" placeholder="请输入" :disabled="disabled" class="input-width" clearable />
</el-form-item>
<el-form-item label="职务" prop="partyZw" class="wd50">
<el-select v-model="form.partyZw" filterable :disabled="disabled" placeholder="请选择" class="input-width" 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 class="flex-div">
<el-form-item label="身份证" prop="idCard" class="wd50">
<el-input v-model="form.idCard" placeholder="请输入" :disabled="disabled"
class="input-width" clearable @blur="handleValidBlur" />
</el-form-item>
<el-form-item label="文化程度" prop="culture" class="wd50">
<el-select v-model="form.culture" filterable :disabled="disabled" placeholder="请选择" class="input-width" clearable>
<el-option
v-for="item in eduList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div class="flex-div">
<el-form-item label="地址" prop="address" class="wd50">
<el-input v-model="form.address" placeholder="请输入" :disabled="disabled || isAuto" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="入党时间" prop="rdsj" class="wd50">
<el-date-picker
v-model="form.rdsj"
:disabled="disabled"
type="date"
class="input-width"
clearable
placeholder="选择日期"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</div>
<div class="flex-div">
<el-form-item label="流动党员" prop="isLd" class="wd50">
<el-radio-group v-model="form.isLd" class="input-width">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="流动党员号" prop="ldzh" class="wd50">
<el-input v-model="form.ldzh" placeholder="请输入" :disabled="disabled" class="input-width" clearable></el-input>
</el-form-item>
</div>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" :autosize="{ minRows: 4, maxRows: 10}" :disabled="disabled" type="textarea" clearable class="input-width-textarea" placeholder="请输入内容"></el-input>
</el-form-item>
<div :style="'width:' + formItemWd" >
<div style="margin-top: 20px; text-align: center;">
<el-button size="small" @click="handleCancle">取消</el-button>
<el-button
v-if="!disabled"
type="primary"
size="small"
@click="hadnleSubmitbase"
>提交</el-button>
</div>
</div>
</el-form>
<div class="pdl40">
<el-tabs v-model="activesName">
<el-tab-pane label="量化积分" name="first">
<pointsInfo :partyId="partymenberid" :disabled="disabled" @save="handleSavePoints" />
</el-tab-pane>
<el-tab-pane label="缴费记录" name="second">
<record :partyId="partymenberid" :disabled="disabled" />
</el-tab-pane>
</el-tabs>
<!-- <el-button-group>
<el-button class="diy-button--add" size="small">量化积分</el-button>
<el-button size="small">缴费记录</el-button>
</el-button-group> -->
</div>
<!-- <div class="resi-btns">
<el-button size="small" @click="handlerCancle">取消</el-button>
<el-button
v-if="!disabled"
type="primary"
size="small"
:loading="btnLoading"
@click="handleSUbmit"
>提交</el-button
>
</div> -->
</div>
</template>
<script>
import { isCard, isMobile } from '@/utils/validate'
import { computedCard } from '@/utils/index'
import pointsInfo from './cpts/points.vue'
import record from './cpts/record.vue'
export default {
components: {
pointsInfo,
record
},
props: {
partyList: {
type: Array,
default: () => []
},
info: {
type: Object,
default: () => {}
},
disabled: {
type: Boolean,
default: false
}
},
data() {
let checkMObile = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入手机号'))
} else {
if (!isMobile(value)) {
callback(new Error('手机号格式不正确'))
}
callback()
}
}
let checkIdCard = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入身份证'))
} else {
if (!isCard(value)) {
callback(new Error('身份证号格式不正确'))
}
callback()
}
}
return {
activesName: 'first',
isAuto: false,
formItemWd: '100%',
partymenberid: '',
partyProps: {
label: 'partyOrgName',
value: 'id'
},
zwList: [
{
label: '普通党员',
value: '0'
},
{
label: '支部书记',
value: '1'
},
{
label: '支部委员',
value: '2'
},
{
label: '党委委员',
value: '3'
},
],
form: {
icResiUser: '',
name: '',
mobile: '',
idCard: '',
address: '',
rdsj: '',
sszb: '',
isLd: '',
ldzh: '',
partyZw: '',
isDyzxh: '',
isMxx: '',
culture: '',
remark: ''
},
eduList: [],
rules: {
sszb: [{ required: true, message: '所属党组织不能为空', trigger: 'blur' }],
name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
mobile: [{ required: true, validator: checkMObile, trigger: 'blur' }],
idCard: [{ required: true, validator: checkIdCard, trigger: 'blur' }],
},
partyOrgs: []
}
},
watch: {
info: {
handler(val) {
if (Object.keys(val).length > 0) {
this.form = { ...val }
console.log('val----------in', val)
this.partyOrgs = val.orgPids.split(':')
this.partymenberid = val.id
}
},
immediate: true
}
},
created() {
this.getEduList()
},
mounted() {
const w = document.getElementsByClassName('dialog-h-content')[0]
this.formItemWd = w.clientWidth + 'px'
},
destroyed() {
// this.$refs['ruleForm'].resetFields()
},
methods: {
handleCancle() {
this.$refs['ruleForm'].resetFields()
this.$emit('cancle')
},
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 = ''
},
handleValidBlur(n) {
if (!isCard(this.form.idCard)) return
const { age } = computedCard(this.form.idCard)
this.form.isMxx = age >= 70 ? '1' : '0'
this.validateResi()
},
async getEduList() {
await this.$http
.post('/sys/dict/data/education')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.eduList = res.data
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async validateResi() {
const params = {
idCard: this.form.idCard,
agencyId: this.$store.state.user.agencyId
}
await this.$http
.post('/epmetuser/icresiuser/getUserByIdCard', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
const { address, icResiUserId } = res.data
if (icResiUserId) {
this.form.address = address
this.isAuto = true
}
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
hadnleSubmitbase() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
if (Object.keys(this.info).length > 0) this.editBase()
else this.saveBase()
} else {
console.log('error submit!!');
return false;
}
});
},
handleSavePoints(data) {
const _data = { ...data }
const params = {
..._data,
baseOptions: data.baseOptions.length > 0 ? data.baseOptions.toString() : '',
reviewOptions: data.reviewOptions.length > 0 ? data.reviewOptions.toString() : '',
inspireOptions: data.inspireOptions.length > 0 ? data.inspireOptions.toString() : '',
warnOptions: data.warnOptions.length > 0 ? data.warnOptions.toString() : ''
}
this.savePoints(params)
},
async saveBase() {
const params = {
...this.form
}
await this.$http
.post('/resi/partymember/icPartyMember/save', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
this.partymenberid = res.data
this.$emit('saveBase', true)
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async editBase() {
const params = {
...this.form
}
await this.$http
.post('/resi/partymember/icPartyMember/update', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
this.partymenberid = res.data
this.$emit('saveBase', true)
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async savePoints(form) {
const params = {
...form,
partyMemberId: this.partymenberid
}
let url = ''
if (form.id) url = '/resi/partymember/icPartyMemberPoint/update'
else url = '/resi/partymember/icPartyMemberPoint/save'
await this.$http
.post(url, params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async saveRecord(form) {
const params = {
...form,
partyMemberId: this.partymenberid
}
await this.$http
.post('/resi/partymember/icPartyMemberPoint/save', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
}
}
}
</script>
<style lang="scss" scoped>
.input-width-textarea {
width: 400px;
}
.input-width {
width: 220px;
}
.flex-div {
display: flex;
// justify-content: space-between;
}
.wd50 {
width: 50%;
}
.pdl40 {
padding-left: 40px;
}
.pd0 {
padding: 0 !important;
}
</style>

945
src/views/modules/communityParty/members/index.vue

@ -0,0 +1,945 @@
<template>
<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>
</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="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>
<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>
</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 HH:mm:ss"
@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 HH:mm:ss"
@change="handleTimeChange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</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>
</el-form>
</div>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button class="diy-button--add" size="small" @click="handleAdd">新增</el-button>
<!-- <el-button
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload
ref="upload"
class="upload-demo"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button size="small" class="diy-button--delete" :loading="importLoading">{{importBtnTitle}}</el-button>
</el-upload>
<el-button class="diy-button--reset" size="small" :loading="exportBtn" @click="handleExport">{{ exportBtnTitle }}</el-button> -->
</div>
<el-table
:data="tableData"
row-key="id"
v-loading="tableLoading"
border
:height="tableHeight"
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="姓名"
align="center"
width="100"
/>
<el-table-column
prop="idCard"
label="身份证号"
align="center"
min-width="180"
/>
<el-table-column
prop="mobile"
label="手机号"
align="center"
min-width="160"
/>
<el-table-column
prop="rdsj"
label="入党时间"
align="center"
min-width="160"
/>
<el-table-column
prop="sszb"
label="所属党组织"
align="center"
min-width="160"
/>
<el-table-column
prop="ldzh"
label="流动党员证号"
align="center"
min-width="160"
/>
<el-table-column
prop="partyZw"
label="职务"
align="center"
width="100"
/>
<el-table-column
prop="address"
label="地址"
align="center"
show-overflow-tooltip
min-width="180"
/>
<el-table-column
prop="isPay"
label="是否缴费"
align="center"
width="100"
/>
<el-table-column
prop="payDate"
label="最近一次缴费时间"
align="center"
min-width="160"
/>
<el-table-column
prop="culture"
label="文化程度"
align="center"
width="100"
/>
<el-table-column
prop="point"
label="量化积分"
align="center"
width="100"
/>
<el-table-column
prop="activityPoint"
label="活跃积分"
align="center"
width="100"
/>
<el-table-column
prop="volunteerCategory"
label="志愿者类别"
align="center"
width="100"
/>
<el-table-column
prop="remark"
label="备注"
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
>
<el-button
@click="handleEdit(scope.row, 'edit')"
type="text"
size="small"
class="btn-color-edit"
>修改</el-button
>
<el-popconfirm
title="删除之后无法恢复,确认删除?"
@onConfirm="handleDel(scope.row)"
>
<el-button
slot="reference"
type="text"
size="small"
class="btn-color-del"
>删除</el-button
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<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>
</template>
<script>
import axios from 'axios'
import { mapGetters } from 'vuex'
import crateForm from './crateForm.vue'
export default {
components: {
crateForm
},
data() {
return {
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
importBtnTitle: '导入',
importLoading: false,
exportBtn: false,
exportBtnTitle: '导出',
tableLoading: false,
btnLoading: false,
uploading: false,
disabled: false,
pageLoading: false,
dialogVisible: false,
currentPage: 1,
pageSize: 20,
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: '',
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
}
}
},
computed: {
...mapGetters(['clientHeight', 'iframeHeight']),
tableHeight() {
const h = this.clientHeight - this.searchH - 280 + this.iframeHeigh
const _h = this.clientHeight - 280 - this.searchH
return this.$store.state.inIframe ? h : _h
}
},
async created() {
this.customerId = localStorage.getItem('customerId')
// setTimeout(() => {
// this.getTableData()
// this.getGridList('query')
// this.getGridList('addorupdate')
// this.getCateList('query')
// this.getCateList('addorupdate')
// }, 200)
this.getTableData()
this.getGridList('query')
// this.getGridList('addorupdate')
// this.getCateList('query')
// this.getCateList('addorupdate')
this.pageLoading = true
// this.tableHeight = document.documentElement.clientHeight - this.$refs.searchCard.$el.offsetHeight - 280 + 'px'
},
mounted() {
this.$nextTick(() => {
this.searchH = this.$refs.searchCard.$el.offsetHeight
console.log('tableHeight', this.tableHeight)
})
},
methods: {
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
})
}
return _val || row[item.columnName]
},
handleTimeChange (val) {
if (val.length > 0) {
this.searchForm.rdsjStartDate = val[0]
this.searchForm.rdsjEndDate = val[0]
} else {
this.searchForm.rdsjStartDate = ''
this.searchForm.rdsjEndDate = ''
}
},
handleTimeChangePay (timvale) {
if (val.length > 0) {
this.searchForm.payStatrDate = val[0]
this.searchForm.payEndDate = val[0]
} else {
this.searchForm.payStatrDate = ''
this.searchForm.payEndDate = ''
}
},
//
handleExcelSuccess (res, file) {
if (res.code === 0 && res.msg === 'success') {
console.log('resss---ppp', res)
} else {
this.$message.error(res.msg)
}
},
handleProgress(event, file, fileList) {
console.log('percentage', event, file.percentage)
this.uploading = true
this.unloadPencent = Number(file.percentage.toFixed(0))
},
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)
}
},
async handleExportModule () {
let url = "/resi/partymember/icpartymemberstyle/import/template-download"
let params = {}
await this.$http({
method: 'POST',
url,
responseType: 'blob',
data: params
})
.then(res => {
console.log('res-------dd', res)
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
this.download(res.data, fileName)
} else this.$message.error('下载失败')
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
beforeExcelUpload (file) {
console.log('file', file)
const isType = file.type === 'application/vnd.ms-excel'
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
const fileType = isType || isTypeComputer
const isLt1M = (file.size / 1024 / 1024) < 10
if(!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!')
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!')
}
return fileType && isLt1M
},
async uploadHttpRequest(file) {
this.importLoading = true
this.importBtnTitle = '正在上传中...'
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
const formData = new FormData() //FormDataappend('key', value)
formData.append('file', file.file) //
this.$http
.post('/resi/partymember/icpartymemberstyle/import', formData).then(res => {
console.log('res-up', res)
if (res.data.code == 0 && res.data.msg == 'success') {
// this.$message.success('')
this.getTableData()
} else {
this.$message.error(res.data.msg)
}
}).catch(err => {
console.log('失败', err)
file.onError() //
// this.$message.error('')
})
this.importLoading = false
this.importBtnTitle = '导入'
this.$refs.upload.clearFiles()
},
async handleExport() {
this.exportBtn = true
this.exportBtnTitle = '正在导出...'
let params = {
agencyId: this.$store.state.user.agencyId,
pageSize: 9999,
pageNo: this.currentPage
}
// .post('epmetuser/icresiuser/exportExcel', params)
await axios({
url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/export',
// url: 'epmetuser/icresiuser/exportExcel',
method: 'post',
data: params,
responseType: 'blob'
})
.then(res => {
console.log('resllll', res)
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
})
.catch((err) => {
console.log('获取导出情失败', err)
this.$message.error('获取导出失败')
})
this.exportBtn = false
this.exportBtnTitle = '导出'
},
beforeImgUpload (file) {
const isPNG = (file.type === 'image/png') || (file.type === 'image/jpeg')
const isLt1M = file.size / 1024 / 1024 < 10
if (!isPNG) {
this.$message.error('上传图片只能是 PNG 或 JPEG 格式!')
}
if (!isLt1M) {
this.$message.error('上传图片大小不能超过 10MB!')
}
return isPNG && isLt1M
},
handleImgSuccess (res, file) {
if (res.code === 0 && res.msg === 'success') {
console.log('res.data.url', res.data.url)
this.uploading = false
this.unloadPencent = 0
this.form.imageList.push(res.data.url)
} else {
this.$message.error(res.msg)
}
},
handleDelimg(item, index) {
this.form.imageList.splice(index, 1)
},
handleSearch(val) {
console.log('searchhh--', val)
this.currentPage = 1
this.getTableData()
},
resetForm(formName) {
this.timeRangePay = []
this.timeRange = []
this.$refs[formName].resetFields()
this.handleSearch()
},
handleAdd() {
this.dialogVisible = true
},
handlerCancle() {
this.detailInfo = {}
this.disabled = false
this.dialogVisible = false
},
async handleLook(row) {
this.disabled = true
await this.getDetail(row.id)
},
async handleEdit(row, addType) {
// this.form = { ...row }
await this.getDetail(row.id)
this.dialogVisible = true
},
handleDel(row) {
let params = {
ids: [row.id]
}
console.log('row1', row)
this.$http
.post('/resi/partymember/icPartyMember/delete', [row.id])
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('删除成功')
this.getTableData()
}
})
.catch((err) => {
return this.$message.error('网络错误')
})
},
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) {
const { user } = await this.$store.state
console.log('user---ppp', user)
// addorupdate query
await this.$http
.get('/resi/partymember/icPartyOrg/getTreelist', { params: {agencyId: agencyId || user.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 { user } = await this.$store.state
console.log('user---ppp', user)
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
const { user } = await this.$store.state
let params = {
...this.searchForm,
agencyId: user.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>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
<style lang="scss" scoped>
.resi-row-btn {
display: flex;
margin-bottom: 13px;
::v-deep .el-button {
// margin-left: 10px;
border: 0;
}
::v-deep .el-select {
margin-right: 10px;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
.el-button {
margin-left: 10px;
border: 0;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
.el-button--warning {
background: rgba(254, 179, 73, 1);
}
.el-button--danger {
background: rgba(254, 98, 82, 1);
}
}
.avatar-uploader {
::v-deep
.el-upload {
cursor: pointer;
position: relative;
overflow: hidden;
}
.el-upload:hover {
border-color: #409EFF;
}
.avatar {
width: 100px;
height: 100px;
display: block;
}
.avatar-uploader-icon {
border: 1px dashed #d9d9d9;
border-radius: 6px;
font-size: 28px;
color: #8c939d;
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
}
}
.resi-btns {
margin-top: 20px;
text-align: center;
}
</style>

2
src/views/modules/communityParty/regionalParty/activitysDetail.vue

@ -98,7 +98,7 @@
</el-form-item>
<el-form-item label="活动果"
<el-form-item label="活动果"
prop="result"
label-width="150px"
style="display: block">

2
src/views/modules/communityParty/regionalParty/activitysForm.vue

@ -188,7 +188,7 @@
</el-form-item>
<el-form-item label="活动果"
<el-form-item label="活动果"
prop="result"
label-width="150px"
style="display: block">

160
src/views/modules/partymember/icpartymemberpayrecord-add-or-update.vue

@ -0,0 +1,160 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="客户Id (customer.id)" prop="customerId">
<el-input v-model="dataForm.customerId" placeholder="客户Id (customer.id)"></el-input>
</el-form-item>
<el-form-item label="党员ID" prop="partyMemberId">
<el-input v-model="dataForm.partyMemberId" placeholder="党员ID"></el-input>
</el-form-item>
<el-form-item label="缴费日期" prop="payDate">
<el-input v-model="dataForm.payDate" placeholder="缴费日期"></el-input>
</el-form-item>
<el-form-item label="缴费金额" prop="money">
<el-input v-model="dataForm.money" placeholder="缴费金额"></el-input>
</el-form-item>
<el-form-item label="缴费开始时间" prop="startDate">
<el-input v-model="dataForm.startDate" placeholder="缴费开始时间"></el-input>
</el-form-item>
<el-form-item label="缴费结束时间" prop="endDate">
<el-input v-model="dataForm.endDate" placeholder="缴费结束时间"></el-input>
</el-form-item>
<el-form-item label="删除标识:0.未删除 1.已删除" prop="delFlag">
<el-input v-model="dataForm.delFlag" placeholder="删除标识:0.未删除 1.已删除"></el-input>
</el-form-item>
<el-form-item label="乐观锁" prop="revision">
<el-input v-model="dataForm.revision" placeholder="乐观锁"></el-input>
</el-form-item>
<el-form-item label="创建人" prop="createdBy">
<el-input v-model="dataForm.createdBy" placeholder="创建人"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createdTime">
<el-input v-model="dataForm.createdTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label="更新人" prop="updatedBy">
<el-input v-model="dataForm.updatedBy" placeholder="更新人"></el-input>
</el-form-item>
<el-form-item label="更新时间" prop="updatedTime">
<el-input v-model="dataForm.updatedTime" placeholder="更新时间"></el-input>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
customerId: '',
partyMemberId: '',
payDate: '',
money: '',
startDate: '',
endDate: '',
delFlag: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: ''
}
}
},
computed: {
dataRule () {
return {
customerId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
partyMemberId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
payDate: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
money: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
startDate: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
endDate: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
delFlag: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
revision: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
createdBy: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
createdTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updatedBy: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updatedTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id); {
this.getInfo()
}
})
},
//
getInfo () {
this.$http.get(`/${moduleName}/${pathName}/#[[${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
;return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid); {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/${moduleName}/${pathName}/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false;
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

78
src/views/modules/partymember/icpartymemberpayrecord.vue

@ -0,0 +1,78 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-partymember__icPartyMemberPayRecord}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('partymember:icPartyMemberPayRecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('partymember:icPartyMemberPayRecord:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="id" label="唯一标识" header-align="center" align="center"></el-table-column>
<el-table-column prop="customerId" label="客户Id (customer.id)" header-align="center" align="center"></el-table-column>
<el-table-column prop="partyMemberId" label="党员ID" header-align="center" align="center"></el-table-column>
<el-table-column prop="payDate" label="缴费日期" header-align="center" align="center"></el-table-column>
<el-table-column prop="money" label="缴费金额" header-align="center" align="center"></el-table-column>
<el-table-column prop="startDate" label="缴费开始时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="endDate" label="缴费结束时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="delFlag" label="删除标识:0.未删除 1.已删除" header-align="center" align="center"></el-table-column>
<el-table-column prop="revision" label="乐观锁" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdBy" label="创建人" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="updatedBy" label="更新人" header-align="center" align="center"></el-table-column>
<el-table-column prop="updatedTime" label="更新时间" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-if="$hasPermission('partymember:icPartyMemberPayRecord:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('partymember:icPartyMemberPayRecord:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './icpartymemberpayrecord-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/partymember/icPartyMemberPayRecord/page',
getDataListIsPage: true,
deleteURL: '/partymember/icPartyMemberPayRecord',
deleteIsBatch: true
},
dataForm: {
id: ''
}
}
},
components: {
AddOrUpdate
}
}
</script>

160
src/views/modules/partymember/icpartymemberpayrecorddetail-add-or-update.vue

@ -0,0 +1,160 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="客户Id (customer.id)" prop="customerId">
<el-input v-model="dataForm.customerId" placeholder="客户Id (customer.id)"></el-input>
</el-form-item>
<el-form-item label="党员ID" prop="partyMemberId">
<el-input v-model="dataForm.partyMemberId" placeholder="党员ID"></el-input>
</el-form-item>
<el-form-item label="党员缴费记录表ID" prop="recordId">
<el-input v-model="dataForm.recordId" placeholder="党员缴费记录表ID"></el-input>
</el-form-item>
<el-form-item label="缴费年度" prop="year">
<el-input v-model="dataForm.year" placeholder="缴费年度"></el-input>
</el-form-item>
<el-form-item label="缴费季度" prop="quarter">
<el-input v-model="dataForm.quarter" placeholder="缴费季度"></el-input>
</el-form-item>
<el-form-item label="缴费金额" prop="money">
<el-input v-model="dataForm.money" placeholder="缴费金额"></el-input>
</el-form-item>
<el-form-item label="删除标识:0.未删除 1.已删除" prop="delFlag">
<el-input v-model="dataForm.delFlag" placeholder="删除标识:0.未删除 1.已删除"></el-input>
</el-form-item>
<el-form-item label="乐观锁" prop="revision">
<el-input v-model="dataForm.revision" placeholder="乐观锁"></el-input>
</el-form-item>
<el-form-item label="创建人" prop="createdBy">
<el-input v-model="dataForm.createdBy" placeholder="创建人"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createdTime">
<el-input v-model="dataForm.createdTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label="更新人" prop="updatedBy">
<el-input v-model="dataForm.updatedBy" placeholder="更新人"></el-input>
</el-form-item>
<el-form-item label="更新时间" prop="updatedTime">
<el-input v-model="dataForm.updatedTime" placeholder="更新时间"></el-input>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
customerId: '',
partyMemberId: '',
recordId: '',
year: '',
quarter: '',
money: '',
delFlag: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: ''
}
}
},
computed: {
dataRule () {
return {
customerId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
partyMemberId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
recordId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
year: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
quarter: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
money: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
delFlag: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
revision: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
createdBy: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
createdTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updatedBy: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updatedTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id); {
this.getInfo()
}
})
},
//
getInfo () {
this.$http.get(`/${moduleName}/${pathName}/#[[${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
;return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid); {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/${moduleName}/${pathName}/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false;
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

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

@ -0,0 +1,284 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-rent__rentDeath} resi-container">
<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
v-model="mySelectOrg"
:options="orgList"
placeholder="请选择党组织"
:props="{ label: 'partyOrgName', value: 'id' }"
@change="handleChangeOrg"
clearable />
</el-form-item>
<el-form-item label="姓名"
prop="name">
<el-input v-model="dataForm.name"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入姓名">
</el-input>
</el-form-item>
<el-form-item label="身份证"
prop="idCard">
<el-input v-model="dataForm.idCard"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入身份证">
</el-input>
</el-form-item>
<el-form-item label="手机"
prop="mobile">
<el-input v-model="dataForm.mobile"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入手机">
</el-input>
</el-form-item>
<br/>
<el-form-item label="缴费年度" prop="year">
<el-date-picker
v-model="dataForm.year"
type="year"
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-option v-for="item in monthArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()" size="small">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button class="diy-button--reset" size="small" @click="resetForm">重置</el-button>
</el-form-item>
<!--<el-form-item>-->
<!--<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>-->
<!--</el-form-item>-->
<!--<el-form-item>-->
<!--<el-button type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>-->
<!--</el-form-item>-->
</el-form>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button type="warning" size="small" class="diy-button--reset" @click="exportHandle()">{{ $t('export') }}</el-button>
</div>
<el-table class="resi-table" v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<!--<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>-->
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="orgName" label="所属党组织" header-align="center" align="center"></el-table-column>
<el-table-column prop="name" label="姓名" header-align="center" align="center"></el-table-column>
<el-table-column prop="idCard" label="身份证" header-align="center" align="center"></el-table-column>
<el-table-column prop="mobile" label="手机号" header-align="center" align="center"></el-table-column>
<el-table-column prop="times" label="缴费次数" header-align="center" align="center"></el-table-column>
<el-table-column prop="money" label="缴费金额" header-align="center" align="center"></el-table-column>
<el-table-column prop="remark" label="备注" header-align="center" align="center"></el-table-column>
<!--<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">-->
<!--<template slot-scope="scope">-->
<!--<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>-->
<!--<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</el-card>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './icpartymemberpayrecorddetail-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/resi/partymember/icPartyMemberPayRecordDetail/page',
getDataListIsPage: true,
deleteURL: '/resi/partymember/icPartyMemberPayRecordDetail',
deleteIsBatch: true
},
dataForm: {
id: '',
name: '',
idCard: '',
mobile: '',
year: '',
month: '',
orgId: ''
},
monthArr: [
{ dictValue: '01', dictName: '一月' },
{ dictValue: '02', dictName: '二月' },
{ dictValue: '03', dictName: '三月' },
{ dictValue: '04', dictName: '四月' },
{ dictValue: '05', dictName: '五月' },
{ dictValue: '06', dictName: '六月' },
{ dictValue: '07', dictName: '七月' },
{ dictValue: '08', dictName: '八月' },
{ dictValue: '09', dictName: '九月' },
{ dictValue: '10', dictName: '十月' },
{ dictValue: '11', dictName: '十一月' },
{ dictValue: '12', dictName: '十二月' }
],
mySelectOrg: '',
orgList: [],
}
},
components: {
AddOrUpdate
},
created() {
this.getOrgList()
},
methods: {
resetForm(formName) {
for(const n in this.dataForm) {
this.dataForm[n] = ''
}
this.getDataList()
this.mySelectOrg = ''
},
yearChangeHandler(){
if(this.dataForm.year === '' || this.dataForm.year === null){
this.dataForm.month = ''
}
},
handleSizeChange (val) {
console.log(`每页 ${val}`)
this.pageSize = val
this.getDataList()
},
handleCurrentChange (val) {
console.log(`当前页: ${val}`)
this.currentPage = val
this.getDataList()
},
//
getOrgList() {
return this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: {agencyId: localStorage.getItem('agencyId')}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.orgList = this.deepArrTOnull(res.data)
}).catch(() => {})
},
//
handleChangeOrg(e) {
if (this.mySelectOrg.length > 0 && this.mySelectOrg) {
this.dataForm.orgId = this.mySelectOrg[this.mySelectOrg.length - 1]
} else {
this.dataForm.orgId = ''
}
},
deepArrTOnull(arr) {
let a = []
a = arr.map(item => {
return {
...item,
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
}
})
return a
}
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
display: flex;
margin-bottom: 13px;
.el-button {
margin-left: 10px;
border: 0;
}
// .el-button--success {
// background: rgba(34, 193, 195, 1);
// }
// .el-button--warning {
// background: rgba(254, 179, 73, 1);
// }
// .el-button--danger {
// background: rgba(254, 98, 82, 1);
// }
}
</style>

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

@ -0,0 +1,228 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-rent__rentDeath} resi-container">
<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
style="width:300px"
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">
<el-input v-model="dataForm.name"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入姓名">
</el-input>
</el-form-item>
<el-form-item label="手机"
prop="mobile">
<el-input v-model="dataForm.mobile"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入手机">
</el-input>
</el-form-item>
<el-form-item label="身份证"
prop="idCard">
<el-input v-model="dataForm.idCard"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入身份证">
</el-input>
</el-form-item>
<br/>
<el-form-item label="评分年度" prop="year">
<el-date-picker
v-model="dataForm.year"
type="year"
placeholder="选择年"
value-format="yyyy">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()" size="small">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button class="diy-button--reset" size="small" @click="resetForm">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="resi-card-table">
<el-table class="resi-table" v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<!--<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>-->
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="year" label="年度" header-align="center" align="center"></el-table-column>
<el-table-column prop="partyOrg" label="所属党组织" header-align="center" align="center"></el-table-column>
<el-table-column prop="name" label="姓名" header-align="center" align="center"></el-table-column>
<el-table-column prop="idCard" label="身份证" header-align="center" align="center"></el-table-column>
<el-table-column prop="mobile" label="手机号" header-align="center" align="center"></el-table-column>
<el-table-column prop="totalScore" label="总分" header-align="center" align="center"></el-table-column>
<el-table-column prop="basePoint" label="基础积分分值" header-align="center" align="center"></el-table-column>
<el-table-column prop="reviewPoint" label="民主评议积分分值" header-align="center" align="center"></el-table-column>
<el-table-column prop="inspirePoint" label="激励积分分值" header-align="center" align="center"></el-table-column>
<el-table-column prop="warnPoint" label="警示扣分分值" header-align="center" align="center"></el-table-column>
<el-table-column prop="remark" label="备注" header-align="center" align="center"></el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</el-card>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/resi/partymember/icPartyMemberPoint/getList',
getDataListIsPage: true
},
mySelectOrg: '',
orgList: [],
dataForm: {
id: '',
orgId: '',
name: '',
idCard: '',
mobile: '',
year: ''
}
}
},
created() {
this.getOrgList()
},
methods: {
resetForm(formName) {
for(const n in this.dataForm) {
this.dataForm[n] = ''
}
this.getDataList()
this.mySelectOrg = ''
},
handleSizeChange (val) {
console.log(`每页 ${val}`)
this.pageSize = val
this.getDataList()
},
handleCurrentChange (val) {
console.log(`当前页: ${val}`)
this.currentPage = val
this.getDataList()
},
//
getOrgList() {
return this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: {agencyId: localStorage.getItem('agencyId')}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.orgList = res.data
}).catch(() => {})
},
//
handleChangeOrg(e) {
if (this.mySelectOrg.length > 0 && this.mySelectOrg) {
this.dataForm.orgId = this.mySelectOrg[this.mySelectOrg.length - 1]
} else {
this.dataForm.orgId = ''
}
},
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
display: flex;
margin-bottom: 13px;
.el-button {
margin-left: 10px;
border: 0;
}
// .el-button--success {
// background: rgba(34, 193, 195, 1);
// }
// .el-button--warning {
// background: rgba(254, 179, 73, 1);
// }
// .el-button--danger {
// background: rgba(254, 98, 82, 1);
// }
}
</style>

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

@ -0,0 +1,496 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? '新增党组织' : '更新党组织'" :close-on-click-modal="false"
:close-on-press-escape="false">
<el-form class="form"
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '100px'">
<el-form-item prop="partyOrgType" label="组织类型">
<el-select v-model="dataForm.partyOrgType" @change="changePartyOrgType" clearable placeholder="请选择组织类型">
<el-option
v-for="item in partyOrgTypeList"
:key="item.value"
:label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="partyOrgName" label="组织名称">
<el-input v-model="dataForm.partyOrgName" placeholder="请输入组织名称" style="width:300px"></el-input>
</el-form-item>
<el-form-item label="组织编码" prop="partyOrgCode">
<el-input v-model="dataForm.partyOrgCode" placeholder="组织编码" style="width:300px"></el-input>
</el-form-item>
<el-form-item v-if="dataForm.partyOrgType != '5'" prop="maSelectAgency" label="行政组织">
<el-cascader
style="width:300px"
v-model="dataForm.maSelectAgency"
:options="agencyOrgList"
placeholder="请选择行政组织"
:props="{ checkStrictly: true, label: 'name', value: 'id', children: 'children' }"
@change="handleChangeAgency"
clearable />
</el-form-item>
<el-form-item prop="mySelectOrg" label="上级组织">
<el-cascader
style="width:300px"
v-model="dataForm.mySelectOrg"
:options="orgList"
placeholder="请选择上级组织"
:props="{ checkStrictly: true, label: 'partyOrgName', value: 'id', children: 'children' }"
@change="handleChangeOrg"
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="位置坐标"
prop="longitude"
style="display: block">
<div class="item_width_1">
<div class="div_map">
<div id="app">
</div>
<div style="display: none" id="mapSeach_id" class="div_searchmap">
<el-input class="item_width_4"
maxlength="50"
size="mini"
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="mini"
@click="handleSearchMap">查询</el-button>
</div>
</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>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
var map
var search
var markers
var infoWindowList
var geocoder //
import debounce from 'lodash/debounce'
export default {
data() {
return {
visible: false,
keyWords: '',
dataForm: {
id: '',
partyOrgType: '', // 0,1,2,3,4,5
partyOrgName: '', //
partyOrgCode: '', //
mySelectOrg:'', //
orgPid: '', // ID,0
orgPids: '', // ID,0
maSelectAgency: '', //
agencyId: '', // id
agencyPids:'', // ids()
longitude: 36.0722275, //
latitude: 120.38945519, //
address: '',
introduction: '', //
customerId: '',
staffId:'',
orgPidName: '',
agencyName:''
},
orgListVisible: false,
agencyListVisible:false,
orgList: [],
agencyId: '',
partyOrgTypeList: [],
agencyOrgList:[]
}
},
mounted () {
setTimeout(() => {
this.initMap()
}, 800);
},
methods: {
init() {
this.visible = true
this.agencyId = localStorage.getItem('agencyId')
this.dataForm.customerId = localStorage.getItem('customerId')
this.dataForm.staffId = localStorage.getItem('staffId')
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
//
this.setPartyOrgType()
this.getOrgList().then(() => {
if (this.dataForm.id) {
this.getInfo()
} else {
if(this.dataForm.orgPids) {
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(':')
} else {
this.dataForm.mySelectOrg = ''
}
this.orgListTreeSetDefaultHandle()
}
})
})
},
//
setPartyOrgType() {
// community:street,: district,: city :province
// 0,1,2,3,4,5
this.level = localStorage.getItem('level')
if (this.level == 'province') {
this.partyOrgTypeList = [
{value: '0', name: '省委'},
{value: '1', name: '市委'},
{value: '2', name: '区委'},
{value: '3', name: '党工委'},
{value: '4', name: '党委'},
{value: '5', name: '支部'}
]
}else if(this.level == 'city'){
this.partyOrgTypeList = [
{value: '1', name: '市委'},
{value: '2', name: '区委'},
{value: '3', name: '党工委'},
{value: '4', name: '党委'},
{value: '5', name: '支部'}
]
}else if(this.level == 'district'){
this.partyOrgTypeList = [
{value: '2', name: '区委'},
{value: '3', name: '党工委'},
{value: '4', name: '党委'},
{value: '5', name: '支部'}
]
}else if(this.level == 'street'){
this.partyOrgTypeList = [
{value: '3', name: '党工委'},
{value: '4', name: '党委'},
{value: '5', name: '支部'}
]
}else if(this.level == 'community'){
this.partyOrgTypeList = [
{value: '4', name: '党委'},
{value: '5', name: '支部'}
]
}
},
//
changePartyOrgType(value){
if(value != '5'){ //
this.dataForm.agencyId = ''
this.dataForm.agencyPids = ''
this.dataForm.maSelectAgency = ''
}
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)
}
this.agencyOrgList = res.data
}).catch(() => {})
},
//
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)
}
this.orgList = res.data
this.orgList.unshift({
partyOrgName: '一级组织',
id: '0'
});
}).catch(() => {
})
},
//
handleChangeOrg(e) {
if (this.dataForm.mySelectOrg.length > 0 && this.dataForm.mySelectOrg) {
this.dataForm.orgPid = this.dataForm.mySelectOrg[this.dataForm.mySelectOrg.length - 1]
this.dataForm.orgPids = ''
this.dataForm.mySelectOrg.forEach(element => {
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + element : element
});
} else {
this.dataForm.orgPid = ''
this.dataForm.orgPids = ''
}
},
//
handleChangeAgency(e){
console.log(this.dataForm.maSelectAgency)
if (this.dataForm.maSelectAgency.length > 0 && this.dataForm.maSelectAgency) {
this.dataForm.agencyId = this.dataForm.maSelectAgency[this.dataForm.maSelectAgency.length - 1]
this.dataForm.agencyPids = ''
this.dataForm.maSelectAgency.forEach(element => {
this.dataForm.agencyPids = this.dataForm.agencyPids ? this.dataForm.agencyPids + ':' + element : element
});
} else {
this.dataForm.agencyId = ''
this.dataForm.agencyPids = ''
}
},
//
getInfo() {
this.$http.get(`/resi/partymember/icPartyOrg/${this.dataForm.id}`).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
//
this.dataForm.mySelectOrg = this.dataForm.orgPids
//
this.dataForm.maSelectAgency = this.dataForm.agencyId
}).catch(() => {
})
//
this.getInfoAgencyLisy()
},
getInfoAgencyLisy(){
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.msg)
}
this.agencyOrgList = res.data
}).catch(() => {
})
},
// ,
orgListTreeSetDefaultHandle() {
this.dataForm.orgPid = '0'
this.dataForm.orgPidName = '一级组织'
},
// init
initMap () {
if (document.getElementById('app')) {
document.getElementById('mapSeach_id').style.display = "block"
document.getElementById('lon_lat_id').style.display = "block"
}
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
},
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
}
])
},
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close()
})
infoWindowList.length = 0
markers.setGeometries([])
//
search.searchRectangle({ keyword: this.keyWords, bounds: map.getBounds()}).then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.dataForm.latitude = lat
this.dataForm.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
}
})
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.dataForm.latitude = lat
this.dataForm.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(':');
let location
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(this.dataForm.latitude, this.dataForm.longitude);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
//
geocoder.getAddress({ location: location }).then((result) => {
this.dataForm.address = result.result.address
//
});
},
//
dataFormSubmitHandle: debounce(function () {
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)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {
})
})
}, 1000, {'leading': true, 'trailing': false})
},
computed: {
dataRule() {
return {
mySelectOrg: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
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'}
],
maSelectAgency: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
]
}
}
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>
<style lang="scss" scoped>
.item_width_1 {
width: 560px;
/deep/.tox .tox-dialog {
z-index: 20000;
}
}
.div_map {
position: relative;
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
.tinymce_view {
height: 400px;
overflow: auto;
}
.text_p {
margin: 0;
padding: 0 10px;
border: 1px solid #d9d9d9;
border-radius: 5px;
> p {
margin: 0;
}
}
</style>

84
src/views/modules/partymember/icpartyorg.vue

@ -0,0 +1,84 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-partymember__icPartyOrg}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('partymember:icPartyOrg:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('partymember:icPartyOrg:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="id" label="唯一标识" header-align="center" align="center"></el-table-column>
<el-table-column prop="customerId" label="客户Id (customer.id)" header-align="center" align="center"></el-table-column>
<el-table-column prop="orgPid" label="党组织的上级ID,没有上级时为0" header-align="center" align="center"></el-table-column>
<el-table-column prop="orgPids" label="党组织的所有上级ID,没有上级时为0" header-align="center" align="center"></el-table-column>
<el-table-column prop="agencyId" label="行政组织 机关ID" header-align="center" align="center"></el-table-column>
<el-table-column prop="agencyPids" label="行政组织 机关ID" header-align="center" align="center"></el-table-column>
<el-table-column prop="partyOrgType" label="党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部" header-align="center" align="center"></el-table-column>
<el-table-column prop="partyOrgName" label="组织名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="partyOrgCode" label="组织编码" header-align="center" align="center"></el-table-column>
<el-table-column prop="longitude" label="经度" header-align="center" align="center"></el-table-column>
<el-table-column prop="latitude" label="纬度" header-align="center" align="center"></el-table-column>
<el-table-column prop="address" label="地址" header-align="center" align="center"></el-table-column>
<el-table-column prop="introduction" label="党组织介绍" header-align="center" align="center"></el-table-column>
<el-table-column prop="delFlag" label="删除标识:0.未删除 1.已删除" header-align="center" align="center"></el-table-column>
<el-table-column prop="revision" label="乐观锁" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdBy" label="创建人" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="updatedBy" label="更新人" header-align="center" align="center"></el-table-column>
<el-table-column prop="updatedTime" label="更新时间" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-if="$hasPermission('partymember:icPartyOrg:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('partymember:icPartyOrg:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './icpartyorg-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/partymember/icPartyOrg/page',
getDataListIsPage: true,
deleteURL: '/partymember/icPartyOrg',
deleteIsBatch: true
},
dataForm: {
id: ''
}
}
},
components: {
AddOrUpdate
}
}
</script>

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

@ -0,0 +1,235 @@
<template>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button class="diy-button--add"
size="small"
@click="addOrUpdateHandle()">新增</el-button>
</div>
<!-- 列表表格 -->
<el-table
class="table"
v-loading="tableLoading"
:data="tableData"
:default-expand-all="true"
row-key="id"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}">
<el-table-column prop="partyOrgName" label="党组织名称"></el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button v-if="scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)"
@click="handleLook(scope.row.agencyId)"
type="text"
size="small"
class="div-table-button--detail">{{'查看党员'}}</el-button>
<el-button v-if="scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)"
@click="addOrUpdateHandle('', scope.row.orgPids)"
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)"
type="text"
size="small"
class="div-table-button--edit">修改</el-button>
<el-button v-if="scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)"
@click="deleteAgency(scope.row.id)"
type="text"
size="small"
class="div-table-button--edit">删除</el-button>
</template>
</el-table-column>
</el-table>
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getTableData"></add-or-update>
<!-- 查看党员 -->
<el-dialog :visible.sync="lookMemberShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="memberTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="lookMemberClose">
<look-Member ref="ref_table_Member"
@lookMemberCancle="lookMemberCancle"
@lookMemberOk="lookMemberOk"></look-Member>
</el-dialog>
</el-card>
</template>
<script>
import AddOrUpdate from './icpartyorg-add-or-update'
import TableTreeColumn from '@/components/table-tree-column'
import lookMember from './lookMember'
export default {
data () {
return {
dataForm: {
id: '',
customerId: '',
orgPids: ''
},
tableLoading: false,
tableData: [],
agencyId: '',
addOrUpdateVisible: false,
lookMemberShow: false,
memberTitle: '查看党员'
}
},
components: {
AddOrUpdate,
TableTreeColumn,
lookMember
},
async created () {
this.agencyId = localStorage.getItem('agencyId')
this.dataForm.customerId = localStorage.getItem('customerId')
this.getTableData()
// this.pageLoading = true
},
methods:{
//
async getTableData () {
this.tableLoading = true
let params = {
customerId: localStorage.getItem('customerId')
}
await this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: this.dataForm}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.tableData = res.data
}
}).catch(() => {})
this.tableLoading = false
},
// /
addOrUpdateHandle (id, orgPids) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id
//
this.$refs.addOrUpdate.dataForm.orgPids = orgPids //
this.$refs.addOrUpdate.init()
})
},
//
deleteAgency (id) {
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('delete') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.delete('/resi/partymember/icPartyOrg/delete', {'data': [id]}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.getTableData()
}
})
}).catch(() => {})
}).catch(() => {})
},
//
handleLook(agencyId) {
this.lookMemberShow = true
this.$nextTick(() => {
this.$refs.ref_table_Member.initForm(agencyId)
})
},
lookMemberClose () {
this.lookMemberShow = false
},
lookMemberCancle () {
this.lookMemberShow = false
},
lookMemberOk () {
this.lookMemberShow = false
}
}
}
</script>
<style lang="scss" scoped>
.resi-container .resi-card-table {
::v-deep .el-table {
th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
}
.cell {
span:nth-of-type(3) {
display: inline-block;
width: 90%;
word-break: break-all;
}
}
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
</style>
<style lang="scss" scoped>
.resi-row-btn {
display: flex;
margin-bottom: 13px;
::v-deep .el-button {
// margin-left: 10px;
border: 0;
}
::v-deep .el-select {
margin-right: 10px;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
}
.avatar-uploader {
::v-deep .el-upload {
cursor: pointer;
position: relative;
overflow: hidden;
}
.el-upload:hover {
border-color: #409eff;
}
.avatar {
width: 70px;
height: 70px;
display: block;
}
.avatar-uploader-icon {
border: 1px dashed #d9d9d9;
border-radius: 6px;
font-size: 28px;
color: #8c939d;
width: 70px;
height: 70px;
line-height: 70px;
text-align: center;
}
}
.resi-btns {
margin-top: 20px;
text-align: center;
}
</style>

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

@ -0,0 +1,95 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div>
<div class="div_table">
<el-table ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%"
highlight-current-row>
<el-table-column prop="name"
label="姓名">
</el-table-column>
<el-table-column prop="mobile"
label="联系方式">
</el-table-column>
<el-table-column prop="idCard"
label="身份证号">
</el-table-column>
</el-table>
</div>
</div>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { requestPost } from "@/js/dai/request";
export default {
data () {
return {
btnDisable: false,
//
tableData: [],
tableLoading: false,
orgPids: ''
}
},
props: {
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 410 + this.iframeHeight : this.clientHeight - 410
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
components: {},
methods: {
initForm (agencyId) {
this.orgPids = agencyId
this.tableLoading = true
this.loadTable()
},
//
handleCancle () {
this.$emit('lookMemberCancle')
},
//
async loadTable () {
let params = {
partyOrgId: this.orgPids,
pageNo: 1,
pageSize: 10000000
}
const url = `/resi/partymember/icPartyMember/page`
const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false
if (code === 0) {
this.tableData = data.list ? data.list : []
}
}
},
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
</style>
<style lang="scss" scoped>
.div_btn{
display: flex;
align-items: center;
justify-content: center;
}
</style>

28
src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue

@ -258,17 +258,27 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
//
this.fileJurisdiction(params)
}).catch(() => {})
},
//
fileJurisdiction (params) {
this.$http.post('/pli/power/rentContractInfo/send', params).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {

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

@ -15,7 +15,7 @@
</el-cascader>
</div>
<div class="second-select">
<!-- <div class="second-select">
<el-select v-model="serviceMatter"
placeholder="请选择"
@change="handleSelectChange"
@ -39,12 +39,108 @@
:default-time="['00:00:00', '23:59:59']"
@change="handleTimeChange">
</el-date-picker>
</div>
</div> -->
</div>
<div class="second-title">
<div class="second-title-label">联建活动分类统计</div>
<div class="second-title-label">联建单位分布</div>
</div>
<div class="box-wr calc-h">
<div class="box-left flex-column wd50">
<!-- <div v-for="(item, index) in partyItem"
:key="index"
class="box-left-item">
<div class="box-label">{{ item.label }}</div>
<div class="box-num"
:style="'color:' + item.color">{{ item.value }}</div>
</div> -->
<div class="echart-wr echart-wr100">
<screen-echarts-frame class="echart-org"
@myChartMethod="pieInitOks"
ref="eduChart"></screen-echarts-frame>
</div>
<div class="warning-box-bottom mt0 table-h">
<screen-table :headerList="headerTypeList"
:tableData="unitTableData"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleLoading"
:operate="true"
@look="handleUnitLook"></screen-table>
<div class="pagination">
<el-pagination :current-page="unitpageNo"
:page-size="unitpageSize"
background
layout="prev, pager, next"
@size-change="pageSizeHandle"
@current-change="pageCurrentHandle"
:total="unitTotal">
</el-pagination>
</div>
</div>
</div>
<div class="box-right">
<div class="box-map">
<screen-map v-show="showMap" class="map"
ref="cmap"
:mapId="'cmap'"
:showPolygonLayer="true"
:isAddOpenlay="true"
:clickType="'popup'"
:showIconLayer="true"
:showPolIconLayer="true"
:areaScale="0.1"
@clickFeature="clickProject"
></screen-map>
</div>
<!-- <div class="map-tips">
<div v-for="(item, index) in partyItem"
:key="index"
class="map-tips-item">
<div class="map-tips-icon">
<img :src="item.icon" />
</div>
<div class="map-tips-label">{{ item.label }}</div>
</div>
</div> -->
</div>
</div>
<div class="card-title mt20">
<div class="second-title mt0">
<div class="second-title-label">联建活动分类统计</div>
</div>
<div class="second-select">
<el-select v-model="serviceMatter"
placeholder="请选择"
@change="handleSelectChange"
@clear="handleSelectChange">
<el-option v-for="item in unitList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="second-select">
<el-date-picker v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
value-format="yyyy-MM-dd HH:mm:ss"
:clearable="false"
:default-time="['00:00:00', '23:59:59']"
@change="handleTimeChange">
</el-date-picker>
</div>
</div>
<div class="box-wr box-wr-400">
<div class="box-left">
<div v-for="(item, index) in cateInfo"
@ -78,45 +174,15 @@
</div>
</div>
</div>
<div class="second-title">
<div class="second-title-label">联建单位分布</div>
</div>
<div class="box-wr">
<div class="box-left box-left-w400">
<div v-for="(item, index) in partyItem"
:key="index"
class="box-left-item">
<div class="box-label">{{ item.label }}</div>
<div class="box-num"
:style="'color:' + item.color">{{ item.value }}</div>
</div>
</div>
<div class="box-right">
<div class="box-map">
<screen-map class="map"
ref="map"
@clickFeature="clickProject"
:showIconLayer="true"></screen-map>
</div>
<div class="map-tips">
<div v-for="(item, index) in partyItem"
:key="index"
class="map-tips-item">
<div class="map-tips-icon">
<img :src="item.icon" />
</div>
<div class="map-tips-label">{{ item.label }}</div>
</div>
</div>
</div>
</div>
</cpt-card>
<dialog-info v-show="showedMoreInfo"
<dialog-info v-if="showedMoreInfo" v-fixed
:info="detailInfo"
@close="showedMoreInfo = false" />
<unit-info v-if="showedUnitMoreInfo" v-fixed
:list="unitAclist"
ref="unitdetailInfo"
@close="showedUnitMoreInfo = false" />
</div>
</template>
@ -127,7 +193,10 @@ import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
import dialogInfo from './dialogInfo.vue'
import unitInfo from './unitInfo.vue'
import screenMap from "@/views/modules/visual/components/screen-map";
import screenEchartsFrame from "../components/screen-echarts-frame";
import { pieOption } from './options'
export default {
name: "warning-box",
@ -135,14 +204,33 @@ export default {
cptCard,
screenTable,
dialogInfo,
screenMap
unitInfo,
screenMap,
screenEchartsFrame
},
data () {
return {
showedMoreInfo: false,
showedUnitMoreInfo: false,
tableLoading: false,
warningList: [],
headerTypeList: [
{ title: "序号", coulmn: 'index' },
{ title: "单位名称", coulmn: 'unitName' },
{ title: "单位类型", coulmn: 'type' },
],
headerStyle: [
{
'width': '60px'
},
{
'min-width': '160px'
},
{
'width': '160px'
}
],
headerList: [
{ title: "序号", coulmn: 'index' },
{ title: "活动标题", coulmn: 'title' },
@ -156,6 +244,7 @@ export default {
// [1,'','','2',''],
],
detailId: '',
unitdetailId: '',
agencyId: '',
value2: '',
timeRange: '',
@ -164,10 +253,15 @@ export default {
pageNo: 1,
pageSize: 10,
total: 0,
unitpageNo: 1,
unitpageSize: 10,
unitTotal: 0,
unitTableData: [],
activeIndex: 0,
activeLevel: "1",
selectAgency: '',
unitList: [],
unitType: '',
propTree: [],
partyItem: [],
cateInfo: [],
@ -176,7 +270,20 @@ export default {
agencyInfo: {},//level
unitMapList: [],
detailInfo: {}
detailInfo: {},
unitdetailInfo: {},
pieEduChartSs: null,
pieEduOptions: null,
eduList: [],
partyCode: '',
totalCount: 0,
noInit: false,
orgData: [],
orgId: '',
orgLevel: '',
parentPolygon: [],
unitAclist: [],
showMap: false
};
},
async mounted () {
@ -186,13 +293,16 @@ export default {
this.initTime()
await nextTick(100);
await this.getAgencyList()
await this.loadOrgData()
await this.getCateType(this.agencyId)
this.loadUnit()
this.getList(this.agencyId)
this.getUnitList(this.agencyId)
this.getCateCount(this.agencyId)
this.getCateType(this.agencyId)
await this.getWorkUserInfo()
await this.getMapUnitList(this.agencyId)
// await this.getMapUnitList(this.agencyId)
},
watch: {
timeRange (val) {
@ -202,6 +312,119 @@ export default {
}
},
methods: {
pieInitOks (dom) {
console.log('pies准备好了', dom)
this.pieEduChartS = dom
// this.pieInitState = true
},
initEduCharts() {
// const eId = document.getElementById('echartOrg')
// let _charts = echarts.init(eId)
let option = {
}
let 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.partyItem.length; a++) {
// this.data
if (this.partyItem[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;
}
}
}
}
this.pieEduOptions = pieOption(this.pieEduChartS)
this.pieEduOptions.legend = { ...legend }
// this.pieEduOptions.series[1].width = 400
this.clickEduPie(0)
let fun = params => {
this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
// this.noInit = true
// option && this.$refs.pieChart.setOption(option);
},
clickEduPie (seriesIndex) {
let _code = ''
let isClick = false
this.partyItem.forEach((element, index) => {
if (index === seriesIndex) {
_code = element.code
if (!this.noInit) isClick = false
else {
element.isClick = !element.isClick
isClick = element.isClick
}
element.label = {
show: true,
};
element.labelLine = {
show: true,
lineStyle: {
opacity: 1,
}
};
console.log('zlcm')
} else {
element.isClick = false
element.label = {
show: false,
};
element.labelLine = {
show: false,
lineStyle: {
opacity: 0,
color: 'rgba(255,255,255,0)'
}
};
}
});
this.unitType = isClick && _code || ''
this.pieEduOptions.title.text = this.totalCount
this.pieEduOptions.series[1].data = this.partyItem
// this.$refs.pieChart.hideLoading()
this.$refs.eduChart.setOption(this.pieEduOptions)
if (this.noInit) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.unitpageNo = 1
this.getUnitList(_arr[0])
// this.getCateType(_arr[0], isClick && _code || '')
}
this.noInit = true
},
handleTimeChange (time) {
if (time) {
const startTimeArray = util.dateFormatter(time[0], 'date').split('-')
@ -218,7 +441,35 @@ export default {
this.getList(this.agencyId);
this.getCateCount(this.agencyId)
},
//
//
async getAcList (agencyId, unitId) {
const url = "/heart/icpartyactivity/activitylist"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
let params = {
pageNo: 1,
pageSize: 9999,
agencyId,
unitId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.unitAclist = data.list && data.list.map((item, index) => {
return {
...item,
index: index + 1
}
})
if (this.unitAclist.length > 0) this.showedUnitMoreInfo = true
else this.$message.warning('该单位还没有活动')
} else {
this.$message.error(msg)
}
},
//
async getList (agencyId) {
this.visibleLoading = true
@ -248,6 +499,47 @@ export default {
}
this.visibleLoading = false
},
//
async getUnitList (agencyId) {
this.visibleLoading = true
// this.showMap = false
const url = "/heart/icpartyunit/listbrief"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
let params = {
agencyId,
pageSize: this.unitpageSize,
pageNo: this.unitpageNo,
type: this.unitType
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.showMap = false
this.unitTotal = data.total
this.unitTableData = data.list.map((item, index) => {
return {
...item,
index: index + 1
}
})
const url = require('../../../../assets/img/shuju/measure/other.png')
this.iconUrlArray = [url]
this.showMap = true
//false
this.$nextTick(() => {
this.loadMap()
this.$forceUpdate()
this.isfirstInit = false
})
// this.isfirstInit = false
} else {
this.$message.error(msg)
}
this.visibleLoading = false
},
async getAgencyList () {
// const url = "/gov/org/customeragency/staffinagencylist";
// const url = '/gov/org/customeragency/agencygridtree'
@ -269,6 +561,35 @@ export default {
this.$message.error(msg)
}
},
async loadOrgData () {
const url = "/gov/org/agency/maporg"
let params = {
orgId: this.orgId,
level: this.orgLevel
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.orgData = data
this.orgId = this.orgData.id
this.orgLevel = this.orgData.level
this.parentPolygon = []
this.parentPolygon = data.children.map(item => {
return {
...item,
color: "#00E5ED",
fillColor: "rgba(0, 229, 237, 0.16)"
}
})
} else {
this.$message.error(msg)
}
},
getTreeData (data) {
if (!Array.isArray(data)) return []
let arr = data.map(item => {
@ -369,9 +690,16 @@ export default {
this.partyItem = data.map((item, index) => {
return {
...item,
...colorItem[index]
...colorItem[index],
name: item.label,
isClick: false
}
})
this.totalCount = 0
data.forEach(item => {
this.totalCount += Number(item.value)
})
this.initEduCharts()
} else {
this.$message.error(msg)
}
@ -393,16 +721,24 @@ export default {
this.$message.error(msg)
}
},
handleCascader (val) {
async handleCascader (val) {
console.log('val-vvv', val)
if (val.length > 0) {
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency' : 'grid'
this.agencyId = _arr[0]
this.orgId = _arr[0]
this.orgLevel = orgType
this.unitType = ''
this.getList(_arr[0])
this.getMapUnitList(_arr[0])
await this.getCateType(_arr[0])
await this.loadOrgData()
this.agencyInfo = { ...this.orgData }
console.log('agencyInfo-----', this.agencyInfo)
this.getUnitList(_arr[0])
// this.getMapUnitList(_arr[0])
this.getCateCount(_arr[0])
this.getCateType(_arr[0])
}
},
@ -533,18 +869,18 @@ export default {
item.urlIndex = 7
}
});
this.iconUrlArray = [
require('../../../../assets/img/shuju/measure/lxdj.png'),//
require('../../../../assets/img/shuju/measure/lxzz.png'),//
require('../../../../assets/img/shuju/measure/qydw.png'),//
require('../../../../assets/img/shuju/measure/jgzs.png'),//
require('../../../../assets/img/shuju/measure/qita.png'),//
require('../../../../assets/img/shuju/measure/minban.png'),//
require('../../../../assets/img/shuju/measure/jijin.png'),//
require('../../../../assets/img/shuju/measure/other.png')//
]
const url = require('../../../../assets/img/shuju/measure/other.png')
// this.iconUrlArray = [
// require('../../../../assets/img/shuju/measure/lxdj.png'),//
// require('../../../../assets/img/shuju/measure/lxzz.png'),//
// require('../../../../assets/img/shuju/measure/qydw.png'),//
// require('../../../../assets/img/shuju/measure/jgzs.png'),//
// require('../../../../assets/img/shuju/measure/qita.png'),//
// require('../../../../assets/img/shuju/measure/minban.png'),//
// require('../../../../assets/img/shuju/measure/jijin.png'),//
// require('../../../../assets/img/shuju/measure/other.png')//
// ]
this.iconUrlArray = [url, url, url, url, url, url, url, url]
//false
@ -563,16 +899,81 @@ export default {
loadMap () {
if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
this.$refs.map.loadMap(this.agencyInfo, null, null, this.unitMapList, this.iconUrlArray, null)
const polIconUrlArray = [
'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a219130b6bc74b0b80b5ddb0fce0892a.png'
]
console.log('this.unitTableData', this.unitTableData)
this.$refs.cmap.loadMap(this.agencyInfo, this.parentPolygon, polIconUrlArray, this.unitTableData, this.iconUrlArray, null)
} else {
this.$refs.map.refreshMap(null, this.unitMapList)
this.$refs.cmap.refreshMap(this.agencyInfo, this.parentPolygon, this.unitTableData)
}
},
//
clickProject (feature) {
async clickProject (feature) {
console.log('标注信息', feature.values_.properties)
if (!feature.values_.properties.info.id) {
return false
}
const info = feature.values_.properties.info
const url = "/heart/icpartyunit/detail"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
let params = {
id: info.id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
console.log('data-------', data)
let _info = {
unitName: '',
type: '',
contact: '',
contactMobile: '',
memberCount: '',
remark: '',
address: ''
}
let coordinate = [info.longitude, info.latitude]
for(const n in _info) {
_info[n] = data[n] && data[n] || '--'
}
_info.type = info.type
let showData = `
<div style='font-size:16px; color:#FFFFFF;'>单位信息</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:10px'>单位名称
<span>`+ _info.unitName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>单位类型
<span>`+ _info.type + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系人
<span>`+ _info.contact + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系电话
<span>`+ _info.contactMobile + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>在职党员
<span>`+ _info.memberCount + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>备注
<span>`+ _info.remark + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>地址
<span>`+ _info.address + `</span>
</div>
`
this.$refs.cmap.handleShowPopup(showData, coordinate)
} else {
this.$message.error(msg)
}
},
async handleLook (val) {
@ -580,6 +981,16 @@ export default {
await this.getDetail(val.id)
this.showedMoreInfo = true
},
async handleUnitLook(val) {
this.unitdetailId = val.id
// await this.getDetail(val.id)
// this.showedUnitMoreInfo = true
await this.getAcList(this.agencyId, val.id)
this.$nextTick(() => {
console.log('this.$refs', this.$refs['unitdetailInfo'])
this.$refs['unitdetailInfo'].getDetail(this.unitAclist[0].id)
})
},
handleSelectChange (val) {
this.getList(this.agencyId);
@ -594,6 +1005,14 @@ export default {
this.pageNo = val;
this.getList(this.agencyId);
},
pageCurrentHandle(val) {
this.unitpageNo = val
this.getUnitList(this.agencyId)
},
pageSizeHandle(val) {
this.unitpageSize = val
this.getUnitList(this.agencyId)
},
},
};
</script>
@ -767,12 +1186,13 @@ export default {
}
.box-right {
flex: 1;
height: 100%;
overflow: hidden;
.pagination {
margin-top: 0;
}
.box-map {
height: 400px;
height: 100%;
// border: 1px solid #2865fa;
.map {
@ -792,6 +1212,9 @@ export default {
}
}
}
.flex-column {
flex-direction: column;
}
.box-wr-400 {
height: 400px;
.box-left {
@ -804,7 +1227,42 @@ export default {
}
}
}
.echart-wr {
position: relative;
flex-shrink: 0;
width: 90%;
height: 320px;
box-sizing: border-box;
.echart-org {
width: 100%;
height: 100%;
}
.echart-cicle {
position: absolute;
top: 50%;
left: 50%;
width: 240px;
height: 240px;
box-sizing: border-box;
margin-top: -120px;
margin-left: -120px;
border: 1px dashed rgba(0, 96, 240, 1);
border-radius: 50%;
}
.echart-cicle0 {
left: 80px;
margin-left: 0;
}
}
.table-h {
height: 360px;
}
.calc-h {
height: calc(100vh - 240px);
}
.wd50 {
width: 50%;
}
.map-tips {
width: 100%;
display: flex;
@ -836,4 +1294,10 @@ export default {
}
}
}
.mt0 {
margin: 0;
}
.mt20 {
margin-top: 20px;
}
</style>

4
src/views/modules/visual/communityParty/dialogInfo.vue

@ -11,7 +11,7 @@
<img src="@/assets/img/shuju/people/close.png" />
</div>
<!-- <div class="list-title">需求内容</div> -->
<div class="list-wr">
<div class="list-wr info-h info-scroll">
<div class="list">
<!-- <div class="item-desc">
@ -53,7 +53,7 @@
</div>
<div class="list">
<div class="item">
<span class="item-field">活动</span>
<span class="item-field">活动</span>
<span class="item-content" v-html="info.result"></span>
</div>
</div>

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

@ -0,0 +1,736 @@
<template>
<div class="warning-box">
<cpt-card>
<div class="card-title">
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">
网格党建平面图&nbsp;&nbsp;
<el-cascader
v-model="selectAgency"
:options="propTree"
:props="{ checkStrictly: true }"
:show-all-levels="false"
:getCheckedNodes="getCheckedNodes"
clearable
@change="handleCascader">
</el-cascader>
</div>
</div>
<div class="card-echart">
<div class="card-left">
<!-- <div class="card-left-title">党员学历统计</div> -->
<div class="card-flex">
<div class="echart-wr echart-wr100">
<screen-echarts-frame class="echart-org"
@myChartMethod="pieInitOks"
ref="eduChart"></screen-echarts-frame>
</div>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerEduList"
:tableData="eduList"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleLoading"
:operate="false"
@row="handleClickRow"
></screen-table>
<div class="pagination">
<el-pagination
:current-page="pageNo"
:page-size="pageSize"
background
layout="prev, pager, next"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
:total="total"
>
</el-pagination>
</div>
</div>
</div>
<div class="card-right">
<screen-map class="map"
ref="map"
@clickFeature="clickProject"
@lookMore="lookMore"
:showPolygonLayer="true"
:isAddOpenlay="true"
:clickType="'popup'"
:showIconLayer="true"
:showPolIconLayer="true"
:areaScale="0.1"></screen-map>
</div>
</div>
</cpt-card>
<member-info v-if="showedUnitMoreInfo"
:list="unitAclist"
ref="unitdetailInfo"
@close="showedUnitMoreInfo = false" />
<people-more v-show="showedMoreInfo"
v-if="userId"
:userId="userId"
:gridName="''"
@close="showedMoreInfo = false" />
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
import screenEchartsFrame from "../components/screen-echarts-frame";
import { pieOption } from './options'
import * as echarts from 'echarts';
import screenMap from "@/views/modules/visual/components/screen-map";
import memberInfo from './memberInfo.vue'
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
export default {
name: "gridParty",
components: {
cptCard,
screenTable,
screenEchartsFrame,
screenMap,
memberInfo,
peopleMore
},
data() {
return {
headerStyle: [
{
'max-width': '60px'
},
{
'min-width': '100px'
},
{
'min-width': '100px'
},
{
'min-width': '160px'
}
],
headerEduList: [
{ title: "序号", coulmn: 'index' },
{ title: "姓名", coulmn: 'name' },
{ title: "手机号码", coulmn: 'mobile' }
],
noEduInit: false,
selectAgency: null,
eduTotalCount: 0,
propTree: [],
visibleLoading: true,
agencyId: '',
orgType: '',
eduCode: '', //
pageNo: 1,
pageSize: 10,
total: 0,
eduItem: [],
eduList: [],
pieEduOptions: null,
showedUnitMoreInfo: false,
unitAclist: [],
// *********************************************start
isfirstInit: true,
agencyInfo: {},//level
iconUrlArray: [],
parentPolygon: [],
orgId: '',
unitMapList: [],
showedMoreInfo: false,
userId:"",
// *********************************************end
};
},
async mounted() {
await nextTick(100);
await this.getAgencyList()
this.agencyId = this.$store.state.user.agencyId
this.getEduCount(this.$store.state.user.agencyId) //
this.getEduList() //
// start
this.iconUrlArray = [
require('../../../../assets/img/shuju/measure/lxdj.png'),
require('../../../../assets/img/shuju/measure/lxzz.png'),
require('../../../../assets/img/shuju/measure/qydw.png'),
require('../../../../assets/img/shuju/measure/jgzs.png'),
require('../../../../assets/img/shuju/measure/qita.png'),
require('../../../../assets/img/shuju/measure/minban.png'),
require('../../../../assets/img/shuju/measure/jijin.png'),
require('../../../../assets/img/shuju/measure/other.png')
]
await this.loadOrgData()
await this.getWorkUserInfo()
this.loadMap()
this.isfirstInit = false
// end
},
methods: {
loadMap () {
if (this.isfirstInit) {
const polIconUrlArray = [
'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a219130b6bc74b0b80b5ddb0fce0892a.png'
]
this.$refs.map.loadMap(this.agencyInfo, this.parentPolygon, polIconUrlArray, this.unitMapList, this.iconUrlArray, null,)
} else {
this.$refs.map.refreshMap(this.agencyInfo, this.parentPolygon, this.unitMapList)
}
},
//
async getAgencyList(node, resolve) {
const url = '/gov/org/customeragency/agencygridtree'
// let params = {
// agencyId: this.$store.state.user.agencyId,
// };
const { data, code, msg } = await requestPost(url);
if (code === 0) {
console.log('data-org----o', data)
this.selectAgency = [`${data.agencyId}-${data.level}`]
this.orgType = data.level
this.agencyId = data.agencyId
let arr = []
arr.push(data)
this.propTree = arr && this.getTreeData(arr)
} else {
}
},
//
getTreeData(data){
if (!Array.isArray(data)) return []
let arr = data.map(item => {
let _item = {}
if (item.subAgencyList) {
if (item.subAgencyList.length === 0) {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: undefined
}
} else _item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: this.getTreeData(item.subAgencyList)}
} else {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
}
}
return _item
})
return arr
},
//
async handleCascader(val) {
console.log('val-vvv', val)
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.agencyId = _arr[0]
this.orgId = _arr[0]
this.orgType = orgType
this.noEduInit = false
this.agencyInfo = { ...this.orgData }
console.log('agencyInfo-----', this.agencyInfo)
this.eduCode = ''
await this.loadOrgData()
this.getEduCount(_arr[0])
this.eduList = []
this.pageNo = 1;
this.pageSize = 10;
await this.getEduList()
this.getMapData()
},
// *********************************
//
async getEduCount(agencyId) {
const url = "/epmetuser/icVolunteerPoly/statistics";
let params = {
agencyId
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.eduItem = data.map(item => {
return {
...item,
name: item.label,
isClick: false
}
})
this.eduTotalCount = 0
data.forEach(item => {
this.eduTotalCount += Number(item.value)
})
this.initEduCharts()
} else {
}
},
initEduCharts() {
// const eId = document.getElementById('echartOrg')
// let _charts = echarts.init(eId)
let option = {
}
let 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
let tmp = params1.split("\n");
let res = "" + params1;
for (let i in tmp) {
res = res.replace(tmp[i], "");
}
return res + params1;
}
}
}
}
this.pieEduOptions = pieOption(this.pieEduChartS)
this.pieEduOptions.legend = { ...legend }
this.clickEduPie(0)
let fun = params => {
this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
},
//
clickEduPie (seriesIndex) {
let _code = ''
let isClick = false
this.eduItem.forEach((element, index) => {
if (index === seriesIndex) {
_code = element.code
if (!this.noEduInit) isClick = false
else {
element.isClick = !element.isClick
isClick = element.isClick
}
element.label = {
show: true,
};
element.labelLine = {
show: true,
lineStyle: {
opacity: 1,
}
};
console.log('zlcm')
} else {
element.isClick = false
element.label = {
show: false,
};
element.labelLine = {
show: false,
lineStyle: {
opacity: 0,
color: 'rgba(255,255,255,0)'
}
};
}
});
this.eduCode = isClick && _code || ''
this.pieEduOptions.title.text = this.eduTotalCount
this.pieEduOptions.series[1].data = this.eduItem
// this.$refs.pieChart.hideLoading()
this.$refs.eduChart.setOption(this.pieEduOptions)
if (this.noEduInit) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.pageNo = 1
this.getEduList(isClick && _code || '')
this.getMapData(isClick && _code || '')
}
this.noEduInit = true
},
// *************************************
//
async getEduList(_code) {
this.visibleLoading = true
const url = "/epmetuser/icVolunteerPoly/list";
let params = {
code: this.eduCode,
agencyId: this.agencyId,
pageNo: this.pageNo,
pageSize: this.pageSize
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.eduList = data.list.map((item, index) => {
return {
...item,
index: index + 1
}
})
this.total = data.total
} else {
this.$message.error(msg)
}
this.visibleLoading = false
},
pieInitOks (dom) {
console.log('pies准备好了', dom)
this.pieEduChartS = dom
// this.pieInitState = true
},
//
handleClickRow(val) {
this.servicelist(val.idCard)
},
// -
async servicelist (idCard) {
const url = "/heart/residemand/service-list";
let params = {
pageNo: 1,
pageSize: 1000,
type: 'volunteer', // volunteercommunity_org
idCard: idCard, // volunteer
serverId: ''
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
if (data.list.length > 0) {
this.showedUnitMoreInfo = true
this.unitAclist = data.list
this.$nextTick(() => {
console.log(this.unitAclist[0].demandRecId)
this.$refs['unitdetailInfo'].getDetail(this.unitAclist[0].demandRecId)
})
} else {
this.showedUnitMoreInfo = false
this.unitAclist = []
this.$message.warning('该志愿者还没有需求')
}
} else {
}
},
getCheckedNodes(val) {
console.log('val-nnn', val)
},
pageSizeChangeHandle(val) {
this.pageNo = 1;
this.pageSize = val;
this.getEduList(this.eduCode)
},
pageCurrentChangeHandle(val) {
this.pageNo = val;
this.getEduList(this.eduCode)
},
async loadOrgData () {
const url = "/gov/org/agency/maporg"
let params = {
orgId: this.orgId,
level: this.orgLevel
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.orgData = data
this.orgId = this.orgData.id
this.orgLevel = this.orgData.level
this.parentPolygon = []
this.parentPolygon = data.children.map(item => {
return {
...item,
color: "#00E5ED",
fillColor: "rgba(0, 229, 237, 0.16)"
}
})
} else {
this.$message.error(msg)
}
},
//
getWorkUserInfo () {
const url = '/epmetuser/customerstaff/staffbasicinfo'
let params = {}
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.agencyInfo = data
if (!data.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!data.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!data.level) {
this.agencyInfo.level = 'street'
}
},
(rspMsg, data) => {
this.$message.error(rspMsg)
}
)
},
//
getMapData () {
const url = '/epmetuser/icVolunteerPoly/mapData'
let params = {
agencyId: this.agencyId,
code: this.eduCode
}
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.unitMapList = data
this.isfirstInit = false
this.loadMap()
},
(rspMsg, data) => {
this.$message.error(rspMsg)
}
)
},
//
async clickProject (feature) {
this.userId = ''
const featureInfo = feature.values_.properties.info
this.userId = feature.values_.properties.info.id
console.log('feature.values_.properties.info:::', JSON.stringify(feature.values_.properties.info))
let coordinate = [featureInfo.longitude, featureInfo.latitude]
console.log(feature.values_.properties.info)
let showData = `
<div style='font-size:16px; color:#FFFFFF;'>个人信息</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:10px'>姓名
<span>`+ feature.values_.properties.info.name + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:10px'>所属网格
<span>`+ feature.values_.properties.info.gridName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>所属房屋
<span>`+ feature.values_.properties.info.houseName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>手机号
<span>`+ feature.values_.properties.info.mobile + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>身份证号
<span>`+ feature.values_.properties.info.idCard + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>工作单位
<span>`+ feature.values_.properties.info.gzdw + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>人户状况
<span>`+ feature.values_.properties.info.rhzk + `</span>
</div>
`
this.$refs.map.handleShowPopup(showData, coordinate, true)
},
lookMore(e) {
this.userId = this.userId
console.log('userId:', this.userId)
this.showedMoreInfo = true
}
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/warning.scss"
scoped
></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/basicInfoMain.scss"
scoped
></style>
<style lang="scss" scoped>
.card-title {
display: flex;
align-items: center;
cursor: pointer;
.title-icon {
display: block;
width: 46px;
height: 34px;
box-sizing: border-box;
margin-right: 6px;
}
::v-deep .el-dropdown {
font-size: 18px;
color: #fff;
font-weight: 800;
}
.title-time {
display: flex;
align-items: center;
box-sizing: border-box;
margin-left: 30px;
font-size: 14px;
color: #fff;
.title-time-label {
margin-right: 10px;
}
::v-deep .el-date-editor--month {
width: 100px;
.el-input__inner {
width: 100px;
height: 24px;
box-sizing: border-box;
padding: 0;
font-size: 14px;
color: #fff;
line-height: 24px;
text-align: center;
background: #06186D;
border: 1px solid #1A64CC;
border-radius: 2px;
}
.el-input__prefix {
display: none;
}
.el-input__suffix {
right: 0;
.el-input__icon {
line-height: 24px;
}
}
}
}
.title-label {
font-size: 20px;
font-weight: 800;
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 18px;
// font-weight: 800;
color: #fff;
background: #06186d;
border: 1px solid #1a64cc;
}
.el-icon-arrow-down::before {
content: "\e790";
}
}
}
}
.card-echart {
display: flex;
margin-top: 40px;
height: 100%;
.card-left {
position: relative;
flex: 1;
height: 100%;
width: 50%;
.card-flex {
width: 100%;
display: flex;
}
}
.card-right {
position: relative;
flex: 1;
height: 790px;
width: 50%;
.map {
height: 100%;
width: 100%;
}
.div_map {
box-sizing: border-box;
height: 100%;
color: #fff;
}
}
}
.card-left-title {
position: relative;
padding-left: 40px;
font-size: 16px;
font-weight: 500;
color: #fff;
}
.card-left-title::after {
content: '';
position: absolute;
top: 50%;
left: 20px;
width: 12px;
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865FA;
border-radius: 50%;
}
.echart-wr {
position: relative;
flex-shrink: 0;
width: 50%;
height: 320px;
box-sizing: border-box;
.echart-org {
width: 100%;
height: 100%;
}
.echart-cicle {
position: absolute;
top: 50%;
left: 50%;
width: 240px;
height: 240px;
box-sizing: border-box;
margin-top: -120px;
margin-left: -120px;
border: 1px dashed rgba(0, 96, 240, 1);
border-radius: 50%;
}
.echart-cicle0 {
left: 80px;
margin-left: 0;
}
}
.echart-wr100 {
width: 70%;
}
.warning-box-bottom {
height: calc(100% - 500px);
box-sizing: border-box;
margin: 0;
padding: 0 30px;
// overflow-y: scroll;
}
</style>

251
src/views/modules/visual/communityParty/memberInfo.vue

@ -0,0 +1,251 @@
<template>
<div class="m-pop">
<div class="wrap">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>需求内容</span>
</div>
<div class="btn-close" @click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="list-wr info-h">
<div class="list-left info-scroll">
<div v-for="(item, index) in list" :key="item.id" class="left-item"
:class="current == index &&'left-item-on'" @click="handleTabs(item, index)">
<div class="item-title">{{ item.content }}</div>
<div class="item-time">{{ item.reportTime }}</div>
</div>
</div>
<div class="list-right list-wr info-scroll">
<div class="list">
<div class="item">
<span class="item-field">所属网格</span>
<span v-if="info.gridName">{{ info.gridName }}</span>
</div>
<div class="item">
<span class="item-field">需求类型</span>
<span v-if="info.categoryName">{{ info.categoryName }}</span>
</div>
<div class="item">
<span class="item-field">上报人</span>
<span v-if="info.reportUserName">{{ info.reportUserName }}</span>
</div>
<div class="item">
<span class="item-field">上报人手机</span>
<span v-if="info.reportUserMobile">{{ info.reportUserMobile }}</span>
</div>
<div class="item">
<span class="item-field">上报时间</span>
<span v-if="info.reportTime">{{ info.reportTime }}</span>
</div>
<div class="item">
<span class="item-field">需求人</span>
<span v-if="info.demandUserName">{{ info.demandUserName }}</span>
</div>
<div class="item">
<span class="item-field">服务时间</span>
<span v-if="info.wantServiceTime">{{ info.wantServiceTime }}</span>
</div>
<div class="item">
<span class="item-field">需求内容</span>
<span v-if="info.content">{{ info.content }}</span>
</div>
<div class="item">
<span class="item-field">服务方</span>
<span v-if="info.serviceShowName">{{ info.serviceShowName }}</span>
</div>
<div class="item">
<span class="item-field">实际服务时间</span>
<span v-if="info.categoryName">{{ info.serviceStartTime }} {{ info.serviceEndTime }}</span>
</div>
</div>
</div>
</div>
<!-- <div class="tabs">
<div
class="tab-btn"
>
<img src="@/assets/img/shuju/people/arrow-double-left.png" />
</div>
<div
class="tab z-on"
>
研判分析
</div>
<div
class="tab-btn"
>
<img src="@/assets/img/shuju/people/arrow-double-right.png" />
</div>
</div>
<div style="padding: 30px 0;">
<analyse :single-list="demandList" :single-title="'需求上报'" :more-title="'事件上报'" :user-list="userLists"
:user-name="userName" :has-event="false" :more-list="eventList" />
</div> -->
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import analyse from '../cpts/analyse.vue'
import { requestPost } from "@/js/dai/request";
export default {
name: "dialogInfo",
props: {
list: {
type: Array,
default: () => [],
},
type: {
type: String,
default: "",
},
agencyId: {
type: String,
default: "",
},
},
components: {
cptCard,
analyse
},
data() {
return {
list: [],
current: 0,
info: {}
};
},
mounted() {
},
methods: {
handleClose() {
this.$emit("close");
},
handleTabs(item, index) {
this.current = index
this.getDetail(item.demandRecId)
},
async getDetail (id) {
this.info = {}
const _id = this.list[0].id
const url = "/heart/userdemand/demandDetail"
let params = {
demandRecId: id || _id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.info = data
// this.info.serviceMatterNameShow = data.serviceMatterNameList.join(',')
// this.info.unitNameShow = data.unitNameList.join(',')
} else {
this.$message.error(msg)
}
},
}
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style>
<style lang="scss" scoped>
.m-pop {
.wrap {
margin-bottom: 0;
.list {
display: block;
width: 50%;
.item {
display: flex;
width: 100%;
box-sizing: border-box;
margin-top: 0;
margin-bottom: 15px;
font-size: 16px;
cursor: pointer;
.item-field {
// width: 100px;
flex-shrink: 0;
}
.item-content {
width: 100%;
max-height: 420px;
overflow-y: auto;
}
::v-deep p {
margin: 0;
img {
width: 100%;
height: 100%;
}
}
}
.item-desc {
font-size: 16px;
margin-bottom: 10px;
line-height: 24px;
}
}
}
.list-title {
width: 100%;
box-sizing: border-box;
padding: 20px 0 10px 62px;
font-size: 20px;
cursor: pointer;
}
}
.list-wr {
display: flex;
padding: 0 32px;
}
.list-left {
width: 180px;
height: 100%;
box-sizing: border-box;
padding-right: 20px;
flex-shrink: 0;
border-right: 1px dashed #1257c9;
overflow: auto;
.left-item {
padding: 10px 0;
cursor: pointer;
.item-title {
font-size: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 5px;
}
}
.left-item-on {
color: #0095FF;
}
}
.list-right {
flex: 1;
height: 100%;
overflow: auto;
}
</style>

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

@ -5,13 +5,24 @@
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">
党员信息统计&nbsp;&nbsp;
<el-cascader
<!-- <el-cascader
v-model="selectAgency"
:options="propTree"
:props="{ checkStrictly: true }"
:show-all-levels="false"
:getCheckedNodes="getCheckedNodes"
clearable @change="handleCascader">
</el-cascader> -->
<el-cascader
v-model="partyOrgs"
:options="partyOrgList"
:props="{
label: 'partyOrgName',
value: 'id',
checkStrictly: true
}"
:show-all-levels="false"
clearable @change="handlePartyCascader">
</el-cascader>
</div>
</div>
@ -124,7 +135,7 @@
</template>
<script>
import { requestPost } from "@/js/dai/request";
import { requestPost, requestGet } from "@/js/dai/request";
import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
@ -251,8 +262,10 @@ export default {
color: 'rgba(255, 186, 0, 1)'
}
],
partyOrgs: [],
ageList: [],
eduList: [],
partyOrgList: [],
pieAgeChartS: null,
pieEduChartSs: null,
pieAgeOptions: null,
@ -261,13 +274,19 @@ export default {
},
async mounted() {
await nextTick(100);
await this.getAgencyList()
this.getAgeCount(this.$store.state.user.agencyId, 'agency')
this.getEduCount(this.$store.state.user.agencyId, 'agency')
// await this.getAgencyList()
await this.getPartyOggList()
// this.getAgeCount(this.$store.state.user.agencyId, 'agency')
// this.getEduCount(this.$store.state.user.agencyId, 'agency')
// this.getAgeList(this.$store.state.user.agencyId, 'agency')
// this.getEduList(this.$store.state.user.agencyId, 'agency')
this.getAgeCount()
this.getEduCount()
this.getAgeList()
this.getEduList()
// this.initAgeCharts()
// this.initEduCharts()
this.getAgeList(this.$store.state.user.agencyId, 'agency')
this.getEduList(this.$store.state.user.agencyId, 'agency')
// this.initChartType()
},
methods: {
@ -521,11 +540,14 @@ export default {
// this.$refs.pieChart.hideLoading()
this.$refs.ageChart.setOption(this.pieAgeOptions)
if (this.noInit) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
console.log('zlcm---isClick', isClick)
this.agePageNo = 1
this.getAgeList(_arr[0], orgType, isClick && _code || '')
// const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
// const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
// console.log('zlcm---isClick', isClick)
// this.agePageNo = 1
// this.getAgeList(_arr[0], orgType, isClick && _code || '')
const i = this.partyOrgs.length - 1
this.agePageNo = 1
this.getAgeList(this.partyOrgs[i], '', isClick && _code || '')
}
this.noInit = true
@ -578,19 +600,24 @@ export default {
// this.$refs.pieChart.hideLoading()
this.$refs.eduChart.setOption(this.pieEduOptions)
if (this.noEduInit) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
// const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
// const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
// this.pageNo = 1
// this.getEduList(_arr[0], orgType, isClick && _code || '')
const i = this.partyOrgs.length - 1
this.pageNo = 1
this.getEduList(_arr[0], orgType, isClick && _code || '')
this.getEduList(this.partyOrgs[i], '', isClick && _code || '')
}
this.noEduInit = true
},
async getAgeCount(orgId, orgType) {
const url = "/epmetuser/icresiuser/partymemberagestatistics";
// const url = "/epmetuser/icresiuser/partymemberagestatistics";
const url = '/resi/partymember/icPartyMember/partymemberagestatistics'
let params = {
orgId,
orgId: orgId || '',
orgType
};
const { data, code, msg } = await requestPost(url, params);
@ -637,9 +664,10 @@ export default {
}
},
async getEduCount(orgId, orgType) {
const url = "/epmetuser/icresiuser/partymembereducationstatistics";
// const url = "/epmetuser/icresiuser/partymembereducationstatistics";
const url = '/resi/partymember/icPartyMember/partymembereducationstatistics'
let params = {
orgId,
orgId: orgId || '',
orgType
};
const { data, code, msg } = await requestPost(url, params);
@ -662,9 +690,10 @@ export default {
async getAgeList(orgId, orgType, _code) {
this.visibleAgeLoading = true
const url = "/epmetuser/icresiuser/partymemberagelist";
// const url = "/epmetuser/icresiuser/partymemberagelist";
const url = '/resi/partymember/icPartyMember/partymemberagelist'
let params = {
orgId,
orgId: orgId || '',
orgType,
code: _code || '',
pageNo: this.agePageNo,
@ -687,9 +716,10 @@ export default {
},
async getEduList(orgId, orgType, _code) {
this.visibleLoading = true
const url = "/epmetuser/icresiuser/partymembereducationlist";
// const url = "/epmetuser/icresiuser/partymembereducationlist";
const url = '/resi/partymember/icPartyMember/partymembereducationlist'
let params = {
orgId,
orgId: orgId || '',
orgType,
code: _code || '',
pageNo: this.pageNo,
@ -703,12 +733,39 @@ export default {
index: index + 1
}
})
console.log('eduList----', this.eduList)
this.total = data.total
} else {
this.$message.error(msg)
}
this.visibleLoading = false
},
async getPartyOggList(node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
// const url = '/gov/org/customeragency/agencygridtree'
const url = '/resi/partymember/icPartyOrg/getTreelist'
let params = {
agencyId: this.$store.state.user.agencyId,
};
const { data, code, msg } = await requestGet(url, params);
console.log('data-orgparty----o', data)
if (code === 0) {
this.partyOrgList = this.deepArrTOnull(data)
} else {
}
},
deepArrTOnull(arr) {
let a = []
a = arr.map(item => {
return {
...item,
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
}
})
return a
},
async getAgencyList(node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/gov/org/customeragency/agencygridtree'
@ -775,6 +832,26 @@ export default {
this.getAgeList(_arr[0], orgType)
this.getEduList(_arr[0], orgType)
},
handlePartyCascader(val) {
console.log('val-vvvpppppp', val)
this.noInit = false
this.noEduInit = false
if (val.length > 0) {
const i = val.length - 1
this.agencyId = val[i]
this.getAgeCount(val[i])
this.getEduCount(val[i])
this.getAgeList(val[i])
this.getEduList(val[i])
} else {
this.agencyId = ''
this.getAgeCount('')
this.getEduCount('')
this.getAgeList('')
this.getEduList('')
}
},
getCheckedNodes(val) {
console.log('val-nnn', val)
},

257
src/views/modules/visual/communityParty/unitInfo.vue

@ -0,0 +1,257 @@
<template>
<div class="m-pop">
<div class="wrap">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>单位活动</span>
</div>
<div class="btn-close" @click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<!-- <div class="list-title">需求内容</div> -->
<div class="list-wr info-h">
<div class="list-left info-scroll">
<div v-for="(item, index) in list" :key="item.id" class="left-item"
:class="current == index &&'left-item-on'" @click="handleTabs(item, index)">
<div class="item-title">{{ item.title }}</div>
<div class="item-time">{{ item.activityTime }}</div>
</div>
<!-- <div class="left-item">
<div class="item-title">帮扶老人帮扶老人</div>
<div class="item-time">2022-05-20 09:09</div>
</div> -->
</div>
<div class="list-right list-wr info-scroll">
<div class="list">
<!-- <div class="item-desc">
<span>市北区同德花园小区物业管理服务公司的同志每天对该小区 公共部位喷洒消毒液进行消毒为杀灭新型冠状病毒近几 天以来市北区</span>
</div> -->
<div class="item">
<span class="item-field">服务事项</span>
<span>{{ info.serviceMatterNameShow }}</span>
</div>
<div class="item">
<span class="item-field">单位名称</span>
<span>{{ info.unitNameShow }}</span>
</div>
<div class="item">
<span class="item-field">活动标题</span>
<span>{{ info.title }}</span>
</div>
<div class="item">
<span class="item-field">活动内容</span>
<span class="item-content" v-html="info.content"></span>
</div>
<div class="item">
<span class="item-field">服务人数</span>
<span>{{ info.peopleCount }}</span>
</div>
<div class="item">
<span class="item-field">活动时间</span>
<span>{{ info.activityTime }}</span>
</div>
<!-- <div class="item">
<span class="item-field">活动坐标</span>
<span>经度{{ info.latitude }} <br />
纬度{{ info.longitude }}</span>
</div> -->
<div class="item">
<span class="item-field">活动地址</span>
<span>{{ info.address }}</span>
</div>
</div>
<div class="list">
<div class="item">
<span class="item-field">活动成果</span>
<span class="item-content info-scroll" v-html="info.result"></span>
</div>
</div>
</div>
</div>
<!-- <div class="tabs">
<div
class="tab-btn"
>
<img src="@/assets/img/shuju/people/arrow-double-left.png" />
</div>
<div
class="tab z-on"
>
研判分析
</div>
<div
class="tab-btn"
>
<img src="@/assets/img/shuju/people/arrow-double-right.png" />
</div>
</div>
<div style="padding: 30px 0;">
<analyse :single-list="demandList" :single-title="'需求上报'" :more-title="'事件上报'" :user-list="userLists"
:user-name="userName" :has-event="false" :more-list="eventList" />
</div> -->
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import analyse from '../cpts/analyse.vue'
import { requestPost } from "@/js/dai/request";
export default {
name: "dialogInfo",
props: {
list: {
type: Array,
default: () => [],
},
type: {
type: String,
default: "",
},
agencyId: {
type: String,
default: "",
},
},
components: {
cptCard,
analyse
},
data() {
return {
list: [],
current: 0,
info: {}
};
},
mounted() {
},
methods: {
handleClose() {
this.$emit("close");
},
handleTabs(item, index) {
this.current = index
this.getDetail(item.id)
},
async getDetail (id) {
const _id = this.list[0].id
const url = "/heart/icpartyactivity/detail"
let params = {
id: id || _id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.info = data
this.info.serviceMatterNameShow = data.serviceMatterNameList.join(',')
this.info.unitNameShow = data.unitNameList.join(',')
} else {
this.$message.error(msg)
}
},
}
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style>
<style lang="scss" scoped>
.m-pop {
.wrap {
margin-bottom: 0;
.list {
display: block;
width: 50%;
.item {
display: flex;
width: 100%;
box-sizing: border-box;
margin-top: 0;
margin-bottom: 15px;
font-size: 16px;
cursor: pointer;
.item-field {
// width: 100px;
flex-shrink: 0;
}
.item-content {
width: 100%;
max-height: 420px;
overflow-y: auto;
}
::v-deep p {
margin: 0;
img {
width: 100%;
height: 100%;
}
}
}
.item-desc {
font-size: 16px;
margin-bottom: 10px;
line-height: 24px;
}
}
}
.list-title {
width: 100%;
box-sizing: border-box;
padding: 20px 0 10px 62px;
font-size: 20px;
cursor: pointer;
}
}
.list-wr {
display: flex;
padding: 0 32px;
}
.list-left {
width: 180px;
height: 100%;
box-sizing: border-box;
padding-right: 20px;
flex-shrink: 0;
border-right: 1px dashed #1257c9;
overflow: auto;
.left-item {
padding: 10px 0;
cursor: pointer;
.item-title {
font-size: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 5px;
}
}
.left-item-on {
color: #0095FF;
}
}
.list-right {
flex: 1;
height: 100%;
overflow: auto;
}
</style>

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

@ -21,8 +21,8 @@
</div>-->
<div class="div_map"
id="map"
ref="map">
:id="mapId"
:ref="mapId">
</div>
<div id="popup"
style="display: none;"
@ -32,6 +32,8 @@
class="ol-popup-closer"></a>
<div id="popup-content"
class="popup-content"></div>
<a href="#"
id="popup-goMore">更多>>>></a>
</div>
</div>
</template>
@ -79,6 +81,24 @@ let iconSource; // icon
let select;//
let iconTextsStyle = {
textAlign: undefined,
font: "18px Arial",
//fontFamily: "Courier New, monospace",
// fontWeight: "bold",
text: '',
backgroundFill: new Fill({
color: 'rgba(0, 146, 238, 0.75)'
// color: textColorArray[feature.values_.colorIndex]
}),
padding: [4, 10, 4, 10],
//text: "",
fill: new Fill({ color: "#ffffff" }),
// stroke: new Stroke({ color: "#ffffff", width: 3 }),
offsetY: -30,
offsetX: -50,
overflow: true,
}
let polygonColorArray = [
'rgba(210, 2, 2, 0.24)',
@ -86,7 +106,19 @@ let polygonColorArray = [
'rgba(183, 185, 0, 0.16)'
];
//icon
let createTextStyle = function (feature) {
if (iconTextsStyle) {
let iconTextsStyles = { ...iconTextsStyle }
iconTextsStyles.text = feature.values_ && feature.values_.name || feature.name
return new Text({ ...iconTextsStyles })
} else {
return null
}
}
//
var polygonStyleFunction = (function () {
return function (feature) {
@ -105,6 +137,8 @@ var polygonStyleFunction = (function () {
};
})()
const vueGis = {
name: 'HomeMap',
data () {
@ -151,7 +185,7 @@ const vueGis = {
iconArrays: [
],
iconTextStyle: {},
// iconTextStyle: {},
//policon
polIconUrlArray: [
@ -170,7 +204,6 @@ const vueGis = {
},
async mounted () {
},
methods: {
showPosition () {
@ -181,33 +214,34 @@ const vueGis = {
loadMap (mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray, iconTextStyle, distanceMax) {
this.mapInfo = mapInfo
this.polygonArray = polygonArray
this.polIconUrlArray = polIconUrlArray
this.polIconUrlArray = polIconUrlArray || []
this.iconArrays = iconArrays
this.iconUrlArray = iconUrlArray
this.iconTextStyle = iconTextStyle
iconTextsStyle = iconTextStyle || iconTextsStyle
this.distanceMax = distanceMax
// iconArrays.forEach(item => {
// console.log(item.type, item.urlIndex, item.latitude, item.longitude)
// });
//
this.initMap()
if (this.showPolygonLayer) {
if (this.showPolIconLayer) {
console.log('showPolIconLayer++++++++++++++++++++++', this.showPolIconLayer)
//
this.initPolygonLayer()
this.initPolIconLayer()
//
this.loadPolygon()
// this.loadPolIcon()
}
if (this.showPolIconLayer) {
if (this.showPolygonLayer) {
//
this.initPolygonLayer()
//
this.loadPolIcon()
this.loadPolygon()
}
if (this.showIconLayer) {
//icon
@ -220,41 +254,45 @@ const vueGis = {
this.addOverlay()
}
this.addMapClick()
},
//
async refreshMap (polygonArray, iconArrays) {
async refreshMap (mapInfo, polygonArray, iconArrays) {
this.mapInfo = mapInfo
this.polygonArray = []
this.polygonArray = polygonArray
this.iconArrays = iconArrays
iconSource.clear()
polygonSource.clear()
polIconSource.clear()
this.initPolIconLayer()
if (this.showPolygonLayer) {
this.initPolygonLayer()
//
this.loadPolygon()
}
if (this.showPolIconLayer) {
this.initIconLayer()
//
this.loadPolIcon()
// this.loadPolIcon()
}
if (this.showIconLayer) {
this.loadIcon()
}
this.setMapLocation()
// gaodeMapLayer.getSource().changed()
},
//
//
loadPolygon () {
polygonSource.clear()//
// iconSource.clear()
let featureData = []//
if (this.polygonArray && this.polygonArray.length > 0) {//
@ -266,7 +304,7 @@ const vueGis = {
oneData = {
type: 'Feature',
properties: { ...polygonItem },
geometry: {
type: 'Polygon',
@ -306,14 +344,17 @@ const vueGis = {
if (this.showPolIconLayer) {
this.loadPolIcon(feature)
}
}
},
//icon
//icon
loadPolIcon (feature) {
polIconSource.clear()
let polyIconFeatures = [];
console.log('feature-----', feature)
feature.forEach(oneIcon => {
var extent = boundingExtent(oneIcon.getGeometry().getCoordinates()[0]); //[minx,miny,maxx,maxy]
@ -330,28 +371,27 @@ const vueGis = {
id: oneIcon.id_
}
});
// console.log('oneIcon----', oneIcon)
let polyIconStyle = new Style({
image: new Icon({
// anchor: [0.5, 0.5],
// imgSize: [32, 32],
scale: 0.5,
src: polIconUrlArray[oneIcon.values_.index - 1]
})
scale: this.areaScale,
src: this.polIconUrlArray[0]
}),
text: createTextStyle(oneIcon)
});
polyIcon.setStyle(polyIconStyle);
polyIconFeatures.push(polyIcon);
});
polIconSource.addFeatures(polyIconFeatures);
},
//icon
loadIcon () {
iconSource.clear()//
if (this.iconArrays && this.iconArrays.length > 0) {
let iconFeatures = [];
@ -367,15 +407,14 @@ const vueGis = {
info: { ...oneIcon }
}
});
let iconStyle = new Style({
image: new Icon({
// anchor: [0.5, 0.5],
// imgSize: [32, 32],
// scale: 0.5,
src: this.iconUrlArray[oneIcon.urlIndex]
src: oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex] || this.iconUrlArray[0]
}),
text: this.createTextStyle(oneIcon)
// text: createTextStyle(oneIcon)
});
iconItem.setStyle(iconStyle);
@ -397,18 +436,6 @@ const vueGis = {
}
},
//icon
createTextStyle (feature) {
if (this.iconTextStyle) {
let iconTextStyle = { ...this.iconTextStyle }
iconTextStyle.text = feature.values_.name
return new Text({ ...iconTextStyle })
} else {
return null
}
},
//
computedDistance (lon, lat, max) {
@ -425,7 +452,7 @@ const vueGis = {
//
initMap () {
this.setMapLocation()
this.firstCentermap()
gaodeMapLayer = new TileLayer({
title: "地图",
source: new XYZ({
@ -452,7 +479,7 @@ const vueGis = {
layers: [gaodeMapLayer],
//
view: mapView,
target: 'map'
target: this.mapId
//map
})
@ -478,8 +505,52 @@ const vueGis = {
},
//
setMapLocation () {
if (!this.zoom) {
this.setZoom(this.mapInfo.agencyLevel)
}
this.centerPoint = []
//
if (this.center && this.center.length > 0) {
this.centerPoint = this.center
this.centerFlag = 'point'
this.center = []
} else if (polygonLayer.getSource().getFeatures()[0]) {//,
this.centerFlag = 'flag_polygon'
} else if (this.mapInfo.longitude && this.mapInfo.latitude) {
this.centerPoint.push(this.mapInfo.longitude)
this.centerPoint.push(this.mapInfo.latitude)
this.centerFlag = 'point'
} else {
this.centerPoint = centerPointGlobal
this.centerFlag = 'point'
}
// debugger
if (this.centerFlag === 'flag_parent') {
let parentFeatures = parentLayer.getSource().getFeatures()[0]
let polygon = parentFeatures.getGeometry();
map.getView().fit(polygon, map.getSize());
this.zoom = map.getView().getZoom() - 1
} else if (this.centerFlag === 'flag_polygon') {
let polygonFeatures = polygonLayer.getSource().getFeatures()[0]
let polygon = polygonFeatures.getGeometry();
map.getView().fit(polygon, map.getSize());
this.zoom = map.getView().getZoom() - 1
} else {
mapView.setCenter(this.centerPoint);
}
mapView.setZoom(this.zoom);
},
firstCentermap() {
if (this.mapInfo.longitude && this.mapInfo.latitude) {
this.centerPoint = []
this.centerPoint.push(this.mapInfo.longitude)
@ -489,7 +560,7 @@ const vueGis = {
this.centerPoint = centerPointGlobal
}
this.setZoom(this.mapInfo.level)
this.setZoom(this.mapInfo.agencyLevel)
},
//
@ -507,7 +578,8 @@ const vueGis = {
//
initPolygonLayer () {
polygonSource = new VectorSource({
//features: (new GeoJSON()).readFeatures(geojsonObject)
// features: (new GeoJSON()).readFeatures(geojsonObject)
wrapX: false
});
polygonLayer = new VectorLayer({
@ -515,7 +587,7 @@ const vueGis = {
style: polygonStyleFunction,
zIndex: 50
});
let that = this
//
var overlayStyle = (function () {
@ -558,6 +630,7 @@ const vueGis = {
initPolIconLayer () {
polIconSource = new VectorSource({
//features: (new GeoJSON()).readFeatures(geojsonObject)
wrapX: false
});
polIconLayer = new VectorLayer({
@ -571,9 +644,9 @@ const vueGis = {
//icon
initIconLayer () {
iconSource = new VectorSource({
//features: (new GeoJSON()).readFeatures(geojsonObject)
wrapX: false
});
iconLayer = new VectorLayer({
@ -597,6 +670,7 @@ const vueGis = {
var container = document.getElementById("popup");
var closer = document.getElementById("popup-closer");
var content = document.getElementById("popup-content");
var goMore = document.getElementById("popup-goMore") ? document.getElementById("popup-goMore") : null
// Overlay
this.overlay = new Overlay({
@ -619,6 +693,11 @@ const vueGis = {
closer.blur();
return false;
};
if (goMore) {
goMore.onclick = function () {
_that.$emit('lookMore')
};
}
},
//
@ -650,15 +729,21 @@ const vueGis = {
});
},
handleShowPopup (showData, coordinate) {
handleShowPopup (showData, coordinate, isShowMore) {
if (isShowMore) {
document.getElementById("popup-goMore").style.display = 'block'
} else {
document.getElementById("popup-goMore").style.display = 'none'
}
console.log(this.overlay.getElement())
let content = document.getElementById("popup-content");
this.overlay.getElement().style.display = 'block'
this.overlay.getElement().parentNode.style.display = 'block'
this.overlay.getElement().parentNode.parentNode.style.display = 'block'
var content = document.getElementById("popup-content");
content.innerHTML = showData;
this.overlay.setPosition(coordinate); // overlay x,y
this.overlay.setPosition(coordinate);
// overlay x,y
},
//
@ -685,6 +770,10 @@ const vueGis = {
},
},
props: {
mapId: {
type: String,
default: 'map'
},
//
showPolygonLayer: {
type: Boolean,
@ -711,6 +800,10 @@ const vueGis = {
clickType: {
type: String,
default: 'back'
},
areaScale: {
type: Number,
default: 0.5
}
},
@ -797,6 +890,7 @@ export default vueGis;
}
.ol-popup-closer:after {
content: "✖";
color: rgba(1, 17, 104, 1);
// color: rgba(1, 17, 104, 1);
color: #fff;
}
</style>
Loading…
Cancel
Save