浏览代码

feat:添加用户提醒校验

wangsisi 2 天之前
父节点
当前提交
9483542cf7
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 5 3
      src/views/old_mini/home/subPages/warningDetail.vue
  2. 1 1
      src/views/old_mini/monitor/subPages/plan.vue

+ 5 - 3
src/views/old_mini/home/subPages/warningDetail.vue

@@ -43,7 +43,9 @@
                     </template>
                 </div>
                 <div v-else class="box-bottom" :style="{ justifyContent: !isLink ? 'center' : 'flex-end' }">
-                    <div class="edit-btn" v-if="!isLink" @click="handleEditQuestion">编辑问题</div>
+                    <template v-if="!isLink"> 
+                        <div v-has-permission="'农事规划'" class="edit-btn" @click="handleEditQuestion">编辑问题</div>
+                    </template>
                     <template v-else>
                         <div class="edit-btn" @click="handleAnswerClick(0)">否</div>
                         <div class="edit-btn primary-btn" @click="handleAnswerClick(1)">是</div>
@@ -110,7 +112,7 @@
 
 <script setup>
 import customHeader from "@/components/customHeader.vue";
-import { ref, onActivated } from "vue";
+import { ref, onActivated, computed } from "vue";
 import { base_img_url2, resize_300 } from "@/api/config";
 import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
 import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
@@ -442,7 +444,6 @@ const handleEditQuestion = () => {
                 display: flex;
                 justify-content: flex-end;
                 gap: 10px;
-                margin-top: 10px;
                 .edit-btn {
                     padding: 7px 20px;
                     background: rgba(33, 153, 248, 0.1);
@@ -450,6 +451,7 @@ const handleEditQuestion = () => {
                     border-radius: 25px;
                     font-size: 12px;
                     text-align: center;
+                    margin-top: 10px;
                     &.primary-btn {
                         background: #2199f8;
                         color: #fff;

+ 1 - 1
src/views/old_mini/monitor/subPages/plan.vue

@@ -260,7 +260,7 @@ const getListMySchemes = (type = "auto") => {
             if (type === "right") {
                 active.value = data[data.length - 1].id;
             } else if (type === "left") {
-                active.value = data[0].id;
+                active.value = data[0]?.id;
             } else {
                 if(currentTab.value) {
                     currentTab.value = data.filter((item) => item.id === currentTab.value?.id)?.[0];