|
@@ -1,10 +1,6 @@
|
|
|
<template>
|
|
|
- <div class="plan-page">
|
|
|
+ <div class="plan-page" :style="{ height: `calc(100vh - ${tabBarHeight}px)` }">
|
|
|
<div class="plan-title">
|
|
|
- <!-- <el-tabs v-model="activeName" class="demo-tabs">
|
|
|
- <el-tab-pane label="专家处方" name="1"></el-tab-pane>
|
|
|
- <el-tab-pane label="我的处方" name="2"></el-tab-pane>
|
|
|
- </el-tabs> -->
|
|
|
<div class="tabs">
|
|
|
<div class="tab" :class="{ active: activeTab === 'left' }" @click="setActiveTab('left')">专家处方</div>
|
|
|
<div class="tab" :class="{ active: activeTab === 'right' }" @click="setActiveTab('right')">
|
|
@@ -14,7 +10,7 @@
|
|
|
<div class="slider" :style="sliderStyle"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="plan-content">
|
|
|
+ <div class="plan-content" v-if="activeTab === 'left'">
|
|
|
<div class="filter-wrap">
|
|
|
<div class="filter-item type-cascader">
|
|
|
<el-cascader v-model="typeVal" :options="typeOptions"></el-cascader>
|
|
@@ -50,7 +46,7 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="activeName === '1'" class="expert-prescription">
|
|
|
+ <div class="expert-prescription">
|
|
|
<div class="plan-menu">
|
|
|
<el-anchor :container="containerRef" direction="vertical" type="default" @click="handleClick">
|
|
|
<el-menu :default-active="defaultActive" class="el-menu-vertical-demo">
|
|
@@ -80,7 +76,7 @@
|
|
|
{{ section.title }}
|
|
|
<span class="parent-text">{{ section.parentTitle || "秋梢期" }}</span>
|
|
|
</div>
|
|
|
- <div class="title-r">
|
|
|
+ <div class="title-btn" @click="addToMyPlan">
|
|
|
<el-icon color="#fff" size="14"><Plus /></el-icon>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -89,16 +85,104 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="activeName === '2'" class="my-prescription">我的</div>
|
|
|
+ <!-- 底部 -->
|
|
|
+ <div class="fixed-bottom">
|
|
|
+ <div class="bottom-l">
|
|
|
+ <div class="l-btn">
|
|
|
+ <el-icon color="#666666" class="btn-icon" size="16"><Download /></el-icon>
|
|
|
+ 下载处方
|
|
|
+ </div>
|
|
|
+ <div class="l-btn">
|
|
|
+ <el-icon color="#666666" class="btn-icon" size="16"><ChatDotRound /></el-icon>
|
|
|
+ 咨询专家
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom-r">全部添加</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="plan-content my-recipe" v-if="activeTab === 'right'">
|
|
|
+ <div class="filter-wrap">
|
|
|
+ <div class="plan-box">
|
|
|
+ <div
|
|
|
+ class="plan-item"
|
|
|
+ v-for="(item, index) in planList"
|
|
|
+ :key="index"
|
|
|
+ @click="handlePlanClick(index)"
|
|
|
+ :class="{ active: activePlanIndex === index }"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="plan-add" @click="newPlan">新增方案</div>
|
|
|
+ </div>
|
|
|
+ <div class="expert-prescription">
|
|
|
+ <div class="plan-menu">
|
|
|
+ <el-anchor :container="containerRef" direction="vertical" type="default" @click="handleClick">
|
|
|
+ <el-menu :default-active="defaultActive" class="el-menu-vertical-demo">
|
|
|
+ <el-sub-menu v-for="(menu, index) in menuData" :key="index" :index="String(menu.id)">
|
|
|
+ <template #title>
|
|
|
+ <img class="menu-icon" :src="require(`@/assets/img/gallery/icon-${index}.png`)" />
|
|
|
+ <span class="menu-text">{{ menu.title }}</span>
|
|
|
+ </template>
|
|
|
+ <el-menu-item
|
|
|
+ v-for="item in menu.children"
|
|
|
+ :key="item.id"
|
|
|
+ :index="`${menu.id}-${item.id}`"
|
|
|
+ >
|
|
|
+ <el-anchor-link :href="item.href" :title="item.title" />
|
|
|
+ </el-menu-item>
|
|
|
+ </el-sub-menu>
|
|
|
+ </el-menu>
|
|
|
+ </el-anchor>
|
|
|
+ </div>
|
|
|
+ <div class="expert-content" ref="containerRef">
|
|
|
+ <div v-for="(section, index) in contentData" :key="index" class="content-section">
|
|
|
+ <div class="section-id" :id="section.targetId"></div>
|
|
|
+ <record-item :record-item-data="section">
|
|
|
+ <template #title>
|
|
|
+ <div class="box-title">
|
|
|
+ <div class="title-l">
|
|
|
+ {{ section.title }}
|
|
|
+ <span class="parent-text">{{ section.parentTitle || "秋梢期" }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="title-r">
|
|
|
+ <div class="btn-item del-btn">
|
|
|
+ <el-icon color="#fff" size="14"><Delete /></el-icon>
|
|
|
+ </div>
|
|
|
+ <div class="btn-item edit-btn">
|
|
|
+ <el-icon color="#fff" size="14"><Edit /></el-icon>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </record-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 底部 -->
|
|
|
+ <div class="fixed-bottom">
|
|
|
+ <div class="bottom-l">
|
|
|
+ <div class="l-btn">
|
|
|
+ <img class="btn-icon calculator-icon" src="@/assets/img/home/calculator.png" alt="">
|
|
|
+ 投入产出计算器
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom-r">新增农事</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <add-group ref="addGroupRef" />
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { computed, ref } from "vue";
|
|
|
import recordItem from "@/components/recordItem.vue";
|
|
|
+import addGroup from "./components/addGroup.vue";
|
|
|
+import { useStore } from "vuex";
|
|
|
+const store = useStore();
|
|
|
+
|
|
|
+const tabBarHeight = computed(() => store.state.home.tabBarHeight);
|
|
|
|
|
|
-const activeName = ref("1");
|
|
|
const containerRef = ref(null);
|
|
|
const handleClick = (e) => {
|
|
|
e.preventDefault();
|
|
@@ -164,23 +248,23 @@ const typeOptions = ref([
|
|
|
},
|
|
|
{
|
|
|
value: 11,
|
|
|
- label: "琵琶",
|
|
|
+ label: "枇杷",
|
|
|
children: [
|
|
|
{
|
|
|
value: 12,
|
|
|
- label: "琵琶1",
|
|
|
+ label: "枇杷1",
|
|
|
},
|
|
|
{
|
|
|
value: 13,
|
|
|
- label: "琵琶2",
|
|
|
+ label: "枇杷2",
|
|
|
},
|
|
|
{
|
|
|
value: 14,
|
|
|
- label: "琵琶3",
|
|
|
+ label: "枇杷3",
|
|
|
},
|
|
|
{
|
|
|
value: 15,
|
|
|
- label: "琵琶4",
|
|
|
+ label: "枇杷4",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
@@ -297,106 +381,7 @@ const contentData = ref([
|
|
|
executeMain: "广州泽秾丰农资有限公司",
|
|
|
storeShortName: "泽秾丰",
|
|
|
serviceRegion: "广州市从化区荔枝博览园",
|
|
|
- users: [
|
|
|
- {
|
|
|
- id: null,
|
|
|
- orderId: null,
|
|
|
- serviceType: null,
|
|
|
- userType: null,
|
|
|
- userId: 81881,
|
|
|
- joinStatus: null,
|
|
|
- icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/Group%201321316260.png",
|
|
|
- userName: "飞鸟种植助手",
|
|
|
- area: "",
|
|
|
- point: "",
|
|
|
- farmName: "",
|
|
|
- selected: null,
|
|
|
- },
|
|
|
- ],
|
|
|
- prescriptionList: [
|
|
|
- {
|
|
|
- name: "病虫",
|
|
|
- pesticideFertilizerList: [
|
|
|
- {
|
|
|
- defaultDroneRatio: null,
|
|
|
- defaultName: "2.5%高效氯氟氰菊酯乳油",
|
|
|
- defaultRatio: 50000,
|
|
|
- id: null,
|
|
|
- muPrice: null,
|
|
|
- muUsage: 25.0,
|
|
|
- muUsage2: 25.0,
|
|
|
- ratio: 50000,
|
|
|
- ratio2: 5000,
|
|
|
- remark: "",
|
|
|
- usageMode: "",
|
|
|
- usageModeList: ["叶面施"],
|
|
|
- orderId: null,
|
|
|
- pesticideFertilizerCode: "1003",
|
|
|
- pesticideFertilizerId: "3",
|
|
|
- pesticideFertilizerName: "2.5%高效氯氟氰菊酯乳油",
|
|
|
- brand: "先正达劲彪",
|
|
|
- typeName: "病虫",
|
|
|
- price: 10.699999999999999289457264239899814128875732421875,
|
|
|
- unit: "ml",
|
|
|
- executeStyle: null,
|
|
|
- },
|
|
|
- {
|
|
|
- defaultDroneRatio: null,
|
|
|
- defaultName: "80%代森锰锌可湿性粉剂",
|
|
|
- defaultRatio: 50000,
|
|
|
- id: null,
|
|
|
- muPrice: null,
|
|
|
- muUsage: 150.0,
|
|
|
- muUsage2: 150.0,
|
|
|
- ratio: 50000,
|
|
|
- ratio2: 5000,
|
|
|
- remark: "",
|
|
|
- usageMode: "",
|
|
|
- usageModeList: ["叶面施"],
|
|
|
- orderId: null,
|
|
|
- pesticideFertilizerCode: "1004",
|
|
|
- pesticideFertilizerId: "4",
|
|
|
- pesticideFertilizerName: "80%代森锰锌可湿性粉剂",
|
|
|
- brand: "利民化学",
|
|
|
- typeName: "病虫",
|
|
|
- price: 18,
|
|
|
- unit: "g",
|
|
|
- executeStyle: null,
|
|
|
- },
|
|
|
- {
|
|
|
- defaultDroneRatio: null,
|
|
|
- defaultName: "磷酸二氢钾",
|
|
|
- defaultRatio: 50000,
|
|
|
- id: null,
|
|
|
- muPrice: null,
|
|
|
- muUsage: 60.0,
|
|
|
- muUsage2: 60.0,
|
|
|
- ratio: 50000,
|
|
|
- ratio2: 5000,
|
|
|
- remark: "",
|
|
|
- usageMode: "",
|
|
|
- usageModeList: ["叶面施"],
|
|
|
- orderId: null,
|
|
|
- pesticideFertilizerCode: "1005",
|
|
|
- pesticideFertilizerId: "5",
|
|
|
- pesticideFertilizerName: "磷酸二氢钾",
|
|
|
- brand: " 国光",
|
|
|
- typeName: "营养",
|
|
|
- price: 5.5999999999999996447286321199499070644378662109375,
|
|
|
- unit: "g",
|
|
|
- executeStyle: null,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- conditionList: [
|
|
|
- {
|
|
|
- index: "1-1-002-02-02-02-01-0008",
|
|
|
- name: "单树嫩叶率",
|
|
|
- type: 1,
|
|
|
- value: "0.2",
|
|
|
- },
|
|
|
- ],
|
|
|
+ attention: "当前为秋梢期,建议巡园,重点关注叶片、嫩梢等部位",
|
|
|
},
|
|
|
{
|
|
|
targetId: "part2",
|
|
@@ -1315,10 +1300,30 @@ const contentData = ref([
|
|
|
],
|
|
|
},
|
|
|
]);
|
|
|
+
|
|
|
+const planList = ref([{name: "方案1",}, {name: "方案2"}]);
|
|
|
+const activePlanIndex = ref(0);
|
|
|
+const handlePlanClick = (index) => {
|
|
|
+ activePlanIndex.value = index;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+const addGroupRef = ref(null);
|
|
|
+// 新增方案
|
|
|
+function newPlan() {
|
|
|
+ addGroupRef.value.openClientPopup()
|
|
|
+}
|
|
|
+
|
|
|
+// 将专家处方添加到我的处方
|
|
|
+function addToMyPlan() {
|
|
|
+ addGroupRef.value.openClientPopup("edit")
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.plan-page {
|
|
|
+ position: relative;
|
|
|
+ height: calc(100vh - 50px);
|
|
|
.plan-title {
|
|
|
width: 158px;
|
|
|
margin: 0 auto;
|
|
@@ -1441,6 +1446,53 @@ const contentData = ref([
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .fixed-bottom {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 12px;
|
|
|
+ left: 12px;
|
|
|
+ width: calc(100% - 24px);
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 14px 12px;
|
|
|
+ background: linear-gradient(180deg, #f0f8ff 6px, #FFFFFF 20px);
|
|
|
+ border-radius: 14px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1);
|
|
|
+ .bottom-l {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .l-btn {
|
|
|
+ border: 1px solid rgba(153, 153, 153, 0.5);
|
|
|
+ border-radius: 30px;
|
|
|
+ padding: 0 8px 0 12px;
|
|
|
+ height: 32px;
|
|
|
+ line-height: 32px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ color: #666666;
|
|
|
+ .btn-icon {
|
|
|
+ padding-right: 3px;
|
|
|
+ }
|
|
|
+ .calculator-icon {
|
|
|
+ width: 12px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .l-btn + .l-btn {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .bottom-r {
|
|
|
+ height: 32px;
|
|
|
+ line-height: 32px;
|
|
|
+ background: #2199F8;
|
|
|
+ border-radius: 20px;
|
|
|
+ color: #fff;
|
|
|
+ padding: 0 12px;
|
|
|
+ }
|
|
|
+ }
|
|
|
.expert-prescription {
|
|
|
display: flex;
|
|
|
width: 100%;
|
|
@@ -1524,6 +1576,8 @@ const contentData = ref([
|
|
|
width: calc(100% - 100px);
|
|
|
height: 100%;
|
|
|
overflow: auto;
|
|
|
+ padding-bottom: 80px;
|
|
|
+ box-sizing: border-box;
|
|
|
.content-section {
|
|
|
position: relative;
|
|
|
.section-id {
|
|
@@ -1554,7 +1608,7 @@ const contentData = ref([
|
|
|
background: rgba(119, 119, 119, 0.1);
|
|
|
}
|
|
|
}
|
|
|
- .title-r {
|
|
|
+ .title-btn {
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
border-radius: 50%;
|
|
@@ -1566,5 +1620,61 @@ const contentData = ref([
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .my-recipe {
|
|
|
+ .filter-wrap {
|
|
|
+ .plan-box {
|
|
|
+ display: flex;
|
|
|
+ overflow: auto;
|
|
|
+ white-space: nowrap;
|
|
|
+ align-items: center;
|
|
|
+ padding-left: 12px;
|
|
|
+ .plan-item {
|
|
|
+ color: #000000;
|
|
|
+ background: #F1F1F1;
|
|
|
+ padding: 0 12px;
|
|
|
+ height: 32px;
|
|
|
+ line-height: 32px;
|
|
|
+ border-radius: 20px;
|
|
|
+ &.active {
|
|
|
+ background: rgba(33, 153, 248, 0.2);
|
|
|
+ color: #2199F8;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .plan-item + .plan-item {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .plan-add {
|
|
|
+ width: 80px;
|
|
|
+ height: 30px;
|
|
|
+ border: 1px solid #2199F8;
|
|
|
+ border-radius: 20px;
|
|
|
+ flex: none;
|
|
|
+ line-height: 32px;
|
|
|
+ text-align: center;
|
|
|
+ margin: 0 12px;
|
|
|
+ color: #2199F8;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .title-r {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .btn-item {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ border-radius: 50%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background: #2199F8;
|
|
|
+ &.del-btn {
|
|
|
+ margin-right: 5px;
|
|
|
+ background: #FF953D;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|