acceptsTreatmentDialog.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <el-dialog title="接诊评估"
  3. :modal-append-to-body="false"
  4. :visible.sync="isVisibility"
  5. width="854px">
  6. <el-form :model="receiveTreatmentAsses" label-width="80px">
  7. <el-form-item label="入室方式 : " v-if="isShow('入室方式')">
  8. <!--<el-radio-group v-model="receiveTreatmentAsses.way">-->
  9. <el-radio v-for="(item,index) in way_arr" :key="index"
  10. :label="item.id" v-model="receiveTreatmentAsses.way">{{item.name}}
  11. </el-radio>
  12. <!--</el-radio-group>-->
  13. </el-form-item>
  14. <el-form-item label="病人意识 : " v-if="isShow('病人意识')">
  15. <!--<el-radio-group v-model="receiveTreatmentAsses.consciousness">-->
  16. <el-radio v-for="(item,index) in consciousness_arr" :key="index"
  17. :label="item.id" v-model="receiveTreatmentAsses.consciousness">{{item.name}}
  18. </el-radio>
  19. <!--</el-radio-group>-->
  20. <!--<el-radio v-model="receiveTreatmentAsses.consciousness" label="1">清醒</el-radio>-->
  21. <!--<el-radio v-model="receiveTreatmentAsses.consciousness" label="2">嗜睡</el-radio>-->
  22. <!--<el-radio v-model="receiveTreatmentAsses.consciousness" label="3">昏迷</el-radio>-->
  23. <!--<el-radio v-model="receiveTreatmentAsses.consciousness" label="4">模糊</el-radio>-->
  24. </el-form-item>
  25. <el-form-item label="病人食欲 : " v-if="isShow('病人食欲')">
  26. <el-radio v-for="(item,index) in appetite_arr" :key="index"
  27. :label="item.id" v-model="receiveTreatmentAsses.appetite">{{item.name}}
  28. </el-radio>
  29. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="1">正常</el-radio>-->
  30. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="2">减退</el-radio>-->
  31. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="3">恶心</el-radio>-->
  32. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="4">呕吐</el-radio>-->
  33. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="5">腹泻</el-radio>-->
  34. </el-form-item>
  35. <el-form-item label="病人情况 : " v-if="isShow('病人情况')">
  36. <el-radio v-model="receiveTreatmentAsses.condition" label="1">住院</el-radio>
  37. <el-radio v-model="receiveTreatmentAsses.condition" label="2">门诊</el-radio>
  38. <el-radio v-model="receiveTreatmentAsses.condition" label="3">手术期</el-radio>
  39. </el-form-item>
  40. <el-form-item label="住院号 : "
  41. v-if="this.receiveTreatmentAsses.condition == '1'">
  42. <el-input v-model="receiveTreatmentAsses.admission_number"></el-input>
  43. </el-form-item>
  44. <el-form-item label="体位 : " v-if="isShow('体位')">
  45. <el-radio v-for="(item,index) in posture_arr" :key="index"
  46. :label="item.id" v-model="receiveTreatmentAsses.posture">{{item.name}}
  47. </el-radio>
  48. <!--<el-radio v-model="receiveTreatmentAsses.posture" label="1">自动体位</el-radio>-->
  49. <!--<el-radio v-model="receiveTreatmentAsses.posture" label="2">平卧位</el-radio>-->
  50. <!--<el-radio v-model="receiveTreatmentAsses.posture" label="3">半卧位</el-radio>-->
  51. <!--<el-radio v-model="receiveTreatmentAsses.posture" label="4">端坐位</el-radio>-->
  52. <!--<el-radio v-model="receiveTreatmentAsses.posture" label="5">躁动不安</el-radio>-->
  53. </el-form-item>
  54. <el-form-item label="病情: " v-if="isShow('病情')">
  55. <el-radio v-for="(item,index) in sick_condition_arr" :key="index"
  56. :label="item.id" v-model="receiveTreatmentAsses.sick_condition">{{item.name}}
  57. </el-radio>
  58. <!--<el-radio v-model="receiveTreatmentAsses.sick_condition" label="1">一般</el-radio>-->
  59. <!--<el-radio v-model="receiveTreatmentAsses.sick_condition" label="2">严重</el-radio>-->
  60. <!--<el-radio v-model="receiveTreatmentAsses.sick_condition" label="3">危</el-radio>-->
  61. </el-form-item>
  62. <el-form-item label-width="100px" label="其他病情 : "
  63. v-if="isShow('其他病情')">
  64. <el-input v-model="receiveTreatmentAsses.sick_condition_other"></el-input>
  65. </el-form-item>
  66. <el-form-item label-width="150px" label="跌倒风险评估评分 : "
  67. v-if="isShow('跌倒风险评估评分')">
  68. <el-input v-model="receiveTreatmentAsses.score" style="width: 100px"></el-input>
  69. </el-form-item>
  70. <el-form-item label="风险程度: " v-if="isShow('风险程度')">
  71. <el-radio v-model="receiveTreatmentAsses.danger_level" label="1">无</el-radio>
  72. <el-radio v-model="receiveTreatmentAsses.danger_level" label="2">低风险</el-radio>
  73. <el-radio v-model="receiveTreatmentAsses.danger_level" label="3">中度风险</el-radio>
  74. <el-radio v-model="receiveTreatmentAsses.danger_level" label="4">高风险</el-radio>
  75. </el-form-item>
  76. <el-form-item label-width="150px" label="跌倒风险预防措施: " v-if="isShow('跌倒风险预防措施')">
  77. <!--<el-radio v-model="receiveTreatmentAsses.precaution" label="1">镇定剂</el-radio>-->
  78. <!--<el-radio v-model="receiveTreatmentAsses.precaution" label="2">约束带</el-radio>-->
  79. <!--<el-radio v-model="receiveTreatmentAsses.precaution" label="3">床栏</el-radio>-->
  80. <!--<el-radio v-model="receiveTreatmentAsses.precaution" label="4">加强宣教</el-radio>-->
  81. <el-radio v-for="(item,index) in precaution_arr" :key="index"
  82. :label="item.id" v-model="receiveTreatmentAsses.precaution">{{item.name}}
  83. </el-radio>
  84. </el-form-item>
  85. <el-form-item label-width="200px" label="其他跌倒风险预防措施 : "
  86. v-if="isShow('其他跌倒风险预防措施')">
  87. <el-input v-model="receiveTreatmentAsses.precaution_other"></el-input>
  88. </el-form-item>
  89. <el-form-item label="摄入量: " v-if="isShow('摄入量')">
  90. <!--<el-radio v-model="receiveTreatmentAsses.intake" label="1">正常</el-radio>-->
  91. <!--<el-radio v-model="receiveTreatmentAsses.intake" label="2">减少</el-radio>-->
  92. <el-radio v-for="(item,index) in intake_arr" :key="index"
  93. :label="item.id" v-model="receiveTreatmentAsses.intake">{{item.name}}
  94. </el-radio>
  95. </el-form-item>
  96. <el-form-item label="营养状况: " v-if="isShow('营养状况')">
  97. <!--<el-radio v-model="receiveTreatmentAsses.nutrition" label="1">正常</el-radio>-->
  98. <!--<el-radio v-model="receiveTreatmentAsses.nutrition" label="2">营养不良</el-radio>-->
  99. <el-radio v-for="(item,index) in nutrition_arr" :key="index"
  100. :label="item.id" v-model="receiveTreatmentAsses.nutrition">{{item.name}}
  101. </el-radio>
  102. </el-form-item>
  103. <el-form-item label="心理评估: " v-if="isShow('心理评估')">
  104. <el-radio v-model="receiveTreatmentAsses.psychological_assessment" label="1">正常</el-radio>
  105. <el-radio v-model="receiveTreatmentAsses.psychological_assessment" label="2">异常</el-radio>
  106. </el-form-item>
  107. <el-form-item label-width="150px" label="心理评估异常情况 : "
  108. v-if="isShow('心理评估异常情况')&&receiveTreatmentAsses.psychological_assessment == 2">
  109. <el-input v-model="receiveTreatmentAsses.psychological_assessment_other"></el-input>
  110. </el-form-item>
  111. <el-form-item label-width="150px" label="其他心理评估 : "
  112. v-if="isShow('其他心理评估')">
  113. <el-input v-model="receiveTreatmentAsses.psychological_other"></el-input>
  114. </el-form-item>
  115. </el-form>
  116. <div slot="footer" class="dialog-footer">
  117. <el-button @click="handleCancle">取 消</el-button>
  118. <el-button type="primary" @click="handleComfirm">保 存</el-button>
  119. </div>
  120. </el-dialog>
  121. </template>
  122. <script>
  123. import { postAccepts } from '@/api/dialysis'
  124. import { uParseTime } from '@/utils/tools'
  125. import store from '@/store'
  126. import { getDataConfig } from '@/utils/data'
  127. export default {
  128. name: 'acceptsTreatmentDialog',
  129. data() {
  130. return {
  131. isVisibility: false,
  132. record_date: '',
  133. way_arr: [],
  134. consciousness_arr: [],
  135. appetite_arr: [],
  136. posture_arr: [],
  137. sick_condition_arr: [],
  138. precaution_arr: [],
  139. intake_arr: [],
  140. nutrition_arr: [],
  141. receiveTreatmentAsses: {
  142. way: '1',
  143. consciousness: '1',
  144. appetite: '1',
  145. condition: '1',
  146. posture: '1',
  147. sick_condition: '1',
  148. danger_level: '1',
  149. intake: '1',
  150. nutrition: '1',
  151. psychological_assessment: '1',
  152. psychological_assessment_other: '',
  153. sick_condition_other: '',
  154. score: '',
  155. psychological_other: '',
  156. precaution: '1',
  157. precaution_other: '',
  158. admission_number:'',
  159. }
  160. }
  161. },
  162. methods: {
  163. isShow(name) {
  164. var filedList = store.getters.xt_user.fileds
  165. for (let i = 0; i < filedList.length; i++) {
  166. if (filedList[i].module == 2 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
  167. return true
  168. }
  169. }
  170. return false
  171. },
  172. show() {
  173. for (var index in this.receiveTreatmentAsses) {
  174. if (index == 'condition' || index == 'danger_level' || index == 'psychological_assessment') {
  175. this.receiveTreatmentAsses[index] = this.receiver_treatment_access[index] + ''
  176. } else {
  177. this.receiveTreatmentAsses[index] = this.receiver_treatment_access[index]
  178. }
  179. }
  180. this.isVisibility = true
  181. },
  182. hide() {
  183. this.isVisibility = false
  184. },
  185. handleCancle: function() {
  186. this.isVisibility = false
  187. },
  188. handleComfirm: function() {
  189. let ParamsQuery = this.receiveTreatmentAsses
  190. ParamsQuery['patient'] = this.patient.id
  191. ParamsQuery['record_date'] = this.record_date
  192. console.log(this.receiver_treatment_access)
  193. ParamsQuery['mode'] = "1"
  194. if(this.receiver_treatment_access.id > 0){
  195. ParamsQuery['mode'] = "2"
  196. if(this.$store.getters.xt_user.user.id != this.receiver_treatment_access.creater){
  197. ParamsQuery['mode'] = "3"
  198. }
  199. }
  200. postAccepts(ParamsQuery).then(response => {
  201. if (response.data.state == 0) {
  202. this.$message.error(response.data.msg)
  203. return false
  204. } else {
  205. this.$notify({
  206. title: '成功',
  207. message: '提交成功',
  208. type: 'success',
  209. duration: 2000
  210. })
  211. let receive_treatment_asses_resp = response.data.data.receiveTreatmentAsses
  212. //prop
  213. var receiver_treatment_access = this.receiver_treatment_access
  214. for (var index in receive_treatment_asses_resp) {
  215. // receiver_treatment_access[index] = receive_treatment_asses_resp[index];
  216. this.$set(receiver_treatment_access, index, receive_treatment_asses_resp[index])
  217. }
  218. this.hide()
  219. }
  220. })
  221. }
  222. },
  223. props: {
  224. receiver_treatment_access: { // 双人核对
  225. type: Object,
  226. default: () => {
  227. return { id: 0 }
  228. }
  229. },
  230. patient: { // 患者信息
  231. type: Object,
  232. default: () => {
  233. return { id: 0 }
  234. }
  235. }
  236. }, watch: {
  237. isVisibility(val) {
  238. },
  239. 'receiver_treatment_access.id': function() {
  240. if (this.receiver_treatment_access.id > 0) {
  241. for (var index in this.receiveTreatmentAsses) {
  242. this.receiveTreatmentAsses[index] = this.receiver_treatment_access[index]
  243. }
  244. }
  245. }
  246. }, created() {
  247. var date = this.$route.query && this.$route.query.date
  248. this.record_date = uParseTime(date, '{y}-{m}-{d}')
  249. this.way_arr = getDataConfig('hemodialysis', 'way')
  250. this.consciousness_arr = getDataConfig('hemodialysis', 'consciousness')
  251. this.appetite_arr = getDataConfig('hemodialysis', 'appetite')
  252. this.posture_arr = getDataConfig('hemodialysis', 'posture')
  253. this.sick_condition_arr = getDataConfig('hemodialysis', 'sick_condition')
  254. this.precaution_arr = getDataConfig('hemodialysis', 'precaution')
  255. this.intake_arr = getDataConfig('hemodialysis', 'intake')
  256. this.nutrition_arr = getDataConfig('hemodialysis', 'nutrition')
  257. }
  258. }
  259. </script>
  260. <style scoped>
  261. </style>