|
|
@@ -8,7 +8,7 @@
|
|
|
></el-input>
|
|
|
<el-button type="primary" plain @click="show = true">查看地图</el-button>
|
|
|
</div>
|
|
|
- <el-dialog v-model="show" :width="960">
|
|
|
+ <el-dialog v-model="show" :width="960" @close="close">
|
|
|
<template #header
|
|
|
><h4 class="full-width text-left">地理位置</h4></template
|
|
|
>
|
|
|
@@ -34,10 +34,11 @@
|
|
|
<el-divider />
|
|
|
<div class="flex flex-center flex-justify-start full-width">
|
|
|
<div class="text-left bold-500 black mr-10">相关图片</div>
|
|
|
- <filepicker :project-id="projectId" />
|
|
|
+ <filepicker :project-id="projectId" @submit="filePicker" />
|
|
|
+ <span class="ml-20 font-12 grey-6">*请选择图片类型的文件</span>
|
|
|
</div>
|
|
|
<div class="img-content flex flex-justify-start hide-scrollbar mt-20">
|
|
|
- <img src="../../../assets/svg/folder.svg" v-for="i in 20" />
|
|
|
+ <img :src="item.url" v-for="item in photoList" :key="item.url" />
|
|
|
</div>
|
|
|
<div class="full-width flex flex-center flex-justify-end">
|
|
|
<el-button type="primary" plain @click="show = false"
|
|
|
@@ -52,6 +53,7 @@
|
|
|
|
|
|
<script>
|
|
|
import filepicker from '@/components/filepicker/index.vue'
|
|
|
+import api from '@/api/index.js'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -110,7 +112,8 @@ export default {
|
|
|
address: '',
|
|
|
longitude: '',
|
|
|
latitude: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ photoList: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -207,7 +210,26 @@ export default {
|
|
|
this.form.latitude = this.latitude
|
|
|
this.form.longitude = this.longitude
|
|
|
this.show = false
|
|
|
- this.$emit('success', this.form)
|
|
|
+ this.$emit('success', this.form, this.photoList)
|
|
|
+ },
|
|
|
+ filePicker(list) {
|
|
|
+ const tmps = list
|
|
|
+ .filter(ele => !api.offices.includes(ele.suffix))
|
|
|
+ .map(ele => {
|
|
|
+ console.log(ele)
|
|
|
+ return {
|
|
|
+ bladeFileId: ele.fileId,
|
|
|
+ fileId: ele.id,
|
|
|
+ projectId: ele.projectId,
|
|
|
+ title: ele.title,
|
|
|
+ url: ele.url,
|
|
|
+ folderId: ele.parentId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.photoList = this.photoList.concat(tmps)
|
|
|
+ },
|
|
|
+ close() {
|
|
|
+ // this.photoList.length = 0
|
|
|
}
|
|
|
}
|
|
|
}
|