point.data.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. import { BasicColumn } from '/@/components/Table';
  2. import { deviceId, getDeviceId, deviceList, list, pointEdit } from './point.api';
  3. export const columns: BasicColumn[] = [
  4. {
  5. title: '值名称',
  6. dataIndex: 'valuename',
  7. width: 100,
  8. },
  9. {
  10. title: '值code',
  11. width: 100,
  12. dataIndex: 'valuecode',
  13. },
  14. {
  15. title: '关联设备类型',
  16. dataIndex: 'link_devicetype_text',
  17. editRow: true,
  18. editRule: false,
  19. // editComponent: 'ApiTreeSelect',
  20. // editComponentProps: ({ formModel, formActionType }) => {
  21. // return {
  22. // api: deviceList.bind(null, { devicetype: '' }),
  23. // fieldNames: {
  24. // children: 'children',
  25. // label: 'itemText',
  26. // value: 'itemValue',
  27. // },
  28. // onChange: (e: any) => {
  29. // const { updateSchema } = formActionType;
  30. // updateSchema({
  31. // field: 'link_id',
  32. // component: 'ApiSelect',
  33. // componentProps: {
  34. // api: getDeviceId.bind(null, { devicetype: e }),
  35. // labelField: 'deviceName',
  36. // valueField: 'deviceID',
  37. // },
  38. // });
  39. // },
  40. // };
  41. // },
  42. width: 100,
  43. },
  44. {
  45. title: '关联设备',
  46. dataIndex: 'link_id_text',
  47. editRow: true,
  48. // editComponent: 'ApiSelect',
  49. // editComponentProps: ({ formModel, formActionType }) => {
  50. // return {
  51. // api: getDeviceId.bind(null, { devicetype: formModel['link_devicetype'] }),
  52. // labelField: 'deviceName',
  53. // valueField: 'deviceID',
  54. // onChange: (e: any) => {
  55. // const { updateSchema } = formActionType;
  56. // updateSchema({
  57. // field: 'link_code',
  58. // component: 'ApiSelect',
  59. // componentProps: {
  60. // api: deviceId({ id: e }),
  61. // labelField: 'valuename',
  62. // valueField: 'valuecode',
  63. // },
  64. // });
  65. // },
  66. // };
  67. // },
  68. width: 200,
  69. },
  70. {
  71. title: '关联字段',
  72. width: 180,
  73. editRow: true,
  74. dataIndex: 'link_code',
  75. // editComponent: 'ApiSelect',
  76. // editComponentProps: ({ formModel }) => {
  77. // return {
  78. // api: deviceId({ id: formModel['link_id'] }),
  79. // labelField: 'valuename',
  80. // valueField: 'valuecode',
  81. // };
  82. // },
  83. },
  84. {
  85. title: '关联设备类型',
  86. dataIndex: 'link_devicetype',
  87. editRow: true,
  88. // ifShow: false,
  89. defaultHidden: true,
  90. width: 100,
  91. },
  92. {
  93. title: '关联设备',
  94. dataIndex: 'link_id',
  95. editRow: true,
  96. // ifShow: false,
  97. defaultHidden: true,
  98. width: 200,
  99. },
  100. ];
  101. export const simulationColumns: BasicColumn[] = [
  102. {
  103. title: '值名称',
  104. dataIndex: 'valuename',
  105. width: 100,
  106. },
  107. {
  108. title: '值code',
  109. width: 100,
  110. dataIndex: 'valuecode',
  111. },
  112. {
  113. title: '模拟最小值',
  114. dataIndex: 'testlow',
  115. editRow: true,
  116. editComponent: 'InputNumber',
  117. },
  118. {
  119. title: '模拟最大值',
  120. dataIndex: 'testup',
  121. editRow: true,
  122. editComponent: 'InputNumber',
  123. },
  124. ];
  125. export const warningColumns: BasicColumn[] = [
  126. {
  127. title: '监测参数',
  128. dataIndex: 'monitorcode',
  129. width: 100,
  130. },
  131. {
  132. title: '模拟最小值',
  133. width: 100,
  134. dataIndex: 'ftestmin',
  135. },
  136. {
  137. title: '模拟最大值',
  138. dataIndex: 'ftestmax',
  139. editRow: true,
  140. width: 100,
  141. },
  142. {
  143. title: '备注',
  144. dataIndex: 'des',
  145. editRow: true,
  146. width: 100,
  147. },
  148. ];
  149. export const deviceColumns: BasicColumn[] = [
  150. {
  151. title: '名称',
  152. dataIndex: 'deviceName',
  153. align: 'center',
  154. width: 120,
  155. },
  156. {
  157. title: '安装位置',
  158. dataIndex: 'devicePos',
  159. align: 'center',
  160. width: 100,
  161. },
  162. {
  163. title: '设备类型',
  164. dataIndex: 'deviceType',
  165. align: 'center',
  166. width: 100,
  167. },
  168. {
  169. title: '所属分站',
  170. width: 150,
  171. align: 'center',
  172. dataIndex: 'subStationName',
  173. },
  174. ];
  175. export const workFaceColumns: BasicColumn[] = [
  176. {
  177. title: '安装位置',
  178. dataIndex: 'devicePos',
  179. width: 100,
  180. },
  181. {
  182. title: '排序',
  183. width: 100,
  184. dataIndex: 'sort',
  185. edit: true,
  186. editComponent: 'InputNumber',
  187. },
  188. // {
  189. // title: '是否参与计算风量',
  190. // width: 100,
  191. // dataIndex: 'windflag',
  192. // edit: true,
  193. // editComponent: 'Switch',
  194. // editValueMap: (value) => {
  195. // return value ? '是' : '否';
  196. // },
  197. // },
  198. ];
  199. export const reportColumns: BasicColumn[] = [
  200. {
  201. title: '测点名称',
  202. dataIndex: 'reportPointName',
  203. },
  204. ];