|
|
@@ -28,7 +28,7 @@
|
|
|
|
|
|
<template slot="body">
|
|
|
<h3 class="page-title">{{ pageTitle }}</h3>
|
|
|
- <year-month-select v-model="params.year" :showMonth="false"></year-month-select>
|
|
|
+ <year-month-select v-model="params.yearAndMonth" :showMonth="false"></year-month-select>
|
|
|
</template>
|
|
|
|
|
|
<!-- <template slot="menu" slot-scope="{row}">
|
|
|
@@ -75,7 +75,7 @@ export default window.$crudCommon({
|
|
|
data() {
|
|
|
return {
|
|
|
params: {
|
|
|
- year: "",
|
|
|
+ yearAndMonth: "",
|
|
|
},
|
|
|
isSelAnnual: false,
|
|
|
|
|
|
@@ -86,14 +86,14 @@ export default window.$crudCommon({
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
- 'params.year'() {
|
|
|
+ 'params.yearAndMonth'() {
|
|
|
this.getList();
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(['tag']),
|
|
|
pageTitle() {
|
|
|
- let yearCN = this.params.year ? moment(this.params.year).format('yyyy年') : ''
|
|
|
+ let yearCN = this.params.yearAndMonth ? moment(this.params.yearAndMonth).format('yyyy年') : ''
|
|
|
return `${yearCN}${this.tag.label}`
|
|
|
}
|
|
|
},
|
|
|
@@ -113,7 +113,9 @@ export default window.$crudCommon({
|
|
|
methods: {
|
|
|
loadData() {
|
|
|
this.loading = true;
|
|
|
- this.api.getList(this.getSearchParams()).then(({ data }) => {
|
|
|
+ const params = { ...this.getSearchParams(), year: this.params.yearAndMonth };
|
|
|
+ delete params.yearAndMonth;
|
|
|
+ this.api.getList(params).then(({ data }) => {
|
|
|
|
|
|
if (data.code == 200) {
|
|
|
let list = [{
|
|
|
@@ -193,16 +195,11 @@ export default window.$crudCommon({
|
|
|
this.currIndex = this.form.$index + 1;
|
|
|
done();
|
|
|
},
|
|
|
- // handleExport() {
|
|
|
- // exportBlob(`/api/kd-scientific/fjbczl/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
- // downloadXls(res.data, `${this.params.year}附件补充.xlsx`);
|
|
|
- // });
|
|
|
- // },
|
|
|
handleDownFile(file) {
|
|
|
downloadFileByUrl(file.value, file.label);
|
|
|
},
|
|
|
handleDownAll() {
|
|
|
- let downParams = { year: this.params.year };
|
|
|
+ let downParams = { year: this.params.yearAndMonth };
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '文件正在下载中,请耐心等待...',
|
|
|
@@ -233,7 +230,7 @@ export default window.$crudCommon({
|
|
|
|
|
|
},
|
|
|
getFormData() {
|
|
|
- return { id: this.form.id, yearAndMonth: this.params.year, [`${this.form.rowIndex}`]: JSON.stringify(this.form.fileList) }
|
|
|
+ return { id: this.form.id, yearAndMonth: this.params.yearAndMonth, [`${this.form.rowIndex}`]: JSON.stringify(this.form.fileList) }
|
|
|
},
|
|
|
handleDownTemp(templateKey) {
|
|
|
getDictValueByKey('fjbczl-template', templateKey).then(({ data }) => {
|