血透系统pad前端

AcceptsDialog.vue 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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="入室方式: " v-if="isShow('入室方式')">
  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="病人意识: " v-if="isShow('病人意识')">
  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="病人食欲: " v-if="isShow('病人食欲')">
  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="病人情况: " v-if="isShow('病人情况')">
  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="体位: " v-if="isShow('体位')">
  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-item label="病情: " v-if="isShow('病情')">
  43. <el-radio v-model="receiveTreatmentAsses.sick_condition" label="1">一般</el-radio>
  44. <el-radio v-model="receiveTreatmentAsses.sick_condition" label="2">严重</el-radio>
  45. <el-radio v-model="receiveTreatmentAsses.sick_condition" label="3">危</el-radio>
  46. </el-form-item>
  47. <el-form-item label-width="100dp" label="其他病情 : "
  48. v-if="isShow('其他病情')">
  49. <el-input v-model="receiveTreatmentAsses.sick_condition_other" style="width: 400px"></el-input>
  50. </el-form-item>
  51. <el-form-item label-width="100dp" label="跌倒风险评估评分 : "
  52. v-if="isShow('跌倒风险评估评分')">
  53. <el-input v-model="receiveTreatmentAsses.score" style="width: 100px"></el-input>
  54. </el-form-item>
  55. <el-form-item label="风险程度: " v-if="isShow('风险程度')">
  56. <el-radio v-model="receiveTreatmentAsses.danger_level" label="1">无</el-radio>
  57. <el-radio v-model="receiveTreatmentAsses.danger_level" label="2">低风险</el-radio>
  58. <el-radio v-model="receiveTreatmentAsses.danger_level" label="3">中度风险</el-radio>
  59. <el-radio v-model="receiveTreatmentAsses.danger_level" label="4">高风险</el-radio>
  60. </el-form-item>
  61. <el-form-item label="跌倒风险预防措施: " v-if="isShow('跌倒风险预防措施')">
  62. <el-radio v-model="receiveTreatmentAsses.precaution" label="1">镇定剂</el-radio>
  63. <el-radio v-model="receiveTreatmentAsses.precaution" label="2">约束带</el-radio>
  64. <el-radio v-model="receiveTreatmentAsses.precaution" label="3">床栏</el-radio>
  65. <el-radio v-model="receiveTreatmentAsses.precaution" label="4">加强宣教</el-radio>
  66. </el-form-item>
  67. <el-form-item label-width="100dp" label="其他跌倒风险预防措施 : "
  68. v-if="isShow('其他跌倒风险预防措施')">
  69. <el-input v-model="receiveTreatmentAsses.precaution_other"></el-input>
  70. </el-form-item>
  71. <el-form-item label="摄入量: " v-if="isShow('摄入量')">
  72. <el-radio v-model="receiveTreatmentAsses.intake" label="1">正常</el-radio>
  73. <el-radio v-model="receiveTreatmentAsses.intake" label="2">减少</el-radio>
  74. </el-form-item>
  75. <el-form-item label="营养状况: " v-if="isShow('营养状况')">
  76. <el-radio v-model="receiveTreatmentAsses.nutrition" label="1">正常</el-radio>
  77. <el-radio v-model="receiveTreatmentAsses.nutrition" label="2">营养不良</el-radio>
  78. </el-form-item>
  79. <el-form-item label="心理评估: " v-if="isShow('心理评估')">
  80. <el-radio v-model="receiveTreatmentAsses.psychological_assessment" label="1">正常</el-radio>
  81. <el-radio v-model="receiveTreatmentAsses.psychological_assessment" label="2">异常</el-radio>
  82. </el-form-item>
  83. <el-form-item label-width="100dp" label="心理评估异常情况 : "
  84. v-if="isShow('心理评估异常情况')&&receiveTreatmentAsses.psychological_assessment == 2">
  85. <el-input v-model="receiveTreatmentAsses.psychological_assessment_other"></el-input>
  86. </el-form-item>
  87. <el-form-item label-width="100dp" label="其他心理评估 : "
  88. v-if="isShow('其他心理评估')">
  89. <el-input v-model="receiveTreatmentAsses.psychological_other"></el-input>
  90. </el-form-item>
  91. </el-form>
  92. <!-- <div class="button">
  93. <button @click="commitInfo" class="submitButton">提交</button>
  94. </div> -->
  95. </div>
  96. <!-- <div class="footer">
  97. 处方医生:刘小军 医生
  98. </div> -->
  99. </div>
  100. </div>
  101. </template>
  102. <script>
  103. import {commitAcceptsAssessment, getLastAccepts} from '@/api/dialysis'
  104. import {Toast} from 'vant'
  105. export default {
  106. name: 'AcceptsDialog',
  107. data () {
  108. return {
  109. receiveTreatmentAsses: {
  110. way: '1',
  111. consciousness: '1',
  112. appetite: '1',
  113. condition: '1',
  114. posture: '1',
  115. sick_condition: '1',
  116. danger_level: '1',
  117. intake: '1',
  118. nutrition: '1',
  119. psychological_assessment: '1',
  120. psychological_assessment_other: '',
  121. sick_condition_other:'',
  122. score:'',
  123. psychological_other:'',
  124. precaution:'1',
  125. precaution_other:'',
  126. },
  127. patient: {
  128. id: 0
  129. },
  130. record_date: ''
  131. }
  132. },
  133. props: {
  134. accepts: {
  135. type: Object
  136. },
  137. patient_prop: {
  138. type: Object
  139. }
  140. },
  141. created () {
  142. if (this.accepts == null || this.accepts.id == '') {
  143. let ParamsQuery = {}
  144. ParamsQuery['patient'] = this.$route.query.patient_id
  145. getLastAccepts(ParamsQuery).then(response => {
  146. if (response.data.state == 0) {
  147. return false
  148. } else {
  149. for (const key in response.data.data.receiveTreatmentAsses) {
  150. this.accepts[key] = response.data.data.receiveTreatmentAsses[key]
  151. this.receiveTreatmentAsses.way = this.accepts.way + ''
  152. this.receiveTreatmentAsses.consciousness =
  153. this.accepts.consciousness + ''
  154. this.receiveTreatmentAsses.appetite = this.accepts.appetite + ''
  155. this.receiveTreatmentAsses.condition = this.accepts.condition + ''
  156. this.receiveTreatmentAsses.posture = this.accepts.posture + ''
  157. this.receiveTreatmentAsses.sick_condition = this.accepts.sick_condition + ''
  158. this.receiveTreatmentAsses.danger_level = this.accepts.danger_level + ''
  159. this.receiveTreatmentAsses.intake = this.accepts.intake + ''
  160. this.receiveTreatmentAsses.nutrition = this.accepts.nutrition + ''
  161. this.receiveTreatmentAsses.psychological_assessment = this.accepts.psychological_assessment + ''
  162. this.receiveTreatmentAsses.psychological_assessment_other = this.accepts.psychological_assessment_other
  163. this.receiveTreatmentAsses.score = this.accepts.score
  164. this.receiveTreatmentAsses.sick_condition_other = this.accepts.sick_condition_other
  165. this.receiveTreatmentAsses.psychological_other = this.accepts.psychological_other
  166. this.receiveTreatmentAsses.precaution = this.accepts.precaution
  167. this.receiveTreatmentAsses.precaution_other = this.accepts.precaution_other
  168. }
  169. }
  170. })
  171. } else {
  172. if (
  173. this.accepts.way == 0 &&
  174. this.accepts.consciousness == 0 &&
  175. this.accepts.appetite == 0 &&
  176. this.accepts.condition == 0 &&
  177. this.accepts.posture == 0 &&
  178. this.accepts.sick_condition == 0 &&
  179. this.accepts.danger_level == 0 &&
  180. this.accepts.intake == 0 &&
  181. this.accepts.nutrition == 0 &&
  182. this.accepts.psychological_assessment == 0 &&
  183. this.accepts.psychological_assessment_other == ''&&this.accepts.sick_condition_other == ''&&
  184. this.accepts.psychological_other == ''&&
  185. this.accepts.precaution == 0&&
  186. this.accepts.precaution_other == ''&&
  187. this.accepts.score == ''
  188. ) {
  189. let ParamsQuery = {}
  190. ParamsQuery['patient'] = this.$route.query.patient_id
  191. getLastAccepts(ParamsQuery).then(response => {
  192. if (response.data.state == 0) {
  193. return false
  194. } else {
  195. for (const key in response.data.data.receiveTreatmentAsses) {
  196. this.accepts[key] = response.data.data.receiveTreatmentAsses[key]
  197. this.receiveTreatmentAsses.way = this.accepts.way + ''
  198. this.receiveTreatmentAsses.consciousness =
  199. this.accepts.consciousness + ''
  200. this.receiveTreatmentAsses.appetite = this.accepts.appetite + ''
  201. this.receiveTreatmentAsses.condition =
  202. this.accepts.condition + ''
  203. this.receiveTreatmentAsses.posture = this.accepts.posture + ''
  204. this.receiveTreatmentAsses.sick_condition = this.accepts.sick_condition + ''
  205. this.receiveTreatmentAsses.danger_level = this.accepts.danger_level + ''
  206. this.receiveTreatmentAsses.intake = this.accepts.intake + ''
  207. this.receiveTreatmentAsses.nutrition = this.accepts.nutrition + ''
  208. this.receiveTreatmentAsses.psychological_assessment = this.accepts.psychological_assessment + ''
  209. this.receiveTreatmentAsses.psychological_assessment_other = this.accepts.psychological_assessment_other + ''
  210. this.receiveTreatmentAsses.score = this.accepts.score
  211. this.receiveTreatmentAsses.sick_condition_other = this.accepts.sick_condition_other
  212. this.receiveTreatmentAsses.precaution = this.accepts.precaution
  213. this.receiveTreatmentAsses.precaution_other = this.accepts.precaution_other
  214. this.receiveTreatmentAsses.psychological_other = this.accepts.psychological_other
  215. }
  216. }
  217. })
  218. } else {
  219. this.receiveTreatmentAsses.way = this.accepts.way + ''
  220. this.receiveTreatmentAsses.consciousness =
  221. this.accepts.consciousness + ''
  222. this.receiveTreatmentAsses.appetite = this.accepts.appetite + ''
  223. this.receiveTreatmentAsses.condition = this.accepts.condition + ''
  224. this.receiveTreatmentAsses.posture = this.accepts.posture + ''
  225. this.receiveTreatmentAsses.sick_condition = this.accepts.sick_condition + ''
  226. this.receiveTreatmentAsses.danger_level = this.accepts.danger_level + ''
  227. this.receiveTreatmentAsses.intake = this.accepts.intake + ''
  228. this.receiveTreatmentAsses.nutrition = this.accepts.nutrition + ''
  229. this.receiveTreatmentAsses.psychological_assessment = this.accepts.psychological_assessment + ''
  230. this.receiveTreatmentAsses.psychological_assessment_other = this.accepts.psychological_assessment_other + ''
  231. this.receiveTreatmentAsses.score = this.accepts.score
  232. this.receiveTreatmentAsses.sick_condition_other = this.accepts.sick_condition_other
  233. this.receiveTreatmentAsses.precaution = this.accepts.precaution
  234. this.receiveTreatmentAsses.precaution_other = this.accepts.precaution_other
  235. this.receiveTreatmentAsses.psychological_other = this.accepts.psychological_other
  236. }
  237. }
  238. var date = this.$route.query && this.$route.query.date
  239. date *= 1000
  240. var newDate = new Date(date)
  241. var y = newDate.getFullYear()
  242. var m = newDate.getMonth() + 1
  243. var d = newDate.getDate()
  244. if (isNaN(y) || isNaN(m) || isNaN(d)) {
  245. newDate = new Date()
  246. y = newDate.getFullYear()
  247. m = newDate.getMonth() + 1
  248. d = newDate.getDate()
  249. }
  250. this.record_date =
  251. y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d)
  252. this.patient.id = this.patient_prop.id
  253. },
  254. methods: {
  255. isShow(name){
  256. var filedList = this.$store.getters.user.fileds
  257. for (let i = 0; i < filedList.length; i++){
  258. if(filedList[i].module == 2 && filedList[i].filed_name_cn == name&&filedList[i].is_show == 1){
  259. return true
  260. }
  261. }
  262. return false
  263. },
  264. commitInfo: function () {
  265. Toast.loading({forbidClick: true, duration: 0})
  266. let ParamsQuery = this.receiveTreatmentAsses
  267. // ParamsQuery["patient"] = this.patient.id
  268. ParamsQuery['patient'] = this.$route.query.patient_id
  269. ParamsQuery['record_date'] = this.record_date
  270. commitAcceptsAssessment(ParamsQuery).then(response => {
  271. if (response.data.state == 0) {
  272. Toast.fail(response.data.msg)
  273. return false
  274. } else {
  275. Toast.success('提交成功')
  276. for (const key in response.data.data.receiveTreatmentAsses) {
  277. this.accepts[key] = response.data.data.receiveTreatmentAsses[key]
  278. }
  279. this.finish()
  280. }
  281. })
  282. },
  283. finish: function () {
  284. this.$emit('finish')
  285. },
  286. close: function () {
  287. this.$emit('close')
  288. }
  289. }
  290. }
  291. </script>
  292. <style style="stylesheet/scss" lang="scss" scoped>
  293. .choose {
  294. .el-form-item {
  295. margin-bottom: 0;
  296. border-bottom: 1px #e5e5e5 solid;
  297. padding: 0.15rem 0.36rem;
  298. .el-radio {
  299. font-size: 18px;
  300. }
  301. }
  302. .button {
  303. text-align: center;
  304. margin-top: 1rem;
  305. .submitButton {
  306. width: 3rem;
  307. height: 0.8rem;
  308. line-height: 0.8rem;
  309. background: $main-color;
  310. color: #fff;
  311. font-size: 0.3rem;
  312. text-align: center;
  313. border-radius: 6px;
  314. }
  315. }
  316. }
  317. </style>