index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div class="scrbReportNew">
  3. <div class="scrbReportNewBtn">
  4. <el-button round size="mini" class="searchColor" @click="swithTab">数据回填</el-button>
  5. </div>
  6. <el-tabs v-model="activeTab" style="width: 100%">
  7. <el-tab-pane label="生产日报" name="1">
  8. <div style="height: 100%">
  9. <iframe
  10. :src="url"
  11. width="100%"
  12. height="100%"
  13. frameborder="0"
  14. scrolling="auto"
  15. ></iframe>
  16. </div>
  17. </el-tab-pane>
  18. <el-tab-pane label="数据回填" name="2">
  19. <scrbCallback />
  20. </el-tab-pane>
  21. </el-tabs>
  22. </div>
  23. </template>
  24. <script>
  25. import scrbCallback from "./scrbCallback.vue"
  26. export default {
  27. components: {
  28. scrbCallback
  29. },
  30. data() {
  31. return {
  32. activeTab: "1",
  33. url:
  34. process.env.VUE_APP_REPORT2 +
  35. "/jmreport/shareView/1173531983233916928?shareToken=5b2be81b2764d5abe36ae0989b80a2c5",
  36. };
  37. },
  38. methods: {
  39. swithTab() {
  40. this.activeTab = '2'
  41. }
  42. }
  43. };
  44. </script>
  45. <style lang="less">
  46. .scrbReportNew{
  47. width: 100%;
  48. height: 100%;
  49. .el-tabs{
  50. .el-tabs__content{
  51. .el-tab-pane{
  52. height: calc(100vh - 50px);
  53. }
  54. }
  55. }
  56. .scrbReportNewBtn{
  57. position: absolute;
  58. right: 20px;
  59. z-index: 11111;
  60. .searchColor {
  61. background-color: rgba(5, 187, 76, 0.2);
  62. border: 1px solid #3b6c53;
  63. color: #b3b3b3;
  64. font-size: 14px;
  65. margin-left: 10px;
  66. &:hover {
  67. background-color: rgba(5, 187, 76, 0.5);
  68. color: #ffffff;
  69. }
  70. }
  71. }
  72. }
  73. </style>