|
@@ -1,9 +1,10 @@
|
|
|
<script setup>
|
|
|
+import { NTabs, NTab, NEllipsis } from 'naive-ui';
|
|
|
import SvgIcon from '@/components/SvgIcon';
|
|
|
import BaseButton from "@/components/BaseButton";
|
|
|
import RecodeCardItem from '@/components/RecodeCardItem';
|
|
|
|
|
|
-import TheSubMenu from '@/components/Layout/TheSubMenuCard.vue';
|
|
|
+import TheSubMenu from '@/components/Layout/TheSubMenu.vue';
|
|
|
import TheChatView from '@/components/Layout/TheChatView.vue';
|
|
|
import BaseInput from '@/components/BaseInput';
|
|
|
|
|
@@ -11,19 +12,99 @@ import BaseInput from '@/components/BaseInput';
|
|
|
const handleCreateDialog = () => {
|
|
|
console.log("handleCreateDialog");
|
|
|
}
|
|
|
+
|
|
|
+const handleLoad = () => {
|
|
|
+ console.log( "loading" )
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<section class="flex items-start h-full">
|
|
|
- <TheSubMenu title="历史记录">
|
|
|
+ <TheSubMenu title="水质报警" @onLoad="handleLoad">
|
|
|
<template #top>
|
|
|
- <div class="create-btn px-[11px] pb-[22px]">
|
|
|
- <BaseButton @click="handleCreateDialog">新建对话</BaseButton>
|
|
|
+ <!-- border-b -->
|
|
|
+ <div class="border-[#DAE5ED]">
|
|
|
+ <n-tabs type="line" justify-content="space-evenly">
|
|
|
+ <n-tab name="oasis" tab="正在报警"></n-tab>
|
|
|
+ <n-tab name="thebeatles" tab="历史报警"></n-tab>
|
|
|
+ </n-tabs>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <div class="pr-[4px] text-[#5e5e5e]">
|
|
|
- <RecodeCardItem v-for="item in 100" :key="item" />
|
|
|
+ <div class="px-[12px] py-[14px] text-[#5e5e5e]">
|
|
|
+ <div class="grid grid-cols-1 gap-[12px]">
|
|
|
+ <div class="card-item" v-for="item in 10">
|
|
|
+ <div class="status-tips status-tips_warning">
|
|
|
+ <span>报警中</span>
|
|
|
+ </div>
|
|
|
+ <dl class="info-list">
|
|
|
+ <dt>
|
|
|
+ <n-ellipsis class="font-bold text-[#1A2029] leading-[20px]">进水总磷超标报警</n-ellipsis>
|
|
|
+ </dt>
|
|
|
+ <dd>
|
|
|
+ <span>报警时间:2024-4-25 21:00</span>
|
|
|
+ </dd>
|
|
|
+ <dd class="flex items-center">
|
|
|
+ <span>报警值:7.87mg/L</span>
|
|
|
+ <SvgIcon name="tool-up" class="ml-[4px]"></SvgIcon>
|
|
|
+ </dd>
|
|
|
+ <dd>
|
|
|
+ <span>报警级别:一级</span>
|
|
|
+ </dd>
|
|
|
+ <dd>
|
|
|
+ <span>报警次数:3</span>
|
|
|
+ </dd>
|
|
|
+ </dl>
|
|
|
+ <BaseButton type="gray" class="mt-[8px]">操作</BaseButton>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</TheSubMenu>
|
|
|
+ <TheChatView></TheChatView>
|
|
|
</section>
|
|
|
-</template>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.card-item {
|
|
|
+ position: relative;
|
|
|
+ padding: 20px 8px 8px 8px;
|
|
|
+ border-radius: 4px;
|
|
|
+ background: #DDE5EF;
|
|
|
+
|
|
|
+ .status-tips {
|
|
|
+ position: absolute;
|
|
|
+ width: 36px;
|
|
|
+ height: 14px;
|
|
|
+ top: 0;
|
|
|
+ right: 0px;
|
|
|
+ border-radius: 0px 4px 0px 4px;
|
|
|
+ font-size: 8px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 14px;
|
|
|
+
|
|
|
+ &_warning, &_being {
|
|
|
+ color: #F44C49;
|
|
|
+ background: #FFF0ED;
|
|
|
+ }
|
|
|
+
|
|
|
+ &_success {
|
|
|
+ color: #51BF8E;
|
|
|
+ background: #E9FAF2;
|
|
|
+ }
|
|
|
+
|
|
|
+ &_close {
|
|
|
+ color: #999999;
|
|
|
+ background: #D5D5D5;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-list {
|
|
|
+ line-height: 16px;
|
|
|
+ font-size: 11px;
|
|
|
+ color: #5E5E5E;
|
|
|
+
|
|
|
+ dd {
|
|
|
+ margin-top: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|