瀏覽代碼

fix: 认养框架

刘秀芳 2 周之前
父節點
當前提交
e48d0688d9
共有 61 個文件被更改,包括 142 次插入16285 次删除
  1. 1 1
      public/index.html
  2. 二進制
      src/assets/images/foster-home/garden-img.png
  3. 2 1
      src/components/fnHeader.vue
  4. 12 12
      src/components/navigation.vue
  5. 0 5
      src/router/globalRoutes.js
  6. 0 35
      src/router/mainRoutes.js
  7. 0 188
      src/views/AuthenticLogin.vue
  8. 0 64
      src/views/addFarm/components/steps.vue
  9. 0 220
      src/views/addFarm/components/table.vue
  10. 0 340
      src/views/addFarm/farmMap.js
  11. 0 852
      src/views/addFarm/index.vue
  12. 0 292
      src/views/authentic/Pdf.vue
  13. 0 578
      src/views/authentic/authenticMap.js
  14. 0 1001
      src/views/authentic/index.vue
  15. 0 161
      src/views/authentic/pdfMap.js
  16. 0 28
      src/views/file/fileMap.js
  17. 0 365
      src/views/file/index.vue
  18. 0 77
      src/views/home/album/album_compoents/albumCarousel.vue
  19. 0 107
      src/views/home/album/album_compoents/albumCarousel7d.vue
  20. 0 202
      src/views/home/album/album_compoents/albumCarouselItem.vue
  21. 0 286
      src/views/home/album/album_compoents/albumDrawBox.vue
  22. 0 75
      src/views/home/album/album_compoents/cacheImg.js
  23. 0 280
      src/views/home/album/album_compoents/detailDailog.vue
  24. 0 256
      src/views/home/album/album_compoents/utils.js
  25. 0 83
      src/views/home/album/components/chart.vue
  26. 0 270
      src/views/home/album/components/chartSeting.js
  27. 0 130
      src/views/home/album/components/indicatorChart.vue
  28. 0 1212
      src/views/home/album/index.vue
  29. 0 406
      src/views/home/album_compoents/albumCarousel.vue
  30. 0 107
      src/views/home/album_compoents/albumCarousel7d.vue
  31. 0 213
      src/views/home/album_compoents/albumCarouselItem.vue
  32. 0 307
      src/views/home/album_compoents/albumDrawBox.vue
  33. 0 75
      src/views/home/album_compoents/cacheImg.js
  34. 0 580
      src/views/home/album_compoents/compareDialog.vue
  35. 0 268
      src/views/home/album_compoents/detailDailog.vue
  36. 0 284
      src/views/home/album_compoents/utils.js
  37. 21 0
      src/views/home/components/gardenIntroduce.vue
  38. 6 119
      src/views/home/components/homePage.vue
  39. 16 120
      src/views/home/index.vue
  40. 0 481
      src/views/varietyMap/index.vue
  41. 0 258
      src/views/varietyMap/map.vue
  42. 1 1
      src/views/warningHome/index.vue
  43. 0 157
      src/views/warningHome/map/alarmLayer copy.js
  44. 0 59
      src/views/workDetail/areaMap.js
  45. 0 701
      src/views/workDetail/completed.vue
  46. 0 620
      src/views/workDetail/components/boxClass.scss
  47. 0 190
      src/views/workDetail/components/chart.vue
  48. 0 227
      src/views/workDetail/components/chartSeting.js
  49. 0 173
      src/views/workDetail/components/commentBox.vue
  50. 0 174
      src/views/workDetail/components/enterBox.vue
  51. 0 180
      src/views/workDetail/components/executionProgress.vue
  52. 0 573
      src/views/workDetail/components/prescriptionBox.vue
  53. 0 263
      src/views/workDetail/components/recheckBox.vue
  54. 0 247
      src/views/workDetail/components/recheckBox2.vue
  55. 0 249
      src/views/workDetail/components/recheckBox3.vue
  56. 0 434
      src/views/workDetail/components/serviceBox.vue
  57. 0 104
      src/views/workDetail/components/serviceDialog.vue
  58. 0 214
      src/views/workDetail/components/table.vue
  59. 0 285
      src/views/workDetail/index.vue
  60. 0 834
      src/views/workDetail/prescriptionBox.vue
  61. 83 261
      yarn.lock

+ 1 - 1
public/index.html

@@ -15,7 +15,7 @@
         <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
         <link rel="icon" href="favicon.ico" />
         <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/qweather-icons@1.3.0/font/qweather-icons.css">
-        <title>飞鸟智慧巡园平台</title>
+        <title>飞鸟认养平台</title>
     </head>
     <body>
         <noscript>

二進制
src/assets/images/foster-home/garden-img.png


+ 2 - 1
src/components/fnHeader.vue

@@ -2,7 +2,7 @@
     <div class="header">
         <div class="title">
             <img class="logo" src="@/assets/images/common/logo.png" alt="" />
-            <span>飞鸟智慧巡园平台</span>
+            <span>飞鸟认养平台</span>
             <img class="logo-icon" src="@/assets/images/common/logo-icon.png" alt="" />
         </div>
         <div class="focus-farm" v-show="!hideSwitch">
@@ -168,6 +168,7 @@ onUnmounted(() => {
         span {
             margin: 0 5px;
             font-family: "PangMenZhengDao";
+            text-shadow: 0 0 5px rgba(243, 251, 254, 0.53);
         }
     }
     .focus-farm {

+ 12 - 12
src/components/navigation.vue

@@ -27,7 +27,7 @@
         </el-checkbox-group>
         <!-- <div class="btn" @click="toPage">农场确权</div> -->
         <!-- 对比 -->
-        <el-checkbox-group
+        <!-- <el-checkbox-group
             class="checkbox-group compare-btn"
             v-model="checkedCompareChildren"
             @change="handleCompareChange"
@@ -35,7 +35,7 @@
             <el-checkbox label="指标对比" value="1">
                 指标对比
             </el-checkbox>
-        </el-checkbox-group>
+        </el-checkbox-group> -->
 
         <div class="compare-tips" v-show="checkedCompareChildren.length">
             <span>提示:</span>请在底图上点选 <span>两棵树</span>,才可以进行对比
@@ -115,7 +115,7 @@ function handleActive({name,key}){
     emit('handleTab',{name:menuItem.name,id:active.value,isUpdate:true,params:name, legend: menuItem?.legend, colorObj: menuItem?.colorObj})
 }
 
-const active = ref("果园总览");
+const active = ref("");
 const handleHomeTab = ({ id, name }) => {
     active.value = name;
     childrenData.value = []
@@ -132,10 +132,10 @@ const handleHomeTab = ({ id, name }) => {
 
 const list = ref([
     [
-        {
-            name: "果园总览",
-            id: 0,
-        },
+        // {
+        //     name: "果园总览",
+        //     id: 0,
+        // },
         // {
         //     name: "基本指标",
         //     id: 1,
@@ -147,22 +147,22 @@ const list = ref([
         //     children: ["花穗长度", "单树花穗率"],
         // },
         {
-            name: "生态指标",
+            name: "风畅气顺",
             id: 3,
             children: [],
         },
         {
-            name: "生长指标",
+            name: "光透照匀",
             id: 4,
             children: [],
         },
         {
-            name: "病虫指标",
+            name: "益草覆盖",
             id: 5,
             children: [],
         },
         {
-            name: "农事处方",
+            name: "古树名木",
             id: 1,
         },
     ],
@@ -194,7 +194,7 @@ function handleQuitCompare() {
 .navigation {
     position: fixed;
     top: 34px;
-    left: calc(50% - 70px);
+    left: 50%;
     // left: 50%;
     transform: translateX(-50%);
     width: calc(100% - 430px * 2);

+ 0 - 5
src/router/globalRoutes.js

@@ -13,11 +13,6 @@ export default [
         component: () => import("@/views/Login.vue"),
     },
     {
-        path: "/authentic_login",
-        name: "AuthenticLogin",
-        component: () => import("@/views/AuthenticLogin.vue"),
-    },
-    {
         path: "/404",
         name: "404",
         component: () => import("@/views/404.vue"),

+ 0 - 35
src/router/mainRoutes.js

@@ -19,39 +19,4 @@ export default [
         component: () => import("@/views/home/index.vue"),
         // component: () => import("@/views/authentic/index.vue"),
     },
-    {
-        path: "/garden-file",
-        name: "GardenFile",
-        component: () => import("@/views/file/index.vue"),
-    },
-    //地块确权页面
-    {
-        path: "/authentic",
-        name: "Authentic",
-        component: () => import("@/views/authentic/index.vue"),
-    },
-    //新增农事
-    {
-        path: "/add_farm",
-        name: "AddFarm",
-        component: () => import("@/views/addFarm/index.vue"),
-    },
-    // 农事 待执行页面
-    {
-        path: "/work_detail",
-        name: "WorkDetail",
-        component: () => import("@/views/workDetail/index.vue"),
-    },
-    // 农事 已完成页面
-    {
-        path: "/work_completed",
-        name: "WorkCompleted",
-        component: () => import("@/views/workDetail/completed.vue"),
-    },
-    // 品种确权页面
-    {
-        path: "/variety_map",
-        name: "VarietyMap",
-        component: () => import("@/views/varietyMap/index.vue"),
-    },
 ];

+ 0 - 188
src/views/AuthenticLogin.vue

@@ -1,188 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-01-11 11:14:26
- * @LastEditTime: 2022-04-28 18:35:39
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \vue3-element-admin\src\views\Login.vue
--->
-<template>
-  <div class="backdrop-layer">
-    <div class="head">
-      <div class="logo"></div>
-      <div class="title">飞鸟确权平台
-
-      </div>
-    </div>
-    <div class="ve_container">
-      <el-card style="height: 300px" :body-style="{ background: '#ffffff' }">
-        <h1>用户登录</h1>
-        <transition name="el-fade-in-linear">
-          <el-form
-              :model="form"
-              :rules="rules"
-              v-show="!success"
-              class="ve_form"
-              ref="ref_form"
-              :inline="false"
-              @keyup.enter="onSubmit"
-          >
-            <el-form-item prop="phone">
-              <el-input
-                  size="large"
-                  v-model.trim="phone"
-                  placeholder="用户名"
-              >
-                <template #prepend>
-                  <el-icon :size="20"><Iphone /></el-icon>
-                </template>
-              </el-input>
-            </el-form-item>
-            <el-form-item prop="code">
-              <el-input
-                  size="large"
-                  v-model.trim="code"
-                  placeholder="验证码"
-              >
-                <template #prepend>
-                  <el-icon :size="20"><Key /></el-icon>
-                </template>
-              </el-input>
-            </el-form-item>
-            <el-form-item>
-              <div style="width: 50%;float: left;text-align: left;"><el-checkbox >记住密码</el-checkbox></div>
-              <div style="width: 50%;float: left;">
-                <el-button
-                    class="ve_submit"
-                    type="primary"
-                    @click="onSubmit"
-                >
-                  登录
-                </el-button>
-              </div>
-            </el-form-item>
-          </el-form>
-        </transition>
-      </el-card>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import {SET_TOKEN, SET_UNAME, SET_USER_INFO} from "@/store/modules/app/type";
-import Common from "@/components/Common";
-import { ref, reactive, toRefs } from "vue";
-import { useStore } from "vuex";
-import { useRouter } from "vue-router";
-
-const rules = {
-  phone: [{ required: true, message: "请输入用户名", trigger: "blur" }]
-};
-
-// const rules = {
-//   phone: [{ required: true, message: "请输入用户名", trigger: "blur" }]
-//   ,
-//   code: [{ required: true, message: "请输入验证码", trigger: "blur" }
-//   ],
-// };
-
-const store = useStore();
-const router = useRouter();
-const form = reactive({
-  "code": "",
-  "phone": "13797066447"
-});
-const { phone, code } = toRefs(form);
-const ref_form = ref(null);
-const success = ref(false);
-sessionStorage.clear();
-store.commit(`app/${SET_TOKEN}`, "");
-router.options.isAddDynamicMenuRoutes = false;
-
-
-const onSubmit = () => {
-    ref_form.value.validate(async (valid) => {
-        if (valid) {
-            const res = await VE_API.system.phoneLogin(form);
-            if (res.code == 0) {
-                const { token, userName, djiCloudToken } = res.data;
-                store.commit(`app/${SET_TOKEN}`, token);
-                store.commit(`app/djiCloudToken`, djiCloudToken);
-                store.commit(`app/${SET_UNAME}`, userName);
-                res.data["token"] = undefined
-                res.data["x-auth-token"] = undefined
-                res.data["pwd"] = undefined
-                store.commit(`app/${SET_USER_INFO}`, JSON.stringify(res.data));
-                success.value = true;
-                // router.push({ name: "Home" });
-                router.push({ name: "Authentic" });
-            }
-        } else {
-            return;
-        }
-    });
-};
-</script>
-
-<style lang="scss" scoped>
-.ve_container {
-  position: absolute;
-  z-index: 1;
-  width: 400px;
-  top: calc(50%);
-  left: calc(50% - 250px);
-  transform: translateY(-50%);
-  transition: all 1s;
-  min-height: 273px;
-  text-align: center;
-  h1 {
-    font-size: 24px;
-    transition: all 1s;
-    font-weight: normal;
-    text-align: left;
-    margin-bottom: 36px;
-  }
-  .ve_form {
-    .ve_submit {
-      width: 100%;
-      height: 45px;
-      background: #0BC678;
-    }
-  }
-}
-.backdrop-layer{
-  position: absolute;
-  top: 0px;
-  bottom: 0px;
-  left: 0px;
-  right: 0px;
-  background: url(@/assets/login_bg.jpg) no-repeat;
-  background-size:100% 100%;
-  z-index: 1;
-  overflow: hidden;
-}
-.head{
-  position: absolute;
-  left: 300px;
-  top: 100px;
-  display: flex;
-  align-items: center;
-  padding: 50px;
-  .title{
-    font-size: 30px;
-    font-weight: bold;
-    color:#006600;
-    float: left;
-    line-height: 50px;
-    margin-left: 20px;
-  }
-  .logo{
-    width: calc(167px * 0.5);
-    height: calc(245px * 0.5);
-    background: url(@/assets/img/logo-verticle.png) no-repeat;
-    background-size:100% 100%;
-    float: left;
-    z-index: 1000;
-  }
-}
-</style>

+ 0 - 64
src/views/addFarm/components/steps.vue

@@ -1,64 +0,0 @@
-<template>
-    <div class="steps">
-        <div
-            class="step-item"
-            :class="{ step: index !== 0, active: index === active, complete: index < active }"
-            v-for="(item, index) in list"
-            :key="index"
-        >
-            <el-icon v-show="index < active" class="icon"><CircleCheck /></el-icon>
-            {{ item }}
-        </div>
-    </div>
-</template>
-
-<script setup>
-const props = defineProps({
-    active: {
-        type: Number,
-        defalut: 0,
-        required: true,
-    },
-});
-const list = ["选择农事类型", "新增处方"];
-</script>
-
-<style lang="scss" scoped>
-.steps {
-    width: 100%;
-    height: auto;
-    box-sizing: border-box;
-    border-radius: 8px;
-    display: flex;
-    .step-item {
-        flex: 1;
-        color: #1D1D1D;
-        padding: 8px;
-        font-size: 12px;
-        width: 109px;
-        box-sizing: border-box;
-        text-align: center;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        background: url("@/assets/images/components/steps-bg.png") no-repeat center center / 100% 100%;
-        .icon{
-            font-weight: bold;
-            font-size: 14px;
-            margin-right: 4px;
-        }
-        &.step {
-            color: #727272;
-            background: url("@/assets/images/components/step-item.png") no-repeat center center / 100% 100%;
-            &.active {
-                color: #1D1D1D;
-                background: url("@/assets/images/components/step-item-act.png") no-repeat center center / 100% 100%;
-            }
-        }
-        &.complete {
-            color: #FFD489;
-            background: url("@/assets/images/components/step-item-ok.png") no-repeat center center / 100% 100%;
-        }
-    }
-}
-</style>

+ 0 - 220
src/views/addFarm/components/table.vue

@@ -1,220 +0,0 @@
-<template>
-    <div class="table">
-        <div class="header">
-            <div class="header-item">
-                <span>使用功效:</span>
-                {{ pesticideFertilizerListItem.typeName }}
-            </div>
-            <div class="header-item">
-                <div class="header-title">肥药名称:</div>
-                <!-- <el-select class="select" v-model="value">
-                    <el-option v-for="item in list" :key="item.name" :label="item.name" :value="item.name" />
-                </el-select> -->
-
-                <el-select
-                    filterable
-                    @change="handlePesticideFertilizerChange"
-                    v-model="pesticideFertilizerListItem.pesticideFertilizerId"
-                    placeholder="请选择"
-                    class="select"
-                >
-                    <el-option
-                        v-for="item in pesticideFertilizersOptions"
-                        :key="item.id"
-                        :label="item.defaultName"
-                        :value="item.id"
-                    />
-                </el-select>
-            </div>
-        </div>
-        <div class="body">
-            <div class="th">
-                <div class="td"></div>
-                <div class="td">配比<span>(药剂:兑水量)</span></div>
-                <!-- <div class="td">施用方式</div> -->
-                <div class="td">单亩用量</div>
-            </div>
-            <div class="tr">
-                <div class="td">人工</div>
-                <div class="td input-class">
-                    <el-input  @change="emitVal" v-model="pesticideFertilizerListItem.ratio" placeholder="" size="small" />
-                </div>
-                <div class="td input-class">
-                    <el-input  @change="emitVal" v-model="pesticideFertilizerListItem.muUsage" placeholder="" size="small" />
-                </div>
-            </div>
-            <div class="tr" v-show="hasFly">
-                <div class="td">无人机</div>
-                <div class="td input-class">
-                    <el-input  @change="emitVal" v-model="pesticideFertilizerListItem.ratio2" placeholder="" size="small" />
-                </div>
-                <div class="td input-class">
-                    <el-input  @change="emitVal" v-model="pesticideFertilizerListItem.muUsage2" placeholder="" size="small" />
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, onMounted, watch } from "vue";
-const props = defineProps({
-    pesticideFertilizerList: {
-        type: Object,
-        default: () => {},
-    },
-    hasFly: {
-        type: Boolean,
-        default: true
-    },
-    pIndex: {},
-    cIndex: {},
-});
-
-let pesticideFertilizerListItem = ref({
-    key: 1,
-    typeName: "",
-    muUsage: "",
-    muUsage2: "",
-    ratio: "",
-    ratio2: "",
-    remark: "",
-});
-
-watch(() => props.pesticideFertilizerList, (newVal, oldVal) => {
-    pesticideFertilizerListItem.value = props.pesticideFertilizerList
-})
-watch(() => props.hasFly, () => {})
-
-onMounted(() => {
-    pesticideFertilizerListItem.value = props.pesticideFertilizerList;
-});
-
-let pesticideFertilizersOptions = ref([
-    {
-        id: "null",
-        name: "芸苔素内酯 15000倍",
-        typeName: "30",
-        defaultRatio: null,
-        defaultDroneRatio: null,
-        unit: 0,
-        defaultName: "调节",
-    },
-]);
-
-VE_API.order.pesticideFertilizers().then(({ data }) => {
-    pesticideFertilizersOptions.value = data;
-});
-
-/**
- * 选择药肥的时候修改订单中药肥pesticideFertilizerId 以外其他数据
- * @param index
- */
-const handlePesticideFertilizerChange = () => {
-    let obj = pesticideFertilizersOptions.value.filter(
-        (item) => pesticideFertilizerListItem.value.pesticideFertilizerId === item.id
-    )[0];
-    pesticideFertilizerListItem.value = {
-        ...pesticideFertilizerListItem.value,
-        typeName: obj.typeName,
-        unit: obj.unit,
-        defaultRatio: obj.defaultRatio,
-        usageModeList: obj.usageModeList,
-        ratio: obj.defaultRatio,
-        defaultName: obj.defaultName,
-        pesticideFertilizerName: obj.name,
-        pesticideFertilizerCode: obj.pesticideFertilizerCode,
-    };
-    console.log("ite", pesticideFertilizerListItem.value);
-};
-
-const emit = defineEmits(["updateTableData"])
-function emitVal() {
-    emit("updateTableData", props.pIndex, props.cIndex, pesticideFertilizerListItem.value)
-}
-
-function getItem() {
-    return pesticideFertilizerListItem.value
-}
-defineExpose({ getItem });
-</script>
-
-<style lang="scss" scoped>
-.table {
-    .header {
-        display: flex;
-        justify-content: center;
-        .header-item {
-            display: flex;
-            align-items: center;
-            color: #727272;
-            .header-title {
-                flex: none;
-            }
-        }
-        .header-item + .header-item {
-            margin-left: 36px;
-        }
-    }
-    .body {
-        border: 1px solid #444444;
-        border-radius: 5px;
-        .th {
-            border-bottom: 1px solid #444444;
-        }
-        .th,
-        .tr {
-            display: flex;
-            align-items: center;
-            color: #727272;
-            height: 46px;
-            font-size: 16px;
-            .td {
-                text-align: center;
-                flex: 1;
-                span {
-                    font-size: 11px;
-                    display: inline-block;
-                }
-            }
-            .td + .td {
-                border-left: 1px solid #444444;
-                height: 46px;
-                line-height: 46px;
-            }
-        }
-        .tr + .tr {
-            border-top: 1px solid #444444;
-        }
-    }
-    .select {
-        min-width: 110px;
-        ::v-deep {
-            .el-select__wrapper {
-                background: transparent;
-                padding: 0;
-                box-shadow: none;
-            }
-            .el-select__placeholder,
-            .el-select__caret {
-                color: #ffd489;
-            }
-        }
-    }
-
-    .input-class {
-        ::v-deep {
-            .el-input {
-                width: 90%;
-            }
-            .el-input__wrapper {
-                background: transparent;
-                box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
-            }
-            .el-input__inner {
-                color: #ffd489;
-            }
-        }
-    }
-}
-</style>

+ 0 - 340
src/views/addFarm/farmMap.js

@@ -1,340 +0,0 @@
-import Layer from "ol/layer/Vector";
-import config from "@/api/config.js";
-import * as KMap from "@/utils/ol-map/KMap";
-import Stroke from "ol/style/Stroke";
-import * as util from "@/common/ol_common.js";
-import Style from "ol/style/Style";
-import Icon from "ol/style/Icon";
-import { Point } from 'ol/geom';
-import Feature from "ol/Feature";
-import VectorLayer from "ol/layer/Vector.js";
-import WKT from "ol/format/WKT";
-import { Cluster, Vector as VectorSource } from "ol/source";
-import { newAreaFeature, newAreaPoint, newPolymerFeature, newPoint } from "@/utils/map.js";
-import { GARDEN_STATUS_ENUM as STATUS_ENUM } from "@/api/enum.js"
-import { getArea } from 'ol/sphere.js';
-import * as proj from "ol/proj";
-import { register } from "ol/proj/proj4";
-import proj4 from "proj4"
-import eventBus from "@/api/eventBus";
-proj4.defs("EPSG:38572", "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");
-register(proj4);
-
-/**
- * @description 智能巡园地图层对象
- */
-class FarmMap {
-    constructor() {
-        let that = this;
-        let vectorStyle = new KMap.VectorStyle();
-        this.vectorStyle = vectorStyle;
-
-        this.treeClusterLayer = new KMap.VectorLayer("tree-cluster", 999, {
-            minZoom: 15,
-            style: (f) => this.getStyle(f)
-        })
-
-        this.areaLayer = new KMap.VectorLayer("areaLayer", 999, { style: (f) => that.vectorStyle.getPolygonStyle("#00000010", "#000000", 3) })
-        this.subAreaLayer = new KMap.VectorLayer("subAreaLayer", 1000, {
-            style: (f) => {
-                return that.vectorStyle.getPolygonStyle(f.get("fillColor"), f.get("strokeColor"), 2)
-            }
-        })
-        that.areaVal = 0
-
-        this.treeCacheStyle = {}
-        this.treeStyle = (f) => {
-            let key = f.get("imgSrc");
-            if (that.treeCacheStyle[key]) {
-                return that.treeCacheStyle[key]
-            }
-            let style = new Style({
-                image: new Icon({
-                    src: f.get("imgSrc"),
-                    scale: 1,
-                    anchor: [0.5, 1],
-                })
-            });
-            that.treeCacheStyle[key] = style
-            return style
-        }
-        this.treeLayer = new KMap.VectorLayer("statusPointLayer", 999, { style: that.treeStyle })
-
-
-
-        this.blueRegionLayer = new KMap.VectorLayer("blueRegionLayer", 99, {
-            minZoom: 1,
-            maxZoom: 22,
-            style: function (f) {
-                const selected = f.get('selected');
-                if (selected) {
-                    return that.vectorStyle.getPolygonStyle("rgba(23, 99, 110, 0.43)", "rgba(37, 227, 255, 0.7)", 2)
-                }
-                return that.vectorStyle.getPolygonStyle("rgba(0, 0, 0, 0.5)", "rgba(255, 255, 255, 0.2)", 1)
-            }
-        });
-    }
-
-    initMap(location, target) {
-        let level = 16;
-        let coordinate = util.wktCastGeom(location).getFirstCoordinate();
-        this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 1, 22, "vec", true, true);
-        this.kmap.addLayer(this.areaLayer.layer)
-        this.kmap.addLayer(this.subAreaLayer.layer)
-        this.kmap.addLayer(this.treeLayer.layer)
-        this.kmap.addLayer(this.blueRegionLayer.layer)
-        this.kmap.addLayer(this.treeClusterLayer.layer)
-
-        this.addMapSingerClick()
-    }
-
-    initData(farmId, regionId) {
-        let that = this
-        VE_API.image.pointByRegionId({ farmId, regionId }).then(({ data }) => {
-            let features = []
-            for (let item of data) {
-                item.iconName = 'defalut'
-                that.getIcon(item)
-                let point = newPoint(item);
-                features.push(point)
-            }
-
-            if (this.treeClusterLayer &&  this.treeClusterLayer.layer.getSource()) {
-                // this.treeClusterLayer.layer.getSource().getSource().clear()
-            }
-            that.clusterSource = new Cluster({
-                distance: 15,
-                minDistance: 60,
-                source: new VectorSource({
-                    features: features,
-                }),
-            });
-            that.treeClusterLayer.layer.setSource(that.clusterSource)
-            setTimeout(()=>{
-                that.kmap.fit(that.clusterSource.source.getExtent(), {padding:[100,100,100,100]})
-            },100)
-        })
-    }
-    //多点的过滤方法
-    manyFeatureFilter(features) {
-        let res = features[0]
-        if (features.length == 1) {
-            return res
-        }
-        for (let item of features) {
-            res = res.get('status') > item.get('status') ? res : item
-        }
-        return res;
-    }
-    //得到点样式
-    getStyle(feature) {
-        feature = this.manyFeatureFilter(feature.get('features'))
-        return this.getIconStyle(feature)
-    }
-    getIconStyle(feature) {
-        let style = new Style({
-            image: new Icon({
-                src: feature.get('icon'),
-                // src: require(`@/assets/images/map/${feature.get('iconName')}-icon.png`),
-                scale: feature.get('scale'),
-            })
-        });
-        return style
-    }
-    getIcon(item) {
-        // let imgSrc = require(`@/assets/images/map/${item.iconName}-icon.png`)
-        let imgSrc = require('@/assets/images/map/status/status-zc.png')
-        let scale = 0.8
-        if (item.status == 1) {
-            imgSrc = require('@/assets/images/map/status/status-szyc.png')
-        }
-        if (item.status == 2) {
-            imgSrc = require('@/assets/images/map/status/status-bh.png')
-        }
-        if (item.status == 3) {
-            imgSrc = require('@/assets/images/map/status/status-ch.png')
-        }
-        item["icon"] = imgSrc
-        item["scale"] = scale
-    }
-
-    // 重新渲染地图
-    updateMap() {
-        setTimeout(() => {
-            this.kmap.map.updateSize()
-        }, 1000);
-    }
-
-    fit(geomOrExtent, padding) {
-        this.kmap.fit(geomOrExtent, padding);
-    }
-    addMapSingerClick() {
-        let that = this
-        this.kmap.on("singleclick", (evt) => {
-            that.kmap.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
-                if (layer instanceof VectorLayer && layer.get("name") === "blueRegionLayer") {
-                    feature.set('selected', feature.get("selected") ? false : true);
-
-                    let geom = feature.getGeometry().clone()
-                    geom.transform(proj.get("EPSG:4326"), proj.get("EPSG:38572"))
-                    let areaItem = getArea(geom)
-                    areaItem = (areaItem + areaItem / 2) / 1000;
-                    if (feature.get('selected') === true) {
-                        that.areaVal += areaItem
-                    } else {
-                        that.areaVal -= areaItem
-                    }
-                    eventBus.emit("editNsMap:areaVal", that.areaVal)
-                }
-            })
-        })
-    }
-
-
-    // 状态图例
-    handleStatusIcon(obj) {
-        let key = this.afterDayNum == 3 ? "ycStatus" : this.afterDayNum == 5 ? "ycStatus5d" : "ycStatus7d"
-        let hasStatus = false
-        let imgSrc = null
-        if (obj[key] == 3) {
-            hasStatus = true
-            imgSrc = require('@/assets/status/status_bcyc.png')
-            return { hasStatus, imgSrc }
-        }
-        if (obj[key] == 2) {
-            hasStatus = true
-            imgSrc = require('@/assets/status/status_szyc.png')
-            return { hasStatus, imgSrc }
-        }
-        // if (obj[key] == 1) {
-        //     hasStatus = true
-        //     imgSrc = require('@/assets/status/status_dfh.png')
-        //     return { hasStatus, imgSrc }
-        // }
-        // if (obj[key] == 0) {
-        //     hasStatus = true
-        //     imgSrc = require('@/assets/status/status_xfdw.png')
-        //     return { hasStatus, imgSrc }
-        // }
-        return { hasStatus, imgSrc }
-    }
-
-    // 区级颜色
-    handleStatusColor(key) {
-        let fillColor = '#ffffff00'
-        let strokeColor = '#ffffff'
-        switch (key) {
-            case STATUS_ENUM.DONE:
-                fillColor = 'rgba(95,255,197,0)'
-                strokeColor = '#ffffff'
-                break;
-            case STATUS_ENUM.ABNORMAL_GROWTH:
-                fillColor = 'rgba(255,189,5,0.2)'
-                strokeColor = '#FFE44E'
-                break;
-            case STATUS_ENUM.ABNORMAL_Pest:
-                fillColor = 'rgba(51,11,3,0.52)'
-                strokeColor = '#F55A5A'
-                break;
-            case STATUS_ENUM.PENDING_REVIEW:
-                fillColor = 'rgba(3,40,51,0.2)'
-                strokeColor = '#032833'
-                break;
-            case STATUS_ENUM.REVIEWED:
-                fillColor = 'rgba(95,255,197,0.1)'
-                strokeColor = '#5FFFC5'
-                break;
-            default:
-                break;
-        }
-        return { fillColor, strokeColor }
-    }
-
-    initArea(data, callback) {
-        let that = this
-        this.areaLayer.refresh()
-        for (let item of data) {
-            that.areaLayer.addFeature(newAreaFeature(item))
-            that.areaPointLayer.addFeature(newAreaPoint(item))
-        }
-        callback && callback()
-    }
-
-    initSubArea(organId, callback) {
-        let that = this
-        this.subAreaLayer.refresh()
-        VE_API.sub_area.list({ organId }).then(({ data, code }) => {
-            for (let item of data) {
-                item.fillColor = that.handleStatusColor(item.status).fillColor
-                item.strokeColor = that.handleStatusColor(item.status).strokeColor
-                that.subAreaLayer.addFeature(newPolymerFeature(item))
-            }
-            callback && callback()
-        })
-    }
-
-    toggleLegend(val) {
-        // this.treeLayer.layer.setVisible(val)
-        this.treeClusterLayer.layer.setVisible(val)
-    }
-
-
-    getBlueRegion({ gardenId, regionId }, callback) {
-        this.blueRegionLayer.source && this.blueRegionLayer.source.clear()
-        VE_API.farm.blueRegionList({ farmId: gardenId, regionId }).then(({ data, code }) => {
-            for (let item of data) {
-                item.wkt = item.geom
-                item.id = item.blueZoneCode
-                let feature = newAreaFeature(item);
-                this.blueRegionLayer.addFeature(feature)
-            }
-            this.kmap.fit(this.blueRegionLayer.source.getExtent(), [0, 0, 0, 0])
-            callback && callback(data.length)
-        })
-    }
-
-    setBlueRegion(data) {
-        this.blueRegionLayer.source.getFeatures().forEach(feature => {
-            // 检查 feature 的属性中是否有 selected 属性且为 true
-            data.map(item => {
-                if (item.id === feature.get('id')) {
-                    feature.set('selected', true)
-                }
-            })
-        });
-    }
-
-    toggleAllArea(val) {
-        let that = this
-        that.areaVal = 0
-        this.blueRegionLayer.source.getFeatures().forEach(feature => {
-            feature.set('selected', val)
-            if (val === true) {
-                let geom = feature.getGeometry().clone()
-                geom.transform(proj.get("EPSG:4326"), proj.get("EPSG:38572"))
-                let areaItem = getArea(geom)
-                areaItem = (areaItem + areaItem / 2) / 1000;
-                that.areaVal += areaItem
-            }
-            eventBus.emit("editNsMap:areaVal", that.areaVal)
-        });
-
-    }
-    getSelectedBlueRegion() {
-        // 用于存储 selected 为 true 的 feature 的 id
-        const selectedFeatureIds = [];
-        // 遍历所有 features
-        this.blueRegionLayer.source.getFeatures().forEach(feature => {
-            // 检查 feature 的属性中是否有 selected 属性且为 true
-            if (feature.get('selected') === true) {
-                // 获取 feature 的 id
-                const id = feature.get('id');
-                // 将 id 添加到数组中
-                selectedFeatureIds.push({ id });
-            }
-        });
-        return selectedFeatureIds;
-    }
-}
-
-export default FarmMap;

+ 0 - 852
src/views/addFarm/index.vue

@@ -1,852 +0,0 @@
-<template>
-    <div class="base-container">
-        <fnHeader :hideSwitch="true" :hideShadow="true" showDate></fnHeader>
-        <div class="content">
-            <div class="left">
-                <div class="btn" @click="goBack">
-                    <img src="@/assets/images/common/back-icon.png" alt="" />
-                    返回
-                </div>
-                <chart-box class="left-cont" :name="isAdd ? '新增农事' : '编辑农事'" color="yellow">
-                    <template #title-right>
-                        <steps v-if="isAdd" :active="active"></steps>
-                    </template>
-                    <div class="box">
-                        <div class="box-item" v-if="active === 0">
-                            <div class="box-title">
-                                <div>
-                                    选择农事类型
-                                    <span>(可多选)</span>
-                                </div>
-                            </div>
-                            <div class="list">
-                                <div
-                                    class="list-item"
-                                    @click="handleItem(item, index)"
-                                    :class="{ active: item.active }"
-                                    v-for="(item, index) in checkData"
-                                    :key="index"
-                                >
-                                    {{ item.name }}
-                                    <el-icon size="25" color="#FFD489" v-show="item.active"
-                                        ><CircleCheckFilled
-                                    /></el-icon>
-                                    <div v-show="!item.active" class="round"></div>
-                                </div>
-                            </div>
-                        </div>
-                        <template v-else>
-                            <el-form class="box-form" ref="formRef" :model="dynamicValidateForm" :rules="rules">
-                                <div class="box-item">
-                                    <div class="box-title">基本信息</div>
-                                    <el-form-item label="农事名称" prop="name">
-                                        <el-input v-model="dynamicValidateForm.name" />
-                                    </el-form-item>
-                                    <el-form-item label="触发条件" prop="conditionRate">
-                                        <el-input v-model="dynamicValidateForm.conditionRate" />
-                                    </el-form-item>
-                                    <el-form-item label="执行时间" prop="executeDate">
-                                        <el-date-picker
-                                            class="item-input"
-                                            style="width: 100%"
-                                            value-format="YYYY-MM-DD"
-                                            v-model="dynamicValidateForm.executeDate"
-                                            type="date"
-                                            :clearable="false"
-                                            placeholder="选择日期"
-                                        />
-                                    </el-form-item>
-                                </div>
-                                <div class="usage-mode box-form">
-                                    <el-form-item label="执行分区" prop="regionId">
-                                        <div class="mode-select">
-                                            <el-select
-                                                v-model="dynamicValidateForm.regionId"
-                                                placeholder="请选择"
-                                                style="width: 100%"
-
-                                                @change="changeRegion"
-                                            >
-                                            <el-option v-for="(area, index) in areaList" :key="index" :label="area.name" :value="area.id">
-                                            </el-option>
-                                            </el-select>
-                                        </div>
-                                    </el-form-item>
-                                    <el-form-item label="服务亩数" prop="regionId">
-                                        <div class="mode-select">
-                                            {{ dynamicValidateForm.area }}亩
-                                        </div>
-                                    </el-form-item>
-                                </div>
-                                <div class="usage-mode box-form">
-                                    <el-form-item label="施用方式" prop="usageMode">
-                                        <div class="mode-select">
-                                            <el-select
-                                                v-model="dynamicValidateForm.usageMode"
-                                                placeholder="请选择"
-                                                prop="usageMode"
-                                                style="width: 100%"
-                                            >
-                                                <el-option
-                                                    v-for="(usage, uId) in allUsageModeList"
-                                                    :key="uId"
-                                                    :label="usage"
-                                                    :value="usage"
-                                                />
-                                            </el-select>
-                                        </div>
-                                    </el-form-item>
-                                </div>
-                            </el-form>
-                            <div
-                                class="box-item"
-                                v-for="(item, index) in dynamicValidateForm.prescriptionList"
-                                :key="index"
-                            >
-                                <div class="box-title border-none">
-                                    {{ item.name }}处方
-                                    <div class="add-text" @click="handleAdd(index)">
-                                        <el-icon class="icon"><Plus /></el-icon>
-                                        添加药物
-                                    </div>
-                                </div>
-                                <div
-                                    class="box-item-children"
-                                    v-for="(ele, idx) in item.pesticideFertilizerList"
-                                    :key="idx + 'id'"
-                                >
-                                    <div class="index">{{ idx < 10 ? "0" + (idx + 1) : idx + 1 }}</div>
-                                    <custom-table
-                                        @updateTableData="updateTableData"
-                                        :pIndex="index"
-                                        :cIndex="idx"
-                                        :key="index + '-' + idx"
-                                        :pesticideFertilizerList="ele"
-                                        :hasFly="dynamicValidateForm.usageMode === '叶面施'"
-                                    ></custom-table>
-                                    <div class="box-textarea">
-                                        <el-input
-                                            class="textarea"
-                                            v-model="ele.remark"
-                                            :rows="1"
-                                            type="textarea"
-                                            placeholder="用药注意事项备注"
-                                        />
-                                    </div>
-                                    <div class="btn-group">
-                                        <div class="delete" @click="handleDelete(index, idx)">删除</div>
-                                        <div @click="resetItem(index, idx)">重置</div>
-                                    </div>
-                                </div>
-                            </div>
-                            <div class="box-item">
-                                <el-input
-                                    class="textarea"
-                                    v-model="textarea"
-                                    type="textarea"
-                                    placeholder="用药注意事项备注"
-                                />
-                            </div>
-                        </template>
-                    </div>
-                    <div class="footer">
-                        <el-button v-if="!isAdd" class="button delete" type="danger" plain @click="remove()">删除</el-button>
-                        <div class="button" @click="handleOk">{{ active === 0 ? "确定" : (isAdd ? "新增农事" : "下发农事") }}</div>
-                    </div>
-                </chart-box>
-            </div>
-            <div class="right">
-                <div class="map-header">
-                    <div class="title">
-                        <img src="@/assets/images/common/area-icon.png" alt="" />
-                        执行农事区域
-                    </div>
-                    <div class="check-btn"><el-checkbox v-model="checkedArea" @change="handleArea" label="全选" size="large" /></div>
-                </div>
-                <div ref="mapRef" class="map">
-                    <div class="map-bg map-btn">查看巡园照片</div>
-                    <div class="map-bg map-legend">
-                        <div class="legend-item legend-title">
-                            <el-checkbox v-model="showMapLegend" @change="handleLegend" label="状态图例" size="large" />
-                        </div>
-                        <div class="item">
-                            <img src="@/assets/images/map/status/status-zc.png" alt="" />
-                            正常
-                        </div>
-                        <div class="item">
-                            <img src="@/assets/images/map/status/status-szyc.png" alt="" />
-                            生长异常
-                        </div>
-                        <div class="item">
-                            <img src="@/assets/images/map/status/status-bh.png" alt="" />
-                            病害异常
-                        </div>
-                        <div class="item">
-                            <img src="@/assets/images/map/status/status-ch.png" alt="" />
-                            虫害异常
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { onMounted, ref, reactive } from "vue";
-import { ElMessage, ElMessageBox } from "element-plus";
-import fnHeader from "@/components/fnHeader.vue";
-import steps from "./components/steps.vue";
-import customTable from "./components/table.vue";
-import FarmMap from "./farmMap";
-import { deepClone } from "@/common/commonFun";
-import chartBox from "@/components/chartBox.vue";
-import { useRouter, useRoute } from "vue-router";
-import { useStore } from "vuex";
-import eventBus from "@/api/eventBus";
-let store = useStore();
-let farmMap = new FarmMap();
-
-const active = ref(0);
-
-const checkData = ref([
-    { value: 1, name: "生长异常", active: true, children: [{ index: 1 }] },
-    { value: 3, name: "病虫异常", active: false, children: [{ index: 1 }] },
-    { value: 2, name: "营养农事", active: false, children: [{ index: 1 }] },
-]);
-const handleItem = (item, index) => {
-    checkData.value[index].active = !checkData.value[index].active;
-    // const curIndex = checkValue.value.indexOf(item.value)
-    // if(curIndex===-1){
-    //     checkValue.value.push(item.value)
-    // }else{
-    //     checkValue.value.splice(curIndex,1)
-    //     checkList.value[index].active = false
-    // }
-};
-
-const router = useRouter();
-const route = useRoute();
-const mapRef = ref();
-const farmId = sessionStorage.getItem("farmId");
-
-// 所选蓝色分区的面积
-const getArea = (val) => {
-    dynamicValidateForm.area = val.toFixed(2);
-};
-// 是否为新增
-const isAdd = ref(true);
-
-const libId = route.query?.libId
-onMounted(async () => {
-
-    farmMap.initMap("POINT(113.61448114737868 23.585550924763083)", mapRef.value);
-    isAdd.value = route.query?.isAdd;
-    if (!isAdd.value) {
-        active.value = 1
-        getList()
-    }
-    await getAreaList();
-    dynamicValidateForm.regionId = Number(sessionStorage.getItem("regionId")) ? Number(sessionStorage.getItem("regionId")) : areaList.value[0].id;
-    // farmMap.initData(farmId, dynamicValidateForm.regionId)
-});
-eventBus.off("editNsMap:areaVal", getArea)
-eventBus.on("editNsMap:areaVal", getArea)
-
-// 农场分区列表
-const areaList = ref([]);
-const orderIdVal = ref("");
-const workItemData = ref({});
-const getAreaList = async (callback) => {
-   await VE_API.area.list({ farmId }).then(({ data, code }) => {
-        areaList.value = data;
-        // if (isAdd.value) {
-        //     regionId.value = data && data.length && data[0].id
-        // } else {
-        //     regionId.value = workItemData.value.regionId
-        // }
-        if (isAdd.value) {
-            changeRegion(dynamicValidateForm.regionId);
-        }
-        callback && callback();
-    });
-};
-const id = route.query?.id
-function getList() {
-    VE_API.farm.fetchFarmWorkList({ farmId, libId ,id}).then(({data}) => {
-        workItemData.value = data[0]
-        Object.assign(dynamicValidateForm, workItemData.value)
-        dynamicValidateForm.name = workItemData.value.farmWorkName
-        dynamicValidateForm.conditionRate = workItemData.value.condition
-
-        farmMap.initData(workItemData.value.farmId, workItemData.value.regionId)
-        farmMap.getBlueRegion({gardenId:  workItemData.value.farmId, regionId: workItemData.value.regionId}, (e) => {
-            checkedArea.value = workItemData.value.executeBlueZones.length === e
-            farmMap.setBlueRegion(workItemData.value.executeBlueZones)
-        });
-    })
-}
-
-
-const farmObj = ref();
-const serviceRegion = ref("");
-const getFarmObj = () => {
-    VE_API.farm.fetchFarmDetail({ id: farmId }).then(({ data }) => {
-        farmObj.value = data;
-        if (serviceRegion.value === "") {
-            serviceRegion.value = data.district + data.address + data.name;
-        }
-    });
-};
-
-// 切换分区
-const checkedArea = ref(false);
-const changeRegion = (e) => {
-    dynamicValidateForm.area = 0;
-    checkedArea.value = false;
-    farmMap.initData(farmId, dynamicValidateForm.regionId)
-    farmMap.getBlueRegion({ gardenId: farmId, regionId: e });
-};
-
-const handleArea = (e) => {
-    farmMap.toggleAllArea(e)
-}
-
-// 地图图例
-const showMapLegend = ref(true);
-const handleLegend = (e) => {
-    farmMap.toggleLegend(e);
-};
-
-const goBack = () => {
-    router.go(-1);
-};
-
-
-const remove = () => {
-    ElMessageBox.confirm("是否要删除这个农事?", "警告", {
-        confirmButtonText: "删除",
-        cancelButtonText: "取消",
-        type: "warning",
-    }).then(() => {
-        VE_API.farm.deleteFarmWork({ libId }).then(({ code }) => {
-            if (code === 0) {
-                ElMessage({
-                    type: "success",
-                    message: "删除成功!",
-                });
-                setTimeout(() => {
-                    router.go(-1);
-                }, 500);
-            }
-        });
-    });
-};
-
-//确定/下发农事
-const handleOk = () => {
-    if (active.value) {
-        formRef.value.validate((valid) => {
-            if (valid) {
-                submitForm();
-                // const res = tableData.value.getItem
-                // console.log('res', res);
-            }
-        });
-    } else {
-        active.value = 1;
-        const arr = checkData.value.filter((item) => item.active);
-        // boxList.value = deepClone(arr);
-
-        dynamicValidateForm.prescriptionList = arr.map((item) => ({
-            name: item.name,
-            active: item.active,
-            pesticideFertilizerList: [
-                {
-                    key: 1,
-                    typeName: "",
-                    muUsage: "",
-                    muUsage2: "",
-                    ratio: "",
-                    ratio2: "",
-                    remark: "",
-                },
-            ],
-        }));
-    }
-};
-async function submitForm() {
-    const executeBlueZones = farmMap.getSelectedBlueRegion();
-    if (!executeBlueZones || !executeBlueZones.length) {
-        ElMessage({
-            message: "请选择执行区域",
-            type: "warning",
-        });
-        return false;
-    }
-    let data = {
-        ...dynamicValidateForm,
-        executeBlueZones,
-        remark: textarea.value,
-        farmId,
-    };
-    console.log('dddd', data);
-    let res = null;
-    if (isAdd.value) {
-        data.farmWorkType = 1;
-        // data.name = name.value;
-        // data.condition = condition.value;
-        // 新增农事
-        res = await VE_API.farm.saveFarmWork(data);
-    } else {
-        data = {...data, orderStatus: 1,}
-        res = await VE_API.farm.confirm(data);
-    }
-    if (res?.code == 0) {
-        ElMessage({
-            message: "保存成功",
-            type: "success",
-        });
-        router.go(-1);
-    }
-}
-
-// 表单
-const formRef = ref();
-
-const allUsageModeList = ["叶面施", "根部施"];
-let dynamicValidateForm = reactive({
-    name: "",
-    conditionRate: "",
-    executeDate: "",
-    usageMode: "",
-    regionId: "",
-    prescriptionList: [
-        {
-            name: "",
-            pesticideFertilizerList: [
-                {
-                    key: 1,
-                    typeName: "",
-                    muUsage: "",
-                    muUsage2: "",
-                    ratio: "",
-                    ratio2: "",
-                    remark: "",
-                },
-            ],
-        },
-    ],
-});
-
-const rules = {
-    name: [
-        {
-            required: true,
-            message: "请输入农事名称",
-            trigger: "blur",
-        },
-    ],
-    conditionRate: [
-        {
-            required: true,
-            message: "请输入触发条件",
-            trigger: "blur",
-        },
-    ],
-    executeDate: [
-        {
-            required: true,
-            message: "请选择执行时间",
-            trigger: "blur",
-        },
-    ],
-    usageMode: [
-        {
-            required: true,
-            message: "请选择施用方式",
-            trigger: "change",
-        },
-    ],
-    regionId: [
-        {
-            required: true,
-            message: "请选择执行区域",
-            trigger: "change",
-        },
-    ],
-};
-const textarea = ref("");
-
-// 添加
-const handleAdd = (index) => {
-    dynamicValidateForm.prescriptionList[index].pesticideFertilizerList.push({
-        index: 1,
-        name: "",
-        pesticideFertilizerList: [
-            {
-                key: 1,
-                typeName: "",
-                muUsage: "",
-                muUsage2: "",
-                ratio: "",
-                ratio2: "",
-                remark: "",
-            },
-        ],
-    });
-};
-
-// 删除
-const handleDelete = (index, childIndex) => {
-    // if (boxList.value[index].children.length === 1) return ElMessage.warning("最少保留一个处方");
-    dynamicValidateForm.prescriptionList[index].pesticideFertilizerList.splice(childIndex, 1);
-};
-
-// 重置
-function resetItem(index, childIndex) {
-    dynamicValidateForm.prescriptionList[index].pesticideFertilizerList[childIndex] = {
-        key: 1,
-        pesticideFertilizerId: "",
-        typeName: "",
-        muUsage: "",
-        muUsage2: "",
-        ratio: "",
-        ratio2: "",
-        remark: "",
-    };
-}
-
-function updateTableData(pIndex, cIndex, tableData) {
-    dynamicValidateForm.prescriptionList[pIndex].pesticideFertilizerList[cIndex] = {
-        ...tableData,
-    };
-}
-</script>
-
-<style lang="scss" scoped>
-.base-container {
-    width: 100%;
-    height: 100vh;
-    color: #fff;
-    position: relative;
-    box-sizing: border-box;
-    z-index: 1;
-    background: #000;
-
-    .content {
-        width: 100%;
-        height: calc(100% - 74px);
-        display: flex;
-        justify-content: space-between;
-        box-sizing: border-box;
-        padding: 20px;
-        .left {
-            width: 473px;
-            height: 100%;
-            box-sizing: border-box;
-            .btn {
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                border: 1px solid rgba(255, 255, 255, 0.78);
-                border-radius: 4px;
-                padding: 9px;
-                margin-bottom: 13px;
-                width: 104px;
-                cursor: pointer;
-                img {
-                    width: 14px;
-                    margin-right: 5px;
-                }
-            }
-            .left-cont {
-                width: 100%;
-                height: calc(100% - 48px - 4px);
-                .box {
-                    width: 100%;
-                    height: calc(100% - 58px);
-                    padding: 16px 12px;
-                    box-sizing: border-box;
-                    overflow-y: auto;
-                    .box-item {
-                        background: rgba(255, 255, 255, 0.04);
-                        border: 1px solid #444444;
-                        border-radius: 8px;
-                        padding: 16px 12px 8px 12px;
-                        box-sizing: border-box;
-                        width: 100%;
-                        .box-title {
-                            font-size: 20px;
-                            border-bottom: 1px solid #333333;
-                            padding: 0 0 12px 13px;
-                            margin-bottom: 21px;
-                            position: relative;
-                            display: flex;
-                            justify-content: space-between;
-                            &.border-none {
-                                border: none;
-                                padding-bottom: 0;
-                            }
-                            &::before {
-                                content: "";
-                                position: absolute;
-                                left: 0;
-                                top: 6px;
-                                width: 3px;
-                                height: 16px;
-                                background: #fff;
-                                border-radius: 11px;
-                            }
-                            span {
-                                font-size: 14px;
-                                color: #9f9f9f;
-                            }
-                            .add-text {
-                                font-size: 16px;
-                                color: #ffd489;
-                                display: flex;
-                                align-items: center;
-                                cursor: pointer;
-                                .icon {
-                                    margin-right: 3px;
-                                }
-                            }
-                        }
-                        .list {
-                            .list-item {
-                                background: rgba(255, 255, 255, 0.05);
-                                border-radius: 8px;
-                                font-size: 18px;
-                                padding: 16px;
-                                display: flex;
-                                align-items: center;
-                                justify-content: space-between;
-                                border: 1px solid transparent;
-                                cursor: pointer;
-                                &.active {
-                                    border-color: #ffd489;
-                                    background: rgba(255, 212, 137, 0.05);
-                                }
-                                .round {
-                                    border: 1px solid #cecece;
-                                    border-radius: 50%;
-                                    width: 20px;
-                                    height: 20px;
-                                }
-                            }
-                            .list-item + .list-item {
-                                margin-top: 16px;
-                            }
-                        }
-
-                        .box-item-children {
-                            border: 1px solid #444444;
-                            border-radius: 8px;
-                            padding: 9px;
-                            box-sizing: border-box;
-                            position: relative;
-                            .index {
-                                position: absolute;
-                                top: 0;
-                                left: 0;
-                                background: #ffd489;
-                                border-radius: 4px 0 4px 0;
-                                font-size: 12px;
-                                color: #1d1d1d;
-                                padding: 0 7px;
-                            }
-                            .box-textarea {
-                                border-radius: 4px;
-                                padding: 10px;
-                                background: rgba(255, 255, 255, 0.05);
-                                margin: 16px 0 20px 0;
-                            }
-                            .btn-group {
-                                display: flex;
-                                div {
-                                    background: rgba(255, 212, 137, 0.05);
-                                    border-radius: 4px;
-                                    border: 1px solid #ffd489;
-                                    padding: 6px;
-                                    flex: 1;
-                                    color: #ffd489;
-                                    text-align: center;
-                                    cursor: pointer;
-                                }
-                                .delete {
-                                    background: rgba(249, 152, 81, 0.05);
-                                    border: 1px solid #f99851;
-                                    color: #f99851;
-                                    margin-right: 12px;
-                                }
-                            }
-                        }
-                        .box-item-children + .box-item-children {
-                            margin-top: 12px;
-                        }
-                        .textarea {
-                            ::v-deep {
-                                .el-textarea__inner {
-                                    background: transparent;
-                                    box-shadow: none;
-                                    color: #fff;
-                                    padding: 0;
-                                }
-                            }
-                        }
-                    }
-                    .box-item + .box-item {
-                        margin-top: 16px;
-                    }
-                }
-
-                // 编辑处方
-                .box-form {
-                    ::v-deep {
-                        .el-form-item {
-                            width: 100%;
-                        }
-                        .el-form-item__label {
-                            font-size: 16px;
-                            color: #9f9f9f;
-                        }
-                        .el-input__wrapper {
-                            background: transparent;
-                            box-shadow: 0 0 0 1px #9f9f9f;
-                            .el-input__inner {
-                                color: #fff;
-                            }
-                        }
-                    }
-                }
-
-                .usage-mode {
-                    // display: flex;
-                    // align-items: center;
-                    color: #9f9f9f;
-                    padding: 16px 21px 0px 12px;
-                    border: 1px solid #363636;
-                    background: rgba(255, 255, 255, 0.04);
-                    border-radius: 8px;
-                    font-size: 16px;
-                    margin: 16px 0;
-                    width: 100%;
-                    box-sizing: border-box;
-                    .usage-title {
-                        padding-right: 20px;
-                    }
-                    .mode-select {
-                        flex: 1;
-                    }
-                    ::v-deep {
-                        .el-select__wrapper {
-                            background: transparent;
-                            box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
-                        }
-                        .el-select__placeholder,
-                        .el-select__caret {
-                            // color: #ffd489;
-                            color: #fff;
-                        }
-                    }
-                }
-
-                .footer {
-                    width: 100%;
-                    height: 58px;
-                    border-top: 0.5px solid #555555;
-                    background: rgba(255, 255, 255, 0.04);
-                    display: flex;
-                    justify-content: flex-end;
-                    align-items: center;
-
-                    .button {
-                        font-size: 16px;
-                        padding: 8px 58px;
-                        background: #ffd489;
-                        border-radius: 4px;
-                        color: #000;
-                        margin-right: 12px;
-                        cursor: pointer;
-                        &.delete {
-                            background: rgba(255, 148, 61, 0.1);
-                            color: #FF943D;
-                            border: 1px solid #FF943D;
-                        }
-                    }
-                }
-            }
-        }
-        .right {
-            width: calc(100% - 473px - 18px);
-            margin-left: 18px;
-            height: 100%;
-            background: #191919;
-            border: 0.6px solid #444444;
-            padding: 20px;
-            box-sizing: border-box;
-            border-radius: 8px;
-            .map-header {
-                display: flex;
-                justify-content: space-between;
-                .title {
-                    font-size: 22px;
-                    display: flex;
-                    align-items: flex-end;
-                    font-family: "PangMenZhengDao";
-                    margin-bottom: 16px;
-                    img {
-                        margin-right: 8px;
-                    }
-                }
-                .check-btn {
-                    ::v-deep {
-                        .el-checkbox {
-                            color: #fff;
-                            font-size: 20px;
-
-                        }
-                    }
-                }
-            }
-            .map {
-                width: 100%;
-                clip-path: inset(0px round 4px);
-                height: calc(100% - 31px - 16px);
-                position: relative;
-                .map-bg {
-                    position: absolute;
-                    z-index: 2;
-                    background: rgba(0, 0, 0, 0.6);
-                    border-radius: 18px;
-                    padding: 7px 16px;
-                    right: 20px;
-                }
-                .map-btn {
-                    top: 19px;
-                    cursor: pointer;
-                }
-                .map-legend {
-                    bottom: 21px;
-                    .item {
-                        display: flex;
-                        align-items: center;
-                        font-size: 14px;
-                        img {
-                            width: 16px;
-                            margin-right: 6px;
-                        }
-                    }
-                .legend-title {
-                    border-bottom: 1px solid rgba(102, 102, 102, 0.35);
-                }
-                    .item + .item {
-                        padding-top: 10px
-                    }
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 292
src/views/authentic/Pdf.vue

@@ -1,292 +0,0 @@
-<template>
-  <el-dialog
-      class="my-dialog"
-      fullscreen
-      append-to-body
-      :model-value="showDialog"
-      @close="closeDialog()"
-  >
-    <div class="pdf-main">
-      <div class="title" >
-        <div class="name" ></div>
-        <div class="pdf-close cursor-pointer" @click="closeDialog"></div>
-      </div>
-      <div id="printTest" class="pdf-dialog-box">
-        <div class="pdf-my-body"  >
-          <div class="pdfBox">
-            <div class="a4" id="pdfDom">
-              <div class="a4_title">确权单</div>
-              <table class="a4_table" border=1 style="border-collapse: collapse;">
-                <tr>
-                  <td class="name">农场地址</td>
-                  <td class="text">{{rowData.address}}</td>
-                  <td class="name">农场名称</td>
-                  <td class="text">{{rowData.farmName}}</td>
-                </tr>
-                <tr>
-                  <td class="name">创建时间</td>
-                  <td class="text">{{rowData.createDate}}</td>
-                  <td class="name">农场面积</td>
-                  <td class="text">{{rowData.area}}亩</td>
-                </tr>
-                <tr>
-                  <td class="name">作物物种</td>
-                  <td class="text">{{rowData.speciesTypeName}}</td>
-                  <td class="name">客户姓名</td>
-                  <td class="text">{{rowData.masterName}}</td>
-                </tr>
-                <tr>
-                  <td class="name">联系电话</td>
-                  <td class="text">{{rowData.masterTel}}</td>
-                </tr>
-                <tr>
-                  <td class="name">经纬度</td>
-                  <td colspan="3" class="text2">{{rowData.points}}</td>
-                </tr>
-              </table>
-              <div class="a4_sub_title">地块四至图</div>
-              <img :key="imgUrl" v-show="imgUrl" class="img-content img" style="z-index: 999" width="595" height="500" :src="imgUrl" />
-              <div :key="imgUrl" v-show="!imgUrl" style="width: 595px;height: 500px" class="img-content" ref="mapRef" id="mapRefId"></div>
-              <div class="signature">签名:______________</div>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div style="text-align: left">
-         <el-button size="large" color="#626aef"  @click="handlePrint">保存</el-button>
-        <!-- <el-button size="large" color="#626aef"  v-print="printObj">打印</el-button> -->
-        <!--          <el-button size="large" color="#626aef"  @click="closeDialog">关闭</el-button>-->
-      </div>
-
-    </div>
-  </el-dialog>
-</template>
-
-<script setup>
-import {reactive, ref, toRefs, computed, nextTick, onMounted} from "vue";
-import {useStore} from "vuex";
-import {WKT} from "ol/format";
-import PdfMap from "./pdfMap";
-import { dateFormat } from "@/utils/date_util";
-import {getAreaByWkt} from "../../utils/map";
-import printPdf from "@/utils/html2Canvas";
-const emit = defineEmits(["closeDialog","success"])
-const state = useStore().state;
-const sendConfirmShow = ref(false)
-const mapRef = ref(null)
-let pdfMap = new PdfMap()
-let rowData = ref({})
-
-async function send(){
-  closeDialog();
-}
-
-const props = defineProps({
-  title:{
-    type:String,
-    required:true
-  },
-  showDialog: {
-    type: Boolean,
-    default: true,
-  },
-  rowId:{
-    type: Number,
-    required:true,
-  }
-});
-
-let printObj = {
-  id:"printTest",
-  popTitle: 'good print',
-  beforeOpenCallback (vue) {
-    toImg(true)
-    console.log('打开之前')
-  },
-  openCallback (vue) {
-    let {masterName, farmName, masterTel} = rowData.value
-    document.title =`${farmName}-${masterTel}-${masterName}`
-    console.log('执行了打印')
-  },
-  closeCallback (vue) {
-    document.title =`飞鸟确权平台`
-    console.log('关闭了打印工具')
-  }
-}
-
-let imgUrl = ref(null)
-const executor = ref([])
-const executorList = ref([])
-
-const formRef = ref(null);
-const {title, rowId} = toRefs(props);
-const closeDialog = (key) => {
-  switch (key){
-    case "sendConfirm":
-      sendConfirmShow.value = false;
-      return
-  }
-  emit("closeDialog", "pdf");
-};
-function toImg() {
-  // let canvas = pdfMap.kmap.map.getViewport().querySelector('canvas')
-  // let dataURL = canvas.toDataURL('image/webp');
-  //   imgUrl.value = dataURL;
-}
-
-const handlePrint = () =>{
-    let {masterName, farmName, masterTel} = rowData.value
-    const title =`${farmName}-${masterTel}-${masterName}`
-    printPdf(title)
-}
-
-onMounted(()=>{
-  VE_API.authentic.getDetails({id:rowId.value}).then(({data})=>{
-    data.createDate = dateFormat(new Date(), "YYYY-mm-dd HH:MM:SS");
-    data.area = data.mu
-    rowData.value = data
-    pdfMap.initMap(data,mapRef.value)
-    setTimeout(function(){
-      toImg(false)
-    },1500)
-  })
-})
-</script>
-
-<style lang="scss">
-$title-height:0px;
-$body-height:calc(100% - $title-height);
-
-.pdf-main{
-  left: 25%;
-  right: 25%;
-  top:10%;
-  bottom:10%;
-  background: rgba(1,17,22,0.8);
-  box-shadow: 0px 0px 20px 0px #00FFF0;
-  border-radius: 4px;
-  border: 2px solid rgba(81,233,240,0.6);
-  position: absolute;
-  .title{
-    width: 100%;
-    height: $title-height;
-    box-sizing: border-box;
-    background: rgba(0,77,101,0.8);
-    border-radius: 4px 4px 0px 0px;
-    border-bottom: 2px solid rgba(81,233,240,0.3);
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    .name{
-      margin-left: 20px;
-      font-size: 16px;
-      font-weight: 600;
-      color: #00FFF0;
-      height: 22px;
-    }
-    .pdf-close{
-      width: 16px;
-      height: 16px;
-      background-image: url("@/assets/img/close.png");
-      background-size: 100% 100%;
-    }
-  }
-}
-.pdf-dialog-box{
-  font-family: PingFangSC-Regular, PingFang SC;
-  width: 100%;
-  height: 100%;
-  .pdf-my-body{
-    width: 100%;
-    height: $body-height;
-    box-sizing: border-box;
-    padding: 20px;
-    ::-webkit-scrollbar-thumb {
-      /* 滚动条里面小方块 */
-      background: rgb(70, 71, 71);;
-      border-radius: 6px;
-    }
-    ::-webkit-scrollbar-track {
-      /* 滚动条里面轨道 */
-      background: #ededed;
-    }
-  }
-
-  .pdfBox{
-    height: calc(100%);
-    width: 100%;
-    overflow-y: scroll;
-    box-sizing: border-box;
-    background-color: rgba(141, 142, 142);
-    padding: 10px;
-
-  }
-
-  .a4{
-    font-family: PingFangSC-Medium, PingFang SC;
-    background-color: #FFFFFF;
-    width:595px;
-    height:auto;
-    margin: 0 auto;
-    padding: 15px 63px 15px 63px;
-    font-weight: 600;
-    color: #000000;
-    .a4_title{
-      width:595px;
-      height: 28px;
-      font-size: 24px;
-      text-align: center;
-      margin: 10px 0px 10px 0px;
-    }
-    .a4_sub_title{
-      font-size: 16px;
-      margin: 5px 0px 5px 0px;
-    }
-    .a4_table{
-      height: calc(842px - 33px - 26px - 600px);
-      max-height: calc(842px - 33px - 26px - 600px);
-      width:595px;
-      font-size: 12px;
-      .name{
-        width: 50px;
-        height: 20px;
-        line-height: 20px;
-        padding-right: 9px;
-        box-sizing: border-box;
-        text-align: right;
-      }
-      .text{
-        width: 122px;
-        height: 20px;
-        line-height: 20px;
-        text-align: left;
-        padding-left: 9px;
-        box-sizing: border-box;
-      }
-      .text2{
-        text-align: left;
-        font-size: 10px;
-        font-weight: normal;
-      }
-    }
-    .img-content{
-      z-index: 1000;
-      margin: 0 auto;
-    }
-    .img{
-      z-index: 999;
-    }
-    .signature{
-      width:595px;
-      height: 20px;
-      z-index: 1000;
-      margin-top: 15px;
-      text-align: right;
-    }
-  }
-
-
-}
-
-
-</style>

+ 0 - 578
src/views/authentic/authenticMap.js

@@ -1,578 +0,0 @@
-import config from "@/api/config.js";
-import * as KMap from "@/utils/ol-map/KMap";
-import * as util from "@/common/ol_common.js";
-import Style from "ol/style/Style";
-import Icon from "ol/style/Icon";
-import VectorLayer from "ol/layer/Vector.js";
-import WKT from "ol/format/WKT.js";
-import { reactive } from "vue";
-import Point from "ol/geom/Point.js";
-import Feature from "ol/Feature";
-import { newPoint } from "@/utils/map.js";
-import { Fill, Text,Circle,Stroke } from "ol/style";
-import { getArea } from "ol/sphere.js";
-import * as proj from "ol/proj";
-import proj4 from "proj4";
-import { register } from "ol/proj/proj4";
-import GeometryCollection from 'ol/geom/GeometryCollection.js';
-import { ElMessage } from "element-plus";
-import { useStore } from "vuex";
-import {bboxToFeature} from "../../utils/map";
-import * as turf from "@turf/turf";
-proj4.defs(
-  "EPSG:38572",
-  "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs"
-);
-register(proj4);
-export let mapData = reactive({
-  isEdit: false,
-  isEditArea: false,
-  curPointData: {},
-  point: null,
-  selectPointArr: [],
-  isPointHide: null,
-  disabledForm : false,
-  selectPoint:'',
-  pointIndex:-1
-});
-
-function resetMapData(){
-  mapData.isEdit= false
-  mapData.isEditArea= false
-  mapData.curPointData= {}
-  mapData.point= null
-  mapData.selectPointArr= []
-  mapData.isPointHide= null
-  mapData.disabledForm= false
-  mapData.selectPoint= ''
-  mapData.pointIndex=-1
-}
-
-/**
- * @description 地图层对象
- */
-class AuthenticMap {
-  constructor() {
-    let that = this;
-    that.store = useStore();
-    let vectorStyle = new KMap.VectorStyle();
-    this.vectorStyle = vectorStyle;
-    // 位置图标
-    this.clickPointLayer = new KMap.VectorLayer("clickPointLayer", 9999, {
-      style: (f) => {
-        const style1 = new Style({
-          image: new Icon({
-            src: require(`@/assets/images/map/${f.get("icon")}-icon.png`),
-            scale: 0.45,
-          }),
-        });
-        const style2 = new Style({
-          text: new Text({
-            font: "16px sans-serif",
-            text: f.get("masterName"),
-            offsetY: -40,
-            padding: [4, 3, 2, 106],
-            fill: new Fill({ color: "#fff" }), // 字体颜色
-          }),
-        });
-        const style3 = new Style({
-          image: new Icon({
-            src: require(`@/assets/images/map/${f.get("iconBg")}.png`),
-            scale: 0.45,
-            displacement: [0, 90],
-          }),
-        });
-        return [style1, style2, style3];
-      },
-    });
-
-    this.locationLayer = new KMap.VectorLayer("locationLayer", 9999, {
-      style: () => {
-        return new Style({
-          image: new Icon({
-            src: require("@/assets/images/map/location.png"),
-            scale: 0.45,
-          }),
-        });
-      },
-    });
-
-    this.selectPointLayer = new KMap.VectorLayer("selectPointLayer", 10000, {
-      style: () => {
-        return new Style({
-          // geometry: new Point(coord[0][i]),
-          image: new Circle({
-              radius: 6,
-              fill: new Fill({
-              color: 'red'
-              }),
-              stroke: new Stroke({
-              color: '#fff',
-              width: 1
-              }),
-            }),
-          });
-      },
-    });
-
-    // 存储绘制的地块特征
-    // this.drawnFeatures = [];
-    
-  }
-
-  initMap(location, target) {
-    let that = this
-    let level = 16;
-    let coordinate = util.wktCastGeom(location).getFirstCoordinate();
-    this.kmap = new KMap.Map(
-      target,
-      level,
-      coordinate[0],
-      coordinate[1],
-      null,
-      6,
-      22
-    );
-    this.kmap.initDraw((e) => {
-      if (e.type === "drawend") {
-        mapData.isEdit = true;
-        mapData.point = e.feature;
-      }
-    });
-    this.kmap.modifyDraw((e) => {
-      if(e.type === "modifyend"){
-        mapData.isEditArea = false;
-        mapData.isEditArea = true;
-      }
-    }, function(e){
-      let f = null
-      that.kmap.map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
-          f= feature
-      },{hitTolerance:10});
-      if(!f){
-        return false
-      }
-      let res = f.get("id") === mapData.curPointData.id || !f.get("id")
-      if(!res){
-        ElMessage.warning("编辑中")
-      }
-      console.log('f.get("height")',f);
-      res = f.get("height").length>0?false:res
-      return res
-    });
-    this.kmap.addLayer(this.clickPointLayer.layer);
-    this.kmap.addLayer(this.locationLayer.layer);
-    this.kmap.addLayer(this.selectPointLayer.layer);
-    this.addMapSingerClick();
-  }
-
-  fit(geometriesWkt){
-    let geometries = []
-    let f = new WKT();
-    for(let wkt of geometriesWkt){
-      geometries.push(f.readGeometry(wkt))
-    }
-    let extent = new GeometryCollection(geometries).getExtent()
-    this.kmap.fit(extent)
-  }
-
-  //撤销上一个点
-  undoLastDraw() {
-    // const coordinates = this.kmap.getLayerFeatures()[0].getGeometry().getCoordinates()
-    // coordinates[0][0].pop()
-    // this.kmap.getLayerFeatures()[0].getGeometry().getCoordinates(coordinates)
-  }
-
-  //      取消地块
-  cancelDraw() {
-    this.kmap.polygonLayer.source.removeFeature(mapData.point);
-  }
-
-  //   添加点位
-  addPoint(points) {
-    const arrPoints = [];
-    if (points && points.length > 0) {
-      points.forEach((item) => {
-        let f = newPoint({ ...item, icon: "point", iconBg: "name-bg" }, "point");
-        arrPoints.push(f);
-      });
-      this.clickPointLayer.source.addFeatures(arrPoints);
-    }
-  }
-
-  //  设置地图中心点位
-  setMapCenter(v,isPoint = true) {
-    let arrayOfNumbers = [];
-    const arrayOfStrings = v.split(",");
-    arrayOfNumbers = [arrayOfStrings[1], arrayOfStrings[0]];
-    this.kmap.map.getView().setCenter(arrayOfNumbers);
-    if(!isPoint) return
-    this.locationLayer.source.clear();
-    let point = new Feature(new Point(arrayOfNumbers));
-    this.locationLayer.addFeature(point);
-  }
-
-  // 开始勾画
-  startDraw() {
-    this.kmap.setDefaultCursor("crosshair");
-    this.kmap.startDraw();
-    this.kmap.endModify();
-  }
-  //结束勾画
-  endDraw() {
-    this.kmap.endDraw();
-    this.kmap.endModify();
-  }
-
-  // 开始编辑
-  startModify(type, feature) {
-    this.kmap.startModify();
-    this.kmap.endDraw();
-    if(type==='upload'){
-      mapData.point = feature
-      mapData.point.set("icon", "point-act");
-      this.kmap.polygonStyle(mapData.point);
-      mapData.isPointHide = mapData.point;
-    }else{
-      mapData.point.set("icon", "point-act");
-    }
-  }
-  //结束编辑
-  endModify() {
-    this.kmap.endModify();
-  }
-
-  // 清空单个数据
-  clearMapData(name, val, id) {
-    name && (mapData[name] = val);
-    this.clickPointLayer.source.forEachFeature((feature) => {
-        feature.set("icon", "point");
-        feature.set("iconBg", "name-bg");
-    });
-    const points = this.kmap.getLayerFeatures();
-    points.forEach((feature) => {
-        feature.set("icon", "point");
-    });
-    resetMapData()
-  }
-  //全选
-  allSelect(ids){
-    let arr = []
-    this.clickPointLayer.source.forEachFeature((feature) => {
-      if(!ids || ids.findIndex((id)=> id == feature.get('id')) > -1){
-        feature.set("icon", "point-act");
-        feature.set("iconBg", "name-act-bg");
-      }
-    });
-    const points = this.kmap.getLayerFeatures();
-    points.forEach((feature) => {
-      if(!ids || ids.findIndex((id)=> id == feature.get('id')) > -1) {
-        feature.set("icon", "point-act");
-        this.kmap.polygonStyle(feature);
-        mapData.isPointHide = feature;
-        arr.push(feature)
-      }
-    });
-    mapData.selectPointArr = arr;
-  }
-  //no全选
-  allUnSelect(){
-    this.clickPointLayer.source.forEachFeature((feature) => {
-        feature.set("icon", "point");
-        feature.set("iconBg", "name-bg");
-    });
-    const points = this.kmap.getLayerFeatures();
-    points.forEach((feature) => {
-        feature.set("icon", "point");
-        this.kmap.polygonStyle(feature);
-        mapData.isPointHide = feature;
-    });
-    mapData.selectPointArr = [];
-  }
-
-  //选中高亮样式
-
-  //选中点位方法
-  selectPonitFun(map,evt){
-    let that = this
-    map.forEachFeatureAtPixel(evt.pixel, function (f, layer) {
-      let d = 0.0002
-      let buff =  bboxToFeature(evt.pixel[0] - d,evt.pixel[1] - d, evt.pixel[0]+ d, evt.pixel[1] + d)
-      if (
-        layer instanceof VectorLayer &&
-        (
-          layer.get("name") === "defaultPolygonLayer")
-      ) {
-        const fs = map.getFeaturesAtPixel(evt.pixel);
-        let lonlat = map.getCoordinateFromPixel(evt.pixel);
-        if (fs.length > 0) {
-          const feature = fs[0];
-          const geometry = feature.getGeometry();
-          let coordinates = geometry.getCoordinates()[0]; // 获取多边形的顶点坐标
-            ElMessage.success("已选择该点位")
-            let list 
-            if(mapData.selectPointArr.length>0){
-              list = f.getGeometry().getCoordinates();
-            }else{
-              list = mapData.point.getGeometry().getCoordinates();
-            }
-            coordinates = list[0][0]
-            let arr = []
-            let i = 0;let curDistance = 0
-            for(let subArray of coordinates){
-              let from = turf.point(subArray);
-              let to = turf.point(lonlat);
-              let options = { units: "miles" };
-              let distance = turf.distance(from, to, options);
-              if(distance < 0.1){
-                if(curDistance == 0){
-                  arr = subArray
-                  curDistance = distance
-                  mapData.pointIndex = i
-                }else if(curDistance > distance){
-                  arr = subArray
-                  curDistance = distance
-                  mapData.pointIndex = i
-                }
-              }
-              i++
-            }
-            that.selectPointLayer.refresh();
-            let point = new Feature(new Point(arr));
-            that.selectPointLayer.addFeature(point);
-            mapData.selectPoint = coordinates
-        }
-      }
-    });
-  }
-
-  // 地图点击事件
-  addMapSingerClick() {
-    let that = this;
-    that.kmap.on("singleclick", (evt) => {
-      if(mapData.curPointData.id && !mapData.disabledForm && mapData.selectPointArr.length===1){
-        that.selectPonitFun(that.kmap.map,evt)
-        return;
-      }
-      if(!mapData.curPointData.id && mapData.isEdit){
-        that.selectPonitFun(that.kmap.map,evt)
-        return;
-      }
-      //判断是否是导入的数据
-      if(that.store.state.authentic.isEditStatus){
-        that.selectPonitFun(that.kmap.map,evt)
-        return;
-      }
-      let num = 0;
-      that.kmap.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
-        // 点击的图层是否是VectorLayer
-        if (
-          layer instanceof VectorLayer &&
-          (layer.get("name") === "clickPointLayer" ||
-            layer.get("name") === "defaultPolygonLayer")
-        ) {
-          // 每次点击,只走一遍该方法
-          num = num + 1;
-          if (num === 1) {
-            that.getSelectPointArr(feature.get("id"));
-            that.kmap.endDraw();
-          }
-        }
-      });
-    });
-  }
-
-  clearSelectPoint(){
-    this.selectPointLayer.source.clear();
-  }
-
-  setPoint(name) {
-    const arr = mapData.selectPointArr.filter(
-      (item) => item.values_.icon === "point-act"
-    );
-    if (arr.length > 0) {
-      mapData.point = arr[0];
-      mapData.point.set("icon", name);
-      mapData.isPointHide.set("icon", name);
-      mapData.point.set("iconBg", "name-bg");
-    }
-    if (arr.length === 1) {
-      mapData.selectPointArr = [];
-    }
-  }
-
-  //添加地块
-  setAreaGeometry(geometryArr) {
-    let that = this;
-    let res = []
-    geometryArr.map((item) => {
-      item.icon = "point";
-      item.iconHide = "false";
-      res.push(that.kmap.setLayerWkt(item.featureWkt, item));
-    });
-    return res
-  }
-
-  deletePointFun(point,callback){
-    const coordinates = point.getGeometry().getCoordinates();
-    let array = coordinates[0][0]
-    // 如果点存在,则删除它
-    if (mapData.pointIndex > -1) {
-      array.splice(mapData.pointIndex, 1); // 删除点
-      // 更新多边形的坐标
-      point.getGeometry().setCoordinates(coordinates); // 更新几何形状
-      mapData.pointIndex = -1
-    }
-    this.clearSelectPoint()
-    callback && callback(mapData.pointIndex)
-  }
-
-  // 移除点的功能
-  removePoint(callback) {
-    // 获取多边形的所有坐标
-    const features = this.kmap.getLayerFeatures()
-    if(mapData.selectPointArr.length>0){
-      features.forEach(item =>{
-        if(item.get("id")===mapData.selectPointArr[0].get("id")){
-            this.deletePointFun(item,callback)
-          }
-      })
-    }else{
-      this.deletePointFun(mapData.point,callback)
-    }
-  }
-
-  //   获取所有选中点位
-  getSelectPointArr(id) {
-    const arr = [];
-    this.clickPointLayer.source.forEachFeature((feature) => {
-      if (feature.get("id") === id) {
-        // 修改当前点位高亮
-        const icon = feature.get("icon") === "point" ? "point-act" : "point";
-        const iconBg =
-          feature.get("iconBg") === "name-bg" ? "name-act-bg" : "name-bg";
-        feature.set("icon", icon);
-        feature.set("iconBg", iconBg);
-        mapData.point = feature;
-        mapData.curPointData = feature.values_;
-      }
-      if (feature.get("icon") === "point-act") {
-        arr.push(feature);
-      }
-    });
-    const points = this.kmap.getLayerFeatures();
-    points.forEach((feature) => {
-      if (feature.get("id") === id) {
-        const icon = feature.get("icon") === "point" ? "point-act" : "point";
-        feature.set("icon", icon);
-        this.kmap.polygonStyle(feature);
-        mapData.isPointHide = feature;
-      }
-    });
-    mapData.selectPointArr = arr;
-  }
-
-  hidePoint() {
-    const feature = mapData.isPointHide;
-    feature.set("iconHide", "true");
-    this.kmap.polygonStyle(feature);
-  }
-
-  clearLayer() {
-    this.clickPointLayer.source.clear();
-    this.kmap.polygonLayer.source.clear();
-  }
-
-  addLayer() {
-    this.kmap.addLayer(this.kmap.polygonLayer.layer);
-    this.kmap.addLayer(this.clickPointLayer.layer);
-  }
-
-  //获取地块信息
-  getAreaGeometry(type) {
-    let features = null
-    if(type==='add') {
-      features = [mapData.point]
-    }else if(type==='upload'){
-      features = this.kmap.getLayerFeatures()
-    }else{
-      if(mapData.curPointData.id){
-        features = [this.kmap.getFeatureById(mapData.curPointData.id)];
-      }else{
-        features = [mapData.point]
-      }
-    }
-    let geometryArr = [];
-    let area = 0;
-    // 获取图层上的Polygon,转成geoJson用于回显
-    features.forEach((item) => {
-      geometryArr.push({ featureWkt: new WKT().writeFeature(item) });
-      let geom = item.getGeometry().clone();
-      geom.transform(proj.get("EPSG:4326"), proj.get("EPSG:38572"));
-      let areaItem = getArea(geom);
-      area = (areaItem + areaItem / 2) / 1000;
-    });
-    return { geometryArr, area: area.toFixed(2) };
-  }
-
-  /**
-   address
-   farmName
-   masterName
-   masterTel
-   speciesTypeName
-   ""
-   * @param form
-   */
-  search(form){
-    const points = this.kmap.getLayerFeatures();
-    let arr = []
-    let geomWkt = []
-    points.forEach((feature) => {
-      let condition = []
-      if(form.address != ''){
-        condition.push(feature.get("address").includes(form.address))
-      }
-      if(form.farmName != ''){
-        const text = feature.get("farmName")
-        if(text!==form.farmName) return
-        condition.push(feature.get("farmName").includes(form.farmName))
-      }
-      if(form.masterName != ''){
-        const text = feature.get("masterName")
-        if(text!==form.masterName) return
-        condition.push(feature.get("masterName").includes(form.masterName))
-      }
-      if(form.masterTel != ''){
-        const text = feature.get("masterTel")
-        if(text!==form.masterTel) return
-        condition.push(feature.get("masterTel").includes(form.masterTel))
-      }
-      if(form.speciesTypeName != ''){
-        const text = feature.get("speciesTypeName")
-        if(text!==form.speciesTypeName) return
-        condition.push(feature.get("speciesTypeName").includes(form.speciesTypeName))
-      }
-      let b = false
-      for(let item of condition){
-        if(item){
-          b = true
-        }else{
-          b = false
-          break
-        }
-      }
-      if(b){
-        arr.push(feature.get("id"))
-        geomWkt.push(new WKT().writeGeometry(feature.getGeometry()))
-      }
-    });
-    this.allUnSelect()
-    this.allSelect(arr)
-    if(geomWkt.length>0){
-      this.fit(geomWkt)
-    }
-  }
-}
-
-export default AuthenticMap;

+ 0 - 1001
src/views/authentic/index.vue

@@ -1,1001 +0,0 @@
-<template>
-    <div class="base-container">
-        <fnHeader :hideSwitch="true" :hideShadow="true"></fnHeader>
-        <div class="top-bg"></div>
-        <el-upload
-            ref="uploadRef"
-            class="upload-demo"
-            :limit="1"
-            :on-exceed="handleExceed"
-            :on-success="onSuccess"
-            :before-upload="beforeUpload"
-            action="https://feiniaotech-dev.sysuimars.cn/site/plugin_ownership/uploadFile"
-            :headers="headerUpload"
-        >
-            <template #trigger>
-                <div class="btn blue" :class="{ 'disabled-button': !disabledForm && isEdit }">
-                    <el-icon><Upload /></el-icon>
-                    <span>RTK点位数据导入</span>
-                </div>
-            </template>
-        </el-upload>
-        <div class="top">
-            <!-- <div class="back btn" @click="goBack">
-        <img class="icon" src="@/assets/images/common/back-icon.png" alt="" />
-        <span>返回</span>
-      </div> -->
-            <el-select
-                v-model="locationVal"
-                filterable
-                remote
-                :disabled="!disabledForm && isEdit"
-                effect="dark"
-                reserve-keyword
-                placeholder="搜索地区"
-                :remote-method="remoteMethod"
-                :loading="loading"
-                @change="handleSearchRes"
-                class="v-select"
-            >
-                <template #prefix>
-                    <el-icon class="el-input__icon"><search /></el-icon>
-                </template>
-                <el-option
-                    v-for="(item, index) in locationOptions.list"
-                    :key="index"
-                    :label="item.title"
-                    :value="item.point"
-                >
-                    <span>{{ item.title }}</span>
-                    <span class="sub-title">{{ item.province }}{{ item.city }}{{ item.district }}</span>
-                </el-option>
-            </el-select>
-            <div class="search">
-                <div class="add btn" :class="{ 'disabled-button': !disabledForm && isEdit }" @click="handleAdd">
-                    <el-icon><Plus /></el-icon>
-                    <span>创建</span>
-                </div>
-                <div class="upload btn" :class="{ 'disabled-button': !disabledForm && isEdit }" @click="handleExport">
-                    <img class="icon" src="@/assets/images/common/back-icon.png" alt="" />
-                    <span>导出</span>
-                </div>
-            </div>
-        </div>
-        <div class="content">
-            <el-form :inline="true" :model="formInlineSearch" class="search-form" ref="formInlineRef">
-                <el-form-item label="农场地址">
-                    <el-input v-model="formInlineSearch.address" placeholder="请输入农场地址" clearable />
-                </el-form-item>
-                <el-form-item label="农场名称">
-                    <el-input v-model="formInlineSearch.farmName" placeholder="请输入农场名称" clearable />
-                </el-form-item>
-                <el-form-item label="作物物种">
-                    <el-input v-model="formInlineSearch.speciesTypeName" placeholder="请输入作物物种" clearable />
-                </el-form-item>
-                <el-form-item label="客户姓名">
-                    <el-input v-model="formInlineSearch.masterName" placeholder="请输入客户姓名" clearable />
-                </el-form-item>
-                <el-form-item label="联系电话">
-                    <el-input v-model="formInlineSearch.masterTel" placeholder="请输入联系电话" clearable />
-                </el-form-item>
-                <div class="button">
-                    <el-button
-                        class="btn"
-                        :class="{ 'disabled-button': !disabledForm && isEdit }"
-                        type="primary"
-                        @click="onSearch"
-                        >查询</el-button
-                    >
-                    <el-button class="btn reset" :class="{ 'disabled-button': !disabledForm && isEdit }" @click="onRest"
-                        >重置</el-button
-                    >
-                </div>
-            </el-form>
-            <div class="box">
-                <div class="map-box" :class="{ 'cursor-pointer': mouseStyle }">
-                    <div ref="mapRef" class="map"></div>
-                </div>
-                <div class="tool-group">
-                    <!-- <div class="btn" @click="handleCancel">
-                        <img class="icon" src="@/assets/images/common/back-black-icon.png" alt="" />
-                        <span>撤销</span>
-                    </div> -->
-                    <!-- <div
-                        class="btn"
-                        @click="handleDeletePoint"
-                        v-show="mapData.selectPointArr.length > 0 && !disabledForm"
-                    >
-                        <el-icon size="15"><CloseBold /></el-icon>
-                        <span>删除点</span>
-                    </div> -->
-                    <div class="btn delete" @click="handleDelete" v-show="mapData.selectPointArr.length > 0">
-                        <el-icon size="15" color="#fff"><CloseBold /></el-icon>
-                        <span>删除地块</span>
-                    </div>
-                </div>
-                <div class="edit-popup" v-show="isEdit">
-                    <div class="edit-title">
-                        <div class="name">
-                            <img src="@/assets/images/common/chart-icon.png" alt="" />
-                            <span>地块属性</span>
-                        </div>
-                        <div class="btn-group">
-                            <div v-show="disabledForm" class="edit" @click="handleEdit">编辑</div>
-                            <div v-show="!disabledForm" class="edit" @click="handleDeletePoint">删除点</div>
-                            <div
-                                v-show="mapData.selectPointArr.length > 0"
-                                class="edit ml"
-                                :class="{ 'disabled-button': !disabledForm }"
-                                @click="handlePrint"
-                            >
-                                打印
-                            </div>
-                        </div>
-                    </div>
-                    <div class="edit-cont">
-                        <el-form
-                            :inline="true"
-                            ref="ruleFormRef"
-                            :disabled="disabledForm"
-                            :model="formInline"
-                            :rules="rules"
-                            label-position="top"
-                            class="form-inline"
-                        >
-                            <el-form-item label="农场地址" prop="address">
-                                <el-input v-model="formInline.address" placeholder="请输入农场地址" clearable />
-                            </el-form-item>
-                            <el-form-item label="农场名称" prop="farmName">
-                                <el-input v-model="formInline.farmName" placeholder="请输入农场名称" clearable />
-                            </el-form-item>
-                            <el-form-item label="创建时间">
-                                <el-input v-model="formInline.createDate" clearable disabled />
-                            </el-form-item>
-                            <el-form-item label="农场面积">
-                                <el-input v-model="formInline.mu" disabled clearable />
-                            </el-form-item>
-                            <el-form-item label="作物物种" prop="speciesTypeName">
-                                <el-input v-model="formInline.speciesTypeName" placeholder="请输入作物物种" clearable />
-                            </el-form-item>
-                            <el-form-item label="斜面面积">
-                                <el-input v-model="formInline.slopeMu" disabled clearable />
-                            </el-form-item>
-                            <el-form-item label="联系电话" prop="masterTel">
-                                <el-input v-model="formInline.masterTel" placeholder="请输入联系电话" clearable />
-                            </el-form-item>
-                        </el-form>
-                        <div class="list-box" v-show="pointList.length > 0">
-                            <span>边界点经纬度</span>
-                            <div class="list-cont">
-                                <div class="list-item" v-for="(item, index) in pointList" :key="index">
-                                    <span>A{{ index + 1 }}</span>
-                                    <div class="item-box">北纬{{ item[1] }}</div>
-                                    <div class="item-box">东经{{ item[0] }}</div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="edit-footer">
-                        <div @click="onCancel" class="btn cancel">取消</div>
-                        <div @click="onSubmit" class="btn save">保存</div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-    <!-- 导出弹窗 -->
-    <el-dialog v-model="dialogVisible" width="82%" center :show-close="false" modal-class="dialog-dark">
-        <div>
-            <el-table :data="gridData" border max-height="600" class="table-dark">
-                <el-table-column property="farmName" label="农场名称" show-overflow-tooltip />
-                <el-table-column property="address" label="农场地址" width="230" show-overflow-tooltip />
-                <el-table-column property="createDate" label="创建时间" width="170" />
-                <el-table-column property="mu" label="农场面积">
-                    <template #default="scope">
-                        <span>{{ scope.row.mu }}亩</span>
-                    </template>
-                </el-table-column>
-                <el-table-column property="slopeMu" label="斜面面积">
-                    <template #default="scope">
-                        <span>{{ scope.row.slopeMu }}亩</span>
-                    </template>
-                </el-table-column>
-                <el-table-column property="speciesTypeName" label="作物物种" />
-                <el-table-column property="masterName" label="客户姓名" />
-                <el-table-column property="masterTel" width="120" label="联系电话" />
-                <el-table-column property="points" label="边界点经纬度" width="480" show-overflow-tooltip />
-            </el-table>
-        </div>
-        <template #footer>
-            <div class="dialog-footer">
-                <el-button class="btn" @click="dialogVisible = false">取消</el-button>
-                <el-button class="btn" type="primary" @click="handleDowload"> 下载 </el-button>
-            </div>
-        </template>
-    </el-dialog>
-    <Pdf
-        :title="formInline.id + ''"
-        :showDialog="pdfShow"
-        @closeDialog="pdfShow = false"
-        v-if="formInline.id && pdfShow"
-        :rowId="formInline.id"
-    ></Pdf>
-</template>
-
-<script setup>
-import { onMounted, ref, reactive, watchEffect, watch } from "vue";
-import fnHeader from "@/components/fnHeader.vue";
-import AuthenticMap from "./authenticMap";
-import { mapData } from "./authenticMap";
-import { useRouter } from "vue-router";
-import { ElMessage, ElMessageBox } from "element-plus";
-import { dateFormat } from "@/utils/date_util";
-import { exportExcel, parseMultiPolygon } from "@/utils/index";
-import { useStore } from "vuex";
-import Pdf from "./Pdf";
-import {Feature} from "ol";
-const pdfShow = ref(false);
-const mouseStyle = ref(1);
-const router = useRouter();
-const store = useStore();
-
-let authenticMap = new AuthenticMap();
-const mapRef = ref();
-const userInfo = JSON.parse(sessionStorage.getItem("userinfo"));
-const location = ref(userInfo.location);
-
-onMounted(() => {
-    authenticMap.initMap(location.value, mapRef.value);
-    getList();
-});
-
-// 获取地块列表
-const plotList = ref([]);
-const getList = (callback) => {
-    authenticMap.clearLayer();
-    return VE_API.authentic.getList(formInlineSearch).then(({ code, data }) => {
-        plotList.value = data || [];
-        const geom = [];
-        data.forEach((item) => {
-            geom.push({ featureWkt: item.geom, ...item });
-        });
-        authenticMap.setAreaGeometry(geom);
-        authenticMap.addPoint(data);
-        callback && callback(geom);
-    });
-};
-
-// 搜索
-const locationVal = ref("");
-const loading = ref(false);
-const MAP_KEY = "CZLBZ-LJICQ-R4A5J-BN62X-YXCRJ-GNBUT";
-
-const handleSearchRes = (v) => {
-    authenticMap.setMapCenter(v);
-    onRest();
-};
-
-const locationOptions = reactive({
-    list: [],
-});
-const remoteMethod = async (keyword) => {
-    if (keyword) {
-        locationOptions.list = [];
-        loading.value = true;
-        const params = {
-            key: MAP_KEY,
-            keyword,
-            //   location: location.value,
-            location: "22.574540836684672,113.1093017627431",
-        };
-        await VE_API.old_mini_map.getCtiyList({ word: keyword }).then(({ data }) => {
-            if (data && data.length) {
-                data.forEach((item) => {
-                    item.point = item.location.lat + "," + item.location.lng;
-                    locationOptions.list.push(item);
-                });
-            }
-        });
-        VE_API.old_mini_map.search(params).then(({ data }) => {
-            loading.value = false;
-            data.forEach((item) => {
-                item.point = item.location.lat + "," + item.location.lng;
-                locationOptions.list.push(item);
-            });
-        });
-    } else {
-        locationOptions.list = [];
-    }
-};
-const validatePhoneNumber = (rule, value, callback) => {
-    const phoneRegex = /^[1][3-9]\d{9}$/;
-    if (!value) {
-        callback(new Error("请输入联系电话"));
-    } else if (!phoneRegex.test(value)) {
-        callback(new Error("手机号码格式不正确"));
-    } else {
-        callback();
-    }
-};
-const rules = {
-    address: [{ required: true, message: "请输入农场地址", trigger: "change" }],
-    farmName: [{ required: true, message: "请输入农场名称", trigger: "change" }],
-    speciesTypeName: [{ required: true, message: "请输入作物物种", trigger: "change" }],
-    masterName: [{ required: true, message: "请输入姓名", trigger: "change" }],
-    masterTel: [{ required: true, validator: validatePhoneNumber, trigger: "change" }],
-};
-const ruleFormRef = ref(null);
-const initForm = {
-    id: "",
-    address: "",
-    farmName: "",
-    createDate: "",
-    mu: "",
-    slopeMu: "",
-    speciesTypeName: "",
-    masterName: "",
-    masterTel: "",
-    geom: "",
-};
-const formInline = reactive({
-    ...initForm,
-});
-const disabledForm = ref(false);
-
-// 筛选
-const formInlineRef = ref(null);
-const formInlineSearch = reactive({
-    ...initForm,
-});
-
-const onSearch = () => {
-    authenticMap.search(formInlineSearch);
-};
-
-const onRest = () => {
-    Object.assign(formInlineSearch, initForm);
-    isUpdata.value = false;
-    onCancel();
-};
-
-const isEdit = ref(false);
-const typeStr = ref("");
-
-// 编辑
-const handleEdit = () => {
-    typeStr.value = "edit";
-    disabledForm.value = false;
-    mapData.disabledForm = false;
-    authenticMap.startModify('edit');
-    authenticMap.clearSelectPoint()
-};
-
-// 取消
-const isUpdata = ref(true);
-const onCancel = () => {
-    authenticMap.clearSelectPoint()
-    isEdit.value = false;
-    store.commit("authentic/SET_ISEDIT_STATUS", false);
-    if (isUpdata.value) {
-        authenticMap.cancelDraw();
-        getList((geoms) => {
-            authenticMap.allUnSelect();
-        });
-    } else {
-        Object.assign(formInlineSearch, initForm);
-        getList((geoms) => {
-            authenticMap.allUnSelect();
-        });
-    }
-    authenticMap.setPoint("point");
-    authenticMap.clearMapData("isEdit", false, formInline.id);
-    authenticMap.endDraw();
-};
-
-// 保存
-const onSubmit = () => {
-    if (!ruleFormRef.value) return;
-    ruleFormRef.value.validate((valid, fields) => {
-        if (valid) {
-            formInline.mu = formInline.mu.split("亩")[0];
-            formInline.slopeMu = formInline.slopeMu.split("亩")[0];
-            if(heightArr.value.length>0){
-                formInline.height = heightArr.value
-            }
-            VE_API.authentic.saveData(formInline).then((res) => {
-                store.commit("authentic/SET_ISEDIT_STATUS", false);
-                isUpdata.value = false;
-                disabledForm.value = true;
-                mapData.disabledForm = true;
-                Object.assign(formInlineSearch, initForm);
-                authenticMap.endDraw();
-                getList().then(() => {
-                    isRefresh.value = false;
-                    isEdit.value = false;
-                    authenticMap.allUnSelect();
-                    authenticMap.clearMapData();
-                    // authenticMap.getSelectPointArr(
-                    //   point.id || plotList.value[plotList.value.length - 1].id
-                    // );
-                });
-            });
-        }
-    });
-};
-
-//上传
-const uploadRef = ref(null);
-const headerUpload = { token: store.getters.token };
-// 校验文件格式和大小
-const beforeUpload = (file) => {
-    const isCsv = file.type === "application/vnd.ms-excel" || file.type === "text/csv" || file.name.endsWith(".csv");
-    updateFormInline({ ...initForm });
-    ruleFormRef.value.resetFields();
-    authenticMap.clearSelectPoint()
-    isEdit.value = false;
-    authenticMap.setPoint("point");
-    authenticMap.clearMapData("isEdit", false, formInline.id);
-    authenticMap.endDraw();
-    if (!isCsv) {
-        ElMessage.error("上传文件只能是 CSV 格式!");
-    }
-
-    return isCsv;
-};
-
-const handleExceed = (files) => {
-    uploadRef.value.clearFiles();
-    const file = files[0];
-    uploadRef.value.handleStart(file);
-};
-
-const heightArr = ref([]);
-const onSuccess = (res) => {
-    typeStr.value = "upload";
-    if (res.code === 0) {
-        ElMessage.success("上传成功");
-        store.commit("authentic/SET_ISEDIT_STATUS", true);
-        isEdit.value = true;
-        disabledForm.value = false;
-        formInline.createDate = dateFormat(new Date(), "YYYY-mm-dd HH:MM:SS");
-        const geom = [{ featureWkt: res.data.geom, ...res.data }];
-        let featureList = authenticMap.setAreaGeometry(geom);
-        authenticMap.fit([res.data.geom]);
-        updatePointList("upload", geom[0]);
-        heightArr.value = res.data.height;
-        const arr = pointList.value.map((item, index) => {
-            return [...item, res.data.height[index]];
-        });
-        getArea(arr);
-        authenticMap.startModify("upload", featureList[0]);
-        uploadRef.value.clearFiles();
-    } else {
-        ElMessage.error("上传失败");
-    }
-};
-
-// 获取面积/亩
-const getArea = (arr) => {
-    VE_API.authentic.getArea(arr).then((res) => {
-        const area = (res.data / 666.67).toFixed(2);
-        formInline.mu = area + "亩";
-    });
-};
-
-// 斜面面积
-const getSlopeArea = (arr) => {
-    VE_API.authentic.fetchSlopeArea({wkt: arr}).then(({data}) => {
-        const area = (data / 666.67).toFixed(2);
-        formInline.slopeMu = area + "亩";
-    });
-};
-
-// 打印
-const handlePrint = () => {
-    pdfShow.value = true;
-};
-
-// 返回
-const goBack = () => {
-    router.go(-1);
-};
-
-function updateFormInline(newData, name) {
-    Object.assign(formInline, newData);
-}
-
-// 删除地块
-const handleDelete = () => {
-    const id = mapData.selectPointArr.map((item) => item.values_.id);
-    if (id.length < 0) return ElMessage("请选择地块");
-    ElMessageBox.confirm("您确定删除该地块吗?", "提示", {
-        confirmButtonText: "确认",
-        cancelButtonText: "取消",
-        type: "warning",
-    })
-        .then(() => {
-            VE_API.authentic.deleteData(id).then((res) => {
-                isUpdata.value = false;
-                onCancel();
-            });
-        })
-        .catch(() => {});
-};
-
-// 创建
-const isRefresh = ref(true);
-const handleAdd = () => {
-    authenticMap.clearSelectPoint()
-    typeStr.value = "add";
-    isRefresh.value = false;
-    isEdit.value = false;
-    if (isUpdata.value) {
-        authenticMap.cancelDraw();
-        authenticMap.allUnSelect();
-    } else {
-        getList();
-        isUpdata.value = true;
-    }
-    updateFormInline({ ...initForm });
-    ruleFormRef.value.resetFields();
-    pointList.value = [];
-    authenticMap.clearMapData("curPointData", {});
-    authenticMap.clearMapData("isEdit", false);
-    authenticMap.setPoint("point");
-    authenticMap.startDraw();
-};
-
-// 删除点
-const handleDeletePoint = () => {
-    authenticMap.removePoint((index) => {
-        updatePointList(typeStr.value);
-        heightArr.value.splice(index,1)
-    });
-};
-
-// 撤销
-const handleCancel = () => {
-    authenticMap.undoLastDraw();
-};
-
-// 导出
-const gridData = ref([]);
-const dialogVisible = ref(false);
-const handleExport = () => {
-    if (mapData.selectPointArr.length < 1) return ElMessage("请选择地块");
-    const ids = mapData.selectPointArr.map((item) => item.values_.id);
-    VE_API.authentic.exportData(ids).then(({ data }) => {
-        gridData.value = data.map((item) => {
-            return {
-                ...item,
-                createDate: dateFormat(new Date(item.createDate), "YYYY-mm-dd HH:MM:SS"),
-            };
-        });
-        dialogVisible.value = true;
-    });
-};
-
-// 下载
-const handleDowload = () => {
-    const fieldLabels = [
-        "农场名称",
-        "农场地址",
-        "创建时间",
-        "农场面积",
-        "作物物种",
-        "客户姓名",
-        "联系电话",
-        "边界点经纬度",
-    ];
-    const fieldKeys = [
-        "farmName",
-        "address",
-        "createDate",
-        "mu",
-        "speciesTypeName",
-        "masterName",
-        "masterTel",
-        "points",
-    ];
-    const fileName = "农场数据" + dateFormat(new Date(), "YYYY-mm-dd HH:MM");
-    exportExcel(gridData.value, fieldLabels, fieldKeys, fileName);
-};
-
-const pointList = ref([]);
-
-// 获取编辑回显数据
-const getDetailsData = (id) => {
-    VE_API.authentic.getDetails({ id }).then(({ data }) => {
-        isEdit.value = true;
-        disabledForm.value = true;
-        mapData.disabledForm = true;
-
-        data.createDate = dateFormat(new Date(data.createDate), "YYYY-mm-dd HH:MM:SS");
-        updateFormInline({ ...data });
-        //   经纬度列表
-        let arr = JSON.parse(data.points);
-        // 删除最后数组最后一项闭合数据
-        arr.pop();
-        pointList.value = arr;
-        if(data.height.length>0){
-            heightArr.value = data.height
-            store.commit("authentic/SET_ISEDIT_STATUS", true);
-            // authenticMap.startModify("upload");
-        }
-        formInline.mu = data.mu + "亩";
-        formInline.slopeMu = data.slopeMu + "亩";
-    });
-};
-
-// 添加经纬度列表
-const updatePointList = (type, geom) => {
-  const { geometryArr, area } = authenticMap.getAreaGeometry(type);
-  let lastItem = null
-    if(type === 'upload'){
-      lastItem = geom
-    }else{
-      lastItem = geometryArr[geometryArr.length - 1];
-    }
-    formInline.geom = lastItem.featureWkt;
-    console.log("formInline.geom", formInline.geom)
-    getSlopeArea(formInline.geom)
-    let result = parseMultiPolygon(lastItem.featureWkt);
-    result.pop();
-    pointList.value = result;
-    //判断是否是导入数据
-    if (store.state.authentic.isEditStatus) {
-        const arr = pointList.value.map((item, index) => {
-            return [...item, heightArr.value[index]];
-        });
-        if (arr[0][2]) {
-            getArea(arr);
-        }
-    } else {
-        formInline.mu = area + "亩";
-    }
-};
-
-watchEffect(() => {
-    if (mapData.isEditArea) {
-        isUpdata.value = false;
-        updatePointList("edit");
-    }
-});
-
-watch(
-    () => mapData.isEdit,
-    (newVale, oldValue) => {
-        if (newVale && mapData.selectPointArr.length < 2 && !isRefresh.value) {
-            isEdit.value = true;
-            disabledForm.value = false;
-            mapData.disabledForm = false;
-            isUpdata.value = true;
-            formInline.createDate = dateFormat(new Date(), "YYYY-mm-dd HH:MM:SS");
-            updatePointList("add");
-            authenticMap.startModify('add');
-        }
-    }
-);
-
-watch(
-    () => mapData.selectPointArr,
-    (newVale, oldValue) => {
-        if (mapData.selectPointArr.length === 1) {
-            const obj = mapData.selectPointArr[0];
-            const id = obj.values_.id;
-            getDetailsData(id);
-            mapData.curPointData = obj.values_;
-        } else {
-            if (isRefresh.value) {
-                isEdit.value = false;
-                authenticMap.endDraw();
-                isRefresh.value = true;
-            }
-            if (mapData.selectPointArr.length === 0 || mapData.selectPointArr.length > 1) {
-                isEdit.value = false;
-            }
-        }
-    }
-);
-</script>
-
-<style lang="scss" scoped>
-::v-deep {
-    .el-upload-list {
-        display: none;
-    }
-}
-.base-container {
-    width: 100%;
-    height: 100vh;
-    color: #fff;
-    box-sizing: border-box;
-    z-index: 1;
-    position: relative;
-    .top-bg {
-        position: absolute;
-        top: 0;
-        width: 100%;
-        height: 74px;
-        background: #101010;
-        z-index: -1;
-    }
-    .upload-demo {
-        display: flex;
-        align-items: center;
-        justify-content: flex-end;
-        padding-right: 20px;
-        background: #101010;
-    }
-    .blue {
-        background: #2199f8;
-    }
-    .btn {
-        display: flex;
-        align-items: center;
-        padding: 6px 16px;
-        border-radius: 4px;
-        cursor: pointer;
-        .icon {
-            width: 13px;
-            height: 13px;
-        }
-        span {
-            margin-left: 10px;
-        }
-    }
-
-    .disabled-button {
-        pointer-events: none;
-        opacity: 0.5;
-        cursor: not-allowed;
-    }
-
-    .top {
-        display: flex;
-        justify-content: space-between;
-        // justify-content: flex-end;
-        width: 100%;
-        height: 40px;
-        background: #101010;
-        padding: 17px 20px 0 20px;
-        box-sizing: border-box;
-        display: flex;
-        align-items: center;
-        .back {
-            border: 1px solid rgba(255, 255, 255, 0.4);
-        }
-        .v-select {
-            width: 300px;
-            ::v-deep {
-                .el-select__wrapper {
-                    background: #101010;
-                    box-shadow: none;
-                    border: 1px solid rgba(255, 255, 255, 0.7);
-                    .el-select__input {
-                        color: #fff;
-                    }
-                }
-            }
-        }
-        .search {
-            display: flex;
-            align-items: center;
-            justify-content: flex-end;
-            width: 60%;
-            .input-with-select {
-                margin-left: 25px;
-            }
-
-            .upload {
-                background: #2199f8;
-                margin-left: 25px;
-            }
-            .add {
-                background: #fff;
-                color: #000;
-                margin-left: 25px;
-            }
-        }
-    }
-
-    .content {
-        width: 100%;
-        height: calc(100% - 74px - 40px - 32px);
-        box-sizing: border-box;
-        background: #101010;
-        padding: 13px 20px 20px 20px;
-        .search-form {
-            height: 40px;
-            margin: 5px 0;
-            display: flex;
-            //   justify-content: flex-end;
-            justify-content: space-between;
-            ::v-deep {
-                .el-form-item__label {
-                    color: #fff;
-                }
-                .el-form-item__content {
-                    width: 190px;
-                }
-                .el-input__wrapper {
-                    background: #101010;
-                    box-shadow: none;
-                    border: 1px solid rgba(255, 255, 255, 0.7);
-                    .el-input__inner {
-                        color: #fff;
-                    }
-                }
-            }
-            .button {
-                display: flex;
-                .btn {
-                    width: 84px;
-                    &.reset {
-                        margin-left: 25px;
-                    }
-                }
-            }
-        }
-        .box {
-            border: 1px solid rgba(255, 255, 255, 0.4);
-            border-radius: 8px;
-            padding: 20px;
-            box-sizing: border-box;
-            background: #232323;
-            width: 100%;
-            height: calc(100% - 50px);
-            position: relative;
-            .map-box {
-                width: 100%;
-                height: 100%;
-                border-radius: 4px;
-                border: 1px solid rgba(255, 255, 255, 0.4);
-                .map {
-                    width: 100%;
-                    height: 100%;
-                }
-            }
-
-            .tool-group {
-                position: absolute;
-                display: flex;
-                right: calc(500px + 36px);
-                top: 42px;
-                .btn {
-                    background: #fff;
-                    color: #000;
-                    margin-right: 10px;
-                }
-                .delete {
-                    background: #e45c5c;
-                    color: #fff;
-                }
-            }
-            .edit-popup {
-                width: 500px;
-                height: calc(100% - 53px - 20px);
-                position: absolute;
-                top: 36px;
-                right: 36px;
-                border: 1px solid rgba(255, 255, 255, 0.4);
-                border-radius: 8px;
-                background: #232323;
-                .edit-title {
-                    padding: 0 10px;
-                    background: rgba(68, 68, 68, 0.4);
-                    border-bottom: 1px solid rgba(68, 68, 68, 0.4);
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-between;
-                    .btn-group {
-                        display: flex;
-                        .ml {
-                            margin-left: 20px;
-                        }
-                    }
-                    .name {
-                        display: flex;
-                        padding: 12px 0px;
-                        align-items: center;
-                    }
-                    span {
-                        margin-left: 8px;
-                        font-size: 18px;
-                        font-family: "SOURCEHANTIFINE";
-                    }
-                    .edit {
-                        color: #2199f8;
-                        padding: 6px 20px;
-                        border: 1px solid #2199f8;
-                        border-radius: 4px;
-                        cursor: pointer;
-                    }
-                }
-                .edit-cont {
-                    padding: 16px;
-                    width: calc(100% - 32px);
-                    height: calc(100% - 64px - 84px);
-                    .form-inline {
-                        height: 320px;
-                        ::v-deep {
-                            .el-input {
-                                width: 200px;
-                                --el-input-placeholder-color: #666666;
-                            }
-                            .el-form-item__label {
-                                color: #bbbbbb;
-                            }
-                            .el-input__wrapper {
-                                background: #232323;
-                                border: 1px solid #444444;
-                                box-shadow: none;
-                                .el-input__inner {
-                                    color: #fff;
-                                }
-                            }
-                        }
-                    }
-                    .list-box {
-                        width: 100%;
-                        height: calc(100% - 320px);
-                        span {
-                            color: #bbbbbb;
-                        }
-                        .list-cont {
-                            width: 100%;
-                            height: calc(100% - 20px);
-                            border-radius: 4px;
-                            margin-top: 5px;
-                            background: rgba(68, 68, 68, 0.4);
-                            padding: 12px 16px;
-                            box-sizing: border-box;
-                            overflow-y: auto;
-
-                            .list-item {
-                                width: 100%;
-                                margin-bottom: 8px;
-                                display: flex;
-                                align-items: center;
-                                .item-box {
-                                    padding: 8px;
-                                    border: 1px solid #444444;
-                                    border-radius: 4px;
-                                    margin-left: 10px;
-                                }
-                            }
-                        }
-                    }
-                }
-                .edit-footer {
-                    width: 100%;
-                    height: 64px;
-                    display: flex;
-                    align-items: center;
-                    justify-content: flex-end;
-                    box-sizing: border-box;
-                    padding: 12px 16px;
-                    border-top: 1px solid rgba(68, 68, 68, 0.4);
-                    background: rgba(68, 68, 68, 0.4);
-                    .btn {
-                        padding: 10px 35px;
-                    }
-                    .cancel {
-                        border: 1px solid rgba(255, 255, 255, 0.4);
-                        margin-right: 16px;
-                    }
-                    .save {
-                        background: #2199f8;
-                    }
-                }
-            }
-        }
-    }
-}
-.dialog-footer {
-    .btn {
-        width: 200px;
-        height: 40px;
-    }
-}
-</style>

+ 0 - 161
src/views/authentic/pdfMap.js

@@ -1,161 +0,0 @@
-import config from "@/api/config.js";
-import * as KMap from "@/utils/ol-map/KMap";
-import * as util from "@/common/ol_common.js";
-import Style from "ol/style/Style";
-import Icon from "ol/style/Icon";
-import VectorLayer from "ol/layer/Vector.js";
-import WKT from "ol/format/WKT.js";
-import { reactive } from "vue";
-import Point from "ol/geom/Point.js";
-import Feature from "ol/Feature";
-import { newPoint } from "@/utils/map.js";
-import { Fill, Text } from "ol/style";
-import { getArea } from "ol/sphere.js";
-import * as proj from "ol/proj";
-import proj4 from "proj4";
-import { register } from "ol/proj/proj4";
-import {DragPan, MouseWheelZoom} from "ol/interaction";
-let mapData = reactive({
-  isEdit: false,
-  isEditArea: false,
-  curPointData: {},
-  point: null,
-  selectPointArr: [],
-  isPointHide: false,
-});
-proj4.defs(
-  "EPSG:38572",
-  "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs"
-);
-register(proj4);
-
-/**
- * @description 地图层对象
- */
-class PdfMap {
-  constructor() {
-    let that = this;
-    let vectorStyle = new KMap.VectorStyle();
-    this.vectorStyle = vectorStyle;
-    // 位置图标
-    this.clickPointLayer = new KMap.VectorLayer("clickPointLayer", 9999, {
-      style: (f) => {
-        const style1 = new Style({
-          image: new Icon({
-            src: require(`@/assets/images/map/${f.get("icon")}-icon.png`),
-            scale: 0.45,
-          }),
-        });
-        const style2 = new Style({
-          text: new Text({
-            font: "16px sans-serif",
-            text: f.get("masterName"),
-            offsetY: -40,
-            padding: [4, 3, 2, 106],
-            fill: new Fill({ color: "#fff" }), // 字体颜色
-          }),
-        });
-        const style3 = new Style({
-          image: new Icon({
-            src: require(`@/assets/images/map/${f.get("iconBg")}.png`),
-            scale: 0.45,
-            displacement: [0, 90],
-          }),
-        });
-        return [style1, style2, style3];
-      },
-    });
-
-    this.locationLayer = new KMap.VectorLayer("locationLayer", 9999, {
-      style: () => {
-        return new Style({
-          image: new Icon({
-            src: require("@/assets/images/map/location.png"),
-            scale: 0.45,
-          }),
-        });
-      },
-    });
-  }
-
-  initMap(data, target) {
-    let level = 16;
-    let coordinate = util.wktCastGeom(data.point).getFirstCoordinate();
-    this.kmap = new KMap.Map(
-      target,
-      level,
-      coordinate[0],
-      coordinate[1],
-      null,
-        6,
-        22
-    );
-    this.lock(false)
-    this.kmap.setLayerWkt(data.geom, data, true, [120, 120, 120, 120] )
-    this.kmap.addLayer(this.clickPointLayer.layer);
-    this.kmap.addLayer(this.locationLayer.layer);
-    this.addPoint(data)
-    this.getSelectPointArr(data.id)
-  }
-
-  getSelectPointArr(id) {
-    const arr = [];
-    this.clickPointLayer.source.forEachFeature((feature) => {
-      if (feature.get("id") === id) {
-        // 修改当前点位高亮
-        feature.set("icon", "point");
-        feature.set("iconBg", "name-act-bg");
-        mapData.point = feature;
-        mapData.curPointData = feature.values_;
-      }
-      arr.push(feature);
-    });
-    const points = this.kmap.getLayerFeatures();
-    points.forEach((feature) => {
-      if (feature.get("id") === id) {
-        feature.set("icon", "point-act");
-        this.kmap.polygonStyle(feature);
-        mapData.isPointHide = feature;
-      }
-    });
-    mapData.selectPointArr = arr;
-  }
-
-  //   添加点位
-  addPoint(point) {
-    const arrPoints = [];
-    arrPoints.push(
-        newPoint({ ...point, icon: "point", iconBg: "name-bg" }, "point")
-    );
-    this.clickPointLayer.source.addFeatures(arrPoints);
-  }
-
-  lock(lockval) {
-    let pan;
-    let mousezoom;
-    this.kmap.map.getInteractions().forEach(function (element) {
-      if (element instanceof DragPan)//获取 控制能否使用鼠标,手指拖动地图的对象
-        pan = element;
-      if(element instanceof MouseWheelZoom)//获取 控制能否使用滚轮滚动放大缩小地图的对象
-        mousezoom = element;
-      if (pan) {
-        if (lockval) {
-          pan.setActive(true);//此对象的setActive方法用来设置是否可以拖动滚动查看
-        }
-        else {
-          pan.setActive(false);
-        }
-      }
-      if (mousezoom) {
-        if (lockval) {
-          mousezoom.setActive(true);
-        }
-        else {
-          mousezoom.setActive(false);
-        }
-      }
-    });
-  }
-}
-
-export default PdfMap;

+ 0 - 28
src/views/file/fileMap.js

@@ -1,28 +0,0 @@
-import config from "@/api/config.js";
-import * as KMap from "@/utils/ol-map/KMap";
-import * as util from "@/common/ol_common.js";
-import Point from "ol/geom/Point.js";
-import Feature from "ol/Feature";
-import VectorLayer from "ol/layer/Vector.js";
-import WKT from "ol/format/WKT.js";
-import ScaleLine from "ol/control/ScaleLine";
-import { useRouter } from "vue-router";
-
-/**
- * @description 地图层对象
- */
-class FileMap {
-  constructor() {
-    let that = this;
-    let vectorStyle = new KMap.VectorStyle();
-    this.vectorStyle = vectorStyle;
-  }
-
-  initMap(location, target) {
-    let level = 16;
-    let coordinate = util.wktCastGeom(location).getFirstCoordinate();
-    this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 6, 22);
-  }
-}
-
-export default FileMap;

+ 0 - 365
src/views/file/index.vue

@@ -1,365 +0,0 @@
-<template>
-  <div class="base-container no-events">
-    <fnHeader></fnHeader>
-    <div class="content">
-      <!-- <div class="top"></div> -->
-      <div class="left yes-events">
-        <div class="chart-list">
-          <div class="chart-item">
-            <chart-box name="光照效能" arrow="left">
-              <!-- <template #title-right>
-                <div>
-                  <el-select
-                    v-model="topographicValue"
-                    placeholder="请选择"
-                    style="width: 86px"
-                    size="small"
-                  >
-                    <el-option
-                      v-for="item in topographicOptions"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    />
-                  </el-select>
-                </div>
-              </template> -->
-              <div class="topographic-content">
-                <bar-chart
-                  styleName="styleName1"
-                  :xData="evaluateXData"
-                  :yData="evaluateYData"
-                ></bar-chart>
-                <!-- <div class="text-list box-bg">
-                    <div class="text-item" v-for="item in 3" :key="item">
-                    <div class="circle"></div>
-                    <div class="txt">
-                        高温Ⅰ级<span>26</span>棵
-                    </div>
-                    </div>
-                </div> -->
-              </div>
-            </chart-box>
-          </div>
-          <div class="chart-item">
-            <chart-box name="气象预警" arrow="left">
-              <div class="topographic-content">
-                <bar-chart
-                  styleName="styleName1"
-                  :xData="evaluateXData"
-                  :yData="evaluateYData"
-                ></bar-chart>
-                <div class="text-list box-bg">
-                  <div class="text-item" v-for="item in 3" :key="item">
-                    <div class="circle"></div>
-                    <div class="txt">桂味<span>15626</span>棵(树龄3.5年)</div>
-                  </div>
-                </div>
-              </div>
-            </chart-box>
-          </div>
-          <div class="chart-item">
-            <chart-box name="气象预警" arrow="left"></chart-box>
-          </div>
-          <div class="chart-item">
-            <chart-box name="气象预警" arrow="left"></chart-box>
-          </div>
-        </div>
-      </div>
-      <div class="home-bottom">
-        <div class="file-box yes-events">
-          <chart-box name="果园档案">
-            <template #title-right>
-              <el-icon class="arrow-icon cursor-pointer" color="#141414"
-                ><DArrowLeft
-              /></el-icon>
-              <div class="edit-btn cursor-pointer" @click="goBack">返回</div>
-            </template>
-            <file-bar>
-              <div class="btn-list">
-                <div class="btn-item">新增</div>
-                <div class="btn-item">筛选</div>
-                <div class="btn-item">撤销</div>
-                <div class="btn-item">保存</div>
-              </div>
-            </file-bar>
-          </chart-box>
-        </div>
-      </div>
-      <div class="right yes-events">
-        <div class="chart-list">
-          <div class="chart-item">
-            <chart-box name="病害历史" arrow="arrow-left">
-              <template #title-right>
-                <el-select
-                  v-model="pestHistoryValue"
-                  placeholder="请选择"
-                  size="small"
-                  class="common-select"
-                  popper-class="common-select-popper"
-                >
-                  <el-option
-                    v-for="item in pestHistoryOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
-                </el-select>
-              </template>
-              <div class="pest-history">
-                <bar-chart
-                  styleName="styleName1"
-                  :xData="evaluateXData"
-                  :yData="evaluateYData"
-                ></bar-chart>
-              </div>
-            </chart-box>
-          </div>
-          <div class="chart-item">
-            <chart-box name="虫害历史" arrow="arrow-left">
-              <template #title-right>
-                <el-select
-                  v-model="pestHistoryValue"
-                  placeholder="请选择"
-                  size="small"
-                  class="common-select"
-                  popper-class="common-select-popper"
-                >
-                  <el-option
-                    v-for="item in pestHistoryOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
-                </el-select>
-              </template>
-              <div class="topographic-content">
-                <bar-chart
-                  styleName="styleName1"
-                  :xData="evaluateXData"
-                  :yData="evaluateYData"
-                ></bar-chart>
-                <div class="text-list box-bg">
-                  <div class="text-item" v-for="item in 3" :key="item">
-                    <div class="circle"></div>
-                    <div class="txt">桂味<span>15626</span>棵(树龄3.5年)</div>
-                  </div>
-                </div>
-              </div>
-            </chart-box>
-          </div>
-          <div class="chart-item">
-            <chart-box name="气象预警" arrow="arrow-left"></chart-box>
-          </div>
-          <div class="chart-item">
-            <chart-box name="气象预警" arrow="arrow-left"></chart-box>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-  <div ref="mapRef" class="bottom-map"></div>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import fnHeader from "@/components/fnHeader.vue";
-import chartBox from "@/components/chartBox.vue";
-import fileBar from "@/components/fileBar.vue";
-import barChart from "@/components/charts/barChart.vue";
-import FileMap from "./fileMap";
-import router from "@/router";
-
-let fileMap = new FileMap();
-const mapRef = ref();
-const topographicValue = ref("高温风险");
-const topographicOptions = ref([
-  { label: "高温风险", value: "高温风险" },
-  { label: "病害风险", value: "病害风险" },
-  { label: "虫害风险", value: "虫害风险" },
-  { label: "阴雨寡照", value: "阴雨寡照" },
-]);
-
-// 右1-病害历史
-const pestHistoryValue = ref("品种");
-const pestHistoryOptions = ref([
-  { label: "品种", value: "品种" },
-  { label: "品种1", value: "品种1" },
-  { label: "品种2", value: "品种2" },
-  { label: "品种3", value: "品种3" },
-]);
-
-// 地形风险
-const evaluateXData = ["区域1", "区域2", "区域3"];
-const evaluateYData = [33, 41, 43];
-
-onMounted(() => {
-  let location = "POINT (113.78049350268851 23.419886891845312)";
-  fileMap.initMap(location, mapRef.value);
-});
-
-// 返回
-const goBack = () => {
-  router.replace("/home");
-};
-</script>
-
-<style lang="scss" scoped>
-.base-container {
-  width: 100%;
-  height: 100vh;
-  color: #fff;
-  position: absolute;
-  box-sizing: border-box;
-  z-index: 1;
-
-  .content {
-    width: 100%;
-    height: calc(100% - 74px - 48px);
-    display: flex;
-    justify-content: space-between;
-    box-sizing: border-box;
-    .left,
-    .right {
-      width: 375px;
-      height: 100%;
-      padding-top: 10px;
-      box-sizing: border-box;
-      display: flex;
-      .chart-list {
-        width: 100%;
-        height: 100%;
-        display: flex;
-        flex-direction: column;
-        justify-content: space-between;
-        .chart-item {
-          width: 100%;
-          height: calc(100% / 4);
-          box-sizing: border-box;
-          margin-bottom: 10px;
-          &.chart-item:last-child {
-            margin: 0;
-          }
-        }
-      }
-      .topographic-content {
-        width: 100%;
-        height: calc(100% - 10px);
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        margin-bottom: 10px;
-        .text {
-          font-weight: 400;
-          padding: 8px 0 4px 5px;
-          text-indent: 2em;
-          margin-left: 8px;
-          span {
-            color: #69bdff;
-          }
-        }
-        .box-bg {
-          border-radius: 2px 2px 0 0;
-          font-size: 12px;
-          padding: 8px 6px;
-          box-sizing: border-box;
-          background: linear-gradient(
-            180deg,
-            rgb(85, 85, 85, 0.4) 0%,
-            rgb(35, 35, 35, 1) 100%
-          );
-        }
-      }
-      .text-list {
-        flex: none;
-        margin: 0 16px;
-        .text-item {
-          display: flex;
-          align-items: center;
-          margin-bottom: 5px;
-          .circle {
-            width: 4px;
-            height: 4px;
-            background: rgba(255, 255, 255, 0.44);
-            border-radius: 50%;
-            margin-right: 6px;
-          }
-          .txt {
-            font-size: 12px;
-            span {
-              margin: 0 2px 0 6px;
-              color: #e8ba52;
-            }
-          }
-        }
-      }
-    }
-    .left {
-      padding-left: 20px;
-    }
-    .right {
-      padding-right: 20px;
-      .list {
-        width: 100%;
-        height: 100%;
-      }
-      .pest-history {
-        width: 100%;
-        height: 100%;
-        padding: 6px 8px 20px 20px;
-        box-sizing: border-box;
-      }
-    }
-    .home-bottom {
-      display: flex;
-      align-items: flex-end;
-      width: calc(100% - 375px - 375px - 72px);
-      height: 100%;
-      justify-content: flex-end;
-      .file-box {
-        height: 25%;
-        min-height: 210px;
-        width: 422px;
-        position: relative;
-        box-shadow: 0 0 3px 3px #2199f8;
-        .arrow-icon {
-          top: -32px;
-          left: 50%;
-          position: absolute;
-          background: #fff;
-          width: 16px;
-          height: 80px;
-          line-height: 80px;
-          border-radius: 5px 0 0 5px;
-          text-align: center;
-          transform: translateX(-50%) rotate(270deg);
-        }
-        .edit-btn {
-          padding: 2px 24px;
-          background: #2199f8;
-          border-radius: 4px;
-        }
-        .btn-list {
-          position: absolute;
-          right: 4px;
-          .btn-item {
-            background: #4f4f4f;
-            border-radius: 4px;
-            padding: 2px 24px;
-            margin-bottom: 16px;
-            &:last-child {
-              margin-bottom: 0;
-            }
-          }
-        }
-      }
-    }
-  }
-}
-.bottom-map {
-  width: 100%;
-  height: 100vh;
-  position: absolute;
-  z-index: 0;
-}
-</style>

+ 0 - 77
src/views/home/album/album_compoents/albumCarousel.vue

@@ -1,77 +0,0 @@
-<template>
-    <album-carousel-item v-if="images" :temp="temp" :sampleId="sampleId" :farmId="farmId" :images="images" :lock="lock"></album-carousel-item>
-</template>
-
-<script setup>
-import { ref, computed, onMounted, onUnmounted, watch } from "vue";
-import "./cacheImg.js"
-import AlbumCarouselItem from "./albumCarouselItem";
-import {dateFormat} from "@/utils/date_util.js"
-import eventBus from "@/api/eventBus.js";
-
-const props =defineProps({
-  sampleId:{
-    type: [Number, String],
-    required: false
-  },
-  farmId:{
-    type: [Number, String],
-    required: true
-  },
-  blueGeoHash:{
-    type: String,
-    required: false
-  },
-  temp:{
-    type: String,
-    required: false
-  },
-  farmWork:{
-    type: Object,
-    required: false
-  },
-  lock:{
-    type: Boolean,
-    default: true
-  }
-})
-const images = ref(null);
-onMounted(() => {
-  getList()
-});
-
-watch(()=>props.farmId,(newValue,oldValue) =>{
-  if(newValue){
-    getList()
-  }
-})
-
-const getList = () =>{
-  if(!props.farmId) return
-  let params = {farmId: props.farmId}
-  if(props.blueGeoHash){
-    params.blueZone = props.blueGeoHash
-  }
-  if(props.sampleId){
-    params.sampleId = props.sampleId
-  }
-  if(props.farmWork?.executeDate){
-    let execcuteDate = new Date(props.farmWork.executeDate)
-    let beforeExecuteDate = new Date(props.farmWork.beforeExecuteDate)
-    const pastDate = new Date(beforeExecuteDate);
-    const futureDate = new Date(execcuteDate);
-    params.startDate = dateFormat(pastDate, "YY-mm-dd");
-    params.endDate = dateFormat(futureDate, "YY-mm-dd");
-  }
-  VE_API.image.list(params).then(res => {
-  if(res.code === 0){
-      images.value = res.data
-    }
-  })
-}
-
-</script>
-
-<style lang="scss" scoped>
-@import "src/styles/index";
-</style>

+ 0 - 107
src/views/home/album/album_compoents/albumCarousel7d.vue

@@ -1,107 +0,0 @@
-<template>
-  <template v-for="(images,index) in imagesList" :key="index">
-    <album-carousel-item :farmId="farmId" :images="images"></album-carousel-item>
-    <div style="height: 5px"></div>
-  </template>
-</template>
-
-<script setup>
-import { ref, computed, onMounted, onUnmounted } from "vue";
-import AlbumDrawBoxItem from "./albumCarouselItem";
-import "./cacheImg.js"
-import AlbumCarouselItem from "./albumCarouselItem";
-import {dateFormat} from "@/utils/date_util.js"
-import eventBus from "@/api/eventBus";
-const props =defineProps({
-  // sampleId:{
-  //   type: [Number, String],
-  //   required: false
-  // },
-  farmId:{
-    type: [Number, String],
-    required: true
-  },
-  farmWork:{
-    type: Object,
-    required: false
-  }
-})
-const imagesList = ref([]);
-let params = {farmId: props.farmId}
-
-onMounted(() => {
-  if(props.farmWork?.executeDate){
-    let execcuteDate = new Date(props.farmWork.executeDate)
-    let beforeExecuteDate = new Date(props.farmWork.beforeExecuteDate)
-    const pastDate = new Date(beforeExecuteDate);
-    const futureDate = new Date(execcuteDate);
-    params.startDate = dateFormat(pastDate, "YY-mm-dd");
-    params.endDate = dateFormat(futureDate, "YY-mm-dd");
-    params.limit = 20
-  }
-  getImageList(params)
-});
-
-const updateData = () =>{
-  params.farmId = props.farmId
-  getImageList(params)
-}
-
-onUnmounted(()=>{
-  eventBus.off("chart:updateOption",updateData)
-})
-
-const getImageList = (params) =>{
-  VE_API.image.list(params).then(res => {
-    if(res.code === 0){
-      let result = splitByWeek(res.data, params.startDate, params.endDate);
-      if(result && result.length > 0){
-        result = result.reverse()
-      }
-      for(let i=0;result != null && i<result.length;i++){
-        if (result[i] && result[i].length > 0){
-          imagesList.value.push(result[i])
-        }
-      }
-    }
-  })
-}
-
-eventBus.on("chart:updateOption",updateData)
-
-function splitByWeek(items, startDate, endDate) {
-  // 将开始时间和结束时间转换为时间戳
-  const start = new Date(startDate).getTime();
-  const end = new Date(endDate).getTime();
-
-  // 创建一个用于存储按周分组的结果
-  const weeklyGroups = [];
-
-  // 遍历每一项
-  items.forEach(item => {
-    const uploadDate = new Date(item.uploadDate).getTime();
-
-    // 确保上传日期在开始日期和结束日期之间
-    if (uploadDate >= start && uploadDate <= end) {
-      // 计算上传日期属于第几周
-      const weekIndex = Math.floor((uploadDate - start) / (7 * 24 * 60 * 60 * 1000));
-
-      // 如果该周的数组不存在,则创建一个
-      if (!weeklyGroups[weekIndex]) {
-        weeklyGroups[weekIndex] = [];
-      }
-
-      // 将当前项添加到对应的周数组中
-      weeklyGroups[weekIndex].push(item);
-    }
-  });
-
-  return weeklyGroups;
-}
-
-
-</script>
-
-<style lang="scss" scoped>
-@import "src/styles/index";
-</style>

+ 0 - 202
src/views/home/album/album_compoents/albumCarouselItem.vue

@@ -1,202 +0,0 @@
-<template>
-  <div class="carousel-container">
-    <!-- 图片列表 -->
-    <div class="carousel-wrapper"  :style="carouselStyle">
-      <photo-provider v-if="images" :photo-closable="true" @visibleChange="handleVisibleChange">
-        <template  v-for="(photo, index) in images"
-                   :key="photo.id">
-          <album-draw-box :temp="temp"  :farmId="farmId" :photo="photo" :current="currentIndex" :index="index" :length="images.length"
-          ></album-draw-box>
-        </template>
-      </photo-provider>
-    </div>
-    <div class="blur-bg" v-if="lock && currentIndex !== 0">
-      <div class="blur-content">
-        <div class="blur-img">
-          <img src="@/assets/img/gallery/camera-icon.png" />
-        </div>
-      </div>
-    </div>
-
-    <!-- 左右箭头 -->
-    <div @click.stop="prev" v-if="currentIndex !== 0" class="arrow left-arrow">
-      <el-icon color="#F0D09C"><ArrowLeftBold /></el-icon>
-    </div>
-    <div
-      @click.stop="next"
-      v-if="images && currentIndex !== images.length - 1"
-      class="arrow right-arrow"
-    >
-      <el-icon color="#F0D09C"><ArrowRightBold /></el-icon>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { toRefs, ref, computed, onMounted, onUnmounted } from "vue";
-import AlbumDrawBox from "./albumDrawBox";
-import "./cacheImg.js"
-const props =defineProps({
-  images:{
-    type: Array,
-    required: true
-  },
-  farmId:{
-    type: [Number,String],
-    required: true
-  },
-  lock:{
-    type: Boolean,
-    default: true
-  }
-  ,temp:{
-    type: String,
-    required: false
-  },
-})
-const {images} = toRefs(props);
-let timer = null;
-const currentIndex = ref(0);
-
-onMounted(() => {
-  updateImagePosition();
-  clearAndRestartTimer();
-});
-onUnmounted(() => {
-  clearInterval(timer);
-});
-
-const updateImagePosition = () => {
-  carouselStyle.value.transform = `translateX(-${currentIndex.value * 100}%)`;
-};
-
-const clickPhotoShow = () => {
-  if (timer) {
-    clearInterval(timer)
-  };
-}
-
-// 图片显隐切换回调
-const handleVisibleChange = ({visible}) => {
-  if (visible.value) {
-    if (timer) {
-      clearInterval(timer)
-    }
-  } else {
-    clearAndRestartTimer();
-  }
-}
-
-// 计算轮播图样式
-const carouselStyle = computed(() => {
-  return {
-    transform: `translateX(-${currentIndex.value * 100}%)`,
-  };
-});
-
-// 下一张图片
-const next = () => {
-  // 图片总数
-  const totalImages = images.value.length;
-  currentIndex.value = (currentIndex.value + 1) % totalImages;
-  updateImagePosition();
-  clearAndRestartTimer();
-};
-
-// 上一张图片
-const prev = () => {
-  // 图片总数
-  const totalImages = images.value.length;
-  currentIndex.value = (currentIndex.value - 1 + totalImages) % totalImages;
-  updateImagePosition();
-  clearAndRestartTimer();
-};
-
-const clearAndRestartTimer = () => {
-  if (timer) {
-    clearInterval(timer);
-  }
-  // timer = setInterval(next, 5000);
-};
-
-
-</script>
-
-<style lang="scss" scoped>
-@import "src/styles/index";
-.carousel-container {
-  position: relative;
-  width: 100%;
-  overflow: hidden;
-  margin: 0 auto;
-  .carousel-wrapper {
-    display: flex;
-    transition: transform 0.5s ease;
-    width: 100%;
-  }
-  .blur-bg {
-    position: absolute;
-    top: 0;
-    width: 100%;
-    height: 100%;
-    backdrop-filter: blur(1.4px);
-    .blur-content {
-      border-radius: 8px;
-      background: rgba(0, 0, 0, 0.5);
-      width: 100%;
-      height: 100%;
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: center;
-      font-size: 12px;
-      color: #fff;
-      .blur-img {
-        img {
-          width: 54px;
-          position: relative;
-          left: 4px;
-          top: 4px;
-        }
-      }
-      .blur-text {
-        padding: 8px 0;
-        text-align: center;
-        line-height: 1.5;
-      }
-      .blur-btn {
-        padding: 0 40px;
-        box-shadow: 0 -2px 2px #86C9FF;
-        height: 28px;
-        line-height: 28px;
-        border-radius: 50px;
-        background: rgba(33, 153, 248, 0.7);
-        // background: linear-gradient(#86C9FF, rgba(255, 255, 255, 0));
-      }
-    }
-  }
-
-  .arrow {
-    position: absolute;
-    top: 50%;
-    transform: translateY(-50%);
-    background: rgba(0, 0, 0, 0.5);
-    width: rpx(72);
-    height: rpx(72);
-    border-radius: 50%;
-    display: inline-flex;
-    align-items: center;
-    justify-content: center;
-    cursor: pointer;
-    pointer-events: all;
-  }
-
-  .left-arrow {
-    left: rpx(32);
-  }
-
-  .right-arrow {
-    right: rpx(32);
-  }
-}
-</style>

+ 0 - 286
src/views/home/album/album_compoents/albumDrawBox.vue

@@ -1,286 +0,0 @@
-<template>
-  <photo-consumer
-      class="carousel-item"
-      :src="watermark || base_img_url2 + (photo.resFilename ? photo.resFilename : photo.filename) + resize"
-  >
-    <img v-if="Math.abs(current - index) < 3" crossorigin="anonymous" @load="drawWatermark($event)" loading="lazy" :src="watermark || (base_img_url2 + (photo.resFilename ? photo.resFilename : photo.filename) + resize)" style="width: 100%;" />
-    <canvas  ref="canvasRef" style="position: absolute;"></canvas>
-    <div class="tag-text" v-if="showTagBox" >
-      <span v-html="photo.growText"></span>
-      <button class="close-button" @click="hideTagBox">✖</button>
-    </div>
-    <div class="tag-box right" :class="{'leftTop': 'leftTop'}">{{ index+1 }}/{{ length }}</div>
-<!--    <div class="center-mark">mark</div>-->
-  </photo-consumer>
-
-</template>
-
-<script setup>
-import { ref, onMounted, onBeforeUnmount, defineProps } from "vue";
-import { base_img_url2 } from "@/api/config";
-import {imageCache,loadImage} from "./cacheImg.js"
-import {dateFormat} from "@/utils/date_util.js"
-import {drawTextInRect, drawBorderImageInRect, drawImageInRect, drawRectInRect, drawHorizontalTextList} from "./utils"
-const resize = "?x-oss-process=image/resize,p_30/format,webp/quality,q_40";
-
-const canvasRef = ref(null);
-const watermark = ref(null)
-const baseMapBig = ref(false)
-
-const props = defineProps({
-  farmId:{
-    type: [Number,String],
-    required: true
-  },
-  photo:{
-    type: Object,
-    required: true
-  },
-  index:{
-    type: Number,
-    required: true
-  },
-  length:{
-    type: Number,
-    required: true
-  },
-  current:{
-    type: Number,
-    required: true
-  }
-  ,temp:{
-    type: String,
-    required: false
-  },
-})
-let img = null;
-let ctx = null;
-let data = {year:props.photo.uploadDate.substring(0,4),
-  monthDay:dateFormat(new Date(props.photo.uploadDate),'mm/dd'),
-  address:props.photo.district.replaceAll("\"","") + props.photo.gardenName,
-  tempImg:imageCache.get("temp"),temp:"10°C-20°C",wendu:"适宜",
-  feiniao:imageCache.get("feiniao"),
-  baseMap:imageCache.get("base_map_"+props.photo.treeId),
-  fusheImg:imageCache.get("fushe"),fushe:"光照优",
-  shiduImg:imageCache.get("shidu"),shidu:"湿度适宜",
-  text:"病害风险,及时喷药",
-  shotCode:props.photo.shotCode,
-  treeCode:props.photo.treeCode,
-  pingzhong:props.photo.pingzhong,
-  uploadDate:props.photo.uploadDate,
-}
-
-async function drawWatermark(event) {
-  img = event.target
-  await loadImage(props.photo.baseMap,"base_map_"+props.photo.treeId)
-  data.baseMap = imageCache.get("base_map_"+props.photo.treeId)
-  if(!watermark.value){
-    let param = {farmId:props.farmId, date: props.photo.uploadDate}
-    let weather = null
-    VE_API.image.findSuitabilityByPoint(param).then((res)=>{
-      if(res.code === 0){
-        weather = res.data
-        drawWatermark2(img,weather)
-      }else{
-        drawWatermark2(img,null)
-      }
-    })
-  }
-}
-
-function drawWatermark2(img,weather) {
-  const canvas = canvasRef.value;
-  let scale = 3
-  canvas.width = img.width * scale;
-  canvas.height = img.height * scale;
-  ctx = canvas.getContext('2d');
-  ctx.scale(scale, scale)
-  ctx.drawImage(img, 0, 0, img.width, img.height);
-  drawBottom(img.width, img.height, weather)
-  watermark.value = canvas.toDataURL();
-}
-
-
-// console.log(data)
-const drawBottom = (imgWidth, imgHeight, weather) => {
-  if (weather) {
-    data["temp"] = weather.tempMin + "°C" + "-" + weather.tempMax + "°C" + " " + weather.tempSuitability
-    data["fushe"] = "光照"+weather.vindexSuitability
-    data["shidu"] = "湿度"+weather.humiditySuitability
-  }
-  // 设置文本样式
-  ctx.font = "8px Arial";
-  ctx.textAlign = "left"; // 设置为左对齐
-  let imgRect = { x: 0, y: 0, width: imgWidth, height: imgHeight}
-  // 绘制头部黑色半透明遮罩
-  let topRect = drawRectInRect(ctx,imgRect, 0, 0, 40, 15,"rgba(0, 0, 0, 0.6)")
-  // 绘制黑色半透明遮罩
-  let bottomRect = drawRectInRect(ctx,imgRect, 0, 5/6 * 100, 100, 1/6 * 100,"rgba(0, 0, 0, 0.6)")
-
-  // drawHorizontalTextList(ctx, topRect, '#ffffff',[data.treeCode, "蓬径:5m", "高度:3m", "高产树",data.pingzhong],
-  drawHorizontalTextList(ctx, topRect, '#ffffff',[data.treeCode],
-      40/1.5, 0,)
-  if(props.temp){
-    drawHorizontalTextList(ctx, topRect, '#ffffff',["高温控梢", props.temp, "新梢萌动5级"],
-        40/1.5, -18,
-        80 , 0,"|",0,
-        30/1.5,"#ffffff",1,2)
-  }
-
-  ctx.fillStyle = "white"; // 文本颜色为白色
-  // 绘制温度
-  let startXPercent = 1;
-  drawImageInRect(ctx, bottomRect, data.tempImg, startXPercent, 5+10, 5, 30)
-  drawTextInRect(ctx, bottomRect,`${data.temp}`,startXPercent + 4, 28+10, 20)
-  // 绘制湿度
-  drawImageInRect(ctx, bottomRect, data.shiduImg, startXPercent+26, 7 + 10, 4, 30)
-  drawTextInRect(ctx, bottomRect,`${data.shidu}`,startXPercent + 31, 28 + 10, 20)
-  // 绘制辐射
-  drawImageInRect(ctx, bottomRect, data.fusheImg, startXPercent+26 + 18, 7 + 10, 5, 30)
-  drawTextInRect(ctx, bottomRect,`${data.fushe}`,startXPercent+31 + 18, 28 + 10, 20)
-  //绘制位置信息
-  ctx.fillStyle = "#FFFFFF90";
-  drawTextInRect(ctx, bottomRect,`${formatDate(new Date(data.uploadDate))}_${data.treeCode}_S3_SCS3-3_D0P0G1`,startXPercent +1.7, 75, 16)
-
-  if(data.baseMap){
-    drawBorderImageInRect(ctx, imgRect, data.baseMap, 2/3*100, 2/3*100,
-        1/3*100, 1/3*100, 5, 5)
-  }
-}
-
-
-const showTagBox = ref(true); // 控制 tag-box 的显示状态
-const hideTagBox = (event) => {
-  event.stopPropagation();
-  showTagBox.value = false; // 隐藏 tag-box
-};
-
-const formatDate = (date) => {
-  const year = date.getFullYear();
-  const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1
-  const day = String(date.getDate()).padStart(2, '0');
-  return `${(year+"").substring(2)}${month}${day}`;
-};
-
-
-
-
-</script>
-
-<style lang="scss" scoped>
-.canvas-container {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  justify-content: center;
-}
-.carousel-item {
-  min-width: 100%;
-  flex-shrink: 0;
-  width: 100%;
-  pointer-events: auto;
-  position: relative;
-  .tag-box {
-    position: absolute;
-    bottom: 30%;
-    left: 50%;
-    transform: translate(-50%, 50%); // 确保在高二分之一的位置水平居中
-    height: 18px;
-    padding: 0 6px;
-    background: rgba(108, 108, 108, 0.67);
-    border-radius: 10px;
-    display: flex;
-    align-items: center;
-    color: #FFFFFF;
-    font-size: 12px;
-
-    &.right {
-      left: auto;
-      right: 10px;
-    }
-    &.leftTop {
-      height: 25px;
-      line-height: 26px;
-      padding: 0 8px;
-      border-radius: 16px;
-      background: rgba(0, 0, 0, 0.6);
-      bottom: auto;
-      top: 6px;
-    }
-  }
-  .tag-text {
-    position: absolute;
-    bottom: 31%;
-    left: 50%;
-    width: 80%;
-    transform: translate(-50%, 50%); // 确保在高二分之一的位置水平居中
-    height: 24px;
-    padding: 10px 0px 10px 0px;
-    background: rgba(0, 0, 0, 0.67);
-    border-radius: 6px;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    text-align: center;
-    color: #FFFFFF;
-    font-size: 12px;
-  }
-
-  .center-mark {
-    position: absolute;
-    bottom: 10px;
-    left: 50%;
-    transform: translateX(-50%);
-    color: #36402c;
-    font-size: rpx(24);
-    font-weight: bold;
-    padding: rpx(14) rpx(30);
-    background: linear-gradient(
-            90deg,
-            rgba(255, 255, 255, 0) 0%,
-            rgba(255, 255, 255, 0.6) 24%,
-            rgba(255, 255, 255, 0.6) 76%,
-            rgba(255, 255, 255, 0) 100%
-    );
-  }
-}
-.carousel-item img {
-  width: 100%;
-  display: block;
-}
-canvas {
-  position: absolute;
-}
-.close-button {
-  background: transparent;
-  border: none;
-  color: #FFFFFF;
-  cursor: pointer;
-  font-size: 10px; // 可以根据需求调整大小
-  position: absolute;
-  top: -1px;
-  right: -9px; // 调整为合适的间距
-  transform: translateY(-50%);
-}
-
-.floating-img {
-  position: absolute;
-  bottom: 0;
-  right: 0;
-  width: auto !important;
-  height: 25% !important;
-}
-.floating-img-big {
-  position: fixed !important;
-  z-index: 99999 !important;
-  top: 50% !important;
-  left: 50% !important;
-  width: auto !important;
-  height: 100% !important;
-  transform: translate(-50%, -50%) !important;
-}
-
-
-
-
-</style>

+ 0 - 75
src/views/home/album/album_compoents/cacheImg.js

@@ -1,75 +0,0 @@
-// 创建一个全局的图片缓存
-const imageCache = new Map();
-
-function loadImage(url, key) {
-    return new Promise((resolve, reject) => {
-        // 检查缓存中是否存在该key的图片
-        if (imageCache.has(key)) {
-            resolve(imageCache.get(key));
-            return;
-        }
-
-        // 如果缓存中没有,则创建一个新的图片对象
-        const img = new Image();
-        img.src = url;
-        img.crossOrigin = 'anonymous';
-
-        img.onload = () => {
-            // 图片加载完成后,将其存入缓存
-            imageCache.set(key, img);
-            resolve(img);
-        };
-
-        img.onerror = (error) => {
-            reject(error);
-        };
-    });
-}
-
-// 使用示例
-loadImage(require('@/assets/watermark/feiniao.png'), 'feiniao')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-loadImage(require('@/assets/watermark/fushe.png'), 'fushe')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-loadImage(require('@/assets/watermark/shidu.png'), 'shidu')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-loadImage(require('@/assets/watermark/temp.png'), 'temp')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-
-loadImage("https://birdseye-img.sysuimars.com/birdseye-look-mini/base_map/90378.jpg", 'base_map')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-
-
-export { imageCache ,loadImage};
-
-

+ 0 - 280
src/views/home/album/album_compoents/detailDailog.vue

@@ -1,280 +0,0 @@
-<template>
-    <el-dialog v-model="winDialogVisible" lock-scroll modal-class="album-detail-modal" :showClose="false" width="90%" align-center>
-        <div>
-            <div class="congratulation-wrap">
-                <div class="congratulation-box">
-                    <div class="win-des">
-                        <!-- <img src="@/assets/img/weather_index/box-top.png" class="win-icon" /> -->
-                    </div>
-                    <div class="album-detail-box">
-                        <div class="detail-title">{{ dialogData.farmWorkName }}</div>
-                        <div class="detail-desc-box">
-                            <div class="desc-item">
-                                <span class="item-name">触发条件</span>
-                                {{ dialogData.condition }}
-                            </div>
-                            <div class="desc-item">
-                                <span class="item-name">农事编号</span>
-                                {{ dialogData.code }}
-                            </div>
-                            <div class="desc-item">
-                                <div v-if="dialogData.status === 2">
-                                    <span class="item-name">推荐时间</span>
-                                    {{ dialogData.solarName }}
-                                </div>
-                                <div v-if="dialogData.status === 1">
-                                    <span class="item-name">推荐时间</span>
-                                    {{ dialogData.executeDate }}
-                                </div>
-                                
-                                <div v-if="dialogData.status === 0">
-                                    <span class="item-name">{{ dialogData.reCheck ? "复核时间" : "执行时间" }}</span>
-                                    {{ dialogData.executeDate }}
-                                </div>
-                                <!-- <span class="item-name">{{ dialogData.status === 0 ? (dialogData.reCheck ? "复核农事" : "完成农事") : "推荐时间" }}</span>
-                                {{ dialogData.code }} -->
-                            </div>
-                            <div class="desc-item">
-                                <span class="item-name">农事宗旨</span>
-                                {{ dialogData.purpose }}
-                            </div>
-                            <div class="desc-item">
-                                <div class="item-name">药物处方</div>
-                                <div class="item-table">
-                                    <el-table :data="dialogData.pesticideFertilizerList" style="width: 100%" :header-cell-style="{background: '#F5F5F5'}">
-                                        <el-table-column prop="pesticideFertilizerCode" label="功效" width="62">
-                                            <template #default="scope">
-                                                {{scope.row.typeName}}
-                                            </template>
-                                        </el-table-column>
-                                        <el-table-column prop="name" label="名称" />
-                                        <!-- <el-table-column prop="ratio" label="配比" width="50">
-                                            <template #default="scope">
-                                                {{scope.row.ratio ? scope.row.ratio : "--"}}
-                                            </template>
-                                        </el-table-column> -->
-                                        <el-table-column prop="ratio" label="方式" width="62">
-                                            <template #default="scope">
-                                                {{scope.row.ratio ? "人工" : "人工"}}
-                                            </template>
-                                        </el-table-column>
-                                    </el-table>
-                                </div>
-                            </div>
-
-                            <div class="card-link">
-                                <img src="@/assets/img/weather_index/expert-icon.png" />
-                                <div class="expert-name">
-                                    {{ dialogData.expertName }}
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-
-            <div class="close-btn" @click.stop="winDialogVisible=false">
-                    <!-- <el-icon size="32" color="#fff"><CircleCloseFilled /></el-icon> -->
-                    <el-button type="primary" class="one-btn" @click.stop="toShare"> 立即分享 </el-button>
-            </div>
-        </div>
-        <template #footer>
-            <div class="dialog-footer">
-                <div class="close-btn">
-                    <!-- <el-icon size="32" color="#fff"><CircleCloseFilled /></el-icon> -->
-                    <!-- <el-button type="primary" class="one-btn" @click="toShare"> 立即分享 </el-button> -->
-                </div>
-            </div>
-        </template>
-    </el-dialog>
-</template>
-<script setup>
-import { ref } from "vue";
-import eventBus from "@/api/eventBus";
-import wx from "weixin-js-sdk";
-import { useRoute, useRouter } from "vue-router";
-
-const winDialogVisible = ref(false);
-
-const route = useRoute();
-const sampleId = route.query.sampleId
-const farmId = route.query.farmId;
-
-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,
-    };
-    winDialogVisible.value = true;
-};
-eventBus.on("detailDialog:showDialog", (data) => {
-    showDialog(data)
-});
-
-const toShare = () => {
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(currentCard.value)}&type=album`,
-    });
-}
-</script>
-
-<style lang="less" scoped>
-.congratulation-wrap {
-    border-radius: 12px;
-    background: #f4f5f4;
-}
-.close-btn {
-    text-align: center;
-    margin-top: 20px;
-}
-.congratulation-box {
-    border-radius: 12px;
-    background: url("@/assets/img/weather_index/box-top.png") no-repeat top center /contain;
-    .el-message-box__message {
-        padding: 12px 0 24px 0;
-    }
-    .win-title {
-        color: #1d1e1f;
-        font-family: "PangMenZhengDao", sans-serif; /* 使用自定义字体 */
-        text-align: center;
-        font-size: 24px;
-        line-height: 32px;
-    }
-    .win-detail {
-        text-align: center;
-        color: #252525;
-        padding-top: 6px;
-        font-size: 16px;
-        span {
-            font-size: 22px;
-            color: #2199f8;
-            padding: 0 6px;
-            font-weight: bold;
-        }
-    }
-    .win-des {
-        height: 205px;
-        text-align: center;
-    }
-    .win-icon {
-        width: 100%;
-        border-radius: 12px 12px 0 0;
-    }
-}
-.album-detail-box {
-    padding: 0 24px 16px 12px;
-    color: #000;
-    position: relative;
-    // top: -58px;
-    .detail-title {
-        font-size: 24px;
-        font-weight: bold;
-        padding-bottom: 8px;
-        letter-spacing: 1.6px;
-    }
-    .detail-desc-box {
-        position: relative;
-        .desc-item {
-            font-size: 14px;
-            .item-name {
-                color: #999999;
-                margin-right: 12px;
-            }
-            .item-table {
-                margin-top: 8px;
-                border: 1px solid rgba(255, 255, 255, 0.6);
-                border-radius: 4px;
-                ::v-deep {
-                    .el-table th.el-table__cell {
-                        padding: 6px 0;
-                    }
-                    .el-table--default .el-table__cell {
-                        padding: 6px 0;
-                    }
-                    .el-table--default .cell {
-                        padding: 0px 6px;
-                    }
-                }
-            }
-        }
-        .desc-item + .desc-item {
-            padding-top: 8px;
-        }
-        .card-link {
-            display: flex;
-            flex-direction: column;
-            align-items: center;
-            justify-content: center;
-            color: #2199f8;
-            font-size: 12px;
-            position: absolute;
-            right: 6px;
-            top: 0px;
-            .expert-name {
-                background: #d3e8ff;
-                border-radius: 4px;
-                padding: 1px 12px;
-                margin-top: 4px;
-                display: flex;
-                align-items: center;
-            }
-            img {
-                width: 62px;
-            }
-            .icon {
-                padding-right: 2px;
-            }
-        }
-    }
-}
-.dialog-footer {
-    position: relative;
-    .close-btn {
-        position: absolute;
-        bottom: -58px;
-        left: 0;
-        right: 0;
-        margin: 0 auto;
-        text-align: center;
-    }
-}
-</style>
-
-<style lang="less">
-.album-detail-modal {
-    .el-overlay-dialog {
-        .el-dialog {
-            padding: 0;
-            border-radius: 12px;
-            background: none;
-            box-shadow: none;
-            margin-bottom: 70px;
-            margin-top: 10px;
-            overflow: auto;
-            scrollbar-width: none;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            pointer-events: none;
-            .el-dialog__header {
-                padding: 0;
-            }
-            .el-dialog__body {
-                pointer-events: all;
-                width: 90%;
-            }
-        }
-
-        .one-btn {
-            width: 210px;
-            height: 40px;
-            line-height: 40px;
-        }
-    }
-}
-</style>

+ 0 - 256
src/views/home/album/album_compoents/utils.js

@@ -1,256 +0,0 @@
-/**
- * 在矩形内绘制矩形
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {number} startXPercent - 内部矩形起始点横坐标,范围从 0 到 100
- * @param {number} startYPercent - 内部矩形起始点纵坐标,范围从 0 到 100
- * @param {number} widthPercent - 内部矩形宽度,范围从 0 到 100
- * @param {number} heightPercent - 内部矩形高度,范围从 0 到 100
- * @param {string} color - 填充颜色,可选参数,默认为黑色
- */
-const drawRectInRect = (ctx, rect, startXPercent, startYPercent, widthPercent, heightPercent, color = 'black') => {
-    // 计算内部矩形的起始坐标
-    const startX = rect.x + (startXPercent / 100) * rect.width;
-    const startY = rect.y + (startYPercent / 100) * rect.height;
-    // 计算内部矩形的宽度和高度
-    const width = (widthPercent / 100) * rect.width;
-    const height = (heightPercent / 100) * rect.height;
-    ctx.fillStyle = color; // 设置填充颜色
-    ctx.fillRect(startX, startY, width, height); // 绘制矩形
-    return { x:startX, y:startY, width, height };
-};
-
-
-
-/**
- * 在矩形内绘制文本
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {string} text - 要绘制的文本
- * @param {number} startXPercent - 文字起始横坐标,范围从 0 到 100
- * @param {number} startYPercent - 文字起始纵坐标,范围从 0 到 100
- * @param {number} fontSizePercent - 文字大小,范围从 0 到 100,基于矩形高度
- */
-const drawTextInRect = (ctx, rect, text, startXPercent, startYPercent, fontSizePercent) => {
-    // 计算文字起始坐标
-    const startX = rect.x + (startXPercent / 100) * rect.width;
-    const startY = rect.y + (startYPercent / 100) * rect.height;
-
-    // 计算文字大小
-    const fontSize = (fontSizePercent / 100) * rect.height;
-    ctx.font = `${fontSize}px sans-serif`; // 设置字体样式
-    ctx.fillText(text, startX, startY);
-};
-
-/**
- * 在矩形内绘制线
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {number} startXPercent - 起始点横坐标,范围从 0 到 100
- * @param {number} startYPercent - 起始点纵坐标,范围从 0 到 100
- * @param {number} endXPercent - 结束点横坐标,范围从 0 到 100
- * @param {number} endYPercent - 结束点纵坐标,范围从 0 到 100
- * @param {string} color - 线条颜色,可选参数,默认为黑色
- * @param {number} lineWidth - 线条宽度,可选参数,默认为1像素
- */
-const drawLineInRect = (ctx, rect, startXPercent, startYPercent, endXPercent, endYPercent, color = 'black', lineWidth = 1) => {
-    // 计算起始点坐标
-    const startX = rect.x + (startXPercent / 100) * rect.width;
-    const startY = rect.y + (startYPercent / 100) * rect.height;
-
-    // 计算结束点坐标
-    const endX = rect.x + (endXPercent / 100) * rect.width;
-    const endY = rect.y + (endYPercent / 100) * rect.height;
-
-    // 设置线条样式
-    ctx.strokeStyle = color; // 设置线条颜色
-    ctx.lineWidth = lineWidth; // 设置线条宽度
-
-    // 绘制线
-    ctx.beginPath();
-    ctx.moveTo(startX, startY);
-    ctx.lineTo(endX, endY);
-    ctx.stroke();
-};
-
-/**
- * 在矩形内绘制点
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {number} xPercent - 点的横坐标,范围从 0 到 100
- * @param {number} yPercent - 点的纵坐标,范围从 0 到 100
- * @param {string} color - 点的颜色,可选参数,默认为黑色
- * @param {number} radius - 点的半径,可选参数,默认为1像素
- */
-const drawPointInRect = (ctx, rect, xPercent, yPercent, color = 'black', radius = 1) => {
-    // 计算点的坐标
-    const x = rect.x + (xPercent / 100) * rect.width;
-    const y = rect.y + (yPercent / 100) * rect.height;
-
-    // 设置点的样式
-    ctx.fillStyle = color; // 设置点的颜色
-
-    // 开始绘制路径
-    ctx.beginPath();
-    ctx.arc(x, y, radius, 0, Math.PI * 2); // 绘制一个圆
-    ctx.fill(); // 填充圆
-};
-
-/**
- * 在矩形内绘制图片
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {HTMLImageElement} img - 要绘制的图片对象
- * @param {number} imgXPercent - 图片起始横坐标,范围从 0 到 100
- * @param {number} imgYPercent - 图片起始纵坐标,范围从 0 到 100
- * @param {number} imgWidthPercent - 图片宽度百分比,范围从 0 到 100
- * @param {number} imgHeightPercent - 图片高度百分比,范围从 0 到 100
- */
-const drawImageInRect = (ctx, rect, img, imgXPercent, imgYPercent, imgWidthPercent, imgHeightPercent) => {
-    // 计算图片的起始坐标
-    const imgX = rect.x + (imgXPercent / 100) * rect.width;
-    const imgY = rect.y + (imgYPercent / 100) * rect.height;
-    // 计算图片的宽度和高度
-    const imgWidth = (imgWidthPercent / 100) * rect.width;
-    const imgHeight = (imgHeightPercent / 100) * rect.height;
-    // 开始绘制图片
-    ctx.drawImage(img, imgX, imgY, imgWidth, imgHeight);
-};
-
-/**
- * 在矩形内绘制图片,带圆角和白色边框
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {HTMLImageElement} img - 要绘制的图片对象
- * @param {number} imgXPercent - 图片起始横坐标,范围从 0 到 100
- * @param {number} imgYPercent - 图片起始纵坐标,范围从 0 到 100
- * @param {number} imgWidthPercent - 图片宽度百分比,范围从 0 到 100
- * @param {number} imgHeightPercent - 图片高度百分比,范围从 0 到 100
- * @param {number} borderRadius - 圆角半径,以像素为单位
- * @param {number} borderWidth - 边框宽度,以像素为单位
- */
-const drawBorderImageInRect = (ctx, rect, img, imgXPercent, imgYPercent, imgWidthPercent, imgHeightPercent, borderRadius, borderWidth) => {
-    // 计算图片的起始坐标
-    const imgX = rect.x + (imgXPercent / 100) * rect.width + borderWidth;
-    const imgY = rect.y + (imgYPercent / 100) * rect.height + borderWidth;
-    // 计算图片的宽度和高度
-    const imgWidth = (imgWidthPercent / 100) * rect.width - 2 * borderWidth;
-    const imgHeight = (imgHeightPercent / 100) * rect.height - 2 * borderWidth;
-
-    // 保存画布状态
-    ctx.save();
-
-    // 开始绘制圆角矩形的边框
-    ctx.beginPath();
-    ctx.moveTo(imgX + borderRadius, imgY);
-    ctx.lineTo(imgX + imgWidth - borderRadius, imgY);
-    ctx.arcTo(imgX + imgWidth, imgY, imgX + imgWidth, imgY + borderRadius, borderRadius);
-    ctx.lineTo(imgX + imgWidth, imgY + imgHeight - borderRadius);
-    ctx.arcTo(imgX + imgWidth, imgY + imgHeight, imgX + imgWidth - borderRadius, imgY + imgHeight, borderRadius);
-    ctx.lineTo(imgX + borderRadius, imgY + imgHeight);
-    ctx.arcTo(imgX, imgY + imgHeight, imgX, imgY + imgHeight - borderRadius, borderRadius);
-    ctx.lineTo(imgX, imgY + borderRadius);
-    ctx.arcTo(imgX, imgY, imgX + borderRadius, imgY, borderRadius);
-    ctx.closePath();
-
-    // 设置边框颜色和宽度
-    ctx.strokeStyle = 'white';
-    ctx.lineWidth = borderWidth;
-    ctx.stroke();
-
-    // 开始绘制圆角矩形的填充(可选,如果需要背景)
-    // ctx.fillStyle = 'transparent'; // 或者设置其他背景颜色
-    // ctx.fill();
-
-    // 开始裁剪
-    ctx.clip();
-
-    // 绘制图片
-    ctx.drawImage(img, imgX, imgY, imgWidth, imgHeight);
-
-    // 恢复画布状态
-    ctx.restore();
-};
-
-/**
- * 在矩形内绘制横向文本列表
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {Array<string>} texts - 要绘制的文本数组
- * @param {number} fontSizePercent - 文字大小,范围从 0 到 100,基于矩形高度
- * @param {number} startXPercent - 文字起始横坐标,范围从 0 到 100,基于矩形宽度
- * @param {number} startYPercent - 文字起始纵坐标,范围从 0 到 100,基于矩形高度
- * @param {number} columnSpacingPercent - 列间距,范围从 0 到 100,基于矩形宽度
- * @param {string} columnSeparator - 列间隔字符,默认为空字符串
- * @param {number} columnSeparatorWidthPercent - 列间隔字符的宽度百分比,范围从 0 到 100,基于矩形宽度
- * @param {number} separatorFontSizePercent - 分隔符字号大小,范围从 0 到 100,基于矩形高度
- * @param {string} separatorColor - 分隔符颜色,默认为黑色
- * @param {number} separatorMarginLeftPercent - 分隔符左边的边距,范围从 0 到 100,基于矩形宽度
- * @param {number} separatorMarginRightPercent - 分隔符右边的边距,范围从 0 到 100,基于矩形宽度
- */
-const drawHorizontalTextList = (ctx, rect,color='white', texts, fontSizePercent, startXPercent = 0, startYPercent = 50, columnSpacingPercent = 0, columnSeparator = '', columnSeparatorWidthPercent = 0, separatorFontSizePercent = fontSizePercent, separatorColor = 'black', separatorMarginLeftPercent = 0, separatorMarginRightPercent = 0) => {
-    // 计算文字大小
-    const fontSize = (fontSizePercent / 100) * rect.height;
-    ctx.font = `${fontSize}px sans-serif`; // 设置字体样式
-
-    // 计算文字的总宽度
-    let totalTextWidth = 0;
-    texts.forEach(text => {
-        totalTextWidth += ctx.measureText(text).width;
-    });
-
-    // 计算分隔符的字体大小
-    const separatorFontSize = (separatorFontSizePercent / 100) * rect.height;
-
-    // 计算分隔符的总宽度
-    ctx.font = `${separatorFontSize}px sans-serif`; // 设置分隔符字体样式
-    const separatorWidth = (columnSeparatorWidthPercent / 100) * rect.width;
-    const totalSeparatorWidth = (texts.length - 1) * separatorWidth;
-
-    // 计算分隔符的左右边距
-    const separatorMarginLeft = (separatorMarginLeftPercent / 100) * rect.width;
-    const separatorMarginRight = (separatorMarginRightPercent / 100) * rect.width;
-
-    // 计算可用的总间距
-    const totalSpacing = (columnSpacingPercent / 100) * rect.width;
-
-    // 计算所有文字和间隔字符以及间距的总宽度
-    const totalWidth = totalTextWidth + totalSeparatorWidth + totalSpacing + (texts.length - 1) * (separatorMarginLeft + separatorMarginRight);
-
-    // 计算实际的起始坐标,使得文本和间隔字符居中于矩形
-    const startX = rect.x + (startXPercent / 100) * rect.width + (rect.width - totalWidth) / 2;
-    const startY = rect.y + (startYPercent / 100) * rect.height - (fontSize / 2); // 绘制文字,纵坐标居中
-
-    // 绘制文本和间隔字符
-    let currentX = startX;
-    texts.forEach((text, index) => {
-        ctx.font = `${fontSize}px sans-serif`; // 设置文字字体样式
-        ctx.fillStyle = color; // 设置文字颜色
-        ctx.fillText(text, currentX, startY + (fontSize / 2)); // 绘制文字,纵坐标居中
-        currentX += ctx.measureText(text).width;
-
-        // 如果不是最后一列,则绘制间隔字符
-        if (index < texts.length - 1) {
-            // 添加左边距
-            currentX += separatorMarginLeft;
-
-            // 设置分隔符颜色和字体样式
-            ctx.fillStyle = separatorColor;
-            ctx.font = `${separatorFontSize}px sans-serif`;
-
-            // 绘制分隔符
-            ctx.fillText(columnSeparator, currentX, startY + (separatorFontSize / 2));
-
-            // 添加右边距
-            currentX += separatorWidth + separatorMarginRight + columnSpacingPercent / 100 * rect.width;
-        }
-    });
-};
-
-
-
-
-
-
-export { drawTextInRect, drawLineInRect, drawPointInRect ,drawImageInRect,drawBorderImageInRect, drawRectInRect, drawHorizontalTextList};
-

文件差異過大導致無法顯示
+ 0 - 83
src/views/home/album/components/chart.vue


+ 0 - 270
src/views/home/album/components/chartSeting.js

@@ -1,270 +0,0 @@
-import * as echarts from "echarts";
-import { color } from "highcharts";
-
-export const galleryLine = {
-    tooltip: {
-        trigger: "axis",
-    },
-    grid: {
-        top: 28,
-        left: 10,
-        right: 26,
-        bottom: 0,
-        containLabel: true,
-    },
-    xAxis: {
-        name: "时间",
-        nameLocation: "end",
-        nameGap: 4,
-        nameTextStyle: {
-            fontSize: 10,
-            color: "#666666"
-        },
-        type: 'category',
-        // 分割线
-        axisTick: {
-            show: false,
-        },
-        splitLine: {
-            show: false,
-        },
-        axisLabel: {
-            // interval: 0,
-            rotate: 15,
-            margin: 14,
-            textStyle: {
-                color: "#999999",
-                fontSize: 10
-            },
-        },
-        data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
-    },
-    yAxis: {
-        name: "xx指标",
-        nameLocation: "end",
-        type: 'value',
-        nameTextStyle: {
-            fontSize: 10,
-            color: "#666666"
-        },
-        axisTick: {
-            show: false,
-        },
-        axisLine: {
-            show: true,
-            lineStyle: {
-                color: "#BBBBBB",
-            },
-        },
-        axisLabel: {
-            textStyle: {
-                color: "#666666",
-                fontSize: 10
-            },
-        },
-        // 分割线
-        splitLine: {
-            show: false,
-            lineStyle: {
-                color: "rgba(255, 255, 255, 0.1)",
-            },
-        },
-    },
-    series: [
-        {
-            data: [40, 58, 62, 64, 68, 74, 80],
-            type: 'line',
-            symbolSize: 6,
-            itemStyle: {
-                color: '#FFD489' // 设置数据点颜色为红色
-            },
-
-            // itemStyle: {
-            //     color: '#CECECE' // 设置数据点颜色
-            // },
-            // lineStyle: {
-            //     type: 'dashed', // 设置线条为虚线
-            //     width: 2,       // 设置线条宽度
-            //     color: '#CECECE' // 设置线条颜色
-            // }
-        }
-    ],
-}
-
-export const galleryIndicatorLine = {
-    tooltip: {
-        // trigger: "axis",
-    },
-    legend: {
-        icon: 'roundRect',
-        top: 0,
-        right: 0,
-        orient: 'horizontal',
-        itemWidth: 6,
-        itemHeight: 2,
-        itemGap: 3,
-        textStyle: {
-          align: 'left',
-          fontSize: 10,
-        },
-        data: [
-          { name: '褪绿率', textStyle: { color: '#66B9FB' }, itemStyle: {color: "#66B9FB"} },
-          { name: '花芽率', textStyle: { color: '#1B98FC' }, itemStyle: {color: "#1B98FC"} },
-          { name: '花蕾率', textStyle: { color: '#036CC0' }, itemStyle: {color: "#036CC0"} },
-          { name: '生长异常', textStyle: { color: '#F7BE5A' }, itemStyle: {color: "#F7BE5A"} },
-          { name: '短花穗率', textStyle: { color: '#F7BE5A' }, itemStyle: {color: "#F7BE5A"} },
-          { name: '病虫异常', textStyle: { color: '#F99851' }, itemStyle: {color: "#F99851"} }
-        ]
-      },
-    grid: {
-        top: 30,
-        left: 8,
-        right: 18,
-        bottom: 4,
-        containLabel: true,
-    },
-    xAxis: {
-        type: 'category',
-        boundaryGap: false,
-        // 分割线
-        axisTick: {
-            show: false,
-        },
-        splitLine: {
-            show: false,
-        },
-        axisLabel: {
-            // interval: 0,
-            interval: "auto", // 自动间隔显示
-            showMinLabel: true, // 显示第一个
-            showMaxLabel: true, // 确保最后一个显示
-            rotate: 40,
-            margin: 14,
-            textStyle: {
-                color: "#666666",
-                fontSize: 10
-            },
-            formatter: function (value) {
-                // 获取后 5 位字符(假设日期格式始终为 'YYYY-MM-DD')
-                let shortenedValue = value.slice(-5);
-
-                // 自定义处理省略号(由于 ECharts 不直接支持,需手动处理)
-                // 此处简单判断,若原长度超过 10(即 'YYYY-MM-DD' 格式),则添加省略号
-                if (value.length > 10) {
-                    shortenedValue = '...' + shortenedValue;
-                }
-
-                return shortenedValue;
-            }
-        },
-        axisLine: {
-            lineStyle: {
-                color: "#ddd",
-            }
-        },
-        data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
-    },
-    yAxis: [{
-        type: 'value',
-        offset: 6,
-        axisTick: {
-            show: false,
-        },
-        axisLine: {
-            show: false,
-        },
-        axisLabel: {
-            align: "center",
-            textStyle: {
-                color: "#666666",
-                fontSize: 12
-            },
-        },
-        // 分割线
-        splitLine: {
-            lineStyle: {
-                type: [4, 3],
-                dashOffset: 5,
-                color: "#DDDDDD",
-            },
-        },
-        // min: 0, // 最小值固定为0
-        // max: 100, // 最大值固定为100
-        // splitNumber: 5, // 设置5个分割段
-    }],
-    series: [
-        {
-            name: "病虫异常",
-            data: [40, 28, 22, 64, 28, 24, 40],
-            type: 'line',
-            smooth: true,
-            symbol: "none",
-            itemStyle: { color: "#FF7219" },
-            lineStyle: {
-                color: "#FF7219", // 折线颜色为红色
-                width: 2, // 线条宽度
-            },
-        },
-        {
-            name: "生长异常",
-            data: [80, 88, 92, 84, 88, 74, 80],
-            type: 'line',
-            symbol: "none",
-            smooth: true,
-            itemStyle: { color: "#FFB82E" },
-            lineStyle: {
-                color: "#FFB82E", // 折线颜色为红色
-                width: 2, // 线条宽度
-            },
-        },
-        {
-            name: "褪绿率",
-            data: [
-                ["9/1", 10],
-                ["9/7", 30],
-                ["9/13", 80],
-            ],
-            type: 'line',
-            smooth: true,
-            symbol: "none",
-            itemStyle: { color: "#66B9FB" },
-            lineStyle: {
-                color: "#66B9FB", // 折线颜色为红色
-                width: 2, // 线条宽度
-            },
-        },
-        {
-            name: "花芽率",
-            data: [
-                ["9/7", 8],
-                ["9/19", 50],
-                ["9/25", 80],
-            ],
-            type: 'line',
-            smooth: true,
-            symbol: "none",
-            itemStyle: { color: "#1B98FC" },
-            lineStyle: {
-                color: "#1B98FC", // 折线颜色为红色
-                width: 2, // 线条宽度
-            },
-        },
-        {
-            name: "花蕾率",
-            data: [
-                ["9/19", 12],
-                ["9/25", 30],
-                ["10/1", 60],
-                ["10/7", 70],
-            ],
-            type: 'line',
-            smooth: true,
-            symbol: "none",
-            itemStyle: { color: "#036CC0" },
-            lineStyle: {
-                color: "#036CC0", // 折线颜色为红色
-                width: 2, // 线条宽度
-            },
-        },
-    ],
-}

+ 0 - 130
src/views/home/album/components/indicatorChart.vue

@@ -1,130 +0,0 @@
-<template>
-    <div class="card-chart" ref="chartRef"></div>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import * as echarts from "echarts";
-import { galleryIndicatorLine } from "./chartSeting";
-import { deepClone } from "@/common/commonFun";
-import eventBus from "@/api/eventBus";
-
-const props = defineProps({
-    indexName: {
-        type: String,
-        default: "",
-    },
-    type: {
-        type: String,
-        default: "",
-    },
-    chartData: {
-        type: Object,
-        default: () => {},
-    },
-    isDark: {
-        type: Boolean,
-        default: false
-    },
-});
-
-let myChart = ref(null);
-const chartRef = ref();
-const options = ref({});
-
-
-onMounted(() => {
-    myChart.value = echarts.init(chartRef.value);
-    options.value = deepClone(galleryIndicatorLine);
-    updateValue(false)
-});
-
-eventBus.on("chart:updateOption",(data)=>{
-    updateValue(true, data)
-})
-
-const updateValue = (isUpdate, data) =>{
-    let chartList = {}
-    if (isUpdate) {
-        // const filterData = filterDataAfterJanuary(data)
-        chartList = data
-    } else {
-        chartList = props.chartData
-    }
-    myChart.value.clear()
-    if(chartList.dates?.length){
-        options.value.xAxis.data = chartList.dates
-        options.value.series[0].name = chartList.diseaseRiskName
-        options.value.legend.data[0] = chartList.diseaseRiskName
-        options.value.series[0].data = chartList.diseaseRisk
-        options.value.series[1].name = chartList.growthRiskName
-        options.value.legend.data[1] = chartList.growthRiskName
-        options.value.series[1].data = chartList.growthRisk
-        options.value.series[2].name = chartList.phenoParam1Name
-        options.value.legend.data[2] = chartList.phenoParam1Name
-        options.value.series[2].data = chartList.phenoParam1
-        options.value.series[3].name = chartList.phenoParam2Name
-        options.value.legend.data[3] = chartList.phenoParam2Name
-        options.value.series[3].data = chartList.phenoParam2
-        options.value.series[4].name = chartList?.phenoParam3Name
-        options.value.legend.data[4] = chartList.phenoParam3Name
-        options.value.series[4].data = chartList?.phenoParam3
-        if (props.isDark) {
-            options.value.yAxis[0].splitLine.lineStyle.color = "#333333"
-            options.value.yAxis[0].axisLabel.textStyle.color = "#999999"
-            options.value.xAxis.axisLine.lineStyle.color = "#333333"
-            options.value.xAxis.axisLabel.textStyle.color = "#999999"
-            options.value.legend.textStyle.color = "rgba(255, 255, 255, 0.6)"
-        }
-        myChart.value.setOption(options.value);
-    }
-}
-
-// 过滤函数,根据日期截取数据
-const filterDataAfterJanuary = (rawData) => {
-      const startDate = new Date('2025-01-01');
-      const filtered = {
-        dates: [],
-        growthRisk: [],
-        diseaseRiskName: "",
-        growthRiskName: "",
-        phenoParam1Name: "",
-        phenoParam2Name: "",
-        phenoParam3Name: "",
-        phenoParam4Name: "",
-        phenoParam1: [],
-        phenoParam2: [],
-        phenoParam3: [],
-        phenoParam4: [],
-      };
- 
-      rawData?.dates.forEach((dateStr, index) => {
-        const date = new Date(dateStr);
-        if (date >= startDate) {
-          filtered.dates.push(dateStr);
-          filtered.diseaseRiskName = rawData.diseaseRiskName
-          filtered.growthRiskName = rawData.growthRiskName
-          filtered.phenoParam1Name = rawData.phenoParam1Name
-          filtered.phenoParam2Name = rawData.phenoParam2Name
-          filtered.phenoParam3Name = rawData.phenoParam3Name
-          filtered.phenoParam4Name = rawData.phenoParam4Name
-          filtered.growthRisk.push(rawData.growthRisk[index]);
-          filtered.phenoParam1.push(rawData.phenoParam1[index]);
-          filtered.phenoParam2.push(rawData.phenoParam2[index]);
-          filtered.phenoParam3.push(rawData.phenoParam3[index]);
-          filtered.phenoParam4.push(rawData.phenoParam4[index]);
-        }
-      });
- 
-      return filtered;
-    };
-</script>
-
-<style lang="scss" scoped>
-.card-chart {
-    padding: 8px 4px 0 4px;
-    width: 100%;
-    height: 160px;
-    box-sizing: border-box;
-}
-</style>

+ 0 - 1212
src/views/home/album/index.vue

@@ -1,1212 +0,0 @@
-<template>
-    <div class="album-page">
-        <div class="album-wrap" ref="scrollContainer">
-            <!-- <div class="barrage-title">
-                农情动态
-            </div> -->
-            <div class="album-content">
-                <div class="album-bottom">
-                    <el-affix :offset="108">
-                        <div class="album-l">
-                            <el-menu default-active="0" class="el-menu-vertical-demo">
-                                <el-menu-item
-                                    v-for="(item, index) in farmWorkList"
-                                    :key="index"
-                                    :index="index.toString()"
-                                    :id="'menu' + index"
-                                    :class="{ active: activeSection === index }"
-                                    @click="scrollToSection(index)"
-                                    v-show="item.menu"
-                                >
-                                    <img
-                                        class="menu-icon"
-                                        :src="
-                                            require('@/assets/img/gallery/icon-' +
-                                                item.icon + '.png')
-                                        "
-                                    />
-                                    <div
-                                        :class="[
-                                            'menu-name',
-                                            {
-                                                feature: item.execute === 0 ||item.execute === 2,
-                                                onTime:  item.execute === 1,
-                                                now: item.execute === 3,
-                                            },
-                                        ]"
-                                    >
-                                        {{ item.farmWorkName }}
-                                    </div>
-                                </el-menu-item>
-                            </el-menu>
-                        </div>
-                    </el-affix>
-                    <div class="album-r" @scroll="debouncedHandleScroll2">
-                        
-                        <!-- <div class="log-wrap">
-                            <div class="log-box">
-                                <div class="log-title PangMenZhengDao-FONT">
-                                    <span>果园日志</span>
-                                </div>
-                                <div class="log-content">
-                                    <div class="log-desc" v-html="indicatorChartData?.content"></div>
-                                    <indicatorChart
-                                        :key="cardI+'log'"
-                                        :isDark="true"
-                                        :chartData="indicatorChartData"
-                                    ></indicatorChart>
-                                </div>
-                            </div>
-                        </div> -->
-                        <div
-                            class="done-card section"
-                            v-for="(card, cardI) in farmWorkList"
-                            :key="cardI"
-                        >
-                            <div
-                                class="card-dom"
-                                :id="'section' + cardI"
-                            ></div>
-                            <div class="card-wrap" :class="{ noCarousel: (card.execute !== 0 && card.execute !== 2), 'done': (card.execute === 4 || card.execute === 5) }">
-                                <div
-                                    class="card-content"
-                                    :class="{ push: card.execute === 3, hasBg: (card.execute === 0 || card.execute === 2) && !card.hasBg }"
-                                >
-                                    <div
-                                        class="card-top"
-                                        @click.stop="showDetail(card)"
-                                    >
-                                        <!-- :class="{ noChart: !card.indexChart.length }" -->
-                                        <div class="card-title serve-title">
-                                            <div class="title-name">{{ card.farmWorkName }}</div>
-                                            <div v-if="card.type === 1" class="status-tag standard">标准农事</div>
-                                            <div v-if="card.type === 2" class="status-tag advice">推荐农事</div>
-                                            <div v-if="card.type === 0" class="status-tag warning">预警农事</div>
-                                             <!-- 右上角角标 -->
-                                             <div v-if="card.execute === 0" class="add-btn">
-                                                未触发
-                                            </div>
-                                            <div
-                                                v-if="card.execute === 2"
-                                                class="add-btn unactive"
-                                            >
-                                                未激活
-                                            </div>
-                                            <div v-if="card.execute === 3" class="add-btn">待执行</div>
-                                            <div v-if="card.execute === 4" class="add-btn recheck">
-                                                已完成
-                                            </div>
-                                            <div v-if="card.execute === 5" class="add-btn recheck">
-                                                已复核
-                                            </div>
-                                            <div v-if="card.execute === 1" class="add-btn unactive">已失效</div>
-                                        </div>
-                                        <!-- <div v-else class="card-title">
-                                            <div class="title-name">{{ card.farmWorkName }}</div>
-                                            <div class="status-tag blue">{{ card.reCheck ? "已复核" : "已完成" }}</div>
-                                            <div class="status-tag blue good-wrap">
-                                                优<img class="good" src="@/assets/img/weather_index/good.png" />
-                                            </div>
-                                        </div> -->
-                                        <div v-if="card.execute === 4 || card.execute === 5">
-                                            <!-- 已完成 -->
-                                            <div class="card-desc">
-                                                <span class="desc-title">服务主体:</span>
-                                                <span class="desc-val">{{ card.serviceMain || "大荔农业" }}</span>
-                                            </div>
-                                            <div class="card-desc">
-                                                <span class="desc-title">执行主体:</span>
-                                                <span class="desc-val short">{{ card.executeMain || "大荔农业" }}</span>
-                                            </div>
-                                            <div class="card-desc">
-                                                <span class="desc-title">执行时间:</span>
-                                                {{ card.executeDate }}
-                                            </div>
-                                            <div class="card-desc">
-                                                <span class="desc-title">指导专家:</span>
-                                                <span class="expert-link" @click="toExpert(card.expertName)">
-                                                    {{ card.expertName }}
-                                                    <!-- <el-icon color="#F0AC37" class="icon" size="12"><Link /></el-icon> -->
-                                                </span>
-                                            </div>
-                                        </div>
-                                        <div v-else>
-                                            <div class="card-desc condition-wrap">
-                                                <span class="desc-title">触发条件:</span>
-                                                {{ card.condition }}
-                                            </div>
-                                            <div v-if="card.executeDate || card.solarName" class="card-desc">
-                                                <span class="desc-title">推荐时间:</span>
-                                                {{ card.executeDate || card.solarName }}
-                                            </div>
-                                            <div v-if="card.execute === 4" class="card-desc">
-                                                <span class="desc-title">{{
-                                                    card.execute === 5 ? "复核时间:" : "执行时间:"
-                                                }}</span>
-                                                {{ card.executeDate }}
-                                            </div>
-                                            <div class="card-desc">
-                                                <span class="desc-title">农事编号:</span>
-                                                {{ card.code }}
-                                            </div>
-                                        </div>
-                                        <div class="card-desc last-desc">
-                                            <span class="desc-title">药物处方:</span>
-                                            <div class="rescription-wrap">
-                                                <div class="rescription">
-                                                    <span
-                                                        v-for="(
-                                                            fertilizer, fertilizerI
-                                                        ) in card.prescriptionList"
-                                                        :key="fertilizerI"
-                                                    >
-                                                        <span v-for="(pest, pestI) in fertilizer.pesticideFertilizerList" :key="'sub' + pestI">
-                                                            {{ pest.defaultName }}
-                                                            <span
-                                                                v-if="
-                                                                    (pestI !== fertilizer.pesticideFertilizerList.length - 1) || (fertilizerI !== card.prescriptionList.length - 1)
-                                                                "
-                                                            >
-                                                                +
-                                                            </span>
-                                                        </span>
-                                                    </span>
-                                                </div>
-                                                <div class="detail-text">查看详情></div>
-                                            </div>
-                                        </div>
-                                        <div class="card-link" v-if="card.execute === 0 || card.execute === 2|| (card.execute === 3 && card.orderStatus === null) || card.orderStatus <0" @click.stop="handlePage(card)">
-                                            <!-- <img src="@/assets/img/weather_index/expert-icon.png" /> -->
-                                            <img class="expert-icon" :src="card.expertIcon" />
-                                            <div class="expert-name">
-                                                {{ card.expertName}}
-                                                <!-- <el-icon size="12" class="icon"><ArrowRightBold /></el-icon> -->
-                                            </div>
-                                        </div>
-                                        <div class="step-box" v-else>
-                                            <step-box :orderStatus="card.orderStatus" v-if="card.orderStatus || card.orderStatus === 0"></step-box>
-                                        </div>
-                                    </div>
-                                    <chart
-                                        v-if="card.execute === 3 && card.indexChart.length"
-                                        :key="cardI"
-                                        :indexName="card.indexName"
-                                        :type="(card.execute === 2 || card.execute === 0) ? 'feature' : 'normal'"
-                                        :chartData="card.indexChart"
-                                    ></chart>
-
-                                    <div v-if="(card.orderStatus === 4 || card.orderStatus === 5) && card.userEvaluation">
-                                        <div class="evaluate">
-                                            <div class="evaluate-title">用户评价</div>
-                                            <div class="comment">
-                                                <div class="user-info">
-                                                    <el-avatar
-                                                        class="avatar"
-                                                        :size="40"
-                                                        :src="card.userEvaluation.icon"
-                                                    />
-                                                    <div class="user-name">
-                                                        <div>{{ card.userEvaluation.commentUserName || "麦田守望者" }}</div>
-                                                        <span>{{ card.userEvaluation.commentDate }}</span>
-                                                    </div>
-                                                </div>
-                                                <div class="rate">
-                                                    <div class="rate-item">
-                                                        <span class="name">专家</span>
-                                                        <el-rate v-model="card.userEvaluation.expertServiceRating" size="small" />
-                                                    </div>
-                                                    <div class="rate-item">
-                                                        <span class="name">农资</span>
-                                                        <el-rate v-model="card.userEvaluation.agricultureServiceRating" size="small" />
-                                                    </div>
-                                                    <div class="rate-item">
-                                                        <span class="name">农服</span>
-                                                        <el-rate v-model="card.userEvaluation.farmServiceRating" size="small" />
-                                                    </div>
-                                                </div>
-                                                <div class="text van-multi-ellipsis--l2">
-                                                    {{ card.userEvaluation.detailedComment }}
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                            <div v-if="card.execute !== 0 && card.execute !== 2" :class="['over-img']">
-                                <!-- 图片列表 -->
-                                <album-carousel7d
-                                    :key="farmName+cardI"
-                                    :farmId="farmId"
-                                    :farmWork="card"
-                                ></album-carousel7d>
-                            </div>
-                        </div>
-                    </div>
-
-                    <!-- 新增农事 -->
-                    <div class="expert-add-btn">
-                        <div class="btn-box" @click="addWork">
-                            <el-icon color="#fff"><Plus /></el-icon>
-                            <span class="PangMenZhengDao-FONT add-text">新增农事</span>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { onMounted, ref, computed, onUnmounted, nextTick, onActivated, onDeactivated } from "vue";
-import { useStore } from "vuex";
-import { useRoute, useRouter } from "vue-router";
-import stepBox from "@/components/common/stepBox.vue";
-import eventBus from "@/api/eventBus";
-import chart from "./components/chart.vue";
-import indicatorChart from "./components/indicatorChart.vue";
-const store = useStore();
-import AlbumCarousel7d from "./album_compoents/albumCarousel7d";
-const miniUserId = 81881;
-
-const addWork = () =>{
-    router.push({path: '/add_farm', query: {isAdd: true}})
-}
-
-const route = useRoute();
-// 监听页面滚动,更新当前激活的锚点
-const handleScroll = () => {
-    const scrollPosition = window.scrollY; // 加上头部偏移量
-    farmWorkList.value.forEach((_, index) => {
-        const section = document.getElementById(`section${index}`);
-        if (section && section.offsetTop <= scrollPosition) {
-            activeSection.value = index;
-        }
-    });
-};
-
-// 防抖函数
-function debounce(func, wait) {
-    let timeout;
-    return function (...args) {
-        const later = () => {
-            clearTimeout(timeout);
-            func.apply(this, args);
-        };
-        clearTimeout(timeout);
-        timeout = setTimeout(later, wait);
-    };
-}
-
-
-const handleRightScroll = () => {
-    activeSection.value = null;
-};
-const debouncedHandleScroll = debounce(handleScroll, 100);
-const debouncedHandleScroll2 = debounce(handleRightScroll, 501);
-// onMounted(() => {
-//     window.addEventListener("scroll", debouncedHandleScroll);
-//     // myPushChart = echarts.init(chartPushRef.value);
-//     // myPushChart.setOption(galleryLine);
-
-//     getFarmDetail(farmId);
-//     getFarmWorkList(farmId);
-// });
-
-const handlePage = (item) =>{
-    // router.push('/expert_page?name='+item.expertName)
-}
-
-const toExpert = (expertName) =>{
-    // router.push('/expert_page?name='+expertName)
-}
-
-
-eventBus.off('garden:organId', getListData)
-eventBus.on('garden:organId', getListData)
-
-onMounted(() => {
-    // farmId.value = 88388;
-
-    farmId.value = sessionStorage.getItem("farmId")
-    // getFarmDetail(farmId.value);
-    // getFarmWorkList(farmId.value);
-    // window.addEventListener("scroll", debouncedHandleScroll);
-
-    window.addEventListener("scroll", debouncedHandleScroll);
-});
-eventBus.off("area:id", toggleAreaId);
-eventBus.on("area:id", toggleAreaId);
-const regionId = ref(null)
-function toggleAreaId({ areaId, farmId }) {
-    console.log('aaaaareid', areaId, farmId);
-    regionId.value = areaId
-    
-    farmWorkList.value = []
-    getFarmWorkList(farmId)
-    // getFarmLog()
-    // farmId.value = farmId
-}
-
-function getListData(farmIdVal) {
-    console.log('farmIdVal', farmIdVal);
-    farmId.value = farmIdVal
-    // getFarmDetail(farmId.value);
-    // getFarmWorkList(farmId.value);
-}
-
-const farmId = ref(null);
-
-
-// 移除滚动事件监听
-onUnmounted(() => {
-    window.removeEventListener("scroll", debouncedHandleScroll);
-});
-
-// 果园日志
-const indicatorChartData = ref({})
-const getFarmLog = () => {
-    VE_API.farm.fetchFarmLog({id: regionId.value, farmId: farmId.value}).then(({data,code}) => {
-        if(code === 0){
-            indicatorChartData.value = data
-            eventBus.emit('chart:updateOption', indicatorChartData.value)
-      } else {
-        indicatorChartData.value = {}
-      }
-    })
-}
-
-// 农场详情
-const farmDetail = ref({});
-const getFarmDetail = (id) => {
-    VE_API.farm.fetchFarmDetail({ id }).then(({ data }) => {
-        farmDetail.value = data;
-    });
-};
-
-// 农事列表
-const farmWorkList = ref([]);
-const getFarmWorkList = (farmId) => {
-    // regionId
-    const regionVal = regionId.value ? regionId.value : null
-    VE_API.farm.fetchFarmWorkList({ farmId, regionId: regionVal }).then(({ data }) => {
-        getSecondLastIndex(data);
-        // farmWorkList.value = data;
-        // nextTick(() => {
-        //     initScrollToSection(secondLastIndex.value);
-        // });
-        // setTimeout(() => {
-        //     startFlashing();
-        // }, 100);
-    });
-};
-
-const router = useRouter();
-
-const activeSection = ref(0);
-
-const scrollContainer = ref(null);
-// 点击左侧菜单项,滚动到对应内容
-const scrollToSection = (index) => {
-    //   const section = farmWorkList.value[index];
-    const sectionElement = document.getElementById(`section${index}`);
-    if (sectionElement) {
-        sectionElement.scrollIntoView({ behavior: "smooth" });
-        activeSection.value = index;
-        setTimeout(() => {
-            // 获取滚动容器的当前滚动位置
-            let scrollTop = scrollContainer.value.scrollTop;
-            scrollTop += 44; // 加多 44px,头部的高度
-            // 滚动至目标位置
-            scrollContainer.value.scrollTop = scrollTop;
-        }, 300);
-    }
-};
-
-// 点击左侧菜单项,滚动到对应内容
-const initScrollToSection = (index) => {
-    const menuElement = document.getElementById(`menu${index}`);
-    if (menuElement) {
-        menuElement.scrollIntoView({ behavior: "smooth" });
-        activeSection.value = index;
-        setTimeout(() => {
-            scrollToSection(index);
-        }, 0);
-    }
-};
-const secondLastIndex = ref(-1); // 初始化索引值
-const getSecondLastIndex = (data) => {
-    // 过滤出 status 为 2 的项
-    const filteredItems = data.filter((item) => item.execute === 3);
-    // 获取倒数第二项
-    if (filteredItems.length >= 1) {
-        const secondLastItem = filteredItems[filteredItems.length - 1];
-        // 获取该项在原数组中的索引
-        secondLastIndex.value = data.indexOf(secondLastItem);
-
-        const lastTwoItems = filteredItems.slice(-1);
-        farmWorkList.value = data.map((item) => {
-            // 如果是最后两项之一,则添加 feature 属性
-            if (lastTwoItems.includes(item)) {
-                return { ...item, hasBg: true };
-            }
-            return item;
-        });
-    } else {
-        secondLastIndex.value = -1; // 如果没有足够的项,设置为 -1
-        farmWorkList.value = data
-    }
-};
-
-const isFlashing = ref(false);
-const startFlashing = () => {
-    isFlashing.value = true;
-
-    // 使用 setTimeout 在一段时间后停止闪动
-    setTimeout(() => {
-        isFlashing.value = false;
-    }, 3000); // 3 秒后停止闪动
-};
-
-// 显示详情
-const showDetail = (card) => {
-    // eventBus.emit("detailDialog:showDialog", pageParams);
-    // if (card.orderStatus === 5 || card.orderStatus === 4) {
-    //     // 农事成效
-    //     router.push({ path: "/work_completed", query: { data: JSON.stringify(card) } });
-    // } else
-    if (card.orderStatus === 0) {
-        router.push({ path: "/add_farm", query: { farmId: card.farmId, libId: card.farmWorkId, id: card.id } });
-    } else if (card.orderStatus) {
-        router.push({ path: "/work_detail", query: { farmId: card.farmId, libId: card.farmWorkId, id: card.id } });
-    }
-};
-
-const farmName = ref("")
-//用户果园数据
-const userFarmData = ref([]);
-const initUserGardenData = () => {
-    VE_API.garden.userGarden({ userId: miniUserId, show3dFarm: false }).then(({ data }) => {
-        userFarmData.value = data;
-        const arr = data.filter(item =>item.organId===farmId.value)
-        farmName.value = arr[0].organId
-    });
-};
-
-function addNsRecord(){
-    router.push({
-      path: "/edit_ns_record",
-      query: { recordId: null },
-    });
-}
-</script>
-
-<style lang="scss" scoped>
-.album-page {
-    position: relative;
-    width: 100%;
-    height: 100%;
-    overflow: hidden;
-    background: #011217;
-
-    .album-wrap {
-        width: 100%;
-        height: 100%;
-
-        .slot-right {
-        width: 70%;
-        cursor: pointer;
-        display: flex;
-        flex-direction: row;
-        justify-content: right;
-        align-items: center;
-        padding-right: 12px;
-        .btn {
-            cursor: pointer;
-            background: url("@/assets/img/tabs_btn3.png") no-repeat center center /
-            100% 100%;
-            margin-right: 5px;
-            color: rgba(180,255,251,.8);
-            font-weight: bold;
-            font-size: 15px;
-            width: 92px;
-            height: 32px;
-            text-align: center;
-            line-height: 32px;
-        }
-        }
-        .barrage-title {
-            height: 44px;
-            line-height: 44px;
-            text-align: center;
-            font-size: 17px;
-            font-weight: bold;
-            border: 1px solid #f5f5f5;
-            width: 100%;
-            background: #fff;
-            position: fixed;
-            top: 0;
-            left: 0;
-            z-index: 9;
-            .title-icon {
-                cursor: pointer;
-                position: absolute;
-                left: 16px;
-                top: 13px;
-            }
-        }
-        .album-content {
-            height: 100%;
-            // overflow: auto;
-            // margin-top: 45px;
-            .album-fixed {
-                position: fixed;
-                top: 0;
-                z-index: 10;
-                background: #fff;
-                width: 100%;
-            }
-            .album-top {
-                display: flex;
-                padding: 12px 10px 16px 10px;
-                width: 100%;
-                overflow: hidden;
-                box-sizing: border-box;
-                .album-img {
-                    img {
-                        width: 78px;
-                        height: 78px;
-                        object-fit: cover;
-                        border-radius: 6px;
-                    }
-                }
-                .garden-content {
-                    position: relative;
-                    padding-left: 12px;
-                    display: flex;
-                    flex-direction: column;
-                    justify-content: center;
-                    .report_btn{
-                      position: absolute;
-                      bottom: 0px;
-                      right: 0px;
-                      z-index: 1000;
-                      width: 40px;
-                      height: 40px;
-                      display: flex;
-                      flex-direction: column;
-                      align-items: center;
-                      justify-content: center;
-                      font-size: 8px;
-                      color:#ffffff;
-                      background: rgba(30, 34, 83, 0.44);
-                      border-radius: 5px;
-                    }
-                    .garden-name {
-                        font-weight: bold;
-                        font-size: 16px;
-                        color: #000000;
-                        display: flex;
-                        align-items: center;
-                        flex-wrap: wrap;
-                        .tag-wrap {
-                            display: flex;
-                            flex-wrap: wrap;
-                            flex: 1;
-                        }
-                        .type-tag {
-                            margin-top: 2px;
-                            font-weight: normal;
-                            margin-left: 4px;
-                            padding: 0 6px;
-                            height: 21px;
-                            line-height: 21px;
-                            background: rgba(255, 149, 61, 0.32);
-                            border-radius: 2px;
-                            // border: 0.5px solid #FF953D;
-                            font-size: 12px;
-                            color: #fc8a2c;
-                            &.item-type {
-                                background: #f0e0fe;
-                                color: #ac4dff;
-                            }
-                        }
-                    }
-                    .garden-text {
-                        display: flex;
-                        align-items: flex-end;
-                        justify-content: space-between;
-                        .edit-btn {
-                            border: 1px solid #F0AC37;
-                            border-radius: 5px;
-                            color: #F0AC37;
-                            text-align: center;
-                            padding: 4px 2px;
-                            font-size: 9px;
-                            font-weight: bold;
-                            box-sizing: border-box;
-                            background: rgba(33, 153, 248, 0.22);
-                        }
-                    }
-                    .garden-desc {
-                        padding-top: 4px;
-                        font-size: 13px;
-                        color: #666666;
-                    }
-                }
-            }
-            .album-camera {
-                width: 100%;
-                padding: 0 10px 10px;
-                box-sizing: border-box;
-                position: relative;
-                .tips-text {
-                    position: absolute;
-                    left: calc(50% + 20px);
-                    top: 8px;
-                    height: 17px;
-                    padding: 1px 5px 2px 8px;
-                    color: #fff;
-                    font-size: 12px;
-                    border-radius: 24px 20px 20px 0;
-                    line-height: 18px;
-                    background: linear-gradient(45deg, #00d4ff, #008eff);
-                }
-                img {
-                    width: 100%;
-                }
-            }
-            .album-bottom {
-                display: flex;
-                position: relative;
-                background: rgba(73, 73, 73, 0.3);
-                height: 100%;
-                justify-content: center;
-                overflow: hidden;
-
-                .expert-add-btn {
-                    position: absolute;
-                    z-index: 9;
-                    bottom: 112px;
-                    // right: 36px;
-                    cursor: pointer;
-                    margin-left: 90px;
-                    width: 183px;
-                    height: 32px;
-                    background: #fff;
-                    border-radius: 30px;
-                    padding: 2px;
-                    box-sizing: border-box;
-                    box-shadow: 0 2px 4px #ccc;
-                    .btn-box {
-                        height: 100%;
-                        background: linear-gradient(0deg,#fce6c0 0%, #FF9500 31% , #FF9500 78%);
-                        border-radius: 30px;
-                        display: flex;
-                        align-items: center;
-                        justify-content: center;
-                        color: #fff;
-                        .add-text {
-                            padding-left: 4px;
-                            font-size: 15px;
-                        }
-                    }
-                }
-
-                .export-btn {
-                    position: fixed;
-                    z-index: 999;
-                    left: 0;
-                    bottom: 0px;
-                    height: 60px;
-                    padding-top: 10px;
-                    background: #f2f2f4;
-                    .btn-item {
-                        font-size: 14px;
-                        color: #fff;
-                        display: flex;
-                        align-items: center;
-                        justify-content: center;
-                        background: linear-gradient(45deg, #00d4ff, #008eff);
-                        width: 90px;
-                        height: 36px;
-                    }
-                    img {
-                        width: 24px;
-                    }
-                }
-                .album-l {
-                    width: 90px;
-                    height: 100%;
-                    overflow: auto;
-                    background: rgba(73, 73, 73, 0.31);
-                    border-radius: 0 4px 4px 0;
-                    .menu-icon {
-                        width: 16px;
-                        margin-right: 4px;
-                    }
-                    .menu-name {
-                        max-width: 80px;
-                        white-space: nowrap;
-                        overflow: hidden;
-                        text-overflow: ellipsis;
-                    }
-                    ::v-deep {
-                        .el-menu {
-                            background: transparent;
-                            border-right: 0;
-                            .el-menu-item {
-                                height: 32px;
-                                line-height: 32px;
-                                justify-content: center;
-                                color: #CECECE;
-                                margin: 10px 0;
-                                padding: 4px;
-                                &:hover {
-                                    background: none;
-                                }
-                                &.is-active {
-                                    background: transparent;
-                                    // color: #F0AC37;
-                                    .menu-name {
-                                        // color: #666666;
-                                    }
-                                }
-                                &.active {
-                                    background: #232323;
-                                    color: #F0AC37;
-                                    .menu-name {
-                                        color: #F0AC37;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    .noTime {
-                        // color: #cccccc;
-                    }
-                    .feature {
-                        color: rgba(255, 212, 137, 0.6);
-                    }
-                    .now {
-                        color: #F0AC37;
-                    }
-                    .onTime {
-                        color: rgba(255, 212, 137, 0.6);
-                    }
-                }
-                ::v-deep {
-                    .el-affix {
-                        background: transparent;
-                        border-radius: 0 4px 4px 0;
-                        width: 90px !important;
-                        & > div {
-                            height: 100%;
-                        }
-                    }
-                }
-                .album-r {
-                    padding: 2px 10px 10px 10px;
-                    flex: 1;
-                    background: #232323;
-                    height: 100%;
-                    overflow: auto;
-                    box-sizing: border-box;
-                    .common-btn {
-                        background: #F0AC37;
-                        border-radius: 4px;
-                        color: #fff;
-                        padding: 8px 10px;
-                        text-align: center;
-                    }
-                    .card-wrap {
-                        // border: 1px solid #dddddd;
-                        // padding: 8px 8px;
-                        border-radius: 8px;
-                        position: relative;
-                        z-index: 1;
-                        // margin-top: -20px;
-                        &.noCarousel {
-                            padding: 0;
-                            // margin-top: 12px;
-                            // padding-top: 10px;
-                            border: none;
-                            .card-top .card-link {
-                                top: 24px;
-                            }
-                        }
-                        &.done {
-                            padding: 0;
-                            border: none;
-                        }
-                    }
-                    .card-content {
-                        // background: #001917;
-                        border-radius: 8px;
-                        padding: 0 8px 8px 8px;
-                        border: 1px solid rgba(255, 218, 102, 0.3);
-                        background: rgba(105, 73, 13, 0.1);
-                        &.push {
-                            padding: 0 8px 12px 8px;
-                            // margin-bottom: 8px;
-                            // border: 1px solid rgba(102, 102, 102, 0.38);
-                        }
-                        &.hasBg {
-                            border: 1px solid #494949;
-                            padding: 0 8px 12px 8px;
-                            background: transparent;
-                            // border: 1px solid #045151;
-                            .card-top {
-                                border-bottom: none;
-                                padding-bottom: 0;
-                            }
-                        }
-                        .card-top {
-                            padding-bottom: 12px;
-                            // border-bottom: 1px solid rgba(255, 238, 208, 0.2);
-                            position: relative;
-                            &.noChart {
-                                border-bottom: 0;
-                                padding-bottom: 0;
-                            }
-                            .card-title {
-                                display: flex;
-                                align-items: center;
-                                padding-bottom: 8px;
-                                .serve-btn {
-                                    padding: 3px 10px;
-                                    background: #F0AC37;
-                                    border-radius: 22px;
-                                    color: #fff;
-                                    text-align: center;
-                                }
-                                .title-name {
-                                    color: #FFFFFF;
-                                    font-size: 20px;
-                                    padding-right: 8px;
-                                    font-weight: 600;
-                                }
-                                img {
-                                    width: 24px;
-                                }
-
-                                .status-tag {
-                                    color: #f3a302;
-                                    font-size: 12px;
-                                    padding: 2px 6px;
-                                    border-radius: 2px;
-                                    background: rgba(243, 163, 2, 0.2);
-                                    border: 1px solid transparent;
-                                    &.blue {
-                                        color: #F0AC37;
-                                        background: rgba(33, 153, 248, 0.2);
-                                    }
-                                    &.good-wrap {
-                                        margin-left: 4px;
-                                        display: flex;
-                                        align-items: center;
-                                        .good {
-                                            margin-left: 3px;
-                                            width: 13px;
-                                        }
-                                    }
-                                    &.standard {
-                                        color: #F0AC37;
-                                        background: #232323;
-                                        border-color: #F0AC37;
-                                    }
-                                    &.advice {
-                                        color: rgba(252, 167, 3, 0.9);
-                                        background: rgba(255, 220, 104, 0.38);
-                                    }
-                                    &.warning {
-                                        color: #ff4221;
-                                        background: rgba(255, 175, 160, 0.24);
-                                    }
-                                }
-                                &.serve-title {
-                                    padding: 12px 0 8px 0;
-                                    display: flex;
-                                    align-items: center;
-                                    position: relative;
-                                    .add-btn {
-                                        position: absolute;
-                                        right: -8px;
-                                        top: 0;
-                                        background: #F7BE5A;
-                                        color: #fff;
-                                        font-size: 12px;
-                                        border-radius: 0 8px 0 8px;
-                                        padding: 2px 6px;
-                                        &.unactive {
-                                            color: #9F9F9F;
-                                            background: #494949;
-                                        }
-                                        &.recheck {
-                                            background: #f3c11d;
-                                        }
-                                    }
-                                    .tag {
-                                        display: flex;
-                                        align-items: center;
-                                        color: #ff7000;
-                                        font-size: 10px;
-                                        .desc {
-                                            position: relative;
-                                            left: -4px;
-                                        }
-                                        .photo-grid {
-                                            display: flex;
-                                            .photo {
-                                                position: relative;
-                                                img {
-                                                    width: 18px; /* 示例宽度,你可以根据需要调整 */
-                                                    height: 18px;
-                                                    object-fit: cover;
-                                                    border-radius: 50%;
-                                                    display: block; /* 去除图片底部的空白间隙 */
-                                                }
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                            .card-desc {
-                                color: #9F9F9F;
-                                font-size: 12px;
-                                line-height: 18.2px;
-                                display: flex;
-                                align-items: center;
-                                .desc-title {
-                                    color: #494949;
-                                }
-                                .desc-val {
-                                    max-width: 100px;
-                                    white-space: nowrap;
-                                    overflow: hidden;
-                                    text-overflow: ellipsis;
-                                    &.short {
-                                        max-width: 80px;
-                                    }
-                                }
-                                .rescription-wrap {
-                                    display: flex;
-                                    align-items: center;
-                                    .detail-text {
-                                        color: #FFD489;
-                                        padding-left: 6px;
-                                        cursor: pointer;
-                                    }
-                                }
-                                .rescription {
-                                    max-width: 100px;
-                                    white-space: nowrap;
-                                    overflow: hidden;
-                                    text-overflow: ellipsis;
-                                }
-                                .expert-link {
-                                    display: inline-flex;
-                                    align-items: center;
-                                    // color: #F0AC37;
-                                    .icon {
-                                        padding-left: 4px;
-                                    }
-                                }
-                            }
-                            .step-box {
-                                position: absolute;
-                                right: 0px;
-                                top: 56px;
-                            }
-                            .card-link {
-                                display: flex;
-                                flex-direction: column;
-                                align-items: center;
-                                justify-content: center;
-                                color: #A46700;
-                                font-size: 12px;
-                                position: absolute;
-                                right: 6px;
-                                top: 20px;
-                                .expert-name {
-                                    background: #FFD489;
-                                    border-radius: 4px;
-                                    padding: 2px 6px 3px 10px;
-                                    margin-top: 4px;
-                                    display: flex;
-                                    align-items: center;
-                                }
-                                img {
-                                    width: 36px;
-                                }
-                                .icon {
-                                    padding-right: 2px;
-                                }
-                            }
-                        }
-                        .card-chart {
-                            padding: 8px 4px 0 4px;
-                            height: 130px;
-                            border-top: 1px solid rgba(255, 238, 208, 0.2);
-                        }
-                    }
-
-                    .done-card {
-                        margin-bottom: 10px;
-                    }
-                    .card-dom {
-                        position: relative;
-                        // top: -216px;
-                        top: -6px;
-                    }
-
-                    .over-img {
-                        transition: all 0.2s ease-in-out;
-                        position: relative;
-                        z-index: 2;
-                        ::v-deep {
-                            img {
-                                border-radius: 8px;
-                            }
-                        }
-                    }
-                    .log-wrap {
-                        padding: 4px 0 10px 0;
-                        .log-box {
-                            background: #232323;
-                            border-radius: 8px;
-                            color: #FFD489;
-                            border: 1px solid rgba(255, 212, 137, 0.3);
-                            .log-title {
-                                font-family: "PangMenZhengDao";
-                                position: relative;
-                                top: -4px;
-                                background: url("@/assets/img/gallery/log-bg.png") no-repeat top center / cover;
-                                width: 97px;
-                                height: 42px;
-                                text-align: center;
-                                font-size: 18px;
-                                color: #fff;
-                                span {
-                                    position: absolute;
-                                    top: 7px;
-                                    display: flex;
-                                    align-items: center;
-                                    justify-content: center;
-                                    width: 100%;
-                                }
-                            }
-                            .log-content {
-                                padding-bottom: 10px;
-                                .log-desc {
-                                    padding: 0 10px;
-                                    font-size: 14px;
-                                    line-height: 22px;
-                                }
-                            }
-                            .time-img {
-                                width: 100%;
-                                height: 100%;
-                                img {
-                                    width: 100%;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            .flashing {
-                position: relative;
-                &::after {
-                    content: "";
-                    position: absolute;
-                    top: 0;
-                    left: -2px;
-                    width: 100%;
-                    height: calc(100% - 2px);
-                    border: 2px solid #F0AC37;
-                    animation: flash 0.4s infinite alternate;
-                    border-radius: 8px;
-                    pointer-events: none;
-                }
-            }
-
-            @keyframes flash {
-                0% {
-                    box-shadow: 0 0 5px #F0AC37;
-                    border-color: #F0AC37;
-                }
-                100% {
-                    box-shadow: 0 0 20px #F0AC37;
-                    border: 2px solid #F0AC37;
-                }
-            }
-        }
-
-        .evaluate {
-            border-top: 1px solid rgba(255, 238, 208, 0.2);
-            color: #fff;
-            .evaluate-title {
-                padding-top: 8px;
-                font-size: 14px;
-                color: #fff;
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                margin-bottom: 8px;
-                .more {
-                    font-size: 14px;
-                    color: #fff;
-                    font-weight: 400;
-                    display: flex;
-                    align-items: center;
-                }
-            }
-            .rate {
-                display: flex;
-                justify-content: space-between;
-                ::v-deep {
-                    .el-rate {
-                        --el-rate-icon-margin: 0;
-                    }
-                    .el-rate--small .el-rate__icon {
-                        font-size: 11px;
-                    }
-                }
-                .rate-item {
-                    display: flex;
-                    align-items: center;
-                    // background: #f5f5f5;
-                    border-radius: 4px;
-                    padding: 4px 0px;
-                    font-size: 10px;
-                    .name {
-                        // margin-right: 2px;
-                        color: #fff;
-                    }
-                    .num {
-                        color: #f3c11d;
-                        margin-left: 2px;
-                    }
-                }
-            }
-            .comment {
-                margin-top: 12px;
-                .user-info {
-                    display: flex;
-                    align-items: center;
-                    margin-bottom: 2px;
-                    .user-name {
-                        font-weight: 500;
-                        margin-left: 8px;
-                        span {
-                            font-weight: 400;
-                            font-size: 12px;
-                            color: #fff;
-                        }
-                    }
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 406
src/views/home/album_compoents/albumCarousel.vue

@@ -1,406 +0,0 @@
-<template>
-    <el-dialog
-        v-model="dialogVisible"
-        width="60%"
-        align-center
-        class="picture-preview-wrap v-dialog"
-        :show-close="false"
-        append-to-body
-        @close="closeDialog"
-    >
-        <div class="picture-file">
-            <div class="left-img">
-                <!-- v-loading="isLoadingImg"  element-loading-background="rgba(0, 0, 0, 0.3)" -->
-                <album-carousel-item
-                    lbum-carousel-item
-                    v-if="images"
-                    :key="nameRef"
-                    :name="nameRef"
-                    :farmId="farmId"
-                    :images="images"
-                    :lock="lock"
-                ></album-carousel-item>
-            </div>
-            <div class="file-wrap">
-                <div class="file-title">
-                    <img src="@/assets/images/common/chart-yellow.png" alt="" />
-                    果树档案
-                    <span class="tag" v-if="showTag">小农户</span>
-                </div>
-                <div class="overview-file">
-                    <div class="box-title">总体档案</div>
-                    <div class="base-data">
-                        <div class="base-item" v-for="item in photoBaseData" :key="item.label">
-                            <span class="label">{{ item.label }}</span>
-                            <div class="value">{{ item.value }}</div>
-                        </div>
-                    </div>
-                    <div class="list">
-                        <div class="list-item" v-for="item in photoList" :key="item.key">
-                            <div class="list-name">
-                                <img src="@/assets/images/common/title-icon.png" alt="" />
-                                {{ item.key }}
-                            </div>
-                            {{ item.statement }}
-                        </div>
-                    </div>
-                </div>
-
-                <div class="overview-file">
-                    <div class="box-title">产量详情</div>
-                    <div class="box-wrap">
-                        <div
-                            class="box-item"
-                            v-for="(item, index) in outputBox"
-                            :key="index"
-                            @click="toggleAcitve(item.name)"
-                            :class="{ active: activeOuput === item.name }"
-                        >
-                            <div class="item-name">{{ item.name }}</div>
-                            <div class="item-val">{{ item.value }}</div>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="overview-file">
-                    <div class="box-title">质量详情</div>
-                    <div class="box-wrap">
-                      <div
-                            class="box-item"
-                            v-for="(item, index) in qualityBox"
-                            :key="index"
-                            @click="toggleAcitve(item.name)"
-                            :class="{ active: activeOuput === item.name }"
-                        >
-                            <div class="item-name">{{ item.name }}</div>
-                            <div class="item-val">{{ item.value }}</div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </el-dialog>
-</template>
-
-<script setup>
-import { ref, computed, onMounted, onUnmounted } from "vue";
-import "./cacheImg.js";
-import AlbumCarouselItem from "./albumCarouselItem";
-import { dateFormat } from "@/utils/date_util.js";
-import eventBus from "@/api/eventBus";
-
-const lock = ref(false);
-const farmId = ref(766);
-const nameRef = ref("");
-
-const isLoadingImg = ref(true)
-const images = ref(null);
-const dialogVisible = ref(false);
-// 获取当前日期
-const currentDate = new Date();
-// 获取当前日期的前一个月
-const startDate = new Date(currentDate);
-startDate.setMonth(currentDate.getMonth() - 1);
-
-// 格式化日期
-const formattedStartDate = dateFormat(startDate, "YY-mm-dd");
-const formattedEndDate = dateFormat(currentDate, "YY-mm-dd");
-
-eventBus.on("change:watermark",function(name){
-  nameRef.value = name
-})
-
-const outputBox = ref([
-    { id: 1, name: "产量估计", value: "" },
-    { id: 2, name: "高质果率", value: "" },
-    { id: 3, name: "雌花比例", value: "" },
-]);
-
-const qualityBox = ref([
-    { id: 5, name: "通风率", value: "" },
-    { id: 6, name: "透光率", value: "" },
-    { id: 7, name: "病虫比例", value: "" },
-]);
-const showTag = ref(false)
-eventBus.on("click:point",function({farmId,sampleId, data}){
-  sampleId = data.id;
-  getSampleFiles(data.geoHashSample);
-  photoBaseData.value[0].value = data.pz;
-    isLoadingImg.value = true
-  let startDate = new Date(currentDate);
-  startDate.setMonth(currentDate.getMonth() - 2);
-
-// 格式化日期
-  let params = {sampleId,farmId,startDate:dateFormat(startDate, "YY-mm-dd")}
-  VE_API.miniimage.list(params).then(res => {
-      if(res.code === 0){
-        dialogVisible.value = true
-      images.value = res.data
-      isLoadingImg.value = false
-    }
-  })
-  showTag.value = data.nonghu == 1 ? true : false
-//   photoBaseData.value[0].value = data.pz;
-//   photoBaseData.value[1].value = data?.sgbmj ? data?.sgbmj + "平方米" : "--";
-//   photoBaseData.value[2].value = data?.zzts ? data.zzts + "" : "--";
-//   photoBaseData.value[3].value = data?.sl ? data?.sl + "年" : "--";
-//   outputBox.value[0].value = data?.cl ? (data.cl + "斤") : "--";
-//   outputBox.value[1].value = data?.spgl? (data.spgl + "%") : "--";
-//   qualityBox.value[0].value = data?.tfl? (data.tfl + "%") : "--";
-//   qualityBox.value[1].value = data?.tgl? (data.tgl + "%") : "--";
-//   qualityBox.value[2].value = data?.dxtj? (data.dxtj + "%") : "--";
-})
-
-eventBus.off("albumCarousel", toggleActiveImg);
-eventBus.on("albumCarousel", toggleActiveImg);
-
-const currentIndex = ref(0);
-function toggleActiveImg(index) {
-    currentIndex.value = index;
-}
-
-const getSampleFiles = (geoHash) => {
-    // photoList.value = [];
-    VE_API.mini_farm.getSampleFiles({ geoHashSample: geoHash }).then(({data}) => {
-        photoBaseData.value[0].value = data.meta_info.type_id;
-        let pj = "--"
-        if(data.meta_info.crown){
-          pj = Math.sqrt(data.meta_info.crown * 1.2).toFixed(1);
-        }
-        photoBaseData.value[1].value = data.meta_info.crown + "平方米(蓬径"+pj+"米)";
-        photoBaseData.value[2].value = data.meta_info.branch_num ;
-
-    photoBaseData.value[3].value = data.meta_info.age + "年"
-    photoList.value[0].key = data.meta_info.dp_alert_info.key
-    photoList.value[0].statement = data.meta_info.dp_alert_info.statement
-    photoList.value[1].key = data.meta_info.grow_alert_info.key
-    photoList.value[1].statement = data.meta_info.grow_alert_info.statement
-    photoList.value[2].key = data.meta_info.nutrition_info.key
-    photoList.value[2].statement = data.meta_info.nutrition_info.statement
-    photoList.value[3].key = data.meta_info.prescription_info.key
-    photoList.value[3].statement = data.meta_info.prescription_info.statement
-      // if(data.production_info.production){
-      //   data.production_info.production = (data.production_info.production * 1.3).toFixed(1)
-      // }
-    outputBox.value[0].value = data.production_info.production + "斤"
-    outputBox.value[1].value = data.production_info.quality.toFixed(0) + "%"
-    outputBox.value[2].value = data.production_info.cihua_ratio.toFixed(0) + "%"
-    qualityBox.value[0].value = data.ecology_info.ventilation + "%"
-    qualityBox.value[1].value = data.ecology_info.transmittance + "%"
-    qualityBox.value[2].value = data.ecology_info.dp_situation+"%"
-    });
-};
-
-const photoBaseData = ref([
-    {
-        label: "品种",
-        value: "--",
-    },
-    {
-        label: "冠幅表面积",
-        value: "--",
-    },
-    {
-        label: "总枝条",
-        value: "--",
-    },
-    {
-        label: "树龄",
-        value: "--",
-    },
-]);
-
-const photoList = ref([
-    {key: "病虫", statement: "--"},
-    {key: "异常", statement: "--"},
-    {key: "营养", statement: "--"},
-    {key: "农事", statement: "--"},
-]);
-
-const activeOuput = ref(null);
-
-// 产量详情
-function toggleAcitve(name) {
-    activeOuput.value = name;
-    if (name.indexOf("开花") > -1) {
-        eventBus.emit("change:watermark", "开花目标框")
-    } else if (name.indexOf("花穗") > -1) {
-        eventBus.emit("change:watermark", "花穗目标框")
-    } else if (name.indexOf("雄花") > -1) {
-        eventBus.emit("change:watermark", "雄花目标框")
-    } else if (name.indexOf("枝条数") > -1) {
-        eventBus.emit("change:watermark", "")
-    } else {
-        eventBus.emit("change:watermark", "")
-    }
-}
-
-function closeDialog() {
-    activeOuput.value = null
-    eventBus.emit("change:watermark", "")
-    eventBus.emit("resetImgIndex")
-}
-
-// 质量详情
-function toggleQualityAcitve() {
-
-}
-</script>
-
-<style lang="scss" scoped>
-@import "src/styles/index";
-.picture-file {
-    display: flex;
-    .left-img {
-        min-width: 780px;
-        min-height: 300px;
-    }
-    .file-wrap {
-        background: url("@/assets/images/home/file-bg.png") no-repeat top center / 100% 100%;
-        margin-left: 12px;
-        padding: 12px;
-        .file-title {
-            font-size: 20px;
-            color: #ffd489;
-            display: flex;
-            align-items: center;
-
-            .tag {
-                border: 1px solid #FFD489;
-                border-radius: 4px;
-                font-size: 12px;
-                display: inline-block;
-                width: 44px;
-                height: 20px;
-                text-align: center;
-                line-height: 18px;
-                margin-left: 3px;
-                padding: 1px 4px;
-            }
-        }
-        .overview-file {
-            padding-top: 20px;
-            .box-title {
-                font-size: 16px;
-                padding-left: 13px;
-                margin-bottom: 16px;
-                position: relative;
-                display: flex;
-                justify-content: space-between;
-                color: #fff;
-                &::before {
-                    content: "";
-                    position: absolute;
-                    left: 0;
-                    top: 3px;
-                    width: 3px;
-                    height: 16px;
-                    background: #fff;
-                    border-radius: 11px;
-                }
-            }
-            .title {
-                color: #f3c11d;
-                font-size: 16px;
-                font-family: "PangMenZhengDao";
-                margin-bottom: 20px;
-                .big {
-                    width: 13px;
-                    height: 13px;
-                    margin: -10px 0 0 4px;
-                }
-                .small {
-                    width: 7px;
-                    height: 7px;
-                    margin-left: -3px;
-                }
-            }
-            .base-data {
-                background: rgba(207, 207, 207, 0.1);
-                border-radius: 4px;
-                padding: 6px 0;
-                display: flex;
-                .base-item {
-                    flex: 1;
-                    text-align: center;
-                    .label {
-                        font-size: 12px;
-                        color: #666666;
-                    }
-                    .value {
-                        padding-top: 2px;
-                        font-size: 16px;
-                        color: #ffffff;
-                    }
-                }
-                .base-item + .base-item {
-                    border-left: 1px solid rgba(102, 102, 102, 0.42);
-                }
-            }
-            .list {
-                margin-top: 15px;
-                width: max-content;
-                font-size: 14px;
-                .list-item {
-                    color: #bbbbbb;
-                    display: flex;
-                    margin-bottom: 8px;
-                    .list-name {
-                        color: #f3c11d;
-                        margin-right: 6px;
-                        img {
-                            width: 17px;
-                            height: 13px;
-                        }
-                    }
-                }
-            }
-        }
-        .overview-file + .overview-file {
-            margin-top: 8px;
-        }
-        .box-wrap {
-            display: flex;
-            .box-item {
-                min-width: 140px;
-                box-sizing: border-box;
-                display: flex;
-                flex-direction: column;
-                justify-content: center;
-                align-items: center;
-                padding: 6px;
-                background: rgba(207, 207, 207, 0.1);
-                border-radius: 4px;
-                border: 1px solid rgba(207, 207, 207, 0.1);
-                cursor: pointer;
-                .item-name {
-                    font-size: 12px;
-                    color: #666666;
-                    width: max-content;
-                }
-                .item-val {
-                    font-size: 18px;
-                    color: #fff;
-                    width: max-content;
-                    padding-top: 3px;
-                }
-                &.active {
-                    background: rgba(255, 212, 137, 0.16);
-                    border: 1px solid #ffd489;
-                    .item-name {
-                        color: #bbbbbb;
-                    }
-                }
-            }
-            .box-item + .box-item {
-                margin-left: 8px;
-            }
-        }
-    }
-}
-</style>
-<style lang="scss">
-.picture-preview-wrap {
-    background: none;
-}
-</style>

+ 0 - 107
src/views/home/album_compoents/albumCarousel7d.vue

@@ -1,107 +0,0 @@
-<template>
-  <template v-for="(images,index) in imagesList" :key="index">
-    <album-carousel-item :farmId="farmId" :images="images"></album-carousel-item>
-    <div style="height: 5px"></div>
-  </template>
-</template>
-
-<script setup>
-import { ref, computed, onMounted, onUnmounted } from "vue";
-import AlbumDrawBoxItem from "./albumCarouselItem";
-import "./cacheImg.js"
-import AlbumCarouselItem from "./albumCarouselItem";
-import {dateFormat} from "@/utils/date_util.js"
-import eventBus from "@/api/eventBus";
-
-const props =defineProps({
-  // sampleId:{
-  //   type: [Number, String],
-  //   required: false
-  // },
-  farmId:{
-    type: [Number, String],
-    required: true
-  },
-  farmWork:{
-    type: Object,
-    required: false
-  }
-})
-const imagesList = ref([]);
-let params = {farmId: props.farmId}
-
-onMounted(() => {
-  if(props.farmWork?.executeDate){
-    let execcuteDate = new Date(props.farmWork.executeDate)
-    let beforeExecuteDate = new Date(props.farmWork.beforeExecuteDate)
-    const pastDate = new Date(beforeExecuteDate);
-    const futureDate = new Date(execcuteDate);
-    params.startDate = dateFormat(pastDate, "YY-mm-dd");
-    params.endDate = dateFormat(futureDate, "YY-mm-dd");
-  }
-  // getImageList(params)
-});
-
-const updateData = () =>{
-  params.farmId = props.farmId
-  getImageList(params)
-}
-
-onUnmounted(()=>{
-  eventBus.off("chart:updateOption",updateData)
-})
-
-const getImageList = (params) =>{
-  VE_API.image.list(params).then(res => {
-    if(res.code === 0){
-      let result = splitByWeek(res.data, params.startDate, params.endDate);
-      if(result && result.length > 0){
-        result = result.reverse()
-      }
-      for(let i=0;result != null && i<result.length;i++){
-        if (result[i] && result[i].length > 0){
-          imagesList.value.push(result[i])
-        }
-      }
-    }
-  })
-}
-
-eventBus.on("chart:updateOption",updateData)
-
-function splitByWeek(items, startDate, endDate) {
-  // 将开始时间和结束时间转换为时间戳
-  const start = new Date(startDate).getTime();
-  const end = new Date(endDate).getTime();
-
-  // 创建一个用于存储按周分组的结果
-  const weeklyGroups = [];
-
-  // 遍历每一项
-  items.forEach(item => {
-    const uploadDate = new Date(item.uploadDate).getTime();
-
-    // 确保上传日期在开始日期和结束日期之间
-    if (uploadDate >= start && uploadDate <= end) {
-      // 计算上传日期属于第几周
-      const weekIndex = Math.floor((uploadDate - start) / (7 * 24 * 60 * 60 * 1000));
-
-      // 如果该周的数组不存在,则创建一个
-      if (!weeklyGroups[weekIndex]) {
-        weeklyGroups[weekIndex] = [];
-      }
-
-      // 将当前项添加到对应的周数组中
-      weeklyGroups[weekIndex].push(item);
-    }
-  });
-
-  return weeklyGroups;
-}
-
-
-</script>
-
-<style lang="scss" scoped>
-@import "src/styles/index";
-</style>

+ 0 - 213
src/views/home/album_compoents/albumCarouselItem.vue

@@ -1,213 +0,0 @@
-<template>
-  <div class="carousel-container">
-    <!-- 图片列表 -->
-    <div class="carousel-wrapper"  :style="carouselStyle">
-      <photo-provider v-if="images" :photo-closable="true" @visibleChange="handleVisibleChange">
-        <template  v-for="(photo, index) in images"
-                   :key="photo.id">
-          <album-draw-box  :farmId="farmId" :photo="photo" :name="name" :current="currentIndex" :index="index" :length="images.length"
-          ></album-draw-box>
-        </template>
-      </photo-provider>
-    </div>
-    <div class="blur-bg" v-if="lock && currentIndex !== 0">
-      <div class="blur-content">
-        <div class="blur-img">
-          <img src="@/assets/img/gallery/camera-icon.png" />
-        </div>
-      </div>
-    </div>
-
-    <!-- 左右箭头 -->
-    <div @click.stop="prev" v-if="currentIndex !== 0" class="arrow left-arrow">
-      <el-icon color="#F0D09C"><ArrowLeftBold /></el-icon>
-    </div>
-    <div
-      @click.stop="next"
-      v-if="images && currentIndex !== images.length - 1"
-      class="arrow right-arrow"
-    >
-      <el-icon color="#F0D09C"><ArrowRightBold /></el-icon>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import eventBus from "@/api/eventBus";
-import { toRefs, ref, computed, onMounted, onUnmounted } from "vue";
-import AlbumDrawBox from "./albumDrawBox";
-import "./cacheImg.js"
-const props =defineProps({
-  images:{
-    type: Array,
-    required: true
-  },
-  farmId:{
-    type: [Number,String],
-    required: true
-  },
-  lock:{
-    type: Boolean,
-    default: true
-  },
-  name:{
-    type: String,
-    default: ""
-  }
-})
-const {images} = toRefs(props);
-let timer = null;
-const currentIndex = ref(0);
-
-onMounted(() => {
-  updateImagePosition();
-  clearAndRestartTimer();
-  eventBus.on("resetImgIndex", resetImgIndex)
-  eventBus.on("resetImgIndex", resetImgIndex)
-});
-onUnmounted(() => {
-  clearInterval(timer);
-  eventBus.off("resetImgIndex", resetImgIndex)
-});
-
-const updateImagePosition = () => {
-  carouselStyle.value.transform = `translateX(-${currentIndex.value * 100}%)`;
-};
-
-const clickPhotoShow = () => {
-  if (timer) {
-    clearInterval(timer)
-  };
-}
-
-// 图片显隐切换回调
-const handleVisibleChange = ({visible}) => {
-  if (visible.value) {
-    if (timer) {
-      clearInterval(timer)
-    }
-  } else {
-    clearAndRestartTimer();
-  }
-}
-
-// 计算轮播图样式
-const carouselStyle = computed(() => {
-  return {
-    transform: `translateX(-${currentIndex.value * 100}%)`,
-  };
-});
-
-// 下一张图片
-const next = () => {
-  // 图片总数
-  const totalImages = images.value.length;
-  currentIndex.value = (currentIndex.value + 1) % totalImages;
-  updateImagePosition();
-  clearAndRestartTimer();
-  eventBus.emit("albumCarousel", currentIndex.value)
-};
-
-// 上一张图片
-const prev = () => {
-  // 图片总数
-  const totalImages = images.value.length;
-  currentIndex.value = (currentIndex.value - 1 + totalImages) % totalImages;
-  updateImagePosition();
-  clearAndRestartTimer();
-  eventBus.emit("albumCarousel", currentIndex.value)
-};
-
-const clearAndRestartTimer = () => {
-  if (timer) {
-    clearInterval(timer);
-  }
-  // timer = setInterval(next, 5000);
-};
-
-function resetImgIndex() {
-  setTimeout(() => {
-    currentIndex.value = 0
-  }, 500)
-}
-
-</script>
-
-<style lang="scss" scoped>
-@import "src/styles/index";
-.carousel-container {
-  position: relative;
-  width: 100%;
-  overflow: hidden;
-  margin: 0 auto;
-  .carousel-wrapper {
-    display: flex;
-    transition: transform 0.5s ease;
-    width: 100%;
-  }
-  .blur-bg {
-    position: absolute;
-    top: 0;
-    width: 100%;
-    height: 100%;
-    backdrop-filter: blur(1.4px);
-    .blur-content {
-      border-radius: 8px;
-      background: rgba(0, 0, 0, 0.5);
-      width: 100%;
-      height: 100%;
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: center;
-      font-size: 12px;
-      color: #fff;
-      .blur-img {
-        img {
-          width: 54px;
-          position: relative;
-          left: 4px;
-          top: 4px;
-        }
-      }
-      .blur-text {
-        padding: 8px 0;
-        text-align: center;
-        line-height: 1.5;
-      }
-      .blur-btn {
-        padding: 0 40px;
-        box-shadow: 0 -2px 2px #86C9FF;
-        height: 28px;
-        line-height: 28px;
-        border-radius: 50px;
-        background: rgba(33, 153, 248, 0.7);
-        // background: linear-gradient(#86C9FF, rgba(255, 255, 255, 0));
-      }
-    }
-  }
-
-  .arrow {
-    position: absolute;
-    top: 50%;
-    transform: translateY(-50%);
-    background: rgba(0, 0, 0, 0.5);
-    width: rpx(72);
-    height: rpx(72);
-    border-radius: 50%;
-    display: inline-flex;
-    align-items: center;
-    justify-content: center;
-    cursor: pointer;
-    pointer-events: all;
-  }
-
-  .left-arrow {
-    left: rpx(32);
-  }
-
-  .right-arrow {
-    right: rpx(32);
-  }
-}
-</style>

+ 0 - 307
src/views/home/album_compoents/albumDrawBox.vue

@@ -1,307 +0,0 @@
-<template>
-  <photo-consumer
-      class="carousel-item"
-      :src="watermark || base_img_url2 + (photo.resFilename && !name ? photo.resFilename : photo.filename) + resize"
-  >
-    <img v-if="Math.abs(current - index) < 3" crossorigin="anonymous" @load="drawWatermark($event, name)" loading="lazy" :src="watermark || (base_img_url2 + (photo.resFilename && !name ? photo.resFilename : photo.filename) + resize)" style="width: 100%;" />
-    <canvas  ref="canvasRef" style="position: absolute;"></canvas>
-    <!-- <div class="tag-text" v-if="showTagBox" >
-      <span v-html="photo.growText"></span>
-      <button class="close-button" @click="hideTagBox">✖</button>
-    </div> -->
-    <div class="tag-box right" :class="{'leftTop': 'leftTop'}">{{ index+1 }}/{{ length }}</div>
-<!--    <div class="center-mark">mark</div>-->
-  </photo-consumer>
-
-</template>
-
-<script setup>
-import { ref, onMounted, onBeforeUnmount, defineProps } from "vue";
-import { base_img_url2 } from "@/api/config";
-import {imageCache,loadImage} from "./cacheImg.js"
-import {dateFormat} from "@/utils/date_util.js"
-import {pointToFormat} from "@/utils/util.js"
-import {drawTextInRect, drawBorderImageInRect, drawImageInRect, drawRectInRect, drawHorizontalTextList, drawTargetRectangles} from "./utils"
-const resize = "?x-oss-process=image/resize,p_50/format,webp/quality,q_50";
-const canvasRef = ref(null);
-const watermark = ref(null)
-const baseMapBig = ref(false)
-
-const props = defineProps({
-  farmId:{
-    type: [Number,String],
-    required: true
-  },
-  photo:{
-    type: Object,
-    required: true
-  },
-  index:{
-    type: Number,
-    required: true
-  },
-  length:{
-    type: Number,
-    required: true
-  },
-  current:{
-    type: Number,
-    required: true
-  },
-  name:{
-    type: String,
-    default: ""
-  }
-})
-let img = null;
-let ctx = null;
-let data = {year:props.photo.uploadDate.substring(0,4),
-  monthDay:dateFormat(new Date(props.photo.uploadDate),'mm/dd'),
-  address:props.photo.district.replaceAll("\"","") + props.photo.gardenName,
-  tempImg:imageCache.get("temp"),temp:"10°C-20°C",wendu:"适宜",
-  feiniao:imageCache.get("feiniao"),
-  baseMap:imageCache.get("base_map_"+props.photo.treeId),
-  fusheImg:imageCache.get("fushe"),fushe:"光照优",
-  shiduImg:imageCache.get("shidu"),shidu:"湿度适宜",
-  text:"病害风险,及时喷药",
-  shotCode:props.photo.shotCode,
-  treeCode:props.photo.treeCode,
-  pingzhong:props.photo.pingzhong,
-  uploadDate:props.photo.uploadDate,
-}
-
-async function drawWatermark(event,name) {
-  console.log(name)
-  if(!name){
-    drawWatermark1(event)
-  }else{
-    drawTargetRectangles2(event.target,props.photo.watermarks.find(item=>item.name === name))
-  }
-}
-
-function drawTargetRectangles2(img, obj) {
-  const canvas = canvasRef.value;
-  let scale = 3
-  canvas.width = img.width * scale;
-  canvas.height = img.height * scale;
-  ctx = canvas.getContext('2d');
-  ctx.scale(scale, scale)
-  ctx.drawImage(img, 0, 0, img.width, img.height);
-  drawTargetRectangles(ctx, obj, 4000,3000,img.width, img.height)
-  watermark.value = canvas.toDataURL();
-}
-
-async function drawWatermark1(event) {
-  img = event.target
-  await loadImage(props.photo.baseMap,"base_map_"+props.photo.treeId)
-  data.baseMap = imageCache.get("base_map_"+props.photo.treeId)
-  if(!watermark.value){
-    let param = {farmId:props.farmId, date: props.photo.uploadDate}
-    let weather = null
-    VE_API.image.findSuitabilityByPoint(param).then((res)=>{
-      if(res.code === 0){
-        weather = res.data
-        drawWatermark2(img,weather)
-      }else{
-        drawWatermark2(img,null)
-      }
-    })
-  }
-}
-
-
-function drawWatermark2(img,weather) {
-  const canvas = canvasRef.value;
-  let scale = 3
-  canvas.width = img.width * scale;
-  canvas.height = img.height * scale;
-  ctx = canvas.getContext('2d');
-  ctx.scale(scale, scale)
-  ctx.drawImage(img, 0, 0, img.width, img.height);
-  drawBottom(img.width, img.height, weather)
-  watermark.value = canvas.toDataURL();
-}
-
-
-// console.log(data)
-const drawBottom = (imgWidth, imgHeight, weather) => {
-  if (weather) {
-    data["temp"] = weather.tempMin + "°C" + "-" + weather.tempMax + "°C" + " " + weather.tempSuitability
-    data["fushe"] = "光照"+weather.vindexSuitability
-    data["shidu"] = "湿度"+weather.humiditySuitability
-  }
-  // 设置文本样式
-  ctx.font = "8px Arial";
-  ctx.textAlign = "left"; // 设置为左对齐
-  let imgRect = { x: 0, y: 0, width: imgWidth, height: imgHeight}
-  // 绘制头部黑色半透明遮罩
-  let topRect = drawRectInRect(ctx,imgRect, 0, 0, 30, 10,"rgba(0, 0, 0, 0.6)")
-  // 绘制黑色半透明遮罩
-  let bottomRect = drawRectInRect(ctx,imgRect, 0, 5/6 * 100, 100, 1/6 * 100,"rgba(0, 0, 0, 0.6)")
-
-  // drawHorizontalTextList(ctx, topRect, '#ffffff90',[data.treeCode, "蓬径:5m", "高度:3m", "高产树",data.pingzhong],
-  drawHorizontalTextList(ctx, topRect, '#ffffff90',[data.treeCode],
-      40, 0,
-      65 , 0,"|",0,
-      30,"#ffffff50",1,2)
-  ctx.fillStyle = "white"; // 文本颜色为白色
-  // 绘制温度
-  let startXPercent = 1;
-  drawImageInRect(ctx, bottomRect, data.tempImg, startXPercent, 5+10, 5, 30)
-  drawTextInRect(ctx, bottomRect,`${data.temp}`,startXPercent + 4, 28+10, 20)
-  // 绘制湿度
-  drawImageInRect(ctx, bottomRect, data.shiduImg, startXPercent+26, 7 + 10, 4, 30)
-  drawTextInRect(ctx, bottomRect,`${data.shidu}`,startXPercent + 31, 28 + 10, 20)
-  // 绘制辐射
-  drawImageInRect(ctx, bottomRect, data.fusheImg, startXPercent+26 + 18, 7 + 10, 5, 30)
-  drawTextInRect(ctx, bottomRect,`${data.fushe}`,startXPercent+31 + 18, 28 + 10, 20)
-  //绘制日期信息
-  ctx.fillStyle = "#FFFFFF";
-  drawTextInRect(ctx, bottomRect,`${formatDate(new Date(data.uploadDate))}`,startXPercent +1.7, 75, 24)
-  //绘制位置信息
-  ctx.fillStyle = "#FFFFFF90";
-  drawTextInRect(ctx, bottomRect,`${data.treeCode}_S3_SCS3-3_D0P0G1`,startXPercent +13, 75, 18)
-
-  if(data.baseMap){
-    drawBorderImageInRect(ctx, imgRect, data.baseMap, 2/3*100, 2/3*100,
-        1/3*100, 1/3*100, 5, 5)
-  }
-}
-
-
-const showTagBox = ref(true); // 控制 tag-box 的显示状态
-const hideTagBox = (event) => {
-  event.stopPropagation();
-  showTagBox.value = false; // 隐藏 tag-box
-};
-
-const formatDate = (date) => {
-  const year = date.getFullYear();
-  const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1
-  const day = String(date.getDate()).padStart(2, '0');
-  return `${(year+"").substring(2)}${month}${day}`;
-};
-
-
-
-
-</script>
-
-<style lang="scss" scoped>
-.canvas-container {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  justify-content: center;
-}
-.carousel-item {
-  min-width: 100%;
-  flex-shrink: 0;
-  width: 100%;
-  pointer-events: auto;
-  position: relative;
-  .tag-box {
-    position: absolute;
-    bottom: 30%;
-    left: 50%;
-    transform: translate(-50%, 50%); // 确保在高二分之一的位置水平居中
-    height: 18px;
-    padding: 0 6px;
-    background: rgba(108, 108, 108, 0.67);
-    border-radius: 10px;
-    display: flex;
-    align-items: center;
-    color: #FFFFFF;
-    font-size: 12px;
-
-    &.right {
-      left: auto;
-      right: 10px;
-    }
-    &.leftTop {
-      height: 25px;
-      line-height: 26px;
-      padding: 0 8px;
-      border-radius: 16px;
-      background: rgba(0, 0, 0, 0.6);
-      bottom: auto;
-      top: 6px;
-    }
-  }
-  .tag-text {
-    position: absolute;
-    bottom: 31%;
-    left: 50%;
-    width: 80%;
-    transform: translate(-50%, 50%); // 确保在高二分之一的位置水平居中
-    height: 24px;
-    padding: 10px 0px 10px 0px;
-    background: rgba(0, 0, 0, 0.67);
-    border-radius: 6px;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    text-align: center;
-    color: #FFFFFF;
-    font-size: 12px;
-  }
-
-  .center-mark {
-    position: absolute;
-    bottom: 10px;
-    left: 50%;
-    transform: translateX(-50%);
-    color: #36402c;
-    font-size: rpx(24);
-    font-weight: bold;
-    padding: rpx(14) rpx(30);
-    background: linear-gradient(
-            90deg,
-            rgba(255, 255, 255, 0) 0%,
-            rgba(255, 255, 255, 0.6) 24%,
-            rgba(255, 255, 255, 0.6) 76%,
-            rgba(255, 255, 255, 0) 100%
-    );
-  }
-}
-.carousel-item img {
-  width: 100%;
-  display: block;
-  border-radius: 12px;
-}
-canvas {
-  position: absolute;
-}
-.close-button {
-  background: transparent;
-  border: none;
-  color: #FFFFFF;
-  cursor: pointer;
-  font-size: 10px; // 可以根据需求调整大小
-  position: absolute;
-  top: -1px;
-  right: -9px; // 调整为合适的间距
-  transform: translateY(-50%);
-}
-
-.floating-img {
-  position: absolute;
-  bottom: 0;
-  right: 0;
-  width: auto !important;
-  height: 25% !important;
-}
-.floating-img-big {
-  position: fixed !important;
-  z-index: 99999 !important;
-  top: 50% !important;
-  left: 50% !important;
-  width: auto !important;
-  height: 100% !important;
-  transform: translate(-50%, -50%) !important;
-}
-
-
-
-
-</style>

+ 0 - 75
src/views/home/album_compoents/cacheImg.js

@@ -1,75 +0,0 @@
-// 创建一个全局的图片缓存
-const imageCache = new Map();
-
-function loadImage(url, key) {
-    return new Promise((resolve, reject) => {
-        // 检查缓存中是否存在该key的图片
-        if (imageCache.has(key)) {
-            resolve(imageCache.get(key));
-            return;
-        }
-
-        // 如果缓存中没有,则创建一个新的图片对象
-        const img = new Image();
-        img.src = url;
-        img.crossOrigin = 'anonymous';
-
-        img.onload = () => {
-            // 图片加载完成后,将其存入缓存
-            imageCache.set(key, img);
-            resolve(img);
-        };
-
-        img.onerror = (error) => {
-            reject(error);
-        };
-    });
-}
-
-// 使用示例
-loadImage(require('@/assets/watermark/feiniao.png'), 'feiniao')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-loadImage(require('@/assets/watermark/fushe.png'), 'fushe')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-loadImage(require('@/assets/watermark/shidu.png'), 'shidu')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-loadImage(require('@/assets/watermark/temp.png'), 'temp')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-
-loadImage("https://birdseye-img.sysuimars.com/birdseye-look-mini/base_map/90378.jpg", 'base_map')
-    .then((img) => {
-        // 在这里使用加载完成的图片
-        // console.log('图片加载成功', img);
-    })
-    .catch((error) => {
-        console.error('图片加载失败', error);
-    });
-
-
-export { imageCache ,loadImage};
-
-

+ 0 - 580
src/views/home/album_compoents/compareDialog.vue

@@ -1,580 +0,0 @@
-<template>
-    <el-dialog
-        v-model="dialogVisible"
-        width="80%"
-        align-center
-        class="picture-preview-wrap v-dialog"
-        :show-close="false"
-        append-to-body
-    >
-        <div class="picture-file">
-            <div class="compare-l">
-                <div class="left-img">
-                    <album-carousel-item
-                        lbum-carousel-item
-                        v-if="images"
-                        :key="nameRef+farmId+sampleId"
-                        :name="nameRef"
-                        :farmId="farmId"
-                        :images="images"
-                        :lock="lock"
-                    ></album-carousel-item>
-                </div>
-                <div class="file-wrap">
-                    <div class="file-title">
-                        <img src="@/assets/images/common/chart-yellow.png" alt="" />
-                        果树档案
-                        <span v-show="showTag" class="tag">小农户</span>
-                    </div>
-
-                    <div class="box-wrap">
-                        <div class="overview-file">
-                            <div class="box-title">总体档案</div>
-                            <div class="base-data">
-                                <div class="base-item" v-for="item in photoBaseData" :key="item.label">
-                                    <span class="label">{{ item.label }}</span>
-                                    <div class="value">{{ item.value }}</div>
-                                </div>
-                            </div>
-                            <div class="list">
-                                <div class="list-item" v-for="item in photoList" :key="item.key">
-                                    <div class="list-name">
-                                        <img src="@/assets/images/common/title-icon.png" alt="" />
-                                        {{ item.key }}
-                                    </div>
-                                    {{ item.statement }}
-                                </div>
-                            </div>
-                        </div>
-
-                        <div class="box-r">
-                            <div class="overview-file">
-                                <div class="box-title">产量详情</div>
-                                <div class="box-wrap">
-                                    <div
-                                        class="box-item"
-                                        v-for="(item, index) in outputBox"
-                                        :key="index"
-                                        @click="toggleAcitve(item.name)"
-                                        :class="{ active: activeOuput === item.name }"
-                                    >
-                                        <div class="item-name">{{ item.name }}</div>
-                                        <div class="item-val">{{ item.value }}</div>
-                                    </div>
-                                </div>
-                            </div>
-
-                            <div class="overview-file">
-                                <div class="box-title">质量详情</div>
-                                <div class="box-wrap">
-                                    <div
-                                        class="box-item"
-                                        v-for="(item, index) in qualityBox"
-                                        :key="index"
-                                        @click="toggleQualityAcitve(item.name)"
-                                        :class="{ active: activeOuput === item.name }"
-                                    >
-                                        <div class="item-name">{{ item.name }}</div>
-                                        <div class="item-val">{{ item.value }}</div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <div class="compare-r">
-                <div class="left-img">
-                    <album-carousel-item
-                        lbum-carousel-item
-                        v-if="images2"
-                        :key="nameRef + '2' + farmId2 + sampleId2"
-                        :name="nameRef"
-                        :farmId="farmId2"
-                        :images="images2"
-                        :lock="lock"
-                    ></album-carousel-item>
-                </div>
-                <div class="file-wrap">
-                    <div class="file-title">
-                        <img src="@/assets/images/common/chart-yellow.png" alt="" />
-                        果树档案
-                        <span v-show="showTag2" class="tag">小农户</span>
-                    </div>
-                    <div class="box-wrap">
-                        <div class="overview-file">
-                            <div class="box-title">总体档案</div>
-                            <div class="base-data">
-                                <div class="base-item" v-for="item in photoBaseData2" :key="item.label">
-                                    <span class="label">{{ item.label }}</span>
-                                    <div class="value">{{ item.value }}</div>
-                                </div>
-                            </div>
-                            <div class="list">
-                                <div class="list-item" v-for="item in photoList2" :key="item.key">
-                                    <div class="list-name">
-                                        <img src="@/assets/images/common/title-icon.png" alt="" />
-                                        {{ item.key }}
-                                    </div>
-                                    {{ item.statement }}
-                                </div>
-                            </div>
-                        </div>
-                        <div class="box-r">
-                            <div class="overview-file">
-                                <div class="box-title">产量详情</div>
-                                <div class="box-wrap">
-                                    <div
-                                        class="box-item"
-                                        v-for="(item, index) in outputBox2"
-                                        :key="index"
-                                        @click="toggleAcitve2(item.name)"
-                                        :class="{ active: activeOuput2 === item.name }"
-                                    >
-                                        <div class="item-name">{{ item.name }}</div>
-                                        <div class="item-val">{{ item.value }}</div>
-                                    </div>
-                                </div>
-                            </div>
-
-                            <div class="overview-file">
-                                <div class="box-title">质量详情</div>
-                                <div class="box-wrap">
-                                    <div
-                                        class="box-item"
-                                        v-for="(item, index) in qualityBox2"
-                                        :key="index"
-                                        @click="toggleQualityAcitve2(item.name)"
-                                        :class="{ active: activeOuput2 === item.name }"
-                                    >
-                                        <div class="item-name">{{ item.name }}</div>
-                                        <div class="item-val">{{ item.value }}</div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </el-dialog>
-</template>
-
-<script setup>
-import { ref, computed, onMounted, onUnmounted } from "vue";
-import "./cacheImg.js";
-import AlbumCarouselItem from "./albumCarouselItem";
-import { dateFormat } from "@/utils/date_util.js";
-import eventBus from "@/api/eventBus";
-
-const lock = ref(false);
-const farmId = ref(766);
-const farmId2 = ref(766);
-const sampleId = ref(null);
-const sampleId2 = ref(null);
-const nameRef = ref("");
-
-const isLoadingImg = ref(true);
-const images = ref(null);
-const images2 = ref(null);
-const dialogVisible = ref(false);
-// 获取当前日期
-const currentDate = new Date();
-// 获取当前日期的前一个月
-const startDate = new Date(currentDate);
-startDate.setMonth(currentDate.getMonth() - 1);
-
-// 格式化日期
-const formattedStartDate = dateFormat(startDate, "YY-mm-dd");
-const formattedEndDate = dateFormat(currentDate, "YY-mm-dd");
-
-eventBus.on("change:watermark", function (name) {
-    nameRef.value = name;
-});
-
-const outputBox = ref([
-    { id: 1, name: "产量估计", value: "" },
-    { id: 2, name: "高质果率", value: "" },
-    { id: 3, name: "雌花比例", value: "" },
-]);
-
-const qualityBox = ref([
-    { id: 5, name: "通风率", value: "" },
-    { id: 6, name: "透光率", value: "" },
-    { id: 7, name: "病虫比例", value: "" },
-]);
-const outputBox2 = ref([
-    { id: 1, name: "产量估计", value: "" },
-    { id: 2, name: "高质果率", value: "" },
-    { id: 3, name: "雌花比例", value: "" },
-]);
-
-const qualityBox2 = ref([
-    { id: 5, name: "通风率", value: "" },
-    { id: 6, name: "透光率", value: "" },
-    { id: 7, name: "病虫比例", value: "" },
-]);
-
-const showTag = ref(false)
-const showTag2 = ref(false)
-eventBus.on("showCompareDialog", function (compareArr) {
-    console.log("compareArr", compareArr);
-    images.value = []
-    images2.value = []
-    compareArr.map((item, index) => {
-        dialogVisible.value = true;
-        if (index === 0) {
-            farmId.value = item.farmId
-            sampleId.value = item.sampleId
-            VE_API.miniimage.list({ farmId: item.farmId, sampleId: item.sampleId }).then((res) => {
-                if (res.code === 0) {
-                    images.value = res.data;
-                }
-            });
-            const dataItem = item.data;
-            showTag.value = dataItem.nonghu == 1 ? true : false;
-
-            VE_API.mini_farm.getSampleFiles({ geoHashSample: dataItem.geoHashSample }).then(({data}) => {
-                photoBaseData.value[0].value = dataItem.pz;
-                photoBaseData.value[1].value = data.meta_info.crown + "平方米";
-                photoBaseData.value[2].value = data.meta_info.branch_num ;
-
-            photoBaseData.value[3].value = data.meta_info.age + "年"
-            photoList.value[0].key = data.meta_info.dp_alert_info.key
-            photoList.value[0].statement = data.meta_info.dp_alert_info.statement
-            photoList.value[1].key = data.meta_info.grow_alert_info.key
-            photoList.value[1].statement = data.meta_info.grow_alert_info.statement
-            photoList.value[2].key = data.meta_info.nutrition_info.key
-            photoList.value[2].statement = data.meta_info.nutrition_info.statement
-            photoList.value[3].key = data.meta_info.prescription_info.key
-            photoList.value[3].statement = data.meta_info.prescription_info.statement
-            outputBox.value[0].value = data.production_info.production + "斤"
-            outputBox.value[1].value = data.production_info.quality.toFixed(0) + "%"
-            outputBox.value[2].value = data.production_info.cihua_ratio.toFixed(0) + "%"
-            qualityBox.value[0].value = data.ecology_info.ventilation + "%"
-            qualityBox.value[1].value = data.ecology_info.transmittance + "%"
-            qualityBox.value[2].value = data.ecology_info.dp_situation+"%"
-            });
-            // qualityBox.value[2].value = data.dxtj ? data.dxtj + "%" : "--";
-        } else {
-            farmId2.value = item.farmId
-            sampleId2.value = item.sampleId
-            VE_API.miniimage.list({ farmId: item.farmId, sampleId: item.sampleId }).then((res) => {
-                if (res.code === 0) {
-                    images2.value = res.data;
-                }
-            });
-            const dataItem = item.data;
-            showTag2.value = dataItem.nonghu == 1 ? true : false;
-            
-            VE_API.mini_farm.getSampleFiles({ geoHashSample: dataItem.geoHashSample }).then(({data}) => {
-                photoBaseData2.value[0].value = dataItem.pz;
-                photoBaseData2.value[1].value = data.meta_info.crown + "平方米";
-                photoBaseData2.value[2].value = data.meta_info.branch_num ;
-
-                photoBaseData2.value[3].value = data.meta_info.age + "年"
-                photoList2.value[0].key = data.meta_info.dp_alert_info.key
-                photoList2.value[0].statement = data.meta_info.dp_alert_info.statement
-                photoList2.value[1].key = data.meta_info.grow_alert_info.key
-                photoList2.value[1].statement = data.meta_info.grow_alert_info.statement
-                photoList2.value[2].key = data.meta_info.nutrition_info.key
-                photoList2.value[2].statement = data.meta_info.nutrition_info.statement
-                photoList2.value[3].key = data.meta_info.prescription_info.key
-                photoList2.value[3].statement = data.meta_info.prescription_info.statement
-                outputBox2.value[0].value = data.production_info.production + "斤"
-                outputBox2.value[1].value = data.production_info.quality.toFixed(0) + "%"
-                outputBox2.value[2].value = data.production_info.cihua_ratio.toFixed(0) + "%"
-                qualityBox2.value[0].value = data.ecology_info.ventilation + "%"
-                qualityBox2.value[1].value = data.ecology_info.transmittance + "%"
-                qualityBox2.value[2].value = data.ecology_info.dp_situation+"%"
-            });
-        }
-    });
-    //     isLoadingImg.value = true
-    //   let params = {sampleId,farmId}
-    //       dialogVisible.value = true
-    //   VE_API.miniimage.list(params).then(res => {
-    //     if(res.code === 0){
-    //       images.value = res.data
-    //       isLoadingImg.value = false
-    //     }
-    //   })
-    //   photoBaseData.value[0].value = data.pz;
-    //   photoBaseData.value[1].value = data.sgbmj + "米";
-    //   photoBaseData.value[2].value = data.cl + "斤";
-    //   photoBaseData.value[3].value = data.spgl + "%";
-    //   outputBox.value[0].value = data.hsl ? (data.hsl + "%") : "--";
-    //   outputBox.value[1].value = data.zzts? data.zzts : "--";
-    //   outputBox.value[2].value = data.khl? (data.khl + "%") : "--";
-    //   outputBox.value[3].value = data.xhl? (data.xhl + "%") : "--";
-    //   qualityBox.value[0].value = data.tfl? (data.tfl + "%") : "--";
-    //   qualityBox.value[1].value = data.tgl? (data.tgl + "%") : "--";
-    //   qualityBox.value[2].value = data.dxtj? (data.dxtj + "%") : "--";
-});
-
-eventBus.off("albumCarousel", toggleActiveImg);
-eventBus.on("albumCarousel", toggleActiveImg);
-
-const currentIndex = ref(0);
-function toggleActiveImg(index) {
-    currentIndex.value = index;
-}
-
-const photoBaseData = ref([
-    {
-        label: "品种",
-        value: "--",
-    },
-    {
-        label: "冠幅表面积",
-        value: "--",
-    },
-    {
-        label: "总枝条",
-        value: "--",
-    },
-    {
-        label: "树龄",
-        value: "--",
-    },
-]);
-
-const photoBaseData2 = ref([
-    {
-        label: "品种",
-        value: "--",
-    },
-    {
-        label: "冠幅表面积",
-        value: "--",
-    },
-    {
-        label: "总枝条",
-        value: "--",
-    },
-    {
-        label: "树龄",
-        value: "--",
-    },
-]);
-
-const photoList = ref([
-    {key: "病虫", statement: "--"},
-    {key: "异常", statement: "--"},
-    {key: "营养", statement: "--"},
-    {key: "农事", statement: "--"},
-]);
-const photoList2 = ref([
-    {key: "病虫", statement: "--"},
-    {key: "异常", statement: "--"},
-    {key: "营养", statement: "--"},
-    {key: "农事", statement: "--"},
-]);
-
-
-const activeOuput = ref(1);
-const activeOuput2 = ref(1);
-
-// 产量详情
-function toggleAcitve(name) {
-    activeOuput.value = name;
-    toggleNamePic(name)
-}
-
-function toggleNamePic(name) {
-    if (name.indexOf("开花") > -1) {
-        eventBus.emit("change:watermark", "开花目标框");
-    } else if (name.indexOf("花穗") > -1) {
-        eventBus.emit("change:watermark", "花穗目标框");
-    } else if (name.indexOf("雄花") > -1) {
-        eventBus.emit("change:watermark", "雄花目标框");
-    } else if (name.indexOf("枝条数") > -1) {
-        eventBus.emit("change:watermark", "");
-    } else {
-        eventBus.emit("change:watermark", "");
-    }
-}
-
-// 质量详情
-function toggleQualityAcitve() {}
-function toggleQualityAcitve2() {}
-
-function toggleAcitve2 (name){
-    activeOuput.value = name;
-    toggleNamePic(name)
-}
-
-</script>
-
-<style lang="scss" scoped>
-@import "src/styles/index";
-.picture-file {
-    display: flex;
-    .left-img {
-        // min-width: 500px;
-        width: 782px;
-        height: 580px;
-    }
-    .compare-l {
-        padding-right: 60px;
-    }
-    .file-wrap {
-        margin-top: 16px;
-        background: url("@/assets/images/home/file-bg-w.png") no-repeat top center / 100% 100%;
-        padding: 12px;
-        .file-title {
-            font-size: 20px;
-            color: #ffd489;
-            .tag {
-                border: 1px solid #FFD489;
-                border-radius: 4px;
-                font-size: 12px;
-                display: inline-block;
-                width: 44px;
-                height: 20px;
-                text-align: center;
-                line-height: 18px;
-                margin-left: 3px;
-                padding: 1px 4px;
-            }
-        }
-        .box-wrap {
-            display: flex;
-            .box-r {
-                padding-left: 40px;
-            }
-        }
-        .overview-file {
-            padding-top: 20px;
-            .box-title {
-                font-size: 16px;
-                padding-left: 13px;
-                margin-bottom: 16px;
-                position: relative;
-                display: flex;
-                justify-content: space-between;
-                color: #fff;
-                &::before {
-                    content: "";
-                    position: absolute;
-                    left: 0;
-                    top: 3px;
-                    width: 3px;
-                    height: 16px;
-                    background: #fff;
-                    border-radius: 11px;
-                }
-            }
-            .title {
-                color: #f3c11d;
-                font-size: 16px;
-                font-family: "PangMenZhengDao";
-                margin-bottom: 20px;
-                .big {
-                    width: 13px;
-                    height: 13px;
-                    margin: -10px 0 0 4px;
-                }
-                .small {
-                    width: 7px;
-                    height: 7px;
-                    margin-left: -3px;
-                }
-            }
-            .base-data {
-                background: rgba(207, 207, 207, 0.1);
-                border-radius: 4px;
-                padding: 6px 0;
-                display: flex;
-                .base-item {
-                    flex: 1;
-                    text-align: center;
-                    padding: 0 4px;
-                    min-width: 50px;
-                    .label {
-                        font-size: 12px;
-                        color: #666666;
-                        width: max-content;
-                        display: block;
-                        margin: 0 auto;
-                        padding-bottom: 2px;
-                    }
-                    .value {
-                        padding-top: 2px;
-                        font-size: 16px;
-                        color: #ffffff;
-                        width: max-content;
-                        margin: 0 auto;
-                        display: block;
-                    }
-                }
-                .base-item + .base-item {
-                    border-left: 1px solid rgba(102, 102, 102, 0.42);
-                }
-            }
-            .list {
-                margin-top: 15px;
-                width: max-content;
-                font-size: 14px;
-                .list-item {
-                    color: #bbbbbb;
-                    display: flex;
-                    margin-bottom: 8px;
-                    .list-name {
-                        color: #f3c11d;
-                        margin-right: 6px;
-                        img {
-                            width: 17px;
-                            height: 13px;
-                        }
-                    }
-                }
-            }
-        }
-        .overview-file + .overview-file {
-            margin-top: 8px;
-        }
-        .box-wrap {
-            display: flex;
-            .box-item {
-                flex: 1;
-                display: flex;
-                flex-direction: column;
-                justify-content: center;
-                align-items: center;
-                padding: 6px 16px;
-                background: rgba(207, 207, 207, 0.1);
-                border-radius: 4px;
-                border: 1px solid rgba(207, 207, 207, 0.1);
-                cursor: pointer;
-                .item-name {
-                    font-size: 12px;
-                    color: #666666;
-                    width: max-content;
-                }
-                .item-val {
-                    font-size: 18px;
-                    color: #fff;
-                    width: max-content;
-                    padding-top: 3px;
-                }
-                &.active {
-                    background: rgba(255, 212, 137, 0.16);
-                    border: 1px solid #ffd489;
-                    .item-name {
-                        color: #bbbbbb;
-                    }
-                }
-            }
-            .box-item + .box-item {
-                margin-left: 8px;
-            }
-        }
-    }
-}
-</style>
-<style lang="scss">
-.picture-preview-wrap {
-    background: none;
-}
-</style>

+ 0 - 268
src/views/home/album_compoents/detailDailog.vue

@@ -1,268 +0,0 @@
-<template>
-    <el-dialog v-model="winDialogVisible" lock-scroll modal-class="album-detail-modal" :showClose="false" width="90%" align-center>
-        <div>
-            <div class="congratulation-wrap">
-                <div class="congratulation-box">
-                    <div class="win-des">
-                        <!-- <img src="@/assets/img/weather_index/box-top.png" class="win-icon" /> -->
-                    </div>
-                    <div class="album-detail-box">
-                        <div class="detail-title">{{ dialogData.farmWorkName }}</div>
-                        <div class="detail-desc-box">
-                            <div class="desc-item">
-                                <span class="item-name">触发条件</span>
-                                {{ dialogData.condition }}
-                            </div>
-                            <div class="desc-item">
-                                <span class="item-name">农事编号</span>
-                                {{ dialogData.code }}
-                            </div>
-                            <div class="desc-item">
-                                <div v-if="dialogData.status === 2">
-                                    <span class="item-name">推荐时间</span>
-                                    {{ dialogData.solarName }}
-                                </div>
-                                <div v-if="dialogData.status === 1">
-                                    <span class="item-name">推荐时间</span>
-                                    {{ dialogData.executeDate }}
-                                </div>
-                                
-                                <div v-if="dialogData.status === 0">
-                                    <span class="item-name">{{ dialogData.reCheck ? "复核时间" : "执行时间" }}</span>
-                                    {{ dialogData.executeDate }}
-                                </div>
-                                <!-- <span class="item-name">{{ dialogData.status === 0 ? (dialogData.reCheck ? "复核农事" : "完成农事") : "推荐时间" }}</span>
-                                {{ dialogData.code }} -->
-                            </div>
-                            <div class="desc-item">
-                                <span class="item-name">农事宗旨</span>
-                                {{ dialogData.purpose }}
-                            </div>
-                            <div class="desc-item">
-                                <div class="item-name">药物处方</div>
-                                <div class="item-table">
-                                    <el-table :data="dialogData.pesticideFertilizerList" style="width: 100%" :header-cell-style="{background: '#F5F5F5'}">
-                                        <el-table-column prop="pesticideFertilizerCode" label="功效" width="62">
-                                            <template #default="scope">
-                                                {{scope.row.typeName}}
-                                            </template>
-                                        </el-table-column>
-                                        <el-table-column prop="name" label="名称" />
-                                        <!-- <el-table-column prop="ratio" label="配比" width="50">
-                                            <template #default="scope">
-                                                {{scope.row.ratio ? scope.row.ratio : "--"}}
-                                            </template>
-                                        </el-table-column> -->
-                                        <el-table-column prop="ratio" label="方式" width="62">
-                                            <template #default="scope">
-                                                {{scope.row.ratio ? "人工" : "人工"}}
-                                            </template>
-                                        </el-table-column>
-                                    </el-table>
-                                </div>
-                            </div>
-
-                            <div class="card-link">
-                                <img src="@/assets/img/weather_index/expert-icon.png" />
-                                <div class="expert-name">
-                                    {{ dialogData.expertName }}
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-
-            <div class="close-btn">
-                    <!-- <el-icon size="32" color="#fff"><CircleCloseFilled /></el-icon> -->
-                    <el-button type="primary" class="one-btn" @click="toShare"> 立即分享 </el-button>
-            </div>
-        </div>
-        <template #footer>
-            <div class="dialog-footer">
-                <div class="close-btn">
-                    <!-- <el-icon size="32" color="#fff"><CircleCloseFilled /></el-icon> -->
-                    <!-- <el-button type="primary" class="one-btn" @click="toShare"> 立即分享 </el-button> -->
-                </div>
-            </div>
-        </template>
-    </el-dialog>
-</template>
-<script setup>
-import { ref } from "vue";
-import eventBus from "@/api/eventBus";
-import wx from "weixin-js-sdk";
-import { useRoute, useRouter } from "vue-router";
-
-const winDialogVisible = ref(false);
-
-const route = useRoute();
-const sampleId = route.query.sampleId
-const farmId = route.query.farmId;
-
-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,
-    };
-    winDialogVisible.value = true;
-};
-eventBus.on("detailDialog:showDialog", (data) => {
-    showDialog(data)
-});
-
-const toShare = () => {
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(currentCard.value)}&type=album`,
-    });
-}
-</script>
-
-<style lang="less" scoped>
-.congratulation-wrap {
-    border-radius: 12px;
-    background: #f4f5f4;
-}
-.close-btn {
-    text-align: center;
-    margin-top: 20px;
-}
-.congratulation-box {
-    border-radius: 12px;
-    background: url("@/assets/img/weather_index/box-top.png") no-repeat top center /contain;
-    .el-message-box__message {
-        padding: 12px 0 24px 0;
-    }
-    .win-title {
-        color: #1d1e1f;
-        font-family: "PangMenZhengDao", sans-serif; /* 使用自定义字体 */
-        text-align: center;
-        font-size: 24px;
-        line-height: 32px;
-    }
-    .win-detail {
-        text-align: center;
-        color: #252525;
-        padding-top: 6px;
-        font-size: 16px;
-        span {
-            font-size: 22px;
-            color: #2199f8;
-            padding: 0 6px;
-            font-weight: bold;
-        }
-    }
-    .win-des {
-        height: 205px;
-        text-align: center;
-    }
-    .win-icon {
-        width: 100%;
-        border-radius: 12px 12px 0 0;
-    }
-}
-.album-detail-box {
-    padding: 0 24px 16px 12px;
-    color: #000;
-    position: relative;
-    // top: -58px;
-    .detail-title {
-        font-size: 24px;
-        font-weight: bold;
-        padding-bottom: 8px;
-        letter-spacing: 1.6px;
-    }
-    .detail-desc-box {
-        position: relative;
-        .desc-item {
-            font-size: 14px;
-            .item-name {
-                color: #999999;
-                margin-right: 12px;
-            }
-            .item-table {
-                margin-top: 8px;
-                border: 1px solid rgba(255, 255, 255, 0.6);
-                border-radius: 4px;
-                ::v-deep {
-                    .el-table th.el-table__cell {
-                        padding: 6px 0;
-                    }
-                    .el-table--default .el-table__cell {
-                        padding: 6px 0;
-                    }
-                    .el-table--default .cell {
-                        padding: 0px 6px;
-                    }
-                }
-            }
-        }
-        .desc-item + .desc-item {
-            padding-top: 8px;
-        }
-        .card-link {
-            display: flex;
-            flex-direction: column;
-            align-items: center;
-            justify-content: center;
-            color: #2199f8;
-            font-size: 12px;
-            position: absolute;
-            right: 6px;
-            top: 0px;
-            .expert-name {
-                background: #d3e8ff;
-                border-radius: 4px;
-                padding: 1px 12px;
-                margin-top: 4px;
-                display: flex;
-                align-items: center;
-            }
-            img {
-                width: 62px;
-            }
-            .icon {
-                padding-right: 2px;
-            }
-        }
-    }
-}
-.dialog-footer {
-    position: relative;
-    .close-btn {
-        position: absolute;
-        bottom: -58px;
-        left: 0;
-        right: 0;
-        margin: 0 auto;
-        text-align: center;
-    }
-}
-</style>
-
-<style lang="less">
-.album-detail-modal {
-    .el-overlay-dialog {
-        .el-dialog {
-            padding: 0;
-            border-radius: 12px;
-            background: none;
-            box-shadow: none;
-            .el-dialog__header {
-                padding: 0;
-            }
-        }
-
-        .one-btn {
-            width: 210px;
-            height: 40px;
-            line-height: 40px;
-        }
-    }
-}
-</style>

+ 0 - 284
src/views/home/album_compoents/utils.js

@@ -1,284 +0,0 @@
-/**
- * 在矩形内绘制矩形
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {number} startXPercent - 内部矩形起始点横坐标,范围从 0 到 100
- * @param {number} startYPercent - 内部矩形起始点纵坐标,范围从 0 到 100
- * @param {number} widthPercent - 内部矩形宽度,范围从 0 到 100
- * @param {number} heightPercent - 内部矩形高度,范围从 0 到 100
- * @param {string} color - 填充颜色,可选参数,默认为黑色
- */
- const drawRectInRect = (ctx, rect, startXPercent, startYPercent, widthPercent, heightPercent, color = 'black') => {
-    // 计算内部矩形的起始坐标
-    const startX = rect.x + (startXPercent / 100) * rect.width;
-    const startY = rect.y + (startYPercent / 100) * rect.height;
-    // 计算内部矩形的宽度和高度
-    const width = (widthPercent / 100) * rect.width;
-    const height = (heightPercent / 100) * rect.height;
-    ctx.fillStyle = color; // 设置填充颜色
-    ctx.fillRect(startX, startY, width, height); // 绘制矩形
-    return { x:startX, y:startY, width, height };
-};
-
-
-
-/**
- * 在矩形内绘制文本
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {string} text - 要绘制的文本
- * @param {number} startXPercent - 文字起始横坐标,范围从 0 到 100
- * @param {number} startYPercent - 文字起始纵坐标,范围从 0 到 100
- * @param {number} fontSizePercent - 文字大小,范围从 0 到 100,基于矩形高度
- */
-const drawTextInRect = (ctx, rect, text, startXPercent, startYPercent, fontSizePercent) => {
-    // 计算文字起始坐标
-    const startX = rect.x + (startXPercent / 100) * rect.width;
-    const startY = rect.y + (startYPercent / 100) * rect.height;
-
-    // 计算文字大小
-    const fontSize = (fontSizePercent / 100) * rect.height;
-    ctx.font = `${fontSize}px sans-serif`; // 设置字体样式
-    ctx.fillText(text, startX, startY);
-};
-
-/**
- * 在矩形内绘制线
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {number} startXPercent - 起始点横坐标,范围从 0 到 100
- * @param {number} startYPercent - 起始点纵坐标,范围从 0 到 100
- * @param {number} endXPercent - 结束点横坐标,范围从 0 到 100
- * @param {number} endYPercent - 结束点纵坐标,范围从 0 到 100
- * @param {string} color - 线条颜色,可选参数,默认为黑色
- * @param {number} lineWidth - 线条宽度,可选参数,默认为1像素
- */
-const drawLineInRect = (ctx, rect, startXPercent, startYPercent, endXPercent, endYPercent, color = 'black', lineWidth = 1) => {
-    // 计算起始点坐标
-    const startX = rect.x + (startXPercent / 100) * rect.width;
-    const startY = rect.y + (startYPercent / 100) * rect.height;
-
-    // 计算结束点坐标
-    const endX = rect.x + (endXPercent / 100) * rect.width;
-    const endY = rect.y + (endYPercent / 100) * rect.height;
-
-    // 设置线条样式
-    ctx.strokeStyle = color; // 设置线条颜色
-    ctx.lineWidth = lineWidth; // 设置线条宽度
-
-    // 绘制线
-    ctx.beginPath();
-    ctx.moveTo(startX, startY);
-    ctx.lineTo(endX, endY);
-    ctx.stroke();
-};
-
-/**
- * 在矩形内绘制点
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {number} xPercent - 点的横坐标,范围从 0 到 100
- * @param {number} yPercent - 点的纵坐标,范围从 0 到 100
- * @param {string} color - 点的颜色,可选参数,默认为黑色
- * @param {number} radius - 点的半径,可选参数,默认为1像素
- */
-const drawPointInRect = (ctx, rect, xPercent, yPercent, color = 'black', radius = 1) => {
-    // 计算点的坐标
-    const x = rect.x + (xPercent / 100) * rect.width;
-    const y = rect.y + (yPercent / 100) * rect.height;
-
-    // 设置点的样式
-    ctx.fillStyle = color; // 设置点的颜色
-
-    // 开始绘制路径
-    ctx.beginPath();
-    ctx.arc(x, y, radius, 0, Math.PI * 2); // 绘制一个圆
-    ctx.fill(); // 填充圆
-};
-
-/**
- * 在矩形内绘制图片
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {HTMLImageElement} img - 要绘制的图片对象
- * @param {number} imgXPercent - 图片起始横坐标,范围从 0 到 100
- * @param {number} imgYPercent - 图片起始纵坐标,范围从 0 到 100
- * @param {number} imgWidthPercent - 图片宽度百分比,范围从 0 到 100
- * @param {number} imgHeightPercent - 图片高度百分比,范围从 0 到 100
- */
-const drawImageInRect = (ctx, rect, img, imgXPercent, imgYPercent, imgWidthPercent, imgHeightPercent) => {
-    // 计算图片的起始坐标
-    const imgX = rect.x + (imgXPercent / 100) * rect.width;
-    const imgY = rect.y + (imgYPercent / 100) * rect.height;
-    // 计算图片的宽度和高度
-    const imgWidth = (imgWidthPercent / 100) * rect.width;
-    const imgHeight = (imgHeightPercent / 100) * rect.height;
-    // 开始绘制图片
-    ctx.drawImage(img, imgX, imgY, imgWidth, imgHeight);
-};
-
-/**
- * 在矩形内绘制图片,带圆角和白色边框
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {HTMLImageElement} img - 要绘制的图片对象
- * @param {number} imgXPercent - 图片起始横坐标,范围从 0 到 100
- * @param {number} imgYPercent - 图片起始纵坐标,范围从 0 到 100
- * @param {number} imgWidthPercent - 图片宽度百分比,范围从 0 到 100
- * @param {number} imgHeightPercent - 图片高度百分比,范围从 0 到 100
- * @param {number} borderRadius - 圆角半径,以像素为单位
- * @param {number} borderWidth - 边框宽度,以像素为单位
- */
-const drawBorderImageInRect = (ctx, rect, img, imgXPercent, imgYPercent, imgWidthPercent, imgHeightPercent, borderRadius, borderWidth) => {
-    // 计算图片的起始坐标
-    const imgX = rect.x + (imgXPercent / 100) * rect.width + borderWidth;
-    const imgY = rect.y + (imgYPercent / 100) * rect.height + borderWidth;
-    // 计算图片的宽度和高度
-    const imgWidth = (imgWidthPercent / 100) * rect.width - 2 * borderWidth;
-    const imgHeight = (imgHeightPercent / 100) * rect.height - 2 * borderWidth;
-
-    // 保存画布状态
-    ctx.save();
-
-    // 开始绘制圆角矩形的边框
-    ctx.beginPath();
-    ctx.moveTo(imgX + borderRadius, imgY);
-    ctx.lineTo(imgX + imgWidth - borderRadius, imgY);
-    ctx.arcTo(imgX + imgWidth, imgY, imgX + imgWidth, imgY + borderRadius, borderRadius);
-    ctx.lineTo(imgX + imgWidth, imgY + imgHeight - borderRadius);
-    ctx.arcTo(imgX + imgWidth, imgY + imgHeight, imgX + imgWidth - borderRadius, imgY + imgHeight, borderRadius);
-    ctx.lineTo(imgX + borderRadius, imgY + imgHeight);
-    ctx.arcTo(imgX, imgY + imgHeight, imgX, imgY + imgHeight - borderRadius, borderRadius);
-    ctx.lineTo(imgX, imgY + borderRadius);
-    ctx.arcTo(imgX, imgY, imgX + borderRadius, imgY, borderRadius);
-    ctx.closePath();
-
-    // 设置边框颜色和宽度
-    ctx.strokeStyle = 'white';
-    ctx.lineWidth = borderWidth;
-    ctx.stroke();
-
-    // 开始绘制圆角矩形的填充(可选,如果需要背景)
-    // ctx.fillStyle = 'transparent'; // 或者设置其他背景颜色
-    // ctx.fill();
-
-    // 开始裁剪
-    ctx.clip();
-
-    // 绘制图片
-    ctx.drawImage(img, imgX, imgY, imgWidth, imgHeight);
-
-    // 恢复画布状态
-    ctx.restore();
-};
-
-/**
- * 在矩形内绘制横向文本列表
- * @param {CanvasRenderingContext2D} ctx - 画布的上下文
- * @param {Object} rect - 矩形范围,包含 { x, y, width, height },以像素为单位
- * @param {Array<string>} texts - 要绘制的文本数组
- * @param {number} fontSizePercent - 文字大小,范围从 0 到 100,基于矩形高度
- * @param {number} startXPercent - 文字起始横坐标,范围从 0 到 100,基于矩形宽度
- * @param {number} startYPercent - 文字起始纵坐标,范围从 0 到 100,基于矩形高度
- * @param {number} columnSpacingPercent - 列间距,范围从 0 到 100,基于矩形宽度
- * @param {string} columnSeparator - 列间隔字符,默认为空字符串
- * @param {number} columnSeparatorWidthPercent - 列间隔字符的宽度百分比,范围从 0 到 100,基于矩形宽度
- * @param {number} separatorFontSizePercent - 分隔符字号大小,范围从 0 到 100,基于矩形高度
- * @param {string} separatorColor - 分隔符颜色,默认为黑色
- * @param {number} separatorMarginLeftPercent - 分隔符左边的边距,范围从 0 到 100,基于矩形宽度
- * @param {number} separatorMarginRightPercent - 分隔符右边的边距,范围从 0 到 100,基于矩形宽度
- */
-const drawHorizontalTextList = (ctx, rect,color='white', texts, fontSizePercent, startXPercent = 0, startYPercent = 50, columnSpacingPercent = 0, columnSeparator = '', columnSeparatorWidthPercent = 0, separatorFontSizePercent = fontSizePercent, separatorColor = 'black', separatorMarginLeftPercent = 0, separatorMarginRightPercent = 0) => {
-    // 计算文字大小
-    const fontSize = (fontSizePercent / 100) * rect.height;
-    ctx.font = `${fontSize}px sans-serif`; // 设置字体样式
-
-    // 计算文字的总宽度
-    let totalTextWidth = 0;
-    texts.forEach(text => {
-        totalTextWidth += ctx.measureText(text).width;
-    });
-
-    // 计算分隔符的字体大小
-    const separatorFontSize = (separatorFontSizePercent / 100) * rect.height;
-
-    // 计算分隔符的总宽度
-    ctx.font = `${separatorFontSize}px sans-serif`; // 设置分隔符字体样式
-    const separatorWidth = (columnSeparatorWidthPercent / 100) * rect.width;
-    const totalSeparatorWidth = (texts.length - 1) * separatorWidth;
-
-    // 计算分隔符的左右边距
-    const separatorMarginLeft = (separatorMarginLeftPercent / 100) * rect.width;
-    const separatorMarginRight = (separatorMarginRightPercent / 100) * rect.width;
-
-    // 计算可用的总间距
-    const totalSpacing = (columnSpacingPercent / 100) * rect.width;
-
-    // 计算所有文字和间隔字符以及间距的总宽度
-    const totalWidth = totalTextWidth + totalSeparatorWidth + totalSpacing + (texts.length - 1) * (separatorMarginLeft + separatorMarginRight);
-
-    // 计算实际的起始坐标,使得文本和间隔字符居中于矩形
-    const startX = rect.x + (startXPercent / 100) * rect.width + (rect.width - totalWidth) / 2;
-    const startY = rect.y + (startYPercent / 100) * rect.height - (fontSize / 2); // 绘制文字,纵坐标居中
-
-    // 绘制文本和间隔字符
-    let currentX = startX;
-    texts.forEach((text, index) => {
-        ctx.font = `${fontSize}px sans-serif`; // 设置文字字体样式
-        ctx.fillStyle = color; // 设置文字颜色
-        ctx.fillText(text, currentX, startY + (fontSize / 2)); // 绘制文字,纵坐标居中
-        currentX += ctx.measureText(text).width;
-
-        // 如果不是最后一列,则绘制间隔字符
-        if (index < texts.length - 1) {
-            // 添加左边距
-            currentX += separatorMarginLeft;
-
-            // 设置分隔符颜色和字体样式
-            ctx.fillStyle = separatorColor;
-            ctx.font = `${separatorFontSize}px sans-serif`;
-
-            // 绘制分隔符
-            ctx.fillText(columnSeparator, currentX, startY + (separatorFontSize / 2));
-
-            // 添加右边距
-            currentX += separatorWidth + separatorMarginRight + columnSpacingPercent / 100 * rect.width;
-        }
-    });
-};
-
-
-function drawTargetRectangles(ctx, obj, originalWidth, originalHeight, imgWidth, imgHeight) {
-    // 计算缩放比例
-    const scaleX = imgWidth / originalWidth;
-    const scaleY = imgHeight / originalHeight; // 假设实际宽度和高度缩放比例相同,如果需要不同,请传入actualHeight并计算scaleY
-    let targetRectangles = obj.cor;
-    let color = obj.color;
-    // 遍历每个目标框
-    targetRectangles.forEach(rect => {
-        // 解构出坐标
-        const [x1, y1, x2, y2] = rect;
-
-        // 计算缩放后的新坐标
-        const newX1 = x1 * scaleX;
-        const newY1 = y1 * scaleY;
-        const newX2 = x2 * scaleX;
-        const newY2 = y2 * scaleY;
-
-        // 绘制矩形框
-        ctx.strokeStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`; // 使用你提供的颜色
-        ctx.lineWidth = 2; // 线条宽度可以根据需要调整
-        ctx.strokeRect(newX1, newY1, newX2 - newX1, newY2 - newY1);
-    });
-}
-
-
-
-
-
-
-
-
-
-export { drawTextInRect, drawLineInRect, drawPointInRect ,drawImageInRect,drawBorderImageInRect, drawRectInRect, drawHorizontalTextList, drawTargetRectangles};
-

+ 21 - 0
src/views/home/components/gardenIntroduce.vue

@@ -0,0 +1,21 @@
+<template>
+    <div class="garden-introduce">
+        <div class="introduce-overview">
+            
+        </div>
+    </div>
+</template>
+
+<script setup>
+import {onMounted, ref} from 'vue'
+import eventBus from "@/api/eventBus";
+
+
+onMounted(()=>{
+})
+
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 6 - 119
src/views/home/components/homePage.vue

@@ -1,119 +1,8 @@
 <template>
     <div class="chart-list">
         <div class="chart-item weather-item">
-            <chart-box name="气象预警">
-                <!-- <template #title-right>
-                    <div class="button" @click="gybg">果园报告</div>
-                </template> -->
-                <div class="base-wrap">
-                    <div class="base-item" v-for="(item, index) in baseData.labels" :key="index">
-                        <div class="label">{{ item }}风险</div>
-                        <div class="value">{{ baseData.valueMaxList[index].toFixed(0) }}<span>%</span></div>
-                    </div>
-                </div>
-                <!-- <one-line-chart class="line-chart" :yData="lineYdata" :minData="minData"></one-line-chart> -->
-                <weatherChart class="line-chart"></weatherChart>
-            </chart-box>
-        </div>
-        <!--        <div class="chart-item phenology">-->
-        <!--            <chart-box name="基本指标">-->
-        <!--                <template #title-right>-->
-        <!--                    <tabs :list="btnGroup"></tabs>-->
-        <!--                </template>-->
-        <!--                &lt;!&ndash; <bar-chart class="bar-chart" styleName="styleName3" :xData="phenologyXData" :yData="phenologyYData"></bar-chart>-->
-        <!--                  <div class="tips box-bg">-->
-        <!--                  <div class="text" v-for="item in 3" :key="item">-->
-        <!--                    桂味:<span>占比30%,分布在2区、5区</span>-->
-        <!--                  </div>-->
-        <!--                </div> &ndash;&gt;-->
-        <!--                <div class="box-flex">-->
-        <!--                    <div class="box-card">-->
-        <!--                        <div class="box-desc">当前分区无品种信息,请确权</div>-->
-        <!--                        <div class="box-button" @click="handlePage">立即确权</div>-->
-        <!--                    </div>-->
-        <!--                </div>-->
-        <!--            </chart-box>-->
-        <!--        </div>-->
-        <!-- <div class="chart-item phenology">
-            <chart-box name="物候指标">
-                <template #title-right>
-                    <tabs :list="phenologyObj.btnGroup" keyStr="物候指标" :active="activeKey"></tabs>
-                </template>
-                <bar-chart
-                    class="bar-chart"
-                    styleName="styleName1"
-                    :xData="phenologyObj.xData"
-                    :yData="phenologyObj.yData"
-                ></bar-chart>
-                <div class="tips box-bg">
-                    <div class="text" v-for="(item, index) in phenologyObj.text" :key="index">
-                        {{ item[0] }}:<span>{{ item[1] }}{{ item[2] }},占比{{ item[3] }}%</span>
-                    </div>
-                </div>
-            </chart-box>
-        </div> -->
-        <div class="chart-item phenology">
-            <chart-box name="生态指标">
-                <template #title-right>
-                    <tabs :list="ecologyObj.btnGroup" keyStr="生态指标" :active="activeKey"></tabs>
-                </template>
-                <bar-chart
-                    class="bar-chart"
-                    styleName="styleName1"
-                    :xData="ecologyObj.xData"
-                    :yData="ecologyObj.yData"
-                ></bar-chart>
-                <div class="tips box-bg">
-                    <div class="text" v-for="(item, index) in ecologyObj.text" :key="index">
-                        {{ item.key }}:<span>{{ item.val }}</span>
-                    </div>
-                </div>
-            </chart-box>
-        </div>
-        <div class="chart-item evaluate">
-            <chart-box name="生长指标">
-                <template #title-right>
-                    <tabs :list="growObj.btnGroup" keyStr="生长指标" :active="activeKey"></tabs>
-                </template>
-                <div class="content">
-                    <bar-chart
-                        style="width: 52%"
-                        styleName="styleName1"
-                        :xData="growObj.xData"
-                        :yData="growObj.yData"
-                    ></bar-chart>
-                    <div class="box-bg text" v-for="(item, index) in growObj.text" :key="index">
-                        <div class="txt">
-                            {{ item.key }}:<span>{{ item.val }}</span>
-                        </div>
-                    </div>
-                </div>
-                <!-- <div class="text-list box-bg">
-                    <div class="text-item" v-for="(item, index) in growObj.text" :key="index">
-                        <div class="circle"></div>
-                        <div class="txt">
-                            {{ item.key }}:<span>{{ item.val }}</span>
-                        </div>
-                    </div>
-                </div> -->
-            </chart-box>
-        </div>
-        <div class="chart-item phenology">
-            <chart-box name="病虫指标">
-                <template #title-right>
-                    <tabs :list="diseasesObj.btnGroup" keyStr="病虫指标" :active="activeKey"></tabs>
-                </template>
-                <bar-chart
-                    class="bar-chart"
-                    styleName="styleName1"
-                    :xData="diseasesObj.xData"
-                    :yData="diseasesObj.yData"
-                ></bar-chart>
-                <div class="tips box-bg">
-                    <div class="text" v-for="(item, index) in diseasesObj.text" :key="index">
-                        {{ item.key }}:<span>{{ item.val }}</span>
-                    </div>
-                </div>
+            <chart-box name="果园介绍">
+                <garden-introduce></garden-introduce>
             </chart-box>
         </div>
     </div>
@@ -129,6 +18,7 @@ import oneLineChart from "@/components/charts/oneLineChart.vue";
 import eventBus from "@/api/eventBus";
 import { useStore } from "vuex";
 import { useRouter } from "vue-router";
+import gardenIntroduce from "../components/gardenIntroduce.vue";
 const store = useStore();
 const router = useRouter();
 
@@ -277,9 +167,9 @@ const gybg = () => {
 
 <style lang="scss" scoped>
 .chart-list {
-    width: calc(100% - 54px - 10px);
+    width: calc(100%);
     height: 100%;
-    padding: 8px 8px 8px 0;
+    // padding: 8px;
     box-sizing: border-box;
     position: relative;
     overflow-y: auto;
@@ -287,12 +177,9 @@ const gybg = () => {
     .chart-item {
         width: 100%;
         // height: calc(100% / 4.15);
-        height: 228px;
+        height: 100%;
         box-sizing: border-box;
         margin-bottom: 10px;
-        &.weather-item {
-            height: 260px;
-        }
         .box-flex {
             width: 100%;
             height: 100%;

+ 16 - 120
src/views/home/index.vue

@@ -4,87 +4,30 @@
         <div class="content">
             <navigation @handleTab="handleTab"></navigation>
             <div class="left yes-events">
-                <tool-list direction="left" :list="leftToolList" @handleActive="handleActiveLeft"></tool-list>
+                <!-- <tool-list direction="left" :list="leftToolList" @handleActive="handleActiveLeft"></tool-list> -->
                 <component :is="components[currentComponent]" />
                 <!-- 箭头 -->
-                <div class="arrow" @click="handleShrink('left')">
+                <!-- <div class="arrow" @click="handleShrink('left')">
                     <el-icon class="icon" color="#141414"><DArrowLeft /></el-icon>
-                </div>
-            </div>
-            <div class="home-bottom">
-                <!-- <time-line class="time-wrap yes-events"></time-line>
-        <img class="fly-icon" src="@/assets/images/home/fly-icon.png" alt=""> -->
-                <!-- <div class="log-box yes-events">
-          <chart-box class="overflow">
-            <template #title-name>
-              <div class="box-name" @click="handleSelectArea">果园日志</div>
-            </template>
-            <div class="log-content">
-              2月13日,共抽样193棵树,拍摄了193张照片,{{indicatorChartData.content}}
-            </div>
-            <div class="chart-wrap">
-              <indicator-chart :key="0 + 'log'" type="feature" :chartData="indicatorChartData"></indicator-chart>
-            </div>
-          </chart-box>
-        </div> -->
-                <!-- <div class="file-box yes-events">
-                    <chart-box name="果园档案">
-                        <template #title-right>
-                        <el-icon class="arrow-icon cursor-pointer" color="#141414"
-                            ><DArrowLeft
-                        /></el-icon>
-                        <div class="edit-btn cursor-pointer" @click="toFilePage">编辑</div>
-                        </template>
-                        <file-bar></file-bar>
-                    </chart-box>
                 </div> -->
+            </div>
+            <!-- <div class="home-bottom">
                 <div class="garden-file yes-events" :class="{ isShrink: isShrink }">
                     <home-file></home-file>
-                    <!-- 箭头 -->
                     <div class="arrow" @click="handleShrink('bottom')">
                         <el-icon class="icon" color="#141414"><DArrowLeft /></el-icon>
                     </div>
                 </div>
-            </div>
+            </div> -->
             <div class="right yes-events">
                 <div class="list album-r">
-                    <chart-box name="农事列表" arrow="arrow-left" :class="{ 'list-wrap': rightIndex === 0 }">
+                    <chart-box name="认养管理" arrow="arrow-left" :class="{ 'list-wrap': rightIndex === 0 }">
                         <template v-if="rightIndex === 0">
-                            <album></album>
-                            <!-- <img class="tabs" src="@/assets/images/home/ns-tabs.png" alt="">
-              <div class="img-box">
-                <img @click="handleAct(item)" v-for="item in 2" :key="item" :src="require(`@/assets/images/home/0${act<=2&&act==item?item+'-act':item}.png`)" alt="">
-              </div> -->
-                        </template>
-                        <template v-if="rightIndex === 1">
-                            <div class="img-box1">
-                                <img src="@/assets/images/home/fh01.png" alt="" />
-                                <img src="@/assets/images/home/fh02.png" alt="" />
-                            </div>
-                        </template>
-                        <template v-if="rightIndex === 2">
-                            <div class="btn-wrap">
-                                <div :class="{ active: btnIndex === 0 }" @click="handleBtn(0)">
-                                    {{ btnIndex === 0 && btnName != "" ? "采样分区:" + btnName : "选择采样分区" }}
-                                </div>
-                                <div :class="{ active: btnIndex === 1 }" @click="handleBtn(1)">
-                                    {{ btnIndex === 1 && btnName != "" ? "单树编号:" + btnName : "选择树" }}
-                                </div>
-                            </div>
-                            <div class="img-box2" v-show="showPoint">
-                                <img v-if="showType === 'point'" src="@/assets/images/home/line-chart.png" alt="" />
-                                <img v-else src="@/assets/images/home/line-chart2.png" alt="" />
-                                <img src="@/assets/images/home/fh01.png" alt="" />
-                            </div>
-                            <div class="img-box2" v-show="!showPoint">
-                                <img v-if="showType === 'point'" src="@/assets/images/home/line-chart1.png" alt="" />
-                                <img v-else src="@/assets/images/home/line-chart3.png" alt="" />
-                                <img src="@/assets/images/home/fh02.png" alt="" />
-                            </div>
+                            <!-- <album></album> -->
                         </template>
                     </chart-box>
                 </div>
-                <tool-list direction="right" :list="rightToolList" @handleActive="handleActiveRight"></tool-list>
+                <!-- <tool-list direction="right" :list="rightToolList" @handleActive="handleActiveRight"></tool-list> -->
             </div>
 
             <!-- 图例 -->
@@ -122,55 +65,6 @@
     <album-carousel></album-carousel>
     <PdfDialog title="果园报告"></PdfDialog>
 
-    <!-- 对比 -->
-    <compareDialog></compareDialog>
-
-    <div class="compare-start-btn yes-events" v-show="showCompareBtn" @click="showCompare">
-        <img src="@/assets/images/home/compare-btn.png" alt="" />
-    </div>
-
-    <!-- 果树档案 -->
-    <div class="file-wrap map-file" id="popup-file">
-        <div class="file-title">
-            <img src="@/assets/images/common/chart-yellow.png" alt="" />
-            果树档案
-            <span id="tag-nh" class="tag">小农户</span>
-        </div>
-        <div class="overview-file">
-            <div class="box-title">总体档案</div>
-            <div class="base-data" id="file-overview">
-            </div>
-            <div class="list" id="file-text">
-                <div class="list-item" v-for="item in photoList" :key="item.key">
-                    <div class="list-name">
-                        <img src="@/assets/images/common/title-icon.png" alt="" />
-                        {{ item.key }}
-                    </div>
-                    {{ item.statement }}
-                </div>
-            </div>
-        </div>
-
-        <div class="overview-file">
-            <div class="box-title">产量信息</div>
-            <div class="box-wrap" id="file-output">
-                <div class="box-item">
-                    <div class="item-name"></div>
-                    <div class="item-val"></div>
-                </div>
-            </div>
-        </div>
-
-        <div class="overview-file">
-            <div class="box-title">生态评估</div>
-            <div class="box-wrap" id="file-quality">
-                <div class="box-item">
-                    <div class="item-name"></div>
-                    <div class="item-val"></div>
-                </div>
-            </div>
-        </div>
-    </div>
 </template>
 
 <script setup>
@@ -195,9 +89,9 @@ import { useStore } from "vuex";
 import RegionLayer from "./map/regionLayer";
 import BlueRegionLayer from "./map/blueRegionLayer";
 import eventBus from "@/api/eventBus";
-import AlbumCarousel from "./album_compoents/albumCarousel.vue";
-import compareDialog from "./album_compoents/compareDialog.vue";
-import album from "./album/index.vue";
+// import AlbumCarousel from "./album_compoents/albumCarousel.vue";
+// import compareDialog from "./album_compoents/compareDialog.vue";
+// import album from "./album/index.vue";
 import PdfDialog from "../../components/PdfDialog";
 let store = useStore();
 const components = {
@@ -667,7 +561,7 @@ const photoList = ref([
         box-sizing: border-box;
         .left,
         .right {
-            width: calc(376px + 54px);
+            width: 376px;
             height: 100%;
             margin-top: 10px;
             box-sizing: border-box;
@@ -678,6 +572,7 @@ const photoList = ref([
             background: #101010;
             border-radius: 4px;
             border: 1px solid #444444;
+            margin-left: 25px;
             .arrow {
                 position: absolute;
                 right: -16px;
@@ -692,7 +587,8 @@ const photoList = ref([
             }
         }
         .right {
-            width: calc(376px + 54px + 10px);
+            width: 376px;
+            margin-right: 25px;
             .album-r {
                 .list-wrap {
                     width: 375px;
@@ -766,7 +662,7 @@ const photoList = ref([
         .home-bottom {
             display: flex;
             align-items: flex-end;
-            width: calc(100% - 60px - 430px * 2);
+            width: calc(100% - 60px - 376px * 2);
             height: 152px;
             align-self: flex-end;
             .time-wrap {

+ 0 - 481
src/views/varietyMap/index.vue

@@ -1,481 +0,0 @@
-<template>
-    <div class="base-container">
-        <fnHeader :hideSwitch="true" :hideShadow="true" showDate></fnHeader>
-        <div class="content">
-            <div class="content-left">
-                <div class="btn" @click="goBack">
-                    <img src="@/assets/images/common/back-icon.png" alt="" />
-                    返回
-                </div>
-                <chart-box class="left-cont" name="品种列表" color="yellow">
-                    <div class="box">
-                        <div class="add-cont" v-if="baseData.length === 0">
-                            <div>暂无数据</div>
-                            <div class="tips-text">请先添加品种,再框选右侧区域,进行品种确权</div>
-                            <div class="button" @click="handleAdd">
-                                <el-icon class="icon"><Plus /></el-icon>
-                                添加品种
-                            </div>
-                        </div>
-                        <template v-else>
-                            <div class="box-item" v-for="item in baseData" :key="item.speciesItemId">
-                                <div>
-                                    <div class="circle" :style="{background:item.color}"></div>
-                                    {{ item.speciesItemName }}
-                                </div>
-                                <span>{{ item.sampleCount||0 }}颗</span>
-                            </div>
-                            <div class="button" @click="handleAdd">
-                                <el-icon class="icon"><Plus /></el-icon>
-                                添加品种
-                            </div>
-                        </template>
-                    </div>
-                </chart-box>
-            </div>
-            <div class="content-right">
-                <div class="map-header">
-                    <div class="title">
-                        <img src="@/assets/images/common/area-icon.png" alt="" />
-                        品种确权
-                    </div>
-                    <div class="button-group">
-                        <div class="button" @click="handleClear">清除框选</div>
-                        <div class="button start" @click="handleStart">开始框选</div>
-                        <div class="button end" @click="handleEnd">结束框选</div>
-                    </div>
-                </div>
-                <div class="map">
-                    <my-map ref="mapRef"></my-map>
-                    <div class="checkbox-list">
-                        <span class="text">全部设置为</span>
-                        <el-checkbox-group
-                            class="checkbox"
-                            v-model="checkedCities"
-                            :min="1"
-                            @change="handleCheckedCitiesChange"
-                        >
-                            <el-checkbox v-for="item in baseData" :key="item.speciesItemId" :value="item.speciesItemId">
-                                {{ item.speciesItemName }}
-                            </el-checkbox>
-                        </el-checkbox-group>
-                        <div class="add" @click="handleAdd">
-                            <el-icon class="icon"><Plus /></el-icon>
-                            添加品种
-                        </div>
-                    </div>
-                    <div class="footer-btn">
-                        <div class="cancel" @click="handleCancel">取消</div>
-                        <div @click="handleSave">保存</div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-    <!-- 添加品种弹窗 -->
-    <el-dialog
-        v-model="dialogVisible"
-        body-class="custom-dialog"
-        title="添加品种"
-        width="500"
-        align-center
-        :before-close="handleClose"
-    >
-        <el-select v-model="input" size="large" placeholder="请选择品种名称">
-            <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" />
-        </el-select>
-        <template #footer>
-            <div class="dialog-footer">
-                <div class="btn" @click="handleClose">取消</div>
-                <div @click="handleOk">确定</div>
-            </div>
-        </template>
-    </el-dialog>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import { ElMessage } from "element-plus";
-import fnHeader from "@/components/fnHeader.vue";
-import myMap from "./map";
-import chartBox from "@/components/chartBox.vue";
-import { useRouter, useRoute } from "vue-router";
-import { useStore } from "vuex";
-import eventBus from "@/api/eventBus";
-const store = useStore();
-
-const router = useRouter();
-const route = useRoute();
-const farmId = sessionStorage.getItem("farmId");
-onMounted(() => {
-    getList();
-    getSpeciesData();
-});
-
-
-//清除框选
-const handleClear = () => {
-    eventBus.emit("handle:clear");
-};
-
-//开始框选
-const handleStart = () => {
-    eventBus.emit("handle:start");
-};
-
-//结束框选
-const handleEnd = () => {
-    eventBus.emit("handle:end");
-};
-
-const baseData = ref([]);
-const getList = () => {
-    const params = {
-        farmId,
-        regionId: sessionStorage.getItem("regionId"),
-    };
-    VE_API.variety.speciesItemList(params).then((res) => {
-        baseData.value = res.data || []
-        eventBus.emit('species:list',res.data)
-    });
-};
-
-const checkedCities = ref([]);
-const handleCheckedCitiesChange = (e) => {
-    if(e.length){
-        checkedCities.value = [e[e.length -1]];
-    }
-};
-
-const mapRef = ref(null)
-const handleSave = () =>{
-    const selectPoint = mapRef.value.getSelectPoint()
-    const params = selectPoint.map(item =>{
-        return {
-            id:item.id,
-            speciesItemId:checkedCities.value[0]
-        }
-    })
-    if(params.length===0) return ElMessage.warning('请选择最少一棵树')
-    if(checkedCities.value.length===0) return ElMessage.warning('请选择品种')
-    VE_API.variety.updateSpeciesItem(params).then(res =>{
-        if(res.code===0){
-            getList()
-            checkedCities.value = []
-            ElMessage.success('添加成功')
-        }
-    })
-}
-
-const handleCancel = () =>{
-    checkedCities.value = []
-    eventBus.emit('handle:clear')
-}
-
-const goBack = () => {
-    router.go(-1);
-};
-
-//添加品种弹窗
-const dialogVisible = ref(false);
-const input = ref("");
-const options = ref([])
-const handleAdd = () => {
-    dialogVisible.value = true;
-};
-// 获取品种列表----下拉框
-const getSpeciesData = () => {
-    VE_API.variety.speciesData({ farmId }).then(res =>{
-        options.value = res.data || []
-    });
-};
-
-const handleClose = () => {
-    dialogVisible.value = false;
-    input.value = "";
-}
-
-const handleOk = () =>{
-    const arr = options.value.filter(item =>item.id === input.value)
-    baseData.value.push({
-        ...arr[0],
-        speciesItemId:arr[0].id,
-        speciesItemName:arr[0].name,
-    })
-    handleClose()
-};
-</script>
-
-<style lang="scss" scoped>
-.base-container {
-    width: 100%;
-    height: 100vh;
-    color: #fff;
-    position: relative;
-    box-sizing: border-box;
-    z-index: 1;
-    background: #000;
-
-    .content {
-        width: 100%;
-        height: calc(100% - 74px);
-        display: flex;
-        justify-content: space-between;
-        box-sizing: border-box;
-        padding: 20px;
-        .content-left {
-            width: 473px;
-            height: 100%;
-            box-sizing: border-box;
-            .btn {
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                border: 1px solid rgba(255, 255, 255, 0.78);
-                border-radius: 4px;
-                padding: 9px;
-                margin-bottom: 13px;
-                width: 104px;
-                cursor: pointer;
-                img {
-                    width: 14px;
-                    margin-right: 5px;
-                }
-            }
-            .left-cont {
-                width: 100%;
-                height: calc(100% - 48px - 4px);
-                .box {
-                    width: 100%;
-                    height: calc(100% - 58px);
-                    padding: 16px 12px;
-                    box-sizing: border-box;
-                    overflow-y: auto;
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    .button {
-                        color: #ffd489;
-                        display: flex;
-                        align-items: center;
-                        justify-content: center;
-                        border-radius: 8px;
-                        border: 1px solid #ffd489;
-                        padding: 8px 16px;
-                        background: rgba(255, 212, 137, 0.1);
-                        margin-top: 24px;
-                        width: 120px;
-                        font-size: 16px;
-                        box-sizing: border-box;
-                        cursor: pointer;
-                        .icon {
-                            margin-right: 4px;
-                        }
-                    }
-                    .add-cont {
-                        display: flex;
-                        flex-direction: column;
-                        align-items: center;
-                        font-size: 16px;
-                        .tips-text {
-                            width: 220px;
-                            text-align: center;
-                            color: #9f9f9f;
-                            font-size: 15px;
-                            margin-top: 8px;
-                        }
-                    }
-                    .box-item {
-                        width: 94%;
-                        display: flex;
-                        align-items: center;
-                        justify-content: space-between;
-                        border-radius: 5px;
-                        border: 1px solid #666666;
-                        padding: 12px;
-                        .circle{
-                            border-radius: 50%;
-                            border: 1px solid #fff;
-                            width: 11px;
-                            height: 11px;
-                            margin-right: 7px;
-                        }
-                        div {
-                            font-size: 18px;
-                            display: flex;
-                            align-items: center;
-                        }
-                        span {
-                            color: #9f9f9f;
-                        }
-                    }
-                    .box-item + .box-item{
-                        margin-top: 12px;
-                    }
-                }
-            }
-        }
-        .content-right {
-            width: calc(100% - 473px - 18px);
-            margin-left: 18px;
-            height: 100%;
-            background: #191919;
-            border: 0.6px solid #444444;
-            padding: 20px;
-            box-sizing: border-box;
-            border-radius: 8px;
-            .map-header {
-                display: flex;
-                align-items: flex-start;
-                justify-content: space-between;
-                .title {
-                    font-size: 22px;
-                    display: flex;
-                    align-items: flex-end;
-                    font-family: "PangMenZhengDao";
-                    margin-bottom: 16px;
-                    img {
-                        margin-right: 8px;
-                    }
-                }
-                .button {
-                    color: #fff;
-                    padding: 5px 15px;
-                    border-radius: 4px;
-                    font-size: 16px;
-                    border: 1px solid #fff;
-                    cursor: pointer;
-                }
-            }
-            .button-group{
-                display: flex;
-                div + div{
-                    margin-left: 10px;
-                }
-                .start{
-                    background: #f7be5a;
-                    color: #000;
-                }
-                .end{
-                    color: #f7be5a;
-                }
-            }
-            .map {
-                width: 100%;
-                clip-path: inset(0px round 4px);
-                height: calc(100% - 31px - 16px);
-                position: relative;
-                .checkbox-list {
-                    position: absolute;
-                    z-index: 2;
-                    right: 42px;
-                    bottom: 150px;
-                    background: rgba(0, 0, 0, 0.8);
-                    border-radius: 8px;
-                    display: flex;
-                    flex-direction: column;
-                    padding: 20px;
-                    .text {
-                        color: #9f9f9f;
-                        margin-bottom: 12px;
-                        font-size: 16px;
-                    }
-                    .checkbox {
-                        display: flex;
-                        flex-direction: column;
-                        ::v-deep {
-                            .el-checkbox__label {
-                                color: #fff;
-                                font-size: 16px;
-                            }
-                            .el-checkbox__inner {
-                                width: 18px;
-                                height: 18px;
-                            }
-                            .el-checkbox__input.is-checked .el-checkbox__inner {
-                                background: #ffd489;
-                                border-color: #ffd489;
-                                &::after {
-                                    border-color: #000;
-                                    border-width: 2px;
-                                    height: 10px;
-                                    left: 4px;
-                                    width: 5px;
-                                    top: 0;
-                                }
-                            }
-                        }
-                    }
-                    .add {
-                        margin-top: 12px;
-                        border: 1px solid #fff;
-                        border-radius: 4px;
-                        background: rgba(255, 255, 255, 0.2);
-                        display: flex;
-                        align-items: center;
-                        justify-content: center;
-                        padding: 8px;
-                        cursor: pointer;
-                        .icon {
-                            margin-right: 4px;
-                        }
-                    }
-                }
-                .footer-btn {
-                    position: absolute;
-                    right: 42px;
-                    bottom: 28px;
-                    z-index: 2;
-                    display: flex;
-                    width: 520px;
-                    div {
-                        text-align: center;
-                        width: calc(100% - 20px - 200px);
-                        font-size: 20px;
-                        color: #1d1d1d;
-                        background: #f7be5a;
-                        border-radius: 8px;
-                        border: 2px solid #fff;
-                        padding: 13px;
-                        cursor: pointer;
-                    }
-                    .cancel {
-                        margin-right: 20px;
-                        width: 200px;
-                        background: rgba(0, 0, 0, 0.6);
-                        color: #fff;
-                    }
-                }
-            }
-        }
-    }
-}
-
-.custom-dialog {
-    .el-dialog__body {
-        margin-top: 10px;
-    }
-    .input {
-        width: 100%;
-    }
-}
-.dialog-footer {
-    display: flex;
-    width: 100%;
-    margin-top: 25px;
-    div {
-        flex: 1;
-        padding: 10px;
-        background: #ffd489;
-        border-radius: 5px;
-        color: #1d1d1d;
-        text-align: center;
-        cursor: pointer;
-    }
-    .btn {
-        border: 1px solid #9f9f9f;
-        background: #fff;
-        margin-right: 14px;
-    }
-}
-</style>

+ 0 - 258
src/views/varietyMap/map.vue

@@ -1,258 +0,0 @@
-<template>
-    <div id="map-container"></div>
-</template>
-
-<script setup>
-import { ref, onMounted, onUnmounted } from "vue";
-import AMapLoader from "@amap/amap-jsapi-loader";
-import eventBus from "@/api/eventBus";
-import { convertPointToArray } from "@/utils/index";
-import { deepClone } from "@/common/commonFun";
-import {base_img_url,base_img_url3} from "@/api/config";
-
-const map = ref(null);
-const mouseTool = ref(null);
-const selectedArea = ref(null);
-const selectedPoints = ref([]);
-const allPoints = ref([]);
-const defalutAllPoints = ref([])
-const pointList = ref([])
-
-const mapEventType = ref('rectangle')
-
-// 自定义圆点样式
-const createMarkerContent = (color = 'rgba(0, 0, 0, 0.4)') => {
-    return `
-        <div style="
-            width: 15px;
-            height: 15px;
-            background-color: ${color};
-            border: 1px solid #fff;
-            border-radius: 50%;
-        ">
-        </div>
-    `;
-}
-
-//高亮样式
-const createMarkerImg = () => {
-    return `
-        <img style="width: 38px;height: 38px;" src="${require('@/assets/images/map/status/active-icon.png')}">
-    `;
-}
-// 初始化地图
-const initMap = async () => {
-    try {
-        const AMap = await AMapLoader.load({
-            key: "41769169f0f157e13a197e7eb0dd7b5b", // 替换为你的高德地图 Key
-            version: "2.0", // SDK 版本
-            plugins: ["AMap.MouseTool"], // 加载 MouseTool 插件
-        }).then((AMap) => {
-            // 创建地图实例
-            map.value = new AMap.Map("map-container", {
-                zoom: 18, // 初始缩放级别
-                center: [113.6149629 ,23.58594117],
-                layers: [
-                    // 卫星
-                    new AMap.TileLayer.Satellite(),
-                ],
-            });
-
-            //创建自定义切片图层,指定 getTileUrl 属性
-            var googleLayer = new AMap.TileLayer({
-                tileUrl: base_img_url + 'map/lby/[z]/[x]/[y].png',
-                zIndex:2
-            });
-
-            //将自定义图层添加到地图
-            map.value.add(googleLayer);
-
-            var googleLayer1 = new AMap.TileLayer({
-                tileUrl: base_img_url3 + 'map/lby/[z]/[x]/[y].png',
-                zIndex:2
-            });
-
-            //将自定义图层添加到地图
-            map.value.add(googleLayer1);
-
-            // 初始化 MouseTool
-            mouseTool.value = new AMap.MouseTool(map.value);
-            
-            startRectangleSelection()
-
-            // 监听框选完成事件
-            mouseTool.value.on("draw", (event) => {
-                if(mapEventType.value==='click') return
-                const { obj} = event;
-                if (obj instanceof AMap.Rectangle) {
-                    selectedArea.value = obj;
-                    map.value.remove(selectedArea.value);
-                    checkPointsInArea(); // 检查框选区域内的点位
-                }
-            });
-
-        });
-    } catch (error) {
-        console.error("地图加载失败:", error);
-    }
-};
-
-//重置数据
-const resetData = () =>{
-    allPoints.value = defalutAllPoints.value
-    allPoints.value.forEach(item =>{
-        item.icon.setContent(createMarkerContent(item.color))
-        item.icon.setOffset(new window.AMap.Pixel(-7, -7))
-        item.type = 'defalutIcon'
-    })
-}
-
-//初始化数据
-const initData = () =>{
-    defalutAllPoints.value = []
-    totalList.value.forEach(item => map.value.remove(item.icon))
-    totalList.value = []
-    allPoints.value.forEach(item =>{
-        item.icon = new window.AMap.Marker({
-            position: item.lngLat,
-            map: map.value,
-            content: createMarkerContent(item.color),
-            offset: new window.AMap.Pixel(-7, -7),
-        });
-        item.type = 'defalutIcon'
-
-        // 绑定点击事件
-        item.icon.on('click', () => {
-            mapEventType.value = 'click'
-            if(item.type === 'defalutIcon'){
-                item.icon.setContent(createMarkerImg()); 
-                item.icon.setOffset(new window.AMap.Pixel(-18, -18))
-                item.type = 'activeIcon'
-                const arr = pointList.value.filter(ele => ele.id === item.id)
-                if(arr.length===0){
-                    pointList.value.push(item)
-                }
-            }else{
-                item.icon.setContent(createMarkerContent(item.color)); 
-                item.icon.setOffset(new window.AMap.Pixel(-7, -7))
-                item.type = 'defalutIcon'
-            }
-
-            setTimeout(()=>{
-                mapEventType.value = 'draw'
-            },100)
-        });
-        defalutAllPoints.value.push(item)
-    })
-    map.value.setFitView(null, false, [0, 0, 0, 0]);
-}
-
-// 开始框选
-const startRectangleSelection = () => {
-    if (mouseTool.value) {
-        mouseTool.value.rectangle({
-            strokeColor: "#ffffff", // 框选区域边框颜色
-            strokeOpacity: 1, // 边框透明度
-            strokeWeight: 2, // 边框宽度
-            fillColor: "#000000", // 填充颜色
-            fillOpacity: 0.5, // 填充透明度
-        }); // 启用矩形框选工具
-        map.value.setDefaultCursor("crosshair");
-    }
-};
-
- // 停止绘制矩形
-const stopDrawRectangle = () => {
-    mouseTool.value.close(); // 关闭 mouseTool
-    map.value.setDefaultCursor("default");
-};
-
-// 清除框选
-const clearSelection = () => {
-    if (selectedArea.value) {
-        map.value.remove(selectedArea.value); // 移除框选区域
-        selectedArea.value = null;
-    }
-    resetData()                                                                                                                                                                                                                                                                                                                                      
-    selectedPoints.value = []; // 清空选中的点位
-};
-
-// 检查框选区域内的点位
-const checkPointsInArea = () => {
-    if (!selectedArea.value) return;
-    const bounds = selectedArea.value.getBounds(); // 获取框选区域的边界
-    selectedPoints.value = allPoints.value.filter((point) => {
-        return bounds.contains(point.lngLat); // 判断点位是否在框选区域内
-    });
-    
-    selectedPoints.value.forEach(item =>{
-        if(item.type==='defalutIcon'){
-            item.icon.setContent(createMarkerImg())
-            item.icon.setOffset(new window.AMap.Pixel(-18, -18))
-            item.type = 'activeIcon'
-        }else{
-            item.icon.setContent(createMarkerContent(item.color))
-            item.icon.setOffset(new window.AMap.Pixel(-7, -7))
-            item.type = 'defalutIcon'
-        }
-    })
-};
-
-const speciesArr = ref([])
-const getList = () =>{
-    const params = {
-        farmId:sessionStorage.getItem('farmId'),
-        regionId:sessionStorage.getItem('regionId')
-    }
-    VE_API.variety.pointList(params).then(res =>{
-        allPoints.value = res.data.map(item =>{
-            const bgColor = speciesArr.value.filter(ele =>ele.speciesItemId === item.speciesItemId)
-            return{
-                ...item,
-                color:bgColor[0].color,
-                lngLat:convertPointToArray(item.point)
-            }
-        })
-        initData()
-    })
-}
-
-const totalList = ref([])
-
-function getSelectPoint(){
-    totalList.value = selectedPoints.value.concat(pointList.value)
-    const arr = totalList.value.filter(item =>item.type==='activeIcon')
-    return arr
-}
-
-defineExpose({getSelectPoint})
-
-function getSpeciesList(arr){
-    speciesArr.value = arr
-    getList()
-}
-
-// 组件挂载时初始化地图
-onMounted(() => {
-    initMap()
-    eventBus.on('handle:clear',clearSelection)
-    eventBus.on('species:list',getSpeciesList)
-    eventBus.on('handle:start',startRectangleSelection)
-    eventBus.on('handle:end',stopDrawRectangle)
-});
-
-onUnmounted(()=>{
-    map.value.destroy()// 销毁地图实例以释放资源
-    eventBus.off('handle:clear',clearSelection)
-    eventBus.off('species:list',getSpeciesList)
-    eventBus.off('handle:start',startRectangleSelection)
-    eventBus.off('handle:end',stopDrawRectangle)
-})
-</script>
-
-<style scoped>
-#map-container {
-    width: 100%;
-    height: 100%;
-}
-</style>

+ 1 - 1
src/views/warningHome/index.vue

@@ -51,7 +51,7 @@
             </div>
             <div class="warning-r right yes-events">
                 <!-- <album></album> -->
-                <chat></chat>
+                <!-- <chat></chat> -->
 
                 <!-- 地图图例 -->
                 <div class="map-legend" v-if="legendImg">

+ 0 - 157
src/views/warningHome/map/alarmLayer copy.js

@@ -1,157 +0,0 @@
-import eventBus from "@/api/eventBus";
-import * as KMap from "@/utils/ol-map/KMap";
-import { Vector as VectorSource } from "ol/source.js";
-import Style from "ol/style/Style";
-import { WKT } from 'ol/format'
-import { Fill, Text } from "ol/style";
-import { Feature } from "ol";
-import store from '@/store'
-
-/**
- *
- */
-class AlarmLayer {
-    constructor(kmap) {
-        let that = this;
-        this.kmap = kmap
-        let vectorStyle = new KMap.VectorStyle()
-        this.regionLayer = new KMap.VectorLayer("regionLayer", 3, {
-            source: new VectorSource({}),
-            style: function (f) {
-                let style2 = vectorStyle.getPolygonStyle("#032833" + "30", "#c7cb20", 2)
-                return [style2]
-            }
-        });
-        this.kmap.addLayer(this.regionLayer.layer)
-
-        this.warningLayers = {}
-        // 底图数据
-        eventBus.on("alarmList:warningLayers", (data) => {
-            this.warningLayers = data
-            this.plantLayer1 = this.kmap.addXYZLayer(
-                this.warningLayers["面积"],
-                { minZoom: 6, maxZoom: 22 },
-                99,
-                0.4
-            );
-            this.plantLayer1.layer.setOpacity(0.4)
-
-            this.plantLayer2 = this.kmap.addXYZLayer(
-                this.warningLayers["产量"],
-                { minZoom: 6, maxZoom: 22 },
-                99,
-                0.4
-            );
-            this.plantLayer2.layer.setOpacity(0.4)
-            this.plantLayer3 = ""
-            this.plantLayer4 = ""
-        })
-
-        // 预警底图
-        eventBus.on("alarmList:changeMapLayer", function (url) {
-            console.log('uu', url);
-            that.initLayer("https://birdseye-img.sysuimars.com/map/risk/lby_dwdh/{z}/{x}/{y}.png")
-        })
-        // 种植面积,预估产量,底图切换
-        eventBus.on("warningHome:toggleMapLayer", function (name) {
-            that.togglePlantLayer(name)
-        })
-        // 切换区域广东省or从化区
-        that.areaId = "3"
-        eventBus.on("warningHome:toggleArea", (id) => {
-            that.areaId = id
-            that.changeDistrict(id)
-        })
-        // 时间轴
-        eventBus.on("weatherTime:changeTime", (index) => {
-            console.log('vvv',index);
-            that.toggleSmallLayer(index)
-        })
-    }
-
-    initLayer(layerUrl) {
-        this.lizhiLayer && this.kmap.map.removeLayer(this.lizhiLayer.layer)
-        // 104.3017367175,30.329292136
-        this.lizhiLayer = this.kmap.addXYZLayer(
-            layerUrl,
-            { minZoom: 5, maxZoom: 22 },
-            99,
-            0.4
-        );
-        this.lizhiLayer.layer.setOpacity(0.7)
-        // this.kmap.map.getView().setZoom(18)
-        // this.kmap.map.getView().setCenter([104.3017367175, 30.329292136])
-    }
-
-    togglePlantLayer(name) {
-        const url = this.warningLayers[name]
-        console.log('rrrr', url);
-        // const url = "https://birdseye-img.sysuimars.com/map/szts/{z}/{x}/{y}.png"
-        // console.log('uu', url);
-        // this.plantLayer && this.kmap.map.removeLayer(this.plantLayer.layer)
-        // 104.3017367175,30.329292136
-        // this.plantLayer = this.kmap.addXYZLayer(
-        //     url,
-        //     { minZoom: 6, maxZoom: 22 },
-        //     99,
-        //     0.4
-        // );
-        // this.plantLayer.layer.setOpacity(0.4)
-        if (name === "面积") {
-            this.plantLayer1.layer.setVisible(true)
-            this.plantLayer2.layer.setVisible(false)
-        } else if(name === "产量") {
-            this.plantLayer1.layer.setVisible(false)
-            this.plantLayer2.layer.setVisible(true)
-        }
-        this.kmap.map.getView().setZoom(7.3)
-        this.kmap.map.getView().setCenter([113.679, 23.607])
-        // this.kmap.map.getView().setCenter([113.61702297075017, 23.584863449735067])
-        // this.kmap.map.getView().setCenter([104.3017367175, 30.329292136])
-
-        
-        // this.plantLayer && this.kmap.map.removeLayer(this.plantLayer.layer)
-        // // 104.3017367175,30.329292136
-        // this.plantLayer = this.kmap.addXYZLayer(
-        //     url,
-        //     { minZoom: 5, maxZoom: 22 },
-        //     99,
-        //     0.4
-        // );
-        // this.plantLayer.layer.setOpacity(0.7)
-        // this.kmap.map.getView().setZoom(18)
-        // this.kmap.map.getView().setCenter([104.3017367175, 30.329292136])
-    }
-
-    // 切换地图区域
-    changeDistrict(id) {
-        VE_API.warning.fetchAreaDistrict({ id }).then(({ data }) => {
-            if (data.geom) {
-                let f = new Feature({
-                    geometry: new WKT().readGeometry(data.geom)
-                })
-                this.regionLayer.source.addFeature(f)
-                this.kmap.map.getView().fit(f.getGeometry(), { padding: [180, 150, 100, 150] })
-            }
-            if (id === "3") {
-                this.kmap.map.getView().setZoom(7.2)
-                // const position = store.getters.userinfo.location
-                this.kmap.map.getView().setCenter([113.679, 23.607])
-            }
-        })
-    }
-
-    // 从化区-切换到小范围
-    toggleSmallLayer(index) {
-        if (this.areaId === "3") {
-            // 虚拟果园会播放物候变化
-        }
-        if (this.areaId === "3186") {
-            this.kmap.map.getView().setZoom(12+index)
-            // const position = store.getters.userinfo.location
-            this.kmap.map.getView().setCenter([113.679, 23.607])
-        }
-    }
-}
-
-export default AlarmLayer;

+ 0 - 59
src/views/workDetail/areaMap.js

@@ -1,59 +0,0 @@
-import Layer from "ol/layer/Vector";
-import config from "@/api/config.js";
-import * as KMap from "@/utils/ol-map/KMap";
-import Stroke from "ol/style/Stroke";
-import * as util from "@/common/ol_common.js";
-import { newAreaFeature } from "@/common/util";
-import Style from "ol/style/Style";
-import Icon from "ol/style/Icon";
-import {Point } from 'ol/geom';
-import Feature from "ol/Feature";
-import WKT from "ol/format/WKT";
-
-/**
- * @description 智能巡园地图层对象
- */
-class AreaMap {
-  constructor() {
-    let that = this;
-    let vectorStyle = new KMap.VectorStyle();
-    this.vectorStyle = vectorStyle;
-  }
-
-  initMap(location, target) {
-    let vectorStyle = new KMap.VectorStyle();
-    // 位置图标
-    this.blueRegionLayer = new KMap.VectorLayer("blueRegionLayer", 99999, {
-        minZoom: 1,
-        maxZoom: 22,
-    });
-    let level = 16;
-    let coordinate = util.wktCastGeom(location).getFirstCoordinate();
-    this.kmap = new KMap.Map( target, level, coordinate[0], coordinate[1], null, 1, 22 ,"vec", true, true);
-    this.kmap.addLayer(this.blueRegionLayer.layer);
-    let xyz = config.base_img_url + "map/lby/{z}/{x}/{y}.png";
-    this.kmap.addXYZLayer(xyz, { minZoom: 8, maxZoom: 22 }, 2);
-  }
-
-  setData(item){
-    let feature = newAreaFeature(item);
-    this.blueRegionLayer.addFeature(feature);
-  }
-
-  fit(){
-    this.kmap.fit(this.blueRegionLayer.source.getExtent(), [0, 0, 0, 0]);
-  }
-
-  // 重新渲染地图
-  updateMap() {
-    setTimeout(() => {
-      this.kmap.map.updateSize()
-    }, 1000);
-  }
-
-  // fit(geomOrExtent, padding) {
-  //   this.kmap.fit(geomOrExtent, padding);
-  // }
-}
-
-export default AreaMap;

+ 0 - 701
src/views/workDetail/completed.vue

@@ -1,701 +0,0 @@
-<template>
-    <div class="base-container">
-        <fnHeader :hideSwitch="true" :hideShadow="true" showDate></fnHeader>
-        <div class="content">
-            <div class="content-header">
-                <div class="btn" @click="goBack">
-                    <img src="@/assets/images/common/back-icon.png" alt="" />
-                    返回
-                </div>
-                <div class="tabs-group">
-                    <div class="tabs-item" :class="{active:active===index}" @click="handleActive(index)" v-for="(item,index) in 5" :key="item">农事名称0{{item}}</div>
-                </div>
-            </div>
-            <div class="content-body">
-                <div class="content-left">
-                    <chart-box class="left-cont" name="农事成效" color="yellow">
-                        <div class="box">
-                            <div class="box-item">
-                                <div class="box-title">基本信息</div>
-                                <div class="info-box">
-                                    <div class="info-l">
-                                        <img class="farm-img" src="@/assets/img/gallery/farm-img.png" alt="" />
-                                    </div>
-                                    <div class="info-r">
-                                        <div class="farm-name">荔博园</div>
-                                        <div class="info-item">
-                                            <div class="info-name">农事名称:</div>
-                                            <div class="info-value">
-                                                {{ workItem.farmWorkName }} ({{ workItem.executeDate }})
-                                            </div>
-                                        </div>
-                                        <div class="info-item">
-                                            <div class="info-name">农事目的:</div>
-                                            <div class="info-value">{{ workItem.purpose }}</div>
-                                        </div>
-                                        <div class="info-item">
-                                            <div class="info-name">肥药处方:</div>
-                                            <div class="info-value">
-                                                <div class="rescription">
-                                                    <span
-                                                        v-for="(
-                                                            fertilizer, fertilizerI
-                                                        ) in workItem.pesticideFertilizerList"
-                                                        :key="fertilizerI"
-                                                    >
-                                                        {{ fertilizer.ratio ? fertilizer.ratio + "倍" : "" }}
-                                                        {{ fertilizer.name }}
-                                                        <span
-                                                            v-if="
-                                                                fertilizerI !==
-                                                                workItem.pesticideFertilizerList.length - 1
-                                                            "
-                                                        >
-                                                            +
-                                                        </span>
-                                                    </span>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                            <div class="box-item">
-                                <div class="box-title">主体信息</div>
-                                <div class="subject-box">
-                                    <div class="subject-item">
-                                        <img class="subject-img" src="@/assets/img/gallery/capital.png" alt="" />
-                                        <div class="subject-tag">
-                                            大禹农资
-                                            <el-icon class="right-icon" size="14"><ArrowRightBold /></el-icon>
-                                        </div>
-                                    </div>
-                                    <div class="subject-item">
-                                        <img class="subject-img" src="@/assets/img/gallery/capital.png" alt="" />
-                                        <div class="subject-tag">
-                                            北极农服
-                                            <el-icon class="right-icon" size="14"><ArrowRightBold /></el-icon>
-                                        </div>
-                                    </div>
-                                    <div class="subject-item">
-                                        <img class="subject-img" src="@/assets/img/gallery/capital.png" alt="" />
-                                        <div class="subject-tag">
-                                            韦帮稳
-                                            <el-icon class="right-icon" size="14"><ArrowRightBold /></el-icon>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                            <div class="box-item">
-                                <div class="box-title">复核成效</div>
-                                <div class="result-text">
-                                    通过精准农业技术的应用,作物产量实现了两位数的增长,<span>病虫害</span>的发生率大幅下降,<span>土壤肥力</span>的提升通过精准农业技术的应用,<span>作物产量</span>实现了两位数的增长,<span>病虫害</span>的发生率大幅下降,<span>土壤肥力</span>的提升
-                                </div>
-                            </div>
-                        </div>
-                        <div class="footer">
-                            <div class="button defalut-btn">联系专家</div>
-                            <div class="button" @click="handleOk">加入标准体系</div>
-                        </div>
-                    </chart-box>
-                </div>
-                <div class="content-right">
-                    <div class="box-item box-none">
-                        <div class="box-title border-none">复核图片</div>
-                        <div class="img-list">
-                            <div class="img-item">
-                                <!-- 图片列表 -->
-                                <AlbumCarousel
-                                    temp="执行前"
-                                    :key="1"
-                                    :farmId="766"
-                                    :sampleId="110725"
-                                    :lock="false"
-                                    :farmWork="{ beforeExecuteDate: '2025-02-20', executeDate: '2025-02-25' }"
-                                ></AlbumCarousel>
-                            </div>
-                            <div class="img-item">
-                                <AlbumCarousel
-                                    temp="执行前"
-                                    :key="2"
-                                    :farmId="766"
-                                    :sampleId="110725"
-                                    :lock="false"
-                                    :farmWork="{ beforeExecuteDate: '2025-02-15', executeDate: '2025-02-20' }"
-                                ></AlbumCarousel>
-                            </div>
-                            <div class="img-item">
-                                <AlbumCarousel
-                                    temp="执行后"
-                                    :key="3"
-                                    :farmId="766"
-                                    :sampleId="110725"
-                                    :lock="false"
-                                    :farmWork="{ beforeExecuteDate: '2025-02-10', executeDate: '2025-02-15' }"
-                                ></AlbumCarousel>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="box-item box-none">
-                        <div class="box-title border-none">用户评价</div>
-                        <div class="box-evaluate">
-                            <div class="comment" v-for="item in 3" :key="item">
-                                <div class="user-info">
-                                    <el-avatar
-                                        class="avatar"
-                                        :size="40"
-                                        src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
-                                    />
-                                    <div class="user-name">翰有月</div>
-                                </div>
-                                <div class="rate">
-                                    <div class="rate-item">
-                                        <span class="name">农资</span>
-                                        <el-rate v-model="value" size="small" />
-                                    </div>
-                                    <div class="rate-item">
-                                        <span class="name">农服</span>
-                                        <el-rate v-model="value" size="small" />
-                                    </div>
-                                    <div class="rate-item">
-                                        <span class="name">专家</span>
-                                        <el-rate v-model="value" size="small" />
-                                    </div>
-                                </div>
-                                <el-text class="text" line-clamp="2" size="16px">
-                                    这里是用户的评级内容,有点长,省略100个字。这里是用户的评级内容,有点长,省略100个字。这里是用户的评级内容,有点长,省略100个字。这里是用户的评级内容,有点长,省略100个字。
-                                </el-text>
-                                <span class="date">2025.1.20</span>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import { ElMessage } from "element-plus";
-import fnHeader from "@/components/fnHeader.vue";
-import AlbumCarousel from "@/views/home/album/album_compoents/albumCarousel";
-import chartBox from "@/components/chartBox.vue";
-import { useRouter, useRoute } from "vue-router";
-import { useStore } from "vuex";
-let store = useStore();
-
-const workItem = {
-    id: "214936",
-    serviceRegion: "广州市从化区荔枝博览园",
-    orderId: "685852811698638848",
-    area: 593,
-    expert: 81653,
-    orderStatus: 0,
-    farmId: 766,
-    regionId: null,
-    speciesId: "1",
-    speciesName: "荔枝",
-    agriculturalId: 1,
-    farmWorkId: "15",
-    farmWorkLibId: "15",
-    farmWorkLibName: "膨果营养",
-    farmWorkName: "膨果营养",
-    expertIcon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/bbs/icon/75e8fb25a1418291e648d35acf1ca41.png",
-    expertName: "韦老师",
-    icon: 1,
-    indexChart: [
-        {
-            date: "5/1",
-            name: "",
-            value: 3,
-        },
-        {
-            date: "5/5",
-            name: "",
-            value: 4,
-        },
-        {
-            date: "5/11",
-            name: "",
-            value: 14,
-        },
-        {
-            date: "5/15",
-            name: "",
-            value: 24,
-        },
-    ],
-    indexName: "",
-    beforeExecuteDate: null,
-    executeDate: "2025-05-05",
-    indexJson:
-        '[{"date":"5/1","value":3.0},{"date":"5/5","value":4.0},{"date":"5/11","value":14.0},{"date":"5/15","value":24.0}]',
-    code: "GF-PG",
-    expertPrescription: "",
-    condition: "单树膨果率5%",
-    solarName: "5月上旬",
-    reCheck: 0,
-    executeBlueZones: [],
-    menu: 1,
-    num: null,
-    purpose: "施足营养,促进膨果转色",
-    farmWorkType: 2,
-    farmWorkTypeName: "营养",
-    type: 1,
-    execute: 3,
-    updateDate0: null,
-    updateDate1: null,
-    updateDate2: null,
-    updateDate3: null,
-    updateDate4: null,
-    updateDate5: null,
-    serviceMain: "大荔农业",
-    executeMain: "大荔农业",
-    weatherWarningMsg: "荔枝普遍处于花穗期,近期温度较过去一周快速下降,有花穗生长停滞风险\r\n",
-    userEvaluation: null,
-    users: [
-        {
-            id: null,
-            orderId: null,
-            serviceType: null,
-            userType: 1,
-            userId: 81669,
-            joinStatus: null,
-            icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/bbs/icon/23.png",
-            userName: "用户81669",
-            area: "",
-            point: "POINT(113.52575791849408 23.830400966597722)",
-            farmName: "农场1011",
-            selected: 0,
-        },
-        {
-            id: null,
-            orderId: null,
-            serviceType: null,
-            userType: 1,
-            userId: 81653,
-            joinStatus: null,
-            icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/bbs/icon/75e8fb25a1418291e648d35acf1ca41.png",
-            userName: "韦老师",
-            area: "5.51",
-            point: "POINT(113.68851269297058 23.786884947916857)",
-            farmName: "farm_01",
-            selected: 0,
-        },
-        {
-            id: null,
-            orderId: null,
-            serviceType: 1,
-            userType: 2,
-            userId: 81881,
-            joinStatus: null,
-            icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/bbs/icon/lz_logo.png",
-            userName: "飞鸟种植助手",
-            area: "",
-            point: "POINT(113.30139794715421 23.511158355652277)",
-            farmName: "农场11-523",
-            selected: 0,
-        },
-        {
-            id: null,
-            orderId: null,
-            serviceType: null,
-            userType: 1,
-            userId: 81663,
-            joinStatus: null,
-            icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/bbs/icon/8.png",
-            userName: "用户81663",
-            area: "6.35",
-            point: "POINT(114.37672046161343 23.45379334952031)",
-            farmName: "农场11",
-            selected: 0,
-        },
-    ],
-    prescriptionList: [
-        {
-            name: "营养",
-            pesticideFertilizerList: [
-                {
-                    defaultDroneRatio: null,
-                    defaultName: "高钾复合肥",
-                    defaultRatio: null,
-                    id: null,
-                    muPrice: null,
-                    muUsage: null,
-                    muUsage2: null,
-                    ratio: null,
-                    ratio2: null,
-                    remark: "",
-                    usageMode: "根部施",
-                    usageModeList: [],
-                    orderId: null,
-                    pesticideFertilizerCode: "",
-                    pesticideFertilizerId: "35",
-                    pesticideFertilizerName: "高钾复合肥",
-                    brand: "",
-                    typeName: "",
-                    price: null,
-                    unit: "",
-                    executeStyle: null,
-                },
-            ],
-            usageMode: "根部施",
-        },
-    ],
-    pesticideFertilizerList: [
-        {
-            id: null,
-            name: "高钾复合肥 1kg/棵",
-            pesticideFertilizerCode: "35",
-            ratio: null,
-            count: null,
-            typeName: "营养",
-        },
-    ],
-    pesticideFertilizers: [
-        {
-            defaultDroneRatio: null,
-            defaultName: "高钾复合肥",
-            defaultRatio: null,
-            id: "685852812344561664",
-            muPrice: null,
-            muUsage: null,
-            muUsage2: null,
-            ratio: null,
-            ratio2: null,
-            remark: "",
-            usageMode: "根部施",
-            usageModeList: ["根部施"],
-            orderId: "685852811698638848",
-            pesticideFertilizerCode: "",
-            pesticideFertilizerId: "35",
-            pesticideFertilizerName: "高钾复合肥 1kg/棵",
-            brand: "",
-            typeName: "营养",
-            price: null,
-            unit: "kg",
-            executeStyle: null,
-        },
-    ],
-};
-const active = ref(0)
-const handleActive = (index) =>{
-    active.value = index
-}
-
-const router = useRouter();
-const route = useRoute();
-const value = ref(4);
-onMounted(() => {
-    getList();
-});
-
-const getList = () => {
-    console.log("000");
-};
-
-const goBack = () => {
-    router.go(-1);
-};
-
-//确定/下发农事
-const handleOk = () => {};
-</script>
-
-<style lang="scss" scoped>
-.base-container {
-    width: 100%;
-    height: 100vh;
-    color: #fff;
-    position: relative;
-    box-sizing: border-box;
-    z-index: 1;
-    background: #000;
-
-    .content {
-        width: 100%;
-        height: calc(100% - 74px);
-        padding: 20px;
-        box-sizing: border-box;
-        .box-item {
-            background: rgba(255, 255, 255, 0.04);
-            border: 1px solid #444444;
-            border-radius: 8px;
-            padding: 16px 12px;
-            box-sizing: border-box;
-            width: 100%;
-            &.box-none {
-                border: none;
-                background: none;
-                padding: 0;
-            }
-            .box-title {
-                font-size: 20px;
-                border-bottom: 1px solid #333333;
-                padding: 0 0 12px 13px;
-                margin-bottom: 20px;
-                position: relative;
-                display: flex;
-                justify-content: space-between;
-                &.border-none {
-                    padding-bottom: 0;
-                    border: none;
-                }
-                &::before {
-                    content: "";
-                    position: absolute;
-                    left: 0;
-                    top: 6px;
-                    width: 3px;
-                    height: 16px;
-                    background: #fff;
-                    border-radius: 11px;
-                }
-            }
-        }
-        .box-item + .box-item {
-            margin-top: 16px;
-        }
-    }
-    .content-header {
-        display: flex;
-        align-items: center;
-        margin-bottom: 24px;
-        .btn {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            border: 1px solid rgba(255, 255, 255, 0.78);
-            border-radius: 4px;
-            padding: 9px;
-            width: 104px;
-            margin-right: 48px;
-            cursor: pointer;
-            img {
-                width: 14px;
-                margin-right: 5px;
-            }
-        }
-        .tabs-group{
-            width: calc(100% - 104px - 48px);
-            display: flex;
-            font-size: 18px;
-            color: #cecece;
-            border-bottom: 2px solid #444444;
-            .tabs-item{
-                padding: 0 14px 14px 14px;
-                margin-bottom: -2px;
-                border-bottom: 2px solid transparent;
-                cursor: pointer;
-                &.active{
-                    color: #FFD489;
-                    border-bottom-color: #FFD489;
-                }
-                
-            }
-            .tabs-item + .tabs-item{
-                margin-left: 20px;
-            }
-        }
-    }
-    .content-body {
-        width: 100%;
-        height: calc(100% - 40px - 24px);
-        display: flex;
-        justify-content: space-between;
-
-        .content-left {
-            width: 473px;
-            height: 100%;
-            box-sizing: border-box;
-            .box {
-                width: 100%;
-                height: calc(100% - 58px);
-                padding: 16px 12px;
-                box-sizing: border-box;
-                overflow-y: auto;
-            }
-
-            .left-cont {
-                width: 100%;
-                height: 100%;
-
-                .info-box {
-                    display: flex;
-                    border-radius: 5px;
-                    align-items: center;
-                    .info-l {
-                        .farm-img {
-                            width: 100px;
-                            width: 100px;
-                            border-radius: 8px;
-                            object-fit: scale-down;
-                        }
-                    }
-                    .info-r {
-                        padding-left: 12px;
-                    }
-                    .farm-name {
-                        font-size: 18px;
-                        color: #fff;
-                        padding-bottom: 4px;
-                    }
-                    .info-item {
-                        display: flex;
-                        font-size: 15px;
-                        .info-name {
-                            color: #727272;
-                            flex: none;
-                        }
-                        .info-value {
-                            color: #cecece;
-                        }
-                    }
-                    .info-item + .info-item {
-                        margin-top: 4px;
-                    }
-                }
-                .subject-box {
-                    width: 100%;
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-around;
-                    .subject-item {
-                        border-radius: 8px;
-                        display: flex;
-                        flex-direction: column;
-                        align-items: center;
-                        justify-content: center;
-                        width: 33%;
-                        .subject-img {
-                            width: 67px;
-                            height: 67px;
-                            object-fit: cover;
-                            border-radius: 50%;
-                            border: 2px solid #fff;
-                        }
-                        .subject-tag {
-                            font-size: 14px;
-                            padding: 2px 8px 3px 8px;
-                            background: #ffd489;
-                            color: #000;
-                            border-radius: 24px;
-                            display: flex;
-                            align-items: center;
-                            margin-top: -5px;
-                        }
-                    }
-                    .subject-item + .subject-item {
-                        margin-left: 8px;
-                    }
-                }
-                .result-text {
-                    font-size: 15px;
-                    line-height: 22px;
-                    span {
-                        color: #ffd489;
-                    }
-                }
-            }
-        }
-        .content-right {
-            width: calc(100% - 473px - 18px);
-            margin-left: 18px;
-            height: 100%;
-            background: #191919;
-            border: 0.6px solid #444444;
-            padding: 20px;
-            box-sizing: border-box;
-            border-radius: 8px;
-            .img-list {
-                display: flex;
-                justify-content: space-between;
-                .img-item {
-                    width: 32.5%;
-                    .carousel-container {
-                        border-radius: 10px;
-                    }
-                }
-                .img-item + .img-item {
-                    margin-left: 12px;
-                }
-            }
-            .box-evaluate {
-                display: flex;
-
-                .comment {
-                    flex: 1;
-                    padding: 20px 10px;
-                    box-sizing: border-box;
-                    border-radius: 5px;
-                    background: rgba(255, 255, 255, 0.05);
-                    .user-info {
-                        display: flex;
-                        align-items: center;
-                        .user-name {
-                            font-weight: 500;
-                            margin-left: 8px;
-                        }
-                    }
-                    .rate {
-                        display: flex;
-                        justify-content: space-between;
-                        ::v-deep {
-                            .el-rate {
-                                --el-rate-icon-margin: 3px;
-                            }
-                        }
-                        .rate-item {
-                            display: flex;
-                            align-items: center;
-                            border-radius: 4px;
-                            padding: 4px 2px;
-                            font-size: 12px;
-                            .name {
-                                margin-right: 2px;
-                                color: #666666;
-                            }
-                        }
-                    }
-                    .text {
-                        color: #fff;
-                    }
-                    .date {
-                        color: #727272;
-                    }
-                }
-                .comment + .comment {
-                    margin-left: 12px;
-                }
-            }
-        }
-        .footer {
-            width: 100%;
-            height: 58px;
-            border-top: 0.5px solid #555555;
-            background: rgba(255, 255, 255, 0.04);
-            display: flex;
-            justify-content: flex-end;
-            align-items: center;
-
-            .button {
-                font-size: 16px;
-                padding: 8px 58px;
-                background: #ffd489;
-                border-radius: 4px;
-                color: #000;
-                margin-right: 12px;
-                cursor: pointer;
-            }
-            .defalut-btn {
-                color: #ffd489;
-                font-size: 14px;
-                padding: 8px 20px;
-                background: none;
-                border: 1px solid #ffd489;
-            }
-        }
-    }
-}
-</style>

+ 0 - 620
src/views/workDetail/components/boxClass.scss

@@ -1,620 +0,0 @@
-.work-item {
-    margin-bottom: 12px;
-    &.last-enter {
-        .work-line .line-box::after {
-            height: calc(100% - 26px);
-        }
-    }
-    position: relative;
-    &.has-bottom-btn {
-        margin-bottom: 52px;
-
-        .enter-btn {
-            width: calc(100% - 22px);
-            position: absolute;
-            left: 22px;
-            bottom: -52px;
-            height: 40px;
-            line-height: 40px;
-            .btn {
-                width: 100%;
-                height: 40px;
-                line-height: 40px;
-            }
-        }
-    }
-    &.dark {
-        .work-info {
-            background: #fff;
-            border-color: rgba(218, 218, 218, 0.57);
-            .card-item-title {
-                color: #C3C3C3;
-                .dotted {
-                    background: #C3C3C3;
-                }
-            }
-            .service-name {
-                color: #888888;
-            }
-            .item-table ::v-deep {
-                border-color: rgba(218, 218, 218, 0.57);
-                border-bottom: 0;
-                .el-table .el-table__header th.el-table__cell {
-                    background: #F9F9F9 !important;
-                }
-                .el-table tr {
-                    background: #fff;
-                }
-                .el-table thead {
-                    color: #CCCCCC;
-                }
-                .el-table td.el-table__cell {
-                    border-color: #DADADA;
-                }
-                &.has-sub-title .el-table__header .el-table__cell:first-child {
-                    border-color: rgba(218, 218, 218, 0.57);
-                }
-                &.has-sub-title .el-table,
-                &.has-sub-title .el-table__header,
-                &.has-sub-title .el-table td.el-table__cell,
-                &.has-sub-title .el-table__row .el-table__cell:first-child {
-                    border-color: rgba(218, 218, 218, 0.57);
-                }
-                &.has-sub-title .el-table__row .el-table__cell:first-child {
-                    border-color: rgba(218, 218, 218, 0.57);
-                    background: #FAFAFA;
-                }
-                &.has-sub-title {
-                    // border: none;
-                    border: 1px solid rgba(218, 218, 218, 0.57);
-                    .el-table, .el-table__header {
-                        border-bottom: 0;
-                    }
-                }
-                &.has-sub-title .remark-text {
-                    border-color: rgba(218, 218, 218, 0.57);
-                }
-                &.no-wrap-table {
-                    border: none;
-                }
-            }
-            .prescription-box .prescription-item .sub-name {
-                color: rgba(102, 102, 102);
-            }
-            .step-3-info .step-info-item .info-serve-r {
-                color: rgba(102, 102, 102, 0.4);
-                background: rgba(102, 102, 102, 0.05);
-            }
-            .prescription-box {
-                .desc {
-                    color: rgba(0, 0, 0, 0.3);
-                    background: #FAFAFA;
-                    span {
-                        color: #BBBBBB;
-                    }
-                }
-            }
-        }
-        .prescription-result {
-            border: none;
-            .result-index {
-                background: #DDDDDD;
-            }
-            .result-title .title-item .name {
-                color: #CCCCCC;
-            }
-            .result-title .title-item .value {
-                color: #AAAAAA;
-            }
-        }
-        .work-line {
-            .line-box::after {
-                background: #C3C3C3;
-            }
-            .line-dotted {
-                background: #DDDDDD;
-                .dotted-inset {
-                    background: #C3C3C3;
-                }
-            }
-        }
-    }
-
-    .card-item-title {
-        display: inline-flex;
-        align-items: center;
-        color: rgba(0, 0, 0, 0.8);
-        font-size: 16px;
-        .dotted {
-            display: block;
-            width: 3px;
-            height: 10px;
-            border-radius: 20px;
-            background: #2199f8;
-            margin-right: 10px;
-        }
-        .real-text {
-            padding-left: 4px;
-            font-size: 12px;
-            color: #2199F8;
-        }
-    }
-    .work-info {
-        position: relative;
-        color: #fff;
-        .step-box {
-            position: absolute;
-            right: 10px;
-            top: 30px;
-        }
-        .todo-img {
-            position: absolute;
-            top: -1px;
-            right: -1px;
-            width: 46px;
-        }
-        .done-img {
-            position: absolute;
-            top: -1px;
-            right: -1px;
-            width: 30px;
-        }
-        .work-info-conetnt {
-            padding-top: 6px;
-        }
-        .info-item {
-            display: flex;
-            align-items: center;
-            font-size: 15px;
-            margin-bottom: 12px;
-            .info-name {
-                color: #727272;
-                flex: none;
-            }
-            .info-value {
-                display: flex;
-                align-items: center;
-                &.primary-color {
-                    color: #2199f8;
-                }
-                .select-value {
-                    padding-left: 4px;
-                }
-                ::v-deep {
-                    .el-select__wrapper {
-                        box-shadow: 0 0 0 1px #2199F8 inset;
-                        background: none;
-                        height: 24px;
-                        min-height: 24px;
-                        padding: 4px 8px;
-                        .el-select__placeholder {
-                            color: #2199F8;
-                        }
-                        .el-select__caret {
-                            color: #2199F8;
-                        }
-                    }
-                    .date-info {
-                        height: 24px;
-                        .el-input__wrapper {
-                            box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
-                            background: none;
-                            .el-input__prefix {
-                                color: #fff;
-                            }
-                            .el-input__inner {
-                                color: #fff;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        .info-item + .info-item {
-            &.time-picker {
-                margin-top: 6px;
-            }
-        }
-
-        .prescription-box {
-            position: relative;
-            padding-right: 10px;
-            font-size: 16px;
-            .desc {
-                margin-top: 12px;
-                border-radius: 4px;
-                color: #727272;
-                padding: 10px;
-                background: rgba(255, 212, 137, 0.06);
-                span {
-                    color: #2199f8;
-                }
-            }
-            .service-wrap {
-                padding: 12px 0;
-                .service-item {
-                    margin-top: 8px;
-                    display: flex;
-                    align-items: center;
-                    border: 1px solid #474747;
-                    padding: 0 12px;
-                    height: 48px;
-                    color: #fff;
-                    font-size: 14px;
-                    border-radius: 8px;
-                    .service-img {
-                        width: 32px;
-                        margin-right: 8px;
-                        border-radius: 50%;
-                    }
-                    .service-c {
-                        flex: 1;
-                        text-align: center;
-                        color: rgba(255, 255, 255, 0.6);
-                    }
-                }
-                .service-bottom {
-                    padding-top: 12px;
-                    .service-btn {
-                        padding-top: 12px;
-                        width: 100%;
-                        .btn {
-                            background: #FFD489;
-                            color: #050505;
-                            width: 100%;
-                            height: 44px;
-                            font-size: 16px;
-                        }
-                    }
-                }
-            }
-            .bottom-map {
-                width: 100%;
-                height: 150px;
-                border-radius: 8px;
-            }
-            .prescription-item {
-                padding-top: 12px;
-                .prescription-chart {
-                    margin-top: 6px;
-                    border: 1px solid rgba(196, 196, 196, 0.8);
-                    border-radius: 5px;
-                    padding: 4px 0 8px 0;
-                    position: relative;
-                    z-index: 1;
-                    ::v-deep {
-                        .card-chart {
-                            width: calc(100vw - 60px - 40px);
-                            height: 160px;
-                        }
-                    }
-                }
-                .sub-name {
-                    font-size: 15px;
-                    margin-bottom: 5px;
-                    span{
-                        color: #727272;
-                    }
-                }
-                .edit-select {
-                    ::v-deep {
-                        .el-select__wrapper {
-                            box-shadow: 0 0 0 1px #2199F8 inset;
-                            background: #f1f9ff;
-                        }
-                    }
-                }
-                .recipe-item {
-                    .recipe-form {
-                        padding-top: 8px;
-                    }
-                    .form-box {
-                        border: 1px solid #444444;
-                        border-radius: 4px;
-                        padding: 20px 10px;
-                        width: 100%;
-                        position: relative;
-                        .form-index {
-                            position: absolute;
-                            left: 0;
-                            top: 0;
-                            padding: 0 6px;
-                            background: #FFD489;
-                            border-radius: 4px 0 4px 0;
-                            height: 18px;
-                            line-height: 18px;
-                            font-size: 12px;
-                            color: #000;
-                        }
-                        .box-item {
-                            display: flex;
-                            align-items: center;
-                            justify-content: space-between;
-                            color: #727272;
-                            .r-text {
-                                color: #fff;
-                                width: 140px;
-                                text-align: center;
-                            }
-                        }
-                        .input-box {
-                            padding: 8px 0 12px 0;
-
-                            ::v-deep {
-                                .el-input__wrapper {
-                                    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
-                                    background: none;
-                                }
-                                .el-input__inner {
-                                    color: #fff;
-                                }
-                            }
-                        }
-                        .text-center {
-                            ::v-deep {
-                                .el-input__inner {
-                                    text-align: center;
-                                }
-                            }
-                        }
-                        .action-btn {
-                            .btn {
-                                flex: 1;
-                                width: calc(50% - 6px);
-                            }
-                            .delete-btn {
-                                color: #FF943D;
-                                background: rgba(255, 148, 61, 0.1);
-                                border: 1px solid #FF943D;
-                            }
-                        }
-                        .btn-group {
-                            padding-top: 12px;
-                            ::v-deep {
-                                .el-button--primary {
-                                    color: #FFD489;
-                                    background: rgba(255, 212, 137, 0.05);
-                                    border: 1px solid #FFD489;
-                                }
-                            }
-                        }
-                        .sub-item {
-                            padding-left: 10px;
-                            .has-sub {
-                                display: flex;
-                                flex-direction: column;
-                                align-items: center;
-                                .main-name {
-                                    line-height: 20px;
-                                }
-                                .sub-name {
-                                    font-size: 10px;
-                                    color: rgba(129, 129, 129, 0.5);
-                                    line-height: 14px;
-                                }
-                            }
-                            .colunm-sub {
-                                display: flex;
-                                align-items: center;
-                                .sub-name {
-                                    font-size: 10px;
-                                    color: rgba(129, 129, 129, 0.5);
-                                }
-                            }
-                            .r-text {
-                                width: 132px;
-                                text-align: center;
-                                font-size: 14px;
-                                color: #fff;
-                            }
-                            .price {
-                                ::v-deep {
-                                    .el-input__wrapper {
-                                        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
-                                        background: none;
-                                    }
-                                    .el-input__inner {
-                                        color: #fff;
-                                    }
-                                    .el-input-group__append {
-                                        background: none;
-                                        color: rgba(255, 255, 255, 0.6);
-                                    }
-                                }
-                            }
-                        }
-                        .form-title {
-                            color: #008EFF;
-                            font-size: 14px;
-                            padding-top: 6px;
-                        }
-                        .box-item + .box-item {
-                            margin-top: 8px;
-                        }
-                        ::v-deep {
-                            .el-select__wrapper {
-                                box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
-                                background: none;
-                                .el-select__placeholder {
-                                    color: #fff;
-                                    text-align: center;
-                                }
-                            }
-                        }
-                    }
-                    .form-box + .form-box {
-                        margin-top: 8px;
-                    }
-
-                }
-                .one-btn {
-                    width: 100%;
-                }
-            }
-        }
-
-        .step-3-info {
-            padding-top: 12px;
-            .step-info-item {
-                display: flex;
-                justify-content: space-between;
-                align-items: center;
-                .info-serve-l {
-                    flex: 1;
-                    display: flex;
-                    align-items: center;
-                    color: rgba(0, 0, 0, 0.4);
-                    .type-name {
-                        flex: none;
-                    }
-                    .img-list {
-                        display: flex;
-                        .img-item {
-                            position: relative;
-                            .serve-img {
-                                width: 32px;
-                                height: 32px;
-                                object-fit: cover;
-                                border-radius: 50%;
-                            }
-                            .checked-icon {
-                                position: absolute;
-                                bottom: 0;
-                                right: 0;
-                                width: 14px;
-                            }
-                        }
-                        .img-item + .img-item {
-                            margin-left: 10px;
-                        }
-                    }
-                }
-                .info-serve-r {
-                    flex: none;
-                    color: #2199f8;
-                    font-size: 12px;
-                    border-radius: 20px;
-                    padding: 4px 12px;
-                    background: rgba(33, 153, 248, 0.12);
-                }
-            }
-            .step-info-item + .step-info-item {
-                padding-top: 12px;
-            }
-        }
-
-        .item-table {
-            margin-top: 8px;
-            // border: 1px solid #444444;
-            // border-top: 0;
-            // border-bottom: 0;
-            border-radius: 4px;
-            color: #333333;
-            ::v-deep {
-                .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
-                    background: transparent;
-                }
-                .el-table {
-                    border: 1px solid #444444;
-                    border-radius: 4px 4px 0 0 ;
-                    background: transparent;
-                    // border-bottom: 0;
-                    --el-table-border: #444444;
-                }
-            }
-
-            &.has-wrap-table {
-                ::v-deep {
-                    .el-table__row {
-                        .el-table__cell:first-child {
-                            background: #E0F2FF;
-                            border-right: 1px solid #444444;
-                        }
-
-                    }
-                    .el-table__header {
-                        .el-table__cell:first-child{
-                                border-right: 1px solid #444444;
-                            }
-                    }
-                }
-            }
-
-            &.has-sub-title {
-                border: none;
-                ::v-deep {
-                    .el-table__cell {
-                        text-align: center;
-                    }
-                    .el-table__row {
-                        // .el-table__cell:first-child {
-                        //     background: #E0F2FF;
-                        //     border-right: 1px solid #444444;
-                        // }
-
-                    }
-                    .el-table__header {
-                        border-bottom: 1px solid #444444;
-                        // .el-table__cell:first-child{
-                        //         border-right: 1px solid #444444;
-                        //     }
-                    }
-                }
-                .remark-text {
-                    border: 1px solid #444444;
-                    color: rgba(0, 0, 0, 0.3);
-                    height: 36px;
-                    line-height: 36px;
-                    padding: 0 6px;
-                    border-radius: 0 0 4px 4px;
-                    border-top: 0;
-                }
-            }
-
-            &.no-wrap-table {
-                border: none;
-            }
-            .table-l-title {
-                height: 100%;
-            }
-            ::v-deep {
-                .el-table {
-                    color: #CECECE;
-                }
-                .el-table__inner-wrapper:before {
-                    background: transparent;
-                }
-                .el-table th.el-table__cell {
-                    padding: 4px 3px;
-                }
-                .el-table thead {
-                    color: #727272;
-                    font-weight: normal !important;
-                }
-                .el-table .el-table__header th.el-table__cell {
-                    background: rgba(255, 255, 255, 0.04) !important;
-                }
-                .el-table tr {
-                    background: transparent;
-                }
-                .el-table--default .el-table__cell {
-                    // padding: 4px 0;
-                }
-                .el-table--default .cell {
-                    padding: 0px 2px;
-                    font-size: 14px;
-                    font-weight: normal;
-                }
-                .el-table__header, .el-table__body {
-                    width: auto !important;
-                }
-                .el-table__header .cell {
-                    line-height: 18px;
-                }
-                .el-table td.el-table__cell {
-                    border-color: #444444;
-                }
-            }
-        }
-    }
-}

+ 0 - 190
src/views/workDetail/components/chart.vue

@@ -1,190 +0,0 @@
-<template>
-    <div class="card-chart" ref="chartRef"></div>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import * as echarts from "echarts";
-import { galleryIndicatorLine } from "./chartSeting";
-import { deepClone } from "@/common/commonFun";
-
-const props = defineProps({
-    type: {
-        type: String,
-        default: "",
-    },
-    chartJson: {
-        type: String,
-        required: true,
-    },
-});
-
-let myChart = null;
-const chartRef = ref();
-const chartData = ref(JSON.parse(props.chartJson))
-
-let chartDataArr = ref([
-    { date: "9/1", value: 40 },
-    { date: "9/7", value: 60 },
-    { date: "9/13", value: 63 },
-    { date: "9/19", value: 68 },
-    { date: "9/25", value: 80, feature: true },
-    { date: "10/1", value: 85, feature: true },
-    { date: "10/7", value: 88, feature: true },
-]);
-
-const getFeatureSerie = (forecastData) => {
-  return {
-    name: "",
-    type: "line",
-    data: forecastData, // 取后三天的数据
-    itemStyle: {
-      color: "#CECECE", // 设置数据点颜色
-    },
-    lineStyle: {
-      type: "dashed", // 设置线条为虚线
-      width: 2, // 设置线条宽度
-      color: "#CECECE", // 设置线条颜色
-    },
-  }
-}
-
-onMounted(() => {
-    myChart = echarts.init(chartRef.value);
-    const options = deepClone(galleryIndicatorLine);
-    if (props.type === "feature") {
-        processData();
-        const series = []
-        chartData.value.datas.forEach(({name,values}) => {
-          // 数据处理
-          let currentData = [];
-          let forecastData = [];
-          for(let i = 0; i < chartData.value.dates.length; i++){
-            let item = chartData.value.dates[i];
-            if (item.feature) {
-              forecastData.push([item.date, Number(values[i])]);
-            } else {
-              currentData.push([item.date, Number(values[i])]);
-            }
-          }
-          // 追加实际数据的最后一组数据
-          forecastData.unshift(currentData[currentData.length - 1]);
-          options.series.forEach((item) => {
-            if(item.name === name){
-              item.data = currentData;
-              series.push(item)
-              series.push(getFeatureSerie(forecastData))
-            }
-          })
-        })
-        options.series = series;
-    } else {
-        // 完成农事
-        let seriesData = chartData.value.map((m) => {
-            return Number(m.value);
-        });
-
-        options.series = [
-            {
-                data: seriesData,
-                type: "line",
-                symbolSize: 6,
-                itemStyle: {
-                    color: "#2199F8", // 设置数据点颜色为红色
-                },
-            },
-        ];
-    }
-
-    let labels = chartData.value.dates.map((m) => {
-        return m.date;
-    });
-
-    options.xAxis.data = labels;
-    // if (props.type === "normal") {
-    //     options.series = [
-    //         {
-    //             data: [40, 58, 62, 64, 68, 74, 80],
-    //             type: "line",
-    //             symbolSize: 6,
-    //             itemStyle: {
-    //                 color: "#2199F8", // 设置数据点颜色为红色
-    //             },
-    //         },
-    //     ];
-    // } else {
-    //     // options.series = [
-    //     //     {
-    //     //         data: [40, 58, 62, 64, 68, 74, 80],
-    //     //         type: "line",
-    //     //         symbolSize: 6,
-
-    //     //         itemStyle: {
-    //     //             color: "#CECECE", // 设置数据点颜色
-    //     //         },
-    //     //         lineStyle: {
-    //     //             type: "dashed", // 设置线条为虚线
-    //     //             width: 2, // 设置线条宽度
-    //     //             color: "#CECECE", // 设置线条颜色
-    //     //         },
-    //     //     },
-    //     // ];
-    //     options.series = [
-    //         {
-    //             name: "实线数据",
-    //             type: "line",
-    //             data: currentData, // 取前四天(包括当天)的数据
-    //             lineStyle: {
-    //                 type: "solid", // 这里可以省略,因为我们在下面通过itemStyle为每个点设置样式时会更具体
-    //             },
-    //             itemStyle: {
-    //                 color: "#2199F8", // 设置数据点颜色为红色
-    //             },
-    //         },
-    //         {
-    //             name: "虚线数据",
-    //             type: "line",
-    //             data: forecastData, // 取后三天的数据
-    //             itemStyle: {
-    //                 color: "#CECECE", // 设置数据点颜色
-    //             },
-    //             lineStyle: {
-    //                 type: "dashed", // 设置线条为虚线
-    //                 width: 2, // 设置线条宽度
-    //                 color: "#CECECE", // 设置线条颜色
-    //             },
-    //         },
-    //     ];
-    // }
-    myChart.setOption(options);
-});
-
-const processData = () => {
-    const today = new Date();
-    const datePattern = /(\d+)\/(\d+)/; // 日期格式匹配,假设为MM/DD
-    let dates = chartData.value.dates;
-    chartData.value.dates = []
-    dates.forEach((date) => {
-        let item = {date: date, feature: false};
-        const match = item.date.match(datePattern);
-        if (match) {
-            const month = parseInt(match[1], 10);
-            const day = parseInt(match[2], 10);
-            const itemDate = new Date(today.getFullYear(), month - 1, day); // 月份从0开始,所以需要减1
-            if (itemDate > today) {
-                item.feature = true;
-            }
-            chartData.value.dates.push(item);
-        }
-    });
-};
-</script>
-
-<style lang="scss" scoped>
-.card-chart {
-    padding: 8px 4px 0 4px;
-    width: 100%;
-    height: 130px;
-    box-sizing: border-box;
-}
-</style>

+ 0 - 227
src/views/workDetail/components/chartSeting.js

@@ -1,227 +0,0 @@
-import * as echarts from "echarts";
-import { color } from "highcharts";
-
-export const galleryLine = {
-    tooltip: {
-        trigger: "axis",
-    },
-    grid: {
-        top: 28,
-        left: 10,
-        right: 26,
-        bottom: 0,
-        containLabel: true,
-    },
-    xAxis: {
-        name: "时间",
-        nameLocation: "end",
-        nameGap: 4,
-        nameTextStyle: {
-            fontSize: 10,
-            color: "#666666"
-        },
-        type: 'category',
-        // 分割线
-        axisTick: {
-            show: false,
-        },
-        splitLine: {
-            show: false,
-        },
-        axisLabel: {
-            // interval: 0,
-            rotate: 15,
-            margin: 14,
-            textStyle: {
-                color: "#666666",
-                fontSize: 10
-            },
-        },
-        data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
-    },
-    yAxis: {
-        name: "xx指标",
-        nameLocation: "end",
-        type: 'value',
-        nameTextStyle: {
-            fontSize: 10,
-            color: "#666666"
-        },
-        axisTick: {
-            show: false,
-        },
-        axisLine: {
-            show: true,
-            lineStyle: {
-                color: "#BBBBBB",
-            },
-        },
-        axisLabel: {
-            textStyle: {
-                color: "#666666",
-                fontSize: 10
-            },
-        },
-        // 分割线
-        splitLine: {
-            show: false,
-            lineStyle: {
-                color: "rgba(255, 255, 255, 0.1)",
-            },
-        },
-    },
-    series: [
-        {
-            data: [40, 58, 62, 64, 68, 74, 80],
-            type: 'line',
-            symbolSize: 6,
-            itemStyle: {
-                color: '#2199F8' // 设置数据点颜色为红色
-            },
-
-            // itemStyle: {
-            //     color: '#CECECE' // 设置数据点颜色
-            // },
-            // lineStyle: {
-            //     type: 'dashed', // 设置线条为虚线
-            //     width: 2,       // 设置线条宽度
-            //     color: '#CECECE' // 设置线条颜色
-            // }
-        }
-    ],
-}
-
-export const galleryIndicatorLine = {
-    tooltip: {
-        // trigger: "axis",
-    },
-    legend: {
-        icon: 'roundRect',
-        top: 0,
-        right: 0,
-        orient: 'horizontal',
-        itemWidth: 6,
-        itemHeight: 2,
-        itemGap: 3,
-        textStyle: {
-          align: 'left',
-          fontSize: 10,
-        },
-        data: [
-          { name: '花带叶率', textStyle: { color: '#66B9FB' }, itemStyle: {color: "#66B9FB"} },
-          { name: '病虫害率', textStyle: { color: '#fbb366' }, itemStyle: {color: "#fbb366"} },
-          { name: '来花率', textStyle: { color: '#ec66fb' }, itemStyle: {color: "#ec66fb"} },
-        ]
-      },
-    grid: {
-        top: 30,
-        left: 8,
-        right: 18,
-        bottom: 4,
-        containLabel: true,
-    },
-    xAxis: {
-        type: 'category',
-        boundaryGap: false,
-        // 分割线
-        axisTick: {
-            show: false,
-        },
-        splitLine: {
-            show: false,
-        },
-        axisLabel: {
-            interval: 0,
-            rotate: 40,
-            margin: 14,
-            textStyle: {
-                color: "#666666",
-                fontSize: 10
-            },
-            formatter: function (value) {
-                // 获取后 5 位字符(假设日期格式始终为 'YYYY-MM-DD')
-                let shortenedValue = value.slice(-5);
-
-                // 自定义处理省略号(由于 ECharts 不直接支持,需手动处理)
-                // 此处简单判断,若原长度超过 10(即 'YYYY-MM-DD' 格式),则添加省略号
-                if (value.length > 10) {
-                    shortenedValue = '...' + shortenedValue;
-                }
-
-                return shortenedValue;
-            }
-        },
-        axisLine: {
-            lineStyle: {
-                color: "#ddd",
-            }
-        },
-        data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
-    },
-    yAxis: [{
-        type: 'value',
-        offset: 6,
-        axisTick: {
-            show: false,
-        },
-        axisLine: {
-            show: false,
-        },
-        axisLabel: {
-            align: "center",
-            textStyle: {
-                color: "#666666",
-                fontSize: 12
-            },
-        },
-        // 分割线
-        splitLine: {
-            lineStyle: {
-                type: [4, 3],
-                dashOffset: 5,
-                color: "#DDDDDD",
-            },
-        },
-        // min: 0, // 最小值固定为0
-        // max: 100, // 最大值固定为100
-        // splitNumber: 5, // 设置5个分割段
-    }],
-    series: [
-        {
-            name: "花带叶率",
-            data: [40, 28, 22, 64, 28, 24, 40],
-            type: 'line',
-            smooth: true,
-            symbol: "none",
-            itemStyle: { color: "#FF7219" },
-            lineStyle: {
-                color: "#FF7219", // 折线颜色为红色
-                width: 2, // 线条宽度
-            },
-        },
-        {
-            name: "病虫害率",
-            data: [80, 88, 92, 84, 88, 74, 80],
-            type: 'line',
-            symbol: "none",
-            smooth: true,
-            itemStyle: { color: "#FFB82E" },
-            lineStyle: {
-                color: "#FFB82E", // 折线颜色为红色
-                width: 2, // 线条宽度
-            },
-        },
-        {
-            name: "来花率",
-            data: [80, 88, 92, 84, 88, 74, 80],
-            type: 'line',
-            symbol: "none",
-            smooth: true,
-            itemStyle: { color: "#ec66fb" },
-            lineStyle: {
-                color: "#ec66fb", // 折线颜色为红色
-                width: 2, // 线条宽度
-            },
-        },
-    ],
-}

+ 0 - 173
src/views/workDetail/components/commentBox.vue

@@ -1,173 +0,0 @@
-<template>
-    <div class="work-item" v-if="commentData?.expertServiceRating">
-        <div class="work-line">
-            <div class="line-box">
-                <div class="line-dotted">
-                    <div class="dotted-inset"></div>
-                </div>
-            </div>
-        </div>
-        <div class="work-info">
-            <img v-if="progress === 5" class="done-img" src="@/assets/img/gallery/done.png" />
-            <div class="card-item-title"><span class="dotted"></span>用户评价</div>
-            <div class="evaluate" v-if="commentData?.expertServiceRating">
-                <div class="comment">
-                    <div class="user-info">
-                        <el-avatar
-                            class="avatar"
-                            :size="40"
-                            :src="commentData.icon"
-                        />
-                        <div class="user-name">
-                            <div>{{ commentData.commentUserName }}</div>
-                            <span>{{ commentData.commentDate }}</span>
-                        </div>
-                    </div>
-                    <div class="rate">
-                        <div class="rate-item">
-                            <span class="name">专家</span>
-                            <el-rate disabled v-model="rateValue" size="small" />
-                        </div>
-                        <div class="line"></div>
-                        <div class="rate-item">
-                            <span class="name">农资</span>
-                            <el-rate disabled v-model="rateValue2" size="small" />
-                        </div>
-                        <div class="line"></div>
-                        <div class="rate-item">
-                            <span class="name">农服</span>
-                            <el-rate disabled v-model="rateValue3" size="small" />
-                        </div>
-                    </div>
-                    <div class="text van-multi-ellipsis--l2">
-                        {{ commentData.detailedComment }}
-                    </div>
-                </div>
-            </div>
-            <div class="comment-btn">
-                <el-button class="outline-btn btn">查看更多</el-button>
-                <el-button class="btn" type="primary" @click="toComment">去评价</el-button>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { onMounted, ref } from 'vue';
-import { useRouter } from "vue-router";
-const props = defineProps({
-    progress: {
-        type: Number,
-        required: false,
-    },
-    orderId: {
-        required: true
-    },
-    commentData: {},
-    farmWorkName: {}
-})
-
-const rateValue = ref(5)
-const rateValue2 = ref(5)
-const rateValue3 = ref(5)
-
-onMounted(() => {
-    rateValue.value = props.commentData?.expertServiceRating
-    rateValue2.value = props.commentData?.agricultureServiceRating
-    rateValue3.value = props.commentData?.farmServiceRating
-})
-
-const router = useRouter();
-const toComment = () => {
-    router.push({ path: "/work_comment", query: {orderId: props.orderId, farmName: props.farmWorkName} });
-}
-</script>
-
-<style lang="scss" scoped>
-@import "./boxClass.scss";
-.evaluate {
-    // padding-top: 16px;
-    background: #fff;
-    border-radius: 5px;
-    padding: 4px 8px 10px 8px;
-    margin-right: 8px;
-    .evaluate-title {
-        font-size: 16px;
-        font-weight: 500;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        margin-bottom: 8px;
-        .more {
-            font-size: 14px;
-            color: #999999;
-            font-weight: 400;
-            display: flex;
-            align-items: center;
-        }
-    }
-    .rate {
-        display: flex;
-        justify-content: space-between;
-        ::v-deep {
-            .el-rate {
-                --el-rate-icon-margin: 0;
-            }
-            .el-rate--small .el-rate__icon {
-                font-size: 12px;
-            }
-        }
-        .rate-item {
-            display: flex;
-            align-items: center;
-            // background: #f5f5f5;
-            border-radius: 4px;
-            padding: 4px 0px;
-            font-size: 11px;
-            .name {
-                margin-right: 2px;
-                color: #666666;
-                position: relative;
-                top: 2px;
-            }
-            .num {
-                color: #f3c11d;
-                margin-left: 2px;
-            }
-        }
-        .line {
-            width: 1px;
-            height: 12px;
-            background: #CDD7E1;
-            position: relative;
-            top: 10px;
-        }
-    }
-    .comment {
-        margin-top: 12px;
-        .user-info {
-            display: flex;
-            align-items: center;
-            margin-bottom: 2px;
-            .user-name {
-                font-weight: 500;
-                margin-left: 8px;
-                span {
-                    font-weight: 400;
-                    font-size: 12px;
-                    color: #999999;
-                }
-            }
-        }
-    }
-}
-
-.comment-btn {
-    display: flex;
-    padding-top: 12px;
-    margin-right: 10px;
-    .btn {
-        flex: 1;
-    }
-}
-</style>

+ 0 - 174
src/views/workDetail/components/enterBox.vue

@@ -1,174 +0,0 @@
-<template>
-    <div class="work-item " :class="{ dark: progress === 0 || progress === 1, 'has-bottom-btn': progress === 2 || progress === 3 || progress === 4, 'last-enter':  progress !== 5}">
-        <div class="work-line">
-            <div class="line-box">
-                <div class="line-dotted">
-                    <div class="dotted-inset"></div>
-                </div>
-            </div>
-        </div>
-        <div class="work-info">
-            <img v-if="progress === 2" class="todo-img" src="@/assets/img/gallery/enter.png" />
-            <img v-if="progress === 3 || progress === 4" class="done-img" src="@/assets/img/gallery/done.png" />
-            <div class="card-item-title"><span class="dotted"></span>参与主体</div>
-            <div class="prescription-box">
-                <div class="prescription-item">
-                    <div class="enter-info" v-if="progress === 4">
-                        <div class="enter-l">亩数价格:<span>1500元/亩</span></div>
-                        <div class="enter-r">服务亩数:<span>1000亩</span></div>
-                    </div>
-                    <div class="enter-top" v-if="progress === 2 || progress === 3">
-                        <div class="enter-info">
-                            <div class="enter-l">当前价格:<span>1亩/1500元</span></div>
-                            <div class="enter-r">亩数:<span>500亩/1000亩</span></div>
-                        </div>
-                        <div class="price-text">
-                            还差<span>500亩</span>可享<span>九折</span>价格
-                        </div>
-                    </div>
-                    <div class="step-3-info">
-                        <div class="step-info-item">
-                            <div class="info-serve-l">
-                                <span class="type-name">农户:</span>
-                                <div class="img-list" v-if="progress === 4">
-                                    <template v-for="item in users" :key="item.id">
-                                      <div class="img-item" v-if="item.userType == 1 && item.joinStatus === 1">
-                                        <img class="serve-img" :src="item.icon" />
-                                        <!-- <img class="checked-icon" v-if="item.joinStatus === 1" src="@/assets/img/gallery/checked.png" /> -->
-                                      </div>
-                                    </template>
-                                </div>
-                                <div class="img-list" v-else>
-                                    <template v-for="item in users" :key="item.id">
-                                      <div class="img-item" v-if="item.userType == 1">
-                                        <img class="serve-img" :src="item.icon" />
-                                        <img class="checked-icon" v-if="item.joinStatus === 1" src="@/assets/img/gallery/checked.png" />
-                                      </div>
-                                    </template>
-                                </div>
-                            </div>
-                            <div class="info-serve-r" @click="showDialog(users)">查看详情</div>
-                        </div>
-                        <div class="step-info-item">
-                            <div class="info-serve-l">
-                                <span class="type-name">农服:</span>
-                                <div class="img-list" v-if="progress === 4">
-                                  <template v-for="item in users" :key="item.id">
-                                    <div class="img-item" v-if="item.userType == 2 && item.joinStatus === 1">
-                                        <img class="serve-img" :src="item.icon" />
-                                    </div>
-                                  </template>
-                                </div>
-                                <div class="img-list" v-else>
-                                  <template v-for="item in users" :key="item.id">
-                                    <div class="img-item" v-if="item.userType == 2">
-                                        <img class="serve-img" :src="item.icon" />
-                                        <img class="checked-icon" v-if="item.joinStatus === 1" src="@/assets/img/gallery/checked.png" />
-                                    </div>
-                                  </template>
-                                </div>
-                            </div>
-                            <div class="info-serve-r" @click="showDialog(users)">查看详情</div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-
-        <div class="enter-btn" v-if="progress === 2 && (ROLETYPE === '2')">
-            <el-button class="btn" type="primary" @click="lockWork(3)">开始执行</el-button>
-        </div>
-        <div class="enter-btn" v-if="progress === 3 && (ROLETYPE === '2')">
-            <el-button class="btn" type="primary" @click="lockWork(4)">执行完成</el-button>
-        </div>
-        <div class="enter-btn" v-if="progress === 4 && (ROLETYPE === '2')">
-            <el-button class="btn" type="primary" @click="lockWork(0)">邀请评价</el-button>
-        </div>
-        <!-- 农户、农服 -->
-        <div class="enter-btn" v-if="progress === 2 && (ROLETYPE === '0' || ROLETYPE === '1')">
-            <el-button class="btn" type="primary" @click="joinWork">确认加入</el-button>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import eventBus from "@/api/eventBus";
-
-import { useStore } from "vuex";
-const store = useStore();
-const ROLETYPE = store.state.app.curRole
-
-const props = defineProps({
-    progress: {
-        type: Number,
-        required: false,
-    },
-    users: {
-        type: Array,
-        required: false,
-    },
-    orderId: {
-        type: [Number, String],
-        required: false,
-    },
-});
-
-// 农户农服加入
-const joinWork = () => {
-    console.log('props.orderId', props.orderId);
-    VE_API.order.fetchFarmerJoin({orderId: props.orderId}).then(({ code }) => {
-        if (code == 0) {
-            console.log('加入成功');
-            eventBus.emit('discover:submitForm')
-            window.location.reload()
-        }
-    });
-}
-
-// 农资锁单
-const lockWork = (orderStatus) => {
-    const data = {
-        orderId: props.orderId,
-        orderStatus,
-    };
-    VE_API.order.confirm(data).then(({ code }) => {
-        if (code == 0) {
-            console.log('成功');
-            eventBus.emit('discover:submitForm')
-            window.location.reload()
-        }
-    });
-}
-
-const showDialog = (data) => {
-    eventBus.emit("enterBox:showDialog", data)
-}
-</script>
-
-<style lang="scss" scoped>
-@import "./boxClass.scss";
-.enter-info {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    color: #BBBBBB;
-    font-size: 14px;
-    span {
-        color: #008EFF;
-    }
-}
-.enter-top {
-    .price-text {
-        margin-top: 5px;
-        font-size: 14px;
-        padding: 2px 10px;
-        border-radius: 30px 0 0 30px;
-        color: rgba(255, 255, 255, 0.6);
-        background: linear-gradient( to right, #2199F8, #FFFFFF);
-        span {
-            padding: 0 4px;
-            color: #fff;
-        }
-    }
-}
-</style>

+ 0 - 180
src/views/workDetail/components/executionProgress.vue

@@ -1,180 +0,0 @@
-<template>
-    <div class="work-item">
-        <div class="work-line">
-            <div class="line-box">
-                <div class="line-dotted">
-                    <div class="dotted-inset"></div>
-                </div>
-            </div>
-        </div>
-        <div class="work-info">
-            <img class="todo-img" src="@/assets/img/gallery/todo.png" />
-            <img v-if="progress === 5" class="done-img" src="@/assets/img/gallery/done.png" />
-            <div class="card-item-title"><span class="dotted"></span>执行进度</div>
-            <div class="execution-content">
-                <div class="execution-text">正在实时记录当前执行轨迹</div>
-                <div class="execution-map">
-                    <div class="bottom-map" ref="executionRef"></div>
-                </div>
-
-                <div class="execution-text">执行农事区域</div>
-
-                <div class="prescription-chart prescription-map">
-                    <execute-blue-region :executeBlueRegion="executionData.executeBlueRegion"></execute-blue-region>
-                </div>
-            </div>
-            <div class="comment-btn">
-                <el-button class="outline-btn btn">结束任务</el-button>
-                <el-button class="outline-btn btn">暂停任务</el-button>
-                <el-button class="btn" type="primary">分享协作</el-button>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import ExecuteBlueRegion from "./executeBlueRegion";
-import * as util from "@/common/ol_common.js";
-import config from "@/api/config.js";
-import LineString from "ol/geom/LineString.js";
-import * as KMap from "@/utils/ol-map/KMap";
-import { Vector as VectorSource } from "ol/source.js";
-import { Vector as LayerVector } from "ol/layer";
-import Icon from "ol/style/Icon";
-import { newPoint } from "@/views/util";
-import Style from "ol/style/Style";
-import Stroke from "ol/style/Stroke";
-import Feature from "ol/Feature";
-const props = defineProps({
-    progress: {
-        type: Number,
-        required: false,
-    },
-    executionData: {},
-});
-
-const executionRef = ref(null);
-
-onMounted(() => {
-    initMap();
-});
-
-const initMap = () => {
-    let vectorStyle = new KMap.VectorStyle();
-    let level = 16;
-    let coordinate = util.wktCastGeom("POINT(113.6142086995688 23.585836479509055)").getFirstCoordinate();
-    let kmap = new KMap.Map(executionRef.value, level, coordinate[0], coordinate[1], null, 1, 22, "img");
-
-    let xyz = config.base_img_url + "map/lby/{z}/{x}/{y}.png";
-    kmap.addXYZLayer(xyz, { minZoom: 8, maxZoom: 22 }, 2);
-    // let xyz2 = config.base_img_url3 + "map/lby/{z}/{x}/{y}.png";
-    // kmap.addXYZLayer(xyz2, { minZoom: 8, maxZoom: 22 }, 2);
-    setLine(kmap);
-    setMapPoint(kmap);
-};
-
-// 航线
-const setLine = (kmap) => {
-    let flyLineLayer = null;
-    flyLineLayer && flyLineLayer.getSource().clear();
-    // 定义线的坐标
-    let lineCoordinates = [
-        [113.61497958300038, 23.58644139996892], // 起点
-        [113.61508237571593, 23.586383341120325],
-        [113.61486060995014, 23.586364305432255],
-        [113.61483681534014, 23.58650707309272],
-    ];
-
-    // 创建线的几何对象
-    let lineGeometry = new LineString(lineCoordinates);
-
-    // 创建特征对象
-    let lineFeature = new Feature({
-        geometry: lineGeometry,
-    });
-
-    // 创建矢量图层并添加到地图
-    flyLineLayer = new LayerVector({
-        source: new VectorSource({
-            features: [lineFeature], // 添加线特征
-        }),
-        style: new Style({
-            stroke: new Stroke({
-                color: "#fff",
-                width: 3,
-                lineDash: [10, 8], // 10像素的实线,5像素的空白
-            }), // 线条颜色
-        }),
-        zIndex: 1000,
-    });
-    console.log('extent', flyLineLayer.getSource().getExtent());
-    kmap.fit(flyLineLayer.getSource().getExtent(),[20,20,20,20])
-    kmap.addLayer(flyLineLayer);
-};
-
-const setMapPoint = (kmap) => {
-    // 位置图标
-    let pointLayer = new KMap.VectorLayer("pointLayer", 99999, {
-        style: () => {
-            return new Style({
-                image: new Icon({
-                    src: require("@/assets/img/gallery/star.png"),
-                    scale: 0.5,
-                }),
-            });
-        },
-        minZoom: 1,
-        maxZoom: 22,
-    });
-    let currentPointLayer = new KMap.VectorLayer("pointLayer", 99999, {
-        style: () => {
-            return new Style({
-                image: new Icon({
-                    src: require("@/assets/img/gallery/current.png"),
-                    scale: 0.5,
-                }),
-            });
-        },
-        minZoom: 1,
-        maxZoom: 22,
-    });
-    // 图标点位
-    let point = { wkt: "POINT(113.61483681534014 23.58650707309272)" };
-    let mapPoint = newPoint(point, "wkt");
-    pointLayer.addFeature(mapPoint);
-    kmap.addLayer(pointLayer.layer);
-    // 当前图标
-    let currentPoint = { wkt: "POINT(113.61497958300038 23.58644139996892)" };
-    let mapCurrentPoint = newPoint(currentPoint, "wkt");
-    currentPointLayer.addFeature(mapCurrentPoint);
-    kmap.addLayer(currentPointLayer.layer);
-};
-</script>
-
-<style lang="scss" scoped>
-@import "./boxClass.scss";
-
-.comment-btn {
-    display: flex;
-    padding-top: 12px;
-    margin-right: 10px;
-    .btn {
-        flex: 1;
-    }
-}
-
-.execution-text {
-    font-size: 14px;
-    padding: 8px 0 10px 0;
-    color: #2199f8;
-}
-.execution-map {
-    padding-bottom: 4px;
-    .bottom-map {
-        width: 100%;
-        height: 150px;
-        border-radius: 8px;
-    }
-}
-</style>

+ 0 - 573
src/views/workDetail/components/prescriptionBox.vue

@@ -1,573 +0,0 @@
-<template>
-    <!-- 专家处方 -->
-    <!-- <div class="work-item" :class="{ dark: prescriptioData?.orderStatus === 0 && ROLETYPE != '3' }"> -->
-    <div class="work-item">
-        <div class="work-info">
-            <!-- <img
-                v-if="prescriptioData?.orderStatus === 0 && ROLETYPE == '3'"
-                class="todo-img"
-                src="@/assets/img/gallery/todo.png"
-            /> -->
-            <div class="prescription-box">
-                <div class="step-box">
-                    <step-box
-                        :orderStatus="infoItem.orderStatus"
-                        v-if="infoItem.orderStatus || infoItem.orderStatus === 0"
-                    ></step-box>
-                </div>
-                <div class="work-info-conetnt">
-                    <div class="info-item">
-                        <div class="info-name">农事编号:</div>
-                        <div class="info-value">{{ infoItem.orderId }}</div>
-                    </div>
-                    <div class="info-item">
-                        <div class="info-name">服务亩数:</div>
-                        <div class="info-value">{{ infoItem.area }}亩</div>
-                    </div>
-                    <div class="info-item">
-                        <div class="info-name">服务区域:</div>
-                        <div class="info-value">{{ infoItem.serviceRegion }}</div>
-                    </div>
-                    <div v-if="prescriptioData?.orderStatus === 0 && ROLETYPE == '3'">
-                        <div class="info-item">
-                            <div class="info-name">触发条件:</div>
-                            <div class="info-value">
-                                {{ infoItem.condition }}
-                                <div class="select-value">
-                                    <el-select v-model="infoItem.condition" placeholder="请选择" style="width: 80px">
-                                        <el-option v-for="num in 9" :key="num" :value="20 + (num - 1) * 5 + '%'">
-                                            {{ 20 + (num - 1) * 5 }}%
-                                        </el-option>
-                                    </el-select>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="info-item time-picker">
-                            <div class="info-name">执行时间:</div>
-                            <div class="info-value">
-                                <el-date-picker
-                                    style="width: 150px"
-                                    value-format="YYYY-MM-DD"
-                                    v-model="infoItem.executeDate"
-                                    type="date"
-                                    :clearable="false"
-                                    class="date-info"
-                                    placeholder="选择日期"
-                                />
-                            </div>
-                        </div>
-                    </div>
-                    <div v-else>
-                        <div class="info-item">
-                            <div class="info-name">触发条件:</div>
-
-                            <div class="info-value">{{ infoItem.condition }}</div>
-                        </div>
-                        <div class="info-item">
-                            <div class="info-name">执行时间:</div>
-                            <div class="info-value">{{ infoItem.executeDate }}</div>
-                        </div>
-                    </div>
-                </div>
-                <!-- <div class="desc">
-                    {{ prescriptioData.expertPrescription || prescriptioData.weatherWarningMsg }}
-                </div> -->
-                <!-- 显示简略信息 -->
-                <!-- v-if="prescriptioData?.orderStatus === 0 && ROLETYPE == '3'" -->
-                <div class="prescription-item">
-                    <div class="recipe-box">
-                        <div class="recipe-title">
-                            <div class="recipe-name">药物处方</div>
-                        </div>
-                        <div class="usage-mode">
-                            施用方式:<span>{{ prescriptioData.usageMode }}</span>
-                        </div>
-                        <div class="new-wrap">
-                            <div class="new-title">
-                                <div class="title-1"><div class="table-name">使用功效</div></div>
-                                <div class="title-2"><div class="table-name">肥药名称</div></div>
-                                <div class="title-3"><div class="table-name">执行方式</div></div>
-                                <div class="title-4"><div class="table-name">药肥配比</div></div>
-                                <div class="title-5"><div class="table-name">单亩用量</div></div>
-                            </div>
-                            <div
-                                class="new-table-wrap"
-                                v-for="(prescriptionItem, prescriptionI) in prescriptioData.prescriptionList"
-                                :key="prescriptionI"
-                            >
-                                <div
-                                    class="new-prescription"
-                                    v-for="(subP, subI) in prescriptionItem.pesticideFertilizerList"
-                                    :key="subI"
-                                >
-                                    <div class="new-table">
-                                        <div class="line-l">
-                                            <div class="line-1 title-1">{{ subP.typeName }}</div>
-                                            <div class="line-2">{{ subP.defaultName }}</div>
-                                        </div>
-                                        <div class="line-r" :class="{'has-border': prescriptioData.usageMode === '叶面施'}">
-                                            <div class="line-3">
-                                                <div class="sub-line title-3" :class="{'execute-line': prescriptioData.usageMode === '叶面施'}">人工</div>
-                                                <div class="sub-line title-4">1:{{ subP.ratio }}{{ subP.unit }}</div>
-                                                <div class="sub-line title-5">{{ subP.muUsage }}{{ subP.unit }}</div>
-                                            </div>
-                                            <div class="line-4" v-if="prescriptioData.usageMode === '叶面施'">
-                                                <div class="sub-line title-3 execute-line">无人机</div>
-                                                <div class="sub-line title-4">{{ subP.ratio2 ? subP.ratio2 : "---" }}</div>
-                                                <div class="sub-line title-5">{{ subP.muUsage2 ? subP.muUsage2 : "---" }}</div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="note-text" v-if="subP.remark">{{ subP.remark }}</div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div class="prescription-item" v-if="prescriptioData?.orderStatus === 0">
-                    <div class="sub-title">
-                        <div class="sub-line"></div>
-                        <div class="sub-name">指标动态</div>
-                        <div class="sub-line"></div>
-                    </div>
-                    <div class="prescription-chart">
-                        <!-- <chart :key="1" type="feature" :indexName="infoItem.indexName" :chartJson="prescriptioData.indexJson"></chart> -->
-                    </div>
-                </div>
-                <div class="prescription-item" v-if="prescriptioData?.orderStatus === 0 && ROLETYPE == '3'">
-                    <el-button class="btn" type="danger" plain @click="remove()">删除</el-button>
-                    <el-button class="btn" type="primary" @click="submitForm(formRef)">确认下发</el-button>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ElMessage, ElMessageBox } from "element-plus";
-import eventBus from "@/api/eventBus";
-import chart from "./chart.vue";
-import { onActivated, onMounted, reactive, ref } from "vue";
-import { useStore } from "vuex";
-import stepBox from "@/components/common/stepBox.vue";
-import customTable from "./table.vue";
-import { useRouter, useRoute } from "vue-router";
-const router = useRouter();
-
-const props = defineProps({
-    prescriptioData: {
-        type: Object,
-    },
-});
-
-const tableHeader = [
-    {
-        name: "使用功效",
-        props: "typeName",
-    },
-    {
-        name: "肥药名称",
-        props: "defaultName",
-    },
-    {
-        name: "执行方式",
-        props: "usageMode1",
-    },
-    {
-        name: "药肥配比",
-        props: "usageMode",
-    },
-    {
-        name: "单亩用量",
-        props: "muUsage",
-    },
-];
-
-const tableData = ref([
-    {
-        brand: "",
-        defaultDroneRatio: null,
-        defaultName: "灌水",
-        defaultRatio: null,
-        executeStyle: null,
-        id: "686142764512972800",
-        muPrice: null,
-        muUsage: 222,
-        muUsage2: null,
-        orderId: "686142764492001280",
-        pesticideFertilizerCode: "",
-        pesticideFertilizerId: "15",
-        pesticideFertilizerName: "灌水",
-        price: null,
-        ratio: 11,
-        ratio2: null,
-        remark: "",
-        typeName: "调节",
-        unit: "kg",
-        usageMode: "",
-        list: [],
-    },
-]);
-
-const infoItem = ref({});
-
-const store = useStore();
-const ROLETYPE = '3';
-// const ROLETYPE = store.state.app.curRole;
-
-// 农事类型--区分表格显示字段等
-const workType = ref(false);
-
-let pesticideFertilizersOptions = ref([
-    {
-        id: "null",
-        name: "芸苔素内酯 15000倍",
-        typeName: "30",
-        defaultRatio: null,
-        defaultDroneRatio: null,
-        unit: 0,
-        defaultName: "调节",
-    },
-]);
-VE_API.order.pesticideFertilizers().then(({ data }) => {
-    pesticideFertilizersOptions.value = data;
-    tableData.value[0].list = data;
-});
-
-onMounted(() => {
-    dynamicValidateForm.usageMode = props.prescriptioData.usageMode;
-    dynamicValidateForm.prescriptionList = props.prescriptioData.prescriptionList.map((item) => ({ ...item }));
-    // submit()    // submit()
-    console.log("dynamicValidateForm.domains",props.prescriptioData);
-    infoItem.value = props.prescriptioData;
-    if(infoItem.value.area)
-      infoItem.value.area = infoItem.value.area.toFixed(2);
-    for(let item of  infoItem.value.conditionList){
-      infoItem.value.condition=item.name + "大于" + (parseFloat(item.value) * 100) + "%";
-    }
-});
-
-// 表单
-const formRef = ref();
-const dynamicValidateForm = reactive({
-    name: "",
-    conditionRate: "",
-    executeDate: "",
-    usageMode: "",
-    prescriptionList: [
-        {
-            name: "",
-            pesticideFertilizerList: [
-                {
-                    key: 1,
-                    typeName: "",
-                    muUsage: "",
-                    muUsage2: "",
-                    ratio: "",
-                    ratio2: "",
-                    remark: "",
-                },
-            ],
-        },
-    ],
-});
-
-const addDomain = (parentIndex) => {
-    dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.unshift({
-        key: Date.now(),
-        muUsage: "",
-        muUsage2: "",
-        ratio: "",
-        ratio2: "",
-        remark: "",
-    });
-};
-
-const removeDomain = (parentIndex, item) => {
-    const index = dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.indexOf(item);
-    if (index !== -1) {
-        dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.splice(index, 1);
-    }
-};
-
-const resetItemForm = (parentIndex, index) => {
-    dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index] = {
-        typeName: "",
-        muUsage: "",
-        muUsage2: "",
-        ratio: "",
-        ratio2: "",
-        remark: "",
-    };
-};
-/**
- * 选择药肥的时候修改订单中药肥pesticideFertilizerId 以外其他数据
- * @param index
- */
-const handlePesticideFertilizerChange = (index) => {
-    let obj = pesticideFertilizersOptions.value.filter(
-        (item) => dynamicValidateForm.domains[index].pesticideFertilizerId === item.id
-    )[0];
-    dynamicValidateForm.domains[index] = {
-        ...dynamicValidateForm.domains[index],
-        typeName: obj.typeName,
-        unit: obj.unit,
-        defaultRatio: obj.defaultRatio,
-        usageModeList: obj.usageModeList,
-        ratio: obj.defaultRatio,
-        defaultName: obj.defaultName,
-        pesticideFertilizerName: obj.name,
-    };
-    console.log(dynamicValidateForm.domains);
-};
-
-const submitForm = (formEl) => {
-    if (!formEl) return;
-    formEl.validate((valid) => {
-        if (valid) {
-            submit();
-        } else {
-            console.log("error submit!");
-        }
-    });
-};
-
-const submit = () => {
-    const data = {
-        orderId: props.prescriptioData.orderId,
-        orderStatus: 1,
-        pesticideFertilizers: dynamicValidateForm.domains,
-    };
-    VE_API.order.confirm(data).then(({ code }) => {
-        if (code == 0) {
-            console.log("专家下发处方成功");
-            eventBus.emit("discover:submitForm");
-            window.location.reload();
-        }
-    });
-};
-
-const formatIndex = (index) => {
-    return String(index + 1).padStart(2, "0");
-};
-
-const handleTableData = (item) => {
-    return [
-        {
-            typeName: item.typeName,
-            defaultName: item.defaultName,
-            executeStyle: 1,
-            ratio: item.ratio || item.defaultRatio,
-            usageMode: item.usageMode,
-            muUsage: item.muUsage,
-            unit: item.unit,
-        },
-        {
-            typeName: item.typeName,
-            defaultName: item.defaultName,
-            executeStyle: 2,
-            ratio: item.ratio2,
-            usageMode: "---",
-            muUsage: item.muUsage2,
-            unit: item.unit,
-        },
-    ];
-};
-
-const remove = () => {
-    ElMessageBox.confirm("是否要删除这个农事?", "警告", {
-        confirmButtonText: "删除",
-        cancelButtonText: "取消",
-        type: "warning",
-    }).then(() => {
-        VE_API.farm.deleteFarmWork({ libId: infoItem.value.farmWorkLibId }).then(({ code }) => {
-            if (code === 0) {
-                ElMessage({
-                    type: "success",
-                    message: "删除成功!",
-                });
-                setTimeout(() => {
-                    // router.go(-1);
-                    router.replace("/expert_album?reload=true");
-                }, 500);
-            }
-        });
-    });
-};
-</script>
-
-<style lang="scss" scoped>
-@import "./boxClass.scss";
-.recipe-box {
-    .recipe-title {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        margin-bottom: 10px;
-        padding-left: 10px;
-        position: relative;
-        &::before {
-            content: "";
-            position: absolute;
-            left: 0;
-            top: 3px;
-            width: 3px;
-            height: 15px;
-            background: #fff;
-            border-radius: 11px;
-        }
-        .recipe-name {
-            color: #fff;
-            font-size: 15px;
-        }
-        .recipe-btn {
-            color: #FFD489;
-            display: flex;
-            align-items: center;
-            cursor: pointer;
-            .icon{
-                margin-right: 3px;
-            }
-        }
-    }
-    .usage-mode {
-        display: flex;
-        align-items: center;
-        font-size: 16px;
-        color: #727272;
-        padding: 2px 0 12px 0;
-        span {
-            color: #fff;
-        }
-    }
-}
-.prescription-result {
-    position: relative;
-    &.has-wrap {
-        border: 0.5px solid #444444;
-        border-radius: 4px;
-        padding: 8px 10px 10px 10px;
-    }
-    .result-index {
-        position: absolute;
-        left: -1px;
-        top: -1px;
-        padding: 0 8px;
-        background: #2199f8;
-        color: #fff;
-        font-size: 12px;
-        border-radius: 4px 0 4px 0;
-    }
-    .result-title {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        padding-bottom: 8px;
-        .title-item {
-            display: flex;
-            align-items: center;
-            .name {
-                color: rgba(33, 153, 248, 0.85);
-            }
-            .value {
-                color: rgba(0, 0, 0, 0.4);
-            }
-        }
-        .title-item + .title-item {
-            padding-left: 16px;
-        }
-    }
-}
-.new-wrap {
-    border-radius: 5px;
-    text-align: center;
-    border: 1px solid #444444;
-    .new-title {
-        background: rgba(255, 255, 255, 0.04);
-        border-radius: 5px 5px 0 0;
-        display: flex;
-        color: #727272;
-        // justify-content: space-around;
-        padding: 5px 6px;
-        font-size: 14px;
-        .table-name {
-            width: 40px;
-            font-size: 14px;
-            margin: 0 auto;
-        }
-    }
-
-    .title-1 {
-        width: 62px;
-    }
-    .title-2 {
-        flex: 1;
-    }
-    .title-3 {
-        width: 64px;
-    }
-    .title-4 {
-        width: 76px;
-    }
-    .title-5 {
-        width: 68px;
-    }
-    .new-table-wrap {
-        .new-prescription {
-            padding: 0 8px;
-            .new-table {
-                display: flex;
-                align-items: center;
-                // border: 1px solid #444444;
-                border-radius: 5px;
-                color: #CECECE;
-                font-size: 16px;
-                .line-l {
-                    display: flex;
-                    flex: 1;
-                    padding: 8px 0;
-                    .line-2 {
-                        flex: 1;
-                        padding: 0 2px;
-                    }
-                }
-                .line-r {
-                    // padding: 8px 0;
-                    &.has-border {
-                        border-left: 1px solid #444444;
-                    }
-                    .line-3 {
-                        display: flex;
-                        align-items: center;
-                    }
-                    .sub-line {
-                        padding: 10px 0;
-                    }
-                    .line-4 {
-                        display: flex;
-                        align-items: center;
-                        border-top: 1px solid #444444;
-                    }
-                    .execute-line {
-                        border-right: 1px solid #444444;
-                    }
-                }
-
-            }
-            .note-text {
-                // margin: 8px 0 4px 0;
-                color: #9F9F9F;
-                background: rgba(255, 255, 255, 0.05);
-                padding: 6px 8px;
-                border-radius: 5px;
-                text-align: left;
-                font-size: 16px;
-            }
-        }
-        .new-prescription + .new-prescription {
-            // margin-top: 8px;
-            border-top: 1px solid #444444;
-        }
-    }
-}
-</style>

+ 0 - 263
src/views/workDetail/components/recheckBox.vue

@@ -1,263 +0,0 @@
-<template>
-    <div class="work-item last-enter">
-        <div class="work-line">
-            <div class="line-box">
-                <div class="line-dotted">
-                    <div class="dotted-inset"></div>
-                </div>
-            </div>
-        </div>
-        <div class="work-info">
-            <img class="done-img" src="@/assets/img/gallery/done.png" />
-            <div class="card-item-title"><span class="dotted"></span>复核对比</div>
-            <div class="recheck-content">
-                <div class="sub-title">报价处方</div>
-                <div class="over-img">
-                    <!-- 图片列表 -->
-                    <div class="carousel-wrapper" :style="carouselStyle">
-                        <photo-provider :photo-closable="true">
-                            <photo-consumer
-                                class="carousel-item"
-                                v-for="(photo, index) in treeImgList"
-                                :key="index"
-                                :src="base_img_url2 + photo.filename + resize"
-                            >
-                                <div class="img-two">
-                                    <img :id="'img1' + index" :src="base_img_url2 + photo.filename + resize" />
-                                    <img :id="'img2' + index" :src="base_img_url2 + photo.filename + resize" />
-                                    <div class="tag tag-l">执行前</div>
-                                    <div class="tag tag-r">执行后</div>
-                                </div>
-                            </photo-consumer>
-                        </photo-provider>
-                    </div>
-
-                    <!-- 左右箭头 -->
-                    <div @click="prev" class="arrow left-arrow">
-                        <el-icon color="#F0D09C" size="20"><ArrowLeftBold /></el-icon>
-                    </div>
-                    <div @click="next" class="arrow right-arrow">
-                        <el-icon color="#F0D09C" size="20"><ArrowRightBold /></el-icon>
-                    </div>
-                </div>
-
-                <div class="compare-b">
-                    <div class="sub-title">指标动态</div>
-                    <div class="compare-chart">
-                        <!-- <chart
-                                        :key="'compare' + workItem.id"
-                                        :indexName="workItem.indexName"
-                                        :type="workItem.status !== 1 ? 'normal' : 'feature'"
-                                        :chartData="workItem.indexChart"
-                                    ></chart> -->
-
-                        <chart :key="1" type="feature" :chartJson="indexJson"></chart>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, computed } from "vue";
-import { base_img_url2, resize } from "@/api/config";
-import chart from "./chart.vue";
-const props = defineProps({
-    progress: {
-        type: Number,
-        required: false,
-    },
-    indexJson: {},
-});
-
-const treeImgList = ref([
-    {
-        filename:
-            "b68f2665-fd4c-4f54-a875-56ba882c85a1/cf9512f7-c55f-4cdc-ac68-3e58814fc378/DJI_202501201000_001_cf9512f7-c55f-4cdc-ac68-3e58814fc378/DJI_20250120100535_0012_Z_code-ws0y1mmqk4sp.jpeg",
-    },
-    {
-        filename:
-            "b68f2665-fd4c-4f54-a875-56ba882c85a1/cf9512f7-c55f-4cdc-ac68-3e58814fc378/DJI_202501201000_001_cf9512f7-c55f-4cdc-ac68-3e58814fc378/DJI_20250120100514_0011_Z_code-ws0y1mmqz3k2.jpeg",
-    },
-    {
-        filename:
-            "b68f2665-fd4c-4f54-a875-56ba882c85a1/cf9512f7-c55f-4cdc-ac68-3e58814fc378/DJI_202501201000_001_cf9512f7-c55f-4cdc-ac68-3e58814fc378/DJI_20250120100348_0006_Z_code-ws0y1mmnxuqb.jpeg",
-    },
-    {
-        filename:
-            "b68f2665-fd4c-4f54-a875-56ba882c85a1/cf9512f7-c55f-4cdc-ac68-3e58814fc378/DJI_202501201000_001_cf9512f7-c55f-4cdc-ac68-3e58814fc378/DJI_20250120100217_0001_Z_code-ws0y1mkyefed.jpeg",
-    },
-]);
-
-const updateImagePosition = () => {
-    carouselStyle.value.transform = `translateX(-${currentIndex.value * 100}%)`;
-};
-const currentIndex = ref(0);
-// 计算轮播图样式
-const carouselStyle = computed(() => {
-    return {
-        transform: `translateX(-${currentIndex.value * 100}%)`,
-    };
-});
-// 下一张图片
-const next = () => {
-    // 图片总数
-    const totalImages = treeImgList.value.length;
-    currentIndex.value = (currentIndex.value + 1) % totalImages;
-    updateImagePosition();
-};
-
-// 上一张图片
-const prev = () => {
-    // 图片总数
-    const totalImages = treeImgList.value.length;
-    currentIndex.value = (currentIndex.value - 1 + totalImages) % totalImages;
-    updateImagePosition();
-};
-</script>
-
-<style lang="scss" scoped>
-@import "./boxClass.scss";
-
-.recheck-content {
-    padding-right: 10px;
-    .sub-title {
-        color: #2199f8;
-    }
-    .over-img {
-        margin-top: 8px;
-        width: 100%;
-        overflow: hidden;
-        transition: transform 0.5s ease;
-        display: flex;
-        position: relative;
-        .carousel-container {
-            flex: none;
-            // transform: translateX(-100%);
-            transition: transform 0.5s ease;
-            &.hideMap {
-                flex: none;
-                transform: translateX(0);
-                // transform: translateX(-100%);
-            }
-            position: relative;
-            width: 100%;
-            overflow: hidden;
-            margin: 0 auto;
-        }
-
-        .carousel-wrapper {
-            display: flex;
-            transition: transform 0.5s ease;
-            width: 100%;
-            height: 100%;
-        }
-
-        .carousel-item {
-            min-width: 100%;
-            flex-shrink: 0;
-            width: 100%;
-            pointer-events: auto;
-            position: relative;
-            .img-two {
-                display: flex;
-                position: relative;
-                .tag {
-                    position: absolute;
-                    bottom: 0;
-                    background: rgba(0, 0, 0, 0.6);
-                    color: #fff;
-                    font-size: 10px;
-                    padding: 2px 10px;
-                }
-                .tag-l {
-                    left: 0;
-                    border-radius: 0 5px 0 5px;
-                }
-                .tag-r {
-                    right: 0;
-                    border-radius: 5px 0 0 5px;
-                }
-            }
-        }
-
-        .carousel-item img {
-            width: 50%;
-            display: block;
-        }
-
-        .overlay {
-            position: absolute;
-            top: 0;
-            right: 0;
-            background: rgba(255, 255, 255, 0.3);
-            width: 100%;
-            height: 100%;
-            transition: width 0.5s ease-in-out;
-        }
-
-        .percentage {
-            position: absolute;
-            bottom: 0;
-            width: 100%;
-        }
-
-        .arrow {
-            position: absolute;
-            top: 50%;
-            transform: translateY(-50%);
-            background: rgba(0, 0, 0, 0.5);
-            width: 36px;
-            height: 36px;
-            border-radius: 50%;
-            display: inline-flex;
-            align-items: center;
-            justify-content: center;
-            cursor: pointer;
-        }
-
-        .left-arrow {
-            left: 16px;
-        }
-
-        .right-arrow {
-            right: 16px;
-        }
-        ::v-deep {
-            .el-carousel__arrow {
-                background: rgba(0, 0, 0, 0.5);
-            }
-            .PhotoConsumer {
-                width: 100%;
-                height: 100%;
-                img {
-                    width: calc(50% - 4px);
-                    height: 100%;
-                    // height: 300px;
-                    // max-height: 500px;
-                    object-fit: scale-down;
-                    border-radius: 5px;
-                }
-                img + img {
-                    padding-left: 8px;
-                }
-            }
-        }
-    }
-    .compare-b {
-        padding: 12px 0 8px 0;
-        .compare-chart {
-            margin-top: 8px;
-            background: #eaf4ff;
-            border-radius: 5px;
-            padding: 4px 0 8px 0;
-            ::v-deep {
-                .card-chart {
-                    height: 160px;
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 247
src/views/workDetail/components/recheckBox2.vue

@@ -1,247 +0,0 @@
-<template>
-    <div class="work-item last-enter">
-        <div class="work-line">
-            <div class="line-box">
-                <div class="line-dotted">
-                    <div class="dotted-inset"></div>
-                </div>
-            </div>
-        </div>
-        <div class="work-info">
-            <div class="card-item-title" style="color: #ffffff;"><span class="dotted"></span>本次农事复核成效优异,作物产量潜力实现大幅增长,杀小叶情况优秀,小叶率在5%以内</div>
-            <div class="recheck-content">
-                <div class="over-img">
-                    <!-- 图片列表 -->
-                    <div class="carousel-wrapper" :style="carouselStyle">
-                      <photo-provider :photo-closable="true">
-                        <template v-for="(photo, index) in treeImgList"
-                                   :key="index">
-                          <photo-consumer
-                              class="carousel-item"
-                              :src="photo.filename"
-                          >
-                            <div class="img-two">
-                              <img :id="'img1' + index" :src="photo.filename" />
-                              <div class="tag tag-l">2025年2月19日
-                              </div>
-                              <div class="tag tag-l" style="bottom: 20px;">执行前花带叶率15%
-                              </div>
-                            </div>
-                          </photo-consumer>
-                          <photo-consumer
-                              class="carousel-item"
-                              :src="photo.filename2">
-                            <div class="img-two">
-                              <img :id="'img2' + index"  :src="photo.filename2" />
-                              <div class="tag tag-r">2025年2月22日
-                              </div>
-                              <div class="tag tag-r" style="bottom: 20px;">执行后花带叶率5%
-                              </div>
-                            </div>
-                          </photo-consumer>
-                        </template>
-
-                      </photo-provider>
-                    </div>
-
-                    <!-- 左右箭头 -->
-                    <div @click="prev" class="arrow left-arrow">
-                        <el-icon color="#F0D09C" size="20"><ArrowLeftBold /></el-icon>
-                    </div>
-                    <div @click="next" class="arrow right-arrow">
-                        <el-icon color="#F0D09C" size="20"><ArrowRightBold /></el-icon>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, computed } from "vue";
-import { base_img_url2, resize } from "@/api/config";
-
-
-const treeImgList = ref([
-    {
-        filename:
-            "https://birdseye-img.sysuimars.com/birdseye-look-vue/zj/%E5%9B%BE%E7%89%872.png",
-      filename2:
-          "https://birdseye-img.sysuimars.com/birdseye-look-vue/zj/%E5%9B%BE%E7%89%871.png",
-    }
-]);
-
-const updateImagePosition = () => {
-    carouselStyle.value.transform = `translateX(-${currentIndex.value * 100}%)`;
-};
-const currentIndex = ref(0);
-// 计算轮播图样式
-const carouselStyle = computed(() => {
-    return {
-        transform: `translateX(-${currentIndex.value * 100}%)`,
-    };
-});
-// 下一张图片
-const next = () => {
-    // 图片总数
-    const totalImages = treeImgList.value.length;
-    currentIndex.value = (currentIndex.value + 1) % totalImages;
-    updateImagePosition();
-};
-
-// 上一张图片
-const prev = () => {
-    // 图片总数
-    const totalImages = treeImgList.value.length;
-    currentIndex.value = (currentIndex.value - 1 + totalImages) % totalImages;
-    updateImagePosition();
-};
-</script>
-
-<style lang="scss" scoped>
-@import "./boxClass.scss";
-
-.recheck-content {
-    padding-right: 10px;
-    .sub-title {
-        color: #2199f8;
-    }
-    .over-img {
-        margin-top: 8px;
-        width: 100%;
-        overflow: hidden;
-        transition: transform 0.5s ease;
-        display: flex;
-        position: relative;
-        .carousel-container {
-            flex: none;
-            // transform: translateX(-100%);
-            transition: transform 0.5s ease;
-            &.hideMap {
-                flex: none;
-                transform: translateX(0);
-                // transform: translateX(-100%);
-            }
-            position: relative;
-            width: 100%;
-            overflow: hidden;
-            margin: 0 auto;
-        }
-
-        .carousel-wrapper {
-            display: flex;
-            flex-direction: row;
-            justify-content: left;
-            transition: transform 0.5s ease;
-            width: 100%;
-            height: 100%;
-        }
-
-        .carousel-item {
-            flex-shrink: 0;
-            pointer-events: auto;
-            position: relative;
-            width: 50%;
-            .img-two {
-                display: flex;
-                position: relative;
-
-                .tag {
-                    position: absolute;
-                    bottom: 0;
-                    background: rgba(0, 0, 0, 0.6);
-                    color: #fff;
-                    font-size: 10px;
-                    padding: 2px 10px;
-                }
-                .tag-l {
-                    left: 0;
-                    border-radius: 0 5px 0 5px;
-                }
-                .tag-r {
-                    right: 0;
-                    border-radius: 5px 0 0 5px;
-                }
-            }
-        }
-
-        .carousel-item img {
-            width: 100%;
-            display: block;
-        }
-
-        .overlay {
-            position: absolute;
-            top: 0;
-            right: 0;
-            background: rgba(255, 255, 255, 0.3);
-            width: 100%;
-            height: 100%;
-            transition: width 0.5s ease-in-out;
-        }
-
-        .percentage {
-            position: absolute;
-            bottom: 0;
-            width: 100%;
-        }
-
-        .arrow {
-            position: absolute;
-            top: 50%;
-            transform: translateY(-50%);
-            background: rgba(0, 0, 0, 0.5);
-            width: 36px;
-            height: 36px;
-            border-radius: 50%;
-            display: inline-flex;
-            align-items: center;
-            justify-content: center;
-            cursor: pointer;
-        }
-
-        .left-arrow {
-            left: 16px;
-        }
-
-        .right-arrow {
-            right: 16px;
-        }
-        ::v-deep {
-            .el-carousel__arrow {
-                background: rgba(0, 0, 0, 0.5);
-            }
-            .PhotoConsumer {
-                width: 50%;
-                height: 100%;
-                img {
-                    width: calc(100%);
-                    height: 100%;
-                    max-height: 200px;
-                    // height: 300px;
-                    // max-height: 500px;
-                    object-fit: scale-down;
-                    border-radius: 5px;
-                }
-                img + img {
-                    padding-left: 8px;
-                }
-            }
-        }
-    }
-    .compare-b {
-        padding: 12px 0 8px 0;
-        .compare-chart {
-            margin-top: 8px;
-            background: #eaf4ff;
-            border-radius: 5px;
-            padding: 4px 0 8px 0;
-            ::v-deep {
-                .card-chart {
-                    height: 160px;
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 249
src/views/workDetail/components/recheckBox3.vue

@@ -1,249 +0,0 @@
-<template>
-    <div class="work-item last-enter">
-        <div class="work-line">
-            <div class="line-box">
-                <div class="line-dotted">
-                    <div class="dotted-inset"></div>
-                </div>
-            </div>
-        </div>
-        <div class="work-info">
-            <div class="card-item-title" style="color: #ffffff;"><span class="dotted"></span>本次农事复核成效优异,作物产量潜力实现大幅增长,压花情况优秀,未发现花量过多情况</div>
-            <div class="recheck-content">
-                <div class="over-img">
-                    <!-- 图片列表 -->
-                    <div class="carousel-wrapper" :style="carouselStyle">
-                      <photo-provider :photo-closable="true">
-                        <template v-for="(photo, index) in treeImgList"
-                                   :key="index">
-                          <photo-consumer
-                              class="carousel-item"
-                              :src="photo.filename"
-                          >
-                            <div class="img-two">
-                              <img :id="'img1' + index" :src="photo.filename" />
-                              <div class="tag tag-l">2025年2月18日
-                              </div>
-                              <div class="tag tag-l" style="bottom: 20px;">执行前花量比例85%
-
-                              </div>
-                            </div>
-                          </photo-consumer>
-                          <photo-consumer
-                              class="carousel-item"
-                              :src="photo.filename2">
-                            <div class="img-two">
-                              <img :id="'img2' + index"  :src="photo.filename2" />
-                              <div class="tag tag-r">2025年2月27日
-                              </div>
-                              <div class="tag tag-r" style="bottom: 20px;">执行后花量比例50%
-
-                              </div>
-                            </div>
-                          </photo-consumer>
-                        </template>
-
-                      </photo-provider>
-                    </div>
-
-                    <!-- 左右箭头 -->
-                    <div @click="prev" class="arrow left-arrow">
-                        <el-icon color="#F0D09C" size="20"><ArrowLeftBold /></el-icon>
-                    </div>
-                    <div @click="next" class="arrow right-arrow">
-                        <el-icon color="#F0D09C" size="20"><ArrowRightBold /></el-icon>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, computed } from "vue";
-import { base_img_url2, resize } from "@/api/config";
-
-
-const treeImgList = ref([
-    {
-        filename:
-            "https://birdseye-img.sysuimars.com/birdseye-look-vue/zj/1744537825525.jpg",
-      filename2:
-          "https://birdseye-img.sysuimars.com/birdseye-look-vue/zj/1744537851048.jpg",
-    }
-]);
-
-const updateImagePosition = () => {
-    carouselStyle.value.transform = `translateX(-${currentIndex.value * 100}%)`;
-};
-const currentIndex = ref(0);
-// 计算轮播图样式
-const carouselStyle = computed(() => {
-    return {
-        transform: `translateX(-${currentIndex.value * 100}%)`,
-    };
-});
-// 下一张图片
-const next = () => {
-    // 图片总数
-    const totalImages = treeImgList.value.length;
-    currentIndex.value = (currentIndex.value + 1) % totalImages;
-    updateImagePosition();
-};
-
-// 上一张图片
-const prev = () => {
-    // 图片总数
-    const totalImages = treeImgList.value.length;
-    currentIndex.value = (currentIndex.value - 1 + totalImages) % totalImages;
-    updateImagePosition();
-};
-</script>
-
-<style lang="scss" scoped>
-@import "./boxClass.scss";
-
-.recheck-content {
-    padding-right: 10px;
-    .sub-title {
-        color: #2199f8;
-    }
-    .over-img {
-        margin-top: 8px;
-        width: 100%;
-        overflow: hidden;
-        transition: transform 0.5s ease;
-        display: flex;
-        position: relative;
-        .carousel-container {
-            flex: none;
-            // transform: translateX(-100%);
-            transition: transform 0.5s ease;
-            &.hideMap {
-                flex: none;
-                transform: translateX(0);
-                // transform: translateX(-100%);
-            }
-            position: relative;
-            width: 100%;
-            overflow: hidden;
-            margin: 0 auto;
-        }
-
-        .carousel-wrapper {
-            display: flex;
-            flex-direction: row;
-            justify-content: left;
-            transition: transform 0.5s ease;
-            width: 100%;
-            height: 100%;
-        }
-
-        .carousel-item {
-            flex-shrink: 0;
-            pointer-events: auto;
-            position: relative;
-            width: 50%;
-            .img-two {
-                display: flex;
-                position: relative;
-
-                .tag {
-                    position: absolute;
-                    bottom: 0;
-                    background: rgba(0, 0, 0, 0.6);
-                    color: #fff;
-                    font-size: 10px;
-                    padding: 2px 10px;
-                }
-                .tag-l {
-                    left: 0;
-                    border-radius: 0 5px 0 5px;
-                }
-                .tag-r {
-                    right: 0;
-                    border-radius: 5px 0 0 5px;
-                }
-            }
-        }
-
-        .carousel-item img {
-            width: 100%;
-            display: block;
-        }
-
-        .overlay {
-            position: absolute;
-            top: 0;
-            right: 0;
-            background: rgba(255, 255, 255, 0.3);
-            width: 100%;
-            height: 100%;
-            transition: width 0.5s ease-in-out;
-        }
-
-        .percentage {
-            position: absolute;
-            bottom: 0;
-            width: 100%;
-        }
-
-        .arrow {
-            position: absolute;
-            top: 50%;
-            transform: translateY(-50%);
-            background: rgba(0, 0, 0, 0.5);
-            width: 36px;
-            height: 36px;
-            border-radius: 50%;
-            display: inline-flex;
-            align-items: center;
-            justify-content: center;
-            cursor: pointer;
-        }
-
-        .left-arrow {
-            left: 16px;
-        }
-
-        .right-arrow {
-            right: 16px;
-        }
-        ::v-deep {
-            .el-carousel__arrow {
-                background: rgba(0, 0, 0, 0.5);
-            }
-            .PhotoConsumer {
-                width: 50%;
-                height: 100%;
-                img {
-                    width: calc(100%);
-                    height: 100%;
-                    max-height: 200px;
-                    // height: 300px;
-                    // max-height: 500px;
-                    object-fit: scale-down;
-                    border-radius: 5px;
-                }
-                img + img {
-                    padding-left: 8px;
-                }
-            }
-        }
-    }
-    .compare-b {
-        padding: 12px 0 8px 0;
-        .compare-chart {
-            margin-top: 8px;
-            background: #eaf4ff;
-            border-radius: 5px;
-            padding: 4px 0 8px 0;
-            ::v-deep {
-                .card-chart {
-                    height: 160px;
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 434
src/views/workDetail/components/serviceBox.vue

@@ -1,434 +0,0 @@
-<template>
-    <div class="work-item" :class="{ dark: progress === 0 }">
-        <!-- <div class="work-line">
-            <div class="line-box">
-                <div class="line-dotted">
-                    <div class="dotted-inset"></div>
-                </div>
-            </div>
-        </div> -->
-        <div class="work-info">
-            <!-- <img v-if="progress === 1" class="todo-img" src="@/assets/img/gallery/todo.png" />
-            <img v-if="progress === 2 || progress === 3 || progress === 4" class="done-img" src="@/assets/img/gallery/done.png" /> -->
-            <!-- <div class="card-item-title">
-                <span class="dotted"></span>农资报价
-                <span class="real-text" v-if="progress === 2 || progress === 3 || progress === 4">(大禹科技公司)</span>
-            </div> -->
-            <div class="prescription-box">
-                <div class="prescription-item" v-if="progress === 1 && ROLETYPE == '2'">
-                    <div class="service-time">
-                        执行时间
-                        <div class="time-picker">
-                            <el-date-picker
-                                value-format="YYYY-MM-DD"
-                                v-model="pickerTime"
-                                type="date"
-                                placeholder="选择日期"
-                            />
-                        </div>
-                    </div>
-                    <div class="usage-mode">
-                            施用方式:<span>{{ serviceData.usageMode }}</span>
-                        </div>
-                    <div class="recipe-item">
-                        <div class="recipe-form">
-                            <el-form ref="formRef" style="max-width: 600px" class="demo-dynamic">
-                                <el-form-item
-                                    v-for="(prescriptionItem, index) in prescriptionList"
-                                    :key="index"
-                                    :prop="'domains.' + index + '.value'"
-                                >
-                                    <div class="form-box" v-for="(domain, index) in prescriptionItem.pesticideFertilizerList" :key="'sub' + index">
-                                        <div class="form-index">{{ formatIndex(index) }}</div>
-                                        <div class="box-item">
-                                            <div class="form-l">肥药名称</div>
-                                            <div class="form-r r-text">{{ domain.defaultName }}</div>
-                                        </div>
-                                        <div class="box-item">
-                                            <div class="form-l">使用功效</div>
-                                            <div class="form-r r-text">{{ domain.typeName }}</div>
-                                        </div>
-                                        <div class="box-item">
-                                            <div class="form-l">执行方式</div>
-                                            <div class="form-r">
-                                                <el-select
-                                                    filterable
-                                                    v-model="domain.executeStyle"
-                                                    placeholder="请选择"
-                                                    style="width: 140px"
-                                                >
-                                                    <el-option label="人工" :value="1" />
-                                                    <el-option v-if="serviceData.usageMode === '叶面施'" label="无人机" :value="2" />
-                                                </el-select>
-                                            </div>
-                                        </div>
-                                        <div class="box-item sub-item">
-                                            <div class="form-l colunm-sub">
-                                                <div class="main-name">肥药配比</div>
-                                                <div class="sub-name">(药剂:兑水量)</div>
-                                            </div>
-                                            <div class="form-r r-text">
-                                                <!-- {{
-                                                    domain.ratio
-                                                        ? domain.ratio + "倍"
-                                                        : domain.defaultRatio
-                                                        ? domain.defaultRatio + "倍"
-                                                        : "---"
-                                                }} -->
-                                                {{ domain.executeStyle === 2 ? ((domain.ratio2 ? domain.ratio2 + "倍" : (domain.defaultRatio ? domain.defaultRatio + "倍" : '---'))) :  ((domain.ratio ? domain.ratio + "倍" : (domain.defaultRatio ? domain.defaultRatio + "倍" : '---'))) }}
-                                            </div>
-                                        </div>
-                                        <div class="box-item sub-item">
-                                            <div class="form-l">单亩用量</div>
-                                            <div class="form-r r-text">{{ domain.executeStyle === 2 ? domain.muUsage2 : domain.muUsage }}{{ domain.unit }}</div>
-                                        </div>
-                                        <div class="box-item sub-item">
-                                            <div class="form-l colunm-sub">品牌</div>
-                                            <div class="form-r price">
-                                                <el-input v-model="domain.brand" style="width: 140px" placeholder="" />
-                                            </div>
-                                        </div>
-                                        <div class="box-item sub-item">
-                                            <div class="form-l">亩单价</div>
-                                            <div class="form-r price">
-                                                <el-input v-model="domain.muPrice" style="width: 140px" placeholder="">
-                                                    <template #append>元</template>
-                                                </el-input>
-                                            </div>
-                                        </div>
-                                        <!-- <div class="action-btn btn-group">
-                                            <el-button class="btn delete-btn" @click.prevent="removeDomain(domain)">
-                                                删除
-                                            </el-button>
-                                            <el-button type="primary" class="btn" @click.prevent="resetItemForm(index)">
-                                                重置
-                                            </el-button>
-                                        </div> -->
-                                    </div>
-                                </el-form-item>
-                            </el-form>
-                        </div>
-                    </div>
-
-                    <div class="service-wrap">
-                        <div class="sub-title">
-                            <div class="sub-name">选择农户</div>
-                        </div>
-                        <!-- <div class="bottom-map" ref="areaRef" :id="'areaMap' + boxId"></div> -->
-                        <template v-for="(item, index) in displayedItems" :key="index">
-                            <div class="service-item">
-                                <div class="service-l">
-                                    <img class="service-img" :src="item.icon" />
-                                    {{ item.userName || "农户" }}
-                                </div>
-                                <div class="service-c">{{ item.area || 50 }}亩</div>
-                                <div class="service-r">
-                                    <el-checkbox
-                                        @change="handleUsersCheckChange()"
-                                        :true-value="1"
-                                        :false-value="0"
-                                        v-model="item.selected"
-                                        size="large"
-                                    />
-                                </div>
-                            </div>
-                        </template>
-                        <div v-if="hasMoreItems">
-                            <div @click="toggleMore" class="icon-text">
-                                {{ isMoreVisible ? '收起' : '展开' }}
-                                <el-icon :class="isMoreVisible ? 'down-icon' : 'up-icon'"><DArrowRight /></el-icon>
-                            </div>
-                        </div>
-
-                        <div class="service-bottom">
-                            <div class="sub-title">
-                                <div class="sub-name">选择农服</div>
-                            </div>
-                            <template v-for="(item, i) in displayedItems2" :key="i">
-                                <div class="service-item">
-                                    <div class="service-l">
-                                        <img class="service-img" :src="item.icon" />
-                                        {{ item.userName || "农服" }}
-                                    </div>
-                                    <div class="service-c">{{ item.serviceType == 1 ? "技术类" : "劳力类" }}</div>
-                                    <div class="service-r">
-                                        <el-checkbox
-                                            :true-value="1"
-                                            :false-value="0"
-                                            v-model="item.selected"
-                                            size="large"
-                                        />
-                                    </div>
-                                </div>
-                            </template>
-                            <div v-if="hasMoreItems2">
-                                <div @click="toggleMore2" class="icon-text">
-                                    {{ isMoreVisible2 ? '收起' : '展开' }}
-                                    <el-icon :class="isMoreVisible2 ? 'down-icon' : 'up-icon'"><DArrowRight /></el-icon>
-                                </div>
-                            </div>
-
-                            <div class="service-btn">
-                                <el-button class="btn" @click.stop="submit" type="primary">确认订单</el-button>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <div v-else>
-                      <div class="sub-title">
-                        报价处方
-                      </div>
-                    <div class="item-table">
-                        <el-table
-                            :data="tableData"
-                            style="width: 100%"
-                            :header-cell-style="{ background: '#F5F5F5' }"
-                        >
-                            <el-table-column align="center" prop="defaultName" label="名称" />
-                            <el-table-column align="center" prop="brand" label="品牌" width="52">
-                                <template #default="scope">
-                                  <div>{{ scope.row.brand ? scope.row.brand : '---' }}</div>
-                                </template>
-                            </el-table-column>
-                            <el-table-column align="center" label="执行方式" width="40">
-                                <template #default="scope">
-                                    <div class="table-l-title">
-                                        {{ scope.row.executeStyle == 1 ? "人工" : "人工" }}
-                                    </div>
-                                </template>
-                            </el-table-column>
-                            <el-table-column align="center" prop="ratio" label="配比" width="62">
-                                <template #default="scope">
-                                    <div v-if="scope.row.executeStyle === 1">
-                                        <!-- <div>{{`1${scope.row.unit}:${scope.row.ratio || scope.row.defaultRatio}${scope.row.unit}`}}</div> -->
-                                        <!-- <div>人工</div> -->
-                                        <div>{{`1:${scope.row.ratio || scope.row.defaultRatio}${scope.row.unit}`}}</div>
-                                    </div>
-                                    <div v-else-if="scope.row.executeStyle === 2">
-                                        <!-- <div>{{`1${scope.row.unit}:${scope.row.ratio2 || scope.row.defaultRatio}${scope.row.unit}`}}</div> -->
-                                        <!-- <div>无人机</div> -->
-                                        <div>{{`1:${scope.row.ratio2 || scope.row.defaultRatio}${scope.row.unit}`}}</div>
-                                    </div>
-                                    <div v-else>
-                                        <div>{{`1:${scope.row.defaultRatio}${scope.row.unit}`}}</div>
-                                    </div>
-                                </template>
-                            </el-table-column>
-                            <el-table-column prop="muUsage" label="单亩用量" width="46">
-                                <template #default="scope">
-                                    {{ scope.row.muUsage ? scope.row.muUsage + scope.row.unit : "---" }}
-                                </template>
-                            </el-table-column>
-                            <el-table-column align="center" prop="muPrice" label="亩单价" width="58">
-                              <template #default="scope">
-                                  <div>{{ scope.row.muPrice ? scope.row.muPrice + '元' : '---' }} </div>
-                                </template>
-                            </el-table-column>
-                        </el-table>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <service-dialog></service-dialog>
-    </div>
-</template>
-
-<script setup>
-import eventBus from "@/api/eventBus";
-import { onMounted, ref, computed, onActivated } from "vue";
-import AreMap from "../areaMap";
-import serviceDialog from "./serviceDialog.vue";
-
-import { useStore } from "vuex";
-import { deepClone } from "@/common/commonFun";
-const store = useStore();
-
-const ROLETYPE = store.state.app.curRole
-// const ROLETYPE = '2'
-
-const checkService = ref(true);
-const props = defineProps({
-    progress: {
-        type: Number,
-        required: false,
-    },
-    prescriptionList: {
-        type: Array,
-        required: true,
-    },
-    pesticideFertilizers: {
-        type: Array,
-        required: true,
-    },
-    users: {
-        type: Array,
-        required: true,
-    },
-    executeDate: {
-        type: String,
-        required: false,
-    },
-    boxId: {
-        type: String,
-        required: false,
-    },
-    serviceData: {
-        type: Object,
-        required: false,
-    },
-});
-
-
-let pickerTime = ref(props.executeDate);
-
-// 表单
-const formRef = ref();
-
-const dynamicValidateForm = ref([]);
-
-const formatIndex = (index) => {
-    return String(index + 1).padStart(2, "0");
-};
-const handleUsersCheckChange = (index) => {
-    console.log(props.users);
-};
-
-function flattenDomains(data) {
-  return data.reduce((acc, item) => {
-    return acc.concat(item.pesticideFertilizerList);
-  }, []);
-}
-
-const submit = () => {
-    const data = {
-        orderId: dynamicValidateForm.value[0].orderId,
-        orderStatus: 2,
-        prescriptionList: props.prescriptionList,
-        users: props.users,
-        executeDate: pickerTime.value,
-    };
-    console.log('data', data);
-    // VE_API.order.confirm(data).then(({ code }) => {
-    //     if (code == 0) {
-    //         console.log('订单确认成功');
-    //         eventBus.emit('discover:submitForm')
-    //     }
-    // });
-};
-
-const areaRef = ref();
-let farmArr = ref([])
-let serviceArr = ref([])
-onMounted(() => {
-    if (props.progress === 1 && ROLETYPE == '2') {
-        // const dom = document.getElementById(`areaMap${props.boxId}`)
-        // let areMap = new AreMap();
-        // areMap.initMap("POINT(113.1093017627431 22.574540836684672)", dom);
-        // areMap.setPoints(props.users.filter((item) => item.userType === 1).map((item) => item.point));
-        // settingData();
-    }
-    farmArr.value = props.users.filter(item => item.userType === 1)
-    serviceArr.value = props.users.filter(item => item.userType === 2)
-    if (ROLETYPE != '2') {
-        console.log('rrrr');
-        tableData.value = flattenDomains(props.prescriptionList)
-    }
-});
-const tableData = ref([])
-
-// 控制是否展开更多列表项的布尔值
-const isMoreVisible = ref(false);
-const isMoreVisible2 = ref(false);
-
-// 计算属性,返回应该显示的列表项
-const displayedItems = computed(() => {
-  return isMoreVisible.value ? farmArr.value : props.users.slice(0, 3);
-});
-// 计算属性,返回应该显示的列表项
-const displayedItems2 = computed(() => {
-  return isMoreVisible2.value ? serviceArr.value : serviceArr.value.slice(0, 3);
-});
-
-// 计算属性,判断是否有更多项可以展开
-const hasMoreItems = computed(() => {
-  return farmArr.value.length > 3;
-});
-
-// 计算属性,判断是否有更多项可以展开
-const hasMoreItems2 = computed(() => {
-  return serviceArr.value.length > 3;
-});
-
-// 方法,用于切换展开/收起状态
-const toggleMore = () => {
-  isMoreVisible.value = !isMoreVisible.value;
-};
-
-// 方法,用于切换展开/收起状态
-const toggleMore2 = () => {
-  isMoreVisible2.value = !isMoreVisible2.value;
-};
-</script>
-
-<style lang="scss" scoped>
-@import "./boxClass.scss";
-.service-time {
-    display: flex;
-    align-items: center;
-    color: #727272;
-    .time-picker {
-        padding-left: 10px;
-        ::v-deep {
-            .el-input__wrapper {
-                background: none;
-                box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
-                .el-input__prefix {
-                    color: rgba(255, 255, 255, 0.6);
-                }
-                .el-input__inner {
-                    color: #fff;
-                }
-            }
-        }
-    }
-}
-
-.usage-mode {
-    display: flex;
-    align-items: center;
-    font-size: 16px;
-    color: #727272;
-    padding: 12px 0 12px 0;
-    span {
-        color: #fff;
-    }
-}
-.service-name {
-    padding-top: 12px;
-    color: #2199F8;
-    font-size: 14px;
-}
-
-
-/* 定义过渡效果 */
-.list-enter-active, .list-leave-active {
-    transition: all 0.5s;
-}
-.list-enter, .list-leave-to /* .list-leave-active in <2.1.8 */ {
-    opacity: 0;
-    transform: translateY(30px);
-}
-.icon-text {
-    padding-top: 8px;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    .down-icon {
-        transform: rotate(270deg);
-    }
-    .up-icon {
-        transform: rotate(90deg);
-    }
-}
-</style>

+ 0 - 104
src/views/workDetail/components/serviceDialog.vue

@@ -1,104 +0,0 @@
-<template>
-    <div>
-        <el-dialog
-            v-model="dialogVisible"
-            width="90%"
-        >
-            <div>
-                <div class="dialog-map" ref="areaRef"></div>
-                <div class="dialog-content service-wrap">
-                    <div class="service-item" v-for="(item, i) in boxList" :key="i">
-                        <div class="service-l">
-                            <img class="service-img" :src="item.icon" />
-                            {{ item.userName || "农服" }}
-                        </div>
-                        <div class="service-c">{{ item.userType === 1 ? (item.area || 50) + '亩' : (item.serviceType == 1 ? "技术类" : "劳力类") }}</div>
-                        <div class="service-r">
-                            <!-- <el-checkbox
-                                :true-value="1"
-                                :false-value="0"
-                                v-model="item.selected"
-                                size="large"
-                            /> -->
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <template #footer>
-            <div class="dialog-footer">
-                <el-button type="primary" @click="dialogVisible = false">
-                一键提醒
-                </el-button>
-            </div>
-            </template>
-        </el-dialog>
-    </div>
-</template>
-
-<script setup>
-import eventBus from '@/api/eventBus';
-import { onMounted, ref } from 'vue';
-import AreMap from "../areaMap";
-
-const areaRef = ref();
-const dialogVisible = ref(false)
-onMounted(() => {
-    
-})
-
-const boxList = ref([])
-let areMap = null
-const handleEvent = (data) => {
-    boxList.value = data
-    dialogVisible.value = true
-    setTimeout(() => {
-        if (!areMap) {
-            areMap = new AreMap();
-            areMap.initMap("POINT(113.1093017627431 22.574540836684672)", areaRef.value);
-            areMap.setPoints(data.filter((item) => item.userType === 1).map((item) => item.point));
-        }
-}, 100)
-}
-eventBus.on("enterBox:showDialog", handleEvent)
-</script>
-
-<style lang="scss" scoped>
-.dialog-map {
-    width: 100%;
-    height: 150px;
-}
-.service-wrap {
-                padding: 12px 0;
-                .service-item {
-                    margin-top: 8px;
-                    display: flex;
-                    align-items: center;
-                    border: 1px solid #DDDDDD;
-                    padding: 0 12px;
-                    height: 48px;
-                    color: #000000;
-                    font-size: 14px;
-                    border-radius: 8px;
-                    .service-img {
-                        width: 32px;
-                        margin-right: 8px;
-                        border-radius: 50%;
-                    }
-                    .service-c {
-                        flex: 1;
-                        text-align: center;
-                        color: #666666;
-                    }
-                }
-                .service-bottom {
-                    padding-top: 12px;
-                    .service-btn {
-                        padding-top: 12px;
-                        width: 100%;
-                        .btn {
-                            width: 100%;
-                        }
-                    }
-                }
-            }
-</style>

+ 0 - 214
src/views/workDetail/components/table.vue

@@ -1,214 +0,0 @@
-<template>
-    <div class="table">
-        <div class="th">
-            <div
-                class="td width"
-                :class="{ special: item.name.length === 3 || item.name.length > 4 }"
-                v-for="item in tableHeader"
-                :key="item.props"
-            >
-                {{ item.name }}
-            </div>
-        </div>
-        <div class="tr-wrap" v-for="(item, index) in tableData" :key="index">
-            <div v-if="type==0" class="tr" :class="{ 'special-tr': hideText }">
-                <div class="td" v-for="(ele, idx) in tableHeader" :key="idx + 'id'">
-                    <el-icon @click="handleDelete(index)" v-show="idx===0&&isEdit" class="delete-icon" color="#FF2323"><RemoveFilled /></el-icon>
-                    <span v-if="!isEdit">{{ item[ele.props] }}</span>
-                    <template v-else>
-                        <span v-if="ele.name==='执行方式'">人工</span>
-                        <el-select remote-show-suffix v-else class="select" v-model="item[ele.props]">
-                            <el-option v-for="optionItem in item.list" :key="optionItem.name" :label="optionItem.name" :value="optionItem.name" />
-                        </el-select>
-                    </template>
-                </div>
-            </div>
-            <div v-else class="tr collapse" :class="{ 'special-tr': hideText }">
-                <div class="td" :class="{'collapse-td':ele.name==='执行方式'}" v-for="(ele, idx) in tableHeader" :key="idx + 'id'">
-                    <el-icon @click="handleDelete(index)" v-show="idx===0&&isEdit" class="delete-icon" color="#FF2323"><RemoveFilled /></el-icon>
-                    <div v-if="!isEdit" :class="{'special-td':idx>1}">
-                        <div>{{ item[ele.props]||'测试数据' }}</div>
-                        <div class="txt" v-show="idx>1">1111</div>
-                    </div>
-                    <template v-else>
-                        <div :class="{'special-td':idx>1}">
-                            <template v-if="ele.name==='执行方式'">
-                                <div>人工</div>
-                                <div class="txt" v-show="idx>1">无人机</div>
-                            </template>
-                            <template v-else>
-                                <el-select :class="['select',{'ml':idx>1}]" v-model="item[ele.props]">
-                                    <el-option v-for="optionItem in item.list" :key="optionItem.name" :label="optionItem.name" :value="optionItem.name" />
-                                </el-select>
-                                <el-select v-show="idx>1" :class="['select','txt',{'ml':idx>1}]" v-model="item[ele.props]">
-                                    <el-option v-for="optionItem in item.list" :key="optionItem.name" :label="optionItem.name" :value="optionItem.name" />
-                                </el-select>
-                            </template>
-                        </div>
-                    </template>
-                </div>
-            </div>
-            <div class="box-textarea" v-if="!hideText">
-                <el-input
-                    :disabled="!isEdit"
-                    class="textarea"
-                    v-model="textarea"
-                    :rows="1"
-                    type="textarea"
-                    placeholder="这是是用药注意事项的备注,省略1000字"
-                />
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref } from "vue";
-const props = defineProps({
-    tableData: {
-        type: Array,
-        defalut: [],
-         required:true
-    },
-    tableHeader: {
-        type: Array,
-        defalut: [],
-        required:true
-    },
-    hideText: {
-        type: Boolean,
-        defalut: true,
-    },
-    isEdit: {
-        type: Boolean,
-        defalut: true,
-    },
-    type: {
-        type: [String,Number],
-        defalut:0,
-        required:true
-    },
-});
-
-const emit = defineEmits(['handleDelete'])
-const handleDelete = (index) =>{
-    emit('handleDelete',index)
-}
-
-const textarea = ref("");
-const list = ref([
-    {
-        name: "营养",
-    },
-    {
-        name: "Action 2",
-    },
-    {
-        name: "Action 3",
-    },
-]);
-</script>
-
-<style lang="scss" scoped>
-.table {
-    border: 1px solid #444444;
-    border-radius: 5px;
-    .th,
-    .tr {
-        display: flex;
-        align-items: center;
-        color: #727272;
-        height: 46px;
-        font-size: 14px;
-        justify-content: space-around;
-        .td {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            text-align: center;
-            width: 25%;
-            height: 100%;
-            color: #cecece;
-        }
-    }
-    .collapse{
-        height: 80px;
-        border: 1px solid #444444;
-        margin: 12px 8px;
-        border-radius: 6px;
-        .collapse-td{
-            border-left: 1px solid #444444;
-            border-right: 1px solid #444444;
-        }
-    }
-    .special-td{
-        width: 100%;
-        height: 100%;
-        div{
-            width: 100%;
-            height: 50%;
-            line-height: 40px;
-        }
-        .txt{
-            border-top: 1px solid #444444;
-        }
-    }
-
-    .th {
-        background: rgba(255, 255, 255, 0.04);
-        .width {
-            width: 40px;
-        }
-        .special {
-            width: 60px;
-        }
-    }
-    .special-tr {
-        .td {
-            width: auto;
-        }
-    }
-
-    .delete-icon{
-        margin-right: 4px;
-        cursor: pointer;
-    }
-
-    .tr-wrap + .tr-wrap {
-        border-top: 1px solid #444444;
-    }
-}
-.select {
-    width: 50px !important;
-    &.ml{
-        padding: 0 15px;
-    }
-    ::v-deep {
-        .el-select__wrapper {
-            background: transparent;
-            padding: 0;
-            box-shadow: none;
-        }
-        .el-select__placeholder,
-        .el-select__caret {
-            color: #ffd489;
-        }
-    }
-}
-.box-textarea {
-    border-radius: 4px;
-    padding: 10px;
-    background: rgba(255, 255, 255, 0.05);
-    margin: 0 8px 10px 8px;
-    .textarea {
-        ::v-deep {
-            .el-textarea__inner {
-                background: transparent;
-                box-shadow: none;
-                color: #fff;
-                padding: 0;
-            }
-        }
-    }
-}
-</style>

+ 0 - 285
src/views/workDetail/index.vue

@@ -1,285 +0,0 @@
-<template>
-    <div class="base-container">
-        <fnHeader :hideSwitch="true" :hideShadow="true" showDate></fnHeader>
-        <div class="content">
-            <div class="content-left">
-                <div class="btn" @click="goBack">
-                    <img src="@/assets/images/common/back-icon.png" alt="" />
-                    返回
-                </div>
-                <chart-box class="left-cont" v-if="workList && workList.length" :name="workList[0].farmWorkName" color="yellow">
-                    <div class="box">
-                        <div class="box-item">
-                            <div class="box-title">
-                                专家处方
-                                <!-- <el-icon class="icon-arrow" size="18"><ArrowUpBold /></el-icon> -->
-                            </div>
-                            <component v-if="workList && workList.length" :is="components[currentComponent]" :prescriptioData="workList[0]" />
-                        </div>
-                        <!-- <div class="button">确认下发</div> -->
-                        <div class="box-item" v-if="workList && workList.length">
-                            <div class="box-title">
-                                农资报价
-                                <!-- <el-icon class="icon-arrow" size="18"><ArrowUpBold /></el-icon> -->
-                            </div>
-                            <!-- <custom-table type="0" :tableHeader="tableHeader" :tableData="tableData" hideText></custom-table> -->
-                            <service-box
-                                :boxId="workList[0].farmWorkLibId"
-                                        :progress="workList[0].orderStatus"
-                                        :prescriptionList="workList[0].prescriptionList"
-                                        :users="workList[0].users"
-                                        :serviceData="workList[0]"
-                                        :executeDate="workList[0].executeDate">
-                            </service-box>
-                        </div>
-                        <div class="box-item">
-                          <div class="box-title">
-                            农事对比
-                          </div>
-                          <recheck-box2 v-if="workList[0].farmWorkLibId ==='699268027270565895'"></recheck-box2>
-                          <recheck-box3 v-if="workList[0].farmWorkLibId ==='699268027274760192'"></recheck-box3>
-                        </div>
-                    </div>
-                </chart-box>
-            </div>
-            <div class="content-right">
-                <div class="map-header">
-                    <div class="title">
-                        <img src="@/assets/images/common/area-icon.png" alt="" />
-                        执行农事区域
-                    </div>
-                </div>
-                <div ref="mapRef" class="map">
-                    <!-- <div class="map-bg map-btn">查看巡园照片</div> -->
-                    <div class="map-bg map-legend">
-                        <div class="item">
-                            <img src="@/assets/images/map/status/status-zc.png" alt="" />
-                            正常
-                        </div>
-                        <div class="item">
-                            <img src="@/assets/images/map/status/status-szyc.png" alt="" />
-                            生长异常
-                        </div>
-                        <div class="item">
-                            <img src="@/assets/images/map/status/status-bh.png" alt="" />
-                            病害异常
-                        </div>
-                        <div class="item">
-                            <img src="@/assets/images/map/status/status-ch.png" alt="" />
-                            虫害异常
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import { ElMessage } from "element-plus";
-import fnHeader from "@/components/fnHeader.vue";
-import customTable from "./components/table.vue";
-import prescriptionBox from './components/prescriptionBox'
-import serviceBox from './components/serviceBox'
-import FarmMap from "@/views/addFarm/farmMap";
-import chartBox from "@/components/chartBox.vue";
-import { useRouter, useRoute } from "vue-router";
-import { useStore } from "vuex";
-import RecheckBox2 from "./components/recheckBox2";
-import RecheckBox3 from "./components/recheckBox3";
-
-const components = {
-    prescriptionBox,
-};
-const currentComponent = ref("prescriptionBox");
-
-let store = useStore();
-let farmMap = new FarmMap();
-
-const router = useRouter();
-const route = useRoute();
-const mapRef = ref(null);
-const workList = ref({})
-
-const getList = () => {
-    VE_API.farm.fetchFarmWorkList({ farmId, libId, id }).then(({data}) => {
-    // data[0].orderStatus = data[0].orderStatus + 1
-        workList.value = data
-
-        let itemData = data && data.length && data[0]
-        farmMap.initData(itemData.farmId, itemData.regionId)
-        farmMap.getBlueRegion({gardenId:  itemData.farmId, regionId: itemData.regionId}, (e) => {
-            farmMap.setBlueRegion(itemData.executeBlueZones)
-        });
-    })
-}
-
-
-let farmId = route.query.farmId
-let libId = route.query.libId
-let id = route.query.id
-onMounted(() => {
-    farmMap.initMap("POINT(113.61448114737868 23.585550924763083)", mapRef.value);
-    getList();
-});
-
-
-const goBack = () => {
-    router.go(-1);
-};
-</script>
-
-<style lang="scss" scoped>
-.base-container {
-    width: 100%;
-    height: 100vh;
-    color: #fff;
-    position: relative;
-    box-sizing: border-box;
-    z-index: 1;
-    background: #000;
-
-    .content {
-        width: 100%;
-        height: calc(100% - 74px);
-        display: flex;
-        justify-content: space-between;
-        box-sizing: border-box;
-        padding: 20px;
-        .content-left {
-            width: 473px;
-            height: 100%;
-            box-sizing: border-box;
-            .btn {
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                border: 1px solid rgba(255, 255, 255, 0.78);
-                border-radius: 4px;
-                padding: 9px;
-                margin-bottom: 13px;
-                width: 104px;
-                cursor: pointer;
-                img {
-                    width: 14px;
-                    margin-right: 5px;
-                }
-            }
-            .left-cont {
-                width: 100%;
-                height: calc(100% - 48px - 4px);
-                .icon-arrow{
-                    cursor: pointer;
-                }
-                .box {
-                    width: 100%;
-                    height: 100%;
-                    padding: 16px 12px;
-                    box-sizing: border-box;
-                    overflow-y: auto;
-                    .box-item {
-                        background: rgba(255, 255, 255, 0.04);
-                        border: 1px solid #444444;
-                        border-radius: 8px;
-                        padding: 16px 12px;
-                        box-sizing: border-box;
-                        width: 100%;
-                        .box-title {
-                            font-size: 20px;
-                            border-bottom: 1px solid #333333;
-                            padding: 0 0 12px 13px;
-                            margin-bottom: 12px;
-                            position: relative;
-                            display: flex;
-                            align-items: center;
-                            justify-content: space-between;
-                            &::before {
-                                content: "";
-                                position: absolute;
-                                left: 0;
-                                top: 6px;
-                                width: 3px;
-                                height: 16px;
-                                background: #fff;
-                                border-radius: 11px;
-                            }
-                        }
-
-                    }
-                    .box-item + .box-item {
-                        margin-top: 12px;
-                    }
-                }
-                .button {
-                    font-size: 16px;
-                    padding: 10px;
-                    background: #ffd489;
-                    border-radius: 4px;
-                    color: #000;
-                    margin: 16px 0;
-                    cursor: pointer;
-                    text-align: center;
-                }
-            }
-        }
-        .content-right {
-            width: calc(100% - 473px - 18px);
-            margin-left: 18px;
-            height: 100%;
-            background: #191919;
-            border: 0.6px solid #444444;
-            padding: 20px;
-            box-sizing: border-box;
-            border-radius: 8px;
-            .map-header {
-                display: flex;
-                justify-content: space-between;
-                .title {
-                    font-size: 22px;
-                    display: flex;
-                    align-items: flex-end;
-                    font-family: "PangMenZhengDao";
-                    margin-bottom: 16px;
-                    img {
-                        margin-right: 8px;
-                    }
-                }
-            }
-            .map {
-                width: 100%;
-                clip-path: inset(0px round 4px);
-                height: calc(100% - 31px - 16px);
-                position: relative;
-                .map-bg {
-                    position: absolute;
-                    z-index: 2;
-                    background: rgba(0, 0, 0, 0.6);
-                    border-radius: 18px;
-                    padding: 7px 16px;
-                    right: 20px;
-                }
-                .map-btn {
-                    top: 19px;
-                    cursor: pointer;
-                }
-                .map-legend {
-                    bottom: 21px;
-                    .item {
-                        display: flex;
-                        align-items: center;
-                        font-size: 14px;
-                        img {
-                            width: 16px;
-                            margin-right: 6px;
-                        }
-                    }
-                    .item + .item {
-                        padding-top: 10px;
-                    }
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 834
src/views/workDetail/prescriptionBox.vue

@@ -1,834 +0,0 @@
-<template>
-    <!-- 专家处方 -->
-    <div class="work-item" :class="{ dark: progress === 0 && ROLETYPE != '3' }">
-        <div class="work-line">
-            <div class="line-box">
-                <div class="line-dotted">
-                    <div class="dotted-inset"></div>
-                </div>
-            </div>
-        </div>
-        <div class="work-info">
-            <img v-if="progress === 0 && ROLETYPE == '3'" class="todo-img" src="@/assets/img/gallery/todo.png" />
-            <img v-if="progress !== 0" class="done-img" src="@/assets/img/gallery/done.png" />
-            <div class="card-item-title"><span class="dotted"></span>专家处方</div>
-            <div class="prescription-box">
-                <div class="step-box">
-                    <step-box :orderStatus="infoItem.orderStatus" v-if="infoItem.orderStatus || infoItem.orderStatus === 0"></step-box>
-                </div>
-                <!-- <div class="blur-bg">
-                        <div class="lock-btn">解锁智能处方</div>
-                    </div> -->
-                <div class="work-info-conetnt">
-                    <div class="info-item">
-                        <div class="info-name">农事编号</div>
-                        <div class="info-value">{{ infoItem.orderId }}</div>
-                    </div>
-                    <div class="info-item">
-                        <div class="info-name">服务亩数</div>
-                        <div class="info-value">{{ infoItem.area }}亩</div>
-                    </div>
-                    <div class="info-item">
-                        <div class="info-name">服务区域</div>
-                        <div class="info-value">{{ infoItem.serviceRegion }}</div>
-                    </div>
-                    <div v-if="progress === 0 && ROLETYPE == '3'">
-                        <div class="info-item">
-                            <div class="info-name">触发条件</div>
-                            <div class="info-value">
-                                {{ infoItem.condition }}
-                                <div class="select-value">
-                                    <el-select v-model="infoItem.condition" placeholder="请选择" style="width: 80px">
-                                        <el-option v-for="num in 9" :key="num" :value="20 + (num - 1) * 5 + '%'">
-                                            {{ 20 + (num - 1) * 5 }}%
-                                        </el-option>
-                                    </el-select>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="info-item time-picker">
-                            <div class="info-name">执行时间</div>
-                            <div class="info-value">
-                                <el-date-picker
-                                    style="width: 150px"
-                                    value-format="YYYY-MM-DD"
-                                    v-model="infoItem.executeDate"
-                                    type="date"
-                                    :clearable="false"
-                                    class="date-info"
-                                    placeholder="选择日期"
-                                />
-                            </div>
-                        </div>
-                    </div>
-                    <div v-else>
-                        <div class="info-item">
-                            <div class="info-name">触发条件</div>
-                            <div class="info-value">{{ infoItem.farmWorkLibName }}</div>
-                        </div>
-                        <div class="info-item">
-                            <div class="info-name">执行时间</div>
-                            <div class="info-value">{{ infoItem.executeDate }}</div>
-                        </div>
-                    </div>
-                    <!-- <div class="info-item">
-                        <li class="info-name">执行时间</li>
-                        <div class="info-value primary-color">2025.01.12</div>
-                    </div> -->
-                </div>
-                <div class="desc">
-                    {{ prescriptioData.expertPrescription || prescriptioData.weatherWarningMsg }}
-                </div>
-                <div class="prescription-item" v-if="progress === 0 && ROLETYPE == '3' && !allPesticideFertilizerListsEmpty">
-                    <div class="usageMode-wrap">
-                        <div class="box-item">
-                            <div class="form-l">施用方式</div>
-                            <div class="form-r">
-                                <el-select
-                                    v-model="dynamicValidateForm.usageMode"
-                                    placeholder="请选择"
-                                    style="width: 152px"
-                                >
-                                    <el-option
-                                        v-for="(usage, uId) in allUsageModeList"
-                                        :key="uId"
-                                        :label="usage"
-                                        :value="usage"
-                                    />
-                                </el-select>
-                            </div>
-                        </div>
-                    </div>
-                    <el-form ref="formRef" style="max-width: 600px" :model="dynamicValidateForm" class="demo-dynamic">
-                        <div
-                            v-for="(prescriptionItem, prescriptionI) in dynamicValidateForm.prescriptionList"
-                            :key="prescriptionI"
-                        >
-                            <div class="recipe-box">
-                                <div class="recipe-title">
-                                    <div class="recipe-name">{{ prescriptionItem.name }}处方</div>
-                                    <div class="recipe-btn" @click="addDomain(prescriptionI)">
-                                        <el-icon><Plus /></el-icon>新增药物
-                                    </div>
-                                </div>
-                                <div class="recipe-item">
-                                    <div class="recipe-form">
-                                        <el-form-item
-                                            v-for="(domain, index) in prescriptionItem.pesticideFertilizerList"
-                                            :key="domain.key"
-                                            :prop="'domains.' + index + '.value'"
-                                        >
-                                            <div class="form-box">
-                                                <div class="form-index">{{ formatIndex(index) }}</div>
-                                                <div class="box-item" v-if="domain.typeName">
-                                                    <div class="form-l">使用功效</div>
-                                                    <div class="form-r r-text">
-                                                        {{ domain.typeName }}
-                                                        <!-- <el-select
-                                                            v-model="domain.typeName"
-                                                            placeholder="请选择"
-                                                            style="width: 140px"
-                                                            >
-                                                                <el-option :label="domain.typeName" :value="domain.typeName" />
-                                                        </el-select> -->
-                                                    </div>
-                                                </div>
-                                                <div class="box-item">
-                                                    <div class="form-l">肥药名称</div>
-                                                    <div class="form-r">
-                                                        <el-select
-                                                            filterable
-                                                            @change="
-                                                                handlePesticideFertilizerChange(prescriptionI, index)
-                                                            "
-                                                            v-model="domain.pesticideFertilizerId"
-                                                            placeholder="请选择"
-                                                            style="width: 140px"
-                                                        >
-                                                            <el-option
-                                                                v-for="item in pesticideFertilizersOptions"
-                                                                :key="item.id"
-                                                                :label="item.defaultName"
-                                                                :value="item.id"
-                                                            />
-                                                        </el-select>
-                                                    </div>
-                                                </div>
-                                                <div class="form-title">人工方式</div>
-                                                <div class="box-item sub-item">
-                                                    <div class="form-l has-sub">
-                                                        <div class="main-name">肥药配比</div>
-                                                        <div class="sub-name">(药剂:兑水量)</div>
-                                                    </div>
-                                                    <div class="form-r input-box text-center">
-                                                        <el-input
-                                                            v-model="domain.ratio"
-                                                            style="width: 140px"
-                                                            placeholder="请输入"
-                                                        />
-                                                        <!-- <el-select
-                                                            v-model="domain.value3"
-                                                            placeholder="请选择"
-                                                            style="width: 140px"
-                                                            >
-                                                                <el-option label="1ml:5000ml" value="1" />
-                                                                <el-option label="1ml:10000ml" value="3" />
-                                                        </el-select> -->
-                                                    </div>
-                                                </div>
-                                                <div class="box-item sub-item">
-                                                    <div class="form-l has-sub">
-                                                        <div class="main-name">单亩用量</div>
-                                                        <div class="sub-name">(亩数:药剂)</div>
-                                                    </div>
-                                                    <div class="form-r input-box text-center">
-                                                        <el-input
-                                                            v-model="domain.muUsage"
-                                                            style="width: 140px"
-                                                            placeholder="请输入"
-                                                        />
-                                                        <!-- <el-select
-                                                            v-model="domain.value5"
-                                                            placeholder="请选择"
-                                                            style="width: 140px"
-                                                            >
-                                                                <el-option label="1:5000ml" value="1" />
-                                                                <el-option label="1:10000ml" value="3" />
-                                                        </el-select> -->
-                                                    </div>
-                                                </div>
-                                                <div v-if="dynamicValidateForm.usageMode === '叶面施'">
-                                                    <div class="form-title">无人机方式</div>
-                                                    <div class="box-item sub-item">
-                                                        <div class="form-l has-sub">
-                                                            <div class="main-name">肥药配比</div>
-                                                            <div class="sub-name">(药剂:兑水量)</div>
-                                                        </div>
-                                                        <div class="form-r input-box text-center">
-                                                            <el-input
-                                                                v-model="domain.muUsage2"
-                                                                style="width: 140px"
-                                                                placeholder="请输入"
-                                                            />
-                                                            <!-- <el-select
-                                                                v-model="domain.value6"
-                                                                placeholder="请选择"
-                                                                style="width: 140px"
-                                                                >
-                                                                    <el-option label="1ml:5000ml" value="1" />
-                                                                    <el-option label="1ml:10000ml" value="3" />
-                                                            </el-select> -->
-                                                        </div>
-                                                    </div>
-                                                    <div class="box-item sub-item">
-                                                        <div class="form-l has-sub">
-                                                            <div class="main-name">单亩用量</div>
-                                                            <div class="sub-name">(亩数:药剂)</div>
-                                                        </div>
-                                                        <div class="form-r input-box text-center">
-                                                            <el-input
-                                                                v-model="domain.ratio2"
-                                                                style="width: 140px"
-                                                                placeholder="请输入"
-                                                            />
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                <div class="input-box">
-                                                    <el-input
-                                                        v-model="domain.remark"
-                                                        style="width: 100%"
-                                                        placeholder="备注:用药注意事项"
-                                                    />
-                                                </div>
-                                                <div class="action-btn">
-                                                    <el-button
-                                                        class="btn delete-btn"
-                                                        @click.prevent="removeDomain(prescriptionI, domain)"
-                                                    >
-                                                        删除
-                                                    </el-button>
-                                                    <el-button
-                                                        type="primary"
-                                                        class="btn"
-                                                        @click.prevent="resetItemForm(prescriptionI, index)"
-                                                    >
-                                                        重置
-                                                    </el-button>
-                                                </div>
-                                            </div>
-                                        </el-form-item>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </el-form>
-                </div>
-                <div class="prescription-item" v-else v-show="!allPesticideFertilizerListsEmpty">
-                    <div class="sub-title">
-                        <div class="sub-name">药物处方</div>
-                    </div>
-                    <div class="use-mode">施用方式:<span>{{ prescriptioData.usageMode }}</span></div>
-                    <div v-if="workType">
-                        <div class="new-wrap">
-                            <div class="new-title">
-                                <div class="title-1"><div class="table-name">使用功效</div></div>
-                                <div class="title-2"><div class="table-name">肥药名称</div></div>
-                                <div class="title-3"><div class="table-name">执行方式</div></div>
-                                <div class="title-4"><div class="table-name">药肥配比</div></div>
-                                <div class="title-5"><div class="table-name">单亩用量</div></div>
-                            </div>
-                            <div
-                                class="new-table-wrap"
-                                v-for="(prescriptionItem, prescriptionI) in prescriptioData.prescriptionList"
-                                :key="prescriptionI"
-                            >
-                                <div
-                                    class="new-prescription"
-                                    v-for="(subP, subI) in prescriptionItem.pesticideFertilizerList"
-                                    :key="subI"
-                                >
-                                    <div class="new-table">
-                                        <div class="line-l">
-                                            <div class="line-1 title-1">{{ subP.typeName }}</div>
-                                            <div class="line-2">{{ subP.defaultName }}</div>
-                                        </div>
-                                        <div class="line-r" :class="{'has-border': prescriptioData.usageMode === '叶面施'}">
-                                            <div class="line-3">
-                                                <div class="sub-line title-3" :class="{'execute-line': prescriptioData.usageMode === '叶面施'}">人工</div>
-                                                <div class="sub-line title-4">{{ subP.ratio }}</div>
-                                                <div class="sub-line title-5">{{ subP.muUsage }}</div>
-                                            </div>
-                                            <div class="line-4" v-if="prescriptioData.usageMode === '叶面施'">
-                                                <div class="sub-line title-3 execute-line">无人机</div>
-                                                <div class="sub-line title-4">{{ subP.ratio2 ? subP.ratio2 : "---" }}</div>
-                                                <div class="sub-line title-5">{{ subP.muUsage2 ? subP.muUsage2 : "---" }}</div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="note-text" v-if="subP.remark">{{ subP.remark }}</div>
-                                </div>
-                                <!-- <div class="prescription-result" :class="{ 'has-wrap': workType }">
-                                    <div class="result-index">0{{ index + 1 }}</div>
-                                    <div class="result-title">
-                                        <div class="title-item">
-                                            <div class="name">功效:</div>
-                                            <div class="value">{{ item.typeName }}</div>
-                                        </div>
-                                        <div class="title-item">
-                                            <div class="name">名称:</div>
-                                            <div class="value">{{ item.defaultName }}</div>
-                                        </div>
-                                    </div>
-                                    <div>
-                                        <el-table
-                                            :data="handleTableData(item)"
-                                            style="width: 100%"
-                                            :header-cell-style="{ background: '#F5F5F5' }"
-                                        >
-                                            <el-table-column label="" width="50">
-                                                <template #default="scope">
-                                                    <div class="table-l-title">
-                                                        {{ scope.row.executeStyle == 1 ? "人工" : "无人机" }}
-                                                    </div>
-                                                </template>
-                                            </el-table-column>
-                                            <el-table-column label="配比" width="56">
-                                                <template #default="scope">
-                                                    {{ scope.row.ratio ? scope.row.ratio + scope.row.unit : "---" }}
-                                                </template>
-                                            </el-table-column>
-                                            <el-table-column prop="muUsage" label="单亩用量">
-                                                <template #default="scope">
-                                                    {{ scope.row.muUsage ? scope.row.muUsage + scope.row.unit : "---" }}
-                                                </template>
-                                            </el-table-column>
-                                        </el-table>
-                                    </div>
-                                    <div class="remark-text">备注:{{ item.remark }}</div>
-                                </div> -->
-                            </div>
-                        </div>
-                    </div>
-                    <div v-else class="item-table has-sub-title no-wrap-table">
-                        <div class="prescription-result">
-                            <el-table
-                                :data="prescriptioData.pesticideFertilizers"
-                                style="width: 100%"
-                                :header-cell-style="{ background: '#F5F5F5' }"
-                            >
-                                <el-table-column prop="typeName" label="功效" width="42" />
-                                <el-table-column prop="defaultName" label="名称" />
-                                <el-table-column label="配比" width="52">
-                                    <template #default="scope">
-                                        {{ scope.row.ratio ? scope.row.ratio + scope.row.unit : "---" }}
-                                    </template>
-                                </el-table-column>
-                                <el-table-column prop="muUsage" label="单亩用量" width="42">
-                                    <template #default="scope">
-                                        {{ scope.row.muUsage ? scope.row.muUsage + scope.row.unit : "---" }}
-                                    </template>
-                                </el-table-column>
-                                <el-table-column label="执行方式" width="40">
-                                    <template #default="scope">
-                                        <div class="table-l-title">
-                                            {{ scope.row.executeStyle == 1 ? "人工" : "人工" }}
-                                        </div>
-                                    </template>
-                                </el-table-column>
-                            </el-table>
-                        </div>
-                    </div>
-                </div>
-                <div class="prescription-item">
-                    <div class="sub-title">
-                        <div class="sub-line"></div>
-                        <div class="sub-name">执行农事区域</div>
-                        <div class="sub-line"></div>
-                    </div>
-                    <div class="prescription-chart prescription-map" v-if="infoItem?.executeBlueZones">
-                        <execute-blue-region
-                            :executeBlueZones="infoItem?.executeBlueZones"
-                            :farmId="infoItem.farmId"
-                            :regionId="infoItem.regionId"
-                        ></execute-blue-region>
-                    </div>
-                </div>
-                <div class="prescription-item" v-if="progress === 0">
-                    <div class="sub-title">
-                        <div class="sub-line"></div>
-                        <div class="sub-name">指标动态</div>
-                        <div class="sub-line"></div>
-                    </div>
-                    <div class="prescription-chart">
-                        <chart
-                            :key="1"
-                            type="feature"
-                            :indexName="infoItem.indexName"
-                            :chartJson="prescriptioData.indexJson"
-                        ></chart>
-                    </div>
-                </div>
-                <div class="prescription-item action-btn" v-if="progress === 0 && ROLETYPE == '3'">
-                    <el-button class="btn" type="danger" plain @click="remove()">删除</el-button>
-                    <el-button class="btn" type="primary" @click="submitForm(formRef)">确认下发</el-button>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import eventBus from "@/api/eventBus";
-import chart from "./chart.vue";
-import { computed, onMounted, reactive, ref } from "vue";
-import { ElMessage, ElMessageBox } from "element-plus";
-import { useStore } from "vuex";
-import ExecuteBlueRegion from "./executeBlueRegion";
-import stepBox from "@/components/common/stepBox.vue";
-import { useRouter } from "vue-router";
-const router = useRouter();
-
-const props = defineProps({
-    progress: {
-        type: Number,
-        required: true,
-    },
-    prescriptioData: {
-        type: Object,
-    },
-});
-
-const infoItem = ref({});
-
-const store = useStore();
-const ROLETYPE = store.state.app.curRole;
-
-// 农事类型--区分表格显示字段等
-const workType = ref(true);
-
-let pesticideFertilizersOptions = ref([
-    {
-        id: "null",
-        name: "芸苔素内酯 15000倍",
-        typeName: "30",
-        defaultRatio: null,
-        defaultDroneRatio: null,
-        unit: 0,
-        defaultName: "调节",
-    },
-]);
-VE_API.order.pesticideFertilizers().then(({ data }) => {
-    pesticideFertilizersOptions.value = data;
-});
-
-onMounted(() => {
-    dynamicValidateForm.usageMode = props.prescriptioData.usageMode;
-    dynamicValidateForm.prescriptionList = props.prescriptioData.prescriptionList.map((item) => ({ ...item }));
-    // submit()
-    infoItem.value = props.prescriptioData;
-});
-
-const allPesticideFertilizerListsEmpty = computed(() => {
-    // prescriptioData.prescriptionList[0].pesticideFertilizerList
-    // 遍历 prescriptionList 数组
-    return props.prescriptioData.prescriptionList.every((item) => {
-        // 检查 pesticideFertilizerList 是否为空数组或每个对象都为空
-        return (
-            !item.pesticideFertilizerList.length ||
-            item.pesticideFertilizerList.every(
-                (subItem) =>
-                    // 假设每个子对象需要某种条件来判断是否为空,这里假设对象没有属性即为空
-                    Object.keys(subItem).length === 0
-            )
-        );
-    });
-});
-
-// 表单
-const formRef = ref();
-const dynamicValidateForm = reactive({
-    name: "",
-    conditionRate: "",
-    executeDate: "",
-    usageMode: "",
-    prescriptionList: [
-        {
-            name: "",
-            pesticideFertilizerList: [
-                {
-                    key: 1,
-                    typeName: "",
-                    muUsage: "",
-                    muUsage2: "",
-                    ratio: "",
-                    ratio2: "",
-                    remark: "",
-                },
-            ],
-        },
-    ],
-});
-
-const addDomain = (parentIndex) => {
-    dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.unshift({
-        key: Date.now(),
-        muUsage: "",
-        muUsage2: "",
-        ratio: "",
-        ratio2: "",
-        remark: "",
-    });
-};
-
-const removeDomain = (parentIndex, item) => {
-    const index = dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.indexOf(item);
-    if (index !== -1) {
-        dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.splice(index, 1);
-    }
-};
-
-const resetItemForm = (parentIndex, index) => {
-    dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index] = {
-        typeName: "",
-        muUsage: "",
-        muUsage2: "",
-        ratio: "",
-        ratio2: "",
-        remark: "",
-    };
-};
-
-const allUsageMode = ref(null);
-const allUsageModeList = ["叶面施", "根部施"];
-
-/**
- * 选择药肥的时候修改订单中药肥pesticideFertilizerId 以外其他数据
- * @param index
- */
-const handlePesticideFertilizerChange = (parentIndex, index) => {
-    let obj = pesticideFertilizersOptions.value.filter(
-        (item) =>
-            dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index].pesticideFertilizerId ===
-            item.id
-    )[0];
-    dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index] = {
-        ...dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index],
-        typeName: obj.typeName,
-        unit: obj.unit,
-        defaultRatio: obj.defaultRatio,
-        usageModeList: obj.usageModeList,
-        ratio: obj.defaultRatio,
-        defaultName: obj.defaultName,
-        pesticideFertilizerName: obj.name,
-        pesticideFertilizerCode: obj.pesticideFertilizerCode,
-    };
-};
-
-const submitForm = (formEl) => {
-    if (!formEl) return;
-    formEl.validate((valid) => {
-        if (valid) {
-            submit();
-        } else {
-            console.log("error submit!");
-        }
-    });
-};
-
-const submit = () => {
-    // const executeBlueZones = newFarmMap.getSelectedBlueRegion();
-    // if (!executeBlueZones || !executeBlueZones.length) {
-    //     ElMessage({
-    //         message: "请选择执行区域",
-    //         type: "warning",
-    //     });
-    //     return false
-    // }
-    // 检查药物所有项是否都包含特定的字段
-    const hasRequiredFields = dynamicValidateForm.prescriptionList.every((item) => {
-        return item.pesticideFertilizerList.every((domain) => {
-            const hasPesticideFertilizerCode = "pesticideFertilizerCode" in domain;
-            const hasMuUsage = "muUsage" in domain;
-            const hasRatio = "ratio" in domain;
-
-            const isMuUsageValid = domain.muUsage !== "";
-            const isRatioValid = domain.ratio ? true : false;
-
-            return hasPesticideFertilizerCode && hasMuUsage && hasRatio && isMuUsageValid && isRatioValid;
-        });
-    });
-    if (!hasRequiredFields) {
-        ElMessage({
-            message: "请完善药物信息",
-            type: "warning",
-        });
-        return false;
-    }
-    const data = {
-        ...infoItem.value,
-        ...dynamicValidateForm,
-        // prescription: flattenedDomains,
-        orderStatus: 1,
-        // weatherWarningMsg: warningMsg.value,
-        // allUsageMode: allUsageMode.value,
-    };
-    VE_API.order.confirm(data).then(({ code }) => {
-        if (code === 0) {
-            ElMessage({
-                message: "下发处方成功",
-                type: "success",
-            });
-            setTimeout(() => {
-                eventBus.emit("discover:submitForm");
-                // window.location.reload();
-            }, 500);
-        }
-    });
-};
-
-const formatIndex = (index) => {
-    return String(index + 1).padStart(2, "0");
-};
-
-const handleTableData = (item) => {
-    return [
-        {
-            typeName: item.typeName,
-            defaultName: item.defaultName,
-            executeStyle: 1,
-            ratio: item.ratio || item.defaultRatio,
-            usageMode: item.usageMode,
-            muUsage: item.muUsage,
-            unit: item.unit,
-        },
-        {
-            typeName: item.typeName,
-            defaultName: item.defaultName,
-            executeStyle: 2,
-            ratio: item.ratio2,
-            usageMode: "---",
-            muUsage: item.muUsage2,
-            unit: item.unit,
-        },
-    ];
-};
-
-const remove = () => {
-    ElMessageBox.confirm("是否要删除这个农事?", "警告", {
-        confirmButtonText: "删除",
-        cancelButtonText: "取消",
-        type: "warning",
-    }).then(() => {
-        VE_API.farm.deleteFarmWork({ libId: infoItem.value.farmWorkLibId }).then(({ code }) => {
-            if (code === 0) {
-                ElMessage({
-                    type: "success",
-                    message: "删除成功!",
-                });
-                setTimeout(() => {
-                    // router.go(-1);
-                    router.replace("/expert_album?reload=true");
-                }, 500);
-            }
-        });
-    });
-};
-</script>
-
-<style lang="scss" scoped>
-@import "./boxClass.scss";
-.recipe-box {
-    .recipe-title {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        .recipe-name {
-            color: #000000;
-            font-size: 14px;
-        }
-        .recipe-btn {
-            font-size: 12px;
-            color: #2199f8;
-        }
-    }
-}
-.prescription-result {
-    position: relative;
-    // border: 0.5px solid #444444;
-    // border-radius: 4px;
-    // padding: 8px 10px 10px 10px;
-    &.has-wrap {
-        border: 0.5px solid #444444;
-        border-radius: 4px;
-        padding: 8px 10px 10px 10px;
-    }
-    .result-index {
-        position: absolute;
-        left: -1px;
-        top: -1px;
-        padding: 0 8px;
-        background: #2199f8;
-        color: #fff;
-        font-size: 12px;
-        border-radius: 4px 0 4px 0;
-    }
-    .result-title {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        padding-bottom: 8px;
-        .title-item {
-            display: flex;
-            align-items: center;
-            .name {
-                color: rgba(33, 153, 248, 0.85);
-            }
-            .value {
-                color: rgba(0, 0, 0, 0.4);
-            }
-        }
-        .title-item + .title-item {
-            padding-left: 16px;
-        }
-    }
-}
-.use-mode {
-    color: rgba(0, 0, 0, 0.4);
-    padding: 2px 0 8px 0;
-    span {
-        color: #2199f8;
-    }
-}
-.new-wrap {
-    border-radius: 5px;
-    text-align: center;
-    border: 1px solid #444444;
-    .new-title {
-        background: #e0f2ff;
-        border-radius: 5px 5px 0 0;
-        border-bottom: 1px solid #444444;
-        display: flex;
-        color: rgba(33, 153, 248, 0.85);
-        // justify-content: space-around;
-        padding: 5px 6px;
-        font-size: 12px;
-        .table-name {
-            width: 24px;
-            font-size: 12px;
-            margin: 0 auto;
-        }
-    }
-
-    .title-1 {
-        width: 46px;
-    }
-    .title-2 {
-        flex: 1;
-    }
-    .title-3 {
-        width: 52px;
-    }
-    .title-4 {
-        width: 56px;
-    }
-    .title-5 {
-        width: 52px;
-    }
-    .new-table-wrap {
-        padding: 5px;
-        .new-prescription {
-            .new-table {
-                display: flex;
-                align-items: center;
-                border: 1px solid #444444;
-                background: #fff;
-                border-radius: 5px;
-                color: rgba(0, 0, 0, 0.4);
-                font-size: 11px;
-                .line-l {
-                    display: flex;
-                    flex: 1;
-                    .line-2 {
-                        flex: 1;
-                        padding: 0 2px;
-                    }
-                }
-                .line-r {
-                    &.has-border {
-                        border-left: 1px solid #444444;
-                    }
-                    .line-3 {
-                        display: flex;
-                        align-items: center;
-                    }
-                    .sub-line {
-                        padding: 10px 0;
-                    }
-                    .line-4 {
-                        display: flex;
-                        align-items: center;
-                        border-top: 1px solid #444444;
-                    }
-                    .execute-line {
-                        border-right: 1px solid #444444;
-                    }
-                }
-
-            }
-            .note-text {
-                margin: 8px 0 4px 0;
-                color: rgba(0, 0, 0, 0.4);
-                background: #fff;
-                padding: 6px 8px;
-                border-radius: 5px;
-                text-align: left;
-                font-size: 11px;
-            }
-        }
-        .new-prescription + .new-prescription {
-            padding-top: 8px;
-        }
-    }
-}
-</style>

+ 83 - 261
yarn.lock

@@ -37,14 +37,7 @@
   resolved "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.2.tgz"
   integrity sha512-vy9fM3pIxZmX07dL+VX1aZe7ynZ+YyB0jY+jE6r3hOK6GNY2t6W8rzpFC4tgpbXUYABkFQwgJq2XYXlxbXAI0g==
 
-"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.7":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz"
-  integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==
-  dependencies:
-    "@babel/highlight" "^7.16.7"
-
-"@babel/code-frame@^7.18.6":
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.18.6.tgz"
   integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==
@@ -86,15 +79,6 @@
     eslint-visitor-keys "^2.1.0"
     semver "^6.3.0"
 
-"@babel/generator@^7.16.8":
-  version "7.16.8"
-  resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz"
-  integrity sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==
-  dependencies:
-    "@babel/types" "^7.16.8"
-    jsesc "^2.5.1"
-    source-map "^0.5.0"
-
 "@babel/generator@^7.18.6":
   version "7.18.7"
   resolved "https://registry.npmmirror.com/@babel/generator/-/generator-7.18.7.tgz"
@@ -164,13 +148,6 @@
     resolve "^1.14.2"
     semver "^6.1.2"
 
-"@babel/helper-environment-visitor@^7.16.7":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz"
-  integrity sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==
-  dependencies:
-    "@babel/types" "^7.16.7"
-
 "@babel/helper-environment-visitor@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz"
@@ -183,15 +160,6 @@
   dependencies:
     "@babel/types" "^7.18.6"
 
-"@babel/helper-function-name@^7.16.7":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz"
-  integrity sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==
-  dependencies:
-    "@babel/helper-get-function-arity" "^7.16.7"
-    "@babel/template" "^7.16.7"
-    "@babel/types" "^7.16.7"
-
 "@babel/helper-function-name@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz"
@@ -200,20 +168,6 @@
     "@babel/template" "^7.18.6"
     "@babel/types" "^7.18.6"
 
-"@babel/helper-get-function-arity@^7.16.7":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz"
-  integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==
-  dependencies:
-    "@babel/types" "^7.16.7"
-
-"@babel/helper-hoist-variables@^7.16.7":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz"
-  integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==
-  dependencies:
-    "@babel/types" "^7.16.7"
-
 "@babel/helper-hoist-variables@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz"
@@ -228,14 +182,7 @@
   dependencies:
     "@babel/types" "^7.18.6"
 
-"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz"
-  integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==
-  dependencies:
-    "@babel/types" "^7.16.7"
-
-"@babel/helper-module-imports@^7.18.6":
+"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz"
   integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==
@@ -263,12 +210,7 @@
   dependencies:
     "@babel/types" "^7.18.6"
 
-"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz"
-  integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==
-
-"@babel/helper-plugin-utils@^7.18.6":
+"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz"
   integrity sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==
@@ -308,13 +250,6 @@
   dependencies:
     "@babel/types" "^7.18.6"
 
-"@babel/helper-split-export-declaration@^7.16.7":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz"
-  integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==
-  dependencies:
-    "@babel/types" "^7.16.7"
-
 "@babel/helper-split-export-declaration@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz"
@@ -322,11 +257,6 @@
   dependencies:
     "@babel/types" "^7.18.6"
 
-"@babel/helper-validator-identifier@^7.16.7":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz"
-  integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==
-
 "@babel/helper-validator-identifier@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz"
@@ -356,15 +286,6 @@
     "@babel/traverse" "^7.18.6"
     "@babel/types" "^7.18.6"
 
-"@babel/highlight@^7.16.7":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz"
-  integrity sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==
-  dependencies:
-    "@babel/helper-validator-identifier" "^7.16.7"
-    chalk "^2.0.0"
-    js-tokens "^4.0.0"
-
 "@babel/highlight@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/highlight/-/highlight-7.18.6.tgz"
@@ -374,7 +295,7 @@
     chalk "^2.0.0"
     js-tokens "^4.0.0"
 
-"@babel/parser@^7.16.4", "@babel/parser@^7.16.7", "@babel/parser@^7.16.8", "@babel/parser@^7.18.4", "@babel/parser@^7.18.6":
+"@babel/parser@^7.16.4", "@babel/parser@^7.18.4", "@babel/parser@^7.18.6":
   version "7.21.2"
   resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz"
   integrity sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==
@@ -1017,16 +938,7 @@
   dependencies:
     regenerator-runtime "^0.13.4"
 
-"@babel/template@^7.0.0", "@babel/template@^7.16.7":
-  version "7.16.7"
-  resolved "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz"
-  integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==
-  dependencies:
-    "@babel/code-frame" "^7.16.7"
-    "@babel/parser" "^7.16.7"
-    "@babel/types" "^7.16.7"
-
-"@babel/template@^7.18.6":
+"@babel/template@^7.0.0", "@babel/template@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/template/-/template-7.18.6.tgz"
   integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==
@@ -1035,23 +947,7 @@
     "@babel/parser" "^7.18.6"
     "@babel/types" "^7.18.6"
 
-"@babel/traverse@^7.0.0", "@babel/traverse@^7.13.0":
-  version "7.16.8"
-  resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.8.tgz"
-  integrity sha512-xe+H7JlvKsDQwXRsBhSnq1/+9c+LlQcCK3Tn/l5sbx02HYns/cn7ibp9+RV1sIUqu7hKg91NWsgHurO9dowITQ==
-  dependencies:
-    "@babel/code-frame" "^7.16.7"
-    "@babel/generator" "^7.16.8"
-    "@babel/helper-environment-visitor" "^7.16.7"
-    "@babel/helper-function-name" "^7.16.7"
-    "@babel/helper-hoist-variables" "^7.16.7"
-    "@babel/helper-split-export-declaration" "^7.16.7"
-    "@babel/parser" "^7.16.8"
-    "@babel/types" "^7.16.8"
-    debug "^4.1.0"
-    globals "^11.1.0"
-
-"@babel/traverse@^7.18.6":
+"@babel/traverse@^7.0.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6":
   version "7.18.6"
   resolved "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.18.6.tgz"
   integrity sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw==
@@ -1067,15 +963,7 @@
     debug "^4.1.0"
     globals "^11.1.0"
 
-"@babel/types@^7.0.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.4.4":
-  version "7.16.8"
-  resolved "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz"
-  integrity sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==
-  dependencies:
-    "@babel/helper-validator-identifier" "^7.16.7"
-    to-fast-properties "^2.0.0"
-
-"@babel/types@^7.18.6", "@babel/types@^7.18.7":
+"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.4.4":
   version "7.18.7"
   resolved "https://registry.npmmirror.com/@babel/types/-/types-7.18.7.tgz"
   integrity sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==
@@ -3534,12 +3422,7 @@
   optionalDependencies:
     prettier "^1.18.2 || ^2.0.0"
 
-"@vue/devtools-api@^6.0.0-beta.11":
-  version "6.0.0-beta.21.1"
-  resolved "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.0.0-beta.21.1.tgz"
-  integrity sha512-FqC4s3pm35qGVeXRGOjTsRzlkJjrBLriDS9YXbflHLsfA9FrcKzIyWnLXoNm+/7930E8rRakXuAc2QkC50swAw==
-
-"@vue/devtools-api@^6.1.4":
+"@vue/devtools-api@^6.0.0-beta.11", "@vue/devtools-api@^6.1.4":
   version "6.2.0"
   resolved "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.0.tgz"
   integrity sha512-pF1G4wky+hkifDiZSWn8xfuLOJI1ZXtuambpBEYaf7Xaf6zC/pM29rvAGpd3qaGXnr4BAXU1Pxz/VfvBGwexGA==
@@ -4657,7 +4540,7 @@ braces@^2.3.1, braces@^2.3.2:
     split-string "^3.0.2"
     to-regex "^3.0.1"
 
-braces@^3.0.1, braces@^3.0.2, braces@~3.0.2:
+braces@^3.0.2, braces@~3.0.2:
   version "3.0.2"
   resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz"
   integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
@@ -5263,7 +5146,7 @@ color-name@~1.1.4:
 color-name@1.1.3:
   version "1.1.3"
   resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
-  integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+  integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
 
 color-support@^1.1.3:
   version "1.1.3"
@@ -5275,12 +5158,7 @@ colord@^2.9.1:
   resolved "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz"
   integrity sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ==
 
-colorette@^2.0.10, colorette@^2.0.16:
-  version "2.0.16"
-  resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz"
-  integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==
-
-colorette@^2.0.17:
+colorette@^2.0.10, colorette@^2.0.16, colorette@^2.0.17:
   version "2.0.19"
   resolved "https://registry.npmmirror.com/colorette/-/colorette-2.0.19.tgz"
   integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==
@@ -5300,7 +5178,12 @@ combined-stream@^1.0.8:
   dependencies:
     delayed-stream "~1.0.0"
 
-commander@*, commander@^2.20.0, commander@2:
+commander@*, commander@^8.3.0:
+  version "8.3.0"
+  resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz"
+  integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==
+
+commander@^2.20.0:
   version "2.20.3"
   resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz"
   integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
@@ -5310,11 +5193,6 @@ commander@^7.2.0:
   resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz"
   integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
 
-commander@^8.3.0:
-  version "8.3.0"
-  resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz"
-  integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==
-
 commander@^9.3.0:
   version "9.3.0"
   resolved "https://registry.npmmirror.com/commander/-/commander-9.3.0.tgz"
@@ -5325,6 +5203,11 @@ commander@~2.19.0:
   resolved "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz"
   integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==
 
+commander@2:
+  version "2.20.3"
+  resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz"
+  integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
+
 commander@2.17.x:
   version "2.17.1"
   resolved "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz"
@@ -5376,7 +5259,7 @@ compression@^1.7.4, compression@1.7.4:
 concat-map@0.0.1:
   version "0.0.1"
   resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
-  integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+  integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
 
 concat-stream@^1.5.0:
   version "1.6.2"
@@ -5580,16 +5463,7 @@ cross-spawn@^6.0.0:
     shebang-command "^1.2.0"
     which "^1.2.9"
 
-cross-spawn@^7.0.2:
-  version "7.0.3"
-  resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz"
-  integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
-  dependencies:
-    path-key "^3.1.0"
-    shebang-command "^2.0.0"
-    which "^2.0.1"
-
-cross-spawn@^7.0.3:
+cross-spawn@^7.0.2, cross-spawn@^7.0.3:
   version "7.0.3"
   resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz"
   integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
@@ -6418,7 +6292,7 @@ escape-html@^1.0.3, escape-html@~1.0.3:
 escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5, escape-string-regexp@1.0.5:
   version "1.0.5"
   resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz"
-  integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
+  integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
 
 escape-string-regexp@^4.0.0:
   version "4.0.0"
@@ -6548,16 +6422,7 @@ eslint-webpack-plugin@^3.1.0:
     text-table "^0.2.0"
     v8-compile-cache "^2.0.3"
 
-espree@^9.3.1:
-  version "9.3.2"
-  resolved "https://registry.npmmirror.com/espree/-/espree-9.3.2.tgz"
-  integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==
-  dependencies:
-    acorn "^8.7.1"
-    acorn-jsx "^5.3.2"
-    eslint-visitor-keys "^3.3.0"
-
-espree@^9.3.2:
+espree@^9.3.1, espree@^9.3.2:
   version "9.3.2"
   resolved "https://registry.npmmirror.com/espree/-/espree-9.3.2.tgz"
   integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==
@@ -7075,7 +6940,7 @@ fs-write-stream-atomic@^1.0.8:
 fs.realpath@^1.0.0:
   version "1.0.0"
   resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
-  integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
+  integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
 
 function-bind@^1.1.1, function-bind@^1.1.2:
   version "1.1.2"
@@ -7235,7 +7100,7 @@ glob-parent@^3.1.0:
     is-glob "^3.1.0"
     path-dirname "^1.0.0"
 
-glob-parent@^5.1.2, glob-parent@~5.1.2:
+glob-parent@^5.1.2:
   version "5.1.2"
   resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz"
   integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -7249,6 +7114,13 @@ glob-parent@^6.0.1:
   dependencies:
     is-glob "^4.0.3"
 
+glob-parent@~5.1.2:
+  version "5.1.2"
+  resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz"
+  integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
+  dependencies:
+    is-glob "^4.0.1"
+
 glob-to-regexp@^0.4.1:
   version "0.4.1"
   resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz"
@@ -7380,7 +7252,7 @@ has-flag@^1.0.0:
 has-flag@^3.0.0:
   version "3.0.0"
   resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz"
-  integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+  integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
 
 has-flag@^4.0.0:
   version "4.0.0"
@@ -7818,7 +7690,7 @@ infer-owner@^1.0.4:
 inflight@^1.0.4:
   version "1.0.6"
   resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz"
-  integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+  integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
   dependencies:
     once "^1.3.0"
     wrappy "1"
@@ -8025,7 +7897,7 @@ is-extendable@^1.0.1:
 is-extglob@^2.1.0, is-extglob@^2.1.1:
   version "2.1.1"
   resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz"
-  integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
+  integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
 
 is-file-esm@^1.0.0:
   version "1.0.0"
@@ -8222,7 +8094,7 @@ isarray@^2.0.5:
 isexe@^2.0.0:
   version "2.0.0"
   resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz"
-  integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
+  integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
 
 isobject@^2.0.0:
   version "2.1.0"
@@ -8238,7 +8110,12 @@ isobject@^2.1.0:
   dependencies:
     isarray "1.0.0"
 
-isobject@^3.0.0, isobject@^3.0.1:
+isobject@^3.0.0:
+  version "3.0.1"
+  resolved "https://registry.npmmirror.com/isobject/-/isobject-3.0.1.tgz"
+  integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==
+
+isobject@^3.0.1:
   version "3.0.1"
   resolved "https://registry.npmmirror.com/isobject/-/isobject-3.0.1.tgz"
   integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==
@@ -8615,12 +8492,7 @@ libnpmversion@^4.0.1:
     proc-log "^3.0.0"
     semver "^7.3.7"
 
-lilconfig@^2.0.3:
-  version "2.0.4"
-  resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.4.tgz"
-  integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==
-
-lilconfig@2.0.5:
+lilconfig@^2.0.3, lilconfig@2.0.5:
   version "2.0.5"
   resolved "https://registry.npmmirror.com/lilconfig/-/lilconfig-2.0.5.tgz"
   integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==
@@ -8683,7 +8555,7 @@ loader-utils@^0.2.16:
     json5 "^0.5.0"
     object-assign "^4.0.1"
 
-loader-utils@^1.0.2:
+loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3:
   version "1.4.0"
   resolved "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.0.tgz"
   integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==
@@ -8692,24 +8564,6 @@ loader-utils@^1.0.2:
     emojis-list "^3.0.0"
     json5 "^1.0.1"
 
-loader-utils@^1.1.0:
-  version "1.4.0"
-  resolved "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.0.tgz"
-  integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==
-  dependencies:
-    big.js "^5.2.2"
-    emojis-list "^3.0.0"
-    json5 "^1.0.1"
-
-loader-utils@^1.2.3:
-  version "1.4.2"
-  resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz"
-  integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==
-  dependencies:
-    big.js "^5.2.2"
-    emojis-list "^3.0.0"
-    json5 "^1.0.1"
-
 loader-utils@^2.0.0:
   version "2.0.2"
   resolved "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.2.tgz"
@@ -9086,15 +8940,7 @@ micromatch@^3.1.10, micromatch@^3.1.4:
     snapdragon "^0.8.1"
     to-regex "^3.0.2"
 
-micromatch@^4.0.2, micromatch@^4.0.4:
-  version "4.0.4"
-  resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz"
-  integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==
-  dependencies:
-    braces "^3.0.1"
-    picomatch "^2.2.3"
-
-micromatch@^4.0.5:
+micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5:
   version "4.0.5"
   resolved "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz"
   integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
@@ -9197,21 +9043,14 @@ minimalistic-crypto-utils@^1.0.1:
   resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz"
   integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==
 
-minimatch@*, minimatch@^3.0.4:
-  version "3.0.4"
-  resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz"
-  integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
-  dependencies:
-    brace-expansion "^1.1.7"
-
-minimatch@^3.1.1:
+minimatch@*, minimatch@^3.0.4, minimatch@^3.1.2, minimatch@3.1.2:
   version "3.1.2"
   resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz"
   integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
   dependencies:
     brace-expansion "^1.1.7"
 
-minimatch@^3.1.2:
+minimatch@^3.1.1:
   version "3.1.2"
   resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz"
   integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
@@ -9230,13 +9069,6 @@ minimatch@^7.4.3:
   dependencies:
     brace-expansion "^2.0.1"
 
-minimatch@3.1.2:
-  version "3.1.2"
-  resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz"
-  integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
-  dependencies:
-    brace-expansion "^1.1.7"
-
 minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:
   version "1.2.6"
   resolved "https://registry.npmmirror.com/minimist/-/minimist-1.2.6.tgz"
@@ -9880,7 +9712,7 @@ npmlog@^7.0.1:
 nprogress@^0.2.0:
   version "0.2.0"
   resolved "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz"
-  integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E=
+  integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E= sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==
 
 nth-check@^2.0.1:
   version "2.0.1"
@@ -10024,7 +9856,7 @@ on-headers@~1.0.2:
 once@^1.3.0, once@^1.3.1, once@^1.4.0:
   version "1.4.0"
   resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz"
-  integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+  integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
   dependencies:
     wrappy "1"
 
@@ -10316,14 +10148,19 @@ path-exists@^4.0.0:
 path-is-absolute@^1.0.0:
   version "1.0.1"
   resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz"
-  integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
+  integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
 
 path-is-inside@1.0.2:
   version "1.0.2"
   resolved "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz"
   integrity sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==
 
-path-key@^2.0.0, path-key@^2.0.1:
+path-key@^2.0.0:
+  version "2.0.1"
+  resolved "https://registry.npmmirror.com/path-key/-/path-key-2.0.1.tgz"
+  integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==
+
+path-key@^2.0.1:
   version "2.0.1"
   resolved "https://registry.npmmirror.com/path-key/-/path-key-2.0.1.tgz"
   integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==
@@ -10397,7 +10234,7 @@ picocolors@^1.0.0:
   resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz"
   integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
 
-picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1:
+picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1:
   version "2.3.1"
   resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz"
   integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
@@ -10967,17 +10804,7 @@ pumpify@^1.3.3:
     inherits "^2.0.3"
     pump "^2.0.0"
 
-punycode@^1.2.4:
-  version "1.4.1"
-  resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz"
-  integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==
-
-punycode@^1.3.2:
-  version "1.4.1"
-  resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz"
-  integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==
-
-punycode@^1.4.1:
+punycode@^1.2.4, punycode@^1.3.2, punycode@^1.4.1:
   version "1.4.1"
   resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz"
   integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==
@@ -11039,11 +10866,6 @@ quickselect@^2.0.0:
   resolved "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz"
   integrity sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==
 
-qweather-icons@^1.6.0:
-  version "1.6.0"
-  resolved "https://registry.npmjs.org/qweather-icons/-/qweather-icons-1.6.0.tgz"
-  integrity sha512-uINrSOteHHarEeHRpP37aBnuuwYnWc1eyZ2gbnujoEqOVabIPDiEseF7a9eIOnBn7GZBlo5nYj29eOEfLH/bEA==
-
 raf@^3.4.1:
   version "3.4.1"
   resolved "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz"
@@ -11066,7 +10888,12 @@ randomfill@^1.0.3:
     randombytes "^2.0.5"
     safe-buffer "^5.1.0"
 
-range-parser@^1.2.1, range-parser@~1.2.1:
+range-parser@^1.2.1:
+  version "1.2.1"
+  resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz"
+  integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
+
+range-parser@~1.2.1:
   version "1.2.1"
   resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz"
   integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
@@ -12034,12 +11861,7 @@ side-channel@^1.0.4, side-channel@^1.0.6:
     get-intrinsic "^1.2.4"
     object-inspect "^1.13.1"
 
-signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3:
-  version "3.0.6"
-  resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz"
-  integrity sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==
-
-signal-exit@^3.0.7:
+signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
   version "3.0.7"
   resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz"
   integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
@@ -12205,11 +12027,6 @@ source-map-url@^0.4.0:
   resolved "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz"
   integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==
 
-source-map@^0.5.0:
-  version "0.5.7"
-  resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz"
-  integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==
-
 source-map@^0.5.6:
   version "0.5.7"
   resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz"
@@ -12640,7 +12457,7 @@ svg-sprite-loader@^4.1.3:
 svg-tags@^1.0.0:
   version "1.0.0"
   resolved "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz"
-  integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=
+  integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==
 
 svgo@^2.7.0:
   version "2.8.0"
@@ -12818,7 +12635,7 @@ to-arraybuffer@^1.0.0:
 to-fast-properties@^2.0.0:
   version "2.0.0"
   resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz"
-  integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
+  integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==
 
 to-object-path@^0.3.0:
   version "0.3.0"
@@ -12900,16 +12717,16 @@ treeverse@^3.0.0:
   resolved "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz"
   integrity sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==
 
-tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@2.3.0:
-  version "2.3.0"
-  resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz"
-  integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
-
-tslib@^2.8.1:
+tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.8.1:
   version "2.8.1"
   resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz"
   integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
 
+tslib@2.3.0:
+  version "2.3.0"
+  resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz"
+  integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
+
 tsml@1.0.1:
   version "1.0.1"
   resolved "https://registry.npmjs.org/tsml/-/tsml-1.0.1.tgz"
@@ -13457,7 +13274,12 @@ vue-cli-plugin-element-plus@^0.0.13:
   resolved "https://registry.npmjs.org/vue-cli-plugin-element-plus/-/vue-cli-plugin-element-plus-0.0.13.tgz"
   integrity sha512-ctG5mynJIyGLFBhS2JpzXmBWT3JRXwzMm5AoANUmBlbZHTruct1xQF2OKM/mfJv6tSfqCcEfgH8rGCAY5ca83Q==
 
-vue-demi@*, vue-demi@^0.13.2:
+vue-demi@*:
+  version "0.13.2"
+  resolved "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.2.tgz"
+  integrity sha512-41ukrclEbMddAyP7PvxMSYqnOSzPV6r7GNnyTSKSCNTaz19GehxmTiXyP9kwHSUv2+Dr6hHqiUiF7L1VAw2KdQ==
+
+vue-demi@^0.13.2:
   version "0.13.2"
   resolved "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.2.tgz"
   integrity sha512-41ukrclEbMddAyP7PvxMSYqnOSzPV6r7GNnyTSKSCNTaz19GehxmTiXyP9kwHSUv2+Dr6hHqiUiF7L1VAw2KdQ==
@@ -13962,7 +13784,7 @@ wrap-ansi@^8.0.1:
 wrappy@1:
   version "1.0.2"
   resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
-  integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+  integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
 
 write-file-atomic@^5.0.0:
   version "5.0.0"

部分文件因文件數量過多而無法顯示