index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925
  1. <template>
  2. <view class="index">
  3. <view class="arc_edge"></view>
  4. <view class="index_container">
  5. <!-- 头部搜索 -->
  6. <view class="search">
  7. <view class="search_wrap">
  8. <input :focus="isFocus" @blur="blur" placeholder="请输入标本编码/检查单号/患…" :placeholder-style="placeholderStyle"
  9. confirm-type="search" v-model="searchText" :adjust-position="false" />
  10. <view class="searchBtn"> 搜索 </view>
  11. </view>
  12. <view class="icon-saoma">
  13. <text class="pda pda-saoma"></text>
  14. </view>
  15. </view>
  16. <!-- 通告栏 -->
  17. <uni-notice-bar :speed="20" scrollable single showIcon :text="updateTipsForNurses" background-color="#fff"
  18. color="#666">
  19. </uni-notice-bar>
  20. <!-- 一键收标本 -->
  21. <view class="collect_specimens" v-if="openSpecimen">
  22. <view class="collect_icon"> 标 </view>
  23. <view class="collect_specimensNum">
  24. <view class="urgent collect_row" @click="gotoSpecimenList('urgent')">
  25. 急标数量<text class="collect_num">{{
  26. urgentNum | specimenNum
  27. }}</text>
  28. </view>
  29. <view class="ordinary collect_row" @click="gotoSpecimenList('ordinary')">
  30. 普标数量<text class="collect_num">{{
  31. ordinaryNum | specimenNum
  32. }}</text>
  33. </view>
  34. </view>
  35. <button class="collect_btn" type="default" @click="collectSpecimens">
  36. {{ specimenButton }}
  37. </button>
  38. </view>
  39. <!-- 最新工单 -->
  40. <view class="newOrders">
  41. <view class="newOrders_header">
  42. <text class="newOrders_header_title">最新工单</text>
  43. <text class="newOrders_header_more" @click="goToMore">更多&gt;&gt;</text>
  44. </view>
  45. <view class="newOrders_item" v-for="newOrder in newOrderList" :key="newOrder.id" @click="toDetail(newOrder.id)">
  46. <image class="ji" src="../../static/imgs/icon_ji.png" mode="widthFix"
  47. v-if="newOrder.emergencyType && newOrder.emergencyType.value == 2"></image>
  48. <image class="jiaji" src="../../static/imgs/icon_jiaji.png" mode="widthFix"
  49. v-if="newOrder.emergencyType && newOrder.emergencyType.value == 3"></image>
  50. <view class="newOrders_item_time" v-if="newOrder.showCreateTime">{{ newOrder.showCreateTime }}</view>
  51. <view class="newOrders_item_time" v-else-if="newOrder.yyjdTime && newOrder.gdState.value == 11">
  52. {{newOrder.yyjdTime | formatDate('MM-dd HH:mm')}}
  53. </view>
  54. <text class="newOrders_item_taskType">{{
  55. newOrder.isHalfInspect === 1
  56. ? "半程陪检"
  57. : newOrder.taskType && newOrder.taskType.taskName
  58. }}</text>
  59. <text class="newOrders_item_patientName">{{
  60. newOrder.patient && newOrder.patient.patientName
  61. }}</text>
  62. <text class="newOrders_item_status"
  63. :class="newOrder.stateTextClass">{{ newOrder.gdState && newOrder.gdState.name }}</text>
  64. </view>
  65. </view>
  66. <!-- 快捷工单 -->
  67. <view class="quick_other">
  68. <view class="quick_other_header">
  69. <text class="quick_other_header_title">快捷工单</text>
  70. </view>
  71. <view class="quick_other_container">
  72. <view class="quick_other_container_item" v-for="quickOther in quickOtherList" :key="quickOther.id">
  73. <view class="quick_other_container_item_text" @click="quickOrderOther(quickOther)">
  74. {{ quickOther.taskName }}
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <seiminFooterNav></seiminFooterNav>
  81. <seiminModel ref="seiminModel"></seiminModel>
  82. <seiminPicker ref="sPicker" :title="pickerTitle" titleColor="#808080" titleFontSize="28rpx" confirmColor="#333"
  83. confirmFontSize="38rpx" confirmFontWeight="500" itemFontSize="32rpx" @onClose="closePicker"
  84. @onConfirm="confirmPicker" :pickerList="hospitalList">
  85. </seiminPicker>
  86. <seiminScan></seiminScan>
  87. </view>
  88. </template>
  89. <script>
  90. import config from "../../request/config.js";
  91. import {
  92. backPress,
  93. } from '../../utils/index.js';
  94. import {
  95. mapState,
  96. mapMutations,
  97. mapActions
  98. } from "vuex";
  99. import {
  100. reqSpecimenWorkOrderMsg,
  101. reqDeptTaskType,
  102. reqFetchDataList,
  103. } from "../../request/api.js";
  104. import {
  105. GDSTATE
  106. } from "../../utils/enum.gdstate.js";
  107. import {
  108. ASSOCIATION_TYPES
  109. } from "../../utils/enum.association_types.js";
  110. export default {
  111. onBackPress() {
  112. backPress();
  113. },
  114. onShow() {
  115. this.flag = true;
  116. this.searchText = '';
  117. uni.$off('scancodedate');
  118. uni.$on('scancodedate', data => {
  119. let code = data.code || '';
  120. // 过滤
  121. code = code.replace(/^2#/, '')
  122. uni.navigateTo({
  123. url: `/pages/search/search?txt=${code}`,
  124. })
  125. })
  126. },
  127. data() {
  128. return {
  129. isFocus: false,
  130. reFresh: '',
  131. openSpecimen: false, //标本的开通权限
  132. searchText1: '', //首页搜索内容
  133. placeholderStyle: "color:#999;font-size:30rpx;line-height:66rpx;",
  134. urgentNum: 0, //急标数量
  135. ordinaryNum: 0, //普标数量
  136. newOrderList: [], //最新工单列表
  137. quickOtherList: [], //快捷工单列表
  138. hospitalList: [], //当前用户权限中的院区列表
  139. pickerTitle: "", //选择院区picker的title
  140. specimenTaskTypeId: undefined, //标本任务类型id
  141. flag: true, //是否可以跳转
  142. updateTipsForNurses: '', //护士端更新提示
  143. };
  144. },
  145. computed: {
  146. ...mapState("login", ["loginInfo"]),
  147. ...mapState('other', [
  148. "isShowSeiminModel",
  149. "deptDisplay",
  150. "specimenButton",
  151. ]),
  152. searchText: {
  153. get: function() {
  154. return this.searchText1;
  155. },
  156. set: function(newVal) {
  157. this.searchText1 = newVal.replace(/^2#/, '');
  158. if (this.searchText1 && this.flag) {
  159. this.flag = false;
  160. uni.navigateTo({
  161. url: `/pages/search/search?txt=${this.searchText1}`,
  162. })
  163. }
  164. },
  165. },
  166. },
  167. methods: {
  168. ...mapMutations('other', [
  169. "changeSeiminModel",
  170. "changeQucikCreateOrderType",
  171. "changeDeptDisplay",
  172. "changeSpecimenButton",
  173. "changeNurseDeptSwitchTip",
  174. "changeSearchDeptParams",
  175. ]),
  176. ...mapActions('system', ["vxSystem"]),
  177. blur() {
  178. this.isFocus = false;
  179. },
  180. // 前往标本列表
  181. gotoSpecimenList(type) {
  182. uni.navigateTo({
  183. url: `/pages/specimenList/specimenList?urgent=${type==='urgent'?1:0}`
  184. })
  185. },
  186. // 前往工单详情
  187. toDetail(id) {
  188. uni.navigateTo({
  189. url: `/pages/orderDetail/orderDetail?id=${id}`
  190. })
  191. },
  192. // 跳转到工单列表页面
  193. goToMore() {
  194. uni.navigateTo({
  195. url: '/pages/orderList/orderList'
  196. })
  197. },
  198. // 获取页面数据
  199. init() {
  200. uni.showLoading({
  201. title: "加载中",
  202. });
  203. Promise.all([
  204. this.querySpecimenNumRequest(), //查询急标和普标数量
  205. this.queryWorkOrdersRequest(), //查询最新工单列表
  206. this.queryDeptTaskTypeRequest(), //查询快捷工单(其他临床服务任务类型)
  207. this.queryDeptDisplayRequest(), //护士端科室显示选择(名称还是别名)
  208. this.queryUpdateTipsForNursesRequest(), //护士端更新提示
  209. this.querySpecimenButtonRequest(), //标本按钮文字
  210. this.queryNurseDeptSwitchTipRequest(), //护士科室切换提示自动关闭设置
  211. ]).then((values) => {
  212. uni.hideLoading();
  213. uni.stopPullDownRefresh();
  214. this.querySpecimenNumResponse(values[0]);
  215. this.queryWorkOrdersResponse(values[1]);
  216. this.queryDeptTaskTypeResponse(values[2]);
  217. this.queryDeptDisplayResponse(values[3]);
  218. this.queryUpdateTipsForNursesResponse(values[4]);
  219. this.querySpecimenButtonResponse(values[5]);
  220. this.queryNurseDeptSwitchTipResponse(values[6]);
  221. if (this.isShowSeiminModel) {
  222. // 检测更新
  223. this.checkUpdate();
  224. }
  225. });
  226. },
  227. // 检测更新
  228. checkUpdate() {
  229. uni.showLoading({
  230. mask: true,
  231. title: '加载中'
  232. })
  233. let postData = {
  234. "idx": 0,
  235. "sum": 1,
  236. "systemConfiguration": {
  237. "keyconfig": "pdaVersion"
  238. }
  239. };
  240. reqFetchDataList('simple/data', 'systemConfiguration', postData)
  241. .then((data) => {
  242. uni.hideLoading();
  243. if (data.status == 200) {
  244. const version = data.list[0].valueconfig;
  245. // #ifdef APP-PLUS
  246. plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
  247. console.log(wgtinfo.version); //应用版本号
  248. if (wgtinfo.version === version) {
  249. this.showDeptModel();
  250. this.changeSeiminModel(false);
  251. } else {
  252. this.downloadUrl(`${config.pdaDownloadUrl}/pda-v${version}.apk`);
  253. }
  254. })
  255. // #endif
  256. } else {
  257. this.$refs.seiminModel.show({
  258. skin: "toast",
  259. icon: "error",
  260. content: data.error || "获取版本失败",
  261. });
  262. }
  263. });
  264. },
  265. // 下载更新
  266. downloadUrl(Url = '') {
  267. uni.showLoading({
  268. title: '更新中……',
  269. mask: true,
  270. })
  271. const downloadTask = uni.downloadFile({ //执行下载
  272. url: Url, //下载地址
  273. timeout: 1000 * 30, //30秒超时时间
  274. success: downloadResult => { //下载成功
  275. console.log(downloadResult)
  276. uni.hideLoading();
  277. if (downloadResult.statusCode == 200) {
  278. plus.runtime.install( //安装软件
  279. downloadResult.tempFilePath, {
  280. force: true
  281. },
  282. function(res) {
  283. plus.runtime.restart();
  284. }
  285. );
  286. } else {
  287. this.$refs.seiminModel.show({
  288. skin: "toast",
  289. icon: "error",
  290. content: "下载失败",
  291. });
  292. }
  293. },
  294. fail: err => {
  295. uni.hideLoading();
  296. this.$refs.seiminModel.show({
  297. skin: "toast",
  298. icon: "error",
  299. content: "更新失败",
  300. });
  301. console.log(err)
  302. },
  303. });
  304. },
  305. // 查询急标和普标数量
  306. querySpecimenNumRequest() {
  307. if (this.openSpecimen) {
  308. return reqSpecimenWorkOrderMsg({
  309. deptId: this.loginInfo.user.dept.id,
  310. });
  311. } else {
  312. return Promise.resolve();
  313. }
  314. },
  315. // 查询急标和普标数量
  316. querySpecimenNumResponse(res) {
  317. if (!this.openSpecimen) {
  318. return;
  319. }
  320. if (res.status == 200) {
  321. if (res.specimenCount) {
  322. this.urgentNum = res.specimenCount.urgent;
  323. }
  324. if (res.specimenCount) {
  325. this.ordinaryNum = res.specimenCount.noUrgent;
  326. }
  327. } else {
  328. this.$refs.seiminModel.show({
  329. skin: "toast",
  330. icon: "error",
  331. content: res.msg || "获取数据失败",
  332. });
  333. throw new Error(res.msg || '获取数据失败');
  334. }
  335. },
  336. // 查询最新工单列表
  337. queryWorkOrdersRequest() {
  338. return reqFetchDataList("nurse", "workOrder", {
  339. workOrder: {
  340. createDept: this.loginInfo.user.dept.id,
  341. platform: 2,
  342. searchDays: 2,
  343. },
  344. idx: 0,
  345. sum: 5,
  346. });
  347. },
  348. // 查询最新工单列表
  349. queryWorkOrdersResponse(res) {
  350. if (res.status == 200) {
  351. res.list = res.list || [];
  352. this.newOrderList = res.list.map((v) => {
  353. if (v.gdState) {
  354. if (
  355. v.gdState.value == GDSTATE["待接单"] ||
  356. v.gdState.value == GDSTATE["待抢单"]
  357. ) {
  358. v.stateTextClass = "red";
  359. } else if (
  360. v.gdState.value == GDSTATE["待评价"] ||
  361. v.gdState.value == GDSTATE["已完成"]
  362. ) {
  363. v.stateTextClass = "green";
  364. } else {
  365. v.stateTextClass = "yellow";
  366. }
  367. }
  368. return v;
  369. });
  370. } else {
  371. this.$refs.seiminModel.show({
  372. skin: "toast",
  373. icon: "error",
  374. content: res.msg || "获取数据失败",
  375. });
  376. throw new Error(res.msg || '获取数据失败');
  377. }
  378. },
  379. // 查询快捷工单(其他临床服务任务类型)
  380. queryDeptTaskTypeRequest() {
  381. return reqDeptTaskType({
  382. deptId: this.loginInfo.user.dept.id,
  383. });
  384. },
  385. // 查询快捷工单(其他临床服务,标本)
  386. queryDeptTaskTypeResponse(res) {
  387. if (res.status == 200) {
  388. res.data = res.data || {};
  389. res.data.allTaskTypes = res.data.allTaskTypes || [];
  390. this.openSpecimen = res.data.openSpecimen;
  391. this.quickOtherList = res.data.allTaskTypes.filter(
  392. (v) => v.associationType ? v.associationType.value == ASSOCIATION_TYPES["其他临床服务"] : false
  393. );
  394. let specimenTaskType = res.data.allTaskTypes.find(
  395. (v) => v.associationType ? v.associationType.value == ASSOCIATION_TYPES["临时标本业务"] : false
  396. );
  397. this.specimenTaskTypeId = specimenTaskType && specimenTaskType.id;
  398. } else {
  399. this.$refs.seiminModel.show({
  400. skin: "toast",
  401. icon: "error",
  402. content: res.msg || "获取数据失败",
  403. });
  404. throw new Error(res.msg || '获取数据失败');
  405. }
  406. },
  407. // 护士端科室显示选择(名称还是别名)
  408. queryDeptDisplayRequest() {
  409. return this.vxSystem({
  410. idx: 0,
  411. sum: 1,
  412. systemConfiguration: {
  413. keyconfig: "deptDisplay",
  414. },
  415. });
  416. },
  417. // 护士端科室显示选择(名称还是别名)
  418. queryDeptDisplayResponse(res) {
  419. if (res.status == 200) {
  420. res.list = res.list || [];
  421. res.list[0] = res.list[0] || {};
  422. if (!res.list[0].id) {
  423. this.$refs.seiminModel.show({
  424. skin: "toast",
  425. icon: "error",
  426. content: "无法获取到【护士端科室显示选择】配置,请前往配置",
  427. });
  428. throw new Error('无法获取到【护士端科室显示选择】配置,请前往配置');
  429. }
  430. this.changeDeptDisplay(res.list[0].valueconfig);
  431. } else {
  432. this.$refs.seiminModel.show({
  433. skin: "toast",
  434. icon: "error",
  435. content: res.msg || "无法获取到【护士端科室显示选择】配置,请前往配置",
  436. });
  437. throw new Error(res.msg || '无法获取到【护士端科室显示选择】配置,请前往配置');
  438. }
  439. },
  440. // 护士端更新提示
  441. queryUpdateTipsForNursesRequest() {
  442. return this.vxSystem({
  443. idx: 0,
  444. sum: 1,
  445. systemConfiguration: {
  446. keyconfig: "updateTipsForNurses",
  447. },
  448. });
  449. },
  450. // 护士端更新提示
  451. queryUpdateTipsForNursesResponse(res) {
  452. if (res.status == 200) {
  453. res.list = res.list || [];
  454. res.list[0] = res.list[0] || {};
  455. if (!res.list[0].id) {
  456. this.$refs.seiminModel.show({
  457. skin: "toast",
  458. icon: "error",
  459. content: "无法获取到【护士端更新提示】配置,请前往配置",
  460. });
  461. throw new Error('无法获取到【护士端更新提示】配置,请前往配置');
  462. }
  463. this.updateTipsForNurses = res.list[0].valueconfig;
  464. } else {
  465. this.$refs.seiminModel.show({
  466. skin: "toast",
  467. icon: "error",
  468. content: res.msg || "无法获取到【护士端更新提示】配置,请前往配置",
  469. });
  470. throw new Error(res.msg || '无法获取到【护士端更新提示】配置,请前往配置');
  471. }
  472. },
  473. // 标本按钮文字
  474. querySpecimenButtonRequest() {
  475. return this.vxSystem({
  476. idx: 0,
  477. sum: 1,
  478. systemConfiguration: {
  479. keyconfig: "specimenButton",
  480. },
  481. });
  482. },
  483. // 标本按钮文字
  484. querySpecimenButtonResponse(res) {
  485. if (res.status == 200) {
  486. res.list = res.list || [];
  487. res.list[0] = res.list[0] || {};
  488. if (!res.list[0].id) {
  489. this.$refs.seiminModel.show({
  490. skin: "toast",
  491. icon: "error",
  492. content: "无法获取到【标本按钮文字】配置,请前往配置",
  493. });
  494. throw new Error('无法获取到【标本按钮文字】配置,请前往配置');
  495. }
  496. this.changeSpecimenButton(res.list[0].valueconfig);
  497. } else {
  498. this.$refs.seiminModel.show({
  499. skin: "toast",
  500. icon: "error",
  501. content: res.msg || "无法获取到【标本按钮文字】配置,请前往配置",
  502. });
  503. throw new Error(res.msg || '无法获取到【标本按钮文字】配置,请前往配置');
  504. }
  505. },
  506. // 护士科室切换提示自动关闭设置
  507. queryNurseDeptSwitchTipRequest() {
  508. return this.vxSystem({
  509. idx: 0,
  510. sum: 1,
  511. systemConfiguration: {
  512. keyconfig: "nurseDeptSwitchTip",
  513. },
  514. });
  515. },
  516. // 护士科室切换提示自动关闭设置
  517. queryNurseDeptSwitchTipResponse(res) {
  518. if (res.status == 200) {
  519. res.list = res.list || [];
  520. res.list[0] = res.list[0] || {};
  521. if (!res.list[0].id) {
  522. this.$refs.seiminModel.show({
  523. skin: "toast",
  524. icon: "error",
  525. content: "无法获取到【护士科室切换提示自动关闭设置】配置,请前往配置",
  526. });
  527. throw new Error('无法获取到【护士科室切换提示自动关闭设置】配置,请前往配置');
  528. }
  529. this.changeNurseDeptSwitchTip(res.list[0].valueconfig);
  530. } else {
  531. this.$refs.seiminModel.show({
  532. skin: "toast",
  533. icon: "error",
  534. content: res.msg || "无法获取到【护士科室切换提示自动关闭设置】配置,请前往配置",
  535. });
  536. throw new Error(res.msg || '无法获取到【护士科室切换提示自动关闭设置】配置,请前往配置');
  537. }
  538. },
  539. // 一键收取标本
  540. collectSpecimens() {
  541. if (!this.specimenTaskTypeId) {
  542. this.$refs.seiminModel.show({
  543. skin: "toast",
  544. icon: "error",
  545. content: "无法获取到临时标本业务",
  546. });
  547. throw new Error('无法获取到标本任务类型id');
  548. }
  549. this.changeQucikCreateOrderType({
  550. type: "specimen",
  551. taskTypeId: this.specimenTaskTypeId,
  552. });
  553. uni.navigateTo({
  554. url: "/pages/quickCreateOrder/quickCreateOrder",
  555. });
  556. },
  557. //其他临床服务快捷建单
  558. quickOrderOther(quickOther) {
  559. this.changeQucikCreateOrderType({
  560. type: "other",
  561. taskTypeId: quickOther.id,
  562. });
  563. uni.navigateTo({
  564. url: "/pages/quickCreateOrder/quickCreateOrder",
  565. });
  566. },
  567. // 切换科室弹窗
  568. showDeptModel() {
  569. const {
  570. user, //当前登录用户
  571. } = this.loginInfo;
  572. const userDept =
  573. user && user.dept ?
  574. this.deptDisplay == 1 ?
  575. user.dept.dept :
  576. user.dept.deptalias :
  577. "";
  578. this.$refs.seiminModel.showChangeDept({
  579. content: `您当前所属科室为<text class="green">${userDept}</text>,如与您实际科室不符点击<text class="red">切换科室</text>。`,
  580. btns: [{
  581. name: "知道了",
  582. textColor: "#49B856",
  583. flex: 2,
  584. click: () => {
  585. this.$refs.seiminModel.close();
  586. }
  587. },
  588. {
  589. name: "前往切换科室",
  590. textColor: "#666",
  591. flex: 3,
  592. click: (e) => {
  593. this.$refs.seiminModel.close();
  594. this.openPicker();
  595. },
  596. },
  597. ],
  598. });
  599. },
  600. //关闭
  601. closePicker() {
  602. this.$refs.sPicker._close();
  603. },
  604. //打开
  605. openPicker() {
  606. this.$refs.sPicker._open();
  607. let index = this.hospitalList.findIndex(v => v.value == this.loginInfo.user.currentHospital.id);
  608. this.$refs.sPicker._changeValue(index);
  609. },
  610. //确定:接收子组件传来的参数
  611. confirmPicker(checkedObj) {
  612. this.changeSearchDeptParams({
  613. backUrl: "/pages/index/index", //返回的url
  614. type: "changeDept_index", //首页切换科室
  615. hospital: checkedObj, //先选择院区
  616. });
  617. uni.navigateTo({
  618. url: "/pages/searchDept/searchDept",
  619. });
  620. },
  621. },
  622. mounted() {
  623. //选择院区picker的title
  624. this.pickerTitle = `您当前所属科室为<b class="green">${this.loginInfo.user.dept.dept}</b>,请您先选择院区`;
  625. //权限中的院区修改数据结构
  626. this.hospitalList = this.loginInfo.infoPermission.hospitals.map((v) => ({
  627. value: v.id,
  628. label: v.hosName,
  629. }));
  630. this.init();
  631. },
  632. onPullDownRefresh() {
  633. this.init();
  634. },
  635. };
  636. </script>
  637. <style lang="scss" scoped>
  638. .index {
  639. padding-bottom: 108rpx;
  640. // 弧形背景
  641. .arc_edge {
  642. @include arc_edge(220rpx);
  643. }
  644. .index_container {
  645. padding: 0 24rpx;
  646. position: relative;
  647. z-index: 2;
  648. // 搜素框
  649. .search {
  650. height: 66rpx;
  651. margin-top: -200rpx;
  652. @include flex(space-between, center);
  653. .search_wrap {
  654. width: 600rpx;
  655. height: 100%;
  656. border-radius: 33rpx;
  657. background-color: #fff;
  658. position: relative;
  659. input {
  660. height: 100%;
  661. padding-left: 33rpx;
  662. padding-right: 147rpx;
  663. }
  664. .searchBtn {
  665. position: absolute;
  666. right: 0;
  667. top: 50%;
  668. transform: translateY(-50%);
  669. line-height: 1em;
  670. color: #666;
  671. font-size: 32rpx;
  672. width: 110rpx;
  673. text-align: center;
  674. padding: 6rpx 0;
  675. @include border(left);
  676. }
  677. }
  678. .icon-saoma {
  679. width: 66rpx;
  680. height: 66rpx;
  681. background-color: #bee1a7;
  682. border-radius: 50%;
  683. color: $defaultColor;
  684. @include flex(center, center);
  685. }
  686. }
  687. // 通告栏
  688. .uni-noticebar {
  689. height: 88rpx;
  690. margin-top: 24rpx;
  691. margin-bottom: 0;
  692. @include border;
  693. }
  694. // 一键收标本
  695. .collect_specimens {
  696. width: 702rpx;
  697. height: 176rpx;
  698. background-color: #fff;
  699. margin-top: 8rpx;
  700. border-radius: 8rpx;
  701. // box-shadow: 0 0 7rpx 0 rgba(73, 184, 86, 0.09);
  702. position: relative;
  703. @include border;
  704. @include flex(center, center);
  705. @include semicircle(#f9fafb);
  706. .collect_icon {
  707. width: 48rpx;
  708. height: 48rpx;
  709. border-radius: 50%;
  710. background-color: rgba(57, 177, 153, 0.3);
  711. font-size: 24rpx;
  712. color: #39b199;
  713. @include border($color:#39b199);
  714. @include flex(center, center);
  715. }
  716. .collect_specimensNum {
  717. margin: 0 35rpx;
  718. width: 277rpx;
  719. font-size: 34rpx;
  720. color: #666;
  721. .collect_num {
  722. font-size: 46rpx;
  723. font-weight: 600;
  724. color: #333;
  725. margin-left: 16rpx;
  726. }
  727. .collect_row {
  728. height: 88rpx;
  729. @include border($directive:bottom, $style:dashed);
  730. @include flex(flex-start, center);
  731. &:last-of-type {
  732. border-bottom: none;
  733. }
  734. }
  735. }
  736. .collect_btn {
  737. margin: 0;
  738. width: 224rpx;
  739. height: 88rpx;
  740. background: linear-gradient(90deg, #74c271 0%, #39b199 100%);
  741. border-radius: 56rpx;
  742. color: #fff;
  743. font-size: 32rpx;
  744. line-height: 88rpx;
  745. @include clamp;
  746. &::after {
  747. border: none;
  748. }
  749. }
  750. }
  751. // 最新工单
  752. .newOrders {
  753. width: 702rpx;
  754. min-height: 530rpx;
  755. background-color: #fff;
  756. margin-top: 8rpx;
  757. border-radius: 8rpx;
  758. // box-shadow: 0 0 7rpx 0 rgba(73, 184, 86, 0.09);
  759. position: relative;
  760. padding: 0 15rpx;
  761. font-size: 32rpx;
  762. @include border;
  763. @include semicircle(#f9fafb, 70rpx);
  764. .newOrders_header {
  765. height: 87rpx;
  766. padding: 0 27rpx;
  767. @include border($directive:bottom, $style:dashed);
  768. @include flex(space-between, center);
  769. .newOrders_header_title {
  770. color: #333;
  771. }
  772. .newOrders_header_more {
  773. color: #666;
  774. }
  775. }
  776. .newOrders_item {
  777. height: 88rpx;
  778. padding: 0 27rpx;
  779. color: #333;
  780. font-size: 30rpx;
  781. position: relative;
  782. @include border(bottom);
  783. @include flex(center, center);
  784. .ji,
  785. .jiaji {
  786. width: 60rpx;
  787. position: absolute;
  788. right: 0;
  789. top: 0;
  790. }
  791. &:last-of-type {
  792. border-bottom: none;
  793. }
  794. .newOrders_item_time {
  795. width: 88rpx;
  796. text-align: center;
  797. }
  798. .newOrders_item_taskType {
  799. flex: 1;
  800. margin-left: 16rpx;
  801. @include clamp(1);
  802. }
  803. .newOrders_item_patientName {
  804. margin-left: 16rpx;
  805. margin-right: 16rpx;
  806. width: 148rpx;
  807. @include clamp(1);
  808. }
  809. .newOrders_item_status {
  810. width: 4em;
  811. }
  812. }
  813. }
  814. // 快捷工单
  815. .quick_other {
  816. width: 702rpx;
  817. background-color: #fff;
  818. margin-top: 8rpx;
  819. border-radius: 8rpx;
  820. // box-shadow: 0 0 7rpx 0 rgba(73, 184, 86, 0.09);
  821. position: relative;
  822. padding: 0 15rpx;
  823. font-size: 32rpx;
  824. @include border;
  825. @include semicircle(#f9fafb, 70rpx);
  826. .quick_other_header {
  827. height: 87rpx;
  828. padding: 0 27rpx;
  829. @include border($directive:bottom, $style:dashed);
  830. @include flex(space-between, center);
  831. .quick_other_header_title {
  832. color: #333;
  833. }
  834. }
  835. .quick_other_container {
  836. min-height: 288rpx;
  837. @include flex(flex-start, center);
  838. flex-wrap: wrap;
  839. font-size: 28rpx;
  840. .quick_other_container_item {
  841. width: 96rpx;
  842. height: 96rpx;
  843. border-radius: 8rpx;
  844. margin: 16rpx 35rpx;
  845. color: #fff;
  846. text-align: center;
  847. @include flex(center, center);
  848. .quick_other_container_item_text {
  849. @include clamp(2);
  850. }
  851. &:nth-of-type(8n + 1) {
  852. background-color: #a4c4c1;
  853. }
  854. &:nth-of-type(8n + 2) {
  855. background-color: #56bab6;
  856. }
  857. &:nth-of-type(8n + 3) {
  858. background-color: #39b199;
  859. }
  860. &:nth-of-type(8n + 4) {
  861. background-color: #48717f;
  862. }
  863. &:nth-of-type(8n + 5) {
  864. background-color: #56bab6;
  865. }
  866. &:nth-of-type(8n + 6) {
  867. background-color: #a4c4c1;
  868. }
  869. &:nth-of-type(8n + 7) {
  870. background-color: #48717f;
  871. }
  872. &:nth-of-type(8n + 8) {
  873. background-color: #8e9d9e;
  874. }
  875. }
  876. }
  877. }
  878. }
  879. }
  880. </style>