patientInformationInfo.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112
  1. <template>
  2. <view class="patientInformationInfo" v-if="Object.keys(infoDATA).length > 0">
  3. <view class="page_head">
  4. <view class="title">{{ infoDATA.patientName }}<text class="patientCode">{{ infoDATA.residenceNo }}({{ infoDATA.bedNum }})</text></view>
  5. </view>
  6. <view class="page_tab">
  7. <view class="page_tab_bar" :class="{ active: item.label === selectedLabelSlots }" v-for="item in tabs"
  8. :key="item.value" @click.prevent="clickHandler(item.label)">
  9. {{ item.label }}
  10. </view>
  11. </view>
  12. <view v-if="selectedLabelSlots=='患者信息'" class="box1">
  13. <view class="item">
  14. <view class="title">护理等级:<text class="value">{{infoDATA.careLevel ? infoDATA.careLevel.name :''}}</text></view>
  15. <view class="title">病情级别:<text class="value">{{infoDATA.illnessState ? infoDATA.illnessState.name :''}}</text></view>
  16. </view>
  17. <view class="item">
  18. <view class="title">患者类型:<text class="value">{{infoDATA.department ? infoDATA.department.dept : ''}} {{infoDATA.bedNum?infoDATA.bedNum:''}} <text v-if="infoDATA.bedNum&&infoDATA.bedNum">床</text></text></view>
  19. </view>
  20. <view class="item">
  21. <view class="title">联系电话:
  22. <uni-icons v-if="infoDATA.patientPhone" type="phone-filled" color="#49b856" size="22" class="icon" @click="makePhoneCall(infoDATA.patientPhone)"></uni-icons><text class="value" @click="makePhoneCall(infoDATA.patientPhone)">{{infoDATA.patientPhone}}</text>
  23. <uni-icons type="compose" color="#49b856" size="22" class="icon" @click="editPhone(infoDATA.patientPhone)"></uni-icons></view>
  24. </view>
  25. <view class="item">
  26. <view class="title">年龄: <text class="value">{{infoDATA.age?infoDATA.age:''}}</text></view>
  27. <view class="title">性别: <text class="value">{{infoDATA.gender ? infoDATA.gender.name : ''}}</text></view>
  28. </view>
  29. <view class="item">
  30. <view class="title">陪检方式: <text class="value">{{infoDATA.tripTypeDTO ? infoDATA.tripTypeDTO.inspectMode : ''}}</text></view>
  31. </view>
  32. <view class="item">
  33. <view class="title">注意事项: <text class="value">{{infoDATA.remark}}</text></view>
  34. </view>
  35. </view>
  36. <view v-if="selectedLabelSlots=='待检查'" class="box2">
  37. <scroll-view v-if="!isEmpty" scroll-y class="scrollContent">
  38. <view class="page_item" v-for="(inspects, key, index) in infoDATA.inspectListMap" :key="key">
  39. <view class="splitLine">
  40. <view class="splitLineFlex">
  41. <view class="splitLineBox"></view>
  42. </view>
  43. <view>{{key}}</view>
  44. <view class="splitLineFlex">
  45. <view class="splitLineBox"></view>
  46. </view>
  47. </view>
  48. <checkbox-group @change="checkboxChange($event, key)">
  49. <view class="page_item_info" :class="{mt0: i === 0}" v-for="(item, i) in inspects" :key="item.id">
  50. <label class="page_item_info_title" style="display: inline-block;width: 100%;">
  51. <checkbox color="#49B856" :value="item.id + ''" :checked="item.checked" />
  52. 检查项目:<text class="bold">{{ item.inspectName }}-{{item.inspectCode}}</text></label>
  53. <view class="page_item_info_title"><text :class="{red: !item.execDept}">检查科室:</text><text>{{ item.execDept ? item.execDept.dept : "" }}<text class="newicon newicon-weibiaoti2010104 fz28" @click="changeExecDept(item)" v-if="item.inspectState.value == 1 || item.inspectState.value == 30"></text></text></view>
  54. <view class="page_item_info_title btn row">
  55. <view><text :class="{red: !item.yyTime}">预约时间:</text><text>{{ item.yyEndTime }}</text><text v-if="item.reservationNumber">({{ item.reservationNumber }})</text><text class="newicon newicon-weibiaoti2010104" @click="changeYyTime(item)" v-if="item.inspectState.value == 1 || item.inspectState.value == 30"></text></view>
  56. </view>
  57. <view class="page_item_info_title row">
  58. <text>医生备注:{{ item.remark }}</text>
  59. </view>
  60. <view class="page_item_info_title row">
  61. <view>是否紧急:<text :class="{red:item.priority===1||item.priority==='1'}">{{ (item.priority===1||item.priority==='1')?'是':'否' }}</text></view>
  62. <view>状态:<text v-if="item.inspectState">{{ item.inspectState.name }}</text></view>
  63. </view>
  64. <view class="buildOrder" @click="build(item)" v-if="!item.gdId&&(item.inspectState.value==1||item.inspectState.value==30)">建单</view>
  65. </view>
  66. </checkbox-group>
  67. </view>
  68. </scroll-view>
  69. <view v-if="isEmpty" class="zwsj">
  70. <image class="zwsj-img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
  71. <view class="zwsj-txt">暂无检查信息</view>
  72. </view>
  73. <view class="page_item_btns">
  74. <view class="page_item_btn" hover-class="seimin-btn-hover" @click="buildOrders()">批量陪检</view>
  75. <view class="toolbar" @click="Scanning()">
  76. <text class="toolbar-icon newicon newicon-saoma"></text>
  77. <text class="toolbar-sao">扫一扫</text>
  78. </view>
  79. </view>
  80. </view>
  81. <view v-if="selectedLabelSlots=='已建单'" class="box3">
  82. <scroll-view v-if="infoDATA.orderedInspectList" scroll-y class="scrollContent">
  83. <view class="page_item">
  84. <view class="page_item_info" :class="{mt0: i === 0}" v-for="(item, i) in infoDATA.orderedInspectList" :key="item.id">
  85. 检查项目:<text class="bold">{{ item.inspectName }}-{{item.inspectCode}}</text></label>
  86. <view class="page_item_info_title"><text :class="{red: !item.execDept}">检查科室:</text><text>{{ item.execDept ? item.execDept.dept : "" }}</text></view>
  87. <view class="page_item_info_title btn row">
  88. <view><text :class="{red: !item.yyTime}">预约时间:</text><text>{{ item.yyEndTime }}</text><text v-if="item.reservationNumber">({{ item.reservationNumber }})</text></view>
  89. </view>
  90. <view class="page_item_info_title btn row">
  91. <text>工单号:{{item.workOrderDTO.gdcode}}</text>
  92. </view>
  93. <view class="page_item_info_title btn row">
  94. <text>工单状态:{{item.workOrderDTO.gdState?item.workOrderDTO.gdState.name:''}}</text>
  95. </view>
  96. <view class="page_item_info_title row">
  97. <text>医生备注:{{ item.remark }}</text>
  98. </view>
  99. <view class="page_item_info_title row">
  100. <view>是否紧急:<text :class="{red:item.priority===1||item.priority==='1'}">{{ (item.priority===1||item.priority==='1')?'是':'否' }}</text></view>
  101. <view>状态:<text v-if="item.inspectState">{{ item.inspectState.name }}</text></view>
  102. </view>
  103. <view class="btn-opt">
  104. <view class="buildOrder" @click="operation(item, 1)" v-if="item.workOrderDTO.gdState.value==2">接单</view>
  105. <view class="buildOrder" @click="operation(item, 2)" v-if="item.workOrderDTO.gdState.value==11">立即执行并接单</view>
  106. </view>
  107. </view>
  108. </view>
  109. </scroll-view>
  110. <view v-else class="zwsj">
  111. <image class="zwsj-img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
  112. <view class="zwsj-txt">暂无检查信息</view>
  113. </view>
  114. <!-- <view class="page_item_btns">
  115. <view class="page_item_btn" hover-class="seimin-btn-hover" @click="buildOrders()">批量陪检</view>
  116. <view class="toolbar" @click="Scanning()">
  117. <text class="toolbar-icon newicon newicon-saoma"></text>
  118. <text class="toolbar-sao">扫一扫</text>
  119. </view>
  120. </view> -->
  121. </view>
  122. <!-- 弹窗 -->
  123. <showModel :checkBoxText="models.checkBoxText" :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  124. @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
  125. <!-- 弹窗 -->
  126. <inspectRemoveModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content" @know="know1" :operate="models1.operate" @ok="ok1" @cancel="cancel1" :yy="currentInspect.yyTime" :currentInspect="currentInspect" :yytimeGapMinute="configObj.yytimeGapMinute"></inspectRemoveModel>
  127. <!-- 弹窗 -->
  128. <inspectExecDeptModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content" @know="know2" :operate="models2.operate" @ok="ok2" @cancel="cancel2" :execDeptList="currentInspect.inspectCheckType && currentInspect.inspectCheckType.deptList" :execDeptId="currentInspect.execDeptId"></inspectExecDeptModel>
  129. <!-- 修改电话 -->
  130. <uni-popup ref="inputDialog" type="dialog">
  131. <uni-popup-dialog ref="inputClose" mode="input" title="请填写电话" :value="phone"
  132. placeholder="请输入联系电话" @confirm="dialogInputConfirm"></uni-popup-dialog>
  133. </uni-popup>
  134. <!-- 接单操作 -->
  135. <uni-popup ref="alertDialog" type="dialog">
  136. <uni-popup-dialog type="info" cancelText="取消" confirmText="确定" title="提示" :content="content" @confirm="dialogConfirm"
  137. @close="dialogClose"></uni-popup-dialog>
  138. </uni-popup>
  139. </view>
  140. </template>
  141. <script>
  142. import {
  143. get,
  144. post,
  145. SM,
  146. webHandle
  147. } from "../../http/http.js";
  148. import dayjs from 'dayjs';
  149. export default {
  150. data() {
  151. return {
  152. tabs:[
  153. {
  154. label: "患者信息", //tab页名称
  155. value: "", //值
  156. },
  157. {
  158. label: "待检查", //tab页名称
  159. value: "2", //值
  160. },
  161. {
  162. label: "已建单", //tab页名称
  163. value: "3", //值
  164. },
  165. ],
  166. selectedLabelSlots: '待检查',
  167. currentInspect: {},
  168. SMFlag: true,
  169. isEmpty: true,
  170. options: {},
  171. infoDATA: {},
  172. // 弹窗model1
  173. models1: {
  174. disjunctor: false,
  175. },
  176. // 弹窗model1
  177. models2: {
  178. disjunctor: false,
  179. },
  180. // 建单的对象
  181. jdItem: [],
  182. // 弹窗model
  183. models: {
  184. disjunctor: false,
  185. },
  186. configObj: null,
  187. hosId: uni.getStorageSync("userData").user.currentHospital.id,
  188. phone: null ,//联系电话
  189. content: null,
  190. optType: null,
  191. itemData: null
  192. };
  193. },
  194. methods: {
  195. // 点击tab页切换
  196. clickHandler(key) {
  197. this.selectedLabelSlots = key;
  198. if (key === "患者信息") {
  199. this.getPatient(0);
  200. } else if (key === "待检查") {
  201. this.getInfo(this.options.patientCode);
  202. } else {
  203. this.getInfo(this.options.patientCode);
  204. }
  205. },
  206. // 拨打电话
  207. makePhoneCall(phone){
  208. uni.makePhoneCall({
  209. phoneNumber: phone
  210. })
  211. },
  212. // 修改电话
  213. editPhone(phone){
  214. this.phone = phone
  215. this.$refs.inputDialog.open()
  216. },
  217. // 确认修改电话
  218. dialogInputConfirm(e){
  219. let data = {
  220. patient: this.infoDATA
  221. }
  222. data.patient.patientPhone = e
  223. uni.showLoading({
  224. title: "加载中",
  225. mask: true,
  226. });
  227. post("/data/addData/patient", data).then((result) => {
  228. if (result.status == 200) {
  229. uni.hideLoading();
  230. uni.showToast({
  231. icon: "none",
  232. mask: true,
  233. title: "修改成功",
  234. });
  235. this.$refs.inputDialog.close()
  236. setTimeout(_=>{
  237. this.getInfo(this.infoDATA.patientCode)
  238. }, 1500)
  239. } else {
  240. uni.hideLoading();
  241. uni.showToast({
  242. icon: "none",
  243. title: result.msg,
  244. });
  245. }
  246. });
  247. },
  248. // 选择楼栋
  249. checkboxChange: function(e, key) {
  250. var dataList = this.infoDATA.inspectListMap[key],
  251. values = e.detail.value;
  252. for (var i = 0, lenI = dataList.length; i < lenI; ++i) {
  253. const item = dataList[i]
  254. if (values.includes(item.id + '')) {
  255. this.$set(item, 'checked', true)
  256. } else {
  257. this.$set(item, 'checked', false)
  258. }
  259. }
  260. },
  261. // 批量陪检
  262. buildOrders(){
  263. let list = Object.values(this.infoDATA.inspectListMap).flat().filter(v => v.checked);
  264. console.log(list);
  265. if(list.length){
  266. // 只要有一个没有检查科室
  267. let inspectDTO = list.find(v => !v.execDept);
  268. if(inspectDTO){
  269. this.models = {
  270. disjunctor: true,
  271. title: "提示",
  272. content: `<span class="red">${inspectDTO.inspectName || ''}</span>没有检查科室,不能建单`,
  273. icon: "warn",
  274. operate: {
  275. know: "返回",
  276. },
  277. };
  278. return;
  279. }
  280. this.jdItem = list;
  281. this.models = {
  282. disjunctor: true,
  283. title: "提示",
  284. content: `您选择<span class="red">${this.infoDATA.patientName || ""}</span>患者<span class="red">${list.length}</span>项检查,是否确认建单?`,
  285. icon: "warn",
  286. checkBoxText: '建单并签到',
  287. operate: {
  288. ok: "确定",
  289. cancel: "取消",
  290. },
  291. };
  292. }else{
  293. uni.showToast({
  294. icon: "none",
  295. title: "至少选择一个检查!",
  296. });
  297. }
  298. },
  299. // 取消接单
  300. dialogClose(){
  301. this.$refs.alertDialog.close()
  302. },
  303. // 确定接单
  304. dialogConfirm(){
  305. if(this.optType==1){
  306. uni.showLoading({
  307. title: "加载中",
  308. mask: true,
  309. });
  310. get(`/workerOrder/takeOrder/${this.itemData.workOrderDTO.id}`).then((result) => {
  311. if (result.status == 200) {
  312. uni.hideLoading();
  313. uni.showToast({
  314. icon: "none",
  315. mask: true,
  316. title: "操作成功",
  317. });
  318. this.$refs.alertDialog.close()
  319. setTimeout(_=>{
  320. this.getInfo(this.infoDATA.patientCode)
  321. }, 1500)
  322. } else {
  323. uni.hideLoading();
  324. uni.showToast({
  325. icon: "none",
  326. title: result.msg,
  327. });
  328. }
  329. });
  330. }else{
  331. let query = {
  332. userId: uni.getStorageSync("userData").user.id
  333. }
  334. uni.showLoading({
  335. title: "加载中",
  336. mask: true,
  337. });
  338. post(`/api/directStartOrder/${this.itemData.workOrderDTO.id}`, query).then((result) => {
  339. if (result.status == 200) {
  340. uni.hideLoading();
  341. uni.showToast({
  342. icon: "none",
  343. mask: true,
  344. title: "操作成功",
  345. });
  346. this.$refs.alertDialog.close()
  347. setTimeout(_=>{
  348. this.getInfo(this.infoDATA.patientCode)
  349. }, 1500)
  350. } else {
  351. uni.hideLoading();
  352. uni.showToast({
  353. icon: "none",
  354. title: result.msg,
  355. });
  356. }
  357. });
  358. }
  359. },
  360. // 接单
  361. operation(data, type){
  362. this.optType = type
  363. this.itemData = data
  364. if(type==1){
  365. this.content = '您确定接单吗?'
  366. }else{
  367. this.content = '您确定立即执行并接单吗?'
  368. }
  369. this.$refs.alertDialog.open()
  370. },
  371. // 建单
  372. build(data) {
  373. console.log(data);
  374. if(!data.execDept){
  375. this.models = {
  376. disjunctor: true,
  377. title: "提示",
  378. content: `<span class="red">${data.inspectName || ''}</span>没有检查科室,不能建单`,
  379. icon: "warn",
  380. operate: {
  381. know: "返回",
  382. },
  383. };
  384. return;
  385. }
  386. this.jdItem = [data];
  387. this.models = {
  388. disjunctor: true,
  389. title: "提示",
  390. content: `您即将创建<span class="red">${data.patientName || ""}</span>患者前往<span class="red">${ data.execDept ? data.execDept.dept : "" }</span>进行<span class="red">${data.inspectName || ""}</span>检查,您确认吗?`,
  391. icon: "warn",
  392. checkBoxText: '建单并签到',
  393. operate: {
  394. ok: "确定",
  395. cancel: "取消",
  396. },
  397. };
  398. },
  399. //建单后返回
  400. know() {
  401. this.models.disjunctor = false;
  402. this.getInfo(this.infoDATA.patientCode);
  403. },
  404. //建单确定
  405. ok(e) {
  406. console.log(e)
  407. if(e.isCheck){
  408. uni.showLoading({
  409. title: "加载中",
  410. mask: true,
  411. });
  412. post("/nurse/inspect/inspectCreateCheck", { patientCode: this.options.patientCode }).then((result) => {
  413. uni.hideLoading();
  414. if (result.status == 200) {
  415. // 建单并签到
  416. if (!this.SMFlag) {
  417. return;
  418. }
  419. this.SMFlag = false;
  420. SM().then((content) => {
  421. this.SMFlag = true;
  422. this.buildOrderOrSign(content)
  423. }).catch(err => {
  424. this.SMFlag = true;
  425. });
  426. } else {
  427. this.models.disjunctor = false;
  428. this.models = {
  429. disjunctor: true,
  430. content: result.msg,
  431. icon: "error",
  432. operate: {
  433. know: "返回",
  434. },
  435. };
  436. }
  437. });
  438. }else{
  439. this.buildOrderOrSign()
  440. }
  441. },
  442. // 建单/建单并签到
  443. buildOrderOrSign(content){
  444. this.models.disjunctor = false;
  445. let postData = {
  446. deptId: this.infoDATA.department.id
  447. };
  448. let taskId;
  449. uni.showLoading({
  450. title: "加载中",
  451. mask: true,
  452. });
  453. post("/nurse/getDeptTaskType", postData).then((result) => {
  454. if (result.status == 200) {
  455. let obj = result.data.allTaskTypes.filter(
  456. (item) => item.associationType.value == "inspect"
  457. );
  458. if (obj.length) {
  459. taskId = obj[0].id;
  460. let postData = {
  461. code: content,
  462. workOrder: {
  463. sourceId: 4,
  464. taskType: {
  465. id: taskId,
  466. isHalfInspect: obj[0].isHalfInspect === 1 ? 1 : 0
  467. },
  468. createDept: this.infoDATA.department.id,
  469. startDept: {
  470. id: this.infoDATA.department.id
  471. },
  472. patient: {
  473. patientCode: this.infoDATA.patientCode
  474. },
  475. checkList: this.jdItem,
  476. goods: "",
  477. worker: {
  478. id: uni.getStorageSync("userData").user.id
  479. },
  480. workerStartOrderFlag: 1,
  481. },
  482. };
  483. //根据检查的紧急度加急
  484. this.jdItem.forEach(v => {
  485. if (v.priority === 1 || v.priority === '1') {
  486. postData.workOrder["urgentDetails"] = {
  487. checkStatus: {
  488. id: 329
  489. },
  490. urgentReason: '系统根据检查信息,自动进行加急',
  491. };
  492. }
  493. })
  494. post(content ? "/nurse/inspect/inspectCreateSign" : "/api/startOrder", postData).then((res) => {
  495. uni.hideLoading();
  496. let msg = res.msg + (content ? ` 扫描内容:${content}` : '');
  497. let icon = "error";
  498. if (res.status == 200) {
  499. msg = "建单成功";
  500. icon = "success";
  501. }
  502. this.models = {
  503. disjunctor: true,
  504. content: msg,
  505. icon: icon,
  506. operate: {
  507. know: "返回",
  508. },
  509. };
  510. });
  511. } else {
  512. uni.hideLoading();
  513. this.models = {
  514. disjunctor: true,
  515. content: "建单失败,科室未开通!",
  516. icon: "error",
  517. operate: {
  518. know: "返回",
  519. },
  520. };
  521. }
  522. } else {
  523. uni.hideLoading();
  524. uni.showToast({
  525. icon: "none",
  526. title: result.msg || "接口获取数据失败!",
  527. });
  528. }
  529. });
  530. },
  531. //建单取消
  532. cancel() {
  533. this.models.disjunctor = false;
  534. },
  535. // 扫一扫
  536. Scanning(qrcodePrefix = '') {
  537. if (!this.SMFlag) {
  538. return;
  539. }
  540. this.SMFlag = false;
  541. SM().then((content) => {
  542. this.SMFlag = true;
  543. this.getInfo(content);
  544. }).catch(err => {
  545. this.SMFlag = true;
  546. });
  547. },
  548. // 修改预约时间->返回
  549. know1() {
  550. this.models1.disjunctor = false;
  551. },
  552. // 修改预约时间->确定
  553. ok1(data) {
  554. console.log(data);
  555. const { yyTime, yyEndTime} = data;//暂时这样
  556. if (!yyTime) {
  557. //没有填写预约时间
  558. uni.showModal({
  559. title: "提示",
  560. content: "请填写预约时间!",
  561. showCancel: false,
  562. success: function(res) {
  563. if (res.confirm) {
  564. console.log("用户点击确定");
  565. } else if (res.cancel) {
  566. console.log("用户点击取消");
  567. }
  568. },
  569. });
  570. return;
  571. }
  572. this.models1.disjunctor = false;
  573. let postData = {
  574. inspectCode: this.currentInspect.inspectCode,
  575. yyTime,
  576. endCheckTime: yyEndTime
  577. };
  578. uni.showLoading({
  579. title: '加载中',
  580. mask: true,
  581. })
  582. post('/workerOrder/updateInspectYytime', postData).then(res => {
  583. uni.hideLoading();
  584. if (res.status == 200) {
  585. this.getInfo(this.options.patientCode);
  586. } else {
  587. uni.showToast({
  588. icon: "none",
  589. title: "修改失败",
  590. });
  591. }
  592. })
  593. },
  594. // 修改预约时间->取消
  595. cancel1() {
  596. this.models1.disjunctor = false;
  597. },
  598. // 修改预约时间
  599. changeYyTime(item) {
  600. this.currentInspect = item;
  601. this.models1 = {
  602. disjunctor: true,
  603. content: `您要修改[${item.inspectName||''}]的预约时间`,
  604. icon: "warn",
  605. operate: {
  606. ok: "确定",
  607. cancel: "取消",
  608. },
  609. };
  610. },
  611. // 修改检查科室
  612. changeExecDept(item) {
  613. this.currentInspect = item;
  614. if(this.currentInspect.inspectCheckType){
  615. this.currentInspect.inspectCheckType.deptList = this.currentInspect.inspectCheckType.deptList || [];
  616. }
  617. this.models2 = {
  618. disjunctor: true,
  619. content: `请选择[${item.patientName||''}]检查项目的检查科室`,
  620. icon: "warn",
  621. operate: {
  622. ok: "确定",
  623. cancel: "取消",
  624. },
  625. };
  626. },
  627. // 修改检查科室->返回
  628. know2() {
  629. this.models2.disjunctor = false;
  630. },
  631. // 修改检查科室->确定
  632. ok2(data) {
  633. console.log(data);
  634. const { execDeptId } = data;
  635. this.models2.disjunctor = false;
  636. let postData = {
  637. "id": this.currentInspect.id,
  638. "execDeptId": execDeptId
  639. };
  640. uni.showLoading({
  641. title: '加载中',
  642. mask: true,
  643. })
  644. post('/simple/data/updData/inspect', postData).then(res => {
  645. uni.hideLoading();
  646. if (res.status == 200) {
  647. this.getInfo(this.options.patientCode);
  648. } else {
  649. uni.showToast({
  650. icon: "none",
  651. title: "修改失败",
  652. });
  653. }
  654. })
  655. },
  656. // 修改检查科室->取消
  657. cancel2() {
  658. this.models2.disjunctor = false;
  659. },
  660. // 获取系统配置预约时间间隔
  661. getInspectConfig(patientCode) {
  662. const postData = {
  663. "idx": 0,
  664. "sum": 1,
  665. "taskTypeConfig": {
  666. "taskTypeDTO": {
  667. "hosId": {
  668. "id": this.hosId
  669. },
  670. "associationType": {
  671. "key": "association_types",
  672. "value": "inspect",
  673. },
  674. },
  675. },
  676. };
  677. uni.showLoading({
  678. mask: true,
  679. title: '加载中'
  680. })
  681. post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
  682. if (res.status == 200) {
  683. this.configObj = res.list[0];
  684. this.getInfo(patientCode);
  685. }
  686. })
  687. },
  688. // 获取患者信息
  689. getPatient(page){
  690. },
  691. // 请求详细页面的数据
  692. getInfo(patientCode) {
  693. uni.showLoading({
  694. title: "加载中",
  695. mask: true,
  696. });
  697. post("/nurse/workOrder/getPatientInspectInfo", {
  698. patientCode,
  699. queryInspect: 1,
  700. }).then((res) => {
  701. uni.hideLoading();
  702. if (res.status == 200) {
  703. res.data.inspectListMap = res.data.inspectListMap || {};
  704. this.isEmpty = Object.keys(res.data.inspectListMap).length === 0;
  705. for(let i of Object.keys(res.data.inspectListMap)){
  706. let x = res.data.inspectListMap[i]
  707. for(let e of x){
  708. if(e.yyTime){
  709. e.newTime = dayjs(new Date(e.yyTime)).format('MM-DD HH:mm')
  710. if(e.endCheckTime){
  711. e.newTime2 = dayjs(new Date(e.endCheckTime)).format('HH:mm')
  712. e.yyEndTime = e.newTime +'--'+ e.newTime2
  713. }else{
  714. let date = dayjs(new Date(e.yyTime));
  715. e.yyEndTime = e.newTime
  716. }
  717. }else{
  718. e.yyEndTime = ''
  719. }
  720. }
  721. }
  722. if(res.data.orderedInspectList && res.data.orderedInspectList.length>0){
  723. res.data.orderedInspectList.forEach(e =>{
  724. if(e.yyTime){
  725. e.newTime = dayjs(new Date(e.yyTime)).format('MM-DD HH:mm')
  726. if(e.endCheckTime){
  727. e.newTime2 = dayjs(new Date(e.endCheckTime)).format('HH:mm')
  728. e.yyEndTime = e.newTime +'--'+ e.newTime2
  729. }else{
  730. let date = dayjs(new Date(e.yyTime));
  731. e.yyEndTime = e.newTime
  732. }
  733. }else{
  734. e.yyEndTime = ''
  735. }
  736. })
  737. }
  738. this.infoDATA = res.data;
  739. } else {
  740. uni.showToast({
  741. icon: "none",
  742. title: res.msg || "接口获取数据失败!",
  743. });
  744. }
  745. });
  746. },
  747. },
  748. onLoad(options) {
  749. console.log('options', options);
  750. this.options = options;
  751. this.getInspectConfig(this.options.patientCode)
  752. // #ifdef APP-PLUS
  753. webHandle("no", "app");
  754. // #endif
  755. // #ifdef H5
  756. webHandle("no", "wx");
  757. // #endif
  758. },
  759. onShow() {
  760. this.SMFlag = true;
  761. }
  762. };
  763. </script>
  764. <style lang="less" scoped>
  765. /deep/ uni-checkbox:not([disabled]) .uni-checkbox-input:hover{
  766. border-color: #49B856!important;
  767. }
  768. /deep/ .uni-popup__info{
  769. color: #000;
  770. }
  771. .box2{
  772. .page_item_btns{
  773. display: flex;
  774. justify-content: space-between;
  775. align-items: center;
  776. margin-top: 16rpx;
  777. margin-bottom: 16rpx;
  778. position: absolute;
  779. bottom: 0;
  780. width: 100%;
  781. .page_item_btn {
  782. flex: 1;
  783. height: 88rpx;
  784. background-image: linear-gradient(to right, #72c172, #3bb197);
  785. border-radius: 8rpx;
  786. line-height: 88rpx;
  787. color: #fff;
  788. font-size: 36rpx;
  789. font-weight: 700;
  790. text-align: center;
  791. margin-right: 24rpx;
  792. &:first-of-type{
  793. margin-left: 24rpx;
  794. }
  795. }
  796. .toolbar {
  797. flex: 1;
  798. z-index: 999;
  799. height: 88rpx;
  800. display: flex;
  801. justify-content: center;
  802. align-items: center;
  803. box-sizing: border-box;
  804. border-radius: 4rpx;
  805. background-color: #E5E8ED;
  806. margin-right: 24rpx;
  807. .toolbar-icon {
  808. font-size: 52rpx;
  809. margin-right: 16rpx;
  810. color: #07863c;
  811. }
  812. .toolbar-sao {
  813. font-size: 36rpx;
  814. color: #333;
  815. }
  816. }
  817. }
  818. }
  819. .newicon-weibiaoti2010104{
  820. margin-left: 8rpx;
  821. }
  822. .patientInformationInfo {
  823. background-color: #F7F7F7;
  824. display: flex;
  825. flex-direction: column;
  826. height: 100vh;
  827. .page_tab {
  828. width: 100%;
  829. height: 96rpx;
  830. display: flex;
  831. position: fixed;
  832. left: 0;
  833. top: 60rpx;
  834. z-index: 999;
  835. .page_tab_bar {
  836. flex: 1;
  837. font-size: 36rpx;
  838. background: #fff;
  839. display: flex;
  840. justify-content: center;
  841. align-items: center;
  842. position: relative;
  843. &:after {
  844. content: "";
  845. position: absolute;
  846. left: 0;
  847. bottom: 0;
  848. height: 2rpx;
  849. width: 100%;
  850. background-color: transparent;
  851. }
  852. .tab_num {
  853. color: #ff3b53;
  854. margin-left: 8rpx;
  855. }
  856. &.active {
  857. color: #49b856;
  858. &:after {
  859. background-color: #49b856;
  860. }
  861. }
  862. }
  863. }
  864. .box1{
  865. height: 100vh;
  866. background: #fff;
  867. padding: 0 20rpx;
  868. .item{
  869. height: 80rpx;
  870. display: flex;
  871. align-items: center;
  872. .title{
  873. margin-right: 40rpx;
  874. .value{
  875. position: relative;
  876. top: -3rpx;
  877. }
  878. }
  879. .icon{
  880. margin-left: 20rpx;
  881. }
  882. }
  883. }
  884. .box1,
  885. .box2,
  886. .box3{
  887. margin-top: 98rpx;
  888. }
  889. .box2{
  890. height: 78vh;
  891. overflow-y: auto;
  892. }
  893. .box3{
  894. height: 100vh;
  895. overflow-y: auto;
  896. }
  897. .zwsj {
  898. flex: 1;
  899. min-height: 0;
  900. text-align: center;
  901. .zwsj-img {
  902. width: 560rpx;
  903. }
  904. .zwsj-txt {
  905. font-size: 36rpx;
  906. font-weight: 700;
  907. margin-top: 20rpx;
  908. text-align: center;
  909. }
  910. }
  911. .page_head {
  912. background-color: #49b856;
  913. color: #fff;
  914. // margin-top: 97rpx;
  915. .title {
  916. font-size: 48rpx;
  917. // padding-top: 24rpx;
  918. text-align: center;
  919. }
  920. .remark{
  921. display: flex;
  922. margin: 16rpx 27rpx;
  923. .remarkTitle{
  924. flex-shrink: 0;
  925. }
  926. .remarkInfo{
  927. flex-shrink: 1;
  928. }
  929. }
  930. .patientCode {
  931. margin-left: 12rpx;
  932. font-size: 28rpx;
  933. }
  934. .info {
  935. margin: 8rpx 0;
  936. height: 80rpx;
  937. display: flex;
  938. justify-content: center;
  939. align-items: center;
  940. .bedNum,
  941. .waitingCount {
  942. width: 300rpx;
  943. height: 100%;
  944. display: flex;
  945. flex-direction: column;
  946. justify-content: center;
  947. align-items: center;
  948. .info_h {
  949. font-size: 30rpx;
  950. }
  951. .info_b {
  952. font-size: 26rpx;
  953. margin-top: 8rpx;
  954. }
  955. }
  956. .bedNum {
  957. position: relative;
  958. &:after {
  959. content: "";
  960. position: absolute;
  961. width: 4rpx;
  962. height: 50rpx;
  963. right: -2rpx;
  964. top: 15rpx;
  965. background-color: #fff;
  966. }
  967. }
  968. }
  969. }
  970. .scrollContent{
  971. flex: 1;
  972. min-height: 0;
  973. }
  974. .page_item {
  975. // margin-bottom: 10rpx;
  976. border-radius: 8rpx;
  977. overflow: hidden;
  978. .splitLine{
  979. height: 50rpx;
  980. display: flex;
  981. align-items: center;
  982. justify-content: center;
  983. color: #8F8F8F;
  984. .splitLineFlex{
  985. flex: 1;
  986. display: flex;
  987. align-items: center;
  988. justify-content: center;
  989. .splitLineBox{
  990. width: calc(100% - 48rpx);
  991. height: 1rpx;
  992. background-color: #8F8F8F;
  993. }
  994. }
  995. }
  996. .page_item_info {
  997. margin-top: 10rpx;
  998. padding: 20rpx 16rpx;
  999. text-align: left;
  1000. line-height: 60rpx;
  1001. font-size: 30rpx;
  1002. background: #fff;
  1003. &.mt0{
  1004. margin-top: 0;
  1005. }
  1006. .buildOrder{
  1007. width: 258rpx;
  1008. height: 72rpx;
  1009. background: #49B856;
  1010. border-radius: 6rpx;
  1011. margin: 0 auto;
  1012. color: #FFFFFF;
  1013. display: flex;
  1014. align-items: center;
  1015. justify-content: center;
  1016. font-size: 30rpx;
  1017. }
  1018. .btn-opt{
  1019. display: flex;
  1020. align-items: center;
  1021. justify-content: center;
  1022. .buildOrder{
  1023. width: 258rpx;
  1024. height: 72rpx;
  1025. line-height: 72rpx;
  1026. text-align: center;
  1027. background: #49B856;
  1028. border-radius: 6rpx;
  1029. margin: 0 auto;
  1030. color: #FFFFFF;
  1031. font-size: 30rpx;
  1032. }
  1033. }
  1034. .page_item_info_title {
  1035. font-weight: 700;
  1036. &.btn {
  1037. display: flex;
  1038. button {
  1039. font-size: 28rpx;
  1040. color: #49b856;
  1041. height: 50rpx;
  1042. line-height: 50rpx;
  1043. margin: 0;
  1044. }
  1045. }
  1046. &.row{
  1047. display: flex;
  1048. align-items: center;
  1049. justify-content: space-between;
  1050. }
  1051. text {
  1052. font-weight: normal;
  1053. &.red {
  1054. color: red;
  1055. }
  1056. &.bold{
  1057. font-weight: 700;
  1058. }
  1059. }
  1060. }
  1061. }
  1062. }
  1063. }
  1064. </style>