|
@ -2,153 +2,112 @@ |
|
|
<div> |
|
|
<div> |
|
|
<div> |
|
|
<div> |
|
|
<div v-show="!propertyFormShow"> |
|
|
<div v-show="!propertyFormShow"> |
|
|
<el-form |
|
|
<el-form :inline="false" |
|
|
:inline="false" |
|
|
|
|
|
:model="dataForm" |
|
|
:model="dataForm" |
|
|
:rules="dataRule" |
|
|
:rules="dataRule" |
|
|
:disabled="formType === 'detail'" |
|
|
:disabled="formType === 'detail'" |
|
|
class="form" |
|
|
class="form"> |
|
|
> |
|
|
<el-form-item label="小区名称" |
|
|
<el-form-item |
|
|
|
|
|
label="小区名称" |
|
|
|
|
|
prop="neighborHoodName" |
|
|
prop="neighborHoodName" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
style="display: block" |
|
|
style="display: block"> |
|
|
> |
|
|
<el-input class="item_width_1" |
|
|
<el-input |
|
|
|
|
|
class="item_width_1" |
|
|
|
|
|
maxlength="50" |
|
|
maxlength="50" |
|
|
show-word-limit |
|
|
show-word-limit |
|
|
placeholder="请输入小区名称" |
|
|
placeholder="请输入小区名称" |
|
|
v-model="dataForm.neighborHoodName" |
|
|
v-model="dataForm.neighborHoodName"> |
|
|
> |
|
|
|
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item label="所属组织" |
|
|
label="所属组织" |
|
|
|
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
style="display: block" |
|
|
style="display: block"> |
|
|
> |
|
|
|
|
|
<span>{{ dataForm.agencyName }}</span> |
|
|
<span>{{ dataForm.agencyName }}</span> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item label="所属网格" |
|
|
label="所属网格" |
|
|
|
|
|
prop="gridId" |
|
|
prop="gridId" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
style="display: block" |
|
|
style="display: block"> |
|
|
> |
|
|
<el-select class="item_width_1" |
|
|
<el-select |
|
|
|
|
|
class="item_width_1" |
|
|
|
|
|
v-model="dataForm.gridId" |
|
|
v-model="dataForm.gridId" |
|
|
placeholder="请选择" |
|
|
placeholder="请选择" |
|
|
clearable |
|
|
clearable> |
|
|
> |
|
|
<el-option v-for="item in gridList" |
|
|
<el-option |
|
|
|
|
|
v-for="item in gridList" |
|
|
|
|
|
:key="item.gridId" |
|
|
:key="item.gridId" |
|
|
:label="item.gridName" |
|
|
:label="item.gridName" |
|
|
:value="item.gridId" |
|
|
:value="item.gridId"> |
|
|
> |
|
|
|
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item label="关联物业" |
|
|
label="关联物业" |
|
|
|
|
|
prop="propertyId" |
|
|
prop="propertyId" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
style="display: block" |
|
|
style="display: block"> |
|
|
> |
|
|
<el-select class="item_width_2" |
|
|
<el-select |
|
|
|
|
|
class="item_width_2" |
|
|
|
|
|
v-model="dataForm.propertyId" |
|
|
v-model="dataForm.propertyId" |
|
|
placeholder="请选择" |
|
|
placeholder="请选择" |
|
|
clearable |
|
|
clearable> |
|
|
> |
|
|
<el-option v-for="item in propertyList" |
|
|
<el-option |
|
|
|
|
|
v-for="item in propertyList" |
|
|
|
|
|
:key="item.propertyId" |
|
|
:key="item.propertyId" |
|
|
:label="item.propertyName" |
|
|
:label="item.propertyName" |
|
|
:value="item.propertyId" |
|
|
:value="item.propertyId"> |
|
|
> |
|
|
|
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
|
|
|
|
|
|
<el-button |
|
|
<el-button style="margin-left: 10px" |
|
|
style="margin-left: 10px" |
|
|
|
|
|
type="primary" |
|
|
type="primary" |
|
|
size="small" |
|
|
size="small" |
|
|
@click="handleAddProperty" |
|
|
@click="handleAddProperty">添加物业</el-button> |
|
|
>添加物业</el-button |
|
|
|
|
|
> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item label="详细地址" |
|
|
label="详细地址" |
|
|
|
|
|
prop="address" |
|
|
prop="address" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
style="display: block" |
|
|
style="display: block"> |
|
|
> |
|
|
<el-input class="item_width_1" |
|
|
<el-input |
|
|
|
|
|
class="item_width_1" |
|
|
|
|
|
maxlength="50" |
|
|
maxlength="50" |
|
|
show-word-limit |
|
|
show-word-limit |
|
|
placeholder="请输入详细地址" |
|
|
placeholder="请输入详细地址" |
|
|
v-model="dataForm.address" |
|
|
v-model="dataForm.address"> |
|
|
> |
|
|
|
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item label="备注" |
|
|
label="备注" |
|
|
|
|
|
prop="remark" |
|
|
prop="remark" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
style="display: block" |
|
|
style="display: block"> |
|
|
> |
|
|
<el-input class="item_width_1" |
|
|
<el-input |
|
|
|
|
|
class="item_width_1" |
|
|
|
|
|
type="textarea" |
|
|
type="textarea" |
|
|
maxlength="500" |
|
|
maxlength="500" |
|
|
show-word-limit |
|
|
show-word-limit |
|
|
:rows="3" |
|
|
:rows="3" |
|
|
placeholder="请输入备注,不超过500字" |
|
|
placeholder="请输入备注,不超过500字" |
|
|
v-model="dataForm.remark" |
|
|
v-model="dataForm.remark"></el-input> |
|
|
></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item label="位置坐标" |
|
|
label="位置坐标" |
|
|
|
|
|
prop="longitude" |
|
|
prop="longitude" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
style="display: block" |
|
|
style="display: block"> |
|
|
> |
|
|
<el-input class="item_width_3" |
|
|
<el-input |
|
|
|
|
|
class="item_width_3" |
|
|
|
|
|
maxlength="50" |
|
|
maxlength="50" |
|
|
placeholder="请输入关键字" |
|
|
placeholder="请输入关键字" |
|
|
v-model="keyWords" |
|
|
v-model="keyWords"> |
|
|
> |
|
|
|
|
|
</el-input> |
|
|
</el-input> |
|
|
<el-button |
|
|
<el-button style="margin-left: 10px" |
|
|
style="margin-left: 10px" |
|
|
|
|
|
type="primary" |
|
|
type="primary" |
|
|
size="small" |
|
|
size="small" |
|
|
@click="handleSearchMap" |
|
|
@click="handleSearchMap">查询</el-button> |
|
|
>查询</el-button |
|
|
<div id="app" |
|
|
> |
|
|
class="div_map"></div> |
|
|
<div id="app" class="div_map"></div> |
|
|
|
|
|
<div style="margin-top: 10px"> |
|
|
<div style="margin-top: 10px"> |
|
|
<span>经度</span> |
|
|
<span>经度</span> |
|
|
<el-input |
|
|
<el-input class="item_width_3" |
|
|
class="item_width_3" |
|
|
|
|
|
maxlength="50" |
|
|
maxlength="50" |
|
|
placeholder="请输入经度" |
|
|
placeholder="请输入经度" |
|
|
v-model="dataForm.longitude" |
|
|
v-model="dataForm.longitude"> |
|
|
> |
|
|
|
|
|
</el-input> |
|
|
</el-input> |
|
|
<span style="margin-left: 20px">纬度</span> |
|
|
<span style="margin-left: 20px">纬度</span> |
|
|
<el-input |
|
|
<el-input class="item_width_3" |
|
|
class="item_width_3" |
|
|
|
|
|
maxlength="50" |
|
|
maxlength="50" |
|
|
placeholder="请输入纬度" |
|
|
placeholder="请输入纬度" |
|
|
v-model="dataForm.latitude" |
|
|
v-model="dataForm.latitude"> |
|
|
> |
|
|
|
|
|
</el-input> |
|
|
</el-input> |
|
|
</div> |
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -156,25 +115,19 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div v-show="propertyFormShow"> |
|
|
<div v-show="propertyFormShow"> |
|
|
<el-form |
|
|
<el-form :inline="false" |
|
|
:inline="false" |
|
|
|
|
|
:model="propertyForm" |
|
|
:model="propertyForm" |
|
|
:rules="propertyRule" |
|
|
:rules="propertyRule" |
|
|
class="form" |
|
|
class="form"> |
|
|
> |
|
|
<el-form-item label="物业名称" |
|
|
<el-form-item |
|
|
|
|
|
label="物业名称" |
|
|
|
|
|
prop="name" |
|
|
prop="name" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
style="display: block" |
|
|
style="display: block"> |
|
|
> |
|
|
<el-input class="item_width_1" |
|
|
<el-input |
|
|
|
|
|
class="item_width_1" |
|
|
|
|
|
maxlength="50" |
|
|
maxlength="50" |
|
|
show-word-limit |
|
|
show-word-limit |
|
|
placeholder="请输入小区名称" |
|
|
placeholder="请输入小区名称" |
|
|
v-model="propertyForm.name" |
|
|
v-model="propertyForm.name"> |
|
|
> |
|
|
|
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
@ -182,12 +135,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="div_btn"> |
|
|
<div class="div_btn"> |
|
|
<el-button @click="handleCancle">取 消</el-button> |
|
|
<el-button @click="handleCancle">取 消</el-button> |
|
|
<el-button |
|
|
<el-button v-if="formType != 'detail'" |
|
|
v-if="formType != 'detail'" |
|
|
|
|
|
type="primary" |
|
|
type="primary" |
|
|
@click="handleComfirm" |
|
|
@click="handleComfirm">确 定</el-button> |
|
|
>确 定</el-button |
|
|
|
|
|
> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
@ -228,7 +178,8 @@ export default { |
|
|
name: '' |
|
|
name: '' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
keyWords: '' |
|
|
keyWords: '', |
|
|
|
|
|
centerPoint: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
components: {}, |
|
|
components: {}, |
|
@ -240,7 +191,7 @@ export default { |
|
|
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|
|
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|
|
initMap () { |
|
|
initMap () { |
|
|
// 定义地图中心点坐标 |
|
|
// 定义地图中心点坐标 |
|
|
var center = new window.TMap.LatLng(39.98412, 116.307484) |
|
|
var center = new window.TMap.LatLng(36.0722275, 120.38945519) |
|
|
// 定义map变量,调用 TMap.Map() 构造函数创建地图 |
|
|
// 定义map变量,调用 TMap.Map() 构造函数创建地图 |
|
|
map = new window.TMap.Map(document.getElementById('app'), { |
|
|
map = new window.TMap.Map(document.getElementById('app'), { |
|
|
center: center, // 设置地图中心点坐标 |
|
|
center: center, // 设置地图中心点坐标 |
|
@ -248,8 +199,7 @@ export default { |
|
|
pitch: 43.5, // 设置俯仰角 |
|
|
pitch: 43.5, // 设置俯仰角 |
|
|
rotation: 45 // 设置地图旋转角度 |
|
|
rotation: 45 // 设置地图旋转角度 |
|
|
}) |
|
|
}) |
|
|
console.log(map) |
|
|
|
|
|
console.log(window) |
|
|
|
|
|
search = new window.TMap.service.Search({ pageSize: 10 }) |
|
|
search = new window.TMap.service.Search({ pageSize: 10 }) |
|
|
// 新建一个地点搜索类 |
|
|
// 新建一个地点搜索类 |
|
|
markers = new TMap.MultiMarker({ |
|
|
markers = new TMap.MultiMarker({ |
|
@ -317,7 +267,12 @@ export default { |
|
|
this.setMarker(lat, lng) |
|
|
this.setMarker(lat, lng) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async initForm(type, row) { |
|
|
async initForm (centerPoint, type, row) { |
|
|
|
|
|
|
|
|
|
|
|
this.centerPoint = centerPoint |
|
|
|
|
|
// debugger |
|
|
|
|
|
map.setCenter(new TMap.LatLng(this.centerPoint[0], this.centerPoint[1])) |
|
|
|
|
|
|
|
|
this.formType = type |
|
|
this.formType = type |
|
|
if (row) { |
|
|
if (row) { |
|
|
this.neighborHoodId = row.neighborHoodId |
|
|
this.neighborHoodId = row.neighborHoodId |
|
@ -345,7 +300,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//加载网格 |
|
|
//加载网格 |
|
|
async loadGrid () { |
|
|
async loadGrid () { |
|
|
const url = '/gov/org/grid/allgrids' |
|
|
const url = '/gov/org/grid/allgridsnopermission ' |
|
|
// const url = "https://epmet-dev.elinkservice.cn:7082/api/apimock-v2/95518686fa128a53f64c678906848062/gov/org/grid/allgrids" |
|
|
// const url = "https://epmet-dev.elinkservice.cn:7082/api/apimock-v2/95518686fa128a53f64c678906848062/gov/org/grid/allgrids" |
|
|
let params = { |
|
|
let params = { |
|
|
agencyId: this.dataForm.agencyId |
|
|
agencyId: this.dataForm.agencyId |
|
@ -375,6 +330,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handleAddProperty () { |
|
|
handleAddProperty () { |
|
|
|
|
|
|
|
|
this.propertyForm.name = '' |
|
|
this.propertyForm.name = '' |
|
|
this.propertyFormShow = true |
|
|
this.propertyFormShow = true |
|
|
}, |
|
|
}, |
|
|