scanning_ins.vue 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334
  1. <template>
  2. <view class="Scanning_ins">
  3. <view class="Scanning">
  4. <view class="Scanning_top" id="Scanning_tops" :animation="animationData">
  5. <view class="Scanning_top_icon">
  6. <text class="cubeic-ok icon_transport transport-duigou"></text>
  7. </view>
  8. <view class="Scanning_top_text">
  9. <view class="text1">扫描成功</view>
  10. <view class="success_tips">
  11. (请您评估患者的意识状况、生命体征、配合程度,如有异常请及时联系护士!)
  12. </view>
  13. </view>
  14. <view class="Scanning_cont">
  15. <view>
  16. <text>患者姓名 : {{ infoDATA.patientName || "-" }}({{
  17. infoDATA.bedNum || "-"
  18. }})</text>
  19. <button @click="getInspectList()">查看检查</button>
  20. </view>
  21. <view>患者编号 : {{ infoDATA.patientCode || "-" }}</view>
  22. <view>住院科室 :
  23. {{ infoDATA.department ? infoDATA.department.dept : "-" }}
  24. </view>
  25. </view>
  26. </view>
  27. <!-- ------------------未完成工单 start----------------- -->
  28. <view class="page_items" v-if="
  29. workData.length === 0 && patientOrders && patientOrders.length > 0
  30. ">
  31. <view class="page_item" v-for="(infoDATA, i) of patientOrders" :key="i">
  32. <view class="page_item_top">
  33. <view class="page_item_top_L">
  34. <text class="L_text">单号:{{ infoDATA.gdcode }}</text>
  35. </view>
  36. <view class="page_item_top_R">
  37. <button class="L_iocn" @click="notice(infoDATA)">通知</button>
  38. </view>
  39. <view class="L"></view>
  40. <view class="R"></view>
  41. </view>
  42. <view class="page_item_cont">
  43. <view class="page_item_cont_T">
  44. <view class="page_item_cont_title">
  45. <text> <text class="starting">起</text> 点科室 </text>
  46. <text class="text_big">{{ infoDATA.startDept.dept }}</text>
  47. </view>
  48. </view>
  49. <view class="line"></view>
  50. <view class="page_item_cont_B">
  51. <template v-if="infoDATA.taskType.associationType.value == 'inspect'">
  52. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.middleDept" :key="i">
  53. <text> <text class="End">检</text> 查科室 </text>
  54. <text class="text_big">{{ dept.dept }}</text>
  55. <view></view>
  56. </view>
  57. </template>
  58. <template v-if="infoDATA.taskType.associationType.value != 'inspect'">
  59. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.endDepts" :key="i">
  60. <text> <text class="End">终</text> 点科室 </text>
  61. <text class="text_big">{{ dept.dept }}</text>
  62. </view>
  63. </template>
  64. </view>
  65. </view>
  66. <view class="page_item_foot">
  67. <view class="page_item_foot_text">
  68. <text class="text1">状态</text>
  69. <text class="text2" v-if="
  70. !(
  71. infoDATA.gdState.value == '5' &&
  72. infoDATA.taskType.associationType.value == 'inspect'
  73. )
  74. ">{{ infoDATA.gdState.name }}</text>
  75. <text class="text2" v-if="
  76. infoDATA.gdState.value == '5' &&
  77. infoDATA.taskType.associationType.value == 'inspect'
  78. ">待送回</text>
  79. </view>
  80. <view class="page_item_foot_text" v-if="infoDATA.taskType.associationType.value == 'inspect'">
  81. <text class="text1">预约时间</text>
  82. <text class="text2">{{
  83. infoDATA.checkList &&
  84. infoDATA.checkList[0] &&
  85. infoDATA.checkList[0].yyTime
  86. ? infoDATA.checkList[0].yyTime
  87. : "-"
  88. }}</text>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <!-- ------------------未完成工单 end----------------- -->
  94. <view class="title" v-if="workData && workData.length > 0">
  95. <text class="span1">工单信息</text>
  96. </view>
  97. <view class="page_items" v-if="!workData" style="font-size: 18px; margin-top: 15%">
  98. <view class="zwsj">
  99. <image class="zwsj_img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
  100. <view class="zwsj_txt">暂无工单</view>
  101. </view>
  102. </view>
  103. <view class="page_items" v-if="workData && workData.length > 0">
  104. <view class="page_item" v-for="(infoDATA, i) of workData" :key="i">
  105. <view class="page_item_top">
  106. <view class="page_item_top_L" @click="ac1(infoDATA, i, acType)">
  107. <text class="ac">
  108. <text :class="{ acSpan: idTYPE == infoDATA.id }"></text>
  109. </text>
  110. <text class="L_text">单号:{{ infoDATA.gdcode }}</text>
  111. <!-- emergencyType.value 1是正常,2是急,3是加急 -->
  112. <view class="page_item_cont_start emergency1" v-if="infoDATA.emergencyType.value == 1">
  113. <text>
  114. <text class="cubeic-star icon_transport transport-shiwujiaoxing"></text>
  115. {{ infoDATA.emergencyType.name }}
  116. </text>
  117. </view>
  118. <view class="page_item_cont_start emergency" v-if="infoDATA.emergencyType.value == 2">
  119. <text>
  120. <text class="cubeic-star icon_transport transport-shiwujiaoxing"></text>
  121. {{ infoDATA.emergencyType.name }}
  122. </text>
  123. </view>
  124. <view class="page_item_cont_start emergencys" v-if="infoDATA.emergencyType.value == 3">
  125. <text>
  126. <text class="cubeic-star icon_transport transport-shiwujiaoxing"></text>
  127. {{ infoDATA.emergencyType.name }}
  128. </text>
  129. </view>
  130. </view>
  131. <view class="page_item_top_R">
  132. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'inspect'">患者陪检</text>
  133. <text class="L_iocn" v-if="
  134. infoDATA.taskType.associationType.value == 'patientTransport'
  135. ">患者转运</text>
  136. </view>
  137. <view class="L"></view>
  138. <view class="R"></view>
  139. </view>
  140. <view class="page_item_cont">
  141. <view class="page_item_cont_T">
  142. <view class="page_item_cont_title">
  143. <text> <text class="starting">起</text> 点科室 </text>
  144. <text class="text_big">{{ infoDATA.startDept.dept }}</text>
  145. </view>
  146. </view>
  147. <view class="line"></view>
  148. <view class="page_item_cont_B">
  149. <template v-if="infoDATA.taskType.associationType.value == 'inspect'">
  150. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.middleDept" :key="i">
  151. <text> <text class="End">检</text> 查科室 </text>
  152. <text class="text_big">{{ dept.dept }}</text>
  153. <view></view>
  154. </view>
  155. </template>
  156. <template v-if="infoDATA.taskType.associationType.value != 'inspect'">
  157. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.endDepts" :key="i">
  158. <text> <text class="End">终</text> 点科室 </text>
  159. <text class="text_big">{{ dept.dept }}</text>
  160. </view>
  161. </template>
  162. </view>
  163. </view>
  164. <view class="page_item_foot">
  165. <view class="page_item_foot_text">
  166. <text class="text1">状态</text>
  167. <text class="text2" v-if="
  168. !(
  169. infoDATA.gdState.value == '5' &&
  170. infoDATA.taskType.associationType.value == 'inspect'
  171. )
  172. ">{{ infoDATA.gdState.name }}</text>
  173. <text class="text2" v-if="
  174. infoDATA.gdState.value == '5' &&
  175. infoDATA.taskType.associationType.value == 'inspect'
  176. ">待送回</text>
  177. </view>
  178. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '2'">
  179. <text class="text1">预计响应时间</text>
  180. <text class="text2">{{ infoDATA.estimeResponseTime || '无' }}</text>
  181. </view>
  182. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '5'">
  183. <text class="text1" v-if="!(infoDATA.taskType.associationType.value == 'inspect')">预计送达时间</text>
  184. <text class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect'">预计送回时间</text>
  185. <text class="text2">{{ infoDATA.estimeCompleteTime || '无' }}</text>
  186. </view>
  187. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '4'">
  188. <text class="text1">预计到达时间</text>
  189. <text class="text2">{{ infoDATA.estimateArriveTime || '无' }}</text>
  190. </view>
  191. <view class="page_item_foot_text">
  192. <text class="text1">创建时间</text>
  193. <text class="text2">{{ infoDATA.startTime || '无' }}</text>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. <view class="foot_btn2" v-if="workData && workData.length > 0 && isShow">
  199. <!-- <view class="btn1" @click="allStart(typeData)">一键操作</view> -->
  200. <view class="btn1" @click="getInspectAndPatientTransform(typeData)">一键操作</view>
  201. <view class="btn1" @click="scanDept()">送回病房</view>
  202. <view class="btn2" @click="showAlert">知道了</view>
  203. </view>
  204. <!-- <view class="foot_btn2" v-if="
  205. workData && workData.length === 0 && isShow && wechatFocusSwitch == 1
  206. "> -->
  207. <view class="foot_btn2" v-if="
  208. workData && workData.length === 0 && isShow
  209. ">
  210. <!-- <view class="btn1" @click="help">{{
  211. infoDATA.focusPatient == 1 ? "无需帮助" : "需要帮助"
  212. }}</view> -->
  213. <view class="btn3" @click="scanDept()">送回病房</view>
  214. <view class="btn3" @click="showAlert">知道了</view>
  215. </view>
  216. <view class="foot_btn2" v-if="!isShow">
  217. <view class="btn3" @click="scanDept()">送回病房</view>
  218. <view class="btn3" @click="showAlert">知道了</view>
  219. </view>
  220. </view>
  221. <!-- 弹窗 -->
  222. <!-- <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  223. @know="know" :operate="models.operate" @ok="ok" @cancel="cancel"></showModel> -->
  224. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  225. @know="know" :operate="models.operate"></showModel>
  226. <!-- 送回病房弹窗 -->
  227. <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content"
  228. :operate="models1.operate" @ok="ok1" @cancel="cancel1"></showModel>
  229. <!-- 送回病房建单弹窗 -->
  230. <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
  231. :operate="models2.operate" @ok="ok2" @cancel="cancel2"></showModel>
  232. <!-- 送回病房建单弹窗-扫描科室 -->
  233. <showModel :title="models3.title" :icon="models3.icon" :disjunctor="models3.disjunctor" :content="models3.content"
  234. :operate="models3.operate" @ok="ok3" @cancel="cancel3"></showModel>
  235. <!-- 弹窗 -->
  236. <showModel :title="models4.title" :icon="models4.icon" :disjunctor="models4.disjunctor"
  237. :radioInspectionDistanceItem="models4.radioInspectionDistanceItem" @ok="ok4" @radioChange="radioChange4" :operate="models4.operate">
  238. </showModel>
  239. </view>
  240. </template>
  241. <script>
  242. import showModel from "../../components/showModel/showModel.vue";
  243. import {
  244. get,
  245. post,
  246. SM,
  247. webHandle
  248. } from "../../http/http.js";
  249. export default {
  250. data() {
  251. return {
  252. selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
  253. // 单选框弹窗model1
  254. models4: {
  255. disjunctor: false,
  256. },
  257. currentCode: '', //当前小扫描的科室二维码
  258. SMFlag:true,
  259. options: {},
  260. // wechatFocusSwitch: 0,
  261. hosId: "",
  262. // 弹窗model
  263. models: {
  264. disjunctor: false,
  265. },
  266. // 送回病房弹窗model
  267. models1: {
  268. disjunctor: false,
  269. },
  270. // 送回病房建单弹窗model
  271. models2: {
  272. disjunctor: false,
  273. },
  274. // 送回病房建单弹窗model-扫描科室
  275. models3: {
  276. disjunctor: false,
  277. },
  278. infoDATA: {},
  279. workData: [],
  280. patientOrders: [],
  281. acType: Number,
  282. tabType: 1,
  283. idTYPE: "",
  284. userId: {
  285. ids: [],
  286. },
  287. typeData: null,
  288. types: false,
  289. code: "",
  290. animationData: {}, //动画
  291. isShow: true, //是否显示“一键操作”
  292. currentStartDept: {}, //扫描的起点科室
  293. };
  294. },
  295. methods: {
  296. // 获取是否需要选择陪检方式
  297. getInspectAndPatientTransform(){
  298. console.log(this.typeData);
  299. if(this.typeData){
  300. const postData = {
  301. "idx":0,
  302. "sum":1,
  303. "taskTypeConfig":{
  304. "taskTypeDTO":{
  305. "hosId": {"id": this.hosId},
  306. "associationType": {
  307. "key": "association_types",
  308. "value":"inspect",
  309. },
  310. },
  311. },
  312. };
  313. uni.showLoading({
  314. mask: true,
  315. title: '加载中'
  316. })
  317. post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
  318. console.log(res)
  319. if (res.status == 200) {
  320. res.list = res.list || [];
  321. if(res.list[0].signTypeIds && this.typeData.gdState.value == 4){
  322. // 如果开启并且工单状态是待到达
  323. const postData = {
  324. "idx":0,
  325. "sum":9999,
  326. "workOrderInspectScore":{
  327. "hosId": this.hosId,
  328. },
  329. };
  330. post("/simple/data/fetchDataList/workOrderInspectScore", postData).then((res) => {
  331. console.log(res)
  332. uni.hideLoading();
  333. if (res.status == 200) {
  334. res.list = res.list || [];
  335. let radioInspectionDistanceItem = res.list.map(v => ({id: v.id + "__" + v.inspectMode, inspectMode: v.inspectMode}));
  336. this.models4 = {
  337. disjunctor: true,
  338. title: "请选择陪检方式",
  339. radioInspectionDistanceItem,
  340. icon: "",
  341. operate: {
  342. ok: "确定",
  343. },
  344. };
  345. } else {
  346. uni.showToast({
  347. icon: "none",
  348. title: "请求失败!",
  349. });
  350. }
  351. })
  352. }else{
  353. this.allStart(this.typeData);
  354. }
  355. } else {
  356. uni.hideLoading();
  357. uni.showToast({
  358. icon: "none",
  359. title: "请求失败!",
  360. });
  361. }
  362. })
  363. }else{
  364. this.models = {
  365. disjunctor: true,
  366. content: "请选择工单",
  367. icon: "warn",
  368. operate: {
  369. know: "知道了",
  370. },
  371. };
  372. }
  373. },
  374. // 选中单选框
  375. radioChange4(item) {
  376. console.log(item);
  377. this.selectRadio = item.split("__");
  378. },
  379. // 确定
  380. ok4() {
  381. console.log(this.selectRadio);
  382. if (!this.selectRadio.length) {
  383. return;
  384. }
  385. this.models4.disjunctor = false;
  386. this.allStart(this.typeData);
  387. },
  388. ok2() {
  389. this.models2.disjunctor = false;
  390. uni.showLoading({
  391. mask: true,
  392. title: '加载中'
  393. })
  394. let userId = uni.getStorageSync("userData").user.id;
  395. let postData = {
  396. "workOrder": {
  397. sourceId: 4,
  398. "hosId": this.hosId,
  399. "startDept": {
  400. "id": this.options.id
  401. },
  402. "createDept": this.options.id,
  403. "patient": {
  404. "patientCode": this.infoDATA.patientCode
  405. },
  406. "worker": {
  407. "id": userId
  408. }
  409. }
  410. };
  411. post("/workerOrder/returnSickRoom", postData).then((res) => {
  412. console.log(res)
  413. uni.hideLoading();
  414. if (res.status == 200) {
  415. uni.showToast({
  416. icon: 'success',
  417. title: '建单成功',
  418. });
  419. } else {
  420. uni.showToast({
  421. icon: "none",
  422. title: "请求失败!",
  423. });
  424. }
  425. })
  426. },
  427. cancel2() {
  428. this.models2.disjunctor = false;
  429. },
  430. ok3() {
  431. this.models3.disjunctor = false;
  432. uni.showLoading({
  433. mask: true,
  434. title: '加载中'
  435. })
  436. let userId = uni.getStorageSync("userData").user.id;
  437. let postData = {
  438. "workOrder": {
  439. sourceId: 4,
  440. "hosId": this.hosId,
  441. "startDept": {
  442. "id": this.currentStartDept.id
  443. },
  444. "createDept": this.currentStartDept.id,
  445. "patient": {
  446. "patientCode": this.infoDATA.patientCode
  447. },
  448. "worker": {
  449. "id": userId
  450. }
  451. }
  452. };
  453. post("/workerOrder/returnSickRoom", postData).then((res) => {
  454. console.log(res)
  455. uni.hideLoading();
  456. if (res.status == 200) {
  457. uni.showToast({
  458. icon: 'success',
  459. title: '建单成功',
  460. });
  461. } else {
  462. uni.showToast({
  463. icon: "none",
  464. title: "请求失败!",
  465. });
  466. }
  467. })
  468. },
  469. cancel3() {
  470. this.models3.disjunctor = false;
  471. },
  472. // 送回病房-建单
  473. sendBuild() {
  474. let infoDATA = JSON.parse(this.options.infoDATA);
  475. this.models2 = {
  476. disjunctor: true,
  477. title: "提示",
  478. content: `您选择的起点科室为【${this.options.dept}】,您将从【${this.options.dept}】把【${infoDATA.patientName}】送回【${infoDATA.department.dept}】,如您确认请点击“确认建单”。`,
  479. icon: "warn",
  480. operate: {
  481. ok: "确认建单",
  482. cancel: "取消",
  483. },
  484. };
  485. },
  486. // 送回病房-扫描科室
  487. scanDept() {
  488. if (!this.SMFlag) {
  489. return;
  490. }
  491. this.SMFlag = false;
  492. let infoDATA = JSON.parse(this.options.infoDATA);
  493. let code = "";
  494. SM().then((ress1) => {
  495. uni.showLoading({
  496. title: "加载中",
  497. mask: true,
  498. });
  499. //检验二维码的有效性
  500. post("/dept/scanning", {
  501. content: ress1,
  502. }).then((result) => {
  503. this.SMFlag = true;
  504. if (result.state == 200 || result.state == 201) {
  505. let ress = result.code;
  506. if (ress) {
  507. code = ress;
  508. // 科室扫描
  509. let postData = {
  510. "idx": 0,
  511. "sum": 1,
  512. "department": {
  513. "hospital": {
  514. "id": this.hosId
  515. },
  516. "qrcode": code
  517. }
  518. };
  519. post("/data/fetchDataList/department", postData).then((res) => {
  520. uni.hideLoading();
  521. if (res.status == 200) {
  522. if(res.totalNum > 0){
  523. this.currentStartDept = res.list[0]; //baba
  524. this.models3 = {
  525. disjunctor: true,
  526. title: "提示",
  527. content: `您选择的起点科室为【${this.currentStartDept.dept}】,您将从【${this.currentStartDept.dept}】把【${infoDATA.patientName}】送回【${infoDATA.department.dept}】,如您确认请点击“确认建单”。`,
  528. icon: "warn",
  529. operate: {
  530. ok: "确认建单",
  531. cancel: "取消",
  532. },
  533. };
  534. }else{
  535. uni.hideLoading();
  536. uni.showToast({
  537. icon: "none",
  538. title: "请扫描正确的科室码!",
  539. });
  540. }
  541. } else {
  542. uni.hideLoading();
  543. uni.showToast({
  544. icon: "none",
  545. title: "请求失败!",
  546. });
  547. }
  548. });
  549. }
  550. } else {
  551. uni.hideLoading();
  552. uni.showToast({
  553. icon: "none",
  554. title: "请求失败!",
  555. });
  556. }
  557. });
  558. }).catch(err=>{
  559. this.SMFlag = true;
  560. });
  561. },
  562. // 送回病房-选择起点科室
  563. sendBack() {
  564. let infoDATA = JSON.parse(this.options.infoDATA);
  565. this.models1 = {
  566. disjunctor: true,
  567. title: "提示",
  568. content: `您好,您是要将【${infoDATA.patientName}】送回病房吗?如确认请您点击“选择起点科室”建立工单。`,
  569. icon: "warn",
  570. operate: {
  571. ok: "选择起点科室",
  572. cancel: "取消",
  573. },
  574. };
  575. },
  576. ok1() {
  577. this.models1.disjunctor = false;
  578. uni.navigateTo({
  579. url: `../search/search?type=sendBack&code=${this.options.code}&infoDATA=${this.options.infoDATA}&patientOrders=${this.options.patientOrders}&workData=${this.options.workData}`,
  580. });
  581. },
  582. cancel1() {
  583. this.models1.disjunctor = false;
  584. },
  585. // 查看检查
  586. getInspectList() {
  587. uni.navigateTo({
  588. url: `../inspectList/inspectList?id=${this.infoDATA.department.id}&dept=${this.infoDATA.department.dept}&residenceNo=${this.infoDATA.residenceNo}`,
  589. });
  590. },
  591. // 通知
  592. notice(info) {
  593. let postData = {
  594. userIds: info.worker.id + "",
  595. content: `您负责护送的患者${info.patient.patientName}(${info.patient.bedNum})已经检查完毕,请尽快执行工单的下一步。`,
  596. };
  597. post("/wechat/sendCustomMessage", postData).then((res) => {
  598. if (res.status == 200) {
  599. uni.showToast({
  600. title: "通知成功",
  601. duration: 2000,
  602. });
  603. } else {
  604. uni.showToast({
  605. icon: "none",
  606. title: "请求失败!",
  607. });
  608. }
  609. });
  610. },
  611. //需要帮助、无需帮助
  612. // help() {
  613. // this.models = {
  614. // disjunctor: true,
  615. // title: "提示",
  616. // content: this.infoDATA.focusPatient == 1 ?
  617. // "如设置为“无需帮助”则后期此患者检查将不会自动进行建单,可通过“需要帮助”设置自动建单" : "如设置为“需要帮助”则后期此患者检查会自动进行建单,可通过“无需帮助”取消设置",
  618. // icon: "warn",
  619. // operate: {
  620. // ok: "确定",
  621. // cancel: "取消",
  622. // },
  623. // };
  624. // },
  625. //需要帮助,无需帮助确定
  626. // ok() {
  627. // this.models.disjunctor = false;
  628. // post("/nurse/updData/patient", {
  629. // patient: {
  630. // id: this.infoDATA.id,
  631. // focusPatient: this.infoDATA.focusPatient == 1 ? 0 : 1,
  632. // },
  633. // }).then((res) => {
  634. // let msg = "设置失败";
  635. // let icon = "error";
  636. // if (res.status == 200) {
  637. // msg = "设置成功";
  638. // icon = "success";
  639. // this.infoDATA.focusPatient = res.data.focusPatient;
  640. // }
  641. // this.models = {
  642. // disjunctor: true,
  643. // content: msg,
  644. // icon: icon,
  645. // operate: {
  646. // know: "知道了",
  647. // },
  648. // };
  649. // });
  650. // },
  651. //需要帮助,无需帮助取消
  652. // cancel() {
  653. // this.models.disjunctor = false;
  654. // },
  655. //知道了
  656. know() {
  657. this.models.disjunctor = false;
  658. },
  659. // 知道了
  660. showAlert() {
  661. uni.navigateTo({
  662. url: "../receiptpage/receiptpage",
  663. });
  664. },
  665. //一键操作
  666. allStart(data) {
  667. let list = {};
  668. if (data) {
  669. let type = "";
  670. if (data.gdState.value == "8") {
  671. if (!this.SMFlag) {
  672. return;
  673. }
  674. this.SMFlag = false;
  675. SM().then((ress1) => {
  676. // ----------------
  677. uni.showLoading({
  678. title: "加载中",
  679. mask: true,
  680. });
  681. //检验二维码的有效性
  682. post("/dept/scanning", {
  683. content: ress1,
  684. }).then((result) => {
  685. this.SMFlag = true;
  686. this.currentCode = result.code;
  687. if (result.state == 200 || result.state == 201) {
  688. let ress = result.code;
  689. if (ress) {
  690. var ids = [];
  691. ids.push(data.id);
  692. type = "orderSign/" + ress;
  693. list = {ids};
  694. // 科室签到
  695. post("/workerOrder/" + type, list).then((res) => {
  696. uni.hideLoading();
  697. if (res.status == 200) {
  698. // model: JSON.stringify(res), //签到返回的信息
  699. // type: data.taskType.associationType.value, //关联类型
  700. // code: ress, //二维码code
  701. // ids //科室ID数组
  702. uni.navigateTo({
  703. url: `../scanning_djEnd/scanning_djEnd?type=${
  704. data.taskType.associationType.value
  705. }&code=${ress}&ids=${ids}&model=${encodeURIComponent(
  706. JSON.stringify(res)
  707. )}`,
  708. });
  709. } else {
  710. uni.navigateTo({
  711. url: `../scanning_djEnd/scanning_djEnd?model=${encodeURIComponent(
  712. JSON.stringify(res)
  713. )}&qrcode=${this.currentCode}`,
  714. });
  715. }
  716. });
  717. }
  718. } else {
  719. uni.hideLoading();
  720. uni.showToast({
  721. icon: "none",
  722. title: "请求失败!",
  723. });
  724. }
  725. });
  726. // ------------------------------
  727. }).catch(err=>{
  728. this.SMFlag = true;
  729. });
  730. } else {
  731. if (data.taskType.associationType.value == "patientTransport") {
  732. type = "handleTrans";
  733. let data = {
  734. ids: this.userId.ids,
  735. // "11789558|51131895|7|黄石城乡|陈琛|女|19981003|20180803081051|Z消化内科Ⅰ"
  736. code: this.code,
  737. inspectMode: this.selectRadio.length > 0 ? this.selectRadio[0] : undefined,
  738. };
  739. list = data;
  740. }
  741. if (data.taskType.associationType.value == "inspect") {
  742. type = "handleIns";
  743. let data = {
  744. ids: this.userId.ids,
  745. // "11789558|51131895|7|黄石城乡|陈琛|女|19981003|20180803081051|Z消化内科Ⅰ"
  746. code: this.code,
  747. inspectMode: this.selectRadio.length > 0 ? this.selectRadio[0] : undefined,
  748. };
  749. list = data;
  750. }
  751. uni.showLoading({
  752. title: "加载中",
  753. mask: true,
  754. });
  755. post("/workerOrder/" + type, list).then((res) => {
  756. uni.hideLoading();
  757. if (res.status == 200) {
  758. uni.navigateTo({
  759. url: `../scanning_insEnd/scanning_insEnd?type=${
  760. data.taskType.associationType.value
  761. }&model=${encodeURIComponent(JSON.stringify(res))}`,
  762. });
  763. } else {
  764. uni.navigateTo({
  765. url: `../scanning_insEnd/scanning_insEnd?model=${encodeURIComponent(
  766. JSON.stringify(res)
  767. )}`,
  768. });
  769. }
  770. });
  771. }
  772. } else {
  773. this.models = {
  774. disjunctor: true,
  775. content: "请选择工单",
  776. icon: "warn",
  777. operate: {
  778. know: "知道了",
  779. },
  780. };
  781. }
  782. },
  783. //选中
  784. ac(data, i, type) {
  785. this.idTYPE = "";
  786. },
  787. //未选中
  788. ac1(data, i, type) {
  789. if (this.idTYPE == data.id) {
  790. //显示
  791. this.isShow = true;
  792. this.idTYPE = "";
  793. this.userId.ids = [];
  794. this.typeData = null;
  795. } else {
  796. if (data.gdState.value >= 5) {
  797. //隐藏
  798. this.isShow = false;
  799. } else {
  800. //显示
  801. this.isShow = true;
  802. }
  803. this.idTYPE = data.id;
  804. this.typeData = data;
  805. this.userId.ids[0] = this.idTYPE;
  806. }
  807. },
  808. texiao() {
  809. if (this.workData && this.workData.length > 0) {
  810. setTimeout(() => {
  811. this.animation.height(0).opacity(0).step();
  812. this.animationData = this.animation.export();
  813. }, 15000);
  814. }
  815. },
  816. // 获取需要帮助权限
  817. // getWechatFocusSwitch() {
  818. // let postData = {
  819. // idx: 0,
  820. // sum: 1,
  821. // taskType: {
  822. // hosIds: this.hosId,
  823. // associationType: {
  824. // id: 260,
  825. // },
  826. // },
  827. // };
  828. // post("/configuration/fetchDataList/taskType", postData).then((res) => {
  829. // if (res.status == 200) {
  830. // this.wechatFocusSwitch = res.list[0].wechatFocusSwitch || 0;
  831. // } else {
  832. // uni.showToast({
  833. // icon: "none",
  834. // title: "请求失败!",
  835. // });
  836. // }
  837. // });
  838. // },
  839. },
  840. onLoad(options) {
  841. console.log(options);
  842. this.options = options;
  843. // 送回病房建单 start
  844. if (options.id && options.dept) {
  845. this.sendBuild();
  846. }
  847. // 送回病房建单 end
  848. this.hosId = uni.getStorageSync("userData").user.currentHospital.id;
  849. // this.getWechatFocusSwitch();
  850. this.infoDATA = JSON.parse(options.infoDATA);
  851. console.log(this.infoDATA);
  852. this.workData = JSON.parse(options.workData);
  853. if (options.patientOrders != 'undefined') {
  854. this.patientOrders = JSON.parse(options.patientOrders);
  855. }
  856. this.code = options.code;
  857. // #ifdef APP-PLUS
  858. webHandle("no", "app");
  859. // #endif
  860. // #ifdef H5
  861. webHandle("no", "wx");
  862. // #endif
  863. },
  864. onShow() {
  865. this.SMFlag = true;
  866. // 创建动画
  867. this.animation = uni.createAnimation({
  868. duration: 500,
  869. timingFunction: "ease",
  870. delay: 2000,
  871. });
  872. setTimeout(() => {
  873. this.texiao();
  874. }, 500);
  875. },
  876. onHide() {
  877. this.animationData = {};
  878. },
  879. onUnload() {
  880. // 页面关闭后清空数据
  881. this.animationData = {};
  882. },
  883. };
  884. </script>
  885. <style lang="less">
  886. ::-webkit-scrollbar {
  887. width: 0px;
  888. }
  889. ::-webkit-scrollbar-track {
  890. background-color: none;
  891. }
  892. ::-webkit-scrollbar-thumb {
  893. background-color: none;
  894. }
  895. ::-webkit-scrollbar-thumb:hover {
  896. background-color: none;
  897. }
  898. ::-webkit-scrollbar-thumb:active {
  899. background-color: none;
  900. }
  901. .Scanning_ins {
  902. .title {
  903. font-size: 36rpx;
  904. margin-top: 20rpx;
  905. margin-bottom: 20rpx;
  906. font-weight: 700;
  907. position: relative;
  908. height: 40rpx;
  909. .span1 {
  910. position: absolute;
  911. left: 0;
  912. font-weight: 700;
  913. }
  914. .span2 {
  915. position: absolute;
  916. right: 20%;
  917. color: rgb(73, 184, 86);
  918. }
  919. .span3 {
  920. position: absolute;
  921. right: 0;
  922. color: rgb(73, 184, 86);
  923. }
  924. }
  925. .Scanning {
  926. padding: 0 20rpx;
  927. .Scanning_top {
  928. height: 400rpx;
  929. .Scanning_top_icon {
  930. width: 140rpx;
  931. height: 140rpx;
  932. margin: 0 auto;
  933. margin-top: 36rpx;
  934. border-radius: 50%;
  935. line-height: 140rpx;
  936. .cubeic-ok {
  937. font-size: 140rpx;
  938. color: #35b34a;
  939. }
  940. }
  941. .Scanning_top_text {
  942. .text1 {
  943. margin-top: 30rpx;
  944. font-size: 48rpx;
  945. text-align: center;
  946. }
  947. .success_tips {
  948. color: red;
  949. font-size: 30rpx;
  950. }
  951. }
  952. .Scanning_cont {
  953. font-size: 32rpx;
  954. margin-top: 16rpx;
  955. view {
  956. margin-bottom: 8rpx;
  957. display: flex;
  958. justify-content: center;
  959. align-items: center;
  960. button {
  961. font-size: 32rpx;
  962. height: 52rpx;
  963. line-height: 52rpx;
  964. margin: 0;
  965. color: rgb(7, 134, 60);
  966. font-weight: 700;
  967. }
  968. }
  969. .text {
  970. margin-top: 24rpx;
  971. color: #35b34a;
  972. }
  973. .text1 {
  974. margin-top: 24rpx;
  975. color: #ff3b53;
  976. }
  977. }
  978. }
  979. .page_items {
  980. margin-bottom: 110rpx;
  981. .zwsj {
  982. margin-top: 180rpx;
  983. display: flex;
  984. flex-direction: column;
  985. align-items: center;
  986. .zwsj_txt {
  987. font-size: 36rpx;
  988. font-weight: 700;
  989. margin-top: 20rpx;
  990. }
  991. .zwsj_img {
  992. width: 582rpx;
  993. }
  994. }
  995. .page_item {
  996. margin-top: 16rpx;
  997. min-height: 310rpx;
  998. background: #fff;
  999. border-radius: 8rpx;
  1000. overflow: hidden;
  1001. padding: 0 16rpx;
  1002. border: 2rpx solid #e5e9ed;
  1003. .L {
  1004. width: 40rpx;
  1005. height: 40rpx;
  1006. border-radius: 50%;
  1007. background: #f9fafb;
  1008. position: relative;
  1009. left: -50rpx;
  1010. top: 66rpx;
  1011. }
  1012. .R {
  1013. width: 40rpx;
  1014. height: 40rpx;
  1015. border-radius: 50%;
  1016. background: #f9fafb;
  1017. position: relative;
  1018. float: right;
  1019. right: -50rpx;
  1020. top: 26rpx;
  1021. }
  1022. .starting {
  1023. width: 50rpx;
  1024. height: 50rpx;
  1025. color: #fff;
  1026. background: #49b856;
  1027. display: inline-block;
  1028. border-radius: 50%;
  1029. text-align: center;
  1030. line-height: 46rpx;
  1031. font-size: 32rpx;
  1032. margin-right: 6rpx;
  1033. }
  1034. .End {
  1035. width: 50rpx;
  1036. height: 50rpx;
  1037. color: #fff;
  1038. background: #39b199;
  1039. display: inline-block;
  1040. border-radius: 50%;
  1041. text-align: center;
  1042. line-height: 46rpx;
  1043. font-size: 32rpx;
  1044. margin-right: 6rpx;
  1045. }
  1046. .page_item_top {
  1047. height: 86rpx;
  1048. border-bottom: 2rpx dashed #e5e9ed;
  1049. padding: 0 16rpx;
  1050. .page_item_top_L {
  1051. height: 100%;
  1052. float: left;
  1053. line-height: 88rpx;
  1054. display: flex;
  1055. align-items: center;
  1056. .ac {
  1057. width: 32rpx;
  1058. height: 32rpx;
  1059. border: 2rpx solid #ccc;
  1060. display: flex;
  1061. justify-content: center;
  1062. align-items: center;
  1063. position: relative;
  1064. .acSpan {
  1065. width: 24rpx;
  1066. height: 24rpx;
  1067. background: #39b199;
  1068. display: block;
  1069. }
  1070. }
  1071. .ac1 {
  1072. width: 32rpx;
  1073. height: 32rpx;
  1074. border: 2rpx solid #ccc;
  1075. display: inline-block;
  1076. position: relative;
  1077. }
  1078. .emergencys {
  1079. background: #ff3b53 !important;
  1080. width: 124rpx !important;
  1081. }
  1082. .emergency {
  1083. background: #ff3b53 !important;
  1084. }
  1085. .emergency1 {
  1086. background: #49b856 !important;
  1087. }
  1088. .page_item_cont_start {
  1089. text-align: center;
  1090. height: 44rpx;
  1091. width: 104rpx;
  1092. line-height: 44rpx;
  1093. border-radius: 8rpx;
  1094. background: #49b856;
  1095. color: #fff;
  1096. display: inline-block;
  1097. font-size: 28rpx;
  1098. }
  1099. .L_time {
  1100. color: #6cc076;
  1101. font-size: 32rpx;
  1102. }
  1103. .L_text {
  1104. font-size: 32rpx;
  1105. display: inline-block;
  1106. font-weight: 700;
  1107. }
  1108. }
  1109. .page_item_top_R {
  1110. height: 60rpx;
  1111. float: right;
  1112. padding-top: 20rpx;
  1113. font-size: 32rpx;
  1114. position: absolute;
  1115. right: 50rpx;
  1116. .L_iocn {
  1117. display: inline-block;
  1118. height: 52rpx;
  1119. line-height: 48rpx;
  1120. color: rgb(7, 134, 60);
  1121. font-size: 36rpx;
  1122. font-weight: 700;
  1123. }
  1124. }
  1125. }
  1126. .page_item_cont {
  1127. min-height: 180rpx;
  1128. max-height: 424rpx;
  1129. padding: 0 16rpx;
  1130. text-align: left;
  1131. position: relative;
  1132. .text_big {
  1133. font-size: 32rpx;
  1134. position: absolute;
  1135. right: 16rpx;
  1136. font-weight: 700;
  1137. margin-top: 10rpx;
  1138. }
  1139. .text_big2 {
  1140. font-size: 32rpx;
  1141. position: absolute;
  1142. right: 16rpx;
  1143. font-weight: 700;
  1144. }
  1145. .line {
  1146. height: 20rpx;
  1147. width: 2rpx;
  1148. border-left: 2rpx solid #e5e9ed;
  1149. position: absolute;
  1150. top: 82rpx;
  1151. left: 40rpx;
  1152. }
  1153. .lines {
  1154. height: 40%;
  1155. width: 2rpx;
  1156. border-left: 2rpx solid #e5e9ed;
  1157. position: absolute;
  1158. top: 23%;
  1159. left: 36rpx;
  1160. }
  1161. .page_item_cont_T {
  1162. padding-top: 28rpx;
  1163. font-size: 28rpx;
  1164. .page_item_cont_title {
  1165. height: 100%;
  1166. font-size: 32rpx;
  1167. }
  1168. }
  1169. .page_item_cont_B {
  1170. padding-top: 28rpx;
  1171. margin-bottom: 28rpx;
  1172. .page_item_cont_title {
  1173. height: 60rpx;
  1174. font-size: 32rpx;
  1175. }
  1176. .page_item_cont_title1 {
  1177. height: 60rpx;
  1178. line-height: 60rpx;
  1179. font-size: 32rpx;
  1180. padding-left: 64rpx;
  1181. }
  1182. }
  1183. }
  1184. .page_item_foot {
  1185. border-top: 2rpx dashed #e5e9ed;
  1186. border-bottom: 2rpx dashed #e5e9ed;
  1187. padding: 28rpx 16rpx;
  1188. text-align: left;
  1189. .page_item_foot_text {
  1190. height: 48rpx;
  1191. font-size: 32rpx;
  1192. line-height: 48rpx;
  1193. margin-bottom: 20rpx;
  1194. .text1 {
  1195. color: rgb(102, 102, 102);
  1196. }
  1197. .text2 {
  1198. float: right;
  1199. font-weight: 700;
  1200. }
  1201. }
  1202. }
  1203. #infos {
  1204. display: none;
  1205. }
  1206. .page_item_infos {
  1207. padding-bottom: 20rpx;
  1208. border-bottom: 2rpx dashed #e5e9ed;
  1209. .page_item_info2 {
  1210. text-align: left;
  1211. line-height: 60rpx;
  1212. font-size: 32rpx;
  1213. padding-left: 16rpx;
  1214. .page_item_foot_text {
  1215. height: 48rpx;
  1216. font-size: 32rpx;
  1217. line-height: 48rpx;
  1218. margin-bottom: 20rpx;
  1219. .text1 {
  1220. color: rgb(102, 102, 102);
  1221. }
  1222. .text2 {
  1223. float: right;
  1224. font-weight: 700;
  1225. }
  1226. }
  1227. }
  1228. }
  1229. }
  1230. }
  1231. .foot_btn2 {
  1232. position: fixed;
  1233. bottom: 0;
  1234. right: 20rpx;
  1235. left: 20rpx;
  1236. line-height: 66rpx;
  1237. height: 100rpx;
  1238. border-top: 2rpx solid #e5e9ed;
  1239. background: #f9fafb;
  1240. display: flex;
  1241. justify-content: space-between;
  1242. .btn1,
  1243. .btn2 {
  1244. height: 66rpx;
  1245. width: 32%;
  1246. background-image: linear-gradient(to right, #72c172, #3bb197);
  1247. color: #fff;
  1248. border-radius: 8rpx;
  1249. font-size: 32rpx;
  1250. margin-top: 16rpx;
  1251. text-align: center;
  1252. }
  1253. .btn3 {
  1254. height: 66rpx;
  1255. width: 48%;
  1256. background-image: linear-gradient(to right, #72c172, #3bb197);
  1257. color: #fff;
  1258. border-radius: 8rpx;
  1259. font-size: 32rpx;
  1260. margin-top: 16rpx;
  1261. text-align: center;
  1262. }
  1263. }
  1264. }
  1265. }
  1266. </style>