|
@@ -17,7 +17,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="left-space">
|
|
<div class="left-space">
|
|
<div class="text">
|
|
<div class="text">
|
|
- <div>博锐研发中心二区</div>
|
|
|
|
|
|
+ <div>{{ officeData.localName }}</div>
|
|
<div>
|
|
<div>
|
|
<img :src="parseImgUrl('ipdImages', 'vector.svg')" />
|
|
<img :src="parseImgUrl('ipdImages', 'vector.svg')" />
|
|
<span>无人</span>
|
|
<span>无人</span>
|
|
@@ -48,19 +48,24 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="fotter">
|
|
<div class="fotter">
|
|
- <div class="fotter-item">
|
|
|
|
- <img :src="parseImgUrl('ipdImages', 'rectangle1.svg')" />
|
|
|
|
- <span>博锐研发中心二区 </span>
|
|
|
|
- </div>
|
|
|
|
- <div class="fotter-item">
|
|
|
|
- <img :src="parseImgUrl('ipdImages', 'rectangle3.svg')" />
|
|
|
|
- <span>博锐研发中心二区 </span>
|
|
|
|
- </div>
|
|
|
|
- <div class="fotter-item">
|
|
|
|
- <img :src="parseImgUrl('ipdImages', 'rectangle1.svg')" />
|
|
|
|
- <span>博锐研发中心二区 </span>
|
|
|
|
- </div>
|
|
|
|
- <div class="fotter-item-end">
|
|
|
|
|
|
+ <template v-for="(item, index) in spaceData">
|
|
|
|
+ <div
|
|
|
|
+ class="fotter-item"
|
|
|
|
+ :class="item.active ? 'fotter-item-active' : ''"
|
|
|
|
+ :key="index + 'nav'"
|
|
|
|
+ v-if="index < 3"
|
|
|
|
+ @click="chacgeSpace(item)"
|
|
|
|
+ >
|
|
|
|
+ <img
|
|
|
|
+ v-if="item.active"
|
|
|
|
+ :src="parseImgUrl('ipdImages', 'rectangle-active.svg')"
|
|
|
|
+ />
|
|
|
|
+ <img :src="parseImgUrl('ipdImages', 'rectangle1.svg')" v-else />
|
|
|
|
+
|
|
|
|
+ <span>{{ item.spaceName }} </span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <div class="fotter-item-end" v-if="spaceData && spaceData.length > 3">
|
|
<img :src="parseImgUrl('ipdImages', 'rectangle-fotter.svg')" />
|
|
<img :src="parseImgUrl('ipdImages', 'rectangle-fotter.svg')" />
|
|
<span>…</span>
|
|
<span>…</span>
|
|
</div>
|
|
</div>
|
|
@@ -163,6 +168,7 @@ import {
|
|
getSpaceTemp,
|
|
getSpaceTemp,
|
|
querySpaceSceneConfig,
|
|
querySpaceSceneConfig,
|
|
queryCustomAndScence,
|
|
queryCustomAndScence,
|
|
|
|
+ queryWorkSpace,
|
|
} from "@/apis/envmonitor";
|
|
} from "@/apis/envmonitor";
|
|
import Keys from "@/constant/key";
|
|
import Keys from "@/constant/key";
|
|
import {
|
|
import {
|
|
@@ -363,6 +369,7 @@ export default defineComponent({
|
|
let scenarioArr: any = [];
|
|
let scenarioArr: any = [];
|
|
let realEevList: any = []; // 解决v-if报错的问题临时使用
|
|
let realEevList: any = []; // 解决v-if报错的问题临时使用
|
|
let workkArr: any = [];
|
|
let workkArr: any = [];
|
|
|
|
+ let spaceData: any = [];
|
|
const proxyData = reactive({
|
|
const proxyData = reactive({
|
|
parseImgUrl: parseImgUrl,
|
|
parseImgUrl: parseImgUrl,
|
|
isShowWork: false,
|
|
isShowWork: false,
|
|
@@ -740,7 +747,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
if (proxyData.officeData.temperature) {
|
|
if (proxyData.officeData.temperature) {
|
|
proxyData.officeData.temperature =
|
|
proxyData.officeData.temperature =
|
|
- proxyData.officeData.temperature.toFixed(2) * 1;
|
|
|
|
|
|
+ proxyData.officeData.temperature.toFixed(1) * 1;
|
|
}
|
|
}
|
|
// 环境数据
|
|
// 环境数据
|
|
proxyData.checkSpaceType(proxyData.officeData.roomFuncType);
|
|
proxyData.checkSpaceType(proxyData.officeData.roomFuncType);
|
|
@@ -1593,7 +1600,44 @@ export default defineComponent({
|
|
}
|
|
}
|
|
}, 1000);
|
|
}, 1000);
|
|
},
|
|
},
|
|
- // 存储当前项目id
|
|
|
|
|
|
+ // 平板当前空间
|
|
|
|
+ spaceData: spaceData,
|
|
|
|
+ queryWorkSpace() {
|
|
|
|
+ let params: any = {
|
|
|
|
+ criteria: {
|
|
|
|
+ //类型:Object 必有字段 备注:无
|
|
|
|
+ macAddress: "test", //类型:String 必有字段 备注:mac地址
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ queryWorkSpace(params).then((res) => {
|
|
|
|
+ let resData: any = res;
|
|
|
|
+ if (resData.result === "success") {
|
|
|
|
+ proxyData.spaceData = resData?.content ?? [];
|
|
|
|
+ } else {
|
|
|
|
+ proxyData.spaceData = [];
|
|
|
|
+ }
|
|
|
|
+ proxyData.spaceData.map((item: any) => {
|
|
|
|
+ if (item.isMajorSpace) {
|
|
|
|
+ item.active = true;
|
|
|
|
+ } else {
|
|
|
|
+ item.active = false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 重置空间状态
|
|
|
|
+ resetSpaceStatus() {
|
|
|
|
+ proxyData.spaceData.map((item: any) => {
|
|
|
|
+ item.active = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 切换空间
|
|
|
|
+ chacgeSpace(item: any) {
|
|
|
|
+ proxyData.resetSpaceStatus();
|
|
|
|
+ proxyData.spaceInfo = item;
|
|
|
|
+ proxyData.init();
|
|
|
|
+ item.active = true;
|
|
|
|
+ },
|
|
});
|
|
});
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
// proxyData.envmonitorMove()
|
|
// proxyData.envmonitorMove()
|
|
@@ -1606,19 +1650,18 @@ export default defineComponent({
|
|
}
|
|
}
|
|
});
|
|
});
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- if (route.query.showSpaceTip === "true") {
|
|
|
|
- proxyData.showSpaceTip = true;
|
|
|
|
- proxyData.setTimerCloseTip();
|
|
|
|
- } else {
|
|
|
|
- proxyData.showSpaceTip = false;
|
|
|
|
- }
|
|
|
|
// 获取天气信息
|
|
// 获取天气信息
|
|
|
|
+ // console.log("router====")
|
|
|
|
+ // console.log(route.query)
|
|
|
|
+ let spaceId: any = route.query.spaceId;
|
|
proxyData.spaceInfo = {
|
|
proxyData.spaceInfo = {
|
|
// spaceId: "Sp1101080259ce19c0effb604fe380f3a00c37e3959e",
|
|
// spaceId: "Sp1101080259ce19c0effb604fe380f3a00c37e3959e",
|
|
- spaceId: "Sp1101080259f55d2f60cac6450da22387e1b90567e7",
|
|
|
|
|
|
+ spaceId: spaceId,
|
|
};
|
|
};
|
|
- proxyData.init();
|
|
|
|
proxyData.getWeather();
|
|
proxyData.getWeather();
|
|
|
|
+ proxyData.init();
|
|
|
|
+ // 获取当前平板绑定的空间
|
|
|
|
+ proxyData.queryWorkSpace();
|
|
});
|
|
});
|
|
return {
|
|
return {
|
|
...toRefs(proxyData),
|
|
...toRefs(proxyData),
|
|
@@ -1919,6 +1962,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
&:nth-child(3) {
|
|
&:nth-child(3) {
|
|
margin-left: -25px;
|
|
margin-left: -25px;
|
|
|
|
+ z-index: 111;
|
|
}
|
|
}
|
|
span {
|
|
span {
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -1942,13 +1986,14 @@ export default defineComponent({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.fotter-item-end {
|
|
.fotter-item-end {
|
|
- position:relative;
|
|
|
|
|
|
+ position: relative;
|
|
display: inline-block;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
vertical-align: middle;
|
|
width: 93px;
|
|
width: 93px;
|
|
height: 40px;
|
|
height: 40px;
|
|
margin-left: -30px;
|
|
margin-left: -30px;
|
|
text-align: center;
|
|
text-align: center;
|
|
|
|
+ z-index: 1;
|
|
img {
|
|
img {
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
@@ -1956,7 +2001,7 @@ export default defineComponent({
|
|
position: absolute;
|
|
position: absolute;
|
|
left: 50%;
|
|
left: 50%;
|
|
top: 50%;
|
|
top: 50%;
|
|
- transform: translate(-50%,-50%);
|
|
|
|
|
|
+ transform: translate(-50%, -50%);
|
|
font-family: "Noto Sans SC";
|
|
font-family: "Noto Sans SC";
|
|
font-style: normal;
|
|
font-style: normal;
|
|
font-weight: 400;
|
|
font-weight: 400;
|