123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- <template>
- <view class="appointmentInspect">
- <view class="qco_msg" id="qco_msg">
- <view class="qco_msg1" v-html="patientMsg"></view>
- <view class="qco_msg2 red" v-if="isMoreDept">您选择的检查包含了多个科室,请您只包含一个科室</view>
- </view>
- <view class="select_block_wrap" :style="{mariginTop:qcoHeight+'px'}">
- <view class="uni-list">
- <checkbox-group @change="checkboxChange">
- <scroll-view scroll-y class="scrollHeight">
- <label class="inspect_listItem" v-for="inspect in inspects" :key="inspect.value">
- <image class="ji" src="../../static/imgs/icon_ji.png" mode="widthFix" v-if="inspect.priority == 1">
- </image>
- <view class="inspect_listItem_header">
- <view class="inspect_listItem_header_title">
- <checkbox color="#09BB07" :value="inspect.value" :checked="inspect.checked" />
- <view class="inspectInfo">
- <text class="info">
- <text v-if="inspect.yyTime">{{inspect.yyTime|formatDate('MM-dd HH:mm')}}</text>
- <text class="dept" v-if="inspect.execDept">
- {{deptDisplay == 2?inspect.execDept.deptalias:inspect.execDept.dept}}
- </text>
- </text>
- </view>
- </view>
- </view>
- <view class="inspect_listItem_item">
- <view class="inspect_listItem_item_content">
- <text class="inspect_listItem_item_name">进行 {{inspect.inspectName || "检查"}}</text>
- </view>
- </view>
- </label>
- </scroll-view>
- </checkbox-group>
- </view>
- </view>
-
- <seiminFooterBtn :btns="btns"></seiminFooterBtn>
- <seiminModel ref="seiminModel"></seiminModel>
- </view>
- </template>
- <script>
- import {
- backPress
- } from '../../utils/index.js';
- import cloneDeep from 'lodash/cloneDeep';
- import {
- mapState,
- mapMutations
- } from "vuex";
- import {
- ASSOCIATION_TYPES
- } from "../../utils/enum.association_types.js";
- export default {
- onBackPress() {
- backPress();
- },
- data() {
- return {
- reFresh: '',
- ASSOCIATION_TYPES,
- qcoHeight: 0,
-
- isMoreDept: false,
-
- inspects: [],
-
- isUrgent: false,
-
- goods: [],
-
- patientMsg: '',
-
- queryParams: {},
-
- btns: [{
- name: "上一步",
- type: "primary",
- click: () => {
- uni.navigateBack();
- },
- }, ],
- };
- },
- computed: {
- ...mapState('login', ['loginInfo']),
- ...mapState('other', [
- "deptDisplay",
- 'patientBuildTrip',
- 'selectedPatient',
- 'patientTaskType',
- ]),
- },
- methods: {
- ...mapMutations('other', ['changePatientBuildData']),
-
- resizeQcoHeight() {
-
- let data = this.inspects.filter(v => v.checked);
-
- if (data.length && this.patientTaskType.isMoreDept === 0) {
- let arr = data.filter((item) => item.execDept).map((item) => item.execDept.id);
- arr = Array.from(new Set(arr));
- this.isMoreDept = arr.length > 1;
- } else {
- this.isMoreDept = false;
- }
-
- this.$nextTick(() => {
- uni.createSelectorQuery().in(this).select('#qco_msg').boundingClientRect(data => {
- this.qcoHeight = data.height;
- console.log(data)
- }).exec();
- })
-
- if (data.length && !this.isMoreDept) {
- this.btns = [{
- name: "上一步",
- type: "primary",
- click: () => {
- uni.navigateBack();
- },
- }, {
- name: "下一步",
- type: "primary",
- click: () => {
-
- this.changePatientBuildData({
- key: 'checks',
- value: this.inspects.filter(v => v.checked)
- });
- uni.navigateTo({
- url: '/pages/patientBuild/patientBuild'
- })
- },
- }, ]
- } else {
- this.btns = [{
- name: "上一步",
- type: "primary",
- click: () => {
- uni.navigateBack();
- },
- }, ]
- }
- },
-
- switchChange(e) {
- this.isUrgent = e.detail.value;
- this.urgentRemark = '';
- },
-
- checkboxChange: function(e) {
- console.log(e, this.inspects);
- var inspects = this.inspects,
- values = e.detail.value;
- for (var i = 0, lenI = inspects.length; i < lenI; ++i) {
- const item = inspects[i]
- if (values.includes(item.value)) {
- this.$set(item, 'checked', true)
- } else {
- this.$set(item, 'checked', false)
- }
- }
- this.resizeQcoHeight();
- },
-
- buildOrder() {
- console.log(this.urgentRemark)
- console.log(this.isUrgent)
- console.log(this.goods)
-
- if (this.isUrgent && !this.urgentRemark) {
- this.$refs.seiminModel.show({
- skin: 'toast',
- icon: 'warn',
- content: '请填写加急原因',
- })
- return;
- }
- }
- },
- onLoad(queryParams) {
- this.resizeQcoHeight();
- this.patientMsg = `以下是患者<b class="green">${this.selectedPatient.patientName}</b>当天预约的检查,请选择本次服务的检查项`;
- let inspects = this.patientBuildTrip.data ? cloneDeep(this.patientBuildTrip.data) : [];
- inspects.forEach(v => {
- v.label = v.inspectName;
- v.value = v.id.toString();
- });
- this.inspects = inspects
- console.log(this.inspects)
- this.queryParams = queryParams;
- },
- };
- </script>
- <style lang="scss" scoped>
- .appointmentInspect {
- padding-bottom: 108rpx;
- ::v-deep uni-checkbox .uni-checkbox-input {
- width: 40rpx;
- height: 40rpx;
- }
- ::v-deep .uni-checkbox-input-checked {
- background-color: #09BB07;
- &:before {
- color: #fff;
- }
- }
- ::v-deep uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
- border-color: #09BB07;
- }
- .qco_msg {
- background-color: #f9fafb;
- position: fixed;
- width: 100%;
- z-index: 99;
- padding: 32rpx 32rpx 0;
- color: #999;
- line-height: 40rpx;
- font-size: 32rpx;
- text-align: center;
- }
- .qco_msg1 {
- padding-bottom: 16rpx;
- }
- .qco_msg2 {
- padding: 16rpx 0;
- line-height: 40rpx;
- font-size: 32rpx;
- text-align: center;
- @include border(top);
- }
- .select_block_wrap {
- padding: 144rpx 24rpx 0;
- .scrollHeight {
- height: 100%;
- }
- .inspect_listItem {
- width: 702rpx;
- background-color: #fff;
- margin-top: 8rpx;
- border-radius: 8rpx;
- position: relative;
- padding: 0 24rpx;
- font-size: 32rpx;
- @include border;
- @include semicircle(#f9fafb, 82rpx);
- @include flex(flex-start, stretch, column);
- .ji {
- width: 60rpx;
- position: absolute;
- right: 0;
- top: 0;
- }
- .inspect_listItem_header {
- height: 86rpx;
- @include border($directive:bottom, $style:dashed);
- @include flex(space-between, center);
- .inspect_listItem_header_title {
- color: #333;
- flex: 1;
- @include flex(flex-start, center);
- .inspectInfo {
- flex: 1;
- @include flex;
- .info {
- color: #333;
- font-size: 36rpx;
- font-weight: bold;
- @include clamp;
- .dept {
- margin-left: 8rpx;
- }
- }
- .workerName {
- flex: 1;
- @include clamp;
- }
- }
- }
- }
- .inspect_listItem_item {
- height: 88rpx;
- color: #333;
- font-size: 30rpx;
- flex: 1;
- @include border(bottom);
- @include flex(flex-start, stretch, column);
- &:last-of-type {
- border-bottom: none;
- }
- .inspect_listItem_item_content {
- flex: 1;
- padding: 14rpx 0;
- @include flex(space-between, center);
- .inspect_listItem_item_name {
- color: #333;
- font-size: 36rpx;
- text-indent: 1.5em;
- @include clamp;
- }
- }
- }
- }
- }
- }
- </style>
|