| | |
| | | <el-button plain type="primary" @click="addHandler">配置</el-button> |
| | | </div> |
| | | <!-- 新增对话框--> |
| | | <el-dialog |
| | | :visible.sync="addVisible" |
| | | append-to-body |
| | | class="avue-dialog avue-dialog--top" |
| | | title="配置数据统计分析" |
| | | top="-50px" |
| | | > |
| | | <el-table |
| | | ref="table" |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%" |
| | | @selection-change="selectChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="主数据库名" |
| | | prop="menuName" |
| | | width="300"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="类型" |
| | | prop="codeType"> |
| | | <el-dialog :visible.sync="addVisible" append-to-body class="avue-dialog avue-dialog--top" title="配置数据统计分析" |
| | | top="-50px"> |
| | | <el-table ref="table" :data="tableData" border style="width: 100%" @selection-change="selectChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column align="center" label="主数据库名" prop="menuName" width="300"></el-table-column> |
| | | <el-table-column align="center" label="类型" prop="codeType"> |
| | | <template slot-scope="{ row }"> |
| | | <el-select v-model="row.codeType" :multiple="true" limit="4" placeholder="请选择图表类型" style="width: 400px"> |
| | | <el-option v-for="(item) in selectList" :label="item.label" :value="item.value"></el-option> |
| | |
| | | </el-dialog> |
| | | <!-- echarts组件--> |
| | | <div style="margin-top: 15px;padding-bottom: 35px"> |
| | | <lineChart v-for="(item,index) in lineList" :key="index" :chartName="item.menuName" |
| | | <lineChart |
| | | v-for="(item,index) in lineList" |
| | | :key="index" |
| | | :chartName="item.menuName" |
| | | :lineData="item.menuData"></lineChart> |
| | | <pieChart v-for="(item,index) in pieList" :key="index" :chartName="item.menuName" |
| | | <pieChart |
| | | v-for="(item,index) in pieList" |
| | | :key="index" |
| | | :chartName="item.menuName" |
| | | :pieData="item.menuData"></pieChart> |
| | | <ColumnarChart v-for="(item,index) in columnarList" :key="index" :chartName="item.menuName" |
| | | <ColumnarChart |
| | | v-for="(item,index) in columnarList" |
| | | :key="index" |
| | | :chartName="item.menuName" |
| | | :columnarData="item.menuData"></ColumnarChart> |
| | | <mixCart v-for="(item,index) in mixList" :key="index" :chartName="item.menuName" |
| | | <mixCart |
| | | v-for="(item,index) in mixList" |
| | | :key="index" |
| | | :chartName="item.menuName" |
| | | :mixData="item.menuData"></mixCart> |
| | | </div> |
| | | </div> |
| | |
| | | import pieChart from "../../components/StatisticsComponent/pieChart" |
| | | import ColumnarChart from "../../components/StatisticsComponent/ColumnarChart" |
| | | import mixCart from "../../components/StatisticsComponent/mixCart" |
| | | import {getStatisticAnalysis,getBtmAndChart,saveStatisticAnalysis} from "@/api/statistic/chart" |
| | | import {getStatisticAnalysis, getBtmAndChart, saveStatisticAnalysis, deleteChartId} from "@/api/statistic/chart" |
| | | import {getList} from "@/api/system/statistic"; |
| | | |
| | | export default { |
| | |
| | | }, |
| | | created() { |
| | | this.getMasterList(); |
| | | this.getEcharts() |
| | | this.getEcharts(); |
| | | // deleteChartId({btmname:'zxssaac',chartId:'3'}).then(res=>{ |
| | | // console.log('res',res) |
| | | // }) |
| | | }, |
| | | methods: { |
| | | getMasterList() { |
| | |
| | | }) |
| | | }, |
| | | getEcharts(){ |
| | | getBtmAndChart().then(res=>{ |
| | | const btmNames = Object.keys(res.data.data).join(','); |
| | | console.log(btmNames); |
| | | getBtmAndChart().then(firstResponse => { |
| | | console.log('btm', firstResponse) |
| | | const btmNames = Object.keys(firstResponse.data.data).join(','); |
| | | const firstData = firstResponse.data.data; |
| | | Object.keys(firstData).forEach((item,index) => { |
| | | let firstIndex = firstData[item].split(','); |
| | | console.log('firstIndex',firstIndex); |
| | | }); |
| | | if(btmNames){ |
| | | getStatisticAnalysis({btmNames}).then(item=>{ |
| | | console.log(item) |
| | | getStatisticAnalysis({btmNames}).then(secondResponse => { |
| | | console.log('getStatisticAnalysis', secondResponse) |
| | | }) |
| | | } |
| | | }) |
| | |
| | | }, |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |