CaseQualityBox2.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <div ref="box" class="box">
  3. <div class="score-box" :class="scoreLevel == '甲'? 'scoreLevel_1' : (scoreLevel == '乙'?'scoreLevel_2':'scoreLevel_3') ">
  4. <div>病案评分<span class="score-f">{{ data.score }}分</span></div>
  5. <!-- <h2 class="score-dj">{{ scoreLevel }}</h2> -->
  6. </div>
  7. <div class="card-box">
  8. <el-row :gutter="20" style="margin-bottom: 16px;">
  9. <el-col :span="12">
  10. <div class="title">病历问题:<span class="error">{{ data.total }}</span></div>
  11. </el-col>
  12. </el-row>
  13. <el-row :gutter="20">
  14. <el-col :span="12" v-for="(item, index) of data.summary" :key="index">
  15. <div class="title2" @click="onScroll(index)">{{ item.category }}:<span>({{ item.nums }})</span></div>
  16. </el-col>
  17. </el-row>
  18. </div>
  19. <el-scrollbar ref="scrollRef" class="scrollBox" :style="{'height': scrollHeight}">
  20. <el-table
  21. :data="tableData"
  22. default-expand-all
  23. :show-header="false"
  24. style="width: 100%">
  25. <el-table-column type="expand">
  26. <template slot-scope="props">
  27. <el-card v-for="(item, index) of props.row.children" :key="index" class="box-card" shadow="hover">
  28. <el-image
  29. class="typeImg"
  30. v-if="item.is_ai"
  31. :src="require('../../../assets/images/jiqiren.png')"
  32. fit="contain">
  33. </el-image>
  34. <el-image
  35. v-else
  36. class="typeImg"
  37. :src="require('../../../assets/images/kefu.png')"
  38. fit="contain">
  39. </el-image>
  40. <el-row>
  41. <el-col :span="24">
  42. <el-descriptions title="" :column="1" direction="vertical">
  43. <el-descriptions-item label="质控项目">
  44. <el-tag class="category">{{ item.error_field }}</el-tag>
  45. <el-tag type="danger" class="koufen">-{{ item.score }}分</el-tag>
  46. </el-descriptions-item>
  47. <el-descriptions-item label="错误描述">{{ item.notice }}</el-descriptions-item>
  48. <el-descriptions-item label="质控依据">
  49. <div v-for="(yItem, yIndex) of item.basis" :key="yIndex" style="margin-bottom: 10px;">
  50. <div v-if="item.rule_id !== 6">
  51. <span class="span-index">{{ yIndex+1 }}</span>
  52. <span v-for="(cItem, cIndex) of yItem" :key="cIndex">{{ cItem }}</span>
  53. </div>
  54. <div v-else>
  55. <span class="span-index">1</span>
  56. <span>{{ yItem[0] }}</span>
  57. </div>
  58. </div>
  59. </el-descriptions-item>
  60. </el-descriptions>
  61. </el-col>
  62. </el-row>
  63. </el-card>
  64. </template>
  65. </el-table-column>
  66. <el-table-column
  67. label=""
  68. prop="">
  69. <template slot-scope="scope">
  70. <div :class="`category${scope.$index}`">{{ scope.row.category }}</div>
  71. </template>
  72. </el-table-column>
  73. </el-table>
  74. </el-scrollbar>
  75. </div>
  76. </template>
  77. <script>
  78. export default {
  79. props: {
  80. data: {
  81. type: Object,
  82. default() {
  83. return {
  84. data: {}
  85. }
  86. }
  87. },
  88. type:{
  89. type: String,
  90. default() {
  91. return ''
  92. }
  93. },
  94. height: {
  95. type: Number,
  96. default() {
  97. return 0
  98. }
  99. }
  100. },
  101. computed: {
  102. tableData() {
  103. let arr = []
  104. const keys = Object.keys(this.data.data)
  105. for(let i=0; i<keys.length; i++) {
  106. let obj = {
  107. category: keys[i],
  108. children: this.data.data[keys[i]]
  109. }
  110. arr.push(obj)
  111. }
  112. return arr
  113. },
  114. scoreLevel() {
  115. /**
  116. * 甲>90分
  117. * 乙75-90分
  118. * 丙<75分
  119. * */
  120. let str
  121. const { score } = this.data
  122. if (score > 90) {
  123. str = '甲'
  124. } else if (score < 75) {
  125. str = '丙'
  126. } else {
  127. str = '乙'
  128. }
  129. return str
  130. },
  131. scrollHeight() {
  132. // if (this.height) {
  133. // return (this.height - 214)+'px'
  134. // } else {
  135. // return `calc(100vh - 314px)`
  136. // }
  137. return `calc(100vh - 320px)`
  138. }
  139. },
  140. methods: {
  141. onScroll(index) {
  142. const el = this.$el.querySelector(`.category${index}`);
  143. const node = el.parentNode.parentNode.parentNode
  144. this.$refs["scrollRef"].wrap.scrollTop = node.offsetTop;
  145. }
  146. }
  147. }
  148. </script>
  149. <style lang="scss" scoped>
  150. ::v-deep .el-scrollbar__wrap {
  151. overflow-x: hidden;
  152. }
  153. ::v-deep .el-divider--horizontal {
  154. margin: 10px 0;
  155. }
  156. .box {
  157. width: 380px;
  158. padding: 16px;
  159. background: #FFFFFF;
  160. border-radius: 5px;
  161. .score-box{
  162. width: 100%;
  163. margin-bottom: 16px;
  164. padding: 30px 50px 30px 20px;
  165. border-radius: 4px;
  166. display: flex;
  167. align-items: center;
  168. justify-content: space-between;
  169. color: #fff;
  170. div{
  171. font-size: 17px;
  172. }
  173. .score-f{
  174. padding-left: 20px;
  175. font-size: 17px;
  176. }
  177. .score-dj,.score-f{
  178. font-weight: bold;
  179. }
  180. }
  181. .score-box.scoreLevel_1{
  182. background: rgb(11, 133, 63);
  183. background-image: url('../../../assets/images/icon-jia.png');
  184. background-repeat: no-repeat;
  185. background-size: 47px 41px;
  186. background-position:80% 50%;
  187. }
  188. .score-box.scoreLevel_2{
  189. background: rgb(152, 112, 20);
  190. background-image: url('../../../assets/images/icon-yi.png');
  191. background-repeat: no-repeat;
  192. background-size: 47px 41px;
  193. background-position:80% 50%;
  194. }
  195. .score-box.scoreLevel_3{
  196. background: rgb(199, 54, 13);
  197. background-image: url('../../../assets/images/icon-bing.png');
  198. background-repeat: no-repeat;
  199. background-size: 47px 41px;
  200. background-position:80% 50%;
  201. }
  202. .card-box {
  203. // height: 175px;
  204. background: #FFFFFF;
  205. border: 1px solid #E2E2E2;
  206. padding: 16px 20px;
  207. box-sizing: border-box;
  208. margin-bottom: 14px;
  209. .title {
  210. font-size: 15px;
  211. font-family: PingFang-SC-Bold, PingFang-SC;
  212. font-weight: bold;
  213. color: #333333;
  214. line-height: 22px;
  215. // span {
  216. // margin-left: 7px;
  217. // }
  218. }
  219. .title2 {
  220. font-size: 14px;
  221. font-family: PingFang-SC-Bold, PingFang-SC;
  222. // font-weight: bold;
  223. color: #333333;
  224. line-height: 26px;
  225. cursor: pointer;
  226. span {
  227. margin-left: 7px;
  228. }
  229. }
  230. .error {
  231. color: #D81E06;
  232. }
  233. }
  234. .box-card {
  235. margin-bottom: 10px;
  236. position: relative;
  237. background: rgb(241, 245, 254);
  238. .category {
  239. font-family: PingFangSC-Semibold, PingFang SC;
  240. font-weight: bold;
  241. color: #333333;
  242. }
  243. .koufen {
  244. font-weight: bold;
  245. vertical-align: middle;
  246. margin-left: 16px;
  247. }
  248. .typeImg {
  249. width: 53px;
  250. height: 53px;
  251. position: absolute;
  252. top: 12px;
  253. right: 12px;
  254. z-index: 999;
  255. }
  256. }
  257. ::v-deep .el-table__row {
  258. background: #185DA6;
  259. color: #FFFFFF;
  260. .el-icon-arrow-right {
  261. color: #FFFFFF;
  262. }
  263. }
  264. ::v-deep .el-descriptions__body{
  265. background: transparent;
  266. }
  267. ::v-deep el-table tr{
  268. background: transparent;
  269. }
  270. ::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
  271. background: #185DA6;
  272. }
  273. ::v-deep .el-table_1_column_1 {
  274. border-radius: 8px 0 0 8px;
  275. }
  276. ::v-deep .el-table_1_column_2 {
  277. border-radius: 0 8px 8px 0;
  278. font-weight: bold;
  279. }
  280. ::v-deep .el-descriptions-item__label {
  281. font-family: PingFang-SC-Bold, PingFang-SC;
  282. font-weight: bold;
  283. color: #333333;
  284. }
  285. }
  286. .span-index{
  287. width: 24px;
  288. height: 24px;
  289. line-height: 24px;
  290. text-align: center;
  291. display: inline-block;
  292. border-radius: 50%;
  293. background: #185DA6;
  294. color: #fff;
  295. margin-right: 10px;
  296. margin-bottom: 4px;
  297. }
  298. </style>