PreTraitCase.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <div class="container">
  3. <div class="bgimg"></div>
  4. <div class="content">
  5. <div class="title">预防治疗参考方案</div>
  6. <div class="loginForm">
  7. <mt-field placeholder="请选择产品" class="inputDisable" disabled label="产品选择" v-model="form.ckmpro" @click.native="mproFlag=true;mfreqFlag=false;ckzsjlFlag=false">
  8. <img v-if="!show" src="../assets/images/down.png" alt="" width="16px">
  9. </mt-field>
  10. <mt-field placeholder="请选择注射频次" class="inputDisable" disabled label="注射频次" v-model="form.ckmfreq" @click.native="mfreqFlag=true;mproFlag=false;ckzsjlFlag=false">
  11. <img v-if="!show" src="../assets/images/down.png" alt="" width="16px">
  12. </mt-field>
  13. <mt-field placeholder="请选择" class="inputDisable" disabled label="每次注射剂量(IU)" v-model="form.ckzsjl" @click.native="ckzsjlFlag=true;mproFlag=false;mfreqFlag=false">
  14. <img v-if="!show" src="../assets/images/down.png" alt="" width="16px">
  15. </mt-field>
  16. </div>
  17. <div class="footer">
  18. <div class="jbbtn" @click="goPage(-1)">返回</div>
  19. <div class="jbbtn" @click="submit">确定</div>
  20. </div>
  21. </div>
  22. <mt-picker @change="onValuesChange" v-if="mproFlag && !show" :slots="slots" ref="sexPicker" class="sexPicker"
  23. :showToolbar="true">
  24. <div class="pickerConfirm" @click="mproFlag=false">确认</div>
  25. </mt-picker>
  26. <mt-picker @change="onValuesChange1" v-if="mfreqFlag && !show" :slots="slots1" ref="sexPicker1" class="sexPicker"
  27. :showToolbar="true">
  28. <div class="pickerConfirm" @click="mfreqFlag=false">确认</div>
  29. </mt-picker>
  30. <mt-picker @change="onValuesChange2" v-if="ckzsjlFlag && !show" :slots="slots2" ref="sexPicker1" class="sexPicker"
  31. :showToolbar="true" @touchmove.native.stop.prevent>
  32. <div class="pickerConfirm" @click="ckzsjlFlag=false">确认</div>
  33. </mt-picker>
  34. </div>
  35. </template>
  36. <script>
  37. import {
  38. Field,
  39. Picker,
  40. MessageBox
  41. } from 'mint-ui'
  42. export default {
  43. name: 'Index',
  44. components: {
  45. Field,
  46. Picker,
  47. MessageBox
  48. },
  49. data() {
  50. return {
  51. form: {},
  52. mproFlag: false,
  53. mfreqFlag: false,
  54. ckzsjlFlag: false,
  55. caseInfo:{},
  56. show:this.$route.query.show,
  57. slots: [{
  58. flex: 1,
  59. values: this.$const.mprolist,
  60. className: 'slot1',
  61. textAlign: 'center'
  62. }],
  63. slots1: [{
  64. flex: 1,
  65. values: this.$const.mfreq,
  66. className: 'slot1',
  67. textAlign: 'center'
  68. }],
  69. slots2: [{
  70. flex: 1,
  71. values: this.$const.ckzsjl,
  72. className: 'slot1',
  73. textAlign: 'center'
  74. }]
  75. }
  76. },
  77. methods: {
  78. goPage(path) {
  79. if (path === -1) {
  80. this.$router.go(-1)
  81. }
  82. this.$router.push('/diagcalc')
  83. },
  84. onValuesChange(picker, values) {
  85. if (picker.getSlotValue(0)) {
  86. this.form.ckmpro = picker.getSlotValue(0)
  87. } else {
  88. this.form.ckmpro = "人血FVIII"
  89. }
  90. },
  91. onValuesChange1(picker, values) {
  92. if (picker.getSlotValue(0)) {
  93. this.form.ckmfreq = picker.getSlotValue(0)
  94. } else {
  95. this.form.ckmfreq = this.$const.mfreq[0]
  96. }
  97. },
  98. onValuesChange2(picker, values) {
  99. if (picker.getSlotValue(0)) {
  100. this.form.ckzsjl = picker.getSlotValue(0)
  101. } else {
  102. this.form.ckzsjl = this.$const.ckzsjl[0]
  103. }
  104. },
  105. submit() {
  106. this.$router.push({
  107. path: '/solutionpkline',
  108. query: {
  109. id: 74
  110. }
  111. })
  112. return
  113. if (!this.form.ckmpro) {
  114. MessageBox({
  115. title: '提示',
  116. message: '请选择产品'
  117. })
  118. return
  119. }
  120. if (!this.form.ckmfreq) {
  121. MessageBox({
  122. title: '提示',
  123. message: '请选择注射频次'
  124. })
  125. return
  126. }
  127. if (!this.form.ckzsjl) {
  128. MessageBox({
  129. title: '提示',
  130. message: '请选择每次注射剂量(IU)'
  131. })
  132. return
  133. }
  134. let id = this.$route.query.id
  135. let role = this.$route.query.role
  136. let params = this.form
  137. params.id = id
  138. this.$api.editPatientCase(params).then(res=>{
  139. if(!res.data.code){
  140. this.$router.push({'path':'/solutionpkline',query:{id:id,role:role}})
  141. }
  142. })
  143. }
  144. },
  145. created() {
  146. let id = this.$route.query.id
  147. this.$api.getPatientCaseInfo({id:id}).then(res=>{
  148. if(!res.data.code){
  149. this.form = res.data.data
  150. }
  151. })
  152. },
  153. }
  154. </script>
  155. <style scoped lang="scss">
  156. .footer {
  157. display: flex;
  158. }
  159. .jbbtn {
  160. width: 42%;
  161. }
  162. </style>