| | |
| | | <template v-if="info.status == 1">
|
| | | <view class="line">
|
| | | <div class="la">巡检结果:</div>
|
| | | <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '正常' : '异常' }}</div>
|
| | | <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '正常' : '异常' }}
|
| | | </div>
|
| | | </view>
|
| | | <view class="line">
|
| | | <div class="la">巡检时间:</div>
|
| | |
| | | </view>
|
| | | <!-- -->
|
| | | <view v-if="info.status == 1" class="content">
|
| | | <view class="title">巡检记录</view> |
| | | <view class="files"> |
| | | <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in info.multifileList" :key="i"> |
| | | <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image> |
| | | <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video> |
| | | </view> |
| | | <view class="title">巡检记录</view>
|
| | | <view class="files">
|
| | | <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in info.multifileList" :key="i">
|
| | | <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
|
| | | <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
|
| | | </view>
|
| | | </view>
|
| | | <view class="desc">{{ info.dealInfo }}</view>
|
| | | <view class="line line_s">
|
| | |
| | | <u-icon name="arrow-right"></u-icon>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="df_sb">
|
| | | <view class="">巡检结果</view>
|
| | | <view class="df_ac" @click="isShowRes = true" v-if="handleParam.dealDate">
|
| | | {{ handleParam.dealName }}
|
| | | <u-icon name="arrow-right"></u-icon>
|
| | | </view>
|
| | | </view>
|
| | | <view class="label">
|
| | | 上传图片/视频
|
| | | </view>
|
| | |
| | | <view class="label">处理说明</view>
|
| | | <textarea v-model="handleParam.dealInfo" placeholder="请填写处理说明" placeholder-class="placeholder9" />
|
| | | </view>
|
| | | </view> |
| | | </view>
|
| | | <view class="sub_btn" @click="onSubmit">确认巡检</view>
|
| | | <!-- -->
|
| | | <u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay>
|
| | |
| | | <!-- -->
|
| | | <u-datetime-picker :minDate="new Date().getTime()" :show="isShowHandleDate" @confirm="confirmHandleDate"
|
| | | @cancel="isShowHandleDate = false" mode="datetime"></u-datetime-picker>
|
| | | <u-picker :show="isShowRes" keyName="name" @cancel="isShowRes = false" @confirm='confirmRes'
|
| | | :columns="columns"></u-picker>
|
| | |
|
| | | </view>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import {
|
| | | uploadUrl, |
| | | ywPatrolPointDetail, |
| | | uploadUrl,
|
| | | ywPatrolPointDetail,
|
| | | patrolData
|
| | | } from '@/api'
|
| | | import dayjs from 'dayjs';
|
| | | export default {
|
| | | data() {
|
| | | return { |
| | | id: '', |
| | | return {
|
| | | id: '',
|
| | | info: {},
|
| | | isShowRes: false,
|
| | | showUpload: false,
|
| | | isShowHandle: false,
|
| | | isShowHandleDate: false,
|
| | | handleParam: { |
| | | dealStatus: 1 |
| | | handleParam: {
|
| | | dealStatus: 0,
|
| | | dealName: '正常'
|
| | | },
|
| | | fileList: []
|
| | | fileList: [],
|
| | | columns: [
|
| | | [{
|
| | | id: 0,
|
| | | name: '正常'
|
| | | },
|
| | | {
|
| | | id: 1,
|
| | | name: '异常'
|
| | | },
|
| | | {
|
| | | id: '',
|
| | | name: '跳过'
|
| | | },
|
| | | ]
|
| | | ],
|
| | | };
|
| | | }, |
| | | onLoad(option) { |
| | | this.id = option.id |
| | | this.getDetail() |
| | | this.$set(this.handleParam, 'dealDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) |
| | | },
|
| | | onLoad(option) {
|
| | | this.id = option.id
|
| | | this.getDetail()
|
| | | this.$set(this.handleParam, 'dealDate', dayjs().format('YYYY-MM-DD HH:mm:ss'))
|
| | | },
|
| | | methods: {
|
| | | onSubmit() { |
| | | const { handleParam, fileList, id } = this
|
| | | patrolData({ |
| | | ...handleParam, |
| | | multifileList: fileList, |
| | | id, |
| | | }).then(res => { |
| | | this.showToast('操作成功') |
| | | uni.navigateBack() |
| | | onSubmit() {
|
| | | const {
|
| | | handleParam,
|
| | | fileList,
|
| | | id
|
| | | } = this
|
| | | if (handleParam.dealStatus == 1) {
|
| | | return uni.showModal({
|
| | | title: '温馨提示',
|
| | | content: '巡检结果异常,是否前往提交工单?',
|
| | | success: function(res) {
|
| | | if (res.confirm) {
|
| | | patrolData({
|
| | | ...handleParam,
|
| | | multifileList: fileList,
|
| | | id,
|
| | | }).then(res => {
|
| | | this.showToast('操作成功')
|
| | | uni.navigateBack()
|
| | | })
|
| | | }
|
| | | }
|
| | | });
|
| | | } else {
|
| | | patrolData({
|
| | | ...handleParam,
|
| | | multifileList: fileList,
|
| | | id,
|
| | | }).then(res => {
|
| | | this.showToast('操作成功')
|
| | | uni.navigateBack()
|
| | | })
|
| | | }
|
| | |
|
| | | },
|
| | | getDetail() {
|
| | | const {
|
| | | id
|
| | | } = this
|
| | | ywPatrolPointDetail(id).then(res => {
|
| | | this.info = res.data
|
| | | })
|
| | | }, |
| | | getDetail(){ |
| | | const { id } = this |
| | | ywPatrolPointDetail(id).then(res => { |
| | | this.info = res.data |
| | | }) |
| | | },
|
| | | callPhone() {
|
| | | uni.makePhoneCall({
|
| | |
| | | confirmHandleDate(e) {
|
| | | this.$set(this.handleParam, 'dealDate', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'));
|
| | | this.isShowHandleDate = false;
|
| | | },
|
| | | confirmRes(e) {
|
| | | this.$set(this.handleParam, 'dealStatus', e.value[0].id)
|
| | | this.$set(this.handleParam, 'dealName', e.value[0].name)
|
| | | this.isShowRes = false
|
| | | },
|
| | | fileDel(str, i) {
|
| | | this[str].splice(i, 1);
|
| | |
| | | text-align: center;
|
| | | }
|
| | | }
|
| | | .sub_btn{ |
| | | position: fixed; |
| | | bottom: 68rpx; |
| | | left: 40rpx; |
| | | width: 670rpx; |
| | | height: 88rpx; |
| | | background: $primaryColor; |
| | | box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,104,255,0.3); |
| | | border-radius: 44rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #FFFFFF; |
| | |
|
| | | .sub_btn {
|
| | | position: fixed;
|
| | | bottom: 68rpx;
|
| | | left: 40rpx;
|
| | | width: 670rpx;
|
| | | height: 88rpx;
|
| | | background: $primaryColor;
|
| | | box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3);
|
| | | border-radius: 44rpx;
|
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: center;
|
| | | font-weight: 500;
|
| | | font-size: 32rpx;
|
| | | color: #FFFFFF;
|
| | | }
|
| | |
|
| | | .appr_modal {
|
| | | .label {
|
| | | text {
|
| | |
| | | margin-bottom: 30rpx;
|
| | | }
|
| | |
|
| | | } |
| | | .files{ |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 156rpx; |
| | | height: 156rpx; |
| | | margin-right: 24rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | position: relative; |
| | | |
| | | .close { |
| | | position: absolute; |
| | | right: -20rpx; |
| | | top: -20rpx; |
| | | z-index: 9999; |
| | | } |
| | | |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | video { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | }
|
| | |
|
| | | .files {
|
| | | display: flex;
|
| | | margin-bottom: 20rpx;
|
| | | }
|
| | |
|
| | | .adduser_list_item_ipt1_upload {
|
| | | margin-top: 24rpx;
|
| | | width: 156rpx;
|
| | | height: 156rpx;
|
| | | margin-right: 24rpx;
|
| | | border: 2rpx solid #e5e5e5;
|
| | | background: #f7f7f7;
|
| | | color: #666666;
|
| | | font-size: 22rpx;
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | align-items: center;
|
| | | justify-content: center;
|
| | | position: relative;
|
| | |
|
| | | .close {
|
| | | position: absolute;
|
| | | right: -20rpx;
|
| | | top: -20rpx;
|
| | | z-index: 9999;
|
| | | }
|
| | |
|
| | | image {
|
| | | width: 100%;
|
| | | height: 100%;
|
| | | }
|
| | |
|
| | | video {
|
| | | width: 100%;
|
| | | height: 100%;
|
| | | }
|
| | | }
|
| | | </style> |