Browse Source

修复智能报表中导入后导出报错问题,新增报表后编辑表格条件弹框不出现问题

luckysheet_xiaowang
mk 1 year ago
parent
commit
2f48964d03
  1. 2
      src/views/modules/base/smartExcel/cpts/excel-upload-data.vue
  2. 18
      src/views/modules/base/smartExcel/cpts/export-view.vue

2
src/views/modules/base/smartExcel/cpts/excel-upload-data.vue

@ -240,7 +240,6 @@ export default {
this.progress = 3;
} else {
this.dataListLoading = true;
if (this.formData1.importCategory === 'BASEINFO') {
this.formData.searchForm = this.$refs['resi_form'].form;
} else {
@ -253,6 +252,7 @@ export default {
this.formData.formCode = this.formData1.importCategory === 'BASEINFO' ? 'resident_base_info' : 'community_info'
delete this.formData.columnMateJson
} else {
this.dataListLoading = true;
this.formData.formCode = this.formData1.importCategory
delete this.formData.reportName
}

18
src/views/modules/base/smartExcel/cpts/export-view.vue

@ -6,8 +6,8 @@
<el-button type="text" round @click="handelClickBack" icon="el-icon-back">返回</el-button>
<el-button type="warning" @click="handleClickInspect" v-if="pageType !== 'info'">上传统计模板
</el-button>
<el-button type="success" @click="onClickUplond()" v-if="pageType !== 'info'"> 数据列表导出</el-button>
<el-button type="success" @click="onClickShowCondition()"
<el-button type="success" @click="onClickUplond" v-if="pageType !== 'info'"> 数据列表导出</el-button>
<el-button type="success" @click="onClickShowCondition"
v-if="pageType === 'info' && this.infoObj.reportType === 0"> 数据统计条件</el-button>
</div>
<div>
@ -916,9 +916,9 @@ export default {
handleExcelSuccess(e) {
if (e.code === 0) {
this.moduleUrl = e.data.url;
this.urlToFile(e.data.url)
// this.urlToFile(e.data.url)
this.showTemplate = false;
// this.urlToFile('http://localhost:9001/epmet-work-pc/test1.xlsx')
this.urlToFile('http://localhost:9001/epmet-work-pc/test1.xlsx')
this.fullscreenLoading = false;
}
},
@ -960,20 +960,20 @@ export default {
});
});
await nextTick(1000)
await nextTick(500)
await this.saveLuckysheetHead()
},
async handleSelect(item) {
await this.initForm("edit", item);
},
handleCellEditBefore(e) {
if (this.pageType === 'info' && this.infoObj.reportType === 1) {
if ((this.pageType === 'info' && this.infoObj.reportType === 1)|| (this.pageType === 'add'&& this.reportId && this.importType === 'template')) {
this.drawer = true;
let column = parseInt(e[0].column[0]) + 1, row = parseInt(e[0].row[0]) + 1;
this.selectedCellNumberType = [parseInt(e[0].row[0]), parseInt(e[0].column[0])]
this.selectedCell = this.numberToLetter(column) + row;
this.getFrequentlyTags();
if(this.$store.state.user.id === this.infoObj.creatorId){
if((this.$store.state.user.id === this.infoObj.creatorId) || this.importType === 'template'){
this.showConditionDetailsDialog = false;
let statisticalValue = luckysheet.getCellValue(row-1,column-1)
if(statisticalValue&&(statisticalValue !== 0 && statisticalValue !== null)){
@ -1002,7 +1002,6 @@ export default {
},
handleCellUpdateBefore(r, c, value, isRefresh) {
this.drawer = false;
this.selectedCell = "";
},
@ -1068,10 +1067,10 @@ export default {
luckysheet.setRangeValue(newArray, {
range: `A2:${bottomRightCorner}${listData.length}`,
})
this.reportId = val.id;
this.luckysheetLoading = false;
},
async saveLuckysheetHead(head) {
// this.currentTable[0].data[0].every(item => !item) &&
if (head && this.importType === 'list') {
let temp = head.map(item => item.children).flat();
for (let i in temp) {
@ -1129,6 +1128,7 @@ export default {
});
},
handelClickBack() {
this.reportId = '';
this.$emit('close')
},
},

Loading…
Cancel
Save