123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <template>
- <view class="">
- <navInfo :title="'隐患详情'"></navInfo>
- <view class="bgTopImg">
- <image slot="right" :src="`${urls}/navBg@2x.png`" class="bgTopImg"></image>
- </view>
- <view class=" uni-container">
- <view class=" flex flex-direction width100">
- <!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
- <u--form ref="uForm" :model="formData" labelPosition="left" labelWidth="90" labelAlign="left" class="time-main">
- <view class="main-times">
- <u-form-item label="检查项名称" prop="name" ref="item1" class="par-time time-axis">
- <text class="text-1cut padding-sm">{{formData.inspName}}</text>
- </u-form-item>
- <u-form-item label="检查日期" prop="inspectTime" ref="item1">
- <text class="text-1cut padding-sm"> {{formData.inspectTime}} </text>
- </u-form-item>
- <u-form-item label="检查内容" prop="description" ref="item1">
- <text class=" padding-sm"> {{formData.description}}</text>
- </u-form-item>
- <view class="dashedBox">
- <view class="dashedLine">
- </view>
- </view>
- <u-form-item label="检查结果" prop="result" ref="item1" labelPosition="top" class="par-time time-axis">
- <view class="flex flex-wrap padding-top-sm ">
- <view v-for="(item,index) in formData.hisResultList" :key="index"
- class="flex flex-direction-row align-center padding-lr-sm">
- <u--image :showLoading="true" :src="item.resValue==1?zhengchang:moren" width="34rpx" height="34rpx"></u--image>
- <text class="text-1cut padding-left-sm ">{{item.resLable}}</text>
- </view>
- </view>
- </u-form-item>
- <view class="padding-top-sm">
- <view>
- <text ><text>现场照片:</text></text>
- <view class="padding-tb-sm">
- <view class="dashedBox ">
- <view class="dashedLine">
- </view>
- </view>
- </view>
- <view class=" flex flex-direction-row">
- <view class="padding-lr-lg" v-for="(item,index) in formData.imgUrlList" :key="index">
- <image :src="item.imgUrl" style="width:120rpx;height: 120rpx;" @click="viewImageBig(item.imgUrl)"></image>
- <!-- <u-album :urls="item.imgUrl"></u-album> 不显示-->
- </view>
- </view>
- </view>
- </view>
- </view>
- </u--form>
- </view>
- <!-- 加载中 -->
- <isLodingModel></isLodingModel>
- </view>
- </view>
- </template>
- <script>
- import navInfo from '@/pagesA/components/my-nav/nav'
- import {
- getOneDenger, // 获得单个隐患详情
- } from "@/api/hiddenTrouble";
- import {
- dangerDetailbyFpd, // 隐患查看详情(消防设施)
- dangerDetail // 隐患查看详情
- } from "@/api/hiddenTrouble";
- import {
- uploadAvatar
- } from "@/api/system/user"
- import {
- DICT_TYPE,
- getDictDatas
- } from "@/utils/dict";
- import {
- viewImgBig
- } from '@/utils/common.js';
- let that = null;
- import config from '@/config'
- const baseUrlImg=config.baseUrlImg
- export default {
- components: {
- navInfo
- },
- data() {
- return {
- urls:baseUrlImg,
- moren: `${baseUrlImg}/checkActive/moren.png`, //默认图片
- zhengchang: `${baseUrlImg}/checkActive/zhengchang.png`,
- // 数据加载中
- loading: false,
- formData:{},
- // 自定义表单数据
- // formData: {
- // id: '',
- // name: '',
- // position: '',
- // time: '',
- // description: '',
- // status: '',
- // people: '',
- // imgUrlList: [],
- // },
- }
- },
- watch: {
- loading: {
- handler(newLength, oldLength) {
- this.$modal.isLoadingModel(this.loading)
- },
- immediate: true
- }
- },
- computed: {},
- //目的页面接收
- //这里用onshow()也可以
- onLoad(options) {
- var data = options.id;
- this.getData(data)
- },
- onReady() {},
- methods: {
- viewImageBig(i) {
- let imgList=[]
- imgList.push(i)
- uni.previewImage({
- urls: imgList,
- current: i
- });
- },
- // =================数据转换==================
- // =============获取数据===================s
- // =============获取数据===================s
- // 获取数据
- getData(id) {
- this.loading = true
- dangerDetail({
- dangerId: id
- }).then(response => {
- // 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
- this.formData = response.data ? response.data : {},
- this.loading = false;
- });
- },
- }
- }
- </script>
- <style lang="scss">
- .buttomBorder {
- height: 0px;
- border: 1px dashed #CBD5E1;
- }
- .dashedBox {
- padding: 0px 30rpx;
- }
- .dashedLine {
- height: 3px;
- background-image: linear-gradient(to right, #d7d6d6 0%, #d7d6d6 50%, rgba(196, 196, 196, 0) 50%);
- background-size: 40px 2px;
- background-repeat: repeat-x;
- }
- .itemunirow {
- .uni-row {
- padding-bottom: 10px;
- }
- }
- .uni-container {
- padding: 10px;
- border-radius: 30px 30px 0px 0px;
- background: #fff;
- /*#ifdef H5*/
- margin-top: 50rpx;
- /* #endif */
- /* #ifdef MP-WEIXIN*/
- margin-top: 100rpx;
- /* #endif */
- z-index: 99;
- position: relative;
- }
- .main-times{
- list-style: none;
- position: relative;
- }
- .main-times::before{
- content: "";
- position: absolute;
- border:4rpx dashed rgba(33, 191, 208, 0.2) ;
- left: -76rpx;
- height: calc(100% - 20px);
- top: 54rpx;
- }
- </style>
|