fix: update config

This commit is contained in:
Fine 2023-02-06 12:10:12 +08:00
parent e80774cf94
commit 5a353b814c
5 changed files with 17 additions and 7 deletions

View File

@ -15,11 +15,22 @@ limitations under the License. -->
<template>
<router-view />
</template>
<script lang="ts" setup>
import { useRoute } from "vue-router";
const route = useRoute();
setTimeout(() => {
if (route.name === "ViewWidget") {
(document.querySelector("#app") as any).style.minWidth = "120px";
} else {
(document.querySelector("#app") as any).style.minWidth = "1024px";
}
}, 500);
</script>
<style>
#app {
color: #2c3e50;
height: 100%;
overflow: hidden;
min-width: 1024px;
}
</style>

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<div class="nav-bar flex-h">
<div class="title">{{ appStore.pageTitle || t(pageName) }}</div>
<div class="title">{{ route.name === "ViewWidget" ? "" : appStore.pageTitle || t(pageName) }}</div>
<div class="app-config">
<span class="red" v-show="timeRange">{{ t("timeTips") }}</span>
<TimePicker

View File

@ -95,7 +95,7 @@ limitations under the License. -->
} else {
appStore.setIsMobile(false);
}
if (route.params.config) {
if (route.name === "ViewWidget") {
showMenu.value = false;
}
const controlMenu = () => {

View File

@ -24,7 +24,7 @@ limitations under the License. -->
</el-tooltip>
</div>
</div>
<div class="widget-chart" :style="{ height: config.height + 'px' }">
<div class="widget-chart" :style="{ height: config.height - 60 + 'px' }">
<component
:is="graph.type"
:intervalTime="appStoreWithOut.intervalTime"
@ -75,7 +75,6 @@ limitations under the License. -->
init();
async function init() {
appStoreWithOut.setPageTitle("Widget");
dashboardStore.setLayer(route.params.layer);
dashboardStore.setEntity(route.params.entity);
await setSelector();
@ -152,7 +151,7 @@ limitations under the License. -->
</script>
<style lang="scss" scoped>
.content {
min-width: 800px;
min-width: 100px;
border: 1px solid #eee;
background-color: #fff;
position: relative;

View File

@ -95,7 +95,7 @@ limitations under the License. -->
metrics: dashboardStore.selectedGrid.metrics,
metricTypes: dashboardStore.selectedGrid.metricTypes,
metricConfig: metricConfig,
height: dashboardStore.selectedGrid.h * 20,
height: dashboardStore.selectedGrid.h * 20 + 60,
});
const path = `/page/${dashboardStore.layerId}/${
dashboardStore.entity