dbb7d73251f09a79da389e74e3803115d082ccd9.svn-base 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <el-row style="width: 100%;height:100%;">
  3. <el-col :span="leftCol" style="height:100%;">
  4. <el-card :body-style="{'padding':'0'}" style="height:100%;">
  5. <export-tree-list-sk-fs
  6. :pid="pid"
  7. :type="type"
  8. :pidNodes="pidNodes"
  9. :level="level"
  10. :style="{'max-height':dxdcAsideHeight+'px'}"
  11. @provTreeSelectChange="provTreeSelectChange"
  12. ></export-tree-list-sk-fs>
  13. </el-card>
  14. </el-col>
  15. <el-col :span="rightCol" style="height:100%;">
  16. <!-- <el-card :body-style="{'padding-top':'10px'}">-->
  17. <!-- &lt;!&ndash; <el-radio-group v-model="radioTable">-->
  18. <!-- <el-radio :label="1">小型水库督查工作报告</el-radio>-->
  19. <!-- </el-radio-group> &ndash;&gt;-->
  20. <!-- <div class="block">-->
  21. <!-- <span class="demonstration">选择月份</span>-->
  22. <!-- <el-date-picker-->
  23. <!-- v-model="monthValue"-->
  24. <!-- type="month"-->
  25. <!-- value-format="yyyy-MM"-->
  26. <!-- placeholder="选择月">-->
  27. <!-- </el-date-picker>-->
  28. <!-- <el-button type="primary" icon="el-icon-download"-->
  29. <!-- style="float: right;margin:0 5px"-->
  30. <!-- @click="exportExecl">导出-->
  31. <!-- </el-button>-->
  32. <!-- <el-button type="primary" icon="el-icon-search" style="float: right;margin:0 5px" @click="searchExecl">查询-->
  33. <!-- </el-button>-->
  34. <!-- </div>-->
  35. <!-- </el-card>-->
  36. <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'0'}" style="height:100%;">
  37. <div
  38. style="width: 100%;height: 100%;display:flex;flex-direction:row;justify-content:center;align-items:center;"
  39. v-loading="loading"
  40. >
  41. <i v-if="firstToShow" style="font-size:32px;" class="el-icon-warning-outline"></i>
  42. <p
  43. v-if="firstToShow"
  44. style="font-weight: bolder;color: #868686;font-size: larger;"
  45. >请通过左侧树点击指定省份河湖四乱督察,查看报告</p>
  46. <iframe
  47. v-show="!firstToShow"
  48. ref="myIframe"
  49. id="frameMain_sk7"
  50. src
  51. frameborder="0"
  52. width="100%"
  53. height="100%"
  54. style="overflow: auto"
  55. ></iframe>
  56. </div>
  57. </el-card>
  58. </el-col>
  59. </el-row>
  60. </template>
  61. <script>
  62. import exportTreeListSkFs from './exportTreeList_fs'
  63. import { dateFormat } from '../../utils/gw_date.js'
  64. export default {
  65. components: {
  66. exportTreeListSkFs: exportTreeListSkFs,
  67. },
  68. data () {
  69. return {
  70. firstToShow: true,
  71. id: '',
  72. pid: '000',
  73. pidNodes: [],
  74. type: '018',
  75. level: '1',
  76. dxdcMainHeight: window.innerHeight - 180,
  77. dxdcAsideHeight: window.innerHeight - 90,
  78. windowHeight: window.innerHeight - 160,
  79. windowWidth: window.innerWidth - 250,
  80. reportSrc: '/pageofficePath/dc/pageoffice/report/show',
  81. // type: 'renyin',
  82. radioTable: 1,
  83. loading: false,
  84. leftCol: 4,
  85. rightCol: 20,
  86. excelName: '农饮督查工作报告',
  87. monthValue: dateFormat(new Date(), 'yyyy-MM'),
  88. }
  89. },
  90. mounted () {
  91. // this.init()
  92. },
  93. computed: {
  94. userId: function () {
  95. return localStorage.getItem("userid")
  96. ? localStorage.getItem("userid")
  97. : "1098101939614724096"
  98. }
  99. },
  100. methods: {
  101. // init() {
  102. // let _this = this;
  103. // this.searchExecl();
  104. // },
  105. provTreeSelectChange (data) {
  106. this.id = data.id
  107. this.searchExecl()
  108. },
  109. // 获取Excel数据
  110. searchExecl () {
  111. let _this = this
  112. if (_this.id === '') {
  113. this.firstToShow = true
  114. return
  115. }
  116. let iframe = document.getElementById("frameMain_sk7")
  117. iframe.src = _this.reportSrc + "?ids=" + _this.id + "&type=hhsl"
  118. iframe.onload = function () {
  119. _this.firstToShow = false
  120. }
  121. },
  122. openMessage () {
  123. const h = this.$createElement
  124. this.$notify({
  125. title: '提示',
  126. message: h('i', { style: 'color: teal' }, '点击流域才会生成工作报告')
  127. })
  128. },
  129. // 导出Excel数据
  130. exportExecl () {
  131. v = window.frames["frameMain_sk7"]
  132. v.contentWindow.report1_saveAsWord()
  133. },
  134. },
  135. watch: {
  136. monthValue (n, o) {
  137. if (n == null) {
  138. this.monthValue = ""
  139. }
  140. }
  141. }
  142. }
  143. </script>
  144. <style scoped>
  145. </style>