scanning_ins.vue 38 KB

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