main.data.ts 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { rules } from '/@/utils/helper/validator';
  4. import { reactive } from 'vue';
  5. import type { EChartsOption } from 'echarts';
  6. type CtrlLockOpenType = {
  7. CtrlLockOpen: boolean | undefined;
  8. CtrlExplosionVentOpen: boolean | undefined;
  9. };
  10. export const columns: BasicColumn[] = [
  11. {
  12. title: '名称',
  13. dataIndex: 'strname',
  14. width: 120,
  15. },
  16. {
  17. title: '安装位置',
  18. dataIndex: 'strinstallpos',
  19. width: 100,
  20. },
  21. {
  22. title: '是否为常闭型',
  23. dataIndex: 'bnormalclose',
  24. width: 100,
  25. // customRender: render.renderAvatar,
  26. },
  27. {
  28. title: '净宽',
  29. dataIndex: 'fclearwidth',
  30. width: 80,
  31. },
  32. {
  33. title: '净高',
  34. dataIndex: 'fclearheight',
  35. width: 100,
  36. },
  37. {
  38. title: '风门道数',
  39. dataIndex: 'ndoorcount',
  40. width: 100,
  41. },
  42. {
  43. title: '所属分站',
  44. width: 150,
  45. dataIndex: 'stationname',
  46. },
  47. {
  48. title: '点表',
  49. width: 100,
  50. dataIndex: 'strtype',
  51. },
  52. {
  53. title: '监测类型',
  54. dataIndex: 'monitorflag',
  55. width: 100,
  56. },
  57. {
  58. title: '是否模拟数据',
  59. dataIndex: 'testflag',
  60. width: 100,
  61. },
  62. ];
  63. export const recycleColumns: BasicColumn[] = [
  64. {
  65. title: '名称',
  66. dataIndex: 'strname',
  67. width: 100,
  68. },
  69. {
  70. title: '是否为常闭型',
  71. dataIndex: 'bnormalclose',
  72. width: 100,
  73. },
  74. ];
  75. export const searchFormSchema: FormSchema[] = [
  76. {
  77. label: '名称',
  78. field: 'strname',
  79. component: 'Input',
  80. colProps: { span: 6 },
  81. },
  82. {
  83. label: '安装位置',
  84. field: 'strinstallpos',
  85. component: 'Input',
  86. colProps: { span: 6 },
  87. },
  88. {
  89. label: '是否为常闭型',
  90. field: 'bnormalclose',
  91. component: 'JDictSelectTag',
  92. componentProps: {
  93. dictCode: 'user_status',
  94. placeholder: '请选择读写类型',
  95. stringToNumber: true,
  96. },
  97. colProps: { span: 6 },
  98. },
  99. ];
  100. export const formSchema: FormSchema[] = [
  101. {
  102. label: '',
  103. field: 'id',
  104. component: 'Input',
  105. show: false,
  106. },
  107. {
  108. label: '名称',
  109. field: 'strname',
  110. component: 'Input',
  111. },
  112. {
  113. label: '安装位置',
  114. field: 'strinstallpos',
  115. component: 'Input',
  116. },
  117. {
  118. label: '是否为常闭型',
  119. field: 'bnormalclose',
  120. component: 'RadioGroup',
  121. defaultValue: 1,
  122. componentProps: () => {
  123. return {
  124. options: [
  125. { label: '是', value: 1, key: '1' },
  126. { label: '否', value: 0, key: '2' },
  127. ],
  128. };
  129. },
  130. },
  131. {
  132. label: '净宽',
  133. field: 'fclearwidth',
  134. component: 'Input',
  135. },
  136. {
  137. label: '净高',
  138. field: 'fclearheight',
  139. component: 'Input',
  140. },
  141. {
  142. label: '风门道数',
  143. field: 'ndoorcount',
  144. component: 'Input',
  145. },
  146. {
  147. label: '所属分站',
  148. field: 'stationname',
  149. component: 'JDictSelectTag',
  150. componentProps: {
  151. dictCode: 'user_status',
  152. placeholder: '请选择状态',
  153. stringToNumber: true,
  154. },
  155. },
  156. {
  157. label: '点表',
  158. field: 'strtype',
  159. component: 'JDictSelectTag',
  160. componentProps: {
  161. dictCode: 'user_status',
  162. placeholder: '请选择状态',
  163. stringToNumber: true,
  164. },
  165. },
  166. {
  167. label: '监测类型',
  168. field: 'monitorflag',
  169. component: 'JDictSelectTag',
  170. componentProps: {
  171. dictCode: 'user_status',
  172. placeholder: '请选择状态',
  173. stringToNumber: true,
  174. },
  175. },
  176. {
  177. label: '是否模拟数据',
  178. field: 'testflag',
  179. component: 'RadioGroup',
  180. defaultValue: 1,
  181. componentProps: () => {
  182. return {
  183. options: [
  184. { label: '是', value: 1, key: '1' },
  185. { label: '否', value: 0, key: '2' },
  186. ],
  187. };
  188. },
  189. },
  190. ];
  191. export const formPasswordSchema: FormSchema[] = [
  192. {
  193. label: '用户账号',
  194. field: 'username',
  195. component: 'Input',
  196. componentProps: { readOnly: true },
  197. },
  198. {
  199. label: '登录密码',
  200. field: 'password',
  201. component: 'StrengthMeter',
  202. componentProps: {
  203. placeholder: '请输入登录密码',
  204. },
  205. rules: [
  206. {
  207. required: true,
  208. message: '请输入登录密码',
  209. },
  210. ],
  211. },
  212. {
  213. label: '确认密码',
  214. field: 'confirmPassword',
  215. component: 'InputPassword',
  216. dynamicRules: ({ values }) => rules.confirmPassword(values, true),
  217. },
  218. ];
  219. export const formAgentSchema: FormSchema[] = [
  220. {
  221. label: '',
  222. field: 'id',
  223. component: 'Input',
  224. show: false,
  225. },
  226. {
  227. field: 'userName',
  228. label: '用户名',
  229. component: 'Input',
  230. componentProps: {
  231. readOnly: true,
  232. allowClear: false,
  233. },
  234. },
  235. {
  236. field: 'agentUserName',
  237. label: '代理人用户名',
  238. required: true,
  239. component: 'JSelectUser',
  240. componentProps: {
  241. rowKey: 'username',
  242. labelKey: 'realname',
  243. maxSelectCount: 10,
  244. },
  245. },
  246. {
  247. field: 'startTime',
  248. label: '代理开始时间',
  249. component: 'DatePicker',
  250. required: true,
  251. componentProps: {
  252. showTime: true,
  253. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  254. placeholder: '请选择代理开始时间',
  255. },
  256. },
  257. {
  258. field: 'endTime',
  259. label: '代理结束时间',
  260. component: 'DatePicker',
  261. required: true,
  262. componentProps: {
  263. showTime: true,
  264. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  265. placeholder: '请选择代理结束时间',
  266. },
  267. },
  268. {
  269. field: 'status',
  270. label: '状态',
  271. component: 'JDictSelectTag',
  272. defaultValue: '1',
  273. componentProps: {
  274. dictCode: 'valid_status',
  275. type: 'radioButton',
  276. },
  277. },
  278. ];
  279. export const tableColumns = [
  280. {
  281. title: '',
  282. dataIndex: 'isCheck',
  283. customCell: (_, index) => {
  284. if (index % 2 == 0) {
  285. return { rowSpan: 2 };
  286. } else {
  287. return { rowSpan: 0 };
  288. }
  289. },
  290. },
  291. {
  292. title: '安装位置',
  293. dataIndex: 'address',
  294. customCell: (_, index) => {
  295. if (index % 2 == 0) {
  296. return { rowSpan: 2 };
  297. } else {
  298. return { rowSpan: 0 };
  299. }
  300. },
  301. },
  302. {
  303. title: '运行风机',
  304. dataIndex: 'childName',
  305. },
  306. {
  307. title: '风机静压(Pa)',
  308. dataIndex: 'yc2',
  309. },
  310. {
  311. title: '风机全压(Pa)',
  312. dataIndex: 'dqPa',
  313. },
  314. {
  315. title: '电机流量(m³/s)',
  316. dataIndex: 'fanM3',
  317. },
  318. {
  319. title: '电机速度(rpm/s)',
  320. dataIndex: 'fanSD',
  321. },
  322. {
  323. title: '电机电压(V)',
  324. dataIndex: 'fanU',
  325. },
  326. {
  327. title: '电机电流(A)',
  328. dataIndex: 'fanA',
  329. },
  330. {
  331. title: '电机频率(Hz/s)',
  332. dataIndex: 'fanPL',
  333. },
  334. {
  335. title: '电机功率(KW/s)',
  336. dataIndex: 'fanGL',
  337. },
  338. {
  339. title: '振动X1(mm/s)',
  340. dataIndex: 'zdX1',
  341. },
  342. {
  343. title: '振动Y1(mm/s)',
  344. dataIndex: 'zdY1',
  345. },
  346. ];
  347. export const dataColumns = () => {
  348. return [
  349. {
  350. id: 'UXC',
  351. name: '电机轴温设定(℃)',
  352. id2: 'bearingFront2_F1',
  353. },
  354. { id: 'VXC', name: '电机定温设定(℃)', id2: 'bearingBack2_F1' },
  355. {
  356. id: 'WXC',
  357. name: '电机前轴温度(℃)',
  358. id2: 'stator2A_F1',
  359. },
  360. {
  361. id: 'QZC',
  362. name: '电机后轴温度(℃)',
  363. id2: 'stator2B_F1',
  364. },
  365. { id: 'ZCZ1C', name: '电机定子1温度(℃)', id2: 'fIA2_F1' },
  366. { id: 'ZCZ2C', name: '电机定子2温度(℃)', id2: 'fIB2_F1' },
  367. { id: 'FTZ1C', name: '电机定3温度(℃)', id2: 'fIC2_F1' },
  368. ];
  369. };
  370. export const stateColumns = () => {
  371. return [
  372. // {
  373. // id: 'lubeBoxTemperatureF1High',
  374. // name: '润滑站油箱油温高报警',
  375. // flag: false,
  376. // },
  377. {
  378. id: 'lubeBoxTemperatureF1Low',
  379. name: '润滑站1油箱油温低报警',
  380. flag: true,
  381. },
  382. {
  383. id: 'lubeTemperatureF1High',
  384. name: '润滑站1供油油温高报警',
  385. flag: true,
  386. },
  387. // {
  388. // id: 'lubeTemperatureF1Low',
  389. // name: '润滑站1供油油温低报警',
  390. // flag: false,
  391. // },
  392. { id: 'lubePaF1High', name: '润滑站1供油油压高报警', flag: true },
  393. { id: 'lubePaF1Low', name: '润滑站1供油油压低报警', flag: true },
  394. // { id: "ch4_F1High", name: "瓦斯值1高报警", flag: false },
  395. { id: 'singleDoorF1Warn', name: '侧开风门单模报警', flag: true },
  396. { id: 'lubeF1SlightFault', name: '稀油润滑站轻故障', flag: true },
  397. { id: 'lubeF1SevereFault', name: '稀油润滑站重故障', flag: true },
  398. { id: 'f1B1Fault', name: '变频器1故障', flag: true },
  399. { id: 'f1B2Fault', name: '变频器2故障', flag: true },
  400. { id: 'f1Fault', name: '通风机故障', flag: true },
  401. ];
  402. };
  403. export const getData = () => {
  404. return [
  405. {
  406. id: 0,
  407. isCheck: true,
  408. address: '1号回风立井',
  409. strName: '1号回风立井主机',
  410. childName: '1#风机',
  411. isRun: false,
  412. frequency: 0,
  413. windVal: 0,
  414. gasVal1: 0,
  415. gasVal2: 0,
  416. zdX1: 0,
  417. zdX2: 0,
  418. zdY1: 0,
  419. zdY2: 0,
  420. yc1: 0,
  421. yc2: 0,
  422. dqPa: 0,
  423. co1: 0,
  424. fanSD: 0,
  425. fanA: 0,
  426. fanU: 0,
  427. fanPL: 0,
  428. fanGL: 0,
  429. fanM3: 0,
  430. WXC: 0,
  431. UXC: 0,
  432. VXC: 0,
  433. QZC: 0,
  434. HZC: 0,
  435. ZCZ1C: 0,
  436. ZCZ2C: 0,
  437. FTZ1C: 0,
  438. FTZ2C: 0,
  439. DJQZ1C: 0,
  440. C: 0,
  441. RH: 0,
  442. lubeBoxTemperatureF1High: undefined,
  443. lubeBoxTemperatureF1Low: undefined,
  444. lubeTemperatureF1High: undefined,
  445. lubeTemperatureF1Low: undefined,
  446. lubePaF1High: undefined,
  447. lubePaF1Low: undefined,
  448. singleDoorF1Warn: undefined,
  449. lubeF1SlightFault: undefined,
  450. lubeF1SevereFault: undefined,
  451. f1B1Fault: undefined,
  452. f1B2Fault: undefined,
  453. f1Fault: undefined,
  454. },
  455. {
  456. id: 1,
  457. isCheck: false,
  458. address: '1号回风立井',
  459. strName: '1号回风立井备机',
  460. childName: '2#风机',
  461. isRun: false,
  462. frequency: 0,
  463. windVal: 0,
  464. gasVal1: 0,
  465. gasVal2: 0,
  466. zdX1: 0,
  467. zdX2: 0,
  468. zdY1: 0,
  469. zdY2: 0,
  470. yc1: 0,
  471. yc2: 0,
  472. dqPa: 0,
  473. co1: 0,
  474. fanSD: 0,
  475. fanA: 0,
  476. fanU: 0,
  477. fanPL: 0,
  478. fanGL: 0,
  479. fanM3: 0,
  480. WXC: 0,
  481. UXC: 0,
  482. VXC: 0,
  483. QZC: 0,
  484. HZC: 0,
  485. ZCZ1C: 0,
  486. ZCZ2C: 0,
  487. FTZ1C: 0,
  488. FTZ2C: 0,
  489. DJQZ1C: 0,
  490. C: 0,
  491. RH: 0,
  492. lubeBoxTemperatureF1High: undefined,
  493. lubeBoxTemperatureF1Low: undefined,
  494. lubeTemperatureF1High: undefined,
  495. lubeTemperatureF1Low: undefined,
  496. lubePaF1High: undefined,
  497. lubePaF1Low: undefined,
  498. singleDoorF1Warn: undefined,
  499. lubeF1SlightFault: undefined,
  500. lubeF1SevereFault: undefined,
  501. f1B1Fault: undefined,
  502. f1B2Fault: undefined,
  503. f1Fault: undefined,
  504. },
  505. ];
  506. };
  507. export const getMonitorData: any = () => {
  508. return {
  509. id: 0,
  510. isCheck: true,
  511. address: '1号回风立井',
  512. strName: '1号回风立井主机',
  513. childName: '1#风机',
  514. isRun: false,
  515. frequency: 40,
  516. windVal: Math.round((Math.random() * 6 + 4) * 100) / 100,
  517. gasVal1: Math.round((Math.random() * 0.03 + 0) * 100) / 100,
  518. gasVal2: Math.round((Math.random() * 0.03 + 0) * 100) / 100,
  519. zdX1: Math.round((Math.random() + 1) * 100) / 100,
  520. zdX2: Math.round((Math.random() * 10 + 10) * 100) / 100,
  521. zdY1: Math.round((Math.random() + 1) * 100) / 100,
  522. zdY2: Math.round((Math.random() * 10 + 10) * 100) / 100,
  523. yc1: Math.round((Math.random() * 70 + 800) * 100) / 100,
  524. yc2: Math.round((Math.random() * 100 + 1400) * 100) / 100,
  525. dqPa: Math.round((Math.random() * 50 + 1000) * 100) / 100,
  526. co1: 0,
  527. fanSD: Math.round((Math.random() * 60 + 550) * 100) / 100,
  528. fanA: Math.round((Math.random() * 60 + 250) * 100) / 100,
  529. fanU: Math.round((Math.random() * 100 + 500) * 100) / 100,
  530. fanPL: Math.round((Math.random() * 10 + 40) * 100) / 100,
  531. fanGL: Math.round((Math.random() * 100 + 150) * 100) / 100,
  532. fanM3: Math.round((Math.random() * 26 + 200) * 100) / 100,
  533. WXC: Math.round((Math.random() * 26 + 10) * 100) / 100,
  534. UXC: Math.round((Math.random() * 26 + 10) * 100) / 100,
  535. VXC: Math.round((Math.random() * 26 + 10) * 100) / 100,
  536. QZC: Math.round((Math.random() * 26 + 10) * 100) / 100,
  537. HZC: Math.round((Math.random() * 26 + 10) * 100) / 100,
  538. ZCZ1C: Math.round((Math.random() * 26 + 10) * 100) / 100,
  539. ZCZ2C: Math.round((Math.random() * 26 + 10) * 100) / 100,
  540. FTZ1C: Math.round((Math.random() * 26 + 10) * 100) / 100,
  541. FTZ2C: Math.round((Math.random() * 26 + 10) * 100) / 100,
  542. DJQZ1C: Math.round((Math.random() * 26 + 10) * 100) / 100,
  543. C: Math.round((Math.random() * 26 + 10) * 100) / 100,
  544. RH: Math.round((Math.random() * 26 + 14) * 100) / 100,
  545. lubeBoxTemperatureF1High: true,
  546. lubeBoxTemperatureF1Low: true,
  547. lubeTemperatureF1High: true,
  548. lubeTemperatureF1Low: true,
  549. lubePaF1High: true,
  550. lubePaF1Low: true,
  551. singleDoorF1Warn: true,
  552. lubeF1SlightFault: true,
  553. lubeF1SevereFault: true,
  554. f1B1Fault: true,
  555. f1B2Fault: true,
  556. f1Fault: true,
  557. };
  558. };
  559. export const modalTypeArr = {
  560. centerBtnArr: [
  561. {
  562. key: 'startSmoke',
  563. value: '启动/停止',
  564. permission: 'fan:startSmoke',
  565. },
  566. {
  567. key: 'startFan',
  568. value: '启动/停止',
  569. permission: 'fan:startFan',
  570. },
  571. {
  572. key: 'resetFan',
  573. value: '一键复位',
  574. permission: 'fan:resetFan',
  575. },
  576. {
  577. key: 'changeSmoke',
  578. value: '不停风倒机',
  579. permission: 'fan:changeSmoke',
  580. },
  581. {
  582. key: 'changeDirection',
  583. value: '一键反风',
  584. permission: 'fan:changeDirection',
  585. },
  586. {
  587. key: 'frequency',
  588. value: '一键调频',
  589. permission: 'fan:frequency',
  590. },
  591. {
  592. key: 'fbm',
  593. value: '防爆门控制',
  594. permission: 'fan:fbm',
  595. },
  596. {
  597. key: 'kkjc',
  598. value: '工况辅助决策',
  599. permission: 'fan:kkjc',
  600. },
  601. {
  602. key: 'zhlk',
  603. value: '自主联控',
  604. permission: 'fan:zhlk',
  605. },
  606. ],
  607. };
  608. export const fbmControlData = <CtrlLockOpenType>reactive({
  609. CtrlLockOpen: false, // 远程开锁 true 为打开状态, false 为关闭状态
  610. CtrlExplosionVentOpen: false, // 远程开门 true 为打开状态, false 为关闭状态
  611. });
  612. // export const assistanceData = {
  613. // '30': {
  614. // angle: 0,
  615. // Hz: 30.0, //频率
  616. // a: -0.17624, //二次项系数
  617. // b: 34.59747, //一次项系数
  618. // c: 938.98517, //常数项系数
  619. // min: 93.0, //风量下限
  620. // max: 132.0, //风量上限
  621. // },
  622. // '31': {
  623. // angle: 0,
  624. // Hz: 31.0,
  625. // a: -0.17624,
  626. // b: 35.055694,
  627. // c: 851.596922,
  628. // min: 96.1,
  629. // max: 136.4,
  630. // },
  631. // '32': {
  632. // angle: 0,
  633. // Hz: 32.0,
  634. // a: -0.17624,
  635. // b: 35.513918,
  636. // c: 768.749733,
  637. // min: 99.2,
  638. // max: 140.8,
  639. // },
  640. // '33': {
  641. // angle: 0,
  642. // Hz: 33.0,
  643. // a: -0.17624,
  644. // b: 35.972142,
  645. // c: 690.443603,
  646. // min: 102.3,
  647. // max: 145.2,
  648. // },
  649. // '34': {
  650. // angle: 0,
  651. // Hz: 34.0,
  652. // a: -0.17624,
  653. // b: 36.430366,
  654. // c: 616.678531,
  655. // min: 105.4,
  656. // max: 149.6,
  657. // },
  658. // '35': {
  659. // angle: 0,
  660. // Hz: 35.0,
  661. // a: -0.17624,
  662. // b: 36.88859,
  663. // c: 547.454517,
  664. // min: 108.5,
  665. // max: 154.0,
  666. // },
  667. // '36': {
  668. // angle: 0,
  669. // Hz: 36.0,
  670. // a: -0.17624,
  671. // b: 37.346814,
  672. // c: 482.771563,
  673. // min: 111.6,
  674. // max: 158.4,
  675. // },
  676. // '37': {
  677. // angle: 0,
  678. // Hz: 37.0,
  679. // a: -0.17624,
  680. // b: 37.805038,
  681. // c: 422.629667,
  682. // min: 114.7,
  683. // max: 162.8,
  684. // },
  685. // '38': {
  686. // angle: 0,
  687. // Hz: 38.0,
  688. // a: -0.17624,
  689. // b: 38.263262,
  690. // c: 367.028829,
  691. // min: 117.8,
  692. // max: 167.2,
  693. // },
  694. // '39': {
  695. // angle: 0,
  696. // Hz: 39.0,
  697. // a: -0.17624,
  698. // b: 38.721486,
  699. // c: 315.96905,
  700. // min: 120.9,
  701. // max: 171.6,
  702. // },
  703. // '40': {
  704. // angle: 0,
  705. // Hz: 40.0,
  706. // a: -0.17624,
  707. // b: 39.17971,
  708. // c: 269.45033,
  709. // min: 124.0,
  710. // max: 176.0,
  711. // },
  712. // '41': {
  713. // angle: 0,
  714. // Hz: 41.0,
  715. // a: -0.17624,
  716. // b: 39.637934,
  717. // c: 227.472668,
  718. // min: 127.1,
  719. // max: 180.4,
  720. // },
  721. // '42': {
  722. // angle: 0,
  723. // Hz: 42.0,
  724. // a: -0.17624,
  725. // b: 40.096158,
  726. // c: 190.036065,
  727. // min: 130.2,
  728. // max: 184.8,
  729. // },
  730. // '43': {
  731. // angle: 0,
  732. // Hz: 43.0,
  733. // a: -0.17624,
  734. // b: 40.554382,
  735. // c: 157.140521,
  736. // min: 133.3,
  737. // max: 189.2,
  738. // },
  739. // '44': {
  740. // angle: 0,
  741. // Hz: 44.0,
  742. // a: -0.17624,
  743. // b: 41.012606,
  744. // c: 128.786035,
  745. // min: 136.4,
  746. // max: 193.6,
  747. // },
  748. // '45': {
  749. // angle: 0,
  750. // Hz: 45.0,
  751. // a: -0.17624,
  752. // b: 41.47083,
  753. // c: 104.972607,
  754. // min: 139.5,
  755. // max: 198.0,
  756. // },
  757. // '46': {
  758. // angle: 0,
  759. // Hz: 46.0,
  760. // a: -0.17624,
  761. // b: 41.929054,
  762. // c: 85.700239,
  763. // min: 142.6,
  764. // max: 202.4,
  765. // },
  766. // '47': {
  767. // angle: 0,
  768. // Hz: 47.0,
  769. // a: -0.17624,
  770. // b: 42.387278,
  771. // c: 70.968929,
  772. // min: 145.7,
  773. // max: 206.8,
  774. // },
  775. // '48': {
  776. // angle: 0,
  777. // Hz: 48.0,
  778. // a: -0.17624,
  779. // b: 42.845502,
  780. // c: 60.778677,
  781. // min: 148.8,
  782. // max: 211.2,
  783. // },
  784. // '49': {
  785. // angle: 0,
  786. // Hz: 49.0,
  787. // a: -0.17624,
  788. // b: 43.303726,
  789. // c: 55.129484,
  790. // min: 151.9,
  791. // max: 215.6,
  792. // },
  793. // '50': {
  794. // angle: 0,
  795. // Hz: 50.0,
  796. // a: -0.17624,
  797. // b: 43.76195,
  798. // c: 54.02135,
  799. // min: 155.0,
  800. // max: 220.0,
  801. // },
  802. // };
  803. export const assistanceData = {
  804. '30': {
  805. angle: 0,
  806. Hz: 30.0, //频率
  807. a: -0.17624, //二次项系数
  808. b: 43.40947, //一次项系数
  809. c: 97.60705999999982, //常数项系数
  810. min: 93.0, //风量下限
  811. max: 132.0, //风量上限
  812. },
  813. '31': {
  814. angle: 0,
  815. Hz: 31.0,
  816. a: -0.17624,
  817. b: 43.427094,
  818. c: 95.43614590000016,
  819. min: 96.1,
  820. max: 136.4,
  821. },
  822. '32': {
  823. angle: 0,
  824. Hz: 32.0,
  825. a: -0.17624,
  826. b: 43.444718,
  827. c: 93.26435059999994,
  828. min: 99.2,
  829. max: 140.8,
  830. },
  831. '33': {
  832. angle: 0,
  833. Hz: 33.0,
  834. a: -0.17624,
  835. b: 43.462342,
  836. c: 91.09167409999964,
  837. min: 102.3,
  838. max: 145.2,
  839. },
  840. '34': {
  841. angle: 0,
  842. Hz: 34.0,
  843. a: -0.17624,
  844. b: 43.479966000000005,
  845. c: 88.91811639999969,
  846. min: 105.4,
  847. max: 149.6,
  848. },
  849. '35': {
  850. angle: 0,
  851. Hz: 35.0,
  852. a: -0.17624,
  853. b: 43.49759,
  854. c: 86.74367749999965,
  855. min: 108.5,
  856. max: 154.0,
  857. },
  858. '36': {
  859. angle: 0,
  860. Hz: 36.0,
  861. a: -0.17624,
  862. b: 43.515214,
  863. c: 84.56835739999997,
  864. min: 111.6,
  865. max: 158.4,
  866. },
  867. '37': {
  868. angle: 0,
  869. Hz: 37.0,
  870. a: -0.17624,
  871. b: 43.532838,
  872. c: 82.3921561000002,
  873. min: 114.7,
  874. max: 162.8,
  875. },
  876. '38': {
  877. angle: 0,
  878. Hz: 38.0,
  879. a: -0.17624,
  880. b: 43.550462,
  881. c: 80.21507359999941,
  882. min: 117.8,
  883. max: 167.2,
  884. },
  885. '39': {
  886. angle: 0,
  887. Hz: 39.0,
  888. a: -0.17624,
  889. b: 43.568086,
  890. c: 78.0371098999999,
  891. min: 120.9,
  892. max: 171.6,
  893. },
  894. '40': {
  895. angle: 0,
  896. Hz: 40.0,
  897. a: -0.17624,
  898. b: 43.58571,
  899. c: 75.85826499999985,
  900. min: 124.0,
  901. max: 176.0,
  902. },
  903. '41': {
  904. angle: 0,
  905. Hz: 41.0,
  906. a: -0.17624,
  907. b: 43.603334,
  908. c: 73.67853890000015,
  909. min: 127.1,
  910. max: 180.4,
  911. },
  912. '42': {
  913. angle: 0,
  914. Hz: 42.0,
  915. a: -0.17624,
  916. b: 43.620958,
  917. c: 71.4979315999999,
  918. min: 130.2,
  919. max: 184.8,
  920. },
  921. '43': {
  922. angle: 0,
  923. Hz: 43.0,
  924. a: -0.17624,
  925. b: 43.638582,
  926. c: 69.31644309999956,
  927. min: 133.3,
  928. max: 189.2,
  929. },
  930. '44': {
  931. angle: 0,
  932. Hz: 44.0,
  933. a: -0.17624,
  934. b: 43.656206000000005,
  935. c: 67.13407339999958,
  936. min: 136.4,
  937. max: 193.6,
  938. },
  939. '45': {
  940. angle: 0,
  941. Hz: 45.0,
  942. a: -0.17624,
  943. b: 43.67383,
  944. c: 64.9508224999995,
  945. min: 139.5,
  946. max: 198.0,
  947. },
  948. '46': {
  949. angle: 0,
  950. Hz: 46.0,
  951. a: -0.17624,
  952. b: 43.691454,
  953. c: 62.76669039999979,
  954. min: 142.6,
  955. max: 202.4,
  956. },
  957. '47': {
  958. angle: 0,
  959. Hz: 47.0,
  960. a: -0.17624,
  961. b: 43.709078,
  962. c: 60.58167709999998,
  963. min: 145.7,
  964. max: 206.8,
  965. },
  966. '48': {
  967. angle: 0,
  968. Hz: 48.0,
  969. a: -0.17624,
  970. b: 43.726702,
  971. c: 58.39578259999962,
  972. min: 148.8,
  973. max: 211.2,
  974. },
  975. '49': {
  976. angle: 0,
  977. Hz: 49.0,
  978. a: -0.17624,
  979. b: 43.744326,
  980. c: 56.20900689999962,
  981. min: 151.9,
  982. max: 215.6,
  983. },
  984. '50': {
  985. angle: 0,
  986. Hz: 50.0,
  987. a: -0.17624,
  988. b: 43.76195,
  989. c: 54.021349999999984,
  990. min: 155.0,
  991. max: 220.0,
  992. },
  993. };
  994. export const option = reactive<EChartsOption>({
  995. title: {
  996. text: '风机运行工况辅助曲线图',
  997. textStyle: {
  998. color: '#BF954D',
  999. },
  1000. left: 'center',
  1001. top: 0,
  1002. },
  1003. // backgroundColor: '#39deff',
  1004. tooltip: {
  1005. trigger: 'axis',
  1006. axisPointer: {
  1007. type: 'cross',
  1008. label: {
  1009. backgroundColor: '#6a7985',
  1010. },
  1011. },
  1012. },
  1013. toolbox: {
  1014. show: true,
  1015. },
  1016. grid: {
  1017. left: 8,
  1018. right: 50,
  1019. bottom: 0,
  1020. containLabel: true,
  1021. },
  1022. xAxis: {
  1023. type: 'category',
  1024. name: 'm³/s',
  1025. nameTextStyle: {
  1026. fontWeight: 600,
  1027. fontSize: 13,
  1028. },
  1029. splitLine: { show: true, lineStyle: { color: 'rgba(21,80,126,.5)' } },
  1030. axisLabel: {
  1031. margin: 20,
  1032. fontSize: 14,
  1033. color: '#f1f1f199',
  1034. },
  1035. boundaryGap: false,
  1036. data: [],
  1037. },
  1038. yAxis: {
  1039. type: 'value',
  1040. axisLine: {
  1041. show: true,
  1042. lineStyle: {
  1043. color: '#006c9d',
  1044. },
  1045. },
  1046. splitLine: { show: true, lineStyle: { color: 'rgba(21,80,126,.5)' } },
  1047. axisLabel: {
  1048. show: true,
  1049. fontSize: 14,
  1050. formatter: '{value}',
  1051. color: '#0071A5',
  1052. },
  1053. min: 0,
  1054. max: 4100,
  1055. name: 'Pa',
  1056. nameTextStyle: {
  1057. fontWeight: 600,
  1058. fontSize: 13,
  1059. },
  1060. },
  1061. series: [],
  1062. });
  1063. export const initData = () => {
  1064. const assistanceData = {
  1065. '30': {
  1066. angle: 0,
  1067. Hz: 30.0, //频率
  1068. a: -0.17624, //二次项系数
  1069. b: 43.40947, //一次项系数
  1070. c: 97.60705999999982, //常数项系数
  1071. min: 93.0, //风量下限
  1072. max: 171.0, //风量上限
  1073. },
  1074. '31': {
  1075. angle: 0,
  1076. Hz: 31.0,
  1077. a: -0.17624,
  1078. b: 43.427094,
  1079. c: 95.43614590000016,
  1080. min: 96.1,
  1081. max: 174.4,
  1082. },
  1083. '32': {
  1084. angle: 0,
  1085. Hz: 32.0,
  1086. a: -0.17624,
  1087. b: 43.444718,
  1088. c: 93.26435059999994,
  1089. min: 99.2,
  1090. max: 177.8,
  1091. },
  1092. '33': {
  1093. angle: 0,
  1094. Hz: 33.0,
  1095. a: -0.17624,
  1096. b: 43.462342,
  1097. c: 91.09167409999964,
  1098. min: 102.3,
  1099. max: 182.2,
  1100. },
  1101. '34': {
  1102. angle: 0,
  1103. Hz: 34.0,
  1104. a: -0.17624,
  1105. b: 43.479966000000005,
  1106. c: 88.91811639999969,
  1107. min: 105.4,
  1108. max: 184.0,
  1109. },
  1110. '35': {
  1111. angle: 0,
  1112. Hz: 35.0,
  1113. a: -0.17624,
  1114. b: 43.49759,
  1115. c: 86.74367749999965,
  1116. min: 108.5,
  1117. max: 185.5,
  1118. },
  1119. '36': {
  1120. angle: 0,
  1121. Hz: 36.0,
  1122. a: -0.17624,
  1123. b: 43.515214,
  1124. c: 84.56835739999997,
  1125. min: 111.6,
  1126. max: 187.0,
  1127. },
  1128. '37': {
  1129. angle: 0,
  1130. Hz: 37.0,
  1131. a: -0.17624,
  1132. b: 43.532838,
  1133. c: 82.3921561000002,
  1134. min: 114.7,
  1135. max: 190.8,
  1136. },
  1137. '38': {
  1138. angle: 0,
  1139. Hz: 38.0,
  1140. a: -0.17624,
  1141. b: 43.550462,
  1142. c: 80.21507359999941,
  1143. min: 117.8,
  1144. max: 192.0,
  1145. },
  1146. '39': {
  1147. angle: 0,
  1148. Hz: 39.0,
  1149. a: -0.17624,
  1150. b: 43.568086,
  1151. c: 78.0371098999999,
  1152. min: 120.9,
  1153. max: 194.6,
  1154. },
  1155. '40': {
  1156. angle: 0,
  1157. Hz: 40.0,
  1158. a: -0.17624,
  1159. b: 43.58571,
  1160. c: 75.85826499999985,
  1161. min: 123.0,
  1162. max: 197.0,
  1163. },
  1164. '41': {
  1165. angle: 0,
  1166. Hz: 41.0,
  1167. a: -0.17624,
  1168. b: 43.603334,
  1169. c: 73.67853890000015,
  1170. min: 125.1,
  1171. max: 199.4,
  1172. },
  1173. '42': {
  1174. angle: 0,
  1175. Hz: 42.0,
  1176. a: -0.17624,
  1177. b: 43.620958,
  1178. c: 71.4979315999999,
  1179. min: 128.2,
  1180. max: 202.8,
  1181. },
  1182. '43': {
  1183. angle: 0,
  1184. Hz: 43.0,
  1185. a: -0.17624,
  1186. b: 43.638582,
  1187. c: 69.31644309999956,
  1188. min: 130.3,
  1189. max: 205.8,
  1190. },
  1191. '44': {
  1192. angle: 0,
  1193. Hz: 44.0,
  1194. a: -0.17624,
  1195. b: 43.656206000000005,
  1196. c: 67.13407339999958,
  1197. min: 132.4,
  1198. max: 208.5,
  1199. },
  1200. '45': {
  1201. angle: 0,
  1202. Hz: 45.0,
  1203. a: -0.17624,
  1204. b: 43.67383,
  1205. c: 64.9508224999995,
  1206. min: 134.5,
  1207. max: 211.8,
  1208. },
  1209. '46': {
  1210. angle: 0,
  1211. Hz: 46.0,
  1212. a: -0.17624,
  1213. b: 43.691454,
  1214. c: 62.76669039999979,
  1215. min: 136.6,
  1216. max: 214.4,
  1217. },
  1218. '47': {
  1219. angle: 0,
  1220. Hz: 47.0,
  1221. a: -0.17624,
  1222. b: 43.709078,
  1223. c: 60.58167709999998,
  1224. min: 138.7,
  1225. max: 218.8,
  1226. },
  1227. '48': {
  1228. angle: 0,
  1229. Hz: 48.0,
  1230. a: -0.17624,
  1231. b: 43.726702,
  1232. c: 58.39578259999962,
  1233. min: 140.8,
  1234. max: 220.2,
  1235. },
  1236. '49': {
  1237. angle: 0,
  1238. Hz: 49.0,
  1239. a: -0.17624,
  1240. b: 43.744326,
  1241. c: 56.20900689999962,
  1242. min: 143.9,
  1243. max: 225.6,
  1244. },
  1245. '50': {
  1246. angle: 0,
  1247. Hz: 50.0,
  1248. a: -0.17624,
  1249. b: 43.76195,
  1250. c: 54.021349999999984,
  1251. min: 146.0,
  1252. max: 230.0,
  1253. },
  1254. };
  1255. const num = 21;
  1256. const a = -0.17624,
  1257. m = 2770.6411125432646,
  1258. n = -124.15442010894235;
  1259. let i = 21;
  1260. const data = [];
  1261. for (const key in assistanceData) {
  1262. i -= 1;
  1263. const p = i;
  1264. const item = assistanceData[key];
  1265. item['b'] = 2 * a * (n + p);
  1266. item['c'] = a * (n + p) * (n + p) + m - i * 50;
  1267. data.push(item);
  1268. }
  1269. console.log(data);
  1270. return data;
  1271. };
  1272. export const fanInfoData = reactive({
  1273. fj: '一号回风井',
  1274. xh: 'FBCDZ No.29',
  1275. gl: '2×500',
  1276. edgl: '740',
  1277. eddy: '10000',
  1278. eddl: '38.4',
  1279. flfw: '110~260',
  1280. fyfw: '200~4100',
  1281. fbdj: 'ExdI',
  1282. ccrq: '2010.07',
  1283. sccj: '南阳防爆',
  1284. tjfs: '变频调节',
  1285. plfw: '30~50',
  1286. });
  1287. export const fanInfo = [
  1288. {
  1289. title: '风井',
  1290. code: 'fj',
  1291. value: '一号回风井',
  1292. },
  1293. {
  1294. title: '型号',
  1295. code: 'xh',
  1296. value: 'FBCDZ No.29',
  1297. },
  1298. {
  1299. title: '功率(kW)',
  1300. code: 'gl',
  1301. value: '2×500',
  1302. },
  1303. {
  1304. title: '额定转速(r/min)',
  1305. code: 'edgl',
  1306. value: '740',
  1307. },
  1308. {
  1309. title: '额定电压(V)',
  1310. code: 'eddy',
  1311. value: '10000',
  1312. },
  1313. {
  1314. title: '额定电流(A)',
  1315. code: 'eddl',
  1316. value: '38.4',
  1317. },
  1318. {
  1319. title: '风量范围(m³/s)',
  1320. code: 'flfw',
  1321. value: '110~260',
  1322. },
  1323. {
  1324. title: '风压范围(Pa)',
  1325. code: 'fyfw',
  1326. value: '200~4100',
  1327. },
  1328. {
  1329. title: '防爆等级',
  1330. code: 'fbdj',
  1331. value: 'ExdI',
  1332. },
  1333. {
  1334. title: '出厂日期',
  1335. code: 'ccrq',
  1336. value: '2010.07',
  1337. },
  1338. {
  1339. title: '生产厂家',
  1340. code: 'sccj',
  1341. value: '南阳防爆',
  1342. },
  1343. {
  1344. title: '调节方式',
  1345. code: 'tjfs',
  1346. value: '变频调节',
  1347. },
  1348. {
  1349. title: '频率可调范围(Hz)',
  1350. code: 'plfw',
  1351. value: '30~50',
  1352. },
  1353. ];
  1354. export const getSchamas = (): FormSchema[] => {
  1355. return [
  1356. {
  1357. field: 'fj',
  1358. component: 'Input',
  1359. label: '风井',
  1360. colProps: {
  1361. span: 6,
  1362. },
  1363. },
  1364. {
  1365. field: 'xh',
  1366. component: 'Input',
  1367. label: '型号',
  1368. colProps: {
  1369. span: 6,
  1370. },
  1371. },
  1372. {
  1373. field: 'gl',
  1374. component: 'Input',
  1375. label: '功率(kW)',
  1376. colProps: {
  1377. span: 6,
  1378. },
  1379. },
  1380. {
  1381. field: 'edgl',
  1382. component: 'Input',
  1383. label: '额定转速(r/min)',
  1384. colProps: {
  1385. span: 6,
  1386. },
  1387. },
  1388. {
  1389. field: 'eddy',
  1390. component: 'Input',
  1391. label: '额定电压(V)',
  1392. colProps: {
  1393. span: 6,
  1394. },
  1395. },
  1396. {
  1397. field: 'eddl',
  1398. component: 'Input',
  1399. label: '额定电流(A)',
  1400. colProps: {
  1401. span: 6,
  1402. },
  1403. },
  1404. {
  1405. field: 'flfw',
  1406. component: 'Input',
  1407. label: '风量范围(m³/s)',
  1408. colProps: {
  1409. span: 6,
  1410. },
  1411. },
  1412. {
  1413. field: 'fyfw',
  1414. component: 'Input',
  1415. label: '风压范围(Pa)',
  1416. colProps: {
  1417. span: 6,
  1418. },
  1419. },
  1420. {
  1421. field: 'fbdj',
  1422. component: 'Select',
  1423. label: '防爆等级',
  1424. colProps: {
  1425. span: 6,
  1426. },
  1427. componentProps: {
  1428. options: [
  1429. {
  1430. label: 'ExdI',
  1431. value: 'ExdI',
  1432. key: '1',
  1433. },
  1434. ],
  1435. },
  1436. },
  1437. {
  1438. field: 'ccrq',
  1439. component: 'Input',
  1440. label: '出厂日期',
  1441. colProps: {
  1442. span: 6,
  1443. },
  1444. },
  1445. {
  1446. field: 'sccj',
  1447. component: 'Input',
  1448. label: '生产厂家',
  1449. colProps: {
  1450. span: 6,
  1451. },
  1452. },
  1453. {
  1454. field: 'tjfs',
  1455. component: 'Select',
  1456. label: '调节方式',
  1457. colProps: {
  1458. span: 6,
  1459. },
  1460. componentProps: {
  1461. options: [
  1462. {
  1463. label: '变频调节',
  1464. value: '变频调节',
  1465. key: '1',
  1466. },
  1467. ],
  1468. },
  1469. },
  1470. {
  1471. field: 'plfw',
  1472. component: 'Input',
  1473. label: '频率可调范围(Hz)',
  1474. colProps: {
  1475. span: 6,
  1476. },
  1477. },
  1478. ];
  1479. };
  1480. export const getSchamas1 = (): FormSchema[] => {
  1481. return [
  1482. {
  1483. field: 'Hz',
  1484. component: 'InputNumber',
  1485. label: '频率(Hz)',
  1486. required: true,
  1487. colProps: {
  1488. span: 6,
  1489. },
  1490. },
  1491. {
  1492. field: 'a',
  1493. component: 'InputNumber',
  1494. label: '二次项系数',
  1495. required: true,
  1496. colProps: {
  1497. span: 6,
  1498. },
  1499. },
  1500. {
  1501. field: 'b',
  1502. component: 'InputNumber',
  1503. label: '一次项系数',
  1504. required: true,
  1505. colProps: {
  1506. span: 6,
  1507. },
  1508. },
  1509. {
  1510. field: 'c',
  1511. component: 'InputNumber',
  1512. label: '常数项系数',
  1513. required: true,
  1514. colProps: {
  1515. span: 6,
  1516. },
  1517. },
  1518. {
  1519. field: 'min',
  1520. component: 'InputNumber',
  1521. label: '风量下限(m³/s)',
  1522. required: true,
  1523. colProps: {
  1524. span: 6,
  1525. },
  1526. },
  1527. {
  1528. field: 'max',
  1529. component: 'InputNumber',
  1530. label: '风量上限(m³/s)',
  1531. required: true,
  1532. colProps: {
  1533. span: 6,
  1534. },
  1535. },
  1536. ];
  1537. };
  1538. export const lineFormData = reactive({
  1539. Hz: null,
  1540. a: null,
  1541. b: null,
  1542. c: null,
  1543. min: null,
  1544. max: null,
  1545. });