浏览代码

修改天气bug

彭宇 2 年之前
父节点
当前提交
75c43c88dc
共有 4 个文件被更改,包括 28 次插入1537 次删除
  1. 17 0
      src/components/vBottomMenu.vue
  2. 0 18
      src/router/index.js
  3. 0 1507
      src/views/event.vue
  4. 11 12
      src/views/forest.vue

+ 17 - 0
src/components/vBottomMenu.vue

@@ -442,6 +442,23 @@ export default {
     })
   },
   methods: {
+    // 判断是否为图片
+    isAssetTypeAnImage(filePath) {
+      //获取最后一个.的位置
+      var index = filePath.lastIndexOf('.')
+      //获取后缀
+      var ext = filePath.substr(index + 1)
+      let aa = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1
+      return aa
+    },
+    // 获取文件名称
+    getFileName(name) {
+      if (name.lastIndexOf('/') > -1) {
+        return name.slice(name.lastIndexOf('/') + 1)
+      } else {
+        return ''
+      }
+    },
     setValue(event) {
       this.centerTaskTaskDepts = []
       //签收选择部门

+ 0 - 18
src/router/index.js

@@ -52,15 +52,6 @@ export const constantRoutes = [{
 		}
 	},
 	{
-		//事件中心
-		path: '/event',
-		name: 'event',
-		component: () => import('@/views/event'),
-		meta: {
-			title: '事件中心'
-		}
-	},
-	{
 		//监控中心
 		path: '/monitor',
 		name: 'monitor',
@@ -125,15 +116,6 @@ export const constantRoutesNew = [{
 		}
 	},
 	{
-		//事件中心
-		path: '/event',
-		name: 'event',
-		component: () => import('@/views/event'),
-		meta: {
-			title: '事件中心'
-		}
-	},
-	{
 		//监控中心
 		path: '/monitor',
 		name: 'monitor',

文件差异内容过多而无法显示
+ 0 - 1507
src/views/event.vue


+ 11 - 12
src/views/forest.vue

@@ -113,7 +113,7 @@
           <div class="forthis">
             <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)">
               <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
-              <div class="i-list-con small-bottom-margin h-13">
+              <div class="i-list-con small-bottom-margin h-18">
                 <el-row :gutter="20" v-if="todatWeather">
                   <el-col :span="9">
                     <div class="weather-img">
@@ -189,10 +189,7 @@
                         <li v-if="weatherinformationDirection==7">风向:北风</li>
                         <li v-if="weatherinformationDirection==8">风向:东北风</li>
                         <li>高温:{{ weatherinformationHigh }}℃</li>
-                      <li>火险:<!--  {{ weatherinformationLevel }}-->
-                        <template slot-scope="scope">
-                          <dict-tag :options="dict.type.forest_weatherinformation_level" :value="weatherinformationLevel"/>
-                        </template>
+                      <li>火险:{{ weatherinformationLevelValue }}
                       </li>
                         <li>湿度:{{ weatherinformationTemperature }}</li>
                       </ul>
@@ -207,11 +204,11 @@
                   </el-col>
                 </el-row>
                 <div class="firestate" v-if="todatWeather">
-                  <div class="state-block1"></div>
-                  <div class="state-block2"></div>
-                  <div class="state-block3 state-on"></div>
-                  <div class="state-block4"></div>
-                  <div class="state-block5"></div>
+                  <div :class="weatherinformationLevel=='forest_weatherinformation_level_5'? 'state-block1 state-on':'state-block1'"></div>
+                  <div :class="weatherinformationLevel=='forest_weatherinformation_level_4'? 'state-block2 state-on':'state-block2'"></div>
+                  <div :class="weatherinformationLevel=='forest_weatherinformation_level_3'? 'state-block3 state-on':'state-block3'"></div>
+                  <div :class="weatherinformationLevel=='forest_weatherinformation_level_2'? 'state-block4 state-on':'state-block4'"></div>
+                  <div :class="weatherinformationLevel=='forest_weatherinformation_level_1'? 'state-block5 state-on':'state-block5'"></div>
                 </div>
               </div>
             </dv-border-box-13>
@@ -250,7 +247,7 @@
                 <span>事件列表</span>
                 <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
               </div>
-              <div class="i-list-con small-bottom-margin h-39">
+              <div class="i-list-con small-bottom-margin h-34">
                 <div class="event-list-search">
                   <el-input
                     placeholder="请输入内容"
@@ -405,7 +402,6 @@ import DHWs from '@/dahua/lib/DHWs'
 
 let echarts = require('echarts')
 export default {
-  dicts: ['forest_weatherinformation_level'],
   components: {
     supermap,
     supermapNotProcessed,
@@ -442,6 +438,7 @@ export default {
     // this.initWebSocket()
     /** ----------------------------------weosocket结束------------------------------------- */
     this.selectTaskList()//获取任务
+    console.log(this.dict)
   },
   data() {
     return {
@@ -468,6 +465,7 @@ export default {
       weatherinformationDirection: '',
       weatherinformationHigh: '',
       weatherinformationLevel: '',
+      weatherinformationLevelValue: '',//火险登记中文
       weatherinformationLow: '',
       weatherinformationPower: '',
       weatherinformationTemperature: '',
@@ -859,6 +857,7 @@ export default {
             this.weatherinformationDirection = res.data.weatherinformationDirection
             this.weatherinformationHigh = res.data.weatherinformationHigh
             this.weatherinformationLevel = res.data.weatherinformationLevel
+            this.weatherinformationLevelValue = res.data.weatherinformationLevelValue
             this.weatherinformationLow = res.data.weatherinformationLow
             this.weatherinformationPower = res.data.weatherinformationPower
             this.weatherinformationTemperature = res.data.weatherinformationTemperature