123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400 |
- <template>
- <view class="container uni-container" v-if="Object.keys(tableData).length != 0">
- <!-- <navInfo :title="'每日巡查详情'"></navInfo>
- <view class="bgTopImg">
- <image slot="right" src="@/static/images/navBg@2x.png" class="bgTopImg"></image>
- </view> -->
- <view style="margin-bottom: 150rpx;">
- <view>
- <view class="nav" style="color:#4CB2B6;">信息来源</view>
- <view class="main">
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">任务名称</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe">{{tableData.taskInfo.taskName}}</text>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">所属单位</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe">{{tableData.inspectInfo.orgId}}</text>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">接收者</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe"
- v-if="tableData.receiverInfo!=null">{{tableData.receiverInfo.empRyxm}}</text>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">发送者</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe"
- v-if="tableData.senderInfo!=null">{{tableData.senderInfo.empRyxm}}</text>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">任务类型</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe">{{taskleiXing}}</text>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">检查日期</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe" v-if="tableData.inspectInfo">{{tableData.inspectInfo.createTime}}</text>
- </uni-col>
- </uni-row>
- <!-- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">是否上报</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe">{{tableData.taskInfo.taskType}}</text>
- </uni-col>
- </uni-row> -->
- <uni-row class="demo-uni-row" v-if="tableData.taskInfo.attId!=null">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">附件</text>
- </uni-col>
- <uni-col :span="14">
- <text style="color:#00a3f4;" @click.native="down(tableData.taskInfo.attId)">点击预览文件</text>
- </uni-col>
- </uni-row>
- </view>
- </view>
- <!-- <view v-if="tableData.inspectInfo.length!=0" style="margin-top: 30rpx;"> -->
- <view class="nav" style="color:#4CB2B6;">处理详情</view>
- <view class="main" style="margin-bottom: 40rpx;">
- <view v-if="tableData.fpdInfoList.length==0">
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles" style="font-weight: 600;color:#274647;">检查项目</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe"
- style="font-weight: 600;color:#274647;">{{tableData.inspectInfo.inspName}}</text>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text
- class="text-df text-1cut middles">{{tableData.inspectInfo.isdenger==1?'检查隐患描述':'检查描述'}}</text>
- </uni-col>
- <uni-col :span="14">
- <text
- class="text-descibe">{{tableData.inspectInfo.isdenger==1?tableData.inspectInfo.description:'正常'}}</text>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">检查结果</text>
- </uni-col>
- <uni-col :span="14" style="display: flex;flex-wrap: wrap;">
- <view v-for="(items2,indexs2) in tableData.hisResult" :key="indexs2"
- style="margin-right: 10rpx;">
- <image v-if="items2.resValue==1" :src="zhengchang" class="tupian"
- style="vertical-align:middle;margin-right: 6rpx;" />
- <text v-if="items2.resValue==1" class="text-descibe">{{items2.resLable}}</text>
- </view>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row tupian-flex">
- <view v-for="(items,indexs) in tableData.imgList">
- <image v-if="items.imgUrl" :key="indexs" :src="items.imgUrl" class="image-size"></image>
- </view>
- </uni-row>
- </view>
- <view v-if="tableData.fpdInfoList.length>0">
- <view v-for="(item,index) in tableData.fpdInfoList">
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles"
- style="font-weight: 600;color:#274647;">检查项目{{index+1}}</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe"
- style="font-weight: 600;color:#274647;">{{item.fpd_name}}</text>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles"
- style="color:#274647;font-weight: 500;">{{`(${index+1})`}}设备名称</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe" style="color:#274647;">{{item.fpd_code}}</text>
- </uni-col>
- </uni-row>
- <view>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">检查结果</text>
- </uni-col>
- <uni-col :span="14" style="display: flex;flex-wrap: wrap;">
- <view v-for="(items2,indexs2) in item.hisFpdResult" :key="indexs2"
- style="margin-right: 10rpx;">
- <image v-if="items2.resValue==1" :src="zhengchang" class="tupian"
- style="vertical-align:middle;margin-right: 6rpx;" />
- <text v-if="items2.resValue==1" class="text-descibe">{{items2.resLable}}</text>
- </view>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col :span="10">
- <text class="text-df text-1cut middles">{{item.fpd_type==1?'检查隐患描述':'检查描述'}}</text>
- </uni-col>
- <uni-col :span="14">
- <text class="text-descibe">{{item.isdanger==1?item.danger_describe:'正常'}}</text>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row tupian-flex">
- <image v-if="item.img_url1" :src="item.img_url1" class="image-size"></image>
- <image v-if="item.img_url2" :src="item.img_url2" class="image-size"></image>
- <image v-if="item.img_url3" :src="item.img_url3" class="image-size"></image>
- </uni-row>
- </view>
- </view>
- </view>
- </view>
- <!-- </view> -->
- </view>
- </view>
- </template>
- <script>
- let that = null;
- import {
- getInspEcthisDetail,
- } from '@/api/check_record';
- import {
- getInsHisImgurl,
- } from '@/api/check_record';
- import {
- checkType,
- downSee
- } from '@/utils/common'
- import {
- shijianc
- } from '@/utils/common.js'
- import { DICT_TYPE, getDictDatas } from '@/utils/dict';
- import config from '@/config'
- const baseUrlImg = config.baseUrlImg
- export default {
- data() {
- return {
- tableData: {},
- // 数据加载中
- loading: false,
- dictTypeData: 'dict_inspect_type',
- dictTypeValue: '',
- moren: `${baseUrlImg}/checkActive/moren.png`, //默认图片
- zhengchang: `${baseUrlImg}/checkActive/zhengchang.png`,
- my: '',
- taskleiXingArr:getDictDatas(DICT_TYPE.TASK_TYPE),
- taskleiXing:""
- };
- },
- watch: {
- loading: {
- handler(newLength, oldLength) {
- this.$modal.isLoadingModel(this.loading)
- },
- immediate: true
- }
- },
- // 在 vue页面,向起始页通过事件传递数据
- onLoad(options) {
- if (options.items) {
- this.my = JSON.parse(options.items)
- console.log(this.my, 'jjjj');
- } else {
- var data = options.id;
- console.log(data)
- this.getData(data)
- }
- },
- methods: {
- down(val){
- downSee(val)
- },
- getData(id) {
- // uni.redirectTo({
- // url: `/pagesA/fire/check_record/index?my=${this.my}`
- // });
- console.log('id', id);
- this.loading = true
- getInspEcthisDetail({
- hisId: id
- }).then(response => {
- this.loading = false;
- // 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
- this.tableData = response.data ? response.data : {},
- this.taskleiXingArr.map(i=>{
- if(i.value=this.tableData.taskInfo.taskType){
- this.taskleiXing=i.label
- }
-
- })
- this.tableData.inspectInfo.createTime=shijianc(this.tableData.inspectInfo.createTime)
- console.log(this.tableData, 'responseresponse')
- // this.dictTypeValue = this.tableData.inspType
- // this.tableData.inspType = checkType(this.dictTypeData, this.dictTypeValue)
- // this.times = this.tableData.taskInfo ? shijianc(this.tableData.taskInfo.publishTime) : ''
- });
- getInsHisImgurl({
- hisId: id,
- }).then(response => {
- console.log('response', response);
- this.tableData.url = response.data
- });
- },
- // get() {
- // const data = uni.getStorageSync('getlistSimpleDict_key')
- // const e = data.map(v =>{
- // if (this.dictTypeValue == v.value && this.dictTypeData == v.dictType) {
- // console.log(v.lable,'sdddddddd')
- // }
- // }
- // )
- // },
- // =================数据转换==================
- statusListTran(val) { //status状态转换
- // return this.statusList[val]
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- .container {
- // border-radius: 30px 30px 0px 0px;
- // background: #fff;
- // margin-top: 90rpx;
- // z-index: 9999;
- // position: relative;
- .uni-container {
- padding-bottom: 120rpx;
- margin-top: 50rpx;
- height: 100%;
- border-top-right-radius: 40rpx;
- border-top-left-radius: 40rpx;
- background-color: #fff;
- }
- }
- page{
- background-color: #f5f7f9;
- }
- .zhuangtai {
- padding: 5rpx 20rpx;
- border-radius: 2px;
- }
- .weiwan {
- color: #D51A52;
- background: rgba(213, 26, 82, 0.2);
- border: 1px solid #D51A52;
- }
- .yiwan {
- color: #4CB2B6;
- background: rgba(76, 178, 182, 0.2);
- border: 1px solid #4CB2B6;
- }
- .shenhe {
- color: #3491FA;
- background: rgba(52, 145, 250, 0.2);
- border: 1px solid #4CB2B6;
- }
- .juli-top {
- margin: 20rpx 0 20rpx 0;
- }
- .image-size {
- width: 160rpx;
- height: 160rpx;
- border-radius: 10rpx;
- margin: 0 15rpx 20rpx 0;
- }
- .tupian {
- width: 38rpx;
- height: 38rpx;
- }
- .tupian-flex {
- display: flex;
- justify-content: space-around;
- flex-wrap: wrap;
- }
- //新样式
- .main {
- border: 4rpx solid rgb(192, 203, 218);
- border-radius: 10rpx;
- .demo-uni-row,
- /deep/.uni-row {
- width: 96%;
- margin: 0 2% !important;
- padding: 20rpx 0;
- border-bottom: 2rpx solid rgb(174, 174, 174);
- }
- /deep/.uni-row:last-child {
- border: 0;
- }
- .middles {
- text-align: center !important;
- }
- .buju {
- margin: 40rpx;
- line-height: 40rpx;
- .miaoshu {
- margin-right: 20rpx;
- color: #274647;
- font-size: 30rpx;
- }
- .text-descibe {
- color: rgb(102, 103, 133);
- font-size: 28rpx;
- }
- }
- }
- .nav {
- font-size: 36rpx;
- color: #4CB2B6;
- margin-bottom: 20rpx;
- }
- </style>
|