handson_header.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. const headers = {
  2. "modbus-tcp": [{
  3. InfoPointName: "从站地址",
  4. InfoPointCode: "SlaveID",
  5. InputMode: "B1",
  6. Visible: true,
  7. FirstTag: ""
  8. },
  9. {
  10. InfoPointName: "寄存器地址(16位)",
  11. InfoPointCode: "Address",
  12. InputMode: "B1",
  13. Visible: true,
  14. FirstTag: ""
  15. },
  16. {
  17. InfoPointName: "寄存器个数",
  18. InfoPointCode: "Quantity",
  19. InputMode: "B1",
  20. Visible: true,
  21. FirstTag: ""
  22. },
  23. {
  24. InfoPointName: "位(单双字节)",
  25. InfoPointCode: "Convtype",
  26. InputMode: "B1",
  27. DataSource: [{
  28. Code: "单字",
  29. Name: "单字"
  30. },
  31. {
  32. Code: "双字",
  33. Name: "双字"
  34. }
  35. ],
  36. Visible: true,
  37. FirstTag: ""
  38. },
  39. {
  40. InfoPointName: "翻转规则",
  41. InfoPointCode: "ReverseRule",
  42. InputMode: "B1",
  43. Visible: true,
  44. FirstTag: ""
  45. }
  46. ],
  47. "bacnet-ip": [{
  48. InfoPointName: "设备标识",
  49. InfoPointCode: "DeviceID",
  50. InputMode: "B1",
  51. Visible: true,
  52. FirstTag: ""
  53. },
  54. {
  55. InfoPointName: "实例功能号",
  56. InfoPointCode: "InstanceNumber",
  57. InputMode: "B1",
  58. Visible: true,
  59. FirstTag: ""
  60. },
  61. {
  62. InfoPointName: "数据类型",
  63. InfoPointCode: "Type",
  64. DataSource: [{
  65. Code: "analogInput",
  66. Name: "analogInput"
  67. },
  68. {
  69. Code: "analogOutput",
  70. Name: "analogOutput"
  71. }
  72. ],
  73. InputMode: "B1",
  74. Visible: true,
  75. FirstTag: ""
  76. }
  77. ],
  78. "opc": [{
  79. InfoPointName: "点位编码(统一标识)",
  80. InfoPointCode: "Item",
  81. InputMode: "B1",
  82. Visible: true,
  83. FirstTag: ""
  84. }],
  85. "knx": [{
  86. InfoPointName: "组地址",
  87. InfoPointCode: "GroupAddress",
  88. InputMode: "B1",
  89. Visible: true,
  90. FirstTag: ""
  91. }],
  92. "mqtt": [{
  93. InfoPointName: "deviceId",
  94. InfoPointCode: "DeviceId",
  95. InputMode: "B1",
  96. Visible: true,
  97. FirstTag: ""
  98. },
  99. {
  100. InfoPointName: "item",
  101. InfoPointCode: "Item",
  102. InputMode: "B1",
  103. Visible: true,
  104. FirstTag: ""
  105. }
  106. ],
  107. "amqp": [{
  108. InfoPointName: "Exchange",
  109. InfoPointCode: "Exchange",
  110. InputMode: "B1",
  111. Visible: true,
  112. FirstTag: ""
  113. },
  114. {
  115. InfoPointName: "type",
  116. InfoPointCode: "Type",
  117. InputMode: "B1",
  118. Visible: true,
  119. FirstTag: ""
  120. },
  121. {
  122. InfoPointName: "Routingkey",
  123. InfoPointCode: "RoutingKey",
  124. InputMode: "B1",
  125. Visible: true,
  126. FirstTag: ""
  127. }
  128. ]
  129. }
  130. let common = [{
  131. InfoPointName: "原始点位描述",
  132. InfoPointCode: "Description",
  133. InputMode: "B1",
  134. Visible: true,
  135. FirstTag: ""
  136. },
  137. {
  138. InfoPointName: "值/单位说明",
  139. InfoPointCode: "ValueDescription",
  140. InputMode: "B1",
  141. Visible: true,
  142. FirstTag: ""
  143. },
  144. {
  145. InfoPointName: "位置标签",
  146. InfoPointCode: "LocationFlag",
  147. InputMode: "myOwn",
  148. Visible: true,
  149. FirstTag: ""
  150. },
  151. {
  152. InfoPointName: "备注",
  153. InfoPointCode: "Remarks",
  154. InputMode: "B1",
  155. Visible: true,
  156. FirstTag: ""
  157. },
  158. {
  159. InfoPointName: "原始数值",
  160. InfoPointCode: "",
  161. InputMode: "B1",
  162. Visible: true,
  163. FirstTag: ""
  164. },
  165. {
  166. InfoPointName: "采集时间",
  167. InfoPointCode: "",
  168. InputMode: "B1",
  169. Visible: true,
  170. FirstTag: ""
  171. },
  172. {
  173. InfoPointName: "使用",
  174. InfoPointCode: "Used",
  175. InputMode: "B1",
  176. Visible: true,
  177. FirstTag: ""
  178. },
  179. {
  180. InfoPointName: "设备类型关键字",
  181. InfoPointCode: "KeyEquipmentType",
  182. InputMode: "B1",
  183. Visible: true,
  184. FirstTag: ""
  185. },
  186. {
  187. InfoPointName: "设备参数关键字",
  188. InfoPointCode: "KeyEquipmentParameter",
  189. InputMode: "B1",
  190. Visible: true,
  191. FirstTag: ""
  192. },
  193. {
  194. InfoPointName: "设备标识",
  195. InfoPointCode: "EquipmentMark",
  196. InputMode: "B1",
  197. Visible: true,
  198. FirstTag: ""
  199. }
  200. ]
  201. /**
  202. *
  203. * @param {数据源类型} type
  204. *
  205. * @returns headersArr
  206. */
  207. function getHeaderSetting(type) {
  208. return headers[type].concat(common)
  209. }
  210. export default getHeaderSetting