血透系统pad前端

AcceptsDialog.vue 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <div>
  3. <div class="Dialog">
  4. <div class="DialogTit">
  5. <span class="iconfont" @click="close()">&#xe6e9;</span>
  6. <h1 class="name">接诊评估</h1>
  7. <span class="success" @click="commitInfo">完成</span>
  8. </div>
  9. <div class="DialogContent choose">
  10. <el-form :model="receiveTreatmentAsses" label-width="90px">
  11. <el-form-item label="入室方式 : ">
  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. <!--</el-radio-group>-->
  17. </el-form-item>
  18. <el-form-item label="病人意识 : ">
  19. <el-radio v-model="receiveTreatmentAsses.consciousness" label="1">清醒</el-radio>
  20. <el-radio v-model="receiveTreatmentAsses.consciousness" label="2">嗜睡</el-radio>
  21. <el-radio v-model="receiveTreatmentAsses.consciousness" label="3">昏迷</el-radio>
  22. </el-form-item>
  23. <el-form-item label="病人食欲 : ">
  24. <el-radio v-model="receiveTreatmentAsses.appetite" label="1">正常</el-radio>
  25. <el-radio v-model="receiveTreatmentAsses.appetite" label="2">减退</el-radio>
  26. <el-radio v-model="receiveTreatmentAsses.appetite" label="3">恶心</el-radio>
  27. <el-radio v-model="receiveTreatmentAsses.appetite" label="4">呕吐</el-radio>
  28. <el-radio v-model="receiveTreatmentAsses.appetite" label="5">腹泻</el-radio>
  29. </el-form-item>
  30. <el-form-item label="病人情况 : ">
  31. <el-radio v-model="receiveTreatmentAsses.condition" label="1">住院</el-radio>
  32. <el-radio v-model="receiveTreatmentAsses.condition" label="2">门诊</el-radio>
  33. <el-radio v-model="receiveTreatmentAsses.condition" label="3">手术期</el-radio>
  34. </el-form-item>
  35. <el-form-item label="体位 : ">
  36. <el-radio v-model="receiveTreatmentAsses.posture" label="1">自动体位</el-radio>
  37. <el-radio v-model="receiveTreatmentAsses.posture" label="2">平卧位</el-radio>
  38. <el-radio v-model="receiveTreatmentAsses.posture" label="3">半卧位</el-radio>
  39. <el-radio v-model="receiveTreatmentAsses.posture" label="4">端坐位</el-radio>
  40. <el-radio v-model="receiveTreatmentAsses.posture" label="5">躁动不安</el-radio>
  41. </el-form-item>
  42. </el-form>
  43. <!-- <div class="button">
  44. <button @click="commitInfo" class="submitButton">提交</button>
  45. </div> -->
  46. </div>
  47. <!-- <div class="footer">
  48. 处方医生:刘小军 医生
  49. </div> -->
  50. </div>
  51. </div>
  52. </template>
  53. <script>
  54. import { commitAcceptsAssessment, getLastAccepts } from "@/api/dialysis";
  55. import { Toast } from "vant";
  56. export default {
  57. name: "AcceptsDialog",
  58. data() {
  59. return {
  60. receiveTreatmentAsses: {
  61. way: "1",
  62. consciousness: "1",
  63. appetite: "1",
  64. condition: "1",
  65. posture: "1"
  66. },
  67. patient: {
  68. id: 0
  69. },
  70. record_date: ""
  71. };
  72. },
  73. props: {
  74. accepts: {
  75. type: Object
  76. },
  77. patient_prop: {
  78. type: Object
  79. }
  80. },
  81. created() {
  82. if (this.accepts == null || this.accepts.id == "") {
  83. let ParamsQuery = {};
  84. ParamsQuery["patient"] = this.$route.query.patient_id;
  85. getLastAccepts(ParamsQuery).then(response => {
  86. if (response.data.state == 0) {
  87. return false;
  88. } else {
  89. for (const key in response.data.data.receiveTreatmentAsses) {
  90. this.accepts[key] = response.data.data.receiveTreatmentAsses[key];
  91. this.receiveTreatmentAsses.way = this.accepts.way + "";
  92. this.receiveTreatmentAsses.consciousness =
  93. this.accepts.consciousness + "";
  94. this.receiveTreatmentAsses.appetite = this.accepts.appetite + "";
  95. this.receiveTreatmentAsses.condition = this.accepts.condition + "";
  96. this.receiveTreatmentAsses.posture = this.accepts.posture + "";
  97. }
  98. }
  99. });
  100. } else {
  101. if (
  102. this.accepts.way == 0 &&
  103. this.accepts.consciousness == 0 &&
  104. this.accepts.appetite == 0 &&
  105. this.accepts.condition == 0 &&
  106. this.accepts.posture == 0
  107. ) {
  108. let ParamsQuery = {};
  109. ParamsQuery["patient"] = this.$route.query.patient_id;
  110. getLastAccepts(ParamsQuery).then(response => {
  111. if (response.data.state == 0) {
  112. return false;
  113. } else {
  114. for (const key in response.data.data.receiveTreatmentAsses) {
  115. this.accepts[key] = response.data.data.receiveTreatmentAsses[key];
  116. this.receiveTreatmentAsses.way = this.accepts.way + "";
  117. this.receiveTreatmentAsses.consciousness =
  118. this.accepts.consciousness + "";
  119. this.receiveTreatmentAsses.appetite = this.accepts.appetite + "";
  120. this.receiveTreatmentAsses.condition =
  121. this.accepts.condition + "";
  122. this.receiveTreatmentAsses.posture = this.accepts.posture + "";
  123. }
  124. }
  125. });
  126. } else {
  127. this.receiveTreatmentAsses.way = this.accepts.way + "";
  128. this.receiveTreatmentAsses.consciousness =
  129. this.accepts.consciousness + "";
  130. this.receiveTreatmentAsses.appetite = this.accepts.appetite + "";
  131. this.receiveTreatmentAsses.condition = this.accepts.condition + "";
  132. this.receiveTreatmentAsses.posture = this.accepts.posture + "";
  133. }
  134. }
  135. var date = this.$route.query && this.$route.query.date;
  136. date *= 1000;
  137. var newDate = new Date(date);
  138. var y = newDate.getFullYear();
  139. var m = newDate.getMonth() + 1;
  140. var d = newDate.getDate();
  141. if (isNaN(y) || isNaN(m) || isNaN(d)) {
  142. newDate = new Date();
  143. y = newDate.getFullYear();
  144. m = newDate.getMonth() + 1;
  145. d = newDate.getDate();
  146. }
  147. this.record_date =
  148. y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
  149. this.patient.id = this.patient_prop.id;
  150. },
  151. methods: {
  152. commitInfo: function() {
  153. Toast.loading({ forbidClick: true, duration: 0 });
  154. let ParamsQuery = this.receiveTreatmentAsses;
  155. // ParamsQuery["patient"] = this.patient.id
  156. ParamsQuery["patient"] = this.$route.query.patient_id;
  157. ParamsQuery["record_date"] = this.record_date;
  158. commitAcceptsAssessment(ParamsQuery).then(response => {
  159. if (response.data.state == 0) {
  160. Toast.fail(response.data.msg);
  161. return false;
  162. } else {
  163. Toast.success("提交成功");
  164. for (const key in response.data.data.receiveTreatmentAsses) {
  165. this.accepts[key] = response.data.data.receiveTreatmentAsses[key];
  166. }
  167. this.finish();
  168. }
  169. });
  170. },
  171. finish: function() {
  172. this.$emit("finish");
  173. },
  174. close: function() {
  175. this.$emit("close");
  176. }
  177. }
  178. };
  179. </script>
  180. <style style="stylesheet/scss" lang="scss" scoped>
  181. .choose {
  182. .el-form-item {
  183. margin-bottom: 0;
  184. border-bottom: 1px #e5e5e5 solid;
  185. padding: 0.15rem 0.36rem;
  186. .el-radio {
  187. font-size: 18px;
  188. }
  189. }
  190. .button {
  191. text-align: center;
  192. margin-top: 1rem;
  193. .submitButton {
  194. width: 3rem;
  195. height: 0.8rem;
  196. line-height: 0.8rem;
  197. background: $main-color;
  198. color: #fff;
  199. font-size: 0.3rem;
  200. text-align: center;
  201. border-radius: 6px;
  202. }
  203. }
  204. }
  205. </style>