acceptsAssessment.vue 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <template>
  2. <div class="plate-box">
  3. <h2 class="DetailsTit">
  4. <span>{{ title }}</span>
  5. </h2>
  6. <div class="plate ">
  7. <ul>
  8. <li v-if="isShow('入室方式')">
  9. <label>入室方式 : </label>
  10. <span class="content">{{ way }}</span>
  11. </li>
  12. <li v-if="isShow('体位')">
  13. <label>体位 : </label>
  14. <span class="content">{{ posture }}</span>
  15. </li>
  16. <li v-if="isShow('其他病情')">
  17. <label>其他病情:</label>
  18. <span class="content">{{ this.record.sick_condition_other }}</span>
  19. </li>
  20. <li v-if="isShow('跌倒风险预防措施')">
  21. <label>跌倒风险预防措施:</label>
  22. <span class="content">{{ precaution }}</span>
  23. </li>
  24. <li v-if="isShow('营养状况')">
  25. <label>营养状况:</label>
  26. <span class="content">{{nutritions}}</span>
  27. </li>
  28. <li v-if="isShow('其他心理评估')">
  29. <label>其他心理评估:</label>
  30. <span class="content">{{this.record.psychological_other}}</span>
  31. </li>
  32. </ul>
  33. <ul>
  34. <li v-if="isShow('病人情况')">
  35. <label>病人情况 : </label>
  36. <span class="content">{{ condition }}</span>
  37. </li>
  38. <li v-if="isShow('病人食欲')">
  39. <label>病人食欲 : </label>
  40. <span class="content">{{ appetite }}</span>
  41. </li>
  42. <li v-if="isShow('跌倒风险评估评分')">
  43. <label>跌倒风险评估评分:</label>
  44. <span class="content">{{ this.record.score }}分</span>
  45. </li>
  46. <li v-if="isShow('其他跌倒风险预防措施')">
  47. <label>其他跌倒风险预防措施:</label>
  48. <span class="content">{{ this.record.precaution_other }}</span>
  49. </li>
  50. <li v-if="isShow('心理评估')">
  51. <label> 心理评估</label>
  52. <span class="content">{{ psychologicalAssessment }}</span>
  53. </li>
  54. </ul>
  55. <ul>
  56. <li v-if="this.record.condition == 1">
  57. <label> 住院号</label>
  58. <span class="content">{{ this.record.admission_number }}</span>
  59. </li>
  60. <li v-if="isShow('病人意识')">
  61. <label>病人意识 :</label>
  62. <span class="content">{{ consciousness }}</span>
  63. </li>
  64. <li v-if="isShow('病情')">
  65. <label>病情 </label>
  66. <span class="content">{{sickCondition}} </span>
  67. </li>
  68. <li v-if="isShow('风险程度')">
  69. <label>风险程度:</label>
  70. <span class="content">{{ dangerLevel }}</span>
  71. </li>
  72. <li v-if="isShow('摄入量')">
  73. <label>摄入量:</label>
  74. <span class="content">{{intakes}}</span>
  75. </li>
  76. <li
  77. v-if="
  78. isShow('心理评估异常原因') &&
  79. this.record.psychological_assessment == 2
  80. "
  81. >
  82. <label>心理评估异常原因:</label>
  83. <span class="content">{{
  84. this.record.psychological_assessment_other
  85. }}</span>
  86. </li>
  87. </ul>
  88. </div>
  89. <!-- <div class="note">处方医生 : {{doctor}}</div> -->
  90. <div class="middleLine"></div>
  91. </div>
  92. </template>
  93. <script>
  94. import store from '@/store'
  95. import { getDataConfig } from '@/utils/data'
  96. export default {
  97. name: 'AcceptsAssessment',
  98. data() {
  99. return {
  100. title: '接诊评估 ',
  101. ways: [],
  102. conditions: {
  103. '1': '住院',
  104. '2': '门诊',
  105. '3': '手术期'
  106. },
  107. consciousnesses:[],
  108. appetites: [],
  109. postures: [],
  110. sick_condition:[],
  111. danger_level: {
  112. '1': '无',
  113. '2': '低风险',
  114. '3': '中度风险',
  115. '4': '高风险'
  116. },
  117. intake:[],
  118. nutrition: [],
  119. psychological_assessment: {
  120. '1': '正常',
  121. '2': '异常'
  122. },
  123. precautions:[],
  124. }
  125. },
  126. props: {
  127. record: {
  128. type: Object
  129. }
  130. },
  131. computed: {
  132. way: function() {
  133. if (this.record.id == 0) {
  134. return ''
  135. } else {
  136. // return this.ways[this.record.way] == undefined ? '' : (this.ways[this.record.way] + '')
  137. for (let i = 0; i < this.ways.length; i++){
  138. if (this.record.way == this.ways[i].id){
  139. return this.ways[i].name
  140. }
  141. }
  142. }
  143. },
  144. condition: function() {
  145. if (this.record.id == 0) {
  146. return ''
  147. } else {
  148. return this.conditions[this.record.condition] == undefined ? '' : this.conditions[this.record.condition] + ''
  149. }
  150. },
  151. consciousness: function() {
  152. if (this.record.id == 0) {
  153. return ''
  154. } else {
  155. for (let i = 0; i < this.consciousnesses.length; i++){
  156. if (this.record.consciousness == this.consciousnesses[i].id){
  157. return this.consciousnesses[i].name
  158. }
  159. }
  160. // return this.consciousnesses[this.record.consciousness] == undefined ? '' : this.consciousnesses[this.record.consciousness] + ''
  161. }
  162. },
  163. appetite: function() {
  164. if (this.record.id == 0) {
  165. return ''
  166. } else {
  167. // return this.appetites[this.record.appetite] == undefined ? '' : this.appetites[this.record.appetite] + ''
  168. for (let i = 0; i < this.appetites.length; i++){
  169. if (this.record.appetite == this.appetites[i].id){
  170. return this.appetites[i].name
  171. }
  172. }
  173. }
  174. },
  175. posture: function() {
  176. if (this.record.id == 0) {
  177. return ''
  178. } else {
  179. // return this.postures[this.record.posture] == undefined ? '' : this.postures[this.record.posture] + ''
  180. for (let i = 0; i < this.postures.length; i++){
  181. if (this.record.posture == this.postures[i].id){
  182. return this.postures[i].name
  183. }
  184. }
  185. }
  186. }, sickCondition: function() {
  187. if (this.record == null || this.record.id == '') {
  188. return ''
  189. } else {
  190. for (let i = 0; i < this.sick_condition.length; i++){
  191. if (this.record.sick_condition == this.sick_condition[i].id){
  192. return this.sick_condition[i].name
  193. }
  194. }
  195. // return this.sick_condition[this.record.sick_condition] == undefined ? '' : this.sick_condition[this.record.sick_condition] + ''
  196. }
  197. }, dangerLevel: function() {
  198. if (this.record == null || this.record.id == '') {
  199. return ''
  200. } else {
  201. return this.danger_level[this.record.danger_level] == undefined ? '' : this.danger_level[this.record.danger_level] + ''
  202. }
  203. }, intakes: function() {
  204. if (this.record == null || this.record.id == '') {
  205. return ''
  206. } else {
  207. for (let i = 0; i < this.intake.length; i++){
  208. if (this.record.intake == this.intake[i].id){
  209. return this.intake[i].name
  210. }
  211. }
  212. // return this.intake[this.record.intake] == undefined ? '' : this.intake[this.record.intake] + ''
  213. }
  214. }, nutritions: function() {
  215. if (this.record == null || this.record.id == '') {
  216. return ''
  217. } else {
  218. for (let i = 0; i < this.nutrition.length; i++){
  219. if (this.record.nutrition == this.nutrition[i].id){
  220. return this.nutrition[i].name
  221. }
  222. }
  223. // return this.nutrition[this.record.nutrition] == undefined ? '' : this.nutrition[this.record.nutrition] + ''
  224. }
  225. }, psychologicalAssessment: function() {
  226. if (this.record == null || this.record.id == '') {
  227. return ''
  228. } else {
  229. return this.psychological_assessment[this.record.psychological_assessment] == undefined ? '' : this.psychological_assessment[this.record.psychological_assessment] + ''
  230. }
  231. },
  232. precaution: function() {
  233. if (this.record.id == 0 || this.record == null ) {
  234. console.log("id--------")
  235. return ''
  236. } else {
  237. //console.log("-----",this.record.precaution)
  238. var obj = this.record.precaution
  239. console.log("obj--",obj)
  240. if(obj == null){
  241. return ""
  242. }
  243. if(obj !=null){
  244. var arr = obj.split(",")
  245. // console.log("arr----",arr)
  246. var arrtwo = []
  247. for(let i=0;i<arr.length;i++){
  248. for(let j=0;j<this.precautions.length;j++){
  249. if(parseInt(arr[i]) == this.precautions[j].id){
  250. arrtwo.push(this.precautions[j].name)
  251. }
  252. }
  253. }
  254. // console.log("arrtwo",arrtwo)
  255. var objtwo = arrtwo.join(",")
  256. // console.log("objtwo",objtwo)
  257. return objtwo
  258. }
  259. // for (let i = 0; i < this.precautions.length; i++){
  260. // if (this.record.precaution == this.precautions[i].id){
  261. // return this.precautions[i].name
  262. //
  263. // }
  264. // }
  265. // return this.precautions[this.record.precaution] == undefined ? '' : this.precautions[this.record.precaution] + ''
  266. }
  267. }
  268. },
  269. methods: {
  270. isShow(name) {
  271. var filedList = store.getters.xt_user.fileds
  272. for (let i = 0; i < filedList.length; i++) {
  273. if (filedList[i].module == 2 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
  274. return true
  275. }
  276. }
  277. return false
  278. }
  279. },
  280. created(){
  281. console.log("records",this.record)
  282. this.ways = getDataConfig('hemodialysis', 'way')
  283. this.consciousnesses = getDataConfig('hemodialysis', 'consciousness')
  284. this.appetites = getDataConfig('hemodialysis', 'appetite')
  285. this.postures = getDataConfig('hemodialysis', 'posture')
  286. this.sick_condition = getDataConfig('hemodialysis', 'sick_condition')
  287. this.precautions = getDataConfig('hemodialysis', 'precaution')
  288. console.log("跌倒预防措施",this.precautions)
  289. this.intake = getDataConfig('hemodialysis', 'intake')
  290. this.nutrition = getDataConfig('hemodialysis', 'nutrition')
  291. console.log(this.ways)
  292. },
  293. }
  294. </script>
  295. <style rel="stylesheet/scss" lang="scss" scoped></style>