CaseQualityBox2.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <div ref="box" class="box" :style="{width: width ? width + 'px' : '100%'}" :class="{'nocopy': $route.meta.nocopy}">
  3. <div class="score-box" :class="scoreLevel == '甲'? 'scoreLevel_1' : ( scoreLevel == '乙'?'scoreLevel_2': (scoreLevel == '丙'?'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 style="float: right;">({{ 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. width: {
  101. type: Number,
  102. default() {
  103. return 0
  104. }
  105. }
  106. },
  107. computed: {
  108. tableData() {
  109. let arr = []
  110. const keys = Object.keys(this.data.data)
  111. for(let i=0; i<keys.length; i++) {
  112. let obj = {
  113. category: keys[i],
  114. children: this.data.data[keys[i]]
  115. }
  116. arr.push(obj)
  117. }
  118. return arr
  119. },
  120. scoreLevel() {
  121. /**
  122. * 甲>90分
  123. * 乙75-90分
  124. * 丙<75分
  125. * */
  126. let str
  127. const { score } = this.data
  128. if (score > 90) {
  129. str = '甲'
  130. } else if (score < 75) {
  131. str = '丙'
  132. } else if ( score <= 90 && score >= 75 ) {
  133. str = '乙'
  134. }
  135. return str
  136. },
  137. scrollHeight() {
  138. // if (this.height) {
  139. // return (this.height - 214)+'px'
  140. // } else {
  141. // return `calc(100vh - 314px)`
  142. // }
  143. return `calc(100vh - 320px)`
  144. }
  145. },
  146. methods: {
  147. onScroll(index) {
  148. const el = this.$el.querySelector(`.category${index}`);
  149. const node = el.parentNode.parentNode.parentNode
  150. this.$refs["scrollRef"].wrap.scrollTop = node.offsetTop;
  151. }
  152. }
  153. }
  154. </script>
  155. <style lang="scss" scoped>
  156. ::v-deep .el-scrollbar__wrap {
  157. overflow-x: hidden;
  158. }
  159. ::v-deep .el-divider--horizontal {
  160. margin: 10px 0;
  161. }
  162. .box {
  163. padding: 16px;
  164. background: #FFFFFF;
  165. border-radius: 5px;
  166. .score-box{
  167. width: 100%;
  168. margin-bottom: 16px;
  169. padding: 30px 50px 30px 20px;
  170. border-radius: 4px;
  171. display: flex;
  172. align-items: center;
  173. justify-content: space-between;
  174. color: #fff;
  175. div{
  176. font-size: 20px;
  177. }
  178. .score-f{
  179. padding-left: 20px;
  180. font-size: 20px;
  181. }
  182. .score-dj,.score-f{
  183. font-weight: bold;
  184. }
  185. }
  186. .score-box.scoreLevel_1{
  187. background: rgb(11, 133, 63);
  188. background-image: url('../../../assets/images/icon-jia.png');
  189. background-repeat: no-repeat;
  190. background-size: 60px 52px;
  191. background-position:80% 50%;
  192. }
  193. .score-box.scoreLevel_2{
  194. background: rgb(152, 112, 20);
  195. background-image: url('../../../assets/images/icon-yi.png');
  196. background-repeat: no-repeat;
  197. background-size: 60px 52px;
  198. background-position:80% 50%;
  199. }
  200. .score-box.scoreLevel_3{
  201. background: rgb(199, 54, 13);
  202. background-image: url('../../../assets/images/icon-bing.png');
  203. background-repeat: no-repeat;
  204. background-size: 60px 52px;
  205. background-position:80% 50%;
  206. }
  207. .card-box {
  208. // height: 175px;
  209. background: #FFFFFF;
  210. border: 1px solid #E2E2E2;
  211. padding: 16px 20px;
  212. box-sizing: border-box;
  213. margin-bottom: 14px;
  214. .title {
  215. font-size: 15px;
  216. font-family: PingFang-SC-Bold, PingFang-SC;
  217. font-weight: bold;
  218. color: #333333;
  219. line-height: 22px;
  220. // span {
  221. // margin-left: 7px;
  222. // }
  223. }
  224. .title2 {
  225. font-size: 14px;
  226. font-family: PingFang-SC-Bold, PingFang-SC;
  227. // font-weight: bold;
  228. color: #333333;
  229. line-height: 26px;
  230. cursor: pointer;
  231. span {
  232. margin-left: 7px;
  233. }
  234. }
  235. .error {
  236. color: #D81E06;
  237. }
  238. }
  239. .box-card {
  240. margin-bottom: 10px;
  241. position: relative;
  242. background: rgb(241, 245, 254);
  243. .category {
  244. font-family: PingFangSC-Semibold, PingFang SC;
  245. font-weight: bold;
  246. color: #333333;
  247. }
  248. .koufen {
  249. font-weight: bold;
  250. vertical-align: middle;
  251. margin-left: 16px;
  252. }
  253. .typeImg {
  254. width: 53px;
  255. height: 53px;
  256. position: absolute;
  257. top: 12px;
  258. right: 12px;
  259. z-index: 999;
  260. }
  261. }
  262. .box-card .el-table ::v-deep tr{
  263. background: transparent;
  264. }
  265. ::v-deep .el-table__row {
  266. background: #185DA6 !important;
  267. color: #FFFFFF;
  268. .el-icon-arrow-right {
  269. color: #FFFFFF;
  270. }
  271. }
  272. ::v-deep .el-descriptions__body{
  273. background: transparent;
  274. }
  275. ::v-deep .el-table tr{
  276. background: transparent;
  277. }
  278. ::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
  279. background: #185DA6;
  280. }
  281. ::v-deep .el-table_1_column_1 {
  282. border-radius: 8px 0 0 8px;
  283. }
  284. ::v-deep .el-table_1_column_2 {
  285. border-radius: 0 8px 8px 0;
  286. font-weight: bold;
  287. }
  288. ::v-deep .el-descriptions-item__label {
  289. font-family: PingFang-SC-Bold, PingFang-SC;
  290. font-weight: bold;
  291. color: #333333;
  292. }
  293. }
  294. .span-index{
  295. width: 24px;
  296. height: 24px;
  297. line-height: 24px;
  298. text-align: center;
  299. display: inline-block;
  300. border-radius: 50%;
  301. background: #185DA6;
  302. color: #fff;
  303. margin-right: 10px;
  304. margin-bottom: 4px;
  305. }
  306. ::v-deep .el-table .el-table__row td {
  307. color: #fff;
  308. }
  309. </style>