|
@@ -2,17 +2,12 @@
|
|
|
import { ref, onMounted, watch, computed, unref } from 'vue';
|
|
|
import { NScrollbar, useMessage, NTabs, NTabPane } from 'naive-ui';
|
|
|
import { TheChatView } from '@/components';
|
|
|
-
|
|
|
import { controlApi } from "@/api/control";
|
|
|
-
|
|
|
-import BaseButton from './components/BaseButton.vue';
|
|
|
import BaseTitle from './components/BaseTitle.vue';
|
|
|
import BaseRadioCard from './components/BaseRadioCard.vue';
|
|
|
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 TheResultPanel from './components/TheResultPanel.vue';
|
|
|
import TheEchartPanel from './components/TheEchartPanel.vue';
|
|
|
|
|
@@ -20,7 +15,6 @@ const message = useMessage();
|
|
|
const isVisibleBtn = ref(true);
|
|
|
const isVisibleUpdateInfo = ref(false);
|
|
|
const systemStatus = ref(0);
|
|
|
-const configureStatus = ref(1);
|
|
|
|
|
|
const columnData = ref([
|
|
|
{ label: '后反馈设定', key: 'htfksd', value: '' },
|
|
@@ -69,9 +63,7 @@ const baseSourceParams = ref({
|
|
|
// 当前Tab选中的key
|
|
|
const tabActiveKey = computed(() => tabKeyEnum[baseSourceParams.value.type]);
|
|
|
|
|
|
-// 系统状态开关
|
|
|
-const systemSwitchType = computed(() => baseSourceParams.value.addType === 0 && systemStatus.value === 1);
|
|
|
-
|
|
|
+// 编辑系数 - confirm
|
|
|
const onEditConfirm = () => {
|
|
|
isVisibleBtn.value = true;
|
|
|
columnData.value = columnData.value.map(item => {
|
|
@@ -82,8 +74,11 @@ const onEditConfirm = () => {
|
|
|
})
|
|
|
return item;
|
|
|
})
|
|
|
+
|
|
|
+ handleMedicateAmount();
|
|
|
}
|
|
|
|
|
|
+// 编辑系数 - 取消
|
|
|
const onEditCancel = () => {
|
|
|
isVisibleBtn.value = true;
|
|
|
|
|
@@ -143,7 +138,7 @@ const getTotalNum = () => {
|
|
|
|
|
|
const onConfirmUpdate = async () => {
|
|
|
|
|
|
- const data = await controlApi.postAddRecord({
|
|
|
+ await controlApi.postAddRecord({
|
|
|
...dataSourceParams.value[tabKeyEnum[baseSourceParams.value.type]],
|
|
|
...baseSourceParams.value,
|
|
|
});
|
|
@@ -178,7 +173,7 @@ const handleMedicateAmount = () => {
|
|
|
isVisibleUpdateInfo.value = true;
|
|
|
}
|
|
|
}
|
|
|
- console.log( r1, lastNum );
|
|
|
+
|
|
|
if ( type === 'onePool' && r1 !== lastNum ) {
|
|
|
updateNum.value = r1;
|
|
|
isVisibleUpdateInfo.value = true;
|
|
@@ -188,7 +183,6 @@ const handleMedicateAmount = () => {
|
|
|
updateNum.value = r2;
|
|
|
isVisibleUpdateInfo.value = true;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
onMounted(async () => {
|
|
@@ -236,14 +230,12 @@ onMounted(async () => {
|
|
|
controlApi.getSystemStatus().then(({ data }) => {
|
|
|
// 0不允许 1允许
|
|
|
systemStatus.value = data;
|
|
|
- console.log( "获取是否允许投药开关", data );
|
|
|
});
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- {{ systemSwitchType }}
|
|
|
<section class="flex items-start h-full">
|
|
|
<TheChatView leftTitle="智适应碳源投加" :isChatSlot="false" :isFooter="false">
|
|
|
<template #control>
|
|
@@ -461,7 +453,6 @@ onMounted(async () => {
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="space-y-[12px]">
|
|
|
- {{ }}
|
|
|
<BaseChooseItem
|
|
|
tab-key="twoPool"
|
|
|
title="进水流量"
|
|
@@ -588,7 +579,7 @@ onMounted(async () => {
|
|
|
</span>
|
|
|
<div style="width: 140px;" v-show="!isVisibleBtn">
|
|
|
<BaseInput :unit="index === 0 ? 'mg/L' : ''" size='small' :isNeedFlotBtn="false"
|
|
|
- v-model="baseSourceParams[item.key]" isCenter placeholder=""></BaseInput>
|
|
|
+ v-model="baseSourceParams[item.key]" isCenter placeholder="" :readonly="index === columnData.length - 1"></BaseInput>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|