index.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945
  1. <template>
  2. <div class="bg-box">
  3. <!-- 搜索栏 -->
  4. <div class="bg-card" style="margin-bottom: 18px;">
  5. <el-form :inline="true" :model="formInline" class="demo-form-inline">
  6. <el-form-item label="出院日期" style="margin-bottom: 0">
  7. <el-date-picker v-model="formInline.start_time" type="date" placeholder="出院开始日期" value-format="yyyyMMdd" />
  8. </el-form-item>
  9. <span style="margin-right: 10px; line-height: 40px; color: #7E8BAB;">至</span>
  10. <el-form-item label="" style="margin-bottom: 0">
  11. <el-date-picker v-model="formInline.end_time" type="date" placeholder="出院结束日期" value-format="yyyyMMdd" />
  12. </el-form-item>
  13. <el-form-item style="margin-bottom: 0">
  14. <el-button type="primary" class="bg185DA6" @click="onGobalSearch">查询</el-button>
  15. </el-form-item>
  16. </el-form>
  17. </div>
  18. <!-- 汇总统计 -->
  19. <div class="bg-card" style="margin-bottom: 24px; padding">
  20. <CardTitle title="汇总统计">
  21. <el-image
  22. class="title_arrow"
  23. :class="{'arrow_top': !tongji_show}"
  24. :src="require('../../assets/images/arrow-down.png')"
  25. fit="contain"
  26. @click="onToggleTongjiShow">
  27. </el-image>
  28. </CardTitle>
  29. <el-collapse-transition>
  30. <div v-show="tongji_show">
  31. <el-row :gutter="20">
  32. <el-col :span="16">
  33. <el-row :gutter="20">
  34. <el-col :span="8">
  35. <div class="tongji-item">
  36. <div class="title">首页总例数</div>
  37. <div class="middle">日均例数:<span>{{ tongjiData.dayAvg }}</span></div>
  38. <div class="count">{{ tongjiData.blSum }}</div>
  39. </div>
  40. </el-col>
  41. <el-col :span="8">
  42. <div class="tongji-item nth2">
  43. <div class="title">缺陷总例数</div>
  44. <div class="middle">缺陷占比:<span>{{ tongjiData.averageError }}%</span></div>
  45. <div class="count">{{ tongjiData.qxSum }}</div>
  46. </div>
  47. </el-col>
  48. <el-col :span="8">
  49. <div class="tongji-item">
  50. <div class="title">平均得分</div>
  51. <div class="middle">最低分:<span>{{ tongjiData.minScore }}</span></div>
  52. <div class="count">{{ tongjiData.averageScore }}</div>
  53. </div>
  54. </el-col>
  55. </el-row>
  56. <el-row :gutter="8">
  57. <el-col :span="5">
  58. <div class="level-item">
  59. <div class="level-text">
  60. <span class="level">优</span>
  61. <span class="count">{{ tongjiData.you_sum }}</span>
  62. </div>
  63. <div class="text-right level-percent">
  64. <span>占比{{ tongjiData.you_ratio }}%</span>
  65. </div>
  66. </div>
  67. </el-col>
  68. <el-col :span="5">
  69. <div class="level-item">
  70. <div class="level-text">
  71. <span class="level">良</span>
  72. <span class="count">{{ tongjiData.liang_sum }}</span>
  73. </div>
  74. <div class="text-right level-percent">
  75. <span>占比{{ tongjiData.liang_ratio }}%</span>
  76. </div>
  77. </div>
  78. </el-col>
  79. <el-col :span="5">
  80. <div class="level-item">
  81. <div class="level-text">
  82. <span class="level">中</span>
  83. <span class="count">{{ tongjiData.zhong_sum }}</span>
  84. </div>
  85. <div class="text-right level-percent">
  86. <span>占比{{ tongjiData.zhong_ratio }}%</span>
  87. </div>
  88. </div>
  89. </el-col>
  90. <el-col :span="5">
  91. <div class="level-item">
  92. <div class="level-text">
  93. <span class="level">差</span>
  94. <span class="count">{{ tongjiData.cha_sum }}</span>
  95. </div>
  96. <div class="text-right level-percent">
  97. <span>占比{{ tongjiData.cha_ratio }}%</span>
  98. </div>
  99. </div>
  100. </el-col>
  101. <el-col :span="4">
  102. <div class="level-item" style="background: #fff;">
  103. <el-popover placement="top-start" title="" width="245" trigger="hover">
  104. <div slot v-html="levelText"></div>
  105. <div slot="reference" class="text-center" style="color: #D38D14; font-size: 16px;">
  106. <i class="el-icon-warning-outline"></i>
  107. 等级计算说明
  108. </div>
  109. </el-popover>
  110. </div>
  111. </el-col>
  112. </el-row>
  113. </el-col>
  114. <el-col :span="8">
  115. <div id="tongji_pie"></div>
  116. </el-col>
  117. </el-row>
  118. </div>
  119. </el-collapse-transition>
  120. </div>
  121. <!-- 缺陷详情 -->
  122. <div class="bg-card" style="margin-bottom: 24px; padding">
  123. <CardTitle title="缺陷详情">
  124. <el-image
  125. class="title_arrow"
  126. :class="{'arrow_top': !quxian_show}"
  127. :src="require('../../assets/images/arrow-down.png')"
  128. fit="contain"
  129. @click="onToggleQuexianShow">
  130. </el-image>
  131. </CardTitle>
  132. <el-collapse-transition>
  133. <div v-show="quxian_show">
  134. <el-row :gutter="20">
  135. <el-col :span="16">
  136. <div class="mb20">
  137. <el-radio-group v-model="qxxqData.radio" text-color="#185DA6" fill="#ffffff" @change="handleRadioChange">
  138. <el-radio-button :label="1">缺陷问题(前十)</el-radio-button>
  139. <el-radio-button :label="2">缺陷问题</el-radio-button>
  140. </el-radio-group>
  141. </div>
  142. <!-- 搜索栏 -->
  143. <el-form :inline="true" :model="qxxqData" class="demo-form-inline mb20">
  144. <el-form-item label="缺陷分类" style="margin-bottom: 0">
  145. <el-select v-model="qxxqData.type" clearable filterable placeholder="全部">
  146. <el-option label="患者基本信息" :value="0"></el-option>
  147. <el-option label="诊疗信息" :value="1"></el-option>
  148. <el-option label="费用信息" :value="2"></el-option>
  149. </el-select>
  150. </el-form-item>
  151. <el-form-item label="出院科室" style="margin-bottom: 0">
  152. <el-select v-model="qxxqData.dep_id" clearable filterable placeholder="全部">
  153. <el-option v-for="(item, index) in departmentList" :label="item.name" :value="item.id" :key="index"></el-option>
  154. </el-select>
  155. </el-form-item>
  156. <el-form-item style="margin-bottom: 0">
  157. <el-button type="primary" class="bg185DA6" @click="onQuexianSearch">查询</el-button>
  158. </el-form-item>
  159. </el-form>
  160. <!-- 表格 -->
  161. <el-table
  162. :data="tableData"
  163. class="mb20"
  164. style="width: 100%">
  165. <el-table-column
  166. type="index"
  167. label="序号"
  168. width="80"
  169. align="center">
  170. <template slot-scope="scope">
  171. <span>{{ scope.$index + 1 + (paginationData.page - 1) * paginationData.size }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. prop="desc"
  176. label="缺陷描述"
  177. align="center"
  178. show-overflow-tooltip>
  179. <template slot-scope="scope">
  180. <span class="c_FF786F">{{ scope.row.desc }}</span>
  181. </template>
  182. </el-table-column>
  183. <el-table-column
  184. prop="field"
  185. label="缺陷字段"
  186. width="140"
  187. align="center"
  188. show-overflow-tooltip>
  189. </el-table-column>
  190. <el-table-column
  191. prop="level"
  192. label="缺陷分级"
  193. width="140"
  194. align="center">
  195. </el-table-column>
  196. <el-table-column
  197. prop="count"
  198. label="缺陷数量"
  199. width="140"
  200. align="center">
  201. <template slot-scope="scope">
  202. <span class="link" @click="toPage(scope.row)">{{ scope.row.count }}</span>
  203. </template>
  204. </el-table-column>
  205. </el-table>
  206. <!-- 分页 -->
  207. <div class="text-right" v-if="qxxqData.radio === 2">
  208. <el-pagination
  209. background
  210. @size-change="handleSizeChange"
  211. @current-change="handleCurrentChange"
  212. :current-page="paginationData.page"
  213. :page-size="paginationData.size"
  214. layout="total, sizes, prev, pager, next, jumper"
  215. :total="paginationData.total">
  216. </el-pagination>
  217. </div>
  218. </el-col>
  219. <el-col :span="8">
  220. <div id="qxxq_pie"></div>
  221. </el-col>
  222. </el-row>
  223. </div>
  224. </el-collapse-transition>
  225. </div>
  226. <!-- 医师排名 -->
  227. <div class="bg-card" style="margin-bottom: 24px; padding">
  228. <CardTitle title="医师排名">
  229. <el-image
  230. class="title_arrow"
  231. :class="{'arrow_top': !doctor_show}"
  232. :src="require('../../assets/images/arrow-down.png')"
  233. fit="contain"
  234. @click="onToggleDoctorShow">
  235. </el-image>
  236. <slot>
  237. <el-button type="primary" class="export-btn" icon="el-icon-download" size="small" style="float: right;" @click="onBmyDoctorExport">下载</el-button>
  238. </slot>
  239. </CardTitle>
  240. <el-collapse-transition>
  241. <div v-show="doctor_show">
  242. <el-row :gutter="40">
  243. <el-col :span="12">
  244. <el-table
  245. :data="doctor_tableData"
  246. class="mb20"
  247. style="width: 100%">
  248. <el-table-column
  249. type="index"
  250. label="序号"
  251. width="80"
  252. align="center">
  253. <template slot-scope="scope">
  254. <span>{{ scope.$index + 1 + (paginationDataDoctor.page - 1) * paginationDataDoctor.size }}</span>
  255. </template>
  256. </el-table-column>
  257. <el-table-column
  258. prop="docker_name"
  259. label="医师姓名"
  260. align="center"
  261. show-overflow-tooltip>
  262. </el-table-column>
  263. <el-table-column
  264. prop="bl_sum"
  265. label="病历总数"
  266. align="center">
  267. <template slot-scope="scope">
  268. <span class="link2" @click="toPageDoctor(scope.row)">{{ scope.row.bl_sum }}</span>
  269. </template>
  270. </el-table-column>
  271. <el-table-column
  272. prop="kf_score"
  273. label="总扣分"
  274. align="center">
  275. <template slot-scope="scope">
  276. <span class="link2" @click="toPageDoctorKf(scope.row)">{{ -scope.row.kf_score }}</span>
  277. </template>
  278. </el-table-column>
  279. <el-table-column
  280. prop="avg_score"
  281. label="平均得分"
  282. align="center">
  283. </el-table-column>
  284. </el-table>
  285. <el-pagination
  286. background
  287. @size-change="handleDoctorSizeChange"
  288. @current-change="handleDoctorCurrentChange"
  289. :current-page="paginationDataDoctor.page"
  290. :page-size="paginationDataDoctor.size"
  291. layout="total, sizes, prev, pager, next, jumper"
  292. :total="paginationDataDoctor.total">
  293. </el-pagination>
  294. </el-col>
  295. <el-col :span="12">
  296. <DoctorRankVue v-if="doctor_rank.length" :data="doctor_rank" />
  297. </el-col>
  298. </el-row>
  299. </div>
  300. </el-collapse-transition>
  301. </div>
  302. </div>
  303. </template>
  304. <script>
  305. import DoctorRankVue from './components/index/DoctorRank.vue'
  306. import { bmyDoctorRanking } from '@/api/excel'
  307. export default {
  308. components: {
  309. DoctorRankVue
  310. },
  311. data() {
  312. return {
  313. levelText: '优:≥97分;</br>' + '良:90~96分且不出现A类错误;</br>' + '中:75~89分且不出现A类错误;</br>' + '差:<75分。',
  314. formInline: {
  315. start_time: '',
  316. end_time: '',
  317. },
  318. tongjiData: {
  319. blSum: 0,
  320. dayAvg: 0,
  321. qxSum: 0,
  322. averageError: 0,
  323. averageScore: 0,
  324. minScore: 0,
  325. you_sum: 0,
  326. liang_sum: 0,
  327. zhong_sum: 0,
  328. cha_sum: 0,
  329. you_ratio: 0,
  330. liang_ratio: 0,
  331. zhong_ratio: 0,
  332. cha_ratio: 0,
  333. jbxx: 0,
  334. zlxx: 0,
  335. fyxx: 0,
  336. qtxx: 0
  337. },
  338. tongji_show: true,
  339. tongjiDom: null,
  340. // 缺陷详情
  341. quxian_show: true,
  342. qxxqData: {
  343. radio: 1,
  344. dep_id: '',
  345. level: ''
  346. },
  347. tableData: [],
  348. paginationData: {
  349. page: 1,
  350. size: 10,
  351. total: 0
  352. },
  353. departmentList: [],
  354. // 医师排名
  355. doctor_show: true,
  356. paginationDataDoctor: {
  357. page: 1,
  358. size: 10,
  359. total: 0
  360. },
  361. // doctor_tableData: [],
  362. doctor_tableData: [
  363. {
  364. "docker_name": "杜晓峰",
  365. "bl_sum": 28,
  366. "qx_sum": 22,
  367. "sum_score": 2800,
  368. "df_score": 2158,
  369. "kf_score": 642,
  370. "proportion": "77.07",
  371. "avg_score": 88
  372. },
  373. {
  374. "docker_name": "杜晓峰",
  375. "bl_sum": 28,
  376. "qx_sum": 22,
  377. "sum_score": 2800,
  378. "df_score": 2158,
  379. "kf_score": 642,
  380. "proportion": "77.07",
  381. "avg_score": 88
  382. },
  383. {
  384. "docker_name": "杜晓峰",
  385. "bl_sum": 28,
  386. "qx_sum": 22,
  387. "sum_score": 2800,
  388. "df_score": 2158,
  389. "kf_score": 642,
  390. "proportion": "77.07",
  391. "avg_score": 88
  392. },
  393. {
  394. "docker_name": "杜晓峰",
  395. "bl_sum": 28,
  396. "qx_sum": 22,
  397. "sum_score": 2800,
  398. "df_score": 2158,
  399. "kf_score": 642,
  400. "proportion": "77.07",
  401. "avg_score": 88
  402. },
  403. {
  404. "docker_name": "杜晓峰",
  405. "bl_sum": 28,
  406. "qx_sum": 22,
  407. "sum_score": 2800,
  408. "df_score": 2158,
  409. "kf_score": 642,
  410. "proportion": "77.07",
  411. "avg_score": 88
  412. },
  413. {
  414. "docker_name": "杜晓峰",
  415. "bl_sum": 28,
  416. "qx_sum": 22,
  417. "sum_score": 2800,
  418. "df_score": 2158,
  419. "kf_score": 642,
  420. "proportion": "77.07",
  421. "avg_score": 88
  422. },
  423. {
  424. "docker_name": "杜晓峰",
  425. "bl_sum": 28,
  426. "qx_sum": 22,
  427. "sum_score": 2800,
  428. "df_score": 2158,
  429. "kf_score": 642,
  430. "proportion": "77.07",
  431. "avg_score": 88
  432. },
  433. {
  434. "docker_name": "杜晓峰",
  435. "bl_sum": 28,
  436. "qx_sum": 22,
  437. "sum_score": 2800,
  438. "df_score": 2158,
  439. "kf_score": 642,
  440. "proportion": "77.07",
  441. "avg_score": 88
  442. },
  443. {
  444. "docker_name": "杜晓峰",
  445. "bl_sum": 28,
  446. "qx_sum": 22,
  447. "sum_score": 2800,
  448. "df_score": 2158,
  449. "kf_score": 642,
  450. "proportion": "77.07",
  451. "avg_score": 88
  452. },
  453. {
  454. "docker_name": "杜晓峰",
  455. "bl_sum": 28,
  456. "qx_sum": 22,
  457. "sum_score": 2800,
  458. "df_score": 2158,
  459. "kf_score": 642,
  460. "proportion": "77.07",
  461. "avg_score": 88
  462. }
  463. ],
  464. doctor_rank: []
  465. }
  466. },
  467. async mounted() {
  468. this.doctor_rank = JSON.parse(JSON.stringify(this.doctor_tableData)).slice(0, 10)
  469. const year = new Date().getFullYear()
  470. const month = new Date().getMonth() + 1 > 10 ? `0${new Date().getMonth() + 1}` : new Date().getMonth() + 1
  471. const day = new Date().getDay() < 10 ? `0${new Date().getDay()}` : new Date().getDay()
  472. this.$set(this.formInline, 'start_time', `${year}0101`)
  473. this.$set(this.formInline, 'end_time', `${year}${month}${day}`)
  474. this.getDepartmentData()
  475. await this.getTongjiData()
  476. this.tongjiPie()
  477. this.qxxqPie()
  478. this.getQuexianData()
  479. this.getDoctorRank()
  480. },
  481. methods: {
  482. // 缺陷详情列表
  483. toPage(row) {
  484. const { start_time, end_time } = this.formInline
  485. this.$router.push({ name: 'EncoderErrors', query: { rule_id: row.error_rule, start_time, end_time }})
  486. },
  487. // 全局筛选
  488. async onGobalSearch() {
  489. await this.getTongjiData()
  490. this.tongjiPieUpdate()
  491. this.qxxqPieUpdate()
  492. this.getQuexianData()
  493. this.getDoctorRank()
  494. },
  495. // 获取缺陷数据
  496. getQuexianData() {
  497. const { dep_id, level } = this.qxxqData
  498. const { page, size } = this.paginationData
  499. const params = {
  500. dep_id,
  501. level,
  502. page,
  503. page_size: size,
  504. ...this.formInline
  505. }
  506. this.$axios_new.post('/api/bmy/qualityData', params).then(res => {
  507. const { count } = res.data
  508. if (count < 10) {
  509. for(let i=0; i<10 - count-1; i++) {
  510. res.data.data.push({
  511. error_rule: '',
  512. count: '',
  513. eror_zb: '',
  514. category: '',
  515. down: '',
  516. desc: '',
  517. level: '',
  518. type: ''
  519. })
  520. }
  521. }
  522. this.tableData = res.data.data
  523. this.paginationData.total = res.data.count
  524. })
  525. },
  526. // 获取部门集合
  527. getDepartmentData() {
  528. this.$axios.post('/get_omr_department_list').then(res => {
  529. this.departmentList = res.data;
  530. });
  531. },
  532. // 获取统计信息
  533. async getTongjiData() {
  534. // await this.$axios_new.post('/api/bmy/qualityStatistics', this.formInline).then(res => {
  535. // this.tongjiData = res.data
  536. // })
  537. this.tongjiData = {
  538. "blSum": 1,
  539. "dayAvg": 1,
  540. "qxSum": 1,
  541. "averageError": "100.00",
  542. "averageScore": "99.00",
  543. "minScore": 99,
  544. "you_sum": 1,
  545. "liang_sum": 0,
  546. "zhong_sum": 0,
  547. "cha_sum": 0,
  548. "you_ratio": "100.00",
  549. "liang_ratio": "0.00",
  550. "zhong_ratio": "0.00",
  551. "cha_ratio": "0.00",
  552. "jbxx": 7,
  553. "zlxx": 1,
  554. "fyxx": 0
  555. }
  556. },
  557. onToggleTongjiShow() {
  558. this.tongji_show = !this.tongji_show
  559. },
  560. onToggleQuexianShow() {
  561. this.quxian_show = !this.quxian_show
  562. },
  563. // 统计环图
  564. tongjiPie() {
  565. this.tongjiDom = this.$echarts.init(
  566. document.getElementById('tongji_pie')
  567. )
  568. const option = {
  569. tooltip: {
  570. trigger: 'item'
  571. },
  572. legend: {
  573. top: '30%',
  574. left: 'right',
  575. orient: 'vertical',
  576. align: 'left',
  577. itemGap: 30
  578. },
  579. color: ['#5087EC', '#FF786F'],
  580. series: [
  581. {
  582. type: 'pie',
  583. center: ['42%', '50%'],
  584. radius: ['60%', '80%'],
  585. avoidLabelOverlap: true,
  586. startAngle: 180,
  587. label: {
  588. show: true,
  589. formatter: '{b}: {c}'
  590. },
  591. labelLine: {
  592. show: true,
  593. length2: 40,
  594. minTurnAngle: 120,
  595. showAbove: true
  596. },
  597. data: [
  598. { value: this.tongjiData.blSum, name: '首页总病例' },
  599. { value: this.tongjiData.qxSum, name: '缺陷总例数' }
  600. ]
  601. }
  602. ]
  603. }
  604. this.tongjiDom.setOption(option)
  605. // 窗口大小改变 重新渲染
  606. window.addEventListener('resize', () => {
  607. this.tongjiDom.resize()
  608. })
  609. },
  610. tongjiPieUpdate() {
  611. const option = {
  612. tooltip: {
  613. trigger: 'item'
  614. },
  615. legend: {
  616. top: '5%',
  617. left: 'right',
  618. orient: 'vertical',
  619. align: 'left'
  620. },
  621. color: ['#5087EC', '#FF786F'],
  622. series: [
  623. {
  624. type: 'pie',
  625. radius: ['60%', '80%'],
  626. avoidLabelOverlap: true,
  627. label: {
  628. show: true,
  629. formatter: '{b}: {c}'
  630. },
  631. labelLine: {
  632. show: true
  633. },
  634. data: [
  635. { value: this.tongjiData.blSum, name: '首页总病例' },
  636. { value: this.tongjiData.qxSum, name: '缺陷总例数' },
  637. ]
  638. }
  639. ]
  640. }
  641. this.tongjiDom.setOption(option)
  642. },
  643. // 缺陷环图
  644. qxxqPie() {
  645. this.tongjiDom = this.$echarts.init(
  646. document.getElementById('qxxq_pie')
  647. )
  648. const option = {
  649. tooltip: {
  650. trigger: 'item'
  651. },
  652. legend: {
  653. width: '300',
  654. top: '10%',
  655. left: 'center',
  656. align: 'left',
  657. formatter: (name) => {
  658. return `{a|${name}} `
  659. },
  660. textStyle: {
  661. rich: {
  662. a: {
  663. width: 100
  664. }
  665. }
  666. }
  667. },
  668. color: ['#FF8279', '#FF9F98', '#FFBEB9', '#FFD9D6'],
  669. series: [
  670. {
  671. type: 'pie',
  672. top: '20%',
  673. radius: ['55%', '70%'],
  674. avoidLabelOverlap: false,
  675. label: {
  676. show: true,
  677. formatter: '{b}: {c}'
  678. },
  679. labelLine: {
  680. show: true
  681. },
  682. data: [
  683. { value: this.tongjiData.jbxx || 0, name: '患者基本信息' },
  684. { value: this.tongjiData.zlxx || 0, name: '诊疗信息' },
  685. { value: this.tongjiData.fyxx || 0, name: '费用信息' },
  686. { value: this.tongjiData.qtxx || 0, name: '其他信息' }
  687. ]
  688. }
  689. ]
  690. }
  691. this.tongjiDom.setOption(option)
  692. // 窗口大小改变 重新渲染
  693. window.addEventListener('resize', () => {
  694. this.tongjiDom.resize()
  695. })
  696. },
  697. qxxqPieUpdate() {
  698. const option = {
  699. tooltip: {
  700. trigger: 'item'
  701. },
  702. legend: {
  703. top: '10%',
  704. left: 'center',
  705. align: 'left'
  706. },
  707. color: ['#FF8279', '#FF9F98', '#FFBEB9', '#FFD9D6'],
  708. series: [
  709. {
  710. type: 'pie',
  711. top: '20%',
  712. radius: ['55%', '70%'],
  713. avoidLabelOverlap: false,
  714. label: {
  715. show: true,
  716. formatter: '{b}: {c}'
  717. },
  718. labelLine: {
  719. show: true
  720. },
  721. data: [
  722. { value: this.tongjiData.jbxx || 0, name: '患者基本信息' },
  723. { value: this.tongjiData.zlxx || 0, name: '诊疗信息' },
  724. { value: this.tongjiData.fyxx || 0, name: '费用信息' },
  725. { value: this.tongjiData.qtxx || 0, name: '其他信息' }
  726. ]
  727. }
  728. ]
  729. }
  730. this.tongjiDom.setOption(option)
  731. },
  732. // 分页
  733. handleSizeChange(val) {
  734. this.paginationData.page = 1
  735. this.paginationData.size = val
  736. this.getQuexianData()
  737. },
  738. handleCurrentChange(val) {
  739. this.paginationData.page = val
  740. this.getQuexianData()
  741. },
  742. // tag 修改
  743. handleRadioChange(val) {
  744. if (val === 1) {
  745. this.paginationData.page = 1
  746. this.paginationData.size = 10
  747. }
  748. this.getQuexianData()
  749. },
  750. // 缺陷搜索
  751. onQuexianSearch() {
  752. this.paginationData.page = 1
  753. this.getQuexianData()
  754. },
  755. // 医师排名
  756. onToggleDoctorShow() {
  757. this.doctor_show = !this.doctor_show
  758. },
  759. // 分页
  760. handleDoctorSizeChange(val) {
  761. this.paginationDataDoctor.page = 1
  762. this.paginationDataDoctor.size = val
  763. this.getDoctorRank()
  764. },
  765. handleDoctorCurrentChange(val) {
  766. this.paginationDataDoctor.page = val
  767. this.getDoctorRank()
  768. },
  769. // 医师排名
  770. getDoctorRank() {
  771. const { page, size } = this.paginationDataDoctor
  772. const params = {
  773. page,
  774. page_size: size,
  775. ...this.formInline,
  776. is_export: 0
  777. }
  778. this.$axios_new.post('/api/bmy/doctorRanking', params).then(res => {
  779. const { count } = res.data
  780. if (count < 10) {
  781. for(let i=0; i<10 - count-1; i++) {
  782. res.data.list.push({
  783. "docker_name": "",
  784. "bl_sum": '',
  785. "qx_sum": '',
  786. "sum_score": '',
  787. "df_score": '',
  788. "kf_score": '',
  789. "proportion": ""
  790. })
  791. }
  792. }
  793. this.doctor_tableData = res.data.list
  794. this.paginationDataDoctor.total = res.data.count
  795. this.doctor_rank = JSON.parse(JSON.stringify(res.data.list)).slice(0, 10)
  796. })
  797. },
  798. // 导出
  799. onBmyDoctorExport() {
  800. const params = {
  801. is_export: 1,
  802. ...this.formInline
  803. }
  804. bmyDoctorRanking(params).then(res => {
  805. const content = res.data; // 后台返回二进制数据
  806. const blob = new Blob([content]);
  807. const fileName = `编码员-医师排名.csv`;
  808. if ('download' in document.createElement('a')) {
  809. // 非IE下载
  810. const elink = document.createElement('a');
  811. elink.download = fileName;
  812. elink.style.display = 'none';
  813. elink.href = URL.createObjectURL(blob);
  814. document.body.appendChild(elink);
  815. elink.click();
  816. URL.revokeObjectURL(elink.href); // 释放URL 对象
  817. document.body.removeChild(elink);
  818. } else {
  819. // IE10+下载
  820. navigator.msSaveBlob(blob, fileName);
  821. }
  822. });
  823. },
  824. // 医生病历总数
  825. toPageDoctor(row) {
  826. const { start_time, end_time } = this.formInline
  827. this.$router.push({ name: 'DoctorBl', query: { doctor_name: row.docker_name, start_time, end_time }})
  828. },
  829. // 医生病历扣分
  830. toPageDoctorKf(row) {
  831. const { start_time, end_time } = this.formInline
  832. this.$router.push({ name: 'DoctorBlKf', query: { doctor_name: row.docker_name, start_time, end_time }})
  833. },
  834. }
  835. }
  836. </script>
  837. <style lang="scss" scoped>
  838. ::v-deep .el-radio-button__inner {
  839. border-color: #DCDFE6 !important;
  840. font-weight: 500;
  841. &:hover {
  842. color: #606266;
  843. }
  844. }
  845. ::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner {
  846. box-shadow: #DCDFE6 -1px 0px 0px 0px !important;
  847. }
  848. .tongji-item {
  849. height: 114px;
  850. background: #5087EC;
  851. border-radius: 8px;
  852. margin-bottom: 20px;
  853. padding: 25px 18px 0;
  854. box-sizing: border-box;
  855. position: relative;
  856. &.nth2 {
  857. background: #FF786F;
  858. }
  859. .title {
  860. font-size: 16px;
  861. font-family: PingFangSC-Regular, PingFang SC;
  862. font-weight: 400;
  863. color: #FFFFFF;
  864. line-height: 22px;
  865. margin-bottom: 20px;
  866. }
  867. .middle {
  868. text-align: right;
  869. font-size: 16px;
  870. font-family: PingFangSC-Regular, PingFang SC;
  871. font-weight: 400;
  872. color: #FFFFFF;
  873. line-height: 22px;
  874. position: absolute;
  875. top: 45px;
  876. right: 18px;
  877. }
  878. .count {
  879. font-size: 24px;
  880. font-family: DINAlternate-Bold, DINAlternate;
  881. font-weight: bold;
  882. color: #FFFFFF;
  883. line-height: 28px;
  884. }
  885. }
  886. .level-item {
  887. height: 75px;
  888. background: #EAF4FF;
  889. border-radius: 4px;
  890. padding: 0 11px;
  891. box-sizing: border-box;
  892. overflow: hidden;
  893. span {
  894. font-size: 14px;
  895. font-family: PingFangSC-Regular, PingFang SC;
  896. font-weight: 400;
  897. color: #333333;
  898. line-height: 75px;
  899. vertical-align: middle;
  900. }
  901. .level {
  902. font-size: 20px;
  903. font-family: PingFangSC-Medium, PingFang SC;
  904. font-weight: 500;
  905. color: #333333;
  906. line-height: 75px;
  907. }
  908. .count {
  909. font-size: 24px;
  910. font-family: DINAlternate-Bold, DINAlternate;
  911. font-weight: bold;
  912. color: #38A1F2;
  913. line-height: 75px;
  914. margin-left: 5px;
  915. }
  916. .level-text {
  917. float: left;
  918. box-sizing: border-box;
  919. }
  920. .level-percent {
  921. float: right;
  922. box-sizing: border-box;
  923. }
  924. }
  925. .title_arrow {
  926. width: 10px;
  927. height: 11px;
  928. margin-left: 5px;
  929. cursor: pointer;
  930. &.arrow_top {
  931. transform: rotate(180deg);
  932. }
  933. }
  934. #tongji_pie {
  935. height: 200px;
  936. }
  937. #qxxq_pie {
  938. height: 600px;
  939. margin-top: 68px;
  940. }
  941. </style>