浏览代码

Merge branch 'V0.0.5' of http://10.87.21.221:8000/jzyd_yyds/soc_app into V0.0.5

coys 1 年之前
父节点
当前提交
cd530a08f5

+ 1 - 1
src/components/OrgPicker/index.vue

@@ -18,7 +18,7 @@
       <div class="lists">
         <tree
           v-bind="$attrs"
-          :data="orgTree"
+          :data="wholeTree"
           v-model='selected'
           :filter="searchValue"
           :options="options"

+ 63 - 23
src/components/weatherBox/index.vue

@@ -3,19 +3,34 @@
     <!--  天气消息  -->
     <div v-if="showNotice" class="notice-box">
       <div>
-        <van-notice-bar v-if="lists.length > 0" left-icon="volume-o" mode="closeable"  :background="background">
-          <van-swipe
-            @change="changeColor"
-            vertical
-            class="notice-swipe"
-            :autoplay="8000"
-            :show-indicators="false">
-            <van-swipe-item v-for="item in lists" :key="item.id" @click="clickHandler(item)" >
-              <span :style="{color:color,textShadow:'0 0 1px #666'}">
-                 {{item.alarmTitle}}
-              </span>
-            </van-swipe-item>
-          </van-swipe>
+        <van-notice-bar
+          ref="NoticeBar"
+          v-if="lists.length > 0"
+          mode="closeable"
+          :speed="50"
+          :text="itemInfo.alarmTitle"
+          :color="color"
+          background="#f5f5f5"
+          :scrollable="true"
+          @click="clickHandler(itemInfo)"
+          left-icon="bulb-o">
+<!--            <span v-if="itemInfo" :style="{color:color,textShadow:'0 0 1px #666'}">-->
+<!--             {{itemInfo.alarmTitle}}-->
+<!--            </span>-->
+<!--          <van-swipe-->
+<!--            @change="changeColor"-->
+<!--            vertical-->
+<!--            class="notice-swipe"-->
+<!--            :autoplay="5000"-->
+<!--            :show-indicators="false">-->
+<!--            <van-swipe-item v-for="item in lists" :key="item.id" @click="clickHandler(item)" >-->
+<!--              <p style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" :style="{color:color,textShadow:'0 0 1px #666'}">-->
+<!--                <span :style="{color:color,textShadow:'0 0 1px #666'}">-->
+<!--                 {{item.alarmTitle}}-->
+<!--                </span>-->
+<!--              </p>-->
+<!--            </van-swipe-item>-->
+<!--          </van-swipe>-->
         </van-notice-bar>
       </div>
     </div>
@@ -35,6 +50,7 @@
 <script >
 import { mapGetters } from 'vuex'
 import { getTheAreaWeather } from '@/api/public'
+import request from "@/utils/request";
 export default {
   props:{
     showNotice:{
@@ -49,7 +65,12 @@ export default {
       lists:[],
       active: this.defaultActive,
       color: '#ecf9ff',
-      background: null
+      background: null,
+      noticeIcon:require('@/assets/img/icon/error.png'),
+      itemInfo: null,
+      timer:8000,
+      timeOut:null,
+      index:0,
     }
   },
   mounted() {
@@ -120,14 +141,25 @@ export default {
           },
         ]
         this.lists = str;
-        if(this.lists.length > 0){
-          this.changeColor(0);
-        }
+        if(this.lists.length <= 0) return;
+        this.itemInfo = this.lists[this.index];
+        this.changeItem(this.lists[0]);
+        this.setAutoTime();
       })
     },
-    changeColor(index){
-      console.log(this.lists,'alarmLevel')
-      let alarmLevel = this.lists[index].alarmLevel;
+    //
+    setAutoTime(){
+      this.timeOut = setInterval(()=>{
+        if(this.index >= this.lists.length-1) this.index = -1;
+        this.index++;
+        console.log(this.index,'index')
+        this.itemInfo = this.lists[this.index];
+        this.changeItem(this.itemInfo)
+      },this.timer)
+    },
+    //
+    changeItem(info){
+      let alarmLevel = info.alarmLevel;
       switch (alarmLevel){
         case '蓝色':
           this.color= '#2E65FE';
@@ -153,20 +185,24 @@ export default {
           //this.background = 'rgba(215,43,35,0.8)';
         //this.color = '#fff';
       }
+      console.log(info,'info')
     },
     clickHandler(item) {
       this.info = item;
       this.info.color = this.color;
       this.show = true;
     },
-  }
+  },
+  beforeDestroy(){
+    clearInterval(this.timeOut);
+  },
 }
 </script>
 
 <style lang="scss">
 .van-notice-bar{
-  line-height:60px;
-  height: 60px;
+  line-height:90px;
+  height: 90px;
 }
 .notice-swipe {
   height: 30px;
@@ -175,7 +211,11 @@ export default {
 .van-swipe-item{
   -text-shadow: 0 0 2px #333;
 }
+.van-notice-bar__content{
+  text-shadow: 0 0 2px #333;
+}
 </style>
+
 <style scoped lang="scss">
 
 .dialog-title{

+ 2 - 1
src/views/home/isMy.vue

@@ -99,8 +99,9 @@ export default {
 .about-container {
   /* 你的命名空间 */
   .item-list {
-    height: calc(100vh - 400px);
+    height: calc(100vh - 778px);
     overflow: auto;
+    -border:1px solid red;
   }
   .item-title{
     display: flex;

+ 2 - 2
src/views/home/works.vue

@@ -400,7 +400,7 @@ export default {
 .cellMargin {
   margin: 20px;
   -margin-top: 0px;
-  height: calc(100vh - 376px);
+  height: calc(100vh - 412px);
   box-shadow: 0 1px 4px #ccc;
   background-color: #fff;
   overflow-y: scroll;
@@ -424,7 +424,7 @@ export default {
   overflow: auto;
 }
 .tab-tabs {
-  padding-top: 55px;
+  padding-top: 90px;
 }
 .big_boxTwo {
   height: calc(100vh - 570px);

+ 27 - 22
src/views/menu/operate/index.vue

@@ -1,29 +1,29 @@
 <template>
   <div class="index-container">
     <NavBar  :go="{ type: 'push', path: '/isMy' }"/>
-    <van-row>
-      <van-col span="5" class="side_list">
-        <van-sidebar v-model="activeKey" @change="onChange">
-          <van-sidebar-item :title="item.sourceName" v-for="item in sources" />
-        </van-sidebar>
-      </van-col>
-      <van-col span="19">
-        <div class="sidebar-content">
-          <div class="operator-card" v-for="item in list" :key="item" :title="item.fileName"  @click="showFile(item)">
-            <van-image
-              width="1rem"
-              height="1rem"
-              style="margin-left: 10px;float: left"
-              :src="getFileType(item.fileType)"
-            />
-            <span class="sid-content-title">{{item.fileName}}</span>
-          </div>
-
-        </div>
-      </van-col>
-    </van-row>
-
+    <div class="item-container">
+      <van-row>
+        <van-col span="5" class="side_list">
+          <van-sidebar v-model="activeKey" @change="onChange">
+            <van-sidebar-item :title="item.sourceName" v-for="item in sources" />
+          </van-sidebar>
+        </van-col>
+        <van-col span="19">
+          <div class="sidebar-content">
+            <div class="operator-card" v-for="item in list" :key="item" :title="item.fileName"  @click="showFile(item)">
+              <van-image
+                width="1rem"
+                height="1rem"
+                style="margin-left: 10px;float: left"
+                :src="getFileType(item.fileType)"
+              />
+              <span class="sid-content-title">{{item.fileName}}</span>
+            </div>
 
+          </div>
+        </van-col>
+      </van-row>
+    </div>
   </div>
 </template>
 
@@ -116,6 +116,11 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+.item-container{
+  height: calc(100vh - 94px);
+  overflow: auto;
+  -border:1px solid red;
+}
 .sid-content-title{
   font-size: 3.2vw;
   line-height: 12vw;

+ 1 - 1
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -69,7 +69,7 @@
         placeholder="请填写演练地点"
       />
       <!-- 演练文件 -->
-      <div class="mainItem mainItemData" v-if="studyList">
+      <div class="mainItem mainItemData" v-if="studyList&&studyList.length>0">
         <p class="label labelPeople">演练文件</p>
         <div>
           <div v-for="item in studyList" :key="item.name">