2a77088b38c78820b30cc2100f7425e69bb1dc09.svn-base 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <el-row>
  3. <el-col :span="leftCol">
  4. <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'10px'}">
  5. <reportDfxgxdLy
  6. :pid="pid"
  7. :type="type"
  8. :pidNodes="pidNodes"
  9. :style="{'max-height':dxdcAsideHeight+'px'}"
  10. @provTreeSelectChange="provTreeSelectChange"
  11. @changeYear="changeYear"
  12. ></reportDfxgxdLy>
  13. </el-card>
  14. </el-col>
  15. <el-col :span="rightCol">
  16. <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'10px'}">
  17. <div class="date_search_block">
  18. <p class="pall">
  19. <span class="demonstration">选择月份</span>
  20. <el-date-picker
  21. v-model="monthValue"
  22. type="month"
  23. placeholder="请选择"
  24. format="yyyy-MM"
  25. value-format="yyyy-MM">
  26. </el-date-picker>
  27. </p>
  28. <el-button type="primary" icon="el-icon-search" style="float: right;margin:0 5px" @click="searchExecl">查询</el-button>
  29. </div>
  30. <div class="pageoffice_pic" style="width: 100%;height: 100%;">
  31. <iframe :src="'/pageofficePath/dc/pageoffice/sapReport/show?orgId='+orgId+'&currTm='+dateTime"
  32. frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  33. <div class="tip_modal" v-if="!orgId" @click="showTipModal">
  34. </div>
  35. </div>
  36. </el-card>
  37. </el-col>
  38. </el-row>
  39. </template>
  40. <script>
  41. import request from '@util/gw_ajax_request.js';
  42. import reportDfxgxdLy from '../reportDfxgxd_ly';
  43. import {dateFormat, formatDateTimeM} from '@util/gw_date.js';
  44. import globalVariable from "@api/globalVariable.js";
  45. export default {
  46. components: {
  47. reportDfxgxdLy:reportDfxgxdLy,
  48. },
  49. data() {
  50. return {
  51. orgId: '', // 长江委
  52. pid:'000',
  53. pidNodes:[],
  54. type:'029',
  55. dxdcMainHeight: window.innerHeight-110,
  56. dxdcAsideHeight: window.innerHeight-90,
  57. loading:true,
  58. leftCol:4,
  59. rightCol:20,
  60. excelName:'堤防险工险段督查工作报告',
  61. monthValue:'',
  62. dateTime: '',
  63. newType: [],
  64. inputValue: '',
  65. typeValue:[],
  66. typeOptions: [
  67. {
  68. value: '1',
  69. label: '小水库'
  70. }, {
  71. value: '3',
  72. label: '水毁'
  73. }, {
  74. value: '6',
  75. label: '水闸'
  76. }, {
  77. value: '26',
  78. label: '水库防洪'
  79. }, {
  80. value: '27',
  81. label: '山洪'
  82. }, {
  83. value: '29',
  84. label: '防堤'
  85. }, {
  86. value: '30',
  87. label: '超标洪水'
  88. }
  89. ],
  90. }
  91. },
  92. created () {
  93. this.dateTime = formatDateTimeM()
  94. this.monthValue = formatDateTimeM()
  95. },
  96. mounted() {
  97. },
  98. updated () {
  99. console.log(this.orgId, this.newType, this.dateTime)
  100. },
  101. computed: {
  102. userId: function () {
  103. return localStorage.getItem("userid")
  104. ? localStorage.getItem("userid")
  105. : "1098101939614724096";
  106. }
  107. },
  108. methods: {
  109. provTreeSelectChange(data){
  110. console.log(data.id.substr(3))
  111. this.orgId = data.id.substr(3);
  112. // this.orgId = data.id;
  113. },
  114. // 没有选择左侧机构时展示遮罩层并给出提示
  115. showTipModal(){
  116. if(!this.orgId){
  117. this.$message.warning('请先选择左侧机构')
  118. return
  119. }
  120. },
  121. changeYear(val) {
  122. // this.newYear = val;
  123. this.orgId = "";
  124. },
  125. // 条件查询
  126. searchExecl () {
  127. if (this.monthValue == '') {
  128. this.orgId = '';
  129. this.dateTime = formatDateTimeM()
  130. } else {
  131. this.dateTime = this.monthValue;
  132. }
  133. console.log(this.orgId, this.newType, this.dateTime)
  134. }
  135. },
  136. watch:{
  137. monthValue(n,o){
  138. if(n == null){
  139. this.monthValue = "";
  140. }
  141. }
  142. },
  143. activated() {
  144. }
  145. }
  146. </script>
  147. <style lang="scss" scoped>
  148. .date_search_block{
  149. margin-bottom: 20px;
  150. }
  151. .pageoffice_pic{
  152. position: relative;
  153. .tip_modal{
  154. position: absolute;
  155. top: 0;
  156. left: 0;
  157. bottom: 0;
  158. right: 0;
  159. width: 100%;
  160. height: 100%;
  161. }
  162. }
  163. .pall{
  164. display: inline-block;
  165. }
  166. </style>