You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

BrainAnalysis.vue 3.5 kB

3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <div style="width: 100%;">
  3. <div id = "pro_main">
  4. <div style="margin-top: 10px;">
  5. <b class="pro_item">云脑分析</b> <span class="update_time">数据更新时间:</span> <span style="font-size: 12px;">{{lastUpdatedTime}}&nbsp/&nbsp从有记录起开始统计</span>
  6. </div>
  7. <bar-label :width="'95%'" :height="'500px'"></bar-label>
  8. <div style="margin-top: 20px;">
  9. <span class="sta_iterm">统计周期:</span>
  10. <button type="button" class='btnLast' id = "all" v-bind:class="{colorChange:7==dynamic}" @click="resetPage(),getAllProList('all',7)">所有</button>
  11. <span style="float:right; margin-right: 20px;">
  12. <div style="display:inline-block;margin-left: 40px; ">
  13. <a class="el-icon-download" v-if="tableData!=''" :href= "'../api/v1/cloudbrainboard/downloadAll'"></a>
  14. <i class="el-icon-download" v-else="tableData=''" href="#" style="color:rgba(187, 187, 187, 100);" @click='popMark()'></i>
  15. <!-- <span ><a id = "download_file" :href= "'../api/v1/projectboard/downloadAll'" >下载报告</a> </span> -->
  16. <span >
  17. <a id = "download_file" v-if="tableData!=''" :href= "'../api/v1/cloudbrainboard/downloadAll'">下载报告</a>
  18. <a id = "download_file" v-else="tableData=''" href= "#" style="color:rgba(187, 187, 187, 100);" @click='popMark()'>下载报告</a>
  19. </span>
  20. </div>
  21. </span>
  22. </div>
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. // import barLabel from './basic/barLabel.vue';
  28. const {AppSubUrl, StaticUrlPrefix, csrf} = window.config;
  29. import { export2Excel } from '../excel/util.js'
  30. export default{
  31. name:'ProAnalysis',
  32. components: {
  33. // barLabel,
  34. },
  35. methods: {
  36. popMark(){
  37. alert("数据为空时,不能下载!")
  38. },
  39. exportData(){
  40. // this.getOneProList(this.pro_id,'all',true,7)
  41. // this.getOneProList(this.pro_id,'all',false,7)
  42. // this.fileName()
  43. if (this.tableDataID!=''){
  44. this.currentPage=1
  45. var saveFileName = this.getFileName()
  46. export2Excel(this.columns,this.tableDataID,saveFileName)
  47. }else{
  48. alert("数据为空时,不能下载!")
  49. }
  50. },
  51. },
  52. }
  53. </script>
  54. <style scoped>
  55. .pro_item{
  56. font-size: 16px;
  57. color: rgba(16, 16, 16, 100);
  58. font-family: SourceHanSansSC-bold;
  59. }
  60. .update_time{
  61. line-height: 17px;
  62. font-size: 12px;
  63. color:rgba(187, 187, 187, 100);
  64. margin-left: 10px;
  65. }
  66. .btnLast{
  67. line-height: 1.5;
  68. margin: -3.5px;
  69. border: 1px solid rgba(22, 132, 252, 100);
  70. /* border-right: none; */
  71. background: #FFFF;
  72. color: #1684FC;
  73. width: 60px;
  74. height: 30px;
  75. border-radius:0px 4px 4px 0px;
  76. }
  77. </style>