point.data.ts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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: 100,
  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: 100,
  99. },
  100. ];
  101. export const warningColumns: BasicColumn[] = [
  102. {
  103. title: '监测参数',
  104. dataIndex: 'monitorcode',
  105. width: 100,
  106. },
  107. {
  108. title: '模拟最小值',
  109. width: 100,
  110. dataIndex: 'ftestmin',
  111. },
  112. {
  113. title: '模拟最大值',
  114. dataIndex: 'ftestmax',
  115. editRow: true,
  116. width: 100,
  117. },
  118. {
  119. title: '备注',
  120. dataIndex: 'des',
  121. editRow: true,
  122. width: 100,
  123. },
  124. ];
  125. export const deviceColumns: BasicColumn[] = [
  126. {
  127. title: '名称',
  128. dataIndex: 'deviceName',
  129. align: 'center',
  130. width: 120,
  131. },
  132. {
  133. title: '安装位置',
  134. dataIndex: 'devicePos',
  135. align: 'center',
  136. width: 100,
  137. },
  138. {
  139. title: '设备类型',
  140. dataIndex: 'deviceType',
  141. align: 'center',
  142. width: 100,
  143. },
  144. {
  145. title: '所属分站',
  146. width: 150,
  147. align: 'center',
  148. dataIndex: 'subStationName',
  149. },
  150. ];
  151. export const workFaceColumns: BasicColumn[] = [
  152. {
  153. title: '安装位置',
  154. dataIndex: 'devicePos',
  155. width: 100,
  156. },
  157. {
  158. title: '排序',
  159. width: 100,
  160. dataIndex: 'sort',
  161. edit: true,
  162. editComponent: 'InputNumber',
  163. },
  164. // {
  165. // title: '是否参与计算风量',
  166. // width: 100,
  167. // dataIndex: 'windflag',
  168. // edit: true,
  169. // editComponent: 'Switch',
  170. // editValueMap: (value) => {
  171. // return value ? '是' : '否';
  172. // },
  173. // },
  174. ];