123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <template>
- <div class="horHead horSty">
- <div class="horHead-content">
- <div>
- <div class="firtitle">{{ projectObj.localName }}</div>
- <div class="sectitle">懂空间,更懂办公</div>
- </div>
-
- </div>
- <div class="horHead-left">
- <img
- :src="logo"
- alt=""
- style="height: 48px"
- />
- </div>
- <div class="horHead-right">
- <div class="right-item">
- <span class="item-time">{{ nowStr }}</span>
- </div>
- <div class="right-item">{{ weatherCont.text }}</div>
- <div
- class="right-item"
- @click="changeScreen"
- >
- <img
- class="firstImg"
- alt=""
- :src="nowScreen == 'vertical' ? changeHor : changeVer"
- />
- </div>
- <div
- class="right-item"
- style="display: none"
- >退出</div>
- </div>
- </div>
- </template>
- <script lang="ts">
- import { ref, defineComponent, reactive, toRefs, onMounted } from "vue";
- import { useRoute, useRouter } from "vue-router";
- import moment from "moment";
- import { storeToRefs } from "pinia";
- import useProjectStore from "@/store/useProjectStore";
- import { dapingImage } from "@/utils/dapingImage";
- import { setRem } from "@/utils/rem";
- export default defineComponent({
- props: {
- navigateItem: {
- type: String,
- },
- },
- setup(props, contx) {
- const { persagyLogo, zhijiangLogo, changeHor, changeVer } = dapingImage;
- const route: any = useRoute();
- const router = useRouter();
- const projectStore = useProjectStore();
- const { weatherCont, projectObj, projectId } = storeToRefs(
- projectStore
- );
- const allData = reactive({
-
-
-
-
- logo: projectId == "Pj3301100002" ? zhijiangLogo : persagyLogo,
- changeHor: changeHor,
- changeVer: changeVer,
- nowScreen:
- route.path.indexOf("horiScreen") > -1
- ? "horizontal"
- : "vertical",
- nowStr: moment().format("YYYY.MM.DD HH:mm"),
- setNowInterval() {
- setInterval(() => {
- var nowTimeStr2 = moment().format("YYYY.MM.DD HH:mm");
- allData.nowStr = nowTimeStr2;
- }, 30000);
- },
- changeScreen() {
- if (allData.nowScreen == "vertical") {
- allData.nowScreen = "horizontal";
-
- router.push({ path: "/horiScreen" });
- } else {
- allData.nowScreen = "vertical";
-
- router.push({ path: "/verScreen" });
- }
- },
- });
- onMounted(() => {
- allData.setNowInterval();
- });
- return { ...toRefs(allData), weatherCont, projectObj };
- },
- });
- </script>
- <style scoped lang="scss">
- .horHead {
- // display: flex;
- // justify-content: space-between;
- // align-items: center;
- position: relative;
- &.horSty {
- height: 74px;
- }
- .horHead-content {
- width: 100%;
- height: 100%;
- color: #efdec6;
- text-align: center;
- .firtitle {
- font-weight: 700;
- font-size: 38px;
- font-family: Alibaba PuHuiTi;
- }
- .sectitle {
- font-weight: 500;
- font-size: 16px;
- letter-spacing: 8px;
- }
- }
- .horHead-left {
- position: absolute;
- top: 0;
- left: 0;
- font-size: 0;
- }
- .horHead-right {
- position: absolute;
- top: 0;
- right: 0;
- display: flex;
- // justify-content: space-between;
- height: 46px;
- // width: 396px;
- .right-item {
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- // padding: 12px 16px;
- font-size: 20px;
- color: #efdec6;
- font-weight: 400;
- line-height: 22px;
- margin-left: 18px;
- // background: #ffffff99;
- // border: 2px solid #ffffffcc;
- box-sizing: border-box;
- // border-radius: 8px;
- .firstImg {
- margin-right: 6px;
- width: 28px;
- }
- .item-time {
- font-family: Persagy;
- font-weight: 400;
- }
- }
- }
- }
- </style>
|