浏览代码

fix: 复核成效操作按钮

刘秀芳 1 天之前
父节点
当前提交
ad4e3f8725
共有 2 个文件被更改,包括 76 次插入3 次删除
  1. 75 2
      src/views/old_mini/modify_work/reviewWork.vue
  2. 1 1
      src/views/old_mini/task_condition/index.vue

+ 75 - 2
src/views/old_mini/modify_work/reviewWork.vue

@@ -250,9 +250,21 @@
                     </div>
                 </template>
             </div>
+
+            <div
+                class="fixed-btn-wrap center"
+            >
+            <div class="fixed-btn excute" @click="handleShare" v-if="workItem.reviewImage && workItem.reviewImage.length">分享成果</div>
+                <div class="fixed-btn second" @click="handleRemindUser" v-else>提醒农户拍照</div>
+            </div>
         </div>
         <!-- 上传图片弹窗 -->
         <upload-popup :executionData="workItem"></upload-popup>
+        <!-- 分享农事成效弹窗 -->
+        <review-popup ref="reviewPopupRef" />
+
+        <!-- 上传农事成效弹窗 -->
+        <upload-execute ref="uploadExecuteRef" :onlyShare="true" />
     </div>
 </template>
 
@@ -265,8 +277,12 @@ import upload from "@/components/upload";
 import AlbumCarousel from "@/components/album_compoents/albumCarousel";
 import { ElMessage } from "element-plus";
 import uploadPopup from "@/components/popup/uploadPopup.vue";
-const route = useRoute();
+import { base_img_url2 } from "@/api/config";
+import reviewPopup from "@/views/old_mini/task_condition/components/reviewPopup.vue";
+import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
 
+const route = useRoute();
+const uploadExecuteRef = ref(null);
 const workItem = ref({});
 const curRole = ref("");
 // 农事规划页面-显示上传农事凭证按钮
@@ -330,6 +346,17 @@ const handleSubmit = () => {
     });
 };
 
+const reviewPopupRef = ref(null);
+const handleShare = () => {
+    const preImg = triggerImg.value.length ? base_img_url2 + triggerImg.value[triggerImg.value.length - 1].cloudFilename : '';
+    const resImg = workItem.value?.reviewImage?.length ? base_img_url2 + workItem.value.reviewImage[workItem.value.reviewImage.length - 1] : '';
+    reviewPopupRef.value.handleShowPopup(workItem.value.id, preImg, resImg);
+}
+
+const handleRemindUser = () => {
+    uploadExecuteRef.value.showPopup({...workItem.value, type: 'remindUser'});
+}
+
 // 清理数据的函数
 const clearData = () => {
     workItem.value = {};
@@ -378,7 +405,7 @@ const handleUpload = ({ imgArr }) => {
         box-sizing: border-box;
         overflow: auto;
         &.recheck-title {
-            padding-bottom: 26px;
+            padding-bottom: 86px;
             .common-card-title {
                 font-size: 16px;
                 display: flex;
@@ -418,6 +445,52 @@ const handleUpload = ({ imgArr }) => {
                 flex: none;
             }
         }
+
+        
+        .fixed-btn-wrap {
+            position: fixed;
+            z-index: 10;
+            bottom: 0;
+            left: 0;
+            width: 100%;
+            padding: 10px 12px 25px;
+            box-sizing: border-box;
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            background: #fff;
+            box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
+            &.center {
+                justify-content: center;
+            }
+            .fixed-btn {
+                width: 120px;
+                text-align: center;
+                height: 40px;
+                line-height: 40px;
+                background: linear-gradient(180deg, #70bffe, #2199f8);
+                border-radius: 25px;
+                color: #fff;
+                font-size: 14px;
+                box-sizing: border-box;
+                &.expert {
+                    width: 180px;
+                }
+                &.orange {
+                    color: #ff953d;
+                    border: 1px solid #ff953d;
+                    background: #fff;
+                }
+                &.excute {
+                    background: linear-gradient(180deg, #FFD887, #ED9E1E);
+                }
+                &.second {
+                    background: #FFFFFF;
+                    border: 1px solid #2199F8;
+                    color: #2199F8;
+                }
+            }
+        }
         .tabs-content-item {
             padding: 12px 12px 16px 12px;
             margin: 0 12px;

+ 1 - 1
src/views/old_mini/task_condition/index.vue

@@ -18,7 +18,7 @@ import { Tab, Tabs } from "vant";
 import demandHall from "../farm_manage/components/demandHall.vue";
 import systemReminder from "../farm_manage/components/systemReminder.vue";
 import task from "./components/task.vue"
-const active = ref(1);
+const active = ref(0);
 </script>
 
 <style lang="scss" scoped>