scanning_ins.vue 44 KB

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