| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <template>
- <el-row>
- <el-col :span="24">
- <el-card :body-style="{'padding-top':'10px'}">
- <div class="block">
- <span class="demonstration" style="margin-right: 5px">选择时间段</span>
- <el-date-picker
- v-model="findTime"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- <span class="demonstration" style="margin-right: 5px;margin-left: 7px">督查状态</span>
- <el-select v-model="dcType" clearable placeholder="督查状态">
- <el-option label="未督查" value="0"></el-option>
- <el-option label="督查中" value="1"></el-option>
- <el-option label="已督查" value="2"></el-option>
- </el-select>
- <span class="demonstration" style="margin-right: 5px;margin-left: 7px">问题类别</span>
- <!--<el-select v-model="type" clearable placeholder="问题类别">-->
- <!--<el-option v-for="(item,index) in inspPblmsNameList" :label="item.inspPblmsName"-->
- <!--:value="item.inspPblmsName" :key="index"></el-option>-->
- <!--</el-select>-->
- <el-select v-model="type" value-key="items" placeholder="请选择" @change="problemListChange" clearable>
- <el-option v-for="(item,index) in problemList" :key="index" :label="item.name" :value="item">
- </el-option>
- </el-select>
- <span class="demonstration" style="margin-right: 5px;margin-left: 7px">检查项目</span>
- <!--<el-select v-model="check" clearable placeholder="检查项目">-->
- <!--<el-option v-for="(item,index) in checkPointList" :label="item.checkPoint"-->
- <!--:value="item.checkPoint" :key="index"></el-option>-->
- <!--</el-select>-->
- <el-select v-model="check" value-key="items" placeholder="请选择" clearable>
- <el-option v-for="(item,index) in currentCheckPointList" :key="index" :label="item.name" :value="item">
- </el-option>
- </el-select>
- <span class="demonstration" style="margin-right: 5px;margin-left: 7px">严重等级</span>
- <el-select v-model="level" clearable placeholder="严重等级">
- <el-option
- v-for="item in supervisionState"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- <el-button type="primary" icon="el-icon-download"
- style="float: right;margin:0 5px"
- @click="exportExecl">导出</el-button>
- <el-button type="primary" icon="el-icon-search" style="float: right;margin:0 5px" @click="searchExecl">查询</el-button>
- </div>
- </el-card>
- <el-card :body-style="{'height':dxdcMainHeight + 'px','padding':'0'}">
- <form :id="formId" :target="iframeId" :action="reportSrc" method="post">
- <input type="hidden" name="width" v-model="windowWidth">
- <input type="hidden" name="height" v-model="windowHeight">
- <input type="hidden" name="ids" v-model="ids">
- <input type="hidden" name="excelName" v-model="excelName">
- <input type="hidden" name="sttm" v-model="sttm">
- <input type="hidden" name="ettm" v-model="ettm">
- <input type="hidden" name="year" v-model="newYear">
- <input type="hidden" name="state" v-model="dcType">
- <input type="hidden" id="type" name="type" v-model="type.name">
- <input type="hidden" id="check" name="check" v-model="check.name">
- <input type="hidden" id="level" name="level" v-model="level">
- </form>
- <div style="width: 100%;height: 100%;" v-loading="loading">
- <iframe :id="iframeId" :name="iframeId" src="" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
- </div>
- </el-card>
- </el-col>
- </el-row>
- </template>
- <script>
- import {dateFormat,getFirstDayOfMonth} from '../../../utils/gw_date.js';
- import request from '@util/gw_ajax_request'
- export default {
- props: ['ids','newYear'],
- data() {
- return {
- // ids:[],
- pid:'000',
- pidNodes:[],
- dxdcMainHeight: window.innerHeight-215,
- dxdcAsideHeight: window.innerHeight-180,
- windowHeight:window.innerHeight - 200,
- windowWidth:window.innerWidth - 350,
- // reportSrc:'/JsReport/reportFiles/reportjsp/showReport.jsp?raq=sz04_problemIdentified4.raq',
- reportSrc:'/JsReport/reportFiles/reportjsp/showReport_pages.jsp?raq=sz04_problemIdentified4.raq',
- radioTable:1,
- loading:true,
- leftCol:4,
- rightCol:20,
- excelName:'附表4-检查发现问题汇总表',
- monthValue:dateFormat(new Date(), 'yyyy-MM'),
- formId:'formMain4',
- iframeId:'frameMain4',
- findTime: [getFirstDayOfMonth(new Date(), 'yyyy-MM-dd'), dateFormat(new Date(), 'yyyy-MM-dd')],
- sttm: getFirstDayOfMonth(new Date(), 'yyyy-MM-dd'),
- ettm: dateFormat(new Date(), 'yyyy-MM-dd'),
- treeWidth: 250,
- dcType: '0',
- problemList: [],
- checkPointList: [],
- inspPblmsNameList: [],
- supervisionState: [
- {
- value: "0",
- label: "一般"
- },
- {
- value: "1",
- label: "较重"
- },
- {
- value: "2",
- label: "严重"
- },
- {
- value: "3",
- label: "特别严重"
- }
- ],
- level: "",
- type: "",
- check: "",
- currentCheckPointList:[]
- }
- },
- computed: {
- userId: function () {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- methods: {
- // 获取Excel数据
- searchExecl(){
- this.loading = true;
- // 使用form表单post提交,彻底解决参数值过长的问题
- document.getElementById(this.formId).submit();
- // 使用_this
- let _this = this;
- document.getElementById(this.iframeId).onload = function(){
- _this.loading = false;
- };
- },
- // 导出Excel数据
- exportExecl(){
- let v = window.frames[`${this.iframeId}`];
- v.report1_saveAsExcel();
- },
- unique(arr1, val) {
- const res = new Map();
- return arr1.filter((a) => !res.has(a[val]) && res.set(a[val], 1))
- },
- getproblemSmallType() {
- // request.get('/dc/insp/pblms/getPblmType', {
- // params: {
- // type: 6,
- // pguid: '60000000000000000000000000000000'
- // }
- // }).then(res => {
- // if (res.success) {
- // this.$nextTick(() => {
- // this.problemList = res.data;
- // this.checkPointList = this.unique(this.problemList, "checkPoint");
- // this.inspPblmsNameList = this.unique(this.problemList, "inspPblmsName");
- // console.log(this.inspPblmsNameList, this.checkPointList);
- // })
- // }
- // })
- request.get('/dc/insp/pblms/getAllPblmsByType/6').then(res => {
- if (res.success) {
- this.problemList = res.data;
- }
- })
- },
- problemListChange: function (item) {
- this.currentCheckPointList = item.items;
- }
- },
- watch:{
- findTime(n,o){
- if(!n){
- this.sttm = "";
- this.ettm = "";
- }else{
- this.sttm = n[0];
- this.ettm = n[1];
- }
- }
- },
- activated() {
- this.searchExecl();
- this.getproblemSmallType();
- }
- }
- </script>
- <style scoped>
- </style>
|