|
@ -1,9 +1,12 @@ |
|
|
<template> |
|
|
<template> |
|
|
<el-card ref="searchCard" class="resi-card-table"> |
|
|
<el-card ref="searchCard" class="resi-card-table"> |
|
|
<div class="resi-row-btn"> |
|
|
<div class="resi-row-btn"> |
|
|
<el-button class="diy-button--add" |
|
|
<el-button |
|
|
|
|
|
class="diy-button--add" |
|
|
size="small" |
|
|
size="small" |
|
|
@click="addOrUpdateHandle()">新增</el-button> |
|
|
@click="addOrUpdateHandle()" |
|
|
|
|
|
>新增</el-button |
|
|
|
|
|
> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 列表表格 --> |
|
|
<!-- 列表表格 --> |
|
|
<el-table |
|
|
<el-table |
|
@ -12,91 +15,177 @@ |
|
|
:data="tableData" |
|
|
:data="tableData" |
|
|
:default-expand-all="true" |
|
|
:default-expand-all="true" |
|
|
row-key="id" |
|
|
row-key="id" |
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
|
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
|
|
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|
|
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" |
|
|
:height="tableHeight"> |
|
|
:height="tableHeight" |
|
|
<el-table-column prop="partyOrgName" min-width="250" label="党组织名称"></el-table-column> |
|
|
> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="partyOrgName" |
|
|
|
|
|
min-width="250" |
|
|
|
|
|
label="党组织名称" |
|
|
|
|
|
></el-table-column> |
|
|
<el-table-column prop="partyOrgType" min-width="150" label="类别"> |
|
|
<el-table-column prop="partyOrgType" min-width="150" label="类别"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-for="(item, index) in partyOrgTypes" |
|
|
<span |
|
|
|
|
|
v-for="(item, index) in partyOrgTypes" |
|
|
:key="item.value" |
|
|
:key="item.value" |
|
|
:value="item.label" |
|
|
:value="item.label" |
|
|
v-if="scope.row.partyOrgType == item.value"> |
|
|
v-if="scope.row.partyOrgType == item.value" |
|
|
{{ item.label }}</span> |
|
|
> |
|
|
|
|
|
{{ item.label }}</span |
|
|
|
|
|
> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="principal" width="120" label="负责人"></el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column prop="principalMobile" width="150" label="联系方式"></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 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'" |
|
|
<el-button |
|
|
|
|
|
v-if="scope.row.partyOrgType != '6'" |
|
|
@click="principal(scope.row)" |
|
|
@click="principal(scope.row)" |
|
|
type="text" |
|
|
type="text" |
|
|
size="small" |
|
|
size="small" |
|
|
class="div-table-button--detail">{{'负责人'}}</el-button> |
|
|
class="div-table-button--detail" |
|
|
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '6'" |
|
|
>{{ principalBtnName(scope.row) }}</el-button |
|
|
|
|
|
> |
|
|
|
|
|
<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" |
|
|
size="small" |
|
|
size="small" |
|
|
class="div-table-button--detail">{{'查看党员'}}</el-button> |
|
|
class="div-table-button--detail" |
|
|
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '5' && scope.row.partyOrgType != '6'" |
|
|
>{{ "查看党员" }}</el-button |
|
|
@click="addOrUpdateHandle('', scope.row.id, scope.row.orgPids, scope.row.agencyId, scope.row.partyOrgType, scope.row.partyOrgName)" |
|
|
> |
|
|
|
|
|
<el-button |
|
|
|
|
|
v-if=" |
|
|
|
|
|
(scope.row.agencyId == agencyId || |
|
|
|
|
|
scope.row.agencyPids.includes(agencyId)) && |
|
|
|
|
|
scope.row.partyOrgType != '5' && |
|
|
|
|
|
scope.row.partyOrgType != '6' |
|
|
|
|
|
" |
|
|
|
|
|
@click=" |
|
|
|
|
|
addOrUpdateHandle( |
|
|
|
|
|
'', |
|
|
|
|
|
scope.row.id, |
|
|
|
|
|
scope.row.orgPids, |
|
|
|
|
|
scope.row.agencyId, |
|
|
|
|
|
scope.row.partyOrgType, |
|
|
|
|
|
scope.row.partyOrgName |
|
|
|
|
|
) |
|
|
|
|
|
" |
|
|
type="text" |
|
|
type="text" |
|
|
size="small" |
|
|
size="small" |
|
|
class="div-table-button--add">新增下级</el-button> |
|
|
class="div-table-button--add" |
|
|
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '6'" |
|
|
>新增下级</el-button |
|
|
@click="addOrUpdateHandle(scope.row.id, '', '', scope.row.pid, scope.row.partyOrgType, '')" |
|
|
> |
|
|
|
|
|
<el-button |
|
|
|
|
|
v-if=" |
|
|
|
|
|
(scope.row.agencyId == agencyId || |
|
|
|
|
|
scope.row.agencyPids.includes(agencyId)) && |
|
|
|
|
|
scope.row.partyOrgType != '6' |
|
|
|
|
|
" |
|
|
|
|
|
@click=" |
|
|
|
|
|
addOrUpdateHandle( |
|
|
|
|
|
scope.row.id, |
|
|
|
|
|
'', |
|
|
|
|
|
'', |
|
|
|
|
|
scope.row.pid, |
|
|
|
|
|
scope.row.partyOrgType, |
|
|
|
|
|
'' |
|
|
|
|
|
) |
|
|
|
|
|
" |
|
|
type="text" |
|
|
type="text" |
|
|
size="small" |
|
|
size="small" |
|
|
class="div-table-button--edit">修改</el-button> |
|
|
class="div-table-button--edit" |
|
|
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId))&& scope.row.partyOrgType != '6'" |
|
|
>修改</el-button |
|
|
|
|
|
> |
|
|
|
|
|
<el-button |
|
|
|
|
|
v-if=" |
|
|
|
|
|
(scope.row.agencyId == agencyId || |
|
|
|
|
|
scope.row.agencyPids.includes(agencyId)) && |
|
|
|
|
|
scope.row.partyOrgType != '6' |
|
|
|
|
|
" |
|
|
@click="deleteAgency(scope.row.id)" |
|
|
@click="deleteAgency(scope.row.id)" |
|
|
type="text" |
|
|
type="text" |
|
|
size="small" |
|
|
size="small" |
|
|
class="btn-color-del">删除</el-button> |
|
|
class="btn-color-del" |
|
|
|
|
|
>删除</el-button |
|
|
|
|
|
> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getTableData"></add-or-update> |
|
|
<add-or-update |
|
|
|
|
|
v-if="addOrUpdateVisible" |
|
|
|
|
|
ref="addOrUpdate" |
|
|
|
|
|
@refreshDataList="getTableData" |
|
|
|
|
|
></add-or-update> |
|
|
<!-- 查看党员 --> |
|
|
<!-- 查看党员 --> |
|
|
<el-dialog :visible.sync="lookMemberShow" |
|
|
<el-dialog |
|
|
|
|
|
:visible.sync="lookMemberShow" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-press-escape="false" |
|
|
:close-on-press-escape="false" |
|
|
:title="memberTitle" |
|
|
:title="memberTitle" |
|
|
width="1050px" |
|
|
width="1050px" |
|
|
top="5vh" |
|
|
top="5vh" |
|
|
class="dialog-h" |
|
|
class="dialog-h" |
|
|
@closed="lookMemberClose"> |
|
|
@closed="lookMemberClose" |
|
|
<look-Member ref="ref_table_Member" |
|
|
> |
|
|
|
|
|
<look-Member |
|
|
|
|
|
ref="ref_table_Member" |
|
|
@lookMemberCancle="lookMemberCancle" |
|
|
@lookMemberCancle="lookMemberCancle" |
|
|
@lookMemberOk="lookMemberOk"></look-Member> |
|
|
@lookMemberOk="lookMemberOk" |
|
|
|
|
|
></look-Member> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
title="负责人" |
|
|
:title="principalDialogTitle" |
|
|
:visible.sync="principalShow" |
|
|
:visible.sync="principalShow" |
|
|
width="850px" |
|
|
width="850px" |
|
|
top="5vh" |
|
|
top="5vh" |
|
|
class="dialog-h" |
|
|
class="dialog-h" |
|
|
:before-close="handleClose"> |
|
|
:before-close="handleClose" |
|
|
<el-form ref="refPrincipalRules" |
|
|
> |
|
|
|
|
|
<el-form |
|
|
|
|
|
ref="refPrincipalRules" |
|
|
:inline="true" |
|
|
:inline="true" |
|
|
:model="editPrincipalData" |
|
|
:model="editPrincipalData" |
|
|
:rules="principalRules" |
|
|
:rules="principalRules" |
|
|
class="div_form"> |
|
|
class="div_form" |
|
|
<el-form-item label="负责人" |
|
|
> |
|
|
|
|
|
<el-form-item label="姓名" label-width="150px" prop="principal"> |
|
|
|
|
|
<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" |
|
|
label-width="150px" |
|
|
prop="principal"> |
|
|
prop="principalMobile" |
|
|
<el-select v-model="editPrincipalData.principal" |
|
|
> |
|
|
placeholder="请选择" |
|
|
<el-input |
|
|
|
|
|
v-model="editPrincipalData.principalMobile" |
|
|
|
|
|
placeholder="请输入" |
|
|
clearable |
|
|
clearable |
|
|
style="width: 200px" |
|
|
style="width: 200px" |
|
|
class="item_width_4"> |
|
|
class="item_width_4" |
|
|
<el-option v-for="item in staffs" |
|
|
> |
|
|
:key="item.value" |
|
|
</el-input> |
|
|
:label="item.label" |
|
|
|
|
|
:value="item.value"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
@ -121,7 +210,8 @@ |
|
|
principal: '', |
|
|
principal: '', |
|
|
principalMobile: '', |
|
|
principalMobile: '', |
|
|
partyOrgId: '', |
|
|
partyOrgId: '', |
|
|
principalStaffId: '' |
|
|
// principalStaffId: '', |
|
|
|
|
|
principalMobile:'' |
|
|
}, |
|
|
}, |
|
|
searchH: 0, |
|
|
searchH: 0, |
|
|
dataForm: { |
|
|
dataForm: { |
|
@ -165,7 +255,8 @@ |
|
|
agencyId: '', |
|
|
agencyId: '', |
|
|
addOrUpdateVisible: false, |
|
|
addOrUpdateVisible: false, |
|
|
lookMemberShow: false, |
|
|
lookMemberShow: false, |
|
|
memberTitle: '查看党员' |
|
|
memberTitle: '查看党员', |
|
|
|
|
|
principalDialogTitle:'负责人' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
components: { |
|
|
components: { |
|
@ -183,9 +274,15 @@ |
|
|
principalRules() { |
|
|
principalRules() { |
|
|
return { |
|
|
return { |
|
|
principal: [ |
|
|
principal: [ |
|
|
{required: true, message: '负责人不能为空', trigger: 'blur'} |
|
|
{required: true, message: '姓名不能为空', trigger: 'blur'} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
principalBtnName(){ |
|
|
|
|
|
return row =>{ |
|
|
|
|
|
let title = row.partyOrgType=='0'?'省委书记':row.partyOrgType=='1'?'市委书记':row.partyOrgType=='2'?'区委书记':row.partyOrgType=='3'?'党工委书记':row.partyOrgType=='4'?'党委书记':row.partyOrgType=='5'?'支部书记':row.partyOrgType=='6'?'党小组':'负责人' |
|
|
|
|
|
return title |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
@ -209,6 +306,10 @@ |
|
|
}) |
|
|
}) |
|
|
this.editPrincipalData.partyOrgId = row.id |
|
|
this.editPrincipalData.partyOrgId = row.id |
|
|
this.editPrincipalData.principal = row.principal |
|
|
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 }) =>{ |
|
|
this.$http.post('/data/aggregator/org/staff-select-list/'+row.agencyId,{'params': {}}).then(({ data: res }) =>{ |
|
|
if (res.code !== 0) { |
|
|
if (res.code !== 0) { |
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
@ -221,7 +322,7 @@ |
|
|
this.staffs.forEach(s => { |
|
|
this.staffs.forEach(s => { |
|
|
if (this.editPrincipalData.principal === s.value){ |
|
|
if (this.editPrincipalData.principal === s.value){ |
|
|
this.editPrincipalData.principal = s.name |
|
|
this.editPrincipalData.principal = s.name |
|
|
this.editPrincipalData.principalStaffId = s.value |
|
|
// this.editPrincipalData.principalStaffId = s.value |
|
|
this.editPrincipalData.principalMobile = s.mobile |
|
|
this.editPrincipalData.principalMobile = s.mobile |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -249,7 +350,7 @@ |
|
|
principal: '', |
|
|
principal: '', |
|
|
principalMobile: '', |
|
|
principalMobile: '', |
|
|
partyOrgId: '', |
|
|
partyOrgId: '', |
|
|
principalStaffId: '' |
|
|
// principalStaffId: '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 查询列表 |
|
|
// 查询列表 |
|
@ -323,7 +424,7 @@ |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
.resi-container .resi-card-table { |
|
|
.resi-container .resi-card-table { |
|
|
::v-deep .el-table { |
|
|
::v-deep .el-table { |
|
|
th { |
|
|
th { |
|
|
color: #fff; |
|
|
color: #fff; |
|
@ -338,8 +439,8 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.resi-table { |
|
|
.resi-table { |
|
|
::v-deep .el-button--text { |
|
|
::v-deep .el-button--text { |
|
|
text-decoration: underline; |
|
|
text-decoration: underline; |
|
|
} |
|
|
} |
|
@ -350,10 +451,10 @@ |
|
|
::v-deep .btn-color-edit { |
|
|
::v-deep .btn-color-edit { |
|
|
color: rgba(0, 167, 169, 1); |
|
|
color: rgba(0, 167, 169, 1); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
.resi-row-btn { |
|
|
.resi-row-btn { |
|
|
display: flex; |
|
|
display: flex; |
|
|
margin-bottom: 13px; |
|
|
margin-bottom: 13px; |
|
|
::v-deep .el-button { |
|
|
::v-deep .el-button { |
|
@ -366,8 +467,8 @@ |
|
|
.el-button--success { |
|
|
.el-button--success { |
|
|
background: rgba(34, 193, 195, 1); |
|
|
background: rgba(34, 193, 195, 1); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.avatar-uploader { |
|
|
.avatar-uploader { |
|
|
::v-deep .el-upload { |
|
|
::v-deep .el-upload { |
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
position: relative; |
|
|
position: relative; |
|
@ -391,10 +492,10 @@ |
|
|
line-height: 70px; |
|
|
line-height: 70px; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.resi-btns { |
|
|
.resi-btns { |
|
|
margin-top: 20px; |
|
|
margin-top: 20px; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|