<template>
	<view class="c_task_item" @click="clickTask">



		<!-- {{datas.datas[0].data_field}} -->
		<view class="personnel_list" v-for="(item ,i) in datas.datas">
			<view class="cards" v-if="item.ai_question">

				<view class="cards_content">
					<view class="right" style="width: 100%">
						<view class="">
							AI提问
						</view>
						<view class="" style="white-space: pre-line;">
							<view class="">
								根据以下信息
							</view>
							<view class="" style="text-align: left;" v-for="(items,indexs) in item.data_field">
								{{indexs}} :{{items}}

							</view>
							<!-- {{item.ai_question}} -->
							<view class="">
								请问有那些商机？需要购买哪些商品？
							</view>
						</view>
					</view>

				</view>
				<view class="cards_content">
					<view class="right" style="width: 100%">
						<view class="">
							AI回答
						</view>
						<view class="" style="white-space: pre-line;">
							{{item.ai_aianalyse}}
						</view>
					</view>

				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		Toast
	} from '../../libs/uniApi';
	export default {
		name: "task",
		props: {
			datas: {
				type: Object,
				default: function() {
					return {}
				}
			}
		},
		data() {
			return {
				extend: {}
			};
		},
		mounted() {
			this.$props.datas.extend ? this.extend = this.$props.datas.extend : null;

		},
		methods: {}
	}
</script>

<style lang="scss">
	.c_task_item {
		margin: 0 auto;
		// margin-bottom: 28rpx;
		width: 694rpx;
		// background: #FFFFFF;
		border-radius: 14rpx 14rpx 14rpx 14rpx;
		opacity: 1;
		font-size: 25rpx;
		font-weight: 400;
		color: #999999;
		line-height: 39rpx;

		.text {
			font-size: 28rpx;
			font-weight: 400;
			color: #333333;
			line-height: 39rpx;
			margin-left: 18rpx;
		}

		.top {
			display: flex;
			justify-content: space-between;
			padding: 28rpx;
			border-bottom: 1rpx solid #f5f5f5ff;

			.left {
				display: flex;
				justify-content: left;
				align-items: center;
			}

			.right {
				.icon {
					width: 43rpx;
					height: 43rpx;
				}
			}
		}

		.bottom {
			padding: 28rpx;
			display: flex;

			.b_left {
				width: 103.39rpx;
				height: 94.63rpx;
				margin-right: 18rpx;
			}

			.b_right {
				flex: 1;
				display: flex;
				justify-content: space-around;
				flex-direction: column;

				.item {
					display: flex;
					justify-content: space-between;
					// margin: 18rpx 28rpx 0 28rpx;

					// &:last-child {
					//   padding-bottom: 18rpx;
					// }

					.left {
						display: flex;
					}

					.right {
						font-size: 32rpx;
						font-weight: 400;
						color: #3274f9;
						line-height: 39rpx;

						.price {
							font-size: 25rpx;
						}
					}
				}
			}
		}
	}

	.personnel_list {
		// padding: 28rpx 0;
		padding-bottom: 28rpx;

		.cards {
			margin: 0 auto;
			// margin-bottom: 28rpx;
			width: 694rpx;
			background: #ffffff;
			border-radius: 30rpx;
			opacity: 1;
			overflow: hidden;
			// box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);

			.cards_head {
				padding: 28rpx;
				background-color: $theme-oa-color;
				color: white;
				min-height: 100rpx;
				display: flex;
				justify-content: space-between;
			}

			.cards_content {
				padding: 28rpx;


				.left {
					text-align: center;
					// padding: 15rpx 25rpx;
					padding-top: 20rpx;

					width: 160rpx;
					background-color: $theme-oa-color;
					color: white;
					border-radius: 40rpx;

					.cir {
						width: 120rpx;
						height: 120rpx;
						background-color: #ffffff;
						margin-left: 25rpx;
						border-radius: 120rpx;
						position: relative;
					}
				}

				.right {
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					view {
						text:nth-child(2) {
							margin-left: 20rpx;
						}

						.status {
							display: inline-block;
							float: right;
							color: white;
							text-align: center;
							padding: 10rpx 30rpx;
							border-radius: 30rpx;
						}
					}
				}
			}

			.u_avatar {
				position: absolute;
				top: 50%;
				left: 50%;

				transform: translate(-50%, -50%);
			}
		}
	}
</style>