From 98c817ed9c015b50bfa4cb04d4d718d767a071d5 Mon Sep 17 00:00:00 2001
From: GULIMMO <2820890765@qq.com>
Date: Sat, 11 Nov 2023 19:45:59 +0800
Subject: [PATCH] 门牌码信息接口更新
---
subPackage/workbench/views/editExamine.vue | 99 ++++++++++++++++++++++++++++---------------------
1 files changed, 57 insertions(+), 42 deletions(-)
diff --git a/subPackage/workbench/views/editExamine.vue b/subPackage/workbench/views/editExamine.vue
index 408d4da..34482b0 100644
--- a/subPackage/workbench/views/editExamine.vue
+++ b/subPackage/workbench/views/editExamine.vue
@@ -99,13 +99,24 @@
onShow() {
this.curSelectSite = uni.getStorageSync('siteInfo')
this.getCsDetails()
+ // this.getLocation()
},
methods: {
+ getLocation() {
+ uni.chooseLocation({
+ success: (res) => {
+ console.log(res);
+ }
+ })
+ },
getCsDetails() {
getPlaceDetail({
placeId: this.curSelectSite.id
}).then(detailRes => {
- const { code, data } = detailRes
+ const {
+ code,
+ data
+ } = detailRes
if (code !== 200) {
uni.showToast({
title: '数据请求失败',
@@ -116,9 +127,9 @@
const placePractitioner = data?.placePractitioner || []
Object.keys(this.form).forEach(key => {
this.form[key] = data[key]
- if(key === 'imageUrls' || key === 'planImageUrls') {
- this.form[key] = []
- !!data[key] && this.form[key].push()
+ if (key === 'imageUrls' || key === 'planImageUrls') {
+ this.form[key] = []
+ !!data[key] && this.form[key].push(data[key])
}
})
this.personNum = placePractitioner.length
@@ -129,45 +140,49 @@
})
})
})
- },
- updatePlaceExt(data) {
- data['imageUrls'] = JSON.stringify(data['imageUrls'])
- data['planImageUrls'] = JSON.stringify(data['planImageUrls'])
- updatePlaceExtData({...data}).then(res => {
- const { code } = res
- if (code !== 200) {
- uni.showToast({
- title: '提交失败',
- icon: 'error'
- })
- return
- }
- uni.showToast({
- title: '提交成功',
- icon: 'success',
- complete() {
- setTimeout(() => {
- uni.navigateBack()
- }, 1500)
- }
- })
- })
- },
- addPerson() {
- this.personNum++
- },
- submit() {
- const placePractitioner = []
- this.$refs.formItemRef.forEach(item => {
- item.form.placeId = this.form.placeId
- placePractitioner.push(item.form)
- })
- this.form.placePractitioner = placePractitioner
- this.updatePlaceExt(this.form)
- },
- pushPage() {
- this.$u.func.globalNavigator('/subPackage/workbench/views/cshw')
}
+ },
+ updatePlaceExt(data) {
+ data['imageUrls'] = JSON.stringify(data['imageUrls'])
+ data['planImageUrls'] = JSON.stringify(data['planImageUrls'])
+ updatePlaceExtData({
+ ...data
+ }).then(res => {
+ const {
+ code
+ } = res
+ if (code !== 200) {
+ uni.showToast({
+ title: '提交失败',
+ icon: 'error'
+ })
+ return
+ }
+ uni.showToast({
+ title: '提交成功',
+ icon: 'success',
+ complete() {
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1500)
+ }
+ })
+ })
+ },
+ addPerson() {
+ this.personNum++
+ },
+ submit() {
+ const placePractitioner = []
+ this.$refs.formItemRef.forEach(item => {
+ item.form.placeId = this.form.placeId
+ placePractitioner.push(item.form)
+ })
+ this.form.placePractitioner = placePractitioner
+ this.updatePlaceExt(this.form)
+ },
+ pushPage() {
+ this.$u.func.globalNavigator('/subPackage/workbench/views/cshw')
}
}
</script>
--
Gitblit v1.9.3