本专业高风险页面修改以及删除多余文件
This commit is contained in:
@@ -1,54 +1,14 @@
|
||||
<!-- 本专业高风险 -->
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
|
||||
import Risk from './modules/risk.vue';
|
||||
import History from './modules/history.vue';
|
||||
import Template from './modules/template.vue';
|
||||
|
||||
const themeStore = useThemeStore();
|
||||
|
||||
const TABS = [
|
||||
{ k: "highRisk", name: "高风险场景" },
|
||||
{ k: "history", name: "历史分析检索" },
|
||||
{ k: "tpl", name: "方法模板库" },
|
||||
];
|
||||
// 当前tab
|
||||
const currentTab = ref<string>("highRisk");
|
||||
|
||||
// 切换tab
|
||||
const tabChange = async (k: string) => {
|
||||
currentTab.value = k;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NSpace vertical :size="16">
|
||||
<NCard :bordered="false" size="small" :style="{ borderRadius: themeStore.themeRadius + 'px' }">
|
||||
<div
|
||||
class="flex flex-wrap items-center gap-2 border px-3 py-2 mb-3"
|
||||
:style="{ borderRadius: themeStore.themeRadius + 'px' }"
|
||||
>
|
||||
<NButton size="small" round v-for="t in TABS" :key="t.k" @click="tabChange(t.k)"
|
||||
class="text-xs"
|
||||
:type="currentTab === t.k ? 'primary' : 'default'"
|
||||
>
|
||||
{{ t.name }}
|
||||
</NButton>
|
||||
</div>
|
||||
<!-- 高风险场景 -->
|
||||
<template v-if="currentTab === 'highRisk'">
|
||||
<Risk />
|
||||
</template>
|
||||
<!-- 历史分析检索 -->
|
||||
<template v-if="currentTab === 'history'">
|
||||
<History />
|
||||
</template>
|
||||
<!-- 方法模板库 -->
|
||||
<template v-if="currentTab === 'tpl'">
|
||||
<Template />
|
||||
</template>
|
||||
<Risk />
|
||||
</NCard>
|
||||
</NSpace>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user