南昌市物联网技防平台-前端
liuyg
2021-04-28 4ac408e9a9c9c24ef0ea3e12004a500238956103
public/map/popup/html/FlareClusterLayer_v3 copy.html
@@ -160,7 +160,7 @@
    <div id="appliutwo" class='police-details-box' class="layui-anim" data-anim="layui-anim-down">
        <!-- 从layui传值给iframe 的占位input -->
        <!-- <div class="aaa bbb">13223456745</div> -->
        <input type="text" id="sidIput" ref="sidIput" style="display:none">
        <input type="text" id="sidIput" ref="sidIput" style="display: none;">
        <div class="flare-liu-top">
            <div class="f-l-t-heard">{{name}}</div>
            <div class="f-l-t-center">{{machineCode}}</div>
@@ -169,13 +169,17 @@
                <div class="f-l-t-r-but"> <a href="#" @click="looks">查看详情</a> </div>
            </div>
        </div>
        <div class="flare-liu-body">
        <div class="flare-liu-body" v-if="'start'">
            <el-tabs v-model="activeName" @tab-click="handleClick">
                <el-tab-pane label="基本信息" name="first">
                    <div class="r-b-top">
                        <div class="r-b-t-main">
                            <span class="r-b-t-left">设备名称</span>
                            <span class="r-b-t-right">{{ name }}</span>
                        </div>
                        <div class="r-b-t-main">
                            <span class="r-b-t-left">使用方</span>
                            <span class="r-b-t-right">{{ deptname }}</span>
                        </div>
                        <div class="r-b-t-main">
                            <span class="r-b-t-left">设备联系人</span>
@@ -201,8 +205,7 @@
                                <div class="r-b-t-r-imgsl" v-for="(value, index) in imgsl" :key="index">
                                    <!-- <el-image style="width: 68px; height: 68px" :src="value" :preview-src-list="imgsl"
                                        v-show="value != 'no'"> -->
                                        <el-image style="width: 68px; height: 68px" :src="value"
                                        v-show="value != 'no'">
                                    <el-image style="width: 68px; height: 68px" :src="value" v-show="value != 'no'">
                                    </el-image>
                                    <div v-show="value == 'no'" style="
                                        width: 68px;
@@ -221,6 +224,14 @@
                        </div>
                    </div>
                </el-tab-pane>
                <el-tab-pane label="现场视频" name="second">
                    <!-- {{aoud}} -->
                    <div>
                        <video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" data-setup='{}' style='width: 100%;height: auto'>
                            <source id="source" :src="aoud" type="application/x-mpegURL"></source>
                        </video>
                    </div>
                </el-tab-pane>
                <!-- <el-tab-pane label="other" name="second">other</el-tab-pane> -->
            </el-tabs>
        </div>
@@ -237,10 +248,13 @@
                num: '',
                name: '',
                statesss: '',
                // start:false,
                //详细信息data
                ourData: '',
                // names: '',
                contacts: '',
                deptname: '',//使用方
                aoud: '',//视频
                calls: '',
                imgsl: [],
                deploymentTime: '',
@@ -331,6 +345,53 @@
                        }
                    }
                },
                getUser(dat) {
                    var xhr = null
                        , my = this
                        , url = '/api/blade-jfpts/equipment/equipment/detail?id=' + dat;
                    if (XMLHttpRequest) { //http请求
                        xhr = new XMLHttpRequest();
                    } else {
                        xhr = new ActiveXObject("Microsoft.XMLHTTP");
                    }
                    xhr.open("get", url, true);
                    xhr.send();
                    xhr.onreadystatechange = function () {
                        if (xhr.readyState === 4) {
                            if (xhr.status === 200) {
                                // 判断isJson是否传进来了
                                var data = JSON.parse(xhr.responseText);// JSON转js
                                var ourd = data.data,
                                    cl = ourd.channelNumber,
                                    deviceCode = ourd.serialNumber;
                                my.deptname = ourd.deptName;
                                // console.log(data,1111111111111)
                                var xhr2 = null//视频请求
                                    , url = 'https://web.byisf.com:18000/GetPlayUrl?deviceCode='+ deviceCode +'&chl=' + cl;
                                if (XMLHttpRequest) { //http请求
                                    xhr2 = new XMLHttpRequest();
                                } else {
                                    xhr2 = new ActiveXObject("Microsoft.XMLHTTP");
                                }
                                xhr2.open("get", url, true);
                                xhr2.send();
                                xhr2.onreadystatechange = function () {
                                    if (xhr2.readyState === 4) {
                                        if (xhr2.status === 200) {
                                            // 判断isJson是否传进来了
                                            var data2 = JSON.parse(xhr2.responseText);// JSON转js
                                            my.aoud = data2.data.m3u8;
                                            // console.log(data2,222222222222)
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                handleClick(tab, event) {//标签tab点击事件
                    // console.log(tab, event);
                }
@@ -338,10 +399,12 @@
            mounted() {
                this.oldtime = setTimeout(() => {//需要同步数据处理,input中value在mounted中没有直接传值
                    clearTimeout(this.oldtime);
                    // console.log(this.$refs.sidIput.value)
                    this.ourData = JSON.parse(this.$refs.sidIput.value);//json对象转js对象
                    this.getUser(this.ourData.id);
                    // console.log(this.ourData);
                    this.getdatas(this.ourData);
                }, 20);
                },100);
            }