血透系统pad前端

AcceptsDialog.vue 16KB

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