|
@@ -10,7 +10,7 @@
|
|
|
<div class="main_m">
|
|
|
<div class="main_m_t">
|
|
|
<div class="main_m_t_l">首次报警时间 {{firstTime}}</div>
|
|
|
- <div class="dowebok">
|
|
|
+ <div class="sensor_list">
|
|
|
<ul class="main_m_t_c_n">
|
|
|
<li v-for="(item,index) in weather" :key="index">
|
|
|
<img src="@/assets/image/subject/icon_bj_wd.png" v-if="item.funNum == 'wendu'">
|
|
@@ -119,6 +119,7 @@
|
|
|
|
|
|
<script>
|
|
|
import flvjs from "flv.js"
|
|
|
+import $ from 'jquery'
|
|
|
import {
|
|
|
abnormalLogOrderByList, bigviewFunctionList, bigviewSub, bigviewWarnMessage,
|
|
|
controllerList,
|
|
@@ -153,6 +154,54 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ /**
|
|
|
+ * 横向拖动触发滚动条拖动
|
|
|
+ * container:jquery选择器
|
|
|
+ */
|
|
|
+ dragMoveX(container){
|
|
|
+ var flag;
|
|
|
+ var downX;
|
|
|
+ var scrollLeft;
|
|
|
+ //鼠标按下
|
|
|
+ $(document.body).on("mousedown", container, function (event) {
|
|
|
+ // console.log('mousedown')
|
|
|
+ flag = true;
|
|
|
+ downX = event.clientX;
|
|
|
+ scrollLeft = $(this).scrollLeft();
|
|
|
+ });
|
|
|
+ //鼠标移动
|
|
|
+ $(document).on("mousemove", function (event) {
|
|
|
+ // console.log('mousemove')
|
|
|
+ if (flag) {
|
|
|
+ var moveX = event.clientX;
|
|
|
+ var scrollX = moveX - downX;
|
|
|
+ // console.log("moveX" + moveX);
|
|
|
+ // console.log("scrollX" + scrollX);
|
|
|
+ if (scrollX < 0 && scrollLeft > 0) {
|
|
|
+ $(container).scrollLeft(scrollLeft - scrollX)
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(container).scrollLeft(scrollLeft - scrollX)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //鼠标释放
|
|
|
+ $(document).on("mouseup", function () {
|
|
|
+ // console.log('mouseup')
|
|
|
+ flag = false;
|
|
|
+ });
|
|
|
+ /**
|
|
|
+ * 注意:与 mouseout 事件不同,mouseleave 事件只有在鼠标指针离开被选元素时被触发,mouseout 事件在鼠标指针离开任意子元素时也会被触发。参见页面底部演示实例。
|
|
|
+ * 所以:如果mouseout的子元素存在溢出,并添加了超出加滚动,那么刚进入也会触发该事件,所以这里就不能使用。
|
|
|
+ * */
|
|
|
+ //鼠标移出元素
|
|
|
+ $(container).on("mouseleave", function (event) {
|
|
|
+ // console.log('mouseleave')
|
|
|
+ if (event.pageX < 0 || event.pageX > document.body.offsetWidth) {
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
back(){
|
|
|
this.$router.push('/')
|
|
|
},
|
|
@@ -313,7 +362,11 @@ export default {
|
|
|
this.subjectId=this.$route.query.subjectId
|
|
|
_this.switchStateFun();
|
|
|
_this.getAjaxData();
|
|
|
+
|
|
|
},
|
|
|
+ beforeMount() {
|
|
|
+ this.dragMoveX('.sensor_list')
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -427,19 +480,18 @@ export default {
|
|
|
line-height: rh(18);
|
|
|
margin-left: rw(24);
|
|
|
}
|
|
|
- .dowebok{
|
|
|
- width: rw(1370);
|
|
|
- height: rh(80);
|
|
|
+ .sensor_list{
|
|
|
+ height: rh(70);
|
|
|
background: 0;
|
|
|
overflow-y: auto;
|
|
|
.main_m_t_c_n{
|
|
|
position: relative;
|
|
|
- height:255px;
|
|
|
+ height:rh(70);
|
|
|
white-space: nowrap;
|
|
|
display: inline-flex;
|
|
|
>li{
|
|
|
width: rw(202);
|
|
|
- height: 100%;
|
|
|
+ height: rh(70);
|
|
|
float: left;
|
|
|
position: relative;
|
|
|
cursor: pointer;
|
|
@@ -455,7 +507,7 @@ export default {
|
|
|
font-family: Microsoft YaHei;
|
|
|
font-weight: 400;
|
|
|
color: #FFFFFF;
|
|
|
- line-height: rh(80);
|
|
|
+ line-height: rh(70);
|
|
|
display: inline-block;
|
|
|
}
|
|
|
>i:nth-of-type(1){
|