5481dc208386de11ae0018d970d483974c8fa497..db9cf0e24e4d0a3953a98eb222a643eece4a6748
2021-07-04 liuyg
Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
db9cf0 diff | tree
2021-07-04 liuyg
jQmap
62cbc1 diff | tree
2021-07-03 liuyg
Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
9a7d01 diff | tree
2021-07-03 liuyg
警情处理
5c2431 diff | tree
6 files modified
165 ■■■■■ changed files
components/seeImges/seeImges.vue 12 ●●●●● patch | view | raw | blame | history
pages/alarm_list/alarm_list.vue 8 ●●●● patch | view | raw | blame | history
pages/map/map.vue 4 ●●●● patch | view | raw | blame | history
pages/poput/mapJQtijiao/mapJQtijiao/mapJQtijiao.vue 28 ●●●● patch | view | raw | blame | history
xcxMapJQLG/css/body.css 4 ●●●● patch | view | raw | blame | history
xcxMapJQLG/js/vueMain.js 109 ●●●●● patch | view | raw | blame | history
components/seeImges/seeImges.vue
@@ -100,9 +100,9 @@
        // border: 1px solid #0000FF;
        white-space: nowrap;
        box-sizing: border-box;
        overflow: scroll;
        display: flex;
        align-items: center;
        overflow: auto;
        // display: flex;
        // align-items: center;
        // position: absolute;
        // right: 0;
        // z-index: 110;
@@ -110,13 +110,14 @@
        .imgs {
            display: inline-block;
            padding-top: 0.5rem;
            width: 3rem;
            height: 3rem;
            width: 4rem;
            height: 4rem;
            padding: 0 0.2rem 0 0.2rem;
            margin: 0 0.2rem 0 0.2rem;
            // border-right: 1px solid rgba($color: #000000, $alpha: 0.5);
            position: relative;
            // border: 1px solid #0000FF;
            top: 0.22rem;
            image {
                width: 100%;
@@ -136,6 +137,7 @@
            // border-right: 1px solid rgba($color: #000000, $alpha: 0.5);
            position: relative;
            // border: 1px solid #0000FF;
            top: 0.22rem;
            video {
                width: 100%;
pages/alarm_list/alarm_list.vue
@@ -220,16 +220,16 @@
                    datas.size = 300;
                    datas.userid = this.$store.state.puserID;
                    datas.username = this.$store.state.puserName;
                    datas.url = this.$store.state.piAPI + "/alarm/alarm/APP-setAlarm";
                    datas.url = this.$store.state.piAPI + "alarm/alarm/APP-setAlarm";
                    
                    
                    datas.jd = 114.91385;//模拟位置
                    datas.wd = 25.81051;//模拟位置
                    // datas.jd = 114.91385;//模拟位置
                    // datas.wd = 25.81051;//模拟位置
                    // datas.wd = 25.81051;//模拟位置
                    
                    
                    var data = [datas]; //传给地图的参数
                    console.log(data)
                    // console.log(data)
                    uni.navigateTo({
                        url: '/pages/map/map?data=' + JSON.stringify(data) + '&html=xcxMapJQLG/xcxmap.html'
                    })
pages/map/map.vue
@@ -30,9 +30,9 @@
            } else {
                data = options.data;
            }
            console.log(options.html)
            // console.log(options.html)
            var a = options.html != undefined ? options.html : "xcxMapJQ/xcxmap.html";
            console.log(a)
            // console.log(a)
            this.urls = "http://s16s652780.51mypc.cn/" + a + "?data=" + data;
            // this.dataList = data;
            // console.log(this.urls);
pages/poput/mapJQtijiao/mapJQtijiao/mapJQtijiao.vue
@@ -21,14 +21,14 @@
                    <image @tap="takePhoto" src="../../../../static/JQimg/相机.png" mode=""></image>
                </view>
            </view>
            <seeImgs :imgs="imgs" :videos="[]" @del="delImg" :type="'imgs'"></seeImgs>
            <seeImgs  class="seeImgs" :imgs="imgs" :videos="[]" @del="delImg" :type="'imgs'"></seeImgs>
            <view class="title">视频上传:</view>
            <view class="s">
                <view class="main">
                    <image @tap="takeVideo" src="../../../../static/JQimg/视频.png" mode=""></image>
                </view>
            </view>
            <seeImgs :imgs="[]" :videos="videos" @del="delVideo" :type="'videos'"></seeImgs>
            <seeImgs class="seeImgsVideo" :imgs="[]" :videos="videos" @del="delVideo" :type="'videos'"></seeImgs>
            <view class="butb" @click="upData">
                提交
            </view>
@@ -82,7 +82,7 @@
                    title: "提交中...",
                    mask: true
                })
                console.log(dataList);
                // console.log(dataList);
                wx.request({
                    url: 'http://s16s652780.51mypc.cn/api/feedback/feedback/saves', //仅为示例,并非真实接口地址。
                    data: dataList,
@@ -94,15 +94,15 @@
                        if (res.data.code == 200) {
                            wx.showToast({
                                title: '提交成功!',
                                duration: 2000
                                duration: 1000
                            });
                            var time = setTimeout(()=>{
                                clearTimeout(time);
                                time = null;
                                uni.navigateTo({
                                uni.redirectTo({
                                    url: '/pages/alarm_list/alarm_list'
                                });
                            },3000)
                            },1500)
                        }
                    }
                });
@@ -203,6 +203,7 @@
                                // console.log(JSON.parse(data.data).data)
                            }
                        });
                        // } catch (e) {
                        // console.log(e);
                        // wx.showToast({
@@ -226,7 +227,7 @@
                    id: 422
                }
            }
            console.log(e);
            // console.log(e);
            this.datas = e;
        }
    }
@@ -311,4 +312,17 @@
            background-image: linear-gradient(to right, #4adeff, #55ffff);
        }
    }
.seeImgs{
    width: 80%;
    position:absolute ;
    top: 13.3rem;
    right: 0;
}
.seeImgsVideo{
    width: 80%;
    position:absolute ;
    top: 19.8rem;
    right: 0;
}
</style>
xcxMapJQLG/css/body.css
@@ -104,7 +104,7 @@
    height: 33%;
    display: flex;
    align-items: center;
    padding-left: 1rem;
    padding-left: 2rem;
}
#Umain .Um-m:last-child .um-m-t{
    /* border: 1px solid #169BD5; */
@@ -118,7 +118,7 @@
#heads{
    position: absolute;
    top: 76%;
    left: 0;
    left: 1rem;
}
#Umain .Um-m .um-m-t {
xcxMapJQLG/js/vueMain.js
@@ -31,6 +31,7 @@
        wentifankui: '',
        oldlat: '',
        oldlng: '',
        haveJDWD: true,
    },
    methods: {
@@ -52,17 +53,20 @@
            this.getdata = this.getQueryVariable('data') || data;
            // this.getdata = data;
            this.changeDom(this.getdata[0]);
            console.log(this.getdata[0]);
            this.map = this.beginMap(this.map, this.getdata); //创建并接受map
            // this.move = new myDomMove('#seedata', '.title', '#map');
            this.map.invalidateSize(true); //应用地图高度
            // this.move.followFinger(this.map, 'down');
            this.lat = data[0].wd;
            this.lng = data[0].jd;
            this.oldlat = data[0].wd;
            this.oldlng = data[0].jd;
            // this.lat = data[0].wd;
            // this.lng = data[0].jd;
            // this.oldlat = data[0].wd;
            // this.oldlng = data[0].jd;
            this.oldlat = this.getdata[0].wd;
            this.oldlng = this.getdata[0].jd;
        },
        changeDom(data) {
            console.log(data, 'changeDom');
            // console.log(data, 'changeDom');
            function changeDoms(dom, item) {
                $(dom).empty();
@@ -71,21 +75,17 @@
            changeDoms('#um-m-t-bz', data.bz);
            changeDoms('#um-m-t-dz', data.place);
            // console.log(data.jtype, data.securityId, '11111111111')
            if (data.jtype == 2) {
                changeDoms('#um-m-t-states', '已处理');
            } else if (data.jtype == 1) {
            if (data.jtype == 1 && data.securityId != '') {
                changeDoms('#um-m-t-states', '处理中');
                $('#jieshou').hide();
                $('#wanchen').show();
            } else {
            } else if (data.jtype == 2) {
                changeDoms('#um-m-t-states', '已处理');
            } else if (data.securityId == null || data.securityId == '') {
                changeDoms('#um-m-t-states', '未处理');
                $('#jieshou').show();
                $('#wanchen').hide();
            }
            // if (this.isFromJQ == false) {
            //     $('#wanchen').show();
            // }
        },
        //url解码
@@ -168,17 +168,20 @@
            for (var i = 0; i < data.length; i++) {
                var a = data[i];
                if (a.jd == '' || a.wd == '') {
                    console.log('没有坐标', i)
                    console.log('没有坐标', i);
                    that.haveJDWD = false;
                } else {
                    setData(a);
                }
                markers.addLayer(marker);
            }
            map.addLayer(markers);
            if (that.haveJDWD) {
                markers.addLayer(marker);
                map.addLayer(markers);
            }
            var i = 0;
            markers.on('click', function(a) {
                if (i == 0) {
                    console.log(that.getdata)
                } else if (i == 1) {
@@ -191,17 +194,48 @@
            return map; //抛出map
        },
        Submit() {
            $('#loding').show();
            var time = setTimeout(() => {
                $('#loding').hide();
            }, 2000)
            var data = this.getdata[0];
            // console.log(data)
            // receives() {// 接受任务
            var url = data.url,
                Pid = data.id,
                id = data.userid, //警察id
                name = data.username, //警察id
                datas = {
                    id: Pid,
                    securityId: id,
                    alarmPeople: name
                };
            // console.log(datas);
            axios({
                url: url +
                    `?securityId=${datas.securityId}&id=${datas.id}&alarmPeople=datas.alarmPeople`,
                // data: datas,
                header: {
                    "content-type": "application/x-www-form-urlencoded"
                },
                method: 'POST',
            }).then(res => {
                // console.log(res, 123);
                $('#loding').show();
                var time = setTimeout(() => {
                    $('#loding').hide();
                }, 1000)
                $('#jieshou').hide();
                $('#wanchen').show();
                $('#um-m-t-states').empty();
                $('#um-m-t-states').append('处理中');
            })
            // console.log( 123);
        },
        SubmitDown() {
            // $('#SubmitDown').show();
            console.log(uni.navigateTo)
            // console.log(uni.navigateTo)
            uni.navigateTo({
                url: '/pages/poput/mapJQtijiao/mapJQtijiao/mapJQtijiao'
                url: '/pages/poput/mapJQtijiao/mapJQtijiao/mapJQtijiao?id=' + this.getdata[0].id
            });
        },
        SubmitSD() {
@@ -227,7 +261,7 @@
            // console.log([this.lat, this.lng])
            this.map.setView([this.lat, this.lng], 20);
        },
        toJQposition(){
        toJQposition() {
            this.map.setView([this.oldlat, this.oldlng], 20);
        },
        // 获取实时位置
@@ -248,7 +282,7 @@
                that.lat = position.lat; //
                that.lng = position.lng; //火星坐标 //TODO 实现业务代码逻辑 
                that.haveShishiweizhi++; //控制只执行一次
                console.log(that.haveShishiweizhi)
                // console.log(that.haveShishiweizhi)
                if (that.haveShishiweizhi == 2) {
                    // console.log(position)
                    if (that.LXdhStart == null) {
@@ -279,6 +313,9 @@
                    that.LXdhStart.addLayer(L.marker([that.lat, that.lng], {
                        icon: qd,
                    }));
                    if (that.haveJDWD == false) {
                        that.map.setView([that.lat, that.lng], 20);
                    }
                    that.map.addLayer(that.LXdhStart);
                    that.getDHLine(+that.oldlng, +that.oldlat)
@@ -320,7 +357,7 @@
                } else {
                    var resdata = res.data.result.coords;
                    console.log(resdata)
                    // console.log(res)
                    var data = [];
                    for (var i = 0; i < resdata.length; i++) {
                        var xy = [];
@@ -328,15 +365,15 @@
                        xy.push(resdata[i][0]);
                        data.push(xy);
                    }
                    var w = resdata[0][0] - resdata[resdata.length - 1][0];
                    w = Math.abs(w);
                    w = w / 0.00000899;
                    w = w.toFixed(2);
                    console.log(w);
                    // var w = resdata[0][0] - resdata[resdata.length - 1][0];
                    // w = Math.abs(w);
                    // w = w / 0.00000899;
                    // w = w.toFixed(2);
                    // console.log(w);
                    $('#t-mi').empty();
                    $('#t-mi').append(w + '米');
                    $('#t-mi').append(res.data.result.dist + '米');
                    $('#t-fz').empty();
                    $('#t-fz').append(w / 30 + '分钟');
                    $('#t-fz').append(res.data.result.flen + '分钟');
                    if (that.LXdhEnd != null) {
                        that.map.removeLayer(that.LXdhEnd);
@@ -390,10 +427,6 @@
            console.log('shuaxin')
        },
        // resultFeedbackClick() { //结果反馈跳转小程序
        //     uni.webView.navigateTo({
        //         url: `../poput/workbench/policeDetails/policeDetails?id=${this.seedata.id}`
        //     });
    },
    created() {},
    mounted() {
@@ -401,7 +434,7 @@
        var time = setInterval(() => {
            if (this.haveShishiweizhi == 1) {
                this.getLocationData();
                console.log(this.haveShishiweizhi)
                // console.log(this.haveShishiweizhi)
            } else if (this.haveShishiweizhi == 2) {
                clearInterval(time);