Browse Source

修改细节

Ayer 7 months ago
parent
commit
6499360dba

+ 1 - 1
.env.development

@@ -1,3 +1,3 @@
 VITE_APP_DEV = '/api'
 VITE_APP_URL = 'http://192.168.3.206:6699' 
-VITE_APP_URL_H5 = 'http://192.168.3.206:6699/api' 
+VITE_APP_URL_H5 = 'http://192.168.3.206:6699' 

+ 21 - 0
src/api/aichat.ts

@@ -24,5 +24,26 @@ export default {
       data
 		});
 	},
+	sessionList(data:object) {
+		return request({
+			url: "/doctor/aichat/sessionList",
+			method: "POST",
+      data
+		});
+	},
+	getTuningList(data:object) {
+		return request({
+			url: "/doctor/aichat/getTuningList",
+			method: "POST",
+      data
+		});
+	},
+	deleteTuning(data:object) {
+		return request({
+			url: "/doctor/aichat/deleteTuning",
+			method: "POST",
+      data
+		});
+	},
 
 };

+ 10 - 1
src/api/base.ts

@@ -45,7 +45,16 @@ export default {
 			data,
 		});
 	},
+	changeStatus(data: object) {
+		return request({
+			url: "/doctor/base/changePersonalKnowledgeStatus",
+			method: "POST",
+			data,
+		});
+	},
+	
 	uploadKnowledge(src:any) {
-		return uploadFile("​/doctor​/base​/uploadKnowledge",src);
+	
+		return uploadFile("/doctor/base/uploadKnowledge",src);
 	},
 };

+ 10 - 3
src/components/custom-icon/index.scss

@@ -1,7 +1,4 @@
 
-i {
-	font-style: normal;
-}
 .icon {
 	font-family: "iconfont";
 	width: 40rpx;
@@ -9,6 +6,7 @@ i {
 	display: flex;
 	align-items: center;
 	justify-content: center;
+	vertical-align: middle;
 }
 .icon-phone::after {
 	content: "\e600";
@@ -63,4 +61,13 @@ i {
 }
 .icon-bianjipingjia::after {
 	content: "\e7fd";
+}
+.icon-sync::after {
+	content: "\e81c";
+}
+.icon-clock-circle::after {
+	content: "\e81b";
+}
+.icon-delete1::after {
+	content: "\e81a";
 }

+ 1 - 1
src/manifest.json

@@ -44,7 +44,7 @@
     },
     "quickapp" : {},
     "mp-weixin" : {
-        "appid" : "wxb9dc9500a6a0a897",
+        "appid" : "wx8a2a8ab5088fb47b",
         "setting" : {
             "urlCheck" : false
         },

+ 4 - 0
src/pages/apply/index.vue

@@ -74,6 +74,8 @@
 					<uv-input
 						v-model="model.form.hospitalName"
 						border="none"
+						disabled
+						disabledColor="#ffffff"
 						placeholder="请输入医院名称"
 						inputAlign="right"
 					>
@@ -85,6 +87,8 @@
 					<uv-input
 						v-model="model.form.deptName"
 						border="none"
+						disabled
+						disabledColor="#ffffff"
 						placeholder="请输入科室名称"
 						inputAlign="right"
 					>

+ 72 - 3
src/static/font/demo_index.html

@@ -55,6 +55,24 @@
           <ul class="icon_lists dib-box">
           
             <li class="dib">
+              <span class="icon iconfont">&#xe81a;</span>
+                <div class="name">delete</div>
+                <div class="code-name">&amp;#xe81a;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe81b;</span>
+                <div class="name">clock-circle</div>
+                <div class="code-name">&amp;#xe81b;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe81c;</span>
+                <div class="name">sync</div>
+                <div class="code-name">&amp;#xe81c;</div>
+              </li>
+          
+            <li class="dib">
               <span class="icon iconfont">&#xe600;</span>
                 <div class="name">手机</div>
                 <div class="code-name">&amp;#xe600;</div>
@@ -276,9 +294,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1723456084391') format('woff2'),
-       url('iconfont.woff?t=1723456084391') format('woff'),
-       url('iconfont.ttf?t=1723456084391') format('truetype');
+  src: url('iconfont.woff2?t=1723692363079') format('woff2'),
+       url('iconfont.woff?t=1723692363079') format('woff'),
+       url('iconfont.ttf?t=1723692363079') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -305,6 +323,33 @@
         <ul class="icon_lists dib-box">
           
           <li class="dib">
+            <span class="icon iconfont icon-delete1"></span>
+            <div class="name">
+              delete
+            </div>
+            <div class="code-name">.icon-delete1
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-clock-circle"></span>
+            <div class="name">
+              clock-circle
+            </div>
+            <div class="code-name">.icon-clock-circle
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-sync"></span>
+            <div class="name">
+              sync
+            </div>
+            <div class="code-name">.icon-sync
+            </div>
+          </li>
+          
+          <li class="dib">
             <span class="icon iconfont icon-shouji"></span>
             <div class="name">
               手机
@@ -639,6 +684,30 @@
           
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-delete1"></use>
+                </svg>
+                <div class="name">delete</div>
+                <div class="code-name">#icon-delete1</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-clock-circle"></use>
+                </svg>
+                <div class="name">clock-circle</div>
+                <div class="code-name">#icon-clock-circle</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-sync"></use>
+                </svg>
+                <div class="name">sync</div>
+                <div class="code-name">#icon-sync</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-shouji"></use>
                 </svg>
                 <div class="name">手机</div>

+ 15 - 3
src/static/font/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4646442 */
-  src: url('iconfont.woff2?t=1723456084391') format('woff2'),
-       url('iconfont.woff?t=1723456084391') format('woff'),
-       url('iconfont.ttf?t=1723456084391') format('truetype');
+  src: url('iconfont.woff2?t=1723692363079') format('woff2'),
+       url('iconfont.woff?t=1723692363079') format('woff'),
+       url('iconfont.ttf?t=1723692363079') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,18 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-delete1:before {
+  content: "\e81a";
+}
+
+.icon-clock-circle:before {
+  content: "\e81b";
+}
+
+.icon-sync:before {
+  content: "\e81c";
+}
+
 .icon-shouji:before {
   content: "\e600";
 }

File diff suppressed because it is too large
+ 0 - 0
src/static/font/iconfont.js


+ 21 - 0
src/static/font/iconfont.json

@@ -6,6 +6,27 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "41475534",
+      "name": "delete",
+      "font_class": "delete1",
+      "unicode": "e81a",
+      "unicode_decimal": 59418
+    },
+    {
+      "icon_id": "41475532",
+      "name": "clock-circle",
+      "font_class": "clock-circle",
+      "unicode": "e81b",
+      "unicode_decimal": 59419
+    },
+    {
+      "icon_id": "41475533",
+      "name": "sync",
+      "font_class": "sync",
+      "unicode": "e81c",
+      "unicode_decimal": 59420
+    },
+    {
       "icon_id": "5027",
       "name": "手机",
       "font_class": "shouji",

BIN
src/static/font/iconfont.ttf


BIN
src/static/font/iconfont.woff


BIN
src/static/font/iconfont.woff2


BIN
src/static/images/Group 1142813422.png


BIN
src/static/images/Group 1142813423.png


BIN
src/static/images/ai_bg.png


BIN
src/static/images/ai_icon_1.png


BIN
src/static/images/ai_icon_2.png


BIN
src/static/images/chat_01.png


+ 235 - 30
src/subpackages/my/aiTuning/index.scss

@@ -1,4 +1,4 @@
-.my-patient-container {
+.ai-container {
 	// padding-top: 120rpx;
 	// .bg {
 	// 	position: absolute;
@@ -7,11 +7,32 @@
 	// 	height: 500rpx;
 	// 	background: white;
 	// }
+	.bg{
+		position: absolute;
+		top: 0;
+		left: 0;
+		height: 426rpx;
+		width: 100%;
+		object-fit: cover;
+		image{
+			width: 100%;
+			height: 100%;
+		}
+
+	}
+	.ai-content-container{
+		position: absolute;
+		top: 170rpx;
+		width: 100%;
+
+	}
 	.hearder {
-		padding: 0 24rpx;
-		padding-top: 50rpx;
-		background-color: white;
+		padding: 40rpx 24rpx;
+		// padding-top: 50rpx;
+		// background-color: #9af1f2;
 		.search {
+			padding-left: 20rpx;
+			border-left: 1px solid #eeeff1;
 			font-weight: 400;
 			font-size: 32rpx;
 			color: #11c3ae;
@@ -25,7 +46,15 @@
 			font-weight: 400;
 			font-size: 28rpx;
 			color: #16181a;
-			text{
+			background: #ffffff;
+			border-radius: 10rpx 10rpx 10rpx 10rpx;
+			border: 2rpx solid #11c3ae;
+			.text-time {
+				font-weight: 400;
+				font-size: 28rpx;
+				color: rgba(106, 108, 113, 0.48);
+			}
+			text {
 				margin-left: 10rpx;
 			}
 		}
@@ -72,6 +101,56 @@
 			border-color: white white #11c3ae white;
 		}
 	}
+	.challenge-top {
+		position: relative;
+		// margin-top: 40rpx;
+		height: 96rpx;
+		padding: 10rpx;
+		padding-top: 0;
+		font-weight: 500;
+		font-size: 32rpx;
+
+		color: #1d2129;
+		box-sizing: border-box;
+		transition: 0.3s all;
+		background-color: white;
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+		padding: 38rpx;
+		gap: 75rpx;
+		view {
+			// flex: 0.3;
+			height: 100%;
+		}
+		view:nth-child(1) {
+			z-index: 2;
+		}
+		view:nth-child(2) {
+			z-index: 2;
+		}
+	}
+	.challenge-top-bg {
+		position: absolute;
+		width: 50%;
+		// z-index: 1;
+		display: flex;
+		margin: 10rpx;
+		// height: calc(100% - 20rpx) !important;
+		box-sizing: border-box;
+		width: 10%;
+		// background-color: #9087e5;
+		border-bottom: 5rpx solid #11c3ae;
+		transition: 0.3s all;
+		border-radius: 4rpx 4rpx 0rpx 0rpx;
+	}
+	.challenge-active {
+		// border-radius: var(--box-ra-20px);
+		// background-color: #9087e5;
+		// font-size: 32rpx;
+		font-weight: 500;
+		color: #11c3ae !important;
+	}
 	.all-number {
 		font-weight: 400;
 		font-size: 26rpx;
@@ -82,6 +161,7 @@
 		justify-content: center;
 	}
 	.content {
+		margin-top: 32rpx;
 		// position: absolute;
 		// top: 120rpx;
 		width: 100%;
@@ -98,57 +178,182 @@
 				border-radius: 10rpx;
 				background-color: white;
 				display: flex;
-				gap:22rpx ;
+				gap: 22rpx;
 				flex-direction: column;
 				> view {
 					display: flex;
 					justify-content: space-between;
-					align-items: center;
+					// align-items: center;
 					image {
 						height: 64rpx;
 						width: 64rpx;
 						object-fit: cover;
 					}
 				}
+			}
+			.left {
+				flex: 0 0 48rpx;
+			}
+			.right {
+				display: flex;
+				margin-left: 10rpx;
+				flex: 1;
+				flex-direction: column;
+				gap: 26rpx;
 				.top {
+					display: flex;
+					padding-top: 10rpx;
+					justify-content: space-between;
+					align-items: center;
 					view {
+						font-weight: 400;
+						font-size: 28rpx;
+						color: #00bca6;
 						display: flex;
-						gap: 10rpx;
 						align-items: center;
 					}
-					view:nth-child(1) {
+					text:nth-child(1) {
 						font-weight: 500;
-						font-size: 30rpx;
+						font-size: 32rpx;
 						color: #16181a;
 					}
-					view:nth-child(2) {
-						font-weight: 500;
-						font-size: 24rpx;
-						color: #1daf9e;
-						padding: 4rpx 10rpx;
-						box-sizing: border-box;
-						background: linear-gradient(90deg, #cbfff9 0%, #f5fffe 100%);
-						border-radius: 4rpx 4rpx 4rpx 4rpx;
-					}
 				}
-			}
-			.center,.bottom{
-				view{
+				.center {
+					padding: 25rpx 20rpx;
+					box-sizing: border-box;
+					background-color: #f5f7fa;
+					width: 100%;
+					justify-content: space-between;
 					display: flex;
-					align-items: center;
-					gap: 12rpx;
+					font-weight: 400;
+					font-size: 28rpx;
+					color: #848d99;
+
+					flex-direction: column;
+					> view {
+						display: flex;
+						// align-items: flex-start;
+						align-items: center;
+						justify-content: flex-start;
+					}
+					.title {
+						margin-right: 32rpx;
+						font-weight: 400;
+						font-size: 28rpx;
+						color: #4e5969;
+					}
 				}
 			}
-			.left-text {
+			.ai-top {
+				display: flex;
+				align-items: center;
+				border-bottom: 1rpx solid #eeeff1;
+				padding-bottom: 29rpx;
 				font-weight: 400;
-				font-size: 26rpx;
-				color: #848d99;
+				font-size: 30rpx;
+				color: rgba(22, 24, 26, 0.8);
+				image {
+					margin-right: 10rpx;
+				}
 			}
-			.right-text {
+			.ai-center {
+				display: flex;
+				flex-direction: column;
+				gap: 24rpx;
 				font-weight: 400;
-				font-size: 28rpx;
-				color: #16181a;
+				font-size: 32rpx;
+				color: #4e5969;
+				.context-text{
+					display: -webkit-box; /* 设置为WebKit内核的弹性盒子模型 */
+					-webkit-box-orient: vertical; /* 垂直排列 */
+					-webkit-line-clamp: 2; /* 限制显示两行 */
+					overflow: hidden; /* 隐藏超出范围的内容 */
+					text-overflow: ellipsis; /* 使用省略号 */
+				}
+				.image{
+					width: 32rpx;
+					height: 30rpx;
+					margin-right: 10rpx;
+					// object-fit: ;
+					// margin-right: 300rpx;
+					image{
+						width: 100%;
+						height: 100%;
+						object-fit: cover;
+					}
+					
+				}
+				.before{
+					position: relative;
+					// z-index: 10;
+					z-index: 10;
+				
+
+				}
+				.before::before{
+					position: absolute;
+					content: "";
+					height: 10rpx;
+					bottom: 5rpx;
+					width: 10%;
+					z-index: 1;
+					// background-color: #00bca6;
+					background: linear-gradient( 90deg, #00D9A1 0%, rgba(0,217,161,0.05) 100%);
+				}
+				.title {
+					font-weight: 500;
+					font-size: 30rpx;
+					color: #16181a;
+					display: flex;
+					align-items: center;
+					margin-bottom: 20rpx;
+				}
+				.after {
+					padding: 28rpx 24rpx;
+					background: linear-gradient(180deg, #e5fff8 0%, #ffffff 100%);
+					border-radius: 10rpx;
+					border: 2rpx solid;
+					border-image: linear-gradient(
+							180deg,
+							rgba(0, 217, 161, 0.69),
+							rgba(1, 171, 127, 0.25)
+						)
+						2 2;
+				}
+				.after-con {
+					padding-bottom: 35rpx;
+				}
+				.bottom {
+					padding-top: 18rpx;
+					border-top: 1px solid #eeeff1;
+					display: flex;
+					align-items: center;
+					font-weight: 500;
+					font-size: 26rpx;
+					color: #848d99;
+					gap: 42rpx;
+					.edit {
+						display: flex;
+						align-items: center;
+					}
+				}
 			}
 		}
 	}
 }
+
+.popup-content{
+	padding: 32rpx;
+	box-sizing: border-box;
+	padding-bottom: calc(env(safe-area-inset-bottom) + 40rpx);
+	width: 100%;
+	.header{
+		width: 100%;
+		display: flex;
+		justify-content: space-between;
+		font-weight: 400;
+		font-size: 30rpx;
+		color: #11C3AE;
+		margin-bottom: 29rpx;
+	}
+}

+ 282 - 75
src/subpackages/my/aiTuning/index.vue

@@ -1,79 +1,165 @@
 <template>
-	<view class="container my-patient-container">
+	<view class="ai-container">
 		<!-- 自定义导航栏 -->
 		<CustomNavbar
 			title="AI调优"
 			type="center"
 			:isLeft="true"
 			@handleLeft="handleLeft"
-			bgColor="#fff"
+			bgColor="rgba(0,0,0,0)"
 		/>
+		<view class="bg">
+			<image
+				src="@/static/images/ai_bg.png"
+				mode="aspectFill"
+			/>
+		</view>
+		<view class="ai-content-container">
 		<!-- 顶部搜索和日期选择 -->
 		<view class="hearder">
 			<!-- 日期选择框 -->
 			<view class="time-box">
 				<view @click="openDatePicker('start')">
-					开始日期
-					<text>{{ paramsData.startDate }}</text>
+					<text class="text-time" v-if="!paramsData.startDate">开始日期</text>
+					<text v-else>{{ paramsData.startDate}}</text>
 					<text :class="isOpenStartPicker ? 'up-picker' : 'down-picker'"></text>
 				</view>
+				<view>至</view>
 				<view @click="openDatePicker('end')">
-					结束日期
-					<text>{{ paramsData.endDate }}</text>
+					<text class="text-time" v-if="!paramsData.endDate">结束日期</text>
+					<text v-else>{{ paramsData.endDate}}</text>
 					<text :class="isOpenEndPicker ? 'up-picker' : 'down-picker'"></text>
 				</view>
+				<view class="search" 	@click="search"> 查询 </view>
 			</view>
 		</view>
+
+		<!-- 顶部导航 -->
+		<view class="flex-r-b challenge-top" @click="handleMenuSelect">
+			<view class="flex-r-c" :class="{ 'challenge-active': currentIndex }"
+				>问答记录</view
+			>
+			<view class="flex-r-c" :class="{ 'challenge-active': !currentIndex }"
+				>调优记录</view
+			>
+			<view
+				class="challenge-top-bg"
+				:style="{ left: currentIndex ? '7%' : '34%' }"
+			></view>
+		</view>
+
 		<!-- 内容区域 -->
 		<view class="content pd-12">
 			<view class="list">
 				<view
 					class="item"
 					v-for="(item, index) in dateList"
+					v-if="currentIndex"
 					:key="index"
-					@click="toPage(`/subpackages/my/chatHistory/index?userId=${item.id}`)"
+					@click="toPage(`/subpackages/my/chatHistory/index?userId=${item.userId}`)"
 				>
-					<view class="top">
+					<view class="left">
 						<view>
 							<image
 								src="@/static/images/default_avatar.png"
 								mode="scaleToFill"
 							/>
-							<text>{{item.userName}}</text>
 						</view>
-						<view>账号:{{item.id}}</view>
+						<view class="right">
+							<view class="top">
+								<text>{{ item.userName }}</text>
+								<view
+									>查看详情<uv-icon
+										name="arrow-right"
+										color="#00BCA6"
+										size="12"
+									></uv-icon>
+								</view>
+							</view>
+							<view class="center">
+								<view>
+									<CustomIcon iconName="clock-circle" color="#848D99" size="28rpx" />
+									<text class="title">对话发起时间</text>
+									<text>{{ item.createTime }}</text>
+								</view>
+								<view>
+									<CustomIcon iconName="clock-circle" color="#848D99" size="28rpx" />
+									<text class="title">最后回复时间</text>
+									<text>{{ item.latestReplyTime }}</text>
+								</view>
+							</view>
+						</view>
 					</view>
-					<view class="center">
-						<view>
-							<CustomIcon iconName="qrcode" color="#848D99" size="32rpx" />
-							<text class="left-text">公益码</text>
-							<text class="right-text">21111111</text>
+				</view>
+				<view
+					class="item"
+					v-for="(item, index) in dateList"
+					v-if="!currentIndex"
+					:key="index"
+				>
+					<view class="ai-top">
+						<view class="flex-r-b">
+							<image
+								src="@/static/images/default_avatar.png"
+								mode="scaleToFill"
+							/>
+							<text>{{item.userName}}</text>
+						</view>
+						<view class="flex-r-b">
+							<CustomIcon iconName="clock-circle" color="#848D99" size="32rpx" />
+							<text>{{item.updateTime}}</text>
 						</view>
 					</view>
-					<view class="bottom">
+					<view class="ai-center">
 						<view>
-							<CustomIcon
-								iconName="mobile"
-								color="#848D99"
-								size="32rpx"
-							/>
-							<text class="left-text">手机</text>
-							<text class="right-text">{{item.userName}}</text>
+							<view class="title">
+								<view class="image">
+									<image
+										src="@/static/images/ai_icon_1.png"
+										mode="aspectFill"
+									/>
+								</view>
+
+								提出内容</view
+							>
+							<text>{{item.questionContent}}</text>
 						</view>
 						<view>
-							<CustomIcon
-								iconName="schedule"
-								color="#848D99"
-								size="32rpx"
-							/>
-							<text class="left-text">时间</text>
-							<text class="right-text">{{item.allocateTime.split(" ")[0]}}</text>
+							<view class="title before">调整前回复</view>
+							<text class="context-text">{{item.rawContent}}</text>
+						</view>
+						<view class="after">
+							<view class="after-con">
+								<view class="title">
+									<view class="image">
+										<image
+											src="@/static/images/ai_icon_2.png"
+											mode="aspectFill"
+										/> </view
+									>调整后回复</view
+								>
+								<text class="context-text">{{item.tuningContent}}</text>
+							</view>
+
+							<view class="bottom">
+								<view class="edit" @click="openTuningPopup(item.id,item.msgId,item.tuningContent)">
+									<CustomIcon iconName="sync" color="#848D99" size="32rpx" />
+									<text>修改回复</text>
+								</view>
+								<view class="edit" @click="openDeleteModal(item.id)">
+									<CustomIcon iconName="delete1" color="#848D99" size="32rpx" />
+									<text>删除</text>
+								</view>
+							</view>
 						</view>
 					</view>
 				</view>
+
 				<CustomLoadMore :status="loadStatus" />
 			</view>
 		</view>
+		</view>
+
 		<!-- 日期选择器 -->
 		<uv-datetime-picker
 			ref="datetimePicker"
@@ -86,6 +172,39 @@
 			confirmColor="#11C3AE"
 		/>
 	</view>
+		<!-- 弹出窗 -->
+		<uv-popup ref="popup" mode="bottom" round="5">
+		<view class="popup-content">
+			<view class="header">
+				<text @click="handlePopupCancel">取消</text>
+				<text @click="handlePopupConfirm">确定</text>
+			</view>
+			<uv-textarea
+				v-model="tungData.tuningContent"
+				count
+				@confirm = "handlePopupConfirm"
+				placeholder="请输入调优方案"
+				customStyle="height: 300rpx;
+					background: #F5F7FA;
+					border: unset;
+					border-radius: 0rpx 0rpx 0rpx 0rpx;
+				"
+				:focus="true"
+				countStyle="background: #F5F7FA;
+						font-weight: 400;
+						padding: 30rpx;
+						font-size: 28rpx;
+						color: #86909C;"
+				maxlength="50"
+			></uv-textarea>
+		</view>
+	</uv-popup>
+	<!-- 删除模态框 -->
+	<uv-modal ref="modal" title="提示" content='是否删除该调优' 
+      confirmText="确定"
+      confirmColor="#11C3AE"
+      :showCancelButton="true"
+      @confirm="modalConfirm" align="center"></uv-modal>
 </template>
 
 <script lang="ts" setup>
@@ -93,19 +212,27 @@ import { ref, inject, onMounted } from "vue";
 import baseApi from "@/api/base";
 import { onDateChange } from "@/utils/common";
 import { onReachBottom } from "@dcloudio/uni-app";
+import aichat from "@/api/aichat";
 
 const $showToast: any = inject("$showToast");
-
+const currentIndex = ref(true);
 const dateValue = ref(new Date().toDateString());
 const datetimePicker = ref<any>(null);
 const dateList = ref<any>([]); // 患者列表
-const loadStatus = ref("loading");
+const loadStatus = ref("nomore");
+const popup = ref<any>(null)
+const modal = ref<any>(null)
+const deleteTuningId = ref(0)
+const tungData = ref({
+	tuningContent:" ",
+	msgId:0,
+	tuningId:0
+})
 const paramsData = ref({
 	startDate: "",
 	pageSize: 10,
 	pageNum: 1,
 	endDate: "",
-	patientName: ""
 });
 const pageTotal = ref(0);
 const dateType = ref("start");
@@ -113,14 +240,75 @@ const isOpenStartPicker = ref(false);
 const isOpenEndPicker = ref(false);
 
 /**
+ * 删除模态框
+ */
+const modalConfirm = async () => {
+	await aichat.deleteTuning({tuningId:deleteTuningId.value})
+	$showToast("删除成功!")
+	dateList.value = []
+	getData()
+
+}
+const openDeleteModal = (id :number) => {
+	deleteTuningId.value = id
+	modal.value.open()
+
+}
+/**
+ * 打开调优弹窗
+ */
+ const openTuningPopup = (tId:number,mId:number,questionContent:string) => {
+	tungData.value.msgId = mId
+	tungData.value.tuningId = tId
+	tungData.value.tuningContent = questionContent
+	popup.value.open();
+};
+const search = () => {
+	dateList.value = []
+	getData()
+} 
+/**
+ * 关闭调优弹窗,清空内容
+ */
+const handlePopupCancel = () => {
+	popup.value.close();
+
+	tungData.value.tuningContent = "";
+};
+/**
+ * 关闭调优弹窗,提交内容
+ */
+ const handlePopupConfirm = () => {
+	popup.value.close();
+	sendTung()
+	tungData.value.tuningContent = "";
+};
+/**
+ * 发起调优
+ */
+const sendTung = async () => {
+	await aichat.tuneMsg(tungData.value)
+	dateList.value = []
+	getData()
+}
+
+/**
+ * 菜单选择
+ */
+const handleMenuSelect = () => {
+	dateList.value = []
+	currentIndex.value = !currentIndex.value;
+	getData()
+};
+/**
  * 打开日期选择器
  * @param type - 日期类型(开始日期或结束日期)
  */
 const openDatePicker = (type: "start" | "end") => {
 	datetimePicker.value.open(); // 打开日期选择器
 	dateType.value = type; // 设置当前选择的日期类型
-	isOpenStartPicker.value = type === 'start';
-	isOpenEndPicker.value = type === 'end';
+	isOpenStartPicker.value = type === "start";
+	isOpenEndPicker.value = type === "end";
 };
 
 /**
@@ -128,30 +316,38 @@ const openDatePicker = (type: "start" | "end") => {
  * @param e - 选择器返回的数据
  */
 const dateTimePickerConfirm = (e: any) => {
-  const formattedDate = onDateChange(e.value); // 格式化选择的日期
-
-  if (dateType.value === 'start') {
-    paramsData.value.startDate = formattedDate; // 设置开始日期
-    // 如果结束日期存在且早于开始日期,则重置开始日期并提示用户
-    if (paramsData.value.endDate && new Date(paramsData.value.endDate) < new Date(formattedDate)) {
-      paramsData.value.startDate = "";
-      return $showToast("开始日期不能晚于结束日期");
-    }
-  } else {
-    paramsData.value.endDate = formattedDate; // 设置结束日期
-    // 如果开始日期存在且结束日期早于开始日期,则重置结束日期并提示用户
-    if (paramsData.value.startDate && new Date(formattedDate) < new Date(paramsData.value.startDate)) {
-      paramsData.value.endDate = "";
-      return $showToast("结束日期不能早于开始日期");
-    }
-  }
-
-  // 关闭选择器
-  isOpenStartPicker.value = false;
-  isOpenEndPicker.value = false;
-
-  // 获取数据
-  getData();
+	const formattedDate = onDateChange(e.value); // 格式化选择的日期
+	
+	
+	if (dateType.value === "start") {
+		paramsData.value.startDate = formattedDate.split(" ")[0]; // 设置开始日期
+		// 如果结束日期存在且早于开始日期,则重置开始日期并提示用户
+		if (
+			paramsData.value.endDate &&
+			new Date(paramsData.value.endDate) < new Date(formattedDate)
+		) {
+			console.log("1111111",new Date(paramsData.value.endDate) < new Date(formattedDate));
+			paramsData.value.startDate = "";
+			return $showToast("开始日期不能晚于结束日期");
+		}
+	} else {
+		paramsData.value.endDate = formattedDate.split(" ")[0]; // 设置结束日期
+		// 如果开始日期存在且结束日期早于开始日期,则重置结束日期并提示用户
+		if (
+			paramsData.value.startDate &&
+			new Date(formattedDate) < new Date(paramsData.value.startDate)
+		) {
+			paramsData.value.endDate = "";
+			return $showToast("结束日期不能早于开始日期");
+		}
+	}
+
+	// 关闭选择器
+	isOpenStartPicker.value = false;
+	isOpenEndPicker.value = false;
+
+	// // 获取数据
+	// getData();
 };
 
 /**
@@ -179,28 +375,39 @@ const toPage = (url: string) => {
 };
 
 /**
- * 获取患者数据
+ * 获取页面数据
  */
 const getData = async () => {
-	loadStatus.value = 'loading'
-	const { data: { records,total } } = await baseApi.queryPatientList(paramsData.value);
-	dateList.value.push(...records);
-	pageTotal.value = total; // 更新患者总数
-	if(dateList.value.length < total) {
-		loadStatus.value = "loadmore"
-	}else {
-		loadStatus.value = "nomore"
+	loadStatus.value = "loading";
+	if(currentIndex.value) {
+		const {data:{records,total}} = await aichat.sessionList(paramsData.value)
+		dateList.value.push(...records)
+		pageTotal.value = total
+	}else{
+		const {data:{records,total}} = await aichat.getTuningList(paramsData.value
+		)
+		dateList.value.push(...records)
+		pageTotal.value = total
+	}
+
+	// dateList.value = data
+
+	if (dateList.value.length < pageTotal.value) {
+		loadStatus.value = "loadmore";
+	} else {
+		loadStatus.value = "nomore";
 	}
 };
+
 onReachBottom(() => {
-		loadStatus.value = 'loading'
-	if(dateList.value.length < pageTotal.value) {
-		++ paramsData.value.pageNum 
-		getData()
-	}else {
-		loadStatus.value = "nomore"
+	loadStatus.value = "loading";
+	if (dateList.value.length < pageTotal.value) {
+		++paramsData.value.pageNum;
+		getData();
+	} else {
+		loadStatus.value = "nomore";
 	}
-})
+});
 
 onMounted(() => {
 	getData(); // 组件挂载后获取数据

+ 167 - 95
src/subpackages/my/chatHistory/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view scroll-y  class="container chat-history-container">
+	<view scroll-y class="container chat-history-container">
 		<!-- 自定义导航栏 -->
 		<CustomNavbar
 			title="聊天记录"
@@ -9,70 +9,88 @@
 			@handleLeft="handleLeft"
 		/>
 		<!-- 聊天内容区域 -->
-		<scroll-view scroll-y class="chat-content " id="chatListContainer" v-show="isShowChatList" >
-			<template >
-				<!-- 替换为实际条件 -->
-				<!-- 聊天记录列表 -->
-				<view
-					class="chat-list pd-32"
-					:style="{ 'padding-bottom': '300rpx' }"
-				>
-					
-					<!-- 时间显示 -->
-					<template v-for="(item, index) in chatList" :key="index">
-						<view
-							class="time"
-							v-if="index % 5 === 0 && item.role === 'assistant'"
+		<scroll-view
+			scroll-y
+			class="chat-content"
+			@scroll="viewScroll"
+			id="chatListContainer"
+			v-show="isShowChatList"
+			@scrolltolower="handleScroll"
+			:scrollTop="scrollTop"
+		>
+			<!-- 替换为实际条件 -->
+			<!-- 聊天记录列表 -->
+			<view class="chat-list pd-32" :style="{ 'padding-bottom': '300rpx' }">
+				<CustomLoadMore :status="loadStatus" />
+				<!-- 时间显示 -->
+				<template v-for="(item, index) in chatList" :key="index">
+					<view class="time">
+						<text
+							>{{ formatTimestamp(item.created) }}------{{ index + 1 }}</text
 						>
-							<text>{{ formatTimestamp(item.created) }}</text>
-						</view>
-						<!-- 本人(助手)消息 -->
-						<view class="user" v-if="item.role === 'assistant'">
-							<view class="user-content">
-								<view class="flex-c right-box">
-									<text class="f-colot-848D99 title-14-400">我</text>
-									<text class="right">{{ item.msg }}</text>
-									<view class="tool">
-										<view @click="openTuningPopup(item.mid)">
-											<CustomIcon iconName="bianjipingjia" size="36rpx" />调优
-										</view>
-										<view @click="handleUpdateScorce('add',item.mid)">
-											<CustomIcon iconName="thumb-up" size="36rpx" :color="item.score == 1 ? '#e6d5a9' : '#4E5969'"/>
-										</view>
-										<view @click="handleUpdateScorce('minus',item.mid)">
-											<CustomIcon iconName="thumb-down" size="36rpx" :color="item.score == -1 ? '#e6d5a9' : '#4E5969'"/>
-										</view>
+					</view>
+					<!-- 本人(助手)消息 -->
+					<view class="user" v-if="item.role === 'assistant'">
+						<view class="user-content">
+							<view class="flex-c right-box">
+								<text class="f-colot-848D99 title-14-400">我</text>
+								<text class="right">{{ item.msg }}</text>
+								<view class="tool">
+									<view @click="openTuningPopup(item.mid, item.tuningText)">
+										<CustomIcon iconName="bianjipingjia" size="36rpx" />调优
+									</view>
+									<view @click="handleUpdateScorce('add', item.mid)">
+										<CustomIcon
+											iconName="thumb-up"
+											size="36rpx"
+											:color="item.score == 1 ? '#e6d5a9' : '#4E5969'"
+										/>
 									</view>
-									<view class="after" v-if="item.tuningText">
-										{{ item.tuningText }}
+									<view @click="handleUpdateScorce('minus', item.mid)">
+										<CustomIcon
+											iconName="thumb-down"
+											size="36rpx"
+											:color="item.score == -1 ? '#e6d5a9' : '#4E5969'"
+										/>
 									</view>
 								</view>
-								<image
-									src="https://ywt-image.oss-cn-shenzhen.aliyuncs.com/doctor/avatar/default.png"
-									mode="aspectFill"
-								/>
+								<view class="after" v-if="item.tuningText">
+									{{ item.tuningText }}
+								</view>
 							</view>
+							<image
+								src="https://ywt-image.oss-cn-shenzhen.aliyuncs.com/doctor/avatar/default.png"
+								mode="aspectFill"
+							/>
 						</view>
-						<!-- 患者消息 -->
-						<view class="ai" v-if="item.role === 'user'">
-							<view class="ai-content">
-								<image
-									src="@/static/images/default_avatar.png"
-									mode="aspectFill"
-								/>
-								<view class="flex-c right-box">
-									<text class="f-colot-848D99 title-14-400">王元</text>
-									<text class="right">{{ item.msg }}</text>
-								</view>
+					</view>
+					<!-- 患者消息 -->
+					<view class="ai" v-if="item.role === 'user'">
+						<view class="ai-content">
+							<image
+								src="@/static/images/default_avatar.png"
+								mode="aspectFill"
+							/>
+							<view class="flex-c right-box">
+								<text class="f-colot-848D99 title-14-400">王元</text>
+								<text class="right">{{ item.msg }}</text>
 							</view>
 						</view>
-					</template>
-				</view>
-					<view v-if="chatList.length == 0" style="text-align: center;padding-top: 200rpx;color: #D6D7DC;"> 暂无聊天记录</view>
-			</template>
-		
+					</view>
+				</template>
+			</view>
+			<view
+				v-if="chatList.length == 0"
+				style="text-align: center; padding-top: 200rpx; color: #d6d7dc"
+			>
+				暂无聊天记录</view
+			>
 		</scroll-view>
-		<uv-loading-page :loading="true" loading-mode="spinner" v-if="!isShowChatList"></uv-loading-page>
+		<uv-loading-page
+			:loading="true"
+			loading-mode="spinner"
+			v-if="!isShowChatList"
+		></uv-loading-page>
 	</view>
 
 	<!-- 弹出窗 -->
@@ -85,7 +103,7 @@
 			<uv-textarea
 				v-model="tungData.tuningContent"
 				count
-				@confirm = "handlePopupConfirm"
+				@confirm="handlePopupConfirm"
 				placeholder="请输入调优方案"
 				customStyle="height: 300rpx;
 					background: #F5F7FA;
@@ -105,7 +123,7 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, inject, nextTick } from "vue";
+import { ref, inject, nextTick, onMounted } from "vue";
 import aichat from "@/api/aichat";
 import { onDateChange } from "@/utils/common";
 import { onLoad } from "@dcloudio/uni-app";
@@ -118,27 +136,31 @@ const currentPatient = ref({});
 //页面查询数据
 const paramsData = ref({
 	userId: 0,
+	pageSize: 10,
+	pageNum: 1,
 	doctorId: userStore.userData.userId,
 });
+const loadStatus = ref("nomore");
+const pageTotal = ref(0);
 // 弹窗引用
 const popup = ref<any>(null);
-const isShowChatList = ref(false)
+const isShowChatList = ref(false);
 // 调优内容
 const tungData = ref({
-	tuningContent: "",//消息内容
+	tuningContent: "", //消息内容
 	tuningId: "", //当前更改的tunid
-	msgId: 0  //消息id
-})
-const scrollTop = ref(0)
+	msgId: 0, //消息id
+});
+const scrollTop = ref(0);
 // 聊天记录
-const chatList = ref<any>([
-]);
-
+const chatList = ref<any>([]);
+const isScroll = ref(true);
 /**
  * 打开调优弹窗
  */
-const openTuningPopup = (mid:number) => {
-	tungData.value.msgId = mid
+const openTuningPopup = (mid: number, text: string = "") => {
+	tungData.value.tuningContent = text;
+	tungData.value.msgId = mid;
 	popup.value.open();
 };
 
@@ -153,51 +175,55 @@ const handlePopupCancel = () => {
 /**
  * 关闭调优弹窗,提交内容
  */
- const handlePopupConfirm = () => {
+const handlePopupConfirm = () => {
 	popup.value.close();
-	sendTung()
+	sendTung();
 	tungData.value.tuningContent = "";
-
 };
 /**
  * 发起调优
  */
 const sendTung = async () => {
-	await aichat.tuneMsg(tungData.value)
-	getData()
-}
+	await aichat.tuneMsg(tungData.value);
+	chatList.value = [];
+	getData();
+};
 
-const handleUpdateScorce = async (flag:'add' | 'minus',id:number) => {
-	let score = flag == 'add' ? 1 : -1
+const handleUpdateScorce = async (flag: "add" | "minus", id: number) => {
+	let score = flag == "add" ? 1 : -1;
 	let params = {
-		msgId:id,
-		score
-	}
-	await aichat.addMsgScore(params)
-	$showToast("更改成功")
-	getData()
-}
+		msgId: id,
+		score,
+	};
+	await aichat.addMsgScore(params);
+	$showToast("更改成功");
+	// chatList.value = []
+	// getData()
+};
 
 /**
  * 格式化时间戳
  * @param item - 时间戳
  * @returns 格式化后的时间
  */
-const formatTimestamp = (created:number) => {
+const formatTimestamp = (created: number) => {
 	// console.log("11111111111111111",created);
-	
+
 	return onDateChange(created);
 };
 const getData = async () => {
-	const {data} = await aichat.msgList(paramsData.value);
-	chatList.value = data
+	const {
+		data: { records, total },
+	} = await aichat.msgList(paramsData.value);
+	records.reverse();
+	chatList.value.unshift(...records);
+	pageTotal.value = total;
 	console.log(chatList.value);
-	
+
 	// updatePage()
 	// setTimeout(() => {
-		isShowChatList.value = true
+	isShowChatList.value = true;
 	// },500)
-
 };
 // 更新页面滚动
 const updatePage = () => {
@@ -206,25 +232,71 @@ const updatePage = () => {
 		query.select("#chatListContainer").boundingClientRect();
 		query.exec((res) => {
 			const chatListContainer = res[0];
-			console.log("22222",res);
-			
+			console.log("22222", res);
+
 			if (chatListContainer) {
 				scrollTop.value = chatListContainer.height;
 			}
 		});
-		
 	});
 };
+// 节流状态
+let isThrottling = false;
+let currentScroll = 0;
+// 处理滚动事件
+const handleScroll = (event: any) => {
+	if (isThrottling) return; // 如果正在节流,则退出
+	isScroll.value = false;
+	// 设置节流状态为 true
+	isThrottling = true;
+
+	// 处理滚动事件逻辑
+	// console.log("滚动了", event);
+	loadStatus.value = "loading";
+	++paramsData.value.pageNum;
+	// nextTick(() => {
+
+	// })
+	console.log("当前", scrollTop.value, currentScroll);
+
+	setTimeout(() => {
+		getData();
+		if (chatList.value.length < pageTotal.value) {
+			loadStatus.value = "loadmore";
+		} else {
+			loadStatus.value = "nomore";
+		}
+	}, 500);
+	// 在 1000ms 后取消节流状态
+	setTimeout(() => {
+		isThrottling = false;
+		
+		scrollTop.value = currentScroll;
+	}, 1000);
+};
+
+const isScrollTop = ref(false);
+
+const viewScroll = (event: any) => {
+	// console.log("当前高度", event.detail.scrollTop);
+	if(!isThrottling) {
+		currentScroll = event.detail.scrollTop
+	}
+	// if(isThrottling) {
+	// 	currentScroll =1670
+	// 	console.log("设置完", event.detail.scrollTop,currentScroll);}
+};
 /**
  * 处理返回按钮事件
  */
 const handleLeft = () => {
-	uni.redirectTo({ url: "/subpackages/my/myPatient/index" });
+	uni.navigateBack({ delta: 1 });
 };
 onLoad((option) => {
 	paramsData.value.userId = option?.userId || 30;
 	getData();
-	updatePage()
+
+	// updatePage()
 });
 </script>
 

+ 26 - 2
src/subpackages/my/knowledgeBase/index.scss

@@ -13,8 +13,9 @@
 		// position: absolute;
 		// top: 200rpx;
 		margin-top: 88px;
+		padding-bottom: 100rpx;
 		width: 100%;
-		height: 70vh;
+		// height: 70vh;
 		// height: ;
 		background-color: #f5f7fa;
 		box-sizing: border-box;
@@ -87,6 +88,10 @@
 			.title {
 				font-weight: bold;
 				font-size: 34rpx;
+				text-overflow: ellipsis;
+				overflow: hidden;
+				text-wrap: nowrap;
+				white-space: nowrap;
 				color: #16181a;
 			}
 			.switch-box {
@@ -117,11 +122,12 @@
 				font-weight: 400;
 				font-size: 28rpx;
 				color: #848d99;
-				.flag {
+				.flag  {
 					padding: 2rpx 16rpx;
 					font-weight: 400;
 					font-size: 24rpx;
 					color: #ff7d00;
+					margin-right: 10rpx;
 					// height: 36rpx;
 					background: #fff7e8;
 					border-radius: 8rpx 8rpx 8rpx 8rpx;
@@ -130,6 +136,24 @@
 						align-items: center;
 					}
 				}
+				.flag_0 {
+					color: #165DFF;
+					background-color: #E8F3FF;
+				}
+				.flag_1 {
+					color: #00B42A;
+					background-color: #E8FFEA;
+				}
+				.flag_2 {
+					// background-color: red;
+				}
+				.flag_3 {
+					color: #4E5969;
+					background-color: #F2F3F5;
+				}
+				.flag_4 {
+					// background-color: red;
+				}
 			}
 		}
 	}

+ 58 - 37
src/subpackages/my/knowledgeBase/index.vue

@@ -32,7 +32,7 @@
 					<view class="title">{{ item.name }}</view>
 					<view class="bottom">
 						<view
-							><text class="flag">{{ item.type }}</text
+							><text :class="`flag_${item.type} flag` ">{{ changeType(item.type) }}</text
 							><text>{{ item.source }}</text></view
 						>
 						<view>{{ item.createTime }}</view>
@@ -41,30 +41,32 @@
 			</view>
 			<!-- 我的知识库 -->
 			<view class="my-list pd-12" v-else>
-				<view class="item" v-for="(item, index) in dataList" :key="index" @click="toPage(item.url)">
+				<view class="item" v-for="(item, index) in dataList" :key="index" >
 					<view class="bottom">
-						<view
-							><text class="flag">{{ item.type }}</text
+						<view @click="toPage(item.url)"
+							><text :class="`flag_${item.type} flag` ">{{ changeType(item.type) }}</text
 							><text>{{ item.createTime }}</text></view
 						>
 						<view class="switch-box"
 							><uv-switch
-								v-model="item.select"
+								v-model="item.status"
+								:activeValue="0"
+								:inactiveValue="1"
 								activeColor="#05D3A2"
 								size="24"
-                @change="handleSwitchChange(item.id)"
+                @change.stop="handleSwitchChange(item.id,item.status)"
 							/>
-							<text class="switch-text" v-if="item.select" >启用</text>
+							<text class="switch-text" v-if="item.status == 0" >启用</text>
 							<text class="switch-text right" v-else>停用</text>
 						</view>
 					</view>
 					<view class="title">{{ item.name }}</view>
-					<view class="delete flex-r-c" @click="handleDelete(item.id)"> 删除 </view>
+					<view class="delete flex-r-c" @click.prevent="handleDelete(item.id)"> 删除 </view>
 				</view>
 			</view>
 			<CustomLoadMore :status="loadStatus" />
 		</view>
-		<view class="upload" @click="handleUpload" v-if="!currentIndex">
+		<view class="upload" @click="handleUpload">
       <CustomIcon iconName="shangchuan" color="#05D3A2"/>
 			<text>上传</text>
 		</view>
@@ -123,11 +125,24 @@ const handleDelete = (id:number) => {
 	deleteId.value = id
   modal.value.open()
 }
+const changeType = (e: string) => {
+  let obj: { [key: string]: string } = {
+    "0": "标准",
+    "1": "药品说明书",
+    "2": "医学指南",
+    "3": "论文研究",
+    "4": "病历",
+  };
+  return obj[e];
+};
 /**
  * 删除模态框确认回调
  */
 const modalConfirm = async () => {
-	// await baseApi.delete(deleteId.value)
+	await baseApi.delete({knowledgeId:deleteId.value})
+	$showToast("删除成功")
+	dataList.value = []
+	getData()
 }
 /**
  * 上传文件
@@ -137,29 +152,37 @@ const modalConfirm = async () => {
     count: 1,
     type: 'file',
     extension: ['pdf', 'doc', 'docx'],
-    success: (res:any) => {
+    success: async (res:any) => {
       const file = res.tempFiles[0];
       const filePath = file.path;
       console.log(file);
-
-      uni.uploadFile({
-        url: 'http://192.168.3.206:6699/doctor/base/uploadKnowledge', // 确保这个 URL 是有效的
-        filePath: filePath,
-        name: 'file', // 表单中对应的字段名称
-				header: {
-					Authorization: requestCommon.getToken(),
-					"content-type":"multipart/form-data"
-				},
-        formData: {
-          user: 'test', // 可选的额外数据
-        },
-        success: (uploadRes) => {
-          console.log('上传成功', uploadRes);
-        },
-        fail: (err) => {
-          console.error('上传失败', err);
-        }
-      });
+			uni.showLoading()
+			await baseApi.uploadKnowledge(filePath)
+			$showToast("上传成功")
+			
+			setTimeout(() => {
+				dataList.value = []
+				getData()
+			},500)
+			
+      // uni.uploadFile({
+      //   url: 'http://192.168.3.206:6699/doctor/base/uploadKnowledge', // 确保这个 URL 是有效的
+      //   filePath: filePath,
+      //   name: 'file', // 表单中对应的字段名称
+			// 	header: {
+			// 		Authorization: requestCommon.getToken(),
+			// 		"content-type":"multipart/form-data"
+			// 	},
+      //   formData: {
+      //     user: 'test', // 可选的额外数据
+      //   },
+      //   success: (uploadRes) => {
+      //     console.log('上传成功', uploadRes);
+      //   },
+      //   fail: (err) => {
+      //     console.error('上传失败', err);
+      //   }
+      // });
     },
     fail: (err:any) => {
       console.error('选择文件失败', err);
@@ -170,25 +193,24 @@ const modalConfirm = async () => {
 /**
  * 更改切换器回调
  */
-const handleSwitchChange = async(id:any) => {
-	let data = {
+const handleSwitchChange = async(id:any,status:number) => {
 
-	}
-	// await baseApi.update()
+	await baseApi.changeStatus({knowledgeId:id,status:status == 1 ? 1 : 0})
+	$showToast("更改成功")
 }
 const toPage = (url:string) => {
 	uni.navigateTo({url:'/subpackages/webview/index?url='+url})
-
 }
 /**
  * 获取页面数据
  */
 const getData = async () => {
+	loadStatus.value = 'loading'
 	paramsData.value.flagType = currentIndex ? 1 : 0
 	const {data:{records, total}} = await baseApi.query(paramsData.value)
 	dataList.value.push(...records)
 	pageTotal.value = total
-		loadStatus.value = 'loading'
+	
 	if(dataList.value.length < total) {
 		loadStatus.value = "loadmore"
 	}else {
@@ -222,7 +244,6 @@ onMounted(() => {
 
 <style lang="scss">
 @import "./index.scss";
-
 page {
 	background-color: #f5f7fa;
 }

+ 12 - 9
src/subpackages/my/myPatient/index.vue

@@ -20,20 +20,20 @@
 				prefixIconStyle="font-size: 22px; color: #B9B9B9"
 			>
 				<template v-slot:suffix>
-					<text class="search">搜索</text>
+					<text class="search" 	@click="search">搜索</text>
 				</template>
 			</uv-input>
 
 			<!-- 日期选择框 -->
 			<view class="time-box">
 				<view @click="openDatePicker('start')">
-					开始日期
-					<text>{{ paramsData.startDate }}</text>
+					<text v-if="!paramsData.startDate">开始日期</text>
+					<text v-else>{{ paramsData.startDate }}</text>
 					<text :class="isOpenStartPicker ? 'up-picker' : 'down-picker'"></text>
 				</view>
 				<view @click="openDatePicker('end')">
-					结束日期
-					<text>{{ paramsData.endDate }}</text>
+					<text v-if="!paramsData.endDate">结束日期</text>
+					<text v-else>{{ paramsData.endDate }}</text>
 					<text :class="isOpenEndPicker ? 'up-picker' : 'down-picker'"></text>
 				</view>
 			</view>
@@ -46,7 +46,7 @@
 					class="item"
 					v-for="(item, index) in dateList"
 					:key="index"
-					@click="toPage(`/subpackages/my/chatHistory/index?userId=${item.id}`)"
+					
 				>
 					<view class="top">
 						<view>
@@ -146,14 +146,14 @@ const dateTimePickerConfirm = (e: any) => {
   const formattedDate = onDateChange(e.value); // 格式化选择的日期
 
   if (dateType.value === 'start') {
-    paramsData.value.startDate = formattedDate; // 设置开始日期
+    paramsData.value.startDate = formattedDate.split(" ")[0]; // 设置开始日期
     // 如果结束日期存在且早于开始日期,则重置开始日期并提示用户
     if (paramsData.value.endDate && new Date(paramsData.value.endDate) < new Date(formattedDate)) {
       paramsData.value.startDate = "";
       return $showToast("开始日期不能晚于结束日期");
     }
   } else {
-    paramsData.value.endDate = formattedDate; // 设置结束日期
+    paramsData.value.endDate = formattedDate.split(" ")[0]; // 设置结束日期
     // 如果开始日期存在且结束日期早于开始日期,则重置结束日期并提示用户
     if (paramsData.value.startDate && new Date(formattedDate) < new Date(paramsData.value.startDate)) {
       paramsData.value.endDate = "";
@@ -168,7 +168,10 @@ const dateTimePickerConfirm = (e: any) => {
   // 获取数据
   getData();
 };
-
+const search = () => {
+	dateList.value = []
+	getData()
+}
 /**
  * 选择器关闭回调
  */

+ 6 - 1
src/subpackages/my/ownership/index.scss

@@ -79,6 +79,7 @@
 				border-radius: 0rpx 0rpx 26rpx 0rpx;
 				font-weight: 500;
 				font-size: 26rpx;
+		
 				color: #be9737;
 			}
 			view {
@@ -100,8 +101,11 @@
 		}
 		.view-detail {
 			margin-top: 32rpx !important;
+			height: 88rpx;
+			margin-bottom: unset !important;
+			// display: flex;
 			border-top: 1rpx solid rgba(132, 141, 153, 0.16);
-			padding-top: 24rpx !important;
+			// padding-top: 24rpx !important;
 			display: flex !important;
 			align-items: center;
 			justify-content: center !important;
@@ -111,6 +115,7 @@
 		}
 		.title {
 			margin-top: 10rpx;
+			margin-bottom: 20rpx;
 			font-weight: bold;
 			font-size: 36rpx;
 			color: #16181a;

+ 14 - 13
src/subpackages/my/ownership/index.vue

@@ -32,7 +32,7 @@
 			<view class="list">
 				<!-- 软著数据模板 -->
 				<template v-if="currentIndex">
-					<view class="item" v-for="(item, index) in dataList" :key="index"  @click="toWebView(item.url)">
+					<view class="item" v-for="(item, index) in dataList" :key="index"  >
 						<!-- 标题和详细信息 -->
 						<view>
 							<text class="title">{{item.name}}</text>
@@ -66,43 +66,43 @@
 							<text class="info">{{item.registerNumber}}</text>
 						</view>
 						<!-- 查看详情按钮 -->
-						<view class="view-detail" @click="toPage">查看详情</view>
+						<view class="view-detail" @click="toWebView(item.url)">查看详情</view>
 					</view>
 				</template>
 				<!-- 专利数据模板 -->
 				<template v-else>
-					<view class="item" v-for="(item, index) in dataList" :key="index" @click="toWebView(item.url)">
+					<view class="item" v-for="(item, index) in dataList" :key="index" >
 						<view class="spec">
 							AI大模型提示信息生成方法,装置,设备及存储介质
 						</view>
-						<text class="flag_01">发布公布</text>
+						<text class="flag_01">{{item.category}}</text>
 						<view>
 							<text class="name">公布号</text>
-							<text class="info">ccc</text>
+							<text class="info">{{item.registerNumber}}</text>
 						</view>
 						<view>
 							<text class="name">公告日</text>
-							<text class="info"></text>
+							<text class="info">{{item.registerDate}}</text>
 						</view>
 						<view>
 							<text class="name">专利权人</text>
-							<text class="info">ccc</text>
+							<text class="info">{{item.holder}}</text>
 						</view>
 						<view>
 							<text class="name">发明人</text>
-							<text class="info">ccc</text>
+							<text class="info">{{item.inventor}}</text>
 						</view>
 						<view>
 							<text class="name">摘要</text>
-							<text class="info">ccc</text>
+							<text class="info">{{item.remark}}</text>
 						</view>
 						<!-- 查看详情按钮 -->
-						<view class="view-detail" @click="toPage"> 查看详情</view>
+						<view class="view-detail" @click="toWebView(item.url)"> 查看详情</view>
 					</view>
 				</template>
 			</view>
 			<!-- 自定义加载更多组件 -->
-			<CustomLoadMore status="nomore" />
+			<CustomLoadMore :status="loadStatus" />
 		</view>
 	</view>
 </template>
@@ -163,13 +163,14 @@ const toWebView = (url:string) => {
  * 获取数据
  */
 const getData = async () => {
-	paramsData.value.type = currentIndex.value ? 1 : 0; // 根据当前索引设置请求类型
+	loadStatus.value = 'loading'
+	paramsData.value.type = currentIndex.value ? 1 : 2; // 根据当前索引设置请求类型
 	const {
 		data: { records, total },
 	} = await baseApi.queryCopyrightList(paramsData.value);
 	dataList.value.push(...records); // 设置数据列表
 	pageTotal.value = total; // 设置数据总数
-	loadStatus.value = 'loading'
+
 	if (dataList.value.length < total) {
 		loadStatus.value = "loadmore";
 	} else {

+ 1 - 1
src/uni_modules/uv-toolbar/components/uv-toolbar/props.js

@@ -18,7 +18,7 @@ export default {
 		// 確認按鈕的文字
 		confirmText: {
 			type: String,
-			default: '確認'
+			default: '确认'
 		},
 		// 取消按鈕的顏色
 		cancelColor: {

+ 3 - 0
src/utils/common.ts

@@ -34,6 +34,8 @@ export function showToast(title: string) {
 		icon: "none",
 	});
 }
+
+
 export function onDateChange(e: string | number): string {
   const date = new Date(e); // 获取选择的日期
   
@@ -48,3 +50,4 @@ export function onDateChange(e: string | number): string {
   const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
   return formattedDate;
 }
+

+ 1 - 1
src/utils/request.ts

@@ -13,7 +13,7 @@ baseUrl = import.meta.env.VITE_APP_URL;
 // #endif
 
 // #ifdef H5
-baseUrl = import.meta.env.VITE_APP_URL_H5;
+baseUrl = import.meta.env.VITE_APP_DEV;
 // #endif
 
 export const requestCommon = {

Some files were not shown because too many files changed in this diff