|
|
@ -1,5 +1,6 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<el-dialog class="tree_dialog" :title="titleBuild()" width="60%" :close-on-click-modal="false" center :visible.sync="visib" :before-close="closeDialog">
|
|
|
|
<el-dialog class="tree_dialog" :title="titleBuild()" width="60%" :close-on-click-modal="false" center :visible.sync="visib" :before-close="closeDialog">
|
|
|
|
|
|
|
|
<div v-if="shareLinkFlag1">
|
|
|
|
<el-form ref="userForm" :model="dialogForm" :rules="rules" size="small" label-width="100px">
|
|
|
|
<el-form ref="userForm" :model="dialogForm" :rules="rules" size="small" label-width="100px">
|
|
|
|
<el-row :gutter="10">
|
|
|
|
<el-row :gutter="10">
|
|
|
|
<el-col :xs="24" :sm="20" :md="6" :lg="6" :xl="6">
|
|
|
|
<el-col :xs="24" :sm="20" :md="6" :lg="6" :xl="6">
|
|
|
@ -12,7 +13,19 @@
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<el-button type="primary" plain @click="createShare">创建链接</el-button>
|
|
|
|
<el-button type="primary" plain @click="createShare">创建链接</el-button>
|
|
|
|
{{reportShareUrl}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-else>
|
|
|
|
|
|
|
|
<el-row :gutter="10">
|
|
|
|
|
|
|
|
<el-col :xs="24" :sm="20" :md="20" :lg="20" :xl="16">
|
|
|
|
|
|
|
|
<el-input v-model="reportShareUrl" :disabled="true"/>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row :gutter="10">
|
|
|
|
|
|
|
|
<el-button type="primary" plain @click="copyShare">复制链接</el-button>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer" style="text-align: center">
|
|
|
|
<div slot="footer" style="text-align: center">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-button type="primary" plain @click="saveReportShare">保存</el-button>-->
|
|
|
|
<!-- <el-button type="primary" plain @click="saveReportShare">保存</el-button>-->
|
|
|
@ -59,6 +72,7 @@ export default {
|
|
|
|
shareUrl: '',
|
|
|
|
shareUrl: '',
|
|
|
|
shareCode: '',
|
|
|
|
shareCode: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
shareLinkFlag1: true,
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
shareValidType: [
|
|
|
|
shareValidType: [
|
|
|
|
{required: true, message: '有效期必选', trigger: 'change'},
|
|
|
|
{required: true, message: '有效期必选', trigger: 'change'},
|
|
|
@ -84,6 +98,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 获取数据字典
|
|
|
|
// 获取数据字典
|
|
|
|
async getSystem() {
|
|
|
|
async getSystem() {
|
|
|
|
|
|
|
|
this.shareLinkFlag1 = true
|
|
|
|
const { code, data } = await getDictList('SHARE_VAILD')
|
|
|
|
const { code, data } = await getDictList('SHARE_VAILD')
|
|
|
|
if (code != '200') return
|
|
|
|
if (code != '200') return
|
|
|
|
this.shareValidTypeOptions = data
|
|
|
|
this.shareValidTypeOptions = data
|
|
|
@ -96,6 +111,7 @@ export default {
|
|
|
|
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)
|
|
|
|
console.log(data)
|
|
|
|
|
|
|
|
this.shareLinkFlag1 = false
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
message: '创建链接成功!',
|
|
|
|
message: '创建链接成功!',
|
|
|
|
type: 'success',
|
|
|
|
type: 'success',
|
|
|
@ -103,6 +119,22 @@ export default {
|
|
|
|
this.reportShareUrl = data.shareUrl
|
|
|
|
this.reportShareUrl = data.shareUrl
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
copyShare(){
|
|
|
|
|
|
|
|
this.copyToClip(this.reportShareUrl)
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '复制链接成功!',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
copyToClip(content, message) {
|
|
|
|
|
|
|
|
var aux = document.createElement("input");
|
|
|
|
|
|
|
|
aux.setAttribute("value", content);
|
|
|
|
|
|
|
|
document.body.appendChild(aux);
|
|
|
|
|
|
|
|
aux.select();
|
|
|
|
|
|
|
|
document.execCommand("copy");
|
|
|
|
|
|
|
|
document.body.removeChild(aux);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
async saveReportShare() {
|
|
|
|
async saveReportShare() {
|
|
|
|
var params = {
|
|
|
|
var params = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|