Selaa lähdekoodia

添加人数树状图

hsh 3 vuotta sitten
vanhempi
commit
6e8fb88584

+ 10 - 1
src/api/medical-insurance/si-ybkf.js

@@ -52,4 +52,13 @@ export function selectBarChangeData(data) {
     method: 'post',
     data,
   })
-}
+}
+
+// 查询树数据
+export function selectTreeData(data) {
+  return request({
+    url: '/ybQuery/selectTreeData',
+    method: 'post',
+    data,
+  })
+}

+ 145 - 0
src/utils/echarts-utils.js

@@ -701,3 +701,148 @@ function updateMonth(myChart, option, data, month) {
   })
 }
 
+// 树状图
+export function treeChartRoot(id, name, data, nodes) {
+  let linearBarDom = echarts.getInstanceByDom(id)
+
+  if (linearBarDom == null) {
+    linearBarDom = echarts.init(id)
+  }
+
+  // 解决重新加载树会残留上次数据线条的问题
+  if (linearBarDom != null) {
+    linearBarDom.setOption({}, true)
+  }
+
+  let option;
+
+  option = {
+    tooltip: {
+      trigger: 'item',
+      triggerOn: 'mousemove'
+    },
+    series: [
+      {
+        type: 'tree',
+        id: 0,
+        name: name,
+        data: [data],
+        top: '2%',
+        left: '8%',
+        bottom: '2%',
+        right: '20%',
+        layout: 'orthogonal',
+        orient: 'LR',
+        symbol: 'emptyCircle', // emptyCircle
+        symbolSize: 7,
+        edgeShape: 'polyline',
+        edgeForkPosition: '63%',
+        initialTreeDepth: 3,
+        lineStyle: {
+          width: 2
+        },
+        label: {
+          backgroundColor: '#fff',
+          position: 'left',
+          verticalAlign: 'middle',
+          align: 'right',
+          formatter: function (params) {
+            let flag = false
+            for (let i = 0; i < nodes.length; i++) {
+              if (nodes[i] != '' && params.name.match(nodes[i])) {
+                flag = true
+              }
+            }
+
+            if (flag) {
+              return '{a|' + params.name + ': ' + params.value + '}'
+            } else {
+              return params.name + ': ' + params.value
+            }
+          },
+          rich: {
+            a: {
+              color: 'red',
+              backgroundColor: 'yellow'
+            }
+          }
+        },
+        leaves: {
+          label: {
+            position: 'right',
+            verticalAlign: 'middle',
+            align: 'left'
+          }
+        },
+        emphasis: {
+          focus: 'descendant'
+        },
+        expandAndCollapse: true,
+        animationDuration: 550,
+        animationDurationUpdate: 750
+      }
+    ]
+  }
+
+  //linearBarDom.clear()
+  option && linearBarDom.setOption(option, true)
+
+  linearBarDom.on('click', function (param) {
+    if (param.data.collapsed === false) {
+      param.data.collapsed = true
+    } else {
+      param.data.collapsed = false
+    }
+    callChangeCollapsed(linearBarDom, param, option)
+
+  })
+
+  window.addEventListener("resize", function () {
+    linearBarDom.resize();
+  })
+
+}
+
+function callChangeCollapsed(charts, param, option) {
+
+  for (let i = 0; i < option.series[0].data[0].children.length; i++) {
+    if (option.series[0].data[0].children[i].id === param.data.id && option.series[0].data[0].children[i].pid === param.data.pid) {
+      if (option.series[0].data[0].children[i].collapsed != param.data.collapsed) {
+        option.series[0].data[0].children[i].collapsed = param.data.collapsed
+        charts.setOption({}, true)
+        charts.setOption(option, true)
+      } else {
+        if (option.series[0].data[0].children[i].collapsed === false) {
+          option.series[0].data[0].children[i].collapsed = true
+        } else {
+          option.series[0].data[0].children[i].collapsed = false
+        }
+        charts.setOption({}, true)
+        charts.setOption(option, true)
+      }
+      return
+    } else {
+      if (option.series[0].data[0].children[i].children) {
+        for (let j = 0; j < option.series[0].data[0].children[i].children.length; j++) {
+          if (option.series[0].data[0].children[i].children[j].id === param.data.id && option.series[0].data[0].children[i].children[j].pid === param.data.pid) {
+            if (option.series[0].data[0].children[i].children[j].collapsed != param.data.collapsed) {
+              option.series[0].data[0].children[i].children[j].collapsed = param.data.collapsed
+              charts.setOption({}, true)
+              charts.setOption(option, true)
+            } else {
+              if (option.series[0].data[0].children[i].children[j].collapsed === false) {
+                option.series[0].data[0].children[i].children[j].collapsed = true
+              } else {
+                option.series[0].data[0].children[i].children[j].collapsed = false
+              }
+              charts.setOption({}, true)
+              charts.setOption(option, true)
+            }
+            return
+          }
+        }
+      }
+    }
+  }
+
+}

+ 226 - 150
src/views/medical-insurance/allpatient/InsurIncomeAnalysis.vue

@@ -1,23 +1,38 @@
 <template>
   <el-container>
     <el-header style="height: 35px; margin-top: 5px; padding: 0 5px">
-      <el-date-picker v-model="dateRange" type="monthrange" range-separator="至" start-placeholder="开始月份"
-        end-placeholder="结束月份" style="width: 220px">
-      </el-date-picker>
-      <el-cascader v-model="setlCondition.dataInfo" :options="setlCondition.options" :props="{ expandTrigger: 'hover' }"
-        @change="handleChange" :clearable="true" :filterable="true" placeholder="请选择险种">
+      <el-date-picker v-model="dateRange" type="monthrange" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" style="width: 220px"> </el-date-picker>
+      <el-cascader
+        v-model="setlCondition.dataInfo"
+        :options="setlCondition.options"
+        :props="{ expandTrigger: 'hover' }"
+        @change="handleChange"
+        :clearable="true"
+        :filterable="true"
+        placeholder="请选择险种"
+      >
       </el-cascader>
       <el-divider direction="vertical"></el-divider>
-      <el-button icon="Search" type="success" @click="fetchSetlinfos">查询</el-button>
+      <el-button icon="Search" type="primary" @click="fetchSetlinfos">查询</el-button>
       <el-button icon="Download" type="primary" @click="exportSetlinfoExcel">导出Excel</el-button>
       <el-button icon="TrendCharts" type="primary" @click="selectChart">分析图</el-button>
-      <el-button icon="Histogram" type="primary" @click="showBarChart">趋势图</el-button>
+      <el-button icon="Histogram" type="primary" @click="showBarChart">费用趋势图</el-button>
+      <el-button icon="TrendCharts" type="primary" @click="showTreeChart">人数树状图</el-button>
     </el-header>
     <el-main>
       <el-tabs type="border-card" v-model="setlCondition.selectType" @tab-click="handleClick">
         <el-tab-pane label="数据" name="first">
-          <el-table :data="setlinfos" :height="tableHeight" border highlight-current-row row-key="childKey" show-summary
-            :summary-method="getSummaries1" stripe @row-dblclick="fetchSetldetails">
+          <el-table
+            :data="setlinfos"
+            :height="tableHeight"
+            border
+            highlight-current-row
+            row-key="childKey"
+            show-summary
+            :summary-method="getSummaries1"
+            stripe
+            @row-dblclick="fetchSetldetails"
+          >
             <el-table-column label="险种类型" prop="insurName" fixed header-align="center"></el-table-column>
             <el-table-column label="住院人次" prop="psnCount" align="center" header-align="center"></el-table-column>
             <el-table-column label="住院天数" prop="inDays" align="center" header-align="center"></el-table-column>
@@ -28,23 +43,26 @@
             <el-table-column label="耗材费用" prop="matFee" align="right" header-align="center"></el-table-column>
             <el-table-column label="耗材占比(%)" prop="matFeeRatio" align="right" header-align="center"></el-table-column>
             <el-table-column label="基本医疗统筹金额" prop="fundPooling" align="right" header-align="center"></el-table-column>
-            <el-table-column label="大病基金" prop="bigIllFundPooling" align="right" header-align="center">
-            </el-table-column>
-            <el-table-column label="公务员基金支付" prop="civilServiceFund" align="right" header-align="center">
-            </el-table-column>
+            <el-table-column label="大病基金" prop="bigIllFundPooling" align="right" header-align="center"> </el-table-column>
+            <el-table-column label="公务员基金支付" prop="civilServiceFund" align="right" header-align="center"> </el-table-column>
             <el-table-column label="其他基金" prop="otherFunds" align="right" header-align="center"></el-table-column>
             <el-table-column label="全部基金" prop="allFunds" align="right" header-align="center"></el-table-column>
+            <el-table-column label="个人账户支出" prop="acctPay" align="right" header-align="center"></el-table-column>
           </el-table>
-          <el-dialog v-model="showSetldetails" :close-on-click-modal="false" :close-on-press-escape="false"
-            :title="filterDialogTitle" width="70%">
+          <el-dialog v-model="showSetldetails" :close-on-click-modal="false" :close-on-press-escape="false" :title="filterDialogTitle" width="70%">
             <div style="width: 130px; height: 36px; position: absolute; top: 16px; right: 60px">
               <el-button icon="Download" type="primary" @click="exportYbDetailExcel">导出Excel</el-button>
             </div>
-            <el-table :data="setldetails.slice(pageSize * (currentPage - 1), pageSize * currentPage)" height="560"
-              highlight-current-row stripe @row-dblclick="openSetlinfoComponent">
+            <el-table
+              :data="setldetails.slice(pageSize * (currentPage - 1), pageSize * currentPage)"
+              height="560"
+              highlight-current-row
+              stripe
+              @row-dblclick="openSetlinfoComponent"
+            >
               <el-table-column fixed label="序号" type="index" width="40"></el-table-column>
               <el-table-column fixed label="姓名" prop="psnName" width="60"></el-table-column>
-              <el-table-column label="住院号" prop="patNo" width="70"></el-table-column>
+              <el-table-column fixed label="住院号" prop="patNo" width="70"></el-table-column>
               <el-table-column label="次数" prop="times" width="40"></el-table-column>
               <el-table-column label="性别" prop="gendName" width="50"></el-table-column>
               <el-table-column label="出生日期" prop="brdy"></el-table-column>
@@ -69,20 +87,43 @@
               <el-table-column label="中药饮片费" prop="chargeHerbal"></el-table-column>
               <el-table-column label="耗材费" prop="chargeSanitaryMaterial"></el-table-column>
             </el-table>
-            <el-pagination :current-page="currentPage" :page-size="pageSize" :page-sizes="[15, 30, 45, 60]"
-              :total="setldetails.length" layout="total, sizes, prev, pager, next, jumper" style="margin-top: 5px"
-              @size-change="handleSizeChange" @current-change="handleCurrentChange"></el-pagination>
+            <el-pagination
+              :current-page="currentPage"
+              :page-size="pageSize"
+              :page-sizes="[15, 30, 45, 60]"
+              :total="setldetails.length"
+              layout="total, sizes, prev, pager, next, jumper"
+              style="margin-top: 5px"
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+            ></el-pagination>
           </el-dialog>
           <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%">
+          <el-dialog v-model="showChart" :close-on-click-modal="false" title="费用趋势图" width="70%" top="40px" draggable>
             <BarChart :ybkf="barChangeData" />
           </el-dialog>
+          <el-dialog v-model="treeChart" :close-on-click-modal="false" title="人数树状图" width="70%" top="40px" draggable>
+            <!-- <TreeChart /> -->
+            <div style="height: 35px">
+              <el-input v-model="deptNo" clearable style="width: 220px" class="w-50 m-2">
+                <template #prepend>科室</template>
+              </el-input>
+              <el-input v-model="doctorId" clearable style="width: 220px" class="w-50 m-2">
+                <template #prepend>管床医生</template>
+              </el-input>
+              <el-input v-model="insurCode" clearable style="width: 220px" class="w-50 m-2">
+                <template #prepend>医保类别</template>
+              </el-input>
+              <el-divider direction="vertical"></el-divider>
+              <el-button icon="Search" type="primary" @click="selectTreeChart">查询</el-button>
+            </div>
+            <div style="width: 100%; height: 700px" id="treedsf"></div>
+          </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
-            :summary-method="getSummaries1">
+          <el-table :data="setlinfos" :height="tableHeight" border highlight-current-row row-key="childKey" show-summary :summary-method="getSummaries1">
             <el-table-column label="月份" prop="month" fixed align="center" header-align="center"></el-table-column>
             <el-table-column label="总费用" prop="zfy" header-align="center">
               <el-table-column label="今年" prop="zfy_jn" align="right" header-align="center"></el-table-column>
@@ -107,8 +148,7 @@
           </el-table>
         </el-tab-pane>
         <el-tab-pane label="环比" name="third">
-          <el-table :data="setlinfos" :height="tableHeight" border highlight-current-row row-key="childKey" show-summary
-            :summary-method="getSummaries1">
+          <el-table :data="setlinfos" :height="tableHeight" border highlight-current-row row-key="childKey" show-summary :summary-method="getSummaries1">
             <el-table-column label="月份" prop="month" align="center" fixed header-align="center"></el-table-column>
             <el-table-column label="总费用" prop="zfys" header-align="center">
               <el-table-column label="费用" prop="zfy" align="right" header-align="center"></el-table-column>
@@ -175,20 +215,20 @@ import { computed, onMounted, reactive, ref, watch } from 'vue'
 import { useStore } from 'vuex'
 import store from '@/store'
 import { getDateRangeFormatDate, formatDatetime } from '@/utils/date'
-import {
-  selectYbStatInfo, selectYbStatRatio, selectYbChart, selectYbStatDetail, querySettlementInfo, selectBarChangeData
-} from '@/api/medical-insurance/si-ybkf'
+import { selectYbStatInfo, selectYbStatRatio, selectYbChart, selectYbStatDetail, querySettlementInfo, selectBarChangeData, selectTreeData } 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, barUtilsThree } from '@/utils/echarts-utils'
+import { pieUtilsOne, barUtilsTwo, barUtilsThree, treeChartRoot } from '@/utils/echarts-utils'
 import Setlinfo from '../../../components/medical-insurance/setlinfo/Index.vue'
 import BarChart from '../../../components/medical-insurance/ybkf/BarChart.vue'
+// import TreeChart from '../../../components/medical-insurance/ybkf/TreeChart.vue'
 
 export default {
   components: {
-    Setlinfo, BarChart
+    Setlinfo,
+    BarChart,
   },
   setup() {
     const storeU = useStore()
@@ -203,13 +243,16 @@ export default {
     const titleChart = ref('图形')
     const chartData = ref([])
     const pieChartData = reactive({
-      selectPie: '1'
+      selectPie: '1',
     })
 
+    const deptNo = ref('')
+    const doctorId = ref('')
+    const insurCode = ref('')
+
     const showChart = ref(false)
     const barChangeData = ref([])
     const showBarChart = (val) => {
-
       if (setlCondition.setlType === '11') {
         ElMessage({
           message: '门诊不参与排名!',
@@ -257,6 +300,37 @@ export default {
         })
     }
 
+    const treeChart = ref(false)
+    const treeData = ref([])
+    const showTreeChart = (val) => {
+      treeChart.value = true
+      let selectData = clone(setlCondition)
+      selectTreeData(selectData).then((res) => {
+        treeData.value = res
+        deptNo.value = ''
+        doctorId.value = ''
+        insurCode.value = ''
+        nextTick(() => {
+          treeChartRoot(treedsf, '树', treeData.value, [])
+        })
+      })
+    }
+
+    const selectTreeChart = (val) => {
+      treeChart.value = true
+      let selectData = clone(setlCondition)
+      selectData.dept = deptNo.value
+      selectData.doctor = doctorId.value
+      selectData.insurType = insurCode.value
+      selectTreeData(selectData).then((res) => {
+        treeData.value = res
+        let searchData = [deptNo.value, doctorId.value, insurCode.value]
+        nextTick(() => {
+          treeChartRoot(treedsf, '树', treeData.value, searchData)
+        })
+      })
+    }
+
     const setldetails = ref([])
     const showSetldetails = ref(false)
 
@@ -342,7 +416,7 @@ export default {
         return
       }
 
-      if (setlCondition.selectType === "first") {
+      if (setlCondition.selectType === 'first') {
         selectYbStatInfo(setlCondition)
           .then((res) => {
             setlinfos.value = res
@@ -359,7 +433,6 @@ export default {
             setlinfos.value = []
           })
       }
-
     }
 
     const exportYbDetailExcel = () => {
@@ -402,9 +475,7 @@ export default {
       }
     }
 
-    const handleChange = (value) => {
-
-    }
+    const handleChange = (value) => {}
 
     const pageSize = ref(30)
     const currentPage = ref(1)
@@ -416,7 +487,6 @@ export default {
     }
 
     const selectChart = async () => {
-
       if (!dateRange.value) {
         ElMessage({
           message: '请选择时间范围!',
@@ -465,71 +535,72 @@ export default {
       setlCondition1.selectType = 'first'
       data = data.concat(await selectYbStatInfo(setlCondition1))
       chartData.value = data
-
     }
 
-    watch(() => chartData.value, () => {
-      let nameText
-      let barTitles = ['总费用', '全部基金', '药品费', '耗材费']
-      if (setlCondition.setlType === '21') {
-        nameText = '住院'
-      } else {
-        nameText = '门诊'
-      }
-      nameText = titleChart.value + '(' + nameText + ')-'
-      let yAxisName = '单位:百万元'
-      let tipUnit = '元'
-
-      let echartsXdata = []
-      let zfy = []
-      let zjj = []
-      let ypf = []
-      let clf = []
-      let pieRc = []
-      let pieZyts = []
-      let pieZfy = []
-
-      chartData.value.forEach((item) => {
-        if (item.month) {
-          zfy.push(item.zfy_jn)
-          zjj.push(item.zjj_jn)
-          if (item.ypf_jn > 0.00) {
-            ypf.push(item.ypf_jn)
-          }
-          if (item.clf_jn > 0.00) {
-            clf.push(item.clf_jn)
-          }
-          echartsXdata.push(item.month)
+    watch(
+      () => chartData.value,
+      () => {
+        let nameText
+        let barTitles = ['总费用', '全部基金', '药品费', '耗材费']
+        if (setlCondition.setlType === '21') {
+          nameText = '住院'
         } else {
-          let dataRc = {}
-          let dataZyts = {}
-          let dataZfy = {}
-          dataRc.value = item.psnCount
-          dataRc.name = item.insurName
-          dataRc.unit = '人'
-          pieRc.push(dataRc)
-          dataZyts.value = item.inDays
-          dataZyts.name = item.insurName
-          dataZyts.unit = '天'
-          pieZyts.push(dataZyts)
-          dataZfy.value = item.totalFee
-          dataZfy.name = item.insurName
-          dataZfy.unit = '元'
-          pieZfy.push(dataZfy)
+          nameText = '门诊'
         }
-      })
-      barUtilsTwo(zfyDst, nameText + barTitles[0], echartsXdata, zfy, barTitles[0], yAxisName, tipUnit)
-      barUtilsTwo(zjjDst, nameText + barTitles[1], echartsXdata, zjj, barTitles[1], yAxisName, tipUnit)
-      barUtilsTwo(ypfDst, nameText + barTitles[2], echartsXdata, ypf, barTitles[2], yAxisName, tipUnit)
-      barUtilsTwo(clfDst, nameText + barTitles[3], echartsXdata, clf, barTitles[3], yAxisName, tipUnit)
-
-      pieUtilsOne(rcpie, '住院人次', pieRc)
-      pieUtilsOne(zytsPie, '住院天数', pieZyts)
-      pieUtilsOne(zfyPie, '总费用', pieZfy)
-    })
+        nameText = titleChart.value + '(' + nameText + ')-'
+        let yAxisName = '单位:百万元'
+        let tipUnit = '元'
+
+        let echartsXdata = []
+        let zfy = []
+        let zjj = []
+        let ypf = []
+        let clf = []
+        let pieRc = []
+        let pieZyts = []
+        let pieZfy = []
+
+        chartData.value.forEach((item) => {
+          if (item.month) {
+            zfy.push(item.zfy_jn)
+            zjj.push(item.zjj_jn)
+            if (item.ypf_jn > 0.0) {
+              ypf.push(item.ypf_jn)
+            }
+            if (item.clf_jn > 0.0) {
+              clf.push(item.clf_jn)
+            }
+            echartsXdata.push(item.month)
+          } else {
+            let dataRc = {}
+            let dataZyts = {}
+            let dataZfy = {}
+            dataRc.value = item.psnCount
+            dataRc.name = item.insurName
+            dataRc.unit = '人'
+            pieRc.push(dataRc)
+            dataZyts.value = item.inDays
+            dataZyts.name = item.insurName
+            dataZyts.unit = '天'
+            pieZyts.push(dataZyts)
+            dataZfy.value = item.totalFee
+            dataZfy.name = item.insurName
+            dataZfy.unit = '元'
+            pieZfy.push(dataZfy)
+          }
+        })
+        barUtilsTwo(zfyDst, nameText + barTitles[0], echartsXdata, zfy, barTitles[0], yAxisName, tipUnit)
+        barUtilsTwo(zjjDst, nameText + barTitles[1], echartsXdata, zjj, barTitles[1], yAxisName, tipUnit)
+        barUtilsTwo(ypfDst, nameText + barTitles[2], echartsXdata, ypf, barTitles[2], yAxisName, tipUnit)
+        barUtilsTwo(clfDst, nameText + barTitles[3], echartsXdata, clf, barTitles[3], yAxisName, tipUnit)
+
+        pieUtilsOne(rcpie, '住院人次', pieRc)
+        pieUtilsOne(zytsPie, '住院天数', pieZyts)
+        pieUtilsOne(zfyPie, '总费用', pieZfy)
+      }
+    )
 
     const handleClick = (tab, event) => {
-
       if (!dateRange.value) {
         ElMessage({
           message: '请选择时间范围!',
@@ -559,7 +630,7 @@ export default {
       // 查询哪个tab页面
       setlCondition.selectType = tab.props.name
 
-      if (setlCondition.selectType === "first") {
+      if (setlCondition.selectType === 'first') {
         selectYbStatInfo(setlCondition)
           .then((res) => {
             setlinfos.value = res
@@ -581,6 +652,7 @@ export default {
     const getSummaries = () => {
       if (setlCondition.selectType === 'first') {
         let sums1 = {
+          insurName: '',
           psnCount: 0,
           inDays: 0,
           avgInDays: 0,
@@ -594,6 +666,7 @@ export default {
           civilServiceFund: 0,
           otherFunds: 0,
           allFunds: 0,
+          acctPay: 0,
         }
         setlinfos.value.forEach((itm) => {
           for (let k in sums1) {
@@ -602,12 +675,13 @@ export default {
         })
         sums1.insurName = '合计'
         sums1.avgInDays = (sums1.inDays / sums1.psnCount).toFixed(2)
-        sums1.drugFeeRatio = (sums1.drugFee / sums1.totalFee * 100).toFixed(2)
-        sums1.matFeeRatio = (sums1.matFee / sums1.totalFee * 100).toFixed(2)
+        sums1.drugFeeRatio = ((sums1.drugFee / sums1.totalFee) * 100).toFixed(2)
+        sums1.matFeeRatio = ((sums1.matFee / sums1.totalFee) * 100).toFixed(2)
 
         return sums1
       } else if (setlCondition.selectType === 'second') {
         let sums2 = {
+          month: '',
           zfy_jn: 0,
           zfy_qn: 0,
           zfy_tb: 0,
@@ -627,13 +701,14 @@ export default {
           }
         })
         sums2.month = '合计'
-        sums2.zfy_tb = ((sums2.zfy_jn - sums2.zfy_qn) / sums2.zfy_qn * 100).toFixed(2) + '%'
-        sums2.zjj_tb = ((sums2.zjj_jn - sums2.zjj_qn) / sums2.zjj_qn * 100).toFixed(2) + '%'
-        sums2.ypf_tb = ((sums2.ypf_jn - sums2.ypf_qn) / sums2.ypf_qn * 100).toFixed(2) + '%'
-        sums2.clf_tb = ((sums2.clf_jn - sums2.clf_qn) / sums2.clf_qn * 100).toFixed(2) + '%'
+        sums2.zfy_tb = (((sums2.zfy_jn - sums2.zfy_qn) / sums2.zfy_qn) * 100).toFixed(2) + '%'
+        sums2.zjj_tb = (((sums2.zjj_jn - sums2.zjj_qn) / sums2.zjj_qn) * 100).toFixed(2) + '%'
+        sums2.ypf_tb = (((sums2.ypf_jn - sums2.ypf_qn) / sums2.ypf_qn) * 100).toFixed(2) + '%'
+        sums2.clf_tb = (((sums2.clf_jn - sums2.clf_qn) / sums2.clf_qn) * 100).toFixed(2) + '%'
         return sums2
       } else {
         let sums3 = {
+          month: '',
           zfy: 0,
           zfy_hb: 0,
           zjj: 0,
@@ -655,7 +730,6 @@ export default {
         sums3.clf_hb = ''
         return sums3
       }
-
     }
 
     const getSummaries1 = (param) => {
@@ -731,44 +805,44 @@ export default {
         if (column.property === 'qn_clf') {
           qn_clf = index
         }
-        const values = data.map(item => Number(item[column.property]))
+        const values = data.map((item) => Number(item[column.property]))
         if (column.property === 'avgInDays') {
           sums[index] = (sums[inDaysIndex] / sums[psnCountIndex]).toFixed(2)
         } else if (column.property === 'drugFeeRatio') {
           if (sums[zfyIndex] > 0) {
-            sums[index] = (sums[ypfIndex] / sums[zfyIndex] * 100).toFixed(2)
+            sums[index] = ((sums[ypfIndex] / sums[zfyIndex]) * 100).toFixed(2)
           } else {
-            sums[index] = 0.00
+            sums[index] = 0.0
           }
         } else if (column.property === 'matFeeRatio') {
           if (sums[zfyIndex] > 0) {
-            sums[index] = (sums[clfIndex] / sums[zfyIndex] * 100).toFixed(2)
+            sums[index] = ((sums[clfIndex] / sums[zfyIndex]) * 100).toFixed(2)
           } else {
-            sums[index] = 0.00
+            sums[index] = 0.0
           }
         } else if (column.property === 'zfy_tb') {
           if (sums[qn_zfy] > 0) {
-            sums[index] = ((sums[jn_zfy] - sums[qn_zfy]) / sums[qn_zfy] * 100).toFixed(2) + '%'
+            sums[index] = (((sums[jn_zfy] - sums[qn_zfy]) / sums[qn_zfy]) * 100).toFixed(2) + '%'
           } else {
-            sums[index] = 0.00 + '%'
+            sums[index] = 0.0 + '%'
           }
         } else if (column.property === 'zjj_tb') {
           if (sums[qn_zjj] > 0) {
-            sums[index] = ((sums[jn_zjj] - sums[qn_zjj]) / sums[qn_zjj] * 100).toFixed(2) + '%'
+            sums[index] = (((sums[jn_zjj] - sums[qn_zjj]) / sums[qn_zjj]) * 100).toFixed(2) + '%'
           } else {
-            sums[index] = 0.00 + '%'
+            sums[index] = 0.0 + '%'
           }
         } else if (column.property === 'ypf_tb') {
           if (sums[qn_ypf] > 0) {
-            sums[index] = ((sums[jn_ypf] - sums[qn_ypf]) / sums[qn_ypf] * 100).toFixed(2) + '%'
+            sums[index] = (((sums[jn_ypf] - sums[qn_ypf]) / sums[qn_ypf]) * 100).toFixed(2) + '%'
           } else {
-            sums[index] = 0.00 + '%'
+            sums[index] = 0.0 + '%'
           }
         } else if (column.property === 'clf_tb') {
           if (sums[qn_clf] > 0) {
-            sums[index] = ((sums[jn_clf] - sums[qn_clf]) / sums[qn_clf] * 100).toFixed(2) + '%'
+            sums[index] = (((sums[jn_clf] - sums[qn_clf]) / sums[qn_clf]) * 100).toFixed(2) + '%'
           } else {
-            sums[index] = 0.00 + '%'
+            sums[index] = 0.0 + '%'
           }
         } else if (column.property === 'zfy_hb') {
           sums[index] = ''
@@ -778,7 +852,7 @@ export default {
           sums[index] = ''
         } else if (column.property === 'clf_hb') {
           sums[index] = ''
-        } else if (!values.every(value => isNaN(value))) {
+        } else if (!values.every((value) => isNaN(value))) {
           sums[index] = values.reduce((prev, curr) => {
             const value = Number(curr)
             if (!isNaN(value)) {
@@ -799,14 +873,14 @@ export default {
       })
 
       sums.avgInDays = (sums.inDays / sums.psnCount).toFixed(2)
-      sums.drugFeeRatio = (sums.drugFee / sums.totalFee * 100).toFixed(2)
-      sums.matFeeRatio = (sums.matFee / sums.totalFee * 100).toFixed(2)
+      sums.drugFeeRatio = ((sums.drugFee / sums.totalFee) * 100).toFixed(2)
+      sums.matFeeRatio = ((sums.matFee / sums.totalFee) * 100).toFixed(2)
 
       return sums
     }
 
     const filterSetlTypeName = () => {
-      if ("21" === setlCondition.setlType) {
+      if ('21' === setlCondition.setlType) {
         return setlCondition.options[0].label
       } else {
         return setlCondition.options[1].label
@@ -816,7 +890,7 @@ export default {
     }
 
     const filterInsurTypeName = () => {
-      if ("21" === setlCondition.setlType) {
+      if ('21' === setlCondition.setlType) {
         for (let i = 0; i < setlCondition.options[0].children.length; i++) {
           if (setlCondition.options[0].children[i].value === setlCondition.insurType) {
             return setlCondition.options[0].children[i].label
@@ -865,13 +939,14 @@ export default {
             civilServiceFund: '公务员基金支付',
             otherFunds: '其他基金',
             allFunds: '全部基金',
+            acctPay: '个人账户支出',
           }
           const setlTypeName = filterSetlTypeName()
           const insurTypeName = filterInsurTypeName()
           Export(data, title, `【${year}】【${setlTypeName}】【${insurTypeName}】`)
         } else if (setlCondition.selectType === 'second') {
           const setlTypeName = filterSetlTypeName()
-          const exportName = year + setlTypeName + "同比"
+          const exportName = year + setlTypeName + '同比'
           if (setlinfos.value.length <= 0) {
             ElMessage({
               message: '没有可以导出的数据!',
@@ -903,11 +978,10 @@ export default {
                 downloadExcel(data)
               }, 500)
             })
-            .catch(() => {
-            })
+            .catch(() => {})
         } else {
           const setlTypeName = filterSetlTypeName()
-          const exportName = year + setlTypeName + "环比"
+          const exportName = year + setlTypeName + '环比'
           if (setlinfos.value.length <= 0) {
             ElMessage({
               message: '没有可以导出的数据!',
@@ -939,35 +1013,33 @@ export default {
                 downloadExcel(data)
               }, 500)
             })
-            .catch(() => {
-            })
+            .catch(() => {})
         }
-
       }
     }
 
     const handleClose = (done) => {
       if (this.loading) {
-        return;
+        return
       }
       this.$confirm('确定要提交表单吗?')
-        .then(_ => {
-          this.loading = true;
+        .then((_) => {
+          this.loading = true
           this.timer = setTimeout(() => {
-            done();
+            done()
             // 动画关闭需要一定的时间
             setTimeout(() => {
-              this.loading = false;
-            }, 400);
-          }, 2000);
+              this.loading = false
+            }, 400)
+          }, 2000)
         })
-        .catch(_ => { });
+        .catch((_) => {})
     }
 
     const cancelForm = () => {
-      this.loading = false;
-      this.dialog = false;
-      clearTimeout(this.timer);
+      this.loading = false
+      this.dialog = false
+      clearTimeout(this.timer)
     }
 
     onMounted(() => {
@@ -977,6 +1049,9 @@ export default {
 
     return {
       tableHeight,
+      deptNo,
+      doctorId,
+      insurCode,
       dateRange,
       setlCondition,
       setlinfos,
@@ -985,7 +1060,9 @@ export default {
       chartData,
       pieChartData,
       showChart,
+      treeChart,
       barChangeData,
+      treeData,
       pageSize,
       currentPage,
       filterDialogTitle,
@@ -997,6 +1074,8 @@ export default {
       handleSizeChange,
       fetchSetldetails,
       showBarChart,
+      showTreeChart,
+      selectTreeChart,
       selectChart,
       handleClose,
       cancelForm,
@@ -1101,7 +1180,7 @@ function initInsurOptions() {
           value: 4399012102,
           label: '省内单病种',
         },
-      ]
+      ],
     },
     {
       value: '11',
@@ -1119,20 +1198,14 @@ function initInsurOptions() {
           value: 14,
           label: '特殊门诊',
         },
-        {
-          value: 3,
-          label: '工伤门诊',
-        },
         {
           value: 51,
           label: '生育门诊',
         },
-      ]
+      ],
     },
-
   ]
 }
-
 </script>
 
 <style scoped>
@@ -1158,4 +1231,7 @@ function initInsurOptions() {
   padding: 0 5px;
 }
 
+:deep(.el-dialog__header) {
+  margin-right: 2px;
+}
 </style>