Browse Source

bug 修复

lilei 4 years ago
parent
commit
e2c4ae07de

+ 0 - 243
components/uni-steps/uni-steps.vue

@@ -1,243 +0,0 @@
-<template>
-	<view class="uni-steps">
-		<view :class="[direction==='column'?'uni-steps__column':'uni-steps__row']">
-			<view :class="[direction==='column'?'uni-steps__column-text-container':'uni-steps__row-text-container']">
-				<view v-for="(item,index) in options" :key="index" :class="[direction==='column'?'uni-steps__column-text':'uni-steps__row-text']">
-					<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-title':'uni-steps__row-title']">{{item.title}}</text>
-					<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-desc':'uni-steps__row-desc']">{{item.desc}}</text>
-				</view>
-			</view>
-			<view :class="[direction==='column'?'uni-steps__column-container':'uni-steps__row-container']">
-				<view :class="[direction==='column'?'uni-steps__column-line-item':'uni-steps__row-line-item']" v-for="(item,index) in options"
-				 :key="index">
-					<view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--before':'uni-steps__row-line--before']"
-					 :style="{backgroundColor:index<=active&&index!==0?activeColor:index===0?'transparent':deactiveColor}"></view>
-					<view :class="[direction==='column'?'uni-steps__column-check':'uni-steps__row-check']" v-if="index === active">
-						<uni-icons :color="activeColor" type="checkbox-filled" size="14"></uni-icons>
-					</view>
-					<view :class="[direction==='column'?'uni-steps__column-circle':'uni-steps__row-circle']" v-else :style="{backgroundColor:index<active?activeColor:deactiveColor}"></view>
-					<view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--after':'uni-steps__row-line--after']"
-					 :style="{backgroundColor:index<active&&index!==options.length-1?activeColor:index===options.length-1?'transparent':deactiveColor}"></view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import uniIcons from '../uni-icons/uni-icons.vue'
-	export default {
-		name: 'UniSteps',
-		components: {
-			uniIcons
-		},
-		props: {
-			direction: {
-				// 排列方向 row column
-				type: String,
-				default: 'row'
-			},
-			activeColor: {
-				// 激活状态颜色
-				type: String,
-				default: '#1aad19'
-			},
-			deactiveColor: {
-				// 未激活状态颜色
-				type: String,
-				default: '#999999'
-			},
-			active: {
-				// 当前步骤
-				type: Number,
-				default: 0
-			},
-			options: {
-				type: Array,
-				default () {
-					return []
-				}
-			} // 数据
-		},
-		data() {
-			return {}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.uni-steps {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		width: 100%;
-		/* #endif */
-		/* #ifdef APP-NVUE */
-		flex: 1;
-		/* #endif */
-		flex-direction: column;
-	}
-
-	.uni-steps__row {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-	}
-
-	.uni-steps__column {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row-reverse;
-	}
-
-	.uni-steps__row-text-container {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-	}
-
-	.uni-steps__column-text-container {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-		flex: 1;
-	}
-
-	.uni-steps__row-text {
-		/* #ifndef APP-NVUE */
-		display: inline-flex;
-		/* #endif */
-		flex: 1;
-		flex-direction: column;
-	}
-
-	.uni-steps__column-text {
-		padding: 15px 0px;
-		border-bottom-style: solid;
-		border-bottom-width: 1px;
-		border-bottom-color: #eee;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-	}
-
-	.uni-steps__row-title {
-		font-size: $uni-font-size-base;
-		line-height: 16px;
-		text-align: center;
-	}
-
-	.uni-steps__column-title {
-		font-size: $uni-font-size-base;
-		text-align: left;
-		line-height: 18px;
-	}
-
-	.uni-steps__row-desc {
-		font-size: 12px;
-		line-height: 14px;
-		text-align: center;
-	}
-
-	.uni-steps__column-desc {
-		font-size: $uni-font-size-sm;
-		text-align: left;
-		line-height: 18px;
-	}
-
-	.uni-steps__row-container {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-	}
-
-	.uni-steps__column-container {
-		/* #ifndef APP-NVUE */
-		display: inline-flex;
-		/* #endif */
-		width: 30px;
-		flex-direction: column;
-	}
-
-	.uni-steps__row-line-item {
-		/* #ifndef APP-NVUE */
-		display: inline-flex;
-		/* #endif */
-		flex-direction: row;
-		flex: 1;
-		height: 14px;
-		line-height: 14px;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.uni-steps__column-line-item {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-		flex: 1;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.uni-steps__row-line {
-		flex: 1;
-		height: 1px;
-		background-color: $uni-text-color-grey;
-	}
-
-	.uni-steps__column-line {
-		width: 1px;
-		background-color: $uni-text-color-grey;
-	}
-
-	.uni-steps__row-line--after {
-		transform: translateX(1px);
-	}
-
-	.uni-steps__column-line--after {
-		flex: 1;
-		transform: translate(0px, 1px);
-	}
-
-	.uni-steps__row-line--before {
-		transform: translateX(-1px);
-	}
-
-	.uni-steps__column-line--before {
-		height: 6px;
-		transform: translate(0px, -1px);
-	}
-
-	.uni-steps__row-circle {
-		width: 5px;
-		height: 5px;
-		border-radius: 100px;
-		background-color: $uni-text-color-grey;
-		margin: 0px 3px;
-	}
-
-	.uni-steps__column-circle {
-		width: 5px;
-		height: 5px;
-		border-radius: 100px;
-		background-color: $uni-text-color-grey;
-		margin: 4px 0px 5px 0px;
-	}
-
-	.uni-steps__row-check {
-		margin: 0px 6px;
-	}
-
-	.uni-steps__column-check {
-		height: 14px;
-		line-height: 14px;
-		margin: 2px 0px;
-	}
-</style>

+ 38 - 7
pages/toDoList/backlogDetail.vue

@@ -56,7 +56,23 @@
 				</view>
 			</view>
 			<view class="step-content">
-				<uni-steps :active-color="'rgb(41, 121, 255)'" :options="numList" direction ="column" :active="0"></uni-steps>
+				<u-time-line>
+						<u-time-line-item nodeTop="4" v-for="(item,index) in numList" :key="item.id">
+							<!-- 此处自定义了左边内容,用一个图标替代 -->
+							<template v-slot:node>
+								<view class="u-node" :style="`background: ${index==0?'#19be6b':''};`">
+									<!-- 此处为uView的icon组件 -->
+									<u-icon name="checkmark" color="#fff" :size="20"></u-icon>
+								</view>
+							</template>
+							<template v-slot:content>
+								<view>
+									<view class="u-order-title">{{item.title}}</view>
+									<view class="u-order-desc">{{item.desc}}</view>
+								</view>
+							</template>
+						</u-time-line-item>
+					</u-time-line>
 			</view>
 		</view>
 		<view class="footer">
@@ -81,12 +97,8 @@
 </template>
 
 <script>
-	import uniSteps from '@/components/uni-steps/uni-steps.vue'
 	import { getBackLogDetail, getBackLogRecord, handleBackLog } from '@/api/backLog.js'
 	export default {
-		components: {
-			uniSteps
-		}, 
 		data() {
 			return {
 				status: 'loading',
@@ -140,7 +152,7 @@
 					if(res.status==200){
 						let arr = []
 						res.data.map(item=>{
-							const p = {}
+							const p = {id:item.id}
 							const k = '\xa0\xa0\xa0\xa0\xa0\xa0'
 							p.title = item.handleTime + k + item.handleTypeDictValue 
 							p.desc = item.handleDesc ? item.handleDesc : ''
@@ -257,8 +269,27 @@
 		}
 		// 步骤条
 		.step-content {
-			padding: 0 20upx;
+			padding: 30upx 40upx;
 			background-color: #fff;
+			.u-node {
+				width: 30rpx;
+				height: 30rpx;
+				border-radius: 100rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				background: #d0d0d0;
+				margin-left: 1px;
+			}
+			.u-order-title {
+				color: #333333;
+				margin-bottom: 10rpx;
+			}
+			.u-order-desc {
+				color: rgb(150, 150, 150);
+				margin-bottom: 6rpx;
+				line-height: 40upx;
+			}
 		}
 		
 		// 底部按钮

File diff suppressed because it is too large
+ 135 - 63
unpackage/dist/dev/app-plus/app-service.js


File diff suppressed because it is too large
+ 141 - 26
unpackage/dist/dev/app-plus/app-view.js


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