|
|
|
@ -25,7 +25,7 @@ |
|
|
|
<el-form-item label="所处位置" prop="location" style="display: block"> |
|
|
|
<el-select |
|
|
|
v-model="formData.location" |
|
|
|
style="width: 200px;" |
|
|
|
style="width: 500px;" |
|
|
|
:disabled="disabled" |
|
|
|
filterable |
|
|
|
remote |
|
|
|
@ -137,8 +137,7 @@ export default { |
|
|
|
equipmentCategoryCode: '', |
|
|
|
principalName: '', |
|
|
|
location: '', |
|
|
|
contactNum: '', |
|
|
|
|
|
|
|
contactNum: '' |
|
|
|
}, |
|
|
|
dataRule: { |
|
|
|
equipmentName: [{ required: true, message: '设备名称不能为空', trigger: 'bulr' }], |
|
|
|
@ -174,7 +173,6 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
async loadCategory() { |
|
|
|
const url = '/sys/dict/data/dictlist'; |
|
|
|
|
|
|
|
@ -270,9 +268,8 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.$message.success('操作成功'); |
|
|
|
|
|
|
|
// this.handleCancle(); |
|
|
|
|
|
|
|
|
|
|
|
this.handleCancle(); |
|
|
|
} else if (code >= 8000) { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
@ -301,7 +298,7 @@ export default { |
|
|
|
}, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|
|
|
initMap() { |
|
|
|
let { latitude, longitude } = this.$store.state.user; |
|
|
|
|
|
|
|
|
|
|
|
if (this.formData.latitude && this.formData.longitude) { |
|
|
|
latitude = this.formData.latitude; |
|
|
|
longitude = this.formData.longitude; |
|
|
|
@ -310,7 +307,7 @@ export default { |
|
|
|
latitude = 39.9088810666821; |
|
|
|
longitude = 116.39743841556731; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
map = new daiMap( |
|
|
|
document.getElementById('app_event'), |
|
|
|
@ -325,7 +322,7 @@ export default { |
|
|
|
map.on('dragend', e => { |
|
|
|
this.handleMoveCenter(e); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
map.setCenter(latitude, longitude); |
|
|
|
if (this.formData.latitude) { |
|
|
|
map.setMarker(latitude, longitude); |
|
|
|
@ -357,7 +354,7 @@ export default { |
|
|
|
if (data.resultList && data.resultList.length > 0) { |
|
|
|
this.resultList = data.resultList; |
|
|
|
this.searchOptions = this.resultList.map(item => { |
|
|
|
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` }; |
|
|
|
return { value: `${item.id}`, label: `${item.address + item.name}` }; |
|
|
|
}); |
|
|
|
} |
|
|
|
} else { |
|
|
|
|