|
|
@ -176,7 +176,7 @@
|
|
|
|
:xl="12">
|
|
|
|
:xl="12">
|
|
|
|
<el-form-item label="报表编码"
|
|
|
|
<el-form-item label="报表编码"
|
|
|
|
prop="reportCode">
|
|
|
|
prop="reportCode">
|
|
|
|
<el-input v-model="dialogForm.reportCode" />
|
|
|
|
<el-input :disabled="reportCodeDisable" v-model="dialogForm.reportCode" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
@ -206,6 +206,20 @@
|
|
|
|
show-word-limit />
|
|
|
|
show-word-limit />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<el-form-item label="缩略图">
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
class="avatar-uploader"
|
|
|
|
|
|
|
|
:action="requestUrl"
|
|
|
|
|
|
|
|
:headers="headers"
|
|
|
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
|
|
|
:on-success="handleAvatarSuccess"
|
|
|
|
|
|
|
|
:before-upload="beforeAvatarUpload">
|
|
|
|
|
|
|
|
<img v-if="dialogForm.reportImage" :src="dialogForm.reportImage == null ? require('../../../assets/images/charts.jpg') : dialogForm.reportImage " class="avatar">
|
|
|
|
|
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer"
|
|
|
|
<div slot="footer"
|
|
|
|
class="dialog-footer">
|
|
|
|
class="dialog-footer">
|
|
|
@ -219,6 +233,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { dataDictionary } from '@/api/common'
|
|
|
|
import { dataDictionary } from '@/api/common'
|
|
|
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
import { reportPageList, addReport, editReport, delReport } from '@/api/report'
|
|
|
|
import { reportPageList, addReport, editReport, delReport } from '@/api/report'
|
|
|
|
import Dictionary from '@/components/Dictionary/index'
|
|
|
|
import Dictionary from '@/components/Dictionary/index'
|
|
|
|
var typeData
|
|
|
|
var typeData
|
|
|
@ -258,6 +273,7 @@ export default {
|
|
|
|
// reportType: '',
|
|
|
|
// reportType: '',
|
|
|
|
// reportGroup: '',
|
|
|
|
// reportGroup: '',
|
|
|
|
reportDesc: '',
|
|
|
|
reportDesc: '',
|
|
|
|
|
|
|
|
reportImage: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
basicDialog: false,
|
|
|
|
basicDialog: false,
|
|
|
|
listLoading: true,
|
|
|
|
listLoading: true,
|
|
|
@ -267,6 +283,11 @@ export default {
|
|
|
|
dictionaryTypeOptions: [], // 报表类型
|
|
|
|
dictionaryTypeOptions: [], // 报表类型
|
|
|
|
dictionaryGroupOptions: [], // 报表分组
|
|
|
|
dictionaryGroupOptions: [], // 报表分组
|
|
|
|
rules: {},
|
|
|
|
rules: {},
|
|
|
|
|
|
|
|
reportCodeDisable: false,
|
|
|
|
|
|
|
|
requestUrl: process.env.BASE_API + "/file/upload",
|
|
|
|
|
|
|
|
headers: {
|
|
|
|
|
|
|
|
Authorization: getToken()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -277,16 +298,6 @@ export default {
|
|
|
|
typeData = this
|
|
|
|
typeData = this
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created () {
|
|
|
|
created () {
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
|
|
|
// dataDictionary('REPORT_GROUP').then((res) => {
|
|
|
|
|
|
|
|
// this.dictionaryGroupOptions = res.data
|
|
|
|
|
|
|
|
// this.dialogForm.reportGroup = this.dictionaryGroupOptions[0].text
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// dataDictionary('REPORT_TYPE').then((res) => {
|
|
|
|
|
|
|
|
// this.dictionaryTypeOptions = res.data;
|
|
|
|
|
|
|
|
// this.dialogForm.reportType = this.dictionaryTypeOptions[0].text
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
this.queryByPage()
|
|
|
|
this.queryByPage()
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -318,38 +329,40 @@ export default {
|
|
|
|
this.listLoading = false
|
|
|
|
this.listLoading = false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleAvatarSuccess(res) {
|
|
|
|
|
|
|
|
this.dialogForm.reportImage = res.data.urlPath
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
beforeAvatarUpload(file) {
|
|
|
|
|
|
|
|
const isJPG = file.type === 'image/jpeg';
|
|
|
|
|
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 打开模态框
|
|
|
|
// 打开模态框
|
|
|
|
showAddReportModel (val) {
|
|
|
|
showAddReportModel (val) {
|
|
|
|
this.basicDialog = true
|
|
|
|
this.basicDialog = true
|
|
|
|
if (val === undefined) {
|
|
|
|
if (val === undefined) {
|
|
|
|
|
|
|
|
this.reportCodeDisable = false
|
|
|
|
this.dialogForm = {
|
|
|
|
this.dialogForm = {
|
|
|
|
reportName: '',
|
|
|
|
reportName: '',
|
|
|
|
reportCode: '',
|
|
|
|
reportCode: '',
|
|
|
|
// reportType: '',
|
|
|
|
// reportType: '',
|
|
|
|
reportDesc: '',
|
|
|
|
reportDesc: '',
|
|
|
|
|
|
|
|
reportImage: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.dialogForm = val
|
|
|
|
this.dialogForm = val
|
|
|
|
|
|
|
|
this.reportCodeDisable = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 预览
|
|
|
|
// 预览
|
|
|
|
preview (val) {
|
|
|
|
preview (val) {
|
|
|
|
// if (val.reportType === 'report_excel') {
|
|
|
|
|
|
|
|
// var routeUrl = this.$router.resolve({ path: '/report/excelreport/viewer', query: { reportCode: val.reportCode } })
|
|
|
|
|
|
|
|
// window.open(routeUrl.href, '_blank')
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// eslint-disable-next-line no-redeclare
|
|
|
|
|
|
|
|
var routeUrl = this.$router.resolve({ path: '/bigscreen/viewer', query: { reportCode: val.reportCode } })
|
|
|
|
var routeUrl = this.$router.resolve({ path: '/bigscreen/viewer', query: { reportCode: val.reportCode } })
|
|
|
|
window.open(routeUrl.href, '_blank')
|
|
|
|
window.open(routeUrl.href, '_blank')
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 设计
|
|
|
|
// 设计
|
|
|
|
design (val) {
|
|
|
|
design (val) {
|
|
|
|
// if (val.reportType === 'report_excel') {
|
|
|
|
|
|
|
|
// var routeUrl = this.$router.resolve({ path: '/report/excelreport/designer', query: { reportCode: val.reportCode, reportId: val.id, accessKey: val.accessKey } })
|
|
|
|
|
|
|
|
// window.open(routeUrl.href, '_blank')
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// eslint-disable-next-line no-redeclare
|
|
|
|
|
|
|
|
var routeUrl = this.$router.resolve({ path: '/bigscreen/designer', query: { reportCode: val.reportCode, reportId: val.id, accessKey: val.accessKey } })
|
|
|
|
var routeUrl = this.$router.resolve({ path: '/bigscreen/designer', query: { reportCode: val.reportCode, reportId: val.id, accessKey: val.accessKey } })
|
|
|
|
window.open(routeUrl.href, '_blank')
|
|
|
|
window.open(routeUrl.href, '_blank')
|
|
|
|
// }
|
|
|
|
// }
|
|
|
@ -392,6 +405,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 提交
|
|
|
|
// 提交
|
|
|
|
UserConfirm () {
|
|
|
|
UserConfirm () {
|
|
|
|
|
|
|
|
debugger
|
|
|
|
this.$refs.form.validate(async (valid, obj) => {
|
|
|
|
this.$refs.form.validate(async (valid, obj) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.dialogForm.id == undefined) {
|
|
|
|
if (this.dialogForm.id == undefined) {
|
|
|
@ -410,3 +424,29 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
.avatar-uploader .el-upload {
|
|
|
|
|
|
|
|
/*border: 1px dashed #d9d9d9;*/
|
|
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-uploader .el-upload:hover {
|
|
|
|
|
|
|
|
border-color: #409EFF;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-uploader-icon {
|
|
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
|
|
color: #8c939d;
|
|
|
|
|
|
|
|
width: 178px;
|
|
|
|
|
|
|
|
height: 178px;
|
|
|
|
|
|
|
|
line-height: 178px;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
|
|
|
|
width: 30%;
|
|
|
|
|
|
|
|
height: 30%;
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|