a1896c03707d61b1fe973d319508e7a9ade7dcf5.svn-base 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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"
  16. @click="searchExecl">查询
  17. </el-button>
  18. </div>
  19. <div class="pageoffice_pic" style="width: 100%;height: 100%;">
  20. <iframe :src="'/pageofficePath/dc/pageoffice/samrmp/show?orgId='+orgIdNew+'&sttm='+sttm+'&entm='+entm"
  21. frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  22. <div class="tip_modal" v-if="!monthValue.length" @click="showTipModal"></div>
  23. </div>
  24. </el-card>
  25. </el-col>
  26. </el-row>
  27. </template>
  28. <script>
  29. import exportTreeListLy from '../exportTreeList_ly';
  30. import {dateFormat,getFirstDayOfMonth} from '@util/gw_date.js';
  31. export default {
  32. components: {
  33. exportTreeListLy: exportTreeListLy,
  34. },
  35. data() {
  36. return {
  37. orgId: '', // 长江委
  38. pid: '000',
  39. pidNodes: [],
  40. type: '035',
  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. orgIdNew() {
  61. return localStorage.getItem("orgId")
  62. ? localStorage.getItem("orgId")
  63. : "";
  64. }
  65. },
  66. methods: {
  67. // 条件查询
  68. searchExecl() {
  69. console.log(this.monthValue);
  70. if (this.monthValue == '') {
  71. this.sttm = '';
  72. this.entm = '';
  73. } else {
  74. this.sttm = this.monthValue[0];
  75. this.entm = this.monthValue[1];
  76. }
  77. },
  78. // 没有选择左侧机构时展示遮罩层并给出提示
  79. showTipModal() {
  80. if (!this.monthValue.length) {
  81. this.$message.warning('请先选择起始日期')
  82. return;
  83. }
  84. }
  85. },
  86. watch: {
  87. monthValue(n, o) {
  88. if (n == null) {
  89. this.monthValue = "";
  90. }
  91. }
  92. },
  93. activated() {
  94. }
  95. }
  96. </script>
  97. <style lang="scss" scoped>
  98. .date_search_block {
  99. margin-bottom: 20px;
  100. }
  101. .pageoffice_pic {
  102. position: relative;
  103. .tip_modal {
  104. position: absolute;
  105. top: 0;
  106. left: 0;
  107. bottom: 0;
  108. right: 0;
  109. width: 100%;
  110. height: 100%;
  111. }
  112. }
  113. </style>