Browse Source

Merge branch 'dev_zxc_party_jump'

dev-map-local
jiangyy 3 years ago
parent
commit
c35aecdf40
  1. 425
      src/views/modules/visual/communityParty/crateForm.vue
  2. 175
      src/views/modules/visual/communityParty/party.vue

425
src/views/modules/visual/communityParty/crateForm.vue

@ -0,0 +1,425 @@
<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="handleCancle">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="m-top">
<div class="m-info-left">
<div class="m-info">
<div class="info-prop">
<span>所属党组织</span>
<span>{{ form.orgName }}</span>
</div>
<div class="info-prop">
<span>姓名</span>
<span>{{ form.name }}</span>
</div>
<div class="info-prop">
<span>手机号</span>
<span>{{ form.mobile }}</span>
</div>
<div class="info-prop">
<span>身份证</span>
<span>{{ form.idCard }}</span>
</div>
<div class="info-prop">
<span>地址</span>
<span>{{ form.address|| "--" }}</span>
</div>
<div class="info-prop">
<span>流动党员</span>
<span>{{ form.isLd==='1'?'是':'否' }}</span>
</div>
<div class="info-prop">
<span>备注</span>
<span>{{ form.remark || "--" }}</span>
</div>
</div>
</div>
<div class="m-info-right">
<div class="m-info">
<div class="info-prop">
<span>党员中心户</span>
<span>{{ form.isDyzxh==='1'?'是':'否' }}</span>
</div>
<div class="info-prop">
<span>免学习</span>
<span>{{ form.isMxx==='1'?'是':'否' }}</span>
</div>
<div class="info-prop">
<span>职务</span>
<span>{{ form.postName|| "--" }}</span>
</div>
<div class="info-prop">
<span>文化程度</span>
<span>{{ form.cultureName || "--" }}</span>
</div>
<div class="info-prop">
<span>入党时间</span>
<span>{{ form.rdsj || "--" }}</span>
</div>
<div class="info-prop">
<span>党员流动号</span>
<span>{{ form.ldzh || "--" }}</span>
</div>
</div>
</div>
</div>
<div class="m-btn">
<div style="margin-top: 20px; text-align: center;">
<el-button size="small"
:disabled="false"
@click="handleCancle">取消</el-button>
<el-button v-if="form.icResiUser != null && form.icResiUser != ''"
type="primary"
:disabled="false"
size="small"
@click="jump(form.icResiUser)">查看更多</el-button>
</div>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import { isCard, isMobile } from '@/utils/validate'
import { computedCard } from '@/utils/index'
import cptCard from "@/views/modules/visual/cpts/card";
export default {
components: {
cptCard
},
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',
emitPath: false
},
zwList: [
{
label: '普通党员',
value: '0'
},
{
label: '支部书记',
value: '1'
},
{
label: '支部委员',
value: '2'
},
{
label: '党委委员',
value: '3'
},
],
form: {
icResiUser: '',
name: '',
mobile: '',
idCard: '',
address: '',
rdsj: '',
sszb: '',
isLd: '0',
ldzh: '',
partyZw: '0',
isDyzxh: '0',
isMxx: '0',
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 }
if (val.icResiUserId || val.icResiUser) this.isAuto = true
console.log('val----------in', val)
console.log('isAuto----------in', this.isAuto)
this.partyOrgs = val.orgPids.split(':')
console.log('partyOrgs-----', this.partyOrgs)
this.partymenberid = val.id
}
},
immediate: true
}
},
created () {
this.getEduList()
console.log('partyList', this.partyList)
},
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')
},
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
} else {
this.form.address = ''
this.isAuto = false
}
}
})
.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 jump (icResiUserId) {
this.$emit('saveBase', icResiUserId)
},
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>
<style
lang="scss"
src="@/assets/scss/modules/visual/incident-info.scss"
scoped
></style>

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

@ -2,7 +2,8 @@
<div class="warning-box">
<cpt-card :min-full-screen="true">
<div class="card-title">
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" />
<img class="title-icon"
src="../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">
党员信息统计&nbsp;&nbsp;
<!-- <el-cascader
@ -13,8 +14,7 @@
:getCheckedNodes="getCheckedNodes"
clearable @change="handleCascader">
</el-cascader> -->
<el-cascader
v-model="partyOrgs"
<el-cascader v-model="partyOrgs"
:options="partyOrgList"
:props="{
label: 'partyOrgName',
@ -22,7 +22,8 @@
checkStrictly: true
}"
:show-all-levels="false"
clearable @change="handlePartyCascader">
clearable
@change="handlePartyCascader">
</el-cascader>
</div>
</div>
@ -39,8 +40,11 @@
</div>
<div class="echarts-tips echarts-tips-wd50">
<div class="tips-lists">
<div v-for="(item, index) in ageItem" :key="index" class="tips-items">
<div class="tips-items-title" :class="'tips-items-title' + item.code">
<div v-for="(item, index) in ageItem"
:key="index"
class="tips-items">
<div class="tips-items-title"
:class="'tips-items-title' + item.code">
{{ item.name }}
</div>
<div class="tips-items-num">
@ -54,18 +58,18 @@
</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport('age')">导出</el-button>
<el-button type="warning"
size="small"
@click="handleExport('age')">导出</el-button>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerList"
<screen-table :headerList="headerList"
:tableData="ageList"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleAgeLoading"
:operate="false"
@row="handleClickRow"
></screen-table>
@row="handleClickRow"></screen-table>
<div class="pagination">
<el-pagination hide-on-single-page
:current-page="agePageNo"
@ -74,8 +78,7 @@
layout="prev, pager, next"
@size-change="pageSizeChangeHandleAge"
@current-change="pageCurrentChangeHandleAge"
:total="ageTotal"
>
:total="ageTotal">
</el-pagination>
</div>
</div>
@ -90,10 +93,14 @@
@myChartMethod="pieInitOks"
ref="eduChart"></screen-echarts-frame>
</div>
<div v-if="false" class="echarts-tips">
<div v-if="false"
class="echarts-tips">
<div class="tips-list">
<div v-for="item in eduItem" :key="item.value" class="tips-item">
<div class="tips-item-icon" :style="'background:' + item.color"></div>
<div v-for="item in eduItem"
:key="item.value"
class="tips-item">
<div class="tips-item-icon"
:style="'background:' + item.color"></div>
<div class="tips-item-text">{{item.name}}</div>
</div>
@ -101,18 +108,18 @@
</div>
</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport('edu')">导出</el-button>
<el-button type="warning"
size="small"
@click="handleExport('edu')">导出</el-button>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerEduList"
<screen-table :headerList="headerEduList"
:tableData="eduList"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleLoading"
:operate="false"
@row="handleClickRow"
></screen-table>
@row="handleClickRow"></screen-table>
<div class="pagination">
<el-pagination hide-on-single-page
:current-page="pageNo"
@ -121,16 +128,33 @@
layout="prev, pager, next"
@size-change="pageSizeChangeHandleNew"
@current-change="pageCurrentChangeHandleNew"
:total="total"
>
:total="total">
</el-pagination>
</div>
</div>
</div>
</div>
</cpt-card>
<crate-form v-if="memberDialog"
:info="memberDetailInfo"
:partyList="optionsG"
:disabled="disabled"
@saveBase="jumpDetail"
@cancle="handlerCancle" />
<!-- <el-dialog
title="党员信息"
:visible.sync="memberDialog"
width="60%"
top="5vh"
class="dialog-h"
append-to-body
:close-on-click-modal="false"
:before-close="handlerCancle">
<crate-form v-if="memberDialog" :info="memberDetailInfo" :partyList="optionsG" :disabled="disabled"
@saveBase="jumpDetail" @cancle="handlerCancle" />
</el-dialog> -->
</div>
</template>
@ -140,6 +164,7 @@ 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 crateForm from './crateForm.vue';
import { pieOption } from './options'
import * as echarts from 'echarts';
@ -148,10 +173,15 @@ export default {
components: {
cptCard,
screenTable,
screenEchartsFrame
screenEchartsFrame,
crateForm
},
data () {
return {
memberDialog: false,
disabled: true,
memberDetailInfo: {},
optionsG: [],
headerList: [
{ title: "序号", coulmn: 'index' },
{ title: "姓名", coulmn: 'name' },
@ -289,7 +319,32 @@ export default {
// this.initChartType()
},
async created () {
this.getGridList('query')
},
methods: {
handleSearch () {
this.memberDialog = false
},
handlerCancle () {
this.memberDialog = false
},
async getGridList (type, agencyId) {
const { user } = await this.$store.state
// addorupdate query
await this.$http
.get('/resi/partymember/icPartyOrg/getSearchTreelist', { params: { agencyId: agencyId || user.agencyId } })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.optionsG = this.deepArrTOnull(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
pieInitOk (dom) {
console.log('pie准备好了', dom)
this.pieAgeChartS = dom
@ -706,7 +761,8 @@ export default {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: this.getTreeData(item.subAgencyList)}
children: this.getTreeData(item.subAgencyList)
}
} else {
_item = {
label: item.agencyName,
@ -719,14 +775,32 @@ export default {
return arr
},
handleClickRow (val) {
console.log('click-row----', val)
if (!val.icResiUser) {
return this.$message.warning('该党员居民信息未完善')
}
this.getDetail(val.userId)
this.memberDialog = true
},
jumpDetail (val) {
this.memberDialog = false
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${val.icResiUser}`,
path: `/main-shuju/visual-basicinfo-people/${val}`,
});
},
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.memberDetailInfo = { ...res.data }
}
})
.catch((err) => {
return this.$message.error('网络错误')
})
},
handleCascader (val) {
console.log('val-vvv', val)
const _arr = val[val.length - 1].split('-')
@ -878,8 +952,8 @@ export default {
color: #fff;
line-height: 24px;
text-align: center;
background: #06186D;
border: 1px solid #1A64CC;
background: #06186d;
border: 1px solid #1a64cc;
border-radius: 2px;
}
.el-input__prefix {
@ -891,7 +965,6 @@ export default {
line-height: 24px;
}
}
}
}
.title-label {
@ -899,7 +972,6 @@ export default {
font-family: PingFang SC;
font-weight: 800;
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 18px;
@ -937,7 +1009,7 @@ export default {
color: #fff;
}
.card-left-title::after {
content: '';
content: "";
position: absolute;
top: 50%;
left: 20px;
@ -945,7 +1017,7 @@ export default {
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865FA;
background: #2865fa;
border-radius: 50%;
}
.echart-wr {
@ -988,7 +1060,10 @@ export default {
.echarts-tips-wd50 {
width: 320px;
}
.tips-list, .tips-item, .tips-lists, .tips-items-num {
.tips-list,
.tips-item,
.tips-lists,
.tips-items-num {
display: flex;
align-items: center;
}
@ -1008,12 +1083,12 @@ export default {
height: 10px;
box-sizing: border-box;
margin-right: 8px;
background: #1B51FF;
background: #1b51ff;
border-radius: 2px;
}
.tips-item-text {
font-size: 16px;
color: #D2E7FF;
color: #d2e7ff;
}
}
}
@ -1034,19 +1109,24 @@ export default {
box-sizing: border-box;
padding-left: 6px;
font-size: 16px;
color: #EFF0F1;
background: url('../../../../assets/img/shuju/measure/huang@2x.png') no-repeat left bottom;
color: #eff0f1;
background: url("../../../../assets/img/shuju/measure/huang@2x.png")
no-repeat left bottom;
&1 {
background: url('../../../../assets/img/shuju/measure/lv@2x.png') no-repeat left bottom;
background: url("../../../../assets/img/shuju/measure/lv@2x.png")
no-repeat left bottom;
}
&2 {
background: url('../../../../assets/img/shuju/measure/zi@2x.png') no-repeat left bottom;
background: url("../../../../assets/img/shuju/measure/zi@2x.png")
no-repeat left bottom;
}
&3 {
background: url('../../../../assets/img/shuju/measure/lan@2x.png') no-repeat left bottom;
background: url("../../../../assets/img/shuju/measure/lan@2x.png")
no-repeat left bottom;
}
&4 {
background: url('../../../../assets/img/shuju/measure/lanlv@2x.png') no-repeat left bottom;
background: url("../../../../assets/img/shuju/measure/lanlv@2x.png")
no-repeat left bottom;
}
}
.tips-items-num {
@ -1074,8 +1154,7 @@ export default {
padding-right: 30px;
text-align: right;
::v-deep .el-button--warning {
background: linear-gradient(90deg, #0863EA, #3B9FFC);
background: linear-gradient(90deg, #0863ea, #3b9ffc);
border: 0;
}
}

Loading…
Cancel
Save