MedicinalView.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816
  1. <script setup>
  2. import { ref, onMounted, computed, unref } from 'vue';
  3. import { NScrollbar, useMessage, NTabs, NTabPane, c } from 'naive-ui';
  4. import { TheChatView } from '@/components';
  5. import { controlApi } from "@/api/control";
  6. import BaseTitle from './components/BaseTitle.vue';
  7. import BaseRadioCard from './components/BaseRadioCard.vue';
  8. import BaseCard from './components/BaseCard.vue';
  9. import BaseChooseItem from './components/BaseChooseItem.vue';
  10. import BaseInput from './components/BaseInput.vue';
  11. import TheResultPanel from './components/TheResultPanel.vue';
  12. import TheEchartPanel from './components/TheEchartPanel.vue';
  13. const message = useMessage();
  14. const isVisibleBtn = ref(true);
  15. const isVisibleUpdateInfo = ref(false);
  16. const systemStatus = ref(0);
  17. const columnData = ref([
  18. { label: '后反馈设定', key: 'htfksd', value: '' },
  19. { label: '基准系数', key: 'jzxs', value: '' },
  20. { label: '修正系数', key: 'xzxs', value: '' },
  21. { label: '控制系数', key: 'kzxs', value: '' },
  22. { label: '水量分配系数', key: 'slfpxs', value: '' },
  23. { label: '碳源当量', key: 'tydl', value: '' },
  24. { label: '转换系数', key: 'zhxs', value: '' },
  25. { label: '稀释倍数', key: 'sxps', value: '' },
  26. { label: '药剂密度', key: 'yymd', value: '' },
  27. { label: '最小启动流量', key: 'zxqdll', value: '' },
  28. { label: '碳氮比', key: 'tdb', value: '' }
  29. ])
  30. const doseNum = ref(null);
  31. const flowNum = ref(null);
  32. const updateNum = ref(null);
  33. const tabKeyEnum = {
  34. 0: 'auto',
  35. 1: 'onePool',
  36. 2: 'twoPool',
  37. 3: 'worker'
  38. }
  39. // water实时数据
  40. const waterConfigParams = ref({});
  41. // 基础数据
  42. const dataSourceParams = ref({
  43. auto: {},
  44. onePool: {},
  45. twoPool: {},
  46. worker: {
  47. medicineAmount: null
  48. }
  49. })
  50. // 系数
  51. const baseSourceParams = ref({
  52. numberBeng: 0,
  53. type: 0
  54. })
  55. // 当前Tab选中的key
  56. const tabActiveKey = computed(() => tabKeyEnum[baseSourceParams.value.type]);
  57. // 编辑系数 - confirm
  58. const onEditConfirm = () => {
  59. isVisibleBtn.value = true;
  60. columnData.value = columnData.value.map(item => {
  61. Object.entries(baseSourceParams.value).forEach(([key, value]) => {
  62. if (key === item.key) {
  63. item.value = value;
  64. }
  65. })
  66. return item;
  67. })
  68. handleMedicateAmount();
  69. }
  70. // 编辑系数 - 取消
  71. const onEditCancel = () => {
  72. isVisibleBtn.value = true;
  73. columnData.value.map(({ key, value }) => {
  74. baseSourceParams.value[key] = value;
  75. })
  76. }
  77. const onFinalResult = () => {
  78. const addStatus = systemStatus.value === 0 ? 1 : 0;
  79. controlApi.putSystemStatus({ addStatus });
  80. systemStatus.value = addStatus;
  81. message.warning(addStatus === 0 ? '当前投药状态:已停用' : '当前投药状态:投放中');
  82. }
  83. const onUpdateTab = (index) => {
  84. const currentData = dataSourceParams.value[tabKeyEnum[index]];
  85. baseSourceParams.value.type = index;
  86. if ( !Object.keys(currentData).length ) {
  87. isVisibleUpdateInfo.value = false;
  88. return;
  89. }
  90. handleMedicateAmount();
  91. }
  92. const getTotalNum = () => {
  93. const {
  94. hycXsyOne = 0, hycXsyTwo = 0,
  95. qycAdOne = 0, qycAdTwo = 0,
  96. qycYxyOne = 0, qycYxyTwo = 0,
  97. jsLlOne = 0, jsLlTwo = 0,
  98. jsCodOne = 0, jsCodTwo = 0
  99. } = dataSourceParams.value[tabActiveKey.value];
  100. const {
  101. htfksd, xzxs, kzxs, slfpxs, zhxs, tydl, jzxs, yymd, sxps
  102. } = baseSourceParams.value;
  103. const rOne1 = (((2*hycXsyOne-htfksd)+((qycAdOne+qycYxyOne)*xzxs-htfksd))*(jzxs-1))*(jsLlOne*slfpxs)/1000;
  104. const rOne2 = (rOne1*kzxs-(jsLlOne*slfpxs*jsCodOne*zhxs/1000))/tydl;
  105. const rOne3 = rOne2/yymd/1000*sxps
  106. const rTwo1 = (((2*hycXsyTwo-htfksd)+((qycAdTwo+qycYxyTwo)*xzxs-htfksd))*(jzxs-1))*(jsLlTwo*slfpxs)/1000;
  107. const rTwo2 = (rTwo1*kzxs-(jsLlTwo*slfpxs*jsCodTwo*zhxs/1000))/tydl;
  108. const rTwo3 = rTwo2/yymd/1000*sxps
  109. const r1 = Number((rOne3 < 0 || !rOne3) ? 0 : rOne3.toFixed(3)) || 0;
  110. const r2 = Number((rTwo3 < 0 || !rTwo3) ? 0 : rTwo3.toFixed(3)) || 0;
  111. return [ r1, r2 ];
  112. }
  113. const onConfirmUpdate = async () => {
  114. await controlApi.postAddRecord({
  115. ...dataSourceParams.value[tabKeyEnum[baseSourceParams.value.type]],
  116. ...baseSourceParams.value,
  117. });
  118. isVisibleUpdateInfo.value = false;
  119. message.success("系统加药量,更新成功");
  120. doseNum.value = updateNum.value;
  121. }
  122. // 更新投药结果
  123. const handleMedicateAmount = () => {
  124. const type = tabActiveKey.value;
  125. const lastNum = unref(updateNum);
  126. if ( tabActiveKey.value === 'worker' ) {
  127. const medicineNum = dataSourceParams.value.worker.medicineAmount;
  128. if ( medicineNum || medicineNum == 0 ) {
  129. updateNum.value = medicineNum;
  130. isVisibleUpdateInfo.value = true;
  131. message.warning("有新投放方案, 请查看")
  132. } else {
  133. updateNum.value = null;
  134. isVisibleUpdateInfo.value = false;
  135. }
  136. return;
  137. }
  138. const [r1, r2] = getTotalNum();
  139. const maxR = Math.max( r1, r2 );
  140. if ( type === 'auto' && maxR !== lastNum) {
  141. updateNum.value = maxR;
  142. isVisibleUpdateInfo.value = true;
  143. message.warning("有新的投放方案, 请查看");
  144. }
  145. if ( type === 'onePool' && r1 != lastNum ) {
  146. updateNum.value = r1;
  147. isVisibleUpdateInfo.value = true;
  148. message.warning("有新的投放方案, 请查看");
  149. }
  150. if ( type === 'twoPool' && r2 != lastNum ) {
  151. updateNum.value = r2;
  152. isVisibleUpdateInfo.value = true;
  153. message.warning("有新的投放方案, 请查看");
  154. }
  155. }
  156. onMounted(async () => {
  157. // 获取最后一条记录 getSystemStatus
  158. await controlApi.getBaseData().then(({ data }) => {
  159. const {
  160. numberBeng = 0, type = 0,
  161. htfksd, jzxs, xzxs, kzxs, slfpxs, tydl, zhxs, sxps, yymd, zxqdll, tdb,
  162. medicineAmount,
  163. addType,
  164. tytjTransientLL
  165. } = data;
  166. baseSourceParams.value = {
  167. ...baseSourceParams.value,
  168. numberBeng, type,
  169. htfksd, jzxs, xzxs, kzxs, slfpxs, tydl, zhxs, sxps, yymd, zxqdll, tdb,
  170. addType
  171. };
  172. updateNum.value = medicineAmount;
  173. doseNum.value = medicineAmount;
  174. flowNum.value = tytjTransientLL;
  175. dataSourceParams.value[tabActiveKey.value] = data;
  176. columnData.value = columnData.value.map(item => {
  177. item.value = data[item.key];
  178. return item;
  179. })
  180. })
  181. // 获取实时数据
  182. controlApi.getNumValue().then(({ data }) => {
  183. Object.entries(data).forEach(([key, val]) => {
  184. data[key] = val;
  185. });
  186. // water实时数据
  187. waterConfigParams.value = data;
  188. const params = {
  189. jsLlType: 1,
  190. jsLlOne: data.jslYB,
  191. jsLlTwo: data.jslYB,
  192. jsCodType: 1,
  193. jsCodOne: data.jsCodYB,
  194. jsCodTwo: data.jsCodYB,
  195. hycXsyType: 1,
  196. hycXsyOne: data.hyXsyHYOne,
  197. hycXsyTwo: data.hyXsyHYTwo,
  198. qycYxyType: 1,
  199. qycYxyOne: data.qyXsyHYOne,
  200. qycYxyTwo: data.qyXsyHYTwo,
  201. qycAdType: 1,
  202. qycAdOne: data.qyAdHYOne,
  203. qycAdTwo: data.qyAdHYTwo,
  204. jsTnType: 1,
  205. jsTnOne: data.jsTnYB,
  206. jsTnTwo: data.jsTnYB
  207. }
  208. Object.keys(dataSourceParams.value).forEach(key => {
  209. const item = dataSourceParams.value[key];
  210. if ( !Object.keys(item).length ) {
  211. dataSourceParams.value[key] = { ...params };
  212. }
  213. })
  214. })
  215. // 获取是否允许投药开关
  216. controlApi.getSystemStatus().then(({ data }) => {
  217. // 0不允许 1允许
  218. systemStatus.value = data;
  219. });
  220. })
  221. </script>
  222. <template>
  223. <section class="flex items-start h-full">
  224. <TheChatView leftTitle="智适应碳源投加" :isChatSlot="false" :isFooter="false">
  225. <template #control>
  226. <div class="control-container space-x-[12px]">
  227. <div class="left-section">
  228. <BaseTitle title="智能投加计算"></BaseTitle>
  229. <n-scrollbar class="scrollbar" style="height: 100%;">
  230. <div class="form-content">
  231. <BaseCard title="选择加药泵">
  232. <BaseRadioCard v-model="baseSourceParams.numberBeng"></BaseRadioCard>
  233. </BaseCard>
  234. <BaseCard title="投加运行方式">
  235. <span class="status-bar">
  236. <i>{{ baseSourceParams.addType === 0 ? '启用智适应碳源投加' : '手动碳源投加' }}</i>
  237. </span>
  238. </BaseCard>
  239. <BaseCard title="选择池组手自动方式">
  240. <n-tabs justify-content="space-between" type="line" :bar-width="40"
  241. tab-style="min-width: 89px;" tab-class="custom-tab_item" animated :on-update:value="onUpdateTab" :value="baseSourceParams.type">
  242. <n-tab-pane :name="0" tab="自动">
  243. <div class="panel-header_main">
  244. <p>设置数据来源</p>
  245. <p class="space-x-[20px] text-center">
  246. <span>1号池</span>
  247. <span>2号池</span>
  248. </p>
  249. </div>
  250. <div class="space-y-[12px]">
  251. <BaseChooseItem
  252. tab-key="auto"
  253. title="进水流量"
  254. unit="m³"
  255. isDouble
  256. @on-update="handleMedicateAmount"
  257. v-model:type="dataSourceParams.auto.jsLlType"
  258. v-model:value1="dataSourceParams.auto.jsLlOne"
  259. v-model:value2="dataSourceParams.auto.jsLlTwo"
  260. :btn-group="[
  261. { label: '手动', value1: '', value2: '' },
  262. { label: '仪表', value1: waterConfigParams.jslYB, value2: waterConfigParams.jslYB }
  263. ]"
  264. ></BaseChooseItem>
  265. <BaseChooseItem
  266. tab-key="auto"
  267. title="进水COD"
  268. unit="mg/L"
  269. isDouble
  270. @on-update="handleMedicateAmount"
  271. v-model:type="dataSourceParams.auto.jsCodType"
  272. v-model:value1="dataSourceParams.auto.jsCodOne"
  273. v-model:value2="dataSourceParams.auto.jsCodTwo"
  274. :btn-group="[
  275. { label: '手动', value1: '', value2: '' },
  276. { label: '仪表', value1: waterConfigParams.jsCodYB, value2: waterConfigParams.jsCodYB },
  277. { label: '化验', value1: waterConfigParams.jsCodHY, value2: waterConfigParams.jsCodHY }
  278. ]"
  279. ></BaseChooseItem>
  280. <BaseChooseItem
  281. tab-key="auto"
  282. title="好氧池硝酸盐"
  283. unit="mg/L"
  284. isDouble
  285. @on-update="handleMedicateAmount"
  286. v-model:type="dataSourceParams.auto.hycXsyType"
  287. v-model:value1="dataSourceParams.auto.hycXsyOne"
  288. v-model:value2="dataSourceParams.auto.hycXsyTwo"
  289. :btn-group="[
  290. { label: '手动', value1: '', value2: '' },
  291. { label: '化验', value1: waterConfigParams.hyXsyHYOne, value2: waterConfigParams.hyXsyHYTwo },
  292. { label: '预测', value1: waterConfigParams.hyXsyYCOne, value2: waterConfigParams.hyXsyYCTwo }
  293. ]"
  294. ></BaseChooseItem>
  295. <BaseChooseItem
  296. tab-key="auto"
  297. title="缺氧池硝酸盐"
  298. unit="mg/L"
  299. isDouble
  300. @on-update="handleMedicateAmount"
  301. v-model:type="dataSourceParams.auto.qycYxyType"
  302. v-model:value1="dataSourceParams.auto.qycYxyOne"
  303. v-model:value2="dataSourceParams.auto.qycYxyTwo"
  304. :btn-group="[
  305. { label: '手动', value1: '', value2: '' },
  306. { label: '化验', value1: waterConfigParams.qyXsyHYOne, value2: waterConfigParams.qyXsyHYTwo }
  307. ]"
  308. ></BaseChooseItem>
  309. <BaseChooseItem
  310. tab-key="auto"
  311. title="缺氧池氨氮"
  312. unit="mg/L"
  313. isDouble
  314. @on-update="handleMedicateAmount"
  315. v-model:type="dataSourceParams.auto.qycAdType"
  316. v-model:value1="dataSourceParams.auto.qycAdOne"
  317. v-model:value2="dataSourceParams.auto.qycAdTwo"
  318. :btn-group="[
  319. { label: '手动', value1: '', value2: '' },
  320. { label: '化验', value1: waterConfigParams.qyAdHYOne, value2: waterConfigParams.qyAdHYTwo }
  321. ]"
  322. ></BaseChooseItem>
  323. <BaseChooseItem
  324. tab-key="auto"
  325. title="进水总氮"
  326. unit="mg/L"
  327. isDouble
  328. @on-update="handleMedicateAmount"
  329. v-model:type="dataSourceParams.auto.jsTnType"
  330. v-model:value1="dataSourceParams.auto.jsTnOne"
  331. v-model:value2="dataSourceParams.auto.jsTnTwo"
  332. :btn-group="[
  333. { label: '手动', value1: '', value2: '' },
  334. { label: '仪表', value1: waterConfigParams.jsTnYB, value2: waterConfigParams.jsTnYB }
  335. ]"
  336. ></BaseChooseItem>
  337. </div>
  338. </n-tab-pane>
  339. <n-tab-pane :name="1" tab="1号池">
  340. <div class="panel-header_main">
  341. <p>设置数据来源</p>
  342. <p class="space-x-[20px] text-center">
  343. <span>1号池</span>
  344. </p>
  345. </div>
  346. <div class="space-y-[12px]">
  347. <BaseChooseItem
  348. tab-key="onePool"
  349. title="进水流量"
  350. unit="m³"
  351. @on-update="handleMedicateAmount"
  352. v-model:type="dataSourceParams.onePool.jsLlType"
  353. v-model:value1="dataSourceParams.onePool.jsLlOne"
  354. :btn-group="[
  355. { label: '手动', value1: '', value2: '' },
  356. { label: '仪表', value1: waterConfigParams.jslYB, value2: waterConfigParams.jslYB }
  357. ]"
  358. ></BaseChooseItem>
  359. <BaseChooseItem
  360. tab-key="onePool"
  361. title="进水COD"
  362. unit="mg/L"
  363. @on-update="handleMedicateAmount"
  364. v-model:type="dataSourceParams.onePool.jsCodType"
  365. v-model:value1="dataSourceParams.onePool.jsCodOne"
  366. :btn-group="[
  367. { label: '手动', value1: '', value2: '' },
  368. { label: '仪表', value1: waterConfigParams.jsCodYB, value2: waterConfigParams.jsCodYB },
  369. { label: '化验', value1: waterConfigParams.jsCodHY, value2: waterConfigParams.jsCodHY }
  370. ]"
  371. ></BaseChooseItem>
  372. <BaseChooseItem
  373. tab-key="onePool"
  374. title="好氧池硝酸盐"
  375. unit="mg/L"
  376. @on-update="handleMedicateAmount"
  377. v-model:type="dataSourceParams.onePool.hycXsyType"
  378. v-model:value1="dataSourceParams.onePool.hycXsyOne"
  379. :btn-group="[
  380. { label: '手动', value1: '', value2: '' },
  381. { label: '化验', value1: waterConfigParams.hyXsyHYOne, value2: waterConfigParams.hyXsyHYTwo },
  382. { label: '预测', value1: waterConfigParams.hyXsyYCOne, value2: waterConfigParams.hyXsyYCTwo }
  383. ]"
  384. ></BaseChooseItem>
  385. <BaseChooseItem
  386. tab-key="onePool"
  387. title="缺氧池硝酸盐"
  388. unit="mg/L"
  389. @on-update="handleMedicateAmount"
  390. v-model:type="dataSourceParams.onePool.qycYxyType"
  391. v-model:value1="dataSourceParams.onePool.qycYxyOne"
  392. v-model:value2="dataSourceParams.onePool.qycYxyTwo"
  393. :btn-group="[
  394. { label: '手动', value1: '', value2: '' },
  395. { label: '化验', value1: waterConfigParams.qyXsyHYOne, value2: waterConfigParams.qyXsyHYTwo }
  396. ]"
  397. ></BaseChooseItem>
  398. <BaseChooseItem
  399. tab-key="onePool"
  400. title="缺氧池氨氮"
  401. unit="mg/L"
  402. @on-update="handleMedicateAmount"
  403. v-model:type="dataSourceParams.onePool.qycAdType"
  404. v-model:value1="dataSourceParams.onePool.qycAdOne"
  405. :btn-group="[
  406. { label: '手动', value1: '', value2: '' },
  407. { label: '化验', value1: waterConfigParams.qyAdHYOne, value2: waterConfigParams.qyAdHYTwo }
  408. ]"
  409. ></BaseChooseItem>
  410. <BaseChooseItem
  411. tab-key="onePool"
  412. title="进水总氮"
  413. unit="mg/L"
  414. @on-update="handleMedicateAmount"
  415. v-model:type="dataSourceParams.onePool.jsTnType"
  416. v-model:value1="dataSourceParams.onePool.jsTnOne"
  417. :btn-group="[
  418. { label: '手动', value1: '', value2: '' },
  419. { label: '仪表', value1: waterConfigParams.jsTnYB, value2: waterConfigParams.jsTnYB }
  420. ]"
  421. ></BaseChooseItem>
  422. </div>
  423. </n-tab-pane>
  424. <n-tab-pane :name="2" tab="2号池">
  425. <div class="panel-header_main">
  426. <p>设置数据来源</p>
  427. <p class="space-x-[20px] text-center">
  428. <span>2号池</span>
  429. </p>
  430. </div>
  431. <div class="space-y-[12px]">
  432. <BaseChooseItem
  433. tab-key="twoPool"
  434. title="进水流量"
  435. unit="m³"
  436. @on-update="handleMedicateAmount"
  437. v-model:type="dataSourceParams.twoPool.jsLlType"
  438. v-model:value1="dataSourceParams.twoPool.jsLlTwo"
  439. :btn-group="[
  440. { label: '手动', value1: '', value2: '' },
  441. { label: '仪表', value1: waterConfigParams.jslYB, value2: waterConfigParams.jslYB }
  442. ]"
  443. ></BaseChooseItem>
  444. <BaseChooseItem
  445. tab-key="twoPool"
  446. title="进水COD"
  447. unit="mg/L"
  448. @on-update="handleMedicateAmount"
  449. v-model:type="dataSourceParams.twoPool.jsCodType"
  450. v-model:value1="dataSourceParams.twoPool.jsCodTwo"
  451. :btn-group="[
  452. { label: '手动', value1: '', value2: '' },
  453. { label: '仪表', value1: waterConfigParams.jsCodYB, value2: waterConfigParams.jsCodYB },
  454. { label: '化验', value1: waterConfigParams.jsCodHY, value2: waterConfigParams.jsCodHY }
  455. ]"
  456. ></BaseChooseItem>
  457. <BaseChooseItem
  458. tab-key="twoPool"
  459. title="好氧池硝酸盐"
  460. unit="mg/L"
  461. @on-update="handleMedicateAmount"
  462. v-model:type="dataSourceParams.twoPool.hycXsyType"
  463. v-model:value1="dataSourceParams.twoPool.hycXsyTwo"
  464. :btn-group="[
  465. { label: '手动', value1: '', value2: '' },
  466. { label: '化验', value1: waterConfigParams.hyXsyHYOne, value2: waterConfigParams.hyXsyHYTwo },
  467. { label: '预测', value1: waterConfigParams.hyXsyYCOne, value2: waterConfigParams.hyXsyYCTwo }
  468. ]"
  469. ></BaseChooseItem>
  470. <BaseChooseItem
  471. tab-key="twoPool"
  472. title="缺氧池硝酸盐"
  473. unit="mg/L"
  474. @on-update="handleMedicateAmount"
  475. v-model:type="dataSourceParams.twoPool.qycYxyType"
  476. v-model:value1="dataSourceParams.twoPool.qycYxyTwo"
  477. :btn-group="[
  478. { label: '手动', value1: '', value2: '' },
  479. { label: '化验', value1: waterConfigParams.qyXsyHYOne, value2: waterConfigParams.qyXsyHYTwo }
  480. ]"
  481. ></BaseChooseItem>
  482. <BaseChooseItem
  483. tab-key="twoPool"
  484. title="缺氧池氨氮"
  485. unit="mg/L"
  486. @on-update="handleMedicateAmount"
  487. v-model:type="dataSourceParams.twoPool.qycAdType"
  488. v-model:value1="dataSourceParams.twoPool.qycAdTwo"
  489. :btn-group="[
  490. { label: '手动', value1: '', value2: '' },
  491. { label: '化验', value1: waterConfigParams.qyAdHYOne, value2: waterConfigParams.qyAdHYTwo }
  492. ]"
  493. ></BaseChooseItem>
  494. <BaseChooseItem
  495. tab-key="twoPool"
  496. title="进水总氮"
  497. unit="mg/L"
  498. @on-update="handleMedicateAmount"
  499. v-model:type="dataSourceParams.twoPool.jsTnType"
  500. v-model:value1="dataSourceParams.twoPool.jsTnTwo"
  501. :btn-group="[
  502. { label: '手动', value1: '', value2: '' },
  503. { label: '仪表', value1: waterConfigParams.jsTnYB, value2: waterConfigParams.jsTnYB }
  504. ]"
  505. ></BaseChooseItem>
  506. </div>
  507. </n-tab-pane>
  508. <n-tab-pane :name="3" tab="人工投放">
  509. <div class="panel-header_main">
  510. <p>设置数据来源</p>
  511. <p class="space-x-[20px] text-center">
  512. <span>人工投放</span>
  513. </p>
  514. </div>
  515. <div class="w-full flex items-center justify-between">
  516. <span>人工投放:</span>
  517. <div class="w-[200px]">
  518. <BaseInput
  519. :isCloseIcon="false"
  520. v-model="dataSourceParams.worker.medicineAmount"
  521. @on-blur="handleMedicateAmount"
  522. ></BaseInput>
  523. </div>
  524. </div>
  525. </n-tab-pane>
  526. </n-tabs>
  527. </BaseCard>
  528. <BaseCard title="设定参数系数" style="margin: 0" tips="建议使用默认值,非必要不修改">
  529. <template #titleRight>
  530. <div>
  531. <div class="flex items-center space-x-[4px] cursor-pointer text-[#2454FF] text-[13px]"
  532. v-show="isVisibleBtn" @click="isVisibleBtn = false">
  533. <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  534. <path d="M2.33337 14H14.3334" stroke="#2454FF" stroke-linecap="round"
  535. stroke-linejoin="round" />
  536. <path d="M3.66663 8.90663V11.3333H6.10569L13 4.43603L10.565 2L3.66663 8.90663Z"
  537. stroke="#2454FF" stroke-linejoin="round" />
  538. </svg>
  539. <span>编辑</span>
  540. </div>
  541. <ul class="flex items-center text-[13px] space-x-[8px] cursor-pointer" v-show="!isVisibleBtn">
  542. <li class="cursor-pointer" @click="onEditConfirm" style="color: #2454FF">确定</li>
  543. <li class="cursor-pointer text-[#B0B7C0]" @click="onEditCancel">取消</li>
  544. </ul>
  545. </div>
  546. </template>
  547. <ul class="data-source-list space-y-[12px]">
  548. <li class="data-soruce-item" v-for="item, index in columnData">
  549. <span>{{ item.label }}:</span>
  550. <span class="unit" v-show="isVisibleBtn">
  551. {{ item.value }}
  552. {{ index === 0 ? 'mg/L' : '' }}
  553. </span>
  554. <div style="width: 140px;" v-show="!isVisibleBtn">
  555. <BaseInput :unit="index === 0 ? 'mg/L' : ''" size='small' :isNeedFlotBtn="false"
  556. v-model="baseSourceParams[item.key]" isCenter placeholder="" :readonly="index === columnData.length - 1"></BaseInput>
  557. </div>
  558. </li>
  559. </ul>
  560. </BaseCard>
  561. </div>
  562. </n-scrollbar>
  563. </div>
  564. <div class="right-section">
  565. <TheResultPanel
  566. :updateNum="updateNum"
  567. :flowNum="flowNum"
  568. :doseNum="doseNum"
  569. :configuration-status="baseSourceParams.addType"
  570. v-model:system="systemStatus"
  571. v-model="isVisibleUpdateInfo"
  572. @on-click="onFinalResult"
  573. @on-update="onConfirmUpdate"
  574. ></TheResultPanel>
  575. <TheEchartPanel></TheEchartPanel>
  576. </div>
  577. </div>
  578. </template>
  579. </TheChatView>
  580. </section>
  581. </template>
  582. <style lang="scss" scoped>
  583. .control-container {
  584. @include flex(x, start, start);
  585. height: 100%;
  586. .left-section {
  587. display: flex;
  588. flex-flow: column;
  589. flex-shrink: 0;
  590. width: 440px;
  591. height: 100%;
  592. border-radius: 10px;
  593. background: #fff;
  594. .status-bar {
  595. display: inline-block;
  596. padding: 4px 14px;
  597. margin-left: 20px;
  598. border-top: 0.5px solid rgba(212, 241, 255, 0.00);
  599. border-bottom: 0.5px solid rgba(212, 241, 255, 0.00);
  600. background: linear-gradient(90deg, rgba(240, 250, 255, 0.00) 0%, #E9F8FF 27.27%, rgba(240, 250, 255, 0.00) 100%);
  601. i {
  602. line-height: 24px;
  603. background: linear-gradient(92deg, #5ABBF2 12.24%, #2454FF 63.2%);
  604. background-clip: text;
  605. -webkit-background-clip: text;
  606. -webkit-text-fill-color: transparent;
  607. font-weight: bold;
  608. }
  609. }
  610. .scrollbar {
  611. height: 100%;
  612. }
  613. .form-content {
  614. padding: 0 16px 24px 16px;
  615. }
  616. .panel-header_main {
  617. @include flex(x, center, between);
  618. margin-bottom: 12px;
  619. color: #86909C;
  620. span {
  621. display: inline-block;
  622. width: 60px;
  623. }
  624. }
  625. }
  626. .data-source-list {
  627. .data-soruce-item {
  628. @include flex(x, center, between);
  629. .inp-inner {
  630. width: 112px;
  631. }
  632. .unit {
  633. font-family: "D-DIN-PRO-700-Bold";
  634. font-weight: bold;
  635. font-size: 12px;
  636. color: #333;
  637. }
  638. }
  639. }
  640. }
  641. .right-section {
  642. width: 100%;
  643. height: 100%;
  644. border-radius: 8px;
  645. background: #fff;
  646. overflow: hidden;
  647. // .top {
  648. // flex-shrink: 1;
  649. // height: 214px;
  650. // border-radius: 8px;
  651. // border: 0.5px solid #FFF;
  652. // background: linear-gradient(90deg, #E0E8FC 0%, #F2F4FF 100%);
  653. // }
  654. // .bottom {
  655. // height: 100%;
  656. // background: pink;
  657. // }
  658. }
  659. // 通用区域的样式
  660. .btn {
  661. width: 80px;
  662. height: 32px;
  663. border-radius: 4px;
  664. border: 1px solid #D3D7DD;
  665. text-align: center;
  666. font-size: 14px;
  667. line-height: 32px;
  668. color: #1A2029;
  669. }
  670. .btn-primary {
  671. border: 0;
  672. background: var(--Linear, linear-gradient(270deg, #3BD6E3 0%, #019AFE 100%));
  673. font-weight: bold;
  674. color: #fff;
  675. }
  676. .btn-info {
  677. width: 44px;
  678. height: 28px;
  679. border-radius: 4px;
  680. border: 1px solid #D3D7DD;
  681. background: #fff;
  682. font-size: 12px;
  683. text-align: center;
  684. line-height: 28px;
  685. color: #1A2029;
  686. cursor: pointer;
  687. }
  688. .btn-info_active {
  689. color: #2454FF;
  690. border: 1px solid #2454FF;
  691. background: #EBF0FF;
  692. }
  693. .radio {
  694. display: block;
  695. width: 12px;
  696. height: 12px;
  697. border-radius: 100%;
  698. border: 1px solid #ccc;
  699. cursor: pointer;
  700. }
  701. .radio_big {
  702. width: 16px;
  703. height: 16px;
  704. }
  705. .radio-active {
  706. transition: all .1s;
  707. border: 3px solid #2454FF;
  708. }
  709. .radio_big.radio-active {
  710. border: 4px solid #2454FF;
  711. }
  712. </style>
  713. <style lang="scss">
  714. .custom-tab_item {
  715. @include flex (x, center, center);
  716. height: 35px;
  717. border-radius: 4px;
  718. background: #F3F5FA;
  719. &.n-tabs-tab--active {
  720. transition: none !important;
  721. border-radius: 4px;
  722. transition: none !important;
  723. background: url('https://static.fuxicarbon.com/bigModel/pc/tab-border-item-2x.png') -3px 0px no-repeat, linear-gradient(180deg, #F1F3FE 0%, #FFF 100%);
  724. background-size: 107% 100%;
  725. }
  726. }
  727. .control-container .left-section {
  728. .n-tabs-nav-scroll-content {
  729. padding-bottom: 10px;
  730. }
  731. }
  732. </style>