血透系统pad前端

AcceptsDialog.vue 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  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
  11. class="acceptsForm"
  12. :model="receiveTreatmentAsses"
  13. label-width="130px"
  14. >
  15. <el-form-item label="入室方式: " v-if="isShow('入室方式')">
  16. <el-radio v-model="receiveTreatmentAsses.way" label="1"
  17. >步行</el-radio
  18. >
  19. <el-radio v-model="receiveTreatmentAsses.way" label="2"
  20. >扶行</el-radio
  21. >
  22. <el-radio v-model="receiveTreatmentAsses.way" label="3"
  23. >轮椅</el-radio
  24. >
  25. <el-radio v-model="receiveTreatmentAsses.way" label="4"
  26. >平车</el-radio
  27. >
  28. <!--</el-radio-group>-->
  29. </el-form-item>
  30. <el-form-item label="病人意识: " v-if="isShow('病人意识')">
  31. <el-radio v-model="receiveTreatmentAsses.consciousness" label="1"
  32. >清醒</el-radio
  33. >
  34. <el-radio v-model="receiveTreatmentAsses.consciousness" label="2"
  35. >嗜睡</el-radio
  36. >
  37. <el-radio v-model="receiveTreatmentAsses.consciousness" label="3"
  38. >昏迷</el-radio
  39. >
  40. <el-radio v-model="receiveTreatmentAsses.consciousness" label="4"
  41. >模糊</el-radio
  42. >
  43. </el-form-item>
  44. <el-form-item label="病人食欲: " v-if="isShow('病人食欲')">
  45. <el-radio v-model="receiveTreatmentAsses.appetite" label="1"
  46. >正常</el-radio
  47. >
  48. <el-radio v-model="receiveTreatmentAsses.appetite" label="2"
  49. >减退</el-radio
  50. >
  51. <el-radio v-model="receiveTreatmentAsses.appetite" label="3"
  52. >恶心</el-radio
  53. >
  54. <el-radio v-model="receiveTreatmentAsses.appetite" label="4"
  55. >呕吐</el-radio
  56. >
  57. <el-radio v-model="receiveTreatmentAsses.appetite" label="5"
  58. >腹泻</el-radio
  59. >
  60. </el-form-item>
  61. <el-form-item label="病人情况: " v-if="isShow('病人情况')">
  62. <el-radio v-model="receiveTreatmentAsses.condition" label="1"
  63. >住院</el-radio
  64. >
  65. <el-radio v-model="receiveTreatmentAsses.condition" label="2"
  66. >门诊</el-radio
  67. >
  68. <el-radio v-model="receiveTreatmentAsses.condition" label="3"
  69. >手术期</el-radio
  70. >
  71. </el-form-item>
  72. <el-form-item label="体位: " v-if="isShow('体位')">
  73. <el-radio v-model="receiveTreatmentAsses.posture" label="1"
  74. >自动体位</el-radio
  75. >
  76. <el-radio v-model="receiveTreatmentAsses.posture" label="2"
  77. >平卧位</el-radio
  78. >
  79. <el-radio v-model="receiveTreatmentAsses.posture" label="3"
  80. >半卧位</el-radio
  81. >
  82. <el-radio v-model="receiveTreatmentAsses.posture" label="4"
  83. >端坐位</el-radio
  84. >
  85. <el-radio v-model="receiveTreatmentAsses.posture" label="5"
  86. >躁动不安</el-radio
  87. >
  88. </el-form-item>
  89. <el-form-item label="病情: " v-if="isShow('病情')">
  90. <el-radio v-model="receiveTreatmentAsses.sick_condition" label="1"
  91. >一般</el-radio
  92. >
  93. <el-radio v-model="receiveTreatmentAsses.sick_condition" label="2"
  94. >严重</el-radio
  95. >
  96. <el-radio v-model="receiveTreatmentAsses.sick_condition" label="3"
  97. >危</el-radio
  98. >
  99. </el-form-item>
  100. <el-form-item
  101. label-width="110dp"
  102. label="其他病情 : "
  103. v-if="isShow('其他病情')"
  104. >
  105. <el-input
  106. class="illnessInput"
  107. v-model="receiveTreatmentAsses.sick_condition_other"
  108. ></el-input>
  109. </el-form-item>
  110. <el-form-item
  111. label-width="110dp"
  112. label="跌倒风险评估评分 : "
  113. v-if="isShow('跌倒风险评估评分')"
  114. >
  115. <el-input
  116. class="illnessInput"
  117. v-model="receiveTreatmentAsses.score"
  118. style="width: 100px"
  119. ></el-input>
  120. </el-form-item>
  121. <el-form-item label="风险程度: " v-if="isShow('风险程度')">
  122. <el-radio v-model="receiveTreatmentAsses.danger_level" label="1"
  123. >无</el-radio
  124. >
  125. <el-radio v-model="receiveTreatmentAsses.danger_level" label="2"
  126. >低风险</el-radio
  127. >
  128. <el-radio v-model="receiveTreatmentAsses.danger_level" label="3"
  129. >中度风险</el-radio
  130. >
  131. <el-radio v-model="receiveTreatmentAsses.danger_level" label="4"
  132. >高风险</el-radio
  133. >
  134. </el-form-item>
  135. <el-form-item
  136. label-width="130px"
  137. label="跌倒风险预防措施: "
  138. v-if="isShow('跌倒风险预防措施')"
  139. >
  140. <el-radio v-model="receiveTreatmentAsses.precaution" label="1"
  141. >镇定剂</el-radio
  142. >
  143. <el-radio v-model="receiveTreatmentAsses.precaution" label="2"
  144. >约束带</el-radio
  145. >
  146. <el-radio v-model="receiveTreatmentAsses.precaution" label="3"
  147. >床栏</el-radio
  148. >
  149. <el-radio v-model="receiveTreatmentAsses.precaution" label="4"
  150. >加强宣教</el-radio
  151. >
  152. </el-form-item>
  153. <el-form-item
  154. label-width="110dp"
  155. label="其他跌倒风险预防措施 : "
  156. v-if="isShow('其他跌倒风险预防措施')"
  157. >
  158. <el-input
  159. class="illnessInput"
  160. v-model="receiveTreatmentAsses.precaution_other"
  161. ></el-input>
  162. </el-form-item>
  163. <el-form-item label="摄入量: " v-if="isShow('摄入量')">
  164. <el-radio v-model="receiveTreatmentAsses.intake" label="1"
  165. >正常</el-radio
  166. >
  167. <el-radio v-model="receiveTreatmentAsses.intake" label="2"
  168. >减少</el-radio
  169. >
  170. </el-form-item>
  171. <el-form-item label="营养状况: " v-if="isShow('营养状况')">
  172. <el-radio v-model="receiveTreatmentAsses.nutrition" label="1"
  173. >正常</el-radio
  174. >
  175. <el-radio v-model="receiveTreatmentAsses.nutrition" label="2"
  176. >营养不良</el-radio
  177. >
  178. </el-form-item>
  179. <el-form-item label="心理评估: " v-if="isShow('心理评估')">
  180. <el-radio
  181. v-model="receiveTreatmentAsses.psychological_assessment"
  182. label="1"
  183. >正常</el-radio
  184. >
  185. <el-radio
  186. v-model="receiveTreatmentAsses.psychological_assessment"
  187. label="2"
  188. >异常</el-radio
  189. >
  190. </el-form-item>
  191. <el-form-item
  192. label-width="110dp"
  193. label="心理评估异常情况 : "
  194. v-if="
  195. isShow('心理评估异常情况') &&
  196. receiveTreatmentAsses.psychological_assessment == 2
  197. "
  198. >
  199. <el-input
  200. v-model="receiveTreatmentAsses.psychological_assessment_other"
  201. ></el-input>
  202. </el-form-item>
  203. <el-form-item
  204. label-width="110dp"
  205. label="其他心理评估 : "
  206. v-if="isShow('其他心理评估')"
  207. >
  208. <el-input
  209. class="illnessInput"
  210. v-model="receiveTreatmentAsses.psychological_other"
  211. ></el-input>
  212. </el-form-item>
  213. </el-form>
  214. <!-- <div class="button">
  215. <button @click="commitInfo" class="submitButton">提交</button>
  216. </div>-->
  217. </div>
  218. <!-- <div class="footer">
  219. 处方医生:刘小军 医生
  220. </div>-->
  221. </div>
  222. </div>
  223. </template>
  224. <script>
  225. import { commitAcceptsAssessment, getLastAccepts } from "@/api/dialysis";
  226. import { Toast } from "vant";
  227. export default {
  228. name: "AcceptsDialog",
  229. data() {
  230. return {
  231. receiveTreatmentAsses: {
  232. way: "1",
  233. consciousness: "1",
  234. appetite: "1",
  235. condition: "1",
  236. posture: "1",
  237. sick_condition: "1",
  238. danger_level: "1",
  239. intake: "1",
  240. nutrition: "1",
  241. psychological_assessment: "1",
  242. psychological_assessment_other: "",
  243. sick_condition_other: "",
  244. score: "",
  245. psychological_other: "",
  246. precaution: "1",
  247. precaution_other: ""
  248. },
  249. patient: {
  250. id: 0
  251. },
  252. record_date: ""
  253. };
  254. },
  255. props: {
  256. accepts: {
  257. type: Object
  258. },
  259. patient_prop: {
  260. type: Object
  261. }
  262. },
  263. created() {
  264. if (this.accepts == null || this.accepts.id == "") {
  265. let ParamsQuery = {};
  266. ParamsQuery["patient"] = this.$route.query.patient_id;
  267. getLastAccepts(ParamsQuery).then(response => {
  268. if (response.data.state == 0) {
  269. return false;
  270. } else {
  271. for (const key in response.data.data.receiveTreatmentAsses) {
  272. this.accepts[key] = response.data.data.receiveTreatmentAsses[key];
  273. this.receiveTreatmentAsses.way = this.accepts.way + "";
  274. this.receiveTreatmentAsses.consciousness =
  275. this.accepts.consciousness + "";
  276. this.receiveTreatmentAsses.appetite = this.accepts.appetite + "";
  277. this.receiveTreatmentAsses.condition = this.accepts.condition + "";
  278. this.receiveTreatmentAsses.posture = this.accepts.posture + "";
  279. this.receiveTreatmentAsses.sick_condition =
  280. this.accepts.sick_condition + "";
  281. this.receiveTreatmentAsses.danger_level =
  282. this.accepts.danger_level + "";
  283. this.receiveTreatmentAsses.intake = this.accepts.intake + "";
  284. this.receiveTreatmentAsses.nutrition = this.accepts.nutrition + "";
  285. this.receiveTreatmentAsses.psychological_assessment =
  286. this.accepts.psychological_assessment + "";
  287. this.receiveTreatmentAsses.psychological_assessment_other = this.accepts.psychological_assessment_other;
  288. this.receiveTreatmentAsses.score = this.accepts.score;
  289. this.receiveTreatmentAsses.sick_condition_other = this.accepts.sick_condition_other;
  290. this.receiveTreatmentAsses.psychological_other = this.accepts.psychological_other;
  291. this.receiveTreatmentAsses.precaution =
  292. this.accepts.precaution + "";
  293. this.receiveTreatmentAsses.precaution_other = this.accepts.precaution_other;
  294. }
  295. }
  296. }).catch(error => {
  297. Toast.fail("请求失败")
  298. });
  299. } else {
  300. if (
  301. this.accepts.way == 0 &&
  302. this.accepts.consciousness == 0 &&
  303. this.accepts.appetite == 0 &&
  304. this.accepts.condition == 0 &&
  305. this.accepts.posture == 0 &&
  306. this.accepts.sick_condition == 0 &&
  307. this.accepts.danger_level == 0 &&
  308. this.accepts.intake == 0 &&
  309. this.accepts.nutrition == 0 &&
  310. this.accepts.psychological_assessment == 0 &&
  311. this.accepts.psychological_assessment_other == "" &&
  312. this.accepts.sick_condition_other == "" &&
  313. this.accepts.psychological_other == "" &&
  314. this.accepts.precaution == 0 &&
  315. this.accepts.precaution_other == "" &&
  316. this.accepts.score == ""
  317. ) {
  318. let ParamsQuery = {};
  319. ParamsQuery["patient"] = this.$route.query.patient_id;
  320. getLastAccepts(ParamsQuery).then(response => {
  321. if (response.data.state == 0) {
  322. return false;
  323. } else {
  324. for (const key in response.data.data.receiveTreatmentAsses) {
  325. this.accepts[key] = response.data.data.receiveTreatmentAsses[key];
  326. this.receiveTreatmentAsses.way = this.accepts.way + "";
  327. this.receiveTreatmentAsses.consciousness =
  328. this.accepts.consciousness + "";
  329. this.receiveTreatmentAsses.appetite = this.accepts.appetite + "";
  330. this.receiveTreatmentAsses.condition =
  331. this.accepts.condition + "";
  332. this.receiveTreatmentAsses.posture = this.accepts.posture + "";
  333. this.receiveTreatmentAsses.sick_condition =
  334. this.accepts.sick_condition + "";
  335. this.receiveTreatmentAsses.danger_level =
  336. this.accepts.danger_level + "";
  337. this.receiveTreatmentAsses.intake = this.accepts.intake + "";
  338. this.receiveTreatmentAsses.nutrition =
  339. this.accepts.nutrition + "";
  340. this.receiveTreatmentAsses.psychological_assessment =
  341. this.accepts.psychological_assessment + "";
  342. this.receiveTreatmentAsses.psychological_assessment_other =
  343. this.accepts.psychological_assessment_other + "";
  344. this.receiveTreatmentAsses.score = this.accepts.score;
  345. this.receiveTreatmentAsses.sick_condition_other = this.accepts.sick_condition_other;
  346. this.receiveTreatmentAsses.precaution =
  347. this.accepts.precaution + "";
  348. this.receiveTreatmentAsses.precaution_other = this.accepts.precaution_other;
  349. this.receiveTreatmentAsses.psychological_other = this.accepts.psychological_other;
  350. }
  351. }
  352. });
  353. } else {
  354. this.receiveTreatmentAsses.way = this.accepts.way + "";
  355. this.receiveTreatmentAsses.consciousness =
  356. this.accepts.consciousness + "";
  357. this.receiveTreatmentAsses.appetite = this.accepts.appetite + "";
  358. this.receiveTreatmentAsses.condition = this.accepts.condition + "";
  359. this.receiveTreatmentAsses.posture = this.accepts.posture + "";
  360. this.receiveTreatmentAsses.sick_condition =
  361. this.accepts.sick_condition + "";
  362. this.receiveTreatmentAsses.danger_level =
  363. this.accepts.danger_level + "";
  364. this.receiveTreatmentAsses.intake = this.accepts.intake + "";
  365. this.receiveTreatmentAsses.nutrition = this.accepts.nutrition + "";
  366. this.receiveTreatmentAsses.psychological_assessment =
  367. this.accepts.psychological_assessment + "";
  368. this.receiveTreatmentAsses.psychological_assessment_other =
  369. this.accepts.psychological_assessment_other + "";
  370. this.receiveTreatmentAsses.score = this.accepts.score;
  371. this.receiveTreatmentAsses.sick_condition_other = this.accepts.sick_condition_other;
  372. this.receiveTreatmentAsses.precaution = this.accepts.precaution + "";
  373. this.receiveTreatmentAsses.precaution_other = this.accepts.precaution_other;
  374. this.receiveTreatmentAsses.psychological_other = this.accepts.psychological_other;
  375. }
  376. }
  377. var date = this.$route.query && this.$route.query.date;
  378. date *= 1000;
  379. var newDate = new Date(date);
  380. var y = newDate.getFullYear();
  381. var m = newDate.getMonth() + 1;
  382. var d = newDate.getDate();
  383. if (isNaN(y) || isNaN(m) || isNaN(d)) {
  384. newDate = new Date();
  385. y = newDate.getFullYear();
  386. m = newDate.getMonth() + 1;
  387. d = newDate.getDate();
  388. }
  389. this.record_date =
  390. y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
  391. this.patient.id = this.patient_prop.id;
  392. },
  393. methods: {
  394. isShow(name) {
  395. var filedList = this.$store.getters.user.fileds;
  396. for (let i = 0; i < filedList.length; i++) {
  397. if (
  398. filedList[i].module == 2 &&
  399. filedList[i].filed_name_cn == name &&
  400. filedList[i].is_show == 1
  401. ) {
  402. return true;
  403. }
  404. }
  405. return false;
  406. },
  407. commitInfo: function() {
  408. Toast.loading({ forbidClick: true, duration: 0 });
  409. let ParamsQuery = this.receiveTreatmentAsses;
  410. // ParamsQuery["patient"] = this.patient.id
  411. ParamsQuery["patient"] = this.$route.query.patient_id;
  412. ParamsQuery["record_date"] = this.record_date;
  413. commitAcceptsAssessment(ParamsQuery).then(response => {
  414. if (response.data.state == 0) {
  415. Toast.fail(response.data.msg);
  416. return false;
  417. } else {
  418. Toast.success("提交成功");
  419. for (const key in response.data.data.receiveTreatmentAsses) {
  420. this.accepts[key] = response.data.data.receiveTreatmentAsses[key];
  421. }
  422. this.finish();
  423. }
  424. }).catch(error => {
  425. Toast.fail("请求失败")
  426. });
  427. },
  428. finish: function() {
  429. this.$emit("finish");
  430. },
  431. close: function() {
  432. this.$emit("close");
  433. }
  434. }
  435. };
  436. </script>
  437. <style style="stylesheet/scss" lang="scss" scoped>
  438. .choose {
  439. .el-form-item {
  440. margin-bottom: 0;
  441. border-bottom: 1px #e5e5e5 solid;
  442. padding: 0.15rem 0.36rem;
  443. .el-radio {
  444. font-size: 18px;
  445. }
  446. }
  447. .button {
  448. text-align: center;
  449. margin-top: 1rem;
  450. .submitButton {
  451. width: 3rem;
  452. height: 0.8rem;
  453. line-height: 0.8rem;
  454. background: $main-color;
  455. color: #fff;
  456. font-size: 0.3rem;
  457. text-align: center;
  458. border-radius: 6px;
  459. }
  460. }
  461. }
  462. </style>
  463. <style lang="scss">
  464. .acceptsForm {
  465. .el-radio {
  466. margin-right: 14px;
  467. width: 2.2rem;
  468. @media only screen and (min-width: 768px) {
  469. margin-bottom: 0.34rem;
  470. }
  471. }
  472. .el-radio__inner {
  473. width: 16px !important;
  474. height: 16px !important;
  475. @media only screen and (min-width: 768px) {
  476. width: 26px !important;
  477. height: 26px !important;
  478. margin-bottom: 4px !important;
  479. }
  480. }
  481. }
  482. .illnessInput {
  483. .el-input__inner {
  484. font-size: 0.45rem;
  485. @media only screen and (min-width: 768px) {
  486. height: 60px;
  487. line-height: 60px;
  488. font-size: 0.45rem;
  489. }
  490. }
  491. }
  492. </style>