分享优化

qianming 3 years ago
parent 2abad31d37
commit 9c250c5d73

@ -54,7 +54,11 @@
<el-form-item label="链接" prop="reportShareUrl"> <el-form-item label="链接" prop="reportShareUrl">
<el-input v-model="reportShareUrl" :disabled="true" /> <el-input v-model="reportShareUrl" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item label="分享码" prop="sharePassword"> <el-form-item
v-if="dialogForm.sharePasswordFlag"
label="分享码"
prop="sharePassword"
>
<el-input v-model="dialogForm.sharePassword" :disabled="true" /> <el-input v-model="dialogForm.sharePassword" :disabled="true" />
</el-form-item> </el-form-item>

@ -114,6 +114,13 @@ export default {
default: () => { default: () => {
return ""; return "";
} }
},
reportType: {
required: true,
type: String,
default:() =>{
return "";
}
} }
}, },
data() { data() {
@ -124,6 +131,7 @@ export default {
dialogForm: { dialogForm: {
shareValidType: 0, shareValidType: 0,
reportCode: "", reportCode: "",
reportType: "",
shareUrl: "", shareUrl: "",
shareCode: "", shareCode: "",
sharePassword: "", sharePassword: "",
@ -164,12 +172,11 @@ export default {
this.dialogForm.sharePassword = ""; this.dialogForm.sharePassword = "";
}, },
async createShare() { async createShare() {
this.dialogForm.reportType = this.reportType;
this.dialogForm.reportCode = this.reportCode; this.dialogForm.reportCode = this.reportCode;
this.dialogForm.shareUrl = window.location.href; this.dialogForm.shareUrl = window.location.href;
// console.log(this.dialogForm)
const { code, data } = await reportShareAdd(this.dialogForm); const { code, data } = await reportShareAdd(this.dialogForm);
if (code != "200") return; if (code != "200") return;
// console.log(data)
this.shareLinkFlag1 = false; this.shareLinkFlag1 = false;
this.$message({ this.$message({
message: "创建链接成功!", message: "创建链接成功!",

@ -13,6 +13,7 @@
:visib="visibleForShareDialog" :visib="visibleForShareDialog"
:reportCode="reportCodeForShareDialog" :reportCode="reportCodeForShareDialog"
:reportName="reportNameForShareDialog" :reportName="reportNameForShareDialog"
:reportType="reportTypeForShareDialog"
@handleClose="visibleForShareDialog = false" @handleClose="visibleForShareDialog = false"
/> />
<copyDialog :visib.sync="copyVisible" :rowData="rowData" @close="close" /> <copyDialog :visib.sync="copyVisible" :rowData="rowData" @close="close" />
@ -45,6 +46,7 @@ export default {
visibleForShareDialog: false, visibleForShareDialog: false,
reportCodeForShareDialog: "", reportCodeForShareDialog: "",
reportNameForShareDialog: "", reportNameForShareDialog: "",
reportTypeForShareDialog: "",
crudOption: { crudOption: {
// 使 // 使
title: "报表管理", title: "报表管理",
@ -354,13 +356,9 @@ export default {
}, },
// //
shareReport(val) { shareReport(val) {
if (val.reportType == "report_excel") {
//excel
this.$message.warning("暂不支持excel报表分享");
return;
}
this.reportCodeForShareDialog = val.reportCode; this.reportCodeForShareDialog = val.reportCode;
this.reportNameForShareDialog = val.reportName; this.reportNameForShareDialog = val.reportName;
this.reportTypeForShareDialog = val.reportType;
this.visibleForShareDialog = true; this.visibleForShareDialog = true;
}, },
// //

Loading…
Cancel
Save