| | |
| | | <!-- 图片和地图部分 --> |
| | | <div class="media-section"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-col :span="1"><div class="leftBtn" @click="leftClick"><</div></el-col> |
| | | <el-col :span="11"> |
| | | <div class="media-box"> |
| | | <div class="media-title">事件图片</div> |
| | | <div class="media-content"> |
| | |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-col :span="11"> |
| | | <div class="media-box"> |
| | | <!-- 根据状态显示不同的标题和内容 --> |
| | | |
| | | <template v-if="currentDetail.status === 4"> |
| | | <div class="media-title">工单处理图片</div> |
| | | <div class="media-content"> |
| | |
| | | </template> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="1"><div class="leftBtn" @click="rightClick">></div></el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | |
| | | name: 'TicketPage', |
| | | data () { |
| | | return { |
| | | currentIndex: 0, // 当前显示的数据索引 |
| | | submitLoading: false, // 新增loading状态 |
| | | draftLoading: false, |
| | | approveLoading: false, |
| | |
| | | console.log('permission.tickets_processing_btn', this.permission.tickets_processing_btn) |
| | | console.log('permission', this.permission.tickets_tab_pending) |
| | | }, |
| | | |
| | | mounted () { |
| | | |
| | | const href = this.$route.href |
| | | let curQueryParams = {} |
| | | |
| | |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | leftClick() { |
| | | if (this.tableData.length === 0) return |
| | | if(this.currentIndex === 0) return |
| | | this.currentIndex = (this.currentIndex - 1 + this.tableData.length) % this.tableData.length |
| | | console.log('left', this.currentIndex); |
| | | this.updateCurrentDetail() |
| | | |
| | | }, |
| | | |
| | | // 右切换 |
| | | rightClick() { |
| | | if (this.tableData.length === 0) return |
| | | if(this.currentIndex >= this.tableData.length-1) return |
| | | this.currentIndex = (this.currentIndex + 1) % this.tableData.length |
| | | console.log('right', this.currentIndex); |
| | | this.updateCurrentDetail() |
| | | |
| | | }, |
| | | |
| | | // 更新当前详情 |
| | | updateCurrentDetail() { |
| | | this.currentDetail = this.tableData[this.currentIndex] |
| | | this.currentDetail.mediaUrl = this.currentDetail.photo_url |
| | | console.log('this.currentDetail',this.currentDetail); |
| | | |
| | | // 如果使用地图组件,需要更新地图标记 |
| | | this.$nextTick(() => { |
| | | if (this.$refs.MapContainer && this.currentDetail.location) { |
| | | this.$refs.MapContainer.initAddEntity('point', this.currentDetail.location) |
| | | } |
| | | }) |
| | | }, |
| | | async loadAMapScripts () { |
| | | try { |
| | | const areaCode = this.userInfo.detail.areaCode |
| | |
| | | isReview: item.is_review, // 添加复核状态字段映射 |
| | | } |
| | | }) |
| | | // console.log('this.tableData',this.tableData); |
| | | |
| | | // 更新总数显示 |
| | | this.page.total = total || 0 |
| | |
| | | * @returns {string} 缩略图地址 |
| | | */ |
| | | getThumbUrl (url) { |
| | | |
| | | |
| | | if (!url) return '' |
| | | const lastDot = url.lastIndexOf('.') |
| | | if (lastDot === -1) return url |
| | |
| | | |
| | | .el-row { |
| | | margin-bottom: 16px; |
| | | |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | |
| | | |
| | | .media-section { |
| | | margin-bottom: 20px; |
| | | } |
| | | .el-row { |
| | | display: flex; |
| | | align-items: center;} |
| | | |
| | | } |
| | | .leftBtn { |
| | | width: 36px; |
| | | height: 36px; |
| | | background-color: #999; |
| | | border-radius: 50%; |
| | | text-align: center; |
| | | line-height: 36px; |
| | | color: #fff; |
| | | cursor: pointer; |
| | | } |
| | | .media-box { |
| | | width: 100%; |
| | | border: 1px solid #dcdfe6; |