steps3_main.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <!--steps3的左侧-->
  2. <template>
  3. <div class="steps3-dialog-main">
  4. <select-one @check="typeCheck" :renderData="typeArr" :isSelected="true" isCheckInfo="EquipmentMarkStandardized" infosKey="EquipmentType" :name="'原始点位描述中识别的设备类型'"></select-one>
  5. <select-one @check="paramCheck" :renderData="identifyArr" :isSelected="true" isCheckInfo="PhysicalRelated" infosKey="ownMess" :name="'已标准化的设备标识'"></select-one>
  6. <div class="own-collape">
  7. <temp-collape ref="ident" :renderData="identDataArr"></temp-collape>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import selectOne from "@/components/config_point/select_one"
  13. import {
  14. groupRelated,
  15. queryPoint,
  16. updatePoint,
  17. groupParamRelated,
  18. getNullofParam
  19. } from "@/fetch/point_http"
  20. import tempCollape from "./3_temps"
  21. import identCollape from "./3_identify"
  22. import {
  23. mapGetters,
  24. mapActions
  25. } from "vuex";
  26. import handsontableComponent from "@/components/common/handsontable"
  27. export default {
  28. name: "updateParam",
  29. data() {
  30. return {
  31. activeName: '1',
  32. typeArr: [],
  33. identifyArr: [],
  34. KeyEquipmentType: "",
  35. identDataArr: []
  36. }
  37. },
  38. computed: {
  39. ...mapGetters("project", [
  40. "projectId",
  41. "datasourceId",
  42. "protocolType"
  43. ])
  44. },
  45. created() {
  46. this.getData()
  47. },
  48. mounted() {},
  49. methods: {
  50. getData(){
  51. groupRelated({
  52. data: {
  53. DataSourceId: this.datasourceId
  54. },
  55. type: this.protocolType
  56. },res => {
  57. this.typeArr = res.Content
  58. })
  59. },
  60. typeCheck(item){
  61. console.log(item,"item")
  62. this.getParamList(item)
  63. },
  64. paramCheck(param){
  65. if(param.EquipmentMark == "空"){
  66. //空查询分组信息
  67. getNullofParam({
  68. data: {
  69. DataSourceId: this.datasourceId,
  70. KeyEquipmentType: this.KeyEquipmentType
  71. },
  72. type: this.protocolType
  73. },res =>{
  74. console.log(res)
  75. this.identDataArr = res.Content
  76. })
  77. }else{
  78. //不是空的情况查询点位列表
  79. console.log(param)
  80. queryPoint({
  81. data: {
  82. Filters: {
  83. KeyEquipmentParameter: param.EquipmentParameter,
  84. KeyEquipmentType: param.EquipmentType
  85. // KeyEquipmentParameter: '温度',
  86. // KeyEquipmentType: '冷机'
  87. },
  88. PageNumber: 1,
  89. PageSize: 100
  90. },
  91. type: this.protocolType
  92. },res => {
  93. console.log(res,"reslist")
  94. this.identDataArr = res.Content
  95. })
  96. }
  97. },
  98. //通过type获取param的list
  99. getParamList(item){
  100. this.KeyEquipmentType = item.EquipmentType
  101. groupParamRelated({
  102. data: {
  103. DataSourceId: this.datasourceId,
  104. KeyEquipmentType: item.EquipmentType
  105. },
  106. type: this.protocolType
  107. },res => {
  108. console.log(res,"res")
  109. this.identifyArr = res.Content.map(item => {
  110. item.ownMess = item.EquipmentParameter
  111. return item
  112. })
  113. })
  114. }
  115. },
  116. components: {
  117. selectOne,
  118. handsontableComponent,
  119. tempCollape,
  120. identCollape
  121. }
  122. }
  123. </script>
  124. <style lang="scss" scoped>
  125. .steps3-dialog-main {
  126. height: 400px;
  127. .own-collape {
  128. border: 1px solid #ccc;
  129. float: right;
  130. width: calc(100% - 520px);
  131. height: 340px;
  132. position: relative;
  133. }
  134. }
  135. </style>