Bläddra i källkod

代码更新 2/18

zhangyun 4 år sedan
förälder
incheckning
82e16a2cd4

+ 1 - 1
minggao/src/page/commandCenter/realTime.vue

@@ -483,7 +483,7 @@ export default {
         data: this.qs.stringify({
           page: this.page,
           page_item: "100000000",
-          org_name: ""
+          org_name: "",
         })
       })
         .then(res => {

+ 16 - 6
minggao/src/page/commandCenter/taskRegulator.vue

@@ -365,9 +365,13 @@
           ></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button @click="resetForm('ruleForm')">取消</el-button>
-          <el-button type="primary" @click="submitForm('ruleForm')"
-            >发布</el-button
+          <el-button @click="resetForm('ruleForm')" size="mini">取消</el-button>
+          <el-button
+            type="primary"
+            @click="submitForm('ruleForm')"
+            size="mini"
+            :disabled="releaseTF"
+            >{{ releaseTF ? "发布中..." : "发布" }}</el-button
           >
         </el-form-item>
       </el-form>
@@ -624,6 +628,7 @@ export default {
       orgData: [], // 组织列表
       pointData: [], // 监测点列表
       taskObj: {}, // 点击编辑获取到的任务数据
+      releaseTF: false,
     };
   },
   //监听属性 类似于data概念
@@ -971,6 +976,7 @@ export default {
           }
 
           if (this.titleData == "发布任务") {
+            this.releaseTF = true;
             this.$axios({
               method: "POST",
               url: "/api/api_gateway?method=control_center.task.task_add",
@@ -981,9 +987,9 @@ export default {
                 last_time: this.ruleForm.endTime, // 任务完成时间
                 task_type: this.ruleForm.type, // 任务类型
                 tesk_msg: this.ruleForm.desc, // 任务描述
-                trap_id_list: JSON.stringify(this.ruleForm.checkList) // 诱捕器id列表
-              })
-            }).then(res => {
+                trap_id_list: JSON.stringify(this.ruleForm.checkList), // 诱捕器id列表
+              }),
+            }).then((res) => {
               if (res.data.message == "") {
                 this.loading = true;
                 this.tableData = [];
@@ -994,12 +1000,14 @@ export default {
                   message: "新增成功!",
                   duration: 1500,
                 });
+                this.releaseTF = false;
                 for (var key in this.ruleForm) {
                   this.ruleForm[key] = "";
                 }
               }
             });
           } else if (this.titleData == "编辑任务") {
+            this.releaseTF = true;
             this.$axios({
               method: "POST",
               url: "/api/api_gateway?method=control_center.task.task_modify",
@@ -1024,6 +1032,7 @@ export default {
                   message: "编辑成功!",
                   duration: 1500,
                 });
+                this.releaseTF = false;
               }
             });
           }
@@ -1201,6 +1210,7 @@ export default {
 
     downloadFile(res, name) {
       let link = document.createElement("a");
+      console.log(res)
       link.href = window.URL.createObjectURL(new Blob([res.data]));
       link.target = "_blank";
       // 文件名和格式

+ 13 - 4
minggao/src/page/forecasting/cbd/Cbd.vue

@@ -504,7 +504,8 @@
 					</el-form-item> -->
           <el-form-item class="handAddFormBtn">
             <el-button type="primary" size="mini" @click="equipControlSubm()"
-              >确定</el-button
+            :disabled="releaseTF"
+              >{{ releaseTF ? "发布中..." : "确定" }}</el-button
             >
             <el-button size="mini" @click="equipControlDialogVisible = false"
               >取消</el-button
@@ -579,7 +580,8 @@
       <span slot="footer" class="dialog-footer">
         <el-button @click="resetForm('ruleForm')" size="mini">取 消</el-button>
         <el-button type="primary" @click="submitForm('ruleForm')" size="mini"
-          >确 定</el-button
+        :disabled="releaseTF"
+          >{{ releaseTF ? "发布中..." : "确 定" }}</el-button
         >
       </span>
     </el-dialog>
@@ -791,6 +793,7 @@ export default {
       address: "", //地图上标签地址
       center: [114.05, 22.55],
       content: "",
+      releaseTF:false
     };
   },
   created() {
@@ -965,7 +968,7 @@ export default {
       }
       newForm.st = newForm.st.replace(":00", "");
       this.$delete(newForm, "admin");
-
+      this.releaseTF = true
       this.$axios({
         method: "POST",
         url: "/api/api_gateway?method=monitor_manage.cbd_manage.cbd_device_control",
@@ -977,8 +980,9 @@ export default {
         if (res.data.message == "") {
           this.$message.success("设备控制修改成功");
         } else {
-          his.$message.error("设备控制修改失败");
+          this.$message.error("设备控制修改失败");
         }
+        this.releaseTF = false
         this.equipControlDialogVisible = false;
       });
     },
@@ -1318,6 +1322,7 @@ export default {
       console.log(this.ruleForm)
       this.$refs[formName].validate((valid) => {
         if (valid) {
+          this.releaseTF = true
           this.$axios({
             method: "POST",
             url: "/api/api_gateway?method=monitor_manage.cbd_manage.add_device_info",
@@ -1353,6 +1358,7 @@ export default {
                 type: "warning",
               });
             }
+            this.releaseTF = false
           });
         } else {
           this.$message({
@@ -1375,6 +1381,9 @@ export default {
       this.$axios({
         method: "POST",
         url: "/api/api_gateway?method=sysmenage.usermanager.org_list",
+        data:this.qs.stringify({
+          page_item: "100000000",
+        })
       }).then((res) => {
         console.log(res.data.data);
         this.versionsoptions = res.data.data.page_list; //组织

+ 1 - 0
minggao/src/page/forecasting/cbd/DataDetails.vue

@@ -1182,6 +1182,7 @@ export default {
           end = "";
         }
         var username = localStorage.getItem("cUsername")
+        console.log(1111)
         window.location.href =
           this.$deriveData +
           // "http://192.168.1.77:8002"+

+ 3 - 8
minggao/src/page/forecasting/cbd/MessageWarn.vue

@@ -1,10 +1,5 @@
 <template>
 	<div style="cursor: default">
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			<el-breadcrumb-item>测报系统</el-breadcrumb-item>
-			<el-breadcrumb-item :to="{ path: '/index/cbd' }">虫情测报</el-breadcrumb-item>
-			<el-breadcrumb-item>短信通知</el-breadcrumb-item>
-		</el-breadcrumb>
 		<el-button type="success" size="small" @click="goBackPage()"
 			><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
 		>
@@ -186,7 +181,7 @@
 </template>
 
 <script>
-import dict from '../../../static/js/cbd_pest_library.js'
+import dict from '../../../../static/js/cbd_pest_library.js'
 export default {
 	data() {
 		return {
@@ -433,7 +428,7 @@ export default {
 			that
 				.$axios({
 					method: 'post',
-					url: '/api/api_gateway?method=forecast.forecast_system.cbd_msg_conf',
+					url: '/api/api_gateway?method=monitor_manage.cbd_manage.cbd_msg_conf',
 					data: postData
 				})
 				.then((res) => {
@@ -624,7 +619,7 @@ export default {
 		.noteWarnBj {
 			width: 500px;
 			height: 775px;
-			background: url('../../../static/images/cure/cbd/noteWarnBj.png') no-repeat center;
+			background: url('../../../../static/images/cure/cbd/noteWarnBj.png') no-repeat center;
 			background-size: contain;
 			overflow: hidden;
 			.noteWarnTxt {

+ 1 - 1
minggao/src/page/forecasting/cbd/cbdDataPhotos.vue

@@ -1602,7 +1602,7 @@ export default {
     equipBtnControl(type) {
       this.$axios({
         method: "POST",
-        url: "/api/api_gateway?method=forecast.send_control.admin_device_control",
+        url: "/api/api_gateway?method=monitor_manage.cbd_manage.admin_device_control",
         data: this.qs.stringify({
           cmd: type,
           device_type_id: 3,

+ 99 - 3
minggao/src/page/forecasting/maintain/maintain.vue

@@ -14,7 +14,7 @@
         @click="(addtraptf = true), (addtitle = '新增监测点')"
         >添加监测点</el-button
       >
-      <el-button type="info" size="mini" @click="addtraptf = true"
+      <el-button type="info" size="mini" @click="downloadtf = true"
         >导入监测点</el-button
       >
     </div>
@@ -76,7 +76,7 @@
           label-width="100px"
           class="demo-ruleForm"
         >
-          <el-form-item label="诱捕器名称" prop="point_name">
+          <el-form-item label="监测点名称" prop="point_name">
             <el-input v-model="ruleForm.point_name"></el-input>
           </el-form-item>
           <div class="addtrapbox">
@@ -106,7 +106,8 @@
       <span slot="footer" class="dialog-footer">
         <el-button @click="resetForm('ruleForm')" size="mini">取 消</el-button>
         <el-button type="primary" @click="submitForm('ruleForm')" size="mini"
-          >确 定</el-button
+        :disabled="releaseTF"
+          >{{ releaseTF ? "发布中..." : "确 定" }}</el-button
         >
       </span>
     </el-dialog>
@@ -153,6 +154,39 @@
         >
       </span>
     </el-dialog>
+    <el-dialog title="导入监测点" :visible.sync="downloadtf" width="25%">
+      <div class="downloadbox">
+        <div class="downloadbox_item">
+          <p class="title">导入监测点</p>
+          <!-- <el-input placeholder="请输入内容" v-model="input1">
+          <template slot="prepend">Http://</template>
+        </el-input> -->
+          <el-upload
+            action=""
+            :auto-upload="false"
+            accept=".xlsx, .xls"
+            :show-file-list="false"
+            :on-change="handle"
+          >
+            <el-button type="success" size="mini">点击上传</el-button>
+          </el-upload>
+          <el-input
+            v-model="downloadinput"
+            placeholder="请输入内容"
+            :disabled="true"
+            size="mini"
+          ></el-input>
+        </div>
+        <p class="tishi">
+          <span>注:请先下模板,在模板中填入数据上传</span
+          ><span @click="download">下载模板</span>
+        </p>
+      </div>
+      <!-- <span slot="footer" class="dialog-footer">
+        <el-button @click="downloadtf = false">取 消</el-button>
+        <el-button type="primary" @click="downloadtf = false">确 定</el-button>
+      </span> -->
+    </el-dialog>
   </div>
 </template>
 
@@ -211,6 +245,9 @@ export default {
       addr: "", //搜索栏地址
       address: "", //地图上标签地址
       center: [114.05, 22.55],
+      releaseTF:false,
+      downloadinput:"",
+      downloadtf:false
     };
   },
   //监听属性 类似于data概念
@@ -253,6 +290,7 @@ export default {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           if (this.addtitle == "新增监测点") {
+            this.releaseTF = true
             this.$axios({
               method: "POST",
               url: "/api/api_gateway?method=monitor_manage.maintain.checkpoint_add",
@@ -279,8 +317,10 @@ export default {
                   type: "warning",
                 });
               }
+              this.releaseTF = false
             });
           } else if (this.addtitle == "修改监测点") {
+            this.releaseTF = true
             this.$axios({
               method: "POST",
               url: "/api/api_gateway?method=monitor_manage.maintain.checkpoint_modify",
@@ -308,6 +348,7 @@ export default {
                   type: "warning",
                 });
               }
+              this.releaseTF = false
             });
           }
         } else {
@@ -553,6 +594,38 @@ export default {
         return digital.toFixed(6);
       }
     },
+    handle(ev) {
+      this.downloadinput = ev.name;
+      var datas = new FormData();
+      datas.append("username", localStorage.getItem("usernme"));
+      datas.append("file", ev.raw);
+      this.$axios({
+        method: "POST",
+        url: "/api/monitor_point_export",
+        data: datas,
+        responseType: "blob",
+      }).then((res) => {
+        console.log(res);
+        this.downloadFile(res, "allot_result.xls");
+      });
+    },
+    download() {
+      //下载模板
+      console.log(22222)
+      window.location.href =
+        // this.$deriveData +
+        "http://192.168.1.17:12345/api/monitor_point_export";
+    },
+    downloadFile(res, name) {
+      let link = document.createElement("a");
+      link.href = window.URL.createObjectURL(new Blob([res.data]));
+      link.target = "_blank";
+      //文件名和格式
+      link.download = name;
+      document.body.appendChild(link);
+      link.click();
+      document.body.removeChild(link);
+    },
   },
   beforeCreate() {}, //生命周期 - 创建之前
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -588,4 +661,27 @@ export default {
   background-color: #409eff;
   border-color: #409eff;
 }
+.downloadbox {
+  .downloadbox_item {
+    display: flex;
+    .title {
+      width: 100px;
+      line-height: 28px;
+    }
+    .el-input {
+      width: 250px;
+      margin-left: 15px;
+    }
+  }
+  .tishi {
+    padding-left: 100px;
+    margin-top: 15px;
+    display: flex;
+    justify-content: space-between;
+    color: #409eff;
+    span:last-child {
+      cursor: pointer;
+    }
+  }
+}
 </style>

+ 7 - 1
minggao/src/page/forecasting/trap/bait.vue

@@ -87,7 +87,8 @@
       <span slot="footer" class="dialog-footer">
         <el-button @click="resetForm('ruleForm')" size="mini">取 消</el-button>
         <el-button type="primary" @click="submitForm('ruleForm')" size="mini"
-          >确 定</el-button
+        :disabled="releaseTF"
+          >{{ releaseTF ? "发布中..." : "确 定" }}</el-button
         >
       </span>
     </el-dialog>
@@ -139,6 +140,7 @@ export default {
         ],
       },
       addtitle: "新增诱剂",
+      releaseTF:false
     };
   },
   //监听属性 类似于data概念
@@ -230,6 +232,7 @@ export default {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           if (this.addtitle == "修改诱剂") {
+            this.releaseTF = true
             this.$axios({
               method: "POST",
               url: "/api/api_gateway?method=monitor_manage.maintain.inducer_modify",
@@ -257,8 +260,10 @@ export default {
                   type: "warning",
                 });
               }
+              this.releaseTF = false
             });
           } else if (this.addtitle == "新增诱剂") {
+            this.releaseTF = true
             this.$axios({
               method: "POST",
               url: "/api/api_gateway?method=monitor_manage.maintain.inducer_add",
@@ -285,6 +290,7 @@ export default {
                   type: "warning",
                 });
               }
+              this.releaseTF = false
             });
           }
         } else {

+ 14 - 3
minggao/src/page/forecasting/trap/trap.vue

@@ -257,11 +257,12 @@
       <span slot="footer" class="dialog-footer">
         <el-button @click="resetForm('ruleForm')" size="mini">取 消</el-button>
         <el-button type="primary" @click="submitForm('ruleForm')" size="mini"
-          >确 定</el-button
+        :disabled="releaseTF"
+          >{{ releaseTF ? "发布中..." : "确 定" }}</el-button
         >
       </span>
     </el-dialog>
-    <el-dialog title="提示" :visible.sync="downloadtf" width="25%">
+    <el-dialog title="导入诱捕器" :visible.sync="downloadtf" width="25%">
       <div class="downloadbox">
         <div class="downloadbox_item">
           <p class="title">导入诱捕器</p>
@@ -465,6 +466,7 @@ export default {
       address: "", //地图上标签地址
       center: [114.05, 22.55],
       content: "", //设备列表组织列表
+      releaseTF:false
     };
   },
   //监听属性 类似于data概念
@@ -512,6 +514,9 @@ export default {
       this.$axios({
         method: "POST",
         url: "/api/api_gateway?method=sysmenage.usermanager.org_list",
+        data:this.qs.stringify({
+          page_item: "100000000",
+        })
       }).then((res) => {
         console.log(res.data.data);
         this.versionsoptions = res.data.data.page_list; //组织
@@ -523,6 +528,9 @@ export default {
       this.$axios({
         method: "POST",
         url: "/api/api_gateway?method=monitor_manage.trap_manage.trap_org",
+        data:this.qs.stringify({
+          page_item:"10000000"
+        })
       }).then((res) => {
         console.log(res.data.data);
         this.versionsoptions2 = res.data.data.org_data; //组织
@@ -563,6 +571,7 @@ export default {
         org_id = org_id.join("/");
       }
       console.log(org_id);
+      this.releaseTF = true
       this.$refs[formName].validate((valid) => {
         if (valid) {
           this.$axios({
@@ -603,6 +612,7 @@ export default {
                 type: "warning",
               });
             }
+            this.releaseTF = false
           });
         } else {
           if (document.getElementsByClassName("el-message").length == 0) {
@@ -720,9 +730,10 @@ export default {
     },
     download() {
       //下载模板
+      console.log(22222)
       window.location.href =
         // this.$deriveData +
-        "http://192.168.1.77:12345/api/trap_export";
+        "http://192.168.1.17:12345/api/trap_export";
     },
     downloadFile(res, name) {
       let link = document.createElement("a");

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

@@ -460,6 +460,9 @@ export default {
       this.$axios({
         method: "POST",
         url: "/api/api_gateway?method=monitor_manage.trap_manage.trap_org",
+        data:this.qs.stringify({
+          page_item:"1000000"
+        })
       }).then((res) => {
         console.log(res.data.data);
         this.versionsoptions2 = res.data.data.org_data;

+ 3 - 0
minggao/src/page/monitor/Monitor.vue

@@ -1964,6 +1964,9 @@ export default {
       this.$axios({
         method: "POST",
         url: "/api/api_gateway?method=sysmenage.usermanager.org_list",
+        data:this.qs.stringify({
+          page_item: "100000000",
+        })
       }).then((res) => {
         console.log(res.data.data);
         this.versionsoptions = res.data.data.page_list; //组织

+ 1 - 0
minggao/src/page/monitoring/supervisiontask.vue

@@ -125,6 +125,7 @@ export default {
         legend: {
           show: true,
           top: "8%",
+          selectedMode:false,//取消图例上的点击事件
         },
         grid: {
           left: "3%",

+ 6 - 0
minggao/src/router/index.js

@@ -41,6 +41,8 @@ import DataPhotos from '@/page/forecasting/cbd/cbdDataPhotos' //图片详情
 import PestsStats from '@/page/forecasting/cbd/pestsStats' //害虫统计
 import tongji from '@/page/forecasting/cbd/tongji' //害虫分析
 import deviceTongji from '@/page/forecasting/cbd/deviceTongji' //害虫排行
+import MessageWarn from '@/page/forecasting/cbd/MessageWarn' //短信预警
+
 // ********************监控**************************
 import surveillancevideo from '@/page/monitor/Monitor'
 import photoView from '@/page/monitor/PhotoView'
@@ -242,6 +244,10 @@ export default new Router({
           component: deviceTongji
         },
         {
+          path: 'MessageWarn/:id',
+          component: MessageWarn
+        },
+        {
           path: 'surveillancevideo',
           component: surveillancevideo
         },

BIN
minggao/static/images/cure/cbd/noteWarnBj.png


BIN
minggao/static/images/cure/scd/stateIcon/1.png


BIN
minggao/static/images/cure/scd/stateIcon/10.png


BIN
minggao/static/images/cure/scd/stateIcon/11.png


BIN
minggao/static/images/cure/scd/stateIcon/12.png


BIN
minggao/static/images/cure/scd/stateIcon/2.png


BIN
minggao/static/images/cure/scd/stateIcon/3.png


BIN
minggao/static/images/cure/scd/stateIcon/4.png


BIN
minggao/static/images/cure/scd/stateIcon/5.png


BIN
minggao/static/images/cure/scd/stateIcon/6.png


BIN
minggao/static/images/cure/scd/stateIcon/7.png


BIN
minggao/static/images/cure/scd/stateIcon/8.png


BIN
minggao/static/images/cure/scd/stateIcon/9.png