Browse Source

Revert "党员中心"

This reverts commit e777303b1f.
chanpin_shequ_jiagou
tianqian 2 years ago
parent
commit
5d02f5d22a
  1. 204
      src/views/modules/partymember/group.vue
  2. 67
      src/views/modules/partymember/icpartyorgtree.vue

204
src/views/modules/partymember/group.vue

@ -1,204 +0,0 @@
<template>
<div>
<el-table :data="tableData" row-key="id" v-loading="tableLoading" border
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" style="width: 100%" class="resi-table">
<el-table-column label="序号" type="index" align="center" width="50">
</el-table-column>
<el-table-column prop="name" label="党员中心户" align="center" width="100">
<template slot-scope="scope">
<el-select v-model="scope.row.partyResiId" placeholder="请选择">
<el-option v-for="item in optionsParty" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="mobile" label="联系家庭" align="center" min-width="160">
<template slot-scope="scope">
<el-select v-model="scope.row.houseIds" multiple placeholder="请选择">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="edit(scope.row)" v-if="scope.row.id" type="text" size="small"
class="btn-color-look">修改</el-button>
<el-button @click="del(scope.row)" v-if="scope.row.id" type="text" size="small"
class="btn-color-look">删除</el-button>
<el-button @click="save(scope.row)" v-if="!scope.row.id" type="text" size="small"
class="btn-color-look">保存</el-button>
<el-button @click="cancel(scope.row)" v-if="!scope.row.id" type="text" size="small"
class="btn-color-look">取消</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import axios from 'axios'
import {
mapGetters
} from 'vuex'
export default {
data() {
return {
tableLoading: false,
tableData: [],
addData: {
id: "",
partyResiId: "",
houseIds: []
},
options: [],
optionsParty: [],
searchH: 0,
agencyId: "",
partyOrgId: "",
groupmemberShow: false,
}
},
props: {},
computed: {
// ...mapGetters(['clientHeight', 'iframeHeight']),
// tableHeight() {
// const h = this.clientHeight - this.searchH - 490 + this.iframeHeigh
// const _h = this.clientHeight - 490 - this.searchH
// return this.$store.state.inIframe ? h : _h
// }
},
components: {},
methods: {
initForm(agencyId, id) {
this.agencyId = agencyId,
this.partyOrgId = id;
// this.tableLoading = true
this.getTableData();
this.getOption()
this.getOptionParty()
// this.getGridList('query')
},
//
async getTableData() {
this.tableLoading = true
let params = {
icPartyOrgId: this.partyOrgId
}
await this.$http.get('/resi/partymember/icPartyMemberCenter/selectList', {
params: params
}).then(({
data: res
}) => {
console.log(res)
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg :
'查询失败')
} else {
this.tableData = res.data.map(item => ({
id: item.id,
partyResiId: item.partyResiId,
houseIds: item.houseIds.split(",")
}))
this.tableData.push({
id: "",
partyResiId: "",
houseIds: []
})
}
}).catch(() => {})
this.tableLoading = false
},
getOptionParty() {
let query = {
agencyId: this.agencyId
}
this.$http.post('/epmetuser/icresiuser/userListByAgency', query).then(({
data: res
}) => {
this.optionsParty = res.data
}).catch(() => {})
},
getOption() {
let query = {
agencyId: this.agencyId
}
this.$http.post('/gov/org/ichouse/getPartyHouseList', query).then(({
data: res
}) => {
this.options = res.data
}).catch(() => {})
},
selectUser(partyResiId) {
this.groupmemberShow = true;
this.$nextTick(() => {
this.$refs.ref_groupmember.initForm(this.agencyId, this.partyOrgId, partyResiId)
})
},
groupmemberCancle() {
this.groupmemberShow = false;
},
choose(query) {
this.tableData.push({
name: query.name,
partyResiId: query.value
})
},
save(row) {
let arr = [...this.tableData];
arr.splice(arr.length - 1, 1);
if (JSON.stringify(arr).indexOf(row.partyResiId) > -1) {
return this.$message.error("这条数据已经存在")
} else {
let houseIds = row.houseIds.join(",")
let query = {
icPartyOrgId: this.partyOrgId,
partyResiId: row.partyResiId,
houseIds: houseIds
}
this.$http.post('/resi/partymember/icPartyMemberCenter/save', query).then(({
data: res
}) => {
this.getTableData()
}).catch(() => {})
}
},
edit(row) {
console.log(row)
let houseIds = row.houseIds.join(",")
let query = {
id: row.id,
icPartyOrgId: this.partyOrgId,
partyResiId: row.partyResiId,
houseIds: houseIds
}
this.$http.post('/resi/partymember/icPartyMemberCenter/update', query).then(({
data: res
}) => {
this.getTableData()
}).catch(() => {})
},
del(row) {
let query = [row.id]
this.$http.post('/resi/partymember/icPartyMemberCenter/delete', query).then(({
data: res
}) => {
this.getTableData()
}).catch(() => {})
},
cancel(row) {
this.getTableData()
}
},
}
</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>

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

@ -16,6 +16,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="principal" width="120" label="负责人"></el-table-column> <el-table-column prop="principal" width="120" label="负责人"></el-table-column>
<el-table-column prop="principalMobile" width="150" label="联系方式"></el-table-column> <el-table-column prop="principalMobile" width="150" label="联系方式"></el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
@ -24,7 +26,7 @@
<el-button @click="principal(scope.row.agencyId, scope.row.id, scope.row)" type="text" size="small" <el-button @click="principal(scope.row.agencyId, scope.row.id, scope.row)" type="text" size="small"
class="div-table-button--detail">{{ principalBtnName(scope.row) }}</el-button> class="div-table-button--detail">{{ principalBtnName(scope.row) }}</el-button>
<el-button v-if="scope.row.partyOrgType == '6'" <el-button v-if="scope.row.partyOrgType == '6'"
@click="group(scope.row.agencyId, scope.row.id)" type="text" size="small" @click="handleLook(scope.row.agencyPids, scope.row.id, scope.row)" type="text" size="small"
class="div-table-button--detail">党员中心户</el-button> class="div-table-button--detail">党员中心户</el-button>
<el-button v-if=" <el-button v-if="
(scope.row.agencyId == agencyId || (scope.row.agencyId == agencyId ||
@ -76,10 +78,23 @@
<el-dialog :title="principalDialogTitle" :visible.sync="principalShow" width="850px" top="5vh" class="dialog-h" <el-dialog :title="principalDialogTitle" :visible.sync="principalShow" width="850px" top="5vh" class="dialog-h"
:before-close="handleClose"> :before-close="handleClose">
<leader ref="ref_leader" @leaderCancle="leaderCancle" @getTableData="getTableData"></leader> <leader ref="ref_leader" @leaderCancle="leaderCancle" @getTableData="getTableData"></leader>
</el-dialog> <!-- <el-form ref="refPrincipalRules" :inline="true" :model="editPrincipalData" :rules="principalRules"
<el-dialog title="党员中心户" :visible.sync="groupShow" width="850px" top="5vh" class="div_form">
:before-close="groupClose"> <el-form-item label="姓名" label-width="150px" prop="principal">
<group ref="ref_group" @groupCancle="groupCancle" @getTableData="getTableData"></group> <el-input v-model="editPrincipalData.principal" placeholder="请输入" clearable style="width: 200px"
class="item_width_4">
</el-input>
</el-form-item>
<el-form-item label="联系电话" label-width="150px" prop="principalMobile">
<el-input v-model="editPrincipalData.principalMobile" placeholder="请输入" clearable
style="width: 200px" class="item_width_4">
</el-input>
</el-form-item>
</el-form> -->
<!-- <span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="editPrincipal"> </el-button>
</span> -->
</el-dialog> </el-dialog>
</el-card> </el-card>
</template> </template>
@ -88,7 +103,6 @@
import TableTreeColumn from '@/components/table-tree-column' import TableTreeColumn from '@/components/table-tree-column'
import lookMember from './lookMember' import lookMember from './lookMember'
import leader from './leader' import leader from './leader'
import group from './group'
import { import {
mapGetters mapGetters
} from 'vuex' } from 'vuex'
@ -139,16 +153,14 @@
addOrUpdateVisible: false, addOrUpdateVisible: false,
lookMemberShow: false, lookMemberShow: false,
memberTitle: '查看党员', memberTitle: '查看党员',
principalDialogTitle: '负责人', principalDialogTitle: '负责人'
groupShow: false,
} }
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,
TableTreeColumn, TableTreeColumn,
lookMember, lookMember,
leader, leader
group
}, },
computed: { computed: {
...mapGetters(['clientHeight', 'iframeHeight']), ...mapGetters(['clientHeight', 'iframeHeight']),
@ -189,35 +201,6 @@
// this.pageLoading = true // this.pageLoading = true
}, },
methods: { methods: {
group(agencyId, id) {
console.log(agencyId, id)
this.groupShow = true
this.$nextTick(() => {
this.$refs.ref_group.initForm(agencyId, id)
})
// this.$nextTick(() => {
// this.$refs['refPrincipalRules'].resetFields();
// })
// this.editPrincipalData.partyOrgId = row.id
// this.editPrincipalData.principal = row.principal
// this.editPrincipalData.principalMobile = row.principalMobile
// let title = row.partyOrgType == '0' ? '' : row.partyOrgType == '1' ? '' : row.partyOrgType == '2' ?
// '' : row.partyOrgType == '3' ? '' : row.partyOrgType == '4' ? '' : row.partyOrgType ==
// '5' ? '' : row.partyOrgType == '6' ? '' : ''
// this.principalDialogTitle = title
// console.log(row);
// this.$http.post('/data/aggregator/org/staff-select-list/' + row.agencyId, {
// 'params': {}
// }).then(({
// data: res
// }) => {
// if (res.code !== 0) {
// return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '')
// } else {
// this.staffs = res.data
// }
// }).catch(() => {})
},
principal(agencyId, id, row) { principal(agencyId, id, row) {
console.log(agencyId,id) console.log(agencyId,id)
this.principalShow = true this.principalShow = true
@ -277,9 +260,6 @@
this.principalShow = false this.principalShow = false
this.resetEditPrincipalData() this.resetEditPrincipalData()
}, },
groupClose() {
this.groupShow = false
},
resetEditPrincipalData() { resetEditPrincipalData() {
this.editPrincipalData = { this.editPrincipalData = {
principal: '', principal: '',
@ -370,9 +350,6 @@
}, },
leaderCancle() { leaderCancle() {
this.principalShow = false this.principalShow = false
},
groupCancle() {
this.groupShow = false
} }
} }
} }

Loading…
Cancel
Save