acceptsAssessment.vue 9.5KB

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