| | |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <div class="media-title">地图标记事件点</div> |
| | | <div class="media-title">地图标记事件点 |
| | | <el-popover v-if="currentDetail.status === 3" |
| | | popper-class="custom-qrcode-popover" |
| | | :width="120" |
| | | :visible="currentDetail.showQR && detailVisible" |
| | | placement="top" |
| | | title="" |
| | | trigger="click" |
| | | |
| | | > |
| | | <template #reference> |
| | | <img @click.stop="handleQRCode(currentDetail)" class="QRCodeImg" src="@/assets/images/dataCenter/positionicon.png" alt="" title="事件导航" /> |
| | | </template> |
| | | <div class="qrcode-content"> |
| | | <CreateQRcode v-if="currentDetail.showQR && detailVisible" :latAndLon="currentDetail.location"></CreateQRcode> |
| | | </div> |
| | | </el-popover> |
| | | </div> |
| | | <div class="media-content"> |
| | | <map-container v-if="detailVisible" ref="MapContainer"></map-container> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { getSmallImg, getShowImg } from '@/utils/util'; |
| | | import { ElMessageBox, ElLoading } from 'element-plus'; |
| | | import { calculateDefaultRange } from '@/utils/util'; |
| | |
| | | import { getAdcodeObj } from '@/utils/disposeData' |
| | | import elTooltipCopy from '@/components/ElTooltipCopy.vue' |
| | | import getBaseConfig from '@/buildConfig/config' |
| | | import CreateQRcode from '@/components/CreateQRcode/CreateQRcode.vue' |
| | | const { envName } = getBaseConfig() |
| | | function regExp (label, name) { |
| | | var reg = new RegExp(label + '=([^&]*)(&|$)', 'g') |
| | |
| | | } |
| | | |
| | | export default { |
| | | components: { elTooltipCopy }, |
| | | components: { elTooltipCopy,CreateQRcode }, |
| | | name: 'TicketPage', |
| | | data() { |
| | | return { |
| | |
| | | this.currentDetail.processingDetail = this.currentDetail.content; |
| | | this.handleViewDetail(this.currentDetail); |
| | | |
| | | |
| | | // 如果使用地图组件,需要更新地图标记 |
| | | this.$nextTick(() => { |
| | | if (this.$refs.MapContainer && this.currentDetail.location) { |
| | | this.$refs.MapContainer.initAddEntity('point', this.currentDetail.location); |
| | | } |
| | | }); |
| | | }, |
| | | async handleQRCode (val){ |
| | | val.showQR = !val.showQR |
| | | console.log('this.currentDetailvvvvv',val); |
| | | |
| | | }, |
| | | async loadAMapScripts() { |
| | | try { |
| | |
| | | this.currentDetail = { |
| | | ...detailData, |
| | | // address: null, |
| | | showQR: false, |
| | | latAndLon: _.round(detailData.location[0], 6) + ',' + _.round(detailData.location[1], 6), |
| | | }; |
| | | |
| | | console.log('this.currentDetail', this.currentDetail); |
| | | this.detailVisible = true; |
| | | this.handleTypeChange(this.currentDetail.type) |
| | | console.log('this.currentDetail.location',this.currentDetail.location); |
| | | |
| | | this.$nextTick(() => { |
| | | if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) { |
| | | this.$refs.MapContainer.initAddEntity('point', this.currentDetail.location); |
| | |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .custom-dialog { max-height: 96vh; /* 80% 视口高度 */} |
| | | .custom-dialog { max-height: 96vh; } |
| | | .custom-qrcode-popover { |
| | | min-width: 120px !important; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | |
| | |
| | | .media-title { |
| | | font-weight: bold; |
| | | margin-bottom: 5px; |
| | | display: flex; |
| | | align-items: center; |
| | | .QRCodeImg{ |
| | | width: 18px; |
| | | height: 18px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .media-content { |