APPbug反馈修改

This commit is contained in:
仲么了
2023-08-10 09:18:17 +08:00
parent 192bd44c7a
commit f395da8f93
48 changed files with 1420 additions and 480 deletions

View File

@@ -8,8 +8,8 @@
<uni-easyinput
v-model="formData.engineeringName"
placeholder="请输入项目名称"
@click.native="showDrawer"
:clearable="false"
disabled
/>
</uni-forms-item>
<uni-forms-item label="项目名称">
@@ -122,8 +122,8 @@ export default {
topoIds: [],
description: '',
name: '',
lat: '2',
lng: '3',
lat: '',
lng: '',
},
engineeringList: [],
tempList: [],
@@ -162,6 +162,10 @@ export default {
this.formData[key] = this.project[key]
}
}
} else {
let engineering = uni.getStorageSync(this.$cacheKey.engineering)
this.formData.engineeringId = engineering.id
this.formData.engineeringName = engineering.name
}
uni.getLocation({
type: 'wgs84',
@@ -229,7 +233,9 @@ export default {
chooseLocation() {
uni.chooseLocation({
success: function (res) {
this.address = res.name
this.formData.area = res.name
this.formData.lat = res.latitudeame
this.formData.lng = res.longitude
console.log('位置名称:' + res.name)
console.log('详细地址:' + res.address)
console.log('纬度:' + res.latitude)
@@ -268,18 +274,24 @@ export default {
let data = JSON.parse(JSON.stringify(this.formData))
delete data.files
let res = {}
console.warn(data, arr)
if (this.project) {
data.id = this.project.id
res = await updateAppProject(data, arr)
} else {
res = await addAppProject(data, arr)
}
console.log(res)
if (res.length === 1) {
this.$util.toast(res[0].message)
return
let result = {}
if (res.code === 'A0000') {
result = res
} else {
console.warn(res)
if (res.length === 1) {
this.$util.toast(res[0].message)
return
}
result = JSON.parse(res[1].data)
}
let result = JSON.parse(res[1].data)
if (result.code === 'A0000') {
if (this.project) {
this.$util.toast('项目修改成功')