TargetHomePage.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. <template>
  2. <div style="background-color: #fff;">
  3. <div class="cl-dv">
  4. <div class="cl-sn">
  5. <el-card class="el-cd1" shadow="hover">
  6. <template #header>
  7. <div>
  8. <span>本年度责任指标</span>
  9. </div>
  10. </template>
  11. <div>
  12. <i class="iconfont icon-zhantie"></i> 99 / 100
  13. </div>
  14. </el-card>
  15. </div>
  16. <div class="cl-sn">
  17. <el-card class="el-cd2" shadow="hover">
  18. <template #header>
  19. <div>
  20. <span>本年度填报指标</span>
  21. </div>
  22. </template>
  23. <div>
  24. <i class="iconfont icon-zhantie"></i> 99 / 100
  25. </div>
  26. </el-card>
  27. </div>
  28. <div class="cl-sn">
  29. <el-card class="el-cd3" shadow="hover">
  30. <template #header>
  31. <div>
  32. <span>本年度指标总分</span>
  33. </div>
  34. </template>
  35. <div>
  36. <i class="iconfont icon-zhantie"></i> 998 / 1000 分
  37. </div>
  38. </el-card>
  39. </div>
  40. <div class="cl-sn">
  41. <el-card class="el-cd4" shadow="hover">
  42. <template #header>
  43. <div>
  44. <span>本年度责任指标不合格项</span>
  45. </div>
  46. </template>
  47. <div>
  48. <i class="iconfont icon-zhantie"></i> 123
  49. </div>
  50. </el-card>
  51. </div>
  52. </div>
  53. <div style="margin-top: 5px;">
  54. <el-row :gutter="24">
  55. <el-col :span="12">
  56. <div style="width: 100%; height: 400px" id="main"></div>
  57. </el-col>
  58. <el-col :span="12">
  59. <div style="width: 100%; height: 400px" id="rcpie"></div>
  60. </el-col>
  61. </el-row>
  62. </div>
  63. <div style="margin-top: 5px; calc(100% - 450);">
  64. <page-layer>
  65. <template #header height="55px;">
  66. <el-date-picker v-model="dateRange" type="monthrange" range-separator="至" start-placeholder="开始月份"
  67. end-placeholder="结束月份" style="width: 320px"></el-date-picker>
  68. <el-cascader v-model="queryData.dataInfo" :options="targetTreeData" style="width: 720px"
  69. :props="{ value: 'id', label: 'label', children: 'children', expandTrigger: 'hover' }"
  70. @change="handleChange" :clearable="true" :filterable="true" placeholder="请选择指标">
  71. </el-cascader>
  72. <el-button type="primary" icon="Search" @click="query" style="margin-left: 10px">查询</el-button>
  73. </template>
  74. <template #main>
  75. <el-tabs type="border-card" v-model="queryData.selectType" @tab-click="handleClick">
  76. <el-tab-pane label="数据" name="first">
  77. <el-table :data="targetInfos" :height="tableHeight" border highlight-current-row
  78. row-key="childKey" stripe>
  79. <el-table-column type="index" label="序号" align="center"
  80. header-align="center"></el-table-column>
  81. <el-table-column label="指标名称" prop="t_name" align="left" header-align="center"
  82. width="160"></el-table-column>
  83. <el-table-column label="评审方法" prop="t_method" align="left" header-align="center" width="180"
  84. show-overflow-tooltip></el-table-column>
  85. <el-table-column label="计分细则" prop="t_rule" align="left" header-align="center" width="280"
  86. show-overflow-tooltip></el-table-column>
  87. <el-table-column label="分数" prop="t_score" align="right" header-align="center"
  88. width="80"></el-table-column>
  89. <el-table-column label="指标结果" prop="t_result" header-align="center">
  90. <el-table-column label="2019年" prop="t_y1" align="right"
  91. header-align="center"></el-table-column>
  92. <el-table-column label="2020年" prop="t_y2" align="right"
  93. header-align="center"></el-table-column>
  94. <el-table-column label="2021年" prop="t_y3" align="right"
  95. header-align="center"></el-table-column>
  96. <el-table-column label="2022年" prop="t_y4" align="right"
  97. header-align="center"></el-table-column>
  98. </el-table-column>
  99. <el-table-column label="负责人" prop="t_manager" align="center"
  100. header-align="center"></el-table-column>
  101. <el-table-column label="完成状态" prop="t_state" align="center"
  102. header-align="center"></el-table-column>
  103. </el-table>
  104. </el-tab-pane>
  105. </el-tabs>
  106. </template>
  107. </page-layer>
  108. </div>
  109. </div>
  110. </template>
  111. <script setup name="TargetHomePage">
  112. import PageLayer from '@/layout/PageLayer.vue'
  113. import { useStore } from 'vuex'
  114. import { ElMessage } from 'element-plus'
  115. import { ref, reactive, onMounted, nextTick } from 'vue'
  116. import { highBarsUtils, highBarsNiceUtils } from '@/utils/high-charts'
  117. import { getDateRangeFormatDate, formatDatetime } from '@/utils/date'
  118. import { clone } from '../../../utils/clone'
  119. import { selectTargetDictTree } from '../../../api/target-management/target-dict'
  120. const dateRange = ref([])
  121. const targetInfos = ref([])
  122. const storeU = useStore()
  123. const windowSize = storeU.state.app.windowSize
  124. const tableHeight = windowSize.h - 620
  125. const dateS = getDateRangeFormatDate(dateRange.value)
  126. const targetTreeData = ref()
  127. const queryData = reactive({
  128. startTime: dateS.startTime,
  129. endTime: dateS.endTime,
  130. targetType: 't1',
  131. selectType: 'first',
  132. dataInfo: null,
  133. })
  134. const handleChange = (value) => {
  135. console.log(value)
  136. }
  137. const queryParam = reactive({
  138. id: '', // 指标编码
  139. name: '', // 指标名称
  140. pid: '', // 父级编码
  141. sort: '', // 指标序号
  142. type: '', // 对接类型
  143. state: '', // 状态
  144. openTime: '', // 启用时间
  145. deptId: '', // 责任科室id
  146. source: '', // 数据来源
  147. calcChild: '', // 计算分子sql
  148. calcMom: '', // 计算分母sql
  149. isLeaf: '', //是否叶子节点(0:否, 1:是)
  150. })
  151. const qeryTargetDictTree = () => {
  152. queryParam.id = '';
  153. queryParam.pid = '';
  154. selectTargetDictTree(queryParam)
  155. .then((res) => {
  156. targetTreeData.value = clone(res[0].children)
  157. });
  158. }
  159. const handleClick = (tab, event) => {
  160. if (!dateRange.value) {
  161. ElMessage({
  162. message: '请选择时间范围!',
  163. type: 'warning',
  164. duration: 2500,
  165. showClose: true,
  166. })
  167. return
  168. }
  169. if (!queryData.dataInfo) {
  170. ElMessage({
  171. message: '请选择指标!',
  172. type: 'warning',
  173. duration: 2500,
  174. showClose: true,
  175. })
  176. return
  177. }
  178. queryData.setlType = queryData.dataInfo[0]
  179. queryData.insurType = queryData.dataInfo[1]
  180. queryData.startTime = formatDatetime(dateRange.value[0])
  181. queryData.endTime = formatDatetime(dateRange.value[1])
  182. // 查询哪个tab页面
  183. queryData.selectType = tab.props.name
  184. if (queryData.selectType === 'first') {
  185. targetInfos.value = [
  186. {
  187. t_name: '核定床位数', t_method: '核定床位数(≥500张)', t_rule: '核定床位数(≥500张)记1分',
  188. t_score: 1, t_y1: '3', t_y2: '8', t_y3: '12', t_y4: '24', t_manager: 'xxx', t_state: '已完成'
  189. },
  190. {
  191. t_name: '实际开放床位数', t_method: '实际开放床位数(≥500张)', t_rule: '实际开放床位数(≥500张)记3分',
  192. t_score: 1, t_y1: '90', t_y2: '124', t_y3: '145', t_y4: '165', t_manager: 'xxx', t_state: '已完成'
  193. },
  194. {
  195. t_name: '平均床位使用率', t_method: '平均床位使用率(≥93%)', t_rule: '平均床位使用率(≥93%)记6分',
  196. t_score: 1, t_y1: '93%', t_y2: '90%', t_y3: '96%', t_y4: '98%', t_manager: 'xxx', t_state: '已完成'
  197. }
  198. ]
  199. }
  200. }
  201. onMounted(() => {
  202. nextTick(async () => {
  203. qeryTargetDictTree()
  204. })
  205. let Tnames = ['资源配置与运行数据', '医疗服务能力与医院质量安全指标', '重点专业质量控制指标', '单病种(术种)质量控制指标', '重点医疗技术临床应用质量控制指标']
  206. let Xnames = ['2019', '2020', '2021', '2022', '2023']
  207. let infoData = [{
  208. name: '资源配置与运行数据',
  209. data: [240, 270, 280, 290, 300]
  210. },
  211. {
  212. name: '医疗服务能力与医院质量安全指标',
  213. data: [260, 280, 270, 230, 270]
  214. },
  215. {
  216. name: '重点专业质量控制指标',
  217. data: [240, 230, 270, 280, 270]
  218. },
  219. {
  220. name: '单病种(术种)质量控制指标',
  221. data: [100, 90, 100, 90, 110]
  222. },
  223. {
  224. name: '重点医疗技术临床应用质量控制指标',
  225. data: [25, 27, 22, 28, 30]
  226. }]
  227. let unit = '分'
  228. let titleName = '单位:' + unit
  229. let name = '指标得分情况统计'
  230. let statusInfos = {
  231. zflag: false, // 柱子是否显示数据
  232. toolBoxFlag: false, // 是否显示下载,切换标签
  233. }
  234. highBarsUtils(main, name, Tnames, Xnames, infoData, titleName, unit, 1, statusInfos)
  235. highBarsNiceUtils(rcpie)
  236. })
  237. const query = () => {
  238. if (!dateRange.value) {
  239. ElMessage({
  240. message: '请选择时间范围!',
  241. type: 'warning',
  242. duration: 2500,
  243. showClose: true,
  244. })
  245. return
  246. }
  247. if (!queryData.dataInfo) {
  248. ElMessage({
  249. message: '请选择指标!',
  250. type: 'warning',
  251. duration: 2500,
  252. showClose: true,
  253. })
  254. return
  255. }
  256. if (queryData.selectType === 'first') {
  257. targetInfos.value = [
  258. {
  259. t_name: '核定床位数', t_method: '核定床位数(≥500张)', t_rule: '核定床位数(≥500张)记1分',
  260. t_score: 1, t_y1: '3', t_y2: '8', t_y3: '12', t_y4: '24', t_manager: 'xxx', t_state: '已完成'
  261. },
  262. {
  263. t_name: '实际开放床位数', t_method: '实际开放床位数(≥500张)', t_rule: '实际开放床位数(≥500张)记3分',
  264. t_score: 1, t_y1: '90', t_y2: '124', t_y3: '145', t_y4: '165', t_manager: 'xxx', t_state: '已完成'
  265. },
  266. {
  267. t_name: '平均床位使用率', t_method: '平均床位使用率(≥93%)', t_rule: '平均床位使用率(≥93%)记6分',
  268. t_score: 1, t_y1: '93%', t_y2: '90%', t_y3: '96%', t_y4: '98%', t_manager: 'xxx', t_state: '已完成'
  269. }
  270. ]
  271. }
  272. }
  273. function initTargetOptions() {
  274. return [
  275. {
  276. value: 't1',
  277. label: '第一章 资源配置与运行数据指标(300分)',
  278. children: [
  279. {
  280. value: 'a1',
  281. label: '床位配置(10分)',
  282. },
  283. {
  284. value: 'a2',
  285. label: '卫生技术人员配备(60分)',
  286. },
  287. {
  288. value: 'a3',
  289. label: '相关科室资源配置(60分)',
  290. },
  291. {
  292. value: 'a4',
  293. label: '运行指标(150分)',
  294. },
  295. {
  296. value: 'a5',
  297. label: '科研指标(20分)',
  298. }
  299. ],
  300. },
  301. {
  302. value: 't2',
  303. label: '第二章 医疗服务能力与医院质量安全指标(280分)',
  304. children: [
  305. {
  306. value: 'b1',
  307. label: '医疗服务能力(80分)',
  308. },
  309. {
  310. value: 'b2',
  311. label: '医院质量指标(80分)',
  312. },
  313. {
  314. value: 'b3',
  315. label: '医疗安全指标(年度医院获得性指标)(120分)',
  316. },
  317. ],
  318. },
  319. ]
  320. }
  321. </script>
  322. <style lang="scss" scoped>
  323. .cl-dv {
  324. display: flex;
  325. padding: 5px;
  326. border-radius: 5px;
  327. justify-content: space-evenly;
  328. .cl-sn {
  329. width: calc(100% / 4);
  330. margin: 0 5px;
  331. .el-cd1 {
  332. background-color: blue;
  333. color: #fff;
  334. border-bottom: 0px solid blue;
  335. }
  336. .el-cd2 {
  337. background-color: blueviolet;
  338. color: #fff;
  339. border-bottom: 0px solid blueviolet;
  340. }
  341. .el-cd3 {
  342. background-color: #049481;
  343. color: #fff;
  344. border-bottom: 0px solid #049481;
  345. }
  346. .el-cd4 {
  347. background-color: brown;
  348. color: #fff;
  349. border-bottom: 0px solid brown;
  350. }
  351. }
  352. }
  353. </style>