Lou
2023-11-15 543c31693c6f2f9b97888328ea8530a61e292b55
新增网格员巡查页面,修改通知公告样式,修改个人中心样式
11 files modified
4 files added
678 ■■■■ changed files
pages.json 29 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 89 ●●●●● patch | view | raw | blame | history
pages/user/center.vue 54 ●●●● patch | view | raw | blame | history
pages/user/center.vue.bak 111 ●●●●● patch | view | raw | blame | history
static/icon/menu-center-01.png patch | view | raw | blame | history
static/icon/menu-center-02.png patch | view | raw | blame | history
static/icon/menu-center-03.png patch | view | raw | blame | history
static/icon/menu-center-04.png patch | view | raw | blame | history
subPackage/article/detail.vue 9 ●●●●● patch | view | raw | blame | history
subPackage/article/list.vue 41 ●●●● patch | view | raw | blame | history
subPackage/label/index.vue 12 ●●●● patch | view | raw | blame | history
subPackage/task/taskList.vue 166 ●●●●● patch | view | raw | blame | history
subPackage/task/workLogList.vue 8 ●●●●● patch | view | raw | blame | history
subPackage/user/role/index.vue 9 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/patrol.vue 150 ●●●●● patch | view | raw | blame | history
pages.json
@@ -204,7 +204,25 @@
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                }
                } ,
                {
                    "path": "taskList",
                    "style": {
                        "navigationBarTitleText": "任务列表",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                } ,
                {
                    "path": "workLogList",
                    "style": {
                        "navigationBarTitleText": "日志列表",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                }
            ]
        },
        //工作台
@@ -338,6 +356,15 @@
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "views/patrol",
                    "style": {
                        "navigationBarTitleText": "网格员巡查",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                }
            ]
        },
pages/home/index.vue
@@ -18,7 +18,8 @@
                        <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="navigatorPage('/subPackage/bs/views/repair')" v-if="curSelectSite.addressType != 2">
                    <u-grid-item @click.native="navigatorPage('/subPackage/bs/views/repair')"
                        v-if="curSelectSite.addressType != 2">
                        <u-icon name="/static/icon/nav-02.png" width="90rpx" height="90rpx"></u-icon>
                        <text class="f-26 mt-20">报事报修</text>
                    </u-grid-item>
@@ -110,7 +111,7 @@
                </u-grid>
            </view>
            <view class="mt-40" v-if="roleType != 2">
            <view class="mt-40" v-if="false">
                <view class="caption">
                    <view class="flex a-i-c">
                        <view class="line"></view>
@@ -118,14 +119,14 @@
                    </view>
                </view>
                <view class="row flex j-c-s-b">
                <view class="row-item flex_base"   @click="navigatorPage(`/subPackage/workbench/views/audit?type=1`)">
                    <view class="row-item flex_base" @click="navigatorPage(`/subPackage/workbench/views/audit?type=1`)">
                        <u-icon name="/static/icon/nav-07.png" width="90rpx" height="90rpx"></u-icon>
                        <view class="flex f-d-c fw ml-20">
                            <text class="f-28">一次性</text>
                            <text class="f-36 c-main">{{frequencyNumber.disposable}}</text>
                        </view>
                    </view>
                    <view class="row-item flex_base"   @click="navigatorPage(`/subPackage/workbench/views/audit?type=2`)">
                    <view class="row-item flex_base" @click="navigatorPage(`/subPackage/workbench/views/audit?type=2`)">
                        <u-icon name="/static/icon/nav-08.png" width="90rpx" height="90rpx"></u-icon>
                        <view class="flex f-d-c fw ml-20">
                            <text class="f-28">周期性</text>
@@ -144,37 +145,47 @@
                <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>
                        <text class="f-32">通知公告</text>
                        <text class="f-32 fw">通知公告</text>
                    </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?id=${item.id}`)">
                        <view class="f-28 mb-30">
                            {{item.title}}
                        </view>
                    <view class="notic-list flex j-c-s-b"
                        @click="navigatorPage(`/subPackage/article/detail?id=${item.id}`)">
                        <!-- <view class="f-28 mb-30 fw">{{item.title}}</view>
                        <view class="flex a-i-c j-c-s-b">
                            <view class="f-28 flex a-i-c ">
                                <u-tag :text="item.dictValue" plain plainFill> </u-tag>
                                <!-- <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 class="flex a-i-c ml-30" >
                                    <u-icon name="eye-fill" size="20" color="#CECECE"></u-icon>
                                    <text class="f-24 c-99 ml-10">{{item.viewNumber}}</text>
                                </view>
                            </view>
                            <text class="f-24 c-99">{{item.createTime}}</text>
                        </view> -->
                        <view class="notic-list-left flex f-d-c j-c-s-b">
                            <text class="notice-title f-28 fw">{{item.title}}</text>
                            <view class="tag-content">
                                <u-tag :text="item.dictValue" plain plainFill size="mini"> </u-tag>
                            </view>
                            <view class="flex j-c-s-b a-i-c">
                                <view class="flex a-i-c">
                                    <u-icon name="eye-fill" size="16" color="#CECECE"></u-icon>
                                    <text class="f-24 c-99 ml-10">{{item.viewNumber}}</text>
                                </view>
                                <text class="f-24 c-99">{{item.createTime}}</text>
                            </view>
                        </view>
                        <u-image :src="item.url" width="260rpx" height="200rpx"></u-image>
                    </view>
                </view>
            </view>
            <u-picker :title="roleTypeName" :defaultIndex="selectSiteIndex"  :closeOnClickOverlay="true" @close="selectBoxShow = false"
                :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns" @confirm="confirmSite"
                @change="changeSite" @cancel="selectBoxShow = false"></u-picker>
            <u-picker :title="roleTypeName" :defaultIndex="selectSiteIndex" :closeOnClickOverlay="true"
                @close="selectBoxShow = false" :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns"
                @confirm="confirmSite" @change="changeSite" @cancel="selectBoxShow = false"></u-picker>
        </view>
    </view>
@@ -284,14 +295,14 @@
                        },
                        path: "/subPackage/workbench/views/report"
                    },
                    // {
                    //     icon: "/static/icon/menu-04.png",
                    //     text: "我的任务",
                    //     style: {
                    //         background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
                    //     },
                    //     path: "/subPackage/task/index"
                    // },
                    {
                        icon: "/static/icon/menu-04.png",
                        text: "我的任务",
                        style: {
                            background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
                        },
                        path: "/subPackage/task/index"
                    },
                    // {
                    //     icon: "/static/icon/menu-07.png",
                    //     text: "校园安全",
@@ -345,8 +356,8 @@
                notice: [],
                frequencyNumber: {},
                typeNumber: {},
                selectSiteIndex:[0,0]
                selectSiteIndex: [0, 0]
            }
        },
@@ -354,7 +365,7 @@
            this.init()
            uni.$on('refresh', () => {
                console.log("<====>")
                this.selectSiteIndex = [0,0]
                this.selectSiteIndex = [0, 0]
                this.init()
            })
        },
@@ -465,7 +476,7 @@
                const param = {
                    type: 1,
                    code: code,
                    roleName:uni.getStorageSync('activeRole').roleName
                    roleName: uni.getStorageSync('activeRole').roleName
                }
                const res = await getHouseList(param)
                res.data.forEach(item => {
@@ -720,6 +731,23 @@
            padding: 30rpx 0;
            border-bottom: 1px solid #f5f5f5;
        }
        .notic-list-left {
            width: calc(100% - 260rpx - 20rpx);
            height: 200rpx;
        }
        .notice-title {
            width: 100%;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
        }
        .tag-content {
            display: inline-flex;
        }
    }
    .caption {
@@ -795,5 +823,4 @@
            border-radius: 16rpx 16rpx 16rpx 16rpx;
        }
    }
</style>
</style>
pages/user/center.vue
@@ -1,8 +1,8 @@
<template>
    <view class="">
        <view class="header flex a-i-c">
        <view class="header flex a-i-c c-ff">
            <u-avatar :src="userInfo.avatar" size="80"></u-avatar>
            <view class="flex f-d-c ml-20" v-if="isLogin">
            <view class="flex f-d-c ml-30" v-if="isLogin">
                <text class="f-36 mb-20 fw" v-if="userInfo.nick_name">{{userInfo.nick_name}}</text>
                <text class="f-36 mb-20 fw" v-else>{{userInfo.user_name}}</text>
                <!-- <text class="f-28 c-99">您好业主,欢迎回家</text> -->
@@ -16,14 +16,22 @@
        <view class="main">
            <view class="main-cell">
                <view class="cell-content">
                    <u-cell-group :border="false">
                    <!-- <u-cell-group :border="false">
                        <u-cell @click="navigator(item)" v-for="(item, index) in menuList" :icon="item.icon"
                            :title="item.title" :key="index" :border="false" :iconStyle="{width:'48rpx',height:'48rpx'}"
                            :title="item.title" :key="index" :border="true" :iconStyle="{width:'48rpx',height:'48rpx'}"
                            :isLink="true"></u-cell>
                    </u-cell-group>
                    </u-cell-group> -->
                    <view class="cell-item flex j-c-s-b a-i-c" v-for="(item,index) in menuList" :key="index"
                        @click="navigator(item)">
                        <view class="flex a-i-c">
                            <u-icon :name="item.icon" width="60rpx" height="60rpx"></u-icon>
                            <text class="f-30 ml-20">{{item.title}}</text>
                        </view>
                        <u-icon name="arrow-right" color="#999"></u-icon>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
@@ -56,12 +64,6 @@
                // userInfo:{}
            }
        },
        onShow() {
        },
        methods: {
            change(index) {
@@ -96,16 +98,38 @@
    }
</script>
<style>
<style lang="scss">
    page {
        width: 100%;
        height: 100%;
        background: linear-gradient(96deg, #E2EFFF 0%, rgba(255, 255, 255, 0) 100%);
        background-color: #f5f5f5;
        /* background: linear-gradient(96deg, #E2EFFF 0%, rgba(255, 255, 255, 0) 100%); */
    }
    .header {
        width: 100%;
        padding: 120rpx 38rpx 80rpx;
        height: 600rpx;
        padding: 120rpx 38rpx;
        box-sizing: border-box;
        background: linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%);
    }
    .main {
        margin: -50rpx 30rpx 0;
        background-color: #fff;
        border-radius: 6rpx;
        .cell-item {
            width: 100%;
            padding: 30rpx;
            border-bottom: 1px solid #f5f5f5;
            color: #333;
            box-sizing: border-box;
        }
        .cell-item:last-child {
            border-bottom: none;
        }
    }
</style>
pages/user/center.vue.bak
New file
@@ -0,0 +1,111 @@
<template>
    <view class="">
        <view class="header flex a-i-c">
            <u-avatar :src="userInfo.avatar" size="80"></u-avatar>
            <view class="flex f-d-c ml-20" v-if="isLogin">
                <text class="f-36 mb-20 fw" v-if="userInfo.nick_name">{{userInfo.nick_name}}</text>
                <text class="f-36 mb-20 fw" v-else>{{userInfo.user_name}}</text>
                <!-- <text class="f-28 c-99">您好业主,欢迎回家</text> -->
            </view>
            <view class="flex f-d-c ml-20" v-if="!isLogin">
                <text class="f-36 mb-20 fw">未登录</text>
                <!-- <text class="f-28 c-99">您好业主,欢迎回家</text> -->
            </view>
        </view>
        <view class="main">
            <view class="main-cell">
                <view class="cell-content">
                    <u-cell-group :border="false">
                        <u-cell @click="navigator(item)" v-for="(item, index) in menuList" :icon="item.icon"
                            :title="item.title" :key="index" :border="false" :iconStyle="{width:'48rpx',height:'48rpx'}"
                            :isLink="true"></u-cell>
                    </u-cell-group>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                menuList: [{
                        icon: "/static/icon/menu-center-01.png",
                        title: "我的家人",
                        url: ""
                    },
                    {
                        icon: "/static/icon/menu-center-02.png",
                        title: "切换角色",
                        url: "/subPackage/user/role/index"
                    },
                    {
                        icon: "/static/icon/menu-center-03.png",
                        title: "修改密码",
                        url: "/subPackage/user/password/index"
                    },
                    {
                        icon: "/static/icon/menu-center-04.png",
                        title: "退出登录",
                        url: ""
                    },
                ],
                // userInfo:{}
            }
        },
        onShow() {
        },
        methods: {
            change(index) {
                let url = index
                this.$u.func.globalNavigator(url, "switchTab")
            },
            navigator(item) {
                if (item.title == '退出登录') {
                    uni.showModal({
                        title: "提示",
                        content: "是否要退出该账号?",
                        success: (res) => {
                            if (res.confirm) {
                                this.logOut()
                            }
                        }
                    })
                } else {
                    this.$u.func.globalNavigator(item.url)
                }
            },
            logOut() {
                uni.setStorageSync("responIndex", 0)
                uni.clearStorageSync()
                uni.reLaunch({
                    url: "/pages/login/login-account"
                })
            },
        }
    }
</script>
<style>
    page {
        width: 100%;
        height: 100%;
        background: linear-gradient(96deg, #E2EFFF 0%, rgba(255, 255, 255, 0) 100%);
    }
    .header {
        width: 100%;
        padding: 120rpx 38rpx 80rpx;
        box-sizing: border-box;
    }
</style>
static/icon/menu-center-01.png

static/icon/menu-center-02.png

static/icon/menu-center-03.png

static/icon/menu-center-04.png

subPackage/article/detail.vue
@@ -1,6 +1,6 @@
<template>
    <view class="container">
        <view class="f-32">{{detailInfo.title}}</view>
        <view class="f-32 fw">{{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">
@@ -8,8 +8,11 @@
                    <text class="f-22 ml-10">120</text>
                </view> -->
                <view class="flex a-i-c">
                    <u-icon name="eye-fill" color="#CECECE"></u-icon>
                    <text class="f-22 ml-10">{{detailInfo.viewNumber}}</text>
                    <u-tag :text="detailInfo.dictValue" plain plainFill size="mini"> </u-tag>
                    <view class="flex a-i-c ml-20">
                        <u-icon name="eye-fill" color="#CECECE"></u-icon>
                        <text class="f-22 ml-10">{{detailInfo.viewNumber}}</text>
                    </view>
                </view>
            </view>
            <text class="f-24">{{detailInfo.createTime}}</text>
subPackage/article/list.vue
@@ -5,24 +5,35 @@
                :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}"></u-tabs>
        </view>
        <view class="list">
            <view class="notic-list bgc-ff" v-for="(item,index) in noticeList" :key="index" @click="navTo(item.id)">
                <view class="f-28 mb-30">
            <view class="notic-list flex j-c-s-b  bgc-ff" v-for="(item,index) in noticeList" :key="index" @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 ">
                        <u-tag :text="item.dictValue" plain plainFill> </u-tag>
                        <!-- <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 class="flex a-i-c ml-30">
                            <u-icon name="eye-fill" size="20" color="#CECECE"></u-icon>
                            <text class="f-24 c-99 ml-10">{{item.viewNumber}}</text>
                        </view>
                    </view>
                    <text class="f-24 c-99">{{item.createTime}}</text>
                </view> -->
                <view class="notic-list-left flex f-d-c j-c-s-b">
                    <text class="notice-title f-28 fw">{{item.title}}</text>
                    <view class="tag-content">
                        <u-tag :text="item.dictValue" plain plainFill size="mini"> </u-tag>
                    </view>
                    <view class="flex j-c-s-b a-i-c">
                        <view class="flex a-i-c">
                            <u-icon name="eye-fill" size="16" color="#CECECE"></u-icon>
                            <text class="f-24 c-99 ml-10">{{item.viewNumber}}</text>
                        </view>
                        <text class="f-24 c-99">{{item.createTime}}</text>
                    </view>
                </view>
                <u-image :src="item.url" width="260rpx" height="200rpx"></u-image>
            </view>
            <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
        </view>
@@ -112,7 +123,7 @@
    }
</script>
<style>
<style lang="scss">
    page {
        background-color: #f5f5f5;
    }
@@ -142,5 +153,21 @@
    .notic-list {
        padding: 30rpx;
        border-bottom: 1px solid #f5f5f5;
        .notic-list-left {
            width: calc(100% - 260rpx - 20rpx);
            height: 200rpx;
        }
        .notice-title {
            width: 100%;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
        }
        .tag-content {
            display: inline-flex;
        }
    }
</style>
subPackage/label/index.vue
@@ -91,12 +91,12 @@
                        path:"form",
                        background:"#13C6C7"
                    },
                    // {
                    //     title:"校园安全",
                    //     bgImg:"/static/icon/nav-bg-11.png",
                    //     path:"school",
                    //     background:"#4D98E2"
                    // }
                    {
                        title:"校园安全",
                        bgImg:"/static/icon/nav-bg-11.png",
                        path:"school",
                        background:"#4D98E2"
                    }
                ],
                siteInfo:{},
                count:{}
subPackage/task/taskList.vue
New file
@@ -0,0 +1,166 @@
<template>
    <view>
        <view class="tab">
            <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
                :activeStyle="{color:'#017BFC'}"></u-tabs>
        </view>
        <view class="list">
            <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.name,i.id)">
                <view class="item-title flex a-i-c j-c-s-b mb-20">
                    <text class="f-32 fw">{{i.name}}</text>
                    <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
                </view>
                <view class="item-row flex a-i-c j-c-s-b">
                    <text class="f-28">时间</text>
                    <text class="f-28 c-66">{{i.createTime}}</text>
                </view>
                <view class="item-row flex a-i-c j-c-s-b">
                    <text class="f-28">地址</text>
                    <text class="address f-28 c-66">{{i.addressName}}</text>
                </view>
            </view>
        </view>
        <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
    </view>
</template>
<script>
    import {
        getAuditReportingList
    } from "@/api/reporting/reporting"
    export default {
        data() {
            return {
                tabList: [{
                        name: "待审核",
                        status: 1
                    },
                    {
                        name: "审核通过",
                        status: 2
                    },
                    {
                        name: "已拒绝",
                        status: 3
                    },
                ],
                tabIndex: 0,
                currentStatus: 1,
                list: [],
                loadingStatus: 'nomore',
                currentPage: 1,
                frequency: '',
            }
        },
        onLoad(option) {
            if (option.type == 1) {
                uni.setNavigationBarTitle({
                    title: "一次性"
                })
                this.frequency = 1
            }
            if (option.type == 2) {
                uni.setNavigationBarTitle({
                    title: "周期性"
                })
                this.frequency = 2
            }
            this.getList()
        },
        onReachBottom() {
            this.currentPage++
            this.getList()
        },
        methods: {
            changeTab(e) {
                this.tabIndex = e.index;
                this.currentStatus = e.status;
                this.list = [];
                this.currentPage = 1;
                this.getList();
            },
            getList() {
                getAuditReportingList({
                    page: this.currentPage,
                    size: 20,
                    status: this.currentStatus,
                    frequency: this.frequency,
                }).then(res => {
                    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) {
                if (name == "旅馆安全") {
                    this.$u.func.globalNavigator(`hotelReportDetail?id=${id}`)
                } else if (name == "取保候审") {
                    this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
                } else {
                    this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
                }
            }
        }
    }
</script>
<style lang="scss">
    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;
    }
    .tab /deep/.u-tabs__wrapper__nav__item {
        flex: 1;
    }
    .list {
        margin: 118rpx 30rpx 0;
    }
    .list-item {
        padding: 0 30rpx 20rpx;
        border-radius: 8rpx;
        .item-title {
            padding: 30rpx 0;
            border-bottom: 1px solid #F5F5F5;
        }
        .item-row {
            padding: 10rpx 0;
            .address {
                width: 65%;
            }
        }
    }
</style>
subPackage/task/workLogList.vue
New file
@@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>
subPackage/user/role/index.vue
@@ -55,8 +55,6 @@
                    }else {
                        item.icon = "/static/icon/user-03.png"
                    } 
                    // this.roleData.push({
                    //     id: e.id,
                    //     iconName: 'account-fill',
@@ -88,8 +86,6 @@
                const appMenu = data.filter(e => e.name == 'app')[0].children
                console.log("菜单:", appMenu)
                store.commit("SET_MENU", appMenu)
                uni.showToast({
                    title: "切换身份成功",
                    icon: "success",
@@ -98,12 +94,9 @@
                        uni.$emit("refresh")
                        setTimeout(() => {
                            this.$u.func.globalNavigator("/pages/home/index", "switchTab")
                        }, data.duration || 1500)
                        }, 1000)
                    }
                })
            }
        }
    }
subPackage/workbench/views/patrol.vue
New file
@@ -0,0 +1,150 @@
<template>
    <view>
        <view class="content bgc-ff">
            <u-form labelPosition="left" :model="info" :rules="rules" ref="uForm" labelWidth="90"
                :labelStyle="{fontSize:'28rpx'}">
                <u-form-item label="标题" prop="info.title" borderBottom ref="item1">
                    <u-input v-model="info.title" border="none" placeholder="请输入标题" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="内容" borderBottom ref="item1">
                    <u-input  type="textarea" v-model="info.address" border="none"  placeholderClass="f-28 c-99"
                        inputAlign="right">
                    </u-input>
                </u-form-item>
                <u-form-item label="走访时间" prop="applyTime" borderBottom  required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
            </u-form>
        </view>
        <view class="upload bgc-ff">
            <view class="f-28">走访图片</view>
            <view class="mt-20">
                <u-upload :fileList="images" :previewFullImage="uploadConfig.previewFullImage"
                    :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
                    :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
                    <view class="upload-item upload-icon flex_base">
                        <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
                    </view>
                </u-upload>
            </view>
        </view>
        <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="applyTime" mode="datetime"
            :formatter="formatter" @confirm="confirmDate"  @cancel="showSelectDate = false"></u-datetime-picker>
        <view class="footer">
            <button class="footer-btn">提交</button>
        </view>
    </view>
</template>
<script>
    import uploadMixin from "@/mixin/uploadMixin";
    export default {
        mixins: [uploadMixin],
        data() {
            return {
                info: {
                    title: "",
                    content: ""
                },
                rules: {
                    'title': {
                        type: 'string',
                        required: true,
                        message: '请输入工作主题',
                        trigger: ['blur', 'change']
                    },
                    'content': {
                        type: 'string',
                        required: true,
                        message: '请输入工作内容',
                        trigger: ['blur', 'change']
                    },
                },
                images: [
                ],
                showSelectDate:false
            }
        },
        methods:{
            confirmDate(e) {
                this.showSelectDate = false;
                this.info.applyTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
            },
            getLocation(){
                uni.chooseLocation({
                    success:(res)=>{
                        console.log(res);
                    }
                })
            }
        }
    }
</script>
<style lang="less">
    page {
        background-color: #F5F5F5;
    }
    .content {
        margin: 20rpx 30rpx;
        padding: 0 30rpx;
    }
    .row{
        padding:20rpx 0;
        border-bottom:1px solid
    }
    .location-btn{
        width:116rpx;
        height:46rpx;
        line-height: 46rpx;
        border-radius: 4rpx;
        border:1px solid currentColor;
        padding:0;
        background-color: #fff;
    }
    .upload {
        margin: 0 30rpx;
        padding: 30rpx;
        .upload-item {
            width: 140rpx;
            height: 140rpx;
            border: 1px solid #EEEEEE;
        }
    }
    .footer {
        width: 100%;
        padding: 30rpx;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 10;
        box-sizing: border-box;
        .footer-btn {
            width: 100%;
            height: 78rpx;
            line-height: 78rpx;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
            border-radius: 8rpx;
            color: #fff;
            font-size: 32rpx;
        }
    }
</style>