Browse Source

可视化党员信息样式调整

feature
jiangyy 3 years ago
parent
commit
5ca0a953c5
  1. 236
      src/views/modules/visual/communityParty/crateForm.vue
  2. 164
      src/views/modules/visual/communityParty/party.vue

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

@ -1,103 +1,92 @@
<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="form.sszb"
: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 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="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 class="info-prop">
<span>姓名</span>
<span>{{ form.name }}</span>
</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 class="info-prop">
<span>手机号</span>
<span>{{ form.mobile }}</span>
</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 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="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 class="info-prop">
<span>入党时间</span>
<span>{{ form.rdsj || "--" }}</span>
</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 class="info-prop">
<span>党员流动号</span>
<span>{{ form.ldzh || "--" }}</span>
</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 >
</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 != ''"
<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"
@ -105,17 +94,20 @@
</div>
</div>
</el-form>
</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: {
@ -124,14 +116,14 @@ export default {
},
info: {
type: Object,
default: () => {}
default: () => { }
},
disabled: {
type: Boolean,
default: false
}
},
data() {
data () {
let checkMObile = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入手机号'))
@ -208,7 +200,7 @@ export default {
},
watch: {
info: {
handler(val) {
handler (val) {
if (Object.keys(val).length > 0) {
this.form = { ...val }
if (val.icResiUserId || val.icResiUser) this.isAuto = true
@ -222,36 +214,32 @@ export default {
immediate: true
}
},
created() {
created () {
this.getEduList()
console.log('partyList', this.partyList)
},
mounted() {
const w = document.getElementsByClassName('dialog-h-content')[0]
this.formItemWd = w.clientWidth + 'px'
mounted () {
// const w = document.getElementsByClassName('dialog-h-content')[0]
// this.formItemWd = w.clientWidth + 'px'
},
destroyed() {
destroyed () {
// this.$refs['ruleForm'].resetFields()
},
methods: {
handleCancle() {
this.$refs['ruleForm'].resetFields()
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) {
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() {
async getEduList () {
await this.$http
.post('/sys/dict/data/education')
.then(({ data: res }) => {
@ -266,7 +254,7 @@ export default {
return this.$message.error('网络错误')
})
},
async validateResi() {
async validateResi () {
const params = {
idCard: this.form.idCard,
agencyId: this.$store.state.user.agencyId
@ -293,7 +281,7 @@ export default {
return this.$message.error('网络错误')
})
},
hadnleSubmitbase() {
hadnleSubmitbase () {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
if (Object.keys(this.info).length > 0) this.editBase()
@ -304,7 +292,7 @@ export default {
}
});
},
handleSavePoints(data) {
handleSavePoints (data) {
const _data = { ...data }
const params = {
@ -316,10 +304,10 @@ export default {
}
this.savePoints(params)
},
async jump(icResiUserId) {
async jump (icResiUserId) {
this.$emit('saveBase', icResiUserId)
},
async saveBase() {
async saveBase () {
const params = {
...this.form
}
@ -340,7 +328,7 @@ export default {
return this.$message.error('网络错误')
})
},
async editBase() {
async editBase () {
const params = {
...this.form
}
@ -361,7 +349,7 @@ export default {
return this.$message.error('网络错误')
})
},
async savePoints(form) {
async savePoints (form) {
const params = {
...form,
partyMemberId: this.partymenberid
@ -384,7 +372,7 @@ export default {
return this.$message.error('网络错误')
})
},
async saveRecord(form) {
async saveRecord (form) {
const params = {
...form,
partyMemberId: this.partymenberid
@ -429,3 +417,9 @@ export default {
padding: 0 !important;
}
</style>
<style
lang="scss"
src="@/assets/scss/modules/visual/incident-info.scss"
scoped
></style>

164
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,17 +128,22 @@
layout="prev, pager, next"
@size-change="pageSizeChangeHandleNew"
@current-change="pageCurrentChangeHandleNew"
:total="total"
>
:total="total">
</el-pagination>
</div>
</div>
</div>
</div>
</cpt-card>
<el-dialog
<crate-form v-if="memberDialog"
:info="memberDetailInfo"
:partyList="optionsG"
:disabled="disabled"
@saveBase="jumpDetail"
@cancle="handlerCancle" />
<!-- <el-dialog
title="党员信息"
:visible.sync="memberDialog"
width="60%"
@ -142,7 +154,7 @@
:before-close="handlerCancle">
<crate-form v-if="memberDialog" :info="memberDetailInfo" :partyList="optionsG" :disabled="disabled"
@saveBase="jumpDetail" @cancle="handlerCancle" />
</el-dialog>
</el-dialog> -->
</div>
</template>
@ -164,7 +176,7 @@ export default {
screenEchartsFrame,
crateForm
},
data() {
data () {
return {
memberDialog: false,
disabled: true,
@ -290,7 +302,7 @@ export default {
pieEduOptions: null
};
},
async mounted() {
async mounted () {
await nextTick(100);
// await this.getAgencyList()
await this.getPartyOggList()
@ -307,7 +319,7 @@ export default {
// this.initChartType()
},
async created() {
async created () {
this.getGridList('query')
},
methods: {
@ -317,11 +329,11 @@ export default {
handlerCancle () {
this.memberDialog = false
},
async getGridList(type, agencyId) {
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} })
.get('/resi/partymember/icPartyOrg/getSearchTreelist', { params: { agencyId: agencyId || user.agencyId } })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -345,7 +357,7 @@ export default {
// this.pieInitState = true
},
initAgeCharts() {
initAgeCharts () {
// const eId = document.getElementById('echartOrg')
// let _charts = echarts.init(eId)
let option = {
@ -375,7 +387,7 @@ export default {
// option && this.$refs.pieChart.setOption(option);
},
initEduCharts() {
initEduCharts () {
// const eId = document.getElementById('echartOrg')
// let _charts = echarts.init(eId)
let option = {
@ -560,7 +572,7 @@ export default {
},
async getAgeCount(orgId, orgType) {
async getAgeCount (orgId, orgType) {
// const url = "/epmetuser/icresiuser/partymemberagestatistics";
const url = '/resi/partymember/icPartyMember/partymemberagestatistics'
let params = {
@ -610,7 +622,7 @@ export default {
} else {
}
},
async getEduCount(orgId, orgType) {
async getEduCount (orgId, orgType) {
// const url = "/epmetuser/icresiuser/partymembereducationstatistics";
const url = '/resi/partymember/icPartyMember/partymembereducationstatistics'
let params = {
@ -634,7 +646,7 @@ export default {
} else {
}
},
async getAgeList(orgId, orgType, _code) {
async getAgeList (orgId, orgType, _code) {
this.visibleAgeLoading = true
// const url = "/epmetuser/icresiuser/partymemberagelist";
@ -661,7 +673,7 @@ export default {
// if (_code == 0 || _code) this.noInit = true
this.visibleAgeLoading = false
},
async getEduList(orgId, orgType, _code) {
async getEduList (orgId, orgType, _code) {
this.visibleLoading = true
// const url = "/epmetuser/icresiuser/partymembereducationlist";
const url = '/resi/partymember/icPartyMember/partymembereducationlist'
@ -687,11 +699,11 @@ export default {
}
this.visibleLoading = false
},
async getPartyOggList(node, resolve) {
async getPartyOggList (node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
// const url = '/gov/org/customeragency/agencygridtree'
// const url = '/resi/partymember/icPartyOrg/getTreelist'
const url ='/resi/partymember/icPartyOrg/getSearchTreelist'
const url = '/resi/partymember/icPartyOrg/getSearchTreelist'
let params = {
agencyId: this.$store.state.user.agencyId,
};
@ -704,17 +716,17 @@ export default {
} else {
}
},
deepArrTOnull(arr) {
deepArrTOnull (arr) {
let a = []
a = arr.map(item => {
return {
...item,
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
children: (item.children.length > 0 && this.deepArrTOnull(item.children)) || null
}
})
return a
},
async getAgencyList(node, resolve) {
async getAgencyList (node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/gov/org/customeragency/agencygridtree'
// let params = {
@ -733,7 +745,7 @@ export default {
} else {
}
},
getTreeData(data){
getTreeData (data) {
if (!Array.isArray(data)) return []
let arr = data.map(item => {
let _item = {}
@ -749,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,
@ -761,7 +774,7 @@ export default {
})
return arr
},
handleClickRow(val) {
handleClickRow (val) {
this.getDetail(val.userId)
this.memberDialog = true
},
@ -771,7 +784,7 @@ export default {
path: `/main-shuju/visual-basicinfo-people/${val}`,
});
},
getDetail(id) {
getDetail (id) {
let params = {
id,
}
@ -788,10 +801,10 @@ export default {
return this.$message.error('网络错误')
})
},
handleCascader(val) {
handleCascader (val) {
console.log('val-vvv', val)
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
const orgType = _arr[1] !== 'grid' ? 'agency' : 'grid'
this.agencyId = _arr[0]
this.orgType = orgType
this.noInit = false
@ -803,7 +816,7 @@ export default {
this.getAgeList(_arr[0], orgType)
this.getEduList(_arr[0], orgType)
},
handlePartyCascader(val) {
handlePartyCascader (val) {
console.log('val-vvvpppppp', val)
this.noInit = false
this.noEduInit = false
@ -825,15 +838,15 @@ export default {
}
},
getCheckedNodes(val) {
getCheckedNodes (val) {
console.log('val-nnn', val)
},
lazyLoad(node, resolve) {
lazyLoad (node, resolve) {
setTimeout(() => {
this.getAgeList(node, resolve)
}, 500)
},
pageSizeChangeHandleAge(val) {
pageSizeChangeHandleAge (val) {
this.agePageNo = 1
this.agePageSize = val
this.getAgeList(this.agencyId, this.orgType, this.ageCode)
@ -842,22 +855,22 @@ export default {
this.agePageNo = val
this.getAgeList(this.agencyId, this.orgType, this.ageCode)
},
pageSizeChangeHandleNew(val) {
pageSizeChangeHandleNew (val) {
this.pageNo = 1;
this.pageSize = val;
this.getEduList(this.agencyId, this.orgType, this.eduCode)
},
pageCurrentChangeHandleNew(val) {
pageCurrentChangeHandleNew (val) {
this.pageNo = val;
this.getEduList(this.agencyId, this.orgType, this.eduCode)
},
async handleExport(type) {
async handleExport (type) {
const urls = {
age: '/epmetuser/icresiuser/partymemberagelist/export',
edu: '/epmetuser/icresiuser/partymembereducationlist/export'
}
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
const orgType = _arr[1] !== 'grid' ? 'agency' : 'grid'
let params = {
orgId: _arr[0],
orgType: orgType,
@ -939,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 {
@ -952,7 +965,6 @@ export default {
line-height: 24px;
}
}
}
}
.title-label {
@ -960,7 +972,6 @@ export default {
font-family: PingFang SC;
font-weight: 800;
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 18px;
@ -998,7 +1009,7 @@ export default {
color: #fff;
}
.card-left-title::after {
content: '';
content: "";
position: absolute;
top: 50%;
left: 20px;
@ -1006,7 +1017,7 @@ export default {
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865FA;
background: #2865fa;
border-radius: 50%;
}
.echart-wr {
@ -1049,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;
}
@ -1069,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;
}
}
}
@ -1095,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 {
@ -1135,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