|
@@ -0,0 +1,73 @@
|
|
|
+<template>
|
|
|
+ <div class="y-container">
|
|
|
+ <listTemp ref="list" :columns="columns" :param="param" :tableName="'reportcenterTable'" :searchType="searchType">
|
|
|
+ <template #operation>
|
|
|
+ 报表管理
|
|
|
+ </template>
|
|
|
+ <template #tb_cell="{data}">
|
|
|
+ <template v-if="data.column.dataIndex == 'name'">
|
|
|
+ <a-button type="link"><span class="btn-link" @click="goDetail(data.record)">{{data.record.name}}</span></a-button>
|
|
|
+ </template>
|
|
|
+ <template v-if="data.column.dataIndex == 'operation'">
|
|
|
+ <set-type :id="data.record.sys_reportid" :types="data.record.type !== '' ? data.record.type:[] " @onSuccess="onSuccess"></set-type>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </listTemp>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+ import listTemp from '@/components/listTemplate/index.vue';
|
|
|
+ import setType from './modules/type.vue';
|
|
|
+ import Api from '@/api/api'
|
|
|
+ import { ref } from 'vue'
|
|
|
+ import { useAuthStore } from '@/stores/modules/auth'
|
|
|
+ import { storeToRefs } from 'pinia'
|
|
|
+ const store = useAuthStore()
|
|
|
+ let { app } = storeToRefs(store)
|
|
|
+ let columns = ref([])
|
|
|
+ let searchType = ref([
|
|
|
+ {label:'搜索',key:'condition',type:'input'}
|
|
|
+ ])
|
|
|
+ let param = ref({
|
|
|
+ "content": {
|
|
|
+ "pageNumber":1,
|
|
|
+ "pageSize":20,
|
|
|
+ "systemappid":app.value.systemappid
|
|
|
+ },
|
|
|
+ "id": 20240407094904,
|
|
|
+ })
|
|
|
+ const getBaseUrl = () => {
|
|
|
+
|
|
|
+ if (process.env.NODE_ENV == 'development') return process.env.BASE_API
|
|
|
+ let href = window.location.href
|
|
|
+ let index = href.indexOf('/')
|
|
|
+ let num = 0
|
|
|
+ while (index != -1) {
|
|
|
+ num++
|
|
|
+ index = href.indexOf('/',index+1)
|
|
|
+ if (num++ == 3) {
|
|
|
+ return href.slice(0,index)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const goDetail = async (data)=> {
|
|
|
+ let res = await Api.requested({
|
|
|
+ "id":20221213094501,
|
|
|
+ "content": {
|
|
|
+ sys_reportid:data.sys_reportid,
|
|
|
+ dataid:0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(getBaseUrl() + res.data)
|
|
|
+ }
|
|
|
+ const list = ref()
|
|
|
+ const onSuccess = ()=>{
|
|
|
+ list.value.tableData()
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style scoped>
|
|
|
+.btn-link{
|
|
|
+ text-decoration: underline;
|
|
|
+}
|
|
|
+</style>
|