38908039e7b7a50442aa10b4cf29ae8a7ffe33f8.svn-base 6.7 KB

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