fe90e5d8ca2958971628098d751af6274b3e8653.svn-base 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <el-row>
  3. <el-col :span="leftCol" ref="elw">
  4. <el-card :body-style="{'padding':'0'}">
  5. <provTreeList :rootCode="rootCode" :rootType="rootType"
  6. @provTreeSelectChange="provTreeSelectChangeHandler"
  7. :style="{'max-height':dxdcAsideHeight+'px'}"
  8. :defaultExpandedKeys="defaultExpandedKeys"
  9. >
  10. </provTreeList>
  11. </el-card>
  12. </el-col>
  13. <el-col :span="rightCol">
  14. <el-card :body-style="{'padding-top':'10px'}">
  15. <div class="block">
  16. <el-button type="primary" icon="el-icon-search" style="float: right;margin:0 5px" @click="searchExecl">查询</el-button>
  17. </div>
  18. </el-card>
  19. <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'0'}">
  20. <form ref="formMain8" id="formMain8" target="frameMain8" :action="reportSrc" method="post">
  21. <input id="id" type="hidden" name="id">
  22. <input id="adCode" type="hidden" name="adCode">
  23. </form>
  24. <div v-loading="loading" style="width: 100%;height: 100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
  25. <i v-if="firstToShow" style="font-size:32px;" class="el-icon-warning-outline"></i>
  26. <p v-if="firstToShow" style="font-weight: bolder;color: #868686;font-size: larger;">请通过左侧树点击指定地区,导出报告</p>
  27. <iframe v-show="!firstToShow" ref="frameMain8" id="frameMain8" name="frameMain8" src="" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  28. </div>
  29. </el-card>
  30. </el-col>
  31. </el-row>
  32. </template>
  33. <script>
  34. import request from '@util/gw_ajax_request.js';
  35. import provTreeList from '@widget/provTreeList.vue';
  36. import {dateFormat} from '@util/gw_date.js'
  37. export default {
  38. components: {
  39. provTreeList:provTreeList,
  40. },
  41. data() {
  42. return {
  43. defaultExpandedKeys:['350000000000'],
  44. adCode:'',
  45. dxdcMainHeight: window.innerHeight-150,
  46. dxdcAsideHeight: window.innerHeight-100,
  47. windowHeight:window.innerHeight - 200,
  48. windowWidth:window.innerWidth - 350,
  49. reportSrc:'/pageofficePath/dc/pageoffice/hcbg/show',
  50. // reportSrc:'http://10.1.102.140:9002/dc/pageoffice/hcbg/show',
  51. loading:false,
  52. leftCol:4,
  53. rightCol:20,
  54. excelName:'核查报告',
  55. treeWidth: 250,
  56. firstToShow:true,
  57. rootCode:'000000',
  58. rootType:'2',
  59. }
  60. },
  61. mounted() {
  62. this.treeWidth = this.$refs.elw.$el.clientWidth;
  63. },
  64. //生命周期 - 创建完成(可以访问当前this实例)
  65. created() {
  66. // 注意是数组
  67. },
  68. computed: {
  69. userId: function () {
  70. return localStorage.getItem("userid")
  71. ? localStorage.getItem("userid")
  72. : "1098101939614724096";
  73. }
  74. },
  75. methods: {
  76. provTreeSelectChangeHandler: function(params) {
  77. this.adCode = params.code;
  78. this.searchExecl();
  79. },
  80. // 获取Excel数据
  81. searchExecl(){
  82. let _this = this;
  83. if( _this.adCode == ''){
  84. return;
  85. }
  86. // v-model 不同步,只能手动同步了
  87. document.getElementById("adCode").value = _this.adCode;
  88. this.firstToShow = false;
  89. this.loading = true;
  90. // 使用form表单post提交,彻底解决参数值过长的问题
  91. this.$refs.formMain8.submit();
  92. // 使用_this
  93. this.$refs.frameMain8.onload = function(){
  94. _this.loading = false;
  95. };
  96. },
  97. },
  98. watch:{
  99. },
  100. activated() {
  101. this.searchExecl();
  102. }
  103. }
  104. </script>
  105. <style >
  106. </style>