|
|
@ -55,20 +55,26 @@ |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column prop="agencyName" label="组织名字" width="260"></el-table-column> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot="header" slot-scope="scope"> |
|
|
|
<el-button size="mini" |
|
|
|
type="primary" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="addCommunity(scope.row)" |
|
|
|
@click="addAgency(scope.row)" |
|
|
|
>新增</el-button> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button |
|
|
|
<el-button v-show="agenButton" |
|
|
|
size="mini" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="entryAgency(scope.row)" |
|
|
|
>进入</el-button> |
|
|
|
<el-button v-show="agenButtonTwo" |
|
|
|
size="mini" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="entryAgencyTwo(scope.row)" |
|
|
|
>进入</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -333,58 +339,59 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 新增人员 --> |
|
|
|
<el-dialog |
|
|
|
title="新增人员" |
|
|
|
:visible.sync="dialogVisiblePeo" |
|
|
|
width="30%" |
|
|
|
:before-close="handleClose"> |
|
|
|
<el-form> |
|
|
|
<el-form-item label="姓名" prop="peoName"> |
|
|
|
<el-input v-model="peoForm.name" placeholder="请输入姓名"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="手机号" prop="mobile"> |
|
|
|
<el-input v-model="peoForm.mobile" placeholder="请输入手机号"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<!-- 性别下拉框 --> |
|
|
|
<el-form-item label="性别" prop="gender"> |
|
|
|
<el-select v-model="peoForm.gender" clearable placeholder="性别"> |
|
|
|
<el-option v-for="item in genderList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<!-- 专兼职下拉框 --> |
|
|
|
<el-form-item label="专兼职" prop="post"> |
|
|
|
<el-select v-model="peoForm.post" clearable placeholder="专兼职"> |
|
|
|
<el-option v-for="item in postList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<!-- 职责下拉框 --> |
|
|
|
<el-form-item label="职责" prop="duty"> |
|
|
|
<el-select v-model="peoForm.duty" multiple placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in dutyList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
:disabled="item.disabled"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
<div slot="footer" > |
|
|
|
<el-button @click="cancelPeo">取 消</el-button> |
|
|
|
<el-button type="primary" @click="submitPeo">确 定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<div v-if="dialogVisiblePeo"> |
|
|
|
<el-dialog |
|
|
|
title="新增人员" |
|
|
|
:visible.sync="dialogVisiblePeo" |
|
|
|
width="30%" |
|
|
|
:before-close="handleClose"> |
|
|
|
<el-form> |
|
|
|
<el-form-item label="姓名" prop="peoName"> |
|
|
|
<el-input v-model="peoForm.name" placeholder="请输入姓名"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="手机号" prop="mobile"> |
|
|
|
<el-input v-model="peoForm.mobile" placeholder="请输入手机号"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<!-- 性别下拉框 --> |
|
|
|
<el-form-item label="性别" prop="gender"> |
|
|
|
<el-select v-model="peoForm.gender" clearable placeholder="性别"> |
|
|
|
<el-option v-for="item in genderList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<!-- 专兼职下拉框 --> |
|
|
|
<el-form-item label="专兼职" prop="post"> |
|
|
|
<el-select v-model="peoForm.post" clearable placeholder="专兼职"> |
|
|
|
<el-option v-for="item in postList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<!-- 职责下拉框 --> |
|
|
|
<el-form-item label="职责" prop="duty"> |
|
|
|
<el-select v-model="peoForm.duty" multiple placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in dutyList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
:disabled="item.disabled"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
<div slot="footer" > |
|
|
|
<el-button @click="cancelPeo">取 消</el-button> |
|
|
|
<el-button type="primary" @click="submitPeo">确 定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 人员修改 --> |
|
|
|
<el-dialog |
|
|
@ -518,6 +525,38 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
title="新增组织" |
|
|
|
:visible.sync="addNewAgency" |
|
|
|
width="60%" |
|
|
|
:before-close="handleClose"> |
|
|
|
<el-form> |
|
|
|
<el-form-item label="组织名称"> |
|
|
|
<el-input v-model="agencyForm.agencyName" placeholder="请输入组织名称"></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<!-- 组织区划 --> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="组织编码"> |
|
|
|
<el-input v-model="agencyForm.code" placeholder="请输入组织编码"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="负责人"> |
|
|
|
<el-input v-model="agencyForm.contacts" placeholder="请输入负责人名字"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="联系电话"> |
|
|
|
<el-input v-model="agencyForm.mobile" placeholder="请输入联系电话"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<div id="con"></div> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" > |
|
|
|
<el-button @click="canceladdNewAgency">取 消</el-button> |
|
|
|
<el-button type="primary" @click="submitaddNewAgency">确 定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -528,6 +567,10 @@ import { requestPost } from "@/js/dai/request"; |
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
agenButtonTwo:false, |
|
|
|
agenButton:true, |
|
|
|
// 新增组织弹窗 |
|
|
|
addNewAgency:false, |
|
|
|
// 本级人员是否显示 |
|
|
|
levelPeo:true, |
|
|
|
// 部门人员是否显示 |
|
|
@ -549,6 +592,8 @@ export default { |
|
|
|
// 经纬度坐标 |
|
|
|
lat:'11', |
|
|
|
lng:'11', |
|
|
|
latitude:'11', |
|
|
|
longitude:'11', |
|
|
|
Navigation:'', |
|
|
|
// 查询参数 |
|
|
|
queryParams: { |
|
|
@ -604,6 +649,18 @@ export default { |
|
|
|
latitude: '11' ,//纬度 |
|
|
|
centerAddress:'' |
|
|
|
}, |
|
|
|
// 新增组织 |
|
|
|
agencyForm:{ |
|
|
|
parentAgencyId:'', |
|
|
|
agencyName:'', |
|
|
|
level:'', |
|
|
|
areaCodeSwitch:'', |
|
|
|
areaCode:'', |
|
|
|
areaName:'', |
|
|
|
contacts:'', |
|
|
|
mobile:'', |
|
|
|
code:'' |
|
|
|
}, |
|
|
|
// 树 |
|
|
|
tree:[], |
|
|
|
// 新增人员表单项 |
|
|
@ -730,6 +787,15 @@ export default { |
|
|
|
this.initMap(_that) |
|
|
|
}, 1000); |
|
|
|
} |
|
|
|
}, |
|
|
|
addNewAgency(val) { |
|
|
|
console.log('555555555555555',val) |
|
|
|
if (val) { |
|
|
|
setTimeout(() => { |
|
|
|
let _t = this |
|
|
|
this.createMap(_t) |
|
|
|
}, 1000); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted(){ |
|
|
@ -1061,6 +1127,20 @@ export default { |
|
|
|
this.selectValue = '' |
|
|
|
|
|
|
|
}, |
|
|
|
// 新增组织 |
|
|
|
addNewAgencyRest(){ |
|
|
|
this.agencyForm.parentAgencyId = '', |
|
|
|
this.agencyForm.agencyName = '', |
|
|
|
this.agencyForm.level = '', |
|
|
|
this.agencyForm.areaCodeSwitch = '', |
|
|
|
this.agencyForm.areaCode = '', |
|
|
|
this.agencyForm.areaName = '', |
|
|
|
this.agencyForm.contacts = '', |
|
|
|
this.agencyForm.mobile = '', |
|
|
|
this.agencyForm.code = '', |
|
|
|
this.latitude = '', |
|
|
|
this.longitude = '' |
|
|
|
}, |
|
|
|
// 社区新增弹框取消按钮 |
|
|
|
cancel(){ |
|
|
|
this.dialogVisible = false |
|
|
@ -1091,6 +1171,11 @@ export default { |
|
|
|
this.transferRest() |
|
|
|
this.transferPeo = false |
|
|
|
}, |
|
|
|
// 新增组织取消按钮 |
|
|
|
canceladdNewAgency(){ |
|
|
|
this.addNewAgencyRest() |
|
|
|
this.addNewAgency = false |
|
|
|
}, |
|
|
|
// 进入网格,查询网格所属人员 |
|
|
|
entryGrid(row){ |
|
|
|
this.gridDataPeo = [] |
|
|
@ -1105,6 +1190,7 @@ export default { |
|
|
|
this.levelWorkPeoList = false |
|
|
|
this.OrganizationList = false |
|
|
|
this.officeList = false |
|
|
|
this.GridList = false |
|
|
|
this.GridPeo() |
|
|
|
this.assembleBreadcrumbArr(row.gridId, 'grid') |
|
|
|
}, |
|
|
@ -1122,6 +1208,7 @@ export default { |
|
|
|
this.GridWorkPeoList = false |
|
|
|
this.GridList = false |
|
|
|
this.OrganizationList = false |
|
|
|
this.officeList = false |
|
|
|
this.communityPeo() |
|
|
|
this.assembleBreadcrumbArr(row.departmentId, 'department') |
|
|
|
}, |
|
|
@ -1143,9 +1230,33 @@ export default { |
|
|
|
this.agencyPeo() |
|
|
|
this.entry = true |
|
|
|
this.levelPeo = true |
|
|
|
this.OrganizationList = false |
|
|
|
this.agencyId = row.agencyId |
|
|
|
this.agenButton = false |
|
|
|
this.agenButtonTwo = true |
|
|
|
this.getAgencyList() |
|
|
|
this.assembleBreadcrumbArr(row.agencyId, 'agency') |
|
|
|
}, |
|
|
|
entryAgencyTwo(row){ |
|
|
|
this.tableData = [] |
|
|
|
this.communityData = [] |
|
|
|
this.gridData = [] |
|
|
|
this.gridDataPeo = [] |
|
|
|
this.agencyDataPeo = [] |
|
|
|
this.communityDataPeo = [] |
|
|
|
this.agencyId = row.agencyId |
|
|
|
this.getCommunityList() |
|
|
|
this.getGridList() |
|
|
|
this.communityOpen = true |
|
|
|
this.gridOpen = true |
|
|
|
this.anId = row.agencyId |
|
|
|
this.agencyPeo() |
|
|
|
this.entry = true |
|
|
|
this.levelPeo = true |
|
|
|
this.agencyId = row.agencyId |
|
|
|
this.getAgencyList() |
|
|
|
this.assembleBreadcrumbArr(row.agencyId, 'agency') |
|
|
|
this.OrganizationList = false |
|
|
|
}, |
|
|
|
|
|
|
|
// 新增组织 |
|
|
|
addCommunity(row){ |
|
|
@ -1418,6 +1529,14 @@ export default { |
|
|
|
console.log(this.breadcrumbArr) |
|
|
|
}, |
|
|
|
|
|
|
|
addAgency(row){ |
|
|
|
this.addNewAgency = true |
|
|
|
}, |
|
|
|
// 新增组织确定按钮 |
|
|
|
submitaddNewAgency(){ |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** 地图初始化 */ |
|
|
|
initMap(_that) { |
|
|
|
|
|
|
@ -1435,6 +1554,25 @@ export default { |
|
|
|
_that.lng = evt.latLng.getLng().toFixed(6); |
|
|
|
position.innerHTML = _that.lat + "," + _that.lng; |
|
|
|
}) |
|
|
|
}, |
|
|
|
createMap(_t){ |
|
|
|
document.getElementById("con").innerHTML = '' |
|
|
|
document.getElementById("con").innerHTML = '当前点击坐标为:<span id="pos"></span>' |
|
|
|
var position = document.getElementById("pos"); |
|
|
|
|
|
|
|
var center = new window.TMap.LatLng(39.984104, 116.307503);//设置中心点坐标 |
|
|
|
//初始化地图 |
|
|
|
var map = new window.TMap.Map("con", { |
|
|
|
center: center |
|
|
|
}); |
|
|
|
|
|
|
|
//绑定点击事件 |
|
|
|
map.on("click",function(evt){ |
|
|
|
_t.latitude = evt.latLng.getLat().toFixed(6); |
|
|
|
_t.longitude = evt.latLng.getLng().toFixed(6); |
|
|
|
position.innerHTML = _t.latitude + "," + _t.longitude; |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@ -1455,4 +1593,8 @@ export default { |
|
|
|
padding: 10px; |
|
|
|
border-radius: 3px; |
|
|
|
} |
|
|
|
#con { |
|
|
|
width: 50%; |
|
|
|
height: 50%; |
|
|
|
} |
|
|
|
</style> |