智慧保安互联网APP
shuishen
2021-08-18 014090954f39b86045c9499955869c3e29715a9a
页面调整,及用户实时定位,及部分文件删除整改等
23 files modified
1 files renamed
9 files deleted
3 files added
5200 ■■■■■ changed files
App.vue 60 ●●●●● patch | view | raw | blame | history
api/mock/dispatch.js 28 ●●●●● patch | view | raw | blame | history
api/mock/examine.js 33 ●●●●● patch | view | raw | blame | history
api/mock/report.js 27 ●●●●● patch | view | raw | blame | history
manifest.json 12 ●●●● patch | view | raw | blame | history
pages.json 89 ●●●●● patch | view | raw | blame | history
pages/company/company.vue 154 ●●●● patch | view | raw | blame | history
pages/company/companyDetail.vue 84 ●●●●● patch | view | raw | blame | history
pages/dispatch/dispatch.vue 529 ●●●●● patch | view | raw | blame | history
pages/dispatch/imgissue.vue 8 ●●●● patch | view | raw | blame | history
pages/dispatch/issue.vue 144 ●●●●● patch | view | raw | blame | history
pages/dispatch/look.vue 283 ●●●●● patch | view | raw | blame | history
pages/dispatch/lookDetail.vue 10 ●●●● patch | view | raw | blame | history
pages/examine/addpeople.vue 12 ●●●● patch | view | raw | blame | history
pages/examine/addunit.vue 12 ●●●● patch | view | raw | blame | history
pages/examine/examine.vue 551 ●●●●● patch | view | raw | blame | history
pages/examine/people.vue 207 ●●●●● patch | view | raw | blame | history
pages/examine/peopleDetail.vue 18 ●●●● patch | view | raw | blame | history
pages/examine/unit.vue 206 ●●●●● patch | view | raw | blame | history
pages/examine/unitDetail.vue 14 ●●●● patch | view | raw | blame | history
pages/home/home - 副本.vue 556 ●●●●● patch | view | raw | blame | history
pages/login/login-account.vue 1 ●●●● patch | view | raw | blame | history
pages/message/addMessage.vue 136 ●●●●● patch | view | raw | blame | history
pages/message/message.vue 526 ●●●● patch | view | raw | blame | history
pages/message/messageDetail.vue 68 ●●●●● patch | view | raw | blame | history
pages/report/initiate.vue 8 ●●●● patch | view | raw | blame | history
pages/report/receive.vue 201 ●●●●● patch | view | raw | blame | history
pages/report/receiveDetail.vue 14 ●●●● patch | view | raw | blame | history
pages/report/report.vue 541 ●●●●● patch | view | raw | blame | history
pages/report/send.vue 206 ●●●●● patch | view | raw | blame | history
pages/report/sendDetail.vue 16 ●●●● patch | view | raw | blame | history
pages/securityStaff/exhibition.vue 156 ●●●● patch | view | raw | blame | history
pages/securityStaff/information.vue 72 ●●●● patch | view | raw | blame | history
store/actions.111.js 83 ●●●● patch | view | raw | blame | history
store/actions.js 124 ●●●●● patch | view | raw | blame | history
template.h5.html 11 ●●●●● patch | view | raw | blame | history
App.vue
@@ -66,6 +66,57 @@
                    this.socket.emit('newPeople', this.name);
                }
            },
            getLocationFn() {
                const _this = this
                uni.getLocation({
                    type: 'gcj02', // <map> 组件默认为国测局坐标gcj02
                    altitude: true,
                    success(res) {
                        console.log('返回的位置信息', res, _this)
                        _this.globalData.userInfo = {
                            latitude: res.latitude,
                            longitude: res.longitude
                        }
                    }
                })
            },
            handleAuthorize() {
                const _this = this // 下边this 为undefined
                uni.authorize({
                    scope: 'scope.userLocation', // 获取地理信息必填的参数,其它参数见文档
                    success(res) {
                        _this.getLocationFn()
                    },
                    // 授权失败
                    fail(err) {
                        err = err['errMsg']
                        uni.showModal({
                                title: '温馨提示',
                                content: '为获取位置信息,您必须授权!',
                                showCancel: false,
                                confirmText: '确认授权'
                            })
                            // 这里只设置了确认按钮,没有取消按钮
                            .then(res => {
                                //res : [null, {cancel: false, confirm: true, errMsg: 'showModal: ok'}]
                                if (res[1]['confirm']) { // 点击了确认按钮时
                                    // 调用下边方法时,会弹出 【使用我的地理位置】界面, 未设置直接返回,还是会走fail授权失败的函数,
                                    // 还是会弹出上边的温馨提示!!!
                                    // 如果设置, scope.userLocation: true
                                    uni.openSetting({
                                        success(res) {
                                            // 如果不设置,res结果:
                                            // {errMsg: "openSetting:ok", authSetting: {scope.userLocation: false}}
                                            // 如果设置, res结果:
                                            // {errMsg: "openSetting:ok", authSetting: {scope.userLocation: true}}
                                            // console.log('小程序设置界面:', res)
                                        }
                                    })
                                }
                            })
                    }
                })
            }
        },
        watch: {},
        mounted() {
@@ -76,23 +127,23 @@
            // });
        },
        onLaunch: function() { //初始化完成时触发(全局只触发一次)
            var that = this;
            if (WxStorage.get("init") == '') {
                WxStorage.set("init", 'false');
                console.log('第一次进入');
                // uni.connectSocket({
                //     url: 'ws://192.168.0.111:9034/websocket'
                // });
                // uni.onSocketOpen(function(res) {
                //     socketOpen = true;
                //     sendSocketMessage();
                // });
                // function sendSocketMessage() {
                //     var data = {
                //                 type: that.$store.state.puserName,
@@ -117,6 +168,7 @@
        onShow: function() { //当 uni-app 启动,或从后台进入前台显示 //监听用户进入小程序
            // console.log('App Show')
            // this.judgeAdmin();
            // this.handleAuthorize()
        },
        onHide: function() {
            // console.log('App Hide')
api/mock/dispatch.js
File was deleted
api/mock/examine.js
File was deleted
api/mock/report.js
File was deleted
manifest.json
@@ -1,6 +1,6 @@
{
    "name" : "智慧保安",
    "appid" : "__UNI__0F00D11",
    "appid" : "__UNI__6A6A0FC",
    "description" : "",
    "versionName" : "1.0.0",
    "versionCode" : "100",
@@ -23,8 +23,7 @@
        },
        /* 模块配置 */
        "modules" : {
            "Geolocation" : {},
            "Maps" : {}
            "Geolocation" : {}
        },
        /* 应用发布信息 */
        "distribute" : {
@@ -67,12 +66,7 @@
                        "appkey_android" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG"
                    }
                },
                "maps" : {
                    "baidu" : {
                        "appkey_ios" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG",
                        "appkey_android" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG"
                    }
                }
                "maps" : {}
            },
            "icons" : {
                "android" : {
pages.json
@@ -30,7 +30,7 @@
                // }
            }
        },
        {
            "path": "pages/service/service",
            "style": {
@@ -128,7 +128,8 @@
                "navigationBarTitleText": "工作汇报",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
                "navigationBarTextStyle": "white",
                "navigationStyle": "custom"
            }
        },
        {
@@ -141,27 +142,9 @@
            }
        },
        {
            "path": "pages/report/send",
            "style": {
                "navigationBarTitleText": "发送汇报列表",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
            }
        },
        {
            "path": "pages/report/sendDetail",
            "style": {
                "navigationBarTitleText": "发送汇报详情",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
            }
        },
        {
            "path": "pages/report/receive",
            "style": {
                "navigationBarTitleText": "接受汇报列表",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
@@ -182,16 +165,8 @@
                "navigationBarTitleText": "调度指令",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
            }
        },
        {
            "path": "pages/dispatch/look",
            "style": {
                "navigationBarTitleText": "指令查看",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
                "navigationBarTextStyle": "white",
                "navigationStyle": "custom"
            }
        },
        {
@@ -204,18 +179,9 @@
            }
        },
        {
            "path": "pages/dispatch/issue",
            "style": {
                "navigationBarTitleText": "文字指令下发",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
            }
        },
        {
            "path": "pages/dispatch/imgissue",
            "style": {
                "navigationBarTitleText": "图片指令下发",
                "navigationBarTitleText": "指令下发",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
@@ -227,6 +193,25 @@
                "navigationBarTitleText": "通知通告",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white",
                "navigationStyle": "custom"
            }
        },
        {
            "path": "pages/message/messageDetail",
            "style": {
                "navigationBarTitleText": "通知通告详情",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
            }
        },
        {
            "path": "pages/message/addMessage",
            "style": {
                "navigationBarTitleText": "新增通知通告",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
            }
        },
@@ -236,28 +221,13 @@
                "navigationBarTitleText": "现场检查",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
            }
        }, {
            "path": "pages/examine/unit",
            "style": {
                "navigationBarTitleText": "单位检查列表",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
                "navigationBarTextStyle": "white",
                "navigationStyle": "custom"
            }
        }, {
            "path": "pages/examine/unitDetail",
            "style": {
                "navigationBarTitleText": "单位检查详情",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
            }
        }, {
            "path": "pages/examine/people",
            "style": {
                "navigationBarTitleText": "保安检查列表",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
@@ -425,8 +395,7 @@
        "selectedColor": "#0BB9C8",
        "borderStyle": "white",
        "backgroundColor": "#ffffff",
        "list": [
            {
        "list": [{
                "pagePath": "pages/home/home",
                "iconPath": "static/images/tabbar/home.png",
                "selectedIconPath": "static/images/tabbar/home_selected.png",
@@ -452,4 +421,4 @@
            }
        ]
    }
}
}
pages/company/company.vue
@@ -40,6 +40,7 @@
                status: 'loadmore',
                keyValue: '',
                pagelist: 0,
                pages: 0,
                flag: true
            };
        },
@@ -48,38 +49,19 @@
        },
        onReachBottom() {
            var that = this;
            if (that.dataList.length - 1 == that.pagelist && this.status != 'nomore' && that.flag == true) {
                that.newsList.push(that.dataList[that.pagelist]);
                this.status = 'nomore';
                that.flag = false;
                return;
            } else {
                if (that.flag == false) {
                    this.status = 'nomore';
                    return
                }
                // 后续将改为与后端联动
                this.status = 'loading';
                setTimeout(() => {
                    var flag = true;
                    for (var i = 0; i < 5; i++) {
                        if (that.pagelist <= that.dataList.length - 2 && flag == true) {
                            that.newsList.push(that.dataList[that.pagelist++])
                            if (that.dataList.length - 1 == that.pagelist) flag == false
                        }
                    }
                }, 2000);
            if (that.flag == false) {
                that.status = 'nomore';
                return
            }
            // 后续将改为与后端联动
            that.status = 'loading';
            setTimeout(() => {
                that.getCompany();
            }, 1000);
        },
        mounted() {
            this.getCompany();
@@ -87,35 +69,42 @@
        methods: {
            getCompany() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/information/page",
                    url: that.$store.state.piAPI + "/information/page",
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        that.dataList = resdata;
                        var flag = true;
                        for (var i = 0; i < 5; i++) {
                            if (that.pagelist <= that.dataList.length - 2) {
                                that.newsList.push(that.dataList[that.pagelist++]);
                            } else {
                                if (that.dataList.length - 1 == that.pagelist && flag == true) {
                                    that.newsList.push(that.dataList[that.pagelist]);
                                    flag = false;
                                    that.flag = false;
                                    this.status = 'nomore';
                                }
                            }
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
@@ -133,34 +122,60 @@
                    return
                } else {
                    that.newsList = [];
                    that.dataList.forEach(item => {
                        if (item.enterprisename.indexOf(str) != -1) {
                            that.newsList.push(item)
                    uni.request({
                        url: that.$store.state.piAPI + "/information/page",
                        method: "get",
                        data: {
                            current: 1,
                            size: 999999,
                            enterprisename: str
                        },
                        success: (res) => {
                            var resdata = res.data.data.records;
                            resdata.forEach(item => {
                                that.newsList.push(item)
                            })
                        }
                    })
                    });
                    that.flag = false
                    that.status = 'nomore';
                }
            },
            clearValue() {
                this.keyValue = ''
                this.newsList = [];
                for (var i = 0; i < this.pagelist; i++) {
                    this.newsList.push(this.dataList[i])
                }
                if (this.flag == false) {
                    this.newsList.push(this.dataList[this.pagelist]);
                this.dataList.forEach(item => {
                    this.newsList.push(item)
                })
                if (this.pagelist < this.pages) {
                    this.flag = true;
                    this.status = 'loading';
                } else {
                    this.flag = false;
                    this.status = 'nomore';
                }
            },
            changeValue(value) {
                if (value == '') {
                    this.newsList = [];
                    for (var i = 0; i < this.pagelist; i++) {
                        this.newsList.push(this.dataList[i])
                    }
                    if (this.flag == false) {
                        this.newsList.push(this.dataList[this.pagelist]);
                    this.dataList.forEach(item => {
                        this.newsList.push(item)
                    })
                    if (this.pagelist < this.pages) {
                        this.flag = true;
                        this.status = 'loading';
                    } else {
                        this.flag = false;
                        this.status = 'nomore';
                    }
                }
            }
@@ -201,4 +216,3 @@
        color: #999;
    }
</style>
pages/company/companyDetail.vue
@@ -30,59 +30,71 @@
            <u-form :model="detailData" ref="uForm" class="companyForm">
                <u-form-item label-width='186' label="单位名称">
                <u-form-item label-width='132' label="单位名称">
                    <span> {{ detailData.enterprisename }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="成立日期">
                <u-form-item label-width='132' label="成立日期">
                    <span> {{ detailData.establishtime }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="注册资本">
                    <span> {{ detailData.registeredcapital }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="实缴资本">
                    <span> {{ detailData.capital }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="注册地址">
                    <span> {{ detailData.address }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="经营范围">
                    <span> {{ detailData.business }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="所属地区">
                    <span> {{ detailData.region }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="登记机关">
                    <span> {{ detailData.registration }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="所属行业">
                    <span> {{ detailData.industry }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="法定代表人">
                <u-form-item label-width='158' label="法定代表人">
                    <span> {{ detailData.representative }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="工商注册号">
                <u-form-item label-width='266' label="法定代表人联系方式">
                    <span> {{ detailData.representativecell }} </span>
                </u-form-item>
                <u-form-item label-width='98' label="联系人">
                    <span> {{ detailData.contacts }} </span>
                </u-form-item>
                <u-form-item label-width='152' label="联系人电话">
                    <span> {{ detailData.contactscell }} </span>
                </u-form-item>
                <u-form-item label-width='132' label="注册资本">
                    <span> {{ detailData.registeredcapital }} </span>
                </u-form-item>
                <u-form-item label-width='132' label="实缴资本">
                    <span> {{ detailData.capital }} </span>
                </u-form-item>
                <u-form-item label-width='132' label="注册地址">
                    <span> {{ detailData.address }} </span>
                </u-form-item>
                <u-form-item label-width='132' label="经营范围">
                    <span> {{ detailData.business }} </span>
                </u-form-item>
                <u-form-item label-width='132' label="所属地区">
                    <span> {{ detailData.region }} </span>
                </u-form-item>
                <u-form-item label-width='132' label="登记机关">
                    <span> {{ detailData.registration }} </span>
                </u-form-item>
                <u-form-item label-width='132' label="所属行业">
                    <span> {{ detailData.industry }} </span>
                </u-form-item>
                <u-form-item label-width='158' label="工商注册号">
                    <span> {{ detailData.registrationnumber }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="组织机构代码">
                <u-form-item label-width='184' label="组织机构代码">
                    <span> {{ detailData.organizationcode }} </span>
                </u-form-item>
                <u-form-item label-width='186' label="纳税人识别号">
                <u-form-item label-width='184' label="纳税人识别号">
                    <span> {{ detailData.identificationnumber }} </span>
                </u-form-item>
                <u-form-item label="统一社会信用代码">
                <u-form-item label-width='236' label="统一社会信用代码">
                    <span> {{ detailData.creditcode }} </span>
                </u-form-item>
@@ -309,7 +321,7 @@
            },
            getCompanyData() {
                uni.request({
                    url: this.$store.state.piAPI + "/blade-user/page?deptId=" + this.$store.state.UserData.dept_id,
                    url: this.$store.state.piAPI + "/blade-user/pages?deptId=" + this.detailData.departmentid,
                    method: "get",
                    data: {
                        current: 1,
pages/dispatch/dispatch.vue
@@ -1,85 +1,514 @@
<template>
    <view class="container">
        <view class="service-box">
            <u-grid :col="4" :border="false">
                <u-grid-item bg-color="transparent" v-for="(item, index) in serviceButton" :key="index" @click="goBusinessPage(item.url,index)">
                    <view class="service-item">
                        <image :src="item.img" mode="widthFix" class="img"></image>
                        <view class="name">{{ item.name }}</view>
    <view class="page-container" style="height: 100%; position: relative;">
        <view class="head top-absolute">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
                :background="{ background: '#0BB9C8' }">
                <view class="nav-wrap">
                    <view style="position: relative;">
                        <view class="btn-return-box">
                            <view class="btn-return">
                                <i class="uni-btn-icon" @click="goReturnPage"
                                    style="color: rgb(255, 255, 255); font-size: 27px;"></i>
                            </view>
                        </view>
                        <span class="header-title">调度指令</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
                </u-grid-item>
            </u-grid>
                </view>
            </u-navbar>
        </view>
        <view class="head">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
                :background="{ background: '#0BB9C8' }">
                <view class="nav-wrap">
                    <view style="position: relative;">
                        <view class="btn-return-box">
                            <view class="btn-return">
                                <i class="uni-btn-icon" @click="goReturnPage"
                                    style="color: rgb(255, 255, 255); font-size: 27px;"></i>
                            </view>
                        </view>
                        <span class="header-title">调度指令</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
                </view>
            </u-navbar>
        </view>
        <view class="wrapper">
            <view class="body">
                <view class="body-content">
                    <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8"
                        inactive-color="#595959" height="100" @change="change"></u-tabs>
                    <u-search v-model='keyValue' placeholder='请输入指令内容' shape="round" class="u-search" input-align="center"
                        height="70" @search='searchValue' @custom='searchValue' @clear='clearValue' @change='changeValue'>
                    </u-search>
                    <view v-show="current == 0 && newsList.length > 0">
                        <view class="inTmain" v-for="(item,index) in newsList">
                            <u-card :title="item.content" @click="goDetail(item)">
                                <view class="" slot="body">
                                    <view>
                                        <view style="margin-bottom: 10px;" class="u-body-item-title u-line-2">
                                            发送指令人:{{item.sendName}}</view>
                                    </view>
                                    <view>
                                        <view class="u-body-item-title u-line-2">接受指令人:{{item.receiveName}}</view>
                                    </view>
                                </view>
                                <view class="" slot="foot">
                                    </u-icon>发送指令时间:{{item.sendTime}}</view>
                            </u-card>
                        </view>
                        <u-loadmore class='msg' :status="status" />
                    </view>
                    <view v-show="current == 1 && newsList.length > 0">
                        <view class="inTmain" v-for="(item,index) in newsList">
                            <u-card :title="item.content" @click="goDetail(item)">
                                <view class="" slot="body">
                                    <view>
                                        <view style="margin-bottom: 10px;" class="u-body-item-title u-line-2">
                                            发送指令人:{{item.sendName}}</view>
                                    </view>
                                    <view>
                                        <view class="u-body-item-title u-line-2">接受指令人:{{item.receiveName}}</view>
                                    </view>
                                </view>
                                <view class="" slot="foot">
                                    </u-icon>发送指令时间:{{item.sendTime}}</view>
                            </u-card>
                        </view>
                        <u-loadmore class='msg' :status="status" />
                    </view>
                    <view class="msg" v-show='newsList.length == 0'>
                        暂无数据
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import {
        fakeServiceButton
    } from "@/api/mock/dispatch.js";
    export default {
        data() {
            return {
                dataList:[],
                serviceButton: []
                list: [{
                        name: '发送指令'
                    },
                    {
                        name: '接收指令'
                    }
                ],
                current: 0,
                dataList: [],
                newsList: [],
                status: 'loadmore',
                keyValue: '',
                dataList: [],
                newsList: [],
                pagelist: 0,
                pages: 0,
                flag: true,
            };
        },
        onLoad() {
        },
        onReachBottom() {
            var that = this;
            if (that.flag == false) {
                that.status = 'nomore';
                return
            }
            // 后续将改为与后端联动
            that.status = 'loading';
            setTimeout(() => {
                if (that.current == 0) {
                    that.getReceive();
                } else {
                    that.getSend();
                }
            }, 1000);
        },
        mounted() {
            this.getReceive();
        },
        methods: {
            onLoad() {
                // 加载服务按钮数据
                fakeServiceButton().then(data => {
                    this.serviceButton = data;
            getReceive() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store.state
                        .puserID,
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
                });
            },
            //页面跳转
            goBusinessPage(url,index){
            getSend() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state.puserID,
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
                });
            },
            goDetail(item) {
                uni.navigateTo({
                    url:url
                    url: './lookDetail?detailData=' + JSON.stringify(item)
                });
            },
            change(index) {
                if (this.current == index) return;
                this.dataList = [];
                this.newsList = [];
                this.pagelist = 0;
                this.pages = 0;
                this.flag = true;
                this.current = index;
                if (index == 0) {
                    this.getReceive();
                } else {
                    this.getSend();
                }
            },
            searchValue(value) {
                var that = this;
                var str = value.replace(/\s*/g, "");
                if (str == '') {
                    return
                } else {
                    that.newsList = [];
                    if (that.current == 0) {
                        uni.request({
                            url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store
                                .state
                                .puserID,
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                content: str
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    } else {
                        uni.request({
                            url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state
                                .puserID,
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                content: str
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    }
                    that.flag = false
                    that.status = 'nomore';
                }
            },
            clearValue() {
                this.keyValue = ''
                this.newsList = [];
                this.dataList.forEach(item => {
                    this.newsList.push(item)
                })
            },
                if (this.pagelist < this.pages) {
                    this.flag = true;
                    this.status = 'loading';
                } else {
                    this.flag = false;
                    this.status = 'nomore';
                }
            },
            changeValue(value) {
                if (value == '') {
                    this.newsList = [];
                    this.dataList.forEach(item => {
                        this.newsList.push(item)
                    })
                    if (this.pagelist < this.pages) {
                        this.flag = true;
                        this.status = 'loading';
                    } else {
                        this.flag = false;
                        this.status = 'nomore';
                    }
                }
            },
            goReturnPage() {
                uni.switchTab({
                    url: '/pages/home/home'
                });
            },
            goToAddPage() {
                uni.navigateTo({
                    url: './imgissue'
                });
            },
        }
    };
</script>
<style lang="scss">
    .container {
        background-color: #f7f7f7;
        min-height: 100vh;
        overflow: hidden;
    }
    .service-box {
        background: #ffffff;
        border-radius: 20px 20px 20px 20px;
        margin: 30rpx 20rpx 0;
        padding: 0rpx 20rpx;
    .page-container {
        position: fixed;
        display: block;
        width: 100%;
        max-height: 100vh;
        .service-item {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
        .head {
            position: relative;
            width: 100%;
            height: 120rpx;
            font-size: 26rpx;
            font-family: PingFang SC;
            font-weight: 500;
            color: #585b61;
            .img {
                width: 70rpx;
                height: auto;
            .nav-wrap {
                width: 100%;
                height: 44px;
                line-height: 30px;
                padding: 7px 3px;
                height: calc(44px + constant(safe-area-inset-top));
                height: calc(44px + env(safe-area-inset-top));
                color: rgb(255, 255, 255);
                .btn-return-box {
                    display: flex;
                    align-items: center;
                    font-size: 16px;
                    box-sizing: border-box;
                    .btn-return {
                        position: relative;
                        width: auto;
                        margin: 0 2px;
                        word-break: keep-all;
                        white-space: pre;
                        cursor: pointer;
                    }
                }
                .header-title {
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    margin: auto;
                    width: 60%;
                    font-weight: 700;
                    line-height: 30px;
                    font-size: 16px;
                    opacity: 1;
                    text-overflow: ellipsis;
                    text-align: center;
                    min-width: 1em;
                }
                .header-add {
                    position: absolute;
                    top: 0;
                    left: auto;
                    right: 3px;
                    bottom: 0;
                    margin: auto;
                    display: inline-block;
                    font: normal normal normal 14px/1 unibtn;
                    text-rendering: auto;
                    -webkit-font-smoothing: antialiased;
                    font-size: 24px;
                }
            }
        }
        .top-absolute {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 101;
        }
        .wrapper {
            width: 100%;
            display: block;
            height: calc(100% - 44px);
            height: calc(100% - 44px - constant(safe-area-inset-top));
            height: calc(100% - 44px - env(safe-area-inset-top));
            .body {
                width: 100%;
                height: 100%;
                overflow-x: hidden;
                overflow-y: auto;
                .body-content {
                    height: auto;
                }
            }
        }
    }
</style>
    .u-card-wrap {
        background-color: $u-bg-color;
        padding: 1px;
    }
    .u-body-item {
        font-size: 32rpx;
        color: #333;
        padding: 20rpx 10rpx;
    }
    .u-body-item image {
        width: 120rpx;
        flex: 0 0 120rpx;
        height: 120rpx;
        border-radius: 8rpx;
        margin-left: 12rpx;
    }
    .u-search {
        padding: 20rpx 30rpx 0 30rpx;
    }
    .inTmain {}
    .msg {
        height: 72rpx;
        line-height: 72rpx;
        text-align: center;
        color: #999;
    }
</style>
pages/dispatch/imgissue.vue
@@ -3,11 +3,11 @@
        <view class='initiae-box'>
            <u-form :model="form" ref="uForm">
                <u-form-item label-width='180' prop="content" label="指令内容" :required="true">
                <u-form-item label-width='132' prop="content" label="指令内容" :required="true">
                    <u-input type='textarea' v-model="form.content" placeholder="请输入指令内容" />
                </u-form-item>
                
                <u-form-item label-width='180' prop="recipientText" label="指令接收人" :required="true">
                <u-form-item label-width='158' prop="recipientText" label="指令接收人" :required="true">
                
                    <u-input v-model="form.recipientText" type="select" placeholder="请选择接收人" :border="false"
                        @click="recipientClick" />
@@ -17,7 +17,7 @@
                
                </u-form-item>
                <u-form-item label-width='180' label="指令相关图片" class='imgissue-upload'>
                <u-form-item label-width='184' label="指令相关图片" class='imgissue-upload'>
                    <seeImgs :imgs="imgs" :videos="[]" @del="delImg" :type="'imgs'"></seeImgs>
                    <image style="width: 4rem; height: 4rem; display: block;" @tap="takePhoto"
                        src="../../static/images/upload.png" mode=""></image>
@@ -140,7 +140,7 @@
                                    this.$refs.uToast.show({
                                        title: '指令下发成功',
                                        type: 'success',
                                        url: '/pages/dispatch/dispatch'
                                        url: '/pages/home/home'
                                    })
                                }
                            }
pages/dispatch/issue.vue
File was deleted
pages/dispatch/look.vue
File was deleted
pages/dispatch/lookDetail.vue
@@ -2,23 +2,23 @@
    <view class="container">
        <u-form :model="detailData" ref="uForm" class="receive-detail">
            
            <u-form-item label-width='180' label="指令内容">
            <u-form-item label-width='132' label="指令内容">
                <span>{{ detailData.content }}</span>
            </u-form-item>
            
            <u-form-item label-width='180' label="发送指令人">
            <u-form-item label-width='158' label="发送指令人">
                <span>{{ detailData.sendName }}</span>
            </u-form-item>
            
            <u-form-item label-width='180' label="接受指令人">
            <u-form-item label-width='158' label="接受指令人">
                <span>{{ detailData.receiveName }}</span>
            </u-form-item>
            
            <u-form-item label-width='180' label="发送指令时间">
            <u-form-item label-width='184' label="发送指令时间">
                <span>{{ detailData.sendTime }}</span>
            </u-form-item>
    
            <u-form-item label-width='180' label="指令相关图片">
            <u-form-item label-width='184' label="指令相关图片">
                <img :src="detailData.url" alt="">
            </u-form-item>
            
pages/examine/addpeople.vue
@@ -3,15 +3,15 @@
        <view class='initiae-box'>
            <u-form :model="form" ref="uForm">
                <u-form-item label-width='170' label="检查人">
                <u-form-item label-width='132' label="检查人">
                    <u-input type='text' disabled="disabled" v-model="createData.nick_name" placeholder="请输入检查内容" />
                </u-form-item>
                <u-form-item label-width='170' label="检查人单位">
                <u-form-item label-width='158' label="检查人单位">
                    <u-input type='text' disabled="disabled" v-model="createData.deptName" placeholder="请输入检查内容" />
                </u-form-item>
                <u-form-item label-width='170' prop="peopleText" label="保安员姓名" :required="true">
                <u-form-item label-width='158' prop="peopleText" label="保安员姓名" :required="true">
                    <u-input v-model="form.peopleText" type="select" placeholder="请选择保安员" :border="false"
                        @click="peopleClick" />
@@ -21,15 +21,15 @@
                </u-form-item>
                <u-form-item label-width='170' prop="content" label="检查内容" :required="true">
                <u-form-item label-width='132' prop="content" label="检查内容" :required="true">
                    <u-input type='textarea' v-model="form.content" placeholder="请输入检查内容" />
                </u-form-item>
                <u-form-item label-width='170' prop="outcome" label="检查结果" :required="true">
                <u-form-item label-width='132' prop="outcome" label="检查结果" :required="true">
                    <u-input type='textarea' v-model="form.outcome" placeholder="请输入检查结果" />
                </u-form-item>
                <u-form-item label-width='170' label="附属图片" class='imgissue-upload'>
                <u-form-item label-width='132' label="附属图片" class='imgissue-upload'>
                    <seeImgs :imgs="imgs" :videos="[]" @del="delImg" :type="'imgs'"></seeImgs>
                    <image style="width: 4rem; height: 4rem; display: block;" @tap="takePhoto"
                        src="../../static/images/upload.png" mode=""></image>
pages/examine/addunit.vue
@@ -3,15 +3,15 @@
        <view class='initiae-box'>
            <u-form :model="form" ref="uForm">
                <u-form-item label-width='170' label="检查人">
                <u-form-item label-width='132' label="检查人">
                    <u-input type='text' disabled="disabled" v-model="createData.nick_name" placeholder="请输入检查内容" />
                </u-form-item>
                <u-form-item label-width='170' label="检查人单位">
                <u-form-item label-width='158' label="检查人单位">
                    <u-input type='text' disabled="disabled" v-model="createData.deptName" placeholder="请输入检查内容" />
                </u-form-item>
                <u-form-item label-width='170' prop="unit" label="被检查单位" :required="true">
                <u-form-item label-width='158' prop="unit" label="被检查单位" :required="true">
                    <u-input v-model="form.unitText" type="select" placeholder="请选择被检查单位" :border="false"
                        @click="unitClick" />
@@ -21,15 +21,15 @@
                </u-form-item>
                <u-form-item label-width='170' prop="content" label="检查内容" :required="true">
                <u-form-item label-width='132' prop="content" label="检查内容" :required="true">
                    <u-input type='textarea' v-model="form.content" placeholder="请输入检查内容" />
                </u-form-item>
                <u-form-item label-width='170' prop="outcome" label="检查结果" :required="true">
                <u-form-item label-width='132' prop="outcome" label="检查结果" :required="true">
                    <u-input type='textarea' v-model="form.outcome" placeholder="请输入检查结果" />
                </u-form-item>
                <u-form-item label-position='top' label="附属图片" class='imgissue-upload'>
                <u-form-item label-width='132' label="附属图片" class='imgissue-upload'>
                    <seeImgs :imgs="imgs" :videos="[]" @del="delImg" :type="'imgs'"></seeImgs>
                    <image style="width: 4rem; height: 4rem; display: block;" @tap="takePhoto"
                        src="../../static/images/upload.png" mode=""></image>
pages/examine/examine.vue
@@ -1,85 +1,534 @@
<template>
    <view class="container">
        <view class="service-box">
            <u-grid :col="3" :border="false">
                <u-grid-item bg-color="transparent" v-for="(item, index) in serviceButton" :key="index" @click="goBusinessPage(item.url,index)">
                    <view class="service-item">
                        <image :src="item.img" mode="widthFix" class="img"></image>
                        <view class="name">{{ item.name }}</view>
    <view class="page-container" style="height: 100%; position: relative;">
        <view class="head top-absolute">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
                :background="{ background: '#0BB9C8' }">
                <view class="nav-wrap">
                    <view style="position: relative;">
                        <view class="btn-return-box">
                            <view class="btn-return">
                                <i class="uni-btn-icon" @click="goReturnPage"
                                    style="color: rgb(255, 255, 255); font-size: 27px;"></i>
                            </view>
                        </view>
                        <span class="header-title">现场检查</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
                </u-grid-item>
            </u-grid>
                </view>
            </u-navbar>
        </view>
        <view class="head">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
                :background="{ background: '#0BB9C8' }">
                <view class="nav-wrap">
                    <view style="position: relative;">
                        <view class="btn-return-box">
                            <view class="btn-return">
                                <i class="uni-btn-icon" @click="goReturnPage"
                                    style="color: rgb(255, 255, 255); font-size: 27px;"></i>
                            </view>
                        </view>
                        <span class="header-title">现场检查</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
                </view>
            </u-navbar>
        </view>
        <view class="wrapper">
            <view class="body">
                <view class="body-content">
                    <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8"
                        inactive-color="#595959" height="100" @change="change"></u-tabs>
                    <u-search v-show="current == 0" v-model='keyValue' placeholder='请输入保安员公司名称' shape="round"
                        class="u-search" input-align="center" height="70" @search='searchValue' @custom='searchValue'
                        @clear='clearValue' @change='changeValue'>
                    </u-search>
                    <u-search v-show="current == 1" v-model='keyValue' placeholder='请输入被检查公司名称' shape="round"
                        class="u-search" input-align="center" height="70" @search='searchValue' @custom='searchValue'
                        @clear='clearValue' @change='changeValue'>
                    </u-search>
                    <view v-show="current == 0 && newsList.length > 0">
                        <view class="inTmain" v-for="(item,index) in newsList">
                            <u-card :title="item.sname" @click="goDetail(item)">
                                <view class="" slot="body">
                                    <view>
                                        <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
                                            检查人姓名:{{item.inspectman}}
                                        </view>
                                    </view>
                                    <view>
                                        <view class="u-body-item-title u-line-1">
                                            检查人单位:{{item.deptname}}</view>
                                    </view>
                                </view>
                                <view class="" slot="foot">
                                    </u-icon>检查日期:{{item.reviewtime}}</view>
                            </u-card>
                        </view>
                        <u-loadmore class='msg' :status="status" />
                    </view>
                    <view v-show="current == 1 && newsList.length > 0">
                        <view class="inTmain" v-for="(item,index) in newsList">
                            <u-card :title="item.sname" @click="goDetail(item)">
                                <view class="" slot="body">
                                    <view>
                                        <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
                                            检查人姓名:{{item.name}}
                                        </view>
                                    </view>
                                    <view>
                                        <view class="u-body-item-title u-line-1">
                                            检查人单位:{{item.deptname}}</view>
                                    </view>
                                </view>
                                <view class="" slot="foot">
                                    </u-icon>检查日期:{{item.reviewtime}}</view>
                            </u-card>
                        </view>
                        <u-loadmore class='msg' :status="status" />
                    </view>
                    <view class="msg" v-show='newsList.length == 0'>
                        暂无数据
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import {
        fakeServiceButton
    } from "@/api/mock/examine.js";
    export default {
        data() {
            return {
                dataList:[],
                serviceButton: []
                list: [{
                        name: '保安检查'
                    },
                    {
                        name: '单位检查'
                    }
                ],
                current: 0,
                dataList: [],
                newsList: [],
                status: 'loadmore',
                keyValue: '',
                dataList: [],
                newsList: [],
                pagelist: 0,
                pages: 0,
                flag: true,
            };
        },
        onLoad() {
        },
        onReachBottom() {
            var that = this;
            if (that.flag == false) {
                that.status = 'nomore';
                return
            }
            // 后续将改为与后端联动
            that.status = 'loading';
            setTimeout(() => {
                if (that.current == 0) {
                    that.getReceive();
                } else {
                    that.getSend();
                }
            }, 1000);
        },
        mounted() {
            this.getReceive();
        },
        methods: {
            onLoad() {
                // 加载服务按钮数据
                fakeServiceButton().then(data => {
                    this.serviceButton = data;
            getReceive() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/seinspect/list",
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
                });
            },
            //页面跳转
            goBusinessPage(url,index){
                uni.navigateTo({
                    url:url
            getSend() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/coinspect/list?deptId=" + this.$store.state.UserData
                        .dept_id + '&userId=' + this.$store.state.puserID,
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
                });
            },
            goDetail(item) {
                if (this.current == 0) {
                    uni.navigateTo({
                        url: './peopleDetail?detailData=' + JSON.stringify(item)
                    });
                } else {
                    uni.navigateTo({
                        url: './unitDetail?detailData=' + JSON.stringify(item)
                    });
                }
            },
            change(index) {
                if (this.current == index) return;
                this.dataList = [];
                this.newsList = [];
                this.pagelist = 0;
                this.pages = 0;
                this.flag = true;
                this.current = index;
                if (index == 0) {
                    this.getReceive();
                } else {
                    this.getSend();
                }
            },
            searchValue(value) {
                var that = this;
                var str = value.replace(/\s*/g, "");
                if (str == '') {
                    return
                } else {
                    that.newsList = [];
                    if (that.current == 0) {
                        uni.request({
                            url: this.$store.state.piAPI + "/seinspect/list",
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                sname: str
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    } else {
                        uni.request({
                            url: this.$store.state.piAPI + "/coinspect/list?deptId=" + this.$store.state.UserData
                                .dept_id + '&userId=' + this.$store.state.puserID,
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                sname: str
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    }
                    that.flag = false
                    that.status = 'nomore';
                }
            },
            clearValue() {
                this.keyValue = ''
                this.newsList = [];
                this.dataList.forEach(item => {
                    this.newsList.push(item)
                })
            },
                if (this.pagelist < this.pages) {
                    this.flag = true;
                    this.status = 'loading';
                } else {
                    this.flag = false;
                    this.status = 'nomore';
                }
            },
            changeValue(value) {
                if (value == '') {
                    this.newsList = [];
                    this.dataList.forEach(item => {
                        this.newsList.push(item)
                    })
                    if (this.pagelist < this.pages) {
                        this.flag = true;
                        this.status = 'loading';
                    } else {
                        this.flag = false;
                        this.status = 'nomore';
                    }
                }
            },
            goReturnPage() {
                uni.switchTab({
                    url: '/pages/home/home'
                });
            },
            goToAddPage() {
                if (this.current == 0) {
                    uni.navigateTo({
                        url: './addpeople'
                    });
                } else {
                    uni.navigateTo({
                        url: './addunit'
                    });
                }
            },
        }
    };
</script>
<style lang="scss">
    .container {
        background-color: #f7f7f7;
        min-height: 100vh;
        overflow: hidden;
    }
    .service-box {
        background: #ffffff;
        border-radius: 20px 20px 20px 20px;
        margin: 30rpx 20rpx 0;
        padding: 0rpx 20rpx;
    .page-container {
        position: fixed;
        display: block;
        width: 100%;
        max-height: 100vh;
        .service-item {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
        .head {
            position: relative;
            width: 100%;
            height: 120rpx;
            font-size: 26rpx;
            font-family: PingFang SC;
            font-weight: 500;
            color: #585b61;
            .img {
                width: 70rpx;
                height: auto;
            .nav-wrap {
                width: 100%;
                height: 44px;
                line-height: 30px;
                padding: 7px 3px;
                height: calc(44px + constant(safe-area-inset-top));
                height: calc(44px + env(safe-area-inset-top));
                color: rgb(255, 255, 255);
                .btn-return-box {
                    display: flex;
                    align-items: center;
                    font-size: 16px;
                    box-sizing: border-box;
                    .btn-return {
                        position: relative;
                        width: auto;
                        margin: 0 2px;
                        word-break: keep-all;
                        white-space: pre;
                        cursor: pointer;
                    }
                }
                .header-title {
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    margin: auto;
                    width: 60%;
                    font-weight: 700;
                    line-height: 30px;
                    font-size: 16px;
                    opacity: 1;
                    text-overflow: ellipsis;
                    text-align: center;
                    min-width: 1em;
                }
                .header-add {
                    position: absolute;
                    top: 0;
                    left: auto;
                    right: 3px;
                    bottom: 0;
                    margin: auto;
                    display: inline-block;
                    font: normal normal normal 14px/1 unibtn;
                    text-rendering: auto;
                    -webkit-font-smoothing: antialiased;
                    font-size: 24px;
                }
            }
        }
        .top-absolute {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 101;
        }
        .wrapper {
            width: 100%;
            display: block;
            height: calc(100% - 44px);
            height: calc(100% - 44px - constant(safe-area-inset-top));
            height: calc(100% - 44px - env(safe-area-inset-top));
            .body {
                width: 100%;
                height: 100%;
                overflow-x: hidden;
                overflow-y: auto;
                .body-content {
                    height: auto;
                }
            }
        }
    }
</style>
    .u-card-wrap {
        background-color: $u-bg-color;
        padding: 1px;
    }
    .u-body-item {
        font-size: 32rpx;
        color: #333;
        padding: 20rpx 10rpx;
    }
    .u-body-item image {
        width: 120rpx;
        flex: 0 0 120rpx;
        height: 120rpx;
        border-radius: 8rpx;
        margin-left: 12rpx;
    }
    .u-search {
        padding: 20rpx 30rpx 0 30rpx;
    }
    .inTmain {}
    .msg {
        height: 72rpx;
        line-height: 72rpx;
        text-align: center;
        color: #999;
    }
</style>
pages/examine/people.vue
File was deleted
pages/examine/peopleDetail.vue
@@ -1,31 +1,31 @@
<template>
    <view class="container">
        <u-form :model="detailData" ref="uForm" class="send-detail">
            <u-form-item label-width='170' label="检查人姓名">
            <u-form-item label-width='158' label="检查人姓名">
                <span>{{ detailData.inspectman }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="检查人单位">
            <u-form-item label-width='158' label="检查人单位">
                <span>{{ detailData.deptname }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="保安员姓名">
            <u-form-item label-width='158' label="保安员姓名">
                <span>{{ detailData.realname }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="保安员单位">
            <u-form-item label-width='158' label="保安员单位">
                <span>{{ detailData.sname }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="保安身份证">
            <u-form-item label-width='158' label="保安身份证">
                <span>{{ detailData.carid }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="检查日期">
            <u-form-item label-width='132' label="检查日期">
                <span>{{ detailData.reviewtime }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="检查内容">
            <u-form-item label-width='132' label="检查内容">
                <span>{{ detailData.insid }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="检查结果">
            <u-form-item label-width='132' label="检查结果">
                <span>{{ detailData.examinationType }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="相关附图">
            <u-form-item label-width='132' label="相关附图">
                <view class="img-box">
                    <img :src="item" alt="" v-for='item in detailData.url'>
                </view>
pages/examine/unit.vue
File was deleted
pages/examine/unitDetail.vue
@@ -1,25 +1,25 @@
<template>
    <view class="container">
        <u-form :model="detailData" ref="uForm" class="send-detail">
            <u-form-item label-width='170' label="检查人姓名">
            <u-form-item label-width='158' label="检查人姓名">
                <span>{{ detailData.name }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="检查人单位">
            <u-form-item label-width='158' label="检查人单位">
                <span>{{ detailData.deptname }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="被检查单位">
            <u-form-item label-width='158' label="被检查单位">
                <span>{{ detailData.sname }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="检查日期">
            <u-form-item label-width='132' label="检查日期">
                <span>{{ detailData.reviewtime }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="检查内容">
            <u-form-item label-width='132' label="检查内容">
                <span>{{ detailData.insid }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="检查结果">
            <u-form-item label-width='132' label="检查结果">
                <span>{{ detailData.results }}</span>
            </u-form-item>
            <u-form-item label-width='170' label="相关附图">
            <u-form-item label-width='132' label="相关附图">
                <view class="img-box">
                    <img :src="item" alt="" v-for='item in detailData.url'>
                </view>
pages/home/home - 副本.vue
New file
@@ -0,0 +1,556 @@
<template>
    <view class="container">
        <!-- 头部 start -->
        <view class="head">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
                :background="{ background: '#0BB9C8' }">
                <view class="nav-wrap">
                    <picker mode="selector" :range="positionArr" range-key="name" @change="changePicker"
                        class="picker-box">
                        {{ position }}
                        <u-icon name="arrow-down" class="arrow" size="18" color="#C9C9C9"></u-icon>
                    </picker>
                    <image src="/static/images/rider.png" class="rider" mode="widthFix" v-if="!focus"></image>
                    <view class="search-input" v-else>
                        <u-search height="50" placeholder="关键字" @blur="handleSearchBlur" :show-action="false"
                            v-model="keyword"></u-search>
                    </view>
                    <view class="tool">
                        <image src="/static/images/home/search.png" class="icon search-icon" mode="widthFix"
                            @click="handleFocus" v-if="!focus"></image>
                        <image src="/static/images/home/message.png" class="icon message-icon" mode="widthFix"></image>
                        <image src="/static/images/home/qr.png" class="icon qr-icon" mode="widthFix"></image>
                    </view>
                </view>
            </u-navbar>
            <view class="head-bg"></view>
            <swiper class="swiper-box" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
                <swiper-item v-for="(item, index) in bannerList" :key="index">
                    <navigator :url="item.url" hover-class="none" class="swiper-item">
                        <image :src="item.img" class="banner"></image>
                    </navigator>
                </swiper-item>
            </swiper>
        </view>
        <!-- 头部 end -->
        <!-- 头部按钮 start -->
        <!-- <view class="nav">
            <u-grid :col="5" :border="false">
                <u-grid-item bg-color="transparent" v-for="(item, index) in navButton" :key="index">
                    <navigator :url="item.url" hover-class="none" class="nav-item">
                        <image :src="item.img" mode="widthFix" class="nav-item-img"></image>
                        <view class="nav-item-name">{{ item.name }}</view>
                    </navigator>
                </u-grid-item>
            </u-grid>
        </view> -->
        <!-- 头部按钮 end -->
        <!-- 公告 start -->
        <!-- <view class="notice-box">
            <image src="/static/images/home/notice.png" class="img" mode="widthFix"></image>
            <view class="notice-info">
                <navigator hover-class="none" class="notice-cell" v-for="(item, index) in noticeList" :key="index">
                    <image :src="item.img" class="icon" mode="widthFix"></image>
                    <view class="text">{{item.title}}</view>
                    <u-icon name="arrow-right" size="12" color="#C9C9C9"></u-icon>
                </navigator>
            </view>
        </view> -->
        <!-- 公告 end -->
        <!-- 服务按钮 start -->
        <view class="service-box">
            <u-grid :col="4" :border="false">
                <u-grid-item bg-color="transparent" v-for="(item, index) in serviceButton" :key="index"
                    @click="goBusinessPage(item.url,index,item.name)">
                    <!-- <navigator url="" hover-class="none" class="service-item">
                        <image :src="item.img" mode="widthFix" class="img"></image>
                        <view class="name">{{ item.name }}</view>
                    </navigator> -->
                    <view url="" hover-class="none" class="service-item">
                        <image :src="item.img" mode="widthFix" class="img"></image>
                        <view class="name">{{ item.name }}</view>
                    </view>
                </u-grid-item>
                <u-grid-item bg-color="transparent" key="8">
                    <navigator url="/pages/service/service" hover-class="none" class="service-item">
                        <image src="/static/images/home/s8.png" mode="widthFix" class="img"></image>
                        <view class="name">更多</view>
                    </navigator>
                </u-grid-item>
            </u-grid>
        </view>
        <!-- 服务按钮 end -->
        <!-- 新闻模块 start -->
        <view class="news" style="display: none;">
            <navigator hover-class="none" url="/pages/news/list" class="cell">
                <view class="ctitle">通知公告</view>
                <view class="more">
                    更多
                    <u-icon name="arrow-right" color="#A6ABB5" size="16"></u-icon>
                </view>
            </navigator>
            <view class="news-list">
                <navigator url="/pages/news/detail" hover-class="none" class="news-item"
                    v-for="(item, index) in newsList" :key="index">
                    <view class="left">
                        <view class="info">
                            [火灾防范] 严禁在建筑内的共用走道、楼梯间、安全出口处等公共区域停放电动车或者为电动车充电。
                        </view>
                        <view class="date">
                            <image src="/static/images/home/date.png" class="icon" mode=""></image>
                            2021.06.17
                        </view>
                    </view>
                    <image src="" mode="" class="img"></image>
                </navigator>
                <u-loadmore :status="status" />
            </view>
            <!-- 新闻模块 end -->
        </view>
            <!-- <u-button class="ccbut" type="primary" @click="openVideo('Mains')">测试点视频通话:主播</u-button>
            <u-button class="ccbut" type="primary" @click="openVideo('Receiver')">测试点视频通话:第二个</u-button> -->
    </view>
</template>
<script>
    import {
        fakePosition,
        fakeBannerList,
        fakeNoticeList,
        fakeNavButton,
        fakeServiceButton
    } from "@/api/mock/home.js";
    export default {
        data() {
            return {
                position: '',
                positionArr: [],
                status: 'loadmore',
                list: 15,
                page: 0,
                keyword: '',
                focus: false,
                bannerList: [],
                noticeList: [],
                newsList: [{}, {}],
                navButton: [],
                serviceButton: []
            };
        },
        mounted() {
            var socketOpen = false;
            //websocket连接
            // uni.connectSocket({
            //     url: 'ws://192.168.0.111:9034/websocket'
            // });
            // uni.onSocketOpen(function(res) {
            //     socketOpen = true;
            //     sendSocketMessage();
            // });
            // function sendSocketMessage() {
            //     var data = {
            //                 type: 'my',
            //                 id: '1415922341221867522'
            //             }
            //     if (socketOpen) {
            //         uni.sendSocketMessage({
            //             data: JSON.stringify(data)
            //         });
            //     }
            // }
            // uni.onSocketMessage(function(res) {
            //     console.log('收到服务器内容:' + res.data);
            // });
        },
        onLoad() {
            // 后续将改为与后端联动
            // 加载banner数据
            fakePosition().then(data => {
                this.position = data.position;
                this.positionArr = data.positionArr;
            });
            // 加载banner数据
            fakeBannerList().then(data => {
                this.bannerList = data;
            });
            // 加载通知公告数据
            fakeNoticeList().then(data => {
                this.noticeList = data;
            });
            // 加载顶部按钮数据
            fakeNavButton().then(data => {
                this.navButton = data;
            });
            // 加载服务按钮数据
            fakeServiceButton().then(data => {
                this.serviceButton = data;
            });
        },
        onReachBottom() {
            // 后续将改为与后端联动
            if (this.page >= 3) return;
            this.status = 'loading';
            this.page = ++this.page;
            setTimeout(() => {
                this.list += 10;
                if (this.page >= 3) this.status = 'nomore';
                else this.status = 'loading';
                this.newsList.push(...[{}, {}]);
            }, 2000);
        },
        methods: {
            openVideo(val){
                uni.navigateTo({
                    // url: '../videoCall/videoCall?state=' + val + '&type=video'
                    url: '../videoCall/videoCall?state=Mains&type=video&myname=wo&toname=1424647828935819265'
                });
            },
            changePicker(e) {
                console.log(this.pickerArr[e.detail.value].name);
                this.position = this.pickerArr[e.detail.value].name;
            },
            //页面跳转
            goBusinessPage(url, index, name) {
                // console.log(url,index)
                if (name == "位置查看") {
                    uni.request({
                        url: this.$store.state.piAPI + "/blade-user/page",
                        method: "get",
                        data: {
                            size: 99999
                        },
                        success: (res) => {
                            var re = res.data.data.records;
                            var d = [];
                            for (var k in re) {
                                if (re[k].latitude != '' && re[k].longitude != '') {
                                    d.push(re[k]);
                                }
                            }
                            console.log(d);
                            uni.navigateTo({
                                url: `${url}?data=${JSON.stringify(d)}`
                            })
                        }
                    })
                    return;
                }
                uni.navigateTo({
                    url: url
                })
            },
            handleFocus() {
                this.focus = !this.focus;
            },
            handleSearchBlur() {
                this.focus = false;
            }
        }
    };
</script>
<style lang="scss">
    .container {
        background-color: #f7f7f7;
        min-height: 100vh;
        overflow: hidden;
    }
    .head {
        position: relative;
        top: 0;
        left: 0;
        z-index: 1;
    }
    .head-bg {
        position: absolute;
        left: 0px;
        top: 0px;
        z-index: -1;
        width: 750rpx;
        height: 270rpx;
        background: #0bb9c8;
    }
    .nav-wrap {
        width: 100%;
        padding: 0 22rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .picker-box {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            font-size: 32rpx;
            font-family: Microsoft YaHei;
            font-weight: bold;
            color: #ffffff;
            .arrow {
                margin-left: 10rpx;
            }
        }
        .rider {
            flex-shrink: 0;
            width: 131rpx;
            height: auto;
        }
        .search-input {
            width: 300rpx;
            height: 50rpx;
        }
        .tool {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            .icon {
                height: auto;
            }
            .search-icon {
                width: 40rpx;
                margin-right: 34rpx;
            }
            .message-icon {
                width: 32rpx;
                margin-right: 27rpx;
            }
            .qr-icon {
                width: 37rpx;
            }
        }
    }
    .swiper-box {
        margin: 50rpx auto 0;
        width: 710rpx;
        height: 253rpx;
        .swiper-item {
            width: 100%;
            height: 100%;
            .banner {
                width: 100%;
                height: 100%;
            }
        }
    }
    .nav {
        margin: 0rpx 0;
        box-sizing: border-box;
        padding: 0 10rpx;
        &-item {
            width: 100%;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            height: 130rpx;
            &-img {
                width: 80rpx;
                height: 80rpx;
            }
            &-name {
                font-size: 26rpx;
                font-family: PingFang SC;
                font-weight: 400;
                color: #585b61;
            }
        }
    }
    .notice-box {
        display: flex;
        align-items: center;
        background: #ffffff;
        border-radius: 20px 20px 20px 20px;
        margin: 0 20rpx;
        padding: 30rpx 20rpx;
        .img {
            width: 75rpx;
            height: auto;
            margin-right: 36rpx;
            margin-left: 10rpx;
        }
        .notice-info {
            flex: 1;
            .notice-cell:first-of-type {
                margin-bottom: 15rpx;
            }
        }
        .notice-cell {
            display: flex;
            align-items: center;
            font-size: 24rpx;
            font-family: PingFang SC;
            font-weight: 500;
            color: #585b61;
            .icon {
                width: 63rpx;
                margin-right: 18rpx;
            }
            .text {
                flex: 1;
                min-width: 0;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 1;
                -webkit-box-orient: vertical;
            }
        }
    }
    .service-box {
        background: #ffffff;
        border-radius: 20px 20px 20px 20px;
        margin: 30rpx 20rpx 0;
        padding: 0rpx 20rpx;
        .service-item {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            height: 120rpx;
            font-size: 26rpx;
            font-family: PingFang SC;
            font-weight: 500;
            color: #585b61;
            .img {
                width: 70rpx;
                height: auto;
            }
        }
    }
    .news {
        background: #ffffff;
        border-radius: 20px 20px 20px 20px;
        margin: 30rpx 20rpx 60rpx;
        padding: 30rpx 20rpx;
        .cell {
            display: flex;
            justify-content: space-between;
            align-items: center;
            .ctitle {
                font-size: 32rpx;
                font-family: PingFang SC;
                font-weight: bold;
                color: #585b61;
            }
            .more {
                display: flex;
                align-items: center;
                font-size: 26rpx;
                font-family: PingFang SC;
                font-weight: 500;
                color: #a6abb5;
            }
        }
        .news-list {
            margin-top: 30rpx;
            .news-item {
                &:not(:last-of-type) {
                    padding: 0 0 30rpx;
                    margin-bottom: 30rpx;
                    border-bottom: 1px solid #eeeeee;
                }
                display: flex;
                align-items: center;
                justify-content: space-between;
                .left {
                    flex: 1;
                    height: 160rpx;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-around;
                    .info {
                        min-width: 0;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        display: -webkit-box;
                        -webkit-line-clamp: 2;
                        -webkit-box-orient: vertical;
                        font-size: 28rpx;
                        font-family: PingFang SC;
                        font-weight: 500;
                        color: #585b61;
                        line-height: 36rpx;
                    }
                    .date {
                        display: flex;
                        align-items: center;
                        .icon {
                            width: 21rpx;
                            height: 21rpx;
                            margin-right: 9rpx;
                        }
                        font-size: 26rpx;
                        font-family: PingFang SC;
                        font-weight: 500;
                        color: #a6abb5;
                    }
                }
                .img {
                    flex-shrink: 0;
                    width: 252rpx;
                    height: 160rpx;
                    border-radius: 20rpx;
                    background-color: #82848a;
                }
            }
        }
    }
</style>
pages/login/login-account.vue
@@ -62,6 +62,7 @@
            }
        },
        computed: {
            OURpass() {
                return this.$store.state.loging;
            }
pages/message/addMessage.vue
New file
@@ -0,0 +1,136 @@
<template>
    <view class="container">
        <view class='initiae-box'>
            <u-form :model="form" ref="uForm">
                <u-form-item label-width='132' prop="title" label="通知标题" :required="true">
                    <u-input type='text' v-model="form.title" placeholder="请输入通知标题" />
                </u-form-item>
                <u-form-item label-width='132' prop="content" label="通知内容" :required="true">
                    <u-input type='textarea' v-model="form.content" placeholder="请输入通知内容" />
                </u-form-item>
            </u-form>
            <view>
                <u-button type="primary" @click="initiateClick" style="margin-top: 4%; width: 60%;">发送</u-button>
            </view>
            <view>
                <u-toast ref="uToast" />
            </view>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                form: {
                    title: '',
                    content: ''
                },
                rules: {
                    content: [{
                        min: 5,
                        required: true,
                        message: '检查内容不能少于5个字',
                        trigger: ['change', 'blur'],
                    }],
                    title: [{
                        required: true,
                        message: '请输入通知标题',
                        trigger: ['change', 'blur'],
                    }],
                },
                createData: null,
            };
        },
        onLoad() {
            this.createData = this.$store.state.UserData
        },
        onReachBottom() {
        },
        mounted() {},
        onReady() {
            this.$refs.uForm.setRules(this.rules);
        },
        methods: {
            getCurrentTime() {
                let date = new Date();
                let dateYear = date.getFullYear(); //获取年
                let dateMonth = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1); //获取月
                let dateDate = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); //获取当日
                let dateDay = date.getDay(); //获取当日星期数
                let dateHours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); //获取小时
                let dateMinutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); //获取分钟
                let dateSeconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds(); //获取秒
                return dateYear + '-' + dateMonth + '-' + dateDate + ' ' + dateHours + ':' + dateMinutes + ':' +
                    dateSeconds
            },
            initiateClick() {
                this.$refs.uForm.validate(valid => {
                    if (valid) {
                        uni.request({
                            url: this.$store.state.piAPI + "/blade-system/dept/detail",
                            method: "get",
                            data: {
                                id: this.createData.dept_id
                            },
                            success: (result) => {
                                var deptCategory = result.data.data.deptCategory;
                                    uni.request({
                                        url: this.$store.state.piAPI + "/blade-desk/notice/submit",
                                        method: "post",
                                        data: {
                                            title: this.form.title,
                                            content: this.form.content,
                                            category: deptCategory,
                                            deptId: result.data.data.deptCategory,
                                            releaseTime: this.getCurrentTime(),
                                        },
                                        success: (res) => {
                                            if (res.data.msg == "操作成功") {
                                                this.$refs.uToast.show({
                                                    title: '新增通知成功',
                                                    type: 'success',
                                                    url: '/pages/message/message'
                                                })
                                            }
                                        }
                                    });
                            }
                        });
                    } else {
                        console.log('验证失败');
                    }
                });
            },
        }
    };
</script>
<style lang="scss">
    .initiae-box {
        padding: 0 30rpx;
    }
</style>
pages/message/message.vue
@@ -1,60 +1,125 @@
<template>
    <view class="container">
        <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" inactive-color="#595959"
            height="100" @change="change"></u-tabs>
        <u-search v-model='keyValue' placeholder='请输入公告内容' shape="round" class="u-search" input-align="center"
            height="70" @search='searchValue' @custom='searchValue' @clear='clearValue' @change='changeValue'>
        </u-search>
        <view v-show="current == 0 && newsList.length > 0">
            <view class="inTmain" v-for="(item,index) in newsList">
                <u-card :title="item.title" @click="goDetail(item)">
                    <view class="" slot="body">
                        <view>
                            <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
                                通知类型:{{item.category == 1 ? '单位公告' : '公安公告'}}</view>
    <view class="page-container" style="height: 100%; position: relative;">
        <view class="head top-absolute">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
                :background="{ background: '#0BB9C8' }">
                <view class="nav-wrap">
                    <view style="position: relative;">
                        <view class="btn-return-box">
                            <view class="btn-return">
                                <i class="uni-btn-icon" @click="goReturnPage"
                                    style="color: rgb(255, 255, 255); font-size: 27px;"></i>
                            </view>
                        </view>
                        <view>
                            <view class="u-body-item-title u-line-1">通知日期:{{item.releaseTime}}</view>
                        </view>
                        <span class="header-title">通知公告</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
                    <view class="" slot="foot">
                        </u-icon>发布单位:{{item.depName}}</view>
                </u-card>
            </view>
            <u-loadmore class='msg' :status="status" />
        </view>
        <view v-show="current == 1 && newsList.length > 0">
            <view class="inTmain" v-for="(item,index) in newsList">
                <u-card :title="item.title" @click="goDetail(item)">
                    <view class="" slot="body">
                        <view>
                            <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
                                通知类型:{{item.category == 1 ? '单位公告' : '公安公告'}}</view>
                </view>
            </u-navbar>
        </view>
        <view class="head">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
                :background="{ background: '#0BB9C8' }">
                <view class="nav-wrap">
                    <view style="position: relative;">
                        <view class="btn-return-box">
                            <view class="btn-return">
                                <i class="uni-btn-icon" @click="goReturnPage"
                                    style="color: rgb(255, 255, 255); font-size: 27px;"></i>
                            </view>
                        </view>
                        <view>
                            <view class="u-body-item-title u-line-1">通知日期:{{item.releaseTime}}</view>
                        </view>
                        <span class="header-title">通知公告</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
                    <view class="" slot="foot">
                        </u-icon>发布单位:{{item.depName}}</view>
                </u-card>
                </view>
            </u-navbar>
        </view>
        <view class="wrapper">
            <view class="body">
                <view class="body-content">
                    <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8"
                        inactive-color="#595959" height="100" @change="change"></u-tabs>
                    <u-search v-model='keyValue' placeholder='请输入通知标题' shape="round" class="u-search"
                        input-align="center" height="70" @search='searchValue' @custom='searchValue' @clear='clearValue'
                        @change='changeValue'>
                    </u-search>
                    <view v-show="current == 0 && newsList.length > 0">
                        <view class="inTmain" v-for="(item,index) in newsList">
                            <u-card :title="'通知标题:' + item.title" @click="goDetail(item)">
                                <view class="" slot="body">
                                    <view>
                                        <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
                                            通知类型:{{item.category == 1 ? '单位公告' : '公安公告'}}</view>
                                    </view>
                                    <view>
                                        <view class="u-body-item-title u-line-1">通知日期:{{item.releaseTime}}</view>
                                    </view>
                                </view>
                                <view class="" slot="foot">
                                    </u-icon>发布单位:{{item.depName}}</view>
                            </u-card>
                        </view>
                        <u-loadmore class='msg' :status="status" />
                    </view>
                    <view v-show="current == 1 && newsList.length > 0">
                        <view class="inTmain" v-for="(item,index) in newsList">
                            <u-card :title="'通知标题:' + item.title" @click="goDetail(item)">
                                <view class="" slot="body">
                                    <view>
                                        <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
                                            通知类型:{{item.category == 1 ? '单位公告' : '公安公告'}}</view>
                                    </view>
                                    <view>
                                        <view class="u-body-item-title u-line-1">通知日期:{{item.releaseTime}}</view>
                                    </view>
                                </view>
                                <view class="" slot="foot">
                                    </u-icon>发布单位:{{item.deptName}}</view>
                            </u-card>
                        </view>
                        <u-loadmore class='msg' :status="status" />
                    </view>
                    <view class="msg" v-show='newsList.length == 0'>
                        暂无数据
                    </view>
                </view>
            </view>
            <u-loadmore class='msg' :status="status" />
        </view>
        <view class="msg" v-show='newsList.length == 0'>
            暂无数据
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                list: [{
                        name: '单位公告'
                    },
@@ -62,13 +127,21 @@
                        name: '公安公告'
                    }
                ],
                current: 0,
                dataList: [],
                newsList: [],
                status: 'loadmore',
                keyValue: '',
                dataList: [],
                newsList: [],
                pagelist: 0,
                flag: true
                pages: 0,
                flag: true,
            };
        },
        onLoad() {
@@ -77,37 +150,20 @@
        onReachBottom() {
            var that = this;
            if (that.dataList.length - 1 == that.pagelist && this.status != 'nomore' && that.flag == true) {
                that.newsList.push(that.dataList[that.pagelist]);
                this.status = 'nomore';
                that.flag = false;
                return;
            } else {
                if (that.flag == false) {
                    this.status = 'nomore';
                    return
                }
                // 后续将改为与后端联动
                this.status = 'loading';
                setTimeout(() => {
                    var flag = true;
                    for (var i = 0; i < 5; i++) {
                        if (that.pagelist <= that.dataList.length - 2 && flag == true) {
                            that.newsList.push(that.dataList[that.pagelist++])
                            if (that.dataList.length - 1 == that.pagelist) flag == false
                        }
                    }
                }, 2000);
            if (that.flag == false) {
                that.status = 'nomore';
                return
            }
            // 后续将改为与后端联动
            that.status = 'loading';
            setTimeout(() => {
                if (that.current == 0) {
                    that.getReceive();
                } else {
                    that.getSend();
                }
            }, 1000);
        },
        mounted() {
            this.getReceive();
@@ -115,96 +171,122 @@
        methods: {
            getReceive() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/blade-desk/notice/page?category=1",
                    url: this.$store.state.piAPI + "/blade-desk/notice/page?category=1&deptId=" + this.$store.state
                        .UserData
                        .dept_id,
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        that.pagelist = 0;
                        that.newsList = [];
                        that.flag = true;
                        that.dataList = resdata;
                        var flag = true;
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        for (var i = 0; i < 5; i++) {
                            if (that.pagelist <= that.dataList.length - 2) {
                                that.newsList.push(that.dataList[that.pagelist++]);
                            } else {
                                if (that.dataList.length - 1 == that.pagelist && flag == true) {
                                    that.newsList.push(that.dataList[that.pagelist]);
                                    flag = false;
                                    that.flag = false;
                                    this.status = 'nomore';
                                }
                            }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
                });
            },
            getIssue() {
            getSend() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/blade-desk/notice/page?category=2",
                    url: this.$store.state.piAPI + "/blade-desk/notice/page?category=2&deptId=" + this.$store.state
                        .UserData
                        .dept_id,
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        that.pagelist = 0;
                        that.newsList = [];
                        that.flag = true;
                        that.dataList = resdata;
                        var flag = true;
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        for (var i = 0; i < 5; i++) {
                            if (that.pagelist <= that.dataList.length - 2) {
                                that.newsList.push(that.dataList[that.pagelist++]);
                            } else {
                                if (that.dataList.length - 1 == that.pagelist && flag == true) {
                                    that.newsList.push(that.dataList[that.pagelist]);
                                    flag = false;
                                    that.flag = false;
                                    this.status = 'nomore';
                                }
                            }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
                });
            },
            goDetail(item) {
                return;
                var reg1 = /<\/?p[^>]*>/g;
                item.content = item.content.replace(reg1, '');
                var reg2 = /[&nbsp;]/g;
                item.content = item.content.replace(reg2, '');
                console.log(item)
                uni.navigateTo({
                    url: './lookDetail?detailData=' + JSON.stringify(item)
                    url: './messageDetail?detailData=' + JSON.stringify(item)
                });
            },
            change(index) {
                if (this.current == index) return;
                this.dataList = [];
                this.newsList = [];
                this.pagelist = 0;
                this.pages = 0;
                this.flag = true;
                this.current = index;
                if (index == 0) {
                    this.getReceive();
                } else {
                    this.getIssue();
                    this.getSend();
                }
                this.current = index;
            },
            searchValue(value) {
                var that = this;
@@ -213,42 +295,208 @@
                    return
                } else {
                    that.newsList = [];
                    that.dataList.forEach(item => {
                        if (item.title.indexOf(str) != -1) {
                            that.newsList.push(item)
                        }
                    })
                    if (that.current == 0) {
                        uni.request({
                            url: this.$store.state.piAPI + "/blade-desk/notice/page?category=1&deptId=" + this
                                .$store.state
                                .UserData
                                .dept_id,
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                title: str
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    } else {
                        uni.request({
                            url: this.$store.state.piAPI + "/blade-desk/notice/page?category=2&deptId=" + this
                                .$store.state
                                .UserData
                                .dept_id,
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                title: str
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    }
                    that.flag = false
                    that.status = 'nomore';
                }
            },
            clearValue() {
                this.keyValue = ''
                this.newsList = [];
                for (var i = 0; i < this.pagelist; i++) {
                    this.newsList.push(this.dataList[i])
                }
                if (this.flag == false) {
                    this.newsList.push(this.dataList[this.pagelist]);
                this.dataList.forEach(item => {
                    this.newsList.push(item)
                })
                if (this.pagelist < this.pages) {
                    this.flag = true;
                    this.status = 'loading';
                } else {
                    this.flag = false;
                    this.status = 'nomore';
                }
            },
            changeValue(value) {
                if (value == '') {
                    this.newsList = [];
                    for (var i = 0; i < this.pagelist; i++) {
                        this.newsList.push(this.dataList[i])
                    }
                    if (this.flag == false) {
                        this.newsList.push(this.dataList[this.pagelist]);
                    this.dataList.forEach(item => {
                        this.newsList.push(item)
                    })
                    if (this.pagelist < this.pages) {
                        this.flag = true;
                        this.status = 'loading';
                    } else {
                        this.flag = false;
                        this.status = 'nomore';
                    }
                }
            }
            },
            goReturnPage() {
                uni.switchTab({
                    url: '/pages/home/home'
                });
            },
            goToAddPage() {
                uni.navigateTo({
                    url: './addMessage'
                });
            },
        }
    };
</script>
<style lang="scss">
    .page-container {
        position: fixed;
        display: block;
        width: 100%;
        max-height: 100vh;
        .head {
            position: relative;
            width: 100%;
            .nav-wrap {
                width: 100%;
                height: 44px;
                line-height: 30px;
                padding: 7px 3px;
                height: calc(44px + constant(safe-area-inset-top));
                height: calc(44px + env(safe-area-inset-top));
                color: rgb(255, 255, 255);
                .btn-return-box {
                    display: flex;
                    align-items: center;
                    font-size: 16px;
                    box-sizing: border-box;
                    .btn-return {
                        position: relative;
                        width: auto;
                        margin: 0 2px;
                        word-break: keep-all;
                        white-space: pre;
                        cursor: pointer;
                    }
                }
                .header-title {
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    margin: auto;
                    width: 60%;
                    font-weight: 700;
                    line-height: 30px;
                    font-size: 16px;
                    opacity: 1;
                    text-overflow: ellipsis;
                    text-align: center;
                    min-width: 1em;
                }
                .header-add {
                    position: absolute;
                    top: 0;
                    left: auto;
                    right: 3px;
                    bottom: 0;
                    margin: auto;
                    display: inline-block;
                    font: normal normal normal 14px/1 unibtn;
                    text-rendering: auto;
                    -webkit-font-smoothing: antialiased;
                    font-size: 24px;
                }
            }
        }
        .top-absolute {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 101;
        }
        .wrapper {
            width: 100%;
            display: block;
            height: calc(100% - 44px);
            height: calc(100% - 44px - constant(safe-area-inset-top));
            height: calc(100% - 44px - env(safe-area-inset-top));
            .body {
                width: 100%;
                height: 100%;
                overflow-x: hidden;
                overflow-y: auto;
                .body-content {
                    height: auto;
                }
            }
        }
    }
    .u-card-wrap {
        background-color: $u-bg-color;
        padding: 1px;
pages/message/messageDetail.vue
New file
@@ -0,0 +1,68 @@
<template>
    <view class="container">
        <u-form :model="detailData" ref="uForm" class="send-detail">
            <u-form-item label-width='132' label="通知标题">
                <span>{{ detailData.title }}</span>
            </u-form-item>
            <u-form-item label-width='132' label="通知类型">
                <span>{{detailData.category == 1 ? '单位公告' : '公安公告'}}</span>
            </u-form-item>
            <u-form-item label-width='132' label="发布单位">
                <span>{{ detailData.deptName }}</span>
            </u-form-item>
            <u-form-item label-width='132' label="通知日期">
                <span>{{ detailData.releaseTime }}</span>
            </u-form-item>
            <u-form-item label-width='132' label="通知内容">
                <span>{{ detailData.content }}</span>
            </u-form-item>
        </u-form>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                detailData: {},
            };
        },
        onLoad(event) {
            var that = this;
            this.detailData = JSON.parse(decodeURIComponent(event.detailData));
            console.log(this.detailData, event, 465)
        },
        onReachBottom() {
        },
        mounted() {
        },
        methods: {
        }
    };
</script>
<style lang="scss">
    .send-detail {
        padding: 0 30rpx;
        span {
            color: #999;
        }
    }
    .img-box {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
        img {
            height: 180rpx;
        }
    }
</style>
pages/report/initiate.vue
@@ -3,25 +3,25 @@
        <view class='initiae-box'>
            <u-form :model="form" ref="uForm">
                <u-form-item label-width='160' prop="categoryText" label="汇报类别" :required="true">
                <u-form-item label-width='132' prop="categoryText" label="汇报类别" :required="true">
                    <u-input v-model="form.categoryText" type="select" placeholder="请选择汇报类别" :border="false"
                        @click="categoryClick" />
                    <u-select v-model="categoryShow" mode="single-column" :list="categoryList"
                        @confirm="categoryConfirm">
                    </u-select>
                </u-form-item>
                <u-form-item label-width='160' prop="typeText" label="汇报类型" :required="true">
                <u-form-item label-width='132' prop="typeText" label="汇报类型" :required="true">
                    <u-input v-model="form.typeText" type="select" placeholder="请选择汇报类型" :border="false"
                        @click="typeClick" />
                    <u-select v-model="typeShow" mode="single-column" :list="typeList" @confirm="typeConfirm">
                    </u-select>
                </u-form-item>
                <u-form-item label-width='160' prop="content" label="汇报内容" :required="true">
                <u-form-item label-width='132' prop="content" label="汇报内容" :required="true">
                    <u-input type='textarea' v-model="form.content" placeholder="请输入汇报内容" />
                </u-form-item>
                <u-form-item label-width='160' prop="recipientText" label="接收人" :required="true">
                <u-form-item label-width='132' prop="recipientText" label="接收人" :required="true">
                    <u-input v-model="form.recipientText" type="select" placeholder="请选择接收人" :border="false"
                        @click="recipientClick" />
pages/report/receive.vue
File was deleted
pages/report/receiveDetail.vue
@@ -1,25 +1,25 @@
<template>
    <view class="container">
        <u-form :model="detailData" ref="uForm" class="receive-detail">
            <u-form-item label-width='160' label="汇报人">
            <u-form-item label-width='132' label="汇报人">
                <span>{{ detailData.realName }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="汇报人单位">
            <u-form-item label-width='158' label="汇报人单位">
                <span>{{ detailData.deptName }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="汇报类型">
            <u-form-item label-width='132' label="汇报类型">
                <span>{{ detailData.type == 1 ? '日报' : detailData.type == 2 ? '周报' : '月报'}}</span>
            </u-form-item>
            <u-form-item label-width='160' label="汇报内容">
            <u-form-item label-width='132' label="汇报内容">
                <span>{{ detailData.content }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="回复内容">
            <u-form-item label-width='132' label="回复内容">
                <span>{{ detailData.replyContent }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="汇报时间">
            <u-form-item label-width='132' label="汇报时间">
                <span>{{ detailData.reportTime }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="回复时间">
            <u-form-item label-width='132' label="回复时间">
                <span>{{ detailData.replyTime }}</span>
            </u-form-item>
        </u-form>
pages/report/report.vue
@@ -1,85 +1,524 @@
<template>
    <view class="container">
        <view class="service-box">
            <u-grid :col="3" :border="false">
                <u-grid-item bg-color="transparent" v-for="(item, index) in serviceButton" :key="index" @click="goBusinessPage(item.url,index)">
                    <view class="service-item">
                        <image :src="item.img" mode="widthFix" class="img"></image>
                        <view class="name">{{ item.name }}</view>
    <view class="page-container" style="height: 100%; position: relative;">
        <view class="head top-absolute">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
                :background="{ background: '#0BB9C8' }">
                <view class="nav-wrap">
                    <view style="position: relative;">
                        <view class="btn-return-box">
                            <view class="btn-return">
                                <i class="uni-btn-icon" @click="goReturnPage"
                                    style="color: rgb(255, 255, 255); font-size: 27px;"></i>
                            </view>
                        </view>
                        <span class="header-title">工作汇报</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
                </u-grid-item>
            </u-grid>
                </view>
            </u-navbar>
        </view>
        <view class="head">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
                :background="{ background: '#0BB9C8' }">
                <view class="nav-wrap">
                    <view style="position: relative;">
                        <view class="btn-return-box">
                            <view class="btn-return">
                                <i class="uni-btn-icon" @click="goReturnPage"
                                    style="color: rgb(255, 255, 255); font-size: 27px;"></i>
                            </view>
                        </view>
                        <span class="header-title">工作汇报</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
                </view>
            </u-navbar>
        </view>
        <view class="wrapper">
            <view class="body">
                <view class="body-content">
                    <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8"
                        inactive-color="#595959" height="100" @change="change"></u-tabs>
                    <u-search v-model='keyValue' placeholder='请输入汇报内容' shape="round" class="u-search" input-align="center"
                        height="70" @search='searchValue' @custom='searchValue' @clear='clearValue' @change='changeValue'>
                    </u-search>
                    <view v-show="current == 0 && newsList.length > 0">
                        <view class="inTmain" v-for="(item,index) in newsList">
                            <u-card :title="'汇报内容:' + item.content" @click="goDetail(item)">
                                <view class="" slot="body">
                                    <view>
                                        <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
                                            汇报人:{{item.realName}}</view>
                                    </view>
                                    <view>
                                        <view class="u-body-item-title u-line-1">
                                            汇报类型:{{item.type == 1 ? '日报' : item.type == 2 ? '周报' : '月报' }}</view>
                                    </view>
                                </view>
                                <view class="" slot="foot">
                                    </u-icon>汇报时间:{{item.reportTime}}</view>
                            </u-card>
                        </view>
                        <u-loadmore class='msg' :status="status" />
                    </view>
                    <view v-show="current == 1 && newsList.length > 0">
                        <view class="inTmain" v-for="(item,index) in newsList">
                            <u-card :title="'汇报内容:' + item.content" @click="goDetail(item)">
                                <view class="" slot="body">
                                    <view>
                                        <view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
                                            汇报人:{{item.realName}}
                                        </view>
                                    </view>
                                    <view>
                                        <view class="u-body-item-title u-line-1">
                                            汇报类型:{{item.type == 1 ? '日报' : item.type == 2 ? '周报' : '月报' }}</view>
                                    </view>
                                </view>
                                <view class="" slot="foot">
                                    </u-icon>汇报时间:{{item.reportTime}}</view>
                            </u-card>
                        </view>
                        <u-loadmore class='msg' :status="status" />
                    </view>
                    <view class="msg" v-show='newsList.length == 0'>
                        暂无数据
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import {
        fakeServiceButton
    } from "@/api/mock/report.js";
    export default {
        data() {
            return {
                dataList:[],
                serviceButton: []
                list: [{
                        name: '接收汇报'
                    },
                    {
                        name: '发送汇报'
                    }
                ],
                current: 0,
                dataList: [],
                newsList: [],
                status: 'loadmore',
                keyValue: '',
                dataList: [],
                newsList: [],
                pagelist: 0,
                pages: 0,
                flag: true,
            };
        },
        onLoad() {
        },
        onReachBottom() {
            var that = this;
            if (that.flag == false) {
                that.status = 'nomore';
                return
            }
            // 后续将改为与后端联动
            that.status = 'loading';
            setTimeout(() => {
                if (that.current == 0) {
                    that.getReceive();
                } else {
                    that.getSend();
                }
            }, 1000);
        },
        mounted() {
            this.getReceive();
        },
        methods: {
            onLoad() {
                // 加载服务按钮数据
                fakeServiceButton().then(data => {
                    this.serviceButton = data;
            getReceive() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/workReport/pageReply?deptId=" + this.$store.state.UserData
                        .dept_id + '&userId=' + this.$store.state.puserID,
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
                });
            },
            //页面跳转
            goBusinessPage(url,index){
                uni.navigateTo({
                    url:url
            getSend() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/workReport/page?deptId=" + this.$store.state.UserData
                        .dept_id + '&userId=' + this.$store.state.puserID,
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
                });
            },
            goDetail(item) {
                if (this.current == 0) {
                    uni.navigateTo({
                        url: './receiveDetail?detailData=' + JSON.stringify(item)
                    });
                } else {
                    uni.navigateTo({
                        url: './sendDetail?detailData=' + JSON.stringify(item)
                    });
                }
            },
            change(index) {
                if (this.current == index) return;
                this.dataList = [];
                this.newsList = [];
                this.pagelist = 0;
                this.pages = 0;
                this.flag = true;
                this.current = index;
                if (index == 0) {
                    this.getReceive();
                } else {
                    this.getSend();
                }
            },
            searchValue(value) {
                var that = this;
                var str = value.replace(/\s*/g, "");
                if (str == '') {
                    return
                } else {
                    that.newsList = [];
                    if (that.current == 0) {
                        uni.request({
                            url: this.$store.state.piAPI + "/workReport/pageReply?deptId=" + this.$store.state
                                .UserData
                                .dept_id + '&userId=' + this.$store.state.puserID,
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                content: str
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    } else {
                        uni.request({
                            url: this.$store.state.piAPI + "/workReport/page?deptId=" + this.$store.state.UserData
                                .dept_id + '&userId=' + this.$store.state.puserID,
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                content: str
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    }
                    that.flag = false
                    that.status = 'nomore';
                }
            },
            clearValue() {
                this.keyValue = ''
                this.newsList = [];
                this.dataList.forEach(item => {
                    this.newsList.push(item)
                })
            },
                if (this.pagelist < this.pages) {
                    this.flag = true;
                    this.status = 'loading';
                } else {
                    this.flag = false;
                    this.status = 'nomore';
                }
            },
            changeValue(value) {
                if (value == '') {
                    this.newsList = [];
                    this.dataList.forEach(item => {
                        this.newsList.push(item)
                    })
                    if (this.pagelist < this.pages) {
                        this.flag = true;
                        this.status = 'loading';
                    } else {
                        this.flag = false;
                        this.status = 'nomore';
                    }
                }
            },
            goReturnPage() {
                uni.switchTab({
                    url: '/pages/home/home'
                });
            },
            goToAddPage() {
                uni.navigateTo({
                    url: './initiate'
                });
            },
        }
    };
</script>
<style lang="scss">
    .container {
        background-color: #f7f7f7;
        min-height: 100vh;
        overflow: hidden;
    }
    .service-box {
        background: #ffffff;
        border-radius: 20px 20px 20px 20px;
        margin: 30rpx 20rpx 0;
        padding: 0rpx 20rpx;
    .page-container {
        position: fixed;
        display: block;
        width: 100%;
        max-height: 100vh;
        .service-item {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
        .head {
            position: relative;
            width: 100%;
            height: 120rpx;
            font-size: 26rpx;
            font-family: PingFang SC;
            font-weight: 500;
            color: #585b61;
            .img {
                width: 70rpx;
                height: auto;
            .nav-wrap {
                width: 100%;
                height: 44px;
                line-height: 30px;
                padding: 7px 3px;
                height: calc(44px + constant(safe-area-inset-top));
                height: calc(44px + env(safe-area-inset-top));
                color: rgb(255, 255, 255);
                .btn-return-box {
                    display: flex;
                    align-items: center;
                    font-size: 16px;
                    box-sizing: border-box;
                    .btn-return {
                        position: relative;
                        width: auto;
                        margin: 0 2px;
                        word-break: keep-all;
                        white-space: pre;
                        cursor: pointer;
                    }
                }
                .header-title {
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    margin: auto;
                    width: 60%;
                    font-weight: 700;
                    line-height: 30px;
                    font-size: 16px;
                    opacity: 1;
                    text-overflow: ellipsis;
                    text-align: center;
                    min-width: 1em;
                }
                .header-add {
                    position: absolute;
                    top: 0;
                    left: auto;
                    right: 3px;
                    bottom: 0;
                    margin: auto;
                    display: inline-block;
                    font: normal normal normal 14px/1 unibtn;
                    text-rendering: auto;
                    -webkit-font-smoothing: antialiased;
                    font-size: 24px;
                }
            }
        }
        .top-absolute {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 101;
        }
        .wrapper {
            width: 100%;
            display: block;
            height: calc(100% - 44px);
            height: calc(100% - 44px - constant(safe-area-inset-top));
            height: calc(100% - 44px - env(safe-area-inset-top));
            .body {
                width: 100%;
                height: 100%;
                overflow-x: hidden;
                overflow-y: auto;
                .body-content {
                    height: auto;
                }
            }
        }
    }
</style>
    .u-card-wrap {
        background-color: $u-bg-color;
        padding: 1px;
    }
    .u-body-item {
        font-size: 32rpx;
        color: #333;
        padding: 20rpx 10rpx;
    }
    .u-body-item image {
        width: 120rpx;
        flex: 0 0 120rpx;
        height: 120rpx;
        border-radius: 8rpx;
        margin-left: 12rpx;
    }
    .u-search {
        padding: 20rpx 30rpx 0 30rpx;
    }
    .inTmain {}
    .msg {
        height: 72rpx;
        line-height: 72rpx;
        text-align: center;
        color: #999;
    }
</style>
pages/report/send.vue
File was deleted
pages/report/sendDetail.vue
@@ -1,28 +1,28 @@
<template>
    <view class="container">
        <u-form :model="detailData" ref="uForm" class="send-detail">
            <u-form-item label-width='160' label="汇报人">
            <u-form-item label-width='132' label="汇报人">
                <span>{{ detailData.realName }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="汇报类别">
            <u-form-item label-width='132' label="汇报类别">
                <span>{{ detailData.category == 1 ? '保安向保安汇报' : detailData.category == 2 ? '保安向民警汇报' : '民警向民警汇报' }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="汇报类型">
            <u-form-item label-width='132' label="汇报类型">
                <span>{{ detailData.type == 1 ? '日报' : detailData.type == 2 ? '周报' : '月报'}}</span>
            </u-form-item>
            <u-form-item label-width='160' label="汇报内容">
            <u-form-item label-width='132' label="汇报内容">
                <span>{{ detailData.content }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="接收人">
            <u-form-item label-width='132' label="接收人">
                <span>{{ detailData.replyRealName }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="接收人单位">
            <u-form-item label-width='158' label="接收人单位">
                <span>{{ detailData.replyDeptName }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="回复内容">
            <u-form-item label-width='132' label="回复内容">
                <span>{{ detailData.replyContent }}</span>
            </u-form-item>
            <u-form-item label-width='160' label="汇报时间">
            <u-form-item label-width='132' label="汇报时间">
                <span>{{ detailData.reportTime }}</span>
            </u-form-item>
        </u-form>
pages/securityStaff/exhibition.vue
@@ -40,6 +40,7 @@
                status: 'loadmore',
                keyValue: '',
                pagelist: 0,
                pages: 0,
                flag: true
            };
        },
@@ -48,38 +49,19 @@
        },
        onReachBottom() {
            var that = this;
            if (that.dataList.length - 1 == that.pagelist && this.status != 'nomore' && that.flag == true) {
                that.newsList.push(that.dataList[that.pagelist]);
                this.status = 'nomore';
                that.flag = false;
                return;
            } else {
                if (that.flag == false) {
                    this.status = 'nomore';
                    return
                }
                // 后续将改为与后端联动
                this.status = 'loading';
                setTimeout(() => {
                    var flag = true;
                    for (var i = 0; i < 5; i++) {
                        if (that.pagelist <= that.dataList.length - 2 && flag == true) {
                            that.newsList.push(that.dataList[that.pagelist++])
                            if (that.dataList.length - 1 == that.pagelist) flag == false
                        }
                    }
                }, 2000);
            if (that.flag == false) {
                that.status = 'nomore';
                return
            }
            // 后续将改为与后端联动
            that.status = 'loading';
            setTimeout(() => {
                that.getCompany();
            }, 1000);
        },
        mounted() {
            this.getCompany();
@@ -87,35 +69,42 @@
        methods: {
            getCompany() {
                var that = this;
                if (that.pagelist < that.pages || that.pagelist == 0) {
                    that.pagelist++
                } else if (that.pagelist == that.pages) {
                    that.flag = false
                    that.status = 'nomore';
                    return
                }
                uni.request({
                    url: this.$store.state.piAPI + "/blade-user/page",
                    url: that.$store.state.piAPI + "/blade-user/pages",
                    method: "get",
                    data: {
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        that.dataList = resdata;
                        var flag = true;
                        for (var i = 0; i < 5; i++) {
                            if (that.pagelist <= that.dataList.length - 2) {
                                that.newsList.push(that.dataList[that.pagelist++]);
                            } else {
                                if (that.dataList.length - 1 == that.pagelist && flag == true) {
                                    that.newsList.push(that.dataList[that.pagelist]);
                                    flag = false;
                                    that.flag = false;
                                    this.status = 'nomore';
                                }
                            }
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                        }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
@@ -123,7 +112,7 @@
            },
            goDetail(item) {
                uni.navigateTo({
                    url: `../securityStaff/information?data=${JSON.stringify(item)}`
                    url: './information?detailData=' + JSON.stringify(item)
                });
            },
            searchValue(value) {
@@ -133,34 +122,60 @@
                    return
                } else {
                    that.newsList = [];
                    that.dataList.forEach(item => {
                        if (item.enterprisename.indexOf(str) != -1) {
                            that.newsList.push(item)
                    uni.request({
                        url: that.$store.state.piAPI + "/blade-user/pages",
                        method: "get",
                        data: {
                            current: 1,
                            size: 999999,
                            realName: str
                        },
                        success: (res) => {
                            var resdata = res.data.data.records;
                            resdata.forEach(item => {
                                that.newsList.push(item)
                            })
                        }
                    })
                    });
                    that.flag = false
                    that.status = 'nomore';
                }
            },
            clearValue() {
                this.keyValue = ''
                this.newsList = [];
                for (var i = 0; i < this.pagelist; i++) {
                    this.newsList.push(this.dataList[i])
                }
                if (this.flag == false) {
                    this.newsList.push(this.dataList[this.pagelist]);
                this.dataList.forEach(item => {
                    this.newsList.push(item)
                })
                if (this.pagelist < this.pages) {
                    this.flag = true;
                    this.status = 'loading';
                } else {
                    this.flag = false;
                    this.status = 'nomore';
                }
            },
            changeValue(value) {
                if (value == '') {
                    this.newsList = [];
                    for (var i = 0; i < this.pagelist; i++) {
                        this.newsList.push(this.dataList[i])
                    }
                    if (this.flag == false) {
                        this.newsList.push(this.dataList[this.pagelist]);
                    this.dataList.forEach(item => {
                        this.newsList.push(item)
                    })
                    if (this.pagelist < this.pages) {
                        this.flag = true;
                        this.status = 'loading';
                    } else {
                        this.flag = false;
                        this.status = 'nomore';
                    }
                }
            }
@@ -201,4 +216,3 @@
        color: #999;
    }
</style>
pages/securityStaff/information.vue
@@ -3,11 +3,6 @@
        <view class="head">
            <u-navbar :is-fixed="true" :border-bottom="false" :is-back="true" title="" :back-icon-color="'#fff'"
                :background="{ background: '#0BB9C8' }">
                <!-- <view class="search-input">
                    <u-search height="50" placeholder="请输入保安员名字查询" @custom="customSearch" @change="changeSearch"
                        :show-action="true" v-model="searchName" :animation="true" :margin="'80rpx'"
                        :action-style="{ color: '#fff' }"></u-search>
                </view> -->
            </u-navbar>
            <view class="head-bg"></view>
        </view>
@@ -15,28 +10,38 @@
            <view class="once sole">
                <i>照片</i>
                <!-- <image :src="datalist.imgSrc" mode=""></image> -->
                <u-image class="img" width="136rpx" height="136rpx" :src="datalist.avatar">
                <u-image class="img" width="136rpx" height="136rpx" :src="datalist.myPicture">
                    <view slot="error" style="font-size: 24rpx;">暂无照片</view>
                </u-image>
            </view>
            <view class="once">
                <i>姓名</i> <span> {{ datalist.realName }} </span>
            </view>
            <!-- <view class="once">
                性别  {{datalist.age}}
            </view> -->
            <view class="once">
                <i>组织</i> <span> {{ datalist.politicaloutlook }} </span>
                <i>性别</i> <span> {{ datalist.sex == 2 ? '女' : datalist.sex == 1 ? '男' : ' ' }} </span>
            </view>
            <view class="once">
                <i>公司</i> <span> {{ datalist.obj }} </span>
                <i>籍贯</i> <span> {{ datalist.nativePlace }} </span>
            </view>
            <view class="once">
                <i>荣誉</i> <span> {{ datalist.honor }} </span>
                <i>学历</i> <span> {{ datalist.education }} </span>
            </view>
            <view class="once">
                <i>违规</i> <span> {{ datalist.punishment }} </span>
                <i>出生日期</i> <span> {{ datalist.birthtime }} </span>
            </view>
            <view class="once">
                <i>政治面貌</i> <span> {{ datalist.politicaloutlook }} </span>
            </view>
            <view class="once">
                <i>联系电话</i> <span> {{ datalist.cell }} </span>
            </view>
            <view class="once">
                <i>所属公司</i> <span> {{ datalist.deptName }} </span>
            </view>
            <view class="once">
                <i>入职时间</i> <span> {{ datalist.rtime }} </span>
            </view>
            <view class="once">
                <u-button class="ubut" type="success" @click="openCongye" size="medium" :ripple="true"
                    ripple-bg-color="#fff">从业单位</u-button>
@@ -117,22 +122,29 @@
        data() {
            return {
                datalist: {
                    realName: '原俊袆',
                    age: '男',
                    obj: '适普科技',
                    honor: '扶老奶奶过马路',
                    punishment: '不看红绿灯',
                    avatar: "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
                    cardid: 342,
                    baoanzheng: "赣06284538",
                    fzobj: '南昌市公安局',
                    fztime: "2014.04.20",
                    politicaloutlook: '党员'
                    // realName: '原俊袆',
                    // age: '男',
                    // obj: '适普科技',
                    // honor: '扶老奶奶过马路',
                    // punishment: '不看红绿灯',
                    // avatar: "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
                    // cardid: 342,
                    // baoanzheng: "赣06284538",
                    // fzobj: '南昌市公安局',
                    // fztime: "2014.04.20",
                    // politicaloutlook: '党员'
                },
                showi: false,
                showc: false,
                cylist: []
            }
        },
        onLoad(event) {
            var that = this;
            this.datalist = JSON.parse(decodeURIComponent(event.detailData))
        },
        methods: {
            openCertificates() {
@@ -158,7 +170,6 @@
                        // for(var k = 1 ;k < 30; k++){
                        a.push(...d)
                        // }
                        console.log(d);
                        that.cylist = a;
                    }
@@ -180,10 +191,7 @@
            }
        },
        mounted() {
            if (this.$route.query.data != undefined) {
                this.datalist = JSON.parse(this.$route.query.data);
                console.log(this.datalist)
            }
            this.getcongye();
        }
@@ -244,12 +252,8 @@
                margin: 10px 0 10px 0;
            }
            .once:nth-child(6),
            .once:nth-child(5) {
                height: 88px;
            }
            .once:nth-child(7) {
            .once:last-child {
                background-color: transparent;
                display: flex;
                align-items: center;
store/actions.111.js
File was renamed from store/actions1.js
@@ -1,5 +1,6 @@
import md5 from 'js-md5'
import axios from 'axios'
const actions = {
    loging(store, data) {
        var user = [{
@@ -22,7 +23,6 @@
        // url ='http://192.168.0.109:82/blade-auth/oauth/token';
        // url ='http://192.168.0.109:82/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password';
        // url ='http://web.byisf.com/api/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password&scope=all';
        console.log(store.state.piAPI);
        wx.request({ //uniapp 自带axios
            url: url, //仅为示例,并非真实接口地址。
            // data: d,
@@ -38,14 +38,68 @@
                // "Content-Type":"",
                "Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
                "Tenant-Id": "963841"
                // "Cookie": "JSESSIONID=maOJY05vT2jj4nHwsQGSPgWWVFH1mY-TGWOLYCSh"
            },
            method: "post",
            //     // dataType: 'JSON',
            success: (res) => {
                var geolocation = null;
                var qqTime = setInterval(function() {
                    if (window.qq) {
                        console.log(window.qq);
                        geolocation = new qq.maps.Geolocation(
                            "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG",
                            "myapp");
                        clearInterval(qqTime)
                    }
                }, 1000)
                var getLocationData = (userId) => {
                    var positionNum = 0;
                    var options = {
                        timeout: 8000
                    };
                    function showPosition(position) {
                        var adCode = position.adCode; //邮政编码
                        var nation = position.nation; //中国
                        var city = position.city; //城市
                        var addr = position.addr; //详细地址
                        wx.request({
                            url: "http://223.82.109.183:2080/api/liveLocation/saveLiveLocationAndLocus",
                            method: "post",
                            data: {
                                type: 1,
                                workerId: userId,
                                longitude: position.lng,
                                latitude: position.lat,
                                location: addr == '' ? position.province + position.city :
                                    position.province + position
                                    .city +
                                    addr
                            }
                        }).then((result) => {
                        })
                    };
                    function showErr() {
                        //TODO 如果出错了调用此方法
                        alert(123)
                    };
                    geolocation.getLocation(showPosition, showErr, options);
                };
                if (res.statusCode == 200) {
                    console.log(res)
                    if (res.data.error_code == "400") {
                        uni.showToast({
                            title: '密码错误,请重试',
@@ -55,7 +109,6 @@
                        return;
                    }
                    store.commit('getUserData', res.data)
                    // console.log(res.data,123542);
                    data.isit = true;
                    data.userName = res.data.nick_name; //警袁姓名
                    data.userID = res.data.user_id; //警袁id
@@ -63,14 +116,21 @@
                    data.accounts = data.name;
                    data.pass = data.pass;
                    // data.userPhon = res.user_id;
                    // uni.getLocation({
                    //     type: 'wgs84',
                    //     geocode: true,
                    //     success: (res) => {
                    //     }
                    // })
                    setInterval(function() {
                    uni.getLocation({
                        type: 'wgs84',
                        geocode: true,
                        success: (res) => {
                            console.log(res, 3333)
                        }
                    })
                            if (geolocation != null) {
                                getLocationData(res.data.user_id);
                            }
                        },
                        30000);
                    uni.request({
                        url: "http://223.82.109.183:2080/api/blade-system/dept/detail?id=" + res
@@ -111,6 +171,7 @@
        // }, 2000)
    }
}
export default actions
store/actions.js
@@ -1,47 +1,5 @@
import md5 from 'js-md5'
import axios from 'axios'
const getLocationData = (userId) => {
    var geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "myapp");
    var positionNum = 0;
    var options = {
        timeout: 8000
    };
    function showPosition(position) {
        var adCode = position.adCode; //邮政编码
        var nation = position.nation; //中国
        var city = position.city; //城市
        var addr = position.addr; //详细地址
        wx.request({
            url: "http://223.82.109.183:2080/api/liveLocation/saveLiveLocationAndLocus",
            method: "post",
            data: {
                type: 1,
                workerId: userId,
                longitude: position.lng,
                latitude: position.lat,
                location: addr == '' ? position.province + position.city : position.province + position
                    .city +
                    addr
            }
        }).then((res) => {
        })
    };
    function showErr() {
        //TODO 如果出错了调用此方法
    };
    geolocation.getLocation(showPosition, showErr, options);
};
const actions = {
    loging(store, data) {
        var user = [{
@@ -86,6 +44,7 @@
            method: "post",
            //     // dataType: 'JSON',
            success: (res) => {
                if (res.statusCode == 200) {
                    if (res.data.error_code == "400") {
                        uni.showToast({
@@ -96,6 +55,7 @@
                        return;
                    }
                    store.commit('getUserData', res.data)
                    // console.log(res.data,123542);
                    data.isit = true;
                    data.userName = res.data.nick_name; //警袁姓名
                    data.userID = res.data.user_id; //警袁id
@@ -103,17 +63,76 @@
                    data.accounts = data.name;
                    data.pass = data.pass;
                    // data.userPhon = res.user_id;
                    uni.getLocation({
                        type: 'wgs84',
                        geocode: true,
                        success: (res) => {
                        }
                    })
                    getLocationData(res.data.user_id)
                    // 实时定位获取得方法
                    setInterval(function() {
                            getLocationData(res.data.user_id);
                        },
                        30000)
                        uni.request({
                            type: "get", //接口规定,只能用get
                            async: true, //异步
                            url: "https://apis.map.qq.com/ws/location/v1/ip?key=7WKBZ-QDY62-WEEUG-C7KUN-ADAF5-L5BKZ", //接口地址
                            data: {
                                output: "jsonp"
                            }, //参数格式必须用到output传参为jsonp,否则会报跨域问题
                            dataType: "jsonp",
                            success: function(wzres) {
                                if (wzres.data.result) {
                                    uni.request({
                                        url: "http://223.82.109.183:2080/api/liveLocation/saveLiveLocationAndLocus",
                                        method: "post",
                                        data: {
                                            type: 1,
                                            workerId: res.data.user_id,
                                            longitude: wzres.data.result
                                                .location.lng,
                                            latitude: wzres.data.result
                                                .location.lat,
                                            location: wzres.data.result
                                                .ad_info
                                                .province + wzres.data
                                                .result.ad_info
                                                .city +
                                                wzres.data
                                                .result
                                                .ad_info.district + '测试'
                                        }
                                    })
                                } else {
                                    var wzdata = JSON.parse(wzres.data.substring(13,
                                        wzres.data
                                        .length - 1));
                                    uni.request({
                                        url: "http://223.82.109.183:2080/api/liveLocation/saveLiveLocationAndLocus",
                                        method: "post",
                                        data: {
                                            type: 1,
                                            workerId: res.data.user_id,
                                            longitude: wzdata.result
                                                .location.lng,
                                            latitude: wzdata.result.location
                                                .lat,
                                            location: wzdata.result.ad_info
                                                .province + wzdata.result
                                                .ad_info.city +
                                                wzdata
                                                .result
                                                .ad_info.district
                                        }
                                    })
                                }
                            }
                        })
                    }, 30000)
                    uni.request({
                        url: "http://223.82.109.183:2080/api/blade-system/dept/detail?id=" + res
@@ -154,7 +173,6 @@
        // }, 2000)
    }
}
export default actions
template.h5.html
@@ -15,16 +15,7 @@
                document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
            })
        </script>
        <!-- 百度地图api -->
        <script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js">
        </script>
        <!-- 微信支持 -->
        <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
        <!-- <script src="./js/wx.js"></script> -->
        <!-- uni 的 SDK -->
        <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js">
        </script>
    </head>
    <body>
        <noscript>