main.data.ts 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544
  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. },
  565. {
  566. key: 'changeSmoke',
  567. value: '不停风倒机',
  568. },
  569. {
  570. key: 'changeDirection',
  571. value: '一键反风',
  572. },
  573. {
  574. key: 'frequency',
  575. value: '一键调频',
  576. },
  577. {
  578. key: 'fbm',
  579. value: '防爆门控制',
  580. },
  581. {
  582. key: 'kkjc',
  583. value: '工况辅助决策',
  584. },
  585. ],
  586. };
  587. export const fbmControlData = <CtrlLockOpenType>reactive({
  588. CtrlLockOpen: false, // 远程开锁 true 为打开状态, false 为关闭状态
  589. CtrlExplosionVentOpen: false, // 远程开门 true 为打开状态, false 为关闭状态
  590. });
  591. // export const assistanceData = {
  592. // '30': {
  593. // angle: 0,
  594. // Hz: 30.0, //频率
  595. // a: -0.17624, //二次项系数
  596. // b: 34.59747, //一次项系数
  597. // c: 938.98517, //常数项系数
  598. // min: 93.0, //风量下限
  599. // max: 132.0, //风量上限
  600. // },
  601. // '31': {
  602. // angle: 0,
  603. // Hz: 31.0,
  604. // a: -0.17624,
  605. // b: 35.055694,
  606. // c: 851.596922,
  607. // min: 96.1,
  608. // max: 136.4,
  609. // },
  610. // '32': {
  611. // angle: 0,
  612. // Hz: 32.0,
  613. // a: -0.17624,
  614. // b: 35.513918,
  615. // c: 768.749733,
  616. // min: 99.2,
  617. // max: 140.8,
  618. // },
  619. // '33': {
  620. // angle: 0,
  621. // Hz: 33.0,
  622. // a: -0.17624,
  623. // b: 35.972142,
  624. // c: 690.443603,
  625. // min: 102.3,
  626. // max: 145.2,
  627. // },
  628. // '34': {
  629. // angle: 0,
  630. // Hz: 34.0,
  631. // a: -0.17624,
  632. // b: 36.430366,
  633. // c: 616.678531,
  634. // min: 105.4,
  635. // max: 149.6,
  636. // },
  637. // '35': {
  638. // angle: 0,
  639. // Hz: 35.0,
  640. // a: -0.17624,
  641. // b: 36.88859,
  642. // c: 547.454517,
  643. // min: 108.5,
  644. // max: 154.0,
  645. // },
  646. // '36': {
  647. // angle: 0,
  648. // Hz: 36.0,
  649. // a: -0.17624,
  650. // b: 37.346814,
  651. // c: 482.771563,
  652. // min: 111.6,
  653. // max: 158.4,
  654. // },
  655. // '37': {
  656. // angle: 0,
  657. // Hz: 37.0,
  658. // a: -0.17624,
  659. // b: 37.805038,
  660. // c: 422.629667,
  661. // min: 114.7,
  662. // max: 162.8,
  663. // },
  664. // '38': {
  665. // angle: 0,
  666. // Hz: 38.0,
  667. // a: -0.17624,
  668. // b: 38.263262,
  669. // c: 367.028829,
  670. // min: 117.8,
  671. // max: 167.2,
  672. // },
  673. // '39': {
  674. // angle: 0,
  675. // Hz: 39.0,
  676. // a: -0.17624,
  677. // b: 38.721486,
  678. // c: 315.96905,
  679. // min: 120.9,
  680. // max: 171.6,
  681. // },
  682. // '40': {
  683. // angle: 0,
  684. // Hz: 40.0,
  685. // a: -0.17624,
  686. // b: 39.17971,
  687. // c: 269.45033,
  688. // min: 124.0,
  689. // max: 176.0,
  690. // },
  691. // '41': {
  692. // angle: 0,
  693. // Hz: 41.0,
  694. // a: -0.17624,
  695. // b: 39.637934,
  696. // c: 227.472668,
  697. // min: 127.1,
  698. // max: 180.4,
  699. // },
  700. // '42': {
  701. // angle: 0,
  702. // Hz: 42.0,
  703. // a: -0.17624,
  704. // b: 40.096158,
  705. // c: 190.036065,
  706. // min: 130.2,
  707. // max: 184.8,
  708. // },
  709. // '43': {
  710. // angle: 0,
  711. // Hz: 43.0,
  712. // a: -0.17624,
  713. // b: 40.554382,
  714. // c: 157.140521,
  715. // min: 133.3,
  716. // max: 189.2,
  717. // },
  718. // '44': {
  719. // angle: 0,
  720. // Hz: 44.0,
  721. // a: -0.17624,
  722. // b: 41.012606,
  723. // c: 128.786035,
  724. // min: 136.4,
  725. // max: 193.6,
  726. // },
  727. // '45': {
  728. // angle: 0,
  729. // Hz: 45.0,
  730. // a: -0.17624,
  731. // b: 41.47083,
  732. // c: 104.972607,
  733. // min: 139.5,
  734. // max: 198.0,
  735. // },
  736. // '46': {
  737. // angle: 0,
  738. // Hz: 46.0,
  739. // a: -0.17624,
  740. // b: 41.929054,
  741. // c: 85.700239,
  742. // min: 142.6,
  743. // max: 202.4,
  744. // },
  745. // '47': {
  746. // angle: 0,
  747. // Hz: 47.0,
  748. // a: -0.17624,
  749. // b: 42.387278,
  750. // c: 70.968929,
  751. // min: 145.7,
  752. // max: 206.8,
  753. // },
  754. // '48': {
  755. // angle: 0,
  756. // Hz: 48.0,
  757. // a: -0.17624,
  758. // b: 42.845502,
  759. // c: 60.778677,
  760. // min: 148.8,
  761. // max: 211.2,
  762. // },
  763. // '49': {
  764. // angle: 0,
  765. // Hz: 49.0,
  766. // a: -0.17624,
  767. // b: 43.303726,
  768. // c: 55.129484,
  769. // min: 151.9,
  770. // max: 215.6,
  771. // },
  772. // '50': {
  773. // angle: 0,
  774. // Hz: 50.0,
  775. // a: -0.17624,
  776. // b: 43.76195,
  777. // c: 54.02135,
  778. // min: 155.0,
  779. // max: 220.0,
  780. // },
  781. // };
  782. export const assistanceData = {
  783. '30': {
  784. angle: 0,
  785. Hz: 30.0, //频率
  786. a: -0.17624, //二次项系数
  787. b: 43.40947, //一次项系数
  788. c: 97.60705999999982, //常数项系数
  789. min: 93.0, //风量下限
  790. max: 132.0, //风量上限
  791. },
  792. '31': {
  793. angle: 0,
  794. Hz: 31.0,
  795. a: -0.17624,
  796. b: 43.427094,
  797. c: 95.43614590000016,
  798. min: 96.1,
  799. max: 136.4,
  800. },
  801. '32': {
  802. angle: 0,
  803. Hz: 32.0,
  804. a: -0.17624,
  805. b: 43.444718,
  806. c: 93.26435059999994,
  807. min: 99.2,
  808. max: 140.8,
  809. },
  810. '33': {
  811. angle: 0,
  812. Hz: 33.0,
  813. a: -0.17624,
  814. b: 43.462342,
  815. c: 91.09167409999964,
  816. min: 102.3,
  817. max: 145.2,
  818. },
  819. '34': {
  820. angle: 0,
  821. Hz: 34.0,
  822. a: -0.17624,
  823. b: 43.479966000000005,
  824. c: 88.91811639999969,
  825. min: 105.4,
  826. max: 149.6,
  827. },
  828. '35': {
  829. angle: 0,
  830. Hz: 35.0,
  831. a: -0.17624,
  832. b: 43.49759,
  833. c: 86.74367749999965,
  834. min: 108.5,
  835. max: 154.0,
  836. },
  837. '36': {
  838. angle: 0,
  839. Hz: 36.0,
  840. a: -0.17624,
  841. b: 43.515214,
  842. c: 84.56835739999997,
  843. min: 111.6,
  844. max: 158.4,
  845. },
  846. '37': {
  847. angle: 0,
  848. Hz: 37.0,
  849. a: -0.17624,
  850. b: 43.532838,
  851. c: 82.3921561000002,
  852. min: 114.7,
  853. max: 162.8,
  854. },
  855. '38': {
  856. angle: 0,
  857. Hz: 38.0,
  858. a: -0.17624,
  859. b: 43.550462,
  860. c: 80.21507359999941,
  861. min: 117.8,
  862. max: 167.2,
  863. },
  864. '39': {
  865. angle: 0,
  866. Hz: 39.0,
  867. a: -0.17624,
  868. b: 43.568086,
  869. c: 78.0371098999999,
  870. min: 120.9,
  871. max: 171.6,
  872. },
  873. '40': {
  874. angle: 0,
  875. Hz: 40.0,
  876. a: -0.17624,
  877. b: 43.58571,
  878. c: 75.85826499999985,
  879. min: 124.0,
  880. max: 176.0,
  881. },
  882. '41': {
  883. angle: 0,
  884. Hz: 41.0,
  885. a: -0.17624,
  886. b: 43.603334,
  887. c: 73.67853890000015,
  888. min: 127.1,
  889. max: 180.4,
  890. },
  891. '42': {
  892. angle: 0,
  893. Hz: 42.0,
  894. a: -0.17624,
  895. b: 43.620958,
  896. c: 71.4979315999999,
  897. min: 130.2,
  898. max: 184.8,
  899. },
  900. '43': {
  901. angle: 0,
  902. Hz: 43.0,
  903. a: -0.17624,
  904. b: 43.638582,
  905. c: 69.31644309999956,
  906. min: 133.3,
  907. max: 189.2,
  908. },
  909. '44': {
  910. angle: 0,
  911. Hz: 44.0,
  912. a: -0.17624,
  913. b: 43.656206000000005,
  914. c: 67.13407339999958,
  915. min: 136.4,
  916. max: 193.6,
  917. },
  918. '45': {
  919. angle: 0,
  920. Hz: 45.0,
  921. a: -0.17624,
  922. b: 43.67383,
  923. c: 64.9508224999995,
  924. min: 139.5,
  925. max: 198.0,
  926. },
  927. '46': {
  928. angle: 0,
  929. Hz: 46.0,
  930. a: -0.17624,
  931. b: 43.691454,
  932. c: 62.76669039999979,
  933. min: 142.6,
  934. max: 202.4,
  935. },
  936. '47': {
  937. angle: 0,
  938. Hz: 47.0,
  939. a: -0.17624,
  940. b: 43.709078,
  941. c: 60.58167709999998,
  942. min: 145.7,
  943. max: 206.8,
  944. },
  945. '48': {
  946. angle: 0,
  947. Hz: 48.0,
  948. a: -0.17624,
  949. b: 43.726702,
  950. c: 58.39578259999962,
  951. min: 148.8,
  952. max: 211.2,
  953. },
  954. '49': {
  955. angle: 0,
  956. Hz: 49.0,
  957. a: -0.17624,
  958. b: 43.744326,
  959. c: 56.20900689999962,
  960. min: 151.9,
  961. max: 215.6,
  962. },
  963. '50': {
  964. angle: 0,
  965. Hz: 50.0,
  966. a: -0.17624,
  967. b: 43.76195,
  968. c: 54.021349999999984,
  969. min: 155.0,
  970. max: 220.0,
  971. },
  972. };
  973. export const option = reactive<EChartsOption>({
  974. title: {
  975. text: '风机运行工况辅助曲线图',
  976. textStyle: {
  977. color: '#BF954D',
  978. },
  979. left: 'center',
  980. top: 0,
  981. },
  982. // backgroundColor: '#39deff',
  983. tooltip: {
  984. trigger: 'axis',
  985. axisPointer: {
  986. type: 'cross',
  987. label: {
  988. backgroundColor: '#6a7985',
  989. },
  990. },
  991. },
  992. toolbox: {
  993. show: true,
  994. },
  995. grid: {
  996. left: 8,
  997. right: 50,
  998. bottom: 0,
  999. containLabel: true,
  1000. },
  1001. xAxis: {
  1002. type: 'category',
  1003. name: 'm³/s',
  1004. nameTextStyle: {
  1005. fontWeight: 600,
  1006. fontSize: 13,
  1007. },
  1008. splitLine: { show: true, lineStyle: { color: 'rgba(21,80,126,.5)' } },
  1009. axisLabel: {
  1010. margin: 20,
  1011. fontSize: 14,
  1012. color: '#f1f1f199',
  1013. },
  1014. boundaryGap: false,
  1015. data: [],
  1016. },
  1017. yAxis: {
  1018. type: 'value',
  1019. axisLine: {
  1020. show: true,
  1021. lineStyle: {
  1022. color: '#006c9d',
  1023. },
  1024. },
  1025. splitLine: { show: true, lineStyle: { color: 'rgba(21,80,126,.5)' } },
  1026. axisLabel: {
  1027. show: true,
  1028. fontSize: 14,
  1029. formatter: '{value}',
  1030. color: '#0071A5',
  1031. },
  1032. min: 0,
  1033. max: 4100,
  1034. name: 'Pa',
  1035. nameTextStyle: {
  1036. fontWeight: 600,
  1037. fontSize: 13,
  1038. },
  1039. },
  1040. series: [],
  1041. });
  1042. export const initData = () => {
  1043. const assistanceData = {
  1044. '30': {
  1045. angle: 0,
  1046. Hz: 30.0, //频率
  1047. a: -0.17624, //二次项系数
  1048. b: 43.40947, //一次项系数
  1049. c: 97.60705999999982, //常数项系数
  1050. min: 93.0, //风量下限
  1051. max: 171.0, //风量上限
  1052. },
  1053. '31': {
  1054. angle: 0,
  1055. Hz: 31.0,
  1056. a: -0.17624,
  1057. b: 43.427094,
  1058. c: 95.43614590000016,
  1059. min: 96.1,
  1060. max: 174.4,
  1061. },
  1062. '32': {
  1063. angle: 0,
  1064. Hz: 32.0,
  1065. a: -0.17624,
  1066. b: 43.444718,
  1067. c: 93.26435059999994,
  1068. min: 99.2,
  1069. max: 177.8,
  1070. },
  1071. '33': {
  1072. angle: 0,
  1073. Hz: 33.0,
  1074. a: -0.17624,
  1075. b: 43.462342,
  1076. c: 91.09167409999964,
  1077. min: 102.3,
  1078. max: 182.2,
  1079. },
  1080. '34': {
  1081. angle: 0,
  1082. Hz: 34.0,
  1083. a: -0.17624,
  1084. b: 43.479966000000005,
  1085. c: 88.91811639999969,
  1086. min: 105.4,
  1087. max: 184.0,
  1088. },
  1089. '35': {
  1090. angle: 0,
  1091. Hz: 35.0,
  1092. a: -0.17624,
  1093. b: 43.49759,
  1094. c: 86.74367749999965,
  1095. min: 108.5,
  1096. max: 185.5,
  1097. },
  1098. '36': {
  1099. angle: 0,
  1100. Hz: 36.0,
  1101. a: -0.17624,
  1102. b: 43.515214,
  1103. c: 84.56835739999997,
  1104. min: 111.6,
  1105. max: 187.0,
  1106. },
  1107. '37': {
  1108. angle: 0,
  1109. Hz: 37.0,
  1110. a: -0.17624,
  1111. b: 43.532838,
  1112. c: 82.3921561000002,
  1113. min: 114.7,
  1114. max: 190.8,
  1115. },
  1116. '38': {
  1117. angle: 0,
  1118. Hz: 38.0,
  1119. a: -0.17624,
  1120. b: 43.550462,
  1121. c: 80.21507359999941,
  1122. min: 117.8,
  1123. max: 192.0,
  1124. },
  1125. '39': {
  1126. angle: 0,
  1127. Hz: 39.0,
  1128. a: -0.17624,
  1129. b: 43.568086,
  1130. c: 78.0371098999999,
  1131. min: 120.9,
  1132. max: 194.6,
  1133. },
  1134. '40': {
  1135. angle: 0,
  1136. Hz: 40.0,
  1137. a: -0.17624,
  1138. b: 43.58571,
  1139. c: 75.85826499999985,
  1140. min: 123.0,
  1141. max: 197.0,
  1142. },
  1143. '41': {
  1144. angle: 0,
  1145. Hz: 41.0,
  1146. a: -0.17624,
  1147. b: 43.603334,
  1148. c: 73.67853890000015,
  1149. min: 125.1,
  1150. max: 199.4,
  1151. },
  1152. '42': {
  1153. angle: 0,
  1154. Hz: 42.0,
  1155. a: -0.17624,
  1156. b: 43.620958,
  1157. c: 71.4979315999999,
  1158. min: 128.2,
  1159. max: 202.8,
  1160. },
  1161. '43': {
  1162. angle: 0,
  1163. Hz: 43.0,
  1164. a: -0.17624,
  1165. b: 43.638582,
  1166. c: 69.31644309999956,
  1167. min: 130.3,
  1168. max: 205.8,
  1169. },
  1170. '44': {
  1171. angle: 0,
  1172. Hz: 44.0,
  1173. a: -0.17624,
  1174. b: 43.656206000000005,
  1175. c: 67.13407339999958,
  1176. min: 132.4,
  1177. max: 208.5,
  1178. },
  1179. '45': {
  1180. angle: 0,
  1181. Hz: 45.0,
  1182. a: -0.17624,
  1183. b: 43.67383,
  1184. c: 64.9508224999995,
  1185. min: 134.5,
  1186. max: 211.8,
  1187. },
  1188. '46': {
  1189. angle: 0,
  1190. Hz: 46.0,
  1191. a: -0.17624,
  1192. b: 43.691454,
  1193. c: 62.76669039999979,
  1194. min: 136.6,
  1195. max: 214.4,
  1196. },
  1197. '47': {
  1198. angle: 0,
  1199. Hz: 47.0,
  1200. a: -0.17624,
  1201. b: 43.709078,
  1202. c: 60.58167709999998,
  1203. min: 138.7,
  1204. max: 218.8,
  1205. },
  1206. '48': {
  1207. angle: 0,
  1208. Hz: 48.0,
  1209. a: -0.17624,
  1210. b: 43.726702,
  1211. c: 58.39578259999962,
  1212. min: 140.8,
  1213. max: 220.2,
  1214. },
  1215. '49': {
  1216. angle: 0,
  1217. Hz: 49.0,
  1218. a: -0.17624,
  1219. b: 43.744326,
  1220. c: 56.20900689999962,
  1221. min: 143.9,
  1222. max: 225.6,
  1223. },
  1224. '50': {
  1225. angle: 0,
  1226. Hz: 50.0,
  1227. a: -0.17624,
  1228. b: 43.76195,
  1229. c: 54.021349999999984,
  1230. min: 146.0,
  1231. max: 230.0,
  1232. },
  1233. };
  1234. let num = 21;
  1235. let a = -0.17624,
  1236. m = 2770.6411125432646,
  1237. n = -124.15442010894235;
  1238. let i = 21;
  1239. const data = [];
  1240. for (let key in assistanceData) {
  1241. i -= 1;
  1242. const p = i;
  1243. const item = assistanceData[key];
  1244. item['b'] = 2 * a * (n + p);
  1245. item['c'] = a * (n + p) * (n + p) + m - i * 50;
  1246. data.push(item);
  1247. }
  1248. console.log(data);
  1249. return data;
  1250. };
  1251. export const fanInfoData = reactive({
  1252. fj: '一号回风井',
  1253. xh: 'FBCDZ No.29',
  1254. gl: '2×500',
  1255. edgl: '740',
  1256. eddy: '10000',
  1257. eddl: '38.4',
  1258. flfw: '110~260',
  1259. fyfw: '200~4100',
  1260. fbdj: 'ExdI',
  1261. ccrq: '2010.07',
  1262. sccj: '南阳防爆',
  1263. tjfs: '变频调节',
  1264. plfw: '30~50',
  1265. });
  1266. export const fanInfo = [
  1267. {
  1268. title: '风井',
  1269. code: 'fj',
  1270. value: '一号回风井',
  1271. },
  1272. {
  1273. title: '型号',
  1274. code: 'xh',
  1275. value: 'FBCDZ No.29',
  1276. },
  1277. {
  1278. title: '功率(kW)',
  1279. code: 'gl',
  1280. value: '2×500',
  1281. },
  1282. {
  1283. title: '额定转速(r/min)',
  1284. code: 'edgl',
  1285. value: '740',
  1286. },
  1287. {
  1288. title: '额定电压(V)',
  1289. code: 'eddy',
  1290. value: '10000',
  1291. },
  1292. {
  1293. title: '额定电流(A)',
  1294. code: 'eddl',
  1295. value: '38.4',
  1296. },
  1297. {
  1298. title: '风量范围(m³/s)',
  1299. code: 'flfw',
  1300. value: '110~260',
  1301. },
  1302. {
  1303. title: '风压范围(Pa)',
  1304. code: 'fyfw',
  1305. value: '200~4100',
  1306. },
  1307. {
  1308. title: '防爆等级',
  1309. code: 'fbdj',
  1310. value: 'ExdI',
  1311. },
  1312. {
  1313. title: '出厂日期',
  1314. code: 'ccrq',
  1315. value: '2010.07',
  1316. },
  1317. {
  1318. title: '生产厂家',
  1319. code: 'sccj',
  1320. value: '南阳防爆',
  1321. },
  1322. {
  1323. title: '调节方式',
  1324. code: 'tjfs',
  1325. value: '变频调节',
  1326. },
  1327. {
  1328. title: '频率可调范围(Hz)',
  1329. code: 'plfw',
  1330. value: '30~50',
  1331. },
  1332. ];
  1333. export const getSchamas = (): FormSchema[] => {
  1334. return [
  1335. {
  1336. field: 'fj',
  1337. component: 'Input',
  1338. label: '风井',
  1339. colProps: {
  1340. span: 6,
  1341. },
  1342. },
  1343. {
  1344. field: 'xh',
  1345. component: 'Input',
  1346. label: '型号',
  1347. colProps: {
  1348. span: 6,
  1349. },
  1350. },
  1351. {
  1352. field: 'gl',
  1353. component: 'Input',
  1354. label: '功率(kW)',
  1355. colProps: {
  1356. span: 6,
  1357. },
  1358. },
  1359. {
  1360. field: 'edgl',
  1361. component: 'Input',
  1362. label: '额定转速(r/min)',
  1363. colProps: {
  1364. span: 6,
  1365. },
  1366. },
  1367. {
  1368. field: 'eddy',
  1369. component: 'Input',
  1370. label: '额定电压(V)',
  1371. colProps: {
  1372. span: 6,
  1373. },
  1374. },
  1375. {
  1376. field: 'eddl',
  1377. component: 'Input',
  1378. label: '额定电流(A)',
  1379. colProps: {
  1380. span: 6,
  1381. },
  1382. },
  1383. {
  1384. field: 'flfw',
  1385. component: 'Input',
  1386. label: '风量范围(m³/s)',
  1387. colProps: {
  1388. span: 6,
  1389. },
  1390. },
  1391. {
  1392. field: 'fyfw',
  1393. component: 'Input',
  1394. label: '风压范围(Pa)',
  1395. colProps: {
  1396. span: 6,
  1397. },
  1398. },
  1399. {
  1400. field: 'fbdj',
  1401. component: 'Select',
  1402. label: '防爆等级',
  1403. colProps: {
  1404. span: 6,
  1405. },
  1406. componentProps: {
  1407. options: [
  1408. {
  1409. label: 'ExdI',
  1410. value: 'ExdI',
  1411. key: '1',
  1412. },
  1413. ],
  1414. },
  1415. },
  1416. {
  1417. field: 'ccrq',
  1418. component: 'Input',
  1419. label: '出厂日期',
  1420. colProps: {
  1421. span: 6,
  1422. },
  1423. },
  1424. {
  1425. field: 'sccj',
  1426. component: 'Input',
  1427. label: '生产厂家',
  1428. colProps: {
  1429. span: 6,
  1430. },
  1431. },
  1432. {
  1433. field: 'tjfs',
  1434. component: 'Select',
  1435. label: '调节方式',
  1436. colProps: {
  1437. span: 6,
  1438. },
  1439. componentProps: {
  1440. options: [
  1441. {
  1442. label: '变频调节',
  1443. value: '变频调节',
  1444. key: '1',
  1445. },
  1446. ],
  1447. },
  1448. },
  1449. {
  1450. field: 'plfw',
  1451. component: 'Input',
  1452. label: '频率可调范围(Hz)',
  1453. colProps: {
  1454. span: 6,
  1455. },
  1456. },
  1457. ];
  1458. };
  1459. export const getSchamas1 = (): FormSchema[] => {
  1460. return [
  1461. {
  1462. field: 'Hz',
  1463. component: 'InputNumber',
  1464. label: '频率(Hz)',
  1465. required: true,
  1466. colProps: {
  1467. span: 6,
  1468. },
  1469. },
  1470. {
  1471. field: 'a',
  1472. component: 'InputNumber',
  1473. label: '二次项系数',
  1474. required: true,
  1475. colProps: {
  1476. span: 6,
  1477. },
  1478. },
  1479. {
  1480. field: 'b',
  1481. component: 'InputNumber',
  1482. label: '一次项系数',
  1483. required: true,
  1484. colProps: {
  1485. span: 6,
  1486. },
  1487. },
  1488. {
  1489. field: 'c',
  1490. component: 'InputNumber',
  1491. label: '常数项系数',
  1492. required: true,
  1493. colProps: {
  1494. span: 6,
  1495. },
  1496. },
  1497. {
  1498. field: 'min',
  1499. component: 'InputNumber',
  1500. label: '风量下限(m³/s)',
  1501. required: true,
  1502. colProps: {
  1503. span: 6,
  1504. },
  1505. },
  1506. {
  1507. field: 'max',
  1508. component: 'InputNumber',
  1509. label: '风量上限(m³/s)',
  1510. required: true,
  1511. colProps: {
  1512. span: 6,
  1513. },
  1514. },
  1515. ];
  1516. };
  1517. export const lineFormData = reactive({
  1518. Hz: null,
  1519. a: null,
  1520. b: null,
  1521. c: null,
  1522. min: null,
  1523. max: null,
  1524. });