|
@@ -66,7 +66,7 @@
|
|
|
|
|
|
<div class="bottom-btn">
|
|
|
<div class="btn-item secondary-btn">咨询专家</div>
|
|
|
- <div class="btn-item primary-btn">触发农事</div>
|
|
|
+ <div class="btn-item primary-btn" @click="triggerClick">触发农事</div>
|
|
|
</div>
|
|
|
<div class="close-btn" v-show="dialogData.isBtn" @click.stop="winDialogVisible=false">
|
|
|
<!-- <el-icon size="32" color="#fff"><CircleCloseFilled /></el-icon> -->
|
|
@@ -84,27 +84,39 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ <Popup v-model:show="noShow" class="no-popup">
|
|
|
+ <div class="right-icon">
|
|
|
+ <img class="right-img" src="@/assets/img/home/right.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="no-popup-title">
|
|
|
+ <span>农事已触发成功</span>
|
|
|
+ <div class="no-popup-title-sub">您可以在 农场监测-农事任务 看到农事状态</div>
|
|
|
+ </div>
|
|
|
+ <div class="no-popup-btn" @click="noShow = false">我知道了</div>
|
|
|
+ </Popup>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-import { onActivated, onDeactivated, onMounted, ref } from "vue";
|
|
|
+import { ref } from "vue";
|
|
|
import eventBus from "@/api/eventBus";
|
|
|
import wx from "weixin-js-sdk";
|
|
|
+import { Popup } from "vant";
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
|
|
|
-const props = defineProps({
|
|
|
- initReload: {
|
|
|
- type: Boolean,
|
|
|
- default: false
|
|
|
- }
|
|
|
-})
|
|
|
-
|
|
|
const winDialogVisible = ref(false);
|
|
|
+const noShow = ref(false);
|
|
|
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
const sampleId = route.query.sampleId
|
|
|
const farmId = route.query.farmId;
|
|
|
|
|
|
+const triggerClick = () => {
|
|
|
+ winDialogVisible.value = false;
|
|
|
+ noShow.value = true;
|
|
|
+}
|
|
|
+
|
|
|
const dialogData = ref({
|
|
|
targetId: "part2",
|
|
|
title: "梢期防虫",
|
|
@@ -280,29 +292,17 @@ const dialogData = ref({
|
|
|
const currentCard = ref({});
|
|
|
const showDialog = (pageParams) => {
|
|
|
// dialogData.value = pageParams.card;
|
|
|
- currentCard.value = {
|
|
|
- activeIndex: pageParams.activeIndex,
|
|
|
- farmWorkName: dialogData.value.farmWorkName,
|
|
|
- farmId: farmId,
|
|
|
- sampleId: sampleId,
|
|
|
- };
|
|
|
- settingData()
|
|
|
+ // currentCard.value = {
|
|
|
+ // activeIndex: pageParams.activeIndex,
|
|
|
+ // farmWorkName: dialogData.value.farmWorkName,
|
|
|
+ // farmId: farmId,
|
|
|
+ // sampleId: sampleId,
|
|
|
+ // };
|
|
|
+ // settingData()
|
|
|
winDialogVisible.value = true;
|
|
|
};
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- if (props.initReload) {
|
|
|
- eventBus.on("detailDialog:showDialog", showDialog);
|
|
|
- }
|
|
|
-})
|
|
|
-
|
|
|
-onActivated(()=>{
|
|
|
- eventBus.on("detailDialog:showDialog", showDialog);
|
|
|
-})
|
|
|
-
|
|
|
-onDeactivated(()=>{
|
|
|
- eventBus.off("detailDialog:showDialog", showDialog);
|
|
|
-})
|
|
|
+defineExpose({showDialog})
|
|
|
|
|
|
//邀请专家诊断
|
|
|
const toPage = () =>{
|
|
@@ -315,9 +315,6 @@ const handleAct = () =>{
|
|
|
eventBus.emit("uploadUopup:show",{gardenIdVal:dialogData.value.farmId,orderIdVal:dialogData.value.orderId,textVal:dialogData.value.consequenceText});
|
|
|
}
|
|
|
|
|
|
-// 弹窗关闭
|
|
|
-eventBus.on("detailDialog:toCloseDialog", closeDialog);
|
|
|
-
|
|
|
|
|
|
const pesticideFertilizers = ref([])
|
|
|
const settingData = () => {
|
|
@@ -331,14 +328,8 @@ function flattenDomains(data) {
|
|
|
|
|
|
function closeDialog() {
|
|
|
winDialogVisible.value = false
|
|
|
- eventBus.emit("detailDialog:closeDialog")
|
|
|
}
|
|
|
|
|
|
-const toShare = () => {
|
|
|
- wx.miniProgram.navigateTo({
|
|
|
- url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(currentCard.value)}&type=album`,
|
|
|
- });
|
|
|
-}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -513,6 +504,39 @@ const toShare = () => {
|
|
|
text-align: center;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+.no-popup {
|
|
|
+ width: 300px;
|
|
|
+ border-radius: 14px;
|
|
|
+ padding: 28px 15px 20px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .right-icon {
|
|
|
+ text-align: center;
|
|
|
+ padding-bottom: 12px;
|
|
|
+ .right-img {
|
|
|
+ width: 68px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .no-popup-title {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: 500;
|
|
|
+ text-align: center;
|
|
|
+ .no-popup-title-sub{
|
|
|
+ font-size: 14px;
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .no-popup-btn {
|
|
|
+ background-color: #2199F8;
|
|
|
+ padding: 8px;
|
|
|
+ border-radius: 20px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 16px;
|
|
|
+ margin-top: 32px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
<style lang="scss">
|