zhangyun пре 4 година
родитељ
комит
64cfec9185

+ 2 - 2
config/index.js

@@ -12,8 +12,8 @@ module.exports = {
     proxyTable: {
       '/api': {
         // target: 'http://182.92.193.64:8002/',
-        target: 'http://192.168.1.76:8000/',
-        // target: 'http://8.136.98.49:8005/',
+        // target: 'http://192.168.1.76:8000/',
+        target: 'http://8.136.98.49:8005/',
         // target: "http://182.92.193.64:8002", //测试环境
         // target:'http://192.168.1.200:8005',
         changeOrigin: true,

+ 27 - 23
src/pages/plantGuard/geoinfo/mapdisplay.vue

@@ -2,14 +2,6 @@
 <template>
   <div class="mapbox">
     <div id="container"></div>
-    <!-- <div class="input-card" style="width: 120px">
-      <button class="btn" @click="polyEditoradd">创建地块</button>
-      <button class="btn" @click="polyEditoropen">开始编辑</button>
-      <button class="btn" @click="polyEditorclose">结束编辑</button>
-      <button class="btn" @click="polyEditordel">删除地块</button>
-      <button class="btn" @click="deletesingle">删除选中标点</button>
-      <button class="btn" @click="deleteall">删除全部标点</button>
-    </div> -->
     <div id="map" v-show="canvasdisplay" v-loading="loading">
       <!-- <div class="ol-toggle-options ol-unselectable">
             <a title="Toggle options toolbar" onClick="toggleControlPanel()"
@@ -77,11 +69,23 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="sureclick"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="sureclick">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="设备信息"
+      :visible.sync="dialogbaseinfo"
+      width="30%"
+      top="15%"
+    >
+      <div class="baseinfobox">
+        <p>设备名称:杀虫灯</p>
+        <p>设备id:1111111111111111</p>
+        <p>地址:河南省郑州市金水区</p>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogbaseinfo = false">取 消</el-button>
+        <el-button type="primary" @click="dialogbaseinfo = false">确 定</el-button>
       </span>
     </el-dialog>
     <div id="marker" style="width: 60px; height: 17px"></div>
@@ -130,6 +134,7 @@ export default {
           uuid: 4,
         },
       ],
+      dialogbaseinfo:false,//设备信息弹框
     };
   },
   //监听属性 类似于data概念
@@ -154,17 +159,17 @@ export default {
         // this.addmarker(e.lnglat.lng, e.lnglat.lat);
         // this.path.push(arr);
       });
-      // this.addmarker();
       this.addpolygon();
+      this.addmarker();
     },
     //添加标点事件
     addmarker() {
       var marker = new AMap.Marker({
-        icon: "http://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",
+        icon: "../../../../static/images/jidi2.png",
         position: [113.68189478963615, 34.81164827843166],
       });
       marker.on("click", (e) => {
-        this.dialogVisible = true;
+        this.dialogbaseinfo = true;
         // this.canvasdisplay = true;
       });
       // marker.setMap(this.map);
@@ -555,16 +560,16 @@ export default {
     equipLocate() {},
     //基地双击
     enterBase() {},
-    sureclick(){
+    sureclick() {
       this.dialogVisible = false;
       this.canvasdisplay = true;
-      var canvar = document.getElementsByClassName("ol-viewport")
-      console.log(canvar)
-      if(canvar.length==0){
+      var canvar = document.getElementsByClassName("ol-viewport");
+      console.log(canvar);
+      if (canvar.length == 0) {
         this.loading = true;
         this.addcanvas();
       }
-    }
+    },
   },
   beforeCreate() {}, //生命周期 - 创建之前
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -573,8 +578,7 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     this.initmap();
-    // this.addWMSLayer();
-    
+    this.addWMSLayer();
   },
   beforeUpdate() {}, //生命周期 - 更新之前
   updated() {}, //生命周期 - 更新之后

+ 12 - 10
src/pages/plantGuard/plantProtection/baseComponents/cbdTabPhoto.vue

@@ -306,21 +306,22 @@ export default {
   justify-content: space-between;
   flex-wrap: wrap;
   > div {
-    flex: 1;
-    width: 33.3333%;
-    max-width: 33.3333%;
-    min-width: 33.3333%;
-    text-align: center;
+    // flex: 1;
+    // width: 33.3333%;
+    // max-width: 33.3333%;
+    // min-width: 33.3333%;
+    // text-align: center;
     .photo{
-      width: 220px;
+      width: 240px;
       height: 170px;
       position: relative;
       overflow: hidden;
       img{
         height: 100%;
-      position: absolute;
-      left: 50%;
-      transform: translate(-50%);
+        width: 100%;
+        // position: absolute;
+        // left: 50%;
+        // transform: translate(-50%);
       }
     }
     .time {
@@ -328,7 +329,8 @@ export default {
       line-height: 25px;
       display: flex;
       justify-content: space-between;
-      width: 85%;
+      width: 100%;
+      margin: 10px 0;
       > span:nth-child(2):hover {
         cursor: pointer;
         text-decoration: underline;

+ 113 - 47
src/pages/plantGuard/plantProtection/cbdPestStats.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="innerMargin">
-    <el-card class="box-card">
-
+    <!-- <el-card class="box-card"> -->
       <div class="equipInfo">
         <div class="equipMsg">
           <span>设备ID:{{ id }}</span>
@@ -20,7 +19,7 @@
             >
             <el-button
               type="blueInfo"
-              v-if="!viewSwitch"
+              v-if="!viewSwitch" 
               @click="viewSwitchFun(true)"
               size="mini"
               >自动统计</el-button
@@ -74,21 +73,33 @@
           </el-row>
         </div>
         <div class="dataTableSearch">
-          <div> </div>
-          <!-- <el-button type="blueInfo" size="mini" @click="deriveData()">导出</el-button> -->
+          <div class="sel_box">
+            <div class="img_box">
+              <img src="../../../../static/images/xiangzuo.png" alt="">
+            </div>
+            <div
+              :class="dataSwitchType == 0 ? 'btn' : 'selectbtn'"
+              @click="dataSwitch(1)"
+            >
+              详细信息
+            </div>
+            <div
+              :class="dataSwitchType == 1 ? 'btn' : 'selectbtn'"
+              @click="dataSwitch(0)"
+            >
+              统计信息
+            </div>
+          </div>
           <el-button
+            class="elbtn"
             type="blueInfo"
             size="mini"
-            v-if="dataSwitchType == 0"
-            @click="dataSwitch(1)"
-            >详细信息</el-button
-          >
-          <el-button type="blueInfo" size="mini" v-else @click="dataSwitch(0)"
-            >统计信息</el-button
+            @click="deriveData()"
+            >导出</el-button
           >
         </div>
         <!-- 统计信息 -->
-        <el-card class="box-card" v-if="dataSwitchType == 0">
+        <el-card class="box-card" style="margin-top: -2px;" v-if="dataSwitchType == 0">
           <el-table :data="tableDataB" stripe style="width: 100%">
             <el-table-column
               v-for="(item, index) in tableHeadTxt"
@@ -134,7 +145,7 @@
         </el-card>
 
         <!-- 详细信息 -->
-        <el-card class="box-card" v-else>
+        <el-card class="box-card" style="margin-top: -2px;" v-else>
           <!-- <el-table :data="tableDataAll" stripe style="width: 100%"> -->
           <el-table
             :data="tableDataAllB"
@@ -232,7 +243,17 @@
           </el-row>
         </div>
         <div class="dataTableSearch">
-          <el-button type="blueInfo" size="mini" @click="deriveData()"
+          <div class="sel_box">
+            <div class="img_box">
+              <img src="../../../../static/images/xiangzuo.png" alt="">
+            </div>
+            <div
+              class="btn"
+            >
+              统计信息
+            </div>
+          </div>
+          <el-button type="blueInfo" size="mini" @click="deriveData()" class="elbtn"
             >导出</el-button
           >
         </div>
@@ -288,7 +309,7 @@
         </el-card>
 
         <!-- 导出对话框 -->
-        <el-dialog title="导出信息" :visible.sync="dialogVisible" width="30%">
+        <el-dialog title="导出信息" :visible.sync="dialogVisible" width="30%" top="20%">
           <!-- <span>这是一段信息</span> -->
 
           <!-- 下拉框和输入框 -->
@@ -323,7 +344,9 @@
               </div>
             </li>
             <li class="iptList" v-show="timeShow">
-              <div class="iptTxt"><span style="color: red">*</span>时间段:</div>
+              <div class="iptTxt">
+                <span style="color: red">*</span>时间段:
+              </div>
               <div class="iptBox">
                 <el-date-picker
                   v-model="value2"
@@ -347,20 +370,28 @@
       </div>
 
       <!-- 导出对话框 -->
-      <el-dialog title="导出信息" :visible.sync="dialogVisible" width="30%">
+      <el-dialog title="导出信息" :visible.sync="dialogVisible" width="30%" top="20%">
         <!-- <span>这是一段信息</span> -->
 
         <!-- 下拉框和输入框 -->
         <ul class="iptUl">
           <li class="iptList">
-            <div class="iptTxt"><span style="color: red">*</span>文件名称:</div>
+            <div class="iptTxt">
+              <span style="color: red">*</span>文件名称:
+            </div>
             <div class="iptBox">
-              <el-input placeholder="请输入文件的名称" v-model="value" clearable>
+              <el-input
+                placeholder="请输入文件的名称"
+                v-model="value"
+                clearable
+              >
               </el-input>
             </div>
           </li>
           <li class="iptList">
-            <div class="iptTxt"><span style="color: red">*</span>下载类型:</div>
+            <div class="iptTxt">
+              <span style="color: red">*</span>下载类型:
+            </div>
             <div class="iptBox">
               <el-select v-model="value1" placeholder="请选择">
                 <el-option
@@ -494,7 +525,9 @@
 
         <div>
           <div
-            :class="enlargementImg == false ? 'enlargementDiv' : 'discernResult'"
+            :class="
+              enlargementImg == false ? 'enlargementDiv' : 'discernResult'
+            "
           >
             <div class="name">
               <i class="icon-zhuti_tiaosepan_o iconfont"></i>
@@ -547,7 +580,9 @@
                 <div>
                   <div
                     :class="
-                      enlargementImg == false ? 'enlargementDiv' : 'discernResult'
+                      enlargementImg == false
+                        ? 'enlargementDiv'
+                        : 'discernResult'
                     "
                   >
                     <div class="name">
@@ -594,7 +629,7 @@
       <!-- 网格 -->
       <div id="reseau"></div>
       <!-- 网格 -->
-    </el-card>
+    <!-- </el-card> -->
   </div>
 </template>
 
@@ -743,8 +778,8 @@ Viewer.setDefaults({
 export default {
   data() {
     return {
-      id:this.$store.state.cbd_pest_id,
-      d_id:this.$store.state.cbd_pest_did,
+      id: this.$store.state.cbd_pest_id,
+      d_id: this.$store.state.cbd_pest_did,
       btnSelected: "2",
       allPest: [],
       options: {},
@@ -1029,17 +1064,17 @@ export default {
               },
               series: [
                 {
-                  type: 'column',
+                  type: "column",
                   name: ChartData[0].name,
                   data: ChartData[0].dat,
                 },
                 {
-                  type: 'column',
+                  type: "column",
                   name: ChartData[1].name,
                   data: ChartData[1].dat,
                 },
                 {
-                  type: 'spline',
+                  type: "spline",
                   name: ChartData[2].name,
                   data: ChartData[2].dat,
                 },
@@ -1089,7 +1124,7 @@ export default {
                 };
                 arr.push(o);
                 arrA.push([percentage[i].name_num, percentage[i].sum]);
-                console.log(arrA)
+                console.log(arrA);
               }
               this.chartPieInit(arrA);
               this.gainInsect(arr); //获取下拉框害虫种类
@@ -1288,8 +1323,7 @@ export default {
       });
       this.$axios({
         method: "POST",
-        url:
-          "/api/api_gateway?method=forecast.worm_lamp.pest_statistics_list_old",
+        url: "/api/api_gateway?method=forecast.worm_lamp.pest_statistics_list_old",
         data: this.qs.stringify({
           device_id: this.d_id,
           page: this.queryInfo.page,
@@ -1385,8 +1419,7 @@ export default {
       that
         .$axios({
           method: "post",
-          url:
-            "/api/api_gateway?method=forecast.worm_lamp.pest_manual_statistics",
+          url: "/api/api_gateway?method=forecast.worm_lamp.pest_manual_statistics",
           data: postData,
         })
         .then((res) => {
@@ -1527,8 +1560,7 @@ export default {
       that
         .$axios({
           method: "post",
-          url:
-            "/api/api_gateway?method=forecast.worm_lamp.pest_manual_statistics",
+          url: "/api/api_gateway?method=forecast.worm_lamp.pest_manual_statistics",
           data: postData,
         })
         .then((res) => {
@@ -1732,7 +1764,7 @@ export default {
           this.imagepopShow = false;
           this.currentImage = row.img;
           this.$nextTick(() => {
-            if(row.mark){
+            if (row.mark) {
               this.renderData(JSON.parse(row.mark));
             }
           });
@@ -2085,10 +2117,44 @@ export default {
 
 .dataTableSearch {
   display: flex;
+  background-color: #f4f4f4;
   justify-content: space-between;
-  margin: 20px 0;
-  .el-input__inner {
-    width: 222px;
+  z-index: 9;
+  position: relative;
+  .sel_box {
+    display: flex;
+    height: 40px;
+    padding-top: 2px;
+    box-sizing: border-box;
+    .img_box{
+      height: 38px;
+      line-height: 38px;
+      width: 26px;
+      text-align: center;
+    }
+    .btn {
+      width: 100px;
+      height: 38px;
+      line-height: 38px;
+      text-align: center;
+      color: #7e7e7e;
+    }
+    .selectbtn {
+      width: 100px;
+      height: 38px;
+      line-height: 38px;
+      text-align: center;
+      color: #46b8f4;
+      background-color: #fff;
+      box-shadow: 0px -3px 5px #ececec;
+      border-top-left-radius: 5px;
+      border-top-right-radius: 5px;
+    }
+  }
+  .elbtn{
+    height: 25px;
+    width: 50px;
+    margin: 10px 10px 0 0;
   }
 }
 
@@ -2275,17 +2341,17 @@ export default {
 
 
 <style lang="less">
-.el-table .warning-row {
-  background: oldlace !important;
+.el-table .el-table__header-wrapper .has-gutter tr th{
+  background-color: #232733 !important;
 }
 
-.el-table .success-row {
-  background: #f0f9eb;
-}
+// .el-table .success-row {
+//   background: #f0f9eb;
+// }
 
-.el-table--striped .el-table__body tr.el-table__row--striped td {
-  background: 0 !important;
-}
+// .el-table--striped .el-table__body tr.el-table__row--striped td {
+//   background: 0 !important;
+// }
 
 // 修改手动标注弹框的鼠标样式
 .vmr-ai-raw-image-mask {

Разлика између датотеке није приказан због своје велике величине
+ 566 - 414
src/pages/plantGuard/plantProtection/cbdPhoto.vue


BIN
static/images/xiangzuo.png