e36aceb4591a5d889e658bad569c0619d67834db.svn-base 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. <template>
  2. <div class="daily_paper">
  3. <!--<h2 class="title">督查简报</h2>-->
  4. <div class="date_wrapper">
  5. <span>日期选择:</span>
  6. <!-- <el-date-picker
  7. v-model="newProblemDate"
  8. type="date"
  9. value-format="yyyy-MM-dd"
  10. placeholder="选择日期">
  11. </el-date-picker>&#x3000; -->
  12. <el-date-picker
  13. v-model="newProblemDate"
  14. type="daterange"
  15. value-format="yyyy-MM-dd"
  16. range-separator="至"
  17. start-placeholder="开始日期"
  18. end-placeholder="结束日期">
  19. </el-date-picker>&#x3000;
  20. <!-- <span>整改日期选择:</span>
  21. <el-date-picker
  22. v-model="rectifyDate"
  23. type="date"
  24. value-format="yyyy-MM-dd"
  25. placeholder="选择日期">
  26. </el-date-picker>&#x3000; -->
  27. <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
  28. <el-button type="primary" icon="el-icon-download" @click="exportWord">导出</el-button>
  29. </div>
  30. <div class="daily_wrapper">
  31. <el-card class="daily_content">
  32. <section>
  33. {{fullDate}},水利督查共派出<span>{{sumInfo.groupCount}}</span>组,人员<span>{{sumInfo.memberCount}}</span>人,涉及<span>{{sumInfo.provCount>32?32:sumInfo.provCount}}</span>省。督查项目主要为农饮水安全、小型水库、水毁修复、南水北调、河湖四乱调查等。
  34. </section>
  35. <section>
  36. {{startDate}}至{{enDate}},新增问题<span>{{sumInfo.newProblemCount}}</span>项,累计发现问题<span>{{sumInfo.allProblemCount}}</span>项;{{startDate}}至{{enDate}},累计完成整改问题<span>{{sumInfo.rectifyCount}}</span>项,累计整改率为<span>{{sumInfo.rectifyRate}}</span>%
  37. </section>
  38. <section>{{startDate}}至{{enDate}},新发现各类问题<span>{{sumInfo.allProblemCounts}}</span>项,包含严重问题<span class="serious">{{sumInfo.seriousProblemCount}}</span>项。其中,农饮水安全<span>{{sumInfo.nongyinProblemCount}}</span>项,小型水库运行管理<span>{{sumInfo.shuikuProblemCount}}</span>项,水毁问题<span>{{sumInfo.shuihuiProblemCount}}</span>项。</section>
  39. <div style="height:300px;width:100%;margin-top:20px;">
  40. <div id="chart1" ref="chart1" style="width:33%;height:100%;float:left;"></div>
  41. <div id="chart2" ref="chart2" style="width:33%;height:100%;float:left;"></div>
  42. <div id="chart3" ref="chart3" style="width:33%;height:100%;float:left;"></div>
  43. </div>
  44. <h3>典型问题</h3>
  45. <div>
  46. <h3 class="second_title">一、农饮水安全</h3>
  47. <section>
  48. 农饮水安全督查共派出<span>{{renyinInfo.groupCount}}</span>组,人员<span>{{renyinInfo.memberCount}}</span>人,涉及<span>{{renyinInfo.provCount}}</span>省,<span>{{renyinInfo.countyCount}}</span>县,<span>{{renyinInfo.villageCount}}</span>村,走访群众<span>{{renyinInfo.userCount}}</span>户。发现问题<span>{{renyinInfo.ProblemCount}}</span>项,其中严重<span class="serious">{{renyinInfo.seriousProblemCount}}</span>项,较重<span class="heavior">{{renyinInfo.heavierProblemCount}}</span>项,一般<span class="common">{{renyinInfo.commonProblemCount}}</span>项
  49. </section>
  50. <!-- <h4>(一)行政村</h4>
  51. <p>1.问题描述(<span>##</span>省<span>##</span>县<span>##</span>村,……)</p>
  52. <p>2.问题照片</p>
  53. <h4>(二)用水户</h4>
  54. <p>1.问题描述(<span>##</span>省<span>##</span>县<span>##</span>村,……)</p>
  55. <p>2.问题照片</p>
  56. <h4>(三)供水过程</h4>
  57. <p>1.问题描述(<span>##</span>省<span>##</span>县<span>##</span>村,……)</p>
  58. <p>2.问题照片</p> -->
  59. </div>
  60. <div>
  61. <h3 class="second_title">二、小型水库</h3>
  62. <section>
  63. 小型水库督查共派出<span>{{shuikuInfo.groupCount}}</span>组,人员<span>{{shuikuInfo.memberCount}}</span>人,涉及<span>{{shuikuInfo.provCount}}</span>省,<span>{{shuikuInfo.reservoirCount}}</span>座水库,其中小I型<span>{{shuikuInfo.smallOneCount}}</span>座,小II型<span>{{shuikuInfo.smallTwoCount}}</span>座。发现问题<span>{{shuikuInfo.ProblemCount}}</span>项,其中严重<span class="serious">{{shuikuInfo.seriousProblemCount}}</span>项,较重<span class="heavior">{{shuikuInfo.heavierProblemCount}}</span>项,一般<span class="common">{{shuikuInfo.commonProblemCount}}</span>项。
  64. </section>
  65. </div>
  66. <div>
  67. <h3 class="second_title">三、水毁修复</h3>
  68. <section>
  69. 水毁修复督查共派出<span>{{shuihuiInfo.groupCount}}</span>组,人员<span>{{shuihuiInfo.memberCount}}</span>人,涉及<span>{{shuihuiInfo.provCount}}</span>省。发现问题<span>{{shuihuiInfo.ProblemCount}}</span>项,其中严重<span class="serious">{{shuihuiInfo.seriousProblemCount}}</span>项,较重<span class="heavior">{{shuihuiInfo.heavierProblemCount}}</span>项,一般<span class="common">{{shuihuiInfo.commonProblemCount}}</span>项。
  70. </section>
  71. </div>
  72. </el-card>
  73. </div>
  74. </div>
  75. </template>
  76. <script>
  77. import request from '../../utils/gw_ajax_request.js'
  78. import echarts from 'echarts'
  79. import {formatDateTimeD,formatDateWeek} from '../../utils/gw_date.js'
  80. import {hostUrl} from '@util/global_variable.js'
  81. export default {
  82. props: [],
  83. data(){
  84. return{
  85. sumInfo: {
  86. groupCount: '',
  87. memberCount: '',
  88. provCount: '',
  89. newProblemCount: '',
  90. allProblemCount: '',
  91. rectifyCount: '',
  92. rectifyRate: '',
  93. allProblemCounts: '',
  94. seriousProblemCount: '',
  95. nongyinProblemCount: '',
  96. shuikuProblemCount: '',
  97. shuihuiProblemCount: ''
  98. },
  99. renyinInfo:{
  100. groupCount: '',
  101. memberCount: '',
  102. provCount: '',
  103. countyCount: '',
  104. villageCount: '',
  105. userCount: '',
  106. ProblemCount: '',
  107. seriousProblemCount: '',
  108. heavierProblemCount: '',
  109. commonProblemCount: ''
  110. },
  111. shuikuInfo:{
  112. groupCount: '',
  113. memberCount: '',
  114. provCount: '',
  115. reservoirCount: '',
  116. smallOneCount: '',
  117. smallTwoCount: '',
  118. ProblemCount: '',
  119. seriousProblemCount: '',
  120. heavierProblemCount: '',
  121. commonProblemCount: ''
  122. },
  123. shuihuiInfo:{
  124. groupCount: '',
  125. memberCount: '',
  126. provCount: '',
  127. ProblemCount: '',
  128. seriousProblemCount: '',
  129. heavierProblemCount: '',
  130. commonProblemCount: ''
  131. },
  132. newProblemDate: [],
  133. // rectifyDate: '',
  134. newProblemDate1: [],
  135. // rectifyDate1: ''
  136. }
  137. },
  138. computed:{
  139. fullDate(){
  140. let dateArr = formatDateTimeD().split('-')
  141. return dateArr[0] + '年' + dateArr[1] + '月' + dateArr[2] + '日'
  142. },
  143. startDate(){
  144. let dateArr
  145. if(this.newProblemDate1.length){
  146. dateArr = this.newProblemDate1[0].split('-')
  147. return dateArr[1] + '月' + dateArr[2] + '日'
  148. }
  149. },
  150. enDate(){
  151. let dateArr
  152. if(this.newProblemDate1.length){
  153. dateArr = this.newProblemDate1[1].split('-')
  154. return dateArr[1] + '月' + dateArr[2] + '日'
  155. }
  156. },
  157. // dateRectify(){
  158. // let dateArr = this.rectifyDate1.split('-')
  159. // return dateArr[1] + '月' + dateArr[2] + '日'
  160. // },
  161. },
  162. created(){
  163. this.newProblemDate[0] = formatDateWeek(7)
  164. this.newProblemDate[1] = formatDateTimeD()
  165. },
  166. mounted(){
  167. // this.rectifyDate = formatDateTimeD()
  168. this.newProblemDate1 = this.newProblemDate
  169. // this.rectifyDate1 = this.rectifyDate
  170. this.getGroupPersPro()
  171. this.getPblmCount()
  172. this.getAddPblmCount()
  173. this.getVillInfo()
  174. this.getRsvrInfo()
  175. this.getRectInfo()
  176. this.getPblmCountByType()
  177. },
  178. methods:{
  179. getGroupPersPro(){
  180. request.get('dc/brief/report/getGroupPersPro').then(res=>{
  181. if(res.success){
  182. this.sumInfo.groupCount = res.data.groupNum
  183. this.sumInfo.memberCount = res.data.persNum
  184. this.sumInfo.provCount = res.data.proNum
  185. }else{
  186. this.$message.error(res.message)
  187. }
  188. })
  189. },
  190. getPblmCount(){
  191. request.post(`dc/brief/report/getPblmCount?sttm=${this.newProblemDate[0]}&entm=${this.newProblemDate[1]}&gsttm=${this.newProblemDate[0]}&gentm=${this.newProblemDate[1]}`).then(res=>{
  192. if(res.success){
  193. this.sumInfo.newProblemCount = res.data.addNum
  194. this.sumInfo.allProblemCount = res.data.countNum
  195. this.sumInfo.rectifyCount = res.data.gNum
  196. this.sumInfo.rectifyRate = res.data.gRate
  197. }else{
  198. this.$message.error(res.message)
  199. }
  200. })
  201. },
  202. getAddPblmCount(){
  203. request.post(`dc/brief/report/getAddPblmCount?sttm=${this.newProblemDate[0]}&entm=${this.newProblemDate[1]}`).then(res=>{
  204. if(res.success){
  205. this.sumInfo.seriousProblemCount = res.data.ySum
  206. this.sumInfo.shuihuiProblemCount = res.data.rectNum
  207. this.sumInfo.nongyinProblemCount = res.data.villNum
  208. this.sumInfo.shuikuProblemCount = res.data.rsvrNum
  209. this.sumInfo.allProblemCounts = res.data.addSum
  210. }else{
  211. this.$message.error(res.message)
  212. }
  213. })
  214. },
  215. getVillInfo(){
  216. request.get('dc/brief/report/getVillInfo').then(res=>{
  217. if(res.success){
  218. this.renyinInfo.groupCount = res.data.groupNum
  219. this.renyinInfo.memberCount = res.data.persNum
  220. this.renyinInfo.provCount = res.data.proNum
  221. this.renyinInfo.countyCount = res.data.countyNum
  222. this.renyinInfo.villageCount = res.data.villNum
  223. this.renyinInfo.userCount = res.data.wUserNum
  224. }else{
  225. this.$message.error(res.message)
  226. }
  227. })
  228. },
  229. getRsvrInfo(){
  230. request.get('dc/brief/report/getRsvrInfo').then(res=>{
  231. if(res.success){
  232. this.shuikuInfo.groupCount = res.data.groupNum
  233. this.shuikuInfo.memberCount = res.data.persNum
  234. this.shuikuInfo.provCount = res.data.proNum
  235. this.shuikuInfo.reservoirCount = res.data.rsvrNum
  236. this.shuikuInfo.smallOneCount = res.data.rsvrNum1
  237. this.shuikuInfo.smallTwoCount = res.data.rsvrNum2
  238. }else{
  239. this.$message.error(res.message)
  240. }
  241. })
  242. },
  243. getRectInfo(){
  244. request.get('dc/brief/report/getRectInfo').then(res=>{
  245. if(res.success){
  246. this.shuihuiInfo.groupCount = res.data.groupNum
  247. this.shuihuiInfo.memberCount = res.data.persNum
  248. this.shuihuiInfo.provCount = res.data.proNum
  249. }else{
  250. this.$message.error(res.message)
  251. }
  252. })
  253. },
  254. getPblmCountByType(){
  255. // 1:小水库 2:人饮 3:水毁
  256. try{
  257. request.post(`dc/brief/report/getPblmCountByType?sttm=${this.newProblemDate[0]}&entm=${this.newProblemDate[1]}&objType=1`).then(res=>{
  258. if(res.success){
  259. this.shuikuInfo.ProblemCount = res.data.num1 + res.data.num2 + res.data.num3
  260. this.shuikuInfo.seriousProblemCount = res.data.num3
  261. this.shuikuInfo.heavierProblemCount = res.data.num2
  262. this.shuikuInfo.commonProblemCount = res.data.num1
  263. this.initXiaoShuiKuProblemChart();
  264. }else{
  265. this.$message.error(res.message)
  266. this.shuikuInfo.ProblemCount = 0;
  267. this.shuikuInfo.seriousProblemCount = 0;
  268. this.shuikuInfo.heavierProblemCount = 0;
  269. this.shuikuInfo.commonProblemCount = 0;
  270. this.initXiaoShuiKuProblemChart();
  271. }
  272. })
  273. }catch(e){
  274. this.$message.error(res.message)
  275. this.shuikuInfo.ProblemCount = 0;
  276. this.shuikuInfo.seriousProblemCount = 0;
  277. this.shuikuInfo.heavierProblemCount = 0;
  278. this.shuikuInfo.commonProblemCount = 0;
  279. this.initXiaoShuiKuProblemChart();
  280. }
  281. try{
  282. request.post(`dc/brief/report/getPblmCountByType?sttm=${this.newProblemDate[0]}&entm=${this.newProblemDate[1]}&objType=2`).then(res=>{
  283. if(res.success){
  284. this.renyinInfo.ProblemCount = res.data.num1 + res.data.num2 + res.data.num3
  285. this.renyinInfo.seriousProblemCount = res.data.num3
  286. this.renyinInfo.heavierProblemCount = res.data.num2
  287. this.renyinInfo.commonProblemCount = res.data.num1
  288. this.initNongYinProblemChart();
  289. }else{
  290. this.$message.error(res.message);
  291. this.renyinInfo.seriousProblemCount =0;
  292. this.renyinInfo.heavierProblemCount = 0;
  293. this.renyinInfo.commonProblemCount = 0;
  294. this.initNongYinProblemChart();
  295. }
  296. })
  297. }catch(e){
  298. this.$message.error(res.message);
  299. this.renyinInfo.seriousProblemCount =0;
  300. this.renyinInfo.heavierProblemCount = 0;
  301. this.renyinInfo.commonProblemCount = 0;
  302. this.initNongYinProblemChart();
  303. }
  304. try{
  305. request.post(`dc/brief/report/getPblmCountByType?sttm=${this.newProblemDate[0]}&entm=${this.newProblemDate[1]}&objType=3`).then(res=>{
  306. if(res.success){
  307. this.shuihuiInfo.ProblemCount = res.data.num1 + res.data.num2 + res.data.num3
  308. this.shuihuiInfo.seriousProblemCount = res.data.num3
  309. this.shuihuiInfo.heavierProblemCount = res.data.num2
  310. this.shuihuiInfo.commonProblemCount = res.data.num1
  311. this.initShuiHuiProblemChart();
  312. }else{
  313. this.$message.error(res.message);
  314. this.shuihuiInfo.ProblemCount = 0;
  315. this.shuihuiInfo.seriousProblemCount = 0;
  316. this.shuihuiInfo.heavierProblemCount = 0;
  317. this.shuihuiInfo.commonProblemCount = 0;
  318. this.initShuiHuiProblemChart();
  319. }
  320. })
  321. }catch(e){
  322. this.$message.error(res.message);
  323. this.shuihuiInfo.ProblemCount = 0;
  324. this.shuihuiInfo.seriousProblemCount = 0;
  325. this.shuihuiInfo.heavierProblemCount = 0;
  326. this.shuihuiInfo.commonProblemCount = 0;
  327. this.initShuiHuiProblemChart();
  328. }
  329. },
  330. initNongYinProblemChart:function(){
  331. let chart = echarts.init(this.$refs.chart1);
  332. let arr_name = ['一般问题','较重问题','严重问题'];
  333. let arr_color = ['#14dfe1', '#ffb760', '#ff5883'];
  334. let option = {
  335. title:{
  336. text:'农饮水安全问题分布',
  337. left:'center',
  338. },
  339. grid: {
  340. bottom: '20%'
  341. },
  342. xAxis: {
  343. "show" : true,
  344. data:arr_name,
  345. },
  346. yAxis: [{
  347. name: '',
  348. // type: 'value',
  349. splitArea: {
  350. show: false
  351. },
  352. "show" : false,
  353. }],
  354. series:[
  355. {
  356. type:'bar',
  357. data: [
  358. {
  359. // value:this.shuikuInfo.commonProblemCount,
  360. value:this.renyinInfo.commonProblemCount,
  361. label: {
  362. show: true,
  363. position: 'top',
  364. textStyle: {
  365. // color: '#fff',
  366. fontSize:15
  367. }
  368. },
  369. itemStyle:{
  370. color:arr_color[0],
  371. },
  372. },
  373. {
  374. // value:this.renyinInfo.heavierProblemCount,
  375. value:this.renyinInfo.heavierProblemCount,
  376. label: {
  377. show: true,
  378. position: 'top',
  379. textStyle: {
  380. // color: '#fff',
  381. fontSize:15
  382. }
  383. },
  384. itemStyle:{
  385. color:arr_color[1],
  386. },
  387. },
  388. {
  389. // value:this.shuikuInfo.seriousProblemCount,
  390. value:this.renyinInfo.seriousProblemCount,
  391. label: {
  392. show: true,
  393. position: 'top',
  394. textStyle: {
  395. // color: '#fff',
  396. fontSize:15
  397. }
  398. },
  399. itemStyle:{
  400. color:arr_color[2],
  401. },
  402. },
  403. ],
  404. }
  405. ],
  406. };
  407. chart.setOption(option);
  408. },
  409. initXiaoShuiKuProblemChart:function(){
  410. let chart = echarts.init(this.$refs.chart2);
  411. let arr_name = ['一般问题','较重问题','严重问题'];
  412. let arr_color = ['#14dfe1', '#ffb760', '#ff5883'];
  413. let option = {
  414. title:{
  415. text:'小水库问题分布',
  416. left:'center',
  417. },
  418. grid: {
  419. bottom: '20%'
  420. },
  421. xAxis: {
  422. "show" : true,
  423. data:arr_name,
  424. },
  425. yAxis: [{
  426. name: '',
  427. // type: 'value',
  428. splitArea: {
  429. show: false
  430. },
  431. "show" : false,
  432. }],
  433. series:[
  434. {
  435. type:'bar',
  436. data: [
  437. {
  438. // value:this.shuikuInfo.commonProblemCount,
  439. value:this.shuikuInfo.commonProblemCount,
  440. label: {
  441. show: true,
  442. position: 'top',
  443. textStyle: {
  444. // color: '#fff',
  445. fontSize:15
  446. }
  447. },
  448. itemStyle:{
  449. color:arr_color[0],
  450. },
  451. },
  452. {
  453. // value:this.renyinInfo.heavierProblemCount,
  454. value:this.shuikuInfo.heavierProblemCount,
  455. label: {
  456. show: true,
  457. position: 'top',
  458. textStyle: {
  459. // color: '#fff',
  460. fontSize:15
  461. }
  462. },
  463. itemStyle:{
  464. color:arr_color[1],
  465. },
  466. },
  467. {
  468. // value:this.shuikuInfo.seriousProblemCount,
  469. value:this.shuikuInfo.seriousProblemCount,
  470. label: {
  471. show: true,
  472. position: 'top',
  473. textStyle: {
  474. // color: '#fff',
  475. fontSize:15
  476. }
  477. },
  478. itemStyle:{
  479. color:arr_color[2],
  480. },
  481. },
  482. ],
  483. }
  484. ],
  485. };
  486. chart.setOption(option);
  487. },
  488. initShuiHuiProblemChart:function(){
  489. let chart = echarts.init(this.$refs.chart3);
  490. let arr_name = ['一般问题','较重问题','严重问题'];
  491. let arr_color = ['#14dfe1', '#ffb760', '#ff5883'];
  492. let option = {
  493. title:{
  494. text:'水毁修复问题分布',
  495. left:'center',
  496. },
  497. grid: {
  498. bottom: '20%'
  499. },
  500. xAxis: {
  501. "show" : true,
  502. data:arr_name,
  503. },
  504. yAxis: [{
  505. name: '',
  506. // type: 'value',
  507. splitArea: {
  508. show: false
  509. },
  510. "show" : false,
  511. }],
  512. series:[
  513. {
  514. type:'bar',
  515. data: [
  516. {
  517. // value:this.shuikuInfo.commonProblemCount,
  518. value:this.shuihuiInfo.commonProblemCount,
  519. label: {
  520. show: true,
  521. position: 'top',
  522. textStyle: {
  523. // color: '#fff',
  524. fontSize:15
  525. }
  526. },
  527. itemStyle:{
  528. color:arr_color[0],
  529. },
  530. },
  531. {
  532. // value:this.renyinInfo.heavierProblemCount,
  533. value:this.shuihuiInfo.heavierProblemCount,
  534. label: {
  535. show: true,
  536. position: 'top',
  537. textStyle: {
  538. // color: '#fff',
  539. fontSize:15
  540. }
  541. },
  542. itemStyle:{
  543. color:arr_color[1],
  544. },
  545. },
  546. {
  547. // value:this.shuikuInfo.seriousProblemCount,
  548. value:this.shuihuiInfo.seriousProblemCount,
  549. label: {
  550. show: true,
  551. position: 'top',
  552. textStyle: {
  553. // color: '#fff',
  554. fontSize:15
  555. }
  556. },
  557. itemStyle:{
  558. color:arr_color[2],
  559. },
  560. },
  561. ],
  562. }
  563. ],
  564. };
  565. chart.setOption(option);
  566. },
  567. search(){
  568. this.newProblemDate1 = this.newProblemDate
  569. this.rectifyDate1 = this.rectifyDate
  570. this.getPblmCount()
  571. this.getAddPblmCount()
  572. this.getPblmCountByType()
  573. this.getPblmCount()
  574. },
  575. exportWord:function(){
  576. // 导出
  577. // var xhr = new XMLHttpRequest();
  578. // xhr.open('get', `/pdcApi/dc/brief/report/exportWord?sttm=${this.newProblemDate[0]}&entm=${this.newProblemDate[1]}&objType=3`, true);
  579. // xhr.responseType = 'blob';
  580. // xhr.setRequestHeader('Content-Type', 'application/json;charset=utf-8');
  581. // xhr.setRequestHeader('persId', localStorage.getItem('userid') ? localStorage.getItem('userid') : '');
  582. // xhr.onload = function () {
  583. // if (this.status == 200) {
  584. // var blob = this.response;
  585. // var a = document.createElement('a');
  586. // var url = window.URL.createObjectURL(blob);
  587. // a.href = url;
  588. // //设置文件名称
  589. // a.download = '督查简报.doc';
  590. // a.click();
  591. // }
  592. // }
  593. // xhr.send();
  594. // 生成WORD
  595. request.get(`/bis/insp/stat/getDocByTm/${this.newProblemDate[0]}/${this.newProblemDate[1]}`).then(res=>{
  596. if(res.success){
  597. let path = res.data.key;
  598. this.openPageoffice(path)
  599. }else{
  600. this.$message.error(res.message)
  601. }
  602. })
  603. },
  604. openPageoffice:function(path){
  605. // 打开WORD
  606. let host = hostUrl;
  607. let nginx = '/pageofficePath/';
  608. let href = 'pageoffice://|'+host+nginx+'/pageoffice/dcSimpleReport/word?path='+path+'|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
  609. let a = document.createElement('a'); // 创建a标签
  610. a.setAttribute('href', href);// href链接
  611. a.click();// 自执行点击事件
  612. console.log(href)
  613. },
  614. },
  615. watch:{
  616. newProblemDate(){
  617. // this.search();
  618. }
  619. },
  620. }
  621. </script>
  622. <style scoped>
  623. .daily_paper{
  624. margin-top: 20px;
  625. line-height: 30px;
  626. }
  627. .daily_paper>.daily_wrapper{
  628. height: calc(100vh - 210px);
  629. overflow: auto;
  630. }
  631. .daily_paper .date_wrapper{
  632. width: 1200px;
  633. margin: 20px auto;
  634. }
  635. .daily_paper .title{
  636. text-align: center;
  637. }
  638. .daily_paper .daily_content{
  639. width: 1200px;
  640. margin: 0 auto 20px;
  641. }
  642. .daily_paper section,h3,h4,p{
  643. margin-top: 10px;
  644. text-indent: 2em;
  645. }
  646. .daily_paper .second_title{
  647. font-size: 18px;
  648. }
  649. .daily_paper .daily_content span{
  650. display: inline-block;
  651. padding: 0 2px;
  652. text-indent: 0;
  653. font-weight: bold;
  654. color: #009cee;
  655. }
  656. .daily_paper .daily_content .serious{
  657. color: #ff5883;
  658. }
  659. .daily_paper .daily_content .heavior{
  660. color: #ffb760;
  661. }
  662. .daily_paper .daily_content .common{
  663. color: #14dfe1;
  664. }
  665. </style>