|
|
|
@ -1,19 +1,26 @@ |
|
|
|
<template> |
|
|
|
<div class="customer-css"> |
|
|
|
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners" |
|
|
|
width="580px" style="height: 600px;" class="customer-dialog"> |
|
|
|
<el-form :inline="true" label-position="top" style="height: 320px;" |
|
|
|
width="580px" style="height: 520px;" class="customer-dialog"> |
|
|
|
<el-form :inline="true" label-position="top" style="height: 350px;" |
|
|
|
label-width="80px"> |
|
|
|
<!-- 信息 --> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span=24> |
|
|
|
<el-form-item :label="'报表名称:'" > |
|
|
|
<el-input v-model="pageData.reportName" ref="reportName" style="width: 220px"></el-input> |
|
|
|
<el-input v-model="pageData.reportName" ref="reportName" style="width: 560px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item :label="'报表ID:'" style="margin-left: 0px;"> |
|
|
|
<el-input v-model="pageData.reportId" readonly="readonly" style="width: 140px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item :label="'报表分类:'" style="margin-left: 0px;"> |
|
|
|
<el-select v-model="pageData.reportType" style="width: 80px"> |
|
|
|
<el-select v-model="pageData.reportType" style="width: 120px"> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in reportTypeList" |
|
|
|
:key="index" |
|
|
|
@ -23,9 +30,10 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="'报表ID:'" style="margin-left: 0px;"> |
|
|
|
<el-input v-model="pageData.reportId" readonly="readonly" style="width: 140px"></el-input> |
|
|
|
<el-col :span="8" style="margin-top: 20px"> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-checkbox v-model="pageData.autoFlag" class="customer-checkbox" true-label="Y" false-label="N" style="margin-top: 5px;" |
|
|
|
label="自动处理查询参数"></el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -44,16 +52,21 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: -20px;"> |
|
|
|
<el-button type="primary" @click="saveCustomerReportBun">保存</el-button> |
|
|
|
<el-button type="primary" @click="editCustomerReportSearchModal">列维护</el-button> |
|
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: 0px;"> |
|
|
|
<el-button type="primary" class="customer-bun-min" @click="saveCustomerReportBun">保存</el-button> |
|
|
|
<el-button type="primary" class="customer-bun-min" @click="closeDialog" style="margin-bottom: 10px;" >关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!-- 查询参数维护 --> |
|
|
|
<editCustomerReportSearchColumn ref="editCustomerReportSearchColumn" :close-on-click-modal="false" |
|
|
|
:visible.sync="editCustomerReportSearchColumnFlag"> |
|
|
|
</editCustomerReportSearchColumn> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
/*引入组件*/ |
|
|
|
import editCustomerReportSearchColumn from '@/views/modules/report/com_edit_customer_report_search_column';/*新增自定义报表的功能*/ |
|
|
|
import { |
|
|
|
getReportTypeList, |
|
|
|
getCustomerReportByReportId, |
|
|
|
@ -64,6 +77,7 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
titleCon: '报表自定义-修改', |
|
|
|
editCustomerReportSearchColumnFlag: false, |
|
|
|
reportTypeList: [], |
|
|
|
pageData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
@ -73,9 +87,15 @@ export default { |
|
|
|
reportRemark: '', |
|
|
|
reportType: '', |
|
|
|
reportSql: '', |
|
|
|
autoFlag: 'Y',/*是否自动处理查询参数*/ |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
/*组件*/ |
|
|
|
components: { |
|
|
|
editCustomerReportSearchColumn,/*查询列修改*/ |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
/*初始化页面参数*/ |
|
|
|
init(reportId) { |
|
|
|
@ -125,17 +145,24 @@ export default { |
|
|
|
saveCustomerReport(this.pageData).then(({data}) => { |
|
|
|
if (data.code == 200){ |
|
|
|
this.$message.success(data.msg); |
|
|
|
//判断是否打开查询参数维护dialog |
|
|
|
if(this.pageData.autoFlag === 'Y'){ |
|
|
|
this.editCustomerReportSearchColumnModal(this.pageData); |
|
|
|
} |
|
|
|
//关闭当前的dialog |
|
|
|
this.closeDialog(); |
|
|
|
}else{ |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
editCustomerReportSearchModal(){ |
|
|
|
//关闭当前的组件 |
|
|
|
this.closeDialog(); |
|
|
|
//处理结束卷组件的方法 |
|
|
|
this.$emit('initExceptionReason', this.pageData.exceptionReason); |
|
|
|
/*查询参数维护*/ |
|
|
|
editCustomerReportSearchColumnModal(currentRow){ |
|
|
|
this.$nextTick(() => { |
|
|
|
this.editCustomerReportSearchColumnFlag = true; |
|
|
|
this.$refs.editCustomerReportSearchColumn.init(currentRow.reportId); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
@ -148,5 +175,24 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
/*当前按钮的通用样式*/ |
|
|
|
.customer-css .customer-bun-mid { |
|
|
|
width: 60px; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
|
|
|
|
.customer-css .customer-bun-min { |
|
|
|
width: 50px; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
|
|
|
|
.customer-css .customer-bun-max { |
|
|
|
width: 80px; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
|
|
|
|
/*当前按钮的通用样式*/ |
|
|
|
.customer-css .el-button--medium { |
|
|
|
padding: 5px 5px; |
|
|
|
} |
|
|
|
</style> |