index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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 class="machine-pie-chart">
  36. <pie-chart-block :optCfg="machineOpt"/>
  37. </div>
  38. <div class="machine-pie-legend">
  39. <div class="legend-item">
  40. <i :style="{ backgroundColor:machineOpt.color[0] }"/>
  41. <span>Online Machinery</span>
  42. <span>7</span>
  43. </div>
  44. <div class="legend-item">
  45. <i :style="{ backgroundColor:machineOpt.color[1] }"/>
  46. <span>Offline Machinery</span>
  47. <span>7</span>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="online-list">
  52. <div class="list-item">
  53. <span class="machine-name">004</span>
  54. <span class="cons-unit">Machine Name</span>
  55. </div>
  56. <div class="list-item">
  57. <span class="machine-name">004</span>
  58. <span class="cons-unit">Machine Name</span>
  59. </div>
  60. <div class="list-item">
  61. <span class="machine-name">004</span>
  62. <span class="cons-unit">Machine Name</span>
  63. </div>
  64. </div>
  65. </template>
  66. </content-block>
  67. <content-block title="Piling Machine" class="pile-machine-status">
  68. <template v-slot:content>
  69. <div class="offset-status">
  70. <div class="offset-title">
  71. Drill Rod Inclination
  72. </div>
  73. <div class="offset-item">
  74. </div>
  75. </div>
  76. </template>
  77. </content-block>
  78. </div>
  79. <el-dialog class="screen-dialog" title="Vibration Pipe Sinking and Stone Crushing Pile Information"
  80. :visible.sync="open"
  81. :modal="false"
  82. append-to-body>
  83. <div class="dialog-content">
  84. </div>
  85. </el-dialog>
  86. </div>
  87. </template>
  88. <script>
  89. import BdMap from "@/components/map/index.vue";
  90. import Treeselect from "@riophae/vue-treeselect";
  91. import ConsUnitTree from "@/views/cons/consUnit/ConsUnitTree.vue";
  92. import ContentBlock from "@/views/cons/screen/ContentBlock.vue";
  93. import PieChartBlock from "@/components/charts/PieChartBlock.vue";
  94. export default {
  95. components: {PieChartBlock, ContentBlock, ConsUnitTree, BdMap, Treeselect},
  96. props: {
  97. ws: {
  98. type: String,
  99. default: '',
  100. },
  101. },
  102. computed: {
  103. noMore() {
  104. return this.count >= 100
  105. },
  106. disabled() {
  107. return this.loading || this.noMore
  108. }
  109. },
  110. watch: {
  111. consUnit(val) {
  112. console.log(val)
  113. },
  114. },
  115. data() {
  116. return {
  117. consUnit: null,
  118. searchVal: "",
  119. count: 10,
  120. loading: false,
  121. open: true,
  122. machineOpt: {
  123. color: ['#006699', '#4cabce'],
  124. tooltip: {
  125. show: false
  126. },
  127. legend: {
  128. show: false,
  129. top: 0
  130. },
  131. label: {
  132. show: false,
  133. },
  134. emphasis: {
  135. label: {
  136. show: false,
  137. }
  138. },
  139. labelLine: {
  140. show: false
  141. },
  142. series: [
  143. {
  144. type: 'pie',
  145. radius: ['50%', '70%'],
  146. center: ['50%', '50%'],
  147. label: {
  148. show: false,
  149. position: 'center'
  150. },
  151. data: [
  152. {
  153. value: 19,
  154. name: 'online',
  155. },
  156. {
  157. value: 75,
  158. name: 'offline',
  159. }
  160. ],
  161. },
  162. ],
  163. },
  164. };
  165. },
  166. // 组件卸载前清空图层信息
  167. beforeDestroy() {
  168. },
  169. created() {
  170. },
  171. mounted() {
  172. this.init();
  173. },
  174. methods: {
  175. init() {
  176. },
  177. loaded(map) {
  178. },
  179. load() {
  180. this.loading = true
  181. setTimeout(() => {
  182. this.count += 2
  183. this.loading = false
  184. }, 2000)
  185. }
  186. },
  187. };
  188. </script>
  189. <style lang="scss" src="./index.scss" scoped/>