From ecbdab9da9488cc58a1ac7064f9cffde4792fba4 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 28 六月 2024 09:51:01 +0800
Subject: [PATCH] 代码初始化

---
 h5/pages/staff/task/vDangetAppr.vue |  184 +++++++++++++++++++++++++++++++++++----------
 1 files changed, 142 insertions(+), 42 deletions(-)

diff --git a/h5/pages/staff/task/vDangetAppr.vue b/h5/pages/staff/task/vDangetAppr.vue
index 51ec211..f9df6eb 100644
--- a/h5/pages/staff/task/vDangetAppr.vue
+++ b/h5/pages/staff/task/vDangetAppr.vue
@@ -1,13 +1,19 @@
 <template>
   <view class="main_app">
     <view class="status_wrap">
-      <view class="name">{{ info.name }}鎻愪氦鐨剓{ cateList[type].name }}</view>
+      <view class="name">{{ info.categoryName }}</view>
       <view v-if="info.status == '0'" class="status">{{
         statusMap[info.status]
       }}</view>
       <image
+        v-if="info.status == '1'"
+        src="@/static/ic_yizhenggai.png"
+        mode="widthFix"
+        class="status_img"
+      ></image>
+      <image
         v-if="info.status == '2'"
-        src="@/static/ic_passed@2x.png"
+        src="@/static/ic_yituihui-1.png"
         mode="widthFix"
         class="status_img"
       ></image>
@@ -19,22 +25,24 @@
       ></image>
       <view>{{ info.content }}</view>
       <view class="file_list">
-        <template v-for="item in info.submitFileList">
+        <view
+          class="img_wrap"
+          v-for="item in info.submitFileList"
+          :key="item.id"
+        >
           <image
             v-if="item.type == 0"
-            :key="item.id"
             :src="item.fileurlFull"
             mode="widthFix"
             class="img"
           />
           <video
             v-if="item.type == 1"
-            :key="item.id"
             :src="item.fileurlFull"
             class="img"
             controls
           />
-        </template>
+        </view>
       </view>
       <view class="text_wrap">
         <view class="line">
@@ -52,14 +60,14 @@
     <view v-if="info.status == 1" class="module_list">
       <view class="item">
         <view class="label">澶勭悊缁撴灉</view>
-        <!-- <view class="value">{{ info. }}</view> -->
+        <view class="value primaryColor">{{ statusMap[info.status] }}</view>
       </view>
       <view class="item">
         <view class="label">鏁存敼鍓�</view>
         <view class="value">
           <view
             class="adduser_list_item_ipt1_upload"
-            v-for="(item, i) in dealBeforeFileList"
+            v-for="(item, i) in info.dealBeforeFileList"
             :key="i"
             ><image
               v-if="item.type == 0"
@@ -75,7 +83,7 @@
         <view class="value">
           <view
             class="adduser_list_item_ipt1_upload"
-            v-for="(item, i) in dealAfterFileList"
+            v-for="(item, i) in info.dealAfterFileList"
             :key="i"
             ><image
               v-if="item.type == 0"
@@ -116,15 +124,24 @@
               "
             />
             <image
+              v-if="item.status == 1"
               class="status"
               src="@/static/staff/liucheng_success@2x.png"
+              mode="widthFix"
+            />
+            <image
+              v-if="item.status == 2"
+              class="status"
+              src="@/static/staff/liucheng_fail@2x.png"
               mode="widthFix"
             />
           </view>
           <view class="content">
             <view class="head">
               <view class="event">{{ item.title }}</view>
-              <view class="time">{{ item.checkDate }}</view>
+              <view class="time" v-if="item.createDate">{{
+                item.createDate.slice(0, 16)
+              }}</view>
             </view>
             <view class="name_wrap">
               <text
@@ -160,12 +177,13 @@
       </view>
     </view>
     <view class="emyty"></view>
-    <view class="main_footer">
-      <view class="btn" @click="isShowBack = true">閫�鍥�</view>
+    <view v-if="info.approveDateVO!=null&& info.approveDateVO.canBeApproved!=null &&info.approveDateVO.canBeApproved ==1 && info.status == 0" class="main_footer" >
+      <view class="btn" @click="handleBack">閫�鍥�</view>
       <view class="btn transfer" @click="handleTransfer">杞氦</view>
-      <view class="btn handle" @click="isShowHandle = true">澶勭悊</view>
+      <view class="btn handle" @click="handleOpen">澶勭悊</view>
     </view>
 
+    <!-- 閫�鍥� -->
     <u-popup
       :show="isShowBack"
       :round="10"
@@ -177,19 +195,23 @@
         <view class="title">闅愭偅閫�鍥�</view>
         <view class="df_sb">
           <view>閫�鍥炴椂闂�</view>
-          <view @click="isShowBackDate = true" v-if="backParam.dealTime">{{
-            backParam.dealTime.slice(0, 16)
-          }}</view>
-          <view @click="isShowBackDate = true" v-else class="placeholder9"
-            >璇烽�夋嫨</view
-          >
+          <view
+            class="df_ac"
+            @click="isShowBackDate = true"
+            v-if="backParam.dealTime"
+            >{{ backParam.dealTime }}<u-icon name="arrow-right"></u-icon
+          ></view>
+          <view @click="isShowBackDate = true" v-else class="placeholder9 df_ac"
+            >璇烽�夋嫨<u-icon name="arrow-right"></u-icon
+          ></view>
         </view>
 
         <view class="label">鍥剧墖/瑙嗛</view>
         <view class="upload_wrap">
           <view class="adduser_list_item_ipt1_upload" @click="showUpload = true"
-            ><u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon
-          ></view>
+            ><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 submitFileList"
@@ -228,18 +250,25 @@
       :round="10"
       :safeAreaInsetBottom="true"
       mode="bottom"
-      @close="isShowBack = false"
+      @close="isShowHandle = false"
     >
       <view class="appr_modal">
         <view class="title">闅愭偅鏁存敼</view>
         <view class="df_sb">
           <view>鏁存敼鏃堕棿</view>
-          <view @click="isShowHandleDate = true" v-if="handleParam.dealTime">{{
-            handleParam.dealTime.slice(0, 16)
-          }}</view>
-          <view @click="isShowHandleDate = true" v-else class="placeholder9"
-            >璇烽�夋嫨</view
-          >
+          <view
+            class="df_ac"
+            @click="isShowHandleDate = true"
+            v-if="handleParam.dealTime"
+            >{{ handleParam.dealTime }}
+            <u-icon name="arrow-right"></u-icon>
+          </view>
+          <view
+            @click="isShowHandleDate = true"
+            v-else
+            class="placeholder9 df_ac"
+            >璇烽�夋嫨<u-icon name="arrow-right"></u-icon
+          ></view>
         </view>
 
         <view class="label"><text>*</text>鏁存敼鍓�</view>
@@ -247,8 +276,9 @@
           <view
             class="adduser_list_item_ipt1_upload"
             @click="showUploadBe = true"
-            ><u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon
-          ></view>
+            ><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 dealBeforeFileList"
@@ -274,8 +304,9 @@
           <view
             class="adduser_list_item_ipt1_upload"
             @click="showUploadAf = true"
-            ><u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon
-          ></view>
+            ><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 dealAfterFileList"
@@ -360,6 +391,7 @@
           />
         </view>
         <view class="member_list">
+          <view class="mt24 placeholder6">鍏眥{ memberList.length }}鏉℃暟鎹�</view>
           <view v-for="item in memberList" :key="item.id" class="line">
             <image
               :src="
@@ -396,7 +428,7 @@
           <view class="empty"></view>
         </view>
         <view class="Transfer_footer">
-          <view class="btn" @click="isShowTransfer = fale">鍙栨秷</view>
+          <view class="btn" @click="isShowTransfer = fales">鍙栨秷</view>
           <view class="btn active" @click="enterTransfer">纭杞氦</view>
         </view>
       </view>
@@ -410,6 +442,7 @@
     ></u-datetime-picker>
 
     <u-datetime-picker
+      :minDate="new Date().getTime()"
       :show="isShowHandleDate"
       @confirm="confirmHandleDate"
       @cancel="isShowHandleDate = false"
@@ -444,9 +477,9 @@
         { name: '鐗╂祦杞︾敵璇�', id: 4 },
       ],
       statusMap: {
-        0: '寰呭鎵�',
-        1: '瀹℃壒涓�',
-        2: '瀹℃壒閫氳繃',
+        0: '寰呭鐞�',
+        1: '宸叉暣鏀�',
+        2: '宸查��鍥�',
         3: '瀹℃壒鏈�氳繃',
         4: '宸插彇娑�',
         5: '浠栦汉鎴栫',
@@ -483,6 +516,17 @@
     this.getDetail()
   },
   methods: {
+    handleOpen() {
+      this.isShowHandle = true
+      console.log('info', this.info)
+      this.dealBeforeFileList = [...this.info.submitFileList]
+      this.$set(this.handleParam, 'dealTime', dayjs().format('YYYY-MM-DD HH:mm:ss'))
+    },
+    handleBack() {
+      this.isShowBack = true
+      this.submitFileList = [...this.info.submitFileList]
+      this.$set(this.backParam, 'dealTime', dayjs().format('YYYY-MM-DD HH:mm:ss'))
+    },
     getDetail() {
       const { id } = this
       hiddenDangerDetail(id).then(res => {
@@ -491,6 +535,14 @@
     },
     onSubmit() {
       const { dealBeforeFileList, dealAfterFileList, handleParam } = this
+      if (dealBeforeFileList.length === 0) return uni.showToast({
+        title: '璇蜂笂浼犳暣鏀瑰墠鍥剧墖鎴栬棰�',
+        icon: 'none'
+      })
+      if (dealAfterFileList.length === 0) return uni.showToast({
+        title: '璇蜂笂浼犳暣鏀瑰悗鍥剧墖鎴栬棰�',
+        icon: 'none'
+      })
       dealHiddenDanger({
         ...handleParam,
         dealBeforeFileList: dealBeforeFileList,
@@ -512,6 +564,10 @@
     },
     enterTransfer() {
       const { transferParam, id } = this
+      if (!transferParam.id) return uni.showToast({
+        title: '璇烽�夋嫨浜哄憳',
+        icon: 'none'
+      })
       transferHiddenDanger({
         checkUserId: transferParam.id,
         id
@@ -537,7 +593,10 @@
     },
     getMemList() {
       findHiddenAreaMemberList({
-        model: { ...this.transferModel },
+        model: { 
+          ...this.transferModel,
+          id: this.info.areaId
+         },
         ...this.pagination,
       }).then(res => {
         this.memberList = res.data || []
@@ -964,6 +1023,34 @@
       }
     }
   }
+  .adduser_list_item_ipt1_upload {
+      width: 120rpx;
+      height: 120rpx;
+      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%;
+        max-height: 120rpx;
+      }
+    }
 
   .module_list {
     .item {
@@ -1014,7 +1101,7 @@
       font-weight: 600;
       font-size: 32rpx;
       margin-bottom: 20rpx;
-      color: #222222;
+      color: $uni-color-primary;
     }
 
     .desc {
@@ -1028,12 +1115,24 @@
       display: flex;
       flex-wrap: wrap;
       margin-bottom: 20rpx;
+      .img_wrap {
+        margin-top: 24rpx;
+        width: 120rpx;
+        height: 120rpx;
+        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;
+      }
       .img {
-        width: 140rpx;
+        width: 120rpx;
         max-height: 120rpx;
-        margin-right: 12rpx;
-        margin-bottom: 12rpx;
-        border-radius: 8rpx;
       }
     }
     .text_wrap {
@@ -1171,6 +1270,7 @@
       color: #666666;
       font-size: 22rpx;
       display: flex;
+      flex-direction: column;
       align-items: center;
       justify-content: center;
       position: relative;

--
Gitblit v1.9.3