Browse Source

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

chanpin_shequ_jiagou
wxz 2 years ago
parent
commit
a19febf190
  1. 892
      src/views/modules/base/collect.vue
  2. 33
      src/views/modules/base/organization/organization.vue
  3. 445
      src/views/modules/partymember/icpartyorgtree.vue

892
src/views/modules/base/collect.vue

File diff suppressed because it is too large

33
src/views/modules/base/organization/organization.vue

@ -869,10 +869,12 @@
<script> <script>
import { requestPost, requestGet } from "@/js/dai/request"; import { requestPost, requestGet } from "@/js/dai/request";
import daiMap from "@/utils/dai-map"; import daiMap from "@/utils/dai-map";
import nextTick from "dai-js/tools/nextTick";
export default { export default {
data () { data () {
return { return {
gridLat:'',
gridLng:'',
// //
createAgencyDialogFlag: false, createAgencyDialogFlag: false,
// //
@ -1159,6 +1161,7 @@ export default {
}, },
modifyGridPop (val) { modifyGridPop (val) {
if (val) { if (val) {
console.log('1');
setTimeout(() => { setTimeout(() => {
this.createMap(); this.createMap();
}, 1000); }, 1000);
@ -1636,8 +1639,8 @@ export default {
(this.modifyGridFrom.gridTypeName = ""), (this.modifyGridFrom.gridTypeName = ""),
(this.modifyGridFrom.contacts = ""), (this.modifyGridFrom.contacts = ""),
(this.modifyGridFrom.mobile = ""), (this.modifyGridFrom.mobile = ""),
(this.latitude = ""), (this.gridLat = ""),
(this.longitude = ""), (this.gridLng = ""),
(this.modifyGridFrom.agencyId = ""), (this.modifyGridFrom.agencyId = ""),
(this.modifyGridFrom.gridType = ""), (this.modifyGridFrom.gridType = ""),
(this.modifyGridFrom.manageDistrict = ""), (this.modifyGridFrom.manageDistrict = ""),
@ -2388,7 +2391,6 @@ export default {
// id // id
async getOrgDetailsById () { async getOrgDetailsById () {
const url = "/gov/org/agency/agencydetail"; const url = "/gov/org/agency/agencydetail";
let params = { let params = {
agencyId: this.judgeOrgInfoLevel.id, agencyId: this.judgeOrgInfoLevel.id,
}; };
@ -2451,7 +2453,6 @@ export default {
}; };
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.modifyGridFrom.gridName = data.gridName; this.modifyGridFrom.gridName = data.gridName;
this.modifyGridFrom.code = data.code; this.modifyGridFrom.code = data.code;
@ -2463,6 +2464,8 @@ export default {
this.modifyGridFrom.manageDistrict = data.manageDistrict; this.modifyGridFrom.manageDistrict = data.manageDistrict;
this.modifyGridFrom.griId = data.grid; this.modifyGridFrom.griId = data.grid;
this.modifyGridFrom.gridSort = data.gridSort; this.modifyGridFrom.gridSort = data.gridSort;
this.latitude = data.latitude,
this.longitude =data.longitude
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -2491,7 +2494,7 @@ export default {
this.getAgencyList(); this.getAgencyList();
this.getDepartmentList(); this.getDepartmentList();
this.getGridList(); this.getGridList();
this.agencyPeo(); // this.agencyPeo();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -2516,7 +2519,7 @@ export default {
this.getAgencyList(); this.getAgencyList();
this.getDepartmentList(); this.getDepartmentList();
this.getGridList(); this.getGridList();
this.agencyPeo(); // this.agencyPeo();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -2524,7 +2527,6 @@ export default {
// //
async submitModifyGrid () { async submitModifyGrid () {
const url = "/gov/org/grid/editgrid"; const url = "/gov/org/grid/editgrid";
let params = { let params = {
gridId: this.modifyGridFrom.griId, gridId: this.modifyGridFrom.griId,
gridName: this.modifyGridFrom.gridName, gridName: this.modifyGridFrom.gridName,
@ -2534,8 +2536,10 @@ export default {
code: this.modifyGridFrom.code, code: this.modifyGridFrom.code,
gridType: this.modifyGridFrom.gridType, gridType: this.modifyGridFrom.gridType,
sort: this.modifyGridFrom.gridSort, sort: this.modifyGridFrom.gridSort,
longitude:this.gridLng,
latitude:this.gridLat
}; };
console.log(params);
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
@ -2544,7 +2548,7 @@ export default {
this.getAgencyList(); this.getAgencyList();
this.getDepartmentList(); this.getDepartmentList();
this.getGridList(); this.getGridList();
this.agencyPeo(); // this.agencyPeo();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -2602,9 +2606,8 @@ export default {
handleMoveCenter(e); handleMoveCenter(e);
}); });
// map.setCenter(latitude, longitude); map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude); map.setMarker(latitude, longitude);
// setMarker(latitude, longitude); // setMarker(latitude, longitude);
// function setMarker(lat, lng) { // function setMarker(lat, lng) {
@ -2622,14 +2625,16 @@ export default {
// }, // },
// ]); // ]);
// } // }
let than = this
function handleMoveCenter (e) { function handleMoveCenter (e) {
console.log('看看能触发你吗?');
// //
const { lat, lng } = map.getCenter(); const { lat, lng } = map.getCenter();
// const lat = lat; // const lat = lat;
// const lng = lng; // const lng = lng;
map.setMarker(lat, lng); map.setMarker(lat, lng);
than.gridLat=lat
than.gridLng=lng
// let { msg, data } = await map.getAddress(lat, lng); // let { msg, data } = await map.getAddress(lat, lng);
// if (msg == "success") { // if (msg == "success") {
// this.formData.address = data.address // this.formData.address = data.address

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

@ -1,109 +1,198 @@
<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
size="small" class="diy-button--add"
@click="addOrUpdateHandle()">新增</el-button> size="small"
</div> @click="addOrUpdateHandle()"
<!-- 列表表格 --> >新增</el-button
<el-table >
class="resi-table" </div>
v-loading="tableLoading" <!-- 列表表格 -->
:data="tableData" <el-table
:default-expand-all="true" class="resi-table"
row-key="id" v-loading="tableLoading"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :data="tableData"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" :default-expand-all="true"
:height="tableHeight"> row-key="id"
<el-table-column prop="partyOrgName" min-width="250" label="党组织名称"></el-table-column> :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
<el-table-column prop="partyOrgType" min-width="150" label="类别"> :header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
<template slot-scope="scope"> :height="tableHeight"
<span v-for="(item, index) in partyOrgTypes" >
:key="item.value" <el-table-column
:value="item.label" prop="partyOrgName"
v-if="scope.row.partyOrgType == item.value"> min-width="250"
{{ item.label }}</span> label="党组织名称"
</template> ></el-table-column>
</el-table-column> <el-table-column prop="partyOrgType" min-width="150" label="类别">
<el-table-column prop="principal" width="120" label="负责人"></el-table-column> <template slot-scope="scope">
<el-table-column prop="principalMobile" width="150" label="联系方式"></el-table-column> <span
<el-table-column label="操作" align="center" width="300"> v-for="(item, index) in partyOrgTypes"
<template slot-scope="scope"> :key="item.value"
<el-button v-if="scope.row.partyOrgType != '6'" :value="item.label"
@click="principal(scope.row)" v-if="scope.row.partyOrgType == item.value"
type="text" >
size="small" {{ item.label }}</span
class="div-table-button--detail">{{'负责人'}}</el-button> >
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '6'" </template>
@click="handleLook(scope.row.agencyPids, scope.row.id, scope.row)" </el-table-column>
type="text" <el-table-column
size="small" prop="principal"
class="div-table-button--detail">{{'查看党员'}}</el-button> width="120"
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '5' && scope.row.partyOrgType != '6'" label="负责人"
@click="addOrUpdateHandle('', scope.row.id, scope.row.orgPids, scope.row.agencyId, scope.row.partyOrgType, scope.row.partyOrgName)" ></el-table-column>
type="text" <el-table-column
size="small" prop="principalMobile"
class="div-table-button--add">新增下级</el-button> width="150"
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '6'" label="联系方式"
@click="addOrUpdateHandle(scope.row.id, '', '', scope.row.pid, scope.row.partyOrgType, '')" ></el-table-column>
type="text" <el-table-column label="操作" align="center" width="300">
size="small" <template slot-scope="scope">
class="div-table-button--edit">修改</el-button> <el-button
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId))&& scope.row.partyOrgType != '6'" v-if="scope.row.partyOrgType != '6'"
@click="deleteAgency(scope.row.id)" @click="principal(scope.row)"
type="text" type="text"
size="small" size="small"
class="btn-color-del">删除</el-button> class="div-table-button--detail"
</template> >{{ principalBtnName(scope.row) }}</el-button
</el-table-column> >
</el-table> <el-button
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getTableData"></add-or-update> v-if="
<!-- 查看党员 --> (scope.row.agencyId == agencyId ||
<el-dialog :visible.sync="lookMemberShow" scope.row.agencyPids.includes(agencyId)) &&
:close-on-click-modal="false" scope.row.partyOrgType != '6'
:close-on-press-escape="false" "
:title="memberTitle" @click="handleLook(scope.row.agencyPids, scope.row.id, scope.row)"
width="1050px" type="text"
top="5vh" size="small"
class="dialog-h" class="div-table-button--detail"
@closed="lookMemberClose"> >{{ "查看党员" }}</el-button
<look-Member ref="ref_table_Member" >
@lookMemberCancle="lookMemberCancle" <el-button
@lookMemberOk="lookMemberOk"></look-Member> v-if="
</el-dialog> (scope.row.agencyId == agencyId ||
<el-dialog scope.row.agencyPids.includes(agencyId)) &&
title="负责人" scope.row.partyOrgType != '5' &&
:visible.sync="principalShow" scope.row.partyOrgType != '6'
width="850px" "
top="5vh" @click="
class="dialog-h" addOrUpdateHandle(
:before-close="handleClose"> '',
<el-form ref="refPrincipalRules" scope.row.id,
:inline="true" scope.row.orgPids,
:model="editPrincipalData" scope.row.agencyId,
:rules="principalRules" scope.row.partyOrgType,
class="div_form"> scope.row.partyOrgName
<el-form-item label="负责人" )
label-width="150px" "
prop="principal"> type="text"
<el-select v-model="editPrincipalData.principal" size="small"
placeholder="请选择" class="div-table-button--add"
clearable >新增下级</el-button
style="width: 200px" >
class="item_width_4"> <el-button
<el-option v-for="item in staffs" v-if="
:key="item.value" (scope.row.agencyId == agencyId ||
:label="item.label" scope.row.agencyPids.includes(agencyId)) &&
:value="item.value"> scope.row.partyOrgType != '6'
</el-option> "
</el-select> @click="
</el-form-item> addOrUpdateHandle(
</el-form> scope.row.id,
<span slot="footer" class="dialog-footer"> '',
<el-button @click="handleClose"> </el-button> '',
<el-button type="primary" @click="editPrincipal"> </el-button> scope.row.pid,
</span> scope.row.partyOrgType,
</el-dialog> ''
)
"
type="text"
size="small"
class="div-table-button--edit"
>修改</el-button
>
<el-button
v-if="
(scope.row.agencyId == agencyId ||
scope.row.agencyPids.includes(agencyId)) &&
scope.row.partyOrgType != '6'
"
@click="deleteAgency(scope.row.id)"
type="text"
size="small"
class="btn-color-del"
>删除</el-button
>
</template>
</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="1050px"
top="5vh"
class="dialog-h"
@closed="lookMemberClose"
>
<look-Member
ref="ref_table_Member"
@lookMemberCancle="lookMemberCancle"
@lookMemberOk="lookMemberOk"
></look-Member>
</el-dialog>
<el-dialog
:title="principalDialogTitle"
:visible.sync="principalShow"
width="850px"
top="5vh"
class="dialog-h"
:before-close="handleClose"
>
<el-form
ref="refPrincipalRules"
:inline="true"
:model="editPrincipalData"
:rules="principalRules"
class="div_form"
>
<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"
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-card> </el-card>
</template> </template>
@ -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,78 +424,78 @@
} }
</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;
background-color: rgba(33, 149, 254, 1); background-color: rgba(33, 149, 254, 1);
} }
.cell { .cell {
span:nth-of-type(3) { span:nth-of-type(3) {
display: inline-block; display: inline-block;
width: 90%; width: 90%;
word-break: break-all; word-break: break-all;
}
} }
} }
} }
.resi-table { }
::v-deep .el-button--text { .resi-table {
text-decoration: underline; ::v-deep .el-button--text {
} text-decoration: underline;
::v-deep .btn-color-del { }
margin-left: 10px; ::v-deep .btn-color-del {
color: rgba(213, 16, 16, 1); margin-left: 10px;
} color: rgba(213, 16, 16, 1);
::v-deep .btn-color-edit { }
color: rgba(0, 167, 169, 1); ::v-deep .btn-color-edit {
} 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 {
// margin-left: 10px; // margin-left: 10px;
border: 0; border: 0;
}
::v-deep .el-select {
margin-right: 10px;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
} }
.avatar-uploader { ::v-deep .el-select {
::v-deep .el-upload { margin-right: 10px;
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;
}
} }
.el-button--success {
.resi-btns { background: rgba(34, 193, 195, 1);
margin-top: 20px; }
}
.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; text-align: center;
} }
}
.resi-btns {
margin-top: 20px;
text-align: center;
}
</style> </style>

Loading…
Cancel
Save