Browse Source

Merge branch 'feature/dev_party_mange' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into feature/dev_party_mange

shibei_master
13176889840 3 years ago
parent
commit
b25bfa2120
  1. 227
      src/views/modules/partymember/icpartymemberpoint.vue
  2. 7
      src/views/modules/partymember/icpartyorg-add-or-update.vue
  3. 173
      src/views/modules/partymember/icpartyorgtree.vue
  4. 97
      src/views/modules/partymember/lookMember.vue

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

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

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

@ -162,7 +162,12 @@
if (this.dataForm.id) {
this.getInfo()
} else {
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(',')
if(this.dataForm.orgPids) {
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(',')
} else {
this.dataForm.mySelectOrg = ''
}
this.orgListTreeSetDefaultHandle()
}
})

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

@ -12,13 +12,14 @@
:data="tableData"
:default-expand-all="true"
row-key="id"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}">
<el-table-column prop="partyOrgName" label="党组织名称"></el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button v-if="scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)"
@click="handleLook(scope.row)"
@click="handleLook(scope.row.orgPids)"
type="text"
size="small"
class="div-table-button--detail">{{'查看党员'}}</el-button>
@ -41,91 +42,119 @@
</el-table-column>
</el-table>
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getTableData"></add-or-update>
<!-- 查看党员 -->
<el-dialog :visible.sync="lookMemberShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="memberTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="lookMemberClose">
<look-Member ref="ref_table_Member"
@lookMemberCancle="lookMemberCancle"
@lookMemberOk="lookMemberOk"></look-Member>
</el-dialog>
</el-card>
</template>
<script>
import AddOrUpdate from './icpartyorg-add-or-update'
import TableTreeColumn from '@/components/table-tree-column'
import lookMember from './lookMember'
export default {
data () {
return {
dataForm: {
id: '',
customerId: '',
orgPids: ''
},
tableLoading: false,
tableData: [],
agencyId: '',
addOrUpdateVisible: false
}
},
components: {
AddOrUpdate,
TableTreeColumn
},
async created () {
this.agencyId = localStorage.getItem('agencyId')
this.dataForm.customerId = localStorage.getItem('customerId')
this.getTableData()
// this.pageLoading = true
},
methods:{
//
async getTableData () {
this.tableLoading = true
let params = {
customerId: localStorage.getItem('customerId')
data () {
return {
dataForm: {
id: '',
customerId: '',
orgPids: ''
},
tableLoading: false,
tableData: [],
agencyId: '',
addOrUpdateVisible: false,
lookMemberShow: false,
memberTitle: '查看党员'
}
await this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: this.dataForm}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.tableData = res.data
}
}).catch(() => {})
this.tableLoading = false
},
// /
addOrUpdateHandle (id, orgPids) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id
//
this.$refs.addOrUpdate.dataForm.orgPids = orgPids //
this.$refs.addOrUpdate.init()
})
components: {
AddOrUpdate,
TableTreeColumn,
lookMember
},
//
deleteAgency (id) {
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('delete') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.delete('/resi/partymember/icPartyOrg/delete', {'data': [id]}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
async created () {
this.agencyId = localStorage.getItem('agencyId')
this.dataForm.customerId = localStorage.getItem('customerId')
this.getTableData()
// this.pageLoading = true
},
methods:{
//
async getTableData () {
this.tableLoading = true
let params = {
customerId: localStorage.getItem('customerId')
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.getTableData()
await this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: this.dataForm}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.tableData = res.data
}
}).catch(() => {})
this.tableLoading = false
},
// /
addOrUpdateHandle (id, orgPids) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id
//
this.$refs.addOrUpdate.dataForm.orgPids = orgPids //
this.$refs.addOrUpdate.init()
})
}).catch(() => {})
}).catch(() => {})
},
//
handleLook(row) {
console.log('这里是查看党员', row)
},
//
deleteAgency (id) {
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('delete') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.delete('/resi/partymember/icPartyOrg/delete', {'data': [id]}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.getTableData()
}
})
}).catch(() => {})
}).catch(() => {})
},
//
handleLook(orgPids) {
this.lookMemberShow = true
this.$nextTick(() => {
this.$refs.ref_table_Member.initForm(orgPids)
})
},
lookMemberClose () {
this.lookMemberShow = false
},
lookMemberCancle () {
this.lookMemberShow = false
},
lookMemberOk () {
this.lookMemberShow = false
}
}
}
}
</script>
<style lang="scss" scoped>

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

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