|
@@ -51,6 +51,13 @@
|
|
|
|
|
|
<template v-slot:opreation="scope">
|
|
|
<drawerTemp class="inline-16" v-if="detailPath" :data="scope.data" :detailPath="detailPath" :idName="idName" @onSuccess="listData"></drawerTemp>
|
|
|
+
|
|
|
+ <reportCenter class="inline-16" :data="reportCenterLsit" v-if="reportCenterLsit.length > 0">
|
|
|
+ <template v-slot:print="scope2">
|
|
|
+ <el-button @click="printBtn(scope.data,scope2.data)" type="text" size="mini">打 印</el-button>
|
|
|
+ </template>
|
|
|
+ </reportCenter>
|
|
|
+
|
|
|
<slot :data="scope" name="tbOpreation"></slot>
|
|
|
</template>
|
|
|
</tableTemp>
|
|
@@ -74,6 +81,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {mapGetters} from 'vuex'
|
|
|
+import { log } from '@antv/g2plot/lib/utils'
|
|
|
export default {
|
|
|
componentName:'normalTable',
|
|
|
props:['tableName','idName','tableData','apiId','formPath','oldFormPath','options','autoQuery','detailPath','customTitle','hidePagination'],
|
|
@@ -87,6 +95,7 @@ export default {
|
|
|
excel:() => import('@/components/export_excel/index.vue'),
|
|
|
cardTemp:() => import('./modules/cardList.vue'),
|
|
|
drawer:() => import('./drawerDetail/drawer'),
|
|
|
+ reportCenter:() => import('./reportCenter/index'),
|
|
|
|
|
|
},
|
|
|
computed:{
|
|
@@ -122,7 +131,9 @@ export default {
|
|
|
currentPage:0,
|
|
|
refreshTable:true,
|
|
|
title:'',
|
|
|
- name:''
|
|
|
+ name:'',
|
|
|
+ systemappid:JSON.parse(sessionStorage.getItem('activeApp')).systemappid,
|
|
|
+ reportCenterLsit:[]
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
@@ -230,6 +241,29 @@ export default {
|
|
|
this.param.content.pageNumber = 1
|
|
|
this.param.content.where.tablefilter[key] = val
|
|
|
this.listData()
|
|
|
+ },
|
|
|
+ /* 获取是否有报表数据 */
|
|
|
+ async getSystemAppid () {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id":20221213094401,
|
|
|
+ "content": {
|
|
|
+ "systemappid":this.systemappid,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.reportCenterLsit = res.data
|
|
|
+ console.log(res,'报表数据');
|
|
|
+ },
|
|
|
+ async printBtn (data,data2) {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id":20221213094501,
|
|
|
+ "content": {
|
|
|
+ sys_reportid:data2.sys_reportid,
|
|
|
+ dataid:data[this.idName]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ window.open(this.$baseUrl + res.data)
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
@@ -242,6 +276,8 @@ export default {
|
|
|
this.layout = this.tool.tabelCol(this.$route.name)[this.tableName].tablecols
|
|
|
this.tableLayout = this.layout
|
|
|
this.$emit('listCreate',this.param)
|
|
|
+
|
|
|
+ this.getSystemAppid()
|
|
|
}
|
|
|
}
|
|
|
|