liuyg
2021-07-04 db9cf0e24e4d0a3953a98eb222a643eece4a6748
Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
7 files modified
376 ■■■■■ changed files
pages.json 18 ●●●●● patch | view | raw | blame | history
pages/alarm_list/alarm_list.vue 13 ●●●● patch | view | raw | blame | history
pages/article/article.vue 95 ●●●● patch | view | raw | blame | history
pages/clockSignIn/clockSignIn.vue 96 ●●●●● patch | view | raw | blame | history
pages/myself/childen/genxin.vue 93 ●●●● patch | view | raw | blame | history
pages/myself/myself.vue 30 ●●●● patch | view | raw | blame | history
pages/reported/reported.vue 31 ●●●●● patch | view | raw | blame | history
pages.json
@@ -36,7 +36,8 @@
            "name": "aboutUs",
            "style": {
                "navigationBarTitleText": "关于我们",
                "navigationBarBackgroundColor": "#F56968"
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle":"white"
            }
        },
        {
@@ -44,7 +45,8 @@
            "name": "shezhi",
            "style": {
                "navigationBarTitleText": "系统设置",
                "navigationBarBackgroundColor": "#F56968"
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle":"white"
            }
        },
        {
@@ -59,8 +61,9 @@
            "path": "pages/myself/childen/genxin",
            "name": "genxin",
            "style": {
                "navigationBarTitleText": "版本信息",
                "navigationBarBackgroundColor": "#F56968"
                "navigationBarTitleText": "隐私政策",
                "navigationBarBackgroundColor": "#0BB9C8",
                "navigationBarTextStyle":"white"
            }
        },
        {
@@ -238,10 +241,9 @@
            "path": "pages/alarm_list/alarm_list",
            "name": "alarm_list",
            "style": {
                "navigationBarTitleText": "我要查",
                "app-plus":{
                    "titleNView":false
                }
                "navigationBarTitleText": "群防任务",
                "navigationBarBackgroundColor": "#0cd7e5",
                "navigationBarTextStyle":"white"
            }
        },
        {
pages/alarm_list/alarm_list.vue
@@ -2,12 +2,12 @@
    <view class="alarm-list">
        <!-- 自定义顶部导航栏 -->
        <!-- <navBarTop :title="'我要查'"></navBarTop> -->
        <uni-nav-bar class="uni-nav-bar-info" :fixed="true" :status-bar="true">
        <!-- <uni-nav-bar class="uni-nav-bar-info" :fixed="true" :status-bar="true">
            <view class="title" slot="default">群防任务</view>
            <view slot="left" class="uni-nav-bar-left" @click="goBack()">
                <image src="../../static/images/nav/back02.png"></image>
            </view>
        </uni-nav-bar>
        </uni-nav-bar> -->
        <view class="navigation-bar">
            <view class="alarm-bar-total" :style="{color:totalColor,borderBottom:totalBoder}"
                @click="getAlarmListInfo(1)">全部({{totalNumber}})</view>
@@ -27,7 +27,7 @@
                        </view>
                        <view class="alarm-status" :style="{color:processedColor}"
                            v-if="item.securityId!='' && item.jtype==1">处理中</view>
                        <view class="alarm-status" :style="{color:finishColor}" v-if="item.jtype==2">已处理</view>
                        <view class="alarm-status" :style="{color:finishColor}" v-if="item.jtype==2 && item.securityId!=''">已处理</view>
                    </view>
                    <view class="alarm-position-time">
                        <view class="image-place">
@@ -311,7 +311,7 @@
    page {
        width: 100%;
        height: 100%;
        background-color: rgba(243, 243, 243, 1);
        background-color: #F7F7F7;
        z-index: 999;
    }
</style>
@@ -334,6 +334,7 @@
    }
    .uni-nav-bar-info {
        background-color: #0BB9C8;
        // font-weight: 550;
        .title {
@@ -367,8 +368,6 @@
                top: 0.2rem;
            }
        }
    }
    .alarm-list {
@@ -376,7 +375,7 @@
        flex-direction: column;
        .navigation-bar {
            border-top: 1rpx solid #C8C7CC;
            // border-top: 1rpx solid #C8C7CC;
            background-color: #FFFFFF;
            width: 100%;
            height: 43px;
pages/article/article.vue
@@ -7,8 +7,8 @@
        </view> -->
        <view class="article-tab">
            <view :class="{'article-tab-title':true,'cccc':index == articleTabNum}" @click="goArticleTab(index)" v-for="(item,index) in articleTabArr"
                :style="articleTabNum==index?'color:#000000':'color:#808080'">{{item}}</view>
            <view :class="{'article-tab-title':true,'cccc':index == articleTabNum}" @click="goArticleTab(index,item.dictKey)" v-for="(item,index) in articleTabArr"
                :style="articleTabNum==index?'color:#000000':'color:#808080'">{{item.dictValue}}</view>
            <image src="../../static/images/article/menu.png"></image>
        </view>
        
@@ -16,7 +16,7 @@
            <view class="search-ico-wapper">
                <image src="../../static/images/search/search.png" class="search-ico" mode=""></image>
            </view>
            <input type="text" value="" placeholder="搜索" class="search-text" maxlength="10" focus/>
            <input type="text" v-on:input ="getKeyword" v-model="keyword" placeholder="搜索" class="search-text" maxlength="10" focus/>
            <view class="search-ico-wapper1">
                <image src="../../static/images/article/microphone.png" class="search-ico-1" mode=""></image>
            </view>
@@ -61,33 +61,78 @@
                isLoadMore: false, //是否加载中
                isFlash: false, //是否刷新
                data: [],
                titleList: ['推荐', '要闻', '新思想'],
                titleNum: 0,
                articleTabArr: ['全部', '视频', '社会', '经济', '热点'],
                articleTabArr: [],
                articleTabNum: 0,
                navbarTopHeight: "10px",
                tabbar:this.$store.state.tabbar
                tabbar:this.$store.state.tabbar,
                tabInfo:"0",
                keyword:''
            }
        },
        mounted() {
            // this.getArtcilePageList();
        },
        onLoad() {
            this.getArtcilePageList();
            uni.stopPullDownRefresh();
            //获取资讯类型
            this.getArticleTypeListInfo();
            //获取新闻数据
            this.getArtcilePageList("0");
        },
        //上拉加载更多
        onReachBottom() {
            //
            if (this.status=='nomore') return;
            this.page = ++this.page;
            setTimeout(() => {
                this.getArtcilePageList();
            }, 2000);
                this.getArtcilePageList(this.tabInfo);
            }, 1000);
        },
        methods: {
            goArticleTab(index) {
            //获取资讯类型信息
            getArticleTypeListInfo(){
                var that = this;
                uni.request({
                    url: this.$store.state.piAPI + '/blade-system/dict-biz/dictionary?code=articleType',
                    method: 'GET',
                    data: {
                        current: this.page,
                        size: this.pagesize
                    },
                    success:(res) =>{
                        if(res.data.code==200){
                            const item = {
                                dictKey:"0",
                                dictValue:"全部"
                            }
                            that.articleTabArr.push(item);
                            //判断长度
                            if(res.data.data.length<=4){
                                res.data.data.forEach((item)=>{
                                    that.articleTabArr.push(item);
                                })
                            }else{
                                //只取前4个
                                that.articleTabArr.push(res.data.data[0]);
                                that.articleTabArr.push(res.data.data[1]);
                                that.articleTabArr.push(res.data.data[2]);
                                that.articleTabArr.push(res.data.data[3]);
                            }
                            console.log(res,111);
                            console.log(that.articleTabArr,222);
                        }
                    },
                })
            },
            //根据资讯类型查询数据
            goArticleTab(index,dictKey) {
                this.tabInfo = dictKey;
                this.articleTabNum = index;
                //先清空数据
                this.data=[];
                //查询数据
                this.getArtcilePageList(dictKey);
            },
            goTabDetail(index) {
                this.titleNum = index;
@@ -102,23 +147,39 @@
                    url: './article_detail?detailData=' + JSON.stringify(detail)
                });
            },
            //on input 通过 keyword 关键字查询
            getKeyword(){
                this.getArtcilePageList(this.tabInfo);
            },
            //获取资讯信息
            getArtcilePageList(tab) {
                var that = this;
                var paramData = null;
                if(Number(tab)==""){
                    paramData = {
                        current: this.page,
                        size: this.pagesize,
                        keyword:this.keyword
                    }
                }else{
                    paramData = {
                        current: this.page,
                        size: this.pagesize,
                        keyword:this.keyword,
                        articleType:that.tabInfo
                    }
                }
                uni.request({
                    url: this.$store.state.piAPI + '/article/article/page',
                    method: 'GET',
                    data: {
                        current: this.page,
                        size: this.pagesize
                    },
                    data: paramData,
                    success: (res) => {
                        if (res.data.code == 200) {
                            if (res.data.data.records) {
                                //如果总数小于pageSize,不做其他操作
                                if (res.data.data.total < this.pagesize) {
                                    that.data = res.data.data.records;
                                    that.status='nomore';
                                } else {
                                    if (res.data.data.records.length < this.pagesize) {
                                        //如果数量小于分页数量,则为最后一页
pages/clockSignIn/clockSignIn.vue
@@ -1,7 +1,7 @@
<template>
    <view class="content">
        <!-- 自定义顶部导航栏 -->
        <view class="uni-nav-bar-info" :fixed="true" :status-bar="true">
        <!-- <view class="uni-nav-bar-info" :fixed="true" :status-bar="true">
            <view class="uni-nav-bar-left" @click="goBack()">
                <image src="../../static/images/nav/back02.png" />
            </view>
@@ -9,7 +9,16 @@
            <view class="right">
                <view class="title-right">打卡记录</view>
            </view>
        </view>
        </view> -->
        <u-navbar
            :is-back="true"
            title="考勤打卡"
            :background="background"
            back-icon-color="#FFF"
            title-color="#FFF"
            >
            <view class="navbar-right" slot="right">考勤记录</view>
        </u-navbar>
        <view class="clock-time-background"></view>
        <view class="clock-time">
            <view class="clock-info">
@@ -51,7 +60,10 @@
                name:'',
                jd:'',
                wd:'',
                address:''
                address:'',
                background:{
                    backgroundColor:"#0BB9C8"
                }
            }
        },
        mounted() {
@@ -105,38 +117,36 @@
            //去打卡
            goClock() {
                var that = this;
                axios({
                    method: "POST",
                    url: this.$store.state.piAPI + `/attendance/AppSave`,
                    params: {
                        number: this.$store.state.puserID,
                        name: this.name,
                        clockTime: this.getNowTime(1),
                        jd: this.jd,
                        wd: this.wd,
                        address: this.address
                    },
                }).then((resdata) => {
                    //不在考勤范围内
                    if (resdata.data.code == 400) {
                        layui.use('layer', function() {
                            var layer = layui.layer;
                            layer.msg('打卡失败,不在考勤范围', {
                                icon: 0
                            });
                        });
                    }
                    //打卡成功
                    if (resdata.data.code == 200) {
                        layui.use('layer', function() {
                            var layer = layui.layer;
                            layer.msg('打卡成功!', {
                                icon: 1
                            });
                        });
                    }
                });
                uni.request({
                    url: this.$store.state.piAPI + `/attendance/AppSave`,
                    method: "POST",
                    data:{
                        number: this.$store.state.puserID,
                        name: this.name,
                        clockTime: this.getNowTime(1),
                        jd: this.jd,
                        wd: this.wd,
                        address: this.address
                    },
                    success(resdata) {
                        //不在考勤范围内
                        if (resdata.data.code == 400) {
                            uni.showToast({
                                title: '不在考勤范围,打卡失败!',
                                icon:'none',
                                duration: 2000
                            });
                        }
                        //打卡成功
                        if (resdata.data.code == 200) {
                            uni.showToast({
                                title: '打卡成功!',
                                icon:'success',
                                duration: 2000
                            });
                        }
                    }
                })
            },
            
            //获取当前时间
@@ -185,7 +195,8 @@
    page{
        width: 100%;
        height: 100%;
        background-color: #FCFBFC;
        /* background-color: #FCFBFC; */
        background-color: #F7f7f7;
    }
</style>
@@ -211,6 +222,14 @@
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .navbar-right{
        color: #fff;
        font-size: 0.7rem;
        margin-right: 1.5rem;
        margin-top: 0.2rem;
    }
    
    .content{
@@ -266,7 +285,8 @@
        .clock-time-background{
            width: 100%;
            height: 15rem;
            background-color: #F5F5F5;
            // background-color: #F5F5F5;
            background-color: #F3F3F3;
        }
        
        
@@ -343,7 +363,7 @@
                            height: 6rem;
                            border-radius: 100px;
                            color: #FFFFFF;
                            background-image: linear-gradient(to bottom,#65CBA9,#66D0AC);
                            background-image: linear-gradient(to bottom,#0FD0E1,#0FD0E1);
                            display: flex;
                            flex-direction: column;
                            align-items: center;
pages/myself/childen/genxin.vue
@@ -1,90 +1,21 @@
<template>
    <view class="aboutUs">
        <image src="../../../static/users.png" mode=""></image>
        <view class="a">
            6.4.1
        </view>
        <!-- <view class="b">
            2020.02.29
        </view> -->
        <!-- <view class="genxinBut">
            <button class="custom-btn btn-3" @click="upMain"><span>点击更新</span></button>
        </view> -->
    <view class="shezhi">
        更多功能即将上线······
    </view>
</template>
<script>
    export default {
        methods: {
            upMain() {
                uni.showLoading({
                    title: "正在检查更新...",
                    mask: true
                })
                var time = setTimeout(() => {
                    wx.showToast({
                        title: '您当前是最新版!',
                        icon: "success",
                        duration: 1000
                    })
                    time = null
                }, 1000)
            }
        }
    }
</script>
<style lang="scss" scoped>
    .aboutUs {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        flex-direction: column;
        image {
            width: 4rem;
            height: 4rem;
            position: relative;
            top: 450rpx;
        }
        .a {
            position: relative;
            top: 450rpx;
            padding-top: 1rem;
        }
        .genxinBut {
            .custom-btn {
                width: 130px;
                height: 40px;
                color: #fff;
                border-radius: 5px;
                padding: 10px 25px;
                font-family: 'Lato', sans-serif;
                font-weight: 500;
                background: transparent;
                cursor: pointer;
                transition: all 0.3s ease;
                position: relative;
                display: inline-block;
                box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, .5),
                    7px 7px 20px 0px rgba(0, 0, 0, .1),
                    4px 4px 5px 0px rgba(0, 0, 0, .1);
                outline: none;
            }
            .btn-3 {
                background: rgb(0, 172, 238);
                background: linear-gradient(0deg, rgba(0, 172, 238, 1) 0%, rgba(2, 126, 251, 1) 100%);
                width: 130px;
                height: 40px;
                line-height: 42px;
                padding: 0;
                border: none;
            }
        }
    }
.shezhi{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    // justify-content: center;
    position: absolute;
    top: 45%;
    flex-direction: column;
}
</style>
pages/myself/myself.vue
@@ -4,8 +4,8 @@
        <view class="m-top">
            <view class="my-user-info">
                <view class="user-name-id">
                    <view class="user-name">{{userName}}</view>
                    <view class="user-id">ID: &nbsp;4120552252</view>
                    <view class="user-name">{{name}}</view>
                    <view class="user-id">ID: &nbsp;{{id}}</view>
                </view>
                <view class="userImg">
                    <img class="img" :src="useimg" @click="ChooseImage">
@@ -13,7 +13,7 @@
            </view>
            <view class="my-dept-info">
                <view class="dept-info">
                    <view class="dept-name">所属组织:&nbsp;**派出所--**警务站</view>
                    <view class="dept-name">所属组织:&nbsp;{{tenantName}}</view>
                </view>
            </view>
        </view>
@@ -94,7 +94,10 @@
                    },
                ],
                tabbar:this.$store.state.tabbar
                tabbar:this.$store.state.tabbar,
                name:'',
                id:'',
                tenantName:''
            }
        },
        components: {
@@ -109,6 +112,10 @@
            }
        },
        onLoad() {
            if(this.$store.state.puserID){
                //获取个人信息
                this.getOneselfInFo();
            }
            if(this.$store.state.avatar!=null && this.$store.state.avatar!=''){
                this.useimg = this.$store.state.avatar;
            }
@@ -166,6 +173,20 @@
                    animationType: 'slide-in-top',
                    animationDuration: 20000
                });
            },
            //登录成功后,获取个人信息
            getOneselfInFo(){
                var that = this;
                //保安信息查询
                uni.request({
                    url:'http://s16s652780.51mypc.cn/api/blade-user/details?id='+this.$store.state.puserID,
                    method:'POST',
                    success(resdata) {
                        that.name = resdata.data.data.realName;
                        that.id = resdata.data.data.id;
                        that.tenantName = resdata.data.data.tenantName;
                    }
                })
            },
            operation(e) {
                let that = this;
@@ -392,7 +413,6 @@
                        font-weight: 550;
                    }
                }
            }
pages/reported/reported.vue
@@ -1,16 +1,15 @@
<template>
    <view class="policeDetails">
        <!-- 自定义顶部导航栏 -->
        <!-- <navBarTop :title="'我要报'"></navBarTop> -->
        <uni-nav-bar class="uni-nav-bar-info" :fixed="true" :status-bar="true">
            <view class="title" slot="default">{{title}}</view>
            <view slot="left" class="uni-nav-bar-left" @click="goBack()">
                <image :src="backImage"></image>
            </view>
            <view class="right" slot="right">
                <view class="title-right">历史上报</view>
            </view>
        </uni-nav-bar>
        <u-navbar
            :is-back="true"
            title="事件上报"
            :background="background"
            back-icon-color="#FFF"
            title-color="#FFF"
            >
            <view class="navbar-right" slot="right">历史上报</view>
        </u-navbar>
        <!-- <view class="row address">
            <view class="title">地址</view>
            <input v-model="place" placeholder="请输入地址" />
@@ -67,7 +66,10 @@
                imgs: [],
                videos: [],
                title: '事件上报',
                backImage: '../../static/images/nav/back02.png'
                backImage: '../../static/images/nav/back02.png',
                background:{
                    backgroundColor:"#0BB9C8"
                }
            }
        },
        methods: {
@@ -243,6 +245,13 @@
</script>
<style lang="scss">
    .navbar-right{
        color: #fff;
        font-size: 0.7rem;
        margin-right: 1.5rem;
        margin-top: 0.2rem;
    }
    .uni-nav-bar-info {
        // font-weight: 550;