zhuanjiafenpei.vue 9.0 KB
<template>
	<view class="box">
		<view class="head">
			<view class="headleft">
				<input type="text" placeholder="输入项目名称查询" @input="enterxiangmu"/>
			</view>
			<view class="headright" @click="chaxun">查询</view>
		</view>
		
		<view class="nodata" v-if="zhuanjialist.length==0">暂无数据</view>

		<view class="fenzulist" v-else>
			<view class="fenzuitem" v-for="(item,index) in zhuanjialist" :key="index">
				<view class="fenzutop">
					<view class="fenzutopleft">
						<view class="fenzutopshang">
							<text class="bianhao">项目编号:</text><text class="bianhaonum">{{item.fnumber}}</text>
						</view>
						<!-- <view class="fenzutopshang">
							<text class="bianhao">任务编号:</text><text class="bianhaonum"> 20191115001</text>
						</view> -->
					</view>
					<view class="fenzutopright">
						<view class="fenzunoimg">
							<image src="../../static/img/yifen.png" mode="" v-if="item.fexpertstatus=='已分配'"></image>
							<image src="../../static/img/nofen.png" mode="" v-else></image>
						</view>
						<view class="fenzunoname">{{item.fexpertstatus}}</view>
					</view>
				</view>
				<view class="fenzuobottom">
					<view class="fenzutopshang">
						<text class="bianhao">项目名称:</text><text class="bianhaonum">
							{{item.fname}}
						</text>
					</view>
				<!-- 	<view class="fenzutopshang">
						<text class="bianhao">项目类型:</text><text class="bianhaonum"> {{item.projecttype}}</text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">评审类型:</text><text class="bianhaonum"> {{item.freviewtype}}</text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">项目组:</text><text class="bianhaonum">{{item.fteam==null?'':item.fteam}} </text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">专家:</text><text class="bianhaonum">{{item.fexname==null?'':item.fexname}} </text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">专家手机号:</text><text class="bianhaonum">{{item.fexphone==null?'':item.fexphone}} </text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">专家分配状态:</text><text class="bianhaonum">{{item.fexpertstatus}} </text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">任务状态:</text><text class="bianhaonum">{{item.ftaskprocess}} </text>
					</view>

					<view class="fenzubottom">
						<view class="fenzubtn" @click="zhuanjiafen" :data-item="item">专家分配</view>
						
					</view> -->
				</view>


			</view>

			<!-- <view class="fenzuitem">
				<view class="fenzutop">
					<view class="fenzutopleft">
						<view class="fenzutopshang">
							<text class="bianhao">项目编号:</text><text class="bianhaonum"> 20191115001</text>
						</view>
						<view class="fenzutopshang">
							<text class="bianhao">任务编号:</text><text class="bianhaonum"> 20191115001</text>
						</view>
					</view>
					<view class="fenzutopright">
						<view class="fenzunoimg">
							<image src="../../static/img/yifen.png" mode=""></image>
						</view>
						<view class="fenzunoname">已分配</view>
					</view>
				</view>
				<view class="fenzuobottom">
					<view class="fenzutopshang">
						<text class="bianhao">项目名称:</text><text class="bianhaonum">
							机关服务中心会务处保安服务项目
						</text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">项目类型:</text><text class="bianhaonum"> 预算</text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">项目组:</text><text class="bianhaonum"> </text>
					</view>

					<view class="fenzubottom">
						<view class="fenzubtn">专家分配</view>
						<view class="fenzubtn">二次分配</view>
					</view>
				</view>


			</view>
			<view class="fenzuitem"> -->
				<!-- <view class="fenzutop">
					<view class="fenzutopleft">
						<view class="fenzutopshang">
							<text class="bianhao">项目编号:</text><text class="bianhaonum"> 20191115001</text>
						</view>
						<view class="fenzutopshang">
							<text class="bianhao">任务编号:</text><text class="bianhaonum"> 20191115001</text>
						</view>
					</view>
					<view class="fenzutopright">
						<view class="fenzunoimg">
							<image src="../../static/img/yifen.png" mode=""></image>
						</view>
						<view class="fenzunoname">二次已分配</view>
					</view>
				</view>
				<view class="fenzuobottom">
					<view class="fenzutopshang">
						<text class="bianhao">项目名称:</text><text class="bianhaonum">
							机关服务中心会务处保安服务项目
						</text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">项目类型:</text><text class="bianhaonum"> 预算</text>
					</view>
					<view class="fenzutopshang">
						<text class="bianhao">项目组:</text><text class="bianhaonum"> </text>
					</view>

					<view class="fenzubottom">
						<view class="fenzubtn">专家分配</view>
						<view class="fenzubtn">二次分配</view>
					</view>
				</view> -->


			</view>

		</view>
	</view>


</template>
<script>
	import app from "../../App.vue";
	export default {
		data() {
			return {
				selshow: false,
				zhuanjialist:[],
				keyword:'',
				querylist:[]
			}
		},
		onLoad() {
			this.getzhuanjialist()
		},
		onshow(){
			
		},
		methods: {
			zhuanjiafen(e){
				console.log(e)
				
				 let item=e.target.dataset.item;
				 item=JSON.stringify(item);
				 console.log(item)
				 uni.navigateTo({
				 	url:'../zhuanjiafenpeisec/zhuanjiafenpeisec?item='+item
				 })
				// uni.navigateTo({
				// 	url:'../zhuanjiafen/zhuanjiafen?item='+item
				// })
			},
			
			// 专家二次分配
			zhuanjiafensec(){
				uni.navigateTo({
					url:'../zhuanjiafenpeisec/zhuanjiafenpeisec'
				})
			},
			enterxiangmu(e) {
				console.log(e)
				this.keyword = e.target.value;
			},
			
			getzhuanjialist(){
				let that = this;
				
				let url = "project/Get_ExDistribution";
				let param = {
					fuserid: uni.getStorageSync("userid")
				}     
				// console.log('8877665544',param)
				app.post(url, param, 'get').then(r => {
					 // console.log(r);
					that.zhuanjialist=r.data;
					that.querylist=r.data;
				}).catch(err => {
					console.log(err)
				})
			},
			chaxun() {
				
				if(this.keyword==''){
					this.getzhuanjialist();
				}else{
					let newxiangmuarr = [];
					let newzixunlist = this.querylist;
					let name=[]
					for (var obj of newzixunlist) {
						name.push(obj.fname)
					}
					
					console.log('名称',name)
					for(var i=0;i<newzixunlist.length;i++){
						for(var j=0;j<name.length;j++){
							
							if (name[j].indexOf(this.keyword)>=0) {
								if(j==i){
									newxiangmuarr.push(newzixunlist[i])
								}
								
								// console.log(9999)
								
							}
						}
					}
					
					console.log('9999000777',newxiangmuarr);
					this.zhuanjialist = newxiangmuarr;
					
				}
				
			}
					
		},
	
	}
</script>

<style>
	page {
		background: #F9F9F9;
	}

	.head {
		display: flex;
		align-items: center;
		padding: 20rpx 32rpx;
		box-sizing: border-box;
		background: #fff;
		display:flex;
		align-items: center;
	}

	.headleft {
		width: 572rpx;
		height: 60rpx;
		background: rgba(238, 238, 238, 1);
		opacity: 1;
		border-radius: 8rpx;
		padding: 10rpx 24rpx;
		box-sizing: border-box;
		display:flex;
		align-items: center;
	}

	.headleft input {
		color: #BDC4CE;
		font-size: 28rpx;
	}

	.headright {
		width: 98rpx;
		height: 60rpx;
		background: rgba(0, 147, 255, 1);
		opacity: 1;
		border-radius: 8rpx;
		color: #fff;
		font-size: 22rpx;
		text-align: center;
		line-height: 60rpx;
		margin-left: 16rpx;
	}

	.fenzuitem {
		width: 686rpx;
		/* height: 484rpx; */
		background: rgba(255, 255, 255, 1);
		box-shadow: 0px 6rpx 6rpx rgba(0, 0, 0, 0.03);
		opacity: 1;
		border-radius: 20rpx;
		margin: 20rpx auto 0;
		padding: 28rpx 32rpx 40rpx;
		box-sizing: border-box;
	}



	.fenzunoimg {
		width: 28rpx;
		height: 28rpx;
		font-size: 0;
		margin-right: 10rpx;
	}

	.fenzunoimg image {
		width: 100%;
		height: 100%;
	}

	.bianhao {
		color: #8C9198;
		font-size: 24rpx;

	}

	.bianhaonum {
		color: #06121E;
		font-size: 24rpx;
		letter-spacing: 2rpx;
	}

	.fenzunoname {
		color: #3D444D;
		font-size: 24rpx;
	}

	.fenzutopright {
		display: flex;
		align-items: center;
		/* width: 126rpx; */
		height: 48rpx;
		border: 1rpx solid rgba(189, 196, 206, 1);
		opacity: 1;
		border-radius: 8rpx;
		padding: 0 5rpx;
		box-sizing: border-box;

	}

	.fenzutop {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-bottom: 16rpx;
		border-bottom: 1rpx solid #f5f5f5;
	}

	.fenzuobottom {
		margin-top: 16rpx
	}

	.fenzubottom {
		display: flex;
		justify-content: flex-end;
		margin-top: 16rpx
	}

	.fenzubtn {
		width: 200rpx;
		height: 64rpx;
		background: rgba(0, 147, 255, 1);
		opacity: 1;
		border-radius: 8rpx;
		color: #F9F9F9;
		font-size: 24rpx;
		text-align: center;
		line-height: 64rpx;
		margin-right: 24rpx;
	}

	.fenzubtn:last-child {
		margin-right: 0
	}
</style>