index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <div class="screen-container">
  3. <bd-map :loaded="loaded"/>
  4. <div class="screen-title-container"><span class="title-content">Digital Construction Dashboard</span></div>
  5. <content-block title="Construction Management" class="screen-left-container">
  6. <template v-slot:content>
  7. <div class="control-content">
  8. <div class="ctl-item">
  9. <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
  10. <el-button slot="append" icon="el-icon-search"></el-button>
  11. </el-input>
  12. </div>
  13. <div class="ctl-item">
  14. <cons-unit-tree v-model="consUnit"/>
  15. </div>
  16. </div>
  17. <div class="machine-list">
  18. <div class="list-container-title">
  19. Machine List <span v-if="loading" style="font-size: 10px;color: #fefefe;margin-left: 10px">加载中...</span>
  20. </div>
  21. <div class="content-list infinite-list-wrapper"
  22. v-infinite-scroll="load"
  23. :infinite-scroll-disabled="disabled"
  24. >
  25. <div v-for="i in count" class="list-item">machine {{ i }}</div>
  26. <p v-if="noMore">没有更多了</p>
  27. </div>
  28. </div>
  29. </template>
  30. </content-block>
  31. <div class="screen-right-container">
  32. <content-block title="Online Machinery" class="online-machine-block">
  33. <template v-slot:content>
  34. <div class="online-summery">
  35. </div>
  36. <div class="online-list">
  37. </div>
  38. </template>
  39. </content-block>
  40. </div>
  41. </div>
  42. </template>
  43. <script>
  44. import BdMap from "@/components/map/index.vue";
  45. import Treeselect from "@riophae/vue-treeselect";
  46. import ConsUnitTree from "@/views/cons/consUnit/ConsUnitTree.vue";
  47. import ContentBlock from "@/views/cons/screen/ContentBlock.vue";
  48. export default {
  49. components: {ContentBlock, ConsUnitTree, BdMap, Treeselect},
  50. props: {
  51. ws: {
  52. type: String,
  53. default: '',
  54. },
  55. },
  56. computed: {
  57. noMore() {
  58. return this.count >= 100
  59. },
  60. disabled() {
  61. return this.loading || this.noMore
  62. }
  63. },
  64. watch: {
  65. consUnit(val) {
  66. console.log(val)
  67. },
  68. },
  69. data() {
  70. return {
  71. consUnit: null,
  72. searchVal: "",
  73. count: 10,
  74. loading: false
  75. };
  76. },
  77. // 组件卸载前清空图层信息
  78. beforeDestroy() {
  79. },
  80. created() {
  81. },
  82. mounted() {
  83. this.init();
  84. },
  85. methods: {
  86. init() {
  87. },
  88. loaded(map) {
  89. },
  90. load() {
  91. this.loading = true
  92. setTimeout(() => {
  93. this.count += 2
  94. this.loading = false
  95. }, 2000)
  96. }
  97. },
  98. };
  99. </script>
  100. <style lang="scss" src="./index.scss" scoped/>