7cff6b8806fc36a7bf51d73a996eb4296df128b6.svn-base 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <el-row>
  3. <el-col :span="rightCol">
  4. <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'10px'}">
  5. <div class="date_search_block">
  6. <span class="demonstration">选择日期</span>
  7. <el-date-picker
  8. v-model="monthValue"
  9. type="daterange"
  10. range-separator="至"
  11. start-placeholder="开始日期"
  12. end-placeholder="结束日期"
  13. value-format="yyyy-MM-dd">
  14. </el-date-picker>
  15. <el-button type="primary" icon="el-icon-search" style="float: right;margin:0 5px" @click="searchExecl">查询</el-button>
  16. </div>
  17. <div class="pageoffice_pic" style="width: 100%;height: 100%;">
  18. <iframe :src="'/pageofficePath/dc/pageoffice/rssfdr/show?orgId='+orgId+'&sttm='+sttm+'&entm='+entm"
  19. frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  20. <div class="tip_modal" v-if="!orgId" @click="showTipModal">
  21. </div>
  22. </div>
  23. </el-card>
  24. </el-col>
  25. </el-row>
  26. </template>
  27. <script>
  28. import request from '@util/gw_ajax_request.js';
  29. import exportTreeListLy from '../exportTreeList_ly';
  30. import {dateFormat,getFirstDayOfMonth} from '@util/gw_date.js';
  31. import globalVariable from "@api/globalVariable.js";
  32. export default {
  33. components: {
  34. exportTreeListLy:exportTreeListLy,
  35. },
  36. data() {
  37. return {
  38. pid:'000',
  39. pidNodes:[],
  40. type:'006',
  41. dxdcMainHeight: window.innerHeight-110,
  42. dxdcAsideHeight: window.innerHeight-90,
  43. loading:true,
  44. leftCol:4,
  45. rightCol:24,
  46. excelName:'流域水闸专项检查工作报告',
  47. monthValue:[getFirstDayOfMonth(new Date(), 'yyyy-MM-dd'), dateFormat(new Date(), 'yyyy-MM-dd')],
  48. sttm: getFirstDayOfMonth(new Date(), 'yyyy-MM-dd'),
  49. entm: dateFormat(new Date(), 'yyyy-MM-dd')
  50. }
  51. },
  52. mounted() {
  53. },
  54. computed: {
  55. userId: function () {
  56. return localStorage.getItem("userid")
  57. ? localStorage.getItem("userid")
  58. : "1098101939614724096";
  59. },
  60. orgId(){
  61. return localStorage.getItem('orgId') ? localStorage.getItem('orgId') : ''
  62. }
  63. },
  64. methods: {
  65. // 条件查询
  66. searchExecl () {
  67. console.log(this.monthValue);
  68. if (this.monthValue == '') {
  69. this.sttm = '';
  70. this.entm = '';
  71. } else {
  72. this.sttm = this.monthValue[0];
  73. this.entm = this.monthValue[1];
  74. }
  75. },
  76. // 没有选择左侧机构时展示遮罩层并给出提示
  77. showTipModal(){
  78. if(!this.orgId){
  79. this.$message.warning('请先选择左侧机构')
  80. return
  81. }
  82. }
  83. },
  84. watch:{
  85. monthValue(n,o){
  86. if(n == null){
  87. this.monthValue = "";
  88. }
  89. }
  90. },
  91. activated() {
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .date_search_block{
  97. margin-bottom: 20px;
  98. }
  99. .pageoffice_pic{
  100. position: relative;
  101. .tip_modal{
  102. position: absolute;
  103. top: 0;
  104. left: 0;
  105. bottom: 0;
  106. right: 0;
  107. width: 100%;
  108. height: 100%;
  109. }
  110. }
  111. </style>