zhengkaixin 2 gadi atpakaļ
vecāks
revīzija
a1c0936817

+ 66 - 0
src/apis/Oa/doc.js

@@ -0,0 +1,66 @@
+import request from '@/utils/request'
+import Qs from 'qs';
+
+//提交
+export function add(data) {
+	
+	return request({
+		url: '/mobile/doc/add' ,
+		data: data,
+		method: 'post',
+		headers: {
+		    "Content-Type": "application/json"
+		}
+	})
+}
+
+export function update(data) {
+	return request({
+		url: '/mobile/doc/update' ,
+		data: data,
+		method: 'post',
+		headers: {
+		    "Content-Type": "application/json"
+		}
+	})
+}
+
+
+export function pageList(data) {
+	return request({
+		url: '/mobile/doc/pageList' ,
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+export function edit(data) {
+	return request({
+		url: '/mobile/doc/edit/'+data ,
+		//data: Qs.stringify(data),
+		method: 'get',
+	})
+}
+
+
+export function findDepartmentAndPerson(data) {
+	var url= '/mobile/doc/findDepartmentAndPerson/'
+	if(data){
+		 url= '/mobile/doc/findSecondDepartmentAndPerson/'
+	}
+	return request({
+		url: url ,
+		data: Qs.stringify({
+			companyId:data
+		}),
+		method: 'post',
+	})
+}
+
+export function findDocName(data) {
+	return request({
+		url: '/mobile/doc/findDocName/' ,
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}

+ 8 - 6
src/utils/request.js

@@ -13,13 +13,9 @@ import {
 axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'
 
 //检测是否可以访问通
-var baseApiList = [process.env.VUE_APP_BACKEND_URL, process.env.VUE_APP_MIRROR_BACKEND_URL];
+var baseApiList = [process.env.VUE_APP_BACKEND_URL];
+
 
-if (process.env.VUE_APP_NODE_NAME == 'devlopment') {			
-	//baseApiList = ['http://192.168.77.162:8086/jp-housekeeper-server/']
-	//baseApiList = ['http://127.0.0.1:8086/jp-housekeeper-server/']
-	
-}
 var apiTypeIndex = 0;
 var checkApiGetBackendUrl = function(index) {
 	$.ajax({
@@ -59,6 +55,12 @@ checkApiGetBackendUrl(apiTypeIndex);
 store.commit('SET_API_TYPE', baseApiList[apiTypeIndex]);
 var BACKEND_URL = baseApiList[apiTypeIndex];
 
+if (process.env.VUE_APP_NODE_NAME == 'devlopment') {			
+	//baseApiList = ['http://192.168.77.162:8086/jp-housekeeper-server/']
+	//baseApiList = ['http://127.0.0.1:8086/jp-housekeeper-server/']
+	BACKEND_URL="http://192.168.33.220:8086/jp-housekeeper-server/";
+}
+
 // 创建axios实例
 const service = axios.create({
 	baseURL: BACKEND_URL,

+ 445 - 355
src/views-oa/Document/ExamineDetail.vue

@@ -1,368 +1,458 @@
-<template>
-	
-	
-		<div style="padding-bottom: 10px;" >
-			<loading :visible="isLoading"></loading>
-			
-			<div class="mui-loading z-loadingDiv" v-show="showPerson">
-				<div>
-					<Person ></Person>
-				</div>
-			</div >
-			
-			<div v-show="!showPerson">
-				<div class="mui-content-padded" >
-					<h5>审核记录 
-						<span v-show="view&&!edit">修改流程</span>
-						<span  v-show="view&&edit" >取消修改</span>
-					</h5>
-				</div>
-				<div class="vongi-slot" style="padding-bottom: 10px;">
-						
-					<template v-for="(item,i) in examineDetail.examineList" >
-						
-						<div class="vongi-slot-block" :key="i">
-							<!-- 单人展示单人 -->
-							<!-- 多人展示单人 -->
-							<!-- 多人展示多人 -->
-							<div class="vongi-slot-img"
-								v-if="item.source==1">
-								
-								<img v-for="(item1,j) in item.examinePersonDetailDTOList" :key="j" :src="item1.faceImageUrl+'?x-oss-process=image/resize,h_800,m_lfit'">
-								
-								
-								<img v-if="item.examinePersonDetailDTOList.length==0" src="@/assets/img/default_face.png" >
-							</div>
-							
-							<div class="vongi-slot-img" v-else>
-								<img src="@/assets/img/team.png">
-							</div>
-				
-				
-							<div class="vongi-slot-content">
-								<h4>{{item.desc}}
-								<span class="mui-pull-right mui-h5 color999">{{item.finishTime}}</span>
-								
-								<span v-if="operationBool&&(item.action!=2)"
-								  @click="editbtn(i,item.examinePersonDetailDTOList)" 
-								 class=" mui-h5 color-bule">修改</span> 
-								
-								<span v-if="operationBool&&(item.action==0)"
-								class="mui-pull-right mui-h5 " style="color: red;"  @click="delbtn(i)" >删除</span>
-								
-								 <span class="mui-pull-right mui-h5" 
-								 v-if="operationBool&&(item.action!=2)"
-								 v-show="i!=examineDetail.examineList.length-1"
-								  @click="addExamineBtn(i)" >向下添加  </span> 
-									
-								</h4>
-								
-								<template
-									v-if="item.source==1   ">
-									
-									<p v-for="(item1,j) in item.examinePersonDetailDTOList" :key="'a'+j">{{item1.name}}
-										<span :class="getClass(item1,i)">{{item1.remark}}</span>
-									</p>
-									<ul class="mui-table-view mui-grid-view mui-grid-9 flex ">
-									</ul>
-								</template>
-								
-								<template v-else>
-									<p>{{item.operation=='or'?'或签':''}}{{item.operation=='and'?'会签':''}}{{item.examinePersonDetailDTOList.length}}人
-										<span :class="getClass(item,i)"  >{{item.actionName}} </span>
-									</p>
-									<ul class="mui-table-view mui-grid-view mui-grid-9 flex ">
-				
-				
-										<li class="mui-table-view-cell mui-media"
-											v-for="(item1,j) in item.examinePersonDetailDTOList"  :key="'c'+j">
-											<div class="flex">
-												<img :src="item1.faceImageUrl+'?x-oss-process=image/resize,h_800,m_lfit'" />
-												<i class="iconfont icon-gou" v-if="item1.action=='1'"></i>
-												<i class="iconfont icon-chacha" v-if="item1.action=='2'"></i>
-											</div>
-											<div class="mui-media-body">{{item1.name}}</div>
-										</li>
-									</ul>
-									<p v-for="(item1,j) in item.examinePersonDetailDTOList" 
-									style=" background-color: #EBEBEE;"
-									:key="'a'+j" v-if="item1.action!='0'">{{item1.name}}:
-										<span :class="getClass(item1,i)">{{item1.remark}}</span>
-									</p>
-								</template>
-				
-							</div>
-							 
-						</div>
-						
-						
-				
-						<div class="vongi-slot-block" v-if="item.action=='1'&&item.ccPersonDetailDTOList.length"  :key="'e'+i" >
-							<div class="vongi-slot-img"><img src="@/assets/img/icon_chaosong.png"></div>
-							<div class="vongi-slot-content">
-								<h4>抄送人</h4>
-								<p>已抄送{{item.ccPersonDetailDTOList.length}}人</p>
-								<ul class="mui-table-view mui-grid-view mui-grid-9 flex ">
-									<li class="mui-table-view-cell mui-media" v-for="(item1,j) in item.ccPersonDetailDTOList"  :key="'f'+j">
-										<div class="flex">
-											<img :src="item1.faceImageUrl+'?x-oss-process=image/resize,h_800,m_lfit'" />
-										</div>
-										<div class="mui-media-body">{{item1.name}}</div>
-									</li>
-				
-								</ul>
-							</div>
-						</div>
-				
-					</template>
-				
-					</div> 
-					
-					<div  class="addbtn" style="text-align: center;" v-if="operationBool" >
-						<button class="btn1 mui-btn mui-btn-primary" @click="addExamineBtn(-1)">添加流程</button>
-						
-						<button class="btn1 mui-btn mui-btn-primary" v-show="view&&edit" >保存</button>
-						
-					</div>
-			</div>
-				
-		</div>
-</template>
-
-<script>
-		//import * as API_sp from '@/apis-xsy/xsy'
+<template>
+
+
+	<div style="padding-bottom: 10px;">
+		<loading :visible="isLoading"></loading>
+
+		<div class="mui-loading z-loadingDiv" v-show="showPerson">
+			<div>
+				<Person ref="PersonSelect" @confirm="personConfirm" :selectObj="selectObj"></Person>
+			</div>
+		</div>
+
+		<div v-show="!showPerson">
+			<div class="mui-content-padded">
+				<h5>审核记录
+					<span v-show="view&&!edit"  @click="edit=true" style="
+							float: right;
+							color: #3385FF;
+						" >修改流程</span>
+					<span v-show="view&&edit" @click="edit=false"  style="
+						float: right;
+						color: #3385FF;
+					" >取消修改</span>
+				</h5>
+			</div>
+			<div class="vongi-slot" style="padding-bottom: 10px;">
+
+				<template v-for="(item,i) in examineDetail.examineStepDTOList">
+
+					<div class="vongi-slot-block" :key="i" v-if="item.examineStep.stepType==1">
+						<!-- 单人展示单人 -->
+						<!-- 多人展示单人 -->
+						<!-- 多人展示多人 -->
+						<div class="vongi-slot-img" v-if="item.examineStep.examineType=='single'">
+
+							<img v-for="(item1,j) in item.stepPersonList" :key="j"
+								:src="item1.auditorImage+'?x-oss-process=image/resize,h_800,m_lfit'">
+
+
+							<img v-if="item.stepPersonList.length==0" src="@/assets/img/default_face.png">
+						</div>
+
+						<div class="vongi-slot-img" v-else>
+							<img src="@/assets/img/team.png">
+						</div>
+
+
+						<div class="vongi-slot-content">
+							<h4>第{{i+1}}步 
+								<span :class="getClass(item.examineStep,i)">{{getClassText(item.examineStep)}} </span>
+								
+								<span class="mui-pull-right mui-h5 color999">{{item.examineStep.checkTime}}</span>
+
+								<span
+									v-if="operationBool&&(item.examineStep.examineStatus==0||item.examineStep.examineStatus==1)"
+									@click="editbtn(i)" class=" mui-h5 color-bule">修改</span>
+
+								<span v-if="operationBool&&(item.examineStep.examineStatus==0)"
+									class="mui-pull-right mui-h5 " style="color: red;" @click="delbtn(i)">删除</span>
+
+								<span class="mui-pull-right mui-h5"
+									v-if="operationBool&&(item.examineStep.examineStatus==0||item.examineStep.examineStatus==1)"
+									v-show="i!=examineDetail.examineStepDTOList.length-1" @click="addExamineBtn(i)">向下添加
+								</span>
+
+							</h4>
+
+							<template v-if="item.examineStep.examineType=='single'">
+
+								<p v-for="(item1,j) in item.stepPersonList" :key="'a'+j">{{item1.auditorName}}
+									<span :class="getClass(item1,i)">{{item1.opinion}}  </span>
+								</p>
+								<ul class="mui-table-view mui-grid-view mui-grid-9 flex ">
+								</ul>
+							</template>
+
+							<template v-else>
+								<p>{{item.examineStep.examineType=='or'?'或签':''}}{{item.examineStep.examineType=='and'?'会签':''}}{{item.stepPersonList.length}}人
+									<span :class="getClass(item,i)">{{item.examineStep.examineStatusName}} </span>
+								</p>
+								<ul class="mui-table-view mui-grid-view mui-grid-9 flex ">
+
+
+									<li class="mui-table-view-cell mui-media" v-for="(item1,j) in item.stepPersonList"
+										:key="'c'+j">
+										<div class="flex">
+											<img :src="item1.auditorImage+'?x-oss-process=image/resize,h_800,m_lfit'" />
+											<i class="iconfont icon-gou" v-if="item1.status=='2'"></i>
+											<i class="iconfont icon-chacha" v-if="item1.status=='3'"></i>
+										</div>
+										<div class="mui-media-body">{{item1.auditorName}}</div>
+									</li>
+								</ul>
+								<p v-for="(item1,j) in item.stepPersonList" style=" background-color: #EBEBEE;"
+									:key="'a'+j" v-if="item1.status&&item1.status!=0">{{item1.auditorName}}:
+									<span :class="getClass(item1,i)">{{item1.opinion}}</span>
+								</p>
+							</template>
+
+						</div>
+
+					</div>
+
+				</template>
+				<div class="vongi-slot-block">
+					<div class="vongi-slot-img"><img src="@/assets/img/icon_chaosong.png"></div>
+					<div class="vongi-slot-content">
+						<h4>抄送人
+							<span v-if="operationBool" @click="editbtn('view')" class=" mui-h5 color-bule">修改</span>
+
+						</h4>
+						<p>抄送{{ccPersonList.length}}人</p>
+						<ul class="mui-table-view mui-grid-view mui-grid-9 flex ">
+							<li class="mui-table-view-cell mui-media" v-for="(item1,j) in ccPersonList" :key="'f'+j">
+								<div class="flex">
+									<img :src="item1.auditorImage+'?x-oss-process=image/resize,h_800,m_lfit'" />
+								</div>
+								<div class="mui-media-body">{{item1.auditorName}}</div>
+							</li>
+
+						</ul>
+					</div>
+				</div>
+
+			</div>
+
+			<div class="addbtn" style="text-align: center;" v-if="operationBool">
+				<button class="btn1 mui-btn mui-btn-primary" @click="addExamineBtn(-1)">添加流程</button>
+
+				<button class="btn1 mui-btn mui-btn-primary" v-show="view&&edit"  @click="save">保存</button>
+
+			</div>
+		</div>
+
+	</div>
+</template>
+
+<script>
+	import * as API from '@/apis/Oa/doc'
 	import Loading from '@/components/Loading.vue'
-	import Person from './Person.vue'
-
-	export default {
-	
-		name: 'examineDetail',
-		data() {
-			return {
-				showPerson:true,
-				isLoading:false,
-				examineDetail: {
-					"examineList2": [],
-					"examineList": [
-						{
-							"finishTime": null,
-							"action": "2",
-							"actionName": "已审核",
-							"remark": "已审核1",
-							"operation": "or",
-							"source": "1",
-							"desc": "审核人",
-							"examinePersonDetailDTOList": [
-								
-								{
-									"personId": 49605,
-									"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2021/5/24/75e73e10-0590-45d4-95cb-0731596ead09/1.jpg",
-									"name": "付龙龙",
-									"type": "1",
-									"action": "1",
-									"remark": "已审核2"
-								}
-							],
-							"ccPersonDetailDTOList": []
-						},
-						{
-							"finishTime": null,
-							"action": "1",
-							"actionName": "待审核",
-							"remark": "待审核",
-							"operation": "or",
-							"source": "0",
-							"desc": "审核人",
-							"examinePersonDetailDTOList": [
-								{
-									"personId": 49881,
-									"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2021/5/31/f29e6b9d-80a4-451a-a0e7-294c3f5a4b4b/1.jpg",
-									"name": "郑开鑫",
-									"type": "1",
-									"action": "1",
-									"remark": "待审核"
-								},
-								{
-									"personId": 49605,
-									"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2021/5/24/75e73e10-0590-45d4-95cb-0731596ead09/1.jpg",
-									"name": "付龙龙",
-									"type": "1",
-									"action": "2",
-									"remark": "待审核"
-								}
-							],
-							"ccPersonDetailDTOList": []
-						},
-						{
-							"finishTime": null,
-							"action": "0",
-							"actionName": "待审核",
-							"remark": "待审核",
-							"operation": "or",
-							"source": "0",
-							"desc": "审核人",
-							"examinePersonDetailDTOList": [
-								{
-									"personId": 49881,
-									"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2021/5/31/f29e6b9d-80a4-451a-a0e7-294c3f5a4b4b/1.jpg",
-									"name": "郑开鑫",
-									"type": "1",
-									"action": "0",
-									"remark": "待审核"
-								},
-								{
-									"personId": 49605,
-									"faceImageUrl": "http://oss.xiaoxinda.com/smart/person/2021/5/24/75e73e10-0590-45d4-95cb-0731596ead09/1.jpg",
-									"name": "付龙龙",
-									"type": "1",
-									"action": "0",
-									"remark": "待审核"
-								}
-							],
-							"ccPersonDetailDTOList": []
-						}
-					],
-					"allowExamine": true,
-					"procinstActUserId": "726dead5-1d0d-4d27-afef-94166bb2d119",
-					"ownerSubmit": true
-				},
-				only: "test"
-
-			}
-		},
-		components: {
-		
-			Loading,Person
-		
-		},
-		props: {
-			id: {
-				require: false,
-				default: '',
-			},
-			//编辑状态
-			edit: {
-				require: false,
-				default: true,
-			},
-			//是否只能查看
-			view: {
-				require: false,
-				default: false,
-			},
-		},
-		computed:{
-			operationBool(){
-				return this.edit
-			}
-		},
+	import Person from './Person.vue'
+
+	export default {
+
+		name: 'examineDetail',
+		data() {
+			return {
+				showPerson: false,
+				selectIndex: 0,
+				selectIndexBl: true, // 添加 、 修改
+				selectObj: {
+					examineStep: {},
+					stepPersonList: []
+				},
+				isLoading: false,
+				ccPersonList: [],
+				examineDetail: {
+					examineStepDTOList: [],
+
+				},
+				only: "test"
+
+			}
+		},
+		components: {
+
+			Loading,
+			Person
+
+		},
+		props: {
+			list: {
+				require: false,
+				default: false,
+			},
+			//编辑状态
+			edit: {
+				require: false,
+				default: true,
+			},
+			//是否只能查看
+			view: {
+				require: false,
+				default: false,
+			},
+		},
+		computed: {
+			operationBool() {
+				return this.edit
+			}
+		},
 		methods: {
-			editbtn(i,list){
-				
-			},
-			delbtn(i){
-				
-			},
-			addExamineBtn(i){
-				// var obj={
-				// 	source:1,
-				// 	desc:"审批人",
-				// 	operation:"or",
-				// 	examinePersonDetailDTOList:[],
-				// 	ccPersonDetailDTOList:[],
-				// }
-				// if(type){
-				// 	obj.source=0
-				// 	obj.operation=type
-				// }
-				// if(i==-1){
-				// 	this.examineDetail.examineList.push(obj)
-				// }else{
-					
-				// }
-			},
-			getClass(ac, i) {
-				var reclass = ""
+			save(){
+				this.isLoading = true;
+				this.list.examineStepDTOList=this.getData();
 				
-				if (ac.action == "0") {
-					if (this.only == "test") {
-
-						this.only = i;
-					}
-					if (this.only == i) {
-						return "color3385FF"
-					} else {
-						return "mui-hidden"
-					}
+				API.update(this.list).then(response => {
+					this.isLoading = false;
+					this.init();
+					mui.toast("保存成功");
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			},
+			getData() {
+				var list = this.examineDetail.examineStepDTOList;
+
+				//添加抄送
+				var sp = true;
 
+				var viewindex=-1;
+				var viewObj = {
+					examineStep: {
+						examineStatus: 0,
+						examineType: "view",
+						stepType: 2,
+					},
+					stepPersonList: this.ccPersonList
+				}
+				for (var i in list) {
+					var obj = list[i];
+					if (obj.examineStep.stepType == 2) {
+						viewindex=i;
+					} else {
+						sp = false
+					}
 				}
-
-				if (ac.action == "3" || ac.action == "2") {
-					return "colorfe616c"
+				if(viewindex!=-1){
+					list.splice(viewindex,1);
 				}
-
-				if (ac.action == "1" || ac.action == "4") {
+				if(this.ccPersonList.length){
+					list.push(viewObj)
+				}
+				
+				
+				if (sp) {
+					//如果没有选择审批人, 返回为空
+					return []
+				}
+
+
+				for (var i in list) {
+					var obj = list[i];
+					obj.examineStep.examineStep = parseInt(i)+1;
+					for (var j in obj.stepPersonList) {
+						var obj2 = obj.stepPersonList[j];
+						obj2.sortNo = parseInt(j)+1;
+					}
+
+				}
+				return list;
+			},
+			personConfirm(obj) {
+				this.showPerson = false;
+				if (obj.status) {
+					if (this.selectIndex == 'view') {
+						this.ccPersonList = obj.selectObj.stepPersonList;
+					} else if (this.selectIndexBl) {
+						if (this.selectIndex == -1) {
+							this.examineDetail.examineStepDTOList.push(obj.selectObj)
+						} else {
+							this.examineDetail.examineStepDTOList.splice(this.selectIndex, 0, obj.selectObj)
+						}
+					} else {
+						this.examineDetail.examineStepDTOList[this.selectIndex] = obj.selectObj
+
+					}
+				}
+				console.log(this.examineDetail)
+			},
+			editbtn(i) {
+				this.selectIndex = i
+				if (i == 'view') {
+					this.selectObj = {
+						examineStep: {
+							examineStatus: 0,
+							examineType: "view",
+							stepType: 2,
+						},
+						stepPersonList: this.ccPersonList
+					};
+
+				} else {
+					this.selectObj = this.examineDetail.examineStepDTOList[this.selectIndex]
+
+				}
+
+				this.selectIndexBl = false
+				this.showPerson = true
+				console.log(this.selectObj)
+				this.$refs.PersonSelect.init(this.selectObj)
+			},
+			delbtn(i) {
+				this.examineDetail.examineStepDTOList.splice(i, 1)
+			},
+
+			addExamineBtn(i) {
+
+				this.selectObj = {
+					examineStep: {
+						examineStatus: 0,
+						examineType: "single",
+						stepType: 1,
+					},
+					stepPersonList: []
+				};
+				this.selectIndex = i
+				this.selectIndexBl = true
+				this.showPerson = true
+				console.log(this.selectObj)
+				this.$refs.PersonSelect.init(this.selectObj)
+			},getClassText(ac, i) {
+				var reclass = ""
+				if(ac.examineStatus==null){
+					ac.examineStatus=ac.status
+				}
+				if (ac.examineStatus == "0") {
+					return ""
+
+				}
+				if (ac.examineStatus == "1" ) {
+					return "审批中"
+				}
+				if (ac.examineStatus == "2") {
+					return "已同意"
+				}
+				
+				if ( ac.examineStatus == "3") {
+					return "已拒绝"
+				}
+
+				
+				return reclass
+			},
+			getClass(ac, i) {
+				var reclass = ""
+				if(ac.examineStatus==null){
+					ac.examineStatus=ac.status
+				}
+				if (ac.examineStatus == "0") {
+					return "mui-hidden"
+
+				}
+				if (ac.examineStatus == "1" ) {
+					return "color3385FF"
+				}
+				if (ac.examineStatus == "2") {
 					return "color389E0D"
 				}
-				return reclass
+				
+				if ( ac.examineStatus == "3") {
+					return "colorfe616c"
+				}
+
+				
+				return reclass
+			},
+			getExamineDetail() {
+				API_sp.examineDetail(this.id).then(response => {
+					this.examineDetail = response
+
+					this.$emit('getOwnerSubmit', response.ownerSubmit);
+
+					this.$emit('allowExamine', response.procinstActUserId);
+				}).catch(error => {
+
+					mui.toast(error);
+				})
 			},
-			getExamineDetail() {
-				API_sp.examineDetail(this.id).then(response => {
-					this.examineDetail = response
+			init(){
+				if(this.list){
+					console.log(this.list)
+					var list=this.list.examineStepDTOList;
+					var sz=[];
+					 
+					for (var i in list) {
+						var obj = list[i];
+						// for (var j in obj.stepPersonList) {
+						// 		var obj2 = obj.stepPersonList[j];
+						// 		obj2.id = obj2.personId;
+						// 		obj2.spStatus=obj2.status
+						// 		obj2.faceImageUrl=obj2.auditorImage
+						// 		obj2.name=obj2.auditorName
+						// }
+						if(obj.examineStep.stepType==2){
+							 
+							this.ccPersonList=obj.stepPersonList;
+							continue;//会签不添加
+						}
+						sz.push(obj)
+					}
+					sz.sort(function(a,b){
+						return a.examineStep.examineStep-b.examineStep.examineStep
+					})
 					
-					this.$emit('getOwnerSubmit', response.ownerSubmit);
 					
-					this.$emit('allowExamine', response.procinstActUserId);
-				}).catch(error => {
-
-					mui.toast(error);
-				})
-			},
-		},
-		mounted() {
+					this.examineDetail.examineStepDTOList=sz ;
+					console.log(this.examineDetail)
+				}
+			}
+		},
+		mounted() {
 			//	this.getExamineDetail();
-		}
-	}
-</script>
-
-<style src="@/assets/css/iconfont.css"></style>
-<style scoped src="@/assets/css/xpwyfyy-oa.css"></style>
-<style src="@/assets/css/xsy.css"></style>
-<style scoped>
-	.color3385FF {
-		color: #3385FF
-	}
-
-	.color389E0D {
-		color: #389E0D
-	}
-	.mui-content-padded{
-		margin:0 !important;
-		border-top: 1px solid #f4f4f6 ;
-	}
-	.addbtn{
-		text-align: center;
-	}
-	.mui-pull-right{
-		padding-left: 5px;
-	}
-	.btn1,.btn2,.btn3{
-		padding: 3px 8px;
-		margin-right: 2px;
-	}
-	.z-loadingDiv {
-		position: absolute;
-		top: 0;
-		left: 0;
-		width: 100%;
-		height: 100%;
-		background: rgb(255, 255, 255);
-		z-index: 999;
-	}
-	
-	.z-loadingDiv div {
-		/* top: 40%;
-		position: absolute;
-		left: 40% */
-	}
+			this.init()
+			
+		}
+	}
+</script>
+
+<style src="@/assets/css/iconfont.css"></style>
+<style scoped src="@/assets/css/xpwyfyy-oa.css"></style>
+<style src="@/assets/css/xsy.css"></style>
+<style scoped>
+	.color3385FF {
+		color: #3385FF
+	}
+
+	.color389E0D {
+		color: #389E0D
+	}
+
+	.mui-content-padded {
+		margin: 0 !important;
+		border-top: 1px solid #f4f4f6;
+	}
+
+	.addbtn {
+		text-align: center;
+	}
+
+	.mui-pull-right {
+		padding-left: 5px;
+	}
+
+	.btn1,
+	.btn2,
+	.btn3 {
+		padding: 3px 8px;
+		margin-right: 2px;
+	}
+
+	.z-loadingDiv {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		background: rgb(255, 255, 255);
+		z-index: 999;
+	}
+
+	.z-loadingDiv div {
+		/* top: 40%;
+		position: absolute;
+		left: 40% */
+	}
 </style>

+ 39 - 126
src/views-oa/Document/Form.vue

@@ -9,7 +9,7 @@
 			<div class="mui-content-padded">
 				<form class="mui-input-group">
 					<div class="mui-input-row">
-						<label><span class="colorfe616c">*</span>请假类型</label>
+						<label><span class="colorfe616c">*</span>文件类型</label>
 						<div class="mui-navigate-right" @click="selectType">
 							<button class="mui-btn mui-btn-block" type='button' v-text="typeName">请选择</button>
 						</div>
@@ -33,7 +33,7 @@
 			<div class="mui-input-row">
 				<textarea id="textarea"
 				 
-				 rows="3" v-model="tjForm.reason" placeholder="请填写文件标题"></textarea>
+				 rows="3" v-model="tjForm.docTitle" placeholder="请填写文件标题"></textarea>
 			</div>
 		</div>
 			<div class="mui-content-padded" style="padding-bottom:20px">
@@ -50,7 +50,7 @@
 			</div>
 		</div>
 		<div class="mui-content vongi-wordcard" style=" background-color: #ffffff;margin-top: 10px;    padding-top: 0px;">
-			<examineDetail :edit="true"   ></examineDetail>	
+			<examineDetail :edit="true"  ref="examineDetail"   ></examineDetail>	
 		</div>
 
 			
@@ -68,7 +68,8 @@
 
 <script>
 	require('@/assets/js/mui.picker.min.js');
-	import * as API_Leave from '@/apis/Master/leave'
+	
+	import * as API from '@/apis/Oa/doc'
 	import Common from '@/components/Common.vue'
 	import examineDetail from './ExamineDetail.vue'
 	
@@ -96,7 +97,7 @@
 				
 				only: "test",
 				pageTitle: '请假',
-				daytime:'',
+			 
 				isLoading: false,
 				leaveTypeList: [],
  				approvedList: [],
@@ -152,11 +153,12 @@
 			},
 			//审批类型
 			getLeaveTypeList() {
-				API_Leave.leaveTypeList().then(response => {
+				API.findDocName().then(response => {
 
 					for (var i in response) {
 						var mod = response[i]
 						mod.text = mod.name
+						mod.value=mod.id
 						this.leaveTypeList.push(mod)
 					}
 				}).catch(error => {
@@ -250,100 +252,8 @@
 					}
 				}
 			},
-			//选择时间
-			selectStartTime() {
-				var _this = this;
-
-				var startTime = _this.tjForm.startTime == '请选择' ? null : _this.tjForm.startTime;
-
-				var endDate = null;
-
-				if (_this.tjForm.endTime != '请选择') {
-					endDate = new Date(_this.tjForm.endTime);
-				}
-
-				var picker = new mui.DtPicker({
-					"type": "hour",
-					"beginYear": 2020,
-					"endYear": 2040,
-					"endDate": endDate,
-                    "value": startTime,
-
-                    "customData":{"h":[{"text":"上午","value":"0"},{"text":"下午","value":"1"}]}
-
-
-                });
-				var _mui=mui;
-				picker.show(function(selectItems) {
-                    var year = selectItems.y.value;
-                    var month = selectItems.m.value;
-                    var day = selectItems.d.value;
-                    var curDate = year + "-" + month + "-" + day;
-
-                    if(curDate==_this.tjForm.endTime&&_this.tjForm.endTimeQuantum=='0'&&selectItems.h.value=='1'){
-                       
-                        _mui.alert('开始日期必须大于结束日期');
-                        return false;
-                    }
-
-					_this.tjForm.startTime = curDate;
-
-                    _this.tjForm.startTimeQuantum =  selectItems.h.value;
-                    _this.updatePersonByTime();
-                });
-			},
-			//选择时间
-			selectEndTime() {
-
-				var _this = this;
-
-				if (_this.tjForm.startTime == '请选择') {
-					mui.toast('请选择开始日期');
-					return;
-				}
-				var beginDate = new Date(_this.tjForm.startTime);
-                var endTime = _this.tjForm.endTime == '请选择' ? null : _this.tjForm.endTime;
-
-				var picker = new mui.DtPicker({
-					"type": "hour",
-					"beginYear": 2020,
-					"endYear": 2040,
-					"beginDate": beginDate,
-                    "value":endTime,
-
-                    "customData":{"h":[{"text":"上午","value":"0"},{"text":"下午","value":"1"}]}
-                });
-                var _mui=mui;
-				picker.show(function(selectItems) {
-
-                    var year = selectItems.y.value;
-                    var month = selectItems.m.value;
-                    var day = selectItems.d.value;
-                    var curDate = year + "-" + month + "-" + day;
-
-                    if(curDate==_this.tjForm.startTime&&_this.tjForm.startTimeQuantum=='1'&&selectItems.h.value=='0'){
-                     
-                        _mui.alert('结束日期不能小于开始日期');
-                        return false;
-                    }
-
-                    _this.tjForm.endTime = curDate;
-                    _this.tjForm.endTimeQuantum =  selectItems.h.value;
-                    _this.updatePersonByTime();
- 				});
-			},
-			//根据时间 -调整审批人
-			updatePersonByTime(){
-			    if(this.tjForm.startTime=='请选择'||this.tjForm.endTime=='请选择'){
-			        return;
-				}
-              var i=  daysDistance(this.tjForm.startTime,this.tjForm.endTime);
-              var day=i+(this.tjForm.endTimeQuantum-this.tjForm.startTimeQuantum)*0.5+0.5
-				this.daytime=day;
-
-
-
-			},
+			
+			
 			//类型选择
 			selectType() {
 				var picker = new mui.PopPicker();
@@ -351,36 +261,27 @@
 				picker.setData(this.leaveTypeList);
 				var _this = this;
 				picker.show(function(selectItems) {
-					_this.tjForm.leaveType = selectItems[0].value;
+					_this.tjForm.docType = selectItems[0].value;
+					_this.tjForm.typeName= selectItems[0].text;
 					_this.typeName = selectItems[0].text;
 				})
 			},
-            checkWorkOverTime(){
-               return this.daytime*8 <=this.workOverTime;
-			},
+           
 			//表单检测
 			checkFrom() {
-				if (!this.tjForm.leaveType) {
-					mui.toast('请选择请假类型');
-					return false;
-				} else if (!this.tjForm.approvedPersonPopedomId) {
-					mui.toast('请选择审批人');
-					return false;
-				} else if (this.tjForm.startTime== '请选择') {
-					mui.toast('请选择开始日期');
+				if (process.env.VUE_APP_NODE_NAME == 'devlopment') {
+					return true;
+				}
+				if (!this.tjForm.docType) {
+					mui.toast('请选择文件类型');
 					return false;
-				} else if (this.tjForm.endTime== '请选择') {
-					mui.toast('请选择结束日期');
+				} else if (!this.tjForm.docTitle) {
+					mui.toast('请输入文件标题');
 					return false;
-				}else if (this.tjForm.leaveType==4&&!this.checkWorkOverTime()) {
-                    mui.toast("调休剩余时长小于请假时长");
-                    return false;
-                }
-
-				else if (!this.tjForm.reason) {
-					mui.toast('请输入请假理由');
+				}  else if (!this.picList.length) {
+					mui.toast('请上传图片');
 					return false;
-				} else {
+				}else {
 					return true;
 				}
 			},
@@ -397,10 +298,20 @@
 			submit() {
 				this.tjForm.reason = this.tjForm.reason ? this.tjForm.reason : this.reasonDefault;
 				if (this.checkFrom()) {
-					this.tjForm.imageUrl = this.picList.join(',');
+					var data=this.$refs.examineDetail.getData()
+					if(data.length==0){
+						mui.toast("请添加审批流程");
+						return
+					}
+					this.tjForm.docFiles = this.picList.join(',');
 					this.isLoading = true;
-					this.tjForm.days=this.daytime;
-					API_Leave.save(this.tjForm).then(response => {
+					var obj={
+						masterFile:this.tjForm,
+						examineStepDTOList:data
+					}
+					
+					this.tjForm.personId=this.person_data.id
+					API.add(obj).then(response => {
 						this.isLoading = false;
 						mui.toast("提交成功");
 						this.$router.go(-1);
@@ -420,7 +331,7 @@
 		mounted() {
 			//获取微信配置
 			WxJsApi.getWxConfig();
-            this.getPsersonList();
+            //this.getPsersonList();
 
 			this.getLeaveTypeList();
 
@@ -429,6 +340,8 @@
 		destroyed() {},
 		computed: {
 			...mapGetters({
+				person_data: 'person_data',
+				
 				openId: 'wx_openid',
 				token: 'token',
 				default_examine_person: 'default_examine_person'

+ 32 - 50
src/views-oa/Document/Info.vue

@@ -6,42 +6,33 @@
     <div class="mui-content vongi-qingjiadt margin60">
         <div class="vongi-qingjiadt-head flew-sp">
             <div class="flew-items">
-                <div class="flew"><img :src="detail.picUrl" width="50" /></div>
-                <h4 v-text="detail.name+' 申请请假 '+detail.leaveTypeN"></h4>
+                <div class="flew"><img :src="detail.personImage" width="50" /></div>
+                <h4  >{{detail.personName}} 申请 <span style="color: #3385FF;">公文提报</span></h4>
             </div>
-            <button class="mui-btn   mui-btn-outlined" :class="statusColor[detail.status]" v-text="status[detail.status]">已批准</button>
+            <button class="mui-btn   mui-btn-outlined" :class="statusColor[detail.docStatus]" v-text="status[detail.docStatus]">已批准</button>
             <!-- <div class="examine-refuse">已拒绝</div> -->
         </div>
         <form class="mui-input-group margin10">
             <div class="mui-input-row">
-                <label>请假类型</label>
-                <span v-text="detail.leaveTypeN"></span>
-            </div>
-
-            <div class="mui-input-row">
-                <label>请假时间</label>
-
-                <span v-if="detail.startTime==detail.endTime&&detail.startTimeQuantum=='0'&&detail.endTimeQuantum=='1'">自{{detail.startTime}}</span>
-                <span v-else-if="detail.startTime==detail.endTime">自{{detail.startTime}}{{(detail.startTimeQuantum!=''?(detail.startTimeQuantum=='1'?'下午':'上午'):'')}}</span>
-                <span  v-else >自{{detail.startTime}}{{(detail.startTimeQuantum!=''?(detail.startTimeQuantum=='1'?'下午':'上午'):'')}}
-                    <br />至{{detail.endTime}}{{(detail.endTimeQuantum!=''?(detail.endTimeQuantum=='1'?'下午':'上午'):'')}}</span>
-            </div>
-            <div class="mui-input-row">
-                <label>请假时长</label>
-                <span v-text="daytime"></span>
+                <label>公文类型</label>
+                <span v-text="detail.typeName"></span>
             </div>
+			<div class="mui-input-row">
+			    <label>文件标题</label>
+			    <span v-text="detail.docTitle">家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟。</span>
+			</div>
+           
+          
             <div class="mui-input-row">
-                <label>请假事由</label>
-                <span v-text="detail.reason">家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟。</span>
-            </div>
-            <div class="mui-input-row">
-                <label>上传图片</label>
+                <label>图片附件</label>
                 <span class="vongi-qingjiadt-photo">
                     <template v-for="(item,index) in picList">
                         <img :src="item" v-viewer />
                     </template>
                 </span>
             </div>
+			
+			
             <div class="mui-input-row">
                 <label>申请时间</label>
                 <span v-text="detail.createTime">2020-04-27 12:00:00</span>
@@ -50,19 +41,14 @@
 
         </form>
         <div class="vongi-slot">
-            <div v-for="(item,index) in detail.list" class="vongi-slot-block">
-                <div class="vongi-slot-img"><img :src="item.faceImageUrl"></div>
-                <div class="vongi-slot-content">
-                    <h4>审批人{{index+1}}<span class="mui-pull-right mui-h5 color999" v-text="item.time"></span></h4>
-                    <p>{{item.name}} <span class="color55f868" :style="getColor(item.status)" v-text="item.statusN"></span></p>
-                </div>
-            </div>
+           
         </div>
+		<div class="mui-content vongi-wordcard"  v-if="list" style=" background-color: #ffffff;margin-top: 10px;    padding-top: 0px;">
+			<examineDetail :edit="false" :list="list" :view="true" ></examineDetail>	
+		</div>
     </div>
 
-	<div class="mui-content vongi-wordcard" style=" background-color: #ffffff;margin-top: 10px;    padding-top: 0px;">
-		<examineDetail :edit="true" :view="true" ></examineDetail>	
-	</div>
+	
 
     <loading :visible="isLoading"></loading>
 
@@ -70,11 +56,13 @@
 </template>
 
 <script>
-import * as API_Leave from '@/apis/Master/leave'
+import * as API from '@/apis/Oa/doc'
 import Common from '@/components/Common.vue'
 import Loading from '@/components/Loading.vue'
 import TopHeader from '@/components/TopHeader.vue'
 import isReachBottom from '@/utils/isReachBottom'
+	import examineDetail from './ExamineDetail.vue'
+
 import {
     mapGetters,
     mapMutations
@@ -87,17 +75,18 @@ export default {
     components: {
         Common,
         Loading,
-        TopHeader
+        TopHeader,examineDetail
     },
     data() {
         return {
+			list:null,
             pageTitle: '请假详情',
             daytime:'',
             isLoading: false,
             id: this.$route.query.id,
             detail: {},
-            status: ['待审核', '已批准', '已拒绝'],
-            statusColor: ['', 'mui-btn-success', 'mui-btn-danger'],
+            status: ['待审核', '已批准', '已拒绝','已撤销'],
+            statusColor: ['', 'mui-btn-success', 'mui-btn-danger',''],
         }
     },
     created() {
@@ -119,17 +108,10 @@ export default {
         //info
         getDetail() {
             this.isLoading = true;
-            API_Leave.detail({
-                id: this.id
-            }).then(response => {
-                this.detail = response;
-                var startTime=this.detail.startTime.replace('年','/').replace('月','/').replace('日','');
-                var endTime=this.detail.endTime.replace('年','/').replace('月','/').replace('日','');
-
-                var i=  daysDistance(startTime,endTime);
-                var day=i+(this.detail.endTimeQuantum-this.detail.startTimeQuantum)*0.5+0.5
-                this.daytime=day+'天';
-
+            API.edit( this.id).then(response => {
+                this.detail = response.masterFile;
+				this.list=response
+				
                 this.isLoading = false;
             }).catch(error => {
                 this.isLoading = false;
@@ -150,8 +132,8 @@ export default {
         picList: {
             // getter
             get: function () {
-                if (this.detail && this.detail.imageUrl) {
-                    return this.detail.imageUrl.split(',');
+                if (this.detail && this.detail.docFiles) {
+                    return this.detail.docFiles.split(',');
                 } else {
                     return [];
                 }

+ 12 - 8
src/views-oa/Document/List.vue

@@ -7,16 +7,20 @@
 		
 			<div class="mui-content margin60">
 				<template v-for="item in recordList">
-					<div class="mui-content-padded" >
+					<div class="mui-content-padded" style="margin: 12px 12px !important;" >
 			
-						<ul class="mui-table-view fyy-view" @click="detail(item)">
+						<ul class="mui-table-view fyy-view" @click="detail(item.id)">
+							<li class="mui-table-view-cell" >
+								<label>公文标题:</label>
+								<span>{{item.docTitle}}<span class="mui-pull-right " :class="statusColor[item.docStatus]">{{status[item.docStatus]}}</span></span>
+							</li>
 							<li class="mui-table-view-cell" >
 								<label>公文类型:</label>
-								<span>xxx胆子<span class="mui-pull-right " :class="statusColor[item.status]">{{status[item.status]}}</span></span>
+								<span>{{item.typeName}}</span>
 							</li>
 							<li class="mui-table-view-cell"  >
 								<label>提交时间:</label>
-								<span>xxx胆子</span>
+								<span>{{item.createTime}}</span>
 							</li>
 						
 			
@@ -43,7 +47,7 @@
 
 
 <script>
-	import * as API_Leave from '@/apis/Master/leave'
+	import * as API from '@/apis/Oa/doc'
 	import Common from '@/components/Common.vue'
 	import Loading from '@/components/Loading.vue'
 	import TopHeader from '@/components/TopHeader.vue'
@@ -76,8 +80,8 @@
 					result: 0,
 				},
 				recordList: [],
-				status: ['待审核', '已批准', '已拒绝'],
-				statusColor: ['', 'mui-btn-success', 'mui-btn-danger'],
+				status: ['待审核', '已批准', '已拒绝', '已撤销'],
+				statusColor: ['', 'mui-btn-success', 'mui-btn-danger',''],
 
 
 			}
@@ -107,7 +111,7 @@
 			//获取列表
 			getList() {
 				this.isLoading = true;
-				API_Leave.pageList(this.listForm).then(response => {
+				API.pageList(this.listForm).then(response => {
 					if (response) {
 						if (this.listForm.pageIndex == 1) {
 							this.recordList = response.data;

+ 294 - 408
src/views-oa/Document/Person.vue

@@ -1,446 +1,332 @@
-<template>
-<div>
-  <header class="mui-bar mui-bar-nav">
-  		<h1 class="mui-title">选择人员</h1>
-  		<a class=" mui-icon mui-icon-left-nav mui-pull-left" @click="back"></a>
-  		<a class="mui-btn mui-pull-right mui-btn-blue" @click="ok">确认</a>
-  	</header>
-		<div class="mui-content vongi-fpbm-xsy">
-			<div class="vongi-bread">
-				<template v-for="(item,index) in navList">
-					<a :class="navCanClick(item,index)?'color4fc5f7':''" @click="reloadItem(item,index)" v-text="item.name"></a>
-					<span v-if="index!=navList.length-1" class="mui-icon mui-icon-forward"></span>
-				</template>
-			</div>
-			<ul class="mui-table-view">
-				<li v-for="(item,index) in arrangeShiftCompanyList"  v-if="item.type==1" class="mui-table-view-cell flew-sp flew-items">
-					<div class="mui-ellipsis">
-						{{item.name}}
-					</div>
-					 
-					<a href=""  class="color4fc5f7 iconfont icon-xiaji"   @click="reloadNext(item)" >下级</a>
-					<!--灰色状态-->
-					<!--<a href="" class="color999 iconfont icon-xiaji">下级</a>-->
-				</li> 
-			</ul>
-			<!--人员列表-->
-			<div class="vongi-fplist" :style="'margin-bottom:'+(clientHeight+100)+'px'">
-				<div class="mui-content-padded" v-show="arrangeShiftPersonList"  >
-					<h5><i class="iconfont icon-ze-friends blue"></i>人员列表</h5>
-				</div>
-				<form class="mui-input-group" style="background-color: #fff; ">
-					
-					<div class="mui-input-row "  v-for="(item,index) in arrangeShiftCompanyList" @click="checkboxBtn(item),selectId.push(item.id)"   v-if="item.type==2">
-						<label>{{item.name}}</label>
-						<!-- mui-checkbox
-						<input name="checkbox1" :value="item.id" v-model="selectId" type="checkbox"> -->
-					</div> 
-				</form>
-				<div class="fyy-footer vongi-footer box-show" id="fyy-footer"  > 
-					<h5 class="margin10">已选择人员:<span style="  float: right; color: #3385FF; " @click="selectAll">全选</span></h5>
-					<div class="vongi-yjbtn flew" id="spanLast" :style="'height:'+clientHeight+'px'">
-						<span style="height: 24px;"  v-for="item,i in selectPerson"    >{{item.name}}<a class="iconfont icon-guanbi1" @click="checkboxBtn(item,true,i)"></a></span>
-						
-					</div>
-				</div>
-			</div>
-		</div>
-		<loading :visible="isLoading"></loading>
-</div>
-</template>
-
+<template>
+	<div>
+		<header class="mui-bar mui-bar-nav">
+			<h1 class="mui-title">选择人员</h1>
+			<a class=" mui-icon mui-icon-left-nav mui-pull-left" @click="back"></a>
+			<a class="mui-btn mui-pull-right mui-btn-blue" @click="ok">确认</a>
+		</header>
+		<div class="mui-content vongi-fpbm-xsy">
+			<div class="vongi-bread" v-show="selectType!='view'">
+				审批类型
+				<input name="checkbox1" value="single" v-model="selectType" type="radio">单人
+				<input name="checkbox1" value="or" v-model="selectType" type="radio">或签
+				<input name="checkbox1" value="and" v-model="selectType" type="radio">会签
+				<!-- 	<input name="checkbox1" value="view" v-model="selectType" type="radio">抄送 -->
+			</div>
+			<div class="vongi-bread">
+				<template v-for="(item,index) in navList">
+					<a :class="navCanClick(item,index)?'color4fc5f7':''" @click="reloadItem(item,index)"
+						v-text="item.name"></a>
+					<span v-if="index!=navList.length-1" class="mui-icon mui-icon-forward"></span>
+				</template>
+			</div>
+			<ul class="mui-table-view">
+				<li v-for="(item,index) in arrangeShiftCompanyList" class="mui-table-view-cell flew-sp flew-items">
+					<div class="mui-ellipsis">
+						{{item.name}}
+					</div>
+
+					<a href="" class="color4fc5f7 iconfont icon-xiaji" @click="reloadNext(item)">下级</a>
+					<!--灰色状态-->
+					<!--<a href="" class="color999 iconfont icon-xiaji">下级</a>-->
+				</li>
+			</ul>
+			<!--人员列表-->
+			<div class="vongi-fplist" :style="'margin-bottom:'+(clientHeight+100)+'px'">
+				<div class="mui-content-padded">
+					<h5><i class="iconfont icon-ze-friends blue"></i>人员列表</h5>
+				</div>
+				<form class="mui-input-group" style="background-color: #fff;     padding-bottom: 90px;">
+
+					<div class="mui-input-row " v-for="(item,index) in arrangeShiftPersonList"
+						@click="checkboxBtn(item)">
+						<label>{{item.auditorName}}</label>
+						<!-- mui-checkbox
+						<input name="checkbox1" :value="item.id" v-model="selectId" type="checkbox"> -->
+					</div>
+
+					<div class="mui-input-row " v-if="!arrangeShiftPersonList.length">
+						--无--
+						<!-- mui-checkbox
+						<input name="checkbox1" :value="item.id" v-model="selectId" type="checkbox"> -->
+					</div>
+				</form>
+				<div class="fyy-footer vongi-footer box-show" id="fyy-footer">
+					<h5 class="margin10">已选择人员:</h5>
+					<div class="vongi-yjbtn flew" id="spanLast" :style="'height:'+clientHeight+'px'">
+						<span style="height: 24px;" v-for="item,i in selectPerson">{{item.auditorName}}
+							<a class="iconfont icon-guanbi1" v-show="item.status==0||item.status==1"
+								@click="checkboxBtn(item)"></a></span>
+
+					</div>
+				</div>
+			</div>
+		</div>
+		<loading :visible="isLoading"></loading>
+	</div>
+</template>
+
 
 <script>
- 
-	//import * as API from '@/apis/applyclass'
- 
+	import * as API from '@/apis/Oa/doc'
+
 	import Loading from '@/components/Loading.vue'
-	 
+
 
 	export default {
 		name: '',
 		components: {
- 
+
 			Loading,
-	 
+
 		},
 		data() {
-			return {
-				clientHeight:37,
-				companyId:'',
-				  isLoading: false,
-				  arrangeShiftCompanyList2:[
-					  {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-				  ],
-				  arrangeShiftCompanyList:[
-					 {
-					     "id": "49827",
-					     "name": "徐州轶",
-					     "desc": "100101",
-					     "type": "2",
-					     "list": null
-					 },
-					 {
-					     "id": "49881",
-					     "name": "郑开鑫",
-					     "desc": "22922",
-					     "type": "2",
-					     "list": null
-					 }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  }, {
-					      "id": "49827",
-					      "name": "徐州轶",
-					      "desc": "100101",
-					      "type": "2",
-					      "list": null
-					  },
-					  {
-					      "id": "49881",
-					      "name": "郑开鑫",
-					      "desc": "22922",
-					      "type": "2",
-					      "list": null
-					  },
-				  ],
-				  arrangeShiftPersonList:false,
-				  nowLevel: 0,
-				  navList: [{
-				  	name: '首页',
-				  	id: ''
-				  }],
-				  selectId:[],
-				  selectPerson:[],
-				  selectIdOld:[],
-				  selectPersonOld:[],
+			return {
+				clientHeight: 37,
+				companyId: '',
+				selectType: "single",
+				isLoading: false,
+
+				arrangeShiftCompanyList: [
+
+				],
+				arrangeShiftPersonList: [],
+				nowLevel: 0,
+				navList: [{
+					name: '首页',
+					id: ''
+				}],
+				selectId: [],
+				selectPerson: [],
+				selectIdOld: [],
+				selectPersonOld: [],
+				selectObj: {},
+				initbl:true,
 			}
 		},
 		created() {
-			
-
-		},
-		props:{
-			setids:{
-				default:"",
-				required:false
-			},
-			setnames:{
-				default:"",
-				required:false
-			},
-			batchJob:{
-				default:0,
-				required:false
-			},
+
+
+		},
+		props: {
+
+
+
 		},
-		methods: {
-			checkboxBtn(obj,bl,i){
-				if(this.selectId.includes(obj.id)){
-					var sz=[];
-					for(var j  in this.selectPerson){
-						if(this.selectPerson[j].id==obj.id){
+		watch: {
+			selectType(val, old) {
+				// if(this.initbl){
+				// 	var sz=[];
+				// 	var szid=[];
+				// 	for(var i in this.selectPerson){
+				// 		var obj=this.selectPerson[i];
+				// 		if(obj.status==0||obj.status==1){
 							
-						}else{
-							sz.push(this.selectPerson[j])
-						}
-					}
-					this.selectPerson=sz;
-					if(bl){
-						this.selectId.splice(i, 1); 
-					}
-				}else{
-					//this.selectId.push(obj.id);
-					this.selectPerson.push(obj);
-				}
-			
-				this.setHeight()
-			
-				
-			},
-			selectAll(){
-				for(var j in this.arrangeShiftCompanyList){
-					var obj=this.arrangeShiftCompanyList[j]
+				// 		}else{
+				// 			sz.push(obj);
+				// 			szid.push(obj.personId);
+				// 		}
+				// 	}
 					
-					if(obj.type!='2'){
-						
-						continue;
-					}
-					var bl=true;
-					for(var i  in this.selectPerson){
-						
-						if(this.selectPerson[i].id==obj.id){
-							bl=false;
-							break
+				// 	this.selectPerson = sz
+				// 	this.selectId = szid
+				// }
+				// this.initbl=true
+			}
+		},
+		methods: {
+			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 &&!( person.status == 0|| person.status == 1)) {
+							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 < 100) {
+						this.clientHeight = top;
+					} else {
+						this.clientHeight = 100;
+					}
+					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) {
+					var k=0;
+					for(var i in this.selectPerson){
+						var obj=this.selectPerson[i];
+						if(obj.status==0||obj.status==1){
+							k++;
 						}
 					}
-					if(bl){
-						this.selectId.push(obj.id);
-						this.selectPerson.push(obj)
-					}
-					
-				}
-				this.setHeight()
-				
-			},
-			setHeight(){
-				//spanLast
-				this.$nextTick(()=>{
-					var top=document.getElementById("spanLast").scrollHeight;
-					if(top<100){
-						this.clientHeight=top;
-					}else{
-						this.clientHeight=100;
+					if(k==0){
+						mui.toast("请保留最少一人审批");
+						return
 					}
-					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.selectIdOld=this.selectId;
-					this.selectPersonOld=this.selectPerson;
-					this.$emit("confirm",{status:1,selectId:this.selectId,selectPerson:this.selectPerson})
+					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
+					})
 				}
 			},
-		 getArrangeShiftPersonList(){
-		 		this.isLoading = true;
-		 	
-		 	API.arrangeShiftPersonList(this.companyId).then(response => {
-		 		   this.arrangeShiftPersonList=false;
-		 		  this.arrangeShiftCompanyList= this.arrangeShiftCompanyList.concat(response.list);
-				   for(var i in this.arrangeShiftCompanyList){
-					   if(this.arrangeShiftCompanyList[i].type=='2'){
-						    this.arrangeShiftPersonList=true;
-							break
-					   }
-				   }
-		 		this.isLoading = false;
-		 	}).catch(error => {
-		 		this.isLoading = false;
-		 		mui.toast(error);
-		 	})
-		 },	
-			getArrangeShiftCompanyList(){
-					this.isLoading = true;
-				
-				API.arrangeShiftCompanyList(
-				
-				this.companyId,this.batchJob).then(response => {
-					  this.arrangeShiftCompanyList=response.list;;
-					 this.getArrangeShiftPersonList();
+		
+			getArrangeShiftCompanyList() {
+				this.isLoading = true;
+
+				API.findDepartmentAndPerson(this.companyId).then(response => {
+					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:this.selectObj.examineStep.examineStatus,
+						})
+					}
+					this.arrangeShiftPersonList = list;
+					
 					this.isLoading = false;
-				}).catch(error => {
-					this.isLoading = false;
-					mui.toast(error);
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
 				})
-			},	//下拉事件
-		 
+			}, //下拉事件
+
 			asynCallBack() {
 
 			},
-		
+			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)
+				}
+			},
+
 		},
-		mounted() {
-			if(this.setids){
-				this.selectId=this.setids.split(",");
-				this.selectPerson=this.setnames.split(",").map((item,i)=>{
-					//console.log(i)
-					return {
-						id:this.selectId[i],
-						name:item
-					}
-				});
-			}
-			//this.getArrangeShiftCompanyList();
-			
+		mounted() {
+
+			this.getArrangeShiftCompanyList();
+
 			//console.log("mounted")
 			//var _this = this;
 			//	window.addEventListener('scroll', _this.handleScrool);
-			
+
 		},
 		destroyed() {
 			//销毁监听事件
 			//	var _this = this;
 			//	window.removeEventListener('scroll', _this.handleScrool);
-			
+
 		},
-	
+
 	}
-</script>
-
-<style src="@/assets/css/iconfont.css"></style>
-<style src="@/assets/css/xsy.css"></style>
-<style scoped src="@/assets/css/xpwyfyy.css"></style>
-
-<style>
+</script>
+
+<style src="@/assets/css/iconfont.css"></style>
+<style src="@/assets/css/xsy.css"></style>
+<style scoped src="@/assets/css/xpwyfyy.css"></style>
+
+<style>
 </style>