device.data.ts 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. import { defineAsyncComponent } from 'vue';
  2. import { BasicColumn } from '/@/components/Table';
  3. import { useGlobSetting } from '/@/hooks/setting';
  4. export const chartsColumns = (deviceType) => {
  5. if (deviceType === '') {
  6. return [];
  7. }
  8. };
  9. export const locationList = [
  10. {
  11. title: '风门',
  12. deviceType: 'gate',
  13. isVisible: 0,
  14. },
  15. {
  16. title: '风窗',
  17. deviceType: 'gate1',
  18. isVisible: 0,
  19. },
  20. {
  21. title: '测风装置',
  22. deviceType: 'gate2',
  23. isVisible: 0,
  24. },
  25. {
  26. title: '传感器',
  27. deviceType: 'gate3',
  28. isVisible: 0,
  29. },
  30. {
  31. title: '局部风机',
  32. deviceType: 'gate4',
  33. isVisible: 0,
  34. },
  35. {
  36. title: '主风机',
  37. deviceType: 'gate5',
  38. isVisible: 0,
  39. },
  40. {
  41. title: '风筒',
  42. deviceType: 'gate6',
  43. isVisible: 0,
  44. },
  45. {
  46. title: '密闭墙',
  47. deviceType: 'gate7',
  48. isVisible: 0,
  49. },
  50. ];
  51. export function getMonitorComponent() {
  52. const { sysOrgCode } = useGlobSetting();
  53. let FiberModal;
  54. switch (sysOrgCode) {
  55. case 'sdmtjthlgmk': //哈拉沟
  56. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.vue'));
  57. break;
  58. // case 'sdmtjtbetmk': // 布尔台
  59. // case 'sdmtjtbdmk': // 保德
  60. // case 'sdmtjtbltmk': // 补连塔
  61. default:
  62. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal1.vue'));
  63. }
  64. const BundleModal = defineAsyncComponent(() => import('./modal/bundle.modal.vue'));
  65. const DustModal = defineAsyncComponent(() => import('./modal/dust.modal.vue'));
  66. const BallvalveModal = defineAsyncComponent(() => import('./modal/ballvalve.modal.vue'));
  67. return { FiberModal, BundleModal, DustModal, BallvalveModal };
  68. }
  69. // export const searchFormSchema: FormSchema[] = [
  70. // {
  71. // label: '查询日期',
  72. // field: 'tData',
  73. // component: 'DatePicker',
  74. // defaultValue: dayjs(),
  75. // componentProps: {
  76. // valueFormat: 'YYYY-MM-DD',
  77. // },
  78. // },
  79. // {
  80. // label: '时间区间',
  81. // field: 'tickectDate',
  82. // component: 'TimeRangePicker',
  83. // componentProps: {
  84. // placeholder: ['开始时间', '结束时间'],
  85. // valueFormat: 'HH:mm:ss',
  86. // },
  87. // },
  88. // {
  89. // label: '设备类型',
  90. // field: 'gdeviceid',
  91. // component: 'ApiSelect',
  92. // componentProps: {
  93. // api: props.deviceListApi,
  94. // resultField: 'records',
  95. // labelField: 'strname',
  96. // valueField: 'id',
  97. // },
  98. // },
  99. // {
  100. // label: '间隔时间',
  101. // field: 'skip',
  102. // component: 'Select',
  103. // componentProps: {
  104. // options: [
  105. // {
  106. // label: '5秒',
  107. // value: '1',
  108. // },
  109. // {
  110. // label: '10秒',
  111. // value: '2',
  112. // },
  113. // {
  114. // label: '1分钟',
  115. // value: '3',
  116. // },
  117. // {
  118. // label: '5分钟',
  119. // value: '4',
  120. // },
  121. // {
  122. // label: '10分钟',
  123. // value: '5',
  124. // },
  125. // ],
  126. // },
  127. // },
  128. // ];
  129. export const majorColumns: BasicColumn[] = [
  130. {
  131. title: '序号',
  132. dataIndex: '',
  133. key: 'rowIndex',
  134. width: 60,
  135. align: 'center',
  136. customRender: ({ index }) => {
  137. return `${index}`;
  138. },
  139. },
  140. {
  141. title: '测段名称',
  142. align: 'center',
  143. dataIndex: 'name',
  144. width: 110,
  145. },
  146. {
  147. title: '始点',
  148. children: [
  149. {
  150. title: '测点位置',
  151. align: 'center',
  152. dataIndex: 'name1',
  153. width: 140,
  154. },
  155. {
  156. title: '风压(Pa)',
  157. align: 'center',
  158. dataIndex: 'pressure1',
  159. width: 100,
  160. },
  161. // {
  162. // title:'风压(KPa)',
  163. // align:"center",
  164. // dataIndex: 'name1'
  165. // },
  166. {
  167. title: '密度(kg/m³)',
  168. align: 'center',
  169. dataIndex: 'density1',
  170. width: 100,
  171. },
  172. {
  173. title: '标高(m)',
  174. align: 'center',
  175. dataIndex: 'elevation1',
  176. width: 100,
  177. },
  178. ],
  179. },
  180. {
  181. title: '末点',
  182. children: [
  183. {
  184. title: '测点位置',
  185. align: 'center',
  186. dataIndex: 'name2',
  187. width: 140,
  188. },
  189. {
  190. title: '风压(Pa)',
  191. align: 'center',
  192. dataIndex: 'pressure2',
  193. width: 100,
  194. },
  195. // {
  196. // title:'风压(KPa)',
  197. // align:"center",
  198. // dataIndex: 'name1'
  199. // },
  200. {
  201. title: '密度(kg/m³)',
  202. align: 'center',
  203. dataIndex: 'density2',
  204. width: 100,
  205. },
  206. {
  207. title: '标高(m)',
  208. align: 'center',
  209. dataIndex: 'elevation2',
  210. width: 100,
  211. },
  212. ],
  213. },
  214. {
  215. title: '风量(m³/min)',
  216. align: 'center',
  217. dataIndex: 'm3',
  218. width: 110,
  219. },
  220. {
  221. title: '阻力(Pa)',
  222. align: 'center',
  223. dataIndex: 'drag',
  224. width: 100,
  225. },
  226. {
  227. title: '风阻(Ns²/m⁸)',
  228. align: 'center',
  229. dataIndex: 'wdrag',
  230. width: 110,
  231. },
  232. {
  233. title: '更新时间',
  234. dataIndex: 'datatime',
  235. align: 'center',
  236. width: 127,
  237. },
  238. ];
  239. export const surfaceChartsColumns = [
  240. {
  241. legend: '进风',
  242. seriesName: '(m³/min)',
  243. ymax: 5000,
  244. yname: 'm³/min',
  245. linetype: 'line',
  246. yaxispos: 'left',
  247. color: '#00FFA8',
  248. sort: 1,
  249. xRotate: 0,
  250. dataIndex: 'jin',
  251. },
  252. {
  253. legend: '回风',
  254. seriesName: '',
  255. ymax: 5000,
  256. yname: 'm³/min',
  257. linetype: 'line',
  258. yaxispos: 'left',
  259. color: '#F07070',
  260. sort: 1,
  261. xRotate: 0,
  262. dataIndex: 'hui',
  263. },
  264. ];
  265. export const ballvalveColumns: BasicColumn[] = [
  266. {
  267. title: '设备编号',
  268. dataIndex: 'deviceNum',
  269. width: 60,
  270. align: 'center',
  271. },
  272. {
  273. title: '温度(℃)',
  274. dataIndex: 'tempRealtime',
  275. align: 'center',
  276. width: 60,
  277. },
  278. {
  279. title: 'CO(ppm)',
  280. dataIndex: 'CORealtime',
  281. align: 'center',
  282. width: 50,
  283. },
  284. {
  285. title: '压力(Pa)',
  286. dataIndex: 'PressureRealtime',
  287. align: 'center',
  288. width: 50,
  289. },
  290. {
  291. title: '烟雾(%)',
  292. dataIndex: 'SmokeRealtime485',
  293. align: 'center',
  294. width: 50,
  295. },
  296. {
  297. title: '是否报警',
  298. dataIndex: 'isWarn',
  299. align: 'center',
  300. width: 50,
  301. // customRender: () => {
  302. // return `正常`;
  303. // },
  304. },
  305. ];
  306. export const noDetailArr = ['nitrogen', 'forcFan']; // 前端详情的,
  307. export const haveDetailArr = [
  308. 'windrect',
  309. 'window',
  310. 'gate',
  311. 'fanlocal',
  312. 'fanmain',
  313. 'fiber',
  314. 'bundletube',
  315. // 'dusting',
  316. 'ballvalve',
  317. 'pump',
  318. 'safetymonitor',
  319. 'nitrogen',
  320. ];
  321. export const haveHandlerArr = ['windrect', 'window', 'gate', 'fanlocal', 'fanmain', 'pump', 'obfurage', 'nitrogen', 'pulping', 'spray', 'dustdev']; // table无操作
  322. export const noWarningArr = ['location', 'vehicle', 'cheliang']; // 无预警详情的
  323. export const haveSysDetailArr = ['']; //有场景详情的
  324. export const noHistoryArr = () => (History_Type['type'] == 'remote' ? ['surface_history'] : []);