scanning_ins.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200
  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 || 0 }}</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 || 0 }}</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 || 0 }}</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="scanDept()">送回病房</view>
  201. <view class="btn2" @click="showAlert">知道了</view>
  202. </view>
  203. <view class="foot_btn2" v-if="
  204. workData && workData.length === 0 && isShow && wechatFocusSwitch == 1
  205. ">
  206. <view class="btn1" @click="help">{{
  207. infoDATA.focusPatient == 1 ? "无需帮助" : "需要帮助"
  208. }}</view>
  209. <view class="btn1" @click="scanDept()">送回病房</view>
  210. <view class="btn2" @click="showAlert">知道了</view>
  211. </view>
  212. <view class="foot_btn2" v-if="!isShow">
  213. <view class="btn1" @click="scanDept()">送回病房</view>
  214. <view class="btn2" @click="showAlert">知道了</view>
  215. </view>
  216. </view>
  217. <!-- 弹窗 -->
  218. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  219. @know="know" :operate="models.operate" @ok="ok" @cancel="cancel"></showModel>
  220. <!-- 送回病房弹窗 -->
  221. <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content"
  222. :operate="models1.operate" @ok="ok1" @cancel="cancel1"></showModel>
  223. <!-- 送回病房建单弹窗 -->
  224. <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
  225. :operate="models2.operate" @ok="ok2" @cancel="cancel2"></showModel>
  226. <!-- 送回病房建单弹窗-扫描科室 -->
  227. <showModel :title="models3.title" :icon="models3.icon" :disjunctor="models3.disjunctor" :content="models3.content"
  228. :operate="models3.operate" @ok="ok3" @cancel="cancel3"></showModel>
  229. </view>
  230. </template>
  231. <script>
  232. import showModel from "../../components/showModel/showModel.vue";
  233. import {
  234. get,
  235. post,
  236. SM,
  237. webHandle
  238. } from "../../http/http.js";
  239. export default {
  240. data() {
  241. return {
  242. options: {},
  243. wechatFocusSwitch: 0,
  244. hosId: "",
  245. // 弹窗model
  246. models: {
  247. disjunctor: false,
  248. },
  249. // 送回病房弹窗model
  250. models1: {
  251. disjunctor: false,
  252. },
  253. // 送回病房建单弹窗model
  254. models2: {
  255. disjunctor: false,
  256. },
  257. // 送回病房建单弹窗model-扫描科室
  258. models3: {
  259. disjunctor: false,
  260. },
  261. infoDATA: {},
  262. workData: [],
  263. patientOrders: [],
  264. acType: Number,
  265. tabType: 1,
  266. idTYPE: "",
  267. userId: {
  268. ids: [],
  269. },
  270. typeData: null,
  271. types: false,
  272. code: "",
  273. animationData: {}, //动画
  274. isShow: true, //是否显示“一键操作”
  275. currentStartDept: {}, //扫描的起点科室
  276. };
  277. },
  278. methods: {
  279. ok2() {
  280. this.models2.disjunctor = false;
  281. uni.showLoading({
  282. mask: true,
  283. title: '加载中'
  284. })
  285. let userId = uni.getStorageSync("userData").user.id;
  286. let postData = {
  287. "workOrder": {
  288. sourceId: 4,
  289. "hosId": this.hosId,
  290. "startDept": {
  291. "id": this.options.id
  292. },
  293. "createDept": this.options.id,
  294. "patient": {
  295. "patientCode": this.options.code
  296. },
  297. "worker": {
  298. "id": userId
  299. }
  300. }
  301. };
  302. post("/workerOrder/returnSickRoom", postData).then((res) => {
  303. console.log(res)
  304. uni.hideLoading();
  305. if (res.status == 200) {
  306. uni.showToast({
  307. icon: 'success',
  308. title: '建单成功',
  309. });
  310. } else {
  311. uni.showToast({
  312. icon: "none",
  313. title: "请求失败!",
  314. });
  315. }
  316. })
  317. },
  318. cancel2() {
  319. this.models2.disjunctor = false;
  320. },
  321. ok3() {
  322. this.models3.disjunctor = false;
  323. uni.showLoading({
  324. mask: true,
  325. title: '加载中'
  326. })
  327. let userId = uni.getStorageSync("userData").user.id;
  328. let postData = {
  329. "workOrder": {
  330. sourceId: 4,
  331. "hosId": this.hosId,
  332. "startDept": {
  333. "id": this.currentStartDept.id
  334. },
  335. "createDept": this.currentStartDept.id,
  336. "patient": {
  337. "patientCode": this.options.code
  338. },
  339. "worker": {
  340. "id": userId
  341. }
  342. }
  343. };
  344. post("/workerOrder/returnSickRoom", postData).then((res) => {
  345. console.log(res)
  346. uni.hideLoading();
  347. if (res.status == 200) {
  348. uni.showToast({
  349. icon: 'success',
  350. title: '建单成功',
  351. });
  352. } else {
  353. uni.showToast({
  354. icon: "none",
  355. title: "请求失败!",
  356. });
  357. }
  358. })
  359. },
  360. cancel3() {
  361. this.models3.disjunctor = false;
  362. },
  363. // 送回病房-建单
  364. sendBuild() {
  365. let infoDATA = JSON.parse(this.options.infoDATA);
  366. this.models2 = {
  367. disjunctor: true,
  368. title: "提示",
  369. content: `您选择的起点科室为【${this.options.dept}】,您将从【${this.options.dept}】把【${infoDATA.patientName}】送回【${infoDATA.department.dept}】,如您确认请点击“确认建单”。`,
  370. icon: "warn",
  371. operate: {
  372. ok: "确认建单",
  373. cancel: "取消",
  374. },
  375. };
  376. },
  377. // 送回病房-扫描科室
  378. scanDept() {
  379. let infoDATA = JSON.parse(this.options.infoDATA);
  380. let code = "";
  381. SM().then((ress1) => {
  382. uni.showLoading({
  383. title: "加载中",
  384. mask: true,
  385. });
  386. //检验二维码的有效性
  387. post("/dept/scanning", {
  388. content: ress1,
  389. }).then((result) => {
  390. if (result.state == 200 || result.state == 201) {
  391. let ress = result.code;
  392. if (ress) {
  393. code = ress;
  394. // 科室扫描
  395. let postData = {
  396. "idx": 0,
  397. "sum": 1,
  398. "department": {
  399. "hospital": {
  400. "id": this.hosId
  401. },
  402. "qrcode": code
  403. }
  404. };
  405. post("/data/fetchDataList/department", postData).then((res) => {
  406. uni.hideLoading();
  407. if (res.status == 200) {
  408. if(res.totalNum > 0){
  409. this.currentStartDept = res.list[0]; //baba
  410. this.models3 = {
  411. disjunctor: true,
  412. title: "提示",
  413. content: `您选择的起点科室为【${this.currentStartDept.dept}】,您将从【${this.currentStartDept.dept}】把【${infoDATA.patientName}】送回【${infoDATA.department.dept}】,如您确认请点击“确认建单”。`,
  414. icon: "warn",
  415. operate: {
  416. ok: "确认建单",
  417. cancel: "取消",
  418. },
  419. };
  420. }else{
  421. uni.hideLoading();
  422. uni.showToast({
  423. icon: "none",
  424. title: "请扫描正确的科室码!",
  425. });
  426. }
  427. } else {
  428. uni.hideLoading();
  429. uni.showToast({
  430. icon: "none",
  431. title: "请求失败!",
  432. });
  433. }
  434. });
  435. }
  436. } else {
  437. uni.hideLoading();
  438. uni.showToast({
  439. icon: "none",
  440. title: "请求失败!",
  441. });
  442. }
  443. });
  444. });
  445. },
  446. // 送回病房-选择起点科室
  447. sendBack() {
  448. let infoDATA = JSON.parse(this.options.infoDATA);
  449. this.models1 = {
  450. disjunctor: true,
  451. title: "提示",
  452. content: `您好,您是要将【${infoDATA.patientName}】送回病房吗?如确认请您点击“选择起点科室”建立工单。`,
  453. icon: "warn",
  454. operate: {
  455. ok: "选择起点科室",
  456. cancel: "取消",
  457. },
  458. };
  459. },
  460. ok1() {
  461. this.models1.disjunctor = false;
  462. uni.navigateTo({
  463. url: `../search/search?type=sendBack&code=${this.options.code}&infoDATA=${this.options.infoDATA}&patientOrders=${this.options.patientOrders}&workData=${this.options.workData}`,
  464. });
  465. },
  466. cancel1() {
  467. this.models1.disjunctor = false;
  468. },
  469. // 查看检查
  470. getInspectList() {
  471. uni.navigateTo({
  472. url: `../inspectList/inspectList?id=${this.infoDATA.department.id}&dept=${this.infoDATA.department.dept}&residenceNo=${this.infoDATA.residenceNo}`,
  473. });
  474. },
  475. // 通知
  476. notice(info) {
  477. let postData = {
  478. userIds: info.worker.id + "",
  479. content: `您负责护送的患者${info.patient.patientName}(${info.patient.bedNum})已经检查完毕,请尽快执行工单的下一步。`,
  480. };
  481. post("/wechat/sendCustomMessage", postData).then((res) => {
  482. if (res.status == 200) {
  483. uni.showToast({
  484. title: "通知成功",
  485. duration: 2000,
  486. });
  487. } else {
  488. uni.showToast({
  489. icon: "none",
  490. title: "请求失败!",
  491. });
  492. }
  493. });
  494. },
  495. //需要帮助、无需帮助
  496. help() {
  497. this.models = {
  498. disjunctor: true,
  499. title: "提示",
  500. content: this.infoDATA.focusPatient == 1 ?
  501. "如设置为“无需帮助”则后期此患者检查将不会自动进行建单,可通过“需要帮助”设置自动建单" : "如设置为“需要帮助”则后期此患者检查会自动进行建单,可通过“无需帮助”取消设置",
  502. icon: "warn",
  503. operate: {
  504. ok: "确定",
  505. cancel: "取消",
  506. },
  507. };
  508. },
  509. //需要帮助,无需帮助确定
  510. ok() {
  511. this.models.disjunctor = false;
  512. post("/nurse/updData/patient", {
  513. patient: {
  514. id: this.infoDATA.id,
  515. focusPatient: this.infoDATA.focusPatient == 1 ? 0 : 1,
  516. },
  517. }).then((res) => {
  518. let msg = "设置失败";
  519. let icon = "error";
  520. if (res.status == 200) {
  521. msg = "设置成功";
  522. icon = "success";
  523. this.infoDATA.focusPatient = res.data.focusPatient;
  524. }
  525. this.models = {
  526. disjunctor: true,
  527. content: msg,
  528. icon: icon,
  529. operate: {
  530. know: "知道了",
  531. },
  532. };
  533. });
  534. },
  535. //需要帮助,无需帮助取消
  536. cancel() {
  537. this.models.disjunctor = false;
  538. },
  539. //知道了
  540. know() {
  541. this.models.disjunctor = false;
  542. },
  543. // 知道了
  544. showAlert() {
  545. uni.navigateTo({
  546. url: "../receiptpage/receiptpage",
  547. });
  548. },
  549. //一键操作
  550. allStart(data) {
  551. let list = {};
  552. if (data) {
  553. let type = "";
  554. if (data.gdState.value == "8") {
  555. SM().then((ress1) => {
  556. // ----------------
  557. uni.showLoading({
  558. title: "加载中",
  559. mask: true,
  560. });
  561. //检验二维码的有效性
  562. post("/dept/scanning", {
  563. content: ress1,
  564. }).then((result) => {
  565. if (result.state == 200 || result.state == 201) {
  566. let ress = result.code;
  567. if (ress) {
  568. var ids = [];
  569. ids.push(data.id);
  570. type = "orderSign/" + ress;
  571. list = ids;
  572. // 科室签到
  573. post("/workerOrder/" + type, list).then((res) => {
  574. uni.hideLoading();
  575. if (res.status == 200) {
  576. // model: JSON.stringify(res), //签到返回的信息
  577. // type: data.taskType.associationType.value, //关联类型
  578. // code: ress, //二维码code
  579. // ids //科室ID数组
  580. uni.navigateTo({
  581. url: `../scanning_djEnd/scanning_djEnd?type=${
  582. data.taskType.associationType.value
  583. }&code=${ress}&ids=${ids}&model=${encodeURIComponent(
  584. JSON.stringify(res)
  585. )}`,
  586. });
  587. } else {
  588. uni.navigateTo({
  589. url: `../scanning_djEnd/scanning_djEnd?model=${encodeURIComponent(
  590. JSON.stringify(res)
  591. )}`,
  592. });
  593. }
  594. });
  595. }
  596. } else {
  597. uni.hideLoading();
  598. uni.showToast({
  599. icon: "none",
  600. title: "请求失败!",
  601. });
  602. }
  603. });
  604. // ------------------------------
  605. });
  606. } else {
  607. if (data.taskType.associationType.value == "patientTransport") {
  608. type = "handleTrans";
  609. let data = {
  610. ids: this.userId.ids,
  611. // "11789558|51131895|7|黄石城乡|陈琛|女|19981003|20180803081051|Z消化内科Ⅰ"
  612. code: this.code,
  613. };
  614. list = data;
  615. }
  616. if (data.taskType.associationType.value == "inspect") {
  617. type = "handleIns";
  618. let data = {
  619. ids: this.userId.ids,
  620. // "11789558|51131895|7|黄石城乡|陈琛|女|19981003|20180803081051|Z消化内科Ⅰ"
  621. code: this.code,
  622. };
  623. list = data;
  624. }
  625. uni.showLoading({
  626. title: "加载中",
  627. mask: true,
  628. });
  629. post("/workerOrder/" + type, list).then((res) => {
  630. uni.hideLoading();
  631. if (res.status == 200) {
  632. uni.navigateTo({
  633. url: `../scanning_insEnd/scanning_insEnd?type=${
  634. data.taskType.associationType.value
  635. }&model=${encodeURIComponent(JSON.stringify(res))}`,
  636. });
  637. } else {
  638. uni.navigateTo({
  639. url: `../scanning_insEnd/scanning_insEnd?model=${encodeURIComponent(
  640. JSON.stringify(res)
  641. )}`,
  642. });
  643. }
  644. });
  645. }
  646. } else {
  647. this.models = {
  648. disjunctor: true,
  649. content: "请选择工单",
  650. icon: "warn",
  651. operate: {
  652. know: "知道了",
  653. },
  654. };
  655. }
  656. },
  657. //选中
  658. ac(data, i, type) {
  659. this.idTYPE = "";
  660. },
  661. //未选中
  662. ac1(data, i, type) {
  663. if (this.idTYPE == data.id) {
  664. //显示
  665. this.isShow = true;
  666. this.idTYPE = "";
  667. this.userId.ids = [];
  668. this.typeData = null;
  669. } else {
  670. if (data.gdState.value >= 5) {
  671. //隐藏
  672. this.isShow = false;
  673. } else {
  674. //显示
  675. this.isShow = true;
  676. }
  677. this.idTYPE = data.id;
  678. this.typeData = data;
  679. this.userId.ids[0] = this.idTYPE;
  680. }
  681. },
  682. texiao() {
  683. if (this.workData && this.workData.length > 0) {
  684. setTimeout(() => {
  685. this.animation.height(0).opacity(0).step();
  686. this.animationData = this.animation.export();
  687. }, 15000);
  688. }
  689. },
  690. // 获取需要帮助权限
  691. getWechatFocusSwitch() {
  692. let postData = {
  693. idx: 0,
  694. sum: 1,
  695. taskType: {
  696. hosIds: this.hosId,
  697. associationType: {
  698. id: 260,
  699. },
  700. },
  701. };
  702. post("/configuration/fetchDataList/taskType", postData).then((res) => {
  703. if (res.status == 200) {
  704. this.wechatFocusSwitch = res.list[0].wechatFocusSwitch || 0;
  705. } else {
  706. uni.showToast({
  707. icon: "none",
  708. title: "请求失败!",
  709. });
  710. }
  711. });
  712. },
  713. },
  714. onLoad(options) {
  715. console.log(options);
  716. this.options = options;
  717. // 送回病房建单 start
  718. if (options.id && options.dept) {
  719. this.sendBuild();
  720. }
  721. // 送回病房建单 end
  722. this.hosId = uni.getStorageSync("userData").infoPermission.hospitals[0].id;
  723. this.getWechatFocusSwitch();
  724. this.infoDATA = JSON.parse(options.infoDATA);
  725. console.log(this.infoDATA);
  726. this.workData = JSON.parse(options.workData);
  727. if (options.patientOrders != 'undefined') {
  728. this.patientOrders = JSON.parse(options.patientOrders);
  729. }
  730. this.code = options.code;
  731. // #ifdef APP-PLUS
  732. webHandle("no", "app");
  733. // #endif
  734. // #ifdef H5
  735. webHandle("no", "wx");
  736. // #endif
  737. },
  738. onShow() {
  739. // 创建动画
  740. this.animation = uni.createAnimation({
  741. duration: 500,
  742. timingFunction: "ease",
  743. delay: 2000,
  744. });
  745. setTimeout(() => {
  746. this.texiao();
  747. }, 500);
  748. },
  749. onHide() {
  750. this.animationData = {};
  751. },
  752. onUnload() {
  753. // 页面关闭后清空数据
  754. this.animationData = {};
  755. },
  756. };
  757. </script>
  758. <style lang="less">
  759. ::-webkit-scrollbar {
  760. width: 0px;
  761. }
  762. ::-webkit-scrollbar-track {
  763. background-color: none;
  764. }
  765. ::-webkit-scrollbar-thumb {
  766. background-color: none;
  767. }
  768. ::-webkit-scrollbar-thumb:hover {
  769. background-color: none;
  770. }
  771. ::-webkit-scrollbar-thumb:active {
  772. background-color: none;
  773. }
  774. .Scanning_ins {
  775. .title {
  776. font-size: 36rpx;
  777. margin-top: 20rpx;
  778. margin-bottom: 20rpx;
  779. font-weight: 700;
  780. position: relative;
  781. height: 40rpx;
  782. .span1 {
  783. position: absolute;
  784. left: 0;
  785. font-weight: 700;
  786. }
  787. .span2 {
  788. position: absolute;
  789. right: 20%;
  790. color: rgb(73, 184, 86);
  791. }
  792. .span3 {
  793. position: absolute;
  794. right: 0;
  795. color: rgb(73, 184, 86);
  796. }
  797. }
  798. .Scanning {
  799. padding: 0 20rpx;
  800. .Scanning_top {
  801. height: 400rpx;
  802. .Scanning_top_icon {
  803. width: 140rpx;
  804. height: 140rpx;
  805. margin: 0 auto;
  806. margin-top: 36rpx;
  807. border-radius: 50%;
  808. line-height: 140rpx;
  809. .cubeic-ok {
  810. font-size: 140rpx;
  811. color: #35b34a;
  812. }
  813. }
  814. .Scanning_top_text {
  815. .text1 {
  816. margin-top: 30rpx;
  817. font-size: 48rpx;
  818. text-align: center;
  819. }
  820. .success_tips {
  821. color: red;
  822. font-size: 30rpx;
  823. }
  824. }
  825. .Scanning_cont {
  826. font-size: 32rpx;
  827. margin-top: 16rpx;
  828. view {
  829. margin-bottom: 8rpx;
  830. display: flex;
  831. justify-content: center;
  832. align-items: center;
  833. button {
  834. font-size: 32rpx;
  835. height: 52rpx;
  836. line-height: 52rpx;
  837. margin: 0;
  838. color: rgb(7, 134, 60);
  839. font-weight: 700;
  840. }
  841. }
  842. .text {
  843. margin-top: 24rpx;
  844. color: #35b34a;
  845. }
  846. .text1 {
  847. margin-top: 24rpx;
  848. color: #ff3b53;
  849. }
  850. }
  851. }
  852. .page_items {
  853. margin-bottom: 110rpx;
  854. .zwsj {
  855. margin-top: 180rpx;
  856. display: flex;
  857. flex-direction: column;
  858. align-items: center;
  859. .zwsj_txt {
  860. font-size: 36rpx;
  861. font-weight: 700;
  862. margin-top: 20rpx;
  863. }
  864. .zwsj_img {
  865. width: 582rpx;
  866. }
  867. }
  868. .page_item {
  869. margin-top: 16rpx;
  870. min-height: 310rpx;
  871. background: #fff;
  872. border-radius: 8rpx;
  873. overflow: hidden;
  874. padding: 0 16rpx;
  875. border: 2rpx solid #e5e9ed;
  876. .L {
  877. width: 40rpx;
  878. height: 40rpx;
  879. border-radius: 50%;
  880. background: #f9fafb;
  881. position: relative;
  882. left: -50rpx;
  883. top: 66rpx;
  884. }
  885. .R {
  886. width: 40rpx;
  887. height: 40rpx;
  888. border-radius: 50%;
  889. background: #f9fafb;
  890. position: relative;
  891. float: right;
  892. right: -50rpx;
  893. top: 26rpx;
  894. }
  895. .starting {
  896. width: 50rpx;
  897. height: 50rpx;
  898. color: #fff;
  899. background: #49b856;
  900. display: inline-block;
  901. border-radius: 50%;
  902. text-align: center;
  903. line-height: 46rpx;
  904. font-size: 32rpx;
  905. margin-right: 6rpx;
  906. }
  907. .End {
  908. width: 50rpx;
  909. height: 50rpx;
  910. color: #fff;
  911. background: #39b199;
  912. display: inline-block;
  913. border-radius: 50%;
  914. text-align: center;
  915. line-height: 46rpx;
  916. font-size: 32rpx;
  917. margin-right: 6rpx;
  918. }
  919. .page_item_top {
  920. height: 86rpx;
  921. border-bottom: 2rpx dashed #e5e9ed;
  922. padding: 0 16rpx;
  923. .page_item_top_L {
  924. height: 100%;
  925. float: left;
  926. line-height: 88rpx;
  927. display: flex;
  928. align-items: center;
  929. .ac {
  930. width: 32rpx;
  931. height: 32rpx;
  932. border: 2rpx solid #ccc;
  933. display: flex;
  934. justify-content: center;
  935. align-items: center;
  936. position: relative;
  937. .acSpan {
  938. width: 24rpx;
  939. height: 24rpx;
  940. background: #39b199;
  941. display: block;
  942. }
  943. }
  944. .ac1 {
  945. width: 32rpx;
  946. height: 32rpx;
  947. border: 2rpx solid #ccc;
  948. display: inline-block;
  949. position: relative;
  950. }
  951. .emergencys {
  952. background: #ff3b53 !important;
  953. width: 124rpx !important;
  954. }
  955. .emergency {
  956. background: #ff3b53 !important;
  957. }
  958. .emergency1 {
  959. background: #49b856 !important;
  960. }
  961. .page_item_cont_start {
  962. text-align: center;
  963. height: 44rpx;
  964. width: 104rpx;
  965. line-height: 44rpx;
  966. border-radius: 8rpx;
  967. background: #49b856;
  968. color: #fff;
  969. display: inline-block;
  970. font-size: 28rpx;
  971. }
  972. .L_time {
  973. color: #6cc076;
  974. font-size: 32rpx;
  975. }
  976. .L_text {
  977. font-size: 32rpx;
  978. display: inline-block;
  979. font-weight: 700;
  980. }
  981. }
  982. .page_item_top_R {
  983. height: 60rpx;
  984. float: right;
  985. padding-top: 20rpx;
  986. font-size: 32rpx;
  987. position: absolute;
  988. right: 50rpx;
  989. .L_iocn {
  990. display: inline-block;
  991. height: 52rpx;
  992. line-height: 48rpx;
  993. color: rgb(7, 134, 60);
  994. font-size: 36rpx;
  995. font-weight: 700;
  996. }
  997. }
  998. }
  999. .page_item_cont {
  1000. min-height: 180rpx;
  1001. max-height: 424rpx;
  1002. padding: 0 16rpx;
  1003. text-align: left;
  1004. position: relative;
  1005. .text_big {
  1006. font-size: 32rpx;
  1007. position: absolute;
  1008. right: 16rpx;
  1009. font-weight: 700;
  1010. margin-top: 10rpx;
  1011. }
  1012. .text_big2 {
  1013. font-size: 32rpx;
  1014. position: absolute;
  1015. right: 16rpx;
  1016. font-weight: 700;
  1017. }
  1018. .line {
  1019. height: 20rpx;
  1020. width: 2rpx;
  1021. border-left: 2rpx solid #e5e9ed;
  1022. position: absolute;
  1023. top: 82rpx;
  1024. left: 40rpx;
  1025. }
  1026. .lines {
  1027. height: 40%;
  1028. width: 2rpx;
  1029. border-left: 2rpx solid #e5e9ed;
  1030. position: absolute;
  1031. top: 23%;
  1032. left: 36rpx;
  1033. }
  1034. .page_item_cont_T {
  1035. padding-top: 28rpx;
  1036. font-size: 28rpx;
  1037. .page_item_cont_title {
  1038. height: 100%;
  1039. font-size: 32rpx;
  1040. }
  1041. }
  1042. .page_item_cont_B {
  1043. padding-top: 28rpx;
  1044. margin-bottom: 28rpx;
  1045. .page_item_cont_title {
  1046. height: 60rpx;
  1047. font-size: 32rpx;
  1048. }
  1049. .page_item_cont_title1 {
  1050. height: 60rpx;
  1051. line-height: 60rpx;
  1052. font-size: 32rpx;
  1053. padding-left: 64rpx;
  1054. }
  1055. }
  1056. }
  1057. .page_item_foot {
  1058. border-top: 2rpx dashed #e5e9ed;
  1059. border-bottom: 2rpx dashed #e5e9ed;
  1060. padding: 28rpx 16rpx;
  1061. text-align: left;
  1062. .page_item_foot_text {
  1063. height: 48rpx;
  1064. font-size: 32rpx;
  1065. line-height: 48rpx;
  1066. margin-bottom: 20rpx;
  1067. .text1 {
  1068. color: rgb(102, 102, 102);
  1069. }
  1070. .text2 {
  1071. float: right;
  1072. font-weight: 700;
  1073. }
  1074. }
  1075. }
  1076. #infos {
  1077. display: none;
  1078. }
  1079. .page_item_infos {
  1080. padding-bottom: 20rpx;
  1081. border-bottom: 2rpx dashed #e5e9ed;
  1082. .page_item_info2 {
  1083. text-align: left;
  1084. line-height: 60rpx;
  1085. font-size: 32rpx;
  1086. padding-left: 16rpx;
  1087. .page_item_foot_text {
  1088. height: 48rpx;
  1089. font-size: 32rpx;
  1090. line-height: 48rpx;
  1091. margin-bottom: 20rpx;
  1092. .text1 {
  1093. color: rgb(102, 102, 102);
  1094. }
  1095. .text2 {
  1096. float: right;
  1097. font-weight: 700;
  1098. }
  1099. }
  1100. }
  1101. }
  1102. }
  1103. }
  1104. .foot_btn2 {
  1105. position: fixed;
  1106. bottom: 0;
  1107. right: 20rpx;
  1108. left: 20rpx;
  1109. line-height: 66rpx;
  1110. height: 100rpx;
  1111. border-top: 2rpx solid #e5e9ed;
  1112. background: #f9fafb;
  1113. display: flex;
  1114. justify-content: space-between;
  1115. .btn1,
  1116. .btn2,
  1117. .btn3 {
  1118. height: 66rpx;
  1119. width: 32%;
  1120. background-image: linear-gradient(to right, #72c172, #3bb197);
  1121. color: #fff;
  1122. border-radius: 8rpx;
  1123. font-size: 32rpx;
  1124. margin-top: 16rpx;
  1125. text-align: center;
  1126. }
  1127. .btn3 {
  1128. width: 100%;
  1129. }
  1130. }
  1131. }
  1132. }
  1133. </style>