gate.data.ts 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. import { defineAsyncComponent } from 'vue';
  2. import { BasicColumn } from '/@/components/Table';
  3. import { FormSchema } from '/@/components/Table';
  4. import { rules } from '/@/utils/helper/validator';
  5. import EntryThree from './components/entryThree.vue';
  6. export const columns: BasicColumn[] = [
  7. {
  8. title: '名称',
  9. dataIndex: 'strname',
  10. width: 120,
  11. },
  12. {
  13. title: '安装位置',
  14. dataIndex: 'strinstallpos',
  15. width: 100,
  16. },
  17. {
  18. title: '是否为常闭型',
  19. dataIndex: 'bnormalclose',
  20. width: 100,
  21. // customRender: render.renderAvatar,
  22. },
  23. {
  24. title: '净宽',
  25. dataIndex: 'fclearwidth',
  26. width: 80,
  27. },
  28. {
  29. title: '净高',
  30. dataIndex: 'fclearheight',
  31. width: 100,
  32. },
  33. {
  34. title: '风门道数',
  35. dataIndex: 'ndoorcount',
  36. width: 100,
  37. },
  38. {
  39. title: '所属分站',
  40. width: 150,
  41. dataIndex: 'stationname',
  42. },
  43. {
  44. title: '点表',
  45. width: 100,
  46. dataIndex: 'strtype',
  47. },
  48. {
  49. title: '监测类型',
  50. dataIndex: 'monitorflag',
  51. width: 100,
  52. },
  53. {
  54. title: '是否模拟数据',
  55. dataIndex: 'testflag',
  56. width: 100,
  57. },
  58. ];
  59. export const recycleColumns: BasicColumn[] = [
  60. {
  61. title: '名称',
  62. dataIndex: 'strname',
  63. width: 100,
  64. },
  65. {
  66. title: '是否为常闭型',
  67. dataIndex: 'bnormalclose',
  68. width: 100,
  69. },
  70. ];
  71. //风门故障统计分析
  72. export const faultColumns: BasicColumn[] = [
  73. {
  74. title: '安装位置',
  75. dataIndex: 'strInstallPos',
  76. align: 'center',
  77. },
  78. {
  79. title: '设备名称',
  80. dataIndex: 'strName',
  81. align: 'center',
  82. },
  83. {
  84. title: '是否开启统计',
  85. dataIndex: 'status',
  86. align: 'center',
  87. },
  88. {
  89. title: '总成功次数',
  90. dataIndex: 'totalSuccess',
  91. align: 'center',
  92. },
  93. {
  94. title: '总故障次数',
  95. dataIndex: 'totalFail',
  96. align: 'center',
  97. },
  98. {
  99. title: '自动开闭成功次数',
  100. dataIndex: 'successByAuto',
  101. align: 'center',
  102. },
  103. {
  104. title: '开关未到位故障次数',
  105. dataIndex: 'failBySwitch',
  106. align: 'center',
  107. },
  108. {
  109. title: '气源压力不足故障次数',
  110. dataIndex: 'failByPressure',
  111. align: 'center',
  112. },
  113. {
  114. title: '网络断开故障次数',
  115. dataIndex: 'failByNetwork',
  116. align: 'center',
  117. },
  118. ];
  119. //风门状态
  120. export let typeList: any[] = [
  121. { label: '正常开闭', value: '0' },
  122. { label: '无法关闭', value: '1' },
  123. ];
  124. //车辆损坏排查
  125. export const carColumns: BasicColumn[] = [
  126. {
  127. title: '安装位置',
  128. dataIndex: 'gateInstallPos',
  129. align: 'center',
  130. },
  131. {
  132. title: '状态',
  133. dataIndex: 'type',
  134. align: 'center',
  135. },
  136. {
  137. title: '车辆编号',
  138. dataIndex: 'carNo',
  139. align: 'center',
  140. },
  141. {
  142. title: '车与门的距离',
  143. dataIndex: 'distance',
  144. align: 'center',
  145. },
  146. {
  147. title: '抓拍图像',
  148. dataIndex: 'photoC',
  149. align: 'center',
  150. },
  151. {
  152. title: '抓拍时间',
  153. dataIndex: 'captureTime',
  154. align: 'center',
  155. },
  156. ];
  157. export const searchFormSchema: FormSchema[] = [
  158. {
  159. label: '名称',
  160. field: 'strname',
  161. component: 'Input',
  162. colProps: { span: 6 },
  163. },
  164. {
  165. label: '安装位置',
  166. field: 'strinstallpos',
  167. component: 'Input',
  168. colProps: { span: 6 },
  169. },
  170. {
  171. label: '是否为常闭型',
  172. field: 'bnormalclose',
  173. component: 'JDictSelectTag',
  174. componentProps: {
  175. dictCode: 'user_status',
  176. placeholder: '请选择读写类型',
  177. stringToNumber: true,
  178. },
  179. colProps: { span: 6 },
  180. },
  181. ];
  182. export const formSchema: FormSchema[] = [
  183. {
  184. label: '',
  185. field: 'id',
  186. component: 'Input',
  187. show: false,
  188. },
  189. {
  190. label: '名称',
  191. field: 'strname',
  192. component: 'Input',
  193. },
  194. {
  195. label: '安装位置',
  196. field: 'strinstallpos',
  197. component: 'Input',
  198. },
  199. {
  200. label: '是否为常闭型',
  201. field: 'bnormalclose',
  202. component: 'RadioGroup',
  203. defaultValue: 1,
  204. componentProps: () => {
  205. return {
  206. options: [
  207. { label: '是', value: 1, key: '1' },
  208. { label: '否', value: 0, key: '2' },
  209. ],
  210. };
  211. },
  212. },
  213. {
  214. label: '净宽',
  215. field: 'fclearwidth',
  216. component: 'Input',
  217. },
  218. {
  219. label: '净高',
  220. field: 'fclearheight',
  221. component: 'Input',
  222. },
  223. {
  224. label: '风门道数',
  225. field: 'ndoorcount',
  226. component: 'Input',
  227. },
  228. {
  229. label: '所属分站',
  230. field: 'stationname',
  231. component: 'JDictSelectTag',
  232. componentProps: {
  233. dictCode: 'user_status',
  234. placeholder: '请选择状态',
  235. stringToNumber: true,
  236. },
  237. },
  238. {
  239. label: '点表',
  240. field: 'strtype',
  241. component: 'JDictSelectTag',
  242. componentProps: {
  243. dictCode: 'user_status',
  244. placeholder: '请选择状态',
  245. stringToNumber: true,
  246. },
  247. },
  248. {
  249. label: '监测类型',
  250. field: 'monitorflag',
  251. component: 'JDictSelectTag',
  252. componentProps: {
  253. dictCode: 'user_status',
  254. placeholder: '请选择状态',
  255. stringToNumber: true,
  256. },
  257. },
  258. {
  259. label: '是否模拟数据',
  260. field: 'testflag',
  261. component: 'RadioGroup',
  262. defaultValue: 1,
  263. componentProps: () => {
  264. return {
  265. options: [
  266. { label: '是', value: 1, key: '1' },
  267. { label: '否', value: 0, key: '2' },
  268. ],
  269. };
  270. },
  271. },
  272. ];
  273. export const formPasswordSchema: FormSchema[] = [
  274. {
  275. label: '用户账号',
  276. field: 'username',
  277. component: 'Input',
  278. componentProps: { readOnly: true },
  279. },
  280. {
  281. label: '登录密码',
  282. field: 'password',
  283. component: 'StrengthMeter',
  284. componentProps: {
  285. placeholder: '请输入登录密码',
  286. },
  287. rules: [
  288. {
  289. required: true,
  290. message: '请输入登录密码',
  291. },
  292. ],
  293. },
  294. {
  295. label: '确认密码',
  296. field: 'confirmPassword',
  297. component: 'InputPassword',
  298. dynamicRules: ({ values }) => rules.confirmPassword(values, true),
  299. },
  300. ];
  301. export const formAgentSchema: FormSchema[] = [
  302. {
  303. label: '',
  304. field: 'id',
  305. component: 'Input',
  306. show: false,
  307. },
  308. {
  309. field: 'userName',
  310. label: '用户名',
  311. component: 'Input',
  312. componentProps: {
  313. readOnly: true,
  314. allowClear: false,
  315. },
  316. },
  317. {
  318. field: 'agentUserName',
  319. label: '代理人用户名',
  320. required: true,
  321. component: 'JSelectUser',
  322. componentProps: {
  323. rowKey: 'username',
  324. labelKey: 'realname',
  325. maxSelectCount: 10,
  326. },
  327. },
  328. {
  329. field: 'startTime',
  330. label: '代理开始时间',
  331. component: 'DatePicker',
  332. required: true,
  333. componentProps: {
  334. showTime: true,
  335. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  336. placeholder: '请选择代理开始时间',
  337. },
  338. },
  339. {
  340. field: 'endTime',
  341. label: '代理结束时间',
  342. component: 'DatePicker',
  343. required: true,
  344. componentProps: {
  345. showTime: true,
  346. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  347. placeholder: '请选择代理结束时间',
  348. },
  349. },
  350. {
  351. field: 'status',
  352. label: '状态',
  353. component: 'JDictSelectTag',
  354. defaultValue: '1',
  355. componentProps: {
  356. dictCode: 'valid_status',
  357. type: 'radioButton',
  358. },
  359. },
  360. ];
  361. export const chartsColumns = [
  362. {
  363. legend: '压差',
  364. seriesName: '(Pa)',
  365. ymax: 100,
  366. yname: 'Pa',
  367. linetype: 'bar',
  368. yaxispos: 'left',
  369. color: '#37BCF2',
  370. sort: 1,
  371. xRotate: 0,
  372. dataIndex: 'frontRearDP',
  373. },
  374. // {
  375. // legend: '前门推力',
  376. // seriesName: '',
  377. // ymax: 100,
  378. // yname: '前门推力',
  379. // linetype: 'line',
  380. // yaxispos: 'left',
  381. // color: '#37BCF2',
  382. // sort: 1,
  383. // xRotate: 0,
  384. // dataIndex: '1zdqfktl',
  385. // },
  386. // {
  387. // legend: '后门推力',
  388. // seriesName: '-',
  389. // ymax: 100,
  390. // yname: '后门推力',
  391. // linetype: 'line',
  392. // yaxispos: 'right',
  393. // color: '#FC4327',
  394. // sort: 2,
  395. // xRotate: 0,
  396. // dataIndex: '2zdqfktl',
  397. // },
  398. ];
  399. export function getModelComponent(is2DModel: boolean = false, type?: string) {
  400. if (!is2DModel) return EntryThree;
  401. // @ts-ignore
  402. return defineAsyncComponent(() => {
  403. // return import('./components/gateTripleSVG.vue');
  404. switch (type) {
  405. // case '000000':
  406. // 双道风门
  407. // return import('./components/gateDualSVG.vue');
  408. case 'fmWindow':
  409. return import('./components/gateDualAIO.vue');
  410. case 'fm1':
  411. return import('./components/gateDualSVG.vue');
  412. case 'fmSp1':
  413. return import('./components/gateSVG.ssl.vue');
  414. case 'fmSsl':
  415. return import('./components/gateDualSVG.ssl.vue');
  416. default:
  417. // return import('./components/gateTripleSVG.vue');
  418. return import('./components/gateTripleSVG.vue');
  419. }
  420. });
  421. }