<template>
	<view style="background-color: #fff;" v-if="content != null">
		<view
			style="height: 90rpx;display: flex;align-items: center;justify-content: space-around;border-bottom: 1px solid #ceccca;background-color: #fff;"
			v-if="type == 0">
			<!-- <u-tabs :list="list1"  :current="current" @click="click"></u-tabs> -->
			<view style="font-size: 28rpx;" class="tab" :class="current==0?'active':''" @click="current = 0">
				基本信息
			</view>
			<view style="border-left: 1px solid #ceccca;height: 80%;">

			</view>
			<view style="font-size: 28rpx;" class="tab" :class="current==0?'':'active'" @click="current = 1">
				流转记录
			</view>
		</view>
		<swiper style="background-color:#fff ;" :style="{height:type==0?'calc(100vh - 100rpx)':'100vh'}"
			:current="current" disable-touch>
			<swiper-item>
				<view style="height: 100%;overflow: auto;">
					<u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm"
						:labelStyle="{fontSize:'32rpx'}" labelWidth="130">
						<view v-if="fkFlow == '006'">
							<u-form-item label="出差处室:" borderBottom ref="item1">
								<view class="content">
									{{content.outWorkDept}}
								</view>
							</u-form-item>
							<u-form-item label="出差人:" borderBottom ref="item1">
								<view class="content">
									{{content.userName}}
								</view>
							</u-form-item>
							<u-form-item label="目的地:" borderBottom ref="item1">
								<view class="content">
									<view>
										{{content.provinceType=='0'?'省内':'省外'}}
									</view>
									<view style="margin-top: 10rpx;">
										{{content.destination}}
									</view>
								</view>
							</u-form-item>
							<u-form-item label="起止日期:" borderBottom ref="item1">
								<view class="content">
									{{content.startTime+' 至 '+content.endTime}}
								</view>
							</u-form-item>
							<u-form-item label="出差事由:" borderBottom ref="item1">
								<view class="content">
									{{content.reason}}
								</view>
							</u-form-item>
						</view>
						<view v-if="fkFlow == '007'">
							<u-form-item label="申请人:" borderBottom ref="item1">
								<view class="content">
									{{content.userName}}
								</view>
							</u-form-item>
							<u-form-item label="邀请单位:" borderBottom ref="item1">
								<view class="content">
									{{content.inviteUnit}}
								</view>
							</u-form-item>
							<u-form-item label="培训名称:" borderBottom ref="item1">
								<view class="content">
									{{content.trainName}}
								</view>
							</u-form-item>
							<u-form-item label="目的地:" borderBottom ref="item1">
								<view class="content">
									{{content.destination}}
								</view>
							</u-form-item>
							<u-form-item label="起止日期:" borderBottom ref="item1">
								<view class="content">
									{{content.startTime+' 至 '+content.endTime}}
								</view>
							</u-form-item>
							<u-form-item label="授课题目:" borderBottom ref="item1">
								<view class="content">
									{{content.teacherTitle}}
								</view>
							</u-form-item>
							<u-form-item label="参加人数:" borderBottom ref="item1">
								<view class="content">
									{{content.numberOfParticipants}}
								</view>
							</u-form-item>
						</view>
						<view v-if="fkFlow == '009'">
							<u-form-item label="姓名:" borderBottom ref="item1">
								<view class="content">
									{{content.name}}
								</view>
							</u-form-item>
							<u-form-item label="请(休)假类别:" borderBottom ref="item1">
								<uni-data-select v-model="content.leaveTpye" :clear="false" placeholder="请选择下一节点"
									:localdata="statusList" disabled=""></uni-data-select>
							</u-form-item>
							<u-form-item label="起止日期:" borderBottom ref="item1">
								<view class="content">
									{{content.leaveStartTime+' 至 '+content.leaveEndTime}}
								</view>
							</u-form-item>
							<u-form-item label="请(休)假天数:" borderBottom ref="item1">
								<view class="content">
									{{content.leaveNumber}}
								</view>
							</u-form-item>
							<u-form-item label="请(休)假事由:" borderBottom ref="item1">
								<view class="content">
									{{content.leaveReason}}
								</view>
							</u-form-item>
						</view>
						<view v-if="fkFlow == '015'">
							<u-form-item label="申请人:" borderBottom ref="item1">
								<view class="content">
									{{content.createBy}}
								</view>
							</u-form-item>
							<u-form-item label="联系电话:" borderBottom ref="item1">
								<view class="content">
									{{content.phone}}
								</view>
							</u-form-item>
							<u-form-item label="起止日期:" borderBottom ref="item1">
								<view class="content">
									{{content.startUseTime+' 至 '+content.endUseTime}}
								</view>
							</u-form-item>
							<u-form-item label="用车天数:" borderBottom ref="item1">
								<view class="content">
									{{content.dayNum}}天
								</view>
							</u-form-item>
							<u-form-item label="乘车人数:" borderBottom ref="item1">
								<view class="content">
									{{content.carNum}}人
								</view>
							</u-form-item>
							<u-form-item label="目的地:" borderBottom ref="item1">
								<view class="content">
									{{content.addres}}
								</view>
							</u-form-item>
							<u-form-item label="用途:" borderBottom ref="item1">
								<view class="content">
									{{content.useMessage}}
								</view>
							</u-form-item>
						</view>
						<view v-if="fkFlow == '020'">
							<u-form-item label="申请人:" borderBottom ref="item1">
								<u--input v-model="content.userName" border="none" readonly></u--input>
							</u-form-item>
							<u-form-item label="所在处室:" borderBottom prop="deptName" ref="item1">
								<u--input v-model="content.deptName" placeholder="" border="none"></u--input>
							</u-form-item>
							<!-- <u-form-item label="值班日期:" borderBottom prop="srcDate" @click="typeChange('zhiban')">
								<view>
									{{content.srcDate}}
								</view>
							</u-form-item> -->
							<u-form-item label="调班日期:" prop="targetDate" @click="typeChange('tiaoban')" borderBottom
								ref="item1">
								<view>
									{{content.targetDate}}
								</view>
							</u-form-item>
							<u-form-item label="调班人:" @click='changePeople' borderBottom prop="user" ref="item1">
								<view class="">
									{{content.adjustUserStatus}}-{{content.adjustUserName}}
								</view>
							</u-form-item>
							<u-form-item label="替换人:" @click='changePeople' borderBottom prop="user" ref="item1">
								<view class="">
									{{content.replaceDeptName}}-{{content.replaceName}}
								</view>
							</u-form-item>
						</view>
						<view v-if="fkFlow == '017'">
							<u-form-item label="用章人:" borderBottom ref="item1">
								<u--input v-model="content.createBy" border="none" readonly></u--input>
							</u-form-item>
							<u-form-item label="用章处室:" borderBottom prop="useDept" ref="item1">
								<u--input v-model="content.useDept" readonly placeholder="请输入用章处室"
									border="none"></u--input>
							</u-form-item>
							<u-form-item label="用章日期:" borderBottom prop="useTime" @click="typeChange('yongzhang')">
								<view>
									{{content.useTime}}
								</view>
							</u-form-item>
							<u-form-item label="印章类别:" borderBottom prop="signetType">
								<uni-data-select :disabled="this.nodeId!='1701'" v-model="content.signetType"
									:clear="false" placeholder="请选择印章类别" :localdata="yongzhangList"></uni-data-select>
							</u-form-item>
							<u-form-item label="用章事由:" borderBottom prop="usingReason" ref="item1">
								<u--textarea :disabled="this.nodeId!='1701'" type="textarea"
									v-model="content.usingReason" placeholder="请输入用章事由" border="none"></u--textarea>
							</u-form-item>
							<u-form-item label="主送单位:" borderBottom prop="activeSend" ref="item1">
								<u--textarea :disabled="this.nodeId!='1701'" type="textarea"
									v-model="content.activeSend" placeholder="请输入主送单位" border="none"></u--textarea>
							</u-form-item>
							<u-form-item label="上传附件:" borderBottom prop="" ref="">
								<view v-if="this.nodeId=='1701'" class="example-body">
									<u-button style="width:380rpx" type="primary" @click="uploadPic()">上传</u-button>
									<!-- 展示 -->
									<div style="display: inline;">
										<view style="margin-bottom: 30rpx;display: flex;margin-top: 4rpx;"
											v-for="v in rowThis.ywFileList" :key="v.fileId">
											<u-icon style="margin-top: 4rpx;color: #2979FF;"
												name="attach"></u-icon><u--text :lines="1" size="14" color="#2979FF"
												decoration="underline" :text="v.name"
												@click="downLoad(v)">{{v.name}}</u--text><u-icon @click="delFile(v)"
												style="margin-top: 0rpx;" name="close"></u-icon>
										</view>
									</div>
								</view>

								<view v-else
									style="border-radius: 8rpx;background-color: #f3f3f3;margin-top: 40rpx;padding: 20rpx 40rpx;">
									<view style="margin-bottom: 30rpx;" v-for="v in rowThis.ywFileList" :key="v.fileId">
										<u--text :lines="1" size="15" color="#2979FF" decoration="underline"
											:text="v.name" @click="downLoad(v)">{{v.name}}</u--text>
									</view>
								</view>

								<u-action-sheet @select="selectClick" :actions="listPic" :closeOnClickOverlay="true"
									:closeOnClickAction="true" title="请选择" :show="showUpload"></u-action-sheet>
							</u-form-item>
							<u-form-item label="盖章份数:" borderBottom prop="signetCopies" ref="item1">
								<u--input :readonly="this.nodeId!='1701'" type="number" v-model="content.signetCopies"
									placeholder="请输入盖章份数" border="none"></u--input>
							</u-form-item>
							<u-form-item v-if="this.nodeId=='1701'" label="接收人:" borderBottom prop="toEmpsName"
								@click="peoShow = true">
								<view>
									{{content.toEmpsName}}
								</view>

							</u-form-item>
							<u-modal :show="peoShow" title="选择接收人" showCancelButton @cancel="cancel" @confirm="queren">
								<view style="width: 100%;height: 40vh;overflow: auto;" v-if="peoShow == true">
									<u-radio-group v-model="value" @change="radioChange" iconPlacement="right">
										<u-collapse accordion style="width: 100%;">
											<u-collapse-item :title="v.Name" :name="v.No" :key="v.No"
												v-for="v in deptList" style="width: 100%;">
												<view
													style="font-size: 32rpx; padding: 20rpx 0; border-bottom: 1px solid #eaeaea;"
													v-for=" i in userList" :key="i.NO" v-if="i.FK_Dept == v.No">
													<u-radio :label="i.Name" :name="i"></u-radio>
												</view>
											</u-collapse-item>
										</u-collapse>
									</u-radio-group>
								</view>
							</u-modal>
						</view>
						<view v-if="fkFlow == '018'">
							<u-form-item label="用章人:" borderBottom ref="item1">
								<u--input v-model="content.createBy" border="none" readonly></u--input>
							</u-form-item>
							<u-form-item label="用章处室:" borderBottom prop="useDept" ref="item1">
								<u--input readonly v-model="content.useDept" placeholder="请输入用章处室"
									border="none"></u--input>
							</u-form-item>
							<u-form-item label="用章日期:" borderBottom prop="useTime" @click="typeChange('yongzhang')">
								<view readonly>
									{{content.useTime}}
								</view>
							</u-form-item>

							<u-form-item label="合同名称:" borderBottom prop="usingReason" ref="item1">
								<u--textarea type="textarea" v-model="content.usingReason" placeholder="请输入合同名称"
									border="none"></u--textarea>
							</u-form-item>
							<u-form-item label="主送单位:" borderBottom prop="activeSend" ref="item1">
								<u--textarea type="textarea" v-model="content.activeSend" placeholder="请输入主送单位"
									border="none"></u--textarea>
							</u-form-item>
							<u-form-item label="盖章份数:" borderBottom prop="signetCopies" ref="item1">
								<u--input type="textarea" v-model="content.signetCopies" placeholder="请输入盖章份数"
									border="none"></u--input>
							</u-form-item>
						</view>
						<view v-if="fkFlow == '016'">
							<u-form-item label="督办事项:" borderBottom prop="title">
								<u--input :readonly='isEdit' placeholder='请输入督办事项' v-model="content.title"
									border="none"></u--input>
							</u-form-item>
							<!-- <u-form-item label="处室及负责人:" borderBottom prop="departmentHead">
								<u--input readonly v-model="content.departmentHead" border="none"></u--input>
							</u-form-item> -->
							<!-- <u-form-item label="信息类别:" borderBottom prop="infoType">
								<u--textarea :disabled='isEdit' type="textarea" v-model="content.infoType"
									placeholder="请输入信息类别" border="none"></u--textarea>
							</u-form-item> -->
							<u-form-item label="督办来源:" borderBottom prop="infoSource">
								<uni-data-select :disabled='isEdit' @change="infoSourceChange"
									v-model="content.infoSource" :clear="false" placeholder="请选择督办来源"
									:localdata="InfoList"></uni-data-select>
							</u-form-item>
							<u-form-item label="督办内容:" borderBottom prop="infoSourceContent">
								<u--textarea :disabled='isEdit' type="textarea" v-model="content.infoSourceContent"
									:placeholder="infoSourceContent" border="none"></u--textarea>
							</u-form-item>

							<u-form-item label="完成时限:" @click="typeChange('shixian')" borderBottom prop="doneTime">
								<view readonly>
									{{content.doneTime}}
								</view>
								<!-- <u--input v-model="content.doneTime" border="none" readonly></u--input> -->
							</u-form-item>
							<!-- <u-form-item label="完成时限内容:" borderBottom prop="doneContent">
								<u--textarea :disabled='isEdit' type="textarea" v-model="content.doneContent"
									placeholder="**月**日
 	****要求/文件要求/部门确定" border="none"></u--textarea>
							</u-form-item>
							<u-form-item label="议定事项:" borderBottom prop="itemPostil">
								<u--textarea :disabled='isEdit' type="textarea" v-model="content.itemPostil"
									placeholder="请输入议定事项" border="none"></u--textarea>
							</u-form-item> -->
							<u-form-item label="责任处室:" borderBottom prop="prersonLiable">
								<u--textarea :disabled='isEdit' style="width: 200rpx;" type="textarea"
									v-model="content.prersonLiable" placeholder="请输入责任处室" border="none"></u--textarea>
								<u-button :disabled='isEdit' size="small" type="primary" text="选择" @click="handelSelect"
									style="margin-top: 40rpx;width: 50rpx;margin-right: 20rpx;"></u-button>
							</u-form-item>

						</view>
						<view v-if="type==0" style="padding-bottom: 40rpx;">
							<u-form-item label="下一节点:" borderBottom ref="item1"
								v-if="overType==false&&this.nodeId!='1701'">
								<uni-data-select v-model="content.jdindex" :clear="false" placeholder="请选择下一节点"
									:localdata="list" @change="change"></uni-data-select>
							</u-form-item>
							<!-- <u-form-item label="下发人员:" borderBottom v-if="DeliveryWay==4&&this.nodeId!='1701'"
								ref="item1" @click="choosePeo">
								<view :style="{color:content.users==null?'rgb(192, 196, 204)':''}">
									{{content.users==null?'请选择人员': content.userList}}
								</view>
							</u-form-item> -->

							<u-form-item label="进展情况:" borderBottom ref="item1" v-if="jinzhan">
								<u--textarea v-model="content.progress" placeholder="请输入进展情况"
									border="none"></u--textarea>
							</u-form-item>
							<u-form-item v-if="isEval && liucheng != false" label="进度评价:" borderBottom
								prop="progressEva">
								<uni-data-select v-model="content.progressEva" :clear="false" placeholder="请选择进度评价"
									:localdata="progress_eva"></uni-data-select>
							</u-form-item>
							<view v-if="!jinzhan&&this.nodeId!='1701'" class="">
								<u-form-item label="审批意见:" borderBottom ref="item1" v-if="gdType == false">
									<u--textarea v-model="content.reviewMsg" placeholder="请输入审批意见" autoHeight
										border="none"></u--textarea>
								</u-form-item>
							</view>

							<view v-if="gdType == true">
								<u-form-item label="档案分类:" borderBottom ref="item1" @click="chooseGd">
									<view :style="{color:content.typeId==null?'rgb(192, 196, 204)':''}">
										{{content.typeId==null?'请选择档案分类': content.gdtype}}
									</view>
								</u-form-item>
							</view>
							<view style="margin-top: 40rpx;padding: 0 20rpx;box-sizing: border-box;"
								v-if="gdType == false">
								<u-button type="primary" text="提交" @click="submit"></u-button>
							</view>
							<view style="margin-top: 40rpx;padding: 0 20rpx;box-sizing: border-box;"
								v-if="gdType == true">
								<u-button type="primary" text="归档" @click="save"></u-button>
							</view>

							<u-button type="error" text="退回" @click="show = true"
								style="width: calc(100vw - 40rpx);margin-top: 40rpx;"
								v-if="backType == true&&this.nodeId!='1701'&&this.nodeId!='1705'"></u-button>
							<view style="margin-top: 40rpx;padding: 0 20rpx;box-sizing: border-box;" v-if="showBack">
								<u-button type="warning" text="拒绝" @click="turnDown"></u-button>
							</view>
						</view>
						<view style="padding: 20rpx;box-sizing: border-box;" v-else>
							<u-steps :current="lzNum-1" direction="column" dot v-if="record != null">
								<view v-for="(v,i) in record" :key="i">
									<u-steps-item :error="v.ActionType==2?true:false"
										:title='v.NDFromT+"（"+v.ActionTypeText+"）"' v-if="v.ActionType==='28'">
										<view slot="desc" style="color: #606266">
											<view style="font-size: 28rpx;">
												处理人：{{v.EmpFromT}}
											</view>
											<view style="font-size: 28rpx;">
												到达时间：{{v.SDT}}
											</view>
										</view>
									</u-steps-item>
									<view v-else-if="v.ActionType22 != undefined">
										<u-steps-item :error="v.ActionType==2?true:false"
											v-for="(item,index) in v.ActionType22" :key="index"
											:title='item.NDFromT+"（"+v.ActionTypeText+"）"'>
											<view slot="desc" style="color:#606266;">
												<view style="font-size: 28rpx;">
													处理部门：{{item.NodeData.split("DeptName=")[1]}}
												</view>
												<view style="font-size: 28rpx;">
													处理人：{{item.Exer.split(',')[1]}}
												</view>
												<view style="font-size: 28rpx;">
													处理时间：{{item.RDT}}
												</view>
												<view style="font-size: 28rpx;">
													审核意见：{{item.Msg}}
												</view>
											</view>
										</u-steps-item>
									</view>

									<u-steps-item :error="v.ActionType==2?true:false"
										:title='v.NDFromT+"（"+v.ActionTypeText+"）"' v-else>
										<view slot="desc" style="color: #606266">
											<view style="font-size: 28rpx;">
												处理部门：{{v.NodeData.split("DeptName=")[1]}}
											</view>
											<view style="font-size: 28rpx;">
												处理人：{{v.Exer.split(',')[1]}}
											</view>
											<view style="font-size: 28rpx;">
												处理时间：{{v.RDT}}
											</view>
										</view>
									</u-steps-item>
								</view>
							</u-steps>
						</view>
					</u--form>

				</view>

			</swiper-item>
			<swiper-item>
				<view
					style="padding: 20rpx;box-sizing: border-box;width: 100%;box-sizing: border-box;height: 100%;overflow: auto;">
					<u-steps :current="lzNum-1" direction="column" dot v-if="record != null">
						<view v-for="(v,i) in record" :key="i">
							<u-steps-item :error="v.ActionType==2?true:false"
								:title='v.NDFromT+"（"+v.ActionTypeText+"）"' v-if="v.ActionType=='28'">
								<view slot="desc" style="color: #606266">
									<view style="font-size: 28rpx;">
										处理人：{{v.EmpFromT}}
									</view>
									<view style="font-size: 28rpx;">
										到达时间：{{v.SDT}}
									</view>
								</view>
							</u-steps-item>
							<view v-else-if="v.ActionType22 != undefined">
								<u-steps-item :error="v.ActionType==2?true:false" v-for="(item,index) in v.ActionType22"
									:key="index" :title='item.NDFromT+"（"+v.ActionTypeText+"）"'>
									<view slot="desc" style="color:#606266;">
										<view style="font-size: 28rpx;">
											处理部门：{{item.NodeData.split("DeptName=")[1]}}
										</view>
										<view style="font-size: 28rpx;">
											处理人：{{item.Exer.split(',')[1]}}
										</view>
										<view style="font-size: 28rpx;">
											处理时间：{{item.RDT}}
										</view>
										<view style="font-size: 28rpx;">
											审核意见：{{item.Msg}}
										</view>
									</view>
								</u-steps-item>
							</view>
							<u-steps-item :error="v.ActionType==2?true:false"
								:title='v.NDFromT+"（"+v.ActionTypeText+"）"' v-else>
								<view slot="desc" style="color: #606266">
									<view style="font-size: 28rpx;">
										处理部门：{{v.NodeData.split("DeptName=")[1]}}
									</view>
									<view style="font-size: 28rpx;">
										处理人：{{v.Exer.split(',')[1]}}
									</view>
									<view style="font-size: 28rpx;">
										处理时间：{{v.RDT}}
									</view>
								</view>
							</u-steps-item>
						</view>
					</u-steps>
				</view>
			</swiper-item>
		</swiper>
		<u-modal :show="show" title="退回" :closeOnClickOverlay="true" showCancelButton @cancel="close" @close="close"
			@confirm="back">
			<view class="slot-content" style="width: 100%;">
				<u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm1"
					:labelStyle="{fontSize:'32rpx'}" labelWidth="100">
					<u-form-item label="退回节点:" borderBottom ref="item1">
						<uni-data-select v-model="content.returnToNodeID" placeholder="请选择节点" :clear="false"
							:localdata="backlist"></uni-data-select>
					</u-form-item>
					<u-form-item label="退回意见:" borderBottom ref="item1">
						<u--textarea v-model="content.backMsg" placeholder="请输入退回意见" autoHeight
							border="none"></u--textarea>
					</u-form-item>
				</u--form>
			</view>
		</u-modal>
		<u-modal :show="show1" title="拒绝" :closeOnClickOverlay="true" showCancelButton @cancel="close" @close="close"
			@confirm="submitNodeTurn">
			<view class="slot-content" style="width: 100%;">
				<u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm1"
					:labelStyle="{fontSize:'32rpx'}" labelWidth="100">
					<u-form-item label="拒绝原因:" borderBottom ref="item1">
						<u--textarea v-model="content.msg" placeholder="请输入拒绝原因" autoHeight border="none"></u--textarea>
					</u-form-item>
				</u--form>
			</view>
		</u-modal>
		<u-calendar placeholder="请选择日期" :show="showDate" mode="single" allowSameDay @confirm="confirmOne"
			@close="showDate = false"></u-calendar>
	</view>
</template>

<script>
	import {
		parseBigInt
	} from 'jsencrypt/lib/lib/jsbn/jsbn'
	// import uButton from "../../uni_modules/uview-ui/components/u-button/u-button.vue"
	export default {
		data() {
			return {
				deptList: [], //部门列表
				userList: [], //人员列表
				value: null,
				peoShow: false,
				listPic: [{
					name: '拍照上传'
				}, {
					name: '从相册上传'
				}],
				showUpload: false,
				uploadUrl: 'http://192.168.1.42:8087' + "/system/file/fileupload",
				rowThis: {
					ywFileList: []
				},
				yongzhangList: [],
				showDate: false,
				InfoList: [],
				infoSourceContent: '',
				liucheng: true,
				isEdit: true,
				isEval: false,
				db_template: [],
				progress_eva: [],
				current: 0,
				showBack: false,
				content: {},
				statusList: [],
				//流转记录
				record: null,
				//待办已办
				type: 0,
				//节点列表
				list: [],
				//是否选择下发人员
				selectType: 3,
				workid: null,
				flowNo: null,
				id: null,
				//tabs
				list1: [{
						name: '待办内容'
					},
					{
						name: '流转记录'
					}
				],
				DeliveryWay: null, //判断是否需要审核意见
				gd: null, //密级列表
				gdType: false, //判断是否是归档
				overType: false, //判断是否结束
				//上个页面传过来的参数
				parameter: null,
				fkFlow: null, // 006 中层出差  007 外出授课备案
				//退回状态
				backType: false,
				//退回节点列表
				backlist: [],
				show: false,
				show1: false,
				jinzhan: false,
				lzNum: 0,
				nodeId: null,
				YorN: '1',
				caozuo: true
			}
		},
		onLoad(options) {
			let that = this
			that.parameter = options
			that.fkFlow = options.fkFlow
			that.getDicts()
			this.getDictsYongzhang()
			that.getContent(options.workid)
			that.getRecord(options.workid)
			if (options.nodeName.indexOf('归档') != -1 || options.nodeName.indexOf('存档') != -1) {
				that.gdType = true
			}
			that.type = options.type
			that.nodeId = options.nodeId
			if (options.nodeId == '1701') {
				this.caozuo = false
				this.getPeoList(options.fkFlow)
			}
			if (options.fkFlow == '020') {
				this.showBack = true
				that.nodeId = options.nodeId
				if (options.nodeId == '2001' || options.nodeId == '2004') {
					this.showBack = false
				}
			}
			if (options.nodeId == '1605') {
				this.jinzhan = true
				setTimeout(() => {
					this.content.reviewMsg = '同意'
				}, 500)

			}
			if (options.nodeId == "1606") {
				this.isEval = true;
				this.getJindu()
			}
			that.workid = options.workid
			that.flowNo = options.flowNo
			if (options.fkFlow == '016') {
				this.getDictsInfo()
				uni.setNavigationBarTitle({
					title: '督办事项'
				})
				uni.$u.http.get('/jflow/restful/getSelfParas', {
					params: {
						workid: options.workid
					}
				}).then((res) => {
					console.log('res', res)
					if (res.data.SelfParas == 'isEdit') {
						this.isEdit = false
					}
				})
			} else {
				uni.setNavigationBarTitle({
					title: options.title
				})
			}


			// if (options.type == 0) {
			// 	// that.jdList(options.workid, options.flowNo)
			// 	setTimeout(() => {
			// 		this.isOver(options)
			// 	}, 500)
			// 	// this.getjsPeo(options.workid, options.flowNo)
			// }

		},
		onShow() {
			uni.$once('query', (query) => {
				if (query.a == 1) {
					this.content.users = getApp().globalData.peoIdList
					this.content.userList = getApp().globalData.peoList
					this.$forceUpdate()
				} else if (query.a == 2) {
					this.content.typeId = getApp().globalData.gdId.split(",")[0]
					this.content.gdtype = getApp().globalData.gdId.split(",")[1]
					this.$forceUpdate()
				} else if (query.a == 'two') {
					// this.content.prersonLiable = getApp().globalData.zerenList
					if (this.content.prersonLiable != null) {
						let arrPeo = this.content.prersonLiable.split(",");
						console.log("aeepro", arrPeo);
						let arr = getApp().globalData.zerenList.split(',')
						console.log('arr', arr)
						arr = arr.concat(this.content.prersonLiable)
						console.log('11111', arr)
						this.content.prersonLiable = arr.join(" , ");
					} else {
						this.content.prersonLiable = getApp().globalData.zerenList
					}
				}
			})
		},

		methods: {
			radioChange(e) {
				console.log(e)

			},
			queren() {
				let that = this
				console.log('‘value，', that.content.params)
				that.content.users = that.value.NO
				that.content.toEmpsName = that.value.Name
				that.peoShow = false
			},
			checkboxChange(newValues) {
				// let selectedCount = newValues.filter(value => value).length;
				// if (selectedCount > 2) {
				// 	// 如果选中项超过两个，取消最早选中的复选框
				// 	let earliestSelectedIndex = newValues.findIndex(value => value);
				// 	newValues[earliestSelectedIndex] = false;
				// 	uni.showToast({
				// 		title: "只能选择两位带班领导",
				// 		icon: "none",
				// 		mask: true,
				// 		duration: 1000
				// 	})
				// }
				this.value1 = newValues;
				this.content.params.toEmps = newValues.join(',')
				let arr = []
				this.userList.forEach(res => {
					newValues.forEach(res1 => {
						console.log(res.NO, res1)
						if (res.NO == res1) {
							arr.push(res.Name)
						}
					})
				})
				this.content.toEmpsName = arr.join(',')
			},
			//获取接收人信息
			getPeoList(v) {
				uni.$u.http.get(`/jflow/restful/GenerNextStepNodeEmpsNoWorkId?flowNo=${v}&toNodeID=1703`).then(res => {
					this.deptList = res.Depts
					this.userList = res.Emps
					console.log(this.deptList)
					console.log(this.userList)
				})
			},
			uploadPic() {
				if (this.rowThis.ywFileList.length == 0) {
					this.showUpload = true
				} else {
					uni.showToast({
						title: '最多上传一张',
						icon: 'none'
					})
					return
				}
			},
			downLoad(v) {
				console.log('’15252', v)
				uni.navigateTo({
					url: "/pages/office/office?url=" + getApp().globalData.saveUrl + v.path
				})
				// uni.downloadFile({
				// 	url: path,
				// 	success: (res) => {
				// 		var filePath = res.tempFilePath;
				// 		uni.openDocument({
				// 			filePath: filePath,
				// 			showMenu: true,
				// 			success: function(res) {
				// 				console.log('打开文档成功');
				// 			}
				// 		});
				// 	}
				// })
			},
			delFile(itemFile) {
				console.log('itemFILE', itemFile)
				this.rowThis.ywFileList.splice(itemFile, 1)
			},
			selectClick(index) {
				console.log(index)
				let that = this
				if (index.name == '拍照上传') {
					uni.chooseImage({
						count: 1, // 默认9，设置图片的数量
						sourceType: ['camera'], // 可以指定来源是相册还是相机，默认二者都有
						success: function(res) {
							// 返回选定照片的本地文件路径列表 tempFilePaths
							console.log(res.tempFilePaths);
							const pathUrl = res.tempFilePaths[0]
							uni.uploadFile({
								url: 'http://61.240.156.161:28188/prod-api' +
									"/system/file/fileupload",
								filePath: pathUrl,
								name: 'file',
								header: {
									Authorization: 'Bearer ' + uni.getStorageSync('token')
								},
								success: (response) => {
									console.log('1111111111111111')
									console.log('96+', response.data)
									console.log(that.rowThis)
									let dataFile = JSON.parse(response.data)
									that.rowThis.ywFileList.push(dataFile.data)
									// if (this.rowThis.ywFileList.length != 0) {
									// 	for (let i = 0; i < this.rowThis.ywFileList.length; i++) {
									// 		if (this.rowThis.ywFileList[i].response != undefined) {
									// 			this.dataSubmit.ywFileList.push(
									// 				this.rowThis.ywFileList[i].response.data
									// 			);
									// 		} else {
									// 			this.dataSubmit.ywFileList.push(this.rowThis
									// 				.ywFileList[i]);
									// 		}
									// 	}
									// }
									// this.dataSubmit.ywFileList.push()
								},
								fail: (response) => {
									console.log('fail', response)
								}
							})
						}
					});
				} else if (index.name == '从相册上传') {
					console.log('586', this.rowThis)
					uni.chooseImage({
						count: 1, // 默认9，设置图片的数量
						sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
						sourceType: ['album'], // 可以指定来源是相册还是相机，默认二者都有
						success: function(res) {
							// 返回选定照片的本地文件路径列表 tempFilePaths
							console.log(res);
							const pathUrl = res.tempFilePaths[0]
							uni.uploadFile({
								url: 'http://61.240.156.161:28188/prod-api' +
									"/system/file/fileupload",
								filePath: pathUrl,
								name: 'file',
								header: {
									Authorization: 'Bearer ' + uni.getStorageSync('token')
								},
								success: (response) => {
									console.log('1111111111111111')
									console.log('96+', response.data)
									console.log(that.rowThis)
									let dataFile = JSON.parse(response.data)
									that.rowThis.ywFileList.push(dataFile.data)
									console.log('that.rowThis.ywFileList', that.rowThis.ywFileList)

								},
								fail: (response) => {
									console.log('fail', response)
								}
							})
						}
					});
				}
				this.showUpload = false
			},
			infoSourceChange(val) {
				console.log("db_template", this.db_template);
				console.log('val', val);
				this.infoSourceContent = this.db_template[val - 1].text;
			},
			handelSelect() {
				uni.navigateTo({
					url: `/pages/zerenchushi/zerenchushi`
				})
			},
			confirmOne(e) {
				this.content.doneTime = e[0]
				this.showDate = false
			},
			typeChange(e) {
				if (this.nodeId == '1701') {
					this.showDate = true
					this.typeDate = e
				}

			},
			// 信息来源
			getDictsInfo() {
				uni.$u.http.get('/system/dict/data/type/info_source').then(res => {
					this.InfoList = res.data.map((item, index) => {
						let obj = {
							value: item.dictValue,
							id: item.dictValue,
							text: item.dictLabel
						}
						return obj
					})
				})
				uni.$u.http.get('/system/dict/data/type/db_template').then(res => {
					this.db_template = res.data.map((item, index) => {
						let obj = {
							value: item.dictValue,
							id: item.dictValue,
							text: item.dictLabel
						}
						return obj
					})
				})
			},
			getJindu() {
				uni.$u.http.get('/system/dict/data/type/progress_eva').then(res => {
					this.progress_eva = res.data.map((item, index) => {
						let obj = {
							value: item.dictValue,
							id: item.dictValue,
							text: item.dictLabel
						}
						return obj
					})
				})
			},
			submitNodeTurn() {
				if (this.content.msg != '' && this.content.msg != null && this.content.msg != undefined) {
					this.YorN = "2";
					this.content.toNodeId = '2004'
					this.content.reviewMsg = this.content.msg
					console.log('this.content', this.content)
					console.log('nodeId', this.nodeId)
					uni.$u.http.post("/offcial/receive/sendFlowToUsers", this.content, {
						header: {
							// 'content-Type: 'multipart/form-data'
							'content-Type': 'application/x-www-form-urlencoded'
						}
					}).then(res => {
						console.log('11111', res)
						// uni.hideLoading()
						if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
							uni.showToast({
								title: "已发送到" + res.data.VarToNodeName + "节点，接收人：" + res
									.data.VarAcceptersName,
								icon: "none",
								mask: true,
								duration: 3000
							})
						} else if (res.data.VarAcceptersName == "结束") {
							uni.showToast({
								title: res.data.Message,
								icon: "none",
								mask: true,
								duration: 3000
							})
						} else {
							uni.showToast({
								title: res.data.Message.replace(/[@]/g, ""),
								icon: "none",
								mask: true,
								duration: 3000
							})
						}

						uni.$u.http.post("duty/dutyAdjust/updateYwDutyAdjustAudit", {
							workId: this.workid,
							status: this.YorN,
							msg: this.content.reviewMsg,
						}, {
							header: {
								// 'content-Type: 'multipart/form-data'
								'content-Type': 'application/x-www-form-urlencoded'
							}
						})
						if (this.YorN == 1) {
							uni.$u.http.post('/duty/dutyAdjust/execAdjustDuty', {
								workId: this.workid,
							}, {
								header: {
									// 'content-Type: 'multipart/form-data'
									'content-Type': 'application/x-www-form-urlencoded'
								}
							})
						}
						uni.$emit('query', {
							a: 'back'
						})
						setTimeout(() => {
							uni.navigateBack()
						}, 2000)
					}).catch(res => {
						console.log('555', res)
						uni.hideLoading()
						uni.showToast({
							title: "请稍后重试",
							icon: "none"
						})
					})
				} else {
					uni.showToast({
						title: "请输入拒绝原因",
						icon: "none"
					})
				}
			},
			// 拒绝
			turnDown() {
				this.show1 = true
			},

			click(e) {
				this.current = e.index
			},
			//查询收文详情
			getContent(id) {
				console.log(id)
				if (this.fkFlow == '006') {
					uni.$u.http.get('/system/work/sel/' + id).then(res => {
						console.log(res)
						this.content = res.data
						this.content.workid = this.workid
						if (this.gdType == true) {
							this.content.typeId = null //归档分类
							this.content.archiveNo = null //档案编号
							this.content.archiveFormNo = null
							this.content.printNum = null //打印份数
							this.content.name = res.data.title //档案名称
							this.content.gdtype = null //分类名称
						}
						if (this.type == 0) {
							this.isOver(this.parameter)
							this.getBackNo(this.parameter.nodeId)
						}
					})
				} else if (this.fkFlow == '007') {
					uni.$u.http.get('/system/registration/sel/' + id).then(res => {
						// console.log(res)
						this.content = res.data
						this.content.workid = this.workid
						if (this.gdType == true) {
							this.content.typeId = null //归档分类
							this.content.archiveNo = null //档案编号
							this.content.archiveFormNo = null
							this.content.printNum = null //打印份数
							this.content.name = res.data.title //档案名称
							this.content.gdtype = null //分类名称
						}
						if (this.type == 0) {
							this.isOver(this.parameter)
							this.getBackNo(this.parameter.nodeId)
						}

					})
				} else if (this.fkFlow == '009') {
					uni.$u.http.get('/oa/leave/sel/' + id).then(res => {
						this.content = res.data
						this.content.workid = this.workid
						if (this.gdType == true) {
							this.content.typeId = null //归档分类
							this.content.archiveNo = null //档案编号
							this.content.archiveFormNo = null
							this.content.printNum = null //打印份数
							this.content.name = res.data.title //档案名称
							this.content.gdtype = null //分类名称
						}
						if (this.type == 0) {
							this.isOver(this.parameter)
							this.getBackNo(this.parameter.nodeId)
						}
					})
				} else if (this.fkFlow == '015') {
					uni.$u.http.get('/offcial/car/sel/' + id).then(res => {
						this.content = res.data
						this.content.workid = this.workid
						if (this.gdType == true) {
							this.content.typeId = null //归档分类
							this.content.archiveNo = null //档案编号
							this.content.archiveFormNo = null
							this.content.printNum = null //打印份数
							this.content.name = res.data.title //档案名称
							this.content.gdtype = null //分类名称
						}
						if (this.type == 0) {
							this.isOver(this.parameter)
							this.getBackNo(this.parameter.nodeId)
						}
					})
				} else if (this.fkFlow == '020') {
					uni.$u.http.post('/duty/dutyAdjust/getLastDutyAdjustByUserId/app/' + id).then(res => {
						this.content = res.data
						this.content.workid = this.workid
						if (this.gdType == true) {
							this.content.typeId = null //归档分类
							this.content.archiveNo = null //档案编号
							this.content.archiveFormNo = null
							this.content.printNum = null //打印份数
							this.content.name = res.data.title //档案名称
							this.content.gdtype = null //分类名称
						}
						console.log('type', this.type)
						if (this.type == 0) {
							this.isOver(this.parameter)
							this.getBackNo(this.parameter.nodeId)
						}
					})
				} else if (this.fkFlow == '017' || this.fkFlow == '018') {
					uni.$u.http.get('/offcial/seal/sel/' + id).then(res => {
						this.content = res.data
						console.log('‘，', this.content)
						this.rowThis.ywFileList.push(this.content.fuJianFile)
						this.content.workid = this.workid
						if (this.gdType == true) {
							this.content.typeId = null //归档分类
							this.content.archiveNo = null //档案编号
							this.content.archiveFormNo = null
							this.content.printNum = null //打印份数
							this.content.name = res.data.title //档案名称
							this.content.gdtype = null //分类名称
						}
						console.log('type', this.type)
						if (this.type == 0) {
							this.isOver(this.parameter)
							this.getBackNo(this.parameter.nodeId)
						}
					})
				} else if (this.fkFlow == '016') {
					console.log('id', id)
					uni.$u.http.get('/offcial/supervision/sel/' + id).then(res => {
						// console.log(res)
						this.content = res.data
						this.content.workid = this.workid
						if (this.gdType == true) {
							this.content.typeId = null //归档分类
							this.content.archiveNo = null //档案编号
							this.content.archiveFormNo = null
							this.content.printNum = null //打印份数
							this.content.name = res.data.title //档案名称
							this.content.gdtype = null //分类名称
						}
						if (this.type == 0) {
							this.isOver(this.parameter)
							this.getBackNo(this.parameter.nodeId)
						}
					})
				}


			},
			// 查询请假类型
			getDicts() {
				uni.$u.http.get('/system/dict/data/type/leave_type').then(res => {
					this.statusList = res.data.map((item, index) => {
						let obj = {
							value: item.dictValue,
							id: item.dictValue,
							text: item.dictLabel
						}
						return obj
					})
				})
			},
			// 印章类型
			getDictsYongzhang() {
				uni.$u.http.get('/system/dict/data/type/signet_type').then(res => {
					this.yongzhangList = res.data.map((item, index) => {
						let obj = {
							value: item.dictValue,
							id: item.dictValue,
							text: item.dictLabel
						}
						return obj
					})
				})
			},
			//保存归档
			save() {
				if (this.content.typeId == null) {
					uni.showToast({
						title: "请选择归档分类",
						icon: "none"
					})
				} else {
					this.content.reviewMsg = "同意"
					uni.showLoading({
						title: "提交中...",
						mask: true
					})
					this.content.archiveFormNo = this.fkFlow
					uni.$u.http.post("/offcial/archive/save", this.content).then(res => {
						uni.$u.http.get('/jflow/restful/GenerNextStepAllNode', {
							params: {
								workid: this.parameter.workid,
								token: uni.getStorageSync('jtoken'),
								flowNo: this.parameter.flowNo,
							}
						}).then(qwe => {
							uni.hideLoading()
							uni.showToast({
								title: "归档成功",
								icon: "none",
								mask: true,
								duration: 2000
							})
							console.log('nodeId', this.nodeId)
							// if (this.nodeId == '2004') {
							// 	console.log('2222')
							// 	uni.$u.http.post("duty/dutyAdjust/updateYwDutyAdjustAudit", {
							// 		workId: this.workid,
							// 		status: this.YorN,
							// 		msg: this.content.reviewMsg,
							// 	}, {
							// 		header: {
							// 			// 'content-Type: 'multipart/form-data'
							// 			'content-Type': 'application/x-www-form-urlencoded'
							// 		}
							// 	})
							// 	if (this.YorN == 1) {
							// 		uni.$u.http.post('/duty/dutyAdjust/execAdjustDuty', {
							// 			workId: this.workid,
							// 		}, {
							// 			header: {
							// 				// 'content-Type: 'multipart/form-data'
							// 				'content-Type': 'application/x-www-form-urlencoded'
							// 			}
							// 		}).then((res)=>{
							// 			console.log('AAAAAAAAAAAAAAAAAAAAAAAAAAA')
							// 		})
							// 	}
							// }
							uni.$emit('query', {
								a: 'back'
							})
							setTimeout(() => {
								uni.navigateBack()
							}, 3000)
						})
					}).catch(res => {
						uni.hideLoading()
						uni.showToast({
							title: "请稍后重试",
							icon: "none"
						})
					})

				}
			},
			//查询流转记录
			getRecord(id) {
				uni.$u.http.get('/jflow/restful/getWfGenerWorkList', {
					params: {
						workID: id,
						token: uni.getStorageSync('jtoken')
					}
				}).then(res => {
					// console.log(res)
					this.record = res.trackList
					for (let i in res.trackList) {
						if (res.trackList[i].ActionType !== '28') {
							if (res.trackList[i].ActionType22 != undefined) {
								this.lzNum = this.lzNum + res.trackList[i].ActionType22.length
							} else {
								this.lzNum = this.lzNum + 1
							}
						}
					}
					if (this.type == 0) {
						// this.content.jdindex = null //下一节点索引
						// this.content.nodeId = null //下一节点ID
						// this.content.optionName = null //节点名称
						this.content.reviewMsg = null //审批意见
						this.content.users = null //发送给指定人员
						// this.content.toNodeId = null 
						this.content.userList = null //人员列表

					}
				})
			},
			//查询下一步所有节点
			jdList(id, flow) {
				uni.$u.http.get('/jflow/restful/GenerNextStepNode', {
					params: {
						workid: id,
						token: uni.getStorageSync('jtoken'),
						flowNo: flow
					}
				}).then(res => {
					this.id = res[0].NodeID
					this.content.jdindex = 0 //下一节点索引
					this.DeliveryWay = res[0].DeliveryWay //下一节点状态
					this.content.toNodeId = res[0].NodeID //下一节点ID
					this.content.nodeId = res[0].NodeID //下一节点ID
					this.content.optionName = res[0].Name //节点名称
					this.list = res.map((item, index) => {
						let obj = {
							value: index,
							id: item.NodeID,
							text: item.Name,
							DeliveryWay: item.DeliveryWay
						}
						return obj
					})
				})

			},
			//节点选择
			change(e) {
				if (e >= 0) {
					this.id = this.list[e].id
					this.DeliveryWay = this.list[e].DeliveryWay
					this.content.toNodeId = this.list[e].id
					this.content.nodeId = this.list[e].id
					this.content.optionName = this.list[e].text
				}

			},
			//选择人员相关
			choosePeo() {
				if (this.id == null) {
					uni.showToast({
						title: "请先选择下一节点",
						icon: "none"
					})
				} else {
					uni.navigateTo({
						url: `/pages/peoChoose/peoChoose?workid=${this.workid}&flowNo=${this.flowNo}&id=${this.id}`,
					})
				}
			},
			//选择归档分类
			chooseGd() {
				uni.navigateTo({
					url: "/pages/file/file"
				})
			},
			//判断是否为最后一步
			isOver(v) {
				uni.$u.http.get("/jflow/restful/judgeNode", {
					params: {
						nodeId: v.nodeId
					}
				}).then(res => {
					if (res.msg == "Y") {
						this.overType = true
					} else {
						console.log('111111111111111')
						this.overType = false
						this.jdList(v.workid, v.flowNo)
					}
				})
			},
			//提交待办
			submit() {
				console.log(this.nodeId)
				if (this.overType == false && this.id == null) {
					uni.showToast({
						title: "请先选择下一节点",
						icon: "none"
					})
				} else if (this.nodeId != '1605') {
					if (this.content.reviewMsg == null && this.content.msg == null) {
						uni.showToast({
							title: "请填写审核意见",
							icon: "none"
						})
					}
					console.log('1111111111111111111')
					this.YorN = "1";
					uni.showLoading({
						title: "提交中...",
						mask: true
					})
					if (this.fkFlow == '009') {
						uni.$u.http.post("/oa/leave/sendNextSteep", this.content, {
							header: {
								// 'content-Type: 'multipart/form-data'
								'content-Type': 'application/x-www-form-urlencoded'
							}
						}).then(res => {
							// console.log(res)
							// uni.hideLoading()
							if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
								uni.showToast({
									title: "已发送到" + res.data.VarToNodeName + "节点，接收人：" + res
										.data.VarAcceptersName,
									icon: "none",
									mask: true,
									duration: 3000
								})
							} else if (res.data.VarAcceptersName == "结束") {
								uni.showToast({
									title: res.data.Message,
									icon: "none",
									mask: true,
									duration: 3000
								})
							} else {
								uni.showToast({
									title: res.data.Message.replace(/[@]/g, ""),
									icon: "none",
									mask: true,
									duration: 3000
								})
							}
							console.log('nodeId', this.nodeId)
							if (this.content.nodeId == '2004') {
								console.log('2222')
								uni.$u.http.post("duty/dutyAdjust/updateYwDutyAdjustAudit", {
									workId: this.workid,
									status: this.YorN,
									msg: this.content.reviewMsg,
								}, {
									header: {
										// 'content-Type: 'multipart/form-data'
										'content-Type': 'application/x-www-form-urlencoded'
									}
								})
								if (this.YorN == 1) {
									uni.$u.http.post('/duty/dutyAdjust/execAdjustDuty', {
										workId: this.workid,
									}, {
										header: {
											// 'content-Type: 'multipart/form-data'
											'content-Type': 'application/x-www-form-urlencoded'
										}
									})
								}
							}
							uni.$emit('query', {
								a: 'back'
							})
							setTimeout(() => {
								uni.navigateBack()
							}, 2000)
						}).catch(res => {
							// console.log(res)
							uni.hideLoading()
							uni.showToast({
								title: "请稍后重试",
								icon: "none"
							})
						})
					} else {
						if (this.nodeId == '1701') {
							if (this.content.users == null || this.content.users == undefined || this
								.content.users == '') {
								uni.showToast({
									title: "请选择接收人",
									icon: "none"
								})
								uni.hideLoading()
								return
							} else {
								this.content.fileId = this.rowThis.ywFileList[0].fileId
								uni.$u.http.put('/offcial/seal', this.content).then((res) => {
									console.log(res)
								})
							}

						}
						uni.$u.http.post("/offcial/receive/sendFlowToUsers", this.content, {
							header: {
								// 'content-Type: 'multipart/form-data'
								'content-Type': 'application/x-www-form-urlencoded'
							}
						}).then(res => {
							console.log('11111', res)
							// uni.hideLoading()
							if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
								uni.showToast({
									title: "已发送到" + res.data.VarToNodeName + "节点，接收人：" + res
										.data.VarAcceptersName,
									icon: "none",
									mask: true,
									duration: 3000
								})
							} else if (res.data.VarAcceptersName == "结束") {
								uni.showToast({
									title: res.data.Message,
									icon: "none",
									mask: true,
									duration: 3000
								})
							} else {
								uni.showToast({
									title: res.data.Message.replace(/[@]/g, ""),
									icon: "none",
									mask: true,
									duration: 3000
								})
							}
							console.log('nodeId', this.nodeId)
							if (this.content.nodeId == '2004') {
								console.log('2222')
								uni.$u.http.post("duty/dutyAdjust/updateYwDutyAdjustAudit", {
									workId: this.workid,
									status: this.YorN,
									msg: this.content.reviewMsg,
								}, {
									header: {
										// 'content-Type: 'multipart/form-data'
										'content-Type': 'application/x-www-form-urlencoded'
									}
								})
								if (this.YorN == 1) {
									uni.$u.http.post('/duty/dutyAdjust/execAdjustDuty', {
										workId: this.workid,
									}, {
										header: {
											// 'content-Type: 'multipart/form-data'
											'content-Type': 'application/x-www-form-urlencoded'
										}
									})
								}
							}
							uni.$emit('query', {
								a: 'back'
							})
							setTimeout(() => {
								uni.navigateBack()
							}, 2000)
						}).catch(res => {
							console.log('555', res)
							uni.hideLoading()
							uni.showToast({
								title: "请稍后重试",
								icon: "none"
							})
						})
					}

				}
			},
			//查询是否能退回
			getBackNo(id) {
				uni.$u.http.get("/jflow/restful/CurrNodeInfo?currNodeID=" + id).then(res => {
					// console.log(res)
					if (res[0].ReturnRole != 0) {
						this.getBackList()
						this.backType = true
						this.content.returnToNodeID = null
						this.content.backMsg = null
					}
				})
			},
			//获取退回节点列表
			getBackList() {
				uni.$u.http.get("/jflow/restful/getReturnWorkNode", {
					params: {
						workid: this.parameter.workid,
						token: uni.getStorageSync('jtoken')
					}
				}).then(res => {
					this.backlist = res.map((item, index) => {
						let obj = {
							value: item.No,
							id: item.No,
							text: item.Name,
						}
						return obj
					})
				})
			},
			//退回上一节点
			back() {
				if (this.content.returnToNodeID == null) {
					uni.showToast({
						title: "请选择退回节点",
						icon: "none"
					})
				} else if (this.content.backMsg == null) {
					uni.showToast({
						title: "请填写退回意见",
						icon: "none"
					})
				} else {
					uni.showLoading({
						title: "退回中...",
					})
					uni.$u.http.get("/offcial/receive/NodeReturnWork", {
						params: {
							workid: this.parameter.workid,
							returnToNodeID: this.content.returnToNodeID,
							returnMsg: this.content.backMsg
						}
					}).then(res => {
						uni.hideLoading()
						this.close()
						uni.showToast({
							title: res,
							icon: "none",
							duration: 2000
						})
						uni.$emit('query', {
							a: 'back'
						})
						setTimeout(() => {
							uni.navigateBack()
						}, 2000)
					}).catch(error => {
						uni.hideLoading()
						uni.showToast({
							title: "请稍后重试",
							icon: "none"
						})
					})
				}

			},
			//关闭模态框
			close() {
				this.content.returnToNodeID = null
				this.content.backMsg = null
				this.content.msg = null
				this.content.reviewMsg = null
				this.show1 = false
				this.show = false
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		font-size: 32rpx;
	}

	.tab {
		width: 48%;
		height: 100%;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.active {
		color: #2979ff
	}
</style>