<template>
  <fixed1920>
    <div class="g-cnt">
      <div class="m-top animate__animated menu animate__fadeInDown">
        <img class="logo" src="@/assets/img/yantai/index/db.png" />
        <div class="name">烟台市智慧社区平台</div>
      </div>

      <div class="m-list">
        <div class="list">
          <div class="animate__animated menu animate__fadeInLeft">
            <img
              class="menu-bg"
              src="@/assets/img/yantai/index/yuanhu-you.png"
            />
            <div class="menu-list">
              <div class="menu-item z-zuo" @click="toPage('/main/base-resi')">
                人房信息
              </div>
              <div
                class="menu-item z-zuo"
                @click="toPage('/main/base-epidemic-antiInfo')"
              >
                疫情防控
              </div>
              <div
                class="menu-item z-zuo"
                @click="toPage('/main/shequzhili-event-eventList')"
              >
                社区治理
              </div>
              <div
                class="menu-item z-zuo z-on"
                @click="toPage('/main/communityParty-members-index')"
              >
                社区党建
              </div>
              <div
                class="menu-item z-zuo"
                @click="toPage('/main/communityService-measure-index')"
              >
                社区服务
              </div>
              <div class="menu-item z-zuo" @click="toPage('/main/workPc-guidance-guidanceList.vue')">便携工具</div>
              <div class="menu-item z-zuo" @click="toPage('/main/workSys-mapConfig')">系统管理</div>
            </div>
          </div>

          <img class="arrow" src="@/assets/img/yantai/index/zuo.png" />

          <div
            class="item animate__animated animate__pulse"
            @click="handleClickItem(1)"
          >
            <div class="item-wrap">
              <img class="logo" src="@/assets/img/yantai/index/guanli.png" />
              <div class="name">管理平台</div>
            </div>
          </div>

          <div
            class="item animate__animated animate__pulse"
            @click="handleClickItem(2)"
          >
            <div class="item-wrap">
              <img class="logo" src="@/assets/img/yantai/index/shuju.png" />
              <div class="name">数据分析平台</div>
            </div>
          </div>

          <img class="arrow" src="@/assets/img/yantai/index/you.png" />

          <div class="menu animate__animated menu animate__fadeInRight">
            <img
              class="menu-bg"
              src="@/assets/img/yantai/index/yuanhu-zuo.png"
            />
            <div class="menu-list">
              <div
                class="menu-item z-you"
                @click="toPage('/main-shuju/visual-basicinfo-basicInfoMain')"
              >
                基础信息
              </div>
              <div
                class="menu-item z-you"
                @click="toPage('/main-shuju/visual-warning-index')"
              >
                人员预警
              </div>
              <div
                class="menu-item z-you"
                @click="toPage('/main-shuju/visual-measure-service')"
              >
                需求清单
              </div>
              <div
                class="menu-item z-you z-on"
                @click="toPage('/main-shuju/visual-communityParty-party')"
              >
                社区党建
              </div>
              <div
                class="menu-item z-you"
                @click="
                  toPage(
                    '/main-shuju/visual-communityGovern-shijianchuli-shijianchulifenxi'
                  )
                "
              >
                社区治理
              </div>
              <div
                class="menu-item z-you"
                @click="toPage('/main-shuju/visual-heart-index')"
              >
                初心互助
              </div>
              <div class="menu-item z-you" @click="toPage('/main-shuju/i-1536625421829599234')">
                三维展示
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="m-footer">
        <div class="login-footer">
          <p>
            <a href="http://www.elinkchina.com.cn/" target="_blank">{{
              $t("login.copyright")
            }}</a>
          </p>
        </div>
      </div>
    </div>
  </fixed1920>
</template>
<script>
import { messages } from "@/i18n";
import fixed1920 from "@/views/components/fixed1920.vue";

export default {
  data() {
    return {
      pubKey: null, // 获取到公钥
      isShowLogin: true,
      i18nMessages: messages,
    };
  },

  components: { fixed1920 },
  computed: {
    bdStyle() {
      console.log("clientHeight", document.documentElement.clientHeight);
      const scale = document.documentElement.clientWidth / 1920;
      const height = document.documentElement.clientHeight / scale;
      const top = (document.documentElement.clientHeight - height) / 2;
      const left = (document.documentElement.clientWidth - 1920) / 2;
      return {
        transform: `scale(${scale})`,
        height: `${height}px`,
        left: `${left}px`,
        top: `${top}px`,
      };
    },
  },
  created() {},
  mounted() {},

  methods: {
    handleClickItem(k) {
      if (k == 1) {
        this.$router.replace({ name: "main" });
      } else if (k == 2) {
        this.$router.replace({ name: "main-shuju" });
      }
    },

    toPage(path) {
      this.$router.push({ path });
    },

    // 平阴联动 自动登录接口
    getAutoLogin(platformToken) {
      this.dataForm.thirdToken = platformToken;
      this.dataForm.platform = "pyld";
      this.$http
        .post(`/auth/sso/oper/third/login`, this.dataForm)
        .then(({ data: res }) => {
          if (res.code !== 0) {
            if (res.code == 8302) {
              return this.$message.error(res.msg);
            }
            return this.$message.error(res.msg);
          }
          localStorage.setItem("customerId", res.data.customerId);
          localStorage.setItem("userType", "work");
          localStorage.setItem("showHeader", "0");
          localStorage.setItem("token", res.data.token);
          this.$router.replace({ name: "home" });
        })
        .catch(() => {});
      // epmet-ext9.elinkservice.cn/platform-admin
    },
  },
};
</script>

<style lang="scss" src="@/assets/scss/pages/yantai-index.scss" scoped></style>
