Browse Source

文件上传调整

zhengkaixin 1 year ago
parent
commit
bb61d54b8a

BIN
assets/img/oawork/select.png


+ 252 - 2
pages/oawork/approve/list.vue

@@ -1,5 +1,52 @@
 <template>
 	<view>
+		<u-navbar title="公文审批">
+			
+		</u-navbar>
+		
+		<u-tabs :list="tabslist" :is-scroll="false" :current="current" @change="change"></u-tabs>
+		
+		<view class="list1">
+			<view class="item" v-for="(item,i) in list" @click="ckInfo(item.id)" :key="i">
+				 
+				<view class="group">
+					<view  class="group1">
+						<view class="name">
+							公文类型:
+						</view>
+						<view class="value">
+							{{item.name}}
+							
+						</view>
+					</view>
+					<view  class="group2">
+						<view class="title">
+							<span :style="{color:recordStatusColor(item.status)}">{{item.statusN}}</span>
+							
+						</view>
+					</view>
+				</view>
+				<view class="group">
+					<view  class="group1">
+						<view class="name">
+							提交时间:
+						</view>
+						<view class="value">
+							{{item.time}}
+						</view>
+					</view>
+				</view>
+		
+			</view>
+			<u-divider  v-if="formData.recordsTotal==list.length"
+			 :isnone="formData.recordsTotal==0" nonetext="没有找到相关内容" 
+			border-color="#CFD2D5">已经到底了</u-divider>
+		</view>
+		
+		
+	<!-- 	<view class="bottom">
+			<u-button type="primary"  @click="addInfo">公文提报</u-button>
+		</view> -->
 		
 	</view>
 </template>
@@ -8,15 +55,218 @@
 	export default {
 		data() {
 			return {
-				
+				oatype:"",
+				formData:{
+					pageIndex: 1,
+					pageSize: 20,
+					recordsTotal: 0,
+				},
+				tabslist:[{
+					name:"未处理",
+				},{
+					name:"已处理"
+				},],
+					current:0,
+				list: [
+					{
+						name:"abcd",
+						time:"2021-03-12 14:00:00",
+						status:"1",
+						statusN:"待审批"
+					},
+					{
+						name:"abcd",
+						time:"2021-03-12 14:00:00",
+						status:"1",
+						statusN:"待审批"
+					}
+				],
+			}
+		},
+		onLoad(op){
+			this.oatype=op.oatype;
+		},
+		onReachBottom() {
+			
+			if (this.list.length < this.formData.recordsTotal) {
+				this.myLoadmore();
 			}
 		},
 		methods: {
+			change(index) {
+							this.current = index;
+						},
+			recordStatusColor(val){
+				var retu = ""
+				val=val+''
+				switch (val) {
+					case '-1':
+						retu = '#f29a38'
+						break;
+					case '0':
+						retu = '#f29a38'
+						break;
+					case '1':
+						retu = '#52b56b'
+						break;
+					case '2':
+						retu = '#c94031'
+						break;
+					case '3':
+						retu = '#3a3bc2'
+						break;
+					case '5':
+						retu = '#c94031'
+						break;
+					case '6':
+						retu = '#c94031'
+					case '9':
+						retu = '#c94031'
+						break;
+					default:
+						retu = '#52b56b'
+						break;
+				}
 			
+				return retu
+			},
+			getList(){
+				
+			},
+			addInfo(){
+				uni.navigateTo({
+					url:"/pages/oawork/business/add?oatype="+this.oatype
+				})
+			},
+			myLoadmore() {
+				this.formData.pageIndex += 1;
+				this.getList();
+			},
 		}
 	}
 </script>
 
-<style>
+<style  lang="scss" scoped>
+
+page {
+		padding-bottom: 100rpx;
+		
+	}
+
+	.head {
+		background: linear-gradient(180deg, rgba(190, 211, 240, 1) 0%, rgba(244, 244, 246, 1) 100%) !important;
+
+		/deep/.u-navbar {
+			//background: 0!important;
+			background: linear-gradient(180deg, rgba(190, 211, 240, 1) 0%, rgba(244, 244, 246, 1) 100%) !important;
+			height: 210rpx;
+			//padding: 0 32rpx;
+		}
+
+		/deep/.u-border-bottom:after {
+			height: 0;
+		}
+
+		.tabs {
+			padding: 0 32rpx
+		}
+	}
+
+	.tabs {
+		display: flex;flex-wrap: wrap;
+		justify-content: space-between;
+		align-items: center;
+
+		/deep/.u-tabs {
+			background: 0 !important;
+			width: 250rpx;
+		}
+
+		/deep/.u-tab-bar {
+			background-color: #2A8EFB !important;
+		}
+
+		.screen {
+			color: #415058;
+			position: relative;
+			font-family: Microsoft Yahei;
+
+			/deep/.uicon-arrow-down {
+				margin-left: 4rpx;
+			}
+		}
 
+		.options {
+			width: 120rpx;
+			height: 60rpx;
+			line-height: 60rpx;
+			text-align: center;
+			background-color: #fff;
+			color: rgba(65, 80, 88, 1);
+			font-family: Microsoft Yahei;
+			position: absolute;
+			top: 160rpx;
+			right: 24rpx;
+			box-shadow: 5px 5px 10px gray;
+		}
+
+	}
+
+
+	.list1,
+	.list2 {
+		
+		margin:12px;
+		padding-bottom: 60px;
+		.item {
+			border-radius: 8px;
+			background-color: rgba(255, 255, 255, 1);
+			padding: 24rpx;
+			margin-bottom: 24rpx;
+
+			
+
+			.group {
+				display: flex;
+				flex-wrap: wrap;
+				justify-content: space-between;
+				
+				color: rgba(119, 119, 119, 1);
+			//	margin-top: 16rpx;
+				font-weight: bold;
+				.name{
+					color:#777777;
+				}
+				.value{
+					color:#333333;
+				}
+				.group1{
+					display: flex;flex-wrap: wrap;
+				}
+				.group2{
+					
+				}
+			}
+		}
+
+	}
+
+	.bottom {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		//background-color: #fff;
+		padding: 16rpx 32rpx;
+
+		uni-button {
+			height: 88rpx;
+			line-height: 88rpx;
+			border-radius: 8px;
+			background: linear-gradient(180deg, rgba(22, 119, 255, 1) 0%, rgba(16, 98, 213, 1) 100%);
+			color: rgba(255, 255, 255, 1);
+			font-size: 32rpx;
+			font-family: Microsoft Yahei;
+		}
+	}
 </style>

+ 17 - 106
pages/oawork/business/add.vue

@@ -149,7 +149,7 @@
 			<view class="approveMain_text" >流程</view>
 			<u-time-line>
 			
-				<u-time-line-item node-top="10">
+				<u-time-line-item node-top="10" v-for="(item,i) in approveList" :key="i"  >
 					<template v-slot:node>
 						<view>
 							<view class="u-node" style="background:#CDCDCD;">
@@ -238,111 +238,7 @@
 							</view>
 							<view class="approveItem_a2">
 								
-								<view class="a2_span">+</view>
-								<span class="a2_span_2">*</span>
-							</view>
-							
-						</view>
-						
-					</template>
-				</u-time-line-item>
-				<u-time-line-item node-top="10">
-					<template v-slot:node>
-						<view>
-							<view class="u-node" style="background:#CDCDCD;">
-								<!-- 此处为uView的icon组件 -->
-								<!-- <u-icon name="checkmark" color="#fff" :size="24"></u-icon> -->
-							</view>
-						</view>
-					</template>
-					<template v-slot:content>
-						<view class="approveItem_main">
-							<view class="approveItem_a1">
-								<view class="approveItem_a1_text1">
-									一级审批人
-								</view>
-								<view class="approveItem_a1_text2">
-									请选择审批人
-								</view>
-								<view class="approveItem_a1_text3">
-									<view class="approveItem_a1_text3Img">
-										
-					
-										<u-avatar size="56" class="img" ></u-avatar>
-										<u-badge size="mini" count="x" type="info" :absolute="false">
-											
-										</u-badge>
-										
-										<view>晓丽</view>
-									</view>
-									<view  class="approveItem_a1_text3Img">
-										
-									
-										<u-avatar size="56" class="img" ></u-avatar>
-										<u-badge size="mini" count="x" type="info" :absolute="false">
-											
-										</u-badge>
-										
-										<view>晓丽</view>
-										
-									</view>
-								</view>
-							</view>
-							<view class="approveItem_a2">
-								
-								<view class="a2_span">+</view>
-								<span class="a2_span_2">*</span>
-							</view>
-							
-						</view>
-						
-					</template>
-				</u-time-line-item>
-				<u-time-line-item node-top="10">
-					<template v-slot:node>
-						<view>
-							<view class="u-node" style="background:#CDCDCD;">
-								<!-- 此处为uView的icon组件 -->
-								<!-- <u-icon name="checkmark" color="#fff" :size="24"></u-icon> -->
-							</view>
-						</view>
-					</template>
-					<template v-slot:content>
-						<view class="approveItem_main">
-							<view class="approveItem_a1">
-								<view class="approveItem_a1_text1">
-									一级审批人
-								</view>
-								<view class="approveItem_a1_text2">
-									请选择审批人
-								</view>
-								<view class="approveItem_a1_text3">
-									<view class="approveItem_a1_text3Img">
-										
-					
-										<u-avatar size="56" class="img" ></u-avatar>
-										<u-badge size="mini"  count="x" type="info" :absolute="false">
-											
-										</u-badge>
-										
-										<view>晓丽</view>
-									</view>
-									<view  class="approveItem_a1_text3Img">
-										
-									
-										<u-avatar size="56" class="img" ></u-avatar>
-										<u-badge size="mini" count="x" type="info" :absolute="false">
-											
-										</u-badge>
-										
-										<view>晓丽</view>
-										
-									</view>
-								</view>
-							</view>
-							<view class="approveItem_a2">
-								
-								<view class="a2_span">+</view>
+								<view class="a2_span" @click="gotoSelectPerson(item)" >+</view>
 								<span class="a2_span_2">*</span>
 							</view>
 							
@@ -350,6 +246,8 @@
 						
 					</template>
 				</u-time-line-item>
+				
+				
 			</u-time-line>
 		</view>
 		
@@ -392,6 +290,9 @@
 				],
 				fieldInfo:{},
 				fieldList:[],
+				approveList:[
+					{},{},{},{},{},
+				],
 				action:"",
 				formData:{},
 				personInfo:{},
@@ -416,6 +317,16 @@
 		
 		},
 		methods: {
+			saveStorage(){
+				
+			},
+			gotoSelectPerson(item){
+				this.saveStorage();
+				
+				uni.navigateTo({
+					url:"/pages/oawork/business/select"
+				})
+			},
 			changeCalendar(e){
 				this.formData[this.keyCalendar.key]=e.result;
 			},

+ 799 - 18
pages/oawork/business/select.vue

@@ -1,22 +1,803 @@
-<template>
-	<view>
-		
-	</view>
-</template>
+<template>
+	<view>
+		<u-navbar title="选择人员">
+			<view class="slot-wrap" @click="submit()">
+				发布
+			</view>
+		</u-navbar>
+		<view class="mui-content">
+			<view class="vongi-bread">
+				<template v-for="(item,index) in navList">
+					<a :class="navCanClick(item,index)?'color4fc5f7':''" @click="reloadItem(item,index)" :key="index"
+						v-text="item.name"></a>
+						<u-icon name="arrow-right" :key="index" v-if="index!=navList.length-1"></u-icon>
+					
+				</template>
+			</view>
+
+			<view class="mui-table-view">
+				<view v-for="(item,index) in arrangeShiftCompanyList" :key="index"
+					class="mui-table-view-cell ">
+					<view class="mui-ellipsis">
+						{{item.name}}
+					</view>
+
+					<a href="" class=" mui-ellipsis-a " @click="reloadNext(item)">
+						<img src="@/assets/img/oawork/select.png">
+						下级</a>
+					<!--灰色状态-->
+					<!--<a href="" class="color999 iconfont icon-xiaji">下级</a>-->
+				</view>
+			</view>
+
+			<view class="vongi-fplist" :style="'margin-bottom:'+(clientHeight+100)+'px'">
+				<view class="mui-content-padded">
+					人员列表
+				</view>
+				<view class="mui-input-group" style="background-color: #fff;     padding-bottom: 90px;">
+
+					<view class="mui-input-row " v-for="(item,index) in arrangeShiftPersonList" :key="index"
+						@click="checkboxBtn(item)">
+						<label :class="{
+							selectcheckboxBtn:selectId.indexOf(item.personId)!=-1
+						}">{{item.auditorName}}</label>
+						<!-- mui-checkbox
+						<input name="checkbox1" :value="item.id" v-model="selectId" type="checkbox"> -->
+					</view>
+
+					<view class="mui-input-row " v-if="!arrangeShiftPersonList.length">
+						--无--
+						<!-- mui-checkbox
+						<input name="checkbox1" :value="item.id" v-model="selectId" type="checkbox"> -->
+					</view>
+				</view>
+				<view class=" vongi-footer " >
+					
+					<view class="margin10">已选择人员:<span style="float: right;">已选{{selectPerson.length}}人</span></view>
+					<view class="vongi-yjbtn flew" :style="'height:'+clientHeight+'px'">
+						<span style="height: 24px;" v-for="(item,i) in selectPerson" :key="i">{{item.auditorName}}
+							<a class="iconfont icon-guanbi1" v-show="item.status==0"
+								@click="checkboxBtn(item)">
+								<u-icon name="close"></u-icon>
+								</a></span>
+
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				clientHeight: 37,
+				companyId: '',
+				arrangeShiftCompanyList: [
+
+				],
+				arrangeShiftPersonList: [],
+				nowLevel: 0,
+				navList: [{
+					name: '地方铁路地方铁路公司',
+					id: ''
+				},{
+					name: '项目部门',
+					id: ''
+				},{
+					name: 'xxxx小组',
+					id: ''
+				}],
+				selectId: [],
+				selectPerson: [],
+				selectIdOld: [],
+				selectPersonOld: [],
+				selectObj: {},
+			}
+		},
+		onReady() {
+			this.getArrangeShiftCompanyList();
+		},
+
+		methods: {
+			submit() {},
+			checkboxBtn(obj) {
+
+				//selectId.push(item.id)
+				console.log(this.selectId)
+				console.log(this.selectPerson)
+				if (this.selectId.includes(obj.personId)) {
+
+					var i = -1;
+					var person = {};
+					for (var j in this.selectPerson) {
+						if (this.selectPerson[j].personId == obj.personId) {
+							i = j
+							person = this.selectPerson[j];
+						}
+					}
+					if (i != -1) {
+						if (person.status != 0) {
+							mui.toast("已审批人员不可调整")
+							return;
+						}
+						this.selectPerson.splice(i, 1);
+						this.selectId.splice(i, 1);
+					}
+
+				} else {
+					if (this.selectType == 'single' && this.selectPerson.length > 0) {
+						mui.toast("单人审批只能选择一人")
+						return;
+					}
+
+					this.selectPerson.push(obj);
+					this.selectId.push(obj.personId)
+				}
+
+				this.setHeight()
+
+
+			},
+			setHeight() {
+				//spanLast
+				this.$nextTick(() => {
+					var top = document.getElementById("spanLast").scrollHeight;
+					if (top < 500) {
+						this.clientHeight = top;
+					} else {
+						this.clientHeight = 500;
+					}
+					console.log(top)
+				})
+			},
+			reloadItem(item, index) {
+				if (index == this.nowLevel) {
+					return false;
+				}
+				this.navList = this.navList.slice(0, index + 1);
+				this.nowLevel = index;
+				this.companyId = item.id;
+				this.getArrangeShiftCompanyList();
+			},
+			//加载下级
+			reloadNext(item) {
+				this.navList.push(item)
+				this.nowLevel++;
+				this.companyId = item.id;
+				this.getArrangeShiftCompanyList();
+			},
+			//判断面包屑是否可点击
+			navCanClick(item, index) {
+				if (index == this.nowLevel) {
+					return false;
+				} else {
+					return true;
+				}
+			},
+			back() {
+				this.selectId = this.selectIdOld;
+				this.selectPerson = this.selectPersonOld;
+				this.$emit("confirm", {
+					status: 0
+				})
+			},
+			ok() {
+				if (this.selectPerson.length || this.selectType == "view") {
+					var k = 0;
+					for (var i in this.selectPerson) {
+						var obj = this.selectPerson[i];
+						if (obj.status == 0) {
+							k++;
+						}
+					}
+					if (k == 0 && this.selectType != "view") {
+						mui.toast("请保留最少一人审批");
+						return
+					}
+					if (this.selectType == 'single' && this.selectPerson.length > 1) {
+						mui.toast("单人审批只能选择一人")
+						return;
+					}
+					this.selectIdOld = this.selectId;
+					this.selectPersonOld = this.selectPerson;
+					if (this.selectType == "view") {
+						this.selectObj.examineStep.stepType = "2"
+						this.selectObj.examineStep.examineType = "view"
+					} else {
+						this.selectObj.examineStep.examineType = this.selectType
+						this.selectObj.examineStep.stepType = "1"
+					}
+					this.selectObj.stepPersonList = this.selectPerson
+
+					this.$emit("confirm", {
+						status: 1,
+						selectObj: this.selectObj
+					})
+				} else {
+					mui.toast("请保留最少一人审批");
+				}
+			},
+
+			getArrangeShiftCompanyList() {
+
+
+				var response = {
+					"personList": [{
+							"id": 19640,
+							"companyId": "b1855f3b-c26b-4345-9920-4dc6b1527548",
+							"companyName": null,
+							"name": "杨洋LA",
+							"phone": "19945188896",
+							"idCard": null,
+							"openId": "oHjCawo-Twp2YRfuIT2Z9X4ayAtQ",
+							"faceEnabled": null,
+							"faceBound": null,
+							"cardEnabled": null,
+							"appEnabled": null,
+							"passwordEnabled": null,
+							"guestEnabled": null,
+							"position1": null,
+							"position2": null,
+							"position3": null,
+							"position4": null,
+							"position5": null,
+							"delFlag": false,
+							"createBy": "9e304351-a0d2-4b9a-9a94-141edcbaeb74",
+							"createTime": "2022-12-08 14:01",
+							"updateBy": "72dc480e-6816-4be3-918d-da2436f39627",
+							"updateTime": "2023-01-05 12:14",
+							"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2022/12/8/9edfdd0f-e3a1-4a2c-9771-8e4f750d6bc8/1.jpg",
+							"popedom": "ad5601de-fe86-4c4d-a354-1eae0cb30530",
+							"popedomName": null,
+							"lastTemperatureLog": null,
+							"isNormal": null,
+							"personCompany": null,
+							"wechatNoticeEnabled": false,
+							"allowViewLocal": false,
+							"companyType": null,
+							"healthErtificateUrl": null,
+							"isSync": null,
+							"sex": null,
+							"parkId": null,
+							"parkName": null,
+							"healthyCode": null,
+							"updateHealthyTime": null,
+							"healthyReason": null,
+							"companyStructName": null,
+							"roleName": null,
+							"personRoleId": null,
+							"workStatus": "1",
+							"checkinInfoId": null,
+							"contractType": null,
+							"hkPersonId": null,
+							"isTemporary": false,
+							"temporaryEffectiveDate": null,
+							"workStatusN": "工作"
+						},
+						{
+							"id": 19728,
+							"companyId": "b1855f3b-c26b-4345-9920-4dc6b1527548",
+							"companyName": null,
+							"name": "高进权",
+							"phone": "15671357878",
+							"idCard": null,
+							"openId": "oN5ep6FvodStV8A2gXSQAUum8LKM",
+							"faceEnabled": null,
+							"faceBound": false,
+							"cardEnabled": null,
+							"appEnabled": null,
+							"passwordEnabled": null,
+							"guestEnabled": null,
+							"position1": null,
+							"position2": null,
+							"position3": null,
+							"position4": null,
+							"position5": null,
+							"delFlag": false,
+							"createBy": "31ea2b4f-20a1-4be5-901f-7a927c729d1a",
+							"createTime": "2022-12-15 11:05",
+							"updateBy": "72dc480e-6816-4be3-918d-da2436f39627",
+							"updateTime": "2023-01-05 12:40",
+							"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2022/12/24/d0751ba1-48f2-4515-ba23-19efb297f9e1/1.jpg",
+							"popedom": "3a85ff78-7f9d-47dd-af10-6f39b466812b",
+							"popedomName": null,
+							"lastTemperatureLog": null,
+							"isNormal": null,
+							"personCompany": null,
+							"wechatNoticeEnabled": false,
+							"allowViewLocal": false,
+							"companyType": null,
+							"healthErtificateUrl": null,
+							"isSync": null,
+							"sex": null,
+							"parkId": null,
+							"parkName": null,
+							"healthyCode": null,
+							"updateHealthyTime": null,
+							"healthyReason": null,
+							"companyStructName": null,
+							"roleName": null,
+							"personRoleId": null,
+							"workStatus": "1",
+							"checkinInfoId": null,
+							"contractType": null,
+							"hkPersonId": null,
+							"isTemporary": false,
+							"temporaryEffectiveDate": null,
+							"workStatusN": "工作"
+						},
+						{
+							"id": 19729,
+							"companyId": "b1855f3b-c26b-4345-9920-4dc6b1527548",
+							"companyName": null,
+							"name": "郑开鑫",
+							"phone": "17602144315",
+							"idCard": null,
+							"openId": "oN5ep6Os2nExGLOW5k1cZHGwVFHE",
+							"faceEnabled": null,
+							"faceBound": true,
+							"cardEnabled": null,
+							"appEnabled": null,
+							"passwordEnabled": null,
+							"guestEnabled": null,
+							"position1": null,
+							"position2": null,
+							"position3": null,
+							"position4": null,
+							"position5": null,
+							"delFlag": false,
+							"createBy": "31ea2b4f-20a1-4be5-901f-7a927c729d1a",
+							"createTime": "2022-12-15 11:06",
+							"updateBy": "72dc480e-6816-4be3-918d-da2436f39627",
+							"updateTime": "2023-01-05 13:00",
+							"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2022/12/21/ae5ec908-8757-4d00-bcb9-eff6f901fec8/1.jpg",
+							"popedom": "b73f2316-90ba-4357-982d-d06763f5af41",
+							"popedomName": null,
+							"lastTemperatureLog": null,
+							"isNormal": null,
+							"personCompany": null,
+							"wechatNoticeEnabled": false,
+							"allowViewLocal": false,
+							"companyType": null,
+							"healthErtificateUrl": null,
+							"isSync": null,
+							"sex": null,
+							"parkId": null,
+							"parkName": null,
+							"healthyCode": null,
+							"updateHealthyTime": null,
+							"healthyReason": null,
+							"companyStructName": null,
+							"roleName": null,
+							"personRoleId": null,
+							"workStatus": "1",
+							"checkinInfoId": null,
+							"contractType": null,
+							"hkPersonId": null,
+							"isTemporary": false,
+							"temporaryEffectiveDate": null,
+							"workStatusN": "工作"
+						},
+						{
+							"id": 19730,
+							"companyId": "b1855f3b-c26b-4345-9920-4dc6b1527548",
+							"companyName": null,
+							"name": "陈文",
+							"phone": "18986656325",
+							"idCard": null,
+							"openId": "oN5ep6AHmKcgbiOKH0mtilwK77po",
+							"faceEnabled": null,
+							"faceBound": false,
+							"cardEnabled": null,
+							"appEnabled": null,
+							"passwordEnabled": null,
+							"guestEnabled": null,
+							"position1": null,
+							"position2": null,
+							"position3": null,
+							"position4": null,
+							"position5": null,
+							"delFlag": false,
+							"createBy": "31ea2b4f-20a1-4be5-901f-7a927c729d1a",
+							"createTime": "2022-12-15 11:06",
+							"updateBy": null,
+							"updateTime": "2022-12-29 00:00",
+							"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2022/12/22/a3ce263c-4886-4124-aefb-a8f226455b22/1.jpg",
+							"popedom": "6da4d6d3-06fc-4f1e-9bc2-c623fc8ef630",
+							"popedomName": null,
+							"lastTemperatureLog": null,
+							"isNormal": null,
+							"personCompany": null,
+							"wechatNoticeEnabled": false,
+							"allowViewLocal": false,
+							"companyType": null,
+							"healthErtificateUrl": null,
+							"isSync": null,
+							"sex": null,
+							"parkId": null,
+							"parkName": null,
+							"healthyCode": null,
+							"updateHealthyTime": null,
+							"healthyReason": null,
+							"companyStructName": null,
+							"roleName": null,
+							"personRoleId": null,
+							"workStatus": "1",
+							"checkinInfoId": null,
+							"contractType": null,
+							"hkPersonId": null,
+							"isTemporary": false,
+							"temporaryEffectiveDate": null,
+							"workStatusN": "工作"
+						},
+						{
+							"id": 19731,
+							"companyId": "b1855f3b-c26b-4345-9920-4dc6b1527548",
+							"companyName": null,
+							"name": "舒展",
+							"phone": "13437120102",
+							"idCard": null,
+							"openId": "oHjCawgwCGen5k1-hAsimdEX5lZo",
+							"faceEnabled": null,
+							"faceBound": null,
+							"cardEnabled": null,
+							"appEnabled": null,
+							"passwordEnabled": null,
+							"guestEnabled": null,
+							"position1": null,
+							"position2": null,
+							"position3": null,
+							"position4": null,
+							"position5": null,
+							"delFlag": false,
+							"createBy": "31ea2b4f-20a1-4be5-901f-7a927c729d1a",
+							"createTime": "2022-12-15 11:07",
+							"updateBy": "72dc480e-6816-4be3-918d-da2436f39627",
+							"updateTime": "2023-01-30 09:07",
+							"faceImageUrl": null,
+							"popedom": "ffe91fed-46e3-4547-a593-0979b58f1228",
+							"popedomName": null,
+							"lastTemperatureLog": null,
+							"isNormal": null,
+							"personCompany": null,
+							"wechatNoticeEnabled": false,
+							"allowViewLocal": false,
+							"companyType": null,
+							"healthErtificateUrl": null,
+							"isSync": null,
+							"sex": null,
+							"parkId": null,
+							"parkName": null,
+							"healthyCode": null,
+							"updateHealthyTime": null,
+							"healthyReason": null,
+							"companyStructName": null,
+							"roleName": null,
+							"personRoleId": null,
+							"workStatus": "1",
+							"checkinInfoId": null,
+							"contractType": null,
+							"hkPersonId": null,
+							"isTemporary": false,
+							"temporaryEffectiveDate": null,
+							"workStatusN": "工作"
+						},
+						{
+							"id": 19733,
+							"companyId": "b1855f3b-c26b-4345-9920-4dc6b1527548",
+							"companyName": null,
+							"name": "杨所",
+							"phone": "15207211859",
+							"idCard": null,
+							"openId": "oN5ep6J256zHjlbVU6HXEfQLkhvs",
+							"faceEnabled": null,
+							"faceBound": null,
+							"cardEnabled": null,
+							"appEnabled": null,
+							"passwordEnabled": null,
+							"guestEnabled": null,
+							"position1": null,
+							"position2": null,
+							"position3": null,
+							"position4": null,
+							"position5": null,
+							"delFlag": false,
+							"createBy": "72dc480e-6816-4be3-918d-da2436f39627",
+							"createTime": "2022-12-22 16:08",
+							"updateBy": "72dc480e-6816-4be3-918d-da2436f39627",
+							"updateTime": "2023-04-10 11:37",
+							"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2022/12/26/fb90da2c-89df-48a6-b1ca-6d2d9c9f2d94/1.jpg",
+							"popedom": "f2b89b01-92e8-431a-bab1-f2feb9026d82",
+							"popedomName": null,
+							"lastTemperatureLog": null,
+							"isNormal": null,
+							"personCompany": null,
+							"wechatNoticeEnabled": true,
+							"allowViewLocal": false,
+							"companyType": null,
+							"healthErtificateUrl": null,
+							"isSync": null,
+							"sex": null,
+							"parkId": null,
+							"parkName": null,
+							"healthyCode": null,
+							"updateHealthyTime": null,
+							"healthyReason": null,
+							"companyStructName": null,
+							"roleName": null,
+							"personRoleId": null,
+							"workStatus": "1",
+							"checkinInfoId": null,
+							"contractType": null,
+							"hkPersonId": null,
+							"isTemporary": false,
+							"temporaryEffectiveDate": null,
+							"workStatusN": "工作"
+						}
+					],
+					"companyInfoList": [{
+						"id": "b1855f3b-c26b-4345-9920-4dc6b1527548",
+						"logo": null,
+						"level": 2,
+						"sortNo": 20,
+						"name": "测试组",
+						"fullName": null,
+						"remark": null,
+						"createBy": "31ea2b4f-20a1-4be5-901f-7a927c729d1a",
+						"createTime": "2022-12-15 11:04",
+						"updateBy": "72dc480e-6816-4be3-918d-da2436f39627",
+						"updateTime": "2022-12-25 12:31",
+						"delFlag": false,
+						"parentId": "78486e1d-4100-45e9-8073-5d7a9814391b",
+						"code": "78486e1d-4100-45e9-8073-5d7a9814391b,b1855f3b-c26b-4345-9920-4dc6b1527548",
+						"parentName": "目录",
+						"type": "1",
+						"typeName": null,
+						"wallUrl": null,
+						"sceneId": "1",
+						"regionId": "1",
+						"sceneName": null,
+						"regionName": null,
+						"relationCompanyId": null,
+						"enableRegister": null,
+						"unitType": "1",
+						"hasNext": null,
+						"isMobilePayment": null,
+						"healthyReportNoticeEnable": null,
+						"healthyReportNoticeTime": null,
+						"healthyReportSubmitTime": null,
+						"source": null,
+						"provinceCode": null,
+						"addressDetail": null,
+						"screenRefreshInterval": null,
+						"wechatMesssageUrl": "ga-oa/#/"
+					},{
+						"id": "b1855f3b-c26b-4345-9920-4dc6b1527548",
+						"logo": null,
+						"level": 2,
+						"sortNo": 20,
+						"name": "测试组",
+						"fullName": null,
+						"remark": null,
+						"createBy": "31ea2b4f-20a1-4be5-901f-7a927c729d1a",
+						"createTime": "2022-12-15 11:04",
+						"updateBy": "72dc480e-6816-4be3-918d-da2436f39627",
+						"updateTime": "2022-12-25 12:31",
+						"delFlag": false,
+						"parentId": "78486e1d-4100-45e9-8073-5d7a9814391b",
+						"code": "78486e1d-4100-45e9-8073-5d7a9814391b,b1855f3b-c26b-4345-9920-4dc6b1527548",
+						"parentName": "目录",
+						"type": "1",
+						"typeName": null,
+						"wallUrl": null,
+						"sceneId": "1",
+						"regionId": "1",
+						"sceneName": null,
+						"regionName": null,
+						"relationCompanyId": null,
+						"enableRegister": null,
+						"unitType": "1",
+						"hasNext": null,
+						"isMobilePayment": null,
+						"healthyReportNoticeEnable": null,
+						"healthyReportNoticeTime": null,
+						"healthyReportSubmitTime": null,
+						"source": null,
+						"provinceCode": null,
+						"addressDetail": null,
+						"screenRefreshInterval": null,
+						"wechatMesssageUrl": "ga-oa/#/"
+					},{
+						"id": "b1855f3b-c26b-4345-9920-4dc6b1527548",
+						"logo": null,
+						"level": 2,
+						"sortNo": 20,
+						"name": "测试组",
+						"fullName": null,
+						"remark": null,
+						"createBy": "31ea2b4f-20a1-4be5-901f-7a927c729d1a",
+						"createTime": "2022-12-15 11:04",
+						"updateBy": "72dc480e-6816-4be3-918d-da2436f39627",
+						"updateTime": "2022-12-25 12:31",
+						"delFlag": false,
+						"parentId": "78486e1d-4100-45e9-8073-5d7a9814391b",
+						"code": "78486e1d-4100-45e9-8073-5d7a9814391b,b1855f3b-c26b-4345-9920-4dc6b1527548",
+						"parentName": "目录",
+						"type": "1",
+						"typeName": null,
+						"wallUrl": null,
+						"sceneId": "1",
+						"regionId": "1",
+						"sceneName": null,
+						"regionName": null,
+						"relationCompanyId": null,
+						"enableRegister": null,
+						"unitType": "1",
+						"hasNext": null,
+						"isMobilePayment": null,
+						"healthyReportNoticeEnable": null,
+						"healthyReportNoticeTime": null,
+						"healthyReportSubmitTime": null,
+						"source": null,
+						"provinceCode": null,
+						"addressDetail": null,
+						"screenRefreshInterval": null,
+						"wechatMesssageUrl": "ga-oa/#/"
+					}]
+				}
+				this.arrangeShiftCompanyList = response.companyInfoList;
+				var list = [];
+				for (var i in response.personList) {
+					var obj = response.personList[i];
+
+					list.push({
+						personId: obj.id,
+						auditorImage: obj.faceImageUrl,
+						auditorName: obj.name,
+						status: 0,
+					})
+				}
+				this.arrangeShiftPersonList = list;
+
+				return
+				this.isLoading = true;
+
+				API.findDepartmentAndPerson(this.companyId).then(response => {
+
+
+					this.isLoading = false;
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			}, //下拉事件
+			init(selectObj) {
+				document.body.scrollTop = 0;
+				document.documentElement.scrollTop = 0;
+				//this.initbl=false
+				this.selectObj = selectObj
+				if (this.selectObj) {
+					this.selectType = this.selectObj.examineStep.examineType;
+
+					this.selectId = [];
+					this.selectPerson = [];
+
+					var list = this.selectObj.stepPersonList;
+					for (var i in list) {
+						var obj = list[i]
+						this.selectId.push(obj.personId)
+						this.selectPerson.push(obj)
+					}
+
+					this.setHeight()
+					console.log(this.selectPerson)
+				}
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.slot-wrap {
+		//background-color: rgba(204, 204, 204, 1);
+		background-color: #03a9f4;
+		width: 104rpx;
+		height: 56rpx;
+		line-height: 56rpx;
+		border-radius: 8px;
+
+		color: #fff;
+		text-align: center;
+		position: absolute;
+		top: 50%;
+		right: 32rpx;
+		transform: translateY(-50%);
+	}
+	.vongi-bread{
+		font-size: 14px;
+ padding: 10px;
+		    display: -webkit-box;
+		    overflow-x: scroll;
+		   
+			.color4fc5f7{
+				    color: #3385FF/*蓝*/;
+			}
+			a{
+				    padding: 0 5px;
+				    display: block;
+			}
+	}
+	.mui-table-view{
+		background-color: rgba(255, 255, 255, 1);
+		.mui-table-view-cell {
+			display: flex;
+			     padding: 11px 15px;
+			    justify-content: space-between;
+				.mui-ellipsis{
+					    flex: 1;
+					    border-right: 1px solid #BBBBBB;
+					    padding-right: 15px;
+					    margin-right: 15px;
+				}
+				.mui-ellipsis-a{
+					    color: #3385FF;
+						img{
+							width: 24rpx;
+							height: 24rpx;
+						}
+				}
+		}
 
-<script>
-	export default {
-		data() {
-			return {
-				
+	}
+	.vongi-fplist{
+		.mui-content-padded{
+			font-size: 14px;
+			padding: 10px;
+		}
+		.mui-input-group{
+			background-color: rgba(255, 255, 255, 1);
+			.mui-input-row{
+				padding: 10px;
 			}
-		},
-		methods: {
-			
 		}
+		
 	}
-</script>
-
-<style>
-
-</style>
+	.vongi-footer{
+		    position: fixed;
+		    bottom: 0;
+		    width: 100%;
+		    padding: 10px 0;
+			background-color: #f3f4f4;
+			.margin10,.vongi-yjbtn{
+				 padding: 0px 20px;
+				background-color: rgba(255, 255, 255, 1);
+			}
+			.vongi-yjbtn{
+				    display: flex;
+				    flex-wrap: wrap;
+				  
+				    height: 112px;
+				    overflow-y: scroll;
+					    width: 100%;
+				span{
+					color: #3385FF;
+					    border: 1px solid #3385FF;
+					    border-radius: 18px;
+					    padding: 2px 10px;
+					       display: flex;
+					       align-items: center;
+					    margin: 5px;
+				}
+				a{
+					    font-size: 14px;
+					    margin-left: 5px;
+					    color: #3385FF;
+				}
+			}
+	}
+	.selectcheckboxBtn{
+		    color: #3385FF;
+	}
+</style>

+ 693 - 0
uni_modules/uview-ui/components/u-upload-file-all/u-upload-file-all.vue

@@ -0,0 +1,693 @@
+<template>
+	<view class="u-upload" v-if="!disabled">
+		<view
+			v-if="showUploadList"
+			class="u-list-item u-preview-wrap"
+			v-for="(item, index) in lists"
+			:key="index"
+			:style="{
+				//width: $u.addUnit(width),
+				height: $u.addUnit(height)
+			}"
+		>
+			<view
+				v-if="deletable"
+				class="u-delete-icon"
+				@tap.stop="deleteItem(index)"
+				:style="{
+					background: delBgColor
+				}"
+			>
+				<u-icon class="u-icon" :name="delIcon" size="20" :color="delColor"></u-icon>
+			</view>
+			<u-line-progress
+				v-if="showProgress && item.progress > 0 && item.progress != 100 && !item.error"
+				:show-percent="false"
+				height="16"
+				class="u-progress"
+				:percent="item.progress"
+			></u-line-progress>
+			<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn">点<br/>击<br/>重<br/>试</view>
+		<view  v-else-if="item.progress==100&&item.response&&item.response.result" class="u-error-btn2 u-primary-btn">上<br/>传<br/>成<br/>功<br/></view>
+		<view  v-else-if="!item.error" class="u-error-btn2 u-warning-btn">上<br/>传<br/>中<br/>试</view>
+		<view class="file">{{item.file.name}}</view>
+		
+		</view>
+		<slot name="file" :file="lists"></slot>
+		<view style="display: inline-block;" @tap="selectFile" v-if="maxCount > lists.length">
+			<slot name="addBtn"></slot>
+			<view
+				v-if="!customBtn"
+				class="u-list-item u-add-wrap"
+				hover-class="u-add-wrap__hover"
+				hover-stay-time="150"
+				:style="{
+					'justify-content': 'flex-start',
+					width: $u.addUnit(width),
+					height: $u.addUnit(height)
+				}"
+			>
+				
+				<view class="u-add-tips">
+					<u-icon name="file-text"></u-icon>
+				{{ uploadText }}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+/**
+ * upload 图片上传
+ * @description 该组件用于上传图片场景
+ * @tutorial https://www.uviewui.com/components/upload.html
+ * @property {String} action 服务器上传地址
+ * @property {String Number} max-count 最大选择图片的数量(默认99)
+ * @property {Boolean} custom-btn 如果需要自定义选择图片的按钮,设置为true(默认false)
+ * @property {Boolean} show-progress 是否显示进度条(默认true)
+ * @property {Boolean} disabled 是否启用(显示/移仓)组件(默认false)
+ * @property {String} image-mode 预览图片等显示模式,可选值为uni的image的mode属性值(默认aspectFill)
+ * @property {String} del-icon 右上角删除图标名称,只能为uView内置图标
+ * @property {String} del-bg-color 右上角关闭按钮的背景颜色
+ * @property {String | Number} index 在各个回调事件中的最后一个参数返回,用于区别是哪一个组件的事件
+ * @property {String} del-color 右上角关闭按钮图标的颜色
+ * @property {Object} header 上传携带的头信息,对象形式
+ * @property {Object} form-data 上传额外携带的参数
+ * @property {String} name 上传文件的字段名,供后端获取使用(默认file)
+ * @property {Array<String>} size-type original 原图,compressed 压缩图,默认二者都有(默认['original', 'compressed'])
+ * @property {Array<String>} source-type 选择图片的来源,album-从相册选图,camera-使用相机,默认二者都有(默认['album', 'camera'])
+ * @property {Boolean} preview-full-image	是否可以通过uni.previewImage预览已选择的图片(默认true)
+ * @property {Boolean} multiple	是否开启图片多选,部分安卓机型不支持(默认true)
+ * @property {Boolean} deletable 是否显示删除图片的按钮(默认true)
+ * @property {String Number} max-size 选择单个文件的最大大小,单位B(byte),默认不限制(默认Number.MAX_VALUE)
+ * @property {Array<Object>} file-list 默认显示的图片列表,数组元素为对象,必须提供url属性
+ * @property {Boolean} upload-text 选择图片按钮的提示文字(默认“选择图片”)
+ * @property {Boolean} auto-upload 选择完图片是否自动上传,见上方说明(默认true)
+ * @property {Boolean} show-tips 特殊情况下是否自动提示toast,见上方说明(默认true)
+ * @property {Boolean} show-upload-list 是否显示组件内部的图片预览(默认true)
+ * @event {Function} on-oversize 图片大小超出最大允许大小
+ * @event {Function} on-preview 全屏预览图片时触发
+ * @event {Function} on-remove 移除图片时触发
+ * @event {Function} on-success 图片上传成功时触发
+ * @event {Function} on-change 图片上传后,无论成功或者失败都会触发
+ * @event {Function} on-error 图片上传失败时触发
+ * @event {Function} on-progress 图片上传过程中的进度变化过程触发
+ * @event {Function} on-uploaded 所有图片上传完毕触发
+ * @event {Function} on-choose-complete 每次选择图片后触发,只是让外部可以得知每次选择后,内部的文件列表
+ * @example <u-upload :action="action" :file-list="fileList" ></u-upload>
+ */
+export default {
+	name: 'u-upload',
+	props: {
+		//是否显示组件自带的图片预览功能
+		showUploadList: {
+			type: Boolean,
+			default: true
+		},
+		// 后端地址
+		action: {
+			type: String,
+			default: ''
+		},
+		// 最大上传数量
+		maxCount: {
+			type: [String, Number],
+			default: 52
+		},
+		//  是否显示进度条
+		showProgress: {
+			type: Boolean,
+			default: true
+		},
+		// 是否启用
+		disabled: {
+			type: Boolean,
+			default: false
+		},
+		// 预览上传的图片时的裁剪模式,和image组件mode属性一致
+		imageMode: {
+			type: String,
+			default: 'aspectFill'
+		},
+		// 头部信息
+		header: {
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		// 额外携带的参数
+		formData: {
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		// 上传的文件字段名
+		name: {
+			type: String,
+			default: 'photoFile'
+		},
+		// 所选的图片的尺寸, 可选值为original compressed
+		sizeType: {
+			type: Array,
+			default() {
+				return ['original', 'compressed'];
+			}
+		},
+		sourceType: {
+			type: Array,
+			default() {
+				return ['album', 'camera'];
+			}
+		},
+		// 是否在点击预览图后展示全屏图片预览
+		previewFullImage: {
+			type: Boolean,
+			default: true
+		},
+		// 是否开启图片多选,部分安卓机型不支持
+		multiple: {
+			type: Boolean,
+			default: false
+		},
+		// 是否展示删除按钮
+		deletable: {
+			type: Boolean,
+			default: true
+		},
+		// 文件大小限制,单位为byte
+		maxSize: {
+			type: [String, Number],
+			default: Number.MAX_VALUE
+		},
+		// 显示已上传的文件列表
+		fileList: {
+			type: Array,
+			default() {
+				return [];
+			}
+		},
+		// 上传区域的提示文字
+		uploadText: {
+			type: String,
+			default: '上传附件'
+		},
+		// 是否自动上传
+		autoUpload: {
+			type: Boolean,
+			default: true
+		},
+		// 是否显示toast消息提示
+		showTips: {
+			type: Boolean,
+			default: true
+		},
+		// 是否通过slot自定义传入选择图标的按钮
+		customBtn: {
+			type: Boolean,
+			default: false
+		},
+		// 内部预览图片区域和选择图片按钮的区域宽度
+		width: {
+			type: [String, Number],
+			default: 200
+		},
+		// 内部预览图片区域和选择图片按钮的区域高度
+		height: {
+			type: [String, Number],
+			default: 80
+		},
+		// 右上角关闭按钮的背景颜色
+		delBgColor: {
+			type: String,
+			default: '#fa3534'
+		},
+		// 右上角关闭按钮的叉号图标的颜色
+		delColor: {
+			type: String,
+			default: '#ffffff'
+		},
+		// 右上角删除图标名称,只能为uView内置图标
+		delIcon: {
+			type: String,
+			default: 'close'
+		},
+		// 如果上传后的返回值为json字符串,是否自动转json
+		toJson: {
+			type: Boolean,
+			default: true
+		},
+		// 上传前的钩子,每个文件上传前都会执行
+		beforeUpload: {
+			type: Function,
+			default: null
+		},
+		// 移除文件前的钩子
+		beforeRemove: {
+			type: Function,
+			default: null
+		},
+		// 允许上传的图片后缀
+		limitType:{
+			type: Array,
+			default() {
+				// 支付宝小程序真机选择图片的后缀为"image"
+				// https://opendocs.alipay.com/mini/api/media-image
+				return ['png', 'jpg', 'jpeg', 'webp', 'gif', 'image'];
+			}
+		},
+		// 在各个回调事件中的最后一个参数返回,用于区别是哪一个组件的事件
+		index: {
+			type: [Number, String],
+			default: ''
+		}
+	},
+	mounted() {},
+	data() {
+		return {
+			lists: [],
+			isInCount: true,
+			uploading: false
+		};
+	},
+	watch: {
+		fileList: {
+			immediate: true,
+			handler(val) {
+				val.map(value => {
+					// 首先检查内部是否已经添加过这张图片,因为外部绑定了一个对象给fileList的话(对象引用),进行修改外部fileList
+					// 时,会触发watch,导致重新把原来的图片再次添加到this.lists
+					// 数组的some方法意思是,只要数组元素有任意一个元素条件符合,就返回true,而另一个数组的every方法的意思是数组所有元素都符合条件才返回true
+					let tmp = this.lists.some(val => {
+						return val.url == value.url;
+					})
+					// 如果内部没有这个图片(tmp为false),则添加到内部
+					!tmp && this.lists.push({ url: value.url, error: false, progress: 100 });
+				});
+			}
+		},
+		// 监听lists的变化,发出事件
+		lists(n) {
+			this.$emit('on-list-change', n, this.index);
+		}
+	},
+	methods: {
+		// 清除列表
+		clear() {
+			this.lists = [];
+		},
+		// 重新上传队列中上传失败的所有文件
+		reUpload() {
+			this.uploadFile();
+		},
+		// 选择图片
+		selectFile() {
+			if (this.disabled) return;
+			const { name = '', maxCount, multiple, maxSize, sizeType, lists, camera, compressed, maxDuration, sourceType } = this;
+			let chooseFile = null;
+			const newMaxCount = maxCount - lists.length;
+			// 设置为只选择图片的时候使用 chooseImage 来实现
+			chooseFile = new Promise((resolve, reject) => {
+				uni.chooseFile({
+					count: multiple ? (newMaxCount > 9 ? 9 : newMaxCount) : 1,
+					sourceType: sourceType,
+					sizeType,
+					success: resolve,
+					fail: reject
+				});
+			});
+			chooseFile
+				.then(res => {
+					let file = null;
+					let listOldLength = this.lists.length;
+					res.tempFiles.map((val, index) => {
+						// 检查文件后缀是否允许,如果不在this.limitType内,就会返回false
+						//if(!this.checkFileExt(val)) return ;
+						
+						// 如果是非多选,index大于等于1或者超出最大限制数量时,不处理
+						if (!multiple && index >= 1) return;
+						if (val.size > maxSize) {
+							this.$emit('on-oversize', val, this.lists, this.index);
+							this.showToast('超出允许的文件大小');
+						} else {
+							if (maxCount <= lists.length) {
+								this.$emit('on-exceed', val, this.lists, this.index);
+								this.showToast('超出最大允许的文件个数');
+								return;
+							}
+							lists.push({
+								url: val.path,
+								progress: 0,
+								error: false,
+								file: val
+							});
+						}
+					});
+					// 每次图片选择完,抛出一个事件,并将当前内部选择的图片数组抛出去
+					this.$emit('on-choose-complete', this.lists, this.index);
+					if (this.autoUpload) this.uploadFile(listOldLength);
+				})
+				.catch(error => {
+					this.$emit('on-choose-fail', error);
+				});
+		},
+		// 提示用户消息
+		showToast(message, force = false) {
+			if (this.showTips || force) {
+				uni.showToast({
+					title: message,
+					icon: 'none'
+				});
+			}
+		},
+		// 该方法供用户通过ref调用,手动上传
+		upload() {
+			this.uploadFile();
+		},
+		// 对失败的图片重新上传
+		retry(index) {
+			this.lists[index].progress = 0;
+			this.lists[index].error = false;
+			this.lists[index].response = null;
+			uni.showLoading({
+				title: '重新上传'
+			});
+			this.uploadFile(index);
+		},
+		// 上传图片
+		async uploadFile(index = 0) {
+			if (this.disabled) return;
+			if (this.uploading) return;
+			// 全部上传完成
+			if (index >= this.lists.length) {
+				this.$emit('on-uploaded', this.lists, this.index);
+				return;
+			}
+			// 检查是否是已上传或者正在上传中
+			if (this.lists[index].progress == 100) {
+				if (this.autoUpload == false) this.uploadFile(index + 1);
+				return;
+			}
+			// 执行before-upload钩子
+			if(this.beforeUpload && typeof(this.beforeUpload) === 'function') {
+				// 执行回调,同时传入索引和文件列表当作参数
+				// 在微信,支付宝等环境(H5正常),会导致父组件定义的customBack()函数体中的this变成子组件的this
+				// 通过bind()方法,绑定父组件的this,让this.customBack()的this为父组件的上下文
+				// 因为upload组件可能会被嵌套在其他组件内,比如u-form,这时this.$parent其实为u-form的this,
+				// 非页面的this,所以这里需要往上历遍,一直寻找到最顶端的$parent,这里用了this.$u.$parent.call(this)
+				// 明白意思即可,无需纠结this.$u.$parent.call(this)的细节
+				let beforeResponse = this.beforeUpload.bind(this.$u.$parent.call(this))(index, this.lists);
+				// 判断是否返回了promise
+				if (!!beforeResponse && typeof beforeResponse.then === 'function') {
+					await beforeResponse.then(res => {
+						// promise返回成功,不进行动作,继续上传
+					}).catch(err => {
+						// 进入catch回调的话,继续下一张
+						return this.uploadFile(index + 1);
+					})
+				} else if(beforeResponse === false) {
+					// 如果返回false,继续下一张图片的上传
+					return this.uploadFile(index + 1);
+				} else {
+					// 此处为返回"true"的情形,这里不写代码,就跳过此处,继续执行当前的上传逻辑
+				}
+			}
+			// 检查上传地址
+			if (!this.action) {
+				this.showToast('请配置上传地址', true);
+				return;
+			}
+			this.lists[index].error = false;
+			this.uploading = true;
+			// 创建上传对象
+			const task = uni.uploadFile({
+				url: this.action,
+				filePath: this.lists[index].url,
+				name: this.name,
+				formData: this.formData,
+				header: this.header,
+				// #ifdef MP-ALIPAY
+				fileType:'image',
+				// #endif
+				success: res => {
+					// 判断是否json字符串,将其转为json格式
+					let data = this.toJson && this.$u.test.jsonString(res.data) ? JSON.parse(res.data) : res.data;
+					if (![200, 201, 204].includes(res.statusCode)) {
+						this.uploadError(index, data);
+					} else {
+						
+						// 上传成功
+						this.lists[index].response = data;
+						this.lists[index].progress = 100;
+						this.lists[index].error = false;
+						this.$forceUpdate()
+						this.$emit('on-success', data, index, this.lists, this.index);
+					}
+				},
+				fail: e => {
+					this.uploadError(index, e);
+				},
+				complete: res => {
+					uni.hideLoading();
+					this.uploading = false;
+					this.uploadFile(index + 1);
+					this.$emit('on-change', res, index, this.lists, this.index);
+				}
+			});
+			task.onProgressUpdate(res => {
+				if (res.progress > 0) {
+					this.lists[index].progress = res.progress;
+					this.$emit('on-progress', res, index, this.lists, this.index);
+				}
+			});
+		},
+		// 上传失败
+		uploadError(index, err) {
+			this.lists[index].progress = 0;
+			this.lists[index].error = true;
+			this.lists[index].response = null;
+			this.$emit('on-error', err, index, this.lists, this.index);
+			this.showToast('上传失败,请重试');
+		},
+		// 删除一个图片
+		deleteItem(index) {
+			uni.showModal({
+				title: '提示',
+				content: '您确定要删除此项吗?',
+				success: async (res) => {
+					if (res.confirm) {
+						// 先检查是否有定义before-remove移除前钩子
+						// 执行before-remove钩子
+						if(this.beforeRemove && typeof(this.beforeRemove) === 'function') {
+							// 此处钩子执行 原理同before-remove参数,见上方注释
+							let beforeResponse = this.beforeRemove.bind(this.$u.$parent.call(this))(index, this.lists);
+							// 判断是否返回了promise
+							if (!!beforeResponse && typeof beforeResponse.then === 'function') {
+								await beforeResponse.then(res => {
+									// promise返回成功,不进行动作,继续上传
+									this.handlerDeleteItem(index);
+								}).catch(err => {
+									// 如果进入promise的reject,终止删除操作
+									this.showToast('已终止移除');
+								})
+							} else if(beforeResponse === false) {
+								// 返回false,终止删除
+								this.showToast('已终止移除');
+							} else {
+								// 如果返回true,执行删除操作
+								this.handlerDeleteItem(index);
+							}
+						} else {
+							// 如果不存在before-remove钩子,
+							this.handlerDeleteItem(index);
+						}
+					}
+				}
+			});
+		},
+		// 执行移除图片的动作,上方代码只是判断是否可以移除
+		handlerDeleteItem(index) {
+			// 如果文件正在上传中,终止上传任务,进度在0 < progress < 100则意味着正在上传
+			if (this.lists[index].progress < 100 && this.lists[index].progress > 0) {
+				typeof this.lists[index].uploadTask != 'undefined' && this.lists[index].uploadTask.abort();
+			}
+			this.lists.splice(index, 1);
+			this.$forceUpdate();
+			this.$emit('on-remove', index, this.lists, this.index);
+			this.showToast('移除成功');
+		},
+		// 用户通过ref手动的形式,移除一张图片
+		remove(index) {
+			// 判断索引的合法范围
+			if (index >= 0 && index < this.lists.length) {
+				this.lists.splice(index, 1);
+				this.$emit('on-list-change', this.lists, this.index);
+			}
+		},
+		// 预览图片
+		doPreviewImage(url, index) {
+			if (!this.previewFullImage) return;
+			const images = this.lists.map(item => item.url || item.path);
+			uni.previewImage({
+				urls: images,
+				current: url,
+				success: () => {
+					this.$emit('on-preview', url, this.lists, this.index);
+				},
+				fail: () => {
+					uni.showToast({
+						title: '预览图片失败',
+						icon: 'none'
+					});
+				}
+			});
+		},
+		// 判断文件后缀是否允许
+		checkFileExt(file) {
+			// 检查是否在允许的后缀中
+			let noArrowExt = false;
+			// 获取后缀名
+			let fileExt = '';
+			const reg = /.+\./;
+			// 如果是H5,需要从name中判断
+			// #ifdef H5
+			fileExt = file.name.replace(reg, "").toLowerCase();
+			// #endif
+			// 非H5,需要从path中读取后缀
+			// #ifndef H5
+			fileExt = file.path.replace(reg, "").toLowerCase();
+			// #endif
+			// 使用数组的some方法,只要符合limitType中的一个,就返回true
+			noArrowExt = this.limitType.some(ext => {
+				// 转为小写
+				return ext.toLowerCase() === fileExt;
+			})
+			if(!noArrowExt) this.showToast(`不允许选择${fileExt}格式的文件`);
+			return noArrowExt;
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+@import '../../libs/css/style.components.scss';
+.file{
+	    padding-right: 40px;
+}
+.u-upload {
+	@include vue-flex;
+	    flex-direction: column;
+	    flex-wrap: wrap;
+	    align-items: flex-start;
+}
+
+.u-list-item {
+	//width: 200rpx;
+	height: 200rpx;
+	overflow: hidden;
+	margin: 10rpx;
+	background: rgb(244, 245, 246);
+	position: relative;
+	border-radius: 10rpx;
+	/* #ifndef APP-NVUE */
+	display: flex;
+	/* #endif */
+	align-items: center;
+	width: 80%;
+	justify-content: flex-start;
+}
+
+.u-preview-wrap {
+	border: 1px solid rgb(235, 236, 238);
+	
+}
+
+.u-add-wrap {
+	flex-direction: column;
+	color: $u-content-color;
+	font-size: 26rpx;
+}
+
+.u-add-tips {
+	margin-top: 20rpx;
+	line-height: 40rpx;
+	display: flex;
+}
+
+.u-add-wrap__hover {
+	background-color: rgb(235, 236, 238);
+}
+
+.u-preview-image {
+	display: block;
+	width: 100%;
+	height: 100%;
+	border-radius: 10rpx;
+}
+
+.u-delete-icon {
+	position: absolute;
+	top: 10rpx;
+	right: 10rpx;
+	z-index: 10;
+	background-color: $u-type-error;
+	border-radius: 100rpx;
+	width: 44rpx;
+	height: 44rpx;
+	@include vue-flex;
+	align-items: center;
+	justify-content: center;
+}
+
+.u-icon {
+	@include vue-flex;
+	align-items: center;
+	justify-content: center;
+}
+
+.u-progress {
+	position: absolute;
+	bottom: 10rpx;
+	left: 8rpx;
+	right: 8rpx;
+	z-index: 9;
+	width: auto;
+}
+
+.u-error-btn {
+	color: #ffffff;
+	background-color: $u-type-error;
+	font-size: 20rpx;
+	//padding: 4px 0;
+	  min-width: 20px;
+	text-align: center;
+	//position: absolute;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	z-index: 9;
+	line-height: 1;
+}
+
+.u-primary-btn {
+	background-color: #59ba73;
+}
+.u-warning-btn {
+	background-color: #e6a23c;
+}
+.u-error-btn2 {
+	color: #ffffff;
+	
+	font-size: 20rpx;
+	//padding: 4px 0;
+	text-align: center;
+	    min-width: 20px;
+	//position: absolute;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	z-index: 9;
+	line-height: 1;
+}
+</style>