|
@@ -1,10 +1,8 @@
|
|
|
<script setup>
|
|
|
-import { ref, onMounted, watch } from 'vue';
|
|
|
+import { ref, onMounted, watch, computed, unref } from 'vue';
|
|
|
import { NScrollbar, useMessage, NTabs, NTabPane } from 'naive-ui';
|
|
|
-import { objectCopy } from '@/utils/tools';
|
|
|
import { TheChatView } from '@/components';
|
|
|
|
|
|
-
|
|
|
import { controlApi } from "@/api/control";
|
|
|
|
|
|
import BaseButton from './components/BaseButton.vue';
|
|
@@ -14,237 +12,263 @@ import BaseCard from './components/BaseCard.vue';
|
|
|
import BaseRadioGroup from './components/BaseRadioGroup.vue';
|
|
|
import BaseChooseItem from './components/BaseChooseItem.vue';
|
|
|
import BaseInput from './components/BaseInput.vue';
|
|
|
-import { BaseNumberInput } from '@/components';
|
|
|
|
|
|
import TheResultPanel from './components/TheResultPanel.vue';
|
|
|
import TheEchartPanel from './components/TheEchartPanel.vue';
|
|
|
|
|
|
const message = useMessage();
|
|
|
const isVisibleBtn = ref(true);
|
|
|
-const dataSource = ref({});
|
|
|
-const chooseItemRef = ref([]);
|
|
|
-
|
|
|
-const tabList = ref([
|
|
|
- { label: '自动', key: 'auto' },
|
|
|
- { label: '1号池', key: 'onePool' },
|
|
|
- { label: '2号池', key: 'twoPool' },
|
|
|
- { label: '人工投放', key: 'worker' },
|
|
|
+const isVisibleUpdateInfo = ref(false);
|
|
|
+const systemStatus = ref(0);
|
|
|
+const configureStatus = ref(1);
|
|
|
+
|
|
|
+const columnData = ref([
|
|
|
+ { label: '后反馈设定', key: 'htfksd', value: '' },
|
|
|
+ { label: '基准系数', key: 'jzxs', value: '' },
|
|
|
+ { label: '修正系数', key: 'xzxs', value: '' },
|
|
|
+ { label: '控制系数', key: 'kzxs', value: '' },
|
|
|
+ { label: '水量分配系数', key: 'slfpxs', value: '' },
|
|
|
+ { label: '碳源当量', key: 'tydl', value: '' },
|
|
|
+ { label: '转换系数', key: 'zhxs', value: '' },
|
|
|
+ { label: '稀释配属', key: 'sxps', value: '' },
|
|
|
+ { label: '药剂密度', key: 'yymd', value: '' },
|
|
|
+ { label: '最小启动流量', key: 'zxqdll', value: '' },
|
|
|
+ { label: '碳氮比', key: 'tdb', value: '' }
|
|
|
])
|
|
|
|
|
|
-const columnData = [
|
|
|
- { label: '后反馈设定', key: 'hfksd' },
|
|
|
- { label: '基准系数', key: 'jzxs' },
|
|
|
- { label: '修正系数', key: 'xzxs' },
|
|
|
- { label: '控制系数', key: 'kzxs' },
|
|
|
- { label: '水量分配系数', key: 'sffpxs' },
|
|
|
- { label: '碳源当量', key: 'tydl' },
|
|
|
- { label: '转换系数', key: 'zhxs' },
|
|
|
- { label: '稀释配属', key: 'xsbs' },
|
|
|
- { label: '药剂密度', key: 'yjmd' },
|
|
|
- { label: '最小启动流量', key: 'zxqdll' },
|
|
|
- { label: '碳氮比', key: 'tdb' }
|
|
|
-]
|
|
|
-
|
|
|
-// 基础参数 - 按钮选择
|
|
|
-const paramData = ref({
|
|
|
- pump: 0, // 加药泵
|
|
|
- running: 0, // 运行方式
|
|
|
- pond: 0, // 池组手自动方式
|
|
|
- setting: 0, // 智适应碳源设置 1# 2#
|
|
|
- jslYB: null, // 进水流量
|
|
|
- jscod: null, // 进水COD
|
|
|
- hycxsy: null, // 好氧池硝酸盐
|
|
|
- qycxsy: null, // 缺氧池硝酸盐
|
|
|
- qycad: null, // 缺氧池氨氮
|
|
|
- jszd: null // 进水总氮
|
|
|
+const doseNum = ref(null);
|
|
|
+const flowNum = ref(null);
|
|
|
+const updateNum = ref(null);
|
|
|
+
|
|
|
+const tabKeyEnum = {
|
|
|
+ 0: 'auto',
|
|
|
+ 1: 'onePool',
|
|
|
+ 2: 'twoPool',
|
|
|
+ 3: 'worker'
|
|
|
+}
|
|
|
+
|
|
|
+// water实时数据
|
|
|
+const waterConfigParams = ref({});
|
|
|
+
|
|
|
+// 基础数据
|
|
|
+const dataSourceParams = ref({
|
|
|
+ auto: {},
|
|
|
+ onePool: {},
|
|
|
+ twoPool: {},
|
|
|
+ worker: {
|
|
|
+ medicineAmount: null
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
-// 基础系数 - input输入
|
|
|
-const factorData = ref({
|
|
|
- hfksd: 12.00, // 后反馈设置定
|
|
|
- jzxs: 3.10, // 基准系数
|
|
|
- xzxs: 1.00, // 修正系数
|
|
|
- kzxs: 5.20, // 控制系数
|
|
|
- sffpxs: 1.00, // 水量分配系数
|
|
|
- tydl: 0.90, // 碳源当量
|
|
|
- zhxs: 0.50, // 转换系数
|
|
|
- xsbs: 1.00, // 稀释倍数
|
|
|
- yjmd: 1.10, // 药剂密度
|
|
|
- zxqdll: 0.02, // 最小启动流量
|
|
|
- tdb: 3.54 // 碳氮比
|
|
|
+// 系数
|
|
|
+const baseSourceParams = ref({
|
|
|
+ numberBeng: 0,
|
|
|
+ type: 0
|
|
|
})
|
|
|
|
|
|
-const originParamData = objectCopy(paramData.value);
|
|
|
-const originFactorData = objectCopy(factorData.value);
|
|
|
+// 当前Tab选中的key
|
|
|
+const tabActiveKey = computed(() => tabKeyEnum[baseSourceParams.value.type]);
|
|
|
|
|
|
-const factorInpData = ref(objectCopy(factorData.value));
|
|
|
+// 系统状态开关
|
|
|
+const systemSwitchType = computed(() => baseSourceParams.value.addType === 0 && systemStatus.value === 1);
|
|
|
|
|
|
-const doseNum = ref(null);
|
|
|
-const flowNum = ref(null);
|
|
|
+const onEditConfirm = () => {
|
|
|
+ isVisibleBtn.value = true;
|
|
|
+ columnData.value = columnData.value.map(item => {
|
|
|
+ Object.entries(baseSourceParams.value).forEach(([key, value]) => {
|
|
|
+ if (key === item.key) {
|
|
|
+ item.value = value;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return item;
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
-watch(() => paramData.value.setting, () => {
|
|
|
- handelReset("变化了");
|
|
|
-});
|
|
|
+const onEditCancel = () => {
|
|
|
+ isVisibleBtn.value = true;
|
|
|
|
|
|
-// 重置
|
|
|
-const handelReset = () => {
|
|
|
+ columnData.value.map(({ key, value }) => {
|
|
|
+ baseSourceParams.value[key] = value;
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
- if (!isVisibleBtn.value) {
|
|
|
- return message.warning("设定参数系数的值未保存")
|
|
|
- }
|
|
|
+const onFinalResult = () => {
|
|
|
+ const addStatus = systemStatus.value === 0 ? 1 : 0;
|
|
|
|
|
|
- chooseItemRef.value.forEach(item => item.resetInpVal());
|
|
|
+ controlApi.putSystemStatus({ addStatus })
|
|
|
|
|
|
- paramData.value = objectCopy({ ...originParamData, setting: paramData.value.setting });
|
|
|
- factorData.value = objectCopy(originFactorData);
|
|
|
- factorInpData.value = objectCopy(originFactorData);
|
|
|
+ systemStatus.value = addStatus;
|
|
|
|
|
|
- doseNum.value = '';
|
|
|
- flowNum.value = '';
|
|
|
-}
|
|
|
+ message.warning(addStatus === 0 ? '当前投药状态,已停用' : '当前投药状态,投放中');
|
|
|
|
|
|
-// 计算最终结果
|
|
|
-const handleResult = () => {
|
|
|
+}
|
|
|
|
|
|
- if (!isVisibleBtn.value) {
|
|
|
- return message.warning("设定参数系数的值未保存")
|
|
|
+const onUpdateTab = (index) => {
|
|
|
+ const currentData = dataSourceParams.value[tabKeyEnum[index]];
|
|
|
+ baseSourceParams.value.type = index;
|
|
|
+ if ( !Object.keys(currentData).length ) {
|
|
|
+ isVisibleUpdateInfo.value = false;
|
|
|
+ return;
|
|
|
}
|
|
|
+ updateNum.value = null;
|
|
|
+ handleMedicateAmount();
|
|
|
+}
|
|
|
|
|
|
- const codeSetEnum = {
|
|
|
- jslYB: '进水流量',
|
|
|
- jscod: '进水COD',
|
|
|
- hycxsy: '好氧池硝酸盐',
|
|
|
- qycxsy: '缺氧池硝酸盐',
|
|
|
- qycad: '缺氧池氨氮',
|
|
|
- jszd: '进水总氮',
|
|
|
-
|
|
|
- hfksd: '后反馈设置',
|
|
|
- jzxs: '基准系数',
|
|
|
- xzxs: '修正系数',
|
|
|
- kzxs: '控制系数',
|
|
|
- sffpxs: '水量分配系数',
|
|
|
- tydl: '碳源当量',
|
|
|
- zhxs: '转换系数',
|
|
|
- xsbs: '稀释倍数',
|
|
|
- yjmd: '药剂密度',
|
|
|
- zxqdll: '最小启动流量',
|
|
|
- tdb: '碳氮比'
|
|
|
- }
|
|
|
- const whitelist = ['pump', 'running', 'pond', 'setting'];
|
|
|
- const mergeData = { ...paramData.value, ...factorData.value };
|
|
|
- const keyList = Object.keys(mergeData);
|
|
|
- let isErrorItem = null;
|
|
|
-
|
|
|
- for (let i = 0; i < keyList.length; i++) {
|
|
|
- const key = keyList[i];
|
|
|
- const val = mergeData[key]
|
|
|
-
|
|
|
- if (!val && !whitelist.includes(key)) {
|
|
|
- isErrorItem = { key, val, label: codeSetEnum[key] }
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
+const getTotalNum = () => {
|
|
|
+ const {
|
|
|
+ hycXsyOne = 0, hycXsyTwo = 0,
|
|
|
+ qycAdOne = 0, qycAdTwo = 0,
|
|
|
+ qycYxyOne = 0, qycYxyTwo = 0,
|
|
|
+ jsLlOne = 0, jsLlTwo = 0,
|
|
|
+ jsCodOne = 0, jsCodTwo = 0
|
|
|
+ } = dataSourceParams.value[tabActiveKey.value];
|
|
|
+
|
|
|
+ const {
|
|
|
+ htfksd, xzxs, kzxs, slfpxs, zhxs, tydl, jzxs, yymd, sxps
|
|
|
+ } = baseSourceParams.value;
|
|
|
+
|
|
|
+ const rOne1 = (((2*hycXsyOne-htfksd)+((qycAdOne+qycYxyOne)*xzxs-htfksd))*(jzxs-1))*(jsLlOne*slfpxs)/1000;
|
|
|
+ const rOne2 = (rOne1*kzxs-(jsLlOne*slfpxs*jsCodOne*zhxs/1000))/tydl;
|
|
|
+ const rOne3 = rOne2/yymd/1000*sxps
|
|
|
+
|
|
|
+ const rTwo1 = (((2*hycXsyTwo-htfksd)+((qycAdTwo+qycYxyTwo)*xzxs-htfksd))*(jzxs-1))*(jsLlTwo*slfpxs)/1000;
|
|
|
+ const rTwo2 = (rTwo1*kzxs-(jsLlTwo*slfpxs*jsCodTwo*zhxs/1000))/tydl;
|
|
|
+ const rTwo3 = rTwo2/yymd/1000*sxps
|
|
|
+
|
|
|
+ const r1 = (rOne3 < 0 || !rOne3) ? 0 : rOne3.toFixed(3);
|
|
|
+ const r2 = (rTwo3 < 0 || !rTwo3) ? 0 : rTwo3.toFixed(3);
|
|
|
+
|
|
|
+ return [ r1, r2 ];
|
|
|
+}
|
|
|
|
|
|
- if (isErrorItem) {
|
|
|
- return message.warning(`${isErrorItem.label}未填写`)
|
|
|
- }
|
|
|
+const onConfirmUpdate = async () => {
|
|
|
|
|
|
- const stepOne = (((2 * paramData.value.hycxsy - factorData.value.hfksd) + ((paramData.value.qycad + paramData.value.qycxsy) * factorData.value.xzxs - factorData.value.hfksd)) * (factorData.value.jzxs - 1)) * (paramData.value.jslYB * factorData.value.sffpxs) / 1000
|
|
|
+ const data = await controlApi.postAddRecord({
|
|
|
+ ...dataSourceParams.value[tabKeyEnum[baseSourceParams.value.type]],
|
|
|
+ ...baseSourceParams.value,
|
|
|
+ });
|
|
|
|
|
|
- const setpTwo = (stepOne * factorData.value.kzxs - (paramData.value.jslYB * factorData.value.sffpxs * paramData.value.jscod * factorData.value.zhxs / 1000)) / factorData.value.tydl
|
|
|
+ isVisibleUpdateInfo.value = false;
|
|
|
|
|
|
- const setpThree = setpTwo / factorData.value.yjmd / 1000 * factorData.value.xsbs
|
|
|
+ message.success("系统加药量,更新成功");
|
|
|
|
|
|
- doseNum.value = setpThree.toFixed(3);
|
|
|
- flowNum.value = paramData.value.jslYB;
|
|
|
+ doseNum.value = updateNum.value;
|
|
|
}
|
|
|
|
|
|
-const onEditConfirm = () => {
|
|
|
- const keys = Object.keys(factorInpData.value);
|
|
|
- let isError = false;
|
|
|
-
|
|
|
- for (let i = 0; i < keys.length; i++) {
|
|
|
- const key = keys[i];
|
|
|
- const val = factorInpData.value[key];
|
|
|
- if (!val || val === Infinity) {
|
|
|
- message.warning("数据来源填写有误,请检查")
|
|
|
- isError = true;
|
|
|
- break;
|
|
|
+// 更新投药结果
|
|
|
+const handleMedicateAmount = () => {
|
|
|
+ const type = tabActiveKey.value;
|
|
|
+ const lastNum = unref(updateNum);
|
|
|
+
|
|
|
+ if ( tabActiveKey === 'worker' ) {
|
|
|
+ const medicineNum = dataSourceParams.value.worker.medicineAmount;
|
|
|
+ if ( medicineNum && lastNum != medicineNum ) {
|
|
|
+ updateNum.value = medicineNum;
|
|
|
+ isVisibleUpdateInfo.value = true;
|
|
|
}
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
- if (isError) return;
|
|
|
+ const [r1, r2] = getTotalNum();
|
|
|
|
|
|
- isVisibleBtn.value = true;
|
|
|
- factorData.value = JSON.parse(JSON.stringify(factorInpData.value));
|
|
|
-}
|
|
|
-
|
|
|
-const onEditCancel = () => {
|
|
|
- isVisibleBtn.value = true;
|
|
|
- factorInpData.value = JSON.parse(JSON.stringify(factorData.value));
|
|
|
-}
|
|
|
+ if ( type === 'auto') {
|
|
|
+ const maxR = Math.max( r1, r2 );
|
|
|
+ if ( maxR != lastNum ) {
|
|
|
+ updateNum.value = maxR;
|
|
|
+ isVisibleUpdateInfo.value = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log( r1, lastNum );
|
|
|
+ if ( type === 'onePool' && r1 !== lastNum ) {
|
|
|
+ updateNum.value = r1;
|
|
|
+ isVisibleUpdateInfo.value = true;
|
|
|
+ }
|
|
|
|
|
|
-const onFinalResult = () => {
|
|
|
- if (!flowNum.value) {
|
|
|
- return message.warning('您还未完成投加计算,请完成后再试');
|
|
|
+ if ( type === 'twoPool' && r2 !== lastNum) {
|
|
|
+ updateNum.value = r2;
|
|
|
+ isVisibleUpdateInfo.value = true;
|
|
|
}
|
|
|
- message.warning('您还未接入组态系统,请接入后再试');
|
|
|
+
|
|
|
}
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- const { data } = await controlApi.getNumValue();
|
|
|
- let result = {};
|
|
|
- Object.entries(data).forEach(([key, val]) => {
|
|
|
- result[key] = val ? Number(val.toFixed(2)) : val;
|
|
|
+ // 获取最后一条记录 getSystemStatus
|
|
|
+ controlApi.getBaseData().then(({ data }) => {
|
|
|
+ const {
|
|
|
+ numberBeng = 0, type = 0,
|
|
|
+ htfksd, jzxs, xzxs, kzxs, slfpxs, tydl, zhxs, sxps, yymd, zxqdll, tdb,
|
|
|
+ medicineAmount,
|
|
|
+ addType,
|
|
|
+ tytjTransientLL
|
|
|
+ } = data;
|
|
|
+
|
|
|
+ baseSourceParams.value = {
|
|
|
+ ...baseSourceParams.value,
|
|
|
+ numberBeng, type,
|
|
|
+ htfksd, jzxs, xzxs, kzxs, slfpxs, tydl, zhxs, sxps, yymd, zxqdll, tdb,
|
|
|
+ addType
|
|
|
+ };
|
|
|
+
|
|
|
+ updateNum.value = medicineAmount
|
|
|
+
|
|
|
+ doseNum.value = medicineAmount;
|
|
|
+
|
|
|
+ flowNum.value = tytjTransientLL;
|
|
|
+
|
|
|
+ dataSourceParams.value[tabActiveKey.value] = data;
|
|
|
+
|
|
|
+ columnData.value = columnData.value.map(item => {
|
|
|
+ item.value = data[item.key];
|
|
|
+ return item;
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ // 获取实时数据
|
|
|
+ controlApi.getNumValue().then(({ data }) => {
|
|
|
+ Object.entries(data).forEach(([key, val]) => {
|
|
|
+ data[key] = val;
|
|
|
+ });
|
|
|
+ // water实时数据
|
|
|
+ waterConfigParams.value = data;
|
|
|
+ })
|
|
|
+
|
|
|
+ // 获取是否允许投药开关
|
|
|
+ controlApi.getSystemStatus().then(({ data }) => {
|
|
|
+ // 0不允许 1允许
|
|
|
+ systemStatus.value = data;
|
|
|
+ console.log( "获取是否允许投药开关", data );
|
|
|
});
|
|
|
- dataSource.value = result;
|
|
|
-})
|
|
|
-
|
|
|
-const datas = ref({
|
|
|
- auto: {
|
|
|
- },
|
|
|
- onePool: {
|
|
|
-
|
|
|
- },
|
|
|
- twoPool: {
|
|
|
-
|
|
|
- },
|
|
|
- worker: {
|
|
|
- }
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
+ {{ systemSwitchType }}
|
|
|
<section class="flex items-start h-full">
|
|
|
<TheChatView leftTitle="智适应碳源投加" :isChatSlot="false" :isFooter="false">
|
|
|
<template #control>
|
|
|
<div class="control-container space-x-[12px]">
|
|
|
<div class="left-section">
|
|
|
|
|
|
- <BaseTitle title="智能投加计算">
|
|
|
- <!-- <template #right>
|
|
|
- <BaseButton @click="handelReset">重置</BaseButton>
|
|
|
- <BaseButton type="gradual" @on-click="handleResult">投加计算</BaseButton>
|
|
|
- </template> -->
|
|
|
- </BaseTitle>
|
|
|
+ <BaseTitle title="智能投加计算"></BaseTitle>
|
|
|
|
|
|
<n-scrollbar class="scrollbar" style="height: 100%;">
|
|
|
<div class="form-content">
|
|
|
+
|
|
|
<BaseCard title="选择加药泵">
|
|
|
- <BaseRadioCard v-model="paramData.pump"></BaseRadioCard>
|
|
|
+ <BaseRadioCard v-model="baseSourceParams.numberBeng"></BaseRadioCard>
|
|
|
</BaseCard>
|
|
|
|
|
|
<BaseCard title="投加运行方式">
|
|
|
<span class="status-bar">
|
|
|
- <i>启用智适应碳源投加</i>
|
|
|
+ <i>{{ baseSourceParams.addType === 0 ? '启用智适应碳源投加' : '手动碳源投加' }}</i>
|
|
|
</span>
|
|
|
</BaseCard>
|
|
|
|
|
|
<BaseCard title="选择池组手自动方式">
|
|
|
- <n-tabs justify-content="space-between" v-model:value="name" type="line" :bar-width="40"
|
|
|
- tab-style="min-width: 89px;" tab-class="custom-tab_item" animated>
|
|
|
- <n-tab-pane name="自动">
|
|
|
+ <n-tabs justify-content="space-between" type="line" :bar-width="40"
|
|
|
+ tab-style="min-width: 89px;" tab-class="custom-tab_item" animated :on-update:value="onUpdateTab" :value="baseSourceParams.type">
|
|
|
+ <n-tab-pane :name="0" tab="自动">
|
|
|
<div class="panel-header_main">
|
|
|
<p>设置数据来源</p>
|
|
|
<p class="space-x-[20px] text-center">
|
|
@@ -254,77 +278,96 @@ const datas = ref({
|
|
|
</div>
|
|
|
<div class="space-y-[12px]">
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="auto"
|
|
|
title="进水流量"
|
|
|
unit="m³"
|
|
|
isDouble
|
|
|
- v-model:type="datas.auto.jsLlType"
|
|
|
- v-model:value1="datas.auto.jsLlOne"
|
|
|
- v-model:value2="datas.auto.jsLlTwo"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.auto.jsLlType"
|
|
|
+ v-model:value1="dataSourceParams.auto.jsLlOne"
|
|
|
+ v-model:value2="dataSourceParams.auto.jsLlTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '仪表', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '仪表', value1: waterConfigParams.jslYB, value2: waterConfigParams.jslYB }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="auto"
|
|
|
title="进水COD"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.auto.jsCodType"
|
|
|
- v-model:value1="datas.auto.jsCodOne"
|
|
|
- v-model:value2="datas.auto.jsCodTwo"
|
|
|
+ isDouble
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.auto.jsCodType"
|
|
|
+ v-model:value1="dataSourceParams.auto.jsCodOne"
|
|
|
+ v-model:value2="dataSourceParams.auto.jsCodTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '仪表', value1: 3344, value2: dataSource.jslYB },
|
|
|
- { label: '化验', value1: 3344, value2: 22222 }
|
|
|
+ { label: '仪表', value1: waterConfigParams.jsCodYB, value2: waterConfigParams.jsCodYB },
|
|
|
+ { label: '化验', value1: waterConfigParams.jsCodHY, value2: waterConfigParams.jsCodHY }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
+
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="auto"
|
|
|
title="好氧池硝酸盐"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.auto.hycXsyType"
|
|
|
- v-model:value1="datas.auto.hycXsyOne"
|
|
|
- v-model:value2="datas.auto.hycXsyTwo"
|
|
|
+ isDouble
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.auto.hycXsyType"
|
|
|
+ v-model:value1="dataSourceParams.auto.hycXsyOne"
|
|
|
+ v-model:value2="dataSourceParams.auto.hycXsyTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '化验', value1: 3344, value2: dataSource.jslYB },
|
|
|
- { label: '预测', value1: 3344, value2: 22222 }
|
|
|
+ { label: '化验', value1: waterConfigParams.hyXsyHYOne, value2: waterConfigParams.hyXsyHYTwo },
|
|
|
+ { label: '预测', value1: waterConfigParams.hyXsyYCOne, value2: waterConfigParams.hyXsyYCTwo }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="auto"
|
|
|
title="缺氧池硝酸盐"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.auto.qycYxyType"
|
|
|
- v-model:value1="datas.auto.qycYxyOne"
|
|
|
- v-model:value2="datas.auto.qycYxyTwo"
|
|
|
+ isDouble
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.auto.qycYxyType"
|
|
|
+ v-model:value1="dataSourceParams.auto.qycYxyOne"
|
|
|
+ v-model:value2="dataSourceParams.auto.qycYxyTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '化验', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '化验', value1: waterConfigParams.qyXsyHYOne, value2: waterConfigParams.qyXsyHYTwo }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="auto"
|
|
|
title="缺氧池氨氮"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.auto.qycAdType"
|
|
|
- v-model:value1="datas.auto.qycAdOne"
|
|
|
- v-model:value2="datas.auto.qycAdTwo"
|
|
|
+ isDouble
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.auto.qycAdType"
|
|
|
+ v-model:value1="dataSourceParams.auto.qycAdOne"
|
|
|
+ v-model:value2="dataSourceParams.auto.qycAdTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '化验', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '化验', value1: waterConfigParams.qyAdHYOne, value2: waterConfigParams.qyAdHYTwo }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="auto"
|
|
|
title="进水总氮"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.auto.jsTnType"
|
|
|
- v-model:value1="datas.auto.jsTnOne"
|
|
|
- v-model:value2="datas.auto.jsTnTwo"
|
|
|
+ isDouble
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.auto.jsTnType"
|
|
|
+ v-model:value1="dataSourceParams.auto.jsTnOne"
|
|
|
+ v-model:value2="dataSourceParams.auto.jsTnTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '仪表', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '仪表', value1: waterConfigParams.jsTnYB, value2: waterConfigParams.jsTnYB }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
</div>
|
|
|
</n-tab-pane>
|
|
|
- <n-tab-pane name="1号池">
|
|
|
+
|
|
|
+ <n-tab-pane :name="1" tab="1号池">
|
|
|
<div class="panel-header_main">
|
|
|
<p>设置数据来源</p>
|
|
|
<p class="space-x-[20px] text-center">
|
|
@@ -333,71 +376,84 @@ const datas = ref({
|
|
|
</div>
|
|
|
<div class="space-y-[12px]">
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="onePool"
|
|
|
title="进水流量"
|
|
|
unit="m³"
|
|
|
- v-model:type="datas.onePool.jsLlType"
|
|
|
- v-model:value1="datas.onePool.jsLlOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.onePool.jsLlType"
|
|
|
+ v-model:value1="dataSourceParams.onePool.jsLlOne"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '仪表', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '仪表', value1: waterConfigParams.jslYB, value2: waterConfigParams.jslYB }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="onePool"
|
|
|
title="进水COD"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.onePool.jsCodType"
|
|
|
- v-model:value1="datas.onePool.jsCodOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.onePool.jsCodType"
|
|
|
+ v-model:value1="dataSourceParams.onePool.jsCodOne"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '仪表', value1: 3344, value2: dataSource.jslYB },
|
|
|
- { label: '化验', value1: 3344, value2: 22222 }
|
|
|
+ { label: '仪表', value1: waterConfigParams.jsCodYB, value2: waterConfigParams.jsCodYB },
|
|
|
+ { label: '化验', value1: waterConfigParams.jsCodHY, value2: waterConfigParams.jsCodHY }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="onePool"
|
|
|
title="好氧池硝酸盐"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.onePool.hycXsyType"
|
|
|
- v-model:value1="datas.onePool.hycXsyOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.onePool.hycXsyType"
|
|
|
+ v-model:value1="dataSourceParams.onePool.hycXsyOne"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '化验', value1: 3344, value2: dataSource.jslYB },
|
|
|
- { label: '预测', value1: 3344, value2: 22222 }
|
|
|
+ { label: '化验', value1: waterConfigParams.hyXsyHYOne, value2: waterConfigParams.hyXsyHYTwo },
|
|
|
+ { label: '预测', value1: waterConfigParams.hyXsyYCOne, value2: waterConfigParams.hyXsyYCTwo }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="onePool"
|
|
|
title="缺氧池硝酸盐"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.onePool.qycYxyType"
|
|
|
- v-model:value1="datas.onePool.qycYxyOne"
|
|
|
- v-model:value2="datas.onePool.qycYxyTwo"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.onePool.qycYxyType"
|
|
|
+ v-model:value1="dataSourceParams.onePool.qycYxyOne"
|
|
|
+ v-model:value2="dataSourceParams.onePool.qycYxyTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '化验', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '化验', value1: waterConfigParams.qyXsyHYOne, value2: waterConfigParams.qyXsyHYTwo }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="onePool"
|
|
|
title="缺氧池氨氮"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.onePool.qycAdType"
|
|
|
- v-model:value1="datas.onePool.qycAdOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.onePool.qycAdType"
|
|
|
+ v-model:value1="dataSourceParams.onePool.qycAdOne"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '化验', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '化验', value1: waterConfigParams.qyAdHYOne, value2: waterConfigParams.qyAdHYTwo }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="onePool"
|
|
|
title="进水总氮"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.onePool.jsTnType"
|
|
|
- v-model:value1="datas.onePool.jsTnOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.onePool.jsTnType"
|
|
|
+ v-model:value1="dataSourceParams.onePool.jsTnOne"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '仪表', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '仪表', value1: waterConfigParams.jsTnYB, value2: waterConfigParams.jsTnYB }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
</div>
|
|
|
</n-tab-pane>
|
|
|
- <n-tab-pane name="2号池">
|
|
|
+
|
|
|
+ <n-tab-pane :name="2" tab="2号池">
|
|
|
<div class="panel-header_main">
|
|
|
<p>设置数据来源</p>
|
|
|
<p class="space-x-[20px] text-center">
|
|
@@ -405,72 +461,85 @@ const datas = ref({
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="space-y-[12px]">
|
|
|
+ {{ }}
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="twoPool"
|
|
|
title="进水流量"
|
|
|
unit="m³"
|
|
|
- v-model:type="datas.twoPool.jsLlType"
|
|
|
- v-model:value1="datas.twoPool.jsLlOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.twoPool.jsLlType"
|
|
|
+ v-model:value1="dataSourceParams.twoPool.jsLlTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '仪表', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '仪表', value1: waterConfigParams.jslYB, value2: waterConfigParams.jslYB }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="twoPool"
|
|
|
title="进水COD"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.twoPool.jsCodType"
|
|
|
- v-model:value1="datas.twoPool.jsCodOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.twoPool.jsCodType"
|
|
|
+ v-model:value1="dataSourceParams.twoPool.jsCodTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '仪表', value1: 3344, value2: dataSource.jslYB },
|
|
|
- { label: '化验', value1: 3344, value2: 22222 }
|
|
|
+ { label: '仪表', value1: waterConfigParams.jsCodYB, value2: waterConfigParams.jsCodYB },
|
|
|
+ { label: '化验', value1: waterConfigParams.jsCodHY, value2: waterConfigParams.jsCodHY }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="twoPool"
|
|
|
title="好氧池硝酸盐"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.twoPool.hycXsyType"
|
|
|
- v-model:value1="datas.twoPool.hycXsyOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.twoPool.hycXsyType"
|
|
|
+ v-model:value1="dataSourceParams.twoPool.hycXsyTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '化验', value1: 3344, value2: dataSource.jslYB },
|
|
|
- { label: '预测', value1: 3344, value2: 22222 }
|
|
|
+ { label: '化验', value1: waterConfigParams.hyXsyHYOne, value2: waterConfigParams.hyXsyHYTwo },
|
|
|
+ { label: '预测', value1: waterConfigParams.hyXsyYCOne, value2: waterConfigParams.hyXsyYCTwo }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="twoPool"
|
|
|
title="缺氧池硝酸盐"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.twoPool.qycYxyType"
|
|
|
- v-model:value1="datas.twoPool.qycYxyOne"
|
|
|
- v-model:value2="datas.twoPool.qycYxyTwo"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.twoPool.qycYxyType"
|
|
|
+ v-model:value1="dataSourceParams.twoPool.qycYxyTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '化验', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '化验', value1: waterConfigParams.qyXsyHYOne, value2: waterConfigParams.qyXsyHYTwo }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="twoPool"
|
|
|
title="缺氧池氨氮"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.twoPool.qycAdType"
|
|
|
- v-model:value1="datas.twoPool.qycAdOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.twoPool.qycAdType"
|
|
|
+ v-model:value1="dataSourceParams.twoPool.qycAdTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '化验', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '化验', value1: waterConfigParams.qyAdHYOne, value2: waterConfigParams.qyAdHYTwo }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
<BaseChooseItem
|
|
|
+ tab-key="twoPool"
|
|
|
title="进水总氮"
|
|
|
unit="mg/L"
|
|
|
- v-model:type="datas.twoPool.jsTnType"
|
|
|
- v-model:value1="datas.twoPool.jsTnOne"
|
|
|
+ @on-update="handleMedicateAmount"
|
|
|
+ v-model:type="dataSourceParams.twoPool.jsTnType"
|
|
|
+ v-model:value1="dataSourceParams.twoPool.jsTnTwo"
|
|
|
:btn-group="[
|
|
|
{ label: '手动', value1: '', value2: '' },
|
|
|
- { label: '仪表', value1: 3344, value2: dataSource.jslYB }
|
|
|
+ { label: '仪表', value1: waterConfigParams.jsTnYB, value2: waterConfigParams.jsTnYB }
|
|
|
]"
|
|
|
></BaseChooseItem>
|
|
|
</div>
|
|
|
</n-tab-pane>
|
|
|
- <n-tab-pane name="人工投放">
|
|
|
+
|
|
|
+ <n-tab-pane :name="3" tab="人工投放">
|
|
|
<div class="panel-header_main">
|
|
|
<p>设置数据来源</p>
|
|
|
<p class="space-x-[20px] text-center">
|
|
@@ -480,7 +549,11 @@ const datas = ref({
|
|
|
<div class="w-full flex items-center justify-between">
|
|
|
<span>人工投放:</span>
|
|
|
<div class="w-[200px]">
|
|
|
- <BaseInput :isCloseIcon="false"></BaseInput>
|
|
|
+ <BaseInput
|
|
|
+ :isCloseIcon="false"
|
|
|
+ v-model="dataSourceParams.worker.medicineAmount"
|
|
|
+ @on-blur="handleMedicateAmount"
|
|
|
+ ></BaseInput>
|
|
|
</div>
|
|
|
</div>
|
|
|
</n-tab-pane>
|
|
@@ -490,8 +563,7 @@ const datas = ref({
|
|
|
<template #titleRight>
|
|
|
<div>
|
|
|
<div class="flex items-center space-x-[4px] cursor-pointer text-[#2454FF] text-[13px]"
|
|
|
- v-show="isVisibleBtn" @click="isVisibleBtn = false
|
|
|
- ">
|
|
|
+ v-show="isVisibleBtn" @click="isVisibleBtn = false">
|
|
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
<path d="M2.33337 14H14.3334" stroke="#2454FF" stroke-linecap="round"
|
|
|
stroke-linejoin="round" />
|
|
@@ -506,16 +578,17 @@ const datas = ref({
|
|
|
</ul>
|
|
|
</div>
|
|
|
</template>
|
|
|
+
|
|
|
<ul class="data-source-list space-y-[12px]">
|
|
|
<li class="data-soruce-item" v-for="item, index in columnData">
|
|
|
<span>{{ item.label }}:</span>
|
|
|
<span class="unit" v-show="isVisibleBtn">
|
|
|
- {{ factorData[item.key].toFixed(2) }}
|
|
|
+ {{ item.value }}
|
|
|
{{ index === 0 ? 'mg/L' : '' }}
|
|
|
</span>
|
|
|
<div style="width: 140px;" v-show="!isVisibleBtn">
|
|
|
<BaseInput :unit="index === 0 ? 'mg/L' : ''" size='small' :isNeedFlotBtn="false"
|
|
|
- v-model="factorInpData[item.key]" isCenter placeholder=""></BaseInput>
|
|
|
+ v-model="baseSourceParams[item.key]" isCenter placeholder=""></BaseInput>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -524,8 +597,17 @@ const datas = ref({
|
|
|
</n-scrollbar>
|
|
|
</div>
|
|
|
<div class="right-section">
|
|
|
- <TheResultPanel :doseNum="doseNum" :flowNum="flowNum" @on-click="onFinalResult"></TheResultPanel>
|
|
|
- <TheEchartPanel></TheEchartPanel>
|
|
|
+ <TheResultPanel
|
|
|
+ :updateNum="updateNum"
|
|
|
+ :flowNum="flowNum"
|
|
|
+ :doseNum="doseNum"
|
|
|
+ :configuration-status="baseSourceParams.addType"
|
|
|
+ v-model:system="systemStatus"
|
|
|
+ v-model="isVisibleUpdateInfo"
|
|
|
+ @on-click="onFinalResult"
|
|
|
+ @on-update="onConfirmUpdate"
|
|
|
+ ></TheResultPanel>
|
|
|
+ <TheEchartPanel></TheEchartPanel>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -570,7 +652,7 @@ const datas = ref({
|
|
|
}
|
|
|
|
|
|
.form-content {
|
|
|
- padding: 24px 16px;
|
|
|
+ padding: 0 16px 24px 16px;
|
|
|
}
|
|
|
|
|
|
.panel-header_main {
|
|
@@ -596,7 +678,7 @@ const datas = ref({
|
|
|
.unit {
|
|
|
font-family: "D-DIN-PRO-700-Bold";
|
|
|
font-weight: bold;
|
|
|
- font-size: 14px;
|
|
|
+ font-size: 12px;
|
|
|
color: #333;
|
|
|
}
|
|
|
}
|
|
@@ -604,23 +686,24 @@ const datas = ref({
|
|
|
}
|
|
|
|
|
|
.right-section {
|
|
|
- display: flex;
|
|
|
- flex-flow: column;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
+ border-radius: 8px;
|
|
|
+ background: #fff;
|
|
|
+ overflow: hidden;
|
|
|
|
|
|
- .top {
|
|
|
- flex-shrink: 1;
|
|
|
- height: 214px;
|
|
|
- border-radius: 8px;
|
|
|
- border: 0.5px solid #FFF;
|
|
|
- background: linear-gradient(90deg, #E0E8FC 0%, #F2F4FF 100%);
|
|
|
- }
|
|
|
+ // .top {
|
|
|
+ // flex-shrink: 1;
|
|
|
+ // height: 214px;
|
|
|
+ // border-radius: 8px;
|
|
|
+ // border: 0.5px solid #FFF;
|
|
|
+ // background: linear-gradient(90deg, #E0E8FC 0%, #F2F4FF 100%);
|
|
|
+ // }
|
|
|
|
|
|
- .bottom {
|
|
|
- height: 100%;
|
|
|
- background: pink;
|
|
|
- }
|
|
|
+ // .bottom {
|
|
|
+ // height: 100%;
|
|
|
+ // background: pink;
|
|
|
+ // }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -691,8 +774,7 @@ const datas = ref({
|
|
|
.custom-tab_item {
|
|
|
@include flex (x, center, center);
|
|
|
height: 35px;
|
|
|
- border-top-left-radius: 4px;
|
|
|
- border-top-right-radius: 4px;
|
|
|
+ border-radius: 4px;
|
|
|
background: #F3F5FA;
|
|
|
|
|
|
&.n-tabs-tab--active {
|