李楠 4 年之前
父节点
当前提交
fc2e0b1376
共有 3 个文件被更改,包括 54 次插入34 次删除
  1. 41 22
      src/views/Butcher/Butcher.vue
  2. 7 1
      src/views/Butcher/charts/ELeft1.vue
  3. 6 11
      src/views/Butcher/charts/EMap.vue

+ 41 - 22
src/views/Butcher/Butcher.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="Butcher">
+    <div class="Butcher" @click="isShowMap = true">
         <header>
             <!-- <h1 class="title">湖羊全产业链数字化管理系统</h1> -->
             <hy-header :navTag="1"></hy-header>
@@ -74,8 +74,11 @@
                             </div>
                         </div>
                     </article>
-                    <article class="lower" v-if="false">
-                        <main class="inputWrap">
+                    <article class="mapContainer" v-if="isShowMap">
+                        <E-Map style="height: 100%" @e-click="eClick"></E-Map>
+                    </article>
+                    <article class="lower" v-else>
+                        <main class="inputWrap" @click.stop>
                             <input
                                 type="text"
                                 class="input"
@@ -84,16 +87,28 @@
                             <i class="icon_search" @click="search"></i>
                         </main>
                         <div class="container">
-                            <div v-for="(item, index) in retrospectInfo" :key="index" :class="'item_'+(index+1)">
+                            <div
+                                v-for="(item, index) in retrospectInfo"
+                                :key="index"
+                                :class="'item_' + (index + 1)"
+                            >
                                 <h3>{{ item.title }}</h3>
-                                <div class="row" v-for="(item1, index1) in item.list" :key="index1">{{ item1 }}</div>
+                                <div
+                                    class="row"
+                                    v-for="(item1, index1) in item.list"
+                                    :key="index1"
+                                >
+                                    {{ item1 }}
+                                </div>
                             </div>
-                            <span v-for="(item, index) in retrospectInfo" :key="item.title" :class="'time_'+(index+1)">{{ item.time }}</span>
+                            <span
+                                v-for="(item, index) in retrospectInfo"
+                                :key="item.title"
+                                :class="'time_' + (index + 1)"
+                                >{{ item.time }}</span
+                            >
                         </div>
                     </article>
-                    <article class="mapContainer" v-if="true">
-                        <E-Map style="height: 100%"></E-Map>
-                    </article>
                 </div>
                 <div class="bottom">
                     <article>
@@ -164,11 +179,12 @@ export default {
         EBottom1,
         EBottom2,
         EBottom3,
-        EMap
+        EMap,
     },
     data() {
         return {
             searchStr: "00008",
+            isShowMap: true,
             sheepPriceList: [
                 {
                     description: "肉羊",
@@ -252,10 +268,7 @@ export default {
                 },
                 {
                     title: "运输",
-                    list: [
-                        "运输单号:50kg",
-                        "目的地:杭州",
-                    ],
+                    list: ["运输单号:50kg", "目的地:杭州"],
                     time: "11月30日",
                 },
             ],
@@ -291,10 +304,7 @@ export default {
                 },
                 {
                     title: "运输",
-                    list: [
-                        "运输单号:50kg",
-                        "目的地:杭州",
-                    ],
+                    list: ["运输单号:50kg", "目的地:杭州"],
                     time: "11月30日",
                 },
             ],
@@ -302,16 +312,25 @@ export default {
     },
     created() {
         document.title = "湖羊产业";
+        if (Math.floor(Math.random()*10) % 2 == 0) {
+                this.retrospectInfo = this.retrospectInfo1;
+            } else {
+                this.retrospectInfo = this.retrospectInfo2;
+            }
     },
     methods: {
         search() {
-            console.log(this.searchStr);
-            if(this.searchStr%2 == 0) {
-                this.retrospectInfo = this.retrospectInfo1
+            console.log(Math.floor(Math.random()*10));
+            if (this.searchStr % 2 == 0) {
+                this.retrospectInfo = this.retrospectInfo1;
             } else {
-                this.retrospectInfo = this.retrospectInfo2
+                this.retrospectInfo = this.retrospectInfo2;
             }
         },
+        eClick(params) {
+            console.log(params)
+            this.isShowMap = false
+        }
     },
 };
 </script>

+ 7 - 1
src/views/Butcher/charts/ELeft1.vue

@@ -8,10 +8,16 @@
 export default {
     name: "ELeft1",
     data() {
-        return {};
+        return {
+            aa: 12
+        };
     },
     mounted() {
         this.drawChart();
+        // window.onresize = (a) => {
+        //     console.log(this.aa)
+        //     this.drawChart()
+        // }
     },
     methods: {
         drawChart() {

文件差异内容过多而无法显示
+ 6 - 11
src/views/Butcher/charts/EMap.vue