Browse Source

feat:宁录更新

yf_elsa.cui 1 tháng trước cách đây
mục cha
commit
a570018f90

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 2
dist/index.html


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/static/css/app.167090c16cd3e0fd20b607d1c9fabb84.css


BIN
dist/static/css/app.167090c16cd3e0fd20b607d1c9fabb84.css.gz


BIN
dist/static/images/weather/icon_258.png


BIN
dist/static/images/weather/水分.png


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 8 - 0
dist/static/js/1.39d1db3c6555840e6432.js


BIN
dist/static/js/1.39d1db3c6555840e6432.js.gz


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 8
dist/static/js/1.43dcdd620bc0094e66d6.js


BIN
dist/static/js/1.43dcdd620bc0094e66d6.js.gz


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 1
dist/static/js/5.5fe16874a4766906e44a.js


BIN
dist/static/js/5.5fe16874a4766906e44a.js.gz


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
dist/static/js/5.fbb0d70a2b70b1b9b28d.js


BIN
dist/static/js/5.fbb0d70a2b70b1b9b28d.js.gz


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
dist/static/js/61.c0e45e8740d3446167be.js


BIN
dist/static/js/61.c0e45e8740d3446167be.js.gz


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 1
dist/static/js/61.e8e6cf9d9b2a643ecc9e.js


BIN
dist/static/js/61.e8e6cf9d9b2a643ecc9e.js.gz


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


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/static/js/manifest.d6431b3f01f268c08081.js


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


+ 140 - 150
src/pages/equipmanger/EquipList.vue

@@ -342,24 +342,19 @@
             key="serialnumber"
           >
           </el-table-column>
-          <el-table-column prop="device_name" label="设备名称" :width="breadth" key="device_name">
+          <el-table-column prop="device_name" label="设备名称" key="device_name">
             <template slot-scope="scope">{{
               scope.row.device_name == '' ? '无' : scope.row.device_name
             }}</template>
           </el-table-column>
 
-          <el-table-column prop="device_id" label="设备ID" width="160px" key="device_id">
+          <el-table-column prop="device_id" label="设备ID" key="device_id">
             <template slot-scope="scope">{{ scope.row.device_id }}</template>
           </el-table-column>
-          <el-table-column
-            prop="device_type_id"
-            label="设备类型"
-            :width="breadth"
-            key="device_type_id"
-          >
+          <el-table-column prop="device_type_id" label="设备类型" key="device_type_id">
             <template slot-scope="scope">{{ scope.row.device_type_id | typeVal }}</template>
           </el-table-column>
-          <el-table-column prop="device_user" label="适配用户" key="device_user" :width="breadth">
+          <el-table-column prop="device_user" label="适配用户" key="device_user">
             <template slot-scope="scope">{{
               scope.row.device_user == '' ? '无' : scope.row.device_user
             }}</template>
@@ -369,7 +364,6 @@
           <el-table-column
             prop="device_activation_time"
             label="设备激活时间"
-            width="160px"
             key="device_activation_time"
           >
             <template slot-scope="scope">
@@ -386,7 +380,6 @@
             v-if="$QueryPermission(325)"
             prop="device_expire_time"
             label="设备到期时间"
-            width="160px"
             key="device_expire_time"
           >
             <template slot-scope="scope" style="border: 1px solid #000">
@@ -401,7 +394,6 @@
             v-if="$QueryPermission(325)"
             prop="device_expire_days"
             label="设备剩余天数"
-            :width="breadth"
             key="device_expire_days"
           >
             <template slot-scope="scope">
@@ -426,7 +418,6 @@
           <el-table-column
             prop="device_expire_days"
             label="权重"
-            :width="breadth"
             v-if="$QueryPermission(275) & cancelShow"
             key="device_expire_days2"
           >
@@ -443,7 +434,6 @@
             :show-overflow-tooltip="true"
             prop="dver_num"
             label="位置"
-            :width="breadth"
             key="dver_num"
           >
             <template slot-scope="scope">
@@ -1208,7 +1198,7 @@ export default {
 
     dispose(value) {
       return value.split('-')[1]
-    },
+    }
   },
   data() {
     var checkphone = (rule, value, callback) => {
@@ -1238,21 +1228,21 @@ export default {
         device_status: '',
         start_time: '',
         end_time: '',
-        salesman_task_number: '',
+        salesman_task_number: ''
       },
       dataList: [],
       totalNum: 0,
       addr: '',
       locationForm: {
         lat: '',
-        lng: '',
+        lng: ''
       },
       editFault: {
         imei: '',
         user: '',
         tel: '',
         detail: '',
-        type: '',
+        type: ''
       },
       device_id: '',
       center: [], // 默认地图中心
@@ -1261,7 +1251,7 @@ export default {
       editFaultrules: {
         user: { required: true, message: '请输入联系人', trigger: 'blur' },
         tel: { required: true, validator: checkphone, trigger: 'blur' },
-        detail: { required: true, message: '请输入故障原因', trigger: 'blur' },
+        detail: { required: true, message: '请输入故障原因', trigger: 'blur' }
       },
       address: '', // 地图信息框显示的地址
       // 图表和表格切换
@@ -1276,48 +1266,48 @@ export default {
       networkingTypeList: [
         {
           label: 'GPRS',
-          value: 0,
+          value: 0
         },
         {
           label: '宽带',
-          value: 1,
+          value: 1
         },
         {
           label: '其他',
-          value: 2,
-        },
+          value: 2
+        }
       ],
       // 设备状态
       equipmentStatus: '',
       equipmentStatusList: [
         {
           label: '生产',
-          value: 0,
+          value: 0
         },
         {
           label: '发货',
-          value: 1,
+          value: 1
         },
         {
           label: '安装',
-          value: 2,
+          value: 2
         },
         {
           label: '返修',
-          value: 3,
+          value: 3
         },
         {
           label: '更换',
-          value: 4,
+          value: 4
         },
         {
           label: '报废',
-          value: 5,
+          value: 5
         },
         {
           label: '对接',
-          value: 6,
-        },
+          value: 6
+        }
       ],
       // 业务员信息
       salesmanMessage: '',
@@ -1341,53 +1331,53 @@ export default {
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
+          days: '30'
         },
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
+          days: '30'
         },
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
+          days: '30'
         },
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
+          days: '30'
         },
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
+          days: '30'
         },
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
+          days: '30'
         },
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
+          days: '30'
         },
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
+          days: '30'
         },
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
+          days: '30'
         },
         {
           id: '12345678987654321',
           name: '一号杀虫灯',
-          days: '30',
-        },
+          days: '30'
+        }
       ],
       // 充值套餐
       steMealArr: [],
@@ -1399,20 +1389,20 @@ export default {
       equipmentLimitList: [
         {
           value: '',
-          label: '全部',
+          label: '全部'
         },
         {
           value: '0',
-          label: '未到期',
+          label: '未到期'
         },
         {
           value: '2',
-          label: '即将到期',
+          label: '即将到期'
         },
         {
           value: '1',
-          label: '已到期',
-        },
+          label: '已到期'
+        }
       ],
       adminList: ['1', '2', '3'],
       activeIndA: 0,
@@ -1425,38 +1415,38 @@ export default {
         2: {
           name: '杀虫灯',
           type: '2',
-          price: 15,
+          price: 15
         },
         3: {
           name: '测报灯',
           type: '3',
-          price: 100,
+          price: 100
         },
         7: {
           name: '孢子仪',
           type: '7',
-          price: 100,
+          price: 100
         },
         5: {
           name: '气象站',
           type: '5',
-          price: 60,
+          price: 60
         },
         4: {
           name: '性诱测报',
           type: '4',
-          price: 15,
+          price: 15
         },
         8: {
           name: '性诱测报3.0',
           type: '8',
-          price: 100,
+          price: 100
         },
         14: {
           name: '病虫害可视监测',
           type: '14',
-          price: 100,
-        },
+          price: 100
+        }
         // 4: {
         //   name: "性诱测报",
         //   type: "4",
@@ -1490,7 +1480,7 @@ export default {
       rechargeDataSource: {},
       selectionDataSource: {}, // 分页选中的设备id存储
       deviceUserList: [],
-      searchLoading: false,
+      searchLoading: false
     }
   },
   watch: {
@@ -1509,7 +1499,7 @@ export default {
         // }
         // this.cancelShow = true;
         // this.tableShow = false;
-      },
+      }
     },
 
     cancelShow(val) {
@@ -1532,32 +1522,32 @@ export default {
         var data = [
           {
             id: 2,
-            type_name: '杀虫灯',
+            type_name: '杀虫灯'
           },
           {
             id: 3,
-            type_name: '测报灯',
+            type_name: '测报灯'
           },
           {
             id: 5,
-            type_name: '环境监测',
+            type_name: '环境监测'
           },
           {
             id: 7,
-            type_name: '孢子仪',
+            type_name: '孢子仪'
           },
           {
             id: 4,
-            type_name: '性诱测报',
+            type_name: '性诱测报'
           },
           {
             id: 8,
-            type_name: '性诱测报3.0',
+            type_name: '性诱测报3.0'
           },
           {
             id: 14,
-            type_name: '病虫害可视监测',
-          },
+            type_name: '病虫害可视监测'
+          }
         ]
         this.typelist = data
         this.queryInfo.page = 1 // 当前页码归1
@@ -1616,19 +1606,19 @@ export default {
           title: '警告',
           message: '将清空当前设备到期时间和激活时间,并且该设备后续不进行计费操作。',
           type: 'warning',
-          duration: 3000,
+          duration: 3000
         })
       }
-    },
+    }
   },
   computed: {
     ...mapGetters(['currentMyUID']),
     operationArray() {
       return map(flatten(values(this.selectionDataSource)), (id) => this.rechargeDataSource[id])
-    },
+    }
   },
   components: {
-    typeCheck,
+    typeCheck
   },
   created() {
     this.userType = sessionStorage.getItem('myuser_type') // 1/超级管理员   2,"经销商" 3"农林政府单位” 4普通用户”  5销售用户”
@@ -1670,8 +1660,8 @@ export default {
         method: 'POST',
         url: '/api/api_gateway?method=device.device_manage.device_user_list',
         data: this.qs.stringify({
-          username: e,
-        }),
+          username: e
+        })
       }).then((res) => {
         this.searchLoading = false
         if (res.data.message == '') {
@@ -1719,18 +1709,18 @@ export default {
         center: this.center,
         resizeEnable: true,
         zoom: 10,
-        lang: 'en',
+        lang: 'en'
       })
       AMap.plugin(['AMap.ToolBar', 'AMap.Geocoder'], () => {
         map.addControl(new AMap.ToolBar())
         this.geocoder = new AMap.Geocoder({
           city: '全国',
-          radius: 1000,
+          radius: 1000
         })
       })
       setTimeout(() => {
         var marker = new AMap.Marker({
-          position: this.center,
+          position: this.center
         })
         // console.log(this.center);
         marker.setMap(map)
@@ -1745,14 +1735,14 @@ export default {
         this.locationForm = { lng: lnglat[0], lat: lnglat[1] }
         this.map.clearMap()
         var marker = new AMap.Marker({
-          position: lnglat,
+          position: lnglat
         })
         marker.setMap(this.map)
         this.getAddress(lnglat)
         setTimeout(() => {
           new AMap.InfoWindow({
             content: '<h5>' + '当前选中地址' + '</h5>' + this.address,
-            offset: new AMap.Pixel(0, -32),
+            offset: new AMap.Pixel(0, -32)
           }).open(this.map, lnglat)
         }, 100)
       })
@@ -1787,8 +1777,8 @@ export default {
           salesman_task_number: this.queryInfo.salesman_task_number, // 业务员、任务单号筛选
           overdue: this.equipmentLimit, // 0未到期,1已到期,2即将到期
           batch: this.batch, // 判断当前是否为批量充值状态下
-          device_user: this.queryInfo.device_user,
-        }),
+          device_user: this.queryInfo.device_user
+        })
       }).then((res) => {
         if (res.data.message == '') {
           // console.log(res.data.data.data);
@@ -1805,7 +1795,7 @@ export default {
     getSaleUserList() {
       this.$axios({
         method: 'POST',
-        url: '/api/api_gateway?method=user.login.get_sale_user_list',
+        url: '/api/api_gateway?method=user.login.get_sale_user_list'
       }).then((res) => {
         if (res.data.data.length !== 0) {
           this.userListOptions = res.data.data
@@ -1849,7 +1839,7 @@ export default {
           this.map.setFitView(marker)
           this.locationForm = {
             lat: lnglat.lat,
-            lng: lnglat.lng,
+            lng: lnglat.lng
           }
         } else {
           this.$message.error('根据地址查询位置失败')
@@ -1869,7 +1859,7 @@ export default {
             return '设备名称不能超过35个字符'
           }
         },
-        inputPlaceholder: device_name,
+        inputPlaceholder: device_name
       })
         .then(({ value }) => {
           if (value) {
@@ -1878,28 +1868,28 @@ export default {
               url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
               data: this.qs.stringify({
                 device_id: id,
-                device_name: value,
-              }),
+                device_name: value
+              })
             }).then((res) => {
               if (res.data.message == '') {
                 this.getList()
                 this.$message({
                   type: 'success',
-                  message: '修改成功',
+                  message: '修改成功'
                 })
               }
             })
           } else {
             this.$message({
               type: 'info',
-              message: '内容不能为空',
+              message: '内容不能为空'
             })
           }
         })
         .catch(() => {
           this.$message({
             type: 'info',
-            message: '取消输入',
+            message: '取消输入'
           })
         })
     },
@@ -1958,19 +1948,19 @@ export default {
         this.$message({
           message: '联网方式不能为空',
           type: 'warning',
-          duration: 1500,
+          duration: 1500
         })
       } else if (this.equipmentStatus === '') {
         this.$message({
           message: '设备状态不能为空',
           type: 'warning',
-          duration: 1500,
+          duration: 1500
         })
       } else if (this.salesmanMessage === '') {
         this.$message({
           message: '任务单号不能为空',
           type: 'warning',
-          duration: 1500,
+          duration: 1500
         })
       }
       //   else if (this.sale_user_uid === "") {
@@ -1988,7 +1978,7 @@ export default {
           networking: this.networkingType, // 联网方式
           equipment_status: this.equipmentStatus, // 设备状态
           salesman_task_number: this.salesmanMessage, // 业务员与人文单号
-          sale_user_uid: this.sale_user_uid, // 销售用户id
+          sale_user_uid: this.sale_user_uid // 销售用户id
         })
         // console.log(postData);
         this.submitBtn(postData)
@@ -1998,7 +1988,7 @@ export default {
       this.$axios({
         method: 'POST',
         url: '/api/api_gateway?method=forecast.worm_lamp.modify_device_status',
-        data: postData,
+        data: postData
       })
         .then((res) => {
           // console.log(res.data);
@@ -2006,7 +1996,7 @@ export default {
             this.$message({
               type: 'success',
               message: '修改成功',
-              duration: 1500,
+              duration: 1500
             })
             this.modificationMessage = false
             this.getList()
@@ -2014,7 +2004,7 @@ export default {
             this.$message({
               type: 'error',
               message: res.data.message,
-              duration: 1500,
+              duration: 1500
             })
           }
         })
@@ -2049,19 +2039,19 @@ export default {
         data: this.qs.stringify({
           device_id: this.device_id,
           lat: this.locationForm.lat,
-          lng: this.locationForm.lng,
-        }),
+          lng: this.locationForm.lng
+        })
       }).then((res) => {
         if (res.data.message == '') {
           this.getList()
           this.$message({
             type: 'success',
-            message: '定位成功',
+            message: '定位成功'
           })
         } else {
           this.$message({
             type: 'error',
-            message: '定位失败',
+            message: '定位失败'
           })
         }
       })
@@ -2083,19 +2073,19 @@ export default {
               repairtime: '',
               d_type: this.editFault.type,
               is_pc: '1', // 0 手机  1 电脑
-              errorvideo: '',
-            }),
+              errorvideo: ''
+            })
           }).then((res) => {
             if (res.data.message == '') {
               this.$message({
                 type: 'success',
-                message: '修改成功',
+                message: '修改成功'
               })
               this.addFaultDialogVisible = false
             } else {
               this.$message({
                 type: 'error',
-                message: res.data.message,
+                message: res.data.message
               })
             }
           })
@@ -2109,26 +2099,26 @@ export default {
       this.$confirm('确定删除此设备么?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-        type: 'warning',
+        type: 'warning'
       })
         .then(() => {
           this.$axios({
             method: 'POST',
             url: '/api/api_gateway?method=device.device_manage.delete_device',
             data: this.qs.stringify({
-              d_id,
-            }),
+              d_id
+            })
           }).then((res) => {
             if (res.data.message == '') {
               this.$message({
                 type: 'success',
-                message: '删除成功!',
+                message: '删除成功!'
               })
               this.getList()
             } else {
               this.$message({
                 type: 'error',
-                message: res.data.message,
+                message: res.data.message
               })
             }
           })
@@ -2136,7 +2126,7 @@ export default {
         .catch(() => {
           this.$message({
             type: 'info',
-            message: '已取消删除',
+            message: '已取消删除'
           })
         })
     },
@@ -2177,14 +2167,14 @@ export default {
           type,
           time,
           d_id,
-          typeNume,
-        },
+          typeNume
+        }
       })
     },
     equipmenttypelist() {
       this.$axios({
         method: 'POST',
-        url: '/api/api_gateway?method=home.homes.user_device_type',
+        url: '/api/api_gateway?method=home.homes.user_device_type'
       }).then((res) => {
         this.typelist = res.data.data
         this.typelistCopy = res.data.data
@@ -2336,7 +2326,7 @@ export default {
             this.$message({
               message: '请先选择设备!',
               type: 'warning',
-              duration: 1500,
+              duration: 1500
             })
           }
 
@@ -2418,7 +2408,7 @@ export default {
             this.$message({
               message: '请先选择设备!',
               type: 'warning',
-              duration: 1500,
+              duration: 1500
             })
           }
 
@@ -2441,7 +2431,7 @@ export default {
 
       if (this.selectionDataSource[this.queryInfo.page]) {
         assign(this.selectionDataSource, {
-          [this.queryInfo.page]: map(val, 'd_id'),
+          [this.queryInfo.page]: map(val, 'd_id')
         })
       } else {
         this.$set(this.selectionDataSource, this.queryInfo.page, map(val, 'd_id'))
@@ -2487,8 +2477,8 @@ export default {
           start_time: this.queryInfo.start_time,
           end_time: this.queryInfo.end_time,
           equipment_status: this.queryInfo.device_status, // 设备状态
-          salesman_task_number: this.queryInfo.salesman_task_number, // 业务员、任务单号筛选
-        }),
+          salesman_task_number: this.queryInfo.salesman_task_number // 业务员、任务单号筛选
+        })
       })
         .then((res) => {
           // console.log(res.data.data.data); // 列表数据
@@ -2537,7 +2527,7 @@ export default {
         lock: true,
         text: '正在跳转,请稍后。。。',
         spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)',
+        background: 'rgba(0, 0, 0, 0.7)'
       })
       var that = this
       var isClick = this.isClick
@@ -2571,11 +2561,11 @@ export default {
           // diverse: "batch", // 判断当前为批量充值还是为单台充值  批量充值batch 单台充值one
           diverse: that.totalShow == false ? (this.identification == 1 ? 'all' : 'batch') : 'one', // 判断当前为批量充值还是为单台充值  批量充值batch 单台充值one
           device_type_id: this.queryInfo.device_type_id,
-          overdue: this.equipmentLimit, // 0未到期  1已到期  2即将到期
+          overdue: this.equipmentLimit // 0未到期  1已到期  2即将到期
         }
         // console.log(a, 'a')
         var postData = this.qs.stringify({
-          secret: secret.Encrypt(JSON.stringify(a)),
+          secret: secret.Encrypt(JSON.stringify(a))
         })
 
         this.isSubmitLoading = true
@@ -2583,7 +2573,7 @@ export default {
           .$axios({
             method: 'POST',
             url: '/api/order_payment',
-            data: postData,
+            data: postData
           })
           .then((res) => {
             // console.log(res.data);
@@ -2599,7 +2589,7 @@ export default {
               this.$message({
                 message: res.data.success,
                 type: 'error',
-                duration: 1500,
+                duration: 1500
               })
             } else {
               window.open(res.data.data, '_blank')
@@ -2646,13 +2636,13 @@ export default {
             const devideIDlist = flatten(values(this.selectionDataSource))
             var postData = this.qs.stringify({
               d_id: devideIDlist.join(','), // 选中ID
-              nums: this.adminList[this.activeIndA], // 年数
+              nums: this.adminList[this.activeIndA] // 年数
             })
             // console.log(postData);
             this.$axios({
               method: 'POST',
               url: '/api/api_gateway?method=device.device_manage.device_recharge',
-              data: postData,
+              data: postData
             })
               .then((res) => {
                 // console.log(res.data.data);
@@ -2661,14 +2651,14 @@ export default {
                   this.$message({
                     message: '充值成功!',
                     type: 'success',
-                    duration: 1500,
+                    duration: 1500
                   })
                   this.rechargeTabList(true)
                 } else {
                   this.$message({
                     message: '充值失败!',
                     type: 'warning',
-                    duration: 1500,
+                    duration: 1500
                   })
                 }
               })
@@ -2680,10 +2670,10 @@ export default {
             this.$message({
               message: '取消充值',
               type: 'info',
-              duration: 1500,
+              duration: 1500
             })
           }
-        },
+        }
       })
     },
 
@@ -2704,8 +2694,8 @@ export default {
           equipment_status: this.queryInfo.device_status, // 设备状态
           salesman_task_number: '', // 业务员、任务单号筛选
           overdue: this.equipmentLimit, // 0未到期  1已到期  2即将到期
-          device_user: this.queryInfo.device_user,
-        }),
+          device_user: this.queryInfo.device_user
+        })
       }).then((res) => {
         if (res.data.message == '') {
           this.dataList = res.data.data.data
@@ -2781,8 +2771,8 @@ export default {
           remove_id_list: this.abandonlist.join(','),
           device_expire: this.equipmentLimit,
           device_type: this.queryInfo.device_type_id,
-          device_ids: this.queryInfo.f_id,
-        }),
+          device_ids: this.queryInfo.f_id
+        })
       })
         .then((res) => {
           // console.log(res);
@@ -2849,26 +2839,26 @@ export default {
             money: this.grossPrice * yearData,
             flow: 1024 * yearData,
             unit: yearData + '年',
-            year: yearData,
+            year: yearData
           },
           {
             money: this.grossPrice * (yearData + 1),
             flow: 1024 * (yearData + 1),
             unit: yearData + 1 + '年',
-            year: yearData + 1,
+            year: yearData + 1
           },
           {
             money: this.grossPrice * (yearData + 2),
             flow: 1024 * (yearData + 2),
             unit: yearData + 2 + '年',
-            year: yearData + 2,
+            year: yearData + 2
           },
           {
             money: this.grossPrice * (yearData + 3),
             flow: 1024 * (yearData + 3),
             unit: yearData + 3 + '年',
-            year: yearData + 3,
-          },
+            year: yearData + 3
+          }
         ]
         that.yearData = that.steMealArr[0].year // 在没有点击切换套餐的情况下默认第一个套餐年份
         that.totalShow = true // 显示充值套餐
@@ -2891,12 +2881,12 @@ export default {
         method: 'POST',
         url: '/api/v2/device/manage/down/template/',
         data: this.qs.stringify({}),
-        responseType: 'blob',
+        responseType: 'blob'
       }).then((res) => {
         // console.log(res);
         let fileName = '设备信息补充.xls'
         const blob = new Blob([res.data], {
-          type: 'application/vnd.ms-excel;charset=utf-8',
+          type: 'application/vnd.ms-excel;charset=utf-8'
         })
         const a = document.createElement('a')
         a.href = URL.createObjectURL(blob)
@@ -2912,27 +2902,27 @@ export default {
         this.$message({
           message: '请上传文件',
           duration: 1500,
-          type: 'warning',
+          type: 'warning'
         })
       } else if (this.salevalue == '') {
         this.$message({
           message: '请选择销售人员',
           duration: 1500,
-          type: 'warning',
+          type: 'warning'
         })
       } else {
         const loading = this.$loading({
           lock: true,
           text: '设备信息上传中......',
           spinner: 'el-icon-loading',
-          background: 'rgba(0, 0, 0, 0.7)',
+          background: 'rgba(0, 0, 0, 0.7)'
         })
         this.fileData.append('sale_uid', this.salevalue) // 上传的xls文件
         this.fileData.append('token', localStorage.getItem('session')) // 上传的xls文件
         this.$axios({
           method: 'POST',
           url: '/api/v2/device/manage/upload/template/',
-          data: this.fileData,
+          data: this.fileData
           // responseType: 'blob'
         }).then((res) => {
           console.log(res)
@@ -2945,7 +2935,7 @@ export default {
             this.$message({
               message: '设备信息导入成功',
               duration: 1500,
-              type: 'success',
+              type: 'success'
             })
             // let fileName = '结果信息.xls';
             // const blob = new Blob([res.data], {
@@ -2980,7 +2970,7 @@ export default {
             this.$message({
               message: res.data.data.items.msg,
               duration: 1500,
-              type: 'error',
+              type: 'error'
             })
           }
         })
@@ -2997,7 +2987,7 @@ export default {
         this.$message({
           message: '权重不能为空',
           duration: 1500,
-          type: 'warning',
+          type: 'warning'
         })
       } else {
         this.$axios({
@@ -3005,15 +2995,15 @@ export default {
           url: '/api/v2/device/manage/order/',
           data: this.qs.stringify({
             device_id: this.weightid,
-            order: this.weightnumber,
-          }),
+            order: this.weightnumber
+          })
         }).then((res) => {
           // console.log(res);
           if (res.data.msg == '成功') {
             this.$message({
               message: '设置成功',
               duration: 1500,
-              type: 'success',
+              type: 'success'
             })
             this.weightdialogVisible = false
             this.getList()
@@ -3021,7 +3011,7 @@ export default {
             this.$message({
               message: res.data.msg,
               duration: 1500,
-              type: 'warning',
+              type: 'warning'
             })
           }
         })
@@ -3029,8 +3019,8 @@ export default {
     },
     handleRechargeRecordBtnClick() {
       this.$router.push('/index/equipList/recharge')
-    },
-  },
+    }
+  }
 }
 </script>
 

+ 43 - 45
src/pages/forecasting/cbd/components/detail/chartItem.vue

@@ -153,9 +153,9 @@
     <el-col :md="24" :lg="10">
       <el-card class="box-card" v-loading="linetf">
         <p class="title">环境温湿度</p>
-        <div class="charts" id="charts">
-          <base-chart height="350px" :option="chartOption"></base-chart>
-          <div class="tishi" v-show="linedatatf">暂无数据</div>
+        <div class="charts" id="charts" style="height: 350px">
+          <div class="tishi" v-if="!linedatatf">暂无数据</div>
+          <base-chart v-else height="350px" :option="chartOption"></base-chart>
         </div>
       </el-card>
     </el-col>
@@ -246,52 +246,50 @@ export default {
         })
       }).then((res) => {
         this.linetf = false
-        if (res.data.data.length > 0) {
-          let chartData = [
-            {
-              name: '温度(℃)',
-              type: 'line',
-              smooth: true,
-              data: [],
-              field: 'new_tem'
-            },
-            {
-              name: '湿度(%)',
-              type: 'line',
-              smooth: true,
-              data: [],
-              field: 'new_hum'
-            },
-            {
-              name: '加热仓温度(℃)',
-              type: 'line',
-              smooth: true,
-              data: [],
-              field: 'others'
-            }
-          ]
-
-          for (let i = 0; i < chartData.length; i++) {
-            res.data.data.forEach((item) => {
-              chartData[i].data.push([
-                this.formatTime(item.addtime * 1000, 'yyyy-MM-dd hh:mm:ss'),
-                item[chartData[i].field]
-              ])
-            })
-            delete chartData[i].field
+        console.log(res.data.data, '-----折线数据', res.data.data.length)
+        if (res.data.data.length == 0) {
+          this.linedatatf = false
+          return
+        }
+        this.linedatatf = true
+        let chartData = [
+          {
+            name: '温度(℃)',
+            type: 'line',
+            smooth: true,
+            data: [],
+            field: 'new_tem'
+          },
+          {
+            name: '湿度(%)',
+            type: 'line',
+            smooth: true,
+            data: [],
+            field: 'new_hum'
+          },
+          {
+            name: '加热仓温度(℃)',
+            type: 'line',
+            smooth: true,
+            data: [],
+            field: 'others'
           }
+        ]
 
-          this.chartOption = humAndTemLine({
-            time: [],
-            chartData
-          })
-        } else {
-          this.linedatatf = true
-          this.chartOption = humAndTemLine({
-            time: [],
-            chartData: []
+        for (let i = 0; i < chartData.length; i++) {
+          res.data.data.forEach((item) => {
+            chartData[i].data.push([
+              this.formatTime(item.addtime * 1000, 'yyyy-MM-dd hh:mm:ss'),
+              item[chartData[i].field]
+            ])
           })
+          delete chartData[i].field
         }
+
+        this.chartOption = humAndTemLine({
+          time: [],
+          chartData
+        })
       })
     },
     // 刷新按钮

+ 27 - 4
src/pages/fourMoodBase/AreaPolygon.vue

@@ -69,6 +69,21 @@ export default {
     isVisible: {
       type: Boolean,
       default: false
+    },
+    location: {
+      type: Object,
+      default: () => {
+        return {
+          lng: '',
+          lat: '',
+          address: ''
+        }
+      }
+    }
+  },
+  computed: {
+    center() {
+      return [this.location.lng, this.location.lat]
     }
   },
   data() {
@@ -125,8 +140,8 @@ export default {
       mouseTool: null,
       postPolygon: [],
       locationForm: {
-        lng: '',
-        lat: '',
+        lng: this.location.lng,
+        lat: this.location.lat,
         address: ''
       }
     }
@@ -140,7 +155,6 @@ export default {
       }
     }
   },
-  computed: {},
   created() {},
   mounted() {
     this.clearArea()
@@ -198,8 +212,17 @@ export default {
       })
 
       this.map = map
+      if (this.location.lng && this.location.lat) {
+        if (this.marker) {
+          this.map.remove(this.marker)
+        }
+        this.marker = new AMap.Marker()
+
+        this.marker.setPosition(this.center)
+        this.map.add(this.marker)
+        this.map.setFitView(this.marker)
+      }
       this.map.on('click', (e) => {
-        console.log('点击地图', e)
         if (this.marker) {
           this.map.remove(this.marker)
         }

+ 14 - 62
src/pages/fourMoodBase/baseManage.vue

@@ -17,7 +17,7 @@
         ></el-input> -->
 
         <el-button
-          v-if="$QueryPermission(110)"
+          v-if="$QueryPermission(111)"
           v-btnRight:added="$route.path"
           type="primary"
           size="mini"
@@ -95,7 +95,7 @@
             </div>
           </div>
           <div
-            v-if="$QueryPermission(111)"
+            v-if="$QueryPermission(110)"
             v-btnRight:change="$route.path"
             class="baseEditBox"
             @click="editBase(item.id, '修改基地', item.address)"
@@ -244,32 +244,7 @@
       width="800px"
       @closed="addLocationDialogClosed"
     >
-      <!-- <el-form :inline="true" :model="locationForm" class="demo-form-inline" size="mini">
-        <el-form-item label="经度">
-          <el-input v-model="locationForm.lng"></el-input>
-        </el-form-item>
-        <el-form-item label="纬度">
-          <el-input v-model="locationForm.lat"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" size="mini" @click="locationSearch">定位</el-button>
-        </el-form-item>
-        <el-form-item>
-          <el-input @change="addrChange()" clearable placeholder="请输入地区检索" v-model="addr">
-            <i slot="suffix" class="el-input__icon el-icon-search"></i>
-          </el-input>
-        </el-form-item>
-      </el-form> -->
-      <!-- <baidu-map
-        class="Bmap"
-        mapType="BMAP_HYBRID_MAP"
-        :center="center"
-        :zoom="mapZoom"
-        :scroll-wheel-zoom="true"
-        @ready="handlerBMap"
-        @click="locationPoint"
-      ></baidu-map> -->
-      <AreaPolygon @locationSelected="locationSelected" />
+      <AreaPolygon @locationSelected="locationSelected" :location="locationForm" />
       <span slot="footer" class="dialog-footer">
         <el-button @click="addLocationDialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="addLocationSubm">确 定</el-button>
@@ -418,7 +393,6 @@ export default {
   },
   methods: {
     locationSelected(locationForm) {
-      console.log('查询到了', locationForm)
       this.locationForm = locationForm
     },
     getBaseList() {
@@ -609,32 +583,14 @@ export default {
       }
     },
     goLocation() {
-      this.locationForm.lng = ''
-      this.locationForm.lat = ''
-      this.addr = ''
-      this.addLocationDialogVisible = true
-    },
-    addrChange() {
-      let local = new this.BMap.LocalSearch(this.map, {
-        onSearchComplete: (results) => {
-          console.log(results, ' addr change')
-          if (results.Yr && results.Yr.length) {
-            const data = results.Yr[0]
-            const { lng, lat } = data.point
-            this.locationForm.lng = lng
-            this.locationForm.lat = lat
-          }
-        },
-        renderOptions: {
-          map: this.map,
-          panel: 'r-result',
-          selectFirstResult: true
-        }
-      })
-      local.search(this.addr)
-      // const results = local.getResults();
+      if (this.flag == 0) {
+        // 新增
+        this.locationForm.lng = ''
+        this.locationForm.lat = ''
+        this.addr = ''
+      }
 
-      console.log('local search results', local)
+      this.addLocationDialogVisible = true
     },
     addLocationDialogClosed() {},
     locationSearch() {},
@@ -642,16 +598,9 @@ export default {
       this.BMap = BMap
       this.map = map
     },
-    // 在地图中点击定位
-    locationPoint(e) {
-      let { point } = e
-      this.locationForm = point
-      this.map.clearOverlays()
-      this.map.addOverlay(new this.BMap.Marker(point))
-    },
+
     addLocationSubm() {
       let { lng, lat, address } = this.locationForm
-      console.log(this.locationForm)
       this.addBaseInfo.lng = lng
       this.addBaseInfo.lat = lat
       this.addBaseInfo.address = address
@@ -680,6 +629,9 @@ export default {
         this.addBaseInfo.address = address
         this.addBaseInfo.lat = item.lat
         this.addBaseInfo.lng = item.lng
+        this.locationForm.lat = item.lat
+        this.locationForm.lng = item.lng
+
         this.getEquipList(id) // 获取所有未绑定和已绑定的设备
         this.dialogTxt = '编辑基地'
         this.baseAddVisible = true

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 167 - 167
src/pages/hjjc/environmentMonitor/EnvironmentMonitor.vue


BIN
static/images/weather/icon_258.png


BIN
static/images/weather/水分.png