提交 337dcd0c authored 作者: lidongxu's avatar lidongxu

refactor(bi): 修改:报表查询自己被分配的数据接口调整

上级 ddd1d165
import request from '@/utils/request' import request from '@/utils/request'
// 获取被分配的报表列表 // 获取被分配的报表列表
export function getReportListAPI(params) { export function getUserReportListAPI(params) {
return request({ return request({
url: '/report/jimuReport/query/list', url: '/report/jimuReport/query/list',
params params
......
...@@ -8,6 +8,7 @@ export * from './bi/competitor' ...@@ -8,6 +8,7 @@ export * from './bi/competitor'
export * from './bi/finance' export * from './bi/finance'
export * from './bi/livecate' export * from './bi/livecate'
export * from './bi/product' export * from './bi/product'
export * from './bi/report'
export * from './bi/sale' export * from './bi/sale'
export * from './bi/store' export * from './bi/store'
export * from './bi/supply' export * from './bi/supply'
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<el-table v-loading="loading" <el-table v-loading="loading"
:data="reportList"> :data="reportList">
<el-table-column label="报表名称" <el-table-column label="报表名称"
key="reportName" key="name"
prop="reportName" prop="name"
align="left" align="left"
sortable> sortable>
<template #default="scope"> <template #default="scope">
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<el-icon> <el-icon>
<List color="green" /> <List color="green" />
</el-icon> </el-icon>
<span style="margin-left: 10px">{{ scope.row.reportName }}</span> <span style="margin-left: 10px">{{ scope.row.name }}</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -79,18 +79,18 @@ ...@@ -79,18 +79,18 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination v-show="total > 0" <pagination v-show="total > 0"
:total="total" :total="total"
v-model:page="queryParams.pageNum" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" v-model:limit="queryParams.pageSize"
@pagination="getReportList" /> --> @pagination="getReportList" />
</div> </div>
</div> </div>
</template> </template>
<script setup <script setup
name="Role"> name="Role">
import { getReportListAPI, selReportCategoryAPI } from "@/api" import { getUserReportListAPI, selReportCategoryAPI } from "@/api"
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
...@@ -125,11 +125,13 @@ ...@@ -125,11 +125,13 @@
// 获取报表列表 // 获取报表列表
const loading = ref(true) const loading = ref(true)
const reportList = ref([]) const reportList = ref([])
const total = ref(0)
// 查询报表列表 // 查询报表列表
function getReportList() { function getReportList() {
loading.value = true loading.value = true
getReportListAPI(queryParams).then(response => { getUserReportListAPI(queryParams).then(response => {
reportList.value = response.data reportList.value = response.data.rows
total.value = response.data.total
loading.value = false loading.value = false
}) })
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论