Browse Source

智能报表查看功能,数据统计条件查看数据回显

luckysheet_xiaowang
mk 6 months ago
parent
commit
668acb1cfb
  1. 39
      src/views/modules/base/smartExcel/cpts/export-search.vue
  2. 23
      src/views/modules/base/smartExcel/cpts/export-view.vue

39
src/views/modules/base/smartExcel/cpts/export-search.vue

@ -239,6 +239,10 @@ export default {
isArrow: {
type: Boolean,
default: false
},
infoObj:{
type:Object,
default:()=>{}
}
},
data() {
@ -940,35 +944,12 @@ export default {
if (this.columnName) this.handleChangeForm(this.columnName)
},
mounted(){
this.$EventBus.$on('handleClickResiTree', debounce(async (val) => {
let level = val.type =='neighborHood'||val.type =='building'?'grid':val.type;
this.form.level = level;
this.form.orgType = level;
if (val.type === 'agency') {
this.form.agencyId = val.id;
this.cascaderAgencyId = val.id;
this.optionsV = [];
this.form.villageId = '';
this.form.buildId = '';
await this.getValiheList();
} else if (val.type === 'neighborHood') {
this.form.villageId = val.id;
await this.handleChangeV(val.id);
this.form.buildId = '';
} else if (val.type === 'building') {
this.form.buildId = val.id;
await this.handleChangeB(val.id);
}else if (val.type === 'grid') {
this.cascaderAgencyId = val.id;
this.optionsV = [];
this.form.villageId = '';
this.form.buildId = '';
this.form.grid = val.id;
this.form.agencyId = val.id;
await this.getValiheList();
}
}, 300)); // 300ms
this.$nextTick(()=>{
if(this.infoObj){
this.form = this.infoObj;
}
})
},
methods: {

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

@ -4,9 +4,10 @@
<div class="top_btn flex flex-end">
<div>
<el-button type="text" round @click="handelClickBack" icon="el-icon-back">返回</el-button>
<el-button type="warning" @click="handleClickInspect">上传统计模板
<el-button type="warning" @click="handleClickInspect" v-if="pageType !=='info'">上传统计模板
</el-button>
<el-button type="success" @click="onClickUplond()"> 数据列表导出</el-button>
<el-button type="success" @click="onClickUplond()"v-if="pageType !=='info'"> 数据列表导出</el-button>
<el-button type="success" @click="onClickShowCondition()"v-if="pageType ==='info'"> 数据统计条件</el-button>
</div>
<div>
<el-button type="primary" @click="handleClickCurrencyEvent('submit')"> 导出</el-button>
@ -20,6 +21,11 @@
:btnLoading="btnLoading" :pageType='`report`' :workBookId="workBookId" @saveLuckysheetHead="saveLuckysheet">
</excelUploadData>
</el-dialog>
<el-dialog title="数据统计条件" v-if="showCondition" :visible.sync="showCondition" width="60%"
:close-on-click-modal="false">
<resi-search ref="resi_form" :infoObj="infoObj"></resi-search>
</el-dialog>
</div>
</template>
<script>
@ -30,6 +36,7 @@ import { mapGetters } from 'vuex'
import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { exportSheetExcel } from "@/utils/export";
import resiSearch from "./export-search.vue";
export default {
data() {
@ -41,7 +48,9 @@ export default {
currentTable: null,
currentId: '',
btnLoading: false,
workBookId: ''
workBookId: '',
infoObj:{},
showCondition:false
};
},
props: {
@ -71,10 +80,13 @@ export default {
}
},
methods: {
onClickShowCondition(){
this.showCondition = true
},
async getSheetList() {
const { data, code } = await requestGet('/actual/base/intellgentizeReport/detail', { id: this.infoIds.id })
if (code === 0) {
console.log(data);
this.infoObj = data.searchForm
}
},
handleClickCurrencyEvent() {
@ -160,7 +172,8 @@ export default {
},
},
components: {
excelUploadData
excelUploadData,
resiSearch
},
beforeDestroy() {
this.$store.state.sidebarFold = false;

Loading…
Cancel
Save