血透系统pad前端

acceptsAssessment.vue 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <div class="popup-content">
  3. <h2 class="title">
  4. <span class="line"></span>
  5. <p>{{title}}</p>
  6. <span class="line"></span>
  7. </h2>
  8. <div class="content">
  9. <div class="cell inline">
  10. <label>入室方式 : </label>
  11. <div class="check">
  12. <el-radio v-model="receiveTreatmentAsses.way" label="1">步行</el-radio>
  13. <el-radio v-model="receiveTreatmentAsses.way" label="2">扶行</el-radio>
  14. <el-radio v-model="receiveTreatmentAsses.way" label="3">轮椅</el-radio>
  15. <el-radio v-model="receiveTreatmentAsses.way" label="4">平车</el-radio>
  16. </div>
  17. </div>
  18. <div class="cell inline">
  19. <label>病人意识 : </label>
  20. <div class="check">
  21. <el-radio v-model="receiveTreatmentAsses.consciousness" label="1">清醒</el-radio>
  22. <el-radio v-model="receiveTreatmentAsses.consciousness" label="2">嗜睡</el-radio>
  23. <el-radio v-model="receiveTreatmentAsses.consciousness" label="3">昏迷</el-radio>
  24. <el-radio v-model="receiveTreatmentAsses.consciousness" label="4">模糊</el-radio>
  25. </div>
  26. </div>
  27. <div class="cell inline">
  28. <label>病人食欲 : </label>
  29. <div class="check">
  30. <van-radio-group>
  31. <el-radio v-model="receiveTreatmentAsses.appetite" label="1">正常</el-radio>
  32. <el-radio v-model="receiveTreatmentAsses.appetite" label="2">减退</el-radio>
  33. <el-radio v-model="receiveTreatmentAsses.appetite" label="3">恶心</el-radio>
  34. <el-radio v-model="receiveTreatmentAsses.appetite" label="4">呕吐</el-radio>
  35. <el-radio v-model="receiveTreatmentAsses.appetite" label="5">腹泻</el-radio>
  36. </van-radio-group>
  37. </div>
  38. </div>
  39. <div class="cell inline">
  40. <label>病人情况 : </label>
  41. <div class="check">
  42. <van-radio-group>
  43. <el-radio v-model="receiveTreatmentAsses.condition" label="1">住院</el-radio>
  44. <el-radio v-model="receiveTreatmentAsses.condition" label="2">手术期</el-radio>
  45. </van-radio-group>
  46. </div>
  47. </div>
  48. <div class="cell width center">
  49. <button @click="commitInfo">提交</button>
  50. </div>
  51. </div>
  52. </div>
  53. </template>
  54. <script>
  55. import { commitAcceptsAssessment } from "@/api/dialysis";
  56. import { Toast } from "vant";
  57. export default {
  58. name: "AcceptsAssessment",
  59. props: {
  60. accepts: {
  61. type: Object
  62. },
  63. patient_prop: {
  64. type: Object
  65. }
  66. },
  67. data() {
  68. return {
  69. id: 0,
  70. receiveTreatmentAsses: {
  71. way: "1",
  72. consciousness: "1",
  73. appetite: "1",
  74. condition: "1"
  75. },
  76. patient: {
  77. id: 0
  78. },
  79. doctor: "",
  80. title: "接诊评估",
  81. record_date:""
  82. };
  83. },
  84. created() {
  85. if (this.accepts == null) {
  86. this.receiveTreatmentAsses.way = "1";
  87. this.receiveTreatmentAsses.consciousness = "1";
  88. this.receiveTreatmentAsses.appetite = "1";
  89. this.receiveTreatmentAsses.condition = "1";
  90. this.patient.id = 0;
  91. } else {
  92. this.receiveTreatmentAsses.way = this.accepts.way + ""
  93. this.receiveTreatmentAsses.consciousness = this.accepts.consciousness + ""
  94. this.receiveTreatmentAsses.appetite = this.accepts.appetite + ""
  95. this.receiveTreatmentAsses.condition = this.accepts.condition + ""
  96. }
  97. var date = this.$route.query && this.$route.query.date;
  98. date *= 1000;
  99. var newDate = new Date(date);
  100. var y = newDate.getFullYear();
  101. var m = newDate.getMonth() + 1;
  102. var d = newDate.getDate();
  103. if (isNaN(y) || isNaN(m) || isNaN(d)) {
  104. newDate = new Date();
  105. y = newDate.getFullYear();
  106. m = newDate.getMonth() + 1;
  107. d = newDate.getDate();
  108. }
  109. this.record_date = y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
  110. this.patient.id = this.patient_prop.id;
  111. },
  112. methods: {
  113. commitInfo: function() {
  114. let ParamsQuery = this.receiveTreatmentAsses;
  115. ParamsQuery["patient"] = this.patient.id
  116. ParamsQuery["record_date"] = this.record_date;
  117. // console.log(ParamsQuery)
  118. // return
  119. commitAcceptsAssessment(ParamsQuery).then(response => {
  120. if (response.data.state == 0) {
  121. Toast.fail(response.data.msg);
  122. return false;
  123. } else {
  124. Toast.success("提交成功");
  125. // this.$emit(
  126. // "receiveTreatmentAsses",
  127. // response.data.data.receiveTreatmentAsses
  128. // );
  129. console.log(response.data.data.receiveTreatmentAsses)
  130. for (const key in response.data.data.receiveTreatmentAsses) {
  131. // if (key == "id") {
  132. // continue
  133. // }
  134. this.accepts[key] = response.data.data.receiveTreatmentAsses[key]
  135. }
  136. // this.accepts["id"] = response.data.data.receiveTreatmentAsses["id"]
  137. }
  138. });
  139. }
  140. }
  141. };
  142. </script>
  143. <style style="stylesheet/scss" lang="scss" scoped>
  144. .content {
  145. .cell {
  146. label {
  147. display: inline-block;
  148. margin: 0 0.2rem 0 0;
  149. float: left;
  150. }
  151. span {
  152. margin: 0.07rem 0 0 0;
  153. display: inline-block;
  154. }
  155. select {
  156. width: 3.2rem;
  157. }
  158. .textarea {
  159. height: 2.16rem;
  160. }
  161. }
  162. .inline {
  163. display: inline-block;
  164. width: 96% !important;
  165. }
  166. }
  167. </style>