index.vue 28 KB

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