device.data.ts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { list } from '../substationTabel/substation.api';
  4. import { listF } from './device.api';
  5. import { getAutoScrollContainer } from '/@/utils/common/compUtils';
  6. //标校历史
  7. export const BjColumns: BasicColumn[] = [
  8. {
  9. title: '序号',
  10. width: 60,
  11. align: 'center',
  12. customRender: ({ index }: { index: number }) => `${index + 1}`
  13. },
  14. {
  15. title: '设备ID',
  16. dataIndex: 'deviceid',
  17. align:'center',
  18. },
  19. {
  20. title: '标校状态',
  21. align:'center',
  22. dataIndex: 'calibrationStatus',
  23. },
  24. {
  25. title: '标校时间',
  26. align:'center',
  27. dataIndex: 'operateTime',
  28. },
  29. {
  30. title: '操作人',
  31. align:'center',
  32. dataIndex: 'createBy',
  33. },
  34. ];
  35. export const columns: BasicColumn[] = [
  36. {
  37. title: '名称',
  38. dataIndex: 'strname',
  39. width: 120,
  40. },
  41. {
  42. title: '安装位置',
  43. dataIndex: 'strinstallpos',
  44. width: 100,
  45. },
  46. {
  47. title: '风筒长度(m)',
  48. dataIndex: 'flength',
  49. width: 100,
  50. },
  51. {
  52. title: '风筒直径(m)',
  53. dataIndex: 'fclearwidth',
  54. width: 80,
  55. },
  56. {
  57. title: '风机类型',
  58. dataIndex: 'ntype_dictText',
  59. width: 100,
  60. },
  61. {
  62. title: '所属分站',
  63. width: 150,
  64. dataIndex: 'stationname',
  65. },
  66. ];
  67. export const recycleColumns: BasicColumn[] = [
  68. {
  69. title: '名称',
  70. dataIndex: 'strname',
  71. width: 100,
  72. },
  73. {
  74. title: '是否为常闭型',
  75. dataIndex: 'bnormalclose',
  76. width: 100,
  77. },
  78. ];
  79. export const searchFormSchema: FormSchema[] = [
  80. {
  81. label: '设备类型',
  82. field: 'strtype',
  83. component: 'JDictSelectTag',
  84. componentProps: {
  85. dictCode: '',
  86. placeholder: '请选择设备类型',
  87. },
  88. colProps: { span: 6 },
  89. },
  90. {
  91. label: '安装位置',
  92. field: 'strinstallpos',
  93. component: 'Input',
  94. colProps: { span: 6 },
  95. },
  96. {
  97. label: '所属分站',
  98. field: 'nsubstationid',
  99. component: 'ApiSelect',
  100. colProps: { span: 6 },
  101. componentProps: {
  102. api: list,
  103. labelField: 'strname',
  104. valueField: 'id',
  105. },
  106. },
  107. ];
  108. export const searchFormSchemaF: FormSchema[] = [
  109. {
  110. label: '设备类型',
  111. field: 'devId',
  112. component: 'ApiSelect',
  113. colProps: { span: 6 },
  114. componentProps: {
  115. api: listF.bind(null, { devicekind: 'footageGas' }),
  116. labelField: 'strname',
  117. valueField: 'id',
  118. resultField: 'records',
  119. },
  120. },
  121. {
  122. field: 'fteTime',
  123. label: '进尺日期',
  124. component: 'DatePicker',
  125. componentProps: {
  126. showTime: false,
  127. valueFormat: 'YYYY-MM-DD',
  128. getPopupContainer: getAutoScrollContainer,
  129. },
  130. colProps: {
  131. span: 4,
  132. },
  133. },
  134. ];
  135. export const formSchema: FormSchema[] = [
  136. {
  137. label: '',
  138. field: 'id',
  139. component: 'Input',
  140. show: false,
  141. },
  142. {
  143. label: '名称',
  144. field: 'strname',
  145. component: 'Input',
  146. },
  147. {
  148. label: '安装位置',
  149. field: 'strinstallpos',
  150. component: 'Input',
  151. },
  152. {
  153. label: '风筒长度(m)',
  154. field: 'flength',
  155. component: 'InputNumber',
  156. },
  157. {
  158. label: '风筒直径(m)',
  159. field: 'fclearwidth',
  160. component: 'InputNumber',
  161. },
  162. {
  163. label: '风机类型',
  164. field: 'ntype',
  165. component: 'JDictSelectTag',
  166. componentProps: {
  167. dictCode: 'fantype',
  168. placeholder: '请选择状态',
  169. // stringToNumber: true,
  170. },
  171. },
  172. {
  173. label: '所属分站',
  174. field: 'nsubstationid',
  175. component: 'ApiSelect',
  176. componentProps: {
  177. api: list,
  178. labelField: 'strname',
  179. valueField: 'id',
  180. },
  181. },
  182. {
  183. label: '点表',
  184. field: 'strtype',
  185. component: 'JDictSelectTag',
  186. required: true,
  187. componentProps: {
  188. dictCode: 'fanlocalkind',
  189. placeholder: '请选择状态',
  190. },
  191. },
  192. {
  193. label: '监测类型',
  194. field: 'monitorflag_dictText',
  195. component: 'JDictSelectTag',
  196. componentProps: {
  197. dictCode: 'monitorflag',
  198. placeholder: '请选择状态',
  199. },
  200. },
  201. {
  202. label: '是否模拟数据',
  203. field: 'testflag',
  204. component: 'RadioGroup',
  205. defaultValue: 1,
  206. componentProps: () => {
  207. return {
  208. options: [
  209. { label: '是', value: 1, key: '1' },
  210. { label: '否', value: 0, key: '2' },
  211. ],
  212. };
  213. },
  214. },
  215. ];