heyang 2 年之前
父節點
當前提交
46c6e3a307

+ 2 - 2
api/request/config.js

@@ -1,5 +1,5 @@
 const config = {
 const config = {
-	base_url: 'http://192.168.1.9:8080',//柴
+	//base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	 //base_url: 'http://192.168.1.17:8080',//小飞
 	 //base_url: 'http://192.168.1.17:8080',//小飞
 	 //base_url: 'http://192.168.1.20:8080',//志伟
 	 //base_url: 'http://192.168.1.20:8080',//志伟
@@ -9,7 +9,7 @@ const config = {
 	// base_url: 'https://demo.zjznai.com/xzgd/',
 	// base_url: 'https://demo.zjznai.com/xzgd/',
 
 
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试
-	// base_url: 'https://lab.zjznai.com/labAppTest/',//43服务器线上
+	 base_url: 'https://lab.zjznai.com/labAppTest/',//43服务器线上
     //base_url: 'https://lab.zjznai.com/appTest/',//88服务器线上
     //base_url: 'https://lab.zjznai.com/appTest/',//88服务器线上
 	 //base_url: 'https://lab.zjznai.com/labSystem/', //矿大地址
 	 //base_url: 'https://lab.zjznai.com/labSystem/', //矿大地址
       // base_url: 'https://lab.zjznai.com/labSaasSystem/', //矿大化工
       // base_url: 'https://lab.zjznai.com/labSaasSystem/', //矿大化工

+ 145 - 222
pages/login.vue

@@ -1,40 +1,35 @@
 <!-- 登录 -->
 <!-- 登录 -->
 <template>
 <template>
-  <view id="login">
-    <!-- <img class="login-max-big" src="@/images/img_bg_dl.png"> -->
-    <img class="login-max-big" :src="loginBanner">
-    <view class="login-box">
-	  <view class="tabTitle">
-	  	<view class="tabTitle_li" @tap="tabClick(index)"  :key="index" v-for="(item,index) in tabText">
-	  		<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
-	  	    <view :class="{on:curTab==index}" class="tabTitle_across"></view>
-	  	</view>
-	  </view>
-      <view class="input-max-box-one">
-        <view class="input-box">
-          <img src="@/images/img_log_in_account.png"/>
-          <input type="text" v-model="username" placeholder="请输入账号" maxlength="20">
-        </view>
-      </view>
-      <view class="input-max-box-two">
-        <view class="input-box">
-          <img src="@/images/img_log_in_password.png"/>
-          <input type="password" v-model="password" placeholder="请输入密码" maxlength="20">
-        </view>
-      </view>
-      <view class="check-box" @click="checkboxChange">
-        <img v-if="checkedType" src="@/images/icon_13.png"/>
-        <img v-if="!checkedType" src="@/images/icon_12.png"/>
-        <view>记住我</view>
-      </view>
-      <view class="button-box" @click="login">登录</view>
-      <view class="supplier" v-if="curTab==1">
-        <view class="supplier_l" @click="handleClick('forget')">忘记密码</view>
-        <view class="supplier_r" @click="handleClick('register')">没有账号,<text>立即注册</text></view>
-      </view>
-    </view>
-    <!-- <img class="top-back" src="@/images/img_sys_bg.png"/> -->
-  </view>
+	<view id="login">
+		<!-- <img class="login-max-big" src="@/images/img_bg_dl.png"> -->
+		<img class="login-max-big" :src="loginBanner">
+		<view class="login-box">
+			<view class="input-max-box-one">
+				<view class="input-box">
+					<img src="@/images/img_log_in_account.png">
+					<input type="text" v-model="username" placeholder="请输入账号" maxlength="20">
+				</view>
+			</view>
+			<view class="input-max-box-two">
+				<view class="input-box">
+					<img src="@/images/img_log_in_password.png">
+					<input type="password" v-model="password" placeholder="请输入密码" maxlength="20">
+				</view>
+			</view>
+			<view class="check-max-box">
+				<view class="check-box" @click="checkboxChange">
+					<img v-if="checkedType" src="@/images/icon_13.png">
+					<img v-if="!checkedType" src="@/images/icon_12.png">
+					<view>记住我</view>
+				</view>
+				<view class="check-right-box" @click="nullPasswrod">
+					忘记密码
+				</view>
+			</view>
+			<view class="button-box" @click="login">登录</view>
+		</view>
+		<!-- <img class="top-back" src="@/images/img_sys_bg.png"> -->
+	</view>
 </template>
 </template>
 
 
 <script>
 <script>
@@ -228,200 +223,128 @@ export default {
 }
 }
 </script>
 </script>
 
 
+
 <style lang="stylus" scoped>
 <style lang="stylus" scoped>
-#login{
-  height:100%;
-  width:100%;
-  background #f5f5f5
-  position relative
-  .login-max-big{
-    width:750rpx;
-    height:1177rpx;
-    z-index:0;
-  }
-  .login-box{
-    z-index:3;
-    position: absolute
-    top:446rpx;
-    left:46rpx;
-    width:658rpx;
-    height:700rpx;
-    // background #fff
-	/* 切换按钮 */
-	.tabTitle{
-		display flex;
+	#login{
+		height:100%;
 		width:100%;
 		width:100%;
-		height: 100rpx;
-		position: absolute;
-		top: 50rpx;
-		justify-content: center;
-		>view:nth-of-type(1){
-			margin-right: 100rpx;
+		background #f5f5f5
+		position relative
+		.login-max-big{
+			width:750rpx;
+			height:1102rpx;
+			z-index:0;
 		}
 		}
-		.tabTitle_li{
-			width:168rpx;
-			text-align center;
-			.tabTitle_text{
-				display: inline-block;
-				font-size: 32rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-				line-height: 90rpx;
-				&.on{
-					color:#0183FA;
+		.login-box{
+			z-index:1;
+			position: absolute
+			top:446rpx;
+			left:46rpx;
+			width:658rpx;
+			height:655rpx;
+			// background #fff
+			border-radius:20rpx;
+			.input-max-box-one{
+				.input-box{
+					display flex
+					width:600rpx;
+					height:80rpx;
+					border:1rpx solid #e0e0e0;
+					border-radius:40rpx;
+					margin:147rpx auto 0;
+					img{
+						width:28rpx;
+						height:32rpx;
+						margin:24rpx 31rpx;
+					}
+					input{
+						flex:1;
+						font-size:24rpx;
+						height:80rpx;
+						line-height:80rpx;
+						margin-right:31rpx;
+					}
+				}
+				.text-box{
+					height:59rpx;
+					line-height:59rpx;
+					color:#DC1616;
+					font-size:24rpx;
+					margin-left:102rpx;
 				}
 				}
 			}
 			}
-			.tabTitle_across{
-				width: 100rpx;
-				height: 4rpx;
-				background: #0183FA;
-				border-radius: 2rpx;
-				margin-left 30rpx;
-				display none;
-				&.on{
-					display block;
+			.input-max-box-two{
+				margin-top:40rpx;
+				.input-box{
+					display flex
+					width:600rpx;
+					height:80rpx;
+					border:1rpx solid #e0e0e0;
+					border-radius:40rpx;
+					margin:0 auto 0;
+					img{
+						width:30rpx;
+						height:32rpx;
+						margin:24rpx 30rpx;
+					}
+					input{
+						flex:1;
+						font-size:24rpx;
+						height:80rpx;
+						line-height:80rpx;
+						margin-right:31rpx;
+					}
+				}
+				.text-box{
+					height:59rpx;
+					line-height:59rpx;
+					color:#DC1616;
+					font-size:24rpx;
+					margin-left:102rpx;
 				}
 				}
 			}
 			}
-	
+			.check-max-box{
+				display flex;
+				.check-box{
+					margin:30rpx 0 30rpx 104rpx;
+					width:300rpx;
+					height:50rpx;
+					display:flex;
+					img{
+						margin-top:10rpx;
+						width:32rpx;
+						height:32rpx;
+						margin-right:10rpx;
+					}
+					view{
+						font-size:24rpx;
+						line-height:50rpx;
+					}
+				}
+				.check-right-box{
+					font-size:24rpx;
+					line-height:50rpx;
+					margin:30rpx 0 30rpx 30rpx;
+				}
+			}
+			.button-box{
+				width: 600rpx;
+				line-height: 80rpx;
+				background: #0183FA;
+				border-radius: 40rpx;
+				font-size: 36rpx;
+				color:#fff;
+				text-align center
+				margin:0 auto 0;
+			}
+		}
+		.top-back{
+			z-index:2;
+			position: absolute
+			top:261rpx;
+			left:375rpx;
+			height:296rpx;
+			width:366rpx;
 		}
 		}
 	}
 	}
-    border-radius:20rpx;
-    .input-max-box-one{
-		overflow: hidden;
-		margin-top:68rpx;
-      .input-box{
-        display flex
-        width:600rpx;
-        height:80rpx;
-        border:1rpx solid #e0e0e0;
-        border-radius:40rpx;
-        margin:147rpx auto 0;
-        img{
-          width:28rpx;
-          height:32rpx;
-          margin:24rpx 31rpx;
-        }
-        input{
-          flex:1;
-          font-size:24rpx;
-          height:80rpx;
-          line-height:80rpx;
-          margin-right:31rpx;
-        }
-      }
-      .text-box{
-        height:59rpx;
-        line-height:59rpx;
-        color:#DC1616;
-        font-size:24rpx;
-        margin-left:102rpx;
-      }
-    }
-    .input-max-box-two{
-      margin-top:40rpx;
-      .input-box{
-        display flex
-        width:600rpx;
-        height:80rpx;
-        border:1rpx solid #e0e0e0;
-        border-radius:40rpx;
-        margin:0 auto 0;
-        img{
-          width:30rpx;
-          height:32rpx;
-          margin:24rpx 30rpx;
-        }
-        input{
-          flex:1;
-          font-size:24rpx;
-          height:80rpx;
-          line-height:80rpx;
-          margin-right:31rpx;
-        }
-      }
-      .text-box{
-        height:59rpx;
-        line-height:59rpx;
-        color:#DC1616;
-        font-size:24rpx;
-        margin-left:102rpx;
-      }
-    }
-    .check-box{
-      margin:30rpx 0 30rpx 104rpx;
-      width:300rpx;
-      height:50rpx;
-      display:flex;
-      img{
-        margin-top:10rpx;
-        width:32rpx;
-        height:32rpx;
-        margin-right:10rpx;
-      }
-      view{
-        font-size:24rpx;
-        line-height:50rpx;
-      }
-    }
-    .button-box{
-      width: 600rpx;
-      line-height: 80rpx;
-      background: #0183FA;
-      border-radius: 40rpx;
-      font-size: 36rpx;
-      color:#fff;
-      text-align center
-      margin:0 auto 0;
-    }
-    /* 供应商注册 */
-    .supplier{
-      display: flex;
-      justify-content: space-between;
-      margin:30rpx 40rpx 0;
-      .supplier_l{
-        font-size: 24rpx;
-        font-family: PingFang SC;
-        font-weight: 400;
-        color: #333333;
-        line-height: 24rpx;
-      }
-      .supplier_r{
-        font-size: 24rpx;
-        font-family: PingFang SC;
-        font-weight: 400;
-        color: #333333;
-        line-height: 24rpx;
-        >text{
-          color: #0183FA;
-        }
-      }
-    }
-    /* 供应商切换 */
-    .switch_btn{
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      font-size: 24rpx;
-      font-family: PingFang SC;
-      font-weight: 400;
-      color: #0183FA;
-      line-height: 24rpx;
-      margin-top: 60rpx;
-      >img{
-        width: 24rpx;
-        height: 24rpx;
-        margin-left: 12rpx;
-      }
-    }
-  }
-  .top-back{
-    z-index:2;
-    position: absolute
-    top:261rpx;
-    left:375rpx;
-    height:296rpx;
-    width:366rpx;
-  }
-}
 </style>
 </style>

+ 1 - 1
pages/safetyExamineWorkbench.vue

@@ -480,7 +480,7 @@ export default {
 					})
 					})
 				}else if(this.curTabThree==1){
 				}else if(this.curTabThree==1){
 					uni.navigateTo({
 					uni.navigateTo({
-						 url: '/pages_safetyExamine/snapshotManage/snapshotDetail?id='+row.id+'&rectifyStatus='+this.getData3.rectifyStatus
+						 url: '/pages_safetyExamine/snapshotManage/snapshotDetail?id='+row.id+'&rectifyStatus='+row.rectifyStatus
 					})
 					})
 				}
 				}
 				
 				

+ 25 - 15
pages_safetyExamine/examineManage/examineAddTow.vue

@@ -16,16 +16,11 @@
 					</view>
 					</view>
 					<view class="project" v-if="checkOptionList.length>0">
 					<view class="project" v-if="checkOptionList.length>0">
 						<view class="project_l">检查项目:</view>
 						<view class="project_l">检查项目:</view>
-						<!-- <uni-data-picker :ellipsis="false" :localdata="checkOptionList[index]" :map="{text:'name',value:'id'}"
+						<uni-data-picker :ellipsis="false" :localdata="checkOptionList[0]" :map="{text:'name',value:'id'}"
 						popup-title="请选择所属目录" @change="(e)=>onchange(e,index)" @nodeclick="onnodeclick()"
 						popup-title="请选择所属目录" @change="(e)=>onchange(e,index)" @nodeclick="onnodeclick()"
 						ref="uniDataPicker" :addType="true" :addIndex="index">
 						ref="uniDataPicker" :addType="true" :addIndex="index">
 							<view  class="project_r">{{item.hazardCheckName?item.hazardCheckName:'请选择检查项'}}</view>
 							<view  class="project_r">{{item.hazardCheckName?item.hazardCheckName:'请选择检查项'}}</view>
-						</uni-data-picker> -->
-						<uni-data-picker :ellipsis="false" ref="uniDataPicker" placeholder="请选择" popup-title="请选择所属目录" :localdata="checkOptionList" :map="{text:'name',value:'id'}" 
-									@change="(e)=>onchange(e,index)" @nodeclick="onnodeclick">
-							<view  class="project_r">{{item.hazardCheckName?item.hazardCheckName:'请选择检查项'}}</view>			
 						</uni-data-picker>
 						</uni-data-picker>
-						
 					</view>
 					</view>
 					<view class="point">
 					<view class="point">
 						<view class="point_l">检查要点:</view>
 						<view class="point_l">检查要点:</view>
@@ -334,7 +329,7 @@
 				if(data.code == 200){
 				if(data.code == 200){
 					let list = this.getTreeData(data.data);
 					let list = this.getTreeData(data.data);
 					//this.checkOptionList.push(JSON.parse(JSON.stringify(list)));
 					//this.checkOptionList.push(JSON.parse(JSON.stringify(list)));
-					this.checkOptionList=JSON.parse(JSON.stringify(list));
+					this.checkOptionList.push(JSON.parse(JSON.stringify(list)));
 					console.log(this.checkOptionList)
 					console.log(this.checkOptionList)
 				}
 				}
 			},
 			},
@@ -358,10 +353,17 @@
 				const {data} = await checkOptionListNew({'searchValue':text});
 				const {data} = await checkOptionListNew({'searchValue':text});
 				if(data.code == 200){
 				if(data.code == 200){
 					if(data.data[0]){
 					if(data.data[0]){
-						let list = JSON.parse(JSON.stringify(this.checkOptionList));
-						list[index] = this.getTreeData(data.data);
+						// let list = JSON.parse(JSON.stringify(this.checkOptionList));
+						// list[index] = this.getTreeData(data.data);
+						// this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
+						
+						
+						let list = [];
+						list[0]=this.getTreeData(data.data)
 						this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
 						this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
-						console.log('this.$refs.uniDataPicker',this.$refs.uniDataPicker)
+						
+						console.log(this.checkOptionList)
+						
 						this.$refs.uniDataPicker[index].show();
 						this.$refs.uniDataPicker[index].show();
 					}else{
 					}else{
 						uni.showToast({
 						uni.showToast({
@@ -378,8 +380,8 @@
 				console.log("重置index",index);
 				console.log("重置index",index);
 				const {data} = await checkOptionListNew();
 				const {data} = await checkOptionListNew();
 				if(data.code == 200){
 				if(data.code == 200){
-					let list = JSON.parse(JSON.stringify(this.checkOptionList));
-					list[index] = this.getTreeData(data.data);
+					let list = [];
+					list[0] = this.getTreeData(data.data);
 					this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
 					this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
 					this.$refs.uniDataPicker[index].show();
 					this.$refs.uniDataPicker[index].show();
 				}
 				}
@@ -392,12 +394,12 @@
 				//hazardCheckName:'', //检查项目名称 
 				//hazardCheckName:'', //检查项目名称 
 				//hazardCheckPro:'', //最后一级的id 
 				//hazardCheckPro:'', //最后一级的id 
 				 
 				 
-				if(this.getTreeName(this.checkOptionList,e.detail.value[e.detail.value.length-1].value).level==3){
-					let jcxSstkNum=this.getTreeName(this.checkOptionList,e.detail.value[e.detail.value.length-1].value).code
+				if(this.getTreeName(this.checkOptionList[0],e.detail.value[e.detail.value.length-1].value).level==3){
+					let jcxSstkNum=this.getTreeName(this.checkOptionList[0],e.detail.value[e.detail.value.length-1].value).code
 					this.$set(this.form.checkHazardDtoList[index],'hazardCheckPro',e.detail.value[e.detail.value.length-1].value);
 					this.$set(this.form.checkHazardDtoList[index],'hazardCheckPro',e.detail.value[e.detail.value.length-1].value);
 					this.$set(this.form.checkHazardDtoList[index],'hazardCheckCode',jcxSstkNum);
 					this.$set(this.form.checkHazardDtoList[index],'hazardCheckCode',jcxSstkNum);
 					this.$set(this.form.checkHazardDtoList[index],'hazardCheckName',e.detail.value[e.detail.value.length-1].text);
 					this.$set(this.form.checkHazardDtoList[index],'hazardCheckName',e.detail.value[e.detail.value.length-1].text);
-					this.$set(this.form.checkHazardDtoList[index],'hazardCheckPoint',this.getTreeName(this.checkOptionList,e.detail.value[e.detail.value.length-1].value).mainPoint);
+					this.$set(this.form.checkHazardDtoList[index],'hazardCheckPoint',this.getTreeName(this.checkOptionList[0],e.detail.value[e.detail.value.length-1].value).mainPoint);
 					
 					
 				}else{
 				}else{
 					uni.showToast({
 					uni.showToast({
@@ -547,6 +549,14 @@
 								duration: 2000
 								duration: 2000
 							});
 							});
 							return
 							return
+						}else if(self.form.checkHazardDtoList[i].uploadDtoList.length<=0){
+							uni.showToast({
+								title: '请输入第'+num+'项隐患图片!',
+								icon:"none",
+								mask:true,
+								duration: 2000
+							});
+							return
 						}
 						}
 					}
 					}
 					
 					

+ 6 - 1
pages_safetyExamine/examineManage/examineDetail.vue

@@ -103,7 +103,7 @@
 		</view>
 		</view>
 	</scroll-view>
 	</scroll-view>
 	<view class="report" @change="rectifyReport" v-if="manageStatus==2 && infoData.checkResult==0">整改报告</view>	
 	<view class="report" @change="rectifyReport" v-if="manageStatus==2 && infoData.checkResult==0">整改报告</view>	
-	<view class="bottom_btn" v-if="manageStatus==0" @click="handleClick('','startInspect')">开始检查</view>
+	<view class="bottom_btn" v-if="manageStatus==0 && isSelfData==1" @click="handleClick('','startInspect')">开始检查</view>
   </view>
   </view>
 
 
 </template>
 </template>
@@ -123,6 +123,7 @@ export default {
 		pageType:0,
 		pageType:0,
 		inconformityStatus:false,
 		inconformityStatus:false,
 		infoData:{},
 		infoData:{},
+		isSelfData:'',
 		attachmentList:[],
 		attachmentList:[],
 	}
 	}
   },
   },
@@ -134,6 +135,10 @@ export default {
 	 if(option.manageStatus){//检查状态
 	 if(option.manageStatus){//检查状态
 		 this.manageStatus=option.manageStatus;
 		 this.manageStatus=option.manageStatus;
 	 }
 	 }
+	 if(option.isSelfData){//0没有权限 1 有权限 
+	 		 this.isSelfData=option.isSelfData;
+	 }
+	 
 	 if(option.manageStatus==0 || option.manageStatus==1){
 	 if(option.manageStatus==0 || option.manageStatus==1){
 		uni.setNavigationBarTitle({
 		uni.setNavigationBarTitle({
 			title:'待检查'
 			title:'待检查'

+ 20 - 0
pages_safetyExamine/patrolPlan/patrolPlanAdd.vue

@@ -418,6 +418,15 @@ export default {
 				});
 				});
 				return;
 				return;
 			}
 			}
+			if(_this.form.checkRange==2 && _this.form.subjectNum==0){
+				uni.showToast({
+				    title: '请选择学院',
+				    icon:"none",
+				    mask:true,
+				    duration: 2000
+				});
+				return;
+			}
 			if(_this.form.checkRange==3 && _this.form.subjectNum==0){
 			if(_this.form.checkRange==3 && _this.form.subjectNum==0){
 				uni.showToast({
 				uni.showToast({
 				    title: '请选择实验室',
 				    title: '请选择实验室',
@@ -427,6 +436,17 @@ export default {
 				});
 				});
 				return;
 				return;
 			}
 			}
+			if( _this.form.checkType==1 &&_this.form.checkMemberDtoList.length<=0){
+				uni.showToast({
+				    title: '请选择巡查组',
+				    icon:"none",
+				    mask:true,
+				    duration: 2000
+				});
+				return;
+			}
+			
+			
 			const {data} = await checkPlanAdd(_this.form);
 			const {data} = await checkPlanAdd(_this.form);
 			if(data.code == 200){
 			if(data.code == 200){
 			    uni.showToast({
 			    uni.showToast({

+ 1 - 1
pages_safetyExamine/patrolPlan/patrolPlanEdit.vue

@@ -585,7 +585,7 @@ export default {
 				  });
 				  });
 			  }else{
 			  }else{
 				  uni.navigateTo({
 				  uni.navigateTo({
-				      url: '/pages_safetyExamine/examineManage/examineDetail?id='+item.id+'&manageStatus='+item.manageStatus
+				      url: '/pages_safetyExamine/examineManage/examineDetail?id='+item.id+'&manageStatus='+item.manageStatus+'&isSelfData='+item.isSelfData
 				  });
 				  });
 			  }
 			  }
 			  
 			  

File diff suppressed because it is too large
+ 540 - 544
uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue


+ 177 - 236
uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-picker.js

@@ -42,7 +42,7 @@ export default {
     },
     },
     pageSize: {
     pageSize: {
       type: Number,
       type: Number,
-      default: 500
+      default: 20
     },
     },
     getcount: {
     getcount: {
       type: [Boolean, String],
       type: [Boolean, String],
@@ -94,7 +94,7 @@ export default {
     },
     },
     map: {
     map: {
       type: Object,
       type: Object,
-      default () {
+      default() {
         return {
         return {
           text: "text",
           text: "text",
           value: "value"
           value: "value"
@@ -122,22 +122,19 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
-    isLocalData() {
-      return !this.collection.length;
-    },
-    isCloudData() {
-      return this.collection.length > 0;
-    },
-    isCloudDataList() {
-      return (this.isCloudData && (!this.parentField && !this.selfField));
+    isLocaldata() {
+      return !this.collection.length
     },
     },
-    isCloudDataTree() {
-      return (this.isCloudData && this.parentField && this.selfField);
+    postField() {
+      let fields = [this.field];
+      if (this.parentField) {
+        fields.push(`${this.parentField} as parent_value`);
+      }
+      return fields.join(',');
     },
     },
     dataValue() {
     dataValue() {
-      let isModelValue = Array.isArray(this.modelValue) ? (this.modelValue.length > 0) : (this.modelValue !== null ||
-        this.modelValue !== undefined);
-      return isModelValue ? this.modelValue : this.value;
+      let isModelValue = Array.isArray(this.modelValue) ? (this.modelValue.length > 0) : (this.modelValue !== null || this.modelValue !== undefined)
+      return isModelValue ? this.modelValue : this.value
     },
     },
     hasValue() {
     hasValue() {
       if (typeof this.dataValue === 'number') {
       if (typeof this.dataValue === 'number') {
@@ -186,169 +183,8 @@ export default {
   },
   },
   methods: {
   methods: {
     onPropsChange() {
     onPropsChange() {
-      this._treeData = [];
-    },
-
-    // 填充 pickview 数据
-    async loadData() {
-      if (this.isLocalData) {
-        this.loadLocalData();
-      } else if (this.isCloudDataList) {
-        this.loadCloudDataList();
-      } else if (this.isCloudDataTree) {
-        this.loadCloudDataTree();
-      }
-    },
-
-    // 加载本地数据
-    async loadLocalData() {
-      this._treeData = [];
-      this._extractTree(this.localdata, this._treeData);
-
-      let inputValue = this.dataValue;
-      if (inputValue === undefined) {
-        return;
-      }
-
-      if (Array.isArray(inputValue)) {
-        inputValue = inputValue[inputValue.length - 1];
-        if (typeof inputValue === 'object' && inputValue[this.map.value]) {
-          inputValue = inputValue[this.map.value];
-        }
-      }
-
-      this.selected = this._findNodePath(inputValue, this.localdata);
-    },
-
-    // 加载 Cloud 数据 (单列)
-    async loadCloudDataList() {
-      if (this.loading) {
-        return;
-      }
-      this.loading = true;
-
-      try {
-        let response = await this.getCommand();
-        let responseData = response.result.data;
-
-        this._treeData = responseData;
-
-        this._updateBindData();
-        this._updateSelected();
-
-        this.onDataChange();
-      } catch (e) {
-        this.errorMessage = e;
-      } finally {
-        this.loading = false;
-      }
-    },
-
-    // 加载 Cloud 数据 (树形)
-    async loadCloudDataTree() {
-      if (this.loading) {
-        return;
-      }
-      this.loading = true;
-
-      try {
-        let commandOptions = {
-          field: this._cloudDataPostField(),
-          where: this._cloudDataTreeWhere()
-        };
-        if (this.gettree) {
-          commandOptions.startwith = `${this.selfField}=='${this.dataValue}'`;
-        }
-
-        let response = await this.getCommand(commandOptions);
-        let responseData = response.result.data;
-
-        this._treeData = responseData;
-        this._updateBindData();
-        this._updateSelected();
-
-        this.onDataChange();
-      } catch (e) {
-        this.errorMessage = e;
-      } finally {
-        this.loading = false;
-      }
-    },
-
-    // 加载 Cloud 数据 (节点)
-    async loadCloudDataNode(callback) {
-      if (this.loading) {
-        return;
-      }
-      this.loading = true;
-
-      try {
-        let commandOptions = {
-          field: this._cloudDataPostField(),
-          where: this._cloudDataNodeWhere()
-        };
-
-        let response = await this.getCommand(commandOptions);
-        let responseData = response.result.data;
-
-        callback(responseData);
-      } catch (e) {
-        this.errorMessage = e;
-      } finally {
-        this.loading = false;
-      }
+      this._treeData = []
     },
     },
-
-    // 回显 Cloud 数据
-    getCloudDataValue() {
-      if (this.isCloudDataList) {
-        return this.getCloudDataListValue();
-      }
-
-      if (this.isCloudDataTree) {
-        return this.getCloudDataTreeValue();
-      }
-    },
-
-    // 回显 Cloud 数据 (单列)
-    getCloudDataListValue() {
-      // 根据 field's as value标识匹配 where 条件
-      let where = [];
-      let whereField = this._getForeignKeyByField();
-      if (whereField) {
-        where.push(`${whereField} == '${this.dataValue}'`)
-      }
-
-      where = where.join(' || ');
-
-      if (this.where) {
-        where = `(${this.where}) && (${where})`
-      }
-
-      return this.getCommand({
-        field: this._cloudDataPostField(),
-        where
-      }).then((res) => {
-        this.selected = res.result.data;
-        return res.result.data;
-      });
-    },
-
-    // 回显 Cloud 数据 (树形)
-    getCloudDataTreeValue() {
-      return this.getCommand({
-        field: this._cloudDataPostField(),
-        getTreePath: {
-          startWith: `${this.selfField}=='${this.dataValue}'`
-        }
-      }).then((res) => {
-        let treePath = [];
-        this._extractTreePath(res.result.data, treePath);
-        this.selected = treePath;
-        return treePath;
-      });
-    },
-
     getCommand(options = {}) {
     getCommand(options = {}) {
       /* eslint-disable no-undef */
       /* eslint-disable no-undef */
       let db = uniCloud.database(this.spaceInfo)
       let db = uniCloud.database(this.spaceInfo)
@@ -393,16 +229,125 @@ export default {
 
 
       return db
       return db
     },
     },
+		getNodeData(callback) {
+		  if (this.loading) {
+		    return
+		  }
+		  this.loading = true
+		  this.getCommand({
+		    field: this.postField,
+				where: this._pathWhere()
+		  }).then((res) => {
+		    this.loading = false
+		    this.selected = res.result.data
+		    callback && callback()
+		  }).catch((err) => {
+		    this.loading = false
+		    this.errorMessage = err
+		  })
+		},
+    getTreePath(callback) {
+      if (this.loading) {
+        return
+      }
+      this.loading = true
 
 
-    _cloudDataPostField() {
-      let fields = [this.field];
-      if (this.parentField) {
-        fields.push(`${this.parentField} as parent_value`);
+      this.getCommand({
+        field: this.postField,
+        getTreePath: {
+          startWith: `${this.selfField}=='${this.dataValue}'`
+        }
+      }).then((res) => {
+        this.loading = false
+        let treePath = []
+        this._extractTreePath(res.result.data, treePath)
+        this.selected = treePath
+        callback && callback()
+      }).catch((err) => {
+        this.loading = false
+        this.errorMessage = err
+      })
+    },
+    loadData() {
+      if (this.isLocaldata) {
+        this._processLocalData()
+        return
+      }
+
+      if (this.dataValue != null) {
+        this._loadNodeData((data) => {
+          this._treeData = data
+          this._updateBindData()
+          this._updateSelected()
+        })
+        return
+      }
+
+      if (this.stepSearh) {
+        this._loadNodeData((data) => {
+          this._treeData = data
+          this._updateBindData()
+        })
+      } else {
+        this._loadAllData((data) => {
+          this._treeData = []
+          this._extractTree(data, this._treeData, null)
+          this._updateBindData()
+        })
       }
       }
-      return fields.join(',');
     },
     },
+    _loadAllData(callback) {
+      if (this.loading) {
+        return
+      }
+      this.loading = true
+
+      this.getCommand({
+        field: this.postField,
+        gettree: true,
+        startwith: `${this.selfField}=='${this.dataValue}'`
+      }).then((res) => {
+        this.loading = false
+        callback(res.result.data)
+        this.onDataChange()
+      }).catch((err) => {
+        this.loading = false
+        this.errorMessage = err
+      })
+    },
+    _loadNodeData(callback, pw) {
+      if (this.loading) {
+        return
+      }
+      this.loading = true
 
 
-    _cloudDataTreeWhere() {
+      this.getCommand({
+        field: this.postField,
+        where: pw || this._postWhere(),
+        pageSize: 500
+      }).then((res) => {
+        this.loading = false
+        callback(res.result.data)
+        this.onDataChange()
+      }).catch((err) => {
+        this.loading = false
+        this.errorMessage = err
+      })
+    },
+    _pathWhere() {
+      let result = []
+      let where_field = this._getParentNameByField();
+      if (where_field) {
+        result.push(`${where_field} == '${this.dataValue}'`)
+      }
+
+      if (this.where) {
+        return `(${this.where}) && (${result.join(' || ')})`
+      }
+
+      return result.join(' || ')
+    },
+    _postWhere() {
       let result = []
       let result = []
       let selected = this.selected
       let selected = this.selected
       let parentField = this.parentField
       let parentField = this.parentField
@@ -419,35 +364,17 @@ export default {
       if (this.where) {
       if (this.where) {
         where.push(`(${this.where})`)
         where.push(`(${this.where})`)
       }
       }
-
       if (result.length) {
       if (result.length) {
         where.push(`(${result.join(' || ')})`)
         where.push(`(${result.join(' || ')})`)
       }
       }
 
 
       return where.join(' && ')
       return where.join(' && ')
     },
     },
-
-    _cloudDataNodeWhere() {
-      let where = []
-      let selected = this.selected;
-      if (selected.length) {
-        where.push(`${this.parentField} == '${selected[selected.length - 1].value}'`);
-      }
-
-      where = where.join(' || ');
-
-      if (this.where) {
-        return `(${this.where}) && (${where})`
-      }
-
-      return where
-    },
-
-    _getWhereByForeignKey() {
+    _nodeWhere() {
       let result = []
       let result = []
-      let whereField = this._getForeignKeyByField();
-      if (whereField) {
-        result.push(`${whereField} == '${this.dataValue}'`)
+      let selected = this.selected
+      if (selected.length) {
+        result.push(`${this.parentField} == '${selected[selected.length - 1].value}'`)
       }
       }
 
 
       if (this.where) {
       if (this.where) {
@@ -456,23 +383,41 @@ export default {
 
 
       return result.join(' || ')
       return result.join(' || ')
     },
     },
-
-    _getForeignKeyByField() {
-      let fields = this.field.split(',');
-      let whereField = null;
+    _getParentNameByField() {
+      const fields = this.field.split(',');
+      let where_field = null;
       for (let i = 0; i < fields.length; i++) {
       for (let i = 0; i < fields.length; i++) {
         const items = fields[i].split('as');
         const items = fields[i].split('as');
         if (items.length < 2) {
         if (items.length < 2) {
           continue;
           continue;
         }
         }
         if (items[1].trim() === 'value') {
         if (items[1].trim() === 'value') {
-          whereField = items[0].trim();
+          where_field = items[0].trim();
           break;
           break;
         }
         }
       }
       }
-      return whereField;
+      return where_field
+    },
+    _isTreeView() {
+      return (this.parentField && this.selfField)
+    },
+    _updateSelected() {
+      var dl = this.dataList
+      var sl = this.selected
+      let textField = this.map.text
+      let valueField = this.map.value
+      for (var i = 0; i < sl.length; i++) {
+        var value = sl[i].value
+        var dl2 = dl[i]
+        for (var j = 0; j < dl2.length; j++) {
+          var item2 = dl2[j]
+          if (item2[valueField] === value) {
+            sl[i].text = item2[textField]
+            break
+          }
+        }
+      }
     },
     },
-
     _updateBindData(node) {
     _updateBindData(node) {
       const {
       const {
         dataList,
         dataList,
@@ -500,25 +445,6 @@ export default {
         hasNodes
         hasNodes
       }
       }
     },
     },
-
-    _updateSelected() {
-      let dl = this.dataList
-      let sl = this.selected
-      let textField = this.map.text
-      let valueField = this.map.value
-      for (let i = 0; i < sl.length; i++) {
-        let value = sl[i].value
-        let dl2 = dl[i]
-        for (let j = 0; j < dl2.length; j++) {
-          let item2 = dl2[j]
-          if (item2[valueField] === value) {
-            sl[i].text = item2[textField]
-            break
-          }
-        }
-      }
-    },
-
     _filterData(data, paths) {
     _filterData(data, paths) {
       let dataList = []
       let dataList = []
       let hasNodes = true
       let hasNodes = true
@@ -527,8 +453,8 @@ export default {
         return (item.parent_value === null || item.parent_value === undefined || item.parent_value === '')
         return (item.parent_value === null || item.parent_value === undefined || item.parent_value === '')
       }))
       }))
       for (let i = 0; i < paths.length; i++) {
       for (let i = 0; i < paths.length; i++) {
-        let value = paths[i].value
-        let nodes = data.filter((item) => {
+        var value = paths[i].value
+        var nodes = data.filter((item) => {
           return item.parent_value === value
           return item.parent_value === value
         })
         })
 
 
@@ -544,7 +470,6 @@ export default {
         hasNodes
         hasNodes
       }
       }
     },
     },
-
     _extractTree(nodes, result, parent_value) {
     _extractTree(nodes, result, parent_value) {
       let list = result || []
       let list = result || []
       let valueField = this.map.value
       let valueField = this.map.value
@@ -568,7 +493,6 @@ export default {
         }
         }
       }
       }
     },
     },
-
     _extractTreePath(nodes, result) {
     _extractTreePath(nodes, result) {
       let list = result || []
       let list = result || []
       for (let i = 0; i < nodes.length; i++) {
       for (let i = 0; i < nodes.length; i++) {
@@ -588,7 +512,6 @@ export default {
         }
         }
       }
       }
     },
     },
-
     _findNodePath(key, nodes, path = []) {
     _findNodePath(key, nodes, path = []) {
       let textField = this.map.text
       let textField = this.map.text
       let valueField = this.map.value
       let valueField = this.map.value
@@ -617,6 +540,24 @@ export default {
         path.pop()
         path.pop()
       }
       }
       return []
       return []
+    },
+    _processLocalData() {
+      this._treeData = []
+      this._extractTree(this.localdata, this._treeData)
+
+      var inputValue = this.dataValue
+      if (inputValue === undefined) {
+        return
+      }
+
+      if (Array.isArray(inputValue)) {
+        inputValue = inputValue[inputValue.length - 1]
+        if (typeof inputValue === 'object' && inputValue[this.map.value]) {
+          inputValue = inputValue[this.map.value]
+        }
+      }
+
+      this.selected = this._findNodePath(inputValue, this.localdata)
     }
     }
   }
   }
 }
 }

+ 328 - 266
uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue

@@ -1,174 +1,235 @@
 <template>
 <template>
-  <view class="uni-data-pickerview">
-    <scroll-view v-if="!isCloudDataList" class="selected-area" scroll-x="true">
-      <view class="selected-list">
-          <view 
-            class="selected-item"
-            v-for="(item,index) in selected"
-            :key="index"
-            :class="{
-              'selected-item-active':index == selectedIndex
-            }"
-            @click="handleSelect(index)"
-          >
-            <text>{{item.text || ''}}</text>
-          </view>
-      </view>
-    </scroll-view>
-    <view class="tab-c">
-      <scroll-view class="list" :scroll-y="true">
-        <view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in dataList[selectedIndex]" :key="j"
-          @click="handleNodeClick(item, selectedIndex, j)">
-          <text class="item-text">{{item[map.text]}}</text>
-          <view class="check" v-if="selected.length > selectedIndex && item[map.value] == selected[selectedIndex].value"></view>
-        </view>
-      </scroll-view>
+	<view class="uni-data-pickerview">
+		<view class="add-input-max-box" v-if="addType">
+			<view class="add-title">检查项</view>
+			<view class="add-input">
+				<input type="text" v-model="inputText" placeholder="请输入检查项目" maxlength="10">
+				<img src="@/images/icon_aqjc_ss.png" @click="searchClick">
+			</view>
+			<view class="add-button" @click="resetClick">重置</view>
+		</view>
+		<scroll-view class="selected-area" scroll-x="true" scroll-y="false" :show-scrollbar="false">
+			<view class="selected-list">
+				<template v-for="(item,index) in selected">
+					<view class="selected-item"
+						:class="{'selected-item-active':index==selectedIndex, 'selected-item-text-overflow': ellipsis}"
+						:key="index" v-if="item.text" @click="handleSelect(index)">
+						<text class="">{{item.text}}</text>
+					</view>
+				</template>
+			</view>
+		</scroll-view>
+		<view class="tab-c">
+			<template v-for="(child, i) in dataList">
+				<scroll-view class="list" :key="i" v-if="i==selectedIndex" :scroll-y="true">
+					<view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in child" :key="j"
+						@click="handleNodeClick(item, i, j)">
+						<text class="item-text item-text-overflow">{{item[map.text]}}</text>
+						<view class="check" v-if="selected.length > i && item[map.value] == selected[i].value"></view>
+					</view>
+				</scroll-view>
+			</template>
 
 
-      <view class="loading-cover" v-if="loading">
-        <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
-      </view>
-      <view class="error-message" v-if="errorMessage">
-        <text class="error-text">{{errorMessage}}</text>
-      </view>
-    </view>
-  </view>
+			<view class="loading-cover" v-if="loading">
+				<uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
+			</view>
+			<view class="error-message" v-if="errorMessage">
+				<text class="error-text">{{errorMessage}}</text>
+			</view>
+		</view>
+	</view>
 </template>
 </template>
 
 
 <script>
 <script>
-  import dataPicker from "./uni-data-picker.js"
+	import dataPicker from "./uni-data-picker.js"
 
 
-  /**
-   * DataPickerview
-   * @description uni-data-pickerview
-   * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
-   * @property {Array} localdata 本地数据,参考
-   * @property {Boolean} step-searh = [true|false] 是否分布查询
-   * @value true 启用分布查询,仅查询当前选中节点
-   * @value false 关闭分布查询,一次查询出所有数据
-   * @property {String|DBFieldString} self-field 分布查询当前字段名称
-   * @property {String|DBFieldString} parent-field 分布查询父字段名称
-   * @property {String|DBCollectionString} collection 表名
-   * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
-   * @property {String} orderby 排序字段及正序倒叙设置
-   * @property {String|JQLString} where 查询条件
-   */
-  export default {
-    name: 'UniDataPickerView',
-    emits: ['nodeclick', 'change', 'datachange', 'update:modelValue'],
-    mixins: [dataPicker],
-    props: {
-      managedMode: {
-        type: Boolean,
-        default: false
-      },
-      ellipsis: {
-        type: Boolean,
-        default: true
-      }
-    },
-    created() {
-      if (!this.managedMode) {
-        this.$nextTick(() => {
-          this.loadData();
-        })
-      }
-    },
-    methods: {
-      onPropsChange() {
-        this._treeData = [];
-        this.selectedIndex = 0;
-        this.$nextTick(() => {
-          this.loadData();
-        })
-      },
-      handleSelect(index) {
-        this.selectedIndex = index;
-      },
-      handleNodeClick(item, i, j) {
-        if (item.disable) {
-          return;
-        }
+	/**
+	 * DataPickerview
+	 * @description uni-data-pickerview
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
+	 * @property {Array} localdata 本地数据,参考
+	 * @property {Boolean} step-searh = [true|false] 是否分布查询
+	 * @value true 启用分布查询,仅查询当前选中节点
+	 * @value false 关闭分布查询,一次查询出所有数据
+	 * @property {String|DBFieldString} self-field 分布查询当前字段名称
+	 * @property {String|DBFieldString} parent-field 分布查询父字段名称
+	 * @property {String|DBCollectionString} collection 表名
+	 * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
+	 * @property {String} orderby 排序字段及正序倒叙设置
+	 * @property {String|JQLString} where 查询条件
+	 */
+	export default {
+		name: 'UniDataPickerView',
+		emits: ['nodeclick', 'change', 'datachange', 'update:modelValue'],
+		mixins: [dataPicker],
+		props: {
+			addType:{},
+			addIndex:{},
+			managedMode: {
+				type: Boolean,
+				default: false
+			},
+			ellipsis: {
+				type: Boolean,
+				default: true
+			}
+		},
+		data() {
+			return {
+				inputText:"",
+			}
+		},
+		created() {
+			if (this.managedMode) {
+				return
+			}
 
 
-        const node = this.dataList[i][j];
-        const text = node[this.map.text];
-        const value = node[this.map.value];
+			this.$nextTick(() => {
+				this.load()
+			})
+		},
+		methods: {
+			//搜索
+			searchClick(){
+				this.$parent.$parent.searchClick(this.inputText,this.addIndex);
+			},
+			//重置
+			resetClick(){
+				this.inputText = "";
+				this.$parent.$parent.resetClick(this.addIndex);
+			},
+			onPropsChange() {
+				this._treeData = []
+				this.selectedIndex = 0
+				this.load()
+			},
+			load() {
+				if (this.isLocaldata) {
+					this.loadData()
+				} else if (this.dataValue.length) {
+					this.getTreePath((res) => {
+						this.loadData()
+					})
+				}
+			},
+			handleSelect(index) {
+				this.selectedIndex = index
+			},
+			handleNodeClick(item, i, j) {
+				if (item.disable) {
+					return
+				}
+				const node = this.dataList[i][j]
+				const text = node[this.map.text]
+				const value = node[this.map.value]
+				if (i < this.selected.length - 1) {
+					this.selected.splice(i, this.selected.length - i)
+					this.selected.push({
+						text,
+						value
+					})
+				} else if (i === this.selected.length - 1) {
+					this.selected.splice(i, 1, {
+						text,
+						value
+					})
+				}
 
 
-        if (i < this.selected.length - 1) {
-          this.selected.splice(i, this.selected.length - i)
-          this.selected.push({
-            text,
-            value
-          })
-        } else if (i === this.selected.length - 1) {
-          this.selected.splice(i, 1, {
-            text,
-            value
-          })
-        }
+				if (node.isleaf) {
+					this.onSelectedChange(node, node.isleaf)
+					return
+				}
 
 
-        if (node.isleaf) {
-          this.onSelectedChange(node, node.isleaf)
-          return
-        }
+				const {
+					isleaf,
+					hasNodes
+				} = this._updateBindData()
 
 
-        const {
-          isleaf,
-          hasNodes
-        } = this._updateBindData()
+				if (!this._isTreeView() && !hasNodes) {
+					this.onSelectedChange(node, true)
+					return
+				}
 
 
-        // 本地数据
-        if (this.isLocalData) {
-          this.onSelectedChange(node, (!hasNodes || isleaf))
-        } else if (this.isCloudDataList) { // Cloud 数据 (单列)
-          this.onSelectedChange(node, true)
-        } else if (this.isCloudDataTree) { // Cloud 数据 (树形)
-          if (isleaf) {
-            this.onSelectedChange(node, node.isleaf)
-          } else if (!hasNodes) { // 请求一次服务器以确定是否为叶子节点
-            this.loadCloudDataNode((data) => {
-              if (!data.length) {
-                node.isleaf = true
-              } else {
-                this._treeData.push(...data)
-                this._updateBindData(node)
-              }
-              this.onSelectedChange(node, node.isleaf)
-            })
-          }
-        }
-      },
-      updateData(data) {
-        this._treeData = data.treeData
-        this.selected = data.selected
-        if (!this._treeData.length) {
-          this.loadData()
-        } else {
-          //this.selected = data.selected
-          this._updateBindData()
-        }
-      },
-      onDataChange() {
-        this.$emit('datachange');
-      },
-      onSelectedChange(node, isleaf) {
-        if (isleaf) {
-          this._dispatchEvent()
-        }
+				if (this.isLocaldata && (!hasNodes || isleaf)) {
+					this.onSelectedChange(node, true)
+					return
+				}
 
 
-        if (node) {
-          this.$emit('nodeclick', node)
-        }
-      },
-      _dispatchEvent() {
-        this.$emit('change', this.selected.slice(0))
-      }
-    }
-  }
-</script>
+				if (!isleaf && !hasNodes) {
+					this._loadNodeData((data) => {
+						if (!data.length) {
+							node.isleaf = true
+						} else {
+							this._treeData.push(...data)
+							this._updateBindData(node)
+						}
+						this.onSelectedChange(node, node.isleaf)
+					}, this._nodeWhere())
+					return
+				}
 
 
-<style lang="scss">
-	$uni-primary: #007aff !default;
+				this.onSelectedChange(node, false)
+			},
+			updateData(data) {
+				this._treeData = data.treeData
+				this.selected = data.selected
+				if (!this._treeData.length) {
+					this.loadData()
+				} else {
+					//this.selected = data.selected
+					this._updateBindData()
+				}
+			},
+			onDataChange() {
+				this.$emit('datachange')
+			},
+			onSelectedChange(node, isleaf) {
+				if (isleaf) {
+					this._dispatchEvent()
+				}
 
 
+				if (node) {
+					this.$emit('nodeclick', node)
+				}
+			},
+			_dispatchEvent() {
+				this.$emit('change', this.selected.slice(0))
+			}
+		}
+	}
+</script>
+<style lang="stylus" scoped>
+	.add-input-max-box{
+		display: flex;
+		font-size:30rpx;
+		.add-title{
+			width:167rpx;
+			text-align center;
+			line-height:80rpx;
+		}
+		.add-input{
+			display flex;
+			width:500rpx;
+			height:80rpx;
+			border:1rpx solid #E0E0E0;
+			border-radius:10rpx;
+			input{
+				flex:1;
+				height:80rpx;
+				margin-left:20rpx;
+			}
+			img{
+				width:32rpx;
+				height:32rpx;
+				margin:25rpx 18rpx;
+			}
+		}
+		.add-button{
+			text-align center
+			width:104rpx;
+			line-height:80rpx;
+		}
+	}
 	.uni-data-pickerview {
 	.uni-data-pickerview {
 		flex: 1;
 		flex: 1;
 		/* #ifndef APP-NVUE */
 		/* #ifndef APP-NVUE */
@@ -179,137 +240,138 @@
 		height: 100%;
 		height: 100%;
 	}
 	}
 
 
-  .error-text {
-    color: #DD524D;
-  }
+	.error-text {
+		color: #DD524D;
+	}
 
 
-  .loading-cover {
-    position: absolute;
-    left: 0;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    background-color: rgba(255, 255, 255, .5);
-    /* #ifndef APP-NVUE */
-    display: flex;
-    /* #endif */
-    flex-direction: column;
-    align-items: center;
-    z-index: 1001;
-  }
+	.loading-cover {
+		position: absolute;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(255, 255, 255, .5);
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		align-items: center;
+		z-index: 1001;
+	}
 
 
-  .load-more {
-    /* #ifndef APP-NVUE */
-    margin: auto;
-    /* #endif */
-  }
+	.load-more {
+		/* #ifndef APP-NVUE */
+		margin: auto;
+		/* #endif */
+	}
 
 
-  .error-message {
-    background-color: #fff;
-    position: absolute;
-    left: 0;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    padding: 15px;
-    opacity: .9;
-    z-index: 102;
-  }
+	.error-message {
+		background-color: #fff;
+		position: absolute;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		padding: 15px;
+		opacity: .9;
+		z-index: 102;
+	}
 
 
-  /* #ifdef APP-NVUE */
-  .selected-area {
-    width: 750rpx;
-  }
-  /* #endif */
+	/* #ifdef APP-NVUE */
+	.selected-area {
+		width: 750rpx;
+	}
 
 
-  .selected-list {
-    /* #ifndef APP-NVUE */
-    display: flex;
-    flex-wrap: nowrap;
-    /* #endif */
-    flex-direction: row;
-    padding: 0 5px;
-    border-bottom: 1px solid #f8f8f8;
-  }
+	/* #endif */
 
 
-  .selected-item {
-    margin-left: 10px;
-    margin-right: 10px;
-    padding: 12px 0;
-    text-align: center;
-    /* #ifndef APP-NVUE */
-    white-space: nowrap;
-    /* #endif */
-  }
+	.selected-list {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		flex-wrap: nowrap;
+		padding: 0 5px;
+		border-bottom: 1px solid #f8f8f8;
+	}
+
+	.selected-item {
+		margin-left: 10px;
+		margin-right: 10px;
+		padding: 12px 0;
+		text-align: center;
+		/* #ifndef APP-NVUE */
+		white-space: nowrap;
+		/* #endif */
+	}
 
 
-  .selected-item-text-overflow {
-    width: 168px;
-    /* fix nvue */
-    overflow: hidden;
-    /* #ifndef APP-NVUE */
-    width: 6em;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-    -o-text-overflow: ellipsis;
-    /* #endif */
-  }
+	.selected-item-text-overflow {
+		width: 168px;
+		/* fix nvue */
+		overflow: hidden;
+		/* #ifndef APP-NVUE */
+		width: 6em;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		-o-text-overflow: ellipsis;
+		/* #endif */
+	}
 
 
 	.selected-item-active {
 	.selected-item-active {
-		border-bottom: 2px solid $uni-primary;
+		border-bottom: 2px solid #007aff;
 	}
 	}
 
 
 	.selected-item-text {
 	.selected-item-text {
-		color: $uni-primary;
+		color: #007aff;
 	}
 	}
 
 
-  .tab-c {
-    position: relative;
-    flex: 1;
-    /* #ifndef APP-NVUE */
-    display: flex;
-    /* #endif */
-    flex-direction: row;
-    overflow: hidden;
-  }
+	.tab-c {
+		position: relative;
+		flex: 1;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		overflow: hidden;
+	}
 
 
-  .list {
-    flex: 1;
-  }
+	.list {
+		flex: 1;
+	}
 
 
-  .item {
-    padding: 12px 15px;
-    /* border-bottom: 1px solid #f0f0f0; */
-    /* #ifndef APP-NVUE */
-    display: flex;
-    /* #endif */
-    flex-direction: row;
-    justify-content: space-between;
-  }
+	.item {
+		padding: 12px 15px;
+		/* border-bottom: 1px solid #f0f0f0; */
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: space-between;
+	}
 
 
-  .is-disabled {
-    opacity: .5;
-  }
+	.is-disabled {
+		opacity: .5;
+	}
 
 
-  .item-text {
-    /* flex: 1; */
-    color: #333333;
-  }
+	.item-text {
+		/* flex: 1; */
+		color: #333333;
+	}
 
 
-  .item-text-overflow {
-    width: 280px;
-    /* fix nvue */
-    overflow: hidden;
-    /* #ifndef APP-NVUE */
-    width: 20em;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-    -o-text-overflow: ellipsis;
-    /* #endif */
-  }
+	.item-text-overflow {
+		width: 280px;
+		/* fix nvue */
+		overflow: hidden;
+		/* #ifndef APP-NVUE */
+		width: 20em;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		-o-text-overflow: ellipsis;
+		/* #endif */
+	}
 
 
 	.check {
 	.check {
 		margin-right: 5px;
 		margin-right: 5px;
-		border: 2px solid $uni-primary;
+		border: 2px solid #007aff;
 		border-left: 0;
 		border-left: 0;
 		border-top: 0;
 		border-top: 0;
 		height: 12px;
 		height: 12px;