瀏覽代碼

代码更新 z

zhangyun 4 年之前
父節點
當前提交
9ff6e62007

+ 1 - 1
minggao/src/components/SearchBar/index.vue

@@ -19,7 +19,6 @@
 		<div class="search-box">
 			<slot name="search-common">
 				<el-input
-					style="cursor: pointer"
 					placeholder="请输入内容"
 					size="mini"
 					clearable
@@ -122,6 +121,7 @@ export default {
 	align-items: center;
 	.search-box {
 		text-align: right;
+		cursor: default;
 		.el-input {
 			width: 400px;
 			vertical-align: middle;

+ 23 - 79
minggao/src/page/forecasting/cbd/Cbd.vue

@@ -1062,8 +1062,6 @@ export default {
         device_id: item.device_id,
         device_name: item.device_name,
       };
-      this.operationDialogVisible = true;
-
       // for (var key in this.ruleForm) {
       //   this.ruleForm[key] = e[key];
       // }
@@ -1072,85 +1070,31 @@ export default {
         var arr = [item.org_list[i].org_id];
         this.ruleForm.org_id.push(arr);
       }
-      if (item.superior_org_list.length != 0) {
-        var data = item.superior_org_list;
-        for (var i = 0; i < data.length; i++) {
-          // console.log(data[i])
-          if (data[i].superior_org.length > 1) {
-            var data2 = data[i].superior_org;
-            // console.log(data2)
-            for (var j = 0; j < data2.length; j++) {
-              // console.log(data2[j])
-              this.ruleForm.org_id[i].unshift(data2[j].org_id);
-            }
-          } else {
-            if (data[i].superior_org.length != 0) {
-              this.ruleForm.org_id[i].unshift(data[i].superior_org[0].org_id);
+      this.getmon3(item.d_id);
+    },
+    getmon3(trap_id) {
+      this.$axios({
+        method: "POST",
+        url: "/api/api_gateway?method=sysmenage.usermanager.get_parent_org_list;",
+        data: this.qs.stringify({
+          device_id: trap_id,
+        }),
+      }).then((res) => {
+        // console.log(res.data.data);
+        var orgdatas = res.data.data
+        if (orgdatas.length != 0) {
+          for(var i=0;i<orgdatas.length;i++){
+            if(orgdatas[i].lenngth!=0){
+              for(var j=0;j<orgdatas[i].length;j++){
+                this.ruleForm.org_id[i].unshift(orgdatas[i][j].org_id)
+              }
             }
           }
         }
-      }
-      console.log(this.ruleForm);
+        console.log(this.ruleForm.org_id)
+        this.operationDialogVisible = true;
+      });
     },
-    // equipBtnControl(cmd) {
-    //   let loading = this.$loading({
-    //     lock: true,
-    //     text: "Loading",
-    //     spinner: "el-icon-loading",
-    //     background: "rgba(0, 0, 0, 0.7)",
-    //   });
-    //   if (cmd == "dtu_update") {
-    //     var name = "联网模块升级";
-    //   } else if (cmd == "dtu_reboot") {
-    //     var name = "联网模块重启";
-    //   } else if (cmd == "takephoto") {
-    //     var name = "拍照";
-    //   } else if (cmd == "update") {
-    //     var name = "强制升级";
-    //   } else if (cmd == "reboot") {
-    //     var name = "强制重启";
-    //   } else if (cmd == "open_shake") {
-    //     var name = "强制震动开启";
-    //   } else if (cmd == "close_shake") {
-    //     var name = "强制震动关闭";
-    //   } else if (cmd == "yfwlw") {
-    //     var name = "平台切换";
-    //   } else if (cmd == "imei") {
-    //     var name = "修改设备号";
-    //   }
-
-    //   this.$confirm("此操作对设备进行" + name + ", 是否继续?", "提示", {
-    //     confirmButtonText: "确定",
-    //     cancelButtonText: "取消",
-    //     type: "warning",
-    //   })
-    //     .then(() => {
-    //       this.$axios({
-    //         method: "POST",
-    //         url: "/api/api_gateway?method=forecast.send_control.admin_device_control",
-    //         data: this.qs.stringify({
-    //           cmd,
-    //           device_type_id: 3,
-    //           d_id: this.d_id,
-    //           imei: this.replaceImeiData, // 更换imei
-    //         }),
-    //       }).then((res) => {
-    //         if (res.data.message == "") {
-    //           this.$message.success("指令下发成功!");
-    //         }
-    //         loading.close();
-    //       });
-    //     })
-    //     .catch(() => {
-    //       this.$message({
-    //         type: "info",
-    //         message: name + "已取消",
-    //         duration: 1500,
-    //       });
-    //       loading.close();
-    //     });
-    // },
-
     // 设备版本、用户筛选
     searchChange() {
       console.log(this.queryInfo.selectUser);
@@ -1768,11 +1712,11 @@ export default {
 
 // 表格文字居中
 /deep/.el-table th > .cell {
-  text-align: center;
+  // text-align: center;
 }
 
 /deep/.el-table .cell {
-  text-align: center;
+  // text-align: center;
 }
 
 // 按钮

+ 2 - 2
minggao/src/page/forecasting/maintain/maintain.vue

@@ -40,12 +40,12 @@
           <el-table-column label="操作" width="300">
             <template slot-scope="scope">
               <span
-                style="color: #409eff; margin-right: 5px"
+                style="color: #409eff; margin-right: 5px;cursor: pointer;"
                 @click="alter(scope.row)"
                 >编辑</span
               >
               <span
-                style="color: #409eff; margin-right: 5px"
+                style="color: #409eff; margin-right: 5px;cursor: pointer;"
                 @click="deletemain(scope.row)"
                 >删除</span
               >

+ 35 - 38
minggao/src/page/forecasting/trap/bait.vue

@@ -37,12 +37,12 @@
           <el-table-column label="操作" width="300">
             <template slot-scope="scope">
               <span
-                style="color: #409eff; margin-right: 5px"
+                style="color: #409eff; margin-right: 5px; cursor: pointer;"
                 @click="alter(scope.row)"
                 >编辑</span
               >
               <span
-                style="color: #409eff; margin-right: 5px"
+                style="color: #409eff; margin-right: 5px; cursor: pointer;"
                 @click="deletes(scope.row)"
                 >删除</span
               >
@@ -113,7 +113,7 @@ export default {
       tableData: [],
       queryInfo: {
         page: 1,
-        inducer_name: ""
+        inducer_name: "",
       },
       total: 10,
       loading: false,
@@ -124,21 +124,21 @@ export default {
         inducer_name: "",
         expire: "",
         messages: "",
-        inducer_id: ""
+        inducer_id: "",
       },
       rules: {
         inducer_name: [
-          { required: true, message: "请输入活动名称", trigger: "blur" }
+          { required: true, message: "请输入活动名称", trigger: "blur" },
         ],
         expire: [
           { required: true, message: "请输入活动名称", trigger: "blur" },
-          { validator: checklnglat, trigger: "blur" }
+          { validator: checklnglat, trigger: "blur" },
         ],
         messages: [
-          { required: true, message: "请输入活动名称", trigger: "blur" }
-        ]
+          { required: true, message: "请输入活动名称", trigger: "blur" },
+        ],
       },
-      addtitle: "新增诱剂"
+      addtitle: "新增诱剂",
     };
   },
   //监听属性 类似于data概念
@@ -156,9 +156,9 @@ export default {
         data: this.qs.stringify({
           page_size: 20,
           page: this.queryInfo.page,
-          inducer_name: this.queryInfo.inducer_name //              非必传(string)     诱剂名称 搜索项
-        })
-      }).then(res => {
+          inducer_name: this.queryInfo.inducer_name, //              非必传(string)     诱剂名称 搜索项
+        }),
+      }).then((res) => {
         this.loading = false;
         console.log(res.data.data);
         this.total = res.data.data.total_item;
@@ -191,30 +191,29 @@ export default {
       var str = "您确定删除<" + events.inducer_name + ">吗?";
       this.$confirm(str, "删除诱剂", {
         confirmButtonText: "确定",
-        cancelButtonText: "取消"
+        cancelButtonText: "取消",
       })
         .then(() => {
           this.$axios({
             method: "POST",
-            url:
-              "/api/api_gateway?method=monitor_manage.maintain.inducer_delete",
+            url: "/api/api_gateway?method=monitor_manage.maintain.inducer_delete",
             data: this.qs.stringify({
-              inducer_id: events.inducer_id
-            })
-          }).then(res => {
+              inducer_id: events.inducer_id,
+            }),
+          }).then((res) => {
             console.log(res);
             if (res.data.data) {
               this.$message({
                 showClose: true,
                 message: "删除成功!",
-                type: "success"
+                type: "success",
               });
               this.getcbdlist();
             } else {
               this.$message({
                 showClose: true,
                 message: "删除失败," + res.data.message,
-                type: "warning"
+                type: "warning",
               });
             }
           });
@@ -222,32 +221,31 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "已取消删除"
+            message: "已取消删除",
           });
         });
     },
     submitForm(formName) {
       console.log(this.ruleForm);
-      this.$refs[formName].validate(valid => {
+      this.$refs[formName].validate((valid) => {
         if (valid) {
           if (this.addtitle == "修改诱剂") {
             this.$axios({
               method: "POST",
-              url:
-                "/api/api_gateway?method=monitor_manage.maintain.inducer_modify",
+              url: "/api/api_gateway?method=monitor_manage.maintain.inducer_modify",
               data: this.qs.stringify({
                 inducer_id: this.ruleForm.inducer_id,
                 inducer_name: this.ruleForm.inducer_name,
                 expire: Number(this.ruleForm.expire),
-                messages: this.ruleForm.messages
-              })
-            }).then(res => {
+                messages: this.ruleForm.messages,
+              }),
+            }).then((res) => {
               console.log(res);
               if (res.data.data) {
                 this.$message({
                   showClose: true,
                   message: "修改成功!",
-                  type: "success"
+                  type: "success",
                 });
                 this.addtraptf = false;
                 this.getcbdlist();
@@ -256,27 +254,26 @@ export default {
                 this.$message({
                   showClose: true,
                   message: "修改失败" + res.data.message,
-                  type: "warning"
+                  type: "warning",
                 });
               }
             });
           } else if (this.addtitle == "新增诱剂") {
             this.$axios({
               method: "POST",
-              url:
-                "/api/api_gateway?method=monitor_manage.maintain.inducer_add",
+              url: "/api/api_gateway?method=monitor_manage.maintain.inducer_add",
               data: this.qs.stringify({
                 inducer_name: this.ruleForm.inducer_name,
                 expire: this.ruleForm.expire,
-                messages: this.ruleForm.messages
-              })
-            }).then(res => {
+                messages: this.ruleForm.messages,
+              }),
+            }).then((res) => {
               console.log(res);
               if (res.data.data) {
                 this.$message({
                   showClose: true,
                   message: "新增成功!",
-                  type: "success"
+                  type: "success",
                 });
                 this.addtraptf = false;
                 this.getcbdlist();
@@ -285,7 +282,7 @@ export default {
                 this.$message({
                   showClose: true,
                   message: "添加失败" + res.data.message,
-                  type: "warning"
+                  type: "warning",
                 });
               }
             });
@@ -307,7 +304,7 @@ export default {
     dioclose() {
       console.log(111);
       // this.$refs[formName].resetFields();
-    }
+    },
   },
   beforeCreate() {}, //生命周期 - 创建之前
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -321,7 +318,7 @@ export default {
   updated() {}, //生命周期 - 更新之后
   beforeDestroy() {}, //生命周期 - 销毁之前
   destroyed() {}, //生命周期 - 销毁完成
-  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style scoped lang="less">

+ 6 - 0
minggao/src/page/forecasting/trap/fillinrecord.vue

@@ -367,4 +367,10 @@ export default {
   background-color: #409eff;
   border-color: #409eff;
 }
+/deep/.el-date-editor {
+  cursor: pointer;
+  .el-range-input {
+    cursor: pointer;
+  }
+}
 </style>

+ 39 - 29
minggao/src/page/forecasting/trap/trap.vue

@@ -76,7 +76,7 @@
           :data="tableData"
           style="width: 100%; overflow-y: auto"
           :stripe="true"
-          :height="48*13"
+          :height="48 * 13"
         >
           <el-table-column
             prop="index"
@@ -141,12 +141,12 @@
           <el-table-column label="操作" width="200">
             <template slot-scope="scope">
               <span
-                style="color: #409eff; margin-right: 5px"
+                style="color: #409eff; margin-right: 5px; cursor: pointer"
                 @click="addtrap(scope.row)"
                 >编辑</span
               >
               <span
-                style="color: #409eff; margin-right: 5px"
+                style="color: #409eff; margin-right: 5px; cursor: pointer"
                 @click="deletes(scope.row)"
                 >删除</span
               >
@@ -559,7 +559,10 @@ export default {
       } else {
         org_id = this.ruleForm.org_id;
       }
-      org_id = org_id.join("/");
+      if (org_id.length > 0) {
+        org_id = org_id.join("/");
+      }
+      console.log(org_id);
       this.$refs[formName].validate((valid) => {
         if (valid) {
           this.$axios({
@@ -602,10 +605,12 @@ export default {
             }
           });
         } else {
-          this.$message({
-            message: "请将信息填写完全",
-            type: "warning",
-          });
+          if (document.getElementsByClassName("el-message").length == 0) {
+            this.$message({
+              message: "请将信息填写完全",
+              type: "warning",
+            });
+          }
           return false;
         }
       });
@@ -624,33 +629,38 @@ export default {
       for (var key in this.ruleForm) {
         this.ruleForm[key] = e[key];
       }
+      // console.log(this.ruleForm.org_id);
+      this.ruleForm.trap_status = this.ruleForm.trap_status.toString();
+      this.parameter = "modify";
       this.ruleForm.org_id = [];
       for (var i = 0; i < e.org_list.length; i++) {
         var arr = [e.org_list[i].org_id];
         this.ruleForm.org_id.push(arr);
       }
-      if (e.superior_org_list.length != 0) {
-        var data = e.superior_org_list;
-        for (var i = 0; i < data.length; i++) {
-          // console.log(data[i])
-          if (data[i].superior_org.length > 1) {
-            var data2 = data[i].superior_org;
-            // console.log(data2)
-            for (var j = 0; j < data2.length; j++) {
-              // console.log(data2[j])
-              this.ruleForm.org_id[i].unshift(data2[j].org_id);
-            }
-          } else {
-            if (data[i].superior_org.length != 0) {
-              this.ruleForm.org_id[i].unshift(data[i].superior_org[0].org_id);
+      this.getmon3(e.trap_id);
+    },
+    getmon3(trap_id) {
+      this.$axios({
+        method: "POST",
+        url: "/api/api_gateway?method=sysmenage.usermanager.get_parent_org_list;",
+        data: this.qs.stringify({
+          device_id: trap_id,
+        }),
+      }).then((res) => {
+        // console.log(res.data.data);
+        var orgdatas = res.data.data;
+        if (orgdatas.length != 0) {
+          for (var i = 0; i < orgdatas.length; i++) {
+            if (orgdatas[i].lenngth != 0) {
+              for (var j = 0; j < orgdatas[i].length; j++) {
+                this.ruleForm.org_id[i].unshift(orgdatas[i][j].org_id);
+              }
             }
           }
         }
-      }
-      console.log(this.ruleForm.org_id);
-      this.ruleForm.trap_status = this.ruleForm.trap_status.toString();
-      this.parameter = "modify";
-      this.addtraptf = true;
+        console.log(this.ruleForm.org_id);
+        this.addtraptf = true;
+      });
     },
     deletes(events) {
       //删除诱捕器
@@ -1032,9 +1042,9 @@ export default {
   background-color: #409eff;
   border-color: #409eff;
 }
-/deep/.el-date-editor{
+/deep/.el-date-editor {
   cursor: pointer;
-  .el-range-input{
+  .el-range-input {
     cursor: pointer;
   }
 }

+ 7 - 2
minggao/src/page/home/index.vue

@@ -18,7 +18,7 @@
       </div>
       <div class="index_out">
         <el-dropdown trigger="click" @command="quit">
-          <span class="el-dropdown-link">
+          <span class="el-dropdown-link" style="cursor: pointer">
             <span>{{ username }}</span>
             <i class="el-icon-arrow-down el-icon--right"></i>
           </span>
@@ -100,7 +100,7 @@
               ><a
                 v-if="index == routerinfo.length - 2 && item.menu != ''"
                 :href="'/#/index/' + item.menu"
-                style="cursor:pointer"
+                style="cursor: pointer"
                 >{{ item.purview_name }}</a
               ><span v-else>{{ item.purview_name }}</span></el-breadcrumb-item
             >
@@ -487,6 +487,11 @@ p {
     /deep/.el-menu-item-group__title {
       display: none;
     }
+    /deep/.el-icon-arrow-down:before {
+      content: "\E6DF";
+      color: #fff;
+      font-size: 16px;
+    }
     .firstmenu {
       text-align: left;
       padding-left: 20px !important;

+ 1 - 0
minggao/src/page/homepage/facilitydistribute.vue

@@ -86,6 +86,7 @@
           pietf ? 'iconbox el-icon-arrow-right' : 'iconbox el-icon-arrow-left'
         "
         @click="pietf = !pietf"
+        style="cursor: pointer;"
       ></p>
       <div class="tishi" :style="{ width: width }" v-if="baseinfo.length == 0">
         <p>请点击设备标点,查看设备详情</p>

+ 1 - 0
minggao/src/page/homepage/pestdistribute.vue

@@ -71,6 +71,7 @@
           pietf ? 'iconbox el-icon-arrow-right' : 'iconbox el-icon-arrow-left'
         "
         @click="pietf = !pietf"
+        style="cursor: pointer;"
       ></p>
       <div
         :style="{

+ 22 - 17
minggao/src/page/monitor/Monitor.vue

@@ -1086,7 +1086,7 @@ export default {
     },
     monset(e){
       console.log(e)
-      this.operationDialogVisible = true
+      
       // this.ruleForm.device_id = item.device_id
       // this.ruleForm.device_name = item.device_name
       for (var key in this.ruleForm) {
@@ -1097,25 +1097,30 @@ export default {
         var arr = [e.temp_org_list[i].org_id];
         this.ruleForm.org_id.push(arr);
       }
-      if (e.superior_org_list.length != 0) {
-        var data = e.superior_org_list;
-        for (var i = 0; i < data.length; i++) {
-          // console.log(data[i])
-          if (data[i].superior_org.length > 1) {
-            var data2 = data[i].superior_org;
-            // console.log(data2)
-            for (var j = 0; j < data2.length; j++) {
-              // console.log(data2[j])
-              this.ruleForm.org_id[i].unshift(data2[j].org_id);
-            }
-          } else {
-            if (data[i].superior_org.length != 0) {
-              this.ruleForm.org_id[i].unshift(data[i].superior_org[0].org_id);
+      this.getmon3(e.d_id)
+    },
+    getmon3(trap_id) {
+      this.$axios({
+        method: "POST",
+        url: "/api/api_gateway?method=sysmenage.usermanager.get_parent_org_list;",
+        data: this.qs.stringify({
+          device_id: trap_id,
+        }),
+      }).then((res) => {
+        // console.log(res.data.data);
+        var orgdatas = res.data.data
+        if (orgdatas.length != 0) {
+          for(var i=0;i<orgdatas.length;i++){
+            if(orgdatas[i].lenngth!=0){
+              for(var j=0;j<orgdatas[i].length;j++){
+                this.ruleForm.org_id[i].unshift(orgdatas[i][j].org_id)
+              }
             }
           }
         }
-      }
-      console.log(this.ruleForm)
+        console.log(this.ruleForm.org_id)
+        this.operationDialogVisible = true
+      });
     },
     //获取视频列表
     getJkList() {