|
|
@ -1,10 +1,10 @@ |
|
|
|
<template> |
|
|
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? '新增党组织' : '更新党组织'" :close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false"> |
|
|
|
<el-form class="form" |
|
|
|
:model="dataForm" |
|
|
|
:rules="dataRule" |
|
|
|
ref="dataForm" |
|
|
|
<el-form class="form" |
|
|
|
:model="dataForm" |
|
|
|
:rules="dataRule" |
|
|
|
ref="dataForm" |
|
|
|
@keyup.enter.native="dataFormSubmitHandle()" |
|
|
|
:label-width="$i18n.locale === 'en-US' ? '120px' : '100px'"> |
|
|
|
<el-form-item prop="partyOrgType" label="组织类型"> |
|
|
@ -127,13 +127,7 @@ |
|
|
|
customerId: '', |
|
|
|
staffId:'', |
|
|
|
orgPidName: '', |
|
|
|
agencyName:'', |
|
|
|
delFlag: '', |
|
|
|
revision: '', |
|
|
|
createdBy: '', |
|
|
|
createdTime: '', |
|
|
|
updatedBy: '', |
|
|
|
updatedTime: '', |
|
|
|
agencyName:'' |
|
|
|
}, |
|
|
|
orgListVisible: false, |
|
|
|
agencyListVisible:false, |
|
|
@ -146,7 +140,7 @@ |
|
|
|
mounted () { |
|
|
|
setTimeout(() => { |
|
|
|
this.initMap() |
|
|
|
}, 500); |
|
|
|
}, 800); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
init() { |
|
|
@ -163,11 +157,11 @@ |
|
|
|
this.getInfo() |
|
|
|
} else { |
|
|
|
if(this.dataForm.orgPids) { |
|
|
|
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(',') |
|
|
|
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(':') |
|
|
|
} else { |
|
|
|
this.dataForm.mySelectOrg = '' |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.orgListTreeSetDefaultHandle() |
|
|
|
} |
|
|
|
}) |
|
|
@ -236,6 +230,10 @@ |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.orgList = res.data |
|
|
|
this.orgList.unshift({ |
|
|
|
partyOrgName: '一级组织', |
|
|
|
id: '0' |
|
|
|
}); |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
@ -245,7 +243,7 @@ |
|
|
|
this.dataForm.orgPid = this.dataForm.mySelectOrg[this.dataForm.mySelectOrg.length - 1] |
|
|
|
this.dataForm.orgPids = '' |
|
|
|
this.dataForm.mySelectOrg.forEach(element => { |
|
|
|
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ',' + element : element |
|
|
|
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + element : element |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.dataForm.orgPid = '' |
|
|
@ -259,7 +257,7 @@ |
|
|
|
this.dataForm.agencyId = this.dataForm.maSelectAgency[this.dataForm.maSelectAgency.length - 1] |
|
|
|
this.dataForm.agencyPids = '' |
|
|
|
this.dataForm.maSelectAgency.forEach(element => { |
|
|
|
this.dataForm.agencyPids = this.dataForm.agencyPids ? this.dataForm.agencyPids + ',' + element : element |
|
|
|
this.dataForm.agencyPids = this.dataForm.agencyPids ? this.dataForm.agencyPids + ':' + element : element |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.dataForm.agencyId = '' |
|
|
@ -277,12 +275,10 @@ |
|
|
|
...res.data |
|
|
|
} |
|
|
|
// 党组织组织 |
|
|
|
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(',') |
|
|
|
console.log(this.dataForm.orgPids.split(',')) |
|
|
|
this.dataForm.mySelectOrg = this.dataForm.orgPids |
|
|
|
// 行政组织 |
|
|
|
this.dataForm.maSelectAgency = this.dataForm.agencyPids.split(',') |
|
|
|
console.log(this.dataForm.agencyPids.split(',')) |
|
|
|
|
|
|
|
this.dataForm.maSelectAgency = this.dataForm.agencyId |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
|
|
|
@ -313,7 +309,7 @@ |
|
|
|
document.getElementById('mapSeach_id').style.display = "block" |
|
|
|
document.getElementById('lon_lat_id').style.display = "block" |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 定义地图中心点坐标 |
|
|
|
var center = new window.TMap.LatLng(36.0722275, 120.38945519) |
|
|
|
// 定义map变量,调用 TMap.Map() 构造函数创建地图 |
|
|
@ -392,7 +388,7 @@ |
|
|
|
|
|
|
|
convert (lat, lng) { |
|
|
|
markers.setGeometries([]); |
|
|
|
// var input = document.getElementById('location').value.split(','); |
|
|
|
// var input = document.getElementById('location').value.split(':'); |
|
|
|
let location |
|
|
|
if (lat && lng) { |
|
|
|
location = new TMap.LatLng(lat, lng); |
|
|
|