|
@@ -12,6 +12,12 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="经度" prop="longitude" :rules="[{required: true, message: '请输入经度'}]">
|
|
|
+ <el-input type="text" v-model="projectForm.longitude" placeholder="请输入经度"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="纬度" prop="latitude" :rules="[{required: true, message: '请输入纬度'}]">
|
|
|
+ <el-input type="text" v-model="projectForm.latitude" placeholder="请输入纬度"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="项目区域" prop="address" :rules="[{required: true, message: '请选择项目区域'}]">
|
|
|
<city v-model="projectForm.address"></city>
|
|
|
</el-form-item>
|
|
@@ -61,7 +67,9 @@
|
|
|
organizationId: '',
|
|
|
picture: '',
|
|
|
tagIds: '',
|
|
|
- type: 1
|
|
|
+ type: 1,
|
|
|
+ longitude: '',
|
|
|
+ latitude: ''
|
|
|
},
|
|
|
specific: '',
|
|
|
responsibility: []
|
|
@@ -73,6 +81,9 @@
|
|
|
getProjectDetailById(this.detailId).then(res => {
|
|
|
if (res.state) {
|
|
|
this.projectForm = res.data;
|
|
|
+ let address = res.data.coordinates.split(',');
|
|
|
+ this.projectForm.longitude = address[0];
|
|
|
+ this.projectForm.latitude = address[1];
|
|
|
this.projectForm.address = JSON.parse(this.projectForm.address);
|
|
|
if (this.projectForm.picture) this.responsibility = JSON.parse(this.projectForm.picture);
|
|
|
if (this.projectForm.data) {
|
|
@@ -94,6 +105,7 @@
|
|
|
postData['picture'] = JSON.stringify(this.$refs.upload.fileList);
|
|
|
postData['address'] = JSON.stringify(this.projectForm.address);
|
|
|
postData['tagIds'] = this.$refs.tag.tagIds();
|
|
|
+ postData['coordinates'] = postData.longitude + ',' + postData.latitude;
|
|
|
if (this.isUpdate) {
|
|
|
updateProject(postData).then(this.successFunc);
|
|
|
} else {
|