sensor.data.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { list } from '../substationTabel/substation.api';
  4. export const columns: BasicColumn[] = [
  5. {
  6. title: '名称',
  7. dataIndex: 'strname',
  8. width: 120,
  9. },
  10. {
  11. title: '安装位置',
  12. dataIndex: 'strinstallpos',
  13. width: 100,
  14. },
  15. {
  16. title: '距巷道起点长度',
  17. dataIndex: 'flength',
  18. width: 100,
  19. },
  20. {
  21. title: '传感器类型',
  22. dataIndex: 'nsensortype_dictText',
  23. width: 80,
  24. },
  25. {
  26. title: '所属分站',
  27. width: 150,
  28. dataIndex: 'stationname',
  29. },
  30. ];
  31. export const recycleColumns: BasicColumn[] = [
  32. {
  33. title: '名称',
  34. dataIndex: 'strname',
  35. width: 100,
  36. },
  37. {
  38. title: '是否为常闭型',
  39. dataIndex: 'bnormalclose',
  40. width: 100,
  41. },
  42. ];
  43. export const searchFormSchema: FormSchema[] = [
  44. {
  45. label: '名称',
  46. field: 'strname',
  47. component: 'Input',
  48. colProps: { span: 6 },
  49. },
  50. {
  51. label: '安装位置',
  52. field: 'strinstallpos',
  53. component: 'Input',
  54. colProps: { span: 6 },
  55. },
  56. {
  57. label: '所属分站',
  58. field: 'nsubstationid',
  59. component: 'ApiSelect',
  60. componentProps: {
  61. api: list,
  62. labelField: 'strname',
  63. valueField: 'nsubstationid',
  64. },
  65. colProps: { span: 6 },
  66. },
  67. ];
  68. export const formSchema: FormSchema[] = [
  69. {
  70. label: '',
  71. field: 'id',
  72. component: 'Input',
  73. show: false,
  74. },
  75. {
  76. label: '名称',
  77. field: 'strname',
  78. component: 'Input',
  79. },
  80. {
  81. label: '安装位置',
  82. field: 'strinstallpos',
  83. component: 'Input',
  84. },
  85. {
  86. label: '分站内编号',
  87. field: 'addrIndex',
  88. component: 'Input',
  89. },
  90. {
  91. label: '距巷道起点长度',
  92. field: 'flength',
  93. component: 'InputNumber',
  94. },
  95. {
  96. label: '传感器类型',
  97. field: 'nsensortype',
  98. component: 'JDictSelectTag',
  99. componentProps: {
  100. dictCode: 'nsensortype',
  101. placeholder: '请选择状态',
  102. stringToNumber: true,
  103. },
  104. },
  105. {
  106. label: '报警上限',
  107. field: 'fdownlimit',
  108. component: 'InputNumber',
  109. },
  110. {
  111. label: '报警下限',
  112. field: 'fuplimit',
  113. component: 'InputNumber',
  114. },
  115. {
  116. label: '所属分站',
  117. field: 'nsubstationid',
  118. component: 'ApiSelect',
  119. componentProps: {
  120. api: list,
  121. labelField: 'strname',
  122. valueField: 'nsubstationid',
  123. },
  124. },
  125. {
  126. label: '所属分站',
  127. field: 'nsubstationid',
  128. component: 'ApiSelect',
  129. componentProps: {
  130. api: list,
  131. labelField: 'strname',
  132. valueField: 'nsubstationid',
  133. },
  134. },
  135. {
  136. label: '点表',
  137. field: 'strtype',
  138. component: 'JDictSelectTag',
  139. componentProps: {
  140. dictCode: 'modelsensorkind',
  141. placeholder: '请选择状态',
  142. },
  143. },
  144. {
  145. label: '监测类型',
  146. field: 'monitorflag_dictText',
  147. component: 'JDictSelectTag',
  148. componentProps: {
  149. dictCode: 'monitorflag',
  150. placeholder: '请选择状态',
  151. },
  152. },
  153. {
  154. label: '是否模拟数据',
  155. field: 'testflag',
  156. component: 'RadioGroup',
  157. defaultValue: 1,
  158. componentProps: () => {
  159. return {
  160. options: [
  161. { label: '是', value: 1, key: '1' },
  162. { label: '否', value: 0, key: '2' },
  163. ],
  164. };
  165. },
  166. },
  167. ];