添加链接
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
// 自动滚动功能
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
// 默认值
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user