Browse Source

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

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

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

@ -239,6 +239,10 @@ export default {
isArrow: { isArrow: {
type: Boolean, type: Boolean,
default: false default: false
},
infoObj:{
type:Object,
default:()=>{}
} }
}, },
data() { data() {
@ -940,35 +944,12 @@ export default {
if (this.columnName) this.handleChangeForm(this.columnName) if (this.columnName) this.handleChangeForm(this.columnName)
}, },
mounted(){ 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.$nextTick(()=>{
this.form.agencyId = val.id; if(this.infoObj){
this.cascaderAgencyId = val.id; this.form = this.infoObj;
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 })
}, },
methods: { methods: {

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

@ -4,9 +4,10 @@
<div class="top_btn flex flex-end"> <div class="top_btn flex flex-end">
<div> <div>
<el-button type="text" round @click="handelClickBack" icon="el-icon-back">返回</el-button> <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>
<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>
<div> <div>
<el-button type="primary" @click="handleClickCurrencyEvent('submit')"> 导出</el-button> <el-button type="primary" @click="handleClickCurrencyEvent('submit')"> 导出</el-button>
@ -20,6 +21,11 @@
:btnLoading="btnLoading" :pageType='`report`' :workBookId="workBookId" @saveLuckysheetHead="saveLuckysheet"> :btnLoading="btnLoading" :pageType='`report`' :workBookId="workBookId" @saveLuckysheetHead="saveLuckysheet">
</excelUploadData> </excelUploadData>
</el-dialog> </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> </div>
</template> </template>
<script> <script>
@ -30,6 +36,7 @@ import { mapGetters } from 'vuex'
import { requestPost, requestGet } from "@/js/dai/request"; import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick"; import nextTick from "dai-js/tools/nextTick";
import { exportSheetExcel } from "@/utils/export"; import { exportSheetExcel } from "@/utils/export";
import resiSearch from "./export-search.vue";
export default { export default {
data() { data() {
@ -41,7 +48,9 @@ export default {
currentTable: null, currentTable: null,
currentId: '', currentId: '',
btnLoading: false, btnLoading: false,
workBookId: '' workBookId: '',
infoObj:{},
showCondition:false
}; };
}, },
props: { props: {
@ -71,10 +80,13 @@ export default {
} }
}, },
methods: { methods: {
onClickShowCondition(){
this.showCondition = true
},
async getSheetList() { async getSheetList() {
const { data, code } = await requestGet('/actual/base/intellgentizeReport/detail', { id: this.infoIds.id }) const { data, code } = await requestGet('/actual/base/intellgentizeReport/detail', { id: this.infoIds.id })
if (code === 0) { if (code === 0) {
console.log(data); this.infoObj = data.searchForm
} }
}, },
handleClickCurrencyEvent() { handleClickCurrencyEvent() {
@ -160,7 +172,8 @@ export default {
}, },
}, },
components: { components: {
excelUploadData excelUploadData,
resiSearch
}, },
beforeDestroy() { beforeDestroy() {
this.$store.state.sidebarFold = false; this.$store.state.sidebarFold = false;

Loading…
Cancel
Save