Gary Gu
2025-07-24 f33e0a4d96c34fcb7c26342e880bafc4d68c4e07
feat: 新增智慧工地跳转URL
2 files modified
11 ■■■■ changed files
src/Dashboard.vue 6 ●●●●● patch | view | raw | blame | history
src/components/Header.vue 5 ●●●● patch | view | raw | blame | history
src/Dashboard.vue
@@ -97,6 +97,7 @@
        iframeSrc: window.ProjectConfig.xieTongIframeSrc,
        selectedId: "",
        isFullScreen: false,
        webUrl: "",
      };
    },
    computed: {
@@ -110,7 +111,8 @@
      this.resetEngineRelated();
    },
    methods: {
      onSelectChange(val) {
      onSelectChange(val, webUrl) {
        this.webUrl = webUrl;
        this.selectedId = val;
      },
      fullscreenChange(val) {
@@ -126,7 +128,7 @@
            window.open(window.ProjectConfig.xieTongIframeSrc, "_blank");
            break;
          case "zhihui":
            window.open("http://beijiaodaxiongan.zhihuibuild.com/#/autologin?next=", "_blank");
            window.open(this.webUrl, "_blank");
            break;
        }
      },
src/components/Header.vue
@@ -86,6 +86,7 @@
        currentDate: "",
        timer: null,
        backgroundImage: new URL("@/assets/images/backgrounds/logo.png", import.meta.url).href,
        binds: [],
      };
    },
    mounted() {
@@ -137,6 +138,7 @@
          if (res.Ret === 1) {
            const result = res.Data;
            if (result.length > 0) {
              this.binds = result;
              this.options = result.map((item) => ({
                value: item.Id,
                label: item.BindName,
@@ -153,7 +155,8 @@
       * 处理选择变化
       */
      handleSelect(val) {
        this.$emit("onSelectChange", val);
        const item = this.binds.find((item) => item.Id === val);
        this.$emit("onSelectChange", val, item.WebUrl);
      },
    },
  };