c87d28189fa30fbdd3428fa12a28f37d951f67df.svn-base 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <el-container>
  3. <el-main id="dxdcListMain" style="padding:5px 10px;">
  4. <el-row>
  5. <el-col :span="leftCol" ref="elw">
  6. <el-card :body-style="{'padding':'0'}" :style="{'height':dxdcMainHeight + 'px'}">
  7. <div style="text-indent: 10px;width: 100%;display: flex;align-items: center;height:50px;">
  8. <span style="width: 80px">督查类别</span>
  9. <el-select v-model="type" placeholder="请选择">
  10. <el-option
  11. v-for="item in typeList"
  12. :key="item.value"
  13. :label="item.label"
  14. :value="item.value">
  15. </el-option>
  16. </el-select>
  17. </div>
  18. <export-tree-list-fs
  19. :pid="pid"
  20. :type="type"
  21. :fsType="'noGroup'"
  22. :pidNodes="pidNodes"
  23. :level="level"
  24. :height="dxdcAsideHeight"
  25. :width="treeWidth"
  26. @provTreeSelectChange="provTreeSelectChange"
  27. />
  28. </el-card>
  29. </el-col>
  30. <el-col :span="rightCol" :style="{'height':dxdcMainHeight + 'px'}">
  31. <el-card :body-style="{'padding':'0'}" :style="{'height':dxdcMainHeight + 'px'}">
  32. <div
  33. style="text-indent: 10px;width: 100%;border-bottom: 1px solid #e6e6e6;display: flex;align-items: center;height:50px;">
  34. <span style="font-size: 14px;">督查状态</span>
  35. <el-select v-model="state" multiple placeholder="请选择" @change="changState">
  36. <el-option
  37. v-for="item in options"
  38. :key="item.value"
  39. :label="item.label"
  40. :value="item.value">
  41. </el-option>
  42. </el-select>
  43. </div>
  44. <div
  45. style="width: 100%;height: calc(100% - 80px);display:flex;flex-direction:row;justify-content:center;align-items:center;"
  46. v-loading="loading">
  47. <i v-if="firstToShow" style="font-size:32px;" class="el-icon-warning-outline"></i>
  48. <p v-if="firstToShow" style="font-weight: bolder;color: #868686;font-size: larger;">请先选择左侧树到县后,查看报告</p>
  49. <iframe v-show="!firstToShow"
  50. :src="'/pageofficePath/dc/pageoffice/report/show?ids=' + year + ','+ adcode +','+state.join('_')+'&type=' + wordType"
  51. frameborder="0"
  52. width="100%" height="100%" scrolling="no"></iframe>
  53. <div class="limit_modal" v-if="!adcode" @click="showTips"></div>
  54. </div>
  55. </el-card>
  56. </el-col>
  57. </el-row>
  58. </el-main>
  59. </el-container>
  60. </template>
  61. <script>
  62. import request from "../../../../utils/gw_ajax_request.js";
  63. import exportTreeListFs from "../../exportTreeList_fs";
  64. import { dateFormat } from "@util/gw_date.js";
  65. export default {
  66. components: {
  67. exportTreeListFs: exportTreeListFs
  68. },
  69. data() {
  70. return {
  71. state: ["2"],
  72. options: [
  73. { label: "未督查", value: "0" },
  74. { label: "督查中", value: "1" },
  75. { label: "已督查", value: "2" }
  76. ],
  77. typeList: [
  78. { label: "小型水库核查", value: "001" },
  79. { label: "大中型水库核查", value: "080" }
  80. ],
  81. ids: [],
  82. id: "",
  83. pid: "000",
  84. pidNodes: [],
  85. type: "001",
  86. typeTwo: "022",
  87. level: "4",
  88. year: "",
  89. wordType: "rslkbk",
  90. firstToShow: true,
  91. dxdcMainHeight: window.innerHeight - 85,
  92. dxdcAsideHeight: window.innerHeight - 130,
  93. windowHeight: window.innerHeight - 160,
  94. windowWidth: window.innerWidth - 250,
  95. reportSrc: "/demo/reportJsp/showReport.jsp?rpx=fj_xian_matter",
  96. radioTable: 1,
  97. loading: false,
  98. leftCol: 5,
  99. rightCol: 19,
  100. excelName: "市督查检查报告",
  101. monthValue: dateFormat(new Date(), "yyyy-MM"),
  102. findTime: [],
  103. sttm: "",
  104. ettm: "",
  105. treeWidth: 250,
  106. dcType: "",
  107. adcode: "",
  108. objId: "",
  109. bigReverId: "",
  110. bigReverAdCode: "",
  111. adName: "",
  112. bigReverAdName: ""
  113. };
  114. },
  115. mounted() {
  116. this.treeWidth = this.$refs.elw.$el.clientWidth;
  117. },
  118. computed: {
  119. userId: function() {
  120. return localStorage.getItem("userid")
  121. ? localStorage.getItem("userid")
  122. : "1098101939614724096";
  123. }
  124. },
  125. methods: {
  126. changState(val) {
  127. this.state = val;
  128. },
  129. openMessage() {
  130. const h = this.$createElement;
  131. this.$notify({
  132. title: "提示",
  133. message: h("i", { style: "color: teal" }, "点击县才会生成报告")
  134. });
  135. },
  136. provTreeSelectChange(data) {
  137. this.id = data.ppid;
  138. this.adcode = data.id;
  139. this.year = data.year;
  140. this.adName = data.pnm;
  141. },
  142. provTreeSelectChangeBig(data) {
  143. this.bigReverId = data.ppid;
  144. this.bigReverAdCode = data.id;
  145. this.bigReverAdName = data.pnm;
  146. },
  147. showTips() {
  148. this.$message.warning("请先在左侧树选择到对应的行政区划");
  149. },
  150. // 获取Excel数据
  151. searchExecl() {
  152. let _this = this;
  153. if (
  154. (_this.adcode != "" && _this.adcode.length != 12) ||
  155. _this.adcode.substr(0, 1) == "0"
  156. ) {
  157. this.openMessage();
  158. return;
  159. }
  160. this.loading = true;
  161. // 使用form表单post提交,彻底解决参数值过长的问题
  162. this.$refs.formMain3.submit();
  163. this.$refs.frameMain3.onload = function() {
  164. _this.loading = false;
  165. };
  166. },
  167. // 导出Excel数据
  168. exportExecl() {
  169. window.frames["frameMain3"].report1_saveAsWord();
  170. }
  171. },
  172. watch: {
  173. adcode(val, newval) {
  174. if (val !== undefined && val !== null && val !== "") {
  175. this.firstToShow = false;
  176. } else {
  177. this.firstToShow = true;
  178. }
  179. },
  180. type(val) {
  181. if (val == "001") {
  182. this.level = "4";
  183. this.wordType = "rslkbk";
  184. } else if (val == "080") {
  185. this.level = "3";
  186. this.wordType = "rslkbk2";
  187. }
  188. }
  189. },
  190. activated() {
  191. // this.searchExecl();
  192. }
  193. };
  194. </script>
  195. <style lang="scss" scoped>
  196. .tree_wrapper {
  197. height: calc(100vh - 30px);
  198. overflow: auto;
  199. }
  200. .word_wrapper {
  201. height: 600px;
  202. margin: 5px;
  203. position: relative;
  204. .select_info {
  205. width: 360px;
  206. span {
  207. display: inline-block;
  208. width: 50%;
  209. }
  210. }
  211. .limit_modal {
  212. position: absolute;
  213. top: 0;
  214. bottom: 0;
  215. left: 0;
  216. right: 0;
  217. width: 100%;
  218. height: 100%;
  219. }
  220. }
  221. </style>