5 changed files with 2349 additions and 0 deletions
@ -0,0 +1,200 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div v-show="!noData" |
||||
|
class="screenEchartsFrame" |
||||
|
ref="screenEchartsFrame"></div> |
||||
|
<screen-nodata v-show="noData" |
||||
|
class="nodata"></screen-nodata> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import * as echarts from 'echarts'; |
||||
|
import ScreenNodata from "@/views/modules/visual/components/screen-nodata"; |
||||
|
export default { |
||||
|
name: 'screen-echarts-frame', |
||||
|
data () { |
||||
|
return { |
||||
|
myChart: '', |
||||
|
noData: false, |
||||
|
} |
||||
|
}, |
||||
|
props: { |
||||
|
chartMethod: { |
||||
|
type: Function |
||||
|
} |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.initChart() |
||||
|
window.onresize = () => { |
||||
|
this.myChart.resize() |
||||
|
} |
||||
|
}, |
||||
|
beforeDestroy () { |
||||
|
// 销毁echarts实例对象 |
||||
|
if (this.myChart) this.myChart.dispose() |
||||
|
}, |
||||
|
watch: {}, |
||||
|
components: { |
||||
|
ScreenNodata, |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
initChart () { |
||||
|
|
||||
|
this.$nextTick(() => { |
||||
|
const dom = this.$refs.screenEchartsFrame |
||||
|
this.myChart = echarts.init(dom) |
||||
|
|
||||
|
// this.myChart.setOption(this.chartMethod()); |
||||
|
this.$emit('myChartMethod', this.myChart) |
||||
|
}) |
||||
|
}, |
||||
|
//点击pie事件 |
||||
|
handleClick (fun) { |
||||
|
this.myChart.on('click', fun); |
||||
|
}, |
||||
|
//没有数据 |
||||
|
setNoData (nodata) { |
||||
|
|
||||
|
this.noData = nodata |
||||
|
}, |
||||
|
|
||||
|
//高亮 |
||||
|
highLight (index) { |
||||
|
this.myChart.dispatchAction({ |
||||
|
type: 'highlight', |
||||
|
seriesIndex: 1, |
||||
|
dataIndex: index |
||||
|
}); |
||||
|
}, |
||||
|
//取消高亮 |
||||
|
downplay (index) { |
||||
|
this.myChart.dispatchAction({ |
||||
|
type: 'downplay', |
||||
|
seriesIndex: 0, |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 配置option |
||||
|
setOption (option) { |
||||
|
this.myChart.setOption(option) |
||||
|
}, |
||||
|
// 获取option |
||||
|
getOption () { |
||||
|
if (this.myChart) { |
||||
|
return this.myChart.getOption() |
||||
|
} else { |
||||
|
return null |
||||
|
} |
||||
|
}, |
||||
|
// |
||||
|
resize () { |
||||
|
if (this.myChart) { |
||||
|
this.myChart.resize() |
||||
|
} |
||||
|
}, |
||||
|
clear () { |
||||
|
if (this.myChart) { |
||||
|
this.myChart.clear() |
||||
|
} |
||||
|
}, |
||||
|
showLoading () { |
||||
|
if (this.myChart) { |
||||
|
this.$nextTick(() => { |
||||
|
this.myChart.showLoading({ |
||||
|
text: '', |
||||
|
color: '#29cdff', |
||||
|
textColor: '#29cdff', |
||||
|
maskColor: 'rgba(255, 255, 255, 0)', |
||||
|
zlevel: 0 |
||||
|
|
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
hideLoading () { |
||||
|
|
||||
|
if (this.myChart) { |
||||
|
this.myChart.hideLoading() |
||||
|
} |
||||
|
}, |
||||
|
// 启动动画时使用 |
||||
|
tooltipAnimate (chart, length) { |
||||
|
// 清除上一次动画 |
||||
|
this.timeTicket && clearInterval(this.timeTicket) |
||||
|
const count = 0 |
||||
|
// 启动动画 |
||||
|
this._action(chart, count, length) |
||||
|
chart && // 移除动画 |
||||
|
chart.on('mouseover', params => { |
||||
|
this._cleanAction(chart, params) |
||||
|
}) |
||||
|
// 重写启动动画 |
||||
|
chart && |
||||
|
chart.on('mouseout', () => { |
||||
|
this._action(chart, count, length) |
||||
|
}) |
||||
|
}, |
||||
|
// tooltip动画action |
||||
|
_action (chart, count, length) { |
||||
|
this.timeTicket && clearInterval(this.timeTicket) |
||||
|
this.timeTicket = setInterval(() => { |
||||
|
if (!chart) { |
||||
|
clearInterval(this.timeTicket) |
||||
|
return |
||||
|
} |
||||
|
chart && |
||||
|
chart.dispatchAction({ |
||||
|
type: 'downplay', |
||||
|
seriesIndex: 0 |
||||
|
}) |
||||
|
chart && |
||||
|
chart.dispatchAction({ |
||||
|
type: 'highlight', |
||||
|
seriesIndex: 0, |
||||
|
dataIndex: count % length |
||||
|
}) |
||||
|
chart && |
||||
|
chart.dispatchAction({ |
||||
|
type: 'showTip', |
||||
|
seriesIndex: 0, |
||||
|
dataIndex: count % length |
||||
|
}) |
||||
|
count++ |
||||
|
}, 1000 * 3) |
||||
|
}, |
||||
|
_cleanAction (chart, params) { |
||||
|
this.timeTicket && clearInterval(this.timeTicket) |
||||
|
if (!chart) { |
||||
|
clearInterval(this.timeTicket) |
||||
|
return |
||||
|
} |
||||
|
chart && |
||||
|
chart.dispatchAction({ |
||||
|
type: 'downplay', |
||||
|
seriesIndex: 0 |
||||
|
}) |
||||
|
chart && |
||||
|
chart.dispatchAction({ |
||||
|
type: 'highlight', |
||||
|
seriesIndex: 0, |
||||
|
dataIndex: params.dataIndex |
||||
|
}) |
||||
|
chart && |
||||
|
chart.dispatchAction({ |
||||
|
type: 'showTip', |
||||
|
seriesIndex: 0, |
||||
|
dataIndex: params.dataIndex |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.screenEchartsFrame { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
</style> |
@ -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.showMobile }}</span> |
||||
|
</div> |
||||
|
<div class="info-prop"> |
||||
|
<span>身份证:</span> |
||||
|
<span>{{ form.showIdCard }}</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> |
@ -0,0 +1,365 @@ |
|||||
|
<template> |
||||
|
|
||||
|
<div class="epidemic-form"> |
||||
|
<div class="dialog-h-content scroll-h"> |
||||
|
|
||||
|
<div class="m-row"> |
||||
|
<div class="m-row-2"> |
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">所属党组织:</span> |
||||
|
<span>{{ form.orgName }}</span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">党员中心户:</span> |
||||
|
<span>{{ form.isDyzxh==='1'?'是':'否'}}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="m-row-2"> |
||||
|
|
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">姓名:</span> |
||||
|
<span>{{ form.name}}</span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">免学习:</span> |
||||
|
<span>{{form.isMxx==='1'?'是':'否'}}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="m-row-2"> |
||||
|
|
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">手机号:</span> |
||||
|
<span>{{ form.showMobile }}</span> |
||||
|
</div> |
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">职务:</span> |
||||
|
<span>{{ form.postName|| "--"}}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="m-row-2"> |
||||
|
|
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">身份证:</span> |
||||
|
<span>{{ form.showIdCard }}</span> |
||||
|
</div> |
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">文化程度:</span> |
||||
|
<span>{{form.cultureName || "--"}}</span> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<div class="m-row-2"> |
||||
|
|
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">地址:</span> |
||||
|
<span>{{ form.address|| "--" }}</span> |
||||
|
</div> |
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">入党时间:</span> |
||||
|
<span>{{ form.rdsj || "--"}}</span> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<div class="m-row-2"> |
||||
|
|
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">流动党员:</span> |
||||
|
<span>{{ form.isLd==='1'?'是':'否' }}</span> |
||||
|
</div> |
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">党员流动号:</span> |
||||
|
<span>{{ form.ldzh || "--" }}</span> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<div class="m-row-2"> |
||||
|
|
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-3">备注:</span> |
||||
|
<span>{{ form.remark || "--" }}</span> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div class="div-btn"> |
||||
|
<el-button size="small" |
||||
|
@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> |
||||
|
|
||||
|
</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 () { |
||||
|
|
||||
|
return { |
||||
|
activesName: 'first', |
||||
|
isAuto: false, |
||||
|
formItemWd: '100%', |
||||
|
partymenberid: '', |
||||
|
partyProps: { |
||||
|
label: 'partyOrgName', |
||||
|
value: 'id', |
||||
|
emitPath: false |
||||
|
}, |
||||
|
|
||||
|
form: { |
||||
|
icResiUser: '', |
||||
|
name: '', |
||||
|
mobile: '', |
||||
|
idCard: '', |
||||
|
address: '', |
||||
|
rdsj: '', |
||||
|
sszb: '', |
||||
|
isLd: '0', |
||||
|
ldzh: '', |
||||
|
partyZw: '0', |
||||
|
isDyzxh: '0', |
||||
|
isMxx: '0', |
||||
|
culture: '', |
||||
|
remark: '' |
||||
|
}, |
||||
|
eduList: [], |
||||
|
|
||||
|
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> |
||||
|
@import "@/assets/scss/modules/management/detail-main.scss"; |
||||
|
</style> |
||||
|
|
@ -0,0 +1,176 @@ |
|||||
|
|
||||
|
export function pieOption (_charts) { |
||||
|
const center= ['60%', '50%'] |
||||
|
return { |
||||
|
title: { |
||||
|
text: '0', |
||||
|
top: 125, |
||||
|
left: 235, |
||||
|
textAlign: 'center', |
||||
|
textStyle: { |
||||
|
width: '100%', |
||||
|
fontSize: 32, |
||||
|
color: '#FFFFFF', |
||||
|
fontWeight: 400, |
||||
|
align: 'center' |
||||
|
}, |
||||
|
itemGap: 5, |
||||
|
subtext: '总数', |
||||
|
subtextStyle: { |
||||
|
fontSize: 16, |
||||
|
color: '#fff', |
||||
|
fontWeight: 400, |
||||
|
align: 'center' |
||||
|
} |
||||
|
}, |
||||
|
tooltip: { |
||||
|
show: false |
||||
|
}, |
||||
|
legend: { |
||||
|
top: 500, |
||||
|
bottom: 0, |
||||
|
itemWidth: 20, |
||||
|
itemHeight: 10, |
||||
|
textStyle: { |
||||
|
color: '#000000', |
||||
|
fontSize: 16, |
||||
|
lineHeight: 20, |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
series: [ |
||||
|
// 外侧圆环
|
||||
|
{ |
||||
|
type: 'pie', |
||||
|
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
|
||||
|
startAngle: 90, |
||||
|
hoverAnimation: false, |
||||
|
// tooltip: {
|
||||
|
// },
|
||||
|
center: center, |
||||
|
left: 'left', |
||||
|
radius: ['60%', '70%'], |
||||
|
width: 400, |
||||
|
label: { |
||||
|
show: false |
||||
|
}, |
||||
|
labelLine: { |
||||
|
show: false |
||||
|
}, |
||||
|
data: [{ |
||||
|
value: 480, |
||||
|
itemStyle: { |
||||
|
color: 'rgba(40, 101, 250, 0)', |
||||
|
width:0, |
||||
|
borderColor: 'rgba(40, 101, 250, 0.5)', |
||||
|
borderWidth: 1, |
||||
|
borderType: 'dotted' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
|
||||
|
// 突出的
|
||||
|
{ |
||||
|
hoverAnimation: false, |
||||
|
type: 'pie', |
||||
|
center: center, |
||||
|
radius: ['40%', '60%'], |
||||
|
avoidLabelOverlap: false, |
||||
|
selectedMode: 'single', |
||||
|
left: 'left', |
||||
|
width: 400, |
||||
|
startAngle: 90, |
||||
|
label: { |
||||
|
// show: false,
|
||||
|
position: 'outside', |
||||
|
alignTo: 'edge', |
||||
|
// formatter: '{a|{c}}\n\n{name|{b}}',
|
||||
|
formatter: '{a|{c}}\n{r|}\n{name|{b}}', |
||||
|
// minMargin: 5,
|
||||
|
edgeDistance: 20, |
||||
|
lineHeight: 15, |
||||
|
// color: '#fff',
|
||||
|
fontSize: 12, |
||||
|
// distanceToLabelLine: -60,
|
||||
|
rich: { |
||||
|
name: { |
||||
|
padding: [0, 6, 0, 6] |
||||
|
}, |
||||
|
a: { |
||||
|
fontSize: 30, |
||||
|
// color: '#fff',
|
||||
|
padding: [0, 6, 6, 6] |
||||
|
}, |
||||
|
r: { |
||||
|
backgroundColor: 'auto', |
||||
|
borderRadius: 6, |
||||
|
width: 6, |
||||
|
height: 6, |
||||
|
// padding: [3, 3, 0, -12]
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
labelLine: { |
||||
|
show: false, |
||||
|
smooth: 0.2, |
||||
|
length: 20, |
||||
|
length2: 10, |
||||
|
maxSurfaceAngle: 80 |
||||
|
}, |
||||
|
labelLayout: function (params) { |
||||
|
|
||||
|
const isLeft = params.labelRect.x < _charts.getWidth() / 3; |
||||
|
const points = params.labelLinePoints; |
||||
|
// Update the end point.
|
||||
|
if (points) { |
||||
|
points[2][0] = isLeft |
||||
|
? params.labelRect.x |
||||
|
: params.labelRect.x + params.labelRect.width; |
||||
|
} |
||||
|
|
||||
|
return { |
||||
|
labelLinePoints: points |
||||
|
}; |
||||
|
}, |
||||
|
itemStyle: { |
||||
|
|
||||
|
}, |
||||
|
data: [], |
||||
|
|
||||
|
}, |
||||
|
// 中间圆环
|
||||
|
{ |
||||
|
type: 'pie', |
||||
|
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
|
||||
|
startAngle: 90, |
||||
|
hoverAnimation: false, |
||||
|
center: center, |
||||
|
left: 'left', |
||||
|
width: 400, |
||||
|
// tooltip: {
|
||||
|
// },
|
||||
|
radius: ['0%', '25%'], |
||||
|
label: { |
||||
|
|
||||
|
show: false |
||||
|
|
||||
|
}, |
||||
|
labelLine: { |
||||
|
show: false |
||||
|
|
||||
|
}, |
||||
|
data: [ |
||||
|
{ |
||||
|
value: 360, |
||||
|
itemStyle: { |
||||
|
color: 'rgba(8, 37, 134, 1)', |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
] |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
File diff suppressed because it is too large
Loading…
Reference in new issue