Compare commits

..

No commits in common. "366bf072a9e2571733aee18b9cd55a71ec6ba924" and "67af8e3c2bb3f631ea5be5827d97fe205b178e86" have entirely different histories.

9 changed files with 245 additions and 298 deletions

45
App.vue
View File

@ -1,36 +1,17 @@
<script setup>
import { onLaunch } from "@dcloudio/uni-app"
onLaunch(() => {
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
//
// console.log(res.hasUpdate)
})
updateManager.onUpdateReady(function () {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success(res) {
if (res.confirm) {
// applyUpdate
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
//
uni.showToast({
title: '更新失败,请手动清理缓存重试',
icon: 'none'
});
})
})
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
/*每个页面公共css */
</style>

View File

@ -7,26 +7,18 @@
},
"pages": [
{
"path": "pages/patient/patientList",
"style": {
"navigationBarTitleText": "患者列表"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "个人中心"
}
},
{
"path": "pages/patient/addTask",
"path": "pages/patient/patient",
"style": {
"navigationBarTitleText": "新增任务"
"navigationBarTitleText": "患者列表"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",

View File

@ -28,8 +28,8 @@ const clickMenu = (value) => {
}
switch (value) {
case 0:
uni.navigateTo({
url:"/pages/patient/patientList"
wx.navigateTo({
url:"/pages/patient/patient"
})
break;
@ -94,11 +94,6 @@ const logout = async() => {
<button class="feedback_btn">软件使用反馈</button>
<!-- 退出登录 -->
<button v-if="userStore.isLogin" class="logout_btn" type="warn" @tap="logout">退出登录</button>
<view class="bottom shadow">
<view></view>
<view></view>
<view>我的</view>
</view>
</view>
<!-- 登录弹出框 -->
<wd-popup v-model="showModel" :close-on-click-modal="false" position="bottom" custom-style="border-radius: 20rpx 20rpx 0 0;">
@ -195,30 +190,11 @@ const logout = async() => {
height: 95rpx;
line-height: 95rpx;
background-color: #fff;
text-align-last: left;
}
.logout_btn {
font-size: 30rpx;
height: 95rpx;
line-height: 95rpx;
text-align-last: left;
}
.bottom {
position: fixed;
bottom: 2rpx;
left: 0;
display: flex;
width: 100%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
font-size: 28rpx;
view {
width: 33%;
border-right: 1px solid #dddddd;
&:last-child { border: none; }
}
}
}
.login_model {

View File

@ -1,7 +0,0 @@
<script setup>
</script>
<template>
新增任务
</template>
<style lang="scss" scoped></style>

228
pages/patient/patient.vue Normal file
View File

@ -0,0 +1,228 @@
<script setup>
import { ref } from 'vue';
let active = ref('all')
let cutNav = (type) => {
active.value = type
}
</script>
<template>
<wd-watermark content="wot-design-uni"></wd-watermark>
<wd-fab inactiveIcon="ellipsis" activeIcon="rollback">
<view class="fab">
<view>调压趋势</view>
<view>新增任务</view>
<view>新增手术</view>
</view>
</wd-fab>
<view class="nav_bar">
<view class="nav">
<text @tap="cutNav('all')" :class="{active: active === 'all'}">全部</text>
<text @tap="cutNav('week')" :class="{active: active === 'week'}">本周</text>
<text @tap="cutNav('month')" :class="{active: active === 'month'}">本月</text>
<text @tap="cutNav('custom')" :class="{active: active === 'custom'}">自定义</text>
</view>
<wd-search placeholder="住院号/病人名称/医生" hide-cancel />
</view>
<view class="patient_list">
<view class="item" v-for="value in 10" :key="value">
<view class="top">
<text>已完成</text>
<text>住院号000000</text>
</view>
<view class="content">
<view class="user_info">
<view class="img">
<image src="/static/patient.png"></image>
</view>
<view class="user">
<view>
<view class="name">林莲英</view>
<view>手术时间</view>
</view>
<view>
<view>00000000000</view>
<view class="date">2020-12-22</view>
</view>
</view>
</view>
<view class="drug">
<view>植入物品牌</view>
<view>索菲萨</view>
<view>原发病</view>
<view>小脑但脂瘤</view>
</view>
<view class="stress">
<view>
<view>初始压力</view>
<view class="start">110</view>
</view>
<view>
<view>当前压力</view>
<view class="current">110</view>
</view>
<view>
<view>脑积水类型</view>
<view class="type">交通性高压性</view>
</view>
</view>
<view class="btns">
<text>调压趋势</text>
<text>调压记录</text>
<text class="add">新增任务</text>
</view>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.fab {
view{
background: #4d80f0;
width: 112rpx;
height: 112rpx;
border-radius: 50%;
color: #fff;
box-sizing: border-box;
line-height: 34rpx;
padding: 20rpx 28rpx;
font-size: 14px;
margin-top: 18rpx;
}
}
.nav_bar {
position: sticky;
left: 0;
top: 0;
background-color: #fff;
.nav {
display: flex;
justify-content: space-around;
align-items: center;
font-size: 28rpx;
color: #6b7280;
padding: 10rpx;
text {
padding: 10rpx 16rpx;
border-radius: 5rpx;
}
}
.active {
background: #3b82f6;
color: #ffffff;
border: 1rpx solid #3b82f6;
}
}
.patient_list {
background-color: #e0e0e0;
padding: 15rpx;
font-size: 24rpx;
color: #a3a5a6;
.item {
background-color: #fff;
overflow: hidden;
border-radius: 10rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
margin-bottom: 15rpx;
.top {
display: flex;
justify-content: space-between;
background-color: #d4edda;
padding: 20rpx;
color: #155724;
text:first-of-type {
background: rgba(21, 87, 36, 0.1);
padding: 5rpx 12rpx;
border-radius: 5rpx;
}
}
.content {
padding: 20rpx;
.user_info {
display: flex;
line-height: 40rpx;
// justify-content: space-between;
.img {
display: flex;
align-items: center;
justify-content: center;
width: 65rpx;
height: 65rpx;
border-radius: 50%;
margin-right: 18rpx;
background-color: #e9ecef;
image {
width: 40rpx;
height: 40rpx;
}
}
.user {
flex: 1;
> view {
display: flex;
justify-content: space-between;
}
.name {
font-weight: bold;
font-size: 32rpx;
color: #212529;
}
.date {
font-size: 26rpx;
font-weight: bold;
}
}
}
.drug {
display: flex;
flex-wrap: wrap;
line-height: 40rpx;
margin: 20rpx 0;
view {
width: 50%;
}
}
.stress {
display: flex;
border-radius: 12rpx;
padding: 22rpx;
background-color: #f8f9fa;
justify-content: space-around;
text-align: center;
font-size: 22rpx;
line-height: 40rpx;
.start {
font-size: 28rpx;
font-weight: bold;
}
.current {
font-size: 28rpx;
font-weight: bold;
color: #20c997;
}
.type {
font-size: 26rpx;
}
}
.btns {
display: flex;
gap: 15rpx;
margin-top: 20rpx;
text {
background-color: #f8f9fa;
border-radius: 12rpx;
flex: 1;
padding: 16rpx 12rpx;
text-align: center;
}
.add {
background-color: #007bff;
color: #ffffff;
}
}
}
}
}
</style>

View File

@ -1,150 +0,0 @@
<script setup>
import { ref } from 'vue';
import { onLoad } from "@dcloudio/uni-app"
import { getPatientList } from "@/services/patient"
let active = ref('all')
let cutNav = (type) => {
active.value = type
}
onLoad(() => {
getPatientList()
})
</script>
<template>
<wd-watermark content="wot-design-uni"></wd-watermark>
<wd-fab inactiveIcon="ellipsis" activeIcon="rollback">
<view class="fab">
<view>调压趋势</view>
<view>新增任务</view>
<view>新增手术</view>
</view>
</wd-fab>
<view class="nav_bar">
<view class="nav">
<text @tap="cutNav('all')" :class="{active: active === 'all'}">全部</text>
<text @tap="cutNav('week')" :class="{active: active === 'week'}">本周</text>
<text @tap="cutNav('month')" :class="{active: active === 'month'}">本月</text>
<text @tap="cutNav('custom')" :class="{active: active === 'custom'}">自定义</text>
</view>
<wd-search placeholder="住院号/病人名称/医生" hide-cancel />
</view>
<view class="patient_list">
<wd-card custom-class="item" v-for="value in 10" :key="value">
<view class="top">
<text>住院号000000</text>
<text>2020-12-22</text>
<text>手术次数1</text>
</view>
<view class="content">
<view>患者姓名xxx</view>
<view>手机号码11111111111</view>
<view>植入物品牌索菲萨</view>
<view>原发病小脑但脂瘤</view>
<view class="red">当前压力110</view>
<view>初始压力110</view>
<view>脑积水类型交通性高压性</view>
</view>
<view class="btns">
<button size="mini" plain="true">医生共享</button>
<button size="mini" plain="true">调压趋势</button>
<button size="mini" plain="true">手术详情</button>
<button size="mini" plain="true">一键调压</button>
</view>
</wd-card>
</view>
</template>
<style lang="scss" scoped>
.fab {
view{
background: #4d80f0;
width: 112rpx;
height: 112rpx;
border-radius: 50%;
color: #fff;
box-sizing: border-box;
line-height: 34rpx;
padding: 20rpx 28rpx;
font-size: 14px;
margin-top: 18rpx;
}
}
.nav_bar {
position: sticky;
left: 0;
top: 0;
background-color: #fff;
z-index: 10;
.nav {
display: flex;
justify-content: space-around;
align-items: center;
font-size: 28rpx;
color: #6b7280;
padding: 10rpx;
text {
padding: 10rpx 16rpx;
border-radius: 5rpx;
}
}
.active {
background: #3b82f6;
color: #ffffff;
border: 1rpx solid #3b82f6;
}
}
.patient_list {
background-color: #ededed;
padding-top: 20rpx;
:deep(.item) {
padding: 0;
font-size: 24rpx;
overflow: hidden;
.top {
display: flex;
justify-content: space-between;
background-color: #d4edda;
padding: 20rpx;
color: #155724;
}
.content {
display: flex;
padding: 20rpx;
flex-wrap: wrap;
font-size: 28rpx;
color: #333;
view {
width: 50%;
margin-bottom: 10rpx;
&:last-child { width: 100%; }
}
.red {
font-weight: bold;
color: rgb(255, 21, 21);
}
}
.btns {
display: flex;
// gap: 15rpx;
padding: 20rpx;
justify-content: space-between;
button {
padding: 0 20rpx;
}
text {
background-color: #f8f9fa;
border-radius: 12rpx;
flex: 1;
padding: 16rpx 12rpx;
text-align: center;
}
.add {
background-color: #007bff;
color: #ffffff;
}
}
}
}
</style>

View File

View File

@ -1,8 +0,0 @@
import {http} from "@/utils/http.js"
// 获取患者列表
export const getPatientList = () => {
http({
url: "/patient"
})
}

View File

@ -1,65 +0,0 @@
import {} from "@/store"
const baseURL = "http://192.168.0.180:3000"
import { useUserStore } from '@/store';
// 请求拦截器配置
const httpInterceptor = {
invoke(options) {
// 拼接请求地址
options.url = baseURL + options.url
console.log(111, options);
// 请求超时
options.timeout = 5000
// 添加 token 请求头标识
// const useUser = useUserStore()
// const token = useUser
// if (token) {
// options.header.Authorization = token
// }
},
}
// 拦截 request 请求
uni.addInterceptor("request", httpInterceptor)
/*
请求函数
*/
export const http = (options) => {
return new Promise((resolve, reject) => {
uni.request({
...options,
// 响应成功
success(res) {
// 请求成功
if (res.statusCode >= 200 && res.statusCode < 300) {
//提取数据
resolve(res.data)
} else if (res.statusCode === 401) {
// 401错误清理用户信息跳转到登录页
const memberStore = useMemberStore()
memberStore.clearProfile()
uni.navigateTo({ url: '/pages/login/login' })
reject(res)
} else {
// 其他错误,根据后端错误信息轻提示
uni.showToast({
icon: 'none',
title: (res.data).msg || '请求错误',
})
reject(res)
}
},
// 响应失败
fail(err) {
uni.showToast({
icon: 'none',
title: '网络错误',
})
reject(err)
},
})
})
}