handson_header.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. const headers = {
  2. "modbus-tcp": [{
  3. InfoPointName: "*slave_id",
  4. InfoPointCode: "SlaveId",
  5. InputMode: "B1",
  6. Visible: true,
  7. FirstTag: ""
  8. },
  9. {
  10. InfoPointName: "*registers_address ",
  11. InfoPointCode: "RegistersAddress",
  12. InputMode: "B1",
  13. Visible: true,
  14. FirstTag: ""
  15. },
  16. {
  17. InfoPointName: "*registers_quality",
  18. InfoPointCode: "RegistersQuality",
  19. InputMode: "B1",
  20. Visible: true,
  21. FirstTag: ""
  22. },
  23. {
  24. InfoPointName: "*convert_type",
  25. InfoPointCode: "ConvertType",
  26. InputMode: "select",
  27. DataSource: [{
  28. Code: "1",
  29. Name: "位"
  30. },
  31. {
  32. Code: "2",
  33. Name: "单字"
  34. }, {
  35. Code: "3",
  36. Name: "双字"
  37. }, {
  38. Code: "4",
  39. Name: "四字"
  40. }
  41. ],
  42. Visible: true,
  43. FirstTag: ""
  44. },
  45. {
  46. InfoPointName: "翻转规则",
  47. InfoPointCode: "RevertRule",
  48. InputMode: "B1",
  49. Visible: true,
  50. FirstTag: ""
  51. }
  52. ],
  53. "bacnet-ip": [{
  54. InfoPointName: "*device_id",
  55. InfoPointCode: "DeviceId",
  56. InputMode: "B1",
  57. Visible: true,
  58. FirstTag: ""
  59. },
  60. {
  61. InfoPointName: "*instance_number",
  62. InfoPointCode: "InstanceNumber",
  63. InputMode: "B1",
  64. Visible: true,
  65. FirstTag: ""
  66. },
  67. {
  68. InfoPointName: "*data_type",
  69. InfoPointCode: "DataType",
  70. DataSource: [{
  71. Code: "analogInput",
  72. Name: "analogInput"
  73. },
  74. {
  75. Code: "analogOutput",
  76. Name: "analogOutput"
  77. },
  78. {
  79. Code: "analogValue",
  80. Name: "analogValue"
  81. },
  82. {
  83. Code: "binaryInput",
  84. Name: "binaryInput"
  85. },
  86. {
  87. Code: "binaryOutput",
  88. Name: "binaryOutput"
  89. },
  90. {
  91. Code: "binaryValue",
  92. Name: "binaryValue"
  93. },
  94. {
  95. Code: "multiStateInput",
  96. Name: "multiStateInput"
  97. },
  98. {
  99. Code: "multiStateOutput",
  100. Name: "multiStateOutput"
  101. },
  102. {
  103. Code: "multiStateValue",
  104. Name: "multiStateValue"
  105. }
  106. ],
  107. InputMode: "select",
  108. Visible: true,
  109. FirstTag: ""
  110. }
  111. ],
  112. "opc": [{
  113. InfoPointName: "*item",
  114. InfoPointCode: "Item",
  115. InputMode: "B1",
  116. Visible: true,
  117. FirstTag: ""
  118. }],
  119. "knx": [{
  120. InfoPointName: "*group_address",
  121. InfoPointCode: "GroupAddress",
  122. InputMode: "B1",
  123. Visible: true,
  124. FirstTag: ""
  125. }],
  126. "mqtt": [{
  127. InfoPointName: "*topic",
  128. InfoPointCode: "Topic",
  129. InputMode: "B1",
  130. Visible: true,
  131. FirstTag: ""
  132. }],
  133. "amqp": [{
  134. InfoPointName: "*exchange",
  135. InfoPointCode: "Exchange",
  136. InputMode: "B1",
  137. Visible: true,
  138. FirstTag: ""
  139. },
  140. {
  141. InfoPointName: "*type",
  142. InfoPointCode: "Type",
  143. InputMode: "B1",
  144. Visible: true,
  145. FirstTag: ""
  146. },
  147. {
  148. InfoPointName: "*routing_key ",
  149. InfoPointCode: "RoutingKey",
  150. InputMode: "B1",
  151. Visible: true,
  152. FirstTag: ""
  153. }
  154. ]
  155. }
  156. let common = [{
  157. InfoPointName: "*原始点位描述",
  158. InfoPointCode: "Description",
  159. InputMode: "B1",
  160. Visible: true,
  161. FirstTag: ""
  162. },
  163. {
  164. InfoPointName: "值/单位说明",
  165. InfoPointCode: "ValueDescription",
  166. InputMode: "B1",
  167. Visible: true,
  168. FirstTag: ""
  169. },
  170. {
  171. InfoPointName: "位置标签",
  172. InfoPointCode: "LocationFlag",
  173. InputMode: "myOwn",
  174. Visible: true,
  175. FirstTag: ""
  176. },
  177. {
  178. InfoPointName: "备注",
  179. InfoPointCode: "Remarks",
  180. InputMode: "B1",
  181. Visible: true,
  182. FirstTag: ""
  183. },
  184. {
  185. InfoPointName: "原始数值",
  186. InfoPointCode: "pointValue",
  187. InputMode: "X",
  188. Visible: true,
  189. FirstTag: ""
  190. },
  191. {
  192. InfoPointName: "采集时间",
  193. InfoPointCode: "pointDate",
  194. InputMode: "X",
  195. Visible: true,
  196. FirstTag: ""
  197. },
  198. {
  199. InfoPointName: "使用",
  200. InfoPointCode: "Used",
  201. InputMode: "switchBtn",
  202. Visible: true,
  203. FirstTag: ""
  204. },
  205. {
  206. InfoPointName: "对象类型关键字",
  207. InfoPointCode: "KeyEquipmentType",
  208. InputMode: "B1",
  209. Visible: true,
  210. FirstTag: ""
  211. },
  212. {
  213. InfoPointName: "对象参数关键字",
  214. InfoPointCode: "KeyEquipmentParameter",
  215. InputMode: "B1",
  216. Visible: true,
  217. FirstTag: ""
  218. },
  219. {
  220. InfoPointName: "对象标识",
  221. InfoPointCode: "EquipmentMark",
  222. InputMode: "B1",
  223. Visible: true,
  224. FirstTag: ""
  225. }
  226. ]
  227. /**
  228. *
  229. * @param {数据源类型} type
  230. *
  231. * @returns headersArr
  232. */
  233. function getHeaderSetting(type) {
  234. return headers[type].concat(common)
  235. }
  236. export default getHeaderSetting