Browse Source

合并两个card页面

lsh 4 months ago
parent
commit
66970dd8b1
3 changed files with 40 additions and 14 deletions
  1. 29 4
      pages/feedback/FeedbackList.vue
  2. 6 1
      pages/feedback/details.vue
  3. 5 9
      pages/feedback/index.vue

+ 29 - 4
pages/feedback/FeedbackList.vue

@@ -9,6 +9,7 @@
 				<view v-for="(item,index) in listArray" :key="index" class="loop-list-item" @click="onClick(item)">
 					<view class="item-content">
 						<view class="item-title">
+							<view class="title-line" v-if="props.cardType">{{ item.djr }}</view>
 							<view class="title-line">{{ filterApplicationType(item.fklx) }}</view>
 							<view class="title-company" :class="filterApplicationBgColor(item.fkzt)">{{ filterApplicationStatus(item.fkzt) }}</view>
 						</view>
@@ -19,6 +20,10 @@
 								<view class="textValue">{{ textItem.value }}</view>
 							</view>
 						</view>
+						<view class="bootom-content" v-if="props.cardType">
+							<view>{{ item.yljgmc }}</view>
+							<view>{{ formatDate(item.createTime,'{y}-{m}-{d} {h}:{i}:{s}') }}</view>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -36,6 +41,7 @@
 		filterApplicationStatus,
 		filterApplicationType,
 		filterApplicationBgColor,
+		formatDate
 	} from '@/lib/util'
 
 	const emit = defineEmits(['click','nextPage']) // 定义 success 事件,用于操作成功后的回调
@@ -48,6 +54,10 @@
 		status: {
 			type: String,
 			default: "loading"
+		},
+		cardType: {
+			type: Boolean,
+			default: false
 		}
 	});
 	const pubListScrollRef = ref(null)
@@ -77,13 +87,14 @@
 			padding: 32rpx 40rpx 0rpx;
 			background-color: #F6F7F8;
 			.loop-list-item {
-				min-height: 200rpx;
+				min-height: 210rpx;
 				margin-bottom: 24rpx;
 				border-radius: 10rpx;
 				background: #fff;
 				padding: 14rpx 0 20rpx;
 				.item-content {
 					.item-title{
+						height: 60rpx;
 						padding: 0 20rpx;
 						display: flex;
 						justify-content: space-between;
@@ -113,37 +124,51 @@
 					}
 					.part-line {
 						border-top: 1px solid #EFEFEF;
-						margin: 10rpx 0 20rpx;
+						margin: 10rpx 0 30rpx;
 					}
 					.text-content {
 						padding: 0 20rpx;
 						display: flex;
 						flex-direction: column;
+						margin-bottom: 24rpx;
 						.other-loop-item {
-							margin-bottom: 10rpx;
+							margin-bottom: 20rpx;
 							display: flex;
 							align-items: center;
 							font-size: 28rpx;
 							font-weight: 400;
 							.textTitle {
-								color: #9B9B9B;
+								color: #686B73;
 								margin-right: 24rpx;
+								flex-shrink: 0
 							}
 							.textValue {
 								color: #363A44;
+								white-space: nowrap;
+								overflow: hidden;
+								text-overflow: ellipsis;
+								flex-grow: 1;
 							}
 							&:last-child { 
 								margin-bottom: 0; 
 							}
 						}
 					}
+					.bootom-content {
+						padding: 0 20rpx;
+						@include flex-between;
+						font-size: 12px;
+						color: #686B73;
+					}
 				}
 			}
 			
 		}
+		
 		.feedback-no {
 			height: calc(100vh - 210px);
 		}
+		
 		::v-deep .scroll-view {
 			height: calc(100%);
 			background-color: transparent !important;

+ 6 - 1
pages/feedback/details.vue

@@ -57,7 +57,7 @@
 				</view>
 			</view>
 		</pub-loading-view>
-		<view v-if="!disabledRef" class="pub-button is-bg large submit" @click="onConfirm">提交</view>
+		<view v-if="showSubmitButton" class="pub-button is-bg large submit" @click="onConfirm">提交</view>
 	</view>
 </template>
 <script lang="ts" setup>
@@ -112,6 +112,7 @@
 	])
 	const itemId = ref()
 	const disabledRef = ref(false)
+	const showSubmitButton = ref(false)
 	const pickerDeptRef = ref()
 	const popupDeptText = ref()
 	const yljgList = ref() // 医疗机构列表
@@ -196,6 +197,9 @@
 					timeLine.value.push({ desc: '等待受理', time: null })
 				}
 				disabledRef.value = true
+				showSubmitButton.value = false;
+			}else {
+				showSubmitButton.value = true;
 			}
 		} catch (e) {
 			dlg.error(e)
@@ -204,6 +208,7 @@
 
 
 	onLoad((data) => {
+		itemId.value = null
 		if (data.id) {
 			itemId.value = data.id
 		}

+ 5 - 9
pages/feedback/index.vue

@@ -10,20 +10,16 @@
 		<!-- 内容 -->
 		<swiper :current="navIndex" @change="tabChange" class="swiper_content">
 			<swiper-item class="swiper_item">
-				<DetailedFeedbackList v-if="globalParameter.isLeader" :listArray="listArray" />
-				<FeedbackList v-else :listArray="listArray" @click="onClick" @nextPage="onNextPage" />
+				<FeedbackList :cardType="globalParameter.isLeader" :listArray="listArray" @click="onClick" @nextPage="onNextPage" />
 			</swiper-item>
 			<swiper-item class="swiper_item">
-				<DetailedFeedbackList v-if="globalParameter.isLeader" :listArray="listArray" />
-				<FeedbackList v-else :listArray="listArray" @click="onClick" @nextPage="onNextPage" />
+				<FeedbackList :cardType="globalParameter.isLeader" :listArray="listArray" @click="onClick" @nextPage="onNextPage" />
 			</swiper-item>
 			<swiper-item class="swiper_item">
-				<DetailedFeedbackList v-if="globalParameter.isLeader" :listArray="listArray" />
-				<FeedbackList v-else :listArray="listArray" @click="onClick" @nextPage="onNextPage" />
+				<FeedbackList :cardType="globalParameter.isLeader" :listArray="listArray" @click="onClick" @nextPage="onNextPage" />
 			</swiper-item>
 			<swiper-item class="swiper_item">
-				<DetailedFeedbackList v-if="globalParameter.isLeader" :listArray="listArray" />
-				<FeedbackList v-else :listArray="listArray" @click="onClick" @nextPage="onNextPage" />
+				<FeedbackList :cardType="globalParameter.isLeader" :listArray="listArray" @click="onClick" @nextPage="onNextPage" />
 			</swiper-item>
 		</swiper>
 		<!-- 新增 -->
@@ -42,7 +38,7 @@
 	import { aesEncrypt, aesDecrypt } from "@/lib/encryption";
 	import { formatDate } from '@/lib/util'
 	import FeedbackList from './FeedbackList.vue'
-	import DetailedFeedbackList from './DetailedFeedbackList.vue'
+	// import DetailedFeedbackList from './DetailedFeedbackList.vue'
 
 	import { useUserStore } from '@/lib/store';
 	const store = useUserStore();