index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!--
  2. * @Author: zhangyu
  3. * @Date: 2019-11-13 17:00:59
  4. * @Info: 系统集成成果辅助屏
  5. * @LastEditTime: 2019-11-18 16:49:55
  6. -->
  7. <template>
  8. <div>
  9. <div class='page-bar'>
  10. <el-breadcrumb separator='/'>
  11. <el-breadcrumb-item>系统集成</el-breadcrumb-item>
  12. <el-breadcrumb-item>系统集成成果管理</el-breadcrumb-item>
  13. </el-breadcrumb>
  14. </div>
  15. <div class="page-content">
  16. <div class="content-left">
  17. <div class="data-box">
  18. <realtime-data :queryParams="queryParams"></realtime-data>
  19. </div>
  20. <div class="example-box">
  21. <example-list :queryParams="queryParams" @changeExample="handleChangeExample"></example-list>
  22. </div>
  23. </div>
  24. <div class="content-right">
  25. <canvas v-if="drawCanvas" height="100%" :width="canvasWidth" class="instanceMap" :id="form.instanceId" :k="refreshCanvas"></canvas>
  26. <div class="no-data" v-else>
  27. <div class="position-icon">
  28. <i class="icon-wushuju iconfont"></i>
  29. 数据暂无
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. </template>
  36. <script>
  37. import { mapGetters } from 'vuex'
  38. import realtimeData from '@/components/screen/integrateresults/realtimeData'
  39. import exampleList from '@/components/screen/integrateresults/exampleList'
  40. export default {
  41. components: {
  42. realtimeData,
  43. exampleList
  44. },
  45. computed: {
  46. ...mapGetters('layout', ['userInfo', 'projectId', 'projects', 'userId'])
  47. },
  48. created() {
  49. },
  50. mounted() {
  51. },
  52. data() {
  53. return {
  54. queryParams: this.$route.query
  55. }
  56. },
  57. methods:{
  58. handleChangeExample(example) {
  59. console.log(example)
  60. }
  61. },
  62. watch: {
  63. $route(to,from){
  64. this.queryParams = this.$route.query
  65. }
  66. },
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. $borderColor: rgba(201, 201, 201, 1);
  71. .page-bar{
  72. flex-grow: 0;
  73. flex-shrink: 0;
  74. height: 24px;
  75. padding: 0 10px;
  76. margin-bottom: 10px;
  77. border-bottom: 1px solid $borderColor;
  78. /deep/ .el-breadcrumb {
  79. font-size: 14px;
  80. }
  81. }
  82. .page-content{
  83. display: flex;
  84. flex-grow: 1;
  85. flex-shrink: 1;
  86. flex-direction: row;
  87. justify-content: flex-start;
  88. overflow-y: auto;
  89. .content-left{
  90. display: flex;
  91. flex-direction: column;
  92. justify-content: flex-start;
  93. width: 260px;
  94. margin-right: 15px;
  95. .data-box{
  96. height: 140px;
  97. margin-bottom: 15px;
  98. }
  99. .example-box{
  100. flex-grow: 1;
  101. flex-shrink: 1;
  102. border: 1px solid $borderColor;
  103. }
  104. }
  105. .content-right{
  106. flex-grow: 1;
  107. flex-shrink: 1;
  108. border: 1px solid $borderColor;
  109. .no-data{
  110. height: 100%;
  111. text-align: center;
  112. box-sizing: border-box;
  113. position: relative;
  114. .position-icon{
  115. position: absolute;
  116. top: 50%;
  117. left: 50%;
  118. transform: translate(-50%,-50%);
  119. }
  120. }
  121. }
  122. }
  123. </style>