af-mobile-client-vue3 1.1.14 → 1.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/core/Uploader/index.vue +10 -2
- package/src/components/data/XCellList/index.vue +807 -807
- package/src/components/data/XFormItem/index.vue +3 -0
- package/src/components/data/XOlMap/utils/wgs84ToGcj02.js +154 -154
- package/src/views/component/XCellListView/index.vue +3 -123
- package/src/views/component/XFormGroupView/index.vue +0 -37
- package/src/views/component/XFormView/index.vue +27 -120
- package/src/views/component/XFormView/oldindex.vue +133 -0
- package/src/views/component/XOlMapView/XLocationPicker/index.vue +118 -118
package/package.json
CHANGED
|
@@ -19,12 +19,20 @@ const imageList = ref(props.imageList)
|
|
|
19
19
|
// 监听 props.imageList 的变化
|
|
20
20
|
watch(() => props.imageList, (newVal) => {
|
|
21
21
|
if (newVal?.length > 0) {
|
|
22
|
-
imageList.value
|
|
22
|
+
const existingIds = imageList.value ? imageList.value.map(item => item.id) : []
|
|
23
|
+
const newItems = newVal.filter(item => !item.id || !existingIds.includes(item.id)).map((item) => {
|
|
23
24
|
return { id: item.id, name: item.f_filename, url: item.f_downloadpath }
|
|
24
25
|
})
|
|
26
|
+
if (newItems.length > 0) {
|
|
27
|
+
if (!imageList.value) {
|
|
28
|
+
imageList.value = newItems
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
imageList.value = [...imageList.value, ...newItems]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
25
34
|
}
|
|
26
35
|
}, { immediate: true, deep: true })
|
|
27
|
-
|
|
28
36
|
// 上传图片
|
|
29
37
|
function fileUpload(file: any): void {
|
|
30
38
|
const formData = new FormData()
|