|
@@ -10,7 +10,8 @@
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
<el-button icon="Search" type="success" @click="fetchSetlinfos">查询</el-button>
|
|
|
<el-button icon="Download" type="primary" @click="exportSetlinfoExcel">导出Excel</el-button>
|
|
|
- <el-button type="primary" @click="selectChart">分析图</el-button>
|
|
|
+ <el-button icon="TrendCharts" type="primary" @click="selectChart">分析图</el-button>
|
|
|
+ <el-button icon="Histogram" type="primary" @click="showBarChart">趋势图</el-button>
|
|
|
</el-header>
|
|
|
<el-main>
|
|
|
<el-tabs type="border-card" v-model="setlCondition.selectType" @tab-click="handleClick">
|
|
@@ -75,6 +76,9 @@
|
|
|
<el-dialog v-model="showSetlinfoComponent" :close-on-click-modal="false" title="结算信息" width="70%">
|
|
|
<Setlinfo :setlinfo="currentSetldetail" />
|
|
|
</el-dialog>
|
|
|
+ <el-dialog v-model="showChart" :close-on-click-modal="false" title="指标趋势图" width="70%">
|
|
|
+ <BarChart :ybkf="barChangeData" />
|
|
|
+ </el-dialog>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="同比" name="second">
|
|
|
<el-table :data="setlinfos" :height="tableHeight" border highlight-current-row row-key="childKey" show-summary
|
|
@@ -172,18 +176,19 @@ import { useStore } from 'vuex'
|
|
|
import store from '@/store'
|
|
|
import { getDateRangeFormatDate, formatDatetime } from '@/utils/date'
|
|
|
import {
|
|
|
- selectYbStatInfo, selectYbStatRatio, selectYbChart, selectYbStatDetail, querySettlementInfo
|
|
|
+ selectYbStatInfo, selectYbStatRatio, selectYbChart, selectYbStatDetail, querySettlementInfo, selectBarChangeData
|
|
|
} from '@/api/medical-insurance/si-ybkf'
|
|
|
import { clone } from '@/utils/clone'
|
|
|
import { Export } from '@/utils/ExportExcel'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { downloadExcel } from '@/utils/excel'
|
|
|
-import { pieUtilsOne, barUtilsTwo } from '@/utils/echarts-utils'
|
|
|
+import { pieUtilsOne, barUtilsTwo, barUtilsThree } from '@/utils/echarts-utils'
|
|
|
import Setlinfo from '../../../components/medical-insurance/setlinfo/Index.vue'
|
|
|
+import BarChart from '../../../components/medical-insurance/ybkf/BarChart.vue'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- Setlinfo,
|
|
|
+ Setlinfo, BarChart
|
|
|
},
|
|
|
setup() {
|
|
|
const storeU = useStore()
|
|
@@ -201,6 +206,57 @@ export default {
|
|
|
selectPie: '1'
|
|
|
})
|
|
|
|
|
|
+ const showChart = ref(false)
|
|
|
+ const barChangeData = ref([])
|
|
|
+ const showBarChart = (val) => {
|
|
|
+
|
|
|
+ if (setlCondition.setlType === '11') {
|
|
|
+ ElMessage({
|
|
|
+ message: '门诊不参与排名!',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ let selectInfo = clone(setlCondition)
|
|
|
+ selectBarChangeData(selectInfo)
|
|
|
+ .then((res) => {
|
|
|
+ barChangeData.value = res
|
|
|
+ showChart.value = true
|
|
|
+
|
|
|
+ //月份
|
|
|
+ let months = []
|
|
|
+ //数据
|
|
|
+ let dataBar = []
|
|
|
+ //显示排名前几名
|
|
|
+ let num = 15
|
|
|
+ //单位
|
|
|
+ let unit = '元'
|
|
|
+
|
|
|
+ barChangeData.value.forEach((item) => {
|
|
|
+ let d = []
|
|
|
+
|
|
|
+ if (months.length === 0 || months[months.length - 1] !== item.yf) {
|
|
|
+ months.push(item.yf)
|
|
|
+ }
|
|
|
+
|
|
|
+ d.push(item.totalFee)
|
|
|
+ d.push(item.medins_type)
|
|
|
+ d.push(item.yf)
|
|
|
+
|
|
|
+ dataBar.push(d)
|
|
|
+ })
|
|
|
+ nextTick(() => {
|
|
|
+ barUtilsThree(hightChart, '总费用(TOP' + num + ')', months, dataBar, num - 1, unit)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ barChangeData.value = []
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
const setldetails = ref([])
|
|
|
const showSetldetails = ref(false)
|
|
|
|
|
@@ -412,7 +468,7 @@ export default {
|
|
|
|
|
|
}
|
|
|
|
|
|
- watch(chartData, (orlData, newData) => {
|
|
|
+ watch(() => chartData.value, () => {
|
|
|
let nameText
|
|
|
let barTitles = ['总费用', '全部基金', '药品费', '耗材费']
|
|
|
if (setlCondition.setlType === '21') {
|
|
@@ -470,7 +526,6 @@ export default {
|
|
|
pieUtilsOne(rcpie, '住院人次', pieRc)
|
|
|
pieUtilsOne(zytsPie, '住院天数', pieZyts)
|
|
|
pieUtilsOne(zfyPie, '总费用', pieZfy)
|
|
|
-
|
|
|
})
|
|
|
|
|
|
const handleClick = (tab, event) => {
|
|
@@ -929,6 +984,8 @@ export default {
|
|
|
titleChart,
|
|
|
chartData,
|
|
|
pieChartData,
|
|
|
+ showChart,
|
|
|
+ barChangeData,
|
|
|
pageSize,
|
|
|
currentPage,
|
|
|
filterDialogTitle,
|
|
@@ -939,6 +996,7 @@ export default {
|
|
|
handleCurrentChange,
|
|
|
handleSizeChange,
|
|
|
fetchSetldetails,
|
|
|
+ showBarChart,
|
|
|
selectChart,
|
|
|
handleClose,
|
|
|
cancelForm,
|
|
@@ -1099,4 +1157,5 @@ function initInsurOptions() {
|
|
|
:deep(.el-main) {
|
|
|
padding: 0 5px;
|
|
|
}
|
|
|
+
|
|
|
</style>
|