Commit d9dec287 authored by 纪泽龙's avatar 纪泽龙

恢复一下

parent d12fc5a1
<!--
* @Author: your name
* @Date: 2022-01-11 13:44:17
* @LastEditTime: 2022-02-26 21:45:23
* @LastEditTime: 2022-02-26 22:06:26
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/views/Home.vue
......@@ -11,15 +11,6 @@
<div class="goSystem" @click="$router.push('/index')">进入管理系统</div>
<div id="map"></div>
<Center :show="show" :centerData="centerData" />
<UserCenter
:title="centerTitle"
:show="centerShow"
ref="userCenter"
:detcetorList="detcetorList"
:userId="centerUserId"
:total="centerTotal"
:pageSize="20"
/>
<PipeColor />
<!-- 底部按钮 -->
<div class="home-div">
......@@ -45,17 +36,12 @@
</div>
<!-- 设备按钮 -->
<div class="typelist-div">
<div
class="list"
v-for="(item, index) in arr"
:key="index"
:class="item.ischeck == true ? 'active' : ''"
@click="sel1(index, item)"
>
{{ item.name }}
<div class="typelist-div">
<div class="list" v-for="(item,index) in arr" :key="index" :class="item.ischeck==true?'active':''" @click="sel1(index,item)">
<img :src="item.imgurl" style="margin-top: 2px;float: left;margin-right: 3px;" /> {{item.name}}
</div>
</div>
</div>
<!-- 弹框 -->
<div
......@@ -118,10 +104,10 @@
z-index: 999;
width: 200px;
height: 50px;
color: #339cc9;
color: #339CC9;
"
>
<div style="height: 20px; width: 100%; float: right; font-size: 14px">
<div style="height: 20px; width: 100%; float: right; font-size: 14px;">
{{ nowDate }}&nbsp;{{ nowtime }}&nbsp;{{ nowweek }}
</div>
</div>
......@@ -131,8 +117,6 @@
<script>
// @ is an alias to /src
import { EditorMap } from "@/utils/mapClass/map";
import { listDetectorInfo } from "@/api/detector/detectorInfo";
import { detectorUserList } from "@/api/detector/detectorUser";
import { mapGetters, mapActions } from "vuex";
import {
pipeData,
......@@ -155,7 +139,6 @@ import VideoView from "@/components/bigWindow/VideoView.vue";
import DeviceA from "@/components/bigWindow/DeviceA.vue";
import User from "@/components/bigWindow/User.vue";
import Center from "@/components/bigWindow/Center.vue";
import UserCenter from "@/components/bigWindow/UserCenter.vue";
import PipeColor from "@/components/bigWindow/PipeColor.vue";
// import markerInfoWindow from './components/markerInfoWindow.vue'
......@@ -167,7 +150,6 @@ export default {
leftBar,
rightBar,
Center,
UserCenter,
PipeColor,
},
data() {
......@@ -197,43 +179,41 @@ export default {
name: "中燃韵科",
},
],
arr: [
arr:[
{
val: 1,
ischeck: false,
name: "调压箱",
val:1,
ischeck:false,
imgurl: require('@/assets/image/tyxsub.svg'),
name: "调压箱"
},
{
val: 2,
ischeck: false,
name: "阀门井",
val:2,
ischeck:false,
imgurl: require('@/assets/image/fmjsub.svg'),
name: "阀门井"
},
{
val: 3,
ischeck: false,
name: "场站",
val:3,
ischeck:false,
imgurl: require('@/assets/image/czsub.svg'),
name: "场 站"
},
{
val: 4,
ischeck: false,
name: "用户",
val:4,
ischeck:false,
imgurl: require('@/assets/image/usersub.svg'),
name: "用 户"
},
{
val: 5,
ischeck: false,
name: "监控",
},
val:5,
ischeck:false,
imgurl: require('@/assets/image/jksub.svg'),
name: "监 控"
}
],
selarr1: [],
// 用户的center数据
detcetorList: [],
centerUserId: null,
centerTotal: null,
centerShow: false,
centerTitle: "",
};
},
selarr1:[],
};
},
computed: {
...mapGetters(["company", "systemSetting"]),
......@@ -285,12 +265,12 @@ export default {
}));
this.selarr = this.company.map((item) => item.conpanyId);
// getPipe() getTyx() getFm() getCz() getVideo() getUser()
// this.goMap(getPipe, this.addPipeLine, Line);
// this.goMap(getTyx, this.addDevice, DeviceA);
this.goMap(getPipe, this.addPipeLine, Line);
this.goMap(getTyx, this.addDevice, DeviceA);
this.goMap(getFm, this.addDevice, DeviceA);
// this.goMap(getCz, this.addDevice, DeviceA);
// this.goMap(getVideo, this.addDevice, VideoView);
this.goMap(detectorUserList, this.addDevice, User);
this.goMap(getCz, this.addDevice, DeviceA);
this.goMap(getVideo, this.addDevice, VideoView);
this.goMap(getUser, this.addDevice, User);
// getVideo().then((res) => {
// console.log("getVideo", res);
// });
......@@ -323,12 +303,6 @@ export default {
goMap(httpFunc, addFunc, component) {
httpFunc().then((res) => {
console.log("resresres", res);
if(!res.data[0].iconType){
res.data.forEach(item=>{
item.iconType =6;
})
}
// 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data
let config = {};
if (Array.isArray(res)) {
......@@ -339,8 +313,8 @@ export default {
addFunc(config, component);
});
},
// 其他的设备的center
myCenterShow(boolean) {
centerShow(boolean) {
this.show = boolean;
},
centerDataFunc(centerData) {
......@@ -348,25 +322,7 @@ export default {
console.log(centerData);
this.show = true;
},
//用户的设备center
getDetectorInfoList(queryParams, title) {
console.log(queryParams);
return listDetectorInfo(queryParams).then((res) => {
console.log("queryParams", res);
if (res.code == 200) {
this.detcetorList = res.rows;
this.centerUserId = queryParams.userId;
// 总数据
this.centerTotal = res.total;
// this.$refs.userCenter.fade = "fade";
this.centerShow = true;
this.centerTitle = title;
// 传递回去
return res.code;
}
});
},
allCompany() {
if (this.selarr.length == this.companyLength) {
this.selarr = [];
......@@ -399,20 +355,20 @@ export default {
this.map.companyFilter(this.selarr);
},
sel1(index, item) {
let arr = [...this.arr];
let selarr1 = [...this.selarr1];
if (arr[index].ischeck == false) {
arr[index].ischeck = true;
selarr1.push(item);
} else {
arr[index].ischeck = false;
var index11 = selarr1.indexOf(index);
selarr1.splice(index11, 1);
sel1(index,item){
let arr=[...this.arr];
let selarr1=[...this.selarr1];
if(arr[index].ischeck==false){
arr[index].ischeck=true;
selarr1.push(item)
}else{
arr[index].ischeck=false;
var index11=selarr1.indexOf(index)
selarr1.splice(index11,1)
}
this.arr = arr;
this.selarr1 = selarr1;
this.arr=arr;
this.selarr1=selarr1;
},
currentTime() {
......@@ -468,11 +424,11 @@ export default {
color: #18baff;
cursor: pointer;
padding: 3px 5px;
border: 1px solid #339cc9;
color: #339cc9;
border: 1px solid #339CC9;
color: #339CC9;
&:hover {
background-color: #053b6a;
color: #2cd5db;
background-color: #053B6A ;
color: #2CD5DB;
}
}
#map {
......@@ -589,7 +545,7 @@ export default {
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.typelist-div {
.typelist-div{
width: 450px;
height: 50px;
z-index: 9999;
......@@ -598,7 +554,7 @@ export default {
margin-top: 120px;
right: 450px;
}
.list {
.list{
z-index: 9999;
float: left;
margin-left: 15px;
......@@ -606,12 +562,14 @@ export default {
line-height: auto;
text-align: center;
background: linear-gradient(86deg, #112238 0%, #086187 62%, #112238 100%);
box-shadow: inset 0px 1px 2px 1px #125c9b;
box-shadow: inset 0px 1px 2px 1px #125C9B;
font-size: 14px;
padding: 5px 7px;
}
.list.active {
background: linear-gradient(86deg, #112238 0%, #32a3d3 62%, #112238 100%);
box-shadow: inset 0px 1px 2px 1px #125c9b;
.list.active{
background: linear-gradient(86deg, #112238 0%, #32A3D3 62%, #112238 100%);
box-shadow: inset 0px 1px 2px 1px #125C9B;
color: #2ee7e7;
font-size: 14px;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment