Browse Source

联系人

feature
zxc 3 years ago
parent
commit
6715bb7876
  1. 121
      src/views/modules/partymember/icpartyorgtree.vue

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

@ -17,8 +17,24 @@
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" :header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
:height="tableHeight"> :height="tableHeight">
<el-table-column prop="partyOrgName" label="党组织名称"></el-table-column> <el-table-column prop="partyOrgName" label="党组织名称"></el-table-column>
<el-table-column prop="partyOrgType" label="类别">
<template slot-scope="scope">
<span v-for="(item, index) in partyOrgTypes"
:key="item.value"
:value="item.label"
v-if="scope.row.partyOrgType == item.value">
{{ item.label }}</span>
</template>
</el-table-column>
<el-table-column prop="principal" label="负责人"></el-table-column>
<el-table-column prop="principalMobile" 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">
<el-button v-if="scope.row.partyOrgType != '6'"
@click="principal(scope.row)"
type="text"
size="small"
class="div-table-button--detail">{{'负责人'}}</el-button>
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '6'" <el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '6'"
@click="handleLook(scope.row.agencyPids, scope.row.id, scope.row)" @click="handleLook(scope.row.agencyPids, scope.row.id, scope.row)"
type="text" type="text"
@ -56,6 +72,37 @@
@lookMemberCancle="lookMemberCancle" @lookMemberCancle="lookMemberCancle"
@lookMemberOk="lookMemberOk"></look-Member> @lookMemberOk="lookMemberOk"></look-Member>
</el-dialog> </el-dialog>
<el-dialog
title="负责人"
:visible.sync="principalShow"
width="850px"
top="5vh"
class="dialog-h"
:before-close="handleClose">
<el-form ref="ref_form"
:inline="true"
:model="editPrincipalData"
class="div_form">
<el-form-item label="负责人"
label-width="150px"
prop="principal">
<el-select v-model="editPrincipalData.principal"
placeholder="请选择"
clearable
class="item_width_1">
<el-option v-for="item in staffs"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="principalShow = false"> </el-button>
<el-button type="primary" @click="editPrincipal"> </el-button>
</span>
</el-dialog>
</el-card> </el-card>
</template> </template>
@ -67,6 +114,13 @@
export default { export default {
data () { data () {
return { return {
principalShow: false,
staffs: [],
editPrincipalData: {
principal: '',
principalMobile: '',
partyOrgId: ''
},
searchH: 0, searchH: 0,
dataForm: { dataForm: {
id: '', id: '',
@ -76,6 +130,36 @@
}, },
tableLoading: false, tableLoading: false,
tableData: [], tableData: [],
partyOrgTypes: [
{
value: '0',
label: '省委'
},
{
value: '1',
label: '市委'
},
{
value: '2',
label: '区委'
},
{
value: '3',
label: '党工委'
},
{
value: '4',
label: '党委'
},
{
value: '5',
label: '支部'
},
{
value: '6',
label: '党小组'
}
],
agencyId: '', agencyId: '',
addOrUpdateVisible: false, addOrUpdateVisible: false,
lookMemberShow: false, lookMemberShow: false,
@ -93,6 +177,13 @@
const h = this.clientHeight - this.searchH - 230 + this.iframeHeigh const h = this.clientHeight - this.searchH - 230 + this.iframeHeigh
const _h = this.clientHeight - 230 - this.searchH const _h = this.clientHeight - 230 - this.searchH
return this.$store.state.inIframe ? h : _h return this.$store.state.inIframe ? h : _h
},
principalRules() {
return {
principal: [
{required: true, message: '负责人不能为空', trigger: 'change'},
]
}
} }
}, },
mounted() { mounted() {
@ -109,6 +200,36 @@
// this.pageLoading = true // this.pageLoading = true
}, },
methods:{ methods:{
principal(row) {
this.principalShow = true
this.editPrincipalData.partyOrgId = row.id
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
console.log(this.staffs)
}
}).catch(() => {})
},
editPrincipal(row) {
this.staffs.forEach(s => {
if (this.editPrincipalData.principal === s.value){
this.editPrincipalData.principal = s.name
this.editPrincipalData.principalMobile = s.mobile
}
})
this.$http.post('/resi/partymember/icPartyOrg/editPrincipal',this.editPrincipalData).then(({ data: res }) =>{
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
}).catch(() => {})
this.principalShow = false
this.getTableData()
},
handleClose() {
this.principalShow = false
},
// //
async getTableData () { async getTableData () {
this.tableLoading = true this.tableLoading = true

Loading…
Cancel
Save