12 changed files with 750 additions and 3626 deletions
@ -1,346 +0,0 @@ |
|||
<template> |
|||
<div class="p-wr"> |
|||
|
|||
<el-form label-width="140px" :model="form" :inline="true" |
|||
:disabled="disabled" :rules="rules" ref="ruleForm" |
|||
class="form-wr"> |
|||
<div> |
|||
<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> |
|||
</div> |
|||
<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> |
|||
@ -1,404 +0,0 @@ |
|||
<template> |
|||
<div class="p-wr"> |
|||
|
|||
<el-form label-width="140px" |
|||
:model="dateForm" |
|||
:inline="true" |
|||
:disabled="disabled" |
|||
:rules="rules" |
|||
ref="ruleForm" |
|||
class="form-wr"> |
|||
<div> |
|||
<el-form-item label="评分周期" |
|||
prop="year"> |
|||
<div class="flex-div"> |
|||
<!-- <div class="mr10">评分周期</div> --> |
|||
<div class="mr10"> |
|||
<el-date-picker v-model="dateForm.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="dateForm.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-form-item> |
|||
</div> |
|||
|
|||
</el-form> |
|||
|
|||
<div class="m-detail-main"> |
|||
<div class="m-detail-main-2"> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-3">基础积分分值:</span> |
|||
<span>{{ dateForm.basePoint===0||dateForm.basePoint? dateForm.basePoint:'--'}}</span> |
|||
</div> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-3">基础积分选项:</span> |
|||
<span>{{ dateForm.baseOptionsShow }}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-detail-main-2"> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-3">民主评议积分分值:</span> |
|||
<span>{{ dateForm.reviewPoint===0||dateForm.reviewPoint? dateForm.reviewPoint:'--'}}</span> |
|||
</div> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-3">民主评议积分选项:</span> |
|||
<span>{{dateForm.reviewOptionsShow}}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-detail-main-2"> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-3">激励积分分值:</span> |
|||
<span>{{ dateForm.inspirePoint===0||dateForm.inspirePoint? dateForm.inspirePoint:'--'}}</span> |
|||
</div> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-3">激励积分选项:</span> |
|||
<span>{{dateForm.inspireOptionsShow }}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-detail-main-2"> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-3">警示扣分分值:</span> |
|||
<span>{{ dateForm.warnPoint===0||dateForm.warnPoint? dateForm.warnPoint:'--'}}</span> |
|||
</div> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-3">警示扣分选项:</span> |
|||
<span>{{ dateForm.warnOptionsShow }}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
partyId: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
disabled: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data () { |
|||
return { |
|||
btnDisabled: false, |
|||
year: '', |
|||
quarter: '', |
|||
dateForm: { |
|||
partyMemberId: '', |
|||
year: '', |
|||
quarter: '', |
|||
basePoint: '', |
|||
baseOptions: [], |
|||
reviewPoint: '', |
|||
reviewOptions: [], |
|||
inspirePoint: '', |
|||
inspireOptions: [], |
|||
warnPoint: '', |
|||
warnOptions: [], |
|||
baseOptionsShow: '--', |
|||
reviewOptionsShow: '--', |
|||
inspireOptionsShow: '--', |
|||
warnOptionsShow: '--' |
|||
}, |
|||
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.dateForm.year) { |
|||
this.getInfo() |
|||
} |
|||
this.quarter = val |
|||
}, |
|||
handleYearChange (val) { |
|||
this.year = val |
|||
}, |
|||
|
|||
async getInfo () { |
|||
const params = { |
|||
year: this.dateForm.year, |
|||
quarter: this.dateForm.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 { |
|||
this.dateForm.baseOptionsShow = '--' |
|||
this.dateForm.reviewOptionsShow = '--' |
|||
this.dateForm.inspireOptionsShow = '--' |
|||
this.dateForm.warnOptionsShow = '--' |
|||
|
|||
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.dateForm[n] = info[n] |
|||
} |
|||
console.log('dateForm', this.dateForm) |
|||
|
|||
if (this.dateForm.baseOptions.length > 0) { |
|||
let array = [] |
|||
this.baseOptions.forEach(element => { |
|||
if (this.dateForm.baseOptions.indexOf(element.value) > -1) { |
|||
array.push(element.label) |
|||
} |
|||
|
|||
}); |
|||
this.dateForm.baseOptionsShow = array.join(',') |
|||
|
|||
} |
|||
|
|||
|
|||
if (this.dateForm.reviewOptions.length > 0) { |
|||
let array = [] |
|||
this.pyiOptions.forEach(element => { |
|||
if (this.dateForm.reviewOptions.indexOf(element.value) > -1) { |
|||
array.push(element.label) |
|||
} |
|||
|
|||
}); |
|||
this.dateForm.reviewOptionsShow = array.join(',') |
|||
|
|||
} |
|||
|
|||
if (this.dateForm.inspireOptions.length > 0) { |
|||
let array = [] |
|||
this.jiliOptions.forEach(element => { |
|||
if (this.dateForm.inspireOptions.indexOf(element.value) > -1) { |
|||
array.push(element.label) |
|||
} |
|||
|
|||
}); |
|||
this.dateForm.inspireOptionsShow = array.join(',') |
|||
|
|||
} |
|||
|
|||
if (this.dateForm.warnOptions.length > 0) { |
|||
let array = [] |
|||
this.jinshiOptions.forEach(element => { |
|||
if (this.dateForm.warnOptions.indexOf(element.value) > -1) { |
|||
array.push(element.label) |
|||
} |
|||
|
|||
}); |
|||
this.dateForm.warnOptionsShow = array.join(',') |
|||
|
|||
} |
|||
|
|||
} else { |
|||
this.$refs['ruleForm'].resetFields() |
|||
this.dateForm.quarter = this.quarter |
|||
this.dateForm.year = this.year |
|||
|
|||
} |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
console.log('err', err) |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
|
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped > |
|||
@import "@/assets/scss/modules/management/detail-main.scss"; |
|||
</style> |
|||
<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> |
|||
@ -1,298 +0,0 @@ |
|||
<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="monthrange" |
|||
value-format="yyyy-MM" |
|||
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 v-if="!disabled" |
|||
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> |
|||
</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: 'cancle', |
|||
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.btnType = 'cancle' |
|||
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> |
|||
@ -1,568 +0,0 @@ |
|||
<template> |
|||
<div class="dialog-h-content scroll-h pd0"> |
|||
<div class="div-tip">本模块主要为添加非本社区居住党员,本社区居住党员建议到居民信息页面添加</div> |
|||
<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> |
|||
<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> |
|||
<div class="flex-div"> |
|||
<el-form-item label="入党时所在党支部" |
|||
prop="rdsszzb" |
|||
class="wd50"> |
|||
<el-input v-model="form.rdsszzb" |
|||
placeholder="请输入" |
|||
:disabled="disabled" |
|||
class="input-width" |
|||
clearable></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="组织关系转入社区时间" |
|||
prop="zzgxzrsqsj" |
|||
class="wd50"> |
|||
<el-date-picker v-model="form.zzgxzrsqsj" |
|||
: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="isQcj" |
|||
class="wd50"> |
|||
<el-radio-group v-model="form.isQcj" |
|||
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="remark" |
|||
class="wd50"> |
|||
<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 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, isPhone } 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) && !isPhone(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: '', |
|||
rdsszzb: '', |
|||
zzgxzrsqsj: '', |
|||
isQcj: '0', |
|||
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') |
|||
}, |
|||
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 |
|||
} 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 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; |
|||
} |
|||
.div-tip { |
|||
margin-left: 40px; |
|||
color: #f56c6c; |
|||
padding: 10px 0 20px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,592 @@ |
|||
<template> |
|||
<el-dialog :visible="visible" |
|||
:title="'新增党员'" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="true" |
|||
@close="handleDlgClose"> |
|||
|
|||
<el-form class="form" |
|||
:model="dataForm" |
|||
:rules="dataRule" |
|||
ref="dataForm" |
|||
@keyup.enter.native="" |
|||
:label-width="$i18n.locale === 'en-US' ? '120px' : '100px'"> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="12"> |
|||
<el-form-item prop="partyOrgId" |
|||
label="所属党组织"> |
|||
<el-cascader |
|||
v-model="dataForm.partyOrgId" |
|||
clearable |
|||
@change="handlePartyOrgCascadarChange" |
|||
:props="partyOrgTreeCascadarProps" |
|||
:options="partyOrgTree"></el-cascader> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item prop="name" |
|||
label="党员姓名"> |
|||
<el-input |
|||
v-model="dataForm.name" |
|||
style="width: 300px" |
|||
clearable |
|||
placeholder="请输入党员姓名" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="12"> |
|||
<el-form-item prop="mobile" |
|||
label="联系电话"> |
|||
<el-input |
|||
v-model="dataForm.mobile" |
|||
style="width: 300px" |
|||
clearable |
|||
placeholder="请输入联系电话" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item prop="idCard" |
|||
label="身份证号"> |
|||
<el-input |
|||
v-model="dataForm.idCard" |
|||
style="width: 300px" |
|||
clearable |
|||
placeholder="请输入身份证号" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="12"> |
|||
<el-form-item prop="birthday" |
|||
label="出生日期"> |
|||
<el-date-picker |
|||
v-model="dataForm.birthday" |
|||
value-format="yyyy-MM-dd" |
|||
style="width: 300px" |
|||
type="date" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<!--1男 2女 0未知--> |
|||
<el-form-item prop="gender" |
|||
label="性别"> |
|||
<el-select v-model="dataForm.gender" placeholder="性别" style="width: 300px"> |
|||
<el-option |
|||
v-for="item in genderOptions" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="12"> |
|||
<!--民族--> |
|||
<el-form-item prop="nation" label="民族"> |
|||
<el-select v-model="dataForm.nation" placeholder="请选择" style="width: 300px"> |
|||
<el-option v-for="n in nationOptions" |
|||
:key="n.value" |
|||
:value="n.value" |
|||
:label="n.label"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<!--本地户籍--> |
|||
<el-form-item prop="localResidenceFlag" label="本地户籍"> |
|||
<el-select v-model="dataForm.localResidenceFlag" placeholder="请选择" style="width: 300px"> |
|||
<el-option v-for="n in localResidenceFlagOptions" |
|||
:key="n.value" |
|||
:value="n.value" |
|||
:label="n.label"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="24"> |
|||
<!--户籍地址--> |
|||
<el-form-item prop="hjAddress" label="户籍地址"> |
|||
<el-input v-model="dataForm.hjAddress" style="width: 100%"> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="5"> |
|||
<el-col :span="24"> |
|||
<!--居住地址--> |
|||
<el-form-item prop="jzAddress" label="居住地址" style="width: 100%"> |
|||
<el-input v-model="dataForm.jzAddress"> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="12"> |
|||
<!--文化程度--> |
|||
<el-form-item prop="cultureLevel" label="文化程度"> |
|||
<el-select v-model="dataForm.cultureLevel" placeholder="请选择" style="width: 300px"> |
|||
<el-option v-for="e in cultureLevelOptions" |
|||
:key="e.value" |
|||
:value="e.value" |
|||
:label="e.label"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="12"> |
|||
<!--党组织职务--> |
|||
<el-form-item prop="partyJob" label="党组织职务"> |
|||
<el-select v-model="dataForm.partyJob" placeholder="请选择" style="width: 300px"> |
|||
<el-option v-for="e in partyJobOptions" |
|||
:key="e.value" |
|||
:value="e.value" |
|||
:label="e.label"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="24"> |
|||
<!--工作职责--> |
|||
<el-form-item prop="duty" label="工作职责" style="width: 100%"> |
|||
<el-input v-model="dataForm.duty"> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="12"> |
|||
<!--入党日期--> |
|||
<el-form-item prop="joinTime" label="入党日期" style="width: 100%"> |
|||
<el-date-picker |
|||
v-model="dataForm.joinTime" |
|||
style="width: 300px" |
|||
value-format="yyyy-MM-dd" |
|||
type="date" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="12"> |
|||
<!--positiveTime--> |
|||
<el-form-item prop="positiveTime" label="转正日期" style="width: 100%"> |
|||
<el-date-picker |
|||
v-model="dataForm.positiveTime" |
|||
value-format="yyyy-MM-dd" |
|||
style="width: 300px" |
|||
type="date" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<!--党员中心户--> |
|||
<el-form-item prop="centerFlag" label="党员中心户" style="width: 100%"> |
|||
<el-select v-model="dataForm.centerFlag" placeholder="请选择" style="width: 300px"> |
|||
<el-option v-for="e in centerFlagOptions" |
|||
:key="e.value" |
|||
:value="e.value" |
|||
:label="e.label"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="12"> |
|||
<!--流动党员--> |
|||
<el-form-item prop="flowFlag" label="流动党员"> |
|||
<el-select v-model="dataForm.flowFlag" placeholder="请选择" style="width: 300px"> |
|||
<el-option v-for="e in flowFlagOptions" |
|||
:key="e.value" |
|||
:value="e.value" |
|||
:label="e.label"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="12"> |
|||
<!--流动党员证号--> |
|||
<el-form-item prop="flowActNum" label="流动党员证号"> |
|||
<el-input v-model="dataForm.flowActNum"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="12"> |
|||
<!--免学习--> |
|||
<el-form-item prop="studyNotNeed" label="免学习"> |
|||
<el-select v-model="dataForm.studyNotNeed" placeholder="请选择" style="width: 300px"> |
|||
<el-option v-for="e in studyNotNeedOptions" |
|||
:key="e.value" |
|||
:value="e.value" |
|||
:label="e.label"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="12"> |
|||
<!--是否退休--> |
|||
<el-form-item prop="retiredFlag" label="是否退休"> |
|||
<el-select v-model="dataForm.retiredFlag" placeholder="请选择" style="width: 300px"> |
|||
<el-option v-for="e in retiredFlagOptions" |
|||
:key="e.value" |
|||
:value="e.value" |
|||
:label="e.label"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="12"> |
|||
<!--入党时所在党支部--> |
|||
<el-form-item prop="joinBranchName" label="入党时所在党支部"> |
|||
<el-input v-model="dataForm.joinBranchName"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="12"> |
|||
<!--组织关系转入社区时间--> |
|||
<el-form-item prop="joinCommunityTime" label="组织关系转入社区时间" style="width: 100%"> |
|||
<el-date-picker |
|||
v-model="dataForm.joinCommunityTime" |
|||
value-format="yyyy-MM-dd" |
|||
style="width: 300px" |
|||
type="date" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="5"> |
|||
<el-col :span="24"> |
|||
<!--备注--> |
|||
<el-form-item prop="remark" label="备注"> |
|||
<el-input v-model="dataForm.remark"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<template slot="footer"> |
|||
<!--<el-button @click="handleDlgClose">取消</el-button>--> |
|||
<el-button type="primary" @click="handleSubmitCreate">确定</el-button> |
|||
<el-button type="primary" @click="handleDlgClose">取消</el-button> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestGet, requestPost } from '@/js/dai/request' |
|||
import { EpmetResultResolver } from '@/js/epmet-result-resolver' |
|||
|
|||
export default { |
|||
data () { |
|||
return { |
|||
epmetResultResolver: null, |
|||
visible: false, |
|||
partyOrgTree: [], // 党组织数 |
|||
genderOptions: [{ 'label': '男', 'value': 1 }, { 'label': '女', 'value': 2 }, { 'label': '未知', 'value': 0 }], |
|||
nationOptions: [], // 民族 |
|||
localResidenceFlagOptions: [{ 'label': '是', 'value': 1 }, { 'label': '否', 'value': 0 }], // 是否本地户籍 |
|||
cultureLevelOptions: [], // 文化程度 |
|||
partyJobOptions: [], // 党组织职务 |
|||
centerFlagOptions: [{ 'label': '是', 'value': 1 }, { 'label': '否', 'value': 0 }], // 党员中心户 |
|||
flowFlagOptions: [{ 'label': '是', 'value': 1 }, { 'label': '否', 'value': 0 }], // 是否流动党员 |
|||
studyNotNeedOptions: [{ 'label': '是', 'value': 1 }, { 'label': '否', 'value': 0 }], // 免学习 |
|||
retiredFlagOptions: [{ 'label': '是', 'value': 1 }, { 'label': '否', 'value': 0 }], // 免学习 |
|||
dataFormClear: null, |
|||
dataForm: { |
|||
partyOrgId: null, |
|||
name: null, |
|||
mobile: null, |
|||
idCard: null, |
|||
birthday: null, |
|||
gender: null, |
|||
nation: null, |
|||
localResidenceFlag: null, |
|||
hjAddress: null, |
|||
jzAddress: null, |
|||
cultureLevel: null, |
|||
partyJob: null, |
|||
duty: null, |
|||
joinTime: null, |
|||
positiveTime: null, |
|||
centerFlag: null, |
|||
flowFlag: null, |
|||
flowActNum: null, |
|||
studyNotNeed: null, |
|||
retiredFlag: null, |
|||
joinBranchName: null, |
|||
joinCommunityTime: null, |
|||
remark: null, |
|||
}, |
|||
|
|||
partyOrgTreeCascadarProps: { |
|||
lazy: true, |
|||
lazyLoad: ((node, resolve) => { |
|||
this.handleNextOrgTreeClick(node, resolve) |
|||
}), |
|||
value: 'id', |
|||
label: 'partyOrgName', |
|||
checkStrictly: true, |
|||
multiple: false |
|||
} |
|||
} |
|||
}, |
|||
mounted () { |
|||
this.epmetResultResolver = new EpmetResultResolver(this); |
|||
// 备份一下dataForm |
|||
// this.dataFormClear = Object.create(this.dataForm); |
|||
this.dataFormClear = JSON.parse(JSON.stringify(this.dataForm)); |
|||
}, |
|||
methods: { |
|||
|
|||
/** ● ====================事件列表====================== **/ |
|||
|
|||
/** |
|||
* 对话框关闭事件 |
|||
*/ |
|||
handleDlgClose () { |
|||
this.resetForm();// 重置表单 |
|||
this.visible = false; |
|||
}, |
|||
|
|||
/** |
|||
* 加载树根 |
|||
*/ |
|||
async handleLoadPartyOrgTreeRoot () { |
|||
let url = '/actual/base/party/org/loadPartyOrgTreeRoot' |
|||
|
|||
let rst = await requestGet(url, {}) |
|||
|
|||
this.epmetResultResolver.success((data) => { |
|||
this.setDisableStatus4TreeNode([data]); |
|||
this.partyOrgTree.length = 0; |
|||
this.partyOrgTree.push(data); |
|||
}).parse(rst) |
|||
}, |
|||
|
|||
/** |
|||
* 党组织树选中事件 |
|||
*/ |
|||
handlePartyOrgCascadarChange(selectedNode) { |
|||
this.dataForm.partyOrgId = selectedNode[selectedNode.length - 1]; |
|||
}, |
|||
|
|||
/** |
|||
* 组织树:加载下一级 |
|||
* @returns {Promise<void>} |
|||
*/ |
|||
async handleNextOrgTreeClick (node, resolve) { |
|||
|
|||
if (node.level === 1) { |
|||
// loadPartyOrgTreeRoot接口已经返回了1,2级,所以点击1级的时候不需要加载了 |
|||
resolve(null) |
|||
return |
|||
} |
|||
|
|||
let url = '/actual/base/party/org/listNextLevelPartyOrgTreeNodesByPid' |
|||
|
|||
let rst = await requestGet(url, { |
|||
partyOrgPid: node.data.id |
|||
}) |
|||
|
|||
this.epmetResultResolver.success((data) => { |
|||
this.setDisableStatus4TreeNode([data]); |
|||
resolve(data) |
|||
}).parse(rst) |
|||
}, |
|||
|
|||
/** |
|||
* 提交创建动作 |
|||
*/ |
|||
async handleSubmitCreate () { |
|||
this.$refs.dataForm.validate(async (success) => { |
|||
if (success) { |
|||
let rst = await requestPost("/actual/base/party/member/create", this.dataForm); |
|||
this.epmetResultResolver.success((data) => { |
|||
this.$message.success('提交成功'); |
|||
this.handleDlgClose(); |
|||
}).parse(rst); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
/** |
|||
* 对话框关闭 |
|||
* @returns {Promise<void>} |
|||
*/ |
|||
resetForm() { |
|||
this.dataForm = this.dataFormClear; |
|||
}, |
|||
|
|||
/** ● ==================方法列表===================== **/ |
|||
|
|||
/** |
|||
* 初始化方法 |
|||
*/ |
|||
init () { |
|||
this.visible = true |
|||
// 加载党组织树 |
|||
this.handleLoadPartyOrgTreeRoot() |
|||
|
|||
// 加载民族列表 |
|||
this.loadNations() |
|||
// 文化程度 |
|||
this.loadCultureLevelOptions() |
|||
// 党组织职务 |
|||
this.loadPartyJobOptions() |
|||
}, |
|||
|
|||
/** |
|||
* 加载民族列表 |
|||
*/ |
|||
async loadNations () { |
|||
let url = '/sys/dict/data/nation' |
|||
let rst = await requestPost(url, {}) |
|||
this.epmetResultResolver.success((data) => { |
|||
this.nationOptions = data |
|||
}).parse(rst) |
|||
}, |
|||
|
|||
/** |
|||
* 文化程度 |
|||
* @returns {Promise<void>} |
|||
*/ |
|||
async loadCultureLevelOptions () { |
|||
let url = '/sys/dict/data/education' |
|||
let rst = await requestPost(url, {}) |
|||
this.epmetResultResolver.success((data) => { |
|||
this.cultureLevelOptions = data |
|||
}).parse(rst) |
|||
}, |
|||
|
|||
// 党组织职务 |
|||
async loadPartyJobOptions () { |
|||
let url = '/sys/dict/data/dictlist' |
|||
let rst = await requestPost(url, { 'dictType': 'party_job' }) |
|||
this.epmetResultResolver.success((data) => { |
|||
this.partyJobOptions = data |
|||
}).parse(rst) |
|||
}, |
|||
|
|||
/** |
|||
* 为党组织树设置可选状态 |
|||
* @param treeArray |
|||
*/ |
|||
setDisableStatus4TreeNode(treeArray) { |
|||
for (let e of treeArray) { |
|||
if (e.partyOrgLevel === 5 || e.partyOrgLevel === 6) { |
|||
e.disabled = true; |
|||
} |
|||
|
|||
if (e.children && e.children.length > 0) { |
|||
this.setDisableStatus4TreeNode(e.children); |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
|
|||
computed: { |
|||
dataRule () { |
|||
return { |
|||
partyOrgId: [ |
|||
{ required: true, message: '请选择党组织', trigger: 'blur' }, |
|||
], |
|||
name: [ |
|||
{ required: true, message: '请输入党员姓名', trigger: 'blur' }, |
|||
], |
|||
mobile: [ |
|||
{ required: true, message: '请输入电话', trigger: 'blur' }, |
|||
], |
|||
idCard: [ |
|||
{ required: true, message: '请输入身份证号', trigger: 'blur' }, |
|||
], |
|||
} |
|||
}, |
|||
}, |
|||
props: { |
|||
// visible: { |
|||
// defult: false, |
|||
// type: Boolean |
|||
// } |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/visual/communityManageForm.scss"; |
|||
|
|||
.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; |
|||
} |
|||
} |
|||
|
|||
|
|||
.el-row { |
|||
margin-bottom: 20px; |
|||
|
|||
&:last-child { |
|||
margin-bottom: 0; |
|||
} |
|||
} |
|||
|
|||
.el-col { |
|||
border-radius: 4px; |
|||
} |
|||
</style> |
|||
@ -1,267 +0,0 @@ |
|||
<template> |
|||
<div> |
|||
<div class="dialog-h-content scroll-h pd0"> |
|||
<div class="div-tip">本模块主要为添加非本社区居住党员,本社区居住党员建议到居民信息页面添加</div> |
|||
|
|||
<div v-if="initLoading" |
|||
class="m-detail-main"> |
|||
<div class="m-detail-main-2"> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">所属党组织:</span> |
|||
<span>{{ info.orgName }}</span> |
|||
</div> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">党员中心户:</span> |
|||
<span>{{ info.isDyzxh==='1'?'是':'否' }}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-detail-main-2"> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">姓名:</span> |
|||
<span>{{ info.name}}</span> |
|||
</div> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">免学习:</span> |
|||
<span>{{info.isMxx==='1'?'是':'否'}}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-detail-main-2"> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">联系电话:</span> |
|||
<span>{{ info.mobile?info.mobile:'--'}}</span> |
|||
</div> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">职务:</span> |
|||
<span>{{info.partyZwShow?info.partyZwShow:'--' }}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-detail-main-2"> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">证件号:</span> |
|||
<span>{{ info.idCard?info.idCard:'--' }}</span> |
|||
</div> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">文化程度:</span> |
|||
<span>{{ info.cultureName?info.cultureName:'--' }}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-detail-main-2"> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">地址:</span> |
|||
<span>{{ info.address?info.address:'--' }}</span> |
|||
</div> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">入党时间:</span> |
|||
<span>{{ info.rdsj?info.rdsj:'--' }}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-detail-main-2"> |
|||
|
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">流动党员:</span> |
|||
<span>{{ info.isLd==='1'?'是':'否'}}</span> |
|||
</div> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">流动党员号:</span> |
|||
<span>{{ info.ldzh?info.ldzh:'--' }}</span> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
<div class="m-detail-main-2"> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">入党时所在党支部:</span> |
|||
<span>{{ info.rdsszzb?info.rdsszzb:'--'}}</span> |
|||
</div> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">组织关系转入社区时间:</span> |
|||
<span>{{ info.zzgxzrsqsj?info.zzgxzrsqsj:'--' }}</span> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div class="m-detail-main-2"> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">是否请长假:</span> |
|||
<span>{{ info.isQcj==='1'?'是':'否'}}</span> |
|||
</div> |
|||
<div class="m-info-prop"> |
|||
<span class="u-info-title-2">备注:</span> |
|||
<span>{{ info.remark? info.remark:'--' }}</span> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<div class="pdl40"> |
|||
<el-tabs v-model="activesName"> |
|||
<el-tab-pane label="量化积分" |
|||
name="first"> |
|||
<pointsDetail :partyId="partymenberid" /> |
|||
</el-tab-pane> |
|||
<el-tab-pane label="缴费记录" |
|||
name="second"> |
|||
<record :partyId="partymenberid" |
|||
:disabled="disabled" /> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="handleCancle">关 闭</el-button> |
|||
|
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import pointsDetail from './cpts/pointsDetail.vue' |
|||
import record from './cpts/record.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
pointsDetail, |
|||
record |
|||
}, |
|||
props: { |
|||
|
|||
info: { |
|||
type: Object, |
|||
default: () => { } |
|||
}, |
|||
disabled: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data () { |
|||
|
|||
return { |
|||
activesName: 'first', |
|||
initLoading: false, |
|||
|
|||
partymenberid: '', |
|||
|
|||
|
|||
form: {}, |
|||
|
|||
zwList: [ |
|||
{ |
|||
label: '普通党员', |
|||
value: '0' |
|||
}, |
|||
{ |
|||
label: '支部书记', |
|||
value: '1' |
|||
}, |
|||
{ |
|||
label: '支部委员', |
|||
value: '2' |
|||
}, |
|||
{ |
|||
label: '党委委员', |
|||
value: '3' |
|||
}, |
|||
], |
|||
} |
|||
}, |
|||
watch: { |
|||
info: { |
|||
handler (val) { |
|||
if (Object.keys(val).length > 0) { |
|||
this.form = { ...val } |
|||
|
|||
} |
|||
}, |
|||
immediate: true |
|||
} |
|||
}, |
|||
created () { |
|||
|
|||
|
|||
}, |
|||
mounted () { |
|||
|
|||
this.zwList.forEach(element => { |
|||
if (this.info.partyZw === element.value) { |
|||
this.info.partyZwShow = element.label |
|||
} |
|||
}); |
|||
this.initLoading = true |
|||
}, |
|||
destroyed () { |
|||
// this.$refs['ruleForm'].resetFields() |
|||
}, |
|||
methods: { |
|||
handleCancle () { |
|||
|
|||
this.$emit('diaDetailClose') |
|||
|
|||
}, |
|||
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> |
|||
<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; |
|||
} |
|||
.div-tip { |
|||
margin-left: 40px; |
|||
color: #f56c6c; |
|||
padding: 10px 0 5px; |
|||
} |
|||
</style> |
|||
File diff suppressed because it is too large
@ -0,0 +1,141 @@ |
|||
<template> |
|||
<el-card ref="memberList"> |
|||
<div> |
|||
<el-button type="primary" |
|||
@click="handleCreateBtnClick">新增 |
|||
</el-button> |
|||
<el-button type="primary" |
|||
@click="handleCreateBtnClick">导入 |
|||
</el-button> |
|||
<el-button type="primary" |
|||
@click="handleCreateBtnClick">导出 |
|||
</el-button> |
|||
<el-button type="primary" |
|||
@click="handleCreateBtnClick">下载模板 |
|||
</el-button> |
|||
<el-button type="primary" |
|||
@click="handleCreateBtnClick">批量删除 |
|||
</el-button> |
|||
</div> |
|||
|
|||
<Create ref="create" ></Create> |
|||
</el-card> |
|||
</template> |
|||
<script> |
|||
|
|||
import { defineComponent } from 'vue' |
|||
import Create from './create' |
|||
// import Update from '@/views/modules/communityParty/members/update.vue' |
|||
import SelectPrincipal from '@/views/modules/communityParty/partyOrg/select_principal.vue' |
|||
|
|||
export default { |
|||
components: { Create }, |
|||
mounted () { |
|||
}, |
|||
|
|||
data () { |
|||
return { |
|||
createDlgShow: false |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
/** |
|||
* 新增按钮点击 |
|||
*/ |
|||
handleCreateBtnClick() { |
|||
this.createDlgShow = true; |
|||
this.$refs['create'].init(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
</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> |
|||
@ -1,725 +0,0 @@ |
|||
<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-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="status"> |
|||
<el-select v-model="searchForm.status" 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> |
|||
<el-form-item label="申请时间" |
|||
prop="startTime"> |
|||
<el-date-picker v-model="timeRange" |
|||
size="small" |
|||
type="daterange" |
|||
value-format="yyyy-MM-dd" |
|||
@change="handleTimeChange" |
|||
range-separator="至" |
|||
start-placeholder="开始时间" |
|||
end-placeholder="结束时间"> |
|||
</el-date-picker> |
|||
|
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button class="diy-button--white" size="small" @click="resetForm('searchForm')">重置</el-button> |
|||
<el-button class="diy-button--blue" size="small" @click="handleSearch">查询</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> |
|||
|
|||
</div> --> |
|||
|
|||
<el-table |
|||
:data="tableData" |
|||
row-key="id" |
|||
v-loading="tableLoading" |
|||
border |
|||
:height="tableHeight" |
|||
style="width: 100%" |
|||
class="resi-table" |
|||
@select="handleSelection" |
|||
> |
|||
<!-- <el-table-column type="selection" align="center" width="50"> |
|||
</el-table-column> --> |
|||
<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="gender" |
|||
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="gridName" |
|||
label="所在网格" |
|||
align="center" |
|||
min-width="160" |
|||
show-overflow-tooltip |
|||
/> |
|||
<el-table-column |
|||
prop="title" |
|||
label="标题" |
|||
align="center" |
|||
show-overflow-tooltip |
|||
min-width="180" |
|||
/> |
|||
<el-table-column |
|||
prop="ruleName" |
|||
label="类别" |
|||
align="center" |
|||
min-width="160" |
|||
/> |
|||
<el-table-column |
|||
prop="createdTime" |
|||
label="申请时间" |
|||
align="center" |
|||
width="160" |
|||
/> |
|||
<el-table-column |
|||
prop="status" |
|||
label="审核状态" |
|||
align="center" |
|||
show-overflow-tooltip |
|||
width="100" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.status == 0">待审核</span> |
|||
<span v-else-if="scope.row.status == 2">已通过</span> |
|||
<span v-else-if="scope.row.status == 1">已驳回</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
@click="handleLook(scope.row)" |
|||
type="text" |
|||
size="small" |
|||
class="btn-color-look" |
|||
>查看</el-button |
|||
> |
|||
<el-button |
|||
v-if="scope.row.status == 0" |
|||
@click="handleEdit(scope.row, 'edit')" |
|||
type="text" |
|||
size="small" |
|||
class="btn-color-edit" |
|||
>审核</el-button |
|||
> |
|||
</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="dialogFormVisible"> |
|||
<template v-if="!isBatch"> |
|||
<div class="d-title">{{ detailInfo.title }}</div> |
|||
<div class="d-desc">{{ detailInfo.statement }}</div> |
|||
<div class="input-width1" style="display: flex;"> |
|||
<el-image |
|||
v-for="item in detailInfo.annexList" |
|||
:key="item" |
|||
style="width: 100px; height: 100px; margin-right: 10px;" |
|||
:src="item" |
|||
:preview-src-list="detailInfo.annexList"> |
|||
</el-image> |
|||
</div> |
|||
<div class="d-tips">申请人:{{ detailInfo.showName }}</div> |
|||
<div class="d-tips">申请时间:{{ detailInfo.createdTime }}</div> |
|||
<el-divider></el-divider> |
|||
</template> |
|||
<div class=""></div> |
|||
<el-form :model="form"> |
|||
<el-form-item label="申请类别:" :label-width="'100px'"> |
|||
<span>{{ detailInfo.ruleName }}</span> |
|||
</el-form-item> |
|||
<el-form-item label="申请积分:" :label-width="'100px'"> |
|||
<span>{{ detailInfo.pointValue }}</span> |
|||
</el-form-item> |
|||
<el-form-item label="审核状态:" prop="status" :label-width="'100px'"> |
|||
<el-select v-model="form.status" placeholder="请选择" :disabled="disabled" class="input-width"> |
|||
<el-option |
|||
v-for="item in zwLists" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="备注:" prop="remark" :label-width="'100px'"> |
|||
<el-input v-model="form.remark" type="textarea" :disabled="disabled" autocomplete="off" class="input-width"></el-input> |
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button @click="handlerCancle">取 消</el-button> |
|||
<el-button v-if="!disabled" type="primary" @click="handleSubmit">确 定</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
<el-dialog title="详情" :visible.sync="dialogVisible" width="800px"> |
|||
<el-form :model="detailInfo" inline> |
|||
|
|||
<div> |
|||
<el-form-item label="所属网格:" :label-width="'100px'"> |
|||
<div class="input-width1">{{detailInfo.gridName}}</div> |
|||
</el-form-item> |
|||
<el-form-item label="姓名:" :label-width="'100px'"> |
|||
<div class="input-width1">{{detailInfo.name}}</div> |
|||
</el-form-item> |
|||
|
|||
</div> |
|||
<div> |
|||
<!-- <el-form-item label="性别" prop="remark" :label-width="'100px'"> |
|||
<el-input v-model="form.remark" autocomplete="off" class="input-width"></el-input> |
|||
</el-form-item> --> |
|||
<el-form-item label="联系电话:" :label-width="'100px'"> |
|||
<div class="input-width1">{{detailInfo.mobile}}</div> |
|||
</el-form-item> |
|||
<el-form-item label="证件号:" :label-width="'100px'"> |
|||
<div class="input-width1">{{detailInfo.idCard}}</div> |
|||
</el-form-item> |
|||
</div> |
|||
<div> |
|||
|
|||
<el-form-item label="积分类别:" :label-width="'100px'"> |
|||
<div class="input-width1">{{detailInfo.ruleName}}</div> |
|||
</el-form-item> |
|||
<el-form-item label="积分分值:" prop="status" :label-width="'100px'"> |
|||
<div class="input-width1">{{detailInfo.pointValue}}</div> |
|||
</el-form-item> |
|||
</div> |
|||
<div> |
|||
<el-form-item label="标题:" prop="status" :label-width="'100px'"> |
|||
<div class="input-width1">{{detailInfo.title}}</div> |
|||
</el-form-item> |
|||
<el-form-item label="内容:" :label-width="'100px'"> |
|||
<div class="input-width1">{{detailInfo.statement}}</div> |
|||
</el-form-item> |
|||
|
|||
</div> |
|||
<el-form-item label="附件:" :label-width="'100px'"> |
|||
<div class="input-width1" style="display: flex;"> |
|||
<el-image |
|||
v-for="item in detailInfo.annexList" |
|||
:key="item" |
|||
style="width: 100px; height: 100px; margin-right: 10px;" |
|||
:src="item" |
|||
:preview-src-list="detailInfo.annexList"> |
|||
</el-image> |
|||
</div> |
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button @click="handlerCancle">关闭</el-button> |
|||
<!-- <el-button type="primary" @click="handleSubmit">确 定</el-button> --> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from 'vuex' |
|||
export default { |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
dialogFormVisible: false, |
|||
tableLoading: false, |
|||
disabled: false, |
|||
pageLoading: false, |
|||
isBatch: false, |
|||
currentPage: 1, |
|||
pageSize: 20, |
|||
total: null, |
|||
tableData: [], |
|||
searchH: 0, |
|||
addType: 'add', |
|||
optionsG: [], |
|||
zwLists: [ |
|||
{ |
|||
label: '通过', |
|||
value: '2' |
|||
}, |
|||
{ |
|||
label: '驳回', |
|||
value: '1' |
|||
} |
|||
], |
|||
zwList: [ |
|||
{ |
|||
label: '待审核', |
|||
value: '0' |
|||
}, |
|||
{ |
|||
label: '已通过', |
|||
value: '2' |
|||
}, |
|||
{ |
|||
label: '已驳回', |
|||
value: '1' |
|||
} |
|||
], |
|||
selectionList: [], |
|||
tempList: [], |
|||
partyOrgRange: [], |
|||
timeRange: [], |
|||
customerId: '', |
|||
searchForm: { |
|||
// partyOrgId: '', |
|||
mobile: '', |
|||
idCard: '', |
|||
name: '', |
|||
status: '', |
|||
startTime: '', |
|||
endTime: '', |
|||
categoryCode: 'party_building' |
|||
}, |
|||
form: { |
|||
ids: [], |
|||
status: '2', |
|||
remark: '' |
|||
}, |
|||
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') |
|||
this.getTableData() |
|||
this.getGridList('query') |
|||
this.pageLoading = true |
|||
|
|||
}, |
|||
|
|||
mounted() { |
|||
|
|||
this.$nextTick(() => { |
|||
this.searchH = this.$refs.searchCard.$el.offsetHeight |
|||
console.log('tableHeight', this.tableHeight) |
|||
}) |
|||
|
|||
}, |
|||
methods: { |
|||
handleSelection(val) { |
|||
this.selectionList = [...val] |
|||
}, |
|||
handleSizeChange(val) { |
|||
console.log(`每页 ${val} 条`) |
|||
this.pageSize = val |
|||
this.getTableData() |
|||
}, |
|||
handleCurrentChange(val) { |
|||
console.log(`当前页: ${val}`) |
|||
this.currentPage = val |
|||
if (this.selectionList.length > 0 && val !== 1) { |
|||
this.tempList = [...this.tempList, ...this.selectionList] |
|||
} |
|||
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.startTime = val[0] |
|||
this.searchForm.endTime = val[1] |
|||
} else { |
|||
this.searchForm.startTime = '' |
|||
this.searchForm.endTime = '' |
|||
} |
|||
|
|||
}, |
|||
|
|||
handleDelimg(item, index) { |
|||
this.form.imageList.splice(index, 1) |
|||
}, |
|||
handleSearch(val) { |
|||
console.log('searchhh--', val) |
|||
this.currentPage = 1 |
|||
this.getTableData() |
|||
}, |
|||
resetForm(formName) { |
|||
this.timeRange = [] |
|||
this.searchForm.startTime = '' |
|||
this.searchForm.endTime = '' |
|||
this.$refs[formName].resetFields() |
|||
this.handleSearch() |
|||
}, |
|||
handleAdd() { |
|||
if (this.selectionList.length == 0) return this.$message.warning('请选择数据') |
|||
this.dialogFormVisible = true |
|||
}, |
|||
|
|||
handlerCancle() { |
|||
this.detailInfo = {} |
|||
this.selectionList = [] |
|||
this.tempList = [] |
|||
this.disabled = false |
|||
this.form = { |
|||
ids: [], |
|||
status: '2', |
|||
remark: '' |
|||
} |
|||
this.dialogFormVisible = false |
|||
this.dialogVisible = false |
|||
}, |
|||
async handleLook(row) { |
|||
this.disabled = true |
|||
this.isBatch = false |
|||
await this.getDetail(row.id) |
|||
this.dialogFormVisible = true |
|||
}, |
|||
async handleEdit(row, addType) { |
|||
this.form.ids = [row.id] |
|||
this.isBatch = false |
|||
// this.detailInfo = { ...row } |
|||
await this.getDetail(row.id) |
|||
this.dialogFormVisible = 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 handleSubmit() { |
|||
|
|||
if (this.form.ids.length == 0) { |
|||
if (this.tempList.length > 0) this.form.ids = Array.from(new Set(this.tempList.map(item => item.id))) |
|||
else this.form.ids = Array.from(new Set(this.selectionList.map(item => item.id))) |
|||
|
|||
} |
|||
this.$http |
|||
.post('/point/apply/examine/submit', this.form) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
this.$message.success('操作成功') |
|||
this.handlerCancle() |
|||
this.getTableData() |
|||
} |
|||
}) |
|||
.catch((err) => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
async getDetail(id) { |
|||
let params = { |
|||
id, |
|||
} |
|||
this.$http |
|||
.post(`/point/apply/detail/${id}`) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
this.detailInfo = { ...res.data } |
|||
if (this.disabled) { |
|||
this.form.status = res.data.status |
|||
this.form.remark = res.data.remark |
|||
} |
|||
} |
|||
}) |
|||
.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/getSearchTreelist', { 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 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('/point/apply/listall', 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); |
|||
} |
|||
} |
|||
.input-width { |
|||
width: 200px; |
|||
|
|||
} |
|||
.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; |
|||
} |
|||
|
|||
.d-title { |
|||
text-align: center; |
|||
font-size: 18px; |
|||
} |
|||
.d-desc { |
|||
margin: 10px 0; |
|||
// font-size: ; |
|||
text-indent: 2em; |
|||
line-height: 16px; |
|||
} |
|||
.d-tips { |
|||
color: #999; |
|||
margin-top: 10px; |
|||
} |
|||
</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; |
|||
} |
|||
.input-width1 { |
|||
width: 250px; |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue