Bläddra i källkod

资料库最新通告

xiaohaizhao 1 år sedan
förälder
incheckning
5df239dd9b
1 ändrade filer med 117 tillägg och 58 borttagningar
  1. 117 58
      pages/index/cloud/dataBank.vue

+ 117 - 58
pages/index/cloud/dataBank.vue

@@ -1,30 +1,41 @@
 <template>
     <My_listbox ref="List" @getlist="getList" :isShowEmpty="false" :bottomHeight="70">
         <slideshow ref="slideshow" />
-
         <view class="box">
             <view class="head" />
-            <navigator class="nav-box" v-for="item in  appList " :key="item.name" :url="item.path"
-                hover-class="navigator-hover">
-                <view class="classname u-line-1">
-                    {{ item.classname || '' }}
-                </view>
-                <view class="remark u-line-3">
-                    {{ item.remarks || '' }}
-                </view>
-                <view class="line" :style="{ background: item.color }" />
-            </navigator>
-            <navigator class="nav-box" v-for="item  in  list"
-                :url="'/packageA/resourceLibrary/index?id=' + item.sat_sharematerial_classid + '&name=' + item.classname"
-                :key="item.sat_sharematerial_classid" hover-class="navigator-hover">
-                <view class="classname u-line-1">
-                    {{ item.classname || '' }}
-                </view>
-                <view class="remark u-line-3">
-                    {{ item.remarks || '' }}
-                </view>
-                <view class="line" :style="{ background: item.color }" />
-            </navigator>
+            <view v-if="affiches.length" class="affiche">
+                <view class="iconfont icon-tonggao" />
+                <swiper class="swiper" autoplay circular vertical>
+                    <swiper-item class="swiper-item" v-for="item in affiches" :key="item.sat_noticeid">
+                        <navigator class="title u-line-1" :url="'/packageA/affiche/detail?id=' + item.sat_noticeid">
+                            {{ item.title }}
+                        </navigator>
+                    </swiper-item>
+                </swiper>
+            </view>
+            <view class="list">
+                <navigator class="nav-box" v-for="item in  appList " :key="item.name" :url="item.path"
+                    hover-class="navigator-hover">
+                    <view class="classname u-line-1">
+                        {{ item.classname || '' }}
+                    </view>
+                    <view class="remark u-line-3">
+                        {{ item.remarks || '' }}
+                    </view>
+                    <view class="line" :style="{ background: item.color }" />
+                </navigator>
+                <navigator class="nav-box" v-for="item  in  list"
+                    :url="'/packageA/resourceLibrary/index?id=' + item.sat_sharematerial_classid + '&name=' + item.classname"
+                    :key="item.sat_sharematerial_classid" hover-class="navigator-hover">
+                    <view class="classname u-line-1">
+                        {{ item.classname || '' }}
+                    </view>
+                    <view class="remark u-line-3">
+                        {{ item.remarks || '' }}
+                    </view>
+                    <view class="line" :style="{ background: item.color }" />
+                </navigator>
+            </view>
         </view>
     </My_listbox>
 </template>
@@ -43,6 +54,7 @@ export default {
                 }
             },
             colors: ['#F9E3FF', "#FFE6E8", "#DDF3FD"],
+            affiches: [],
         }
     },
     methods: {
@@ -52,10 +64,10 @@ export default {
                     v.classname = v.remark;
                     switch (v.name) {
                         case "affiche":
-                            v.remarks = '新品上市 / 停产 / 变更类 / 事件类'
+                            v.remarks = '新品上市 / 停产 / 变更类 / 事件类';
                             break;
                         case "dailyYttendance":
-                            v.remarks = '效果图 / 实景图 / 产品图\n励志海报等'
+                            v.remarks = '效果图 / 实景图 / 产品图\n励志海报等';
                             break;
                     }
                     return v
@@ -69,6 +81,7 @@ export default {
             })
         },
         getList(init = false) {
+            if (init && this.appList.some(v => v.name == 'affiche')) this.getNewAffiche();
             return new Promise((resolve, reject) => {
                 if (this.paging(this.content, init)) return resolve();
                 this.$Http.basic({
@@ -84,7 +97,20 @@ export default {
                 })
             })
         },
-
+        getNewAffiche() {
+            this.$Http.basic({
+                "id": "20221111090904",
+                "content": {
+                    "where": { "condition": "", "sat_notice_classid": "", "isread": "" },
+                    "pageNumber": 1,
+                    "pageSize": 3
+                }
+            }).then(res => {
+                console.log('获取最新通告', res)
+                if (this.cutoff(res.msg)) return;
+                this.affiches = res.data;
+            })
+        }
     },
 }
 </script>
@@ -94,9 +120,6 @@ export default {
     position: relative;
     padding: 0 10px;
     box-sizing: border-box;
-    display: flex;
-    justify-content: space-between;
-    flex-wrap: wrap;
 
     .head {
         position: absolute;
@@ -109,42 +132,78 @@ export default {
         z-index: 1;
     }
 
-    .nav-box {
-        position: relative;
-        padding: 15px;
-        padding-right: 3px;
-        width: 172.5px;
-        height: 104px;
-        flex-shrink: 0;
+    .affiche {
         margin-bottom: 10px;
-        box-sizing: border-box;
-        background: #fff;
-        border-radius: 8px;
-        overflow: hidden;
+        display: flex;
+        height: 17px;
+        align-items: center;
 
-        .classname {
-            height: 24px;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-weight: bold;
-            font-size: 16px;
-            color: #333333;
+        .iconfont {
+            color: #C30D23;
+            font-size: 14px;
+            flex-shrink: 0;
         }
 
-        .remark {
-            margin-top: 10px;
-            line-height: 17px;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-size: 10px;
-            color: #999999;
-            white-space: pre-wrap;
+        .swiper {
+            flex: 1;
+            margin-left: 5px;
+            height: 17px;
+
+            .swiper-item {
+
+                .title {
+                    line-height: 17px;
+                    font-family: Source Han Sans SC, Source Han Sans SC;
+                    font-size: 12px;
+                    color: #333333;
+                }
+            }
         }
+    }
+
+    .list {
+        display: flex;
+        justify-content: space-between;
+        flex-wrap: wrap;
+
+        .nav-box {
+            position: relative;
+            padding: 15px;
+            padding-right: 3px;
+            width: 172.5px;
+            height: 104px;
+            flex-shrink: 0;
+            margin-bottom: 10px;
+            box-sizing: border-box;
+            background: #fff;
+            border-radius: 8px;
+            overflow: hidden;
 
-        .line {
-            position: absolute;
-            left: 0;
-            top: 0;
-            width: 4px;
-            height: 100%;
+
+            .classname {
+                height: 24px;
+                font-family: Source Han Sans SC, Source Han Sans SC;
+                font-weight: bold;
+                font-size: 16px;
+                color: #333333;
+            }
+
+            .remark {
+                margin-top: 10px;
+                line-height: 17px;
+                font-family: Source Han Sans SC, Source Han Sans SC;
+                font-size: 10px;
+                color: #999999;
+                white-space: pre-wrap;
+            }
+
+            .line {
+                position: absolute;
+                left: 0;
+                top: 0;
+                width: 4px;
+                height: 100%;
+            }
         }
     }
 }