浏览代码

feat(doctor): 添加医生后台管理页面

- 新增医生后台管理页面路径配置
- 更新 tabBar 配置以支持后台管理入口
- 实现后台管理页面基本布局与样式
- 添加资讯管理、快捷问题管理和药品信息管理功能模块
- 页面集成自定义导航栏和底部 tabBar
- 添加页面访问权限检查逻辑
mcbaiyun 1 月之前
父节点
当前提交
b4c2aa0ee2
共有 3 个文件被更改,包括 158 次插入2 次删除
  1. 2 2
      src/components/tab-bar.vue
  2. 11 0
      src/pages.json
  3. 145 0
      src/pages/doctor/manage/index.vue

+ 2 - 2
src/components/tab-bar.vue

@@ -32,8 +32,8 @@ const roleTabs: RoleTabs = {
   // 医生
   2: [
     { icon: '/static/icons/remixicon/home-3-line.svg', text: '首页', url: '/pages/doctor/index/index' },
-    { icon: '/static/icons/remixicon/settings-line.svg', text: '后台', url: '/pages/public/health/index' }, // 暂时使用公共健康页,后续可创建医生患者管理页
-    { icon: '/static/icons/remixicon/account-circle-line.svg', text: '我的', url: '/pages/doctor/profile/index' } // 暂时使用公共profile,后续可创建医生profile
+    { icon: '/static/icons/remixicon/settings-line.svg', text: '后台', url: '/pages/doctor/manage/index' },
+    { icon: '/static/icons/remixicon/account-circle-line.svg', text: '我的', url: '/pages/doctor/profile/index' }
   ],
   // 患者
   3: [

+ 11 - 0
src/pages.json

@@ -97,6 +97,13 @@
 				"navigationBarTitleText": "医生首页"
 			}
 		},
+		,
+		{
+			"path": "pages/doctor/manage/index",
+			"style": {
+				"navigationBarTitleText": "后台管理"
+			}
+		},
 		{
 			"path": "pages/patient-family/index/index",
 			"style": {
@@ -156,6 +163,10 @@
 			{
 				"pagePath": "pages/patient-family/index/index",
 				"text": "家属首页"
+			},
+			{
+				"pagePath": "pages/doctor/manage/index",
+				"text": "后台管理"
 			}
 		]
 	}

+ 145 - 0
src/pages/doctor/manage/index.vue

@@ -0,0 +1,145 @@
+<template>
+  <CustomNav title="后台管理" leftType="home" />
+  <view class="page-container">
+    <view class="content">
+      <view class="function-container">
+        <view class="function-row">
+          <view class="function-item blue" @click="onItemClick('资讯管理')">
+            <view class="item-content">
+              <view class="title-row">
+                <view class="item-line"></view>
+                <text class="item-title">资讯管理</text>
+              </view>
+              <text class="item-desc">管理病人看到的资讯</text>
+            </view>
+          </view>
+          <view class="function-item orange" @click="onItemClick('快捷问题管理')">
+            <view class="item-content">
+              <view class="title-row">
+                <view class="item-line"></view>
+                <text class="item-title">快捷问题管理</text>
+              </view>
+              <text class="item-desc">管理快捷问题</text>
+            </view>
+          </view>
+        </view>
+        <view class="function-row">
+          <view class="function-item green" @click="onItemClick('药品信息管理')">
+            <view class="item-content">
+              <view class="title-row">
+                <view class="item-line"></view>
+                <text class="item-title">药品信息管理</text>
+              </view>
+              <text class="item-desc">管理药品信息</text>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+  <TabBar />
+</template>
+
+<script setup lang="ts">
+import { onShow } from '@dcloudio/uni-app'
+import CustomNav from '@/components/custom-nav.vue'
+import TabBar from '@/components/tab-bar.vue'
+
+// 如果在微信小程序端且未登录,自动跳转到登录页
+onShow(() => {
+  const token = uni.getStorageSync('token')
+  if (!token) {
+    uni.reLaunch({ url: '/pages/public/login/index' })
+  }
+})
+
+function onItemClick(type: string) {
+  uni.showToast({ title: `${type} 功能正在开发中`, icon: 'none' })
+}
+</script>
+
+<style>
+.page-container {
+  min-height: 100vh;
+  padding-top: calc(var(--status-bar-height) + 44px);
+  padding-bottom: 100rpx;
+  box-sizing: border-box;
+  justify-content: center;
+  align-items: center;
+  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
+}
+
+.content {
+  width: 100%;
+}
+
+.function-container {
+  padding-inline: 20rpx;
+  margin-top: 40rpx;
+}
+
+.function-row {
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 20rpx;
+}
+
+.function-row:last-child {
+  margin-bottom: 0;
+}
+
+.function-item {
+  flex: 1;
+  height: 160rpx;
+  background-color: #fff;
+  border-radius: 20rpx;
+  margin: 0 10rpx;
+  position: relative;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
+  overflow: hidden;
+}
+
+.item-content {
+  position: absolute;
+  top: 20rpx;
+  left: 20rpx;
+  display: flex;
+  flex-direction: column;
+}
+
+.title-row {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10rpx;
+}
+
+.item-line {
+  width: 8rpx;
+  height: 48rpx;
+  margin-right: 15rpx;
+  border-radius: 10rpx;
+}
+
+.blue .item-line {
+  background-color: #3742fa;
+}
+
+.orange .item-line {
+  background-color: #ffa502;
+}
+
+.green .item-line {
+  background-color: #2ed573;
+}
+
+.item-title {
+  font-size: 36rpx;
+  font-weight: bold;
+  color: #333;
+}
+
+.item-desc {
+  font-size: 28rpx;
+  color: #666;
+}
+</style>