首页修改,通知公告列表增加分类筛选,网格员审核列表增加分页功能
7 files modified
269 ■■■■ changed files
api/article/article.js 19 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 39 ●●●● patch | view | raw | blame | history
pages/login/login-account.vue 2 ●●● patch | view | raw | blame | history
subPackage/article/detail.vue 74 ●●●●● patch | view | raw | blame | history
subPackage/article/list.vue 103 ●●●● patch | view | raw | blame | history
subPackage/label/hotel.vue 7 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/audit.vue 25 ●●●● patch | view | raw | blame | history
api/article/article.js
@@ -9,3 +9,22 @@
        }
    })
}
export const getDetail = (params) => {
    return http.request({
        url: '/blade-article/article/detail',
        method: 'GET',
        params: {
            ...params
        }
    })
}
export const getCategory = (params) => {
    return http.request({
        url: '/blade-system/dict-biz/child-list',
        method: 'GET',
        params: {
            ...params
        }
    })
}
pages/home/index.vue
@@ -2,7 +2,6 @@
    <view class="">
        <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder
            @leftClick="selectBoxShow = !selectBoxShow">
            <view slot="left" class="top flex">
                <view class="top-text f-30 fw">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
                </view>
@@ -19,7 +18,7 @@
                        <u-icon :name="i.icon" :size="45"></u-icon>
                        <text class="f-26 mt-20">{{i.text}}</text>
                    </u-grid-item>
                    <u-grid-item @click.native="navTo()" v-if="roleType == 2">
                    <u-grid-item @click.native="navTo()" v-if="curSelectSite.addressType != 2">
                        <u-icon name="/static/icon/nav-04.png" width="90rpx" height="90rpx"></u-icon>
                        <text class="f-26 mt-20">租客上报</text>
                    </u-grid-item>
@@ -86,15 +85,17 @@
                        <text class="f-32 fw">工作台</text>
                    </view>
                </view>
                <u-grid :border="false" col="4"  v-if="roleType == 2 && curSelectSite.addressType == 2">
                    <u-grid-item @click="navigatorPage('/subPackage/workbench/views/editExamine')"  :customStyle="{paddingTop:20+'rpx'}">
                        <view class="grid-item flex f-d-c a-i-c" style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
                <u-grid :border="false" col="4" v-if="roleType == 2 && curSelectSite.addressType == 2">
                    <u-grid-item @click="navigatorPage('/subPackage/workbench/views/editExamine')"
                        :customStyle="{paddingTop:20+'rpx'}">
                        <view class="grid-item flex f-d-c a-i-c"
                            style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
                            <u-icon name="/static/icon/menu-05.png" width="60rpx" height="60rpx"></u-icon>
                            <text class="grid-text f-24 fw mt-10">场所维护</text>
                        </view>
                    </u-grid-item>
                </u-grid>
                <u-grid :border="false" col="4"  v-if="roleType == 1">
                <u-grid :border="false" col="4" v-if="roleType == 1">
                    <u-grid-item @click="navigatorPage(item.path)" v-for="(item, index) in jobList" :index="index"
                        :key="index" :customStyle="{paddingTop:20+'rpx'}">
                        <view class="grid-item flex f-d-c a-i-c" :style="{background:item.style.background}">
@@ -136,7 +137,7 @@
                </u-cell-group>
            </view>
            <view class="notic" v-if="roleType == 2">
            <view class="notic" v-if="roleType == 2 && curSelectSite.addressType != 2">
                <view class="caption flex a-i-c j-c-s-b" @click="navigatorPage('/subPackage/article/list')">
                    <view class="flex a-i-c">
                        <view class="line"></view>
@@ -144,20 +145,20 @@
                    </view>
                    <u-icon name="arrow-right"></u-icon>
                </view>
                <view v-for="(item,index) in notice" :key="index">
                    <view class="notic-list" @click="navigatorPage('/subPackage/article/detail')">
                    <view class="notic-list" @click="navigatorPage(`/subPackage/article/detail?id=${item.id}`)">
                        <view class="f-28 mb-30">
                            {{item.title}}
                        </view>
                        <view class="flex a-i-c j-c-s-b">
                            <view class="f-28 flex a-i-c">
                                <view class="flex a-i-c mr-30">
                                <!-- <view class="flex a-i-c mr-30">
                                    <u-icon name="thumb-up-fill" size="24" color="#CECECE"></u-icon>
                                    <text class="f-24 c-99 ml-10">{{item.countNumber}}</text>
                                </view>
                                </view> -->
                                <view class="flex a-i-c">
                                    <u-icon name="eye-fill" size="24" color="#CECECE"></u-icon>
                                    <u-icon name="eye-fill" size="22" color="#CECECE"></u-icon>
                                    <text class="f-24 c-99 ml-10">{{item.viewNumber}}</text>
                                </view>
                            </view>
@@ -165,7 +166,7 @@
                        </view>
                    </view>
                </view>
            </view>
            <u-picker :title="roleTypeName" :closeOnClickOverlay="true" @close="selectBoxShow = false"
                :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns" @confirm="confirmSite"
@@ -188,9 +189,9 @@
        data() {
            return {
                swiperList: [
                    'https://cdn.uviewui.com/uview/swiper/swiper1.png',
                    'https://cdn.uviewui.com/uview/swiper/swiper2.png',
                    'https://cdn.uviewui.com/uview/swiper/swiper3.png',
                    'http://220.176.210.217:9000/jczz/upload/20231111/cc093afc5e21639ef5b251eb865c24f4.png',
                    'http://220.176.210.217:9000/jczz/upload/20231111/cc093afc5e21639ef5b251eb865c24f4.png',
                    'http://220.176.210.217:9000/jczz/upload/20231111/cc093afc5e21639ef5b251eb865c24f4.png'
                ],
                cellList: [{
                        icon: "/static/icon/nav-01.png",
@@ -265,7 +266,7 @@
                        style: {
                            background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
                        },
                        path:"/subPackage/workbench/views/cshw"
                        path: "/subPackage/workbench/views/cshw"
                    },
                    {
                        icon: "/static/icon/menu-06.png",
@@ -385,7 +386,7 @@
                }
                const res = await getPage(param)
                this.notice = res.data.records
                console.table(JSON.stringify(res.data.records))
                // console.table(JSON.stringify(res.data.records))
            },
@@ -761,4 +762,4 @@
            border-radius: 16rpx 16rpx 16rpx 16rpx;
        }
    }
</style>
</style>
pages/login/login-account.vue
@@ -153,7 +153,7 @@
                    passwordType: "password"
                },
                screenHeight: "",
                loginType:""  ,//登录类型 1账号密码   2 一键登录
                loginType:1  ,//登录类型 1账号密码   2 一键登录
                isAgreement:true
            }
        },
subPackage/article/detail.vue
@@ -1,53 +1,79 @@
<template>
    <view class="container">
        <view class="f-32">开展“争做合格父母、培养合格人才”家长学校活动开展“争做合格父母、培养合格人才”家</view>
        <view class="f-32">{{detailInfo.title}}</view>
        <view class="row flex j-c-s-b a-i-c c-99">
            <view class="flex">
                <view class="flex a-i-c mr-40">
                    <u-icon name="thumb-up-fill"  color="#CECECE"></u-icon>
                <!-- <view class="flex a-i-c mr-40">
                    <u-icon name="thumb-up-fill" color="#CECECE"></u-icon>
                    <text class="f-22 ml-10">120</text>
                </view>
                </view> -->
                <view class="flex a-i-c">
                    <u-icon name="eye-fill"  color="#CECECE"></u-icon>
                    <text class="f-22 ml-10">120</text>
                    <u-icon name="eye-fill" color="#CECECE"></u-icon>
                    <text class="f-22 ml-10">{{detailInfo.viewNumber}}</text>
                </view>
            </view>
            <text class="f-24">2023-08-21</text>
            <text class="f-24">{{detailInfo.createTime}}</text>
        </view>
        <view class="content f-28">
            为了弘扬良好家庭文化,提升家教水平、推进家风建设,有效提高广大家庭儿童家长的家庭教育水平,6月19日上午万达社区文明实践站开展了“争做合格父母、培养合格人才”家长学校活动。参加本次的家长们共计15人。
            <u-parse :content="detailInfo.content"></u-parse>
        </view>
        <view class="action flex flex_base">
            <!-- <view class="action-item flex_base bgc-main">
        <!-- <view class="action flex flex_base">
            <view class="action-item flex_base bgc-main">
                <u-icon name="thumb-up-fill"  size="22"  color="#fff"></u-icon>
            </view> -->
            </view>
            <view class="action-item flex_base bgc-gray">
                <u-icon name="thumb-up-fill" size="22"  color="#fff"></u-icon>
            </view>
        </view>
        </view> -->
    </view>
</template>
<script>
    import {
        getDetail
    } from '@/api/article/article.js'
    export default {
        data() {
            return {
                detailInfo: {},
            }
        },
        onLoad(option) {
            this.getDetailInfo(option.id)
        },
        methods: {
            getDetailInfo(id) {
                getDetail({
                    id
                }).then(res => {
                    this.detailInfo = res.data;
                })
            }
        }
    }
</script>
<style>
    .container{
        padding:0 30rpx;
    .container {
        padding: 0 30rpx;
    }
    .row{
        padding:30rpx 0;
    .row {
        padding: 30rpx 0;
    }
    .content{
        margin-bottom:90rpx;
    .content {
        margin-bottom: 90rpx;
    }
    .action-item{
        width:72rpx;
        height:72rpx;
    .action-item {
        width: 72rpx;
        height: 72rpx;
        border-radius: 50%;
    }
    .bgc-gray{
        background-color:#C4C4C4;
    .bgc-gray {
        background-color: #C4C4C4;
    }
</style>
subPackage/article/list.vue
@@ -1,19 +1,21 @@
<template>
    <view class="">
    <view v-for="(item,index) in notice" :key="index">
        <view class="notic-list"   @click="navigatorPage('/detail')">
        <view class="tab">
            <u-tabs :list="tabList"   :current="tabIndex" keyName="dictValue"   @change="changeTab"  :inactiveStyle="{color:'#999999'}"  :activeStyle="{color:'#017BFC'}"></u-tabs>
        </view>
    <view v-for="(item,index) in noticeList" :key="index"  class="list">
        <view class="notic-list bgc-ff"   @click="navTo(item.id)">
            <view class="f-28 mb-30">
                {{item.title}}
            </view>
            <view class="flex a-i-c j-c-s-b">
                <view class="f-28 flex a-i-c">
                    <view class="flex a-i-c mr-30">
                    <!-- <view class="flex a-i-c mr-30">
                        <u-icon name="thumb-up-fill" size="24" color="#CECECE"></u-icon>
                        <text class="f-24 c-99 ml-10">{{item.countNumber}}</text>
                    </view>
                    </view> -->
                    <view class="flex a-i-c">
                        <u-icon name="eye-fill" size="24" color="#CECECE"></u-icon>
                        <u-icon name="eye-fill" size="22" color="#CECECE"></u-icon>
                        <text class="f-24 c-99 ml-10">{{item.viewNumber}}</text>
                    </view>
                </view>
@@ -21,43 +23,114 @@
            </view>
        </view>
    </view>
    <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
    </view>
</template>
<script>
    import {
        getPage
        getPage,
        getCategory
    } from "@/api/article/article.js";
    export default {
        data(){
            return {
                notice: [],
                tabList:[],
                tabId:"",
                tabIndex:0,
                noticeList: [],
                currentPage:1,
                loadingStatus: 'nomore'
            }
        },
        onLoad() {
            this.getNoticeList()
            this.getCateList()
        },
        onReachBottom() {
            this.currentPage++
            this.getPageList()
        },
        methods:{
            changeTab(e){
                this.tabIndex = e.index;
                this.tabId = e.dictKey;
                this.noticeList = [];
                this.currentPage = 1;
                this.getNoticeList()
            },
            getCateList(){
                getCategory({
                    parentId:'1722966265111248897'
                }).then(res=>{
                    console.log(res)
                    this.tabList = res.data;
                    this.tabId = res.data[0].dictKey;
                    this.getNoticeList()
                })
            },
            async getNoticeList() {
                this.loadingStatus = 'loadingmore'
                const param = {
                    size: 10,
                    current: 1
                    current: this.currentPage,
                    articleType:this.tabId
                }
                const res = await getPage(param)
                this.notice = res.data.records
                const {
                    code,
                    data: {
                        records
                    }
                } = res
                if (code != 200) {
                    uni.showToast({
                        title: '数据请求失败',
                        icon: 'error'
                    })
                    return
                }
                this.noticeList = [...this.noticeList, ...records]
                this.loadingStatus = 'nomore'
            
            },
            navTo(){
                this.$u.func.globalNavigator('detail', "navTo")
            navTo(id){
                this.$u.func.globalNavigator(`detail?id=${id}`, "navTo")
            }
        }
    }
</script>
<style>
    page{
        background-color:#f5f5f5;
    }
    .tab{
        width:100%;
        height:88rpx;
        position:fixed;
        /*#ifdef H5*/
        top:88rpx;
        /*#endif*/
         /*#ifdef MP-WEIXIN*/
        top:0;
        /*#endif*/
        left:0;
        background-color:#fff;
        padding:0 30rpx;
        box-sizing: border-box;
        z-index: 999;
    }
    .list{
        margin-top:108rpx;
    }
    .notic-list {
        padding: 30rpx 0;
        padding: 30rpx;
        border-bottom: 1px solid #f5f5f5;
    }
</style>
subPackage/label/hotel.vue
@@ -5,8 +5,11 @@
            :labelStyle="{fontSize:'28rpx'}">
            <view class="content">
                <u-form-item label="社区名称" prop="districtName" borderBottom required>
                    <u-input v-model="info.districtName" disabled disabledColor="#fff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <view>
                        {{info.districtName}}
                    </view>
                    <!-- <u-input v-model="info.districtName" disabled disabledColor="#fff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input> -->
                </u-form-item>
                <u-form-item label="酒店名称" prop="hotelName" borderBottom required>
                    <u-input v-model="info.hotelName" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
subPackage/workbench/views/audit.vue
@@ -22,7 +22,7 @@
                </view>
            </view>
        </view>
         <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
    </view>
</template>
@@ -47,27 +47,44 @@
                ],
                tabIndex:0,
                currentStatus:1,
                list:[]
                list:[],
                loadingStatus: 'nomore',
                currentPage:1
            }
        },
        
        onLoad(){
            this.getList()
        },
        onReachBottom() {
            this.currentPage++
            this.getPageList()
        },
        
        methods:{
            changeTab(e){
                this.tabIndex = e.index;
                this.currentStatus = e.status;
                this.list = [];
                this.currentPage = 1;
                this.getList();
            },
            getList(){
                getAuditReportingList({
                    page:1,
                    page:this.currentPage,
                    size:20,
                    status:this.currentStatus
                }).then(res=>{
                    this.list = res.data.records;
                    if(res.code != 200){
                        uni.showToast({
                            title: '数据请求失败',
                            icon: 'error'
                        })
                        return
                    }
                    let records = res.data.records;
                    this.list = [...this.list, ...records]
                    this.loadingStatus = 'nomore'
                })
            },
            navTo(name,id){