|
|
@@ -25,11 +25,18 @@
|
|
|
@change="handleTabChange"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <div class="tip-box">
|
|
|
+ <Highlight
|
|
|
+ :keywords="['关注农事/托管农事', '取消关注']"
|
|
|
+ source-string="提示:关注农事/托管农事 会触发农情互动,并且为您推送农事,取消关注 会为您取消推送农事"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
<div
|
|
|
class="timeline-wrap"
|
|
|
:class="{
|
|
|
'timeline-container-plant-wrap': pageType == 'plant',
|
|
|
'timeline-container-no-permission-wrap': !hasPlanPermission,
|
|
|
+ 'no-default-plan-wrap': active !== tabs[0]?.id,
|
|
|
}"
|
|
|
>
|
|
|
<farm-work-plan-timeline
|
|
|
@@ -43,14 +50,26 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="custom-bottom-fixed-btns" :class="{'center':active === tabs[0]?.id}" v-has-permission="'农事规划'">
|
|
|
- <div class="bottom-btn-group">
|
|
|
- <div class="bottom-btn secondary-btn" @click="handlePhenologySetting" v-show="active !== tabs[0]?.id">物候期设置</div>
|
|
|
- <div class="bottom-btn secondary-btn" v-if="pageType === 'plant'" @click="openCopyPlanPopup">
|
|
|
- {{ active === tabs[0]?.id ? "复制方案" : "方案设置" }}
|
|
|
+ <div class="custom-bottom-fixed-btns" :class="{ center: active === tabs[0]?.id }" v-has-permission="'农事规划'">
|
|
|
+ <div class="bottom-btn-group-wrap">
|
|
|
+ <div class="bottom-btn-group">
|
|
|
+ <div
|
|
|
+ class="bottom-btn secondary-btn"
|
|
|
+ @click="handlePhenologySetting"
|
|
|
+ v-show="active !== tabs[0]?.id"
|
|
|
+ >
|
|
|
+ 物候期设置
|
|
|
+ </div>
|
|
|
+ <div class="bottom-btn secondary-btn" v-if="pageType === 'plant'" @click="openCopyPlanPopup">
|
|
|
+ {{ active === tabs[0]?.id ? "复制方案" : "方案设置" }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div class="bottom-btn primary-btn" @click="addNewTask" v-show="active !== tabs[0]?.id">新增农事</div>
|
|
|
</div>
|
|
|
- <div class="bottom-btn primary-btn" @click="addNewTask" v-show="active !== tabs[0]?.id">新增农事</div>
|
|
|
+ <template v-if="active !== tabs[0]?.id">
|
|
|
+ <div class="bottom-btn-divider"></div>
|
|
|
+ <div class="bottom-btn primary-btn submit-btn">提交方案</div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 农事信息弹窗 -->
|
|
|
@@ -100,21 +119,38 @@
|
|
|
</div>
|
|
|
<div class="phenology-footer" @click="handleConfirmPhenologySetting">确认设置</div>
|
|
|
</Popup>
|
|
|
+
|
|
|
+ <tip-popup
|
|
|
+ v-model:show="showTipPopup"
|
|
|
+ type="warning"
|
|
|
+ text="请完善"
|
|
|
+ text2="信息"
|
|
|
+ highlightText="全托管方案"
|
|
|
+ buttonText="去完善"
|
|
|
+ @confirm="handleBtn"
|
|
|
+ :closeOnClickOverlay="false"
|
|
|
+ />
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, onMounted, computed } from "vue";
|
|
|
-import { Popup } from "vant";
|
|
|
+import { Popup, Highlight } from "vant";
|
|
|
import customHeader from "@/components/customHeader.vue";
|
|
|
import tabList from "@/components/pageComponents/TabList.vue";
|
|
|
import FarmWorkPlanTimeline from "@/components/pageComponents/FarmWorkPlanTimeline.vue";
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
import detailDialog from "@/components/detailDialog.vue";
|
|
|
import eventBus from "@/api/eventBus";
|
|
|
+import tipPopup from "@/components/popup/tipPopup.vue";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
|
|
|
|
+const showTipPopup = ref(false);
|
|
|
+const handleBtn = () => {
|
|
|
+ showTipPopup.value = false;
|
|
|
+};
|
|
|
+
|
|
|
const userInfoStr = localStorage.getItem("localUserInfo");
|
|
|
const userInfo = userInfoStr ? JSON.parse(userInfoStr) : {};
|
|
|
// 检查是否有"农事规划"权限
|
|
|
@@ -383,31 +419,56 @@ const handleRowClick = (item) => {
|
|
|
margin-right: 8px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ .tip-box {
|
|
|
+ padding: 5px 10px;
|
|
|
+ background: rgba(33, 153, 248, 0.1);
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: 12px;
|
|
|
+ margin: 8px 10px;
|
|
|
+ color: #444;
|
|
|
+ }
|
|
|
.timeline-wrap {
|
|
|
- height: calc(100vh - 40px - 85px);
|
|
|
+ height: calc(100vh - 90px - 85px);
|
|
|
padding: 0 12px;
|
|
|
&.timeline-container-plant-wrap {
|
|
|
- height: calc(100vh - 40px - 85px - 38px);
|
|
|
+ height: calc(100vh - 90px - 85px - 38px);
|
|
|
+ }
|
|
|
+ &.no-default-plan-wrap {
|
|
|
+ height: calc(100vh - 90px - 85px - 100px);
|
|
|
}
|
|
|
// 没有权限时,底部按钮不显示,高度增加 73px
|
|
|
&.timeline-container-no-permission-wrap {
|
|
|
- height: calc(100vh - 40px - 18px);
|
|
|
+ height: calc(100vh - 90px - 18px);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// 控制区域样式
|
|
|
.custom-bottom-fixed-btns {
|
|
|
- .bottom-btn-group {
|
|
|
+ flex-direction: column;
|
|
|
+ .bottom-btn-group-wrap {
|
|
|
display: flex;
|
|
|
gap: 12px;
|
|
|
+ justify-content: space-between;
|
|
|
+ .bottom-btn-group {
|
|
|
+ display: flex;
|
|
|
+ gap: 12px;
|
|
|
+ }
|
|
|
}
|
|
|
- &.center{
|
|
|
+ &.center {
|
|
|
justify-content: center;
|
|
|
- .bottom-btn{
|
|
|
+ .bottom-btn {
|
|
|
padding: 10px 45px;
|
|
|
}
|
|
|
}
|
|
|
+ .bottom-btn-divider {
|
|
|
+ width: calc(100% + 24px);
|
|
|
+ height: 1px;
|
|
|
+ background: #f0f0f0;
|
|
|
+ margin: 10px -12px;
|
|
|
+ }
|
|
|
+ .submit-btn {
|
|
|
+ padding: 10px 83px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.copy-plan-popup {
|