AcceptsDialog.vue 25KB

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