提交 bdf46e89 authored 作者: lidongxu's avatar lidongxu

feat(jimureport): 新增:积木报表-报表管理-报表设计中添加是否被分享显示列,报表设计点击报表默认进入编辑页面

上级 04b90d17
...@@ -60,17 +60,36 @@ ...@@ -60,17 +60,36 @@
<template #default="{ row }"> <template #default="{ row }">
<div> <div>
<svg-icon icon-class="bg-document"></svg-icon> <svg-icon icon-class="bg-document"></svg-icon>
<el-link :href="getReportPreviewUrl(row)" <el-link :href="getReportEditUrl(row)"
target="_blank" target="_blank"
style="margin-left: 10px">{{ row.name }}</el-link> style="margin-left: 10px">{{ row.name }}</el-link>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否被分享"
key="hasShare"
prop="hasShare"
align="center"
width="120"
sortable>
<!-- 使用 tag 标记颜色 -->
<template #default="{ row }">
<el-tag :type="row.shareViewUrl ? 'success' : 'danger'">{{ row.shareViewUrl ? '是' : '否'
}}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
align="left" align="left"
width="200"> width="200">
<template #default="scope"> <template #default="scope">
<xl-tool-tip content="浏览报表"
placement="top">
<el-button link
type="primary"
icon="View"
@click="handleView(scope.row)"></el-button>
</xl-tool-tip>
<xl-tool-tip content="分享报表" <xl-tool-tip content="分享报表"
placement="top"> placement="top">
<el-button link <el-button link
...@@ -236,15 +255,15 @@ const getReportList = async () => { ...@@ -236,15 +255,15 @@ const getReportList = async () => {
} }
getReportList() getReportList()
// 报表预览地址 // 报表预览地址
const getReportPreviewUrl = (row) => { const getReportEditUrl = (row) => {
return `${reportBaseDomain}${reportShareViewURL}${row.shareViewUrl}` return `${reportBaseDomain}${reportEditURL}/${row.id}?&token=${getToken()}&tenantId=${userStore.$state.userInfo.deptId}`
} }
/********* 报表功能按钮 ***********/ /********* 报表功能按钮 ***********/
// 新建报表 // 新建报表
const handleAdd = async () => { const handleAdd = async () => {
const res = await addReportAPI() const res = await addReportAPI()
window.open(`${reportBaseDomain}${reportEditURL}/${res.result.id}?menuType=${queryParams.reportType}&token=${getToken()}&tenantId=${userStore.$state.userInfo.deptId}`) window.open(`${reportBaseDomain}${reportEditURL}/${res.result.id}?menuType=${queryParams.reportType}`)
} }
// 导入报表 // 导入报表
const handleImport = () => { const handleImport = () => {
...@@ -263,6 +282,10 @@ const handleImport = () => { ...@@ -263,6 +282,10 @@ const handleImport = () => {
}) })
} }
// 浏览报表
const handleView = (row) => {
window.open(`${reportBaseDomain}${reportViewURL}/${row.id}?token=${getToken()}&tenantId=${userStore.$state.userInfo.deptId}`)
}
// 分享报表 // 分享报表
const shareReportUrl = ref('') // 分享报表地址链接 const shareReportUrl = ref('') // 分享报表地址链接
...@@ -309,6 +332,7 @@ const handleConfirm = async () => { ...@@ -309,6 +332,7 @@ const handleConfirm = async () => {
document.body.removeChild(input) document.body.removeChild(input)
proxy.$modal.msgSuccess('链接已复制到剪切板') proxy.$modal.msgSuccess('链接已复制到剪切板')
dialogVisible.value = false dialogVisible.value = false
getReportList()
} }
// 点击分享地址复制 // 点击分享地址复制
function copyTextSuccess() { function copyTextSuccess() {
......
...@@ -75,11 +75,11 @@ ...@@ -75,11 +75,11 @@
sortable> sortable>
<!-- 使用 tag 标记颜色 --> <!-- 使用 tag 标记颜色 -->
<template #default="{ row }"> <template #default="{ row }">
<el-tag :type="row.hasShare === 1 ? 'success' : 'danger'">{{ row.hasShare === true ? '是' : '否' }}</el-tag> <el-tag :type="row.hasShare === true ? 'success' : 'danger'">{{ row.hasShare === true ? '是' : '否' }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 操作预览 --> <!-- 操作预览 -->
<el-table-column label="操作" <!-- <el-table-column label="操作"
key="operation" key="operation"
align="center" align="center"
width="120"> width="120">
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<pagination v-show="total > 0" <pagination v-show="total > 0"
......
...@@ -83,6 +83,17 @@ ...@@ -83,6 +83,17 @@
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否被分享"
key="hasShare"
prop="hasShare"
align="center"
width="120"
sortable>
<!-- 使用 tag 标记颜色 -->
<template #default="{ row }">
<el-tag :type="row.hasShare === true ? 'success' : 'danger'">{{ row.hasShare === true ? '是' : '否' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
align="left" align="left"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论