Jelajahi Sumber

feat:宁录更新

yf_elsa.cui 1 bulan lalu
induk
melakukan
48ef62021d

File diff ditekan karena terlalu besar
+ 2 - 2
dist/index.html


File diff ditekan karena terlalu besar
+ 1 - 1
dist/static/css/app.7cc2708fb74fb0d635abe7dabdc73895.css


TEMPAT SAMPAH
dist/static/css/app.7cc2708fb74fb0d635abe7dabdc73895.css.gz


File diff ditekan karena terlalu besar
+ 8 - 0
dist/static/js/1.1e425832f291a289d44d.js


TEMPAT SAMPAH
dist/static/js/1.1e425832f291a289d44d.js.gz


File diff ditekan karena terlalu besar
+ 0 - 8
dist/static/js/1.7f0df2c369c3bf0928a9.js


TEMPAT SAMPAH
dist/static/js/1.7f0df2c369c3bf0928a9.js.gz


File diff ditekan karena terlalu besar
+ 1 - 1
dist/static/js/manifest.dc98d9a9faafe962f2ca.js


TEMPAT SAMPAH
dist/static/js/manifest.045bea5ebf2c6b6c8b46.js.gz


TEMPAT SAMPAH
dist/static/js/manifest.dc98d9a9faafe962f2ca.js.gz


+ 24 - 28
src/pages/forecasting/cbdwarning/earlywarning.vue

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

+ 38 - 100
src/pages/forecasting/cbdwarning/warningset.vue

@@ -34,9 +34,7 @@
         <div class="selbase_seltype">
           <div>
             <span style="font-size: 14px">预警计算:</span>
-            <el-radio v-model="warningsetoption.warning_type" label="0"
-              >逐台预警</el-radio
-            >
+            <el-radio v-model="warningsetoption.warning_type" label="0">逐台预警</el-radio>
             <el-radio
               v-model="warningsetoption.warning_type"
               :disabled="warningsetoption.device_ids.length <= 1"
@@ -52,17 +50,12 @@
           </div>
         </div>
       </div>
-      <div class="warningset_setuser">
+      <div class="warningset_setuser" 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="warningsetoption.send_user"
-          multiple
-          filterable
-          placeholder="请选择"
-        >
+        <el-select v-model="warningsetoption.send_user" multiple filterable placeholder="请选择">
           <el-option
             v-for="item in userlist"
             :key="item.value"
@@ -181,23 +174,11 @@
                   ></el-input
                 >
                 <p>
-                  <i
-                    class="el-icon-circle-plus-outline"
-                    @click="addelemeent"
-                  ></i>
+                  <i class="el-icon-circle-plus-outline" @click="addelemeent"></i>
                 </p>
               </div>
-              <div
-                class="three_left_item"
-                v-for="(item, index) in confcopy"
-                :key="index"
-              >
-                <el-select
-                  v-model="item.value"
-                  placeholder="请选择"
-                  size="mini"
-                  filterable
-                >
+              <div class="three_left_item" v-for="(item, index) in confcopy" :key="index">
+                <el-select v-model="item.value" placeholder="请选择" size="mini" filterable>
                   <el-option
                     v-for="num in 332"
                     :key="num"
@@ -213,11 +194,7 @@
                   ></el-input
                 >
                 <p>
-                  <i
-                    class="el-icon-delete"
-                    style="color: #ff4949"
-                    @click="delelemeent(index)"
-                  ></i>
+                  <i class="el-icon-delete" style="color: #ff4949" @click="delelemeent(index)"></i>
                 </p>
               </div>
             </div>
@@ -226,11 +203,7 @@
         </div>
       </div>
     </div>
-    <el-button
-      type="success"
-      style="margin-top: 20px"
-      size="mini"
-      @click="sure_sumbitwarn"
+    <el-button type="success" style="margin-top: 20px" size="mini" @click="sure_sumbitwarn"
       >保存预警设置</el-button
     >
     <el-dialog
@@ -241,32 +214,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)">
                   <p style="color: #ff4949" slot="reference">删除</p>
                 </el-popconfirm>
               </template>
@@ -329,12 +287,11 @@ export default {
     getwarnset() {
       this.$axios({
         method: 'POST',
-        url:
-          '/api/api_gateway?method=device.device_sms_alert.user_pest_warning_statsu',
+        url: '/api/api_gateway?method=device.device_sms_alert.user_pest_warning_statsu',
         data: this.qs.stringify({
           warning_id: this.warnid
         })
-      }).then(res => {
+      }).then((res) => {
         if (res.data.message == '') {
           // console.log(res.data.data);
           var data = res.data.data
@@ -342,16 +299,13 @@ export default {
           this.warningsetoption.title = data.warning_name
           this.warningsetoption.conf.pestCategoryNum = data.conf.pestCategoryNum
           this.warningsetoption.conf.appointPestNum = data.conf.appointPestNum
-          this.warningsetoption.conf.appointPestName = Number(
-            data.conf.appointPestName
-          )
+          this.warningsetoption.conf.appointPestName = Number(data.conf.appointPestName)
           this.warningsetoption.conf.pestTotalNum = data.conf.pestTotalNum
 
           this.warningsetoption.conf.pestTotal = data.conf.pestTotal == 'on'
           this.warningsetoption.conf.pestWarn = data.conf.pestWarn == 'on'
           this.warningsetoption.conf.appointPest = data.conf.appointPest == 'on'
-          this.warningsetoption.conf.pestCategory =
-            data.conf.pestCategory == 'on'
+          this.warningsetoption.conf.pestCategory = data.conf.pestCategory == 'on'
           var flag = 0
           for (var key in data.conf) {
             if (key.indexOf('ppointPestNum') != -1) {
@@ -371,9 +325,9 @@ export default {
           for (var key in data.device_ids) {
             this.warningsetoption.device_ids.push(Number(key))
           }
-          for (var key in data.send_user) {
-            this.warningsetoption.send_user.push(Number(key))
-          }
+          // for (var key in data.send_user) {
+          //   this.warningsetoption.send_user.push(Number(key))
+          // }
           this.warningsetoption.warning_type = data.warning_type.toString()
         } else {
           this.$message({
@@ -388,14 +342,13 @@ export default {
     getbaselist() {
       this.$axios({
         method: 'POST',
-        url:
-          '/api/api_gateway?method=device.device_sms_alert.user_warning_device_list',
+        url: '/api/api_gateway?method=device.device_sms_alert.user_warning_device_list',
         data: this.qs.stringify({
           page: '1',
           page_size: 999999999,
           device_type_id: '3'
         })
-      }).then(res => {
+      }).then((res) => {
         if (res.data.message == '') {
           var data = res.data.data.data
           this.device_idslist = []
@@ -529,20 +482,10 @@ export default {
           type: 'warning',
           duration: 1500
         })
-      } else if (this.warningsetoption.send_user.length == 0) {
-        this.$message({
-          message: '请选择短信接收人',
-          type: 'warning',
-          duration: 1500
-        })
       } else {
         for (var i = 0; i < this.confcopy.length; i++) {
-          this.warningsetoption.conf[
-            'appointPestNum' + (i + 1)
-          ] = this.confcopy[i].num
-          this.warningsetoption.conf[
-            'appointPestName' + (i + 1)
-          ] = this.confcopy[i].value
+          this.warningsetoption.conf['appointPestNum' + (i + 1)] = this.confcopy[i].num
+          this.warningsetoption.conf['appointPestName' + (i + 1)] = this.confcopy[i].value
         }
 
         var obj = JSON.parse(JSON.stringify(this.warningsetoption.conf))
@@ -568,17 +511,16 @@ export default {
       // return;
       this.$axios({
         method: 'POST',
-        url:
-          '/api/api_gateway?method=device.device_sms_alert.create_user_pest_warning',
+        url: '/api/api_gateway?method=device.device_sms_alert.create_user_pest_warning',
         data: this.qs.stringify({
           title: this.warningsetoption.title,
           device_ids: this.warningsetoption.device_ids.join(','),
           warning_type: this.warningsetoption.warning_type,
           conf: JSON.stringify(obj),
-          send_user: this.warningsetoption.send_user.join(','),
+          // send_user: this.warningsetoption.send_user.join(','),
           warning_id: this.warnid
         })
-      }).then(res => {
+      }).then((res) => {
         this.loading = false
         if (res.data.message == '') {
           // //console.log(res.data)\
@@ -600,17 +542,16 @@ export default {
     sumbitwarn_found(obj) {
       this.$axios({
         method: 'POST',
-        url:
-          '/api/api_gateway?method=device.device_sms_alert.create_user_warning_config',
+        url: '/api/api_gateway?method=device.device_sms_alert.create_user_warning_config',
         data: this.qs.stringify({
           title: this.warningsetoption.title,
           device_type_id: 3,
           device_ids: this.warningsetoption.device_ids.join(','),
           warning_type: this.warningsetoption.warning_type,
-          conf: JSON.stringify(obj),
-          send_user: this.warningsetoption.send_user.join(',')
+          conf: JSON.stringify(obj)
+          // send_user: this.warningsetoption.send_user.join(',')
         })
-      }).then(res => {
+      }).then((res) => {
         if (res.data.message == '') {
           this.$message({
             message: '添加成功',
@@ -632,13 +573,12 @@ export default {
       this.loading = true
       this.$axios({
         method: 'POST',
-        url:
-          '/api/api_gateway?method=device.device_sms_alert.user_warning_liaisons_list',
+        url: '/api/api_gateway?method=device.device_sms_alert.user_warning_liaisons_list',
         data: this.qs.stringify({
           page: '1',
           page_size: 999999999
         })
-      }).then(res => {
+      }).then((res) => {
         this.loading = false
         if (res.data.message == '') {
           var data = res.data.data.data
@@ -683,13 +623,12 @@ export default {
       } else {
         this.$axios({
           method: 'POST',
-          url:
-            '/api/api_gateway?method=device.device_sms_alert.create_user_warning_liaisons',
+          url: '/api/api_gateway?method=device.device_sms_alert.create_user_warning_liaisons',
           data: this.qs.stringify({
             user_name: this.username,
             phone: this.useriphone
           })
-        }).then(res => {
+        }).then((res) => {
           if (res.data.message == '') {
             this.$message({
               message: '添加成功',
@@ -711,12 +650,11 @@ export default {
     deluser(data) {
       this.$axios({
         method: 'POST',
-        url:
-          '/api/api_gateway?method=device.device_sms_alert.del_user_warning_liaisons',
+        url: '/api/api_gateway?method=device.device_sms_alert.del_user_warning_liaisons',
         data: this.qs.stringify({
           d_id: data.d_id
         })
-      }).then(res => {
+      }).then((res) => {
         if (res.data.message == '') {
           this.$message({
             message: '删除成功',