Browse Source

Merge remote-tracking branch 'origin/master'

master
ruanqi 4 years ago
parent
commit
fbe7bbc81b
  1. 82
      src/views/modules/report/com_add_customer_report.vue
  2. 25
      src/views/modules/report/com_auth_customer_report.vue
  3. 25
      src/views/modules/report/com_auth_single_customer_report.vue
  4. 40
      src/views/modules/report/com_edit_customer_report_search_column.vue
  5. 70
      src/views/modules/report/com_run_customer_report.vue
  6. 2
      src/views/modules/report/com_show_customer_report_search_column.vue
  7. 82
      src/views/modules/report/com_update_customer_report.vue
  8. 4
      src/views/modules/report/report_manage.vue
  9. 4
      src/views/modules/report/user_customer_report.vue

82
src/views/modules/report/com_add_customer_report.vue

@ -1,19 +1,21 @@
<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="18">
<el-col :span="24">
<el-form-item :label="'报表名称:'" >
<el-input v-model="pageData.reportName" ref="reportName" style="width: 450px"></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-form-item :label="'报表分类:'" style="margin-left: 60px;">
<el-select v-model="pageData.reportType" style="width: 80px">
</el-row>
<el-row>
<el-col :span="10">
<el-form-item :label="'报表分类:'" style="margin-left: 0px;">
<el-select v-model="pageData.reportType" style="width: 120px">
<el-option
v-for="(item, index) in reportTypeList"
:key="index"
@ -23,6 +25,12 @@
</el-select>
</el-form-item>
</el-col>
<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>
<el-row>
<el-col :span="24">
@ -39,15 +47,23 @@
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: -20px;">
<el-button type="primary" @click="addCustomerReportBun">保存</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="addCustomerReportBun">保存</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,
addCustomerReport,
@ -57,6 +73,7 @@ export default {
data() {
return {
titleCon: '报表自定义-新增',
editCustomerReportSearchColumnFlag: false,
reportTypeList: [],
pageData: {
site: this.$store.state.user.site,
@ -65,9 +82,16 @@ export default {
reportRemark: '',
reportType: '',
reportSql: '',
autoFlag: 'Y',
},
}
},
/*组件*/
components: {
editCustomerReportSearchColumn,/*查询列修改*/
},
methods: {
/*初始化页面参数*/
init() {
@ -118,10 +142,14 @@ export default {
//
addCustomerReport(this.pageData).then(({data}) => {
//
if(data.code == 200){
if(data.code === 200){
this.$message.success(data.msg)
//dialog
this.closeDialog();
//dialog
if(this.pageData.autoFlag === 'Y'){
this.editCustomerReportSearchColumnModal(data.row);
}
}else{
this.$message.error(data.msg);
@ -129,14 +157,15 @@ export default {
});
},
editSearchColumnModal(){
//
this.closeDialog();
//
this.$emit('initExceptionReason', this.pageData.exceptionReason);
/*查询参数维护*/
editCustomerReportSearchColumnModal(currentRow){
this.$nextTick(() => {
this.editCustomerReportSearchColumnFlag = true;
this.$refs.editCustomerReportSearchColumn.init(currentRow.reportId);
});
},
},
created() {
//
@ -147,5 +176,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: 85px;
text-align: center;
}
/*当前按钮的通用样式*/
.customer-css .el-button--medium {
padding: 5px 5px;
}
</style>

25
src/views/modules/report/com_auth_customer_report.vue

@ -47,8 +47,8 @@
</el-form>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 0px;">
<el-button type="primary" @click="saveCustomerReportAuthsBun">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" class="customer-bun-min" @click="saveCustomerReportAuthsBun">保存</el-button>
<el-button type="primary"class="customer-bun-min" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
@ -256,4 +256,25 @@ export default {
padding: 0px !important;
}
/*当前按钮的通用样式*/
.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>

25
src/views/modules/report/com_auth_single_customer_report.vue

@ -45,8 +45,8 @@
</el-form>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 0px;">
<el-button type="primary" @click="saveAuthCustomerReportBun">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" class="customer-bun-min" @click="saveAuthCustomerReportBun">保存</el-button>
<el-button type="primary" class="customer-bun-min" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
@ -224,4 +224,25 @@ export default {
padding: 0px !important;
}
/*当前按钮的通用样式*/
.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>

40
src/views/modules/report/com_edit_customer_report_search_column.vue

@ -6,21 +6,15 @@
label-width="80px">
<!-- 菜单信息 -->
<el-row style="margin-top: -20px;">
<el-col :span="4">
<el-form-item class="customer-button">
<el-button @click="" type="primary" style="margin-left: 10px; margin-bottom: 5px;">
新增</el-button>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item class="customer-button">
<el-button @click="autoProcessSearchColumnBun" type="primary" style="margin-left: 10px; margin-bottom: 5px;">
<el-button @click="autoProcessSearchColumnBun" class="customer-bun-mid" type="primary" style="margin-left: 10px; margin-bottom: 5px;">
自动获取</el-button>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item class="customer-button">
<el-button type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
<el-button type="primary" @click="refreshPageData" class="customer-bun-mid" style="margin-left: 10px; margin-bottom: 5px;">
刷新</el-button>
</el-form-item>
</el-col>
@ -76,8 +70,8 @@
</el-form>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 0px;">
<el-button type="primary" @click="saveCustomerReportSearchColumns">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" class="customer-bun-min" @click="saveCustomerReportSearchColumns">保存</el-button>
<el-button type="primary" class="customer-bun-min" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
@ -92,10 +86,9 @@ import {
deleteCustomerReportSearchColumn,
} from '@/api/report/com_edit_customer_report_search_column.js';
export default {
name: "com_finish_roll",
data() {
return {
titleCon: '查询维护',
titleCon: '查询参数维护',
reportTypeList: [],
columnTypeList:[
{columnType: '文本'},
@ -354,7 +347,7 @@ export default {
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
.customer-css .el-table__header /deep/ th.is-leaf{
line-height: 16px;
}
@ -362,4 +355,25 @@ export default {
padding: 0px !important;
}
/*当前按钮的通用样式*/
.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>

70
src/views/modules/report/com_run_customer_report.vue

@ -36,8 +36,20 @@
</el-form>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 0px;">
<el-button type="primary" @click="runCustomerReportData">刷新</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" class="customer-bun-min" @click="runCustomerReportData">刷新</el-button>
<el-button type="primary" class="customer-bun-min" @click="closeDialog">关闭</el-button>
<download-excel style="width: 50px; padding: 5px; margin-bottom: 10px;"
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:footer="exportFooter"
:defaultValue="exportDefaultValue"
:fetch="createExportData"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
导出
</download-excel>
</span>
</el-dialog>
</div>
@ -59,6 +71,13 @@ export default {
customerReportList: [],
customerColumnlArray: [],
searchColumnData: [],
customerReport: [],
// start
exportData: [],
exportName: "定制报表导出",
exportFooter: [],
exportDefaultValue: "这一行这一列没有数据",
// end
dataListLoading: false,
}
},
@ -89,12 +108,36 @@ export default {
if(data.code === 200){
this.customerReportList = data.resultMap.resultRows;
this.customerColumnlArray = data.resultMap.columnRows;
this.customerReport = data.resultMap.customerReport;
}else{
this.$message.error(data.msg);
}
});
},
// excel
fields() {
//
this.exportName = this.customerReport.reportName +"-"+ this.dayjs().format('YYYYMMDDHHmmss');
//
let json = "{"
this.customerColumnlArray.forEach((item, index) => {
if (index == this.customerColumnlArray.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
createExportData() {
// ,,
return this.customerReportList;
},
},
created() {
//
@ -114,7 +157,7 @@ export default {
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
.customer-css /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
@ -122,4 +165,25 @@ export default {
padding: 0px !important;
}
/*当前按钮的通用样式*/
.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>

2
src/views/modules/report/com_show_customer_report_search_column.vue

@ -61,7 +61,7 @@
export default {
data() {
return {
titleCon: '查询',
titleCon: '查询参数',
showRunCustomerReportFlag: false,
pageData: {
site: this.$store.state.user.site,

82
src/views/modules/report/com_update_customer_report.vue

@ -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>

4
src/views/modules/report/report_manage.vue

@ -43,7 +43,7 @@
<a class="customer-a" @click="editCustomerReportModal(scope.row)">编辑</a>
<a class="customer-a" @click="warnDeleteCustomerReportConfirm(scope.row)">删除</a>
<a class="customer-a" @click="editCustomerReportSearchColumnModal(scope.row)">查询参数维护</a>
<a class="customer-a" @click="showCustomerReportSearchColumnModal(scope.row)">报表查询</a>
<a class="customer-a" @click="showCustomerReportSearchColumnModal(scope.row)">查询</a>
<a class="customer-a" @click="showAuthCustomerReportModal(scope.row)">权限</a>
</template>
</el-table-column>
@ -79,7 +79,7 @@
@refreshCurrentPage = "refreshCurrentPage">
</updateCustomerReport>
<!-- 查询维护 -->
<!-- 查询参数维护 -->
<editCustomerReportSearchColumn ref="editCustomerReportSearchColumn" :close-on-click-modal="false"
:visible.sync="editCustomerReportSearchColumnFlag"
@refreshCurrentPage = "refreshCurrentPage">

4
src/views/modules/report/user_customer_report.vue

@ -39,7 +39,7 @@
width="220"
:label="'操作'">
<template slot-scope="scope">
<a class="customer-a" @click="showCustomerReportSearchColumnModal(scope.row)">报表查询</a>
<a class="customer-a" @click="showCustomerReportSearchColumnModal(scope.row)">查询</a>
</template>
</el-table-column>
<el-table-column
@ -194,6 +194,8 @@ export default {
this.reportTypeList = data.rows;
//
this.pageData.reportType = data.rows[0].baseData;
//
this.refreshCurrentPage();
})
},

Loading…
Cancel
Save