index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <div class='box'>
  3. <el-row style="padding:0 10px;margin-bottom:10px;">
  4. <div style="float:left;">
  5. <label>选择时间范围 : </label>
  6. <el-date-picker v-model="value" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
  7. </el-date-picker>
  8. </div>
  9. <div style="float:left;margin-left:10px;">
  10. <label>发现问题:</label>
  11. <span>无</span>
  12. </div>
  13. <el-button style="float:right;" :disabled="true">查看收集到的问题</el-button>
  14. </el-row>
  15. <div style="background:#fff;display:flex;align-items:center;border: 1px solid #e4e4e4;justify-content:center;height:100%;">
  16. <div class="center">
  17. <i class="icon-wushuju iconfont"></i>
  18. 暂无数据
  19. </div>
  20. </div>
  21. <!-- <div class='condition'>
  22. <p>
  23. <span style="margin-right: 12px">建筑名称</span>
  24. <el-select v-model='buildVlaue' placeholder='请选择'>
  25. <el-option
  26. v-for='item in options'
  27. :key='item.BuildId'
  28. :label='item.BuildLocalName'
  29. :value='item.BuildId'
  30. ></el-option>
  31. </el-select>
  32. </p>
  33. </div>
  34. <el-tabs v-model='activeName' @tab-click='handleClick' style="background:#fff">
  35. <el-tab-pane label='现场无法找到的资产' name='first'>
  36. <saga-nofind :buildVlaue='buildVlaue' :floorsObj='floorsObj'></saga-nofind>
  37. </el-tab-pane>
  38. <el-tab-pane label='未画入模型的资产' name='second'>
  39. <saga-nopaint :buildVlaue='buildVlaue' :floorsObj='floorsObj'></saga-nopaint>
  40. </el-tab-pane>
  41. <el-tab-pane label='无对应岗位的资产' name='third'>
  42. <saga-nomap :buildVlaue='buildVlaue' :floorsObj='floorsObj' :allFamilyObj='allFamilyObj'></saga-nomap>
  43. </el-tab-pane>
  44. <el-tab-pane label='未扫楼验证的资产' name='fourth'>
  45. <saga-verify :buildVlaue='buildVlaue' :floorsObj='floorsObj' :allEquipObj='allEquipObj'></saga-verify>
  46. </el-tab-pane>
  47. </el-tabs> -->
  48. </div>
  49. </template>
  50. <script>
  51. import SagaNofind from './Nofind'
  52. import SagaNopaint from './Nopaint'
  53. import SagaNomap from './Nomap'
  54. import SagaVerify from './Noverify'
  55. import { mapGetters } from 'vuex'
  56. //api
  57. import {
  58. getBuildSelect, //根据项目ID获得建筑列表
  59. getAllbusiness,
  60. getAllFamily
  61. } from '@/api/scan/request'
  62. export default {
  63. name: 'build-assets',
  64. data() {
  65. return {
  66. activeName: 'first',
  67. buildVlaue: '',
  68. options: [],
  69. floorsObj: {},
  70. allFamilyObj: {},
  71. allEquipObj: {},
  72. value: '',//
  73. }
  74. },
  75. computed: {
  76. ...mapGetters('layout', ['projectId', 'userId', 'secret'])
  77. },
  78. components: {
  79. SagaNofind,
  80. SagaNopaint,
  81. SagaNomap,
  82. SagaVerify
  83. },
  84. methods: {
  85. handleClick() { },
  86. //获取建筑列表
  87. getBuilding() {
  88. let param = {
  89. ProjId: this.projectId,
  90. UserId: this.userId
  91. }
  92. getBuildSelect(param).then(res => {
  93. if (res.data.Result == 'success') {
  94. let data = res.data.BuildList
  95. this.options = data
  96. this.buildVlaue = data.length ? data[0].BuildId : ''
  97. }
  98. })
  99. },
  100. //获取所有楼层
  101. getFloors() {
  102. let param = {
  103. ProjId: this.projectId,
  104. secret: this.secret,
  105. id: this.projectId,
  106. type: ['Fl']
  107. }
  108. getAllbusiness(param).then(res => {
  109. if (res.data.Result == 'success') {
  110. res.data.Content.forEach(item => {
  111. this.floorsObj[item.infos.FloorID] = item.infos.FloorLocalName
  112. })
  113. }
  114. })
  115. },
  116. //获取设备组
  117. getAllFamily() {
  118. getAllFamily().then(result => {
  119. if (result.data.Result == "success") {
  120. console.log(result.data.Content)
  121. let list = result.data.Content;
  122. list.forEach(ele => {
  123. this.allFamilyObj[ele.code] = ele
  124. })
  125. this.allEquipObj = {}
  126. this.getEquip(list)
  127. }
  128. });
  129. },
  130. getEquip(list) {
  131. list.forEach(ele => {
  132. if (ele.content) {
  133. ele.content.forEach(keng => {
  134. this.allEquipObj[keng.code] = keng.name
  135. })
  136. }
  137. })
  138. },
  139. async init() {
  140. await this.getAllFamily();
  141. await this.getFloors();
  142. await this.getBuilding()
  143. }
  144. },
  145. created() {
  146. this.init()
  147. },
  148. watch: {
  149. projectId() {
  150. this.init()
  151. }
  152. }
  153. }
  154. </script>
  155. <style scoped lang='less'>
  156. .box {
  157. .condition {
  158. padding: 10px;
  159. display: flex;
  160. border: 1px solid #dfe6ec;
  161. background: #fff;
  162. margin-bottom: 10px;
  163. }
  164. /deep/ .el-tabs__nav {
  165. margin-left: 10px;
  166. }
  167. }
  168. </style>