|
@@ -29,13 +29,6 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item :label="$t('检查年份')" prop="checkYear">
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.checkYear"
|
|
|
- type="year"
|
|
|
- placeholder="选择年">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
|
|
@@ -64,7 +57,7 @@
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
size="mini"
|
|
|
- @click="exportDataForYear"
|
|
|
+ @click="dialogVisible = true"
|
|
|
>{{ $t('批量下载历史报告') }}
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -526,6 +519,21 @@
|
|
|
<form ref="downloadForm2" :action="downloadAction2" target="FORMSUBMIT">
|
|
|
<input name="year" v-model="downloadForm2.year" hidden/>
|
|
|
</form>
|
|
|
+ <!-- 批量导出年检报告的历史报告 -->
|
|
|
+ <el-dialog
|
|
|
+ title="选择需要导出的历史报告年份"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="20%">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="exportCheckYear"
|
|
|
+ type="year"
|
|
|
+ placeholder="选择需要导出的历史报告年份">
|
|
|
+ </el-date-picker>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="exportDataForYear">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -552,6 +560,8 @@ export default {
|
|
|
components: {Treeselect, YearApprove},
|
|
|
data() {
|
|
|
return {
|
|
|
+ exportCheckYear: null,
|
|
|
+ dialogVisible: false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
approveVisible: false,
|
|
@@ -616,10 +626,10 @@ export default {
|
|
|
approveStatusOptions: [],
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
- checkYear:null,
|
|
|
- plantCode:null,
|
|
|
- unit:null,
|
|
|
- approveStatus:null,
|
|
|
+ checkYear: null,
|
|
|
+ plantCode: null,
|
|
|
+ unit: null,
|
|
|
+ approveStatus: null,
|
|
|
pageNum: 1,
|
|
|
pageSize: 20,
|
|
|
},
|
|
@@ -1026,14 +1036,16 @@ export default {
|
|
|
//批量下载某年份的历史报告
|
|
|
exportDataForYear() {
|
|
|
//将控件时间转为年,如果未选中年份,默认当前年
|
|
|
- if (this.queryParams.checkYear == null) {
|
|
|
- this.queryParams.checkYear = Date.now();
|
|
|
+ if (this.exportCheckYear == null) {
|
|
|
+ this.exportCheckYear = Date.now();
|
|
|
}
|
|
|
- var date = new Date(this.queryParams.checkYear)
|
|
|
+ var date = new Date(this.exportCheckYear)
|
|
|
this.downloadForm2.year = date.getFullYear();
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs['downloadForm2'].submit()
|
|
|
})
|
|
|
+ //下载完成后关闭弹窗
|
|
|
+ this.dialogVisible = false;
|
|
|
}
|
|
|
}
|
|
|
};
|