SolutionPkLine.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <div class="container">
  3. <div class="bgimg"></div>
  4. <div class="content">
  5. <div class="title">预防治疗参考方案一周活性变化</div>
  6. <div class="PKLineForm">
  7. <v-chart :option="pklineOption" style="height: 350px">
  8. </v-chart>
  9. <div class="tuli">
  10. <p style="color:#6594D5;"> —活性</p>
  11. <p style="color:#AC4C44;">---5%</p>
  12. <p style="color:#4caf50;">---3%</p>
  13. <p style="color:#ab6cef;">---1%</p>
  14. </div>
  15. </div>
  16. <div class="PKLineForm baseInfo">
  17. <div class="rowfont">活性大于5%的时间:{{pklinedata.gt5_time}}</div>
  18. <div class="rowfont">活性大于3%的时间:{{pklinedata.gt3_time}}</div>
  19. <div class="rowfont">活性大于1%的时间:{{pklinedata.gt1_time}}</div>
  20. <div style="display:flex;">
  21. <div class="rowfont" style="width:48%;">峰活性:{{pklinedata.sjfhx}}%</div>
  22. <div class="rowfont" style="width:52%;">谷活性(IU/kg):{{pklinedata.sjghx}}%</div>
  23. </div>
  24. <hr>
  25. <mt-cell :title="'姓名:'+caseInfo.name" :value="'ID:'+caseInfo.code"></mt-cell>
  26. <mt-cell :title="'年龄:'+caseInfo.age" :value="'性别:'+caseInfo.sex"></mt-cell>
  27. <mt-cell :title="'使用产品:'+caseInfo.mpro" :value="'注射剂量:'+caseInfo.zsjl"></mt-cell>
  28. <mt-cell :title="'注射频次:'+caseInfo.mfreq"></mt-cell>
  29. <div class="rowfont">方案时间时间:{{caseInfo.ctime}}</div>
  30. </div>
  31. <div class="footer">
  32. <div class="jbbtn" @click="goPage(-1)">上一页</div>
  33. <div class="jbbtn" @click="goPage('/docindex')">返回</div>
  34. </div>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. import {
  40. Field,
  41. Cell
  42. } from 'mint-ui'
  43. // import ECharts from 'vue-echarts'
  44. export default {
  45. name: 'Index',
  46. components: {
  47. Field,
  48. Cell
  49. },
  50. data() {
  51. return {
  52. msg: 'Welcome to Your Vue.js App',
  53. caseInfo: {},
  54. pklinedata:{},
  55. pklineOption: {
  56. title: {},
  57. calculable: true,
  58. xAxis: [{
  59. type: 'category',
  60. boundaryGap: false,
  61. data: []
  62. }],
  63. yAxis: [{
  64. type: 'value',
  65. axisLabel: {
  66. // formatter: (v,i)=>{
  67. // if (i <= 10) {
  68. // v = i;
  69. // }else{
  70. // v=v/5
  71. // }
  72. // return v
  73. // }
  74. },
  75. // max:100,
  76. // min:0,
  77. // interval:1
  78. }],
  79. series: [{
  80. name: '最低气温',
  81. type: 'line',
  82. showSymbol: false,
  83. data: [],
  84. markLine: {
  85. symbol: ['none', 'none'],
  86. label:{
  87. formatter: '{b}'
  88. },
  89. data: [{
  90. name: '1',
  91. yAxis: 1,
  92. lineStyle: {
  93. color: '#ab6cef'
  94. }
  95. },
  96. {
  97. name: '3',
  98. yAxis: 3,
  99. lineStyle: {
  100. color: '#4caf50'
  101. }
  102. },
  103. {
  104. name: '5',
  105. yAxis: 5,
  106. lineStyle: {
  107. color: '#AC4C44'
  108. }
  109. }
  110. ]
  111. }
  112. }]
  113. }
  114. }
  115. },
  116. methods: {
  117. goPage(path) {
  118. let role = this.$route.query.role
  119. if (path === -1) {
  120. this.$router.go(-1)
  121. }
  122. if(role==2){
  123. this.$router.push("/patindex")
  124. }else{
  125. this.$router.push(path)
  126. }
  127. },
  128. getData() {
  129. let id = this.$route.query.id
  130. this.$api.getPatientCaseInfo({
  131. id: id
  132. }).then(res => {
  133. if (!res.data.code) {
  134. this.caseInfo = res.data.data
  135. }
  136. })
  137. // pkline
  138. this.$api.getPKLineData({
  139. id: id
  140. }).then(res => {
  141. this.pklinedata = res.data.data
  142. this.pklineOption.xAxis[0].data = res.data.data.pk_xdata
  143. this.pklineOption.series[0].data = res.data.data.pk_ydata
  144. })
  145. }
  146. },
  147. created() {
  148. this.getData()
  149. }
  150. }
  151. </script>
  152. <style scoped lang="scss">
  153. .footer {
  154. display: flex;
  155. }
  156. .PKLineForm {
  157. width: 84%;
  158. margin: auto;
  159. margin-top: 1rem;
  160. background: #fff;
  161. padding: 1rem;
  162. border-radius: 5px;
  163. position: relative;
  164. .tuli{
  165. position: absolute;
  166. right:0px;
  167. top:40px;
  168. p{
  169. margin:5px;
  170. }
  171. }
  172. .rowfont{
  173. font-size:1rem;
  174. text-align:left;
  175. padding-left:10px;
  176. line-height: 2rem;
  177. height: 2rem;
  178. }
  179. .formTitle {
  180. height: 1rem;
  181. line-height: 1rem;
  182. text-align: left;
  183. color: #2882F4;
  184. padding-bottom: 0.5rem;
  185. border-bottom: 1px solid #2882F4;
  186. font-weight: bold;
  187. }
  188. .mint-cell {
  189. min-height: 1.8rem;
  190. }
  191. /deep/ .mint-cell .mint-cell-title {
  192. width: 60%;
  193. text-align: left;
  194. }
  195. /deep/ .mint-cell .mint-cell-value {
  196. width: 40%;
  197. text-align: right;
  198. }
  199. /deep/ .mint-cell .mint-cell-wrapper {
  200. font-size: 14px;
  201. background-image: none;
  202. }
  203. }
  204. .container {
  205. height: 100%;
  206. }
  207. .jbbtn {
  208. width: 42%;
  209. }
  210. </style>