Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

acceptsTreatmentDialog.vue 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  1. <template>
  2. <div>
  3. <div>
  4. <el-dialog
  5. title="接诊评估"
  6. class="newDialog"
  7. :modal = 'false'
  8. :modal-append-to-body="false"
  9. :close-on-click-modal="false"
  10. :visible.sync="isVisibility"
  11. width="854px"
  12. >
  13. <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
  14. <el-form
  15. :model="receiveTreatmentAsses"
  16. ref="receiveTreatmentAsses"
  17. label-width="86px"
  18. >
  19. <el-form-item
  20. label="入室方式 : "
  21. :prop="isName('入室方式')"
  22. :rules="isCheckmust('入室方式')"
  23. v-if="isShow('入室方式')"
  24. >
  25. <el-radio-group v-model="receiveTreatmentAsses.way">
  26. <el-radio
  27. v-for="(item, index) in way_arr"
  28. :key="index"
  29. :label="item.id"
  30. >{{ item.name }}
  31. </el-radio>
  32. </el-radio-group>
  33. </el-form-item>
  34. <el-form-item
  35. label="病人意识 : "
  36. v-if="isShow('病人意识')"
  37. :prop="isName('病人意识')"
  38. :rules="isCheckmust('病人意识')"
  39. >
  40. <el-radio-group v-model="receiveTreatmentAsses.consciousness">
  41. <el-radio
  42. v-for="(item, index) in consciousness_arr"
  43. :key="index"
  44. :label="item.id"
  45. >{{ item.name }}
  46. </el-radio>
  47. </el-radio-group>
  48. <!--<el-radio v-model="receiveTreatmentAsses.consciousness" label="1">清醒</el-radio>-->
  49. <!--<el-radio v-model="receiveTreatmentAsses.consciousness" label="2">嗜睡</el-radio>-->
  50. <!--<el-radio v-model="receiveTreatmentAsses.consciousness" label="3">昏迷</el-radio>-->
  51. <!--<el-radio v-model="receiveTreatmentAsses.consciousness" label="4">模糊</el-radio>-->
  52. </el-form-item>
  53. <el-form-item
  54. label="病人食欲 : "
  55. :prop="isName('病人食欲')"
  56. :rules="isCheckmust('病人食欲')"
  57. v-if="isShow('病人食欲')"
  58. >
  59. <el-radio-group v-model="receiveTreatmentAsses.appetite">
  60. <el-radio
  61. v-for="(item, index) in appetite_arr"
  62. :key="index"
  63. :label="item.id"
  64. >{{ item.name }}
  65. </el-radio>
  66. </el-radio-group>
  67. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="1">正常</el-radio>-->
  68. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="2">减退</el-radio>-->
  69. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="3">恶心</el-radio>-->
  70. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="4">呕吐</el-radio>-->
  71. <!--<el-radio v-model="receiveTreatmentAsses.appetite" label="5">腹泻</el-radio>-->
  72. </el-form-item>
  73. <el-form-item
  74. label="病人情况 : "
  75. prop="condition"
  76. :rules="isCheckmust('病人情况')"
  77. v-if="isShow('病人情况')"
  78. >
  79. <el-radio-group v-model="receiveTreatmentAsses.condition">
  80. <el-radio label="1"
  81. >住院</el-radio
  82. >
  83. <el-radio label="2"
  84. >门诊</el-radio
  85. >
  86. <el-radio label="3"
  87. >手术期</el-radio
  88. >
  89. <el-radio label="4"
  90. >急诊</el-radio
  91. >
  92. </el-radio-group>
  93. </el-form-item>
  94. <el-form-item
  95. label="住院号 : "
  96. :prop="isName('住院号')"
  97. :rules="isCheckmust('住院号')"
  98. v-if="this.receiveTreatmentAsses.condition == '1'"
  99. >
  100. <el-input v-model="receiveTreatmentAsses.admission_number"></el-input>
  101. </el-form-item>
  102. <el-form-item
  103. label="住院科室 : "
  104. :prop="isName('住院科室')"
  105. :rules="isCheckmust('住院科室')"
  106. v-if="isShow('住院科室') && this.receiveTreatmentAsses.condition == '1'"
  107. >
  108. <el-input v-model="receiveTreatmentAsses.his_department"></el-input>
  109. </el-form-item>
  110. <el-form-item
  111. label="住院床位 : "
  112. :prop="isName('住院床位')"
  113. :rules="isCheckmust('住院床位')"
  114. v-if="isShow('住院床位') && this.receiveTreatmentAsses.condition == '1'"
  115. >
  116. <el-input v-model="receiveTreatmentAsses.his_bed"></el-input>
  117. </el-form-item>
  118. <el-form-item
  119. label="诊断:"
  120. :prop="isName('诊断')"
  121. :rules="isCheckmust('诊断')"
  122. v-if="isShow('诊断') && this.receiveTreatmentAsses.condition == '1'"
  123. >
  124. <el-input v-model="receiveTreatmentAsses.diacrisis"></el-input>
  125. </el-form-item>
  126. <el-form-item
  127. label="体位 : "
  128. :prop="isName('体位')"
  129. :rules="isCheckmust('体位')"
  130. v-if="isShow('体位')"
  131. >
  132. <el-radio-group v-model="receiveTreatmentAsses.posture">
  133. <el-radio
  134. v-for="(item, index) in posture_arr"
  135. :key="index"
  136. :label="item.id"
  137. >{{ item.name }}
  138. </el-radio>
  139. </el-radio-group>
  140. </el-form-item>
  141. <el-form-item
  142. label="病情: "
  143. :prop="isName('病情')"
  144. :rules="isCheckmust('病情')"
  145. v-if="isShow('病情')"
  146. >
  147. <el-radio-group v-model="receiveTreatmentAsses.sick_condition">
  148. <el-radio
  149. v-for="(item, index) in sick_condition_arr"
  150. :key="index"
  151. :label="item.id"
  152. >{{ item.name }}
  153. </el-radio>
  154. </el-radio-group>
  155. <!--<el-radio v-model="receiveTreatmentAsses.sick_condition" label="1">一般</el-radio>-->
  156. <!--<el-radio v-model="receiveTreatmentAsses.sick_condition" label="2">严重</el-radio>-->
  157. <!--<el-radio v-model="receiveTreatmentAsses.sick_condition" label="3">危</el-radio>-->
  158. </el-form-item>
  159. <el-form-item
  160. label-width="100px"
  161. label="其他病情 : "
  162. :prop="isName('其他病情')"
  163. :rules="isCheckmust('其他病情')"
  164. v-if="isShow('其他病情')"
  165. >
  166. <el-input
  167. v-model="receiveTreatmentAsses.sick_condition_other"
  168. ></el-input>
  169. </el-form-item>
  170. <el-form-item
  171. label-width="150px"
  172. label="跌倒风险评估评分 : "
  173. :prop="isName('跌倒风险评估评分')"
  174. :rules="isCheckmust('跌倒风险评估评分')"
  175. v-if="isShow('跌倒风险评估评分')"
  176. >
  177. <el-input
  178. v-model="receiveTreatmentAsses.score"
  179. style="width: 100px"
  180. ></el-input>
  181. </el-form-item>
  182. <el-form-item
  183. label="风险程度: "
  184. :prop="isName('风险程度')"
  185. :rules="isCheckmust('风险程度')"
  186. v-if="isShow('风险程度')"
  187. >
  188. <el-radio-group v-model="receiveTreatmentAsses.danger_level">
  189. <el-radio label="1"
  190. >无</el-radio
  191. >
  192. <el-radio label="2"
  193. >低风险</el-radio
  194. >
  195. <el-radio label="3"
  196. >中度风险</el-radio
  197. >
  198. <el-radio label="4"
  199. >高风险</el-radio
  200. >
  201. </el-radio-group>
  202. </el-form-item>
  203. <div style="position: relative;">
  204. <span v-if="isrequired" style="color: red;position: absolute;top: 10px;">*</span>
  205. <el-form-item
  206. label-width="138px"
  207. label="跌倒风险预防措施: "
  208. prop="precautionTwo"
  209. :rules="isCheckmust('跌倒风险预防措施')"
  210. v-if="isShow('跌倒风险预防措施')"
  211. style="display: inline-block;"
  212. >
  213. <!--v-if="isShow('跌倒风险预防措施')" isFalldown prop="precautionTwo" @change="precautionchange" isCheckmust('跌倒风险预防措施')
  214. :prop="isName('跌倒风险预防措施')" :rules="isCheckmust('跌倒风险预防措施')"
  215. [{required: true, message: '请选择跌倒风险预防措施', trigger: 'change'}]-->
  216. <el-checkbox-group v-model="precautionTwo" @change="precautionchange" >
  217. <el-checkbox
  218. v-for="item in precaution_arr"
  219. :label="item.name"
  220. :key="item.id"
  221. >{{ item.name }}</el-checkbox
  222. >
  223. </el-checkbox-group>
  224. </el-form-item>
  225. </div>
  226. <el-form-item
  227. label-width="200px"
  228. label="其他跌倒风险预防措施 : "
  229. :prop="isName('其他跌倒风险预防措施')"
  230. :rules="isCheckmust('其他跌倒风险预防措施')"
  231. v-if="isShow('其他跌倒风险预防措施')"
  232. >
  233. <el-input v-model="receiveTreatmentAsses.precaution_other"></el-input>
  234. </el-form-item>
  235. <el-form-item
  236. label="摄入量: "
  237. :prop="isName('摄入量')"
  238. :rules="isCheckmust('摄入量')"
  239. v-if="isShow('摄入量')"
  240. >
  241. <!--<el-radio v-model="receiveTreatmentAsses.intake" label="1">正常</el-radio>-->
  242. <!--<el-radio v-model="receiveTreatmentAsses.intake" label="2">减少</el-radio>-->
  243. <el-radio-group v-model="receiveTreatmentAsses.intake">
  244. <el-radio
  245. v-for="(item, index) in intake_arr"
  246. :key="index"
  247. :label="item.id"
  248. >{{ item.name }}
  249. </el-radio>
  250. </el-radio-group>
  251. </el-form-item>
  252. <el-form-item
  253. label="营养状况: "
  254. :prop="isName('营养状况')"
  255. :rules="isCheckmust('营养状况')"
  256. v-if="isShow('营养状况')"
  257. >
  258. <!--<el-radio v-model="receiveTreatmentAsses.nutrition" label="1">正常</el-radio>-->
  259. <!--<el-radio v-model="receiveTreatmentAsses.nutrition" label="2">营养不良</el-radio>-->
  260. <el-radio-group v-model="receiveTreatmentAsses.nutrition">
  261. <el-radio
  262. v-for="(item, index) in nutrition_arr"
  263. :key="index"
  264. :label="item.id"
  265. >{{ item.name }}
  266. </el-radio>
  267. </el-radio-group>
  268. </el-form-item>
  269. <el-form-item
  270. label="心理评估: "
  271. :prop="isName('心理评估')"
  272. :rules="isCheckmust('心理评估')"
  273. v-if="isShow('心理评估')"
  274. >
  275. <el-radio-group v-model="receiveTreatmentAsses.psychological_assessment">
  276. <el-radio
  277. label="1"
  278. >正常</el-radio
  279. >
  280. <el-radio
  281. label="2"
  282. >异常</el-radio
  283. >
  284. </el-radio-group>
  285. </el-form-item>
  286. <el-form-item
  287. label-width="150px"
  288. label="心理评估异常情况 : "
  289. :prop="isName('心理评估异常情况')"
  290. :rules="isCheckmust('心理评估异常情况')"
  291. v-if="
  292. isShow('心理评估异常情况') &&
  293. receiveTreatmentAsses.psychological_assessment == 2
  294. "
  295. >
  296. <el-input
  297. v-model="receiveTreatmentAsses.psychological_assessment_other"
  298. ></el-input>
  299. </el-form-item>
  300. <el-form-item
  301. label-width="150px"
  302. label="其他心理评估 : "
  303. :prop="isName('其他心理评估')"
  304. :rules="isCheckmust('其他心理评估')"
  305. v-if="isShow('其他心理评估')"
  306. >
  307. <el-input
  308. v-model="receiveTreatmentAsses.psychological_other"
  309. ></el-input>
  310. </el-form-item>
  311. <el-form-item
  312. label="是否跌倒: "
  313. :prop="isName('是否跌倒')"
  314. :rules="isCheckmust('是否跌倒')"
  315. v-if="isShow('是否跌倒')"
  316. >
  317. <el-radio-group v-model="receiveTreatmentAsses.tumble">
  318. <el-radio label="1">是</el-radio>
  319. <el-radio label="2">否</el-radio>
  320. </el-radio-group>
  321. </el-form-item>
  322. </el-form>
  323. <div slot="footer" class="dialog-footer">
  324. <el-button @click="handleCancle">取 消</el-button>
  325. <!-- v-if="hasPermission"-->
  326. <el-button type="primary" @click="handleComfirm('receiveTreatmentAsses')"
  327. >保 存</el-button
  328. >
  329. </div>
  330. </el-dialog>
  331. <el-dialog
  332. title="提示"
  333. :visible.sync="infoDialogVisible"
  334. width="30%">
  335. <span>
  336. <el-form>
  337. <el-row>
  338. <span>申请日期:</span>
  339. <span>
  340. <el-date-picker
  341. type="datetime"
  342. format="yyyy-MM-dd HH:mm"
  343. value-format="yyyy-MM-dd HH:mm"
  344. placeholder="选择时间"
  345. v-model="selected_date"
  346. ></el-date-picker>
  347. </span>
  348. </el-row>
  349. <el-row>
  350. <span>备注:</span>
  351. <span>
  352. <el-input v-model="remark" style="width:200px"></el-input>
  353. </span>
  354. </el-row>
  355. </el-form>
  356. </span>
  357. <span slot="footer" class="dialog-footer">
  358. <el-button @click="infoDialogVisible = false">取 消</el-button>
  359. <el-button type="primary" @click="saveInformation">确 定</el-button>
  360. </span>
  361. </el-dialog>
  362. </div>
  363. </div>
  364. </template>
  365. <script>
  366. import { postAccepts,saveInformation } from "@/api/dialysis";
  367. import { uParseTime } from "@/utils/tools";
  368. import store from "@/store";
  369. import { getDataConfig } from "@/utils/data";
  370. import { parseTime } from "@/utils";
  371. import request from "@/utils/request";
  372. export default {
  373. name: "acceptsTreatmentDialog",
  374. data() {
  375. return {
  376. isrequired:false,
  377. showTxt: "",
  378. hasPermission: true,
  379. isVisibility: false,
  380. record_date: "",
  381. way_arr: [],
  382. consciousness_arr: [],
  383. appetite_arr: [],
  384. posture_arr: [],
  385. sick_condition_arr: [],
  386. precaution_arr: [],
  387. intake_arr: [],
  388. nutrition_arr: [],
  389. receiveTreatmentAsses: {
  390. way: "1",
  391. consciousness: "1",
  392. appetite: "1",
  393. condition: "1",
  394. posture: "1",
  395. sick_condition: "1",
  396. danger_level: "1",
  397. intake: "1",
  398. nutrition: "1",
  399. psychological_assessment: "1",
  400. psychological_assessment_other: "",
  401. sick_condition_other: "",
  402. score: "",
  403. psychological_other: "",
  404. precaution: "",
  405. precaution_other: "",
  406. admission_number: "",
  407. diacrisis: "",
  408. tumble: "",
  409. his_department: "",
  410. his_bed: "",
  411. falldown:[],
  412. },
  413. precautionTwo: [],
  414. arr:[],
  415. infoDialogVisible:false,
  416. selected_date:"",
  417. remark:""
  418. };
  419. },
  420. methods: {
  421. isShow(name) {
  422. var filedList = store.getters.xt_user.fileds;
  423. for (let i = 0; i < filedList.length; i++) {
  424. if (
  425. filedList[i].module == 2 &&
  426. filedList[i].filed_name_cn == name &&
  427. filedList[i].is_show == 1
  428. ) {
  429. return true;
  430. }
  431. }
  432. return false;
  433. },
  434. show(accepts) {
  435. console.log("accepts333333", accepts);
  436. console.log("入库时方式",this.way_arr)
  437. console.log("体委",this.posture_arr)
  438. if (accepts.id > 0) {
  439. accepts.tumble = accepts.tumble.toString();
  440. }else{
  441. console.log("hh2h3h2h3h32h23h23h32h23h")
  442. // this.receiveTreatmentAsses.way = "1"
  443. // this.receiveTreatmentAsses.posture ="1"
  444. // this.receiveTreatmentAsses.condition = "2"
  445. accepts.way =1
  446. accepts.posture=1
  447. accepts.condition =2
  448. }
  449. this.accepts = accepts;
  450. console.log("accepts", accepts);
  451. var arr = [];
  452. if (this.accepts.precaution) {
  453. var precaution = this.accepts.precaution.split(",");
  454. for (let i = 0; i < precaution.length; i++) {
  455. for (let j = 0; j < this.precaution_arr.length; j++) {
  456. if (parseInt(precaution[i]) == this.precaution_arr[j].id) {
  457. this.arr.push(this.precaution_arr[j].name);
  458. }
  459. }
  460. }
  461. this.precautionTwo = this.arr;
  462. }
  463. this.getPermission();
  464. for (var index in this.receiveTreatmentAsses) {
  465. if (
  466. index == "condition" ||
  467. index == "danger_level" ||
  468. index == "psychological_assessment"
  469. ) {
  470. this.receiveTreatmentAsses[index] =
  471. this.receiver_treatment_access[index] + "";
  472. } else {
  473. this.receiveTreatmentAsses[index] =
  474. this.receiver_treatment_access[index];
  475. }
  476. }
  477. this.isVisibility = true;
  478. },
  479. hide() {
  480. this.isVisibility = false;
  481. },
  482. handleCancle: function () {
  483. this.isVisibility = false;
  484. },
  485. // 复选框跌倒风险措施
  486. precautionchange(){
  487. if(this.precautionTwo.length>0){
  488. this.$refs.receiveTreatmentAsses.clearValidate('precautionTwo');
  489. }
  490. },
  491. handleComfirm: function (formName) {
  492. // var arr = [];
  493. for (let i = 0; i < this.precaution_arr.length; i++) {
  494. for (let j = 0; j < this.precautionTwo.length; j++) {
  495. if (this.precaution_arr[i].name == this.precautionTwo[j]) {
  496. this.arr.push(this.precaution_arr[i].id);
  497. }
  498. }
  499. }
  500. // this.precautionchange()
  501. var obj = this.arr.join(",");
  502. this.receiveTreatmentAsses.precaution = obj;
  503. let ParamsQuery = this.receiveTreatmentAsses;
  504. console.log("ParamsQuery", ParamsQuery);
  505. ParamsQuery["patient"] = this.patient.id;
  506. ParamsQuery["record_date"] = this.record_date;
  507. //console.log(this.receiver_treatment_access);
  508. ParamsQuery["mode"] = "1";
  509. if (this.receiver_treatment_access.id > 0) {
  510. ParamsQuery["mode"] = "2";
  511. if (
  512. this.$store.getters.xt_user.user.id !=
  513. this.receiver_treatment_access.creater
  514. ) {
  515. ParamsQuery["mode"] = "3";
  516. }
  517. }
  518. console.log("数据", ParamsQuery);
  519. this.$refs[formName].validate((valid) => {
  520. if (valid) {
  521. postAccepts(ParamsQuery).then((response) => {
  522. if (response.data.state == 0) {
  523. this.$message.error(response.data.msg);
  524. if(response.data.code == 600000008){
  525. this.infoDialogVisible = true
  526. }
  527. return false;
  528. } else {
  529. this.$notify({
  530. title: "成功",
  531. message: "提交成功",
  532. type: "success",
  533. duration: 2000,
  534. });
  535. let receive_treatment_asses_resp =
  536. response.data.data.receiveTreatmentAsses;
  537. //pror
  538. var receiver_treatment_access = this.receiver_treatment_access;
  539. for (var index in receive_treatment_asses_resp) {
  540. // receiver_treatment_access[index] = receive_treatment_asses_resp[index];
  541. this.$set(
  542. receiver_treatment_access,
  543. index,
  544. receive_treatment_asses_resp[index]
  545. );
  546. }
  547. this.hide();
  548. }
  549. });
  550. } else {
  551. console.log("error submit!!");
  552. return false;
  553. }
  554. });
  555. },
  556. isName(name) {
  557. let filedList = store.getters.xt_user.fileds;
  558. for (let i = 0; i < filedList.length; i++) {
  559. if (filedList[i].module == 2 && filedList[i].filed_name_cn == name) {
  560. return filedList[i].filed_name;
  561. }
  562. }
  563. },
  564. isCheckmust(name) {
  565. let filedList = store.getters.xt_user.fileds;
  566. for (let i = 0; i < filedList.length; i++) {
  567. if (
  568. filedList[i].module == 2 &&
  569. filedList[i].filed_name_cn == name &&
  570. filedList[i].is_write == 1
  571. ) {
  572. // name == '跌倒风险预防措施' && this.precautionTwo.length<=0
  573. if (name == "风险程度"||name == "病人情况"||name == '心理评估') {
  574. return [
  575. { required: true, message: `请输入${name}`,trigger: ['blur','change'] },
  576. // {
  577. // required: true,
  578. // pattern: /^[1-9]\d*$/,
  579. // message: `请输入${name}`,
  580. // trigger: ['blur','change']
  581. // },
  582. ];
  583. }
  584. else if(name == "跌倒风险预防措施"){
  585. if(this.precautionTwo.length<=0){
  586. this.isrequired=false
  587. return [{ required: true, message: `请输入${name}`,trigger: ['blur','change'] }];
  588. }
  589. this.precautionchange()
  590. this.isrequired=true
  591. // return [{ required: true, message: '',trigger: ['blur','change'] }];
  592. }else{
  593. return [{ required: true, message: `请输入${name}`,trigger: ['blur','change'] }];
  594. }
  595. }
  596. }
  597. },
  598. // isFalldown(name){
  599. // let filedList = store.getters.xt_user.fileds;
  600. // for (let i = 0; i < filedList.length; i++) {
  601. // if (
  602. // filedList[i].module == 2 &&
  603. // filedList[i].filed_name_cn == name &&
  604. // filedList[i].is_write == 1
  605. // ) {
  606. // if (name == "跌倒风险预防措施" && this.precautionTwo.length<=0) {
  607. // return [
  608. // { required: true, message: `请选择${name}`,trigger: ['blur','change'] },
  609. // {
  610. // required: true,
  611. // pattern: /^[1-9]\d*$/,
  612. // message: `请选择${name}`,
  613. // trigger: ['blur','change']
  614. // },
  615. // ];
  616. // }
  617. // }
  618. // }
  619. // },
  620. getPermission() {
  621. request
  622. .get("/api/func_per/get", {
  623. params: {
  624. create_url: "/api/dialysis/accepts?mode=1",
  625. modify_url: "/api/dialysis/accepts?mode=2",
  626. modify_other_url: "/api/dialysis/accepts?mode=3",
  627. module: 2,
  628. },
  629. })
  630. .then((res) => {
  631. // console.log(res);
  632. //console.log("接诊", this.accepts);
  633. if (res.data.state == 0) {
  634. this.hasPermission = false;
  635. } else if (res.data.state == 1) {
  636. if (this.accepts.id != "" && this.accepts.creater != 0) {
  637. //有数据
  638. if (this.accepts.creater == this.$store.getters.xt_user.user.id) {
  639. //创建人是自己
  640. if (res.data.data.is_has_modify == false) {
  641. this.hasPermission = false;
  642. this.showTxt = "你没有修改接诊评估权限";
  643. }
  644. } else {
  645. //创建人不是自己
  646. if (res.data.data.is_has_modify_other == false) {
  647. this.hasPermission = false;
  648. this.showTxt = "你没有修改他人接诊评估权限";
  649. }
  650. }
  651. } else if (this.accepts.id == "" || this.accepts.creater == 0) {
  652. if (res.data.data.is_has_create == false) {
  653. this.hasPermission = false;
  654. this.showTxt = "你没有新增接诊评估权限";
  655. }
  656. }
  657. }
  658. });
  659. },
  660. saveInformation(){
  661. var params = {
  662. selected_date:this.selected_date,
  663. patient_id:this.$route.query.patient_id,
  664. record_date:this.$route.query.date,
  665. module:2,
  666. remark:this.remark,
  667. }
  668. saveInformation(params).then(response=>{
  669. if(response.data.state == 1){
  670. var information = response.data.data.information
  671. this.$message.success("提交成功!")
  672. this.infoDialogVisible = false
  673. }
  674. })
  675. }
  676. },
  677. props: {
  678. receiver_treatment_access: {
  679. // 双人核对
  680. type: Object,
  681. default: () => {
  682. return { id: 0 };
  683. },
  684. },
  685. patient: {
  686. // 患者信息
  687. type: Object,
  688. default: () => {
  689. return { id: 0 };
  690. },
  691. },
  692. },
  693. watch: {
  694. isVisibility(val) {},
  695. "receiver_treatment_access.id": function () {
  696. if (this.receiver_treatment_access.id > 0) {
  697. for (var index in this.receiveTreatmentAsses) {
  698. this.receiveTreatmentAsses[index] =
  699. this.receiver_treatment_access[index];
  700. }
  701. }
  702. },
  703. },
  704. created() {
  705. // console.log("接诊评估", this.receiver_treatment_access);
  706. var date = this.$route.query && this.$route.query.date;
  707. this.record_date = date
  708. ? uParseTime(date, "{y}-{m}-{d}")
  709. : parseTime(new Date(), "{y}-{m}-{d}");
  710. console.log("this.record_date", this.record_date);
  711. this.way_arr = getDataConfig("hemodialysis", "way");
  712. this.consciousness_arr = getDataConfig("hemodialysis", "consciousness");
  713. this.appetite_arr = getDataConfig("hemodialysis", "appetite");
  714. this.posture_arr = getDataConfig("hemodialysis", "posture");
  715. this.sick_condition_arr = getDataConfig("hemodialysis", "sick_condition");
  716. this.precaution_arr = getDataConfig("hemodialysis", "precaution");
  717. // console.log("风险", this.precaution_arr);
  718. this.intake_arr = getDataConfig("hemodialysis", "intake");
  719. this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
  720. },
  721. };
  722. </script>
  723. <style scoped>
  724. .warnTxt {
  725. text-align: center;
  726. margin: 0 auto;
  727. background: #faa331;
  728. max-width: 240px;
  729. padding: 10px 20px;
  730. border-radius: 4px;
  731. margin-bottom: 10px;
  732. color: #fff;
  733. }
  734. </style>
  735. <style lang="scss">
  736. .newDialog {
  737. .el-dialog__body {
  738. padding: 10px 20px 30px;
  739. }
  740. }
  741. </style>