| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <!--
- * @Title:
- * @Description: 巡查历史信息
- * @Author: swp
- * @Date: 2022-08-24 10:49:21
- * @LastEditors:
- * @LastEditTime: 2022-08-24 10:49:21
- -->
- <template>
- <view class="wrap">
- <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
- @clickLeft="toBack">
- <view class="nav-title">
- <text>{{title}}</text>
- </view>
- </uni-nav-bar>
- <view class="container">
- <uni-card title="行政区及危险区">
- <view class="list-item-block">
- <view class="line">
- <text class="text text-ellipsis">行政区:{{data.adName}}</text>
- </view>
- <view class="line">
- <text class="text text-ellipsis">危险区:{{data.dangerAreaName}}</text>
- </view>
- </view>
- </uni-card>
- <uni-card title="定位信息">
- <view class="list-item-block">
- <view class="line">
- <text class="text text-ellipsis">经纬度:{{data.longitude}},{{data.latitude}}</text>
- </view>
- <view class="line">
- <text class="text text-ellipsis">定位地址:{{data.address}}</text>
- </view>
- <view class="line">
- <text class="text text-ellipsis">山洪沟名称:{{data.riverName}}</text>
- </view>
- </view>
- </uni-card>
- <uni-card title="巡查反馈">
- <view class="list-item-block">
- <view class="line">
- <text v-if="data.isFlood==1" class="text">是否有山洪:有</text>
- <text v-else class="text">是否有山洪:无</text>
- </view>
- <view class="line">
- <text v-if="data.isDamage==1" class="text">是否成灾:是</text>
- <text v-else class="text">是否成灾:否</text>
- </view>
- <view v-if="data.isWarn ==1" class="line">
- <text class="text">是否预警:是</text>
- </view>
- <view v-else class="line">
- <text class="text">是否预警:否</text>
- </view>
- <view v-if="data.isWarn ==1" class="line">
- <text class="text">预警信息:{{data.warnInfo}}</text>
- </view>
- <view v-if="data.isTransfer ==1" class="line">
- <text class="text">是否转移:是</text>
- </view>
- <view v-else class="line">
- <text class="text">是否转移:否</text>
- </view>
- <view v-if="data.isTransfer ==1" class="line">
- <text class="text">转移信息:{{data.transferInfo}}</text>
- </view>
- <view class="line">
- <text class="text">备注:{{data.remark}}</text>
- </view>
- </view>
- </uni-card>
- <uni-card title="巡查照片">
- <view class="view-flex-cc">
- <image v-for="(item, index) in checkPhotos" :key="index" class="cover-image" mode="widthFix"
- style="width: 100%;margin-bottom: 10px;" :src="toOss(item)">
- </image>
- </view>
- </uni-card>
- </view>
- </view>
- </template>
- <script>
- // import {
- // role
- // } from "@/api/role.js";
- import http from '@/http/api.js';
- import {
- oss
- } from '@/common/setting';
- export default {
- components: {},
- onLoad(option) {
- let params = {};
- params['id'] = option.id;
- this.getDetail(params);
- },
- data() {
- return {
- title: '巡查详情',
- pageSize: 10,
- pageCurrent: 1,
- total: 0,
- list: [],
- query: {},
- checkPhotos: [],
- data: {},
- }
- },
- computed: {},
- onShow() {},
- methods: {
- toOss(path) {
- return oss + path;
- },
- //返回上一页
- toBack() {
- uni.navigateBack({
- delta: 1
- })
- },
- // 分页触发
- pageChange(e) {
- this.pageCurrent = e.current;
- this.getPage()
- },
- getDetail(params = {}) {
- //console.log("111" + JSON.stringify(params))
- let that = this;
- Object.assign(this.query, params);
- http.request({
- url: '/galaxy-business/yj/check/detail',
- method: 'GET',
- params: this.query
- }).then(res => {
- if (res.success) {
- //console.log(JSON.stringify(res))
- that.data = res.data;
- let photos = res.data['checkPhotos'];
- if (null != photos && photos.length > 0) {
- let photoList = photos.split(",");
- that.checkPhotos = photoList;
- }
- }
- }).catch(err => {
- console.log(err)
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- </style>
|