1
0

safety.data.ts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. import { safetyDeviceList } from './safety.api';
  2. import { BasicColumn } from '/@/components/Table';
  3. import {reactive} from 'vue'
  4. export const warnHistoryColumns: BasicColumn[] = [
  5. {
  6. title: '序号',
  7. width: 60,
  8. align: 'center',
  9. customRender: ({ index }: { index: number }) => `${index + 1}`
  10. },
  11. {
  12. title: '安装位置',
  13. dataIndex: 'installLocation',
  14. key: 'installLocation',
  15. align: 'center',
  16. ellipsis: true,
  17. },
  18. {
  19. title: '报警类型',
  20. dataIndex: 'exceptionTypeC',
  21. key: 'exceptionTypeC',
  22. align: 'center',
  23. ellipsis: true,
  24. },
  25. {
  26. title: '报警原因',
  27. dataIndex: 'exceptionReason',
  28. key: 'exceptionReason',
  29. align: 'center',
  30. ellipsis: true,
  31. },
  32. {
  33. title: '开始报警时间',
  34. dataIndex: 'exceptionStartTime',
  35. key: 'exceptionStartTime',
  36. align: 'center',
  37. ellipsis: true,
  38. },
  39. {
  40. title: '结束报警时间',
  41. dataIndex: 'exceptionEndTime',
  42. key: 'exceptionEndTime',
  43. align: 'center',
  44. ellipsis: true,
  45. },
  46. {
  47. title: '是否完成',
  48. dataIndex: 'isCompletedC',
  49. key: 'isCompletedC',
  50. align: 'center',
  51. ellipsis: true,
  52. },
  53. ]
  54. export let exceptionTypeList = [
  55. { label: '超限报警', value: '001' },
  56. { label: '断电报警', value: '002' },
  57. { label: '馈电异常', value: '003' },
  58. { label: '传感器断线', value: '004' },
  59. { label: '基站断电', value: '005' },
  60. { label: '基站不通', value: '006' },
  61. { label: '标校', value: '007' },
  62. { label: '超量程', value: '008' },
  63. ]
  64. export let isCompletedList = [
  65. { label: '是', value: 1 },
  66. { label: '否', value: 0 },
  67. ]
  68. //分页参数配置
  69. export let pagination = reactive({
  70. current: 1, // 当前页码
  71. pageSize: 10, // 每页显示条数
  72. total: 0, // 总条目数,后端返回
  73. // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
  74. showSizeChanger: true, // 是否可改变每页显示条数
  75. pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
  76. })
  77. export const chartsColumns = (deviceType) => {
  78. if (deviceType === '') {
  79. return [];
  80. }
  81. };
  82. export const formConfig = {
  83. labelAlign: 'left',
  84. showAdvancedButton: false,
  85. showResetButton: false,
  86. showSubmitButton: false,
  87. schemas: [
  88. {
  89. label: '设备类型',
  90. field: 'dataTypeName',
  91. component: 'ApiSelect',
  92. componentProps: {
  93. api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
  94. labelField: 'name',
  95. valueField: 'code',
  96. },
  97. },
  98. {
  99. label: '设备安装地点',
  100. field: 'strinstallpos',
  101. component: 'Input',
  102. },
  103. ],
  104. };
  105. //测风装置
  106. export const chartsColumnsRect = [
  107. {
  108. legend: '风量',
  109. seriesName: '(m³/min)',
  110. ymax: 10000,
  111. yname: 'm³/min',
  112. linetype: 'bar',
  113. yaxispos: 'left',
  114. color: '#37BCF2',
  115. sort: 1,
  116. xRotate: 0,
  117. dataIndex: 'm³',
  118. },
  119. {
  120. legend: '气源压力',
  121. seriesName: '(MPa)',
  122. ymax: 50,
  123. yname: 'MPa',
  124. linetype: 'line',
  125. yaxispos: 'right',
  126. color: '#FC4327',
  127. sort: 2,
  128. xRotate: 0,
  129. dataIndex: 'sourcePressure',
  130. },
  131. ];
  132. //局部风机
  133. export const chartsColumnsFan = [
  134. {
  135. legend: '风筒风量1',
  136. seriesName: '(m³/min)',
  137. ymax: 1000,
  138. yname: 'm³/min',
  139. linetype: 'bar',
  140. yaxispos: 'left',
  141. color: '#37BCF2',
  142. sort: 1,
  143. xRotate: 0,
  144. dataIndex: 'windQuantity1',
  145. },
  146. {
  147. legend: '风筒风量2',
  148. seriesName: '(m³/min)',
  149. ymax: 1000,
  150. yname: 'm³/min',
  151. linetype: 'line',
  152. yaxispos: 'right',
  153. color: '#FC4327',
  154. sort: 2,
  155. xRotate: 0,
  156. dataIndex: 'windQuantity2',
  157. },
  158. ];
  159. //主风
  160. export const chartsColumnsMain = [
  161. {
  162. legend: '风量',
  163. seriesName: '(m³/min)',
  164. ymax: 1000,
  165. yname: 'm³/min',
  166. linetype: 'bar',
  167. yaxispos: 'left',
  168. color: '#37BCF2',
  169. sort: 1,
  170. xRotate: 0,
  171. dataIndex: 'windQuantity1',
  172. },
  173. {
  174. legend: '频率',
  175. seriesName: '(Hz)',
  176. ymax: 1000,
  177. yname: 'Hz',
  178. linetype: 'line',
  179. yaxispos: 'right',
  180. color: '#FC4327',
  181. sort: 2,
  182. xRotate: 0,
  183. dataIndex: 'windQuantity2',
  184. },
  185. ];
  186. //光钎测温
  187. export const chartsColumnsFiber = [
  188. {
  189. legend: '最高温度',
  190. seriesName: '(°C)',
  191. ymax: 100,
  192. yname: '°C',
  193. linetype: 'bar',
  194. yaxispos: 'left',
  195. color: '#37BCF2',
  196. sort: 1,
  197. xRotate: 0,
  198. dataIndex: 'fmax',
  199. },
  200. {
  201. legend: '平均温度',
  202. seriesName: '(°C)',
  203. ymax: 100,
  204. yname: '°C',
  205. linetype: 'line',
  206. yaxispos: 'right',
  207. color: '#FC4327',
  208. sort: 2,
  209. xRotate: 0,
  210. dataIndex: 'favg',
  211. },
  212. ];
  213. //密闭
  214. export const chartsColumnsObf = [
  215. {
  216. legend: '温度',
  217. seriesName: '(°C)',
  218. ymax: 100,
  219. yname: '°C',
  220. linetype: 'bar',
  221. yaxispos: 'left',
  222. color: '#37BCF2',
  223. sort: 1,
  224. xRotate: 0,
  225. dataIndex: 'temperature',
  226. },
  227. {
  228. legend: 'O2浓度',
  229. seriesName: '(%)',
  230. ymax: 100,
  231. yname: '%',
  232. linetype: 'line',
  233. yaxispos: 'right',
  234. color: '#FC4327',
  235. sort: 2,
  236. xRotate: 0,
  237. dataIndex: 'o2val',
  238. },
  239. ];
  240. //束管
  241. export const chartsColumnsBun = [
  242. {
  243. legend: 'CO浓度',
  244. seriesName: '(%)',
  245. ymax: 100,
  246. yname: '%',
  247. linetype: 'bar',
  248. yaxispos: 'left',
  249. color: '#37BCF2',
  250. sort: 1,
  251. xRotate: 0,
  252. dataIndex: 'coval',
  253. },
  254. {
  255. legend: 'CO2浓度',
  256. seriesName: '(%)',
  257. ymax: 100,
  258. yname: '%',
  259. linetype: 'line',
  260. yaxispos: 'right',
  261. color: '#FC4327',
  262. sort: 2,
  263. xRotate: 0,
  264. dataIndex: 'co2val',
  265. },
  266. ];
  267. export const chartsColumnsreal = [
  268. {
  269. legend: '压差',
  270. seriesName: '(Pa)',
  271. ymax: 100,
  272. yname: 'Pa',
  273. linetype: 'bar',
  274. yaxispos: 'left',
  275. color: '#37BCF2',
  276. sort: 1,
  277. xRotate: 0,
  278. dataIndex: 'frontRearDP',
  279. },
  280. {
  281. legend: '气源压力',
  282. seriesName: '(MPa)',
  283. ymax: 50,
  284. yname: 'MPa',
  285. linetype: 'line',
  286. yaxispos: 'right',
  287. color: '#FC4327',
  288. sort: 2,
  289. xRotate: 0,
  290. dataIndex: 'sourcePressure',
  291. },
  292. ];
  293. export const isHaveNoAction = ['safetymonitor', 'wasichoufang', 'atomizing', ''];