From f956955c38a67f968977b7d784ff016ab5b17223 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期六, 30 十一月 2024 16:12:26 +0800
Subject: [PATCH] ll
---
h5/pages/polling/point.vue | 158 ++++++++++++++++++++++++++++++++--------------------
1 files changed, 96 insertions(+), 62 deletions(-)
diff --git a/h5/pages/polling/point.vue b/h5/pages/polling/point.vue
index 6a97c8a..1df5fef 100644
--- a/h5/pages/polling/point.vue
+++ b/h5/pages/polling/point.vue
@@ -2,45 +2,51 @@
<view class="main_app">
<view class="info">
<view class="head">
- <view class="">宸℃鐐�</view>
- <view class="status">宸插贰妫�</view>
+ <view class="">{{ info.pointName }}</view>
+ <view class="status" :class="{primaryColor: info.status == 0}">{{ info.status == 1 ? '宸插贰妫�' : '寰呭贰妫�' }}</view>
</view>
- <template v-if="false">
+ <template v-if="info.status == 1">
<view class="line">
<div class="la">宸℃缁撴灉锛�</div>
- <div class="val">姝e父</div>
+ <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '姝e父' : '寮傚父' }}</div>
</view>
<view class="line">
<div class="la">宸℃鏃堕棿锛�</div>
- <div class="val">2022</div>
+ <div class="val">{{ info.dealDate }}</div>
</view>
</template>
<template v-else>
<view class="desc">
- 宸℃鍐呭
+ {{ info.content }}
</view>
</template>
</view>
<!-- -->
- <view v-if="false" class="content">
- <view class="title">宸℃璁板綍</view>
- <view class="desc">宸茬粡鏇存崲鐏场</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>
+ <view class="desc">{{ info.dealInfo }}</view>
<view class="line line_s">
<view class="la">宸℃浜猴細</view>
- <view class="val">xxx</view>
+ <view class="val">{{ info.realname }}</view>
</view>
<view class="line line_s">
<view class="la">宸℃鏃堕棿锛�</view>
- <view class="val">xxx</view>
+ <view class="val">{{ info.dealDate }}</view>
</view>
</view>
<view v-else class="content">
<view class="title">宸℃澶勭悊</view>
<view class="appr_modal">
<view class="df_sb">
- <view>澶勭悊鏃堕棿</view>
- <view class="df_ac" @click="isShowHandleDate = true" v-if="handleParam.dealTime">
- {{ handleParam.dealTime }}
+ <view><text class="red">*</text>澶勭悊鏃堕棿</view>
+ <view class="df_ac" @click="isShowHandleDate = true" v-if="handleParam.dealDate">
+ {{ handleParam.dealDate }}
<u-icon name="arrow-right"></u-icon>
</view>
<view @click="isShowHandleDate = true" v-else class="placeholder9 df_ac">
@@ -50,7 +56,6 @@
</view>
<view class="label">
- <text>*</text>
涓婁紶鍥剧墖/瑙嗛
</view>
<view class="upload_wrap">
@@ -58,19 +63,19 @@
<u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon>
<view class="mt6">鍥剧墖/瑙嗛</view>
</view>
- <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in dealFileList" :key="i">
+ <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in fileList" :key="i">
<u-icon class="close" size="20" name="close-circle-fill" color="red"
- @click="fileDel('dealBeforeFileList', i)"></u-icon>
+ @click="fileDel('fileList', i)"></u-icon>
<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="label">澶勭悊璇存槑</view>
- <textarea v-model="handleParam.checkInfo" placeholder="璇峰~鍐欏鐞嗚鏄�" placeholder-class="placeholder9" />
+ <textarea v-model="handleParam.dealInfo" placeholder="璇峰~鍐欏鐞嗚鏄�" placeholder-class="placeholder9" />
</view>
</view>
- <view class="sub_btn">纭宸℃</view>
+ <view class="sub_btn" @click="onSubmit">纭宸℃</view>
<!-- -->
<u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay>
<view class="sel_upload_wrap">
@@ -86,22 +91,47 @@
<script>
import {
- uploadUrl
+ uploadUrl,
+ ywPatrolPointDetail,
+ patrolData
} from '@/api'
import dayjs from 'dayjs';
export default {
data() {
- return {
+ return {
+ id: '',
+ info: {},
showUpload: false,
isShowHandle: false,
isShowHandleDate: false,
- handleParam: {},
- dealFileList: []
+ handleParam: {
+ dealStatus: 1
+ },
+ fileList: []
};
+ },
+ onLoad(option) {
+ this.id = option.id
+ this.getDetail()
+ this.$set(this.handleParam, 'dealDate', dayjs().format('YYYY-MM-DD HH:mm:ss'))
},
methods: {
- onSubmit() {
-
+ onSubmit() {
+ const { handleParam, fileList, id } = this
+ patrolData({
+ ...handleParam,
+ multifileList: fileList,
+ id,
+ }).then(res => {
+ this.showToast('鎿嶄綔鎴愬姛')
+ uni.navigateBack()
+ })
+ },
+ getDetail(){
+ const { id } = this
+ ywPatrolPointDetail(id).then(res => {
+ this.info = res.data
+ })
},
callPhone() {
uni.makePhoneCall({
@@ -109,7 +139,7 @@
});
},
confirmHandleDate(e) {
- this.$set(this.handleParam, 'dealTime', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'));
+ this.$set(this.handleParam, 'dealDate', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'));
this.isShowHandleDate = false;
},
fileDel(str, i) {
@@ -137,7 +167,7 @@
files: imgs,
name: 'file',
formData: {
- folder: 'HIDDEN_DANGER_FILE'
+ folder: 'YW_PATROL'
},
header: {
Dm_user_token: token
@@ -149,7 +179,7 @@
i.type = 0;
i.fileurl = i.imgaddr;
i.fileurlFull = i.url;
- this.submitFileList.push(i);
+ this.fileList.push(i);
});
}
},
@@ -183,7 +213,7 @@
},
name: 'file',
formData: {
- folder: 'HIDDEN_DANGER_FILE'
+ folder: 'YW_PATROL'
},
success: uploadFileRes => {
let res = JSON.parse(uploadFileRes.data);
@@ -192,7 +222,7 @@
i.type = 1;
i.fileurl = i.imgaddr;
i.fileurlFull = i.url;
- this.submitFileList.push(i);
+ this.fileList.push(i);
});
}
},
@@ -342,37 +372,41 @@
margin-bottom: 30rpx;
}
- .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>
\ No newline at end of file
--
Gitblit v1.9.3