ソースを参照

feat:宁录更新

yf_elsa.cui 1 ヶ月 前
コミット
4b34e5e5ce

ファイルの差分が大きいため隠しています
+ 2 - 2
dist/index.html


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/static/css/app.50cca5df12e906a19c9a885dc4637505.css


BIN
dist/static/css/app.50cca5df12e906a19c9a885dc4637505.css.gz


ファイルの差分が大きいため隠しています
+ 0 - 8
dist/static/js/1.1e425832f291a289d44d.js


BIN
dist/static/js/1.1e425832f291a289d44d.js.gz


ファイルの差分が大きいため隠しています
+ 8 - 0
dist/static/js/1.abf21bb0f4b54ca1e329.js


BIN
dist/static/js/1.abf21bb0f4b54ca1e329.js.gz


BIN
dist/static/js/manifest.045bea5ebf2c6b6c8b46.js.gz


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/static/js/manifest.045bea5ebf2c6b6c8b46.js


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


+ 58 - 60
src/components/SearchBar/indexEnvi.vue

@@ -14,30 +14,26 @@
           @click="checkType(2)"
           >{{ txt1 }}</el-button
         >
-        <el-button
-          :type="btnState == '3' ? 'primary' : 'default'"
-          size="mini"
-          @click="checkType(3)"
+        <el-button :type="btnState == '3' ? 'primary' : 'default'" size="mini" @click="checkType(3)"
           >设备分布</el-button
         >
 
         <!-- 刷新 -->
-        <el-button @click="refreshData()" type="warning" size="mini"
-          >更新数据</el-button
+        <el-button @click="refreshData()" type="warning" size="mini">更新数据</el-button>
+        <el-button v-if="userJurisdiction" @click="issueConsole()" type="info" size="mini"
+          >调试控制台</el-button
         >
         <el-button
-          v-if="userJurisdiction"
-          @click="issueConsole()"
-          type="info"
+          class="pestAll"
+          type="primary"
+          v-if="$QueryPermission(242)"
           size="mini"
-          >调试控制台</el-button
-        >
-        <el-button class="pestAll" type="primary" v-if="$QueryPermission(242)" size="mini" @click="gowarning"
+          @click="gowarning"
           >气象预警</el-button
         >
-        <el-button class="pestAll" type="primary" v-if="loginId == 1" size="mini" @click="$router.push('/external-env-setting')"
+        <!-- <el-button class="pestAll" type="primary" v-if="loginId == 1" size="mini" @click="$router.push('/external-env-setting')"
           >气象站配置</el-button
-        >
+        > -->
       </slot>
     </div>
     <div class="search-box" v-if="judge !== '1' && screenShow !== 3">
@@ -96,94 +92,96 @@ export default {
   data() {
     return {
       user_tag: null, //1超级管理员,2经销商,3农林政府单位,4普通用户,5销售用户ss
-      loginId: localStorage.getItem("user_tag"),
-      sale_user_uid: "", //销售用户uid
+      loginId: localStorage.getItem('user_tag'),
+      sale_user_uid: '', //销售用户uid
       userListOptions: [], //销售用户列表
-      selectItem: "1", //1设备号,2用户名
-      searchVal: "",
-      f_id: "",
-      ename: "",
+      selectItem: '1', //1设备号,2用户名
+      searchVal: '',
+      f_id: '',
+      ename: '',
       is_online: null,
       btnState: this.displayType,
       judge: this.isShow,
-      txt: "图表",
-      txt1: "列表",
+      txt: '图表',
+      txt1: '列表',
       userJurisdiction: false, // 下发控制的权限判断
       screenShow: null,
-      qxwarn:false
-    };
+      qxwarn: false
+    }
   },
   props: {
     displayType: {
-      type: String,
+      type: String
     },
     isShow: {
-      author: String,
-    },
+      author: String
+    }
   },
   created() {
-    this.user_tag = localStorage.getItem("user_tag");
+    this.user_tag = localStorage.getItem('user_tag')
   },
   activated() {
-    this.getSaleUserList();
-    this.is_online = window.location.href.split('is_online=') ? window.location.href.split('is_online=')[1] : null;
+    this.getSaleUserList()
+    this.is_online = window.location.href.split('is_online=')
+      ? window.location.href.split('is_online=')[1]
+      : null
     // 当前从首页跳转
     if (this.$parent.$route.query.is_online) {
-      this.$emit("fun3", this.is_online);
+      this.$emit('fun3', this.is_online)
     }
   },
   methods: {
     //  销售用户列表
     getSaleUserList() {
       this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=user.login.get_sale_device_user_list",
+        method: 'POST',
+        url: '/api/api_gateway?method=user.login.get_sale_device_user_list'
       }).then((res) => {
         if (res.data.data.length !== 0) {
-          this.userListOptions = res.data.data;
+          this.userListOptions = res.data.data
         }
-      });
+      })
     },
     checkType(i) {
-      this.btnState = i;
-      this.screenShow = i;
+      this.btnState = i
+      this.screenShow = i
       //console.log(this.screenShow);
-      this.$emit("fun", this.btnState);
+      this.$emit('fun', this.btnState)
     },
     refreshData() {
-      this.$emit("refreshData", "");
+      this.$emit('refreshData', '')
     },
     // 搜索组合数据
     searchEquipList() {
       if (this.selectItem == 1) {
-        this.f_id = this.searchVal;
+        this.f_id = this.searchVal
       } else if (this.selectItem == 2) {
-        this.ename = this.searchVal;
+        this.ename = this.searchVal
       }
-      this.$emit("fun2", { f_id: this.f_id, ename: this.ename });
+      this.$emit('fun2', { f_id: this.f_id, ename: this.ename })
     },
     selClear() {
       if (this.searchVal) {
-        this.searchVal = "";
-        this.f_id = "";
-        this.ename = "";
-        this.$emit("fun2", { f_id: this.f_id, ename: this.ename });
+        this.searchVal = ''
+        this.f_id = ''
+        this.ename = ''
+        this.$emit('fun2', { f_id: this.f_id, ename: this.ename })
       }
     },
     isOnlineSelect() {
-      this.$emit("fun3", this.is_online);
+      this.$emit('fun3', this.is_online)
     },
 
     say() {
-      this.txt1 = "企鹏";
-      this.txt = "合宙";
+      this.txt1 = '企鹏'
+      this.txt = '合宙'
     },
     // 下发控制
     issueConsole() {
-      this.$emit("fun4", true);
+      this.$emit('fun4', true)
     },
     isSaleUserSelect() {
-      this.$emit("fun5", this.sale_user_uid);
+      this.$emit('fun5', this.sale_user_uid)
     },
     gowarning() {
       // this.
@@ -192,22 +190,22 @@ export default {
         query: {
           typeId: 5
         }
-      });
-    },
+      })
+    }
   },
   mounted() {
-    this.screenShow = Number(this.displayType);
+    this.screenShow = Number(this.displayType)
     // 判断当前账号是否为管理员
-    if (localStorage.getItem("cUsername") == "管理员") {
-      this.userJurisdiction = true;
+    if (localStorage.getItem('cUsername') == '管理员') {
+      this.userJurisdiction = true
     } else {
-      this.userJurisdiction = false;
+      this.userJurisdiction = false
     }
-  },
-};
+  }
+}
 </script>
 
-<style lang='less' scoped>
+<style lang="less" scoped>
 .check-btns {
   display: flex;
   justify-content: space-between;

+ 27 - 21
src/pages/hjjc/qxzwarning/qxzearlywarning.vue

@@ -8,11 +8,11 @@
     <div class="warningbox">
       <div class="warningbox_type">
         <p :class="warningtitletype == 1 ? 'selp' : ''" @click="topage(1)">预警记录</p>
-        <p :class="warningtitletype == 2 ? 'selp' : ''" @click="topage(2)">预警发布</p>
+        <!-- <p :class="warningtitletype == 2 ? 'selp' : ''" @click="topage(2)">预警发布</p> -->
         <p :class="warningtitletype == 3 ? 'selp' : ''" @click="topage(3)">预警设置</p>
       </div>
       <div>
-        <router-view ></router-view>
+        <router-view></router-view>
       </div>
     </div>
   </div>
@@ -29,7 +29,7 @@ export default {
     return {
       warningtitletype: 1,
       type: 'qxz'
-    };
+    }
   },
   //监听属性 类似于data概念
   computed: {},
@@ -37,33 +37,39 @@ export default {
   watch: {
     $route(to, from) {
       //console.log(this.$route.path)
-    },
+    }
   },
   //方法集合
   methods: {
-    topage(index){
-      this.warningtitletype = index;
-      this.type = this.$route.query.typeId == 5 ? 'qxz' : 'sqz';
-      if(index==1){
-        this.$router.push(`/index/${this.type}earlywarning/${this.type}warninglist?typeId=${this.$route.query.typeId}`)
-      }else if(index==2){
-        this.$router.push(`/index/${this.type}earlywarning/${this.type}warningissue?typeId=${this.$route.query.typeId}`)
-      }else if(index==3){
-        this.$router.push(`/index/${this.type}earlywarning/${this.type}warningsetlist?typeId=${this.$route.query.typeId}`);
+    topage(index) {
+      this.warningtitletype = index
+      this.type = this.$route.query.typeId == 5 ? 'qxz' : 'sqz'
+      if (index == 1) {
+        this.$router.push(
+          `/index/${this.type}earlywarning/${this.type}warninglist?typeId=${this.$route.query.typeId}`
+        )
+      } else if (index == 2) {
+        this.$router.push(
+          `/index/${this.type}earlywarning/${this.type}warningissue?typeId=${this.$route.query.typeId}`
+        )
+      } else if (index == 3) {
+        this.$router.push(
+          `/index/${this.type}earlywarning/${this.type}warningsetlist?typeId=${this.$route.query.typeId}`
+        )
       }
     }
   },
   beforeCreate() {}, //生命周期 - 创建之前
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    var str = this.$route.path;
-    if(str.indexOf(`${this.type}warninglist`)!=-1){
+    var str = this.$route.path
+    if (str.indexOf(`${this.type}warninglist`) != -1) {
       this.warningtitletype = 1
-    }else if(str.indexOf(`${this.type}warningissue`)!=-1){
+    } else if (str.indexOf(`${this.type}warningissue`) != -1) {
       this.warningtitletype = 2
-    }else if(str.indexOf(`${this.type}warningset`)!=-1){
+    } else if (str.indexOf(`${this.type}warningset`) != -1) {
       this.warningtitletype = 3
-    }else if(str.indexOf(`${this.type}warningsetlist`)!=-1){
+    } else if (str.indexOf(`${this.type}warningsetlist`) != -1) {
       this.warningtitletype = 3
     }
   },
@@ -74,8 +80,8 @@ export default {
   updated() {}, //生命周期 - 更新之后
   beforeDestroy() {}, //生命周期 - 销毁之前
   destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-};
+  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
+}
 </script>
 <style lang="less" scoped>
 .warningbox {
@@ -103,4 +109,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 173 - 206
src/pages/hjjc/qxzwarning/qxzwarningset.vue

@@ -12,9 +12,7 @@
         ></el-input>
       </div>
       <div>
-        <el-button type="success" size="mini" @click="sure_submitdata"
-          >保存预警设置</el-button
-        >
+        <el-button type="success" size="mini" @click="sure_submitdata">保存预警设置</el-button>
         <el-button type="success" size="mini" @click="goback">返回</el-button>
       </div>
     </div>
@@ -36,17 +34,12 @@
           </el-option>
         </el-select>
       </div>
-      <div class="warningset_selbase_item">
+      <div class="warningset_selbase_item" v-if="false">
         <div class="warningset_setuser_top">
           <p class="selbase_title">短信接收人</p>
           <p class="compile" @click="dialogVisible = true">预警通讯录编辑</p>
         </div>
-        <el-select
-          v-model="qxzoption.send_user_id"
-          multiple
-          filterable
-          placeholder="请选择"
-        >
+        <el-select v-model="qxzoption.send_user_id" multiple filterable placeholder="请选择">
           <el-option
             v-for="item in userlist"
             :key="item.value"
@@ -71,11 +64,7 @@
         <el-table-column prop="name" label="通道名称"> </el-table-column>
         <el-table-column prop="type" label="运算符">
           <template slot-scope="scope">
-            <el-select
-              v-model="scope.row.type"
-              placeholder="请选择"
-              size="mini"
-            >
+            <el-select v-model="scope.row.type" placeholder="请选择" size="mini">
               <el-option label="小于" value="0">小于</el-option>
               <el-option label="大于" value="1">大于</el-option>
               <el-option label="介于" value="2">介于</el-option>
@@ -90,9 +79,7 @@
                 placeholder="请输入内容"
                 oninput="value=value.replace(/[^\d]+/g,'')"
                 size="mini"
-                @blur="
-                  yanzheng(scope.row.value, scope.row.value2, scope.$index)
-                "
+                @blur="yanzheng(scope.row.value, scope.row.value2, scope.$index)"
               ></el-input>
               <span v-if="scope.row.type == '2'">-</span>
               <el-input
@@ -101,9 +88,7 @@
                 placeholder="请输入内容"
                 oninput="value=value.replace(/[^\d]+/g,'')"
                 size="mini"
-                @blur="
-                  yanzheng(scope.row.value, scope.row.value2, scope.$index)
-                "
+                @blur="yanzheng(scope.row.value, scope.row.value2, scope.$index)"
               ></el-input>
             </div>
           </template>
@@ -118,32 +103,17 @@
     >
       <div class="userlistbox" v-loading="loading">
         <div class="userlistbox_caozuo">
-          <el-input
-            v-model="username"
-            placeholder="请输入姓名"
-            size="mini"
-          ></el-input>
-          <el-input
-            v-model="useriphone"
-            placeholder="请输入手机号"
-            size="mini"
-          ></el-input>
-          <el-button type="success" size="mini" @click="adduser"
-            >添加</el-button
-          >
+          <el-input v-model="username" placeholder="请输入姓名" size="mini"></el-input>
+          <el-input v-model="useriphone" placeholder="请输入手机号" size="mini"></el-input>
+          <el-button type="success" size="mini" @click="adduser">添加</el-button>
         </div>
         <div class="userlistbox_table">
           <el-table :data="tabledata" stripe height="300" style="width: 100%">
-            <el-table-column prop="liaisons" label="姓名" width="180">
-            </el-table-column>
-            <el-table-column prop="phone" label="手机号" width="180">
-            </el-table-column>
+            <el-table-column prop="liaisons" label="姓名" width="180"> </el-table-column>
+            <el-table-column prop="phone" label="手机号" width="180"> </el-table-column>
             <el-table-column prop="address" label="操作">
               <template slot-scope="scope">
-                <el-popconfirm
-                  title="确定删除该联系人吗?"
-                  @confirm="deluser(scope.row)"
-                >
+                <el-popconfirm title="确定删除该联系人吗?" @confirm="deluser(scope.row)">
                   <el-button type="danger" size="mini" slot="reference">删除</el-button>
                 </el-popconfirm>
               </template>
@@ -156,13 +126,13 @@
 </template>
 
 <script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-import { Debounce } from '../../../util/anitthro';
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+import { Debounce } from '../../../util/anitthro'
 export default {
-  //import引入的组件需要注入到对象中才能使用
+  // import引入的组件需要注入到对象中才能使用
   components: {},
   data() {
-    //这里存放数据
+    // 这里存放数据
     return {
       warnid: '',
       qxzoption: {
@@ -170,7 +140,7 @@ export default {
         device_id: '', //                   必传(str)                   设备号
         warning_id: [], //                   必传(str)                   预警设置id
         conf: [], //                         必传(str)                   预警设置
-        send_user_id: [], //
+        send_user_id: [] //
       },
       device_idslist: [],
       userlist: [],
@@ -183,15 +153,15 @@ export default {
       fanxianid: '',
       fanxianconf: {},
       device_type: ''
-    };
+    }
   },
-  //监听属性 类似于data概念
+  // 监听属性 类似于data概念
   computed: {},
-  //监控data中的数据变化
+  // 监控data中的数据变化
   watch: {},
-  //方法集合
+  // 方法集合
   methods: {
-    //获取设备列表
+    // 获取设备列表
     getbaselist() {
       this.$axios({
         method: 'POST',
@@ -201,176 +171,176 @@ export default {
           page_size: 999999999,
           device_type_id: this.device_type,
           device_type: this.device_type
-        }),
+        })
       }).then((res) => {
         if (res.data.message == '') {
-          var data = res.data.data.data;
+          var data = res.data.data.data
           //   this.device_idslist = [];
           for (var i = 0; i < data.length; i++) {
             var obj = {
               value: data[i].device_id,
-              label: data[i].device_id,
-            };
-            this.device_idslist.push(obj);
+              label: data[i].device_id
+            }
+            this.device_idslist.push(obj)
           }
         } else {
           this.$message({
             message: res.data.message,
             type: 'warning',
-            duration: 1500,
-          });
+            duration: 1500
+          })
         }
-      });
+      })
     },
-    //获取通讯录
+    // 获取通讯录
     getuserlistdata() {
-      this.loading = true;
+      this.loading = true
       this.$axios({
         method: 'POST',
         url: '/api/api_gateway?method=device.device_sms_alert.user_warning_liaisons_list',
         data: this.qs.stringify({
           page: '1',
-          page_size: 999999999,
-        }),
+          page_size: 999999999
+        })
       }).then((res) => {
-        this.loading = false;
+        this.loading = false
         if (res.data.message == '') {
-          var data = res.data.data.data;
+          var data = res.data.data.data
           // //console.log(data)
-          this.tabledata = res.data.data.data;
-          this.userlist = [];
+          this.tabledata = res.data.data.data
+          this.userlist = []
           for (var i = 0; i < data.length; i++) {
             var obj = {
               value: data[i].d_id,
-              label: data[i].liaisons + '/' + data[i].phone,
-            };
-            this.userlist.push(obj);
+              label: data[i].liaisons + '/' + data[i].phone
+            }
+            this.userlist.push(obj)
           }
         } else {
           this.$message({
             message: res.data.message,
             type: 'warning',
-            duration: 1500,
-          });
+            duration: 1500
+          })
         }
-      });
+      })
     },
-    //添加用户
+    // 添加用户
     adduser() {
       if (this.username == '') {
         this.$message({
           message: '请填写名称',
           type: 'warning',
-          duration: 1500,
-        });
+          duration: 1500
+        })
       } else if (this.useriphone == '') {
         this.$message({
           message: '请填写手机号',
           type: 'warning',
-          duration: 1500,
-        });
+          duration: 1500
+        })
       } else if (!/^1(1|2|3|4|5|6|7|8|9)\d{9}$/.test(this.useriphone)) {
         this.$message({
           message: '请填写正确手机号',
           type: 'warning',
-          duration: 1500,
-        });
+          duration: 1500
+        })
       } else {
         this.$axios({
           method: 'POST',
           url: '/api/api_gateway?method=device.device_sms_alert.create_user_warning_liaisons',
           data: this.qs.stringify({
             user_name: this.username,
-            phone: this.useriphone,
-          }),
+            phone: this.useriphone
+          })
         }).then((res) => {
           if (res.data.message == '') {
             this.$message({
               message: '添加成功',
               type: 'success',
-              duration: 1500,
-            });
-            this.getuserlistdata();
+              duration: 1500
+            })
+            this.getuserlistdata()
           } else {
             this.$message({
               message: res.data.message,
               type: 'warning',
-              duration: 1500,
-            });
+              duration: 1500
+            })
           }
-        });
+        })
       }
     },
-    //删除用户
+    // 删除用户
     deluser(data) {
       this.$axios({
         method: 'POST',
         url: '/api/api_gateway?method=device.device_sms_alert.del_user_warning_liaisons',
         data: this.qs.stringify({
-          d_id: data.d_id,
-        }),
+          d_id: data.d_id
+        })
       }).then((res) => {
         if (res.data.message == '') {
           this.$message({
             message: '删除成功',
             type: 'success',
-            duration: 1500,
-          });
-          this.getuserlistdata();
+            duration: 1500
+          })
+          this.getuserlistdata()
         } else {
           this.$message({
             message: res.data.message,
             type: 'warning',
-            duration: 1500,
-          });
+            duration: 1500
+          })
         }
-      });
+      })
     },
-    //获取气象站预警配置
+    // 获取气象站预警配置
     getqxzwarninfo() {
       this.$axios({
         method: 'POST',
         url: '/api/api_gateway?method=device.device_sms_alert.user_qxz_warning_statsu',
         data: this.qs.stringify({
-          warning_id: this.warnid,
-        }),
+          warning_id: this.warnid
+        })
       }).then((res) => {
         if (res.data.message == '') {
-          //console.log(res.data);
+          // console.log(res.data);
           // var obj = {
           //   value: res.data.data.device_ids,
           //   label: res.data.data.device_ids,
           // };
           // this.device_idslist.unshift(obj);
-          this.qxzoption.title = res.data.data.warning_name;
-          this.qxzoption.device_id = res.data.data.device_ids;
-          this.fanxianid = res.data.data.device_ids;
-          this.fanxianconf = {};
-          res.data.data.conf.forEach(item => {
+          this.qxzoption.title = res.data.data.warning_name
+          this.qxzoption.device_id = res.data.data.device_ids
+          this.fanxianid = res.data.data.device_ids
+          this.fanxianconf = {}
+          res.data.data.conf.forEach((item) => {
             for (let key in item) {
-              this.fanxianconf[key]=item[key]
+              this.fanxianconf[key] = item[key]
             }
-          });
-          for (var key in res.data.data.send_user) {
-            this.qxzoption.send_user_id.push(Number(key));
-          }
-          this.getqxzwarninfo2(res.data.data.device_ids);
+          })
+          // for (var key in res.data.data.send_user) {
+          //   this.qxzoption.send_user_id.push(Number(key));
+          // }
+          this.getqxzwarninfo2(res.data.data.device_ids)
         } else {
           this.$message({
             message: res.data.message,
             type: 'warning',
-            duration: 1500,
-          });
+            duration: 1500
+          })
         }
-      });
+      })
     },
     selbasechange: Debounce(function (e) {
       //   //console.log(e);
       //   //console.log(this.device_idslist[index]);
       let obj = this.device_idslist.find((item) => {
-        return item.value == e;
-      });
-      this.getqxzwarninfo2(obj.label);
+        return item.value == e
+      })
+      this.getqxzwarninfo2(obj.label)
     }, 1500),
     getqxzwarninfo2(device_id) {
       this.$axios({
@@ -379,97 +349,94 @@ export default {
         data: this.qs.stringify({
           device_id: device_id,
           device_type: this.device_type,
-          status: 'see',
-        }),
+          status: 'see'
+        })
       }).then((res) => {
-        this.daotabledata = [];
+        this.daotabledata = []
         if (res.data.message == '') {
           // //console.log(res.data.data.conf);
-          var data = res.data.data.conf;
-          var selarr = [];
+          var data = res.data.data.conf
+          var selarr = []
           for (var key in data) {
             var obj = {
               tongdao: key,
               name: data[key],
               value: '',
               value2: '',
-              type: '',
-            };
+              type: ''
+            }
             if (device_id == this.fanxianid) {
               for (let confkey in this.fanxianconf) {
                 // //console.log(confkey, key);
                 if (confkey == key) {
-                  var arr = this.fanxianconf[key].split('|')[0].split('#');
-                   if (arr[1].indexOf('&')) {
-                    arr[1] = arr[1].split('&');
-                    obj.value2 = arr[1][1];
-                    obj.value = arr[1][0];
+                  var arr = this.fanxianconf[key].split('|')[0].split('#')
+                  if (arr[1].indexOf('&')) {
+                    arr[1] = arr[1].split('&')
+                    obj.value2 = arr[1][1]
+                    obj.value = arr[1][0]
                   }
-                  obj.type = arr[0] + '';
-                  selarr.push(obj);
+                  obj.type = arr[0] + ''
+                  selarr.push(obj)
                 }
               }
             }
-            this.daotabledata.push(obj);
+            this.daotabledata.push(obj)
           }
           this.$nextTick(() => {
             for (var i = 0; i < selarr.length; i++) {
-              this.$refs.multipleTable.toggleRowSelection(selarr[i]);
+              this.$refs.multipleTable.toggleRowSelection(selarr[i])
             }
-          });
+          })
 
-          //console.log(this.daotabledata);
+          // console.log(this.daotabledata);
         } else {
           this.$message({
             message: res.data.message,
             type: 'warning',
-            duration: 1500,
-          });
+            duration: 1500
+          })
         }
-      });
+      })
     },
     handleSelectionChange(val) {
-      //console.log(val);
-      this.seldatblevalue = val;
+      // console.log(val);
+      this.seldatblevalue = val
     },
     yanzheng(a, b, index) {
       if (b <= a) {
-        this.daotabledata[index].value2 = '';
+        this.daotabledata[index].value2 = ''
       }
     },
     vit() {
       if (!this.qxzoption.device_id) {
-        return '请选择预警设备';
-      }
-      if (!this.qxzoption.send_user_id.length) {
-        return '请选择短信接收人';
+        return '请选择预警设备'
       }
+      // if (!this.qxzoption.send_user_id.length) {
+      //   return '请选择短信接收人';
+      // }
 
       for (var i = 0; i < this.seldatblevalue.length; i++) {
         // this.daotabledata
         if (!this.seldatblevalue[i].type) {
-          return '请将信息填写完整';
+          return '请将信息填写完整'
         } else if (!this.seldatblevalue[i].value) {
-          return '请将信息填写完整';
-        } else if (
-          this.seldatblevalue[i].type === '2' &&
-          !this.seldatblevalue[i].value2
-        ) {
-          return '请将信息填写完整';
+          return '请将信息填写完整'
+        } else if (this.seldatblevalue[i].type === '2' && !this.seldatblevalue[i].value2) {
+          return '请将信息填写完整'
         }
       }
-      return 'vit';
+      return 'vit'
     },
     yanzheng2() {
       for (var i = 0; i < this.seldatblevalue.length; i++) {
         if (this.seldatblevalue[i].type) {
-          return true;
+          return true
         }
       }
-      return false;
+      return false
     },
     goback() {
-      this.$router.go(-1);
+      this.$router.go(-1)
     },
     sure_submitdata() {
       if (this.vit() === 'vit' && this.yanzheng2()) {
@@ -484,36 +451,36 @@ export default {
         //   }
         //   conf[`${element.tongdao}`] = str;
         // }
-        let conf = [];
+        let conf = []
         for (let i = 0; i < this.seldatblevalue.length; i++) {
-          let obj = {};
-          const element = this.seldatblevalue[i];
-          let str = `${element.type}#${element.value}`;
+          let obj = {}
+          const element = this.seldatblevalue[i]
+          let str = `${element.type}#${element.value}`
           if (element.type === '2') {
-            str += `&${element.value2}|${element.name}`;
+            str += `&${element.value2}|${element.name}`
           } else {
             str += `|${element.name}`
           }
-          obj[`${element.tongdao}`] = str;
+          obj[`${element.tongdao}`] = str
           conf.push(obj)
         }
         if (this.warnid == '') {
           // //console.log('创建');
-          this.submitdata_found(conf);
+          this.submitdata_found(conf)
         } else {
           // //console.log('修改');
-          this.submitdata_amend(conf);
+          this.submitdata_amend(conf)
         }
       } else {
         this.$message({
           message: this.vit() === 'vit' ? '请开启至少一个通道预警' : this.vit(),
           type: 'warning',
-          duration: 1500,
-        });
+          duration: 1500
+        })
       }
     },
     submitdata_amend(conf) {
-      //console.log(this.seldatblevalue);
+      // console.log(this.seldatblevalue);
       this.$axios({
         method: 'POST',
         url: '/api/api_gateway?method=device.device_sms_alert.create_qxz_warning_config',
@@ -522,26 +489,26 @@ export default {
           device_id: this.qxzoption.device_id,
           warning_id: this.warnid,
           device_type: this.device_type,
-          conf: JSON.stringify(conf),
-          send_user_id: this.qxzoption.send_user_id.join(','),
-        }),
+          conf: JSON.stringify(conf)
+          // send_user_id: this.qxzoption.send_user_id.join(',')
+        })
       }).then((res) => {
-        //console.log(res);
+        // console.log(res);
         if (res.data.message == '') {
           this.$message({
             message: '设备预警配置成功',
             type: 'success',
-            duration: 1500,
-          });
-          this.goback();
+            duration: 1500
+          })
+          this.goback()
         } else {
           this.$message({
             message: res.data.message,
             type: 'warning',
-            duration: 1500,
-          });
+            duration: 1500
+          })
         }
-      });
+      })
     },
     submitdata_found(conf) {
       this.$axios({
@@ -552,52 +519,52 @@ export default {
           device_type_id: this.device_type,
           device_type: this.device_type,
           device_id: this.qxzoption.device_id,
-          conf: JSON.stringify(conf),
-          send_user_id: this.qxzoption.send_user_id.join(','),
-        }),
+          conf: JSON.stringify(conf)
+          // send_user_id: this.qxzoption.send_user_id.join(',')
+        })
       }).then((res) => {
         if (res.data.message == '') {
           this.$message({
             message: '添加成功',
             type: 'success',
-            duration: 1500,
-          });
-          this.goback();
+            duration: 1500
+          })
+          this.goback()
         } else {
           this.$message({
             message: res.data.message,
             type: 'warning',
-            duration: 1500,
-          });
+            duration: 1500
+          })
         }
-      });
-    },
+      })
+    }
   },
-  beforeCreate() {}, //生命周期 - 创建之前
-  //生命周期 - 创建完成(可以访问当前this实例)
+  beforeCreate() {}, // 生命周期 - 创建之前
+  // 生命周期 - 创建完成(可以访问当前this实例)
   created() {
     this.device_type = this.$route.query.typeId
-    this.device_idslist = [];
-    this.getbaselist();
-    this.getuserlistdata();
+    this.device_idslist = []
+    this.getbaselist()
+    this.getuserlistdata()
     if (this.$route.query.id) {
-      this.warnid = this.$route.query.id;
-      this.getqxzwarninfo();
+      this.warnid = this.$route.query.id
+      this.getqxzwarninfo()
     } else {
-      this.warnid = '';
+      this.warnid = ''
     }
   },
-  beforeMount() {}, //生命周期 - 挂载之前
-  //生命周期 - 挂载完成(可以访问DOM元素)
+  beforeMount() {}, // 生命周期 - 挂载之前
+  // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     // this.getqxzwarninfo();
   },
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-};
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
 </script>
 <style lang="less" scoped>
 .warningsetbox {
@@ -664,4 +631,4 @@ export default {
     margin-top: 20px;
   }
 }
-</style>
+</style>