| | |
| | | <el-form-item label="附件图片" prop="photos" required class="upload-wrapper"> |
| | | <el-upload ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card" |
| | | :on-change="handleFileChange" :on-remove="handleUploadRemove" :before-upload="beforeUpload" |
| | | :file-list="form.photos" :limit="1" accept="image/*" class="create-upload"> |
| | | :file-list="popupShowImage(form.photos)" :limit="1" accept="image/*" class="create-upload"> |
| | | <template v-if="form.photos.length < 1"> |
| | | <!-- <i class="el-icon-plus">+</i> --> |
| | | <div class="el-icon-plus"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | |
| | | <div class="upload-tip">需上传含有地址信息的照片(jpg、jpeg、png),且不超过5M</div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getSmallImg,getShowImg } from '@/utils/util'; |
| | | import { ElMessageBox, ElLoading } from 'element-plus' |
| | | import { calculateDefaultRange } from '@/utils/util' |
| | | import { gcj02ToWgs84, wgs84ToGcj02 } from '@/utils/coordinateTransformation' |
| | |
| | | } from '@/api/tickets/ticket' |
| | | import { export_json_to_excel } from '@/utils/exportExcel' |
| | | import geoJson from '@/assets/geoJson.json' |
| | | |
| | | import { mapGetters } from 'vuex' |
| | | import { getAdcodeObj } from '@/utils/disposeData' |
| | | function regExp (label, name) { |
| | |
| | | return '/' |
| | | } |
| | | }, |
| | | |
| | | popupShowImage () { |
| | | return (list) => { |
| | | |
| | | return list.map(item => ({ |
| | | ...item, |
| | | url: getShowImg(item.url) |
| | | })) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | }, |
| | | |
| | | async handleViewDetail (row) { |
| | | |
| | | // 找到当前行在tableData中的索引 |
| | | this.currentIndex = this.tableData.findIndex(item => item.id === row.id) |
| | | // 先设置workType,直接从row读取 |
| | |
| | | this.finalizeLoading = false |
| | | } |
| | | }, |
| | | |
| | | // getSmallImg(url) { |
| | | // return url ? url.substring(0, url.lastIndexOf('.')) + '_small' + url.substring(url.lastIndexOf('.')) : '' |
| | | // }, |
| | | // 添加编辑方法 |
| | | handleEdit (row) { |
| | | console.log('编辑原始数据:', row) |
| | |
| | | address: row.address || '', |
| | | content: row.content, |
| | | photos: [], |
| | | |
| | | } |
| | | |
| | | let curLocation = [] |