|
@@ -1,63 +1,77 @@
|
|
<script setup lang="jsx">
|
|
<script setup lang="jsx">
|
|
import { ref, h } from 'vue';
|
|
import { ref, h } from 'vue';
|
|
-import { NTabs, NTab, NEllipsis, NDataTable } from 'naive-ui';
|
|
|
|
|
|
+import { NTabs, NTab, NEllipsis, NModal, NInput } from 'naive-ui';
|
|
import {
|
|
import {
|
|
BaseButton,
|
|
BaseButton,
|
|
BaseInput,
|
|
BaseInput,
|
|
BaseCard,
|
|
BaseCard,
|
|
|
|
+ BaseTable,
|
|
ChatWelcome,
|
|
ChatWelcome,
|
|
SvgIcon,
|
|
SvgIcon,
|
|
RecodeCardItem,
|
|
RecodeCardItem,
|
|
TheSubMenu,
|
|
TheSubMenu,
|
|
TheChatView,
|
|
TheChatView,
|
|
} from "@/components";
|
|
} from "@/components";
|
|
|
|
+import { CustomModal } from "./components"
|
|
|
|
|
|
-
|
|
|
|
|
|
+const visible = ref(false);
|
|
|
|
|
|
const columns = [
|
|
const columns = [
|
|
- {
|
|
|
|
- title: "流量(m³/h)",
|
|
|
|
- key: 'name',
|
|
|
|
- titleAlign: 'center',
|
|
|
|
- align: 'center',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: 'COD(mg/L)',
|
|
|
|
- key: 'age',
|
|
|
|
- titleAlign: 'center',
|
|
|
|
- align: 'center',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: 'TN(mg/L)',
|
|
|
|
- key: 'address',
|
|
|
|
- titleAlign: 'center',
|
|
|
|
- align: 'center',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: 'NH3 -N(mg/L)',
|
|
|
|
- key: 'tags',
|
|
|
|
- titleAlign: 'center',
|
|
|
|
- align: 'center',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '总磷TP(mg/L)',
|
|
|
|
- key: 'actions',
|
|
|
|
- titleAlign: 'center',
|
|
|
|
- align: 'center',
|
|
|
|
- render(row) {
|
|
|
|
- // TODO: 需要调整,待后续请求参数确定
|
|
|
|
- return (<span class={ row.actions > 7 ? 'text-[#F44C49] font-bold': 'text-[1A2029]' }>{row.actions} ↑</span>)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: 'SS(mg/L)',
|
|
|
|
- key: 'actions1',
|
|
|
|
- titleAlign: 'center',
|
|
|
|
- align: 'center',
|
|
|
|
|
|
+ {
|
|
|
|
+ title: (<span class="text-[11px]">COD</span>),
|
|
|
|
+ key: 'name',
|
|
|
|
+ titleAlign: 'center',
|
|
|
|
+ align: 'center',
|
|
|
|
+ className: 'small',
|
|
|
|
+ width: '80px'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: 'COD(mg/L)',
|
|
|
|
+ key: 'small',
|
|
|
|
+ titleAlign: 'center',
|
|
|
|
+ align: 'center',
|
|
|
|
+ className: 'small',
|
|
|
|
+ width: '80px'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: 'TN(mg/L)',
|
|
|
|
+ key: 'address',
|
|
|
|
+ titleAlign: 'center',
|
|
|
|
+ align: 'center',
|
|
|
|
+ className: 'small',
|
|
|
|
+ width: '80px'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: 'NH3 -N(mg/L)',
|
|
|
|
+ key: 'tags',
|
|
|
|
+ titleAlign: 'center',
|
|
|
|
+ align: 'center',
|
|
|
|
+ className: 'small',
|
|
|
|
+ width: '80px'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '总磷TP(mg/L)',
|
|
|
|
+ key: 'actions',
|
|
|
|
+ titleAlign: 'center',
|
|
|
|
+ align: 'center',
|
|
|
|
+ className: 'small',
|
|
|
|
+ width: '80px',
|
|
|
|
+ render(row) {
|
|
|
|
+ // TODO: 需要调整,待后续请求参数确定
|
|
|
|
+ return (<span class={row.actions > 7 ? 'text-[#F44C49] font-bold' : 'text-[1A2029]'}>{row.actions} ↑</span>)
|
|
}
|
|
}
|
|
- ]
|
|
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: 'SS(mg/L)',
|
|
|
|
+ key: 'actions1',
|
|
|
|
+ titleAlign: 'center',
|
|
|
|
+ align: 'center',
|
|
|
|
+ className: 'age',
|
|
|
|
+ width: '78px'
|
|
|
|
+ }
|
|
|
|
+]
|
|
|
|
|
|
-const inWaterTableData = ref([{name: 1233, actions: "7.87"}])
|
|
|
|
|
|
+const inWaterTableData = ref([{ name: 1233, actions: "7.87" }])
|
|
|
|
|
|
// 新建对话
|
|
// 新建对话
|
|
const handleCreateDialog = () => {
|
|
const handleCreateDialog = () => {
|
|
@@ -67,13 +81,16 @@ const handleCreateDialog = () => {
|
|
const handleLoad = () => {
|
|
const handleLoad = () => {
|
|
console.log("loading")
|
|
console.log("loading")
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const handleModelVisible = () => {
|
|
|
|
+ visible.value = true
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
<section class="flex items-start h-full">
|
|
<section class="flex items-start h-full">
|
|
<TheSubMenu title="水质报警" @onLoad="handleLoad">
|
|
<TheSubMenu title="水质报警" @onLoad="handleLoad">
|
|
<template #top>
|
|
<template #top>
|
|
- <!-- border-b -->
|
|
|
|
<div class="border-[#DAE5ED]">
|
|
<div class="border-[#DAE5ED]">
|
|
<n-tabs type="line" justify-content="space-evenly">
|
|
<n-tabs type="line" justify-content="space-evenly">
|
|
<n-tab name="oasis" tab="正在报警"></n-tab>
|
|
<n-tab name="oasis" tab="正在报警"></n-tab>
|
|
@@ -113,25 +130,22 @@ const handleLoad = () => {
|
|
|
|
|
|
<TheChatView>
|
|
<TheChatView>
|
|
|
|
|
|
- <ChatWelcome
|
|
|
|
- title="您好,我是LibraAI工艺管控助手"
|
|
|
|
- card-title="常见处理方案:"
|
|
|
|
- :sub-title="[
|
|
|
|
|
|
+ <ChatWelcome title="您好,我是LibraAI工艺管控助手" card-title="常见处理方案:"
|
|
|
|
+ :sub-title="[
|
|
'报警分析功能具备实时监测与预警机制,检测到异常情况立即触发多种报警方式,推送相关',
|
|
'报警分析功能具备实时监测与预警机制,检测到异常情况立即触发多种报警方式,推送相关',
|
|
'工作人员确保问题及时处理。报警时间为每小时警报,请大家及时处理。'
|
|
'工作人员确保问题及时处理。报警时间为每小时警报,请大家及时处理。'
|
|
- ]"
|
|
|
|
|
|
+ ]"
|
|
:card-content="[
|
|
:card-content="[
|
|
'进水COD超标原因分析及常见的解决方案',
|
|
'进水COD超标原因分析及常见的解决方案',
|
|
'进水TP超标原因分析及常见的解决方案',
|
|
'进水TP超标原因分析及常见的解决方案',
|
|
'出水TN超标原因分析及常见的解决方案'
|
|
'出水TN超标原因分析及常见的解决方案'
|
|
- ]"
|
|
|
|
- v-if="false"
|
|
|
|
|
|
+ ]" v-if="false"
|
|
/>
|
|
/>
|
|
|
|
|
|
- <BaseCard>
|
|
|
|
|
|
+ <BaseCard :loading="true">
|
|
<div class="waring-answer-wrapper">
|
|
<div class="waring-answer-wrapper">
|
|
- <dl class="warning-inner warning-info_medium mb-[20px]">
|
|
|
|
- <dt class="mb-[2px] font-bold text-[#1A2029] leading-[20px]">进水总磷报警</dt>
|
|
|
|
|
|
+ <dl class="message-inner warning-info_medium ">
|
|
|
|
+ <dt class="mb-[2px] font-bold text-[#1A2029]">进水总磷报警</dt>
|
|
<dd><span>报警时间:2024-4-25 21:00</span></dd>
|
|
<dd><span>报警时间:2024-4-25 21:00</span></dd>
|
|
<dd><span class="text-[#F44C49]">报警值:7.87mg/L</span></dd>
|
|
<dd><span class="text-[#F44C49]">报警值:7.87mg/L</span></dd>
|
|
<dd><span>标准值:7.1mg/L</span></dd>
|
|
<dd><span>标准值:7.1mg/L</span></dd>
|
|
@@ -139,43 +153,73 @@ const handleLoad = () => {
|
|
<dd><span>报警次数:33</span></dd>
|
|
<dd><span>报警次数:33</span></dd>
|
|
<dd><span>状态:报警中</span></dd>
|
|
<dd><span>状态:报警中</span></dd>
|
|
</dl>
|
|
</dl>
|
|
- <div class="warning-table mb-[16px]">
|
|
|
|
- <div class="title">
|
|
|
|
- <span>当前进水数据:</span>
|
|
|
|
- </div>
|
|
|
|
- <div class="main">
|
|
|
|
- <n-data-table
|
|
|
|
- bordered
|
|
|
|
- align="center"
|
|
|
|
- :single-line="false"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="inWaterTableData"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div class="warning-table">
|
|
|
|
- <div class="title">
|
|
|
|
- <span>当前出水数据:</span>
|
|
|
|
|
|
+ <div class="table-inner">
|
|
|
|
+ <div class="warning-table mb-[8px]">
|
|
|
|
+ <div class="title">
|
|
|
|
+ <span>当前进水数据:</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="main">
|
|
|
|
+ <BaseTable :columns="columns" :data="inWaterTableData"></BaseTable>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="main">
|
|
|
|
- <n-data-table
|
|
|
|
- bordered
|
|
|
|
- align="center"
|
|
|
|
- :single-line="false"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="inWaterTableData"
|
|
|
|
- />
|
|
|
|
|
|
+ <div class="warning-table">
|
|
|
|
+ <div class="title">
|
|
|
|
+ <span>当前出水数据:</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="main">
|
|
|
|
+ <BaseTable :columns="columns" :data="[]"></BaseTable>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</BaseCard>
|
|
</BaseCard>
|
|
|
|
|
|
|
|
+ <BaseCard>
|
|
|
|
+ <p class="flex-1 text-[15px] leading-[24px]">
|
|
|
|
+ COD,即化学需氧量,是衡量水中有机物质含量的重要指标。它反映了水中可氧化有机物的量,通常用来评估水体的污染程度。水中的有机物主要来源于工业废水、生活污水、农药残留等,这些有机物不仅会导致水质变差,还会对生物和人类健康产生负面影响。因此,通过测定COD值,可以了解水中有机污染物的含量,进而评估水体的污染程度。这对于制定环境保护政策、控制污染源、保障水资源安全等方面都具有重要的指导意义
|
|
|
|
+ </p>
|
|
|
|
+ </BaseCard>
|
|
|
|
+
|
|
|
|
+ <button class="
|
|
|
|
+ px-[30px] py-[10px] mb-[20px]
|
|
|
|
+ rounded-[8px]
|
|
|
|
+ bg-white text-[13px]
|
|
|
|
+ text-[#5E5E5E] hover:text-[#2454FF]"
|
|
|
|
+ @click="handleModelVisible"
|
|
|
|
+ >
|
|
|
|
+ 水质预测推演
|
|
|
|
+ </button>
|
|
|
|
+
|
|
|
|
+ <BaseCard>
|
|
|
|
+ <p class="mb-[15px] font-bold text-[#1A2029]">需要确定以下问题,完成决策方案:</p>
|
|
|
|
+ <ul class="radio-wrapper space-y-[14px]">
|
|
|
|
+ <li class="flex items-center ">
|
|
|
|
+ <p class="mr-[14px]">在线仪表是否正常?</p>
|
|
|
|
+ <p class="radio-btn-group space-x-[14px]">
|
|
|
|
+ <span class="radio-btn active">是</span>
|
|
|
|
+ <span class="radio-btn">否</span>
|
|
|
|
+ </p>
|
|
|
|
+ </li>
|
|
|
|
+ <li class="flex items-center ">
|
|
|
|
+ <p class="mr-[14px]">在线仪表是否正常?</p>
|
|
|
|
+ <p class="radio-btn-group space-x-[14px]">
|
|
|
|
+ <span class="radio-btn">是</span>
|
|
|
|
+ <span class="radio-btn">否</span>
|
|
|
|
+ </p>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ </BaseCard>
|
|
|
|
+
|
|
</TheChatView>
|
|
</TheChatView>
|
|
</section>
|
|
</section>
|
|
|
|
+
|
|
|
|
+ <CustomModal v-model:visible="visible"></CustomModal>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
+
|
|
|
|
+
|
|
.base-card-container {
|
|
.base-card-container {
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
@@ -226,21 +270,63 @@ const handleLoad = () => {
|
|
|
|
|
|
&_medium {
|
|
&_medium {
|
|
line-height: 26px;
|
|
line-height: 26px;
|
|
- font-size: 15px;
|
|
|
|
|
|
+ font-size: 14px;
|
|
color: #1A2029;
|
|
color: #1A2029;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// 回答区域卡片
|
|
// 回答区域卡片
|
|
.waring-answer-wrapper {
|
|
.waring-answer-wrapper {
|
|
- .warning-table {
|
|
|
|
- .title {
|
|
|
|
- margin-bottom: 8px;
|
|
|
|
- line-height: 24px;
|
|
|
|
- font-size: 15px;
|
|
|
|
- font-weight: bold;
|
|
|
|
- color: #1A2029;
|
|
|
|
|
|
+ @include flex(x, start, between);
|
|
|
|
+
|
|
|
|
+ .message-inner {
|
|
|
|
+ width: 194px;
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .table-inner {
|
|
|
|
+ @include flex(y, end, center);
|
|
|
|
+ padding-left: 20px;
|
|
|
|
+ border-left: 1px solid #F1F1F1;
|
|
|
|
+ .warning-table {
|
|
|
|
+ .title {
|
|
|
|
+ margin-bottom: 8px;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ color: #1A2029;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.radio-wrapper {
|
|
|
|
+
|
|
|
|
+ .radio-btn-group {
|
|
|
|
+ @include flex(x, center, center);
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ color: #5E5E5E;
|
|
|
|
+
|
|
|
|
+ .radio-btn {
|
|
|
|
+ width: 62px;
|
|
|
|
+ height: 28px;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ background: #F4F6F8;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ line-height: 26px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+
|
|
|
|
+ &.active, &:hover {
|
|
|
|
+ color: #2454FF;
|
|
|
|
+ background: #E2F1FF;
|
|
|
|
+ }
|
|
|
|
+ &.active {
|
|
|
|
+ background: #E2F1FF url('@/assets/images/chat/bg-raido-check.png') right bottom no-repeat;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
</style>
|
|
</style>
|