添加链接

This commit is contained in:
chenlin
2025-12-29 17:37:38 +08:00
parent 07331d0e15
commit 260cacb8dd
10 changed files with 281 additions and 218 deletions

View File

@@ -58,6 +58,7 @@ interface Props {
scrollSpeed?: number
scrollInterval?: number,
tableTitle?: TableTitle[]
linkUrl?: string
}
const props = withDefaults(defineProps<Props>(), {
@@ -73,7 +74,7 @@ let scrollTimer: NodeJS.Timeout | null = null
let isScrolling = false
const handleItemClick = (item: AlertItem) => {
window.open(`http://10.0.64.20/pms/workorder-list`, '_blank')
window.open(props.linkUrl, '_blank')
}
// 自动滚动功能

View File

@@ -45,7 +45,7 @@
</div>
</div>
</div> -->
<AlertList style="margin-right: 1vw;" title="告警详情" :list-data="alertDetails" ></AlertList>
<AlertList style="margin-right: 1vw;" title="告警详情" :list-data="alertDetails" :linkUrl="linkUrl"></AlertList>
</div>
</template>
@@ -72,6 +72,7 @@ interface Props {
alertData?: AlertData
alertDetails?: AlertItem[]
sourceIndex?: number
linkUrl?: string
}
// 默认值

View File

@@ -11,7 +11,7 @@
<div class="chart-grid">
<div class="chart-card" v-for="item in currentCharts" :key="`${activeTab}-${item.title}`">
<div class="chart-title">{{ item.title }}</div>
<div class="chart-title" @click="handleChartTitleClick()">{{ item.title }}</div>
<div class="chart-content">
<div class="chart-wrapper">
<Echart class="donut-chart" :options="buildOption(item)" />
@@ -75,6 +75,10 @@ const defaultChart: ChartItem[] = [
{ title: '每年检查(巡检类)', total: 6, rate: 0, status: { notStarted: 3, inProgress: 0, done: 3, voided: 0 } }
]
const handleChartTitleClick = () => {
window.open('http://10.0.64.20/pms/workorder-list', '_blank')
}
const tabCharts = ref<Record<TabType, ChartItem[]>>({
安全类: [...defaultChart],
工程类: [...defaultChart]
@@ -204,6 +208,7 @@ const handleTabClick = (tab: TabType) => {
font-size: 13px;
text-align: center;
margin-bottom: 6px;
cursor: pointer;
}
.chart-content {