main.data.ts 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { reactive, defineAsyncComponent } from 'vue';
  4. import type { EChartsOption } from 'echarts';
  5. import { useGlobSetting } from '/@/hooks/setting';
  6. import { cloneDeep } from 'lodash-es';
  7. import EntryThree from './components/entryThree.vue';
  8. type CtrlLockOpenType = {
  9. CtrlLockOpen: boolean | undefined;
  10. CtrlExplosionVentOpen: boolean | undefined;
  11. };
  12. export type PointMonitorType = {
  13. valueName: string;
  14. valueCode: string;
  15. value: number | string;
  16. warnMin_201: number | string;
  17. warnMin_104: number | string;
  18. readTime: string;
  19. };
  20. export const columns: BasicColumn[] = [
  21. {
  22. title: '名称',
  23. dataIndex: 'strname',
  24. width: 120,
  25. },
  26. {
  27. title: '安装位置',
  28. dataIndex: 'strinstallpos',
  29. width: 100,
  30. },
  31. {
  32. title: '是否为常闭型',
  33. dataIndex: 'bnormalclose',
  34. width: 100,
  35. // customRender: render.renderAvatar,
  36. },
  37. {
  38. title: '净宽',
  39. dataIndex: 'fclearwidth',
  40. width: 80,
  41. },
  42. {
  43. title: '净高',
  44. dataIndex: 'fclearheight',
  45. width: 100,
  46. },
  47. {
  48. title: '风门道数',
  49. dataIndex: 'ndoorcount',
  50. width: 100,
  51. },
  52. {
  53. title: '所属分站',
  54. width: 150,
  55. dataIndex: 'stationname',
  56. },
  57. {
  58. title: '点表',
  59. width: 100,
  60. dataIndex: 'strtype',
  61. },
  62. {
  63. title: '监测类型',
  64. dataIndex: 'monitorflag',
  65. width: 100,
  66. },
  67. {
  68. title: '是否模拟数据',
  69. dataIndex: 'testflag',
  70. width: 100,
  71. },
  72. ];
  73. export const recycleColumns: BasicColumn[] = [
  74. {
  75. title: '名称',
  76. dataIndex: 'strname',
  77. width: 100,
  78. },
  79. {
  80. title: '是否为常闭型',
  81. dataIndex: 'bnormalclose',
  82. width: 100,
  83. },
  84. ];
  85. export const searchFormSchema: FormSchema[] = [
  86. {
  87. label: '名称',
  88. field: 'strname',
  89. component: 'Input',
  90. colProps: { span: 6 },
  91. },
  92. {
  93. label: '安装位置',
  94. field: 'strinstallpos',
  95. component: 'Input',
  96. colProps: { span: 6 },
  97. },
  98. {
  99. label: '是否为常闭型',
  100. field: 'bnormalclose',
  101. component: 'JDictSelectTag',
  102. componentProps: {
  103. dictCode: 'user_status',
  104. placeholder: '请选择读写类型',
  105. stringToNumber: true,
  106. },
  107. colProps: { span: 6 },
  108. },
  109. ];
  110. export const formSchema: FormSchema[] = [
  111. {
  112. label: '',
  113. field: 'id',
  114. component: 'Input',
  115. show: false,
  116. },
  117. {
  118. label: '名称',
  119. field: 'strname',
  120. component: 'Input',
  121. },
  122. {
  123. label: '安装位置',
  124. field: 'strinstallpos',
  125. component: 'Input',
  126. },
  127. {
  128. label: '是否为常闭型',
  129. field: 'bnormalclose',
  130. component: 'RadioGroup',
  131. defaultValue: 1,
  132. componentProps: () => {
  133. return {
  134. options: [
  135. { label: '是', value: 1, key: '1' },
  136. { label: '否', value: 0, key: '2' },
  137. ],
  138. };
  139. },
  140. },
  141. {
  142. label: '净宽',
  143. field: 'fclearwidth',
  144. component: 'Input',
  145. },
  146. {
  147. label: '净高',
  148. field: 'fclearheight',
  149. component: 'Input',
  150. },
  151. {
  152. label: '风门道数',
  153. field: 'ndoorcount',
  154. component: 'Input',
  155. },
  156. {
  157. label: '所属分站',
  158. field: 'stationname',
  159. component: 'JDictSelectTag',
  160. componentProps: {
  161. dictCode: 'user_status',
  162. placeholder: '请选择状态',
  163. stringToNumber: true,
  164. },
  165. },
  166. {
  167. label: '点表',
  168. field: 'strtype',
  169. component: 'JDictSelectTag',
  170. componentProps: {
  171. dictCode: 'user_status',
  172. placeholder: '请选择状态',
  173. stringToNumber: true,
  174. },
  175. },
  176. {
  177. label: '监测类型',
  178. field: 'monitorflag',
  179. component: 'JDictSelectTag',
  180. componentProps: {
  181. dictCode: 'user_status',
  182. placeholder: '请选择状态',
  183. stringToNumber: true,
  184. },
  185. },
  186. {
  187. label: '是否模拟数据',
  188. field: 'testflag',
  189. component: 'RadioGroup',
  190. defaultValue: 1,
  191. componentProps: () => {
  192. return {
  193. options: [
  194. { label: '是', value: 1, key: '1' },
  195. { label: '否', value: 0, key: '2' },
  196. ],
  197. };
  198. },
  199. },
  200. ];
  201. export const tableColumns = [
  202. {
  203. title: '',
  204. dataIndex: 'isCheck',
  205. customCell: (_, index) => {
  206. if (index % 2 == 0) {
  207. return { rowSpan: 2 };
  208. } else {
  209. return { rowSpan: 0 };
  210. }
  211. },
  212. },
  213. {
  214. title: '安装位置',
  215. dataIndex: 'address',
  216. customCell: (_, index) => {
  217. if (index % 2 == 0) {
  218. return { rowSpan: 2 };
  219. } else {
  220. return { rowSpan: 0 };
  221. }
  222. },
  223. },
  224. {
  225. title: '运行风机',
  226. dataIndex: 'childName',
  227. },
  228. {
  229. title: '风机静压(Pa)',
  230. dataIndex: 'yc2',
  231. },
  232. {
  233. title: '风机全压(Pa)',
  234. dataIndex: 'dqPa',
  235. },
  236. {
  237. title: '电机流量(m³/s)',
  238. dataIndex: 'fanM3',
  239. },
  240. {
  241. title: '电机速度(rpm/s)',
  242. dataIndex: 'fanSD',
  243. },
  244. {
  245. title: '电机电压(V)',
  246. dataIndex: 'fanU',
  247. },
  248. {
  249. title: '电机电流(A)',
  250. dataIndex: 'fanA',
  251. },
  252. {
  253. title: '电机频率(Hz/s)',
  254. dataIndex: 'fanPL',
  255. },
  256. {
  257. title: '电机功率(KW/s)',
  258. dataIndex: 'fanGL',
  259. },
  260. {
  261. title: '振动X1(mm/s)',
  262. dataIndex: 'zdX1',
  263. },
  264. {
  265. title: '振动Y1(mm/s)',
  266. dataIndex: 'zdY1',
  267. },
  268. ];
  269. export const dataColumns = () => {
  270. return [
  271. {
  272. id: 'UXC',
  273. name: '电机轴温设定(℃)',
  274. id2: 'bearingFront2_F1',
  275. },
  276. { id: 'VXC', name: '电机定温设定(℃)', id2: 'bearingBack2_F1' },
  277. {
  278. id: 'WXC',
  279. name: '电机前轴温度(℃)',
  280. id2: 'stator2A_F1',
  281. },
  282. {
  283. id: 'QZC',
  284. name: '电机后轴温度(℃)',
  285. id2: 'stator2B_F1',
  286. },
  287. { id: 'ZCZ1C', name: '电机定子1温度(℃)', id2: 'fIA2_F1' },
  288. { id: 'ZCZ2C', name: '电机定子2温度(℃)', id2: 'fIB2_F1' },
  289. { id: 'FTZ1C', name: '电机定3温度(℃)', id2: 'fIC2_F1' },
  290. ];
  291. };
  292. export const stateColumns = () => {
  293. return [
  294. // {
  295. // id: 'lubeBoxTemperatureF1High',
  296. // name: '润滑站油箱油温高报警',
  297. // flag: false,
  298. // },
  299. {
  300. id: 'lubeBoxTemperatureF1Low',
  301. name: '润滑站1油箱油温低报警',
  302. flag: true,
  303. },
  304. {
  305. id: 'lubeTemperatureF1High',
  306. name: '润滑站1供油油温高报警',
  307. flag: true,
  308. },
  309. // {
  310. // id: 'lubeTemperatureF1Low',
  311. // name: '润滑站1供油油温低报警',
  312. // flag: false,
  313. // },
  314. { id: 'lubePaF1High', name: '润滑站1供油油压高报警', flag: true },
  315. { id: 'lubePaF1Low', name: '润滑站1供油油压低报警', flag: true },
  316. // { id: "ch4_F1High", name: "瓦斯值1高报警", flag: false },
  317. { id: 'singleDoorF1Warn', name: '侧开风门单模报警', flag: true },
  318. { id: 'lubeF1SlightFault', name: '稀油润滑站轻故障', flag: true },
  319. { id: 'lubeF1SevereFault', name: '稀油润滑站重故障', flag: true },
  320. { id: 'f1B1Fault', name: '变频器1故障', flag: true },
  321. { id: 'f1B2Fault', name: '变频器2故障', flag: true },
  322. { id: 'f1Fault', name: '通风机故障', flag: true },
  323. ];
  324. };
  325. export const faultDeviceHeader = [
  326. {
  327. title: '测点名称',
  328. code: 'valueName',
  329. width: '200px',
  330. },
  331. {
  332. title: '实时数据',
  333. code: 'value',
  334. width: '110px',
  335. },
  336. {
  337. title: '预警限值',
  338. code: 'warnMin_104',
  339. width: '110px',
  340. },
  341. {
  342. title: '报警限值',
  343. code: 'warnMin_201',
  344. width: '110px',
  345. },
  346. ];
  347. export const rightFaultDeviceColumns = [
  348. {
  349. title: '中端X',
  350. dataIndex: 'Fault_cd_ZX', // 测点名称
  351. width: 120,
  352. },
  353. {
  354. title: '中端X',
  355. dataIndex: 'Fault_ZX_val', // 中端X实时监测值
  356. width: 120,
  357. },
  358. ];
  359. export const modalTypeArr = {
  360. centerBtnArr: [
  361. {
  362. key: 'startSmoke',
  363. value: '一键启动/停止',
  364. permission: 'fan:startSmoke',
  365. },
  366. {
  367. key: 'startFan',
  368. value: '一键启动/停止',
  369. permission: 'fan:startFan',
  370. },
  371. {
  372. key: 'startFan',
  373. value: '一键启动/停止',
  374. permission: 'fan:startAndResetFan',
  375. },
  376. {
  377. key: 'resetFan',
  378. value: '一键复位',
  379. permission: 'fan:resetFan',
  380. },
  381. {
  382. key: 'changeSmoke',
  383. value: '不停风倒机',
  384. permission: 'fan:changeSmoke',
  385. },
  386. {
  387. key: 'changeDirection',
  388. value: '一键反风',
  389. permission: 'fan:changeDirection',
  390. },
  391. {
  392. key: 'frequency',
  393. value: '一键调频',
  394. permission: 'fan:frequency',
  395. },
  396. {
  397. key: 'fbm',
  398. value: '防爆门控制',
  399. permission: 'fan:fbm',
  400. },
  401. {
  402. key: 'kkjc',
  403. value: '工况辅助决策',
  404. permission: 'fan:kkjc',
  405. },
  406. {
  407. key: 'zhlk',
  408. value: '自主联控',
  409. permission: 'fan:zhlk',
  410. },
  411. ],
  412. };
  413. export const fbmControlData = <CtrlLockOpenType>reactive({
  414. CtrlLockOpen: false, // 远程开锁 true 为打开状态, false 为关闭状态
  415. CtrlExplosionVentOpen: false, // 远程开门 true 为打开状态, false 为关闭状态
  416. });
  417. // export const assistanceData = {
  418. // '30': {
  419. // angle: 0,
  420. // Hz: 30.0, //频率
  421. // a: -0.17624, //二次项系数
  422. // b: 34.59747, //一次项系数
  423. // c: 938.98517, //常数项系数
  424. // min: 93.0, //风量下限
  425. // max: 132.0, //风量上限
  426. // },
  427. // '31': {
  428. // angle: 0,
  429. // Hz: 31.0,
  430. // a: -0.17624,
  431. // b: 35.055694,
  432. // c: 851.596922,
  433. // min: 96.1,
  434. // max: 136.4,
  435. // },
  436. // '32': {
  437. // angle: 0,
  438. // Hz: 32.0,
  439. // a: -0.17624,
  440. // b: 35.513918,
  441. // c: 768.749733,
  442. // min: 99.2,
  443. // max: 140.8,
  444. // },
  445. // '33': {
  446. // angle: 0,
  447. // Hz: 33.0,
  448. // a: -0.17624,
  449. // b: 35.972142,
  450. // c: 690.443603,
  451. // min: 102.3,
  452. // max: 145.2,
  453. // },
  454. // '34': {
  455. // angle: 0,
  456. // Hz: 34.0,
  457. // a: -0.17624,
  458. // b: 36.430366,
  459. // c: 616.678531,
  460. // min: 105.4,
  461. // max: 149.6,
  462. // },
  463. // '35': {
  464. // angle: 0,
  465. // Hz: 35.0,
  466. // a: -0.17624,
  467. // b: 36.88859,
  468. // c: 547.454517,
  469. // min: 108.5,
  470. // max: 154.0,
  471. // },
  472. // '36': {
  473. // angle: 0,
  474. // Hz: 36.0,
  475. // a: -0.17624,
  476. // b: 37.346814,
  477. // c: 482.771563,
  478. // min: 111.6,
  479. // max: 158.4,
  480. // },
  481. // '37': {
  482. // angle: 0,
  483. // Hz: 37.0,
  484. // a: -0.17624,
  485. // b: 37.805038,
  486. // c: 422.629667,
  487. // min: 114.7,
  488. // max: 162.8,
  489. // },
  490. // '38': {
  491. // angle: 0,
  492. // Hz: 38.0,
  493. // a: -0.17624,
  494. // b: 38.263262,
  495. // c: 367.028829,
  496. // min: 117.8,
  497. // max: 167.2,
  498. // },
  499. // '39': {
  500. // angle: 0,
  501. // Hz: 39.0,
  502. // a: -0.17624,
  503. // b: 38.721486,
  504. // c: 315.96905,
  505. // min: 120.9,
  506. // max: 171.6,
  507. // },
  508. // '40': {
  509. // angle: 0,
  510. // Hz: 40.0,
  511. // a: -0.17624,
  512. // b: 39.17971,
  513. // c: 269.45033,
  514. // min: 124.0,
  515. // max: 176.0,
  516. // },
  517. // '41': {
  518. // angle: 0,
  519. // Hz: 41.0,
  520. // a: -0.17624,
  521. // b: 39.637934,
  522. // c: 227.472668,
  523. // min: 127.1,
  524. // max: 180.4,
  525. // },
  526. // '42': {
  527. // angle: 0,
  528. // Hz: 42.0,
  529. // a: -0.17624,
  530. // b: 40.096158,
  531. // c: 190.036065,
  532. // min: 130.2,
  533. // max: 184.8,
  534. // },
  535. // '43': {
  536. // angle: 0,
  537. // Hz: 43.0,
  538. // a: -0.17624,
  539. // b: 40.554382,
  540. // c: 157.140521,
  541. // min: 133.3,
  542. // max: 189.2,
  543. // },
  544. // '44': {
  545. // angle: 0,
  546. // Hz: 44.0,
  547. // a: -0.17624,
  548. // b: 41.012606,
  549. // c: 128.786035,
  550. // min: 136.4,
  551. // max: 193.6,
  552. // },
  553. // '45': {
  554. // angle: 0,
  555. // Hz: 45.0,
  556. // a: -0.17624,
  557. // b: 41.47083,
  558. // c: 104.972607,
  559. // min: 139.5,
  560. // max: 198.0,
  561. // },
  562. // '46': {
  563. // angle: 0,
  564. // Hz: 46.0,
  565. // a: -0.17624,
  566. // b: 41.929054,
  567. // c: 85.700239,
  568. // min: 142.6,
  569. // max: 202.4,
  570. // },
  571. // '47': {
  572. // angle: 0,
  573. // Hz: 47.0,
  574. // a: -0.17624,
  575. // b: 42.387278,
  576. // c: 70.968929,
  577. // min: 145.7,
  578. // max: 206.8,
  579. // },
  580. // '48': {
  581. // angle: 0,
  582. // Hz: 48.0,
  583. // a: -0.17624,
  584. // b: 42.845502,
  585. // c: 60.778677,
  586. // min: 148.8,
  587. // max: 211.2,
  588. // },
  589. // '49': {
  590. // angle: 0,
  591. // Hz: 49.0,
  592. // a: -0.17624,
  593. // b: 43.303726,
  594. // c: 55.129484,
  595. // min: 151.9,
  596. // max: 215.6,
  597. // },
  598. // '50': {
  599. // angle: 0,
  600. // Hz: 50.0,
  601. // a: -0.17624,
  602. // b: 43.76195,
  603. // c: 54.02135,
  604. // min: 155.0,
  605. // max: 220.0,
  606. // },
  607. // };
  608. export const assistanceData = {
  609. '30': {
  610. angle: 0,
  611. Hz: 30.0, //频率
  612. a: -0.17624, //二次项系数
  613. b: 43.40947, //一次项系数
  614. c: 97.60705999999982, //常数项系数
  615. min: 93.0, //风量下限
  616. max: 132.0, //风量上限
  617. },
  618. '31': {
  619. angle: 0,
  620. Hz: 31.0,
  621. a: -0.17624,
  622. b: 43.427094,
  623. c: 95.43614590000016,
  624. min: 96.1,
  625. max: 136.4,
  626. },
  627. '32': {
  628. angle: 0,
  629. Hz: 32.0,
  630. a: -0.17624,
  631. b: 43.444718,
  632. c: 93.26435059999994,
  633. min: 99.2,
  634. max: 140.8,
  635. },
  636. '33': {
  637. angle: 0,
  638. Hz: 33.0,
  639. a: -0.17624,
  640. b: 43.462342,
  641. c: 91.09167409999964,
  642. min: 102.3,
  643. max: 145.2,
  644. },
  645. '34': {
  646. angle: 0,
  647. Hz: 34.0,
  648. a: -0.17624,
  649. b: 43.479966000000005,
  650. c: 88.91811639999969,
  651. min: 105.4,
  652. max: 149.6,
  653. },
  654. '35': {
  655. angle: 0,
  656. Hz: 35.0,
  657. a: -0.17624,
  658. b: 43.49759,
  659. c: 86.74367749999965,
  660. min: 108.5,
  661. max: 154.0,
  662. },
  663. '36': {
  664. angle: 0,
  665. Hz: 36.0,
  666. a: -0.17624,
  667. b: 43.515214,
  668. c: 84.56835739999997,
  669. min: 111.6,
  670. max: 158.4,
  671. },
  672. '37': {
  673. angle: 0,
  674. Hz: 37.0,
  675. a: -0.17624,
  676. b: 43.532838,
  677. c: 82.3921561000002,
  678. min: 114.7,
  679. max: 162.8,
  680. },
  681. '38': {
  682. angle: 0,
  683. Hz: 38.0,
  684. a: -0.17624,
  685. b: 43.550462,
  686. c: 80.21507359999941,
  687. min: 117.8,
  688. max: 167.2,
  689. },
  690. '39': {
  691. angle: 0,
  692. Hz: 39.0,
  693. a: -0.17624,
  694. b: 43.568086,
  695. c: 78.0371098999999,
  696. min: 120.9,
  697. max: 171.6,
  698. },
  699. '40': {
  700. angle: 0,
  701. Hz: 40.0,
  702. a: -0.17624,
  703. b: 43.58571,
  704. c: 75.85826499999985,
  705. min: 124.0,
  706. max: 176.0,
  707. },
  708. '41': {
  709. angle: 0,
  710. Hz: 41.0,
  711. a: -0.17624,
  712. b: 43.603334,
  713. c: 73.67853890000015,
  714. min: 127.1,
  715. max: 180.4,
  716. },
  717. '42': {
  718. angle: 0,
  719. Hz: 42.0,
  720. a: -0.17624,
  721. b: 43.620958,
  722. c: 71.4979315999999,
  723. min: 130.2,
  724. max: 184.8,
  725. },
  726. '43': {
  727. angle: 0,
  728. Hz: 43.0,
  729. a: -0.17624,
  730. b: 43.638582,
  731. c: 69.31644309999956,
  732. min: 133.3,
  733. max: 189.2,
  734. },
  735. '44': {
  736. angle: 0,
  737. Hz: 44.0,
  738. a: -0.17624,
  739. b: 43.656206000000005,
  740. c: 67.13407339999958,
  741. min: 136.4,
  742. max: 193.6,
  743. },
  744. '45': {
  745. angle: 0,
  746. Hz: 45.0,
  747. a: -0.17624,
  748. b: 43.67383,
  749. c: 64.9508224999995,
  750. min: 139.5,
  751. max: 198.0,
  752. },
  753. '46': {
  754. angle: 0,
  755. Hz: 46.0,
  756. a: -0.17624,
  757. b: 43.691454,
  758. c: 62.76669039999979,
  759. min: 142.6,
  760. max: 202.4,
  761. },
  762. '47': {
  763. angle: 0,
  764. Hz: 47.0,
  765. a: -0.17624,
  766. b: 43.709078,
  767. c: 60.58167709999998,
  768. min: 145.7,
  769. max: 206.8,
  770. },
  771. '48': {
  772. angle: 0,
  773. Hz: 48.0,
  774. a: -0.17624,
  775. b: 43.726702,
  776. c: 58.39578259999962,
  777. min: 148.8,
  778. max: 211.2,
  779. },
  780. '49': {
  781. angle: 0,
  782. Hz: 49.0,
  783. a: -0.17624,
  784. b: 43.744326,
  785. c: 56.20900689999962,
  786. min: 151.9,
  787. max: 215.6,
  788. },
  789. '50': {
  790. angle: 0,
  791. Hz: 50.0,
  792. a: -0.17624,
  793. b: 43.76195,
  794. c: 54.021349999999984,
  795. min: 155.0,
  796. max: 220.0,
  797. },
  798. };
  799. export const setOption = (deviceType?) => {
  800. let yMax = 4500;
  801. const { sysOrgCode } = useGlobSetting();
  802. // const sysOrgCode = 'yjmdhswmk';
  803. if (sysOrgCode == 'sdmtjtdltmk') {
  804. // 这里判断白家渠还是五当沟
  805. if (deviceType == 'fanmain_bjq') {
  806. yMax = 5500;
  807. } else if (deviceType == 'fanmain_wdg') {
  808. yMax = 1200;
  809. }
  810. } else if (sysOrgCode == 'sdmtjtswmk') {
  811. if (deviceType == 'fanmain_bfj') {
  812. yMax = 5000;
  813. } else if (deviceType == 'fanmain_nfj') {
  814. yMax = 4500;
  815. }
  816. } else if (sysOrgCode == 'sdmtjtbdmk') {
  817. if (deviceType == 'fanmain_ljy') {
  818. yMax = 5000;
  819. } else if (deviceType == 'fanmain_zl') {
  820. yMax = 6000;
  821. }
  822. } else if (sysOrgCode == 'sdmtjtjjmk') {
  823. yMax = 6000;
  824. } else if (sysOrgCode == 'sdmtjtsgtmk') {
  825. yMax = 3000;
  826. } else if (sysOrgCode == 'sdmtjthlgmk') {
  827. yMax = 3000;
  828. } else if (sysOrgCode == 'sdmtjtdltmkhjtj') {
  829. yMax = 3000;
  830. } else if (sysOrgCode == 'sdmtjtcctrk') {
  831. yMax = 600;
  832. } else if (sysOrgCode == 'sdmtjtwlmlmk') {
  833. yMax = 4000;
  834. } else if (sysOrgCode == 'sdmtjtltmk') {
  835. yMax = 4000;
  836. } else if (sysOrgCode == 'sdtljtdhzmk') {
  837. yMax = 5000;
  838. } else if (sysOrgCode == 'yjmdhswmk') {
  839. yMax = 5000;
  840. } else {
  841. yMax = 4500;
  842. }
  843. return reactive<EChartsOption>({
  844. title: {
  845. text: '风机运行工况辅助曲线图',
  846. textStyle: {
  847. color: '#BF954D',
  848. },
  849. left: 'center',
  850. top: 0,
  851. },
  852. // backgroundColor: '#39deff',
  853. tooltip: {
  854. trigger: 'axis',
  855. axisPointer: {
  856. type: 'cross',
  857. label: {
  858. backgroundColor: '#6a7985',
  859. },
  860. },
  861. },
  862. toolbox: {
  863. show: true,
  864. },
  865. grid: {
  866. left: 8,
  867. right: 50,
  868. bottom: 0,
  869. containLabel: true,
  870. },
  871. xAxis: {
  872. type: 'category',
  873. name: 'm³/s',
  874. nameTextStyle: {
  875. fontWeight: 600,
  876. fontSize: 13,
  877. },
  878. splitLine: { show: true, lineStyle: { color: 'rgba(21,80,126,.5)' } },
  879. axisLabel: {
  880. margin: 20,
  881. fontSize: 14,
  882. color: '#f1f1f199',
  883. },
  884. boundaryGap: false,
  885. data: [],
  886. },
  887. yAxis: {
  888. type: 'value',
  889. axisLine: {
  890. show: true,
  891. lineStyle: {
  892. color: '#006c9d',
  893. },
  894. },
  895. splitLine: { show: true, lineStyle: { color: 'rgba(21,80,126,.5)' } },
  896. axisLabel: {
  897. show: true,
  898. fontSize: 14,
  899. formatter: '{value}',
  900. color: '#0071A5',
  901. },
  902. min: 0,
  903. max: yMax, //武当沟
  904. name: 'Pa',
  905. nameTextStyle: {
  906. fontWeight: 600,
  907. fontSize: 13,
  908. },
  909. },
  910. series: [],
  911. });
  912. };
  913. export const initData1 = () => {
  914. const assistanceData = {
  915. '30': {
  916. angle: 0,
  917. Hz: 30.0, //频率
  918. a: -0.17624, //二次项系数
  919. b: 43.40947, //一次项系数
  920. c: 97.60705999999982, //常数项系数
  921. min: 93.0, //风量下限
  922. max: 171.0, //风量上限
  923. },
  924. '31': {
  925. angle: 0,
  926. Hz: 31.0,
  927. a: -0.17624,
  928. b: 43.427094,
  929. c: 95.43614590000016,
  930. min: 96.1,
  931. max: 174.4,
  932. },
  933. '32': {
  934. angle: 0,
  935. Hz: 32.0,
  936. a: -0.17624,
  937. b: 43.444718,
  938. c: 93.26435059999994,
  939. min: 99.2,
  940. max: 177.8,
  941. },
  942. '33': {
  943. angle: 0,
  944. Hz: 33.0,
  945. a: -0.17624,
  946. b: 43.462342,
  947. c: 91.09167409999964,
  948. min: 102.3,
  949. max: 180.2,
  950. },
  951. '34': {
  952. angle: 0,
  953. Hz: 34.0,
  954. a: -0.17624,
  955. b: 43.479966000000005,
  956. c: 88.91811639999969,
  957. min: 105.4,
  958. max: 182.0,
  959. },
  960. '35': {
  961. angle: 0,
  962. Hz: 35.0,
  963. a: -0.17624,
  964. b: 43.49759,
  965. c: 86.74367749999965,
  966. min: 108.5,
  967. max: 184.5,
  968. },
  969. '36': {
  970. angle: 0,
  971. Hz: 36.0,
  972. a: -0.17624,
  973. b: 43.515214,
  974. c: 84.56835739999997,
  975. min: 111.6,
  976. max: 187.0,
  977. },
  978. '37': {
  979. angle: 0,
  980. Hz: 37.0,
  981. a: -0.17624,
  982. b: 43.532838,
  983. c: 82.3921561000002,
  984. min: 114.7,
  985. max: 190.8,
  986. },
  987. '38': {
  988. angle: 0,
  989. Hz: 38.0,
  990. a: -0.17624,
  991. b: 43.550462,
  992. c: 80.21507359999941,
  993. min: 117.8,
  994. max: 193.0,
  995. },
  996. '39': {
  997. angle: 0,
  998. Hz: 39.0,
  999. a: -0.17624,
  1000. b: 43.568086,
  1001. c: 78.0371098999999,
  1002. min: 120.9,
  1003. max: 195.6,
  1004. },
  1005. '40': {
  1006. angle: 0,
  1007. Hz: 40.0,
  1008. a: -0.17624,
  1009. b: 43.58571,
  1010. c: 75.85826499999985,
  1011. min: 123.0,
  1012. max: 197.0,
  1013. },
  1014. '41': {
  1015. angle: 0,
  1016. Hz: 41.0,
  1017. a: -0.17624,
  1018. b: 43.603334,
  1019. c: 73.67853890000015,
  1020. min: 125.1,
  1021. max: 199.4,
  1022. },
  1023. '42': {
  1024. angle: 0,
  1025. Hz: 42.0,
  1026. a: -0.17624,
  1027. b: 43.620958,
  1028. c: 71.4979315999999,
  1029. min: 128.2,
  1030. max: 202.8,
  1031. },
  1032. '43': {
  1033. angle: 0,
  1034. Hz: 43.0,
  1035. a: -0.17624,
  1036. b: 43.638582,
  1037. c: 69.31644309999956,
  1038. min: 130.3,
  1039. max: 205.8,
  1040. },
  1041. '44': {
  1042. angle: 0,
  1043. Hz: 44.0,
  1044. a: -0.17624,
  1045. b: 43.656206000000005,
  1046. c: 67.13407339999958,
  1047. min: 132.4,
  1048. max: 208.5,
  1049. },
  1050. '45': {
  1051. angle: 0,
  1052. Hz: 45.0,
  1053. a: -0.17624,
  1054. b: 43.67383,
  1055. c: 64.9508224999995,
  1056. min: 134.5,
  1057. max: 211.8,
  1058. },
  1059. '46': {
  1060. angle: 0,
  1061. Hz: 46.0,
  1062. a: -0.17624,
  1063. b: 43.691454,
  1064. c: 62.76669039999979,
  1065. min: 136.6,
  1066. max: 214.4,
  1067. },
  1068. '47': {
  1069. angle: 0,
  1070. Hz: 47.0,
  1071. a: -0.17624,
  1072. b: 43.709078,
  1073. c: 60.58167709999998,
  1074. min: 138.7,
  1075. max: 217.8,
  1076. },
  1077. '48': {
  1078. angle: 0,
  1079. Hz: 48.0,
  1080. a: -0.17624,
  1081. b: 43.726702,
  1082. c: 58.39578259999962,
  1083. min: 140.8,
  1084. max: 219.2,
  1085. },
  1086. '49': {
  1087. angle: 0,
  1088. Hz: 49.0,
  1089. a: -0.17624,
  1090. b: 43.744326,
  1091. c: 56.20900689999962,
  1092. min: 143.9,
  1093. max: 221.6,
  1094. },
  1095. '50': {
  1096. angle: 0,
  1097. Hz: 50.0,
  1098. a: -0.17624,
  1099. b: 43.76195,
  1100. c: 54.021349999999984,
  1101. min: 146.0,
  1102. max: 223.0,
  1103. },
  1104. };
  1105. const num = 21;
  1106. const a = -0.17624; //-0.17624,
  1107. const m = 2770.6411125432646,
  1108. n = -124.15442010894235;
  1109. let i = 21;
  1110. const data = [];
  1111. for (const key in assistanceData) {
  1112. i -= 1;
  1113. const p = i;
  1114. const item = assistanceData[key];
  1115. item['b'] = 2 * a * (n + p);
  1116. item['c'] = a * (n + p) * (n + p) + m - i * 50;
  1117. // if (sysOrgCode == 'sdmtjtdltmk') {
  1118. // // 大柳塔井整体向右下移动
  1119. // item['min'] = item['min'] + 20;
  1120. // item['max'] = item['max'] + 20;
  1121. // item['b'] = 2 * a * (n + p) + 3;
  1122. // item['c'] = a * (n + p) * (n + p) + m - i * 60;
  1123. // } else {
  1124. // item['b'] = 2 * a * (n + p);
  1125. // item['c'] = a * (n + p) * (n + p) + m - i * 50;
  1126. // // //白家渠
  1127. // // a = -0.13424;
  1128. // // item['a'] = Math.round((a + 0.002 * (num - i)) * 10000) / 10000;
  1129. // // item['min'] = item['min'] + 50 + (num - i) * 2;
  1130. // // item['max'] = item['max'] + 65 + (num - i) * 3.5;
  1131. // // item['b'] = 2 * item['a'] * (n + p) + 8.8;
  1132. // // item['c'] = item['a'] * (n + p) * (n + p) + m - i * 60;
  1133. // // //武当沟
  1134. // // a = -0.17724;
  1135. // // item['a'] = Math.round((a - 0.002 * (num - i)) * 10000) / 10000;
  1136. // // item['min'] = item['min'] - 40 - (num - i) * 1;
  1137. // // item['max'] = item['max'] - 60 - (num - i) * 0.5;
  1138. // // item['b'] = 2 * item['a'] * (n + p) - 16.5;
  1139. // // item['c'] = item['a'] * (n + p) * (n + p) + m - i * 40;
  1140. // }
  1141. data.push(item);
  1142. }
  1143. console.log(data);
  1144. return data;
  1145. };
  1146. // 大柳塔武当沟
  1147. export const initData = (deviceType?) => {
  1148. const { sysOrgCode } = useGlobSetting();
  1149. // const sysOrgCode = 'yjmdhswmk';
  1150. if (sysOrgCode == 'sdmtjtdltmk') {
  1151. return initDataDlt(deviceType);
  1152. } else if (sysOrgCode == 'sdmtjtswmk') {
  1153. return initDataSw(deviceType);
  1154. } else if (sysOrgCode == 'sdmtjtbltmk') {
  1155. return initDataBlt();
  1156. } else if (sysOrgCode == 'sdmtjtbdmk') {
  1157. return initDataBd(deviceType);
  1158. } else if (sysOrgCode == 'sdmtjtjjmk') {
  1159. return initDataJj();
  1160. } else if (sysOrgCode == 'sdmtjtdltmkhjtj') {
  1161. return initDataHjt();
  1162. } else if (sysOrgCode == 'sdmtjtsgtmk') {
  1163. return initDataSgt();
  1164. } else if (sysOrgCode == 'sdmtjthlgmk') {
  1165. return initDataSgt();
  1166. } else if (sysOrgCode == 'sdmtjtyjlmk') {
  1167. return initDataJj();
  1168. } else if (sysOrgCode == 'sdmtjtcctrk') {
  1169. return initDataCctr();
  1170. } else if (sysOrgCode == 'sdmtjtwlmlmk') {
  1171. return initDataWlml();
  1172. } else if (sysOrgCode == 'sdmtjtltmk') {
  1173. return initDataLt();
  1174. } else if (sysOrgCode == 'sdtljtdhzmk') {
  1175. return initDataDhz();
  1176. } else if (sysOrgCode == 'yjmdhswmk') {
  1177. //海石湾
  1178. return initDataHsw();
  1179. } else {
  1180. return initData1();
  1181. }
  1182. };
  1183. // 柳塔
  1184. const initDataLt = () => {
  1185. const data: any[] = [];
  1186. data.push({
  1187. angle: -6,
  1188. Hz: -6,
  1189. a: -0.1154,
  1190. b: 17.723,
  1191. c: 2433.2,
  1192. min: 155,
  1193. max: 210,
  1194. });
  1195. data.push({
  1196. angle: -3,
  1197. Hz: -3,
  1198. a: -0.2064,
  1199. b: 57.303,
  1200. c: -1156.1,
  1201. min: 155,
  1202. max: 230,
  1203. });
  1204. data.push({
  1205. angle: 3,
  1206. Hz: 3,
  1207. a: -0.1228,
  1208. b: 35.838,
  1209. c: 541.83,
  1210. min: 155,
  1211. max: 266,
  1212. });
  1213. return data;
  1214. };
  1215. // 乌兰木伦
  1216. const initDataWlml = () => {
  1217. const data: any[] = [];
  1218. data.push({
  1219. angle: -3,
  1220. Hz: -3,
  1221. a: -15.607,
  1222. b: 6242.3,
  1223. c: -621571,
  1224. min: 204,
  1225. max: 212,
  1226. });
  1227. data.push({
  1228. angle: -2,
  1229. Hz: -2,
  1230. a: -8.3134,
  1231. b: 3178.9,
  1232. c: -300224,
  1233. min: 204,
  1234. max: 211,
  1235. });
  1236. data.push({
  1237. angle: 0,
  1238. Hz: 0,
  1239. a: -8.9632,
  1240. b: 3751.3,
  1241. c: -389068,
  1242. min: 216,
  1243. max: 227.2,
  1244. });
  1245. data.push({
  1246. angle: 1,
  1247. Hz: 1,
  1248. a: -12.77,
  1249. b: 5415.9,
  1250. c: -571193,
  1251. min: 216,
  1252. max: 226.8,
  1253. });
  1254. data.push({
  1255. angle: 2,
  1256. Hz: 2,
  1257. a: -12.432,
  1258. b: 5635.5,
  1259. c: -635361,
  1260. min: 234.5,
  1261. max: 242.4,
  1262. });
  1263. data.push({
  1264. angle: 3,
  1265. Hz: 3,
  1266. a: -2.9424,
  1267. b: 1147.7,
  1268. c: -104620,
  1269. min: 234.5,
  1270. max: 243.5,
  1271. });
  1272. return data;
  1273. };
  1274. // 石圪台
  1275. const initDataCctr = () => {
  1276. const data: any[] = [];
  1277. data.push({
  1278. angle: 0,
  1279. Hz: 0,
  1280. a: -0.0221,
  1281. b: -1.2494,
  1282. c: 552.28,
  1283. min: 52,
  1284. max: 125,
  1285. });
  1286. data.push({
  1287. angle: 3,
  1288. Hz: 3,
  1289. a: -0.0232,
  1290. b: -0.8204,
  1291. c: 603.39,
  1292. min: 50,
  1293. max: 139,
  1294. });
  1295. data.push({
  1296. angle: 6,
  1297. Hz: 6,
  1298. a: -0.0417,
  1299. b: 3.1004,
  1300. c: 498.9,
  1301. min: 45,
  1302. max: 150,
  1303. });
  1304. return data;
  1305. };
  1306. // 石圪台
  1307. const initDataSgt = () => {
  1308. const data: any[] = [];
  1309. data.push({
  1310. angle: -6,
  1311. Hz: -6,
  1312. a: -0.0438,
  1313. b: 14.5078,
  1314. c: 986.6,
  1315. min: 130,
  1316. max: 370,
  1317. });
  1318. data.push({
  1319. angle: -3,
  1320. Hz: -3,
  1321. a: -0.035,
  1322. b: 11.7875,
  1323. c: 1226.8,
  1324. min: 140,
  1325. max: 400,
  1326. });
  1327. data.push({
  1328. angle: 0,
  1329. Hz: 0,
  1330. a: -0.0354,
  1331. b: 13.6986,
  1332. c: 1078.6,
  1333. min: 150,
  1334. max: 430,
  1335. });
  1336. data.push({
  1337. angle: 3,
  1338. Hz: 3,
  1339. a: -0.0444,
  1340. b: 19.5673,
  1341. c: 504,
  1342. min: 170,
  1343. max: 445,
  1344. });
  1345. data.push({
  1346. angle: 6,
  1347. Hz: 6,
  1348. a: -0.0507,
  1349. b: 24.3336,
  1350. c: -70,
  1351. min: 190,
  1352. max: 460,
  1353. });
  1354. return data;
  1355. };
  1356. // 大柳塔白家渠
  1357. const initDataDlt = (deviceType?) => {
  1358. if (deviceType == 'fanmain_bjq') {
  1359. const num = 2;
  1360. const obj = {
  1361. angle: 0,
  1362. Hz: -0,
  1363. a: -0.0656,
  1364. b: 17.398283350755946,
  1365. c: 3241.38254718147,
  1366. min: 300,
  1367. max: 1100.0,
  1368. };
  1369. const a = -0.0656,
  1370. m = 17.398283350755946,
  1371. n = 3241.38254718147;
  1372. const maxList = [339.4, 359.4, 379.4, 399.4, 419.4];
  1373. const minList = [143, 152, 161, 170, 180];
  1374. const data = [];
  1375. for (let i = -2; i <= num; i++) {
  1376. const item = cloneDeep(obj);
  1377. item['Hz'] = 0 + i * 3;
  1378. item['c'] = n + 5 * i;
  1379. item['b'] = m + i * 2;
  1380. item['max'] = maxList[i + 2];
  1381. item['min'] = minList[i + 2];
  1382. data.push(item);
  1383. }
  1384. return data;
  1385. } else if (deviceType == 'fanmain_wdg') {
  1386. // 武当沟
  1387. const num = 2;
  1388. const obj = {
  1389. angle: 0,
  1390. Hz: -0,
  1391. a: -0.1424,
  1392. b: 26.316238660115914,
  1393. c: -370.62808803303426,
  1394. min: 300,
  1395. max: 1100.0,
  1396. };
  1397. const a = -0.1424,
  1398. m = 26.086238660115914,
  1399. n = -370.62808803303426;
  1400. const maxList = [138, 148, 158, 168, 178];
  1401. const minList = [90, 95, 100, 105, 110];
  1402. const data = [];
  1403. for (let i = -2; i <= num; i++) {
  1404. const item = cloneDeep(obj);
  1405. item['Hz'] = 0 + i * 3;
  1406. item['c'] = n + 1 * i;
  1407. item['b'] = m + i * 1.3;
  1408. item['max'] = maxList[i + 2];
  1409. item['min'] = minList[i + 2];
  1410. data.push(item);
  1411. }
  1412. return data;
  1413. }
  1414. };
  1415. const initDataSw = (deviceType?) => {
  1416. if (deviceType == 'fanmain_bfj') {
  1417. // 北风井
  1418. const num = 2;
  1419. const obj = {
  1420. angle: 0,
  1421. Hz: 0,
  1422. a: -0.2486,
  1423. b: 14.998999006593294,
  1424. c: 3672.488224167444,
  1425. min: 300,
  1426. max: 1100.0,
  1427. };
  1428. const a = -0.2486,
  1429. m = 14.998999006593294,
  1430. n = 3672.488224167444;
  1431. const maxList = [115.67, 130.67, 146.67, 165.67, 185.67];
  1432. const minList = [50, 60, 70, 85, 100];
  1433. const data = [];
  1434. for (let i = -2; i <= num; i++) {
  1435. const item = cloneDeep(obj);
  1436. item['Hz'] = 0 + i * 3;
  1437. item['c'] = n + 5 * i;
  1438. item['b'] = m + i * 8;
  1439. item['max'] = maxList[i + 2];
  1440. item['min'] = minList[i + 2];
  1441. data.push(item);
  1442. }
  1443. return data;
  1444. } else if (deviceType == 'fanmain_nfj') {
  1445. // 南风井
  1446. const num = 2;
  1447. const obj = {
  1448. angle: 0,
  1449. Hz: -0,
  1450. a: -0.0445,
  1451. b: 15.46559392987956,
  1452. c: 2607.959183673496,
  1453. min: 300,
  1454. max: 1100.0,
  1455. };
  1456. const a = -0.0455,
  1457. m = 15.46559392987956,
  1458. n = 2607.959183673496;
  1459. const maxList = [315, 345, 375, 410, 450, 500];
  1460. const minList = [90, 105, 120, 145, 170, 185];
  1461. const data = [];
  1462. for (let i = -3; i <= num; i++) {
  1463. const item = cloneDeep(obj);
  1464. item['Hz'] = 0 + i * 3;
  1465. item['a'] = Math.round((a - 0.003 * (num - i)) * 10000) / 10000;
  1466. item['c'] = n + 10 * i;
  1467. item['b'] = m + i * 1.2;
  1468. item['max'] = maxList[i + 3];
  1469. item['min'] = minList[i + 3];
  1470. data.push(item);
  1471. }
  1472. return data;
  1473. }
  1474. };
  1475. const initDataHjt = () => {
  1476. const data: any[] = [];
  1477. data.push({
  1478. angle: -10,
  1479. Hz: -10,
  1480. a: -0.0357,
  1481. b: 13.657,
  1482. c: 515.38,
  1483. min: 170,
  1484. max: 400,
  1485. });
  1486. data.push({
  1487. angle: -7,
  1488. Hz: -7,
  1489. a: -0.0371,
  1490. b: 15.478,
  1491. c: 452.43,
  1492. min: 170,
  1493. max: 400,
  1494. });
  1495. data.push({
  1496. angle: -5,
  1497. Hz: -5,
  1498. a: -0.0357,
  1499. b: 13.657,
  1500. c: 515.38,
  1501. min: 170,
  1502. max: 400,
  1503. });
  1504. data.push({
  1505. angle: -4,
  1506. Hz: -4,
  1507. a: -0.0361,
  1508. b: 16.706,
  1509. c: 228.85,
  1510. min: 170,
  1511. max: 400,
  1512. });
  1513. data.push({
  1514. angle: -2,
  1515. Hz: -2,
  1516. a: -0.0357,
  1517. b: 15.478,
  1518. c: 452.43,
  1519. min: 170,
  1520. max: 400,
  1521. });
  1522. data.push({
  1523. angle: 1,
  1524. Hz: 1,
  1525. a: -0.0361,
  1526. b: 16.706,
  1527. c: 228.85,
  1528. min: 170,
  1529. max: 400,
  1530. });
  1531. return data;
  1532. };
  1533. const initDataBd = (deviceType?) => {
  1534. if (deviceType == 'fanmain_ljy') {
  1535. // 刘家宴
  1536. const num = 2;
  1537. const obj = {
  1538. angle: 0,
  1539. Hz: 0,
  1540. a: -0.02674,
  1541. b: 10.070078367532346,
  1542. c: 3048.210229423783,
  1543. min: 300,
  1544. max: 1100.0,
  1545. };
  1546. const a = -0.02774,
  1547. m = 10.090078367532346,
  1548. n = 3988.210229423783;
  1549. const maxList = [370, 410, 450, 500, 560, 624];
  1550. const minList = [70, 80, 100, 130, 160, 210];
  1551. const data = [];
  1552. let index = 0;
  1553. for (let i = -3; i <= num; i++) {
  1554. ++index;
  1555. const item = cloneDeep(obj);
  1556. item['a'] = Math.round((a - 0.002 * (6 - index)) * 10000) / 10000;
  1557. item['Hz'] = 0 + i * 3;
  1558. item['c'] = n + 10 * i;
  1559. item['b'] = m + i * 1.3;
  1560. item['max'] = maxList[i + 3];
  1561. item['min'] = minList[i + 3];
  1562. data.push(item);
  1563. }
  1564. return data;
  1565. } else if (deviceType == 'fanmain_zl') {
  1566. // 枣庄
  1567. const num = 2;
  1568. const obj = {
  1569. angle: 0,
  1570. Hz: 0,
  1571. a: -0.02674,
  1572. b: 10.070078367532346,
  1573. c: 3048.210229423783,
  1574. min: 300,
  1575. max: 1100.0,
  1576. };
  1577. const a = -0.05874,
  1578. m = 17.090078367532346,
  1579. n = 3588.210229423783;
  1580. const maxList = [315, 344, 379, 415, 454];
  1581. const minList = [160, 170, 180, 190, 200, 210];
  1582. const data = [];
  1583. let index = 0;
  1584. for (let i = -2; i <= num; i++) {
  1585. ++index;
  1586. const item = cloneDeep(obj);
  1587. item['a'] = Math.round((a - 0.003 * (6 - index)) * 10000) / 10000;
  1588. item['Hz'] = 0 + i * 3;
  1589. item['c'] = n + 6 * i;
  1590. item['b'] = m + i * 1.9;
  1591. item['max'] = maxList[i + 2];
  1592. item['min'] = minList[i + 2];
  1593. data.push(item);
  1594. }
  1595. return data;
  1596. }
  1597. };
  1598. const initDataBlt = () => {
  1599. const num = 2;
  1600. const obj = {
  1601. angle: 0,
  1602. Hz: 0,
  1603. a: -0.02674,
  1604. b: 10.070078367532346,
  1605. c: 3048.210229423783,
  1606. min: 300,
  1607. max: 1100.0,
  1608. };
  1609. const a = -0.02874,
  1610. m = 10.070078367532346,
  1611. n = 3048.210229423783;
  1612. const maxList = [370, 400, 440, 480, 525, 580];
  1613. const minList = [70, 80, 100, 130, 160, 210];
  1614. const data = [];
  1615. let index = 0;
  1616. for (let i = -3; i <= num; i++) {
  1617. ++index;
  1618. const item = cloneDeep(obj);
  1619. item['a'] = Math.round((a - 0.002 * (6 - index)) * 10000) / 10000;
  1620. item['Hz'] = 0 + i * 3;
  1621. item['c'] = n + 10 * i;
  1622. item['b'] = m + i * 1;
  1623. item['max'] = maxList[i + 3];
  1624. item['min'] = minList[i + 3];
  1625. data.push(item);
  1626. }
  1627. return data;
  1628. };
  1629. const initDataJj = () => {
  1630. const num = 2;
  1631. const obj = {
  1632. angle: 0,
  1633. Hz: 0,
  1634. a: -0.02674,
  1635. b: 10.070078367532346,
  1636. c: 3048.210229423783,
  1637. min: 300,
  1638. max: 1100.0,
  1639. };
  1640. const a = -0.09874,
  1641. m = 21.090078367532346,
  1642. n = 3588.210229423783;
  1643. const maxList = [239, 264, 292, 322, 354];
  1644. const minList = [60, 70, 80, 90, 100, 110];
  1645. const data = [];
  1646. let index = 0;
  1647. for (let i = -2; i <= num; i++) {
  1648. ++index;
  1649. const item = cloneDeep(obj);
  1650. item['a'] = Math.round((a - 0.003 * (6 - index)) * 10000) / 10000;
  1651. item['Hz'] = 0 + i * 3;
  1652. item['c'] = n + 10 * i;
  1653. item['b'] = m + i * 3;
  1654. item['max'] = maxList[i + 2];
  1655. item['min'] = minList[i + 2];
  1656. data.push(item);
  1657. }
  1658. return data;
  1659. };
  1660. const initDataDhz = () => {
  1661. const data: any[] = [];
  1662. data.push({
  1663. Hz: 30,
  1664. a: -0.1686,
  1665. b: 74.953,
  1666. c: -4655.7,
  1667. min: 203,
  1668. max: 360,
  1669. });
  1670. data.push({
  1671. Hz: 40,
  1672. a: -0.1568,
  1673. b: 58.594,
  1674. c: -1986.9,
  1675. min: 213,
  1676. max: 325,
  1677. });
  1678. data.push({
  1679. Hz: 50,
  1680. a: -0.1607,
  1681. b: 68.39,
  1682. c: -4642.5,
  1683. min: 210,
  1684. max: 330,
  1685. });
  1686. // data.push({
  1687. // Hz: 30,
  1688. // a: -0.1407,
  1689. // b: 62.142,
  1690. // c: -3297.7,
  1691. // min: 218,
  1692. // max: 370,
  1693. // });
  1694. // data.push({
  1695. // Hz: 40,
  1696. // a: -0.1551,
  1697. // b: 58.661,
  1698. // c: -1968.9,
  1699. // min: 238,
  1700. // max: 338,
  1701. // });
  1702. // data.push({
  1703. // Hz: 50,
  1704. // a: -0.1823,
  1705. // b: 81.988,
  1706. // c: -6525.7,
  1707. // min: 240,
  1708. // max: 338,
  1709. // });
  1710. return data;
  1711. };
  1712. const initDataHsw = () => {
  1713. const data: any[] = [];
  1714. data.push({
  1715. Hz: 50,
  1716. a: -0.0704,
  1717. b: 6.9552,
  1718. c: 4596.9,
  1719. min: 80,
  1720. max: 300,
  1721. });
  1722. return data;
  1723. };
  1724. export const fanInfoData = reactive({
  1725. fj: '一号回风井',
  1726. xh: 'FBCDZ No.29',
  1727. gl: '2×500',
  1728. edgl: '740',
  1729. eddy: '10000',
  1730. eddl: '38.4',
  1731. flfw: '110~260',
  1732. fyfw: '200~4100',
  1733. fbdj: 'ExdI',
  1734. ccrq: '2010.07',
  1735. sccj: '南阳防爆',
  1736. tjfs: '变频调节',
  1737. plfw: '30~50',
  1738. });
  1739. export const fanInfo = [
  1740. {
  1741. title: '风井',
  1742. code: 'windWell_mainFanInfo',
  1743. value: '一号回风井',
  1744. },
  1745. {
  1746. title: '型号',
  1747. code: 'modelType_mainFanInfo',
  1748. value: 'FBCDZ No.29',
  1749. },
  1750. {
  1751. title: '功率(kW)',
  1752. code: 'powerRating_mainFanInfo',
  1753. value: '2×500',
  1754. },
  1755. {
  1756. title: '额定转速(r/min)',
  1757. code: 'ratedSpeed_mainFanInfo',
  1758. value: '740',
  1759. },
  1760. {
  1761. title: '额定电压(V)',
  1762. code: 'ratedVoltage_mainFanInfo',
  1763. value: '10000',
  1764. },
  1765. {
  1766. title: '额定电流(A)',
  1767. code: 'ratedCurrent_mainFanInfo',
  1768. value: '38.4',
  1769. },
  1770. {
  1771. title: '风量范围(m³/s)',
  1772. code: 'airflowRange_mainFanInfo',
  1773. value: '110~260',
  1774. },
  1775. {
  1776. title: '风压范围(Pa)',
  1777. code: 'pressureRange_mainFanInfo',
  1778. value: '200~4100',
  1779. },
  1780. {
  1781. title: '防爆等级',
  1782. code: 'explosionProofRating_mainFanInfo',
  1783. value: 'ExdI',
  1784. },
  1785. {
  1786. title: '出厂日期',
  1787. code: 'manufactureDate_mainFanInfo',
  1788. value: '2010.07',
  1789. },
  1790. {
  1791. title: '生产厂家',
  1792. code: 'manufacturer_mainFanInfo',
  1793. value: '南阳防爆',
  1794. },
  1795. {
  1796. title: '调节方式',
  1797. code: 'adjustmentMethod_mainFanInfo',
  1798. value: '变频调节',
  1799. },
  1800. {
  1801. title: '频率可调范围(Hz)',
  1802. code: 'angleAdjustableRange_mainFanInfo',
  1803. value: '30~50',
  1804. },
  1805. ];
  1806. export const getSchamas = (): FormSchema[] => {
  1807. return [
  1808. {
  1809. field: 'fj',
  1810. component: 'Input',
  1811. label: '风井',
  1812. colProps: {
  1813. span: 6,
  1814. },
  1815. },
  1816. {
  1817. field: 'xh',
  1818. component: 'Input',
  1819. label: '型号',
  1820. colProps: {
  1821. span: 6,
  1822. },
  1823. },
  1824. {
  1825. field: 'gl',
  1826. component: 'Input',
  1827. label: '功率(kW)',
  1828. colProps: {
  1829. span: 6,
  1830. },
  1831. },
  1832. {
  1833. field: 'edgl',
  1834. component: 'Input',
  1835. label: '额定转速(r/min)',
  1836. colProps: {
  1837. span: 6,
  1838. },
  1839. },
  1840. {
  1841. field: 'eddy',
  1842. component: 'Input',
  1843. label: '额定电压(V)',
  1844. colProps: {
  1845. span: 6,
  1846. },
  1847. },
  1848. {
  1849. field: 'eddl',
  1850. component: 'Input',
  1851. label: '额定电流(A)',
  1852. colProps: {
  1853. span: 6,
  1854. },
  1855. },
  1856. {
  1857. field: 'flfw',
  1858. component: 'Input',
  1859. label: '风量范围(m³/s)',
  1860. colProps: {
  1861. span: 6,
  1862. },
  1863. },
  1864. {
  1865. field: 'fyfw',
  1866. component: 'Input',
  1867. label: '风压范围(Pa)',
  1868. colProps: {
  1869. span: 6,
  1870. },
  1871. },
  1872. {
  1873. field: 'fbdj',
  1874. component: 'Select',
  1875. label: '防爆等级',
  1876. colProps: {
  1877. span: 6,
  1878. },
  1879. componentProps: {
  1880. options: [
  1881. {
  1882. label: 'ExdI',
  1883. value: 'ExdI',
  1884. key: '1',
  1885. },
  1886. ],
  1887. },
  1888. },
  1889. {
  1890. field: 'ccrq',
  1891. component: 'Input',
  1892. label: '出厂日期',
  1893. colProps: {
  1894. span: 6,
  1895. },
  1896. },
  1897. {
  1898. field: 'sccj',
  1899. component: 'Input',
  1900. label: '生产厂家',
  1901. colProps: {
  1902. span: 6,
  1903. },
  1904. },
  1905. {
  1906. field: 'tjfs',
  1907. component: 'Select',
  1908. label: '调节方式',
  1909. colProps: {
  1910. span: 6,
  1911. },
  1912. componentProps: {
  1913. options: [
  1914. {
  1915. label: '变频调节',
  1916. value: '变频调节',
  1917. key: '1',
  1918. },
  1919. ],
  1920. },
  1921. },
  1922. {
  1923. field: 'plfw',
  1924. component: 'Input',
  1925. label: '频率可调范围(Hz)',
  1926. colProps: {
  1927. span: 6,
  1928. },
  1929. },
  1930. ];
  1931. };
  1932. export const getSchamas1 = (): FormSchema[] => {
  1933. return [
  1934. {
  1935. field: 'Hz',
  1936. component: 'InputNumber',
  1937. label: '频率(Hz)',
  1938. required: true,
  1939. colProps: {
  1940. span: 6,
  1941. },
  1942. },
  1943. {
  1944. field: 'a',
  1945. component: 'InputNumber',
  1946. label: '二次项系数',
  1947. required: true,
  1948. colProps: {
  1949. span: 6,
  1950. },
  1951. },
  1952. {
  1953. field: 'b',
  1954. component: 'InputNumber',
  1955. label: '一次项系数',
  1956. required: true,
  1957. colProps: {
  1958. span: 6,
  1959. },
  1960. },
  1961. {
  1962. field: 'c',
  1963. component: 'InputNumber',
  1964. label: '常数项系数',
  1965. required: true,
  1966. colProps: {
  1967. span: 6,
  1968. },
  1969. },
  1970. {
  1971. field: 'min',
  1972. component: 'InputNumber',
  1973. label: '风量下限(m³/s)',
  1974. required: true,
  1975. colProps: {
  1976. span: 6,
  1977. },
  1978. },
  1979. {
  1980. field: 'max',
  1981. component: 'InputNumber',
  1982. label: '风量上限(m³/s)',
  1983. required: true,
  1984. colProps: {
  1985. span: 6,
  1986. },
  1987. },
  1988. ];
  1989. };
  1990. export const lineFormData = reactive({
  1991. Hz: null,
  1992. a: null,
  1993. b: null,
  1994. c: null,
  1995. min: null,
  1996. max: null,
  1997. });
  1998. const componentsCaches = new Map<string, any>();
  1999. export function getModelComponent(is2DModel: boolean = false, modalTyoe: string = '') {
  2000. if (!is2DModel) return EntryThree;
  2001. // @ts-ignore
  2002. return defineAsyncComponent(() => {
  2003. // 为了支持SVG组件切换时不闪烁,先行下载并缓存
  2004. if (!componentsCaches.has('mainFanSVG')) componentsCaches.set('mainFanSVG', import('./components/mainFanSVG.vue'));
  2005. if (!componentsCaches.has('mainFanXJSVG')) componentsCaches.set('mainFanXJSVG', import('./components/mainFanXJSVG.vue'));
  2006. switch (modalTyoe) {
  2007. case 'lijing':
  2008. return componentsCaches.get('mainFanSVG');
  2009. case 'xiejing':
  2010. return componentsCaches.get('mainFanXJSVG');
  2011. case 'lijing1':
  2012. //立井(风筒竖直)
  2013. return componentsCaches.get('mainFanSVG');
  2014. case 'lijing_3':
  2015. //立井(3个井筒)
  2016. return componentsCaches.get('mainFanSVG');
  2017. case 'lijing_1':
  2018. //立井(1个风筒)
  2019. return componentsCaches.get('mainFanSVG');
  2020. default:
  2021. return componentsCaches.get('mainFanSVG');
  2022. }
  2023. });
  2024. }