123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <template>
- <My_listbox ref="List" @getlist="getList" :isShowEmpty="false" :bottomHeight="70">
- <slideshow ref="slideshow" empty />
- <view class="box">
- <view class="head" />
- <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>
- <script>
- export default {
- data() {
- return {
- updatePage: true,
- appList: [],
- list: [],
- "content": {
- "parentid": 0,
- "where": {
- "isenable": 1
- }
- },
- colors: ['#F9E3FF', "#FFE6E8", "#DDF3FD"],
- affiches: [],
- }
- },
- methods: {
- init(callBack) {
- try {
- this.appList = this.dye(this.getApps('资料库').map(v => {
- v.classname = v.remark;
- switch (v.name) {
- case "affiche":
- v.remarks = '新品上市 / 停产 / 变更类 / 事件类';
- break;
- case "dailyYttendance":
- v.remarks = '效果图 / 实景图 / 产品图\n励志海报等';
- break;
- }
- return v
- }), this.colors, 1)
- } catch (error) {
- console.log("未获取到授权")
- }
- Promise.all([this.getList(true), this.$refs.slideshow.getBanners(['databaseTop'])]).then(res => {
- callBack()
- this.updatePage = false;
- })
- },
- 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({
- "id": "20221102143202",
- content: this.content
- }).then(res => {
- console.log("获取装备资源库一级分类", res)
- this.$refs.List.RefreshToComplete()
- resolve()
- if (this.cutoff(res.msg)) return;
- this.list = this.dye(res.pageNumber == 1 ? res.data : this.list.concat(res.data), this.colors, 1);
- this.content = this.$refs.List.paging(this.content, res)
- })
- })
- },
- 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>
- <style lang="scss">
- .box {
- position: relative;
- padding: 0 10px;
- box-sizing: border-box;
- .head {
- position: absolute;
- height: 10px;
- width: 100vw;
- border-radius: 8px 8px 0 0;
- background: #F7F7F7;
- top: -10px;
- left: 0;
- z-index: 1;
- }
- .affiche {
- margin-bottom: 10px;
- display: flex;
- height: 17px;
- align-items: center;
- .iconfont {
- color: #C30D23;
- font-size: 14px;
- flex-shrink: 0;
- }
- .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;
- .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%;
- }
- }
- }
- }
- </style>
|