智慧保安互联网APP
shuishen
2021-10-11 b48a5f64fe196bee6f1c7eb0be1b78c9ebec0860
修改完善
28 files modified
3 files added
1902 ■■■■ changed files
api/mock/home.js 2 ●●● patch | view | raw | blame | history
components/contacts/contacts.vue 19 ●●●●● patch | view | raw | blame | history
components/submit/submit.vue 13 ●●●●● patch | view | raw | blame | history
exam-app.iml 9 ●●●●● patch | view | raw | blame | history
mapWz/css/body.css 10 ●●●● patch | view | raw | blame | history
mapWz/js/vueMain.js 30 ●●●●● patch | view | raw | blame | history
pages.json 4 ●●●● patch | view | raw | blame | history
pages/dispatch/dispatch.vue 46 ●●●● patch | view | raw | blame | history
pages/dispatch/imgissue.vue 175 ●●●● patch | view | raw | blame | history
pages/examine/addpeople.vue 136 ●●●●● patch | view | raw | blame | history
pages/examine/addunit.vue 117 ●●●● patch | view | raw | blame | history
pages/examine/examine.vue 11 ●●●●● patch | view | raw | blame | history
pages/groupChat/chating.vue 125 ●●●● patch | view | raw | blame | history
pages/groupChat/groupChat.vue 5 ●●●● patch | view | raw | blame | history
pages/groupChat/newGroup/newGroup.vue 25 ●●●● patch | view | raw | blame | history
pages/home/home.vue 215 ●●●● patch | view | raw | blame | history
pages/login/login-account.vue 4 ●●●● patch | view | raw | blame | history
pages/manage/manage.vue 55 ●●●● patch | view | raw | blame | history
pages/map/map.vue 42 ●●●● patch | view | raw | blame | history
pages/message/addMessage.vue 114 ●●●● patch | view | raw | blame | history
pages/message/message.vue 12 ●●●●● patch | view | raw | blame | history
pages/report/initiate.vue 293 ●●●● patch | view | raw | blame | history
pages/report/report.vue 12 ●●●● patch | view | raw | blame | history
pages/securityStaff/exhibition.vue 196 ●●●●● patch | view | raw | blame | history
pages/securityStaff/information.vue 19 ●●●● patch | view | raw | blame | history
pages/user/center.vue 25 ●●●● patch | view | raw | blame | history
pages/user/profile.vue 183 ●●●● patch | view | raw | blame | history
static/start-audio.png patch | view | raw | blame | history
static/start-input.png patch | view | raw | blame | history
store/index.js 4 ●●●● patch | view | raw | blame | history
utils/func.js 1 ●●●● patch | view | raw | blame | history
api/mock/home.js
@@ -138,7 +138,7 @@
                    url: '../examine/examine'
                },
                {
                    name: '位置查看',
                    name: '保安员位置',
                    img: '/static/images/wz.png',
                    url: '../map/map'
                }
components/contacts/contacts.vue
@@ -9,7 +9,7 @@
                </view>
                <view class="content-wrap">
                    <text class="name">{{Pdata.recipientName}}</text>
                    <text class="mess">{{Pdata.postMessage}}</text>
                    <text class="mess">{{isJSON(Pdata.postMessage) == true ?  '[语音]' : Pdata.postMessage}}</text>
                </view>
                <view class="data-wrap">
                    <text class="data">{{Pdata.postTime}}</text>
@@ -66,6 +66,23 @@
            }
        },
        methods: {
            isJSON(str) {
                if (typeof str == 'string') {
                    try {
                        var obj = JSON.parse(str);
                        if (typeof obj == 'object' && obj) {
                            return true;
                        } else {
                            return false;
                        }
                    } catch (e) {
                        return false;
                    }
                }
            },
            beginObj() {
                this.bmainb = '3rem';
                //#ifdef MP-WEIXIN
components/submit/submit.vue
@@ -3,7 +3,7 @@
        <view class="submit">
            <view class="submit-chat">
                <view class="bt-img">
                    <image src="../../static/images/chatroom/voice.png" mode="" @tap="records" />
                    <image :src="audio" mode="" @tap="records" />
                </view>
                <textarea auto-height="true" class="chat-send btn" :class="{displaynone: isrecord}" @input="inputs"
                    v-model="msg" @focus="focus" />
@@ -87,6 +87,7 @@
                timer: '',
                vlength: 0,
                pageY: 0,
                audio: "../../static/start-audio.png"
            };
        },
        mounted() {
@@ -105,12 +106,19 @@
            },
            // 点击切换音频
            records() {
                if (this.audio == "../../static/start-audio.png") {
                    this.audio = "../../static/start-input.png"
                } else {
                    this.audio = "../../static/start-audio.png"
                }
                this.isrecord = !this.isrecord
                this.isemoji = false
                this.ismore = false
                setTimeout(() => {
                    this._getElementHeight()
                }, 10)
            },
            // 点击弹出表情
            emoji() {
@@ -170,10 +178,12 @@
            },
            // 发送消息
            send(msg, type) {
                let data = {
                    message: msg,
                    types: type
                }
                this.$emit('inputs', data)
                setTimeout(() => {
                    this.msg = ''
@@ -225,6 +235,7 @@
                clearInterval(this.timer)
                recorderManager.stop()
                recorderManager.onStop((res) => {
                    console.log(res, 4589)
                    let data = {
                        voice: res.tempFilePath,
                        time: this.vlength
exam-app.iml
New file
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
  <component name="NewModuleRootManager">
    <output url="file://$MODULE_DIR$/bin" />
    <exclude-output />
    <content url="file://$MODULE_DIR$" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>
mapWz/css/body.css
@@ -11,7 +11,7 @@
html,
body,
#mapVue {
#mapVue {.dingwei
    width: 100%;
    height: 100%;
}
@@ -29,10 +29,10 @@
.dingwei {
    position: fixed;
    width: 38px;
    height: 38px;
    top: 100px;
    right: 0;
    width: 34px;
    height: 34px;
    right: 10px;
    bottom: 10px;
    z-index: 100;
    background-color: #fff;
    border-radius: 20px;
mapWz/js/vueMain.js
@@ -1,8 +1,8 @@
/*
 * @Author: Morpheus 
 * @Date: 2021-08-26 16:22:11 
 * @Last Modified by:   Morpheus
 * @Last Modified time: 2021-08-26 16:22:11
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-08-28 15:03:25
 */
var me = new Vue({
    el: '#mapVue',
@@ -43,7 +43,25 @@
            this.userId = this.GetQueryString('userid')
            axios.get('http://223.82.109.183:2080/api/blade-user/pages?dispatch=0&jurisdiction=' + jurisdictionId + '&current=1&size=999999').then((res) => {
            var deptid = this.GetQueryString('deptid')
            var roleName = this.GetQueryChinese('roleName')
            console.log(roleName)
            var url = ''
            if (roleName == '保安公司管理员') {
                url = 'http://223.82.109.183:2080/api/blade-user/pages?&current=1&size=999999&deptId=' + deptid
            } else {
                url = 'http://223.82.109.183:2080/api/blade-user/pages?dispatch=0&jurisdiction=' + jurisdictionId + '&current=1&size=999999'
            }
            axios.get(url).then((res) => {
                if (res.data.data.records.length > 0) {
                    res.data.data.records.forEach(item => {
@@ -68,6 +86,12 @@
            if (r != null) return unescape(r[2]);
            return null;
        },
        GetQueryChinese(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return decodeURI(r[2]);
            return null;
        },
        beginMap(map, data) {
            var that = this,
                center = [28.708432053474827, 115.85883507433789];
pages.json
@@ -221,7 +221,7 @@
        {
            "path": "pages/message/addMessage",
            "style": {
                "navigationBarTitleText": "新增通知通告",
                "navigationBarTitleText": "发送通知",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
@@ -271,7 +271,7 @@
        }, {
            "path": "pages/map/map",
            "style": {
                "navigationBarTitleText": "位置查看",
                "navigationBarTitleText": "保安员位置",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle": "white"
pages/dispatch/dispatch.vue
@@ -17,7 +17,8 @@
                        <span class="header-title">调度指令</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        <u-icon v-if="$store.state.UserData.rname[0].indexOf('保安') == -1" @click="goToAddPage" top='4'
                            class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
@@ -120,13 +121,7 @@
        data() {
            return {
                list: [{
                        name: '发送指令'
                    },
                    {
                        name: '接收指令'
                    }
                ],
                list: [],
                current: 0,
@@ -147,6 +142,32 @@
            };
        },
        onLoad() {
            if (this.$store.state.UserData.rname[0] == '保安') {
                this.list = [{
                    name: '接收指令查询'
                }]
                this.getSend();
            } else if (this.$store.state.UserData.rname[0] == '保安公司管理员') {
                this.list = [{
                    name: '接收指令查询'
                }]
                this.getSend();
            } else {
                this.list = [{
                    name: '下发指令查询'
                }, {
                    name: '接收指令查询'
                }]
                this.getReceive()
            }
        },
        onReachBottom() {
@@ -189,7 +210,6 @@
        },
        mounted() {
            this.getReceive();
        },
        methods: {
            getReceive() {
@@ -204,7 +224,7 @@
                }
                uni.request({
                    url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store.state
                    url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state
                        .puserID,
                    method: "get",
                    data: {
@@ -253,7 +273,7 @@
                }
                uni.request({
                    url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state.puserID,
                    url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store.state.puserID,
                    method: "get",
                    data: {
                        current: that.pagelist,
@@ -263,7 +283,7 @@
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (this.pullDown == true) {
                            this.pullDown = false;
                            uni.stopPullDownRefresh();
@@ -470,7 +490,7 @@
                    position: absolute;
                    top: 0;
                    left: auto;
                    right: 3px;
                    right: 10px;
                    bottom: 0;
                    margin: auto;
                    display: inline-block;
pages/dispatch/imgissue.vue
@@ -1,20 +1,47 @@
<template>
    <view class="container">
        <view class='initiae-box'>
        <view class="group-chat-box">
            <u-form :model="form" ref="uForm">
                <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='158' prop="recipientText" label="指令接收人" :required="true">
                    <u-input v-model="form.recipientText" type="select" placeholder="请选择接收人" :border="false"
                        @click="recipientClick" />
                    <u-select v-model="recipientShow" mode="mutil-column-auto" :list="recipientList"
                        @confirm="recipientConfirm">
                    </u-select>
                    <u-button slot="right" type="success" size="mini" @click="recipientClick">选择接收人</u-button>
                    <u-popup :closeable="true" v-model="recipientShow" mode="bottom" height="50%" border-radius="14">
                        <view>
                            <u-checkbox-group v-show="recipientList.length > 0" @change="checkboxGroupChange"
                                :wrap='true' :size="40">
                                <u-checkbox v-model="item.checked" v-for="(item, index) in recipientList" :key="index"
                                    :name="item.id" shape="circle"
                                    style="padding: 0 40rpx; height: 92rpx; position: relative; box-sizing: border-box;">
                                    <view style="margin-left: 22rpx">
                                        {{item.real_name}}
                                    </view>
                                </u-checkbox>
                            </u-checkbox-group>
                            <view style=" height: 92rpx; padding: 0 40rpx;" v-show="recipientList.length == 0">
                                暂无数据
                            </view>
                        </view>
                    </u-popup>
                </u-form-item>
                <u-form-item label-width='184' label="指令相关图片" class='imgissue-upload'>
@@ -24,13 +51,19 @@
                </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 class="establish-box">
            <u-button class="submit" type="primary" @click="initiateClick">发送</u-button>
        </view>
        <view>
            <u-toast ref="uToast" />
        </view>
    </view>
</template>
@@ -48,7 +81,7 @@
                form: {
                    content: '',
                    recipient: '',
                    recipientText: ''
                    recipientData: []
                },
                rules: {
@@ -58,11 +91,7 @@
                        message: '指令内容不能少于5个字',
                        trigger: ['change', 'blur'],
                    }],
                    recipientText: [{
                        required: true,
                        message: '请选择接收人',
                        trigger: ['change', 'blur'],
                    }],
                },
                imgs: [],
            };
@@ -78,39 +107,33 @@
        methods: {
            recipientClick() {
                uni.request({
                    url: this.$store.state.piAPI + "/blade-system/dept/lazy-tree-user-app?userId=" + this.$store
                        .state
                        .UserData.user_id,
                    url: this.$store.state.piAPI + "/blade-user/seleL",
                    method: "get",
                    data: {
                        type: 1,
                        jurisdiction: this.$store.state
                            .UserData.jurisdiction,
                    },
                    success: (res) => {
                        this.recipientList = []
                        res.data.forEach(item => {
                            if (item.hasChildren) {
                        res.data.data.forEach(item => {
                            if (item.id != this.$store.state
                                .UserData.user_id
                            ) {
                                item.checked = false;
                                this.recipientList.push(item)
                            }
                        })
                        this.recipientShow = true;
                    }
                });
            },
            recipientConfirm(e) {
                if (e.length == 1) {
                    this.form.recipient = e[0].value
                    this.form.recipientText = e[0].label
                } else if (e.length == 2) {
                    this.form.recipient = e[1].value
                    this.form.recipientText = e[1].label
                } else if (e.length == 3) {
                    this.form.recipient = e[2].value
                    this.form.recipientText = e[2].label
                }
            },
            initiateClick() {
                var imgurl = '';
                this.imgs.forEach((item, index) => {
@@ -122,12 +145,28 @@
                })
                this.$refs.uForm.validate(valid => {
                    if (valid) {
                        if (this.form.recipientData.length == 0) {
                            this.$refs.uToast.show({
                                title: '请最少选择一个接收人',
                            })
                            return
                        }
                        var str = '';
                        this.form.recipientData.forEach(item => {
                            str += item + ','
                        })
                        str = str.substr(0, str.length - 1);
                        uni.request({
                            url: this.$store.state.piAPI + "/directive/saveDirectiveAndFile",
                            method: "post",
                            data: {
                                // 接收
                                receiveDirectiveIds: this.form.recipient,
                                receiveDirectiveIds: str,
                                // 发送
                                sendDirectiveId: this.$store.state
                                    .UserData.user_id,
@@ -136,11 +175,11 @@
                            },
                            success: (res) => {
                                if (res.data.msg == "操作成功") {
                                if (res.data.msg.indexOf('成功') != -1) {
                                    this.$refs.uToast.show({
                                        title: '指令下发成功',
                                        type: 'success',
                                        url: '/pages/home/home'
                                        url: '/pages/dispatch/dispatch'
                                    })
                                }
                            }
@@ -206,13 +245,57 @@
                    }
                });
            },
            checkboxGroupChange(e) {
                this.form.recipientData = e
            },
        }
    };
</script>
<style lang="scss">
    .initiae-box {
        padding: 0 30rpx;
    .submit {
        border: none;
        width: 94%;
        height: 86rpx;
        line-height: 86rpx;
        box-sizing: border-box;
        border-radius: 15rpx;
        color: #ffffff;
        font-size: 38rpx;
    }
    .container {
        height: 100%;
        .group-chat-box {
            height: calc(100% - 116rpx);
            padding: 0 36rpx;
            box-sizing: border-box;
            overflow-y: auto;
        }
        .establish-box {
            position: relative;
            height: 116rpx;
            background: #fff;
            text-align: center;
            uni-button {
                margin: 0;
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                margin: auto;
            }
        }
    }
</style>
pages/examine/addpeople.vue
@@ -1,6 +1,6 @@
<template>
    <view class="container">
        <view class='initiae-box'>
        <view class="group-chat-box">
            <u-form :model="form" ref="uForm">
                <u-form-item label-width='132' label="检查人">
@@ -36,12 +36,13 @@
                </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 class="establish-box">
            <u-button class="submit" type="primary" @click="initiateClick">发送</u-button>
        </view>
        <view>
            <u-toast ref="uToast" />
        </view>
    </view>
</template>
@@ -105,40 +106,43 @@
        methods: {
            peopleClick() {
                uni.request({
                    url: this.$store.state.piAPI + "/blade-system/dept/lazy-tree-user-app?type=1",
                    url: this.$store.state.piAPI + "/blade-user/seleL",
                    method: "get",
                    data: {
                        type: 1,
                        jurisdiction: this.$store.state
                            .UserData.jurisdiction,
                    },
                    success: (res) => {
                        this.peopleList = []
                        res.data.forEach(item => {
                            if (item.hasChildren == true) {
                        res.data.data.forEach(item => {
                            if (item.id != this.$store.state
                                .UserData.user_id
                            ) {
                                item.value = item.cardid
                                item.label = item.real_name
                                this.peopleList.push(item)
                            }
                        })
                        this.peopleShow = true;
                    }
                });
            },
            peopleConfirm(e) {
                if (e.length == 1) {
                    this.form.people = e[0].value
                    this.form.peopleText = e[0].label
                } else if (e.length == 2) {
                    this.form.people = e[1].value
                    this.form.peopleText = e[1].label
                    this.form.unitText = e[0].label
                } else if (e.length == 3) {
                    this.form.people = e[2].value
                    this.form.peopleText = e[2].label
                    this.form.unitText = e[1].label
                }
                this.form.people = e[0].value
                this.form.peopleText = e[0].label
            },
            getCurrentTime() {
@@ -164,20 +168,7 @@
                        imgurl += item.src + ','
                    }
                })
                var carid = ''
                console.log(this.peopleList)
                this.peopleList.forEach(item => {
                    item.children.forEach(it => {
                        if (it.value == this.form.people) {
                            carid == it.idCardNo
                        }
                    })
                })
                this.$refs.uForm.validate(valid => {
                    if (valid) {
                        uni.request({
@@ -188,14 +179,14 @@
                                deptname: this.createData.deptName,
                                realname: this.form.peopleText,
                                sname: this.form.unitText,
                                carid: carid,
                                carid: this.form.people,
                                reviewtime: this.getCurrentTime(),
                                insid: this.form.content,
                                examinationType: this.form.outcome,
                                url: imgurl
                            },
                            success: (res) => {
                                if (res.data.msg == "操作成功") {
                                if (res.data.msg.indexOf('成功') != -1) {
                                    this.$refs.uToast.show({
                                        title: '新增人员检查成功',
                                        type: 'success',
@@ -221,6 +212,7 @@
                    sizeType: ['compressed', 'original'], //上传压缩图,原图
                    sourceType: ['album', 'camera'], //从相册选择或从使用相机
                    success: async (res) => {
                        for (var i = 0; i < res.tempFiles.length; i++) {
                            if (res.tempFiles[i].size > 10 * 1024 * 1000) { //上传图片大小限制
                                uni.showToast({
@@ -230,6 +222,7 @@
                                return
                            }
                        }
                        var tempFilePath = res.tempFilePaths;
                        // try {
                        uni.showLoading({
@@ -249,19 +242,34 @@
                                    'user': 'test' // 上传附带参数
                                },
                                success: (data) => {
                                    console.log(data, JSON.parse(data.data).data)
                                    function isJSON_test(str) {
                                        if (typeof str == 'string') {
                                            try {
                                                var obj = JSON.parse(str);
                                                return obj.data;
                                            } catch (e) {
                                                return str;
                                            }
                                        }
                                        console.log('It is not a string!')
                                    }
                                    uni.showToast({
                                        title: '上传图片成功!',
                                        duration: 1000
                                    });
                                    // 根据接口具体返回格式   赋值具体对应url
                                    that.imgs.push({
                                        id: i,
                                        src: JSON.parse(data.data).data
                                        src: isJSON_test(data.data)
                                    })
                                }
                            });
                        }
                    }
                });
            },
@@ -271,7 +279,45 @@
<style lang="scss">
    .initiae-box {
        padding: 0 30rpx;
    .submit {
        border: none;
        width: 94%;
        height: 86rpx;
        line-height: 86rpx;
        box-sizing: border-box;
        border-radius: 15rpx;
        color: #ffffff;
        font-size: 38rpx;
    }
    .container {
        height: 100%;
        .group-chat-box {
            height: calc(100% - 116rpx);
            padding: 0 36rpx;
            box-sizing: border-box;
            overflow-y: auto;
        }
        .establish-box {
            position: relative;
            height: 116rpx;
            background: #fff;
            text-align: center;
            uni-button {
                margin: 0;
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                margin: auto;
            }
        }
    }
</style>
pages/examine/addunit.vue
@@ -1,6 +1,6 @@
<template>
    <view class="container">
        <view class='initiae-box'>
        <view class="group-chat-box">
            <u-form :model="form" ref="uForm">
                <u-form-item label-width='132' label="检查人">
@@ -36,12 +36,12 @@
                </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 class="establish-box">
            <u-button class="submit" type="primary" @click="initiateClick">发送</u-button>
        </view>
        <view>
            <u-toast ref="uToast" />
        </view>
    </view>
</template>
@@ -105,36 +105,39 @@
        methods: {
            unitClick() {
                uni.request({
                    url: this.$store.state.piAPI + "/blade-system/dept/lazy-tree-user-app?type=1",
                    url: this.$store.state.piAPI + "/blade-system/dept/security_lazy-tree",
                    method: "get",
                    data: {
                        jurisdiction: this.$store.state
                            .UserData.jurisdiction,
                    },
                    success: (res) => {
                        this.unitList = []
                        res.data.forEach(item => {
                            if (item.hasChildren == true) {
                                this.unitList.push(item)
                            }
                        res.data.data.forEach(item => {
                            var data = {}
                            data.value = item.id
                            data.label = item.title
                            this.unitList.push(data)
                        })
                        this.unitShow = true;
                    }
                });
            },
            unitConfirm(e) {
                if (e.length == 1) {
                    this.form.unit = e[0].value
                    this.form.unitText = e[0].label
                } else if (e.length == 2) {
                    this.form.unit = e[1].value
                    this.form.unitText = e[1].label
                } else if (e.length == 3) {
                    this.form.unit = e[2].value
                    this.form.unitText = e[2].label
                }
                this.form.unit = e[0].value
                this.form.unitText = e[0].label
            },
@@ -176,7 +179,7 @@
                                url: imgurl
                            },
                            success: (res) => {
                                if (res.data.msg == "操作成功") {
                                if (res.data.msg.indexOf('成功') != -1) {
                                    this.$refs.uToast.show({
                                        title: '新增单位检查成功',
                                        type: 'success',
@@ -202,6 +205,7 @@
                    sizeType: ['compressed', 'original'], //上传压缩图,原图
                    sourceType: ['album', 'camera'], //从相册选择或从使用相机
                    success: async (res) => {
                        for (var i = 0; i < res.tempFiles.length; i++) {
                            if (res.tempFiles[i].size > 10 * 1024 * 1000) { //上传图片大小限制
                                uni.showToast({
@@ -211,13 +215,16 @@
                                return
                            }
                        }
                        var tempFilePath = res.tempFilePaths;
                        // try {
                        uni.showLoading({
                            title: "上传中...",
                            mask: true
                        })
                        var that = this;
                        // 循环调用uni.uploadFile ,因微信小程序只支持单文件上传
                        for (var i = 0; i < tempFilePath.length; i++) {
                            uni.uploadFile({
@@ -230,19 +237,33 @@
                                    'user': 'test' // 上传附带参数
                                },
                                success: (data) => {
                                    console.log(data, JSON.parse(data.data).data)
                                    function isJSON_test(str) {
                                        if (typeof str == 'string') {
                                            try {
                                                var obj = JSON.parse(str);
                                                return obj.data;
                                            } catch (e) {
                                                return str;
                                            }
                                        }
                                        console.log('It is not a string!')
                                    }
                                    uni.showToast({
                                        title: '上传图片成功!',
                                        duration: 1000
                                    });
                                    // 根据接口具体返回格式   赋值具体对应url
                                    that.imgs.push({
                                        id: i,
                                        src: JSON.parse(data.data).data
                                        src: isJSON_test(data.data)
                                    })
                                }
                            });
                        }
                    }
                });
            },
@@ -252,7 +273,45 @@
<style lang="scss">
    .initiae-box {
        padding: 0 30rpx;
    .submit {
        border: none;
        width: 94%;
        height: 86rpx;
        line-height: 86rpx;
        box-sizing: border-box;
        border-radius: 15rpx;
        color: #ffffff;
        font-size: 38rpx;
    }
    .container {
        height: 100%;
        .group-chat-box {
            height: calc(100% - 116rpx);
            padding: 0 36rpx;
            box-sizing: border-box;
            overflow-y: auto;
        }
        .establish-box {
            position: relative;
            height: 116rpx;
            background: #fff;
            text-align: center;
            uni-button {
                margin: 0;
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                margin: auto;
            }
        }
    }
</style>
pages/examine/examine.vue
@@ -17,7 +17,8 @@
                        <span class="header-title">现场检查</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        <u-icon v-if="$store.state.UserData.rname[0].indexOf('保安') == -1" @click="goToAddPage" top='4'
                            class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
@@ -130,10 +131,10 @@
            return {
                list: [{
                        name: '保安检查'
                        name: '保安员检查列表'
                    },
                    {
                        name: '单位检查'
                        name: '单位检查列表'
                    }
                ],
@@ -217,6 +218,8 @@
                    url: this.$store.state.piAPI + "/seinspect/list",
                    method: "get",
                    data: {
                        deptId: this.$store.state.UserData
                            .dept_id,
                        current: that.pagelist,
                        size: 10
                    },
@@ -490,7 +493,7 @@
                    position: absolute;
                    top: 0;
                    left: auto;
                    right: 3px;
                    right: 10px;
                    bottom: 0;
                    margin: auto;
                    display: inline-block;
pages/groupChat/chating.vue
@@ -1,19 +1,20 @@
<template>
    <view class="container">
        <!-- 头部 -->
        <u-navbar style="position: relative;" :is-fixed="false" :border-bottom="true" :is-back="true"
            :title="recName" back-icon-color="#fff" :background="{ background: '#0BB9C8' }" title-color="#fff">
        <u-navbar style="position: relative;" :is-fixed="false" :border-bottom="true" :is-back="true" :title="recName"
            back-icon-color="#fff" :background="{ background: '#0BB9C8' }" title-color="#fff">
            <view slot='right'>
                <u-icon @click="chatMessageDetail" class="set-icon" name="more-dot-fill" color="#fff" size="28"></u-icon>
                <u-icon @click="chatMessageDetail" class="set-icon" name="more-dot-fill" color="#fff" size="28">
                </u-icon>
            </view>
        </u-navbar>
        <scroll-view id="chatingBox" :style="{ height: swiperHeight + 'px' }" scroll-y="true" class="chat" scroll-with-animation="isanimation" :scroll-into-view="scrollToView"
            @scrolltoupper="nextPage">
        <scroll-view id="chatingBox" :style="{ height: swiperHeight + 'px' }" scroll-y="true" class="chat"
            scroll-with-animation="isanimation" :scroll-into-view="scrollToView" @scrolltoupper="nextPage">
            <view class="chat-main" :style="{paddingBottom:inputh + 'px'}">
                <view class="loading" :class="{displaynone:isload}">
                    <image src="@/static/images/chatroom/load.png" mode="" class="loading-img"
@@ -35,10 +36,12 @@
                        </view>
                        <!-- voice -->
                        <view class="message" v-if="item.messageType == 2">
                            <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 'px'}"
                                @tap="playVoice(item.postMessage.voice)">
                            <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 50 + 'px'}"
                                @tap="playVoice(item.postMessage)">
                                <image src="../../static/images/chatroom/sound.png" mode="" class="voice-img" />
                                {{ item.postMessage.time }} "
                                {{ item.postMessage.time }}"
                            </view>
                        </view>
                        <!-- location -->
@@ -63,9 +66,9 @@
                        </view>
                        <!-- voice -->
                        <view class="message" v-if="item.messageType == 2">
                            <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 'px'}"
                                @tap="playVoice(item.postMessage.voice)">
                                {{ item.postMessage.time }} "
                            <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 50 + 'px'}"
                                @tap="playVoice(item.postMessage)">
                                {{ item.postMessage.time }}"
                                <image src="@/static/images/chatroom/sound.png" mode="" class="voice-img" />
                            </view>
                        </view>
@@ -98,7 +101,7 @@
    import filter from '@/config/filter.js'
    import submit from '@/components/submit/submit.vue'
    import WxStorage from "../../static/lib/wxStorage.js"
    const innerAudioContext = uni.createInnerAudioContext()
    export default {
        data() {
@@ -122,7 +125,8 @@
                isanimation: true,
                begainloading: true,
                name: [] //视频 双方id
                name: [], //视频 双方id
                innerAudioContext: uni.createInnerAudioContext()
            };
        },
        components: {
@@ -132,7 +136,13 @@
            this.recipientId = option.chatID;
            this._getMsg(this.nowpage)
            // this.nextPage()
            var data = JSON.parse(option.data)
            var data = option.data
            if (this.isJSON(option.data) == true) {
                data = JSON.parse(option.data)
            }
            console.log(data, 55555555555555555555555)
            this.name = ['wo', option.chatID];
            // console.log(data)
@@ -141,13 +151,14 @@
            } else {
                this.callName = data.recipientName;
            }
        },
        onReady() {
            let that = this;
            uni.getSystemInfo({
                success(e) {
                    console.log(e);
                    // console.log(e);
                    let {
                        windowWidth,
                        windowHeight,
@@ -157,22 +168,27 @@
                    query
                        .select('#chatingBox')
                        .boundingClientRect(data => {
                            that.swiperHeight = (safeArea.bottom - data.top);
                        })
                        .exec();
                }
            });
        },
        methods: {
            chatMessageDetail() {
            },
            // 返回键
            backOne() {
                uni.navigateBack({
                    delta: 1
                })
            },
            // 滚动顶部加载上一页
            nextPage() {
                // if(this.nowpage > 0 && this.begainloading) {
@@ -221,7 +237,8 @@
                        var resdata = res.data.data.user;
                        for (var i = 0; i < resdata.length; i++) {
                            if (resdata[i].avatar == null || resdata[i].avatar == "") {
                                resdata[i].avatar = "https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191109%2F1d3d4d82715444c4b8284f65e3feed10.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1632484198&t=1f4086a5894cbf83b311fa37c276405c";
                                resdata[i].avatar =
                                    "https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20191109%2F1d3d4d82715444c4b8284f65e3feed10.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1632484198&t=1f4086a5894cbf83b311fa37c276405c";
                            }
                            if (resdata[i].id == that.senId) {
@@ -259,6 +276,11 @@
                                msg[i].message = '../../static/images/index/friend-list/' + msg[i].message
                                that.imgMsg.unshift(msg[i].message)
                            }
                            if (that.isJSON(msg[i].postMessage) == true) {
                                msg[i].postMessage = JSON.parse(msg[i].postMessage)
                            }
                            that.msgs.unshift(msg[i])
                        }
@@ -280,6 +302,25 @@
                })
            },
            isJSON(str) {
                if (typeof str == 'string') {
                    try {
                        var obj = JSON.parse(str);
                        if (typeof obj == 'object' && obj) {
                            return true;
                        } else {
                            return false;
                        }
                    } catch (e) {
                        return false;
                    }
                }
            },
            // 预览图片
            previewImage(e) {
@@ -295,22 +336,33 @@
                    longPressActions: {
                        itemList: ['发送给朋友', '保存图片', '收藏'],
                        success: function(data) {
                            console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
                            // console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
                        },
                        fail: function(err) {
                            console.log(err.errMsg);
                            // console.log(err.errMsg);
                        }
                    }
                });
            },
            // 音频播放
            playVoice(e) {
                console.log('ok')
                innerAudioContext.src = e
                console.log(e, 'ok')
                var innerAudioContext = this.innerAudioContext = uni.createInnerAudioContext()
                // innerAudioContext.autoplay = false
                innerAudioContext.src = e.voice
                innerAudioContext.play()
                setTimeout(() => {
                    innerAudioContext.destroy()
                }, e.time * 1000)
            },
            // 接收输入内容
            inputs(e) {
                console.log(e, 999)
                var that = this;
                this.isanimation = true
                let len = this.msgs.length - 1
@@ -325,10 +377,19 @@
                    senderId: that.senId,
                    recipientId: that.recipientId,
                    postMessage: e.message,
                    messageType: 0,
                    messageType: e.types,
                    status: 0,
                    postTime: nowTime,
                }
                var mesagess = null;
                if (e.message instanceof Object) {
                    mesagess = JSON.stringify(e.message)
                } else {
                    mesagess = e.message
                }
                uni.request({
                    url: this.$store.state.piAPI + "/chat-records/insertSingleChat",
@@ -336,12 +397,14 @@
                    data: {
                        senderId: that.senId,
                        recipientId: that.recipientId,
                        postMessage: e.message,
                        messageType: 0,
                        postMessage: mesagess,
                        messageType: e.types,
                        status: 0,
                        postTime: sentTime,
                    },
                    success: (res) => {
                        console.log(res, 89898)
                    }
                });
@@ -389,7 +452,7 @@
                    name: e.name,
                    address: e.address,
                    success: () => {
                        console.log('success')
                        // console.log('success')
                    }
                })
            },
@@ -437,7 +500,7 @@
        height: auto;
        margin-right: 35rpx;
    }
    .chat {
        height: 100%;
@@ -492,7 +555,7 @@
                    font-size: $uni-font-size-lg;
                    color: $uni-text-color;
                    line-height: 44rpx;
                    padding: 18rpx 34rpx;
                    padding: 18rpx 20rpx;
                }
                .msg-img {
pages/groupChat/groupChat.vue
@@ -313,9 +313,12 @@
            }
        },
        mounted() {
        },
        onShow() {
            this.beginObj();
            this.getdataList(0);
        },
        onPageScroll(e) {
            this.rect = e.scrollTop
pages/groupChat/newGroup/newGroup.vue
@@ -1,7 +1,7 @@
<template>
    <view class="registerUser">
        <view class="group-chat-box">
        <view class="group-chat-box" id="groupChatBox" :style="{ height: swiperHeight + 'px' }">
            <u-form :model="form" ref="uForm">
@@ -51,10 +51,31 @@
                    groupnotice: '',
                    groupmember: '',
                },
                swiperHeight: 0
            }
        },
        onReady() {
            this.$refs.uForm.setRules(this.rules);
            let that = this;
            uni.getSystemInfo({
                success(e) {
                    console.log(e);
                    let {
                        windowWidth,
                        windowHeight,
                        safeArea
                    } = e;
                    const query = uni.createSelectorQuery().in(that);
                    query
                        .select('#groupChatBox')
                        .boundingClientRect(data => {
                            that.swiperHeight = (safeArea.bottom - 58);
                        })
                        .exec();
                }
            });
        },
        onLoad() {
            this.getFriend();
@@ -167,11 +188,9 @@
    }
    .registerUser {
        height: 100%;
        background: #f7f7f7;
        .group-chat-box {
            height: calc(100% - 116rpx);
            padding: 0 1.2rem;
            box-sizing: border-box;
            overflow-y: auto;
pages/home/home.vue
@@ -10,7 +10,7 @@
                        {{ 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>
@@ -19,7 +19,7 @@
                    </view> -->
                    <view class="tool">
                    <!--     <image src="/static/images/home/search.png" class="icon search-icon" mode="widthFix"
                        <!--     <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> -->
@@ -88,34 +88,41 @@
        <!-- 服务按钮 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">
        <view class="news">
            <navigator hover-class="none" url="/pages/news/listsss" class="cell">
                <view class="ctitle">通知通告</view>
                <view hover-class="bg-light" class="more" @click="goArticle()">
                    更多
                    <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"
                <view hover-class="none" class="news-item" @click="goArticleDetail(item)"
                    v-for="(item, index) in newsList" :key="index">
                    <view class="left">
                        <view class="info">
                            [火灾防范] 严禁在建筑内的共用走道、楼梯间、安全出口处等公共区域停放电动车或者为电动车充电。
                            {{item.title}}
                        </view>
                        <view class="new-content u-line-1" v-html="item.content">
                        </view>
                        <view class="date">
                            <image src="/static/images/home/date.png" class="icon" mode=""></image>
                            2021.06.17
                            <!-- <image src="/static/images/home/date.png" class="icon" mode=""></image> -->
                            <view class="advisory-title-name">{{item.category == 1 ? '单位公告' : '公安公告'}}</view>
                            <view class="advisory-title-time">{{item.releaseTime}}</view>
                        </view>
                    </view>
                    <image src="" mode="" class="img"></image>
                </navigator>
                </view>
                <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('Mains')">测试点视频通话:主播</u-button>
            <u-button class="ccbut" type="primary" @click="openVideo('Receiver')">测试点视频通话:第二个</u-button> -->
    </view>
</template>
@@ -135,12 +142,14 @@
                positionArr: [],
                status: 'loadmore',
                list: 15,
                page: 0,
                keyword: '',
                focus: false,
                bannerList: [],
                noticeList: [],
                newsList: [{}, {}],
                page: 1,
                pagesize: 2,
                newsList: [],
                navButton: [],
                serviceButton: []
            };
@@ -151,12 +160,12 @@
            // uni.connectSocket({
            //     url: 'ws://192.168.0.111:9034/websocket'
            // });
            // uni.onSocketOpen(function(res) {
            //     socketOpen = true;
            //     sendSocketMessage();
            // });
            // function sendSocketMessage() {
            //     var data = {
            //                 type: 'my',
@@ -168,14 +177,19 @@
            //         });
            //     }
            // }
            // uni.onSocketMessage(function(res) {
            //     console.log('收到服务器内容:' + res.data);
            // });
        },
        onLoad() {
        },
        onShow() {
            this.serviceButton = []
            // 后续将改为与后端联动
            // 加载banner数据
            fakePosition().then(data => {
@@ -196,25 +210,100 @@
            });
            // 加载服务按钮数据
            fakeServiceButton().then(data => {
                if (this.$store.state.UserData.rname[0] == '保安') {
                    data.forEach((item, index) => {
                        if (item.name == '保安单位') {
                            data.splice(index, 1)
                        }
                    })
                    data.forEach((item, index) => {
                        if (item.name == '保安管理') {
                            data.splice(index, 1)
                        }
                    })
                    data.forEach((item, index) => {
                        if (item.name == '保安员位置') {
                            data.splice(index, 1)
                        }
                    })
                    data.forEach((item, index) => {
                        if (item.name == '现场检查') {
                            data.splice(index, 1)
                        }
                    })
                } else if (this.$store.state.UserData.rname[0] == '保安公司管理员') {
                    data.forEach(item => {
                        if (item.name == '保安单位') {
                            data.splice(0, 1)
                        }
                    })
                    data.forEach((item, index) => {
                        if (item.name == '现场检查') {
                            data.splice(index, 1)
                        }
                    })
                }
                this.serviceButton = data;
            });
            this.page = 1
            this.pagesize = 2
            this.newsList = []
            //获取新闻信息
            this.getArtcilePageList();
        },
        onReachBottom() {
            // 后续将改为与后端联动
            if (this.page >= 3) return;
            this.status = 'loading';
            if (this.status == 'nomore') return;
            this.page = ++this.page;
            setTimeout(() => {
                this.list += 10;
                if (this.page >= 3) this.status = 'nomore';
                else this.status = 'loading';
                this.newsList.push(...[{}, {}]);
                this.getArtcilePageList();
            }, 2000);
        },
        methods: {
            openVideo(val){
            //点击更多跳转资讯页
            goArticle() {
                uni.navigateTo({
                    // url: '../videoCall/videoCall?state=' + val + '&type=video'
                    url: '../message/message'
                })
            },
            //去跳转详情页面
            goArticleDetail(item) {
                console.log(item)
                if (item.content != undefined && item.content.indexOf('<p>') != -1) {
                    var reg1 = /<\/?p[^>]*>/g;
                    item.content = item.content.replace(reg1, '');
                    var reg2 = /[&nbsp;]/g;
                    item.content = item.content.replace(reg2, '');
                }
                uni.navigateTo({
                    url: '../message/messageDetail?detailData=' + JSON.stringify(item)
                });
            },
            openVideo(val) {
                uni.navigateTo({
                    // url: '../videoCall/videoCall?state=' + val + '&type=video'
                    url: '../videoCall/videoCall?state=Mains&type=video&myname=wo&toname=1424647828935819265'
                });
            },
@@ -258,6 +347,46 @@
            },
            handleSearchBlur() {
                this.focus = false;
            },
            //获取资讯信息
            getArtcilePageList() {
                var that = this;
                uni.request({
                    url: this.$store.state.piAPI + "/blade-desk/notice/page?category=2&deptId=" + this.$store.state
                        .UserData
                        .dept_id,
                    method: 'GET',
                    data: {
                        type: 1,
                        current: this.page,
                        size: this.pagesize
                    },
                    success: (res) => {
                        if (res.data.code == 200) {
                            if (res.data.data.records) {
                                //如果总数小于pageSize,不做其他操作
                                if (res.data.data.total < this.pagesize) {
                                    that.newsList = res.data.data.records;
                                } else {
                                    if (res.data.data.records.length < this.pagesize) {
                                        //如果数量小于分页数量,则为最后一页
                                        this.status = 'nomore'
                                    } else {
                                        //如果数量小于分页数量,则为最后一页
                                        this.status = 'loading';
                                    }
                                    res.data.data.records.forEach(item => {
                                        console.log(item);
                                        that.newsList.push(item);
                                    })
                                }
                            }
                            uni.stopPullDownRefresh();
                        }
                    }
                });
            }
        }
    };
@@ -506,7 +635,7 @@
                justify-content: space-between;
                .left {
                    flex: 1;
                    width: 100%;
                    height: 160rpx;
                    display: flex;
                    flex-direction: column;
@@ -522,13 +651,21 @@
                        font-size: 28rpx;
                        font-family: PingFang SC;
                        font-weight: 500;
                        font-weight: 550;
                        color: #585b61;
                        line-height: 36rpx;
                        letter-spacing: 1px;
                    }
                    .new-content {
                        margin: 12rpx 0;
                        font-size: 0.46rem;
                        color: #4d4d4d;
                    }
                    .date {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        .icon {
@@ -541,15 +678,27 @@
                        font-family: PingFang SC;
                        font-weight: 500;
                        color: #a6abb5;
                        .advisory-title-name {
                            font-size: 0.7rem;
                            letter-spacing: 1px;
                        }
                        .advisory-title-time {
                            // margin-left: 0.8rem;
                            font-size: 0.7rem;
                        }
                    }
                }
                .img {
                    flex-shrink: 0;
                    width: 252rpx;
                    height: 160rpx;
                    width: 232rpx;
                    height: 140rpx;
                    border-radius: 20rpx;
                    background-color: #82848a;
                    margin-left: 0.5rem;
                }
            }
        }
pages/login/login-account.vue
@@ -142,8 +142,8 @@
                if (this.OURpass == true) {
                    // this.passwords = '******';
                    uni.hideNavigationBarLoading();
                    uni.reLaunch({
                        url: '../home/home'
                    uni.redirectTo({
                        url: '/pages/home/home'
                    })
                    return '成功登录'
                } else {
pages/manage/manage.vue
@@ -26,8 +26,49 @@
            return {
                swiperHeight: 0,
                gridList: [{
                        name: '通知通告',
                gridList: []
            };
        },
        mounted() {
            if (this.$store.state.UserData.rname[0] == '保安') {
                this.gridList = [{
                        name: '发送通知',
                        img: '/static/images/manage/g8.png',
                        url: '/pages/message/addMessage'
                    },
                    {
                        name: '工作汇报添加',
                        img: '/static/images/manage/g11.png',
                        url: '/pages/report/initiate'
                    }
                ]
            } else if (this.$store.state.UserData.rname[0] == '保安公司管理员') {
                this.gridList = [{
                        name: '发送通知',
                        img: '/static/images/manage/g8.png',
                        url: '/pages/message/addMessage'
                    },
                    {
                        name: '工作汇报添加',
                        img: '/static/images/manage/g11.png',
                        url: '/pages/report/initiate'
                    },
                    {
                        name: '保安员位置',
                        img: '/static/images/manage/g12.png',
                        url: '/pages/map/map'
                    },
                ]
            } else {
                this.gridList = [{
                        name: '发送通知',
                        img: '/static/images/manage/g8.png',
                        url: '/pages/message/addMessage'
                    },
@@ -44,20 +85,22 @@
                    {
                        name: '指令下发',
                        img: '/static/images/manage/g10.png',
                        url: '/pages/dispatch/dispatch'
                        url: '/pages/dispatch/imgissue'
                    },
                    {
                        name: '工作汇报',
                        name: '工作汇报添加',
                        img: '/static/images/manage/g11.png',
                        url: '/pages/report/initiate'
                    },
                    {
                        name: '位置查看',
                        name: '保安员位置',
                        img: '/static/images/manage/g12.png',
                        url: '/pages/map/map'
                    },
                ]
            };
            }
        },
        onReady() {
            let that = this;
pages/map/map.vue
@@ -1,6 +1,16 @@
<template>
    <view class="content">
        <web-view :src="urls"></web-view>
    <view class="content" style="width: 100%; height: 100%;">
        <!-- <u-loading size="66" :show="flag" mode="circle"></u-loading> -->
        <view v-show="flag" class="loading">{{loadingText}}</view>
        <view v-show="!flag">
            <web-view :src="urls" style="width: 100%; height: 100%;"></web-view>
        </view>
    </view>
</template>
@@ -9,21 +19,41 @@
        data() {
            return {
                urls: '',
                flag: true,
                loadingText: '加载中...'
                // dataList: [],
            }
        },
        methods: {},
        mounted() {},
        mounted() {
            // uni.showNavigationBarLoading();
            this.urls = "http://web.byisf.com/mapWz/xcxmap.html?id=" + this.$store.state.UserData.jurisdiction +
                "&userid=" + this.$store.state.UserData.user_id +
                "&roleName=" + this.$store.state.UserData.rname[0] +
                "&deptid=" + this.$store.state.UserData.dept_id;
            setTimeout(() => {
                // uni.hideNavigationBarLoading();
                this.flag = false
            }, 3000)
        },
        onLoad: function(options) {
            this.urls = "http://web.byisf.com/mapWz/xcxmap.html?id="+ this.$store.state.UserData.jurisdiction + "&userid="+ this.$store.state.UserData.role_id;
            // this.urls = "http://127.0.0.1:5500/mapWz/xcxmap.html?id=" + this.$store.state.UserData.jurisdiction +
            //     "&userid=" + this.$store.state.UserData.role_id;
            //     "&userid=" + this.$store.state.UserData.user_id;
        },
    }
</script>
<style>
    .loading {
        text-align: center;
        line-height: 80px;
    }
</style>
pages/message/addMessage.vue
@@ -1,6 +1,8 @@
<template>
    <view class="container">
        <view class='initiae-box'>
        <view class="group-chat-box">
            <u-form :model="form" ref="uForm">
                <u-form-item label-width='132' prop="title" label="通知标题" :required="true">
@@ -12,13 +14,18 @@
                </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 class="establish-box">
            <u-button class="submit" type="primary" @click="initiateClick">发送
            </u-button>
        </view>
        <view>
            <u-toast ref="uToast" />
        </view>
    </view>
</template>
@@ -81,7 +88,7 @@
                this.$refs.uForm.validate(valid => {
                    if (valid) {
                        uni.request({
                            url: this.$store.state.piAPI + "/blade-system/dept/detail",
                            method: "get",
@@ -91,46 +98,85 @@
                            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'
                                                })
                                            }
                                uni.request({
                                    url: this.$store.state.piAPI + "/blade-desk/notice/submit",
                                    method: "post",
                                    data: {
                                        type: 1,
                                        title: this.form.title,
                                        content: this.form.content,
                                        category: deptCategory,
                                        deptId: this.createData.dept_id,
                                        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;
    .submit {
        border: none;
        width: 94%;
        height: 86rpx;
        line-height: 86rpx;
        box-sizing: border-box;
        border-radius: 15rpx;
        color: #ffffff;
        font-size: 38rpx;
    }
    .container {
        height: 100%;
        .group-chat-box {
            height: calc(100% - 116rpx);
            padding: 0 36rpx;
            box-sizing: border-box;
            overflow-y: auto;
        }
        .establish-box {
            position: relative;
            height: 116rpx;
            background: #fff;
            text-align: center;
            uni-button {
                margin: 0;
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                margin: auto;
            }
        }
    }
</style>
pages/message/message.vue
@@ -17,7 +17,7 @@
                        <span class="header-title">通知公告</span>
                        <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        <u-icon v-if="$store.state.UserData.rname[0] != '保安'" @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                        </u-icon>
                    </view>
@@ -121,10 +121,10 @@
            return {
                list: [{
                        name: '单位公告'
                        name: '单位通知列表'
                    },
                    {
                        name: '公安公告'
                        name: '公安通知列表'
                    }
                ],
@@ -209,6 +209,7 @@
                        .dept_id,
                    method: "get",
                    data: {
                        type: 1,
                        current: that.pagelist,
                        size: 10
                    },
@@ -259,6 +260,7 @@
                        .dept_id,
                    method: "get",
                    data: {
                        type: 1,
                        current: that.pagelist,
                        size: 10
                    },
@@ -337,6 +339,7 @@
                                .dept_id,
                            method: "get",
                            data: {
                                type: 1,
                                current: 1,
                                size: 999999,
                                title: str
@@ -358,6 +361,7 @@
                                .dept_id,
                            method: "get",
                            data: {
                                type: 1,
                                current: 1,
                                size: 999999,
                                title: str
@@ -486,7 +490,7 @@
                    position: absolute;
                    top: 0;
                    left: auto;
                    right: 3px;
                    right: 10px;
                    bottom: 0;
                    margin: auto;
                    display: inline-block;
pages/report/initiate.vue
@@ -1,6 +1,8 @@
<template>
    <view class="container">
        <view class='initiae-box'>
        <view class="group-chat-box">
            <u-form :model="form" ref="uForm">
                <u-form-item label-width='132' prop="categoryText" label="汇报类别" :required="true">
@@ -21,24 +23,54 @@
                    <u-input type='textarea' v-model="form.content" placeholder="请输入汇报内容" />
                </u-form-item>
                <u-form-item label-width='132' prop="recipientText" label="接收人" :required="true">
                <u-form-item label-width='132' label="接收人">
                    <u-input v-model="form.recipientText" type="select" placeholder="请选择接收人" :border="false"
                        @click="recipientClick" />
                    <u-select v-model="recipientShow" mode="mutil-column-auto" :list="recipientList"
                        @confirm="recipientConfirm">
                    </u-select>
                    <u-button slot="right" type="success" size="mini" @click="recipientClick">选择接收人</u-button>
                    <u-popup :closeable="true" v-model="recipientShow" mode="bottom" height="50%" border-radius="14">
                            <view>
                                <u-checkbox-group v-show="recipientList.length > 0" @change="checkboxGroupChange" :wrap='true' :size="40">
                                    <u-checkbox v-model="item.checked" v-for="(item, index) in recipientList" :key="index"
                                        :name="item.id" shape="circle"
                                        style="padding: 0 40rpx; height: 92rpx; position: relative; box-sizing: border-box;">
                                        <view style="margin-left: 22rpx">
                                            {{item.real_name}}
                                        </view>
                                    </u-checkbox>
                                </u-checkbox-group>
                                <view style=" height: 92rpx; padding: 0 40rpx;" v-show="recipientList.length == 0">
                                    暂无数据
                                </view>
                            </view>
                    </u-popup>
                </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 class="establish-box">
            <u-button class="submit" type="primary" @click="initiateClick">发送</u-button>
        </view>
        <view>
            <u-toast ref="uToast" />
        </view>
    </view>
</template>
@@ -51,19 +83,7 @@
                recipientShow: false,
                categoryList: [{
                        value: '1',
                        label: '保安向保安汇报'
                    },
                    {
                        value: '2',
                        label: '保安向民警汇报'
                    },
                    {
                        value: '3',
                        label: '民警向民警汇报'
                    }
                ],
                categoryList: [],
                typeList: [{
                        value: '1',
                        label: '日报'
@@ -85,8 +105,7 @@
                    categoryText: '',
                    type: '',
                    typeText: '',
                    recipient: '',
                    recipientText: ''
                    recipientData: []
                },
                rules: {
                    categoryText: [{
@@ -106,12 +125,8 @@
                        message: '汇报内容不能少于5个字',
                        trigger: ['change', 'blur'],
                    }],
                    recipientText: [{
                        required: true,
                        message: '请选择接收人',
                        trigger: ['change', 'blur'],
                    }],
                }
                },
                peopleSelect: false,
            };
        },
        onLoad() {
@@ -120,9 +135,44 @@
        onReachBottom() {
        },
        mounted() {},
        mounted() {
            if (this.$store.state.UserData.rname[0] == '保安') {
                this.categoryList = [{
                        value: '1',
                        label: '保安向保安汇报'
                    },
                    {
                        value: '2',
                        label: '保安向民警汇报'
                    }
                ]
            } else if (this.$store.state.UserData.rname[0] == '保安公司管理员') {
                this.categoryList = [{
                        value: '1',
                        label: '保安向保安汇报'
                    },
                    {
                        value: '2',
                        label: '保安向民警汇报'
                    }
                ]
            } else {
                this.categoryList = [{
                    value: '3',
                    label: '民警向民警汇报'
                }]
            }
        },
        onReady() {
            this.$refs.uForm.setRules(this.rules);
        },
        methods: {
            categoryClick() {
@@ -140,57 +190,106 @@
                    });
                    return;
                } else {
                    uni.request({
                        url: this.$store.state.piAPI + "/blade-system/dept/lazy-tree-user-app?type=" + this.form
                            .category,
                        method: "get",
                        data: {
                        },
                        success: (res) => {
                            this.recipientList = []
                            res.data.forEach(item => {
                                if (item.hasChildren) {
                                    this.recipientList.push(item)
                                }
                            })
                            this.recipientShow = true;
                    if (this.peopleSelect == false) {
                        var data = null;
                        if (this.form
                            .category == 1) {
                            data = {
                                type: 2,
                                deptid: this.$store.state.UserData.dept_id
                            }
                        } else if (this.form
                            .category == 2) {
                            data = {
                                type: 3,
                                deptid: this.$store.state.UserData.dept_id,
                                userId: this.$store.state.UserData.user_id
                            }
                        } else if (this.form
                            .category == 3) {
                            data = {
                                type: 4,
                                deptid: this.$store.state.UserData.dept_id
                                // jurisdiction: this.$store.state
                                //     .UserData.jurisdiction,
                            }
                        }
                    });
                        uni.request({
                            url: this.$store.state.piAPI + "/blade-user/seleL",
                            method: "get",
                            data: data,
                            success: (res) => {
                                this.recipientList = []
                                res.data.data.forEach(item => {
                                    if (item.id != this.$store.state
                                        .UserData.user_id
                                    ) {
                                        item.checked = false;
                                        this.recipientList.push(item)
                                    }
                                })
                                this.recipientShow = true;
                                this.peopleSelect = true;
                            }
                        });
                    } else {
                        this.recipientShow = true;
                    }
                }
            },
            categoryConfirm(e) {
                if (this.form.categoryText != e[0].label) {
                    this.form.recipient = ''
                    this.form.recipientText = ''
                if (this.form.categoryText == e[0].label) {
                    return;
                } else {
                    this.form.category = e[0].value
                    this.form.categoryText = e[0].label
                    this.peopleSelect = false
                }
                this.form.category = e[0].value
                this.form.categoryText = e[0].label
            },
            typeConfirm(e) {
                this.form.type = e[0].value
                this.form.typeText = e[0].label
            },
            recipientConfirm(e) {
                if (e.length == 1) {
                    this.form.recipient = e[0].value
                    this.form.recipientText = e[0].label
                } else if (e.length == 2) {
                    this.form.recipient = e[1].value
                    this.form.recipientText = e[1].label
                } else if (e.length == 3) {
                    this.form.recipient = e[2].value
                    this.form.recipientText = e[2].label
                }
            },
            initiateClick() {
                this.$refs.uForm.validate(valid => {
                    if (valid) {
                        if (this.form.recipientData.length == 0) {
                            this.$refs.uToast.show({
                                title: '请最少选择一个接收人',
                            })
                            return
                        }
                        var str = '';
                        this.form.recipientData.forEach(item => {
                            str += item + ','
                        })
                        str = str.substr(0, str.length - 1);
                        uni.request({
                            url: this.$store.state.piAPI + "/workReport/submit",
                            method: "post",
@@ -200,7 +299,7 @@
                                content: this.form.content,
                                userId: this.$store.state.puserID,
                                deptId: this.$store.state.UserData.dept_id,
                                receivedIds:  this.form.recipient
                                receivedIds: str
                            },
                            success: (res) => {
                                if (res.data.msg == "操作成功") {
@@ -216,14 +315,58 @@
                        console.log('验证失败');
                    }
                });
            }
            },
            checkboxGroupChange(e) {
                this.form.recipientData = e
            },
        }
    };
</script>
<style lang="scss">
    .initiae-box {
        padding: 0 30rpx;
    .submit {
        border: none;
        width: 94%;
        height: 86rpx;
        line-height: 86rpx;
        box-sizing: border-box;
        border-radius: 15rpx;
        color: #ffffff;
        font-size: 38rpx;
    }
    .container {
        height: 100%;
        .group-chat-box {
            height: calc(100% - 116rpx);
            padding: 0 36rpx;
            box-sizing: border-box;
            overflow-y: auto;
        }
        .establish-box {
            position: relative;
            height: 116rpx;
            background: #fff;
            text-align: center;
            uni-button {
                margin: 0;
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                margin: auto;
            }
        }
    }
</style>
pages/report/report.vue
@@ -124,10 +124,10 @@
            return {
                list: [{
                        name: '接收汇报'
                        name: '汇报接收列表'
                    },
                    {
                        name: '发送汇报'
                        name: '汇报发送列表'
                    }
                ],
@@ -217,7 +217,7 @@
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (that.pullDown == true) {
                            that.pullDown = false;
                            uni.stopPullDownRefresh();
@@ -266,7 +266,7 @@
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (that.pullDown == true) {
                            that.pullDown = false;
                            uni.stopPullDownRefresh();
@@ -289,7 +289,7 @@
                            return
                        }
                    }
                });
@@ -481,7 +481,7 @@
                    position: absolute;
                    top: 0;
                    left: auto;
                    right: 3px;
                    right: 10px;
                    bottom: 0;
                    margin: auto;
                    display: inline-block;
pages/securityStaff/exhibition.vue
@@ -96,45 +96,94 @@
                    return
                }
                uni.request({
                    url: that.$store.state.piAPI + "/blade-user/pages",
                    method: "get",
                    data: {
                        dispatch: 0,
                        jurisdiction: this.$store.state
                            .UserData.jurisdiction,
                        current: that.pagelist,
                        size: 10
                    },
                    success: (res) => {
                        that.pages = res.data.data.pages;
                        var resdata = res.data.data.records;
                        if (this.pullDown == true) {
                            this.pullDown = false;
                            uni.stopPullDownRefresh();
                if (this.$store.state.UserData.rname[0] == '保安公司管理员') {
                    uni.request({
                        url: that.$store.state.piAPI + "/blade-user/pages",
                        method: "get",
                        data: {
                            current: that.pagelist,
                            size: 10,
                            deptId: this.$store.state.UserData.dept_id,
                            roleAlias: 111
                        },
                        success: (res) => {
                            that.pages = res.data.data.pages;
                            var resdata = res.data.data.records;
                            if (this.pullDown == true) {
                                this.pullDown = false;
                                uni.stopPullDownRefresh();
                            }
                            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
                            }
                        }
                        if (resdata.length == 0) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        } else {
                            resdata.forEach(item => {
                                that.newsList.push(item)
                                that.dataList.push(item)
                            })
                    });
                } else {
                    uni.request({
                        url: that.$store.state.piAPI + "/blade-user/pages",
                        method: "get",
                        data: {
                            dispatch: 0,
                            status: 1,
                            roleAlias: 111,
                            jurisdiction: this.$store.state
                                .UserData.jurisdiction,
                            current: that.pagelist,
                            size: 10
                        },
                        success: (res) => {
                            that.pages = res.data.data.pages;
                            var resdata = res.data.data.records;
                            if (this.pullDown == true) {
                                this.pullDown = false;
                                uni.stopPullDownRefresh();
                            }
                            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
                            }
                        }
                        if (that.pagelist == that.pages) {
                            that.flag = false
                            that.status = 'nomore';
                            return
                        }
                    }
                });
                    });
                }
            },
            goDetail(item) {
                uni.navigateTo({
@@ -148,29 +197,56 @@
                    return
                } else {
                    that.newsList = [];
                    uni.request({
                        url: that.$store.state.piAPI + "/blade-user/pages",
                        method: "get",
                        data: {
                            current: 1,
                            size: 999999,
                            realName: str,
                            dispatch: 0,
                            jurisdiction: this.$store.state
                                .UserData.jurisdiction,
                        },
                        success: (res) => {
                            var resdata = res.data.data.records;
                            resdata.forEach(item => {
                                that.newsList.push(item)
                            })
                        }
                    });
                    if (this.$store.state.UserData.rname[0] == '保安公司管理员') {
                        uni.request({
                            url: that.$store.state.piAPI + "/blade-user/pages",
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                realName: str,
                                deptId: this.$store.state.UserData.dept_id,
                                roleAlias: 111
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    } else {
                        uni.request({
                            url: that.$store.state.piAPI + "/blade-user/pages",
                            method: "get",
                            data: {
                                current: 1,
                                size: 999999,
                                realName: str,
                                dispatch: 0,
                                jurisdiction: this.$store.state
                                    .UserData.jurisdiction,
                            },
                            success: (res) => {
                                var resdata = res.data.data.records;
                                resdata.forEach(item => {
                                    that.newsList.push(item)
                                })
                            }
                        });
                    }
                    that.flag = false
                    that.status = 'nomore';
                }
pages/securityStaff/information.vue
@@ -63,12 +63,13 @@
                <view class="once">
                    编号:<view class="o-once"> {{datalist.baoanzheng}}</view>
                </view>
                <view class="once" style="margin-bottom: 1rem; display: flex;">
                    <view style='flex: 1'>发证机关:<view class="o-once"> {{datalist.fzobj}}</view>
                    </view>
                    <view style='flex: 1'>发证日期:<view class="o-once">{{datalist.fztime}}</view>
                    </view>
                <view class="once">
                    发证机关:<view class="o-once"> {{datalist.fzobj}}</view>
                </view>
                <view class="once">
                    发证日期:<view class="o-once"> {{datalist.fztime}}</view>
                </view>
                <u-image class="img" width="150rpx" height="150rpx" :src="datalist.avatar">
                    <view slot="error" style="font-size: 1rem;">暂无证件</view>
                </u-image>
@@ -262,12 +263,14 @@
        }
        .certificatesnj {
            padding: 0.6rem 1.6rem 1.6rem 1.6rem;
            background-image: url(../../static/images/salf/bazbj.png);
            background-size: 100% 100%;
            height: 100%;
        }
        .certificates {
            .img {
                position: absolute;
@@ -289,14 +292,12 @@
            .once {
                width: 100%;
                height: auto;
                line-height: 2rem;
                font-size: 0.8rem;
                padding: 0 2.5% 0 2.5%;
                line-height: 1.6rem;
                font-size: 0.72rem;
                .o-once {
                    display: inline-block;
                    font-size: 0.72rem;
                    font-weight: 600;
                }
            }
        }
pages/user/center.vue
@@ -31,10 +31,11 @@
                    <image src="/static/images/user/n2.png" class="icon" mode=""></image>
                    <view class="name">我的待办</view>
                </navigator> -->
                <navigator url="" hover-class="none" class="nav-item">
                <view hover-class="none" class="nav-item" @click="openMap">
                    <image src="/static/images/user/n3.png" class="icon" mode=""></image>
                    <view class="name">我的地址</view>
                </navigator>
                </view>
                <!-- <navigator url="" hover-class="none" class="nav-item">
                    <image src="/static/images/user/n4.png" class="icon" mode=""></image>
                    <view class="name">我的收藏</view>
@@ -112,7 +113,7 @@
            getOneselfInFo() {
                var that = this;
                //保安信息查询
                console.log(this.$store.state.UserData)
                console.log(this.$store.state.UserData, 999)
                if (this.$store.state.UserData) {
                    that.name = this.$store.state.UserData.nick_name
                    that.id = this.$store.state.UserData.user_id
@@ -120,6 +121,24 @@
                }
            },
            // 地图
            openMap(){
                uni.getLocation({
                    type: 'gcj02', //返回可以用于uni.openLocation的经纬度
                    success: function (res) {
                        console.log(res)
                        const latitude = res.latitude;
                        const longitude = res.longitude;
                        uni.openLocation({
                            latitude: latitude,
                            longitude: longitude,
                            success: function () {
                                console.log('success');
                            }
                        });
                    }
                });
            }
        },
        mounted() {
            console.log(this.$store.state)
pages/user/profile.vue
@@ -1,28 +1,87 @@
<template>
    <view class="container">
        <u-navbar :is-fixed="false" :border-bottom="false" :is-back="true" back-icon-name="arrow-leftward" title="个人资料"
            back-icon-size="35" :background="{ background: '#fff' }" title-color="#000">
        <u-navbar :is-fixed="false" :border-bottom="false" :is-back="true" back-icon-color="#fff" title="个人资料"
            back-icon-size="35" :background="{ background: '#0BB9C8' }" title-color="#fff">
            <view class="complie" slot="right" @click="submit">完成</view>
        </u-navbar>
        <view class="content">
            <view class="avatar">
            <view class="avatar" style="height: 420rpx">
                <image :src="detail.avatar" class="avatar-image" mode=""></image>
                <view class="a" @click="handleChooseImg">更换头像</view>
            </view>
            <view class="form">
                <view class="cell">
                    <view class="name">姓名</view>
                    <input type="text" placeholder="请输入姓名" v-model="detail.nick_name" class="ipt"
                        placeholder-class="hold" />
            <view class="detail-content">
                <view class='row-content'>
                    <span class="title">
                        名 称
                    </span>
                    <span>
                        {{detail.nick_name}}
                    </span>
                </view>
                <view class='row-content'>
                    <span class="title">
                        单 位
                    </span>
                    <span>
                        {{detail.deptName}}
                    </span>
                </view>
                <view class='row-content' v-show="detail.rname[0] == '保安'">
                    <span class="title">
                        性 别
                    </span>
                    <span>
                        {{detail.list.sex == 1 ? '男' : detail.list.sex == 2 ? '女' : ''}}
                    </span>
                </view>
                <view class='row-content' v-show="detail.rname[0] == '保安'">
                    <span class="title">
                        年 龄
                    </span>
                    <span>
                        {{detail.age}}
                    </span>
                </view>
                <view class='row-content' v-show="detail.rname[0] == '保安'">
                    <span class="title">
                        籍 贯
                    </span>
                    <span>
                        {{detail.list.nativeplace}}
                    </span>
                </view>
                <view class='row-content' v-show="detail.rname[0] == '保安'">
                    <span class="title">
                        联系电话
                    </span>
                    <span>
                        {{detail.list.phone}}
                    </span>
                </view>
                <view class='row-content' v-show="detail.rname[0] == '保安'">
                    <span class="title">
                        证件编号
                    </span>
                    <span>
                        {{detail.list.securitynumber}}
                    </span>
                </view>
            </view>
        </view>
        <!--  -->
        <view class="back" @click="logout">退出登录</view>
        <view>
                <u-toast ref="uToast" />
            </view>
        <!-- <view class="back" @click="logout">退出登录</view> -->
        <u-toast ref="uToast" />
    </view>
</template>
@@ -50,8 +109,16 @@
                .UserData) {
                this.detail = this.$store.state
                    .UserData
                var usercode = this.detail.cardid;
                var date = new Date();
                var year = date.getFullYear();
                var birthday_year = parseInt(usercode.substr(6, 4));
                var userage = year - birthday_year;
                this.detail.age = userage;
            }
        },
        methods: {
            logout() {
@@ -87,7 +154,7 @@
                        }
                    }
                });
            },
            changeDefaultPicker(name, e) {
                this.detail[name] = e.detail.value;
@@ -110,10 +177,19 @@
<style lang="scss">
    .container {
        background-color: #f7f7f7;
        min-height: 100vh;
        padding: 0 0 200rpx;
        height: 100vh;
        overflow: hidden;
        background: #0ED2F7;
        /* fallback for old browsers */
        background: -webkit-linear-gradient(to left, #B2FEFA, #0ED2F7);
        /* Chrome 10-25, Safari 5.1-6 */
        background: linear-gradient(to left, #B2FEFA, #0ED2F7);
        /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    }
    .complie {
@@ -122,16 +198,15 @@
        font-size: 32rpx;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: #14b9c8;
        color: #fff;
    }
    .content {
        background-color: #ffffff;
        overflow: hidden;
        height: 100%;
        overflow-y: auto;
    }
    .avatar {
        margin-top: 30rpx;
        display: flex;
        justify-content: center;
        align-items: center;
@@ -140,7 +215,14 @@
        font-size: 30rpx;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: #14b9c8;
        color: #fff;
        background: #0BB9C8;
        /* fallback for old browsers */
        background: -webkit-linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8);
        /* Chrome 10-25, Safari 5.1-6 */
        background: linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8);
        /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
        .avatar-image {
            width: 162rpx;
@@ -152,43 +234,42 @@
        }
    }
    .form {
        padding: 0 36rpx;
    .detail-content {
        margin-top: 8px;
        margin-left: 2.5%;
        padding: 8px 2.5%;
        width: 95%;
        background-color: rgba(65, 64, 66, 0.1);
        border-radius: 5px;
        display: flex;
        flex-direction: column;
        min-height: calc(100% - 634rpx);
        .cell {
        .row-content {
            width: 100%;
            height: 60px;
            /* background-color: seashell; */
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 40rpx 0;
            /* justify-content: center; */
            color: #fff;
            margin: 0 auto;
            border-bottom: 1px solid rgba(255, 255, 255, 0.5);
            font-size: 30rpx;
            font-family: Source Han Sans CN;
            font-weight: bold;
            color: #666666;
            &:not(:last-of-type) {
                border-bottom: 2rpx solid #efefef;
            }
            .ipt {
                flex: 1;
                margin-left: 40rpx;
                text-align: right;
                font-size: 23rpx;
                font-family: Source Han Sans CN;
                font-weight: bold;
                color: #333333;
            }
            .hold {
                font-size: 27rpx;
                font-family: Source Han Sans CN;
                font-weight: bold;
                color: #c8c8ce;
            .title {
                margin-left: 6%;
                display: inline-block;
                width: 21%;
                min-width: 144rpx;
            }
        }
    }
    .back {
        margin-top: 40rpx;
        text-align: center;
static/start-audio.png
static/start-input.png
store/index.js
@@ -35,8 +35,8 @@
        logPath: '',
        piAPI: 'http://223.82.109.183:2080/api',
        api: 'http://223.82.109.183:2080/api',
        // piAPI: 'http://localhost:81/',
        // piAPI: 'http://192.168.0.103:81',
        // piAPI: 'http://localhost:83/',
        // piAPI: 'http://192.168.0.115:83',
        puserName: '',
        puserID: '',
        puserIphone: '',
utils/func.js
@@ -21,6 +21,7 @@
        })
        vm.$u.vuex('accessToken', '')
        vm.$u.vuex('isLogin', false)
        vm.$u.vuex('UserData', {})
        uni.redirectTo({
            url: '/pages/login/login-account'
        })