acceptsTreatmentDialog.vue 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  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. accepts.consciousness = 1
  449. accepts.appetite =1
  450. }
  451. this.accepts = accepts;
  452. console.log("accepts", accepts);
  453. var arr = [];
  454. if (this.accepts.precaution) {
  455. var precaution = this.accepts.precaution.split(",");
  456. for (let i = 0; i < precaution.length; i++) {
  457. for (let j = 0; j < this.precaution_arr.length; j++) {
  458. if (parseInt(precaution[i]) == this.precaution_arr[j].id) {
  459. this.arr.push(this.precaution_arr[j].name);
  460. }
  461. }
  462. }
  463. this.precautionTwo = this.arr;
  464. }
  465. this.getPermission();
  466. for (var index in this.receiveTreatmentAsses) {
  467. if (
  468. index == "condition" ||
  469. index == "danger_level" ||
  470. index == "psychological_assessment"
  471. ) {
  472. this.receiveTreatmentAsses[index] =
  473. this.receiver_treatment_access[index] + "";
  474. } else {
  475. this.receiveTreatmentAsses[index] =
  476. this.receiver_treatment_access[index];
  477. }
  478. }
  479. this.isVisibility = true;
  480. },
  481. hide() {
  482. this.isVisibility = false;
  483. },
  484. handleCancle: function () {
  485. this.isVisibility = false;
  486. },
  487. // 复选框跌倒风险措施
  488. precautionchange(){
  489. if(this.precautionTwo.length>0){
  490. this.$refs.receiveTreatmentAsses.clearValidate('precautionTwo');
  491. }
  492. },
  493. handleComfirm: function (formName) {
  494. // var arr = [];
  495. for (let i = 0; i < this.precaution_arr.length; i++) {
  496. for (let j = 0; j < this.precautionTwo.length; j++) {
  497. if (this.precaution_arr[i].name == this.precautionTwo[j]) {
  498. this.arr.push(this.precaution_arr[i].id);
  499. }
  500. }
  501. }
  502. // this.precautionchange()
  503. var obj = this.arr.join(",");
  504. this.receiveTreatmentAsses.precaution = obj;
  505. let ParamsQuery = this.receiveTreatmentAsses;
  506. console.log("ParamsQuery", ParamsQuery);
  507. ParamsQuery["patient"] = this.patient.id;
  508. ParamsQuery["record_date"] = this.record_date;
  509. //console.log(this.receiver_treatment_access);
  510. ParamsQuery["mode"] = "1";
  511. if (this.receiver_treatment_access.id > 0) {
  512. ParamsQuery["mode"] = "2";
  513. if (
  514. this.$store.getters.xt_user.user.id !=
  515. this.receiver_treatment_access.creater
  516. ) {
  517. ParamsQuery["mode"] = "3";
  518. }
  519. }
  520. console.log("数据", ParamsQuery);
  521. this.$refs[formName].validate((valid) => {
  522. if (valid) {
  523. postAccepts(ParamsQuery).then((response) => {
  524. if (response.data.state == 0) {
  525. this.$message.error(response.data.msg);
  526. if(response.data.code == 600000008){
  527. this.infoDialogVisible = true
  528. }
  529. return false;
  530. } else {
  531. this.$notify({
  532. title: "成功",
  533. message: "提交成功",
  534. type: "success",
  535. duration: 2000,
  536. });
  537. let receive_treatment_asses_resp =
  538. response.data.data.receiveTreatmentAsses;
  539. //pror
  540. var receiver_treatment_access = this.receiver_treatment_access;
  541. for (var index in receive_treatment_asses_resp) {
  542. // receiver_treatment_access[index] = receive_treatment_asses_resp[index];
  543. this.$set(
  544. receiver_treatment_access,
  545. index,
  546. receive_treatment_asses_resp[index]
  547. );
  548. }
  549. this.hide();
  550. }
  551. });
  552. } else {
  553. console.log("error submit!!");
  554. return false;
  555. }
  556. });
  557. },
  558. isName(name) {
  559. let filedList = store.getters.xt_user.fileds;
  560. for (let i = 0; i < filedList.length; i++) {
  561. if (filedList[i].module == 2 && filedList[i].filed_name_cn == name) {
  562. return filedList[i].filed_name;
  563. }
  564. }
  565. },
  566. isCheckmust(name) {
  567. let filedList = store.getters.xt_user.fileds;
  568. for (let i = 0; i < filedList.length; i++) {
  569. if (
  570. filedList[i].module == 2 &&
  571. filedList[i].filed_name_cn == name &&
  572. filedList[i].is_write == 1
  573. ) {
  574. // name == '跌倒风险预防措施' && this.precautionTwo.length<=0
  575. if (name == "风险程度"||name == "病人情况"||name == '心理评估') {
  576. return [
  577. { required: true, message: `请输入${name}`,trigger: ['blur','change'] },
  578. // {
  579. // required: true,
  580. // pattern: /^[1-9]\d*$/,
  581. // message: `请输入${name}`,
  582. // trigger: ['blur','change']
  583. // },
  584. ];
  585. }
  586. else if(name == "跌倒风险预防措施"){
  587. if(this.precautionTwo.length<=0){
  588. this.isrequired=false
  589. return [{ required: true, message: `请输入${name}`,trigger: ['blur','change'] }];
  590. }
  591. this.precautionchange()
  592. this.isrequired=true
  593. // return [{ required: true, message: '',trigger: ['blur','change'] }];
  594. }else{
  595. return [{ required: true, message: `请输入${name}`,trigger: ['blur','change'] }];
  596. }
  597. }
  598. }
  599. },
  600. // isFalldown(name){
  601. // let filedList = store.getters.xt_user.fileds;
  602. // for (let i = 0; i < filedList.length; i++) {
  603. // if (
  604. // filedList[i].module == 2 &&
  605. // filedList[i].filed_name_cn == name &&
  606. // filedList[i].is_write == 1
  607. // ) {
  608. // if (name == "跌倒风险预防措施" && this.precautionTwo.length<=0) {
  609. // return [
  610. // { required: true, message: `请选择${name}`,trigger: ['blur','change'] },
  611. // {
  612. // required: true,
  613. // pattern: /^[1-9]\d*$/,
  614. // message: `请选择${name}`,
  615. // trigger: ['blur','change']
  616. // },
  617. // ];
  618. // }
  619. // }
  620. // }
  621. // },
  622. getPermission() {
  623. request
  624. .get("/api/func_per/get", {
  625. params: {
  626. create_url: "/api/dialysis/accepts?mode=1",
  627. modify_url: "/api/dialysis/accepts?mode=2",
  628. modify_other_url: "/api/dialysis/accepts?mode=3",
  629. module: 2,
  630. },
  631. })
  632. .then((res) => {
  633. // console.log(res);
  634. //console.log("接诊", this.accepts);
  635. if (res.data.state == 0) {
  636. this.hasPermission = false;
  637. } else if (res.data.state == 1) {
  638. if (this.accepts.id != "" && this.accepts.creater != 0) {
  639. //有数据
  640. if (this.accepts.creater == this.$store.getters.xt_user.user.id) {
  641. //创建人是自己
  642. if (res.data.data.is_has_modify == false) {
  643. this.hasPermission = false;
  644. this.showTxt = "你没有修改接诊评估权限";
  645. }
  646. } else {
  647. //创建人不是自己
  648. if (res.data.data.is_has_modify_other == false) {
  649. this.hasPermission = false;
  650. this.showTxt = "你没有修改他人接诊评估权限";
  651. }
  652. }
  653. } else if (this.accepts.id == "" || this.accepts.creater == 0) {
  654. if (res.data.data.is_has_create == false) {
  655. this.hasPermission = false;
  656. this.showTxt = "你没有新增接诊评估权限";
  657. }
  658. }
  659. }
  660. });
  661. },
  662. saveInformation(){
  663. var params = {
  664. selected_date:this.selected_date,
  665. patient_id:this.$route.query.patient_id,
  666. record_date:this.$route.query.date,
  667. module:2,
  668. remark:this.remark,
  669. }
  670. saveInformation(params).then(response=>{
  671. if(response.data.state == 1){
  672. var information = response.data.data.information
  673. this.$message.success("提交成功!")
  674. this.infoDialogVisible = false
  675. }
  676. })
  677. }
  678. },
  679. props: {
  680. receiver_treatment_access: {
  681. // 双人核对
  682. type: Object,
  683. default: () => {
  684. return { id: 0 };
  685. },
  686. },
  687. patient: {
  688. // 患者信息
  689. type: Object,
  690. default: () => {
  691. return { id: 0 };
  692. },
  693. },
  694. },
  695. watch: {
  696. isVisibility(val) {},
  697. "receiver_treatment_access.id": function () {
  698. if (this.receiver_treatment_access.id > 0) {
  699. for (var index in this.receiveTreatmentAsses) {
  700. this.receiveTreatmentAsses[index] =
  701. this.receiver_treatment_access[index];
  702. }
  703. }
  704. },
  705. },
  706. created() {
  707. // console.log("接诊评估", this.receiver_treatment_access);
  708. var date = this.$route.query && this.$route.query.date;
  709. this.record_date = date
  710. ? uParseTime(date, "{y}-{m}-{d}")
  711. : parseTime(new Date(), "{y}-{m}-{d}");
  712. console.log("this.record_date", this.record_date);
  713. this.way_arr = getDataConfig("hemodialysis", "way");
  714. this.consciousness_arr = getDataConfig("hemodialysis", "consciousness");
  715. this.appetite_arr = getDataConfig("hemodialysis", "appetite");
  716. this.posture_arr = getDataConfig("hemodialysis", "posture");
  717. this.sick_condition_arr = getDataConfig("hemodialysis", "sick_condition");
  718. this.precaution_arr = getDataConfig("hemodialysis", "precaution");
  719. // console.log("风险", this.precaution_arr);
  720. this.intake_arr = getDataConfig("hemodialysis", "intake");
  721. this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
  722. },
  723. };
  724. </script>
  725. <style scoped>
  726. .warnTxt {
  727. text-align: center;
  728. margin: 0 auto;
  729. background: #faa331;
  730. max-width: 240px;
  731. padding: 10px 20px;
  732. border-radius: 4px;
  733. margin-bottom: 10px;
  734. color: #fff;
  735. }
  736. </style>
  737. <style lang="scss">
  738. .newDialog {
  739. .el-dialog__body {
  740. padding: 10px 20px 30px;
  741. }
  742. }
  743. </style>