Administrator
2021-06-24 63f6d6d4dad97174a7c60d61aaba84f9012c11cc
我要查警情列表新增处理中tab项
3 files modified
106 ■■■■■ changed files
components/nav-bar-top/nav-bar-top.vue 8 ●●●●● patch | view | raw | blame | history
pages/alarm_list/alarm_list.vue 94 ●●●●● patch | view | raw | blame | history
store/state.js 4 ●●●● patch | view | raw | blame | history
components/nav-bar-top/nav-bar-top.vue
@@ -32,7 +32,15 @@
            gotoMyself(){
                uni.navigateTo({
                    url:'../myself/myself'
                    // animationType: 'pop-in',
                    // animationDuration: 200
                })
                // uni.navigateBack({
                //     delta:1,
                //     animationType:'pop-out',
                //     animationDuration:200
                // });
            }
        }
    }
pages/alarm_list/alarm_list.vue
@@ -2,18 +2,11 @@
    <view class="alarm-list">
        <!-- 自定义顶部导航栏 -->
        <navBarTop :title="'我要查'"></navBarTop>
        <!-- <view  @click="gotoMyself()">
            <uni-nav-bar class="uni-nav-bar-info" :fixed="true"  :status-bar="true" title="我要查">
                <view slot="left" class="uni-nav-bar-left">
                    <image :src="avatarImage"></image>
                </view>
            </uni-nav-bar>
        </view> -->
        
        <view class="navigation-bar">
            <view class="alarm-bar-total" :style="{color:totalColor,borderBottom:totalBoder}" @click="getAlarmListInfo(1)">全部({{totalNumber}})</view>
            <view class="alarm-bar-load" :style="{color:loadColor,borderBottom:loadBoder}" @click="getAlarmListInfo(2)">未处理({{untreatedNumber}})</view>
            <view class="alarm-bar-noload" :style="{color:noloadColor,borderBottom:noloadBoder}" @click="getAlarmListInfo(2)">未处理({{untreatedNumber}})</view>
            <view class="alarm-bar-load" :style="{color:loadColor,borderBottom:loadBoder}" @click="getAlarmListInfo(4)">处理中({{loadNumber}})</view>
            <view class="alarm-bar-load-before" :style="{color:loadBeforeColor,borderBottom:loadBeforeBoder}" @click="getAlarmListInfo(3)">已处理({{finishNumber}})</view>
        </view>
        <view class="alarm-list-content">
@@ -61,9 +54,11 @@
            return{
                pathUrl:"http://s16s652780.51mypc.cn/api",
                totalColor:"#51A2FE",
                noloadColor:"#000000",
                loadColor:"#000000",
                loadBeforeColor:"#000000",
                totalBoder:"2px solid #2E7EED",
                noloadBoder:"0px solid #2E7EED",
                loadBoder:"0px solid #2E7EED",
                loadBeforeBoder:"0px solid #2E7EED",
                untreatedColor:"#ED6154",
@@ -73,6 +68,7 @@
                bmainb:"",
                totalNumber:null,
                untreatedNumber:null,
                loadNumber:null,
                finishNumber:null,
                data:[],
                itemData:{},
@@ -116,34 +112,53 @@
                if(tab==1){
                    //字体颜色改变
                    this.totalColor = "#51A2FE";
                    this.noloadColor = "#000000";
                    this.loadColor = "#000000";
                    this.loadBeforeColor = "#000000";
                    //下划线样式改变
                    this.totalBoder = "2px solid #2E7EED";
                    this.noloadBoder = "0px solid #2E7EED";
                    this.loadBoder = "0px solid #2E7EED";
                    this.loadBeforeBoder = "0px solid #2E7EED";
                }
                
                if(tab==2){
                if(tab==4){
                    //字体颜色改变
                    this.totalColor = "#000000";
                    this.loadColor = "#51A2FE";
                    this.noloadColor = "#000000";
                    this.loadBeforeColor = "#000000";
                    //下划线样式改变
                    this.totalBoder = "0px solid #2E7EED";
                    this.loadBoder = "2px solid #2E7EED";
                    this.noloadBoder = "0px solid #2E7EED";
                    this.loadBeforeBoder = "0px solid #2E7EED";
                }
                
                if(tab==3){
                    //字体颜色改变
                    this.totalColor = "#000000";
                    this.noloadColor = "#000000";
                    this.loadColor = "#000000";
                    this.loadBeforeColor = "#51A2FE";
                    //下划线样式改变
                    this.totalBoder = "0px solid #2E7EED";
                    this.noloadBoder = "0px solid #2E7EED";
                    this.loadBoder = "0px solid #2E7EED";
                    this.loadBeforeBoder = "2px solid #2E7EED";
                }
                if(tab==2){
                    //字体颜色改变
                    this.totalColor = "#000000";
                    this.noloadColor = "#51A2FE";
                    this.loadColor = "#000000";
                    this.loadBeforeColor = "#000000";
                    //下划线样式改变
                    this.totalBoder = "0px solid #2E7EED";
                    this.noloadBoder = "2px solid #2E7EED";
                    this.loadBoder = "0px solid #2E7EED";
                    this.loadBeforeBoder = "0px solid #2E7EED";
                }
            },
            
@@ -169,6 +184,7 @@
                                that.totalNumber = res.data.data.number[0];
                                that.untreatedNumber = res.data.data.number[1];
                                that.finishNumber = res.data.data.number[2];
                                that.loadNumber = res.data.data.number[3];
                            }
                        }
                    })
@@ -212,27 +228,29 @@
            },
            //接收任务
            receives() {
                var url = this.$store.state.piAPI + "alarm/alarm/APP-setAlarm",
                    Pid = this.itemData.id,
                    id = this.$store.state.puserID, //警察id
                    name = this.$store.state.puserName, //警察id
                    data = {
                        id: Pid,
                        securityId: id,
                        alarmPeople: name
                    },
                    that = this;
                uni.request({
                    url: url,
                    data: data,
                    header: {
                        "content-type": "application/x-www-form-urlencoded"
                    },
                    method: 'POST',
                    success(res) {
                        // console.log(res.data.msg);
                    }
                })
                if(this.$store.state.piAPI){
                    var url = this.$store.state.piAPI + "alarm/alarm/APP-setAlarm",
                        Pid = this.itemData.id,
                        id = this.$store.state.puserID, //警察id
                        name = this.$store.state.puserName, //警察id
                        data = {
                            id: Pid,
                            securityId: id,
                            alarmPeople: name
                        },
                        that = this;
                    uni.request({
                        url: url,
                        data: data,
                        header: {
                            "content-type": "application/x-www-form-urlencoded"
                        },
                        method: 'POST',
                        success(res) {
                            // console.log(res.data.msg);
                        }
                    })
                }
            }
        
        }
@@ -255,6 +273,7 @@
    .alarm-id-type-status,
    .alarm-position-time,
    .alarm-bar-total,
    .alarm-bar-noload,
    .alarm-bar-load,
    .alarm-bar-load-before,
    .image-place,
@@ -277,21 +296,28 @@
            // position: fixed;
            z-index: 999;
            // margin-top: 4rem;
            font-size: 15px;
            
            .alarm-bar-total{
                align-items: center;
                justify-content: center;
                width: 33.33%;
                width: 25%;
            }
            .alarm-bar-noload{
                align-items: center;
                justify-content: center;
                width: 25%;
            }
            
            .alarm-bar-load{
                width: 33.33%;
                width: 25%;
                align-items: center;
                justify-content: center;
            }
            
            .alarm-bar-load-before{
                width: 33.33%;
                width: 25%;
                align-items: center;
                justify-content: center;
            }
store/state.js
@@ -4,8 +4,8 @@
        useName: '过客 ',
    },
    logPath: '',
    piAPI: 'http://s16s652780.51mypc.cn/api/',
    // piAPI: 'http://localhost:82/',
    // piAPI: 'http://s16s652780.51mypc.cn/api/',
    piAPI: 'http://localhost:82/',
    puserName: '',
    puserID: '',
    puserIphone:'',