yf_elsa.cui пре 1 месец
родитељ
комит
3bb15f3038

Разлика између датотеке није приказан због своје велике величине
+ 2 - 2
dist/index.html


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/static/css/app.eb38e191429fc968f68be1c676e85a90.css


BIN
dist/static/css/app.eb38e191429fc968f68be1c676e85a90.css.gz


Разлика између датотеке није приказан због своје велике величине
+ 3 - 0
dist/static/js/2.117e952c6504edba9f30.js


BIN
dist/static/js/2.117e952c6504edba9f30.js.gz


Разлика између датотеке није приказан због своје велике величине
+ 0 - 3
dist/static/js/2.c4f790a8df9f9b32b4ce.js


BIN
dist/static/js/2.c4f790a8df9f9b32b4ce.js.gz


BIN
dist/static/js/manifest.b781243885dc6d9ef202.js.gz


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/static/js/manifest.b781243885dc6d9ef202.js


BIN
dist/static/js/manifest.f576039734b5196bf904.js.gz


+ 102 - 50
src/pages/forecasting/xycb/xycb.vue

@@ -14,13 +14,14 @@
         ref="screenData"
       >
         <template slot="type-check">
-          <el-button
+          <!-- <el-button
             :disabled="multipleSelection.length == 0 || multipleSelection.length > 3"
             @click="addGrop"
             type="primary"
             size="small"
             >分组</el-button
-          >
+          > -->
+          <span></span>
         </template>
         <template slot="search-box">
           <!-- <template v-if="role == 'admin'">
@@ -209,8 +210,17 @@
             :header-cell-style="{ background: '#F2F3F5' }"
             @selection-change="handleSelectionChange"
           >
-            <el-table-column align="center" type="selection" width="55"> </el-table-column>
-
+            <!-- <el-table-column align="center" type="selection" width="55"> </el-table-column> -->
+            <el-table-column prop="address" label="组号">
+              <template slot-scope="scope"
+                >{{ scope.row.group_id || '无' }}
+                <i
+                  class="el-icon-edit cursor"
+                  style="color: #018b3f"
+                  @click="editBz(scope.row)"
+                ></i>
+              </template>
+            </el-table-column>
             <el-table-column prop="address" label="地区" width="200">
               <template slot-scope="scope">{{ scope.row.address || '无' }}</template>
             </el-table-column>
@@ -220,8 +230,15 @@
             <el-table-column prop="device_id" label="终端ID" width="160">
               <template slot-scope="scope">{{ scope.row.imei }}</template>
             </el-table-column>
-            <el-table-column prop="device_code" label="设备编号" width="160">
-              <template slot-scope="scope">{{ scope.row.device_code || '无' }}</template>
+            <el-table-column prop="device_code" label="诱捕器编号" width="50">
+              <template slot-scope="scope"
+                >{{ scope.row.serial_id || '无' }}
+                <i
+                  class="el-icon-edit cursor"
+                  style="color: #018b3f"
+                  @click="editBh(scope.row)"
+                ></i>
+              </template>
             </el-table-column>
             <el-table-column prop="device_status" label="在线状态">
               <template slot-scope="scope">
@@ -268,7 +285,7 @@
                 >
               </template>
             </el-table-column>
-            <el-table-column label="操作" fixed="right">
+            <el-table-column label="操作" width="150" fixed="right">
               <template slot-scope="scope">
                 <!-- <el-button
                 v-if="scope.row.device_model == 2"
@@ -333,11 +350,13 @@
         <img :src="$imghost + zanwu" alt class="expertDiagnosis_referral_units_notImg" />
       </div>
       <el-pagination
-        :page-size="8"
+        :page-sizes="[6, 9, 12, 15, 18]"
+        :page-size="pageSize"
         layout="total, sizes,jumper, next,pager , prev"
         :total="totalNum"
         :current-page="queryInfo.page"
         @current-change="changePage"
+        @size-change="handleSizeChange"
       ></el-pagination>
     </div>
     <!-- SIM卡对话框 -->
@@ -562,21 +581,22 @@
       <el-button type="primary" @click="equipBtnControl('turn')" size="mini">卷黏虫带</el-button>
       <el-button type="primary" @click="equipBtnControl('repower')" size="mini">重新上电</el-button>
     </el-dialog>
-    <!-- 添加诱芯-->
-    <!-- <el-dialog
-      title="添加诱芯"
-      :visible.sync="setYxDialogVisible"
-      width="320px"
+    <!-- 设置编号-->
+    <el-dialog
+      title="设置编号"
+      :visible.sync="setBhDialogVisible"
+      width="420px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
     >
-      <span>监测害虫名称:</span>
-      <el-input class="facilityNum" v-model="yx.decoy"></el-input>
+      <span>设置诱捕器编号:</span>
+      <el-input class="facilityNum" v-model="serial_id"></el-input>
       <div class="button_box">
-        <el-button type="primary" size="small" @click="submitYx">确定</el-button>
-        <el-button size="small" @click="setYxDialogVisible = false">取消</el-button>
+        <el-button type="primary" size="small" @click="submitBh">确定</el-button>
+        <el-button size="small" @click="setBhDialogVisible = false">取消</el-button>
       </div>
-    </el-dialog> -->
+    </el-dialog>
+    <!-- 添加诱芯-->
     <el-dialog
       title="设置诱芯"
       :visible.sync="setYxDialogVisible"
@@ -648,13 +668,13 @@
           :header-cell-style="{ background: '#F2F3F5' }"
         >
           <el-table-column prop="device_id" label="诱芯名称">
-            <template slot-scope="scope">{{ scope.row.imei }}</template>
+            <template slot-scope="scope">{{ scope.row.name }}</template>
           </el-table-column>
-          <el-table-column prop="device_id" label="开始时间">
-            <template slot-scope="scope">{{ scope.row.imei }}</template>
+          <el-table-column prop="device_id" label="诱芯添加时间">
+            <template slot-scope="scope">{{ (scope.row.start * 1000) | formatTime }}</template>
           </el-table-column>
-          <el-table-column prop="device_id" label="结束时间">
-            <template slot-scope="scope">{{ scope.row.imei }}</template>
+          <el-table-column prop="device_id" label="诱芯到期时间">
+            <template slot-scope="scope">{{ (scope.row.end * 1000) | formatTime }}</template>
           </el-table-column>
         </el-table>
         <el-pagination
@@ -710,6 +730,8 @@ export default {
   },
   data() {
     return {
+      pageSize: 6,
+      serial_id: '',
       timeOptions: {
         start: '0:00',
         step: '1:00',
@@ -797,7 +819,9 @@ export default {
       },
       rules: {
         name: [{ required: true, message: '请输入诱芯名称', trigger: 'blur' }]
-      }
+      },
+      selectDevId: '',
+      setBhDialogVisible: false
     }
   },
   created() {
@@ -853,20 +877,21 @@ export default {
       })
       this.$axios({
         method: 'POST',
-        url: '/api/api_gateway?method=message.views.message_record_delete',
+        url: '/api/api_gateway?method=lpsxy.one_tuo_three.xycb_group',
         data: this.qs.stringify({
-          ids: ids.join(','),
-          name: this.groupName
+          device_id: this.selectDevId,
+          group_id: this.groupName
         })
       }).then((res) => {
         // console.log(res.data.data);
-        if (res.data.message == '') {
+        if (res.data.data == true) {
           this.$message({
-            message: '删除成功',
+            message: '修改成功',
             type: 'success',
             duration: 1500
           })
-          this.getwarinlistdatas()
+          this.groupDialogVisible = false
+          this.getEquipList()
         } else {
           this.$message({
             message: res.data.message,
@@ -924,21 +949,17 @@ export default {
       this.yxloading = true
       this.$axios({
         method: 'post',
-        url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+        url: '/api/api_gateway?method=lpsxy.one_tuo_three.xycb_phrodisiac_list',
         data: this.qs.stringify({
-          device_type_id: 4,
           page_size: 8,
-          device_id: this.queryInfo.f_id,
-          device_name: this.queryInfo.ename,
+          device_id: this.selectDevId,
           page: this.queryInfo.page,
-          device_status: this.queryInfo.is_online,
-          device_model: 1,
           customer_uid: this.sale_user_uid // 销售用户id
         })
       }).then((res) => {
         if (res.data.message == '') {
           this.yxList = res.data.data.data
-          this.yxtotalNum = res.data.data.counts
+          this.yxtotalNum = res.data.data.total
           this.yxloading = false
         }
       })
@@ -948,6 +969,10 @@ export default {
       this.queryInfo.page = val
       this.getEquipList()
     },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.getEquipList()
+    },
     yxChangePage(val) {
       this.yxpage = val
       this.getYxList()
@@ -974,6 +999,7 @@ export default {
       })
     },
     yxRecord(row) {
+      this.selectDevId = row.imei
       this.yxRecordVisible = true
       this.getYxList()
     },
@@ -1270,22 +1296,20 @@ export default {
           }
           this.$axios({
             method: 'POST',
-            url: '/api/api_gateway?method=forecast.worm_lamp.set_decopy',
+            url: '/api/api_gateway?method=lpsxy.one_tuo_three.xycb_aphrodisiac_add',
             data: this.qs.stringify({
-              device_type_id: 4,
-              device_id: this.device_id,
-              decoy: this.baitdata.name,
-              expire_time: time
+              device_id: this.selectDevId,
+              name: this.baitdata.name,
+              end: time
             })
           }).then((res) => {
             this.dialogVisible = false
-            if (res.data.message == '') {
-              if (res.data.data.status) {
-                this.setYxDialogVisible = false
-                this.getYxList()
-              } else {
-                this.$message.warning(res.data.message)
-              }
+            if (res.data.data == true) {
+              this.setYxDialogVisible = false
+              this.getYxList()
+              this.getEquipList()
+            } else {
+              this.$message.warning(res.data.message)
             }
           })
         } else {
@@ -1293,6 +1317,33 @@ export default {
           return false
         }
       })
+    },
+    editBh(row) {
+      this.selectDevId = row.imei
+      this.setBhDialogVisible = true
+    },
+    editBz(row) {
+      this.selectDevId = row.imei
+      this.groupDialogVisible = true
+    },
+    submitBh() {
+      this.$axios({
+        method: 'POST',
+        url: '/api/api_gateway?method=lpsxy.one_tuo_three.xycb_serial',
+        data: this.qs.stringify({
+          device_id: this.selectDevId,
+          serial_id: this.serial_id
+        })
+      }).then((res) => {
+        if (res.data.message == '') {
+          if (res.data.data.status) {
+            this.setBhDialogVisible = false
+            this.getYxList()
+          } else {
+            this.$message.warning(res.data.message)
+          }
+        }
+      })
     }
   },
   components: {
@@ -1345,9 +1396,10 @@ export default {
   }
 }
 .content {
-  height: calc(100% - 116px);
+  height: calc(100% - 150px);
   background: #fff;
   position: relative;
+  border-radius: 4px;
 }
 .handAddForm {
   /deep/.el-form-item {

+ 92 - 19
src/pages/forecasting/xycb/xydatainfo.vue

@@ -85,20 +85,32 @@
           <el-radio-button label="列表"></el-radio-button>
         </el-radio-group>
         <div v-if="qsType == '图表'">
-          <base-chart height="250px" :option="options2"></base-chart>
+          <base-chart height="250px" :option="options3"></base-chart>
         </div>
-        <div v-else>
-          <el-table :data="qsData" stripe style="width: 100%">
-            <el-table-column
-              v-for="(item, index) in qsDataHead"
-              :key="index"
-              :prop="item[1]"
-              :label="item[0]"
-              :width="setWidth(item)"
-            >
-              <template slot-scope="scope">{{ scope.row[scope.column.property] }}</template>
+        <div v-else style="margin-top: 10px; position: relative; height: 226px; overflow-y: auto">
+          <el-table
+            :data="qsData"
+            size="mini"
+            border
+            style="width: 100%"
+            :header-cell-style="{ background: '#F2F3F5' }"
+          >
+            <el-table-column prop="device_id" label="杀虫数量">
+              <template slot-scope="scope">{{ scope.row.pest_num }}</template>
+            </el-table-column>
+            <el-table-column prop="device_id" label="日期">
+              <template slot-scope="scope">{{ (scope.row.addtime * 1000) | formatTime }}</template>
             </el-table-column>
           </el-table>
+          <el-pagination
+            small
+            :page-size="8"
+            :pager-count="5"
+            layout="jumper, next,pager , prev"
+            :total="qsTotalNum"
+            :current-page="qsPage"
+            @current-change="qsChangePage"
+          ></el-pagination>
         </div>
       </div>
       <!-- <highcharts :options="options2" class="highcharts"></highcharts>
@@ -131,7 +143,11 @@
             </el-select>
           </span>
         </div>
-        <div class="chart-title">8月20日至9月12日1号诱捕器稻纵卷叶螟诱虫趋势图</div>
+        <div class="chart-title">
+          {{ (this.start_time * 1000) | formatTime('yyyy-MM-dd') }}至{{
+            (this.end_time * 1000) | formatTime('yyyy-MM-dd')
+          }}{{ this.baseinfo.serial_id }}诱捕器{{ this.baseinfo.decoy }}诱虫趋势图
+        </div>
         <base-chart height="300px" :option="options2"></base-chart>
         <!-- <highcharts :options="options2" class="highcharts"></highcharts> -->
         <!-- <div class="tishi" v-show="linedatatf2">暂无数据</div> -->
@@ -166,8 +182,7 @@
           </el-table-column>
         </el-table>
         <el-pagination
-          background
-          layout="prev, pager, next, jumper"
+          layout="jumper, next,pager , prev"
           :current-page="currentPage"
           :total="total"
           @current-change="currentchange"
@@ -220,9 +235,8 @@ export default {
       qsType: '图表',
       qsData: [],
       qsDataHead: [
-        ['诱芯名称', 'name'],
-        ['杀虫数量(头)', 'num'],
-        ['温度(℃)', 'temp']
+        ['杀虫数量(头)', 'pest_num'],
+        ['时间', 'addtime']
       ],
       countYear: [], // 诱虫次数统计年份
       // yearList:[], // 诱虫次年份列表
@@ -352,7 +366,10 @@ export default {
         ]
       },
       chartOption: null,
-      options2: null
+      options2: null,
+      options3: null,
+      qsPage: 1,
+      qsTotalNum: 0
     }
   },
   // 监听属性 类似于data概念
@@ -420,6 +437,7 @@ export default {
       this.gethighatdata()
       this.gethighatdata2()
       this.getHisDataList()
+      this.getQsList()
     },
     dateTimeFormat(timestamp) {
       // 时间戳转 yyyy-MM-dd hh:mm:ss
@@ -531,6 +549,7 @@ export default {
       this.gethighatdata()
       this.gethighatdata2()
       this.getHisDataList()
+      this.getQsList()
     },
     // 格式化滑块标签
     formatTooltip(val) {
@@ -590,6 +609,7 @@ export default {
       this.gethighatdata()
       this.gethighatdata2()
       this.getHisDataList()
+      this.getQsList()
     }, 2000),
     getbaseinfo() {
       this.$axios({
@@ -732,6 +752,16 @@ export default {
               times
             })
 
+            this.options3 = xycbLine({
+              data: [
+                {
+                  name: this.baseinfo.decoy,
+                  data: data[0],
+                  type: 'line'
+                }
+              ],
+              times
+            })
             console.log(arr, 'ChartData2')
             // console.log(this.chartNameYear, 'chartNameYear');
           } else {
@@ -753,6 +783,29 @@ export default {
       this.page = e
       this.getHisDataList()
     },
+    qsChangePage(val) {
+      this.qsPage = val
+      this.getQsList()
+    },
+    getQsList() {
+      this.$axios({
+        method: 'post',
+        url: '/api/api_gateway?method=lpsxy.one_tuo_three.xycb_pest_count_list',
+        data: this.qs.stringify({
+          device_id: this.device_id,
+          page_size: 8,
+          page: this.qsPage,
+          start: this.start_time,
+          end: this.end_time
+        })
+      }).then((res) => {
+        if (res.data.message == '') {
+          this.qsData = res.data.data.data
+          this.qsTotalNum = res.data.data.total
+          this.loading = false
+        }
+      })
+    },
     // 获取表格数据
     getHisDataList() {
       this.tabletf = true
@@ -957,6 +1010,7 @@ export default {
             this.gethighatdata2()
             this.getHisDataList()
             this.getbaseinfo()
+            this.getQsList()
             if (document.getElementsByClassName('el-message').length == 0) {
               this.$message.success('刷新成功')
             }
@@ -1024,7 +1078,7 @@ export default {
       }
     }
     .basicsbox_title_box {
-      width: calc(100% - 80px );
+      width: calc(100% - 80px);
       display: flex;
       align-items: center;
       justify-content: space-between;
@@ -1159,6 +1213,7 @@ export default {
   box-sizing: border-box;
   margin: 16px 0;
   border-radius: 4px;
+  padding-bottom: 0;
   .tablebox_title {
     display: flex;
     justify-content: space-between;
@@ -1178,6 +1233,8 @@ export default {
     }
   }
   .tablebox_text {
+    position: relative;
+    padding-bottom: 64px;
     /deep/.cell {
       text-align: center;
     }
@@ -1189,4 +1246,20 @@ export default {
     width: 100%;
   }
 }
+.custom-ffffff .el-pagination {
+  position: absolute;
+  bottom: 20px;
+  left: 0;
+  width: 100%;
+  padding: 0 20px;
+  box-sizing: border-box;
+  text-align: justify;
+  margin-bottom: 0;
+  /deep/.el-pagination__jump,
+  /deep/.el-pager,
+  /deep/.btn-next,
+  /deep/.btn-prev {
+    float: right;
+  }
+}
 </style>