DiseaseD.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <div class="recipeAuditD flex-plane-center-top">
  3. <div class="recipe-left">
  4. <div style="margin-bottom:10px;">
  5. <el-button size="small" type="primary" @click="$router.back()">返回</el-button>
  6. <el-button size="small" v-if="showPrintHTML" type="primary" icon="el-icon-download" :disabled="loading" @click="print()">下载打印</el-button>
  7. </div>
  8. <div class="msg print-containers" ref="print">
  9. <div class="msg-item flex-plane-center-l">
  10. <span>疾病名称:</span>
  11. <div>{{info.disname}}</div>
  12. </div>
  13. <div class="msg-item flex-plane-center-l">
  14. <span>疾病概述:</span>
  15. <div>{{info.dissummary}}</div>
  16. </div>
  17. <div class="msg-item flex-plane-center-l">
  18. <span>病因病机:</span>
  19. <div>{{info.disetiology}}</div>
  20. </div>
  21. <div class="msg-item flex-plane-center-l">
  22. <span>诊断依据:</span>
  23. <div>{{info.dispoints}}</div>
  24. </div>
  25. <div class="msg-item flex-plane-center-l">
  26. <span>病症鉴别:</span>
  27. <div>{{info.disidentify}}</div>
  28. </div>
  29. <div class="msg-item flex-plane-center-l">
  30. <span>预防调护:</span>
  31. <div>{{info.disprevent}}</div>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="recipe-right" v-if="false">
  36. <div class="title">我的验案</div>
  37. <div class="table">
  38. <el-table :data="tableData" stripe style="width: 100%" border>
  39. <el-table-column prop="id" label="序号"></el-table-column>
  40. <el-table-column prop="name" label="专家名称"></el-table-column>
  41. <el-table-column prop="disName" label="疾病名称"></el-table-column>
  42. <el-table-column prop="type" label="证型"></el-table-column>
  43. <el-table-column prop="treatment" label="治法"></el-table-column>
  44. <el-table-column prop="from" label="来源"></el-table-column>
  45. </el-table>
  46. </div>
  47. <div class="flex-vertical-center-r">
  48. <div class="flex-center find-more" @click="$message({message: '暂无更多',type: 'warning'})">查看更多</div>
  49. </div>
  50. </div>
  51. </div>
  52. </template>
  53. <script>
  54. import { getDiseasetDetail } from "@/api/knowledge.js";
  55. import {getDataByKey} from '@/api/system';
  56. import printJS from 'print-js';
  57. import {mapGetters} from 'vuex';
  58. export default {
  59. data() {
  60. return {
  61. loading: false,
  62. showPrintHTML: false,
  63. info: {},
  64. tableData: [
  65. {
  66. id: 1,
  67. name: "王小虎",
  68. disName: "风寒感冒",
  69. type: "中医证型", // 证型
  70. treatment: "心热解表",
  71. from: "中国现代百名中医"
  72. },
  73. {
  74. id: 1,
  75. name: "王小虎",
  76. disName: "风寒感冒",
  77. type: "中医证型", // 证型
  78. treatment: "心热解表",
  79. from: "中国现代百名中医"
  80. },
  81. {
  82. id: 1,
  83. name: "王小虎",
  84. disName: "风寒感冒",
  85. type: "中医证型", // 证型
  86. treatment: "心热解表",
  87. from: "中国现代百名中医"
  88. },
  89. {
  90. id: 1,
  91. name: "王小虎",
  92. disName: "风寒感冒",
  93. type: "中医证型", // 证型
  94. treatment: "心热解表",
  95. from: "中国现代百名中医"
  96. }
  97. ]
  98. };
  99. },
  100. created() {
  101. getDataByKey({
  102. key: "showPrintHTML",
  103. organizationid: this.getuserinfo.organizationid,
  104. }).then(data => { this.showPrintHTML = data.enabled; });
  105. this.getDiseasetDetail();
  106. },
  107. computed: {
  108. ...mapGetters(["getuserinfo"])
  109. },
  110. methods: {
  111. // 获取详情数据
  112. async getDiseasetDetail() {
  113. this.loading = true;
  114. let params = {
  115. disid: this.$route.query.disid
  116. };
  117. let res = await getDiseasetDetail(params);
  118. if (res.code == 0) {
  119. this.info = res.data;
  120. this.loading = false;
  121. }
  122. },
  123. async print() {
  124. printJS({
  125. printable: this.$refs.print,
  126. type: 'html',
  127. documentTitle: `名医名方 - 疾病`,
  128. scanStyles: false,
  129. css: ['print/containers.css', 'print/DiseaseD.css'],
  130. })
  131. }
  132. }
  133. };
  134. </script>
  135. <style lang="scss" scoped>
  136. @import "../../style/common.scss";
  137. .recipeAuditD {
  138. height: 81vh;
  139. .recipe-left {
  140. padding: 10px 10px;
  141. background: #ffffff;
  142. border-radius: 5px;
  143. // width: 375px;
  144. flex: 1;
  145. margin-right: 20px;
  146. box-sizing: border-box;
  147. height: 100%;
  148. overflow: auto;
  149. .back-btn {
  150. width: 74px;
  151. height: 36px;
  152. background: #5386f6;
  153. border-radius: 4px;
  154. font-size: 14px;
  155. font-family: PingFang SC;
  156. font-weight: 400;
  157. color: #ffffff;
  158. margin-bottom: 34px;
  159. cursor: pointer;
  160. }
  161. .msg {
  162. font-size: 16px;
  163. font-family: PingFang SC;
  164. font-weight: 400;
  165. color: #333333;
  166. .msg-item {
  167. margin-bottom: 15px;
  168. }
  169. span {
  170. text-align-last: justify;
  171. width: 80px;
  172. text-align: justify;
  173. }
  174. div {
  175. flex: 1;
  176. overflow: hidden;
  177. }
  178. }
  179. }
  180. .recipe-right {
  181. flex: 1;
  182. overflow: hidden;
  183. padding: 33px 26px;
  184. background: #ffffff;
  185. border-radius: 5px;
  186. .title {
  187. font-size: 16px;
  188. font-family: PingFang SC;
  189. font-weight: 400;
  190. color: #333333;
  191. margin-bottom: 21px;
  192. }
  193. .find-more {
  194. margin-top: 62px;
  195. width: 74px;
  196. height: 36px;
  197. background: #ffae45;
  198. border-radius: 4px;
  199. font-size: 14px;
  200. font-family: PingFang SC;
  201. font-weight: 400;
  202. color: #ffffff;
  203. cursor: pointer;
  204. }
  205. }
  206. }
  207. .table::v-deep .el-table .cell {
  208. text-align: center;
  209. }
  210. </style>
  211. <style lang="scss" scoped>
  212. @media screen and (min-width: 1681px) and (max-width: 1920px) {
  213. .recipeAuditD {
  214. height: 89vh;
  215. }
  216. }
  217. @media screen and (min-width: 1601px) and (max-width: 1680px) {
  218. .recipeAuditD {
  219. height: 88vh;
  220. }
  221. }
  222. @media screen and (min-width: 1361px) and (max-width: 1600px) {
  223. .recipeAuditD {
  224. height: 83vh;
  225. }
  226. }
  227. @media screen and(min-width:1281px) and (max-width: 1360px) {
  228. .recipeAuditD {
  229. height: 83vh;
  230. }
  231. }
  232. </style>