|
@@ -2,18 +2,16 @@
|
|
|
<view class="main">
|
|
|
<view class="top">
|
|
|
<view class="nameBox">
|
|
|
- <view class="name">{{patientName}}</view>
|
|
|
- <text class="icon arrow" style="margin-left: 10px;"></text>
|
|
|
+ <view class="name">{{ patientName }}</view>
|
|
|
+ <text class="icon arrow" style="margin-left: 10px"></text>
|
|
|
<view class="change" @click="go('/pages/detection/doctor/selectUser')">切换就诊人</view>
|
|
|
</view>
|
|
|
- <view class="cardNum">{{cardId}}</view>
|
|
|
- <view style="display: flex;text-align: center;margin: 5px;padding: 13px;font-size: 13px;"
|
|
|
- @click="calendar = true">
|
|
|
+ <view class="cardNum">{{ cardId }}</view>
|
|
|
+ <view style="display: flex; text-align: center; margin: 5px; padding: 13px; font-size: 13px" @click="calendar = true">
|
|
|
<input placeholder="点击选择时间" :disabled="true" v-model="startTime" type="select" />
|
|
|
<view>至</view>
|
|
|
<input placeholder="点击选择时间" :disabled="true" v-model="endTime" type="select" />
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
|
|
|
<view class="tab">
|
|
@@ -28,176 +26,173 @@
|
|
|
</view>
|
|
|
<u-empty v-if="list.length == 0"></u-empty>
|
|
|
</view>
|
|
|
- <u-calendar :show="calendar" monthNum="120" mode="range" :maxDate="util.getDate()" minDate="2020-01-01"
|
|
|
- @confirm="confirm" @close="close()" :closeOnClickOverlay="true"></u-calendar>
|
|
|
+ <u-calendar :show="calendar" monthNum="120" mode="range" :maxDate="util.getDate()" minDate="2020-01-01" @confirm="confirm" @close="close()" :closeOnClickOverlay="true"></u-calendar>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- userList: [],
|
|
|
- current: 0,
|
|
|
- time: null,
|
|
|
- tab: [{
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ userList: [],
|
|
|
+ current: 0,
|
|
|
+ time: null,
|
|
|
+ tab: [
|
|
|
+ {
|
|
|
label: '就诊记录'
|
|
|
- }, ],
|
|
|
- startTime: null,
|
|
|
- endTime: null,
|
|
|
- list: [],
|
|
|
- param: {
|
|
|
-
|
|
|
- },
|
|
|
- loadMore: true,
|
|
|
- calendar: false,
|
|
|
- user:{},
|
|
|
- patId:null,
|
|
|
- patientName:null,
|
|
|
- }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ startTime: null,
|
|
|
+ endTime: null,
|
|
|
+ list: [],
|
|
|
+ param: {},
|
|
|
+ calendar: false,
|
|
|
+ user: {},
|
|
|
+ patId: null,
|
|
|
+ patientName: null
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onLoad(e) {
|
|
|
+ console.log(e);
|
|
|
+ //this.setDefTime()
|
|
|
+ this.patId = e.patId;
|
|
|
+ this.patientName = e.patientName;
|
|
|
+ this.cardId = e.cardId;
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ setDefTime() {
|
|
|
+ const today = new Date();
|
|
|
+ const todayYear = today.getFullYear();
|
|
|
+ const todayMonth = today.getMonth() + 1 < 10 ? '0' + (today.getMonth() + 1) : today.getMonth() + 1;
|
|
|
+ const todayDay = today.getDate() < 10 ? '0' + today.getDate() : today.getDate();
|
|
|
+ this.param.endTime = todayYear + todayMonth + todayDay;
|
|
|
+ this.endTime = todayYear + '-' + todayMonth + '-' + todayDay;
|
|
|
+
|
|
|
+ let beforeTime = new Date(today.getTime() - 24 * 60 * 60 * 1000 * 30);
|
|
|
+ //一个月前
|
|
|
+ let beforeTimeYear = beforeTime.getFullYear();
|
|
|
+ let beforeTimeMonth = beforeTime.getMonth() + 1;
|
|
|
+ let beforeTimeDay = beforeTime.getDate();
|
|
|
+ beforeTimeMonth = beforeTimeMonth < 10 ? '0' + beforeTimeMonth : beforeTimeMonth;
|
|
|
+ beforeTimeDay = beforeTimeDay < 10 ? '0' + beforeTimeDay : beforeTimeDay;
|
|
|
+ this.param.startTime = beforeTimeYear + beforeTimeMonth + beforeTimeDay;
|
|
|
+ this.startTime = beforeTimeYear + '-' + beforeTimeMonth + '-' + beforeTimeDay;
|
|
|
+ },
|
|
|
+ confirm(e) {
|
|
|
+ this.calendar = false;
|
|
|
+ this.param.startTime = e[0].replace(/-/g, '');
|
|
|
+ this.param.endTime = e[e.length - 1].replace(/-/g, '');
|
|
|
+ this.startTime = e[0];
|
|
|
+ this.endTime = e[e.length - 1];
|
|
|
+ this.refresh();
|
|
|
+ },
|
|
|
+ close() {
|
|
|
+ this.calendar = false;
|
|
|
},
|
|
|
- onLoad(e) {
|
|
|
+ getData() {
|
|
|
+ this.http.request({
|
|
|
+ url: '/work/request/patid/' + this.patId,
|
|
|
+ data: this.param,
|
|
|
+ success: (res) => {
|
|
|
+ this.list = res.data.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ click(e) {
|
|
|
+ this.current = e.index;
|
|
|
+ this.param.type = e.dictValue;
|
|
|
+ this.refresh();
|
|
|
+ },
|
|
|
+ selectTime(e) {
|
|
|
console.log(e);
|
|
|
- //this.setDefTime()
|
|
|
- this.patId = e.patId
|
|
|
- this.patientName = e.patientName
|
|
|
- this.cardId = e.cardId
|
|
|
- this.getData();
|
|
|
},
|
|
|
- methods: {
|
|
|
- setDefTime() {
|
|
|
- const today = new Date();
|
|
|
- const todayYear = today.getFullYear()
|
|
|
- const todayMonth = (today.getMonth() + 1) < 10 ? "0" + (today.getMonth() + 1) : (today.getMonth() + 1)
|
|
|
- const todayDay = today.getDate() < 10 ? "0" + today.getDate() : today.getDate()
|
|
|
- this.param.endTime = todayYear + todayMonth + todayDay
|
|
|
- this.endTime = todayYear + '-' + todayMonth + '-' + todayDay
|
|
|
-
|
|
|
- let beforeTime = new Date(today.getTime() - 24 * 60 * 60 * 1000 * 30);
|
|
|
- //一个月前
|
|
|
- let beforeTimeYear = beforeTime.getFullYear();
|
|
|
- let beforeTimeMonth = beforeTime.getMonth() + 1;
|
|
|
- let beforeTimeDay = beforeTime.getDate();
|
|
|
- beforeTimeMonth = beforeTimeMonth < 10 ? "0" + beforeTimeMonth : beforeTimeMonth;
|
|
|
- beforeTimeDay = beforeTimeDay < 10 ? "0" + beforeTimeDay : beforeTimeDay;
|
|
|
- this.param.startTime = beforeTimeYear + beforeTimeMonth + beforeTimeDay
|
|
|
- this.startTime = beforeTimeYear + "-" + beforeTimeMonth + "-" + beforeTimeDay
|
|
|
-
|
|
|
- },
|
|
|
- confirm(e) {
|
|
|
- this.calendar = false;
|
|
|
- this.param.startTime = e[0].replace(/-/g, '');;
|
|
|
- this.param.endTime = e[e.length - 1].replace(/-/g, '');;
|
|
|
- this.startTime = e[0]
|
|
|
- this.endTime = e[e.length - 1]
|
|
|
- this.refresh();
|
|
|
- },
|
|
|
- close() {
|
|
|
- this.calendar = false;
|
|
|
- },
|
|
|
- getData() {
|
|
|
- this.http.request({
|
|
|
- url: '/work/request/patid/' + this.patId,
|
|
|
- data:this.param,
|
|
|
- success: (res) => {
|
|
|
- this.list = res.data.data;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- click(e) {
|
|
|
- this.current = e.index;
|
|
|
- this.param.type = e.dictValue;
|
|
|
- this.refresh();
|
|
|
- },
|
|
|
- selectTime(e) {
|
|
|
- console.log(e);
|
|
|
- },
|
|
|
- go(url) {
|
|
|
- uni.navigateTo({
|
|
|
- url: url
|
|
|
- });
|
|
|
- },
|
|
|
- //刷新数据
|
|
|
- refresh() {
|
|
|
- this.loadMore = true;
|
|
|
- // this.param.pageNum = 1;
|
|
|
- this.list = [];
|
|
|
- this.getData();
|
|
|
- }
|
|
|
+ go(url) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: url
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //刷新数据
|
|
|
+ refresh() {
|
|
|
+ this.list = [];
|
|
|
+ this.getData();
|
|
|
}
|
|
|
}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- .top {
|
|
|
- padding: 15px;
|
|
|
- background-color: white;
|
|
|
- border-radius: 8px;
|
|
|
-
|
|
|
- .nameBox {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
+.top {
|
|
|
+ padding: 15px;
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 8px;
|
|
|
|
|
|
- .name {
|
|
|
- font-weight: bold;
|
|
|
- font-size: 16px;
|
|
|
- }
|
|
|
+ .nameBox {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
|
|
|
- .change {
|
|
|
- color: royalblue;
|
|
|
- margin-left: 20px;
|
|
|
- }
|
|
|
+ .name {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
}
|
|
|
|
|
|
- .cardNum {
|
|
|
- padding-top: 10px;
|
|
|
- font-size: 14px;
|
|
|
+ .change {
|
|
|
+ color: royalblue;
|
|
|
+ margin-left: 20px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .content {
|
|
|
- padding: 15px;
|
|
|
- background-color: white;
|
|
|
- border-radius: 8px;
|
|
|
-
|
|
|
- .list {
|
|
|
- .item {
|
|
|
- overflow: hidden;
|
|
|
- padding: 13px 0;
|
|
|
- border-bottom: 1px solid $line;
|
|
|
- margin-bottom: 10px;
|
|
|
-
|
|
|
- .title {
|
|
|
- font-size: 18px;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
+ .cardNum {
|
|
|
+ padding-top: 10px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.content {
|
|
|
+ padding: 15px;
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 8px;
|
|
|
+
|
|
|
+ .list {
|
|
|
+ .item {
|
|
|
+ overflow: hidden;
|
|
|
+ padding: 13px 0;
|
|
|
+ border-bottom: 1px solid $line;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ &:last-child {
|
|
|
+ border: 0px;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
|
|
|
- .time {
|
|
|
- font-size: 14px;
|
|
|
- padding-top: 15px;
|
|
|
- color: $font-c;
|
|
|
- }
|
|
|
+ .time {
|
|
|
+ font-size: 14px;
|
|
|
+ padding-top: 15px;
|
|
|
+ color: $font-c;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
|
|
|
- .userChangeTitle {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- height: 48px;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
+.userChangeTitle {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ height: 48px;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
|
|
|
- .userChangeItem {
|
|
|
- width: 100%;
|
|
|
+.userChangeItem {
|
|
|
+ width: 100%;
|
|
|
|
|
|
- .userChangeItemName {
|
|
|
- padding: 5px 10px;
|
|
|
- }
|
|
|
+ .userChangeItemName {
|
|
|
+ padding: 5px 10px;
|
|
|
+ }
|
|
|
|
|
|
- .userChangeCartNo {
|
|
|
- padding: 5px 10px;
|
|
|
- }
|
|
|
+ .userChangeCartNo {
|
|
|
+ padding: 5px 10px;
|
|
|
}
|
|
|
-</style>
|
|
|
+}
|
|
|
+</style>
|