a3ed2b112823fdf4f22e2151ed0c053ec8d32df3.svn-base 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <el-row>
  3. <el-col :span="leftCol" ref="elw">
  4. <el-card :body-style="{'padding':'0'}">
  5. <export-tree-list-jc
  6. :height="dxdcAsideHeight"
  7. :width="treeWidth"
  8. :style="{'max-height':dxdcAsideHeight+'px'}"
  9. @provTreeSelectChange="provTreeSelectChange"
  10. @provTreeNodeExpand="provTreeNodeExpand"
  11. ></export-tree-list-jc>
  12. </el-card>
  13. </el-col>
  14. <el-col :span="rightCol">
  15. <el-card :body-style="{'padding-top':'10px'}">
  16. <div class="block">
  17. <span class="demonstration" style="margin-right: 5px;margin-left: 7px">报告状态</span>
  18. <el-select v-model="bgType" clearable placeholder="请选择">
  19. <el-option label="专家(交换意见稿)" value="0"></el-option>
  20. <el-option label="交换意见阶段" value="4"></el-option>
  21. <el-option label="成果讨论阶段" value="5"></el-option>
  22. <el-option label="中心修改阶段" value="6"></el-option>
  23. <el-option label="司局修改阶段" value="7"></el-option>
  24. </el-select>
  25. <span class="demonstration" style="margin-right: 5px;margin-left: 7px">专业类型</span>
  26. <el-select v-model="listType" clearable placeholder="请选择" multiple collapse-tags>
  27. <el-option
  28. v-for="item in listTypeOptions"
  29. :key="item.value"
  30. :label="item.label"
  31. :value="item.value">
  32. </el-option>
  33. </el-select>
  34. <!--<span class="demonstration" style="margin-right: 5px;margin-left: 7px">排序方式</span>-->
  35. <!--<el-select v-model="orderBy" clearable placeholder="请选择">-->
  36. <!--<el-option label="严重程度" value="pblmPasi"></el-option>-->
  37. <!--<el-option label="专业类型" value="listType"></el-option>-->
  38. <!--</el-select>-->
  39. <!-- <el-button type="primary" icon="el-icon-download"
  40. style="float: right;margin:0 5px"
  41. @click="exportExecl">导出</el-button> -->
  42. <el-button type="primary" icon="el-icon-search" style="float: right;margin:0 5px" @click="searchExecl">查询</el-button>
  43. </div>
  44. </el-card>
  45. <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'0'}">
  46. <form ref="formMain8" id="formMain8" target="frameMain8" :action="reportSrc" method="post">
  47. <input type="hidden" name="width" v-model="windowWidth">
  48. <input type="hidden" name="height" v-model="windowHeight">
  49. <input id="id" type="hidden" name="rgstrId">
  50. <input id="type" type="hidden" name="type" v-model="wordType">
  51. <input id="userId" type="hidden" name="persId" v-model="userId">
  52. <input id="listType" type="hidden" name="listType" v-model="listType">
  53. <input id="orderBy" type="hidden" name="orderBy" v-model="orderBy">
  54. <!-- <input type="hidden" name="excelName" v-model="excelName"> -->
  55. </form>
  56. <div v-loading="loading" style="width: 100%;height: 100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
  57. <i v-if="firstToShow" style="font-size:32px;" class="el-icon-warning-outline"></i>
  58. <p v-if="firstToShow" style="font-weight: bolder;color: #868686;font-size: larger;">请通过左侧树点击指定区/县,导出报告</p>
  59. <iframe v-show="!firstToShow" ref="frameMain8" id="frameMain8" name="frameMain8" src="" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  60. </div>
  61. </el-card>
  62. </el-col>
  63. </el-row>
  64. </template>
  65. <script>
  66. import request from '@util/gw_ajax_request.js';
  67. import exportTreeListJc from './exportTreeList_jc'
  68. import {dateFormat} from '@util/gw_date.js'
  69. export default {
  70. components: {
  71. exportTreeListJc:exportTreeListJc,
  72. },
  73. data() {
  74. return {
  75. id:'',
  76. pid: '',
  77. dxdcMainHeight: window.innerHeight-150,
  78. dxdcAsideHeight: window.innerHeight-100,
  79. windowHeight:window.innerHeight - 200,
  80. windowWidth:window.innerWidth - 350,
  81. reportSrc2:'/demo/reportJsp/showReport.jsp?rpx=js_TAC_OUTLINE_WORD',
  82. reportSrc:'/pageofficePath/pageoffice/tacReport/show',
  83. loading:false,
  84. leftCol:4,
  85. rightCol:20,
  86. excelName:'稽察报告',
  87. treeWidth: 250,
  88. firstToShow:true,
  89. bgType:'0',
  90. ywType:'1', // 业务类型 基础信息
  91. wordType:'',
  92. type:'400',
  93. listType:[],
  94. listTypeOptions: [
  95. {
  96. value: '1',
  97. label: '前期与设计'
  98. }, {
  99. value: '2',
  100. label: '建设管理'
  101. }, {
  102. value: '3',
  103. label: '计划下达与执行'
  104. }, {
  105. value: '4',
  106. label: '资金使用与管理'
  107. }, {
  108. value: '5',
  109. label: '工程质量'
  110. },{
  111. value: '6',
  112. label: '工程安全'
  113. }
  114. ],
  115. orderBy:'listType',
  116. }
  117. },
  118. mounted() {
  119. this.treeWidth = this.$refs.elw.$el.clientWidth;
  120. },
  121. //生命周期 - 创建完成(可以访问当前this实例)
  122. created() {
  123. // 注意是数组
  124. this.listType = ['1','2','3','4','5','6']
  125. },
  126. computed: {
  127. userId: function () {
  128. return localStorage.getItem("userid")
  129. ? localStorage.getItem("userid")
  130. : "1098101939614724096";
  131. }
  132. },
  133. methods: {
  134. provTreeSelectChange(data){
  135. this.id = data.id.split(',');
  136. this.searchExecl();
  137. },
  138. provTreeNodeExpand(data){
  139. this.id = data.id;
  140. this.pid = data.pid;
  141. this.searchExecl();
  142. },
  143. // 获取Excel数据
  144. searchExecl(){
  145. this.setWordType();
  146. let _this = this;
  147. if( _this.id == ''){
  148. return;
  149. }
  150. if(_this.id != '' && _this.pid !='' && _this.pid.length < 12){
  151. // this.openMessage();
  152. return;
  153. }
  154. let rgstrId = '';
  155. if(_this.bgType != '0' && _this.bgType != ''){
  156. // rgstrId = _this.id + '_' + _this.bgType;
  157. if(typeof(_this.id) == 'string'){
  158. rgstrId = _this.id + "_" + _this.bgType;
  159. }else{
  160. rgstrId = _this.id.map((x)=>{return x + "_" + _this.bgType;}).join(",");
  161. }
  162. }else{
  163. rgstrId = _this.id;
  164. }
  165. // v-model 不同步,只能手动同步了
  166. document.getElementById("id").value = rgstrId;
  167. this.firstToShow = false;
  168. this.loading = true;
  169. // 使用form表单post提交,彻底解决参数值过长的问题
  170. this.$refs.formMain8.submit();
  171. // 使用_this
  172. this.$refs.frameMain8.onload = function(){
  173. _this.loading = false;
  174. };
  175. },
  176. openMessage(){
  177. const h = this.$createElement;
  178. this.$notify({
  179. title: '提示',
  180. message: h('i', { style: 'color: teal'}, '点击组或者工程才会生成报告')
  181. });
  182. },
  183. // 导出Excel数据
  184. exportExecl(){
  185. v = window.frames["frameMain8"];
  186. v.report1_saveAsWord();
  187. },
  188. setWordType(){
  189. // 不足补零 1是基础信息
  190. if(this.type != undefined && this.type.length == 1){
  191. this.wordType = this.ywType + "0"+this.type;
  192. }else if(this.type.length == 2){
  193. this.wordType = this.ywType + this.type;
  194. }else{
  195. this.wordType = this.type;
  196. }
  197. },
  198. },
  199. watch:{
  200. monthValue(n,o){
  201. if(n == null){
  202. this.monthValue = "";
  203. }
  204. }
  205. },
  206. activated() {
  207. this.searchExecl();
  208. }
  209. }
  210. </script>
  211. <style >
  212. </style>