patientInformationInfo.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. <template>
  2. <view class="patientInformationInfo" v-if="Object.keys(infoDATA).length > 0">
  3. <view class="page_head">
  4. <view class="title">{{ infoDATA.patientName }}<text class="patientCode">{{ infoDATA.residenceNo }}</text></view>
  5. <view class="info">
  6. <view :class="(infoDATA.careLevel || infoDATA.illnessState)?'bedNum':'waitingCount'">
  7. <text class="info_h">床号</text>
  8. <text class="info_b">{{ infoDATA.bedNum }}</text>
  9. </view>
  10. <!-- <view :class="(infoDATA.careLevel || infoDATA.illnessState)?'bedNum':'waitingCount'">
  11. <text class="info_h">待检查数</text>
  12. <text class="info_b">{{ infoDATA.watingCount }}</text>
  13. </view> -->
  14. <view class="bedNum" v-if="infoDATA.careLevel">
  15. <text class="info_h">护理等级</text>
  16. <text class="info_b">{{ infoDATA.careLevel.name }}</text>
  17. </view>
  18. <view class="waitingCount" v-if="infoDATA.illnessState">
  19. <text class="info_h">病情级别</text>
  20. <text class="info_b">{{ infoDATA.illnessState.name }}</text>
  21. </view>
  22. </view>
  23. </view>
  24. <scroll-view v-if="!isEmpty" scroll-y class="scrollContent">
  25. <view class="page_item" v-for="(inspects, key, index) in infoDATA.inspectListMap" :key="key">
  26. <view class="splitLine">
  27. <view class="splitLineFlex">
  28. <view class="splitLineBox"></view>
  29. </view>
  30. <view>{{key}}</view>
  31. <view class="splitLineFlex">
  32. <view class="splitLineBox"></view>
  33. </view>
  34. </view>
  35. <view class="page_item_info" :class="{mt0: i === 0}" v-for="(item, i) in inspects" :key="item.id">
  36. <view class="page_item_info_title">检查项目:<text>{{ item.inspectName }}</text></view>
  37. <view class="page_item_info_title">检查科室:<text>{{ item.execDept ? item.execDept.dept : "" }}</text></view>
  38. <view class="page_item_info_title btn row">
  39. <view>预约时间:<text>{{ item.yyTime | filterSecondDate }}</text><text v-if="item.reservationNumber">({{ item.reservationNumber }})</text></view>
  40. <button @click="changeYyTime(item)" v-if="item.inspectState.value == 1 || item.inspectState.value == 30">修改</button>
  41. </view>
  42. <view class="page_item_info_title row">
  43. <view>是否紧急:<text :class="{red:item.priority===1||item.priority==='1'}">{{ (item.priority===1||item.priority==='1')?'是':'否' }}</text></view>
  44. <view>状态:<text v-if="item.inspectState">{{ item.inspectState.name }}</text></view>
  45. </view>
  46. <view class="buildOrder" @click="build(item)" v-if="!item.gdId&&(item.inspectState.value==1||item.inspectState.value==30)">建单</view>
  47. </view>
  48. </view>
  49. </scroll-view>
  50. <view v-if="isEmpty" class="zwsj">
  51. <image class="zwsj-img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
  52. <view class="zwsj-txt">暂无检查信息</view>
  53. </view>
  54. <view class="toolbar" @click="Scanning()">
  55. <text class="toolbar-icon newicon newicon-saoma"></text>
  56. <text class="toolbar-sao">扫一扫</text>
  57. </view>
  58. <!-- 弹窗 -->
  59. <inspectRemoveModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content" @know="know1" :operate="models1.operate" @ok="ok1" @cancel="cancel1"></inspectRemoveModel>
  60. <!-- 弹窗 -->
  61. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  62. @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
  63. </view>
  64. </template>
  65. <script>
  66. import {
  67. get,
  68. post,
  69. SM,
  70. webHandle
  71. } from "../../http/http.js";
  72. export default {
  73. data() {
  74. return {
  75. SMFlag: true,
  76. isEmpty: true,
  77. options: {},
  78. infoDATA: {},
  79. // 弹窗model1
  80. models1: {
  81. disjunctor: false,
  82. },
  83. // 建单的对象
  84. jdItem: {},
  85. // 弹窗model
  86. models: {
  87. disjunctor: false,
  88. },
  89. //当前登录人所属科室
  90. currenDept: uni.getStorageSync("userData").user.dept,
  91. };
  92. },
  93. methods: {
  94. // 建单
  95. build(data) {
  96. console.log(data);
  97. this.jdItem = data;
  98. this.models = {
  99. disjunctor: true,
  100. title: "提示",
  101. content: `您即将创建【${data.patientName || ""}】患者前往【${
  102. data.execDept ? data.execDept.dept : ""
  103. }】进行【${data.inspectName || ""}】检查,您确认吗?`,
  104. icon: "warn",
  105. operate: {
  106. ok: "确定",
  107. cancel: "取消",
  108. },
  109. };
  110. },
  111. //建单后知道了
  112. know() {
  113. this.models.disjunctor = false;
  114. this.getInfo(this.jdItem.patientCode);
  115. },
  116. //建单确定
  117. ok() {
  118. this.models.disjunctor = false;
  119. let postData = {
  120. deptId: this.infoDATA.department.id
  121. };
  122. let taskId;
  123. uni.showLoading({
  124. title: "加载中",
  125. mask: true,
  126. });
  127. post("/nurse/getDeptTaskType", postData).then((result) => {
  128. if (result.status == 200) {
  129. let obj = result.data.allTaskTypes.filter(
  130. (item) => item.associationType.value == "inspect"
  131. );
  132. if (obj.length) {
  133. taskId = obj[0].id;
  134. let postData = {
  135. workOrder: {
  136. sourceId: 4,
  137. taskType: {
  138. id: taskId,
  139. isHalfInspect: obj[0].isHalfInspect === 1 ? 1 : 0
  140. },
  141. createDept: this.currenDept.id,
  142. startDept: {
  143. id: this.currenDept.id
  144. },
  145. patient: {
  146. patientCode: this.jdItem.patientCode
  147. },
  148. checkList: [{
  149. id: this.jdItem.id
  150. }],
  151. goods: "",
  152. worker: {
  153. id: uni.getStorageSync("userData").user.id
  154. },
  155. workerStartOrderFlag: 1,
  156. },
  157. };
  158. //根据检查的紧急度加急
  159. if (this.jdItem.priority === 1 || this.jdItem.priority === '1') {
  160. postData.workOrder["urgentDetails"] = {
  161. checkStatus: {
  162. id: 329
  163. },
  164. urgentReason: '系统根据检查信息,自动进行加急',
  165. };
  166. }
  167. post("/api/startOrder", postData).then((res) => {
  168. uni.hideLoading();
  169. let msg = res.msg;
  170. let icon = "error";
  171. if (res.status == 200) {
  172. msg = "建单成功";
  173. icon = "success";
  174. }
  175. this.models = {
  176. disjunctor: true,
  177. content: msg,
  178. icon: icon,
  179. operate: {
  180. know: "知道了",
  181. },
  182. };
  183. });
  184. } else {
  185. uni.hideLoading();
  186. this.models = {
  187. disjunctor: true,
  188. content: "建单失败,科室未开通!",
  189. icon: "error",
  190. operate: {
  191. know: "知道了",
  192. },
  193. };
  194. }
  195. } else {
  196. uni.hideLoading();
  197. uni.showToast({
  198. icon: "none",
  199. title: result.msg || "接口获取数据失败!",
  200. });
  201. }
  202. });
  203. },
  204. //建单取消
  205. cancel() {
  206. this.models.disjunctor = false;
  207. },
  208. // 扫一扫
  209. Scanning(qrcodePrefix = '') {
  210. if (!this.SMFlag) {
  211. return;
  212. }
  213. this.SMFlag = false;
  214. SM().then((content) => {
  215. this.SMFlag = true;
  216. this.getInfo(content);
  217. }).catch(err => {
  218. this.SMFlag = true;
  219. });
  220. },
  221. // 修改预约时间->知道了
  222. know1() {
  223. this.models1.disjunctor = false;
  224. },
  225. // 修改预约时间->确定
  226. ok1(data) {
  227. console.log(data);
  228. const { yyTime} = data;//暂时这样
  229. if (!yyTime) {
  230. //没有填写预约时间
  231. uni.showModal({
  232. title: "提示",
  233. content: "请填写预约时间!",
  234. showCancel: false,
  235. success: function(res) {
  236. if (res.confirm) {
  237. console.log("用户点击确定");
  238. } else if (res.cancel) {
  239. console.log("用户点击取消");
  240. }
  241. },
  242. });
  243. return;
  244. }
  245. this.models1.disjunctor = false;
  246. let postData = {
  247. inspectCode: this.currentInspect.inspectCode,
  248. yyTime
  249. };
  250. uni.showLoading({
  251. title: '加载中',
  252. mask: true,
  253. })
  254. post('/workerOrder/updateInspectYytime', postData).then(res => {
  255. uni.hideLoading();
  256. if (res.status == 200) {
  257. this.getInfo(this.options.patientCode);
  258. } else {
  259. uni.showToast({
  260. icon: "none",
  261. title: "修改失败",
  262. });
  263. }
  264. })
  265. },
  266. // 修改预约时间->取消
  267. cancel1() {
  268. this.models1.disjunctor = false;
  269. },
  270. // 修改预约时间
  271. changeYyTime(item) {
  272. this.currentInspect = item;
  273. this.models1 = {
  274. disjunctor: true,
  275. content: `您要修改[${item.inspectName||''}]的预约时间`,
  276. icon: "warn",
  277. operate: {
  278. ok: "确定",
  279. cancel: "取消",
  280. },
  281. };
  282. },
  283. // 请求详细页面的数据
  284. getInfo(patientCode) {
  285. uni.showLoading({
  286. title: "加载中",
  287. mask: true,
  288. });
  289. post("/nurse/workOrder/getPatientInspectInfo", {
  290. patientCode,
  291. }).then((res) => {
  292. uni.hideLoading();
  293. if (res.status == 200) {
  294. res.data.inspectListMap = res.data.inspectListMap || {};
  295. this.isEmpty = Object.keys(res.data.inspectListMap).length === 0;
  296. this.infoDATA = res.data;
  297. } else {
  298. uni.showToast({
  299. icon: "none",
  300. title: res.msg || "接口获取数据失败!",
  301. });
  302. }
  303. });
  304. },
  305. },
  306. onLoad(options) {
  307. this.options = options;
  308. this.getInfo(this.options.patientCode);
  309. // #ifdef APP-PLUS
  310. webHandle("no", "app");
  311. // #endif
  312. // #ifdef H5
  313. webHandle("no", "wx");
  314. // #endif
  315. },
  316. onShow() {
  317. this.SMFlag = true;
  318. }
  319. };
  320. </script>
  321. <style lang="less" scoped>
  322. .toolbar {
  323. margin-bottom: 16rpx;
  324. z-index: 999;
  325. height: 88rpx;
  326. display: flex;
  327. justify-content: center;
  328. align-items: center;
  329. box-sizing: border-box;
  330. border-radius: 4rpx;
  331. background-color: #E5E8ED;
  332. .toolbar-icon {
  333. font-size: 52rpx;
  334. margin-right: 16rpx;
  335. color: #07863c;
  336. }
  337. .toolbar-sao {
  338. font-size: 36rpx;
  339. color: #333;
  340. }
  341. }
  342. .patientInformationInfo {
  343. background-color: #F7F7F7;
  344. display: flex;
  345. flex-direction: column;
  346. height: 100vh;
  347. .zwsj {
  348. flex: 1;
  349. min-height: 0;
  350. text-align: center;
  351. .zwsj-img {
  352. width: 560rpx;
  353. }
  354. .zwsj-txt {
  355. font-size: 36rpx;
  356. font-weight: 700;
  357. margin-top: 20rpx;
  358. text-align: center;
  359. }
  360. }
  361. .page_head {
  362. background-color: #49b856;
  363. color: #fff;
  364. .title {
  365. font-size: 48rpx;
  366. padding-top: 24rpx;
  367. text-align: center;
  368. }
  369. .patientCode {
  370. margin-left: 12rpx;
  371. font-size: 28rpx;
  372. }
  373. .info {
  374. padding-bottom: 24rpx;
  375. margin: 8rpx 0;
  376. height: 80rpx;
  377. display: flex;
  378. justify-content: center;
  379. align-items: center;
  380. .bedNum,
  381. .waitingCount {
  382. width: 300rpx;
  383. height: 100%;
  384. display: flex;
  385. flex-direction: column;
  386. justify-content: center;
  387. align-items: center;
  388. .info_h {
  389. font-size: 30rpx;
  390. }
  391. .info_b {
  392. font-size: 26rpx;
  393. }
  394. }
  395. .bedNum {
  396. position: relative;
  397. &:after {
  398. content: "";
  399. position: absolute;
  400. width: 4rpx;
  401. height: 50rpx;
  402. right: -2rpx;
  403. top: 15rpx;
  404. background-color: #fff;
  405. }
  406. }
  407. }
  408. }
  409. .scrollContent{
  410. flex: 1;
  411. min-height: 0;
  412. }
  413. .page_item {
  414. // margin-bottom: 10rpx;
  415. border-radius: 8rpx;
  416. overflow: hidden;
  417. .splitLine{
  418. height: 50rpx;
  419. display: flex;
  420. align-items: center;
  421. justify-content: center;
  422. color: #8F8F8F;
  423. .splitLineFlex{
  424. flex: 1;
  425. display: flex;
  426. align-items: center;
  427. justify-content: center;
  428. .splitLineBox{
  429. width: calc(100% - 48rpx);
  430. height: 1rpx;
  431. background-color: #8F8F8F;
  432. }
  433. }
  434. }
  435. .page_item_info {
  436. margin-top: 10rpx;
  437. padding: 20rpx 16rpx;
  438. text-align: left;
  439. line-height: 60rpx;
  440. font-size: 30rpx;
  441. background: #fff;
  442. &.mt0{
  443. margin-top: 0;
  444. }
  445. .buildOrder{
  446. width: 258rpx;
  447. height: 72rpx;
  448. background: #49B856;
  449. border-radius: 6rpx;
  450. margin: 0 auto;
  451. color: #FFFFFF;
  452. display: flex;
  453. align-items: center;
  454. justify-content: center;
  455. font-size: 30rpx;
  456. }
  457. .page_item_info_title {
  458. font-weight: 700;
  459. &.btn {
  460. display: flex;
  461. button {
  462. font-size: 28rpx;
  463. color: #49b856;
  464. height: 50rpx;
  465. line-height: 50rpx;
  466. margin: 0;
  467. }
  468. }
  469. &.row{
  470. display: flex;
  471. align-items: center;
  472. justify-content: space-between;
  473. }
  474. text {
  475. font-weight: normal;
  476. &.red {
  477. color: red;
  478. }
  479. }
  480. }
  481. }
  482. }
  483. }
  484. </style>