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

恢复一下

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