血透系统pad前端

AcceptsDialog.vue 21KB

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