Commit a8e67166873178568be2431ae5c0f35c16e3a14c

Authored by xp.Huang
2 parents 63a72004 a56a0c81

Merge branch 'main_dev'

... ... @@ -9,7 +9,11 @@
9 9 </path>
10 10 </svg>
11 11 </div>
12   - <iframe id="iframeContent" :src="iframeLink" :width="w" :height="h" style="border-width: 0"></iframe>
  12 + <iframe v-if="iframeLink" id="iframeContent" :src="iframeLink" :width="w" :height="h"
  13 + style="border-width: 0"></iframe>
  14 + <n-empty v-else class="empty" size="huge" description="暂未绑定页面">
  15 +
  16 + </n-empty>
13 17 </div>
14 18 </template>
15 19
... ... @@ -57,6 +61,8 @@ watch(
57 61 () => props.chartConfig.option.dataset,
58 62 (newData: string) => {
59 63 const { dataset, publicId, organizationId, platform, isShare } = props.chartConfig.option as typeof typeOption
  64 +
  65 + if (!dataset) return
60 66 iframeLink.value = createScadaPageLink({ id: dataset, platform, publicId, organizationId, }, isShare ? ScadaModeEnum.SHARE : ScadaModeEnum.LIGHTBOX, false)
61 67 },
62 68 {
... ... @@ -93,4 +99,33 @@ const handleMouseleave = () => (isShowSvg.value = false)
93 99 right: 0.1vw;
94 100 }
95 101 }
  102 +
  103 +.empty {
  104 + width: 100%;
  105 + height: 100%;
  106 + display: flex;
  107 + justify-content: center;
  108 + align-items: center;
  109 +
  110 + --size: 120px;
  111 +
  112 + @include deep() {
  113 + .n-empty__icon {
  114 + width: var(--size);
  115 + height: var(--size);
  116 +
  117 + .n-base-icon {
  118 + width: var(--size);
  119 + height: var(--size);
  120 +
  121 + svg {
  122 + width: var(--size);
  123 + height: var(--size);
  124 + }
  125 + }
  126 + }
  127 + }
  128 +
  129 +
  130 +}
96 131 </style>
... ...