<!-- 查看任务详情 -->
<template>
	<div class='taskDetails'>
		<div class="detailHeader">
			<div class="titleStatusName">
				<span class="titleWid">{{taskForm.title}}</span>
				<span class="statusBg" :style="{color: $common.colorStatus(taskForm.status)}">{{$common.statusName(taskForm.status)}}</span>
			</div>
			<div class="textBtns">
				<el-button type="text" @click="openHistory"><i class="el-icon-view"></i>查看任务历史</el-button>
				<el-button type="text" @click="goList('taskForm')"><i class="el-icon-back"></i>返回列表</el-button>
			</div>
		</div>
		<div style="text-align: right;"></div>
		<div style="height: 90%;margin-top: 20px;">
			<el-form :model="taskForm" :rules="rules" ref="taskForm" class="demo-ruleForm">
				<el-row :gutter="5">
					<el-col :span="6">
						<!--<el-form-item label="任务标题:" prop="title">-->
							<!--<span :title="taskForm.title" class="titleSpans">{{taskForm.title}}</span>-->
						<!--</el-form-item>-->
						<el-form-item class="oneLeftLabel" label="发布者:" >
							<span>{{taskForm.publisher.username}}</span>
						</el-form-item>
						<el-form-item class="oneLeftLabel" label="相关任务:" >
							<span v-if="relatedTableData.length === 0">无</span>
							<span v-if="relatedTableData.length > 0" class="mainTaskSpan" @click="showTaskMain">{{relatedTableData[0].title}}</span>
						</el-form-item>
						<!--<el-form-item class="oneLeftLabel" v-if="taskForm.status === 'audit' || taskForm.status === 'review' || taskForm.status === 'finished' || taskForm.status === 'delete'" label="提交时间:">-->
							<!--<span v-if="taskForm.status === 'audit' || taskForm.status === 'review' || taskForm.status === 'finished' || taskForm.status === 'delete'">{{taskForm.submitTime}}</span>-->
						<!--</el-form-item>-->
					</el-col>
					<el-col :span="6">
						<el-form-item label="组长:" >
							<span>{{taskForm.executor.username}}</span>
							<!--<el-select style="width: 100%;" v-model="taskForm.executor.id" placeholder="请选择组长">-->
							<!--<el-option-->
							<!--v-for="item in leaderOptions"-->
							<!--:key="item.id"-->
							<!--:label="item.username"-->
							<!--:value="item.id">-->
							<!--</el-option>-->
							<!--</el-select>-->
						</el-form-item>
						<!--<el-form-item label="任务开始时间:">-->
							<!--<span>{{taskForm.stateTime}}</span>-->
							<!--&lt;!&ndash;<el-date-picker v-if="taskForm.status !== 'audit'" type="date" placeholder="选择日期" v-model="taskForm.startTime" style="width: 100%;"></el-date-picker>&ndash;&gt;-->
						<!--</el-form-item>-->
						<!--<el-form-item v-if="taskForm.status === 'review' || taskForm.status === 'finished' || taskForm.status === 'delete'" label="审核时间:">-->
							<!--<span v-if="taskForm.status === 'review' || taskForm.status === 'finished' || taskForm.status === 'delete'">{{taskForm.auditTime}}</span>-->
						<!--</el-form-item>-->
						<el-form-item label="审核者:">
							<span v-if="taskForm.audit !== null && taskForm.audit !== undefined">{{taskForm.audit.username}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="6">
						<el-form-item class="inputCount" v-if="((isPublisher === true || isAudit === true) && (taskForm.status === 'ongoing' || taskForm.status === 'audit')) || (isFinishCanEdit === true && taskForm.status === 'finished')" label="任务量(天):" prop="workload">
							<el-input v-model.number="taskForm.workload"></el-input>
						</el-form-item>
						<el-form-item v-if="(isExecutor === true && (isPublisher === false|| isAudit === false)) || ((isPublisher === true || isAudit === true) && (taskForm.status !== 'audit' && taskForm.status !== 'ongoing' && taskForm.status !== 'finished')) || ((isPublisher === true || isAudit === true) && isFinishCanEdit === false && taskForm.status !== 'ongoing' && taskForm.status !== 'audit') || taskForm.status === 'delete'" label="任务量(天):" prop="workload">
							<span>{{taskForm.workload}}</span>
						</el-form-item>
						<!--<el-form-item label="预计完成时间:" prop="completeTime">-->
							<!--<span>{{taskForm.completeTime}}</span>-->
							<!--&lt;!&ndash;<el-date-picker type="date" placeholder="选择日期" v-model="taskForm.endTime" style="width: 100%;"></el-date-picker>&ndash;&gt;-->
						<!--</el-form-item>-->
						<!--<el-form-item v-if="isPublisher === false && taskForm.status !== 'audit' && taskForm.status !== 'finished'" label="任务量(天):" prop="workload">-->
							<!--<span v-if="taskForm.status !== 'audit' && taskForm.status !== 'finished'">{{taskForm.workload}}</span>-->
						<!--</el-form-item>-->
						<!--<el-form-item label="任务状态:">-->
							<!--<span :style="{color: $common.colorStatus(taskForm.status)}">{{$common.statusName(taskForm.status)}}</span>-->
						<!--</el-form-item>-->
						<!--<el-form-item v-if="taskForm.status === 'finished'" label="结束时间:">-->
							<!--<span v-if="taskForm.status === 'finished'">{{taskForm.endTime}}</span>-->
						<!--</el-form-item>-->
						<el-form-item label="任务创建时间:">
							<span>{{taskForm.createTime}}</span>
							<!--<el-date-picker type="date" placeholder="选择日期" v-model="taskForm.endTime" style="width: 100%;"></el-date-picker>-->
						</el-form-item>
					</el-col>
					<el-col :span="6">
						<el-form-item class="inputCount" v-if="(taskForm.status === 'audit' && (isPublisher === true || isAudit === true)) || (((isPublisher === true || isAudit === true) || isExecutor === true) && (taskForm.status === 'review')) || taskForm.status === 'finished' || taskForm.status === 'delete'" label="考评分数:" prop="workCoefficient">
							<span v-if="(taskForm.status === 'review' || taskForm.status === 'finished' || taskForm.status === 'delete') && isFinishCanEdit === false">{{taskForm.workCoefficient}}</span>
							<el-input v-if="((isPublisher === true || isAudit === true) && taskForm.status === 'audit') || (isFinishCanEdit === true && taskForm.status === 'finished')" v-model.number="taskForm.workCoefficient"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<div>
					<el-form-item label="任务时间轴:">
						<el-steps :active="timelines" finish-status="success">
							<!--<el-step icon="el-icon-time" title="任务创建时间" :description="taskForm.createTime"></el-step>-->
							<el-step v-for="(item,index) in timelineList" :key="index" :class="[{returnTimeLine: isTimeLineReturn === true && index === timelines && item.name === '任务提交时间'}, {returnTimeLineLeft: isTimeLineReturn === true && index === timelines - 1 && taskForm.status === 'ongoing'}]" :title="item.name" :description="item.des"></el-step>
							<!--<el-step  title="任务开始时间" :description="taskForm.stateTime"></el-step>-->
							<!--<el-step title="预计完成时间" :description="taskForm.completeTime"></el-step>-->
							<!--<el-step  title="任务提交时间" :description="taskForm.submitTime"></el-step>-->
							<!--<el-step  title="任务审核时间" :description="taskForm.endTime"></el-step>-->
							<!--<el-step  title="任务完结时间" :description="taskForm.endTime"></el-step>-->
						</el-steps>
					</el-form-item>
					<el-form-item class="groupAdd contentGroup selectGroupCount" label="组员:">
							<div class="groupItemDiv" v-if="isPublisher === false || (isPublisher === true && taskForm.status !== 'ongoing')">
								<span v-for="(item, index) in taskForm.crewList" :key="index">{{item.username}}</span>
							</div>
						<el-select v-if="isPublisher === true && taskForm.status === 'ongoing'" style="width: 100%;" @remove-tag="groupRemove" @change="addGroupChange" v-model="taskForm.crewList" multiple placeholder="请选择">
							<el-option
											v-for="item in memberOptions"
											:key="item.id"
											:label="item.username"
											:value="item.id">
								<span style="display: inline-block;width: 70px;">{{item.username}}</span>
								<span :style="{color: $common.colorNum(item.status)}">({{$common.personStatusName(item.status)}})</span>
							</el-option>
						</el-select>
					</el-form-item>
				</div>
				<div>
					<el-form-item class="contentGroup" label="任务内容:">
						<div class="contentDetails" v-html="taskForm.content">{{taskForm.content}}</div>
					</el-form-item>
				</div>
					<el-form-item class="oneLeftLabel" label="附件:">
						<div>
							<div  class="upload-file">
								<ul class="viewFileLi">
									<li v-for="(item,index) in taskForm.attachment" @click="downloadFile(item)" :key="index">
										<div style="text-align: left;">
											<img v-show="item.suffix === 'pdf'" src="../../assets/images/yd-pdf.png"/>
											<img v-show="item.suffix === 'png'" src="../../assets/images/yd-png.png"/>
											<img v-show="item.suffix === 'rar'" src="../../assets/images/yd-rar.png"/>
											<img v-show="item.suffix === 'jpg'" src="../../assets/images/yd-jpg.png"/>
											<img v-show="item.suffix === 'tp'" src="../../assets/images/yd-tp.png"/>
											<img v-show="item.suffix === 'word' || item.suffix === 'doc' || item.suffix === 'docx'" src="../../assets/images/yd-word.png"/>
											<img v-show="item.suffix === 'xml'" src="../../assets/images/yd-xml.png"/>
											<img v-show="item.suffix === 'zip'" src="../../assets/images/yd-zip.png"/>
											<span style="color: #5059d5;">{{item.name}}({{item.type === 'work' ? '工作' : '初始'}})</span>
										</div>
									</li>
								</ul>
							</div>
						</div>
					</el-form-item>
			</el-form>
		</div>
		<div style="text-align: center;width: 90%;height: 10%;margin: 15px auto;padding-bottom:30px;clear:both;">
			<el-button v-show="((isPublisher === true || isAudit === true) && (taskForm.status === 'audit' || taskForm.status === 'ongoing')) || (isFinishCanEdit === true && taskForm.status === 'finished')" type="primary" @click="openChangeTaskDialog('taskForm')">保存修改</el-button>
			<el-button style="float: right;" v-show="isExecutor === true && taskForm.status === 'ongoing' && isCanSubmit === true" type="primary" @click="openSubmitTaskDialog()">完成任务</el-button>
			<el-button style="clear: both;" v-show="isExecutor === true && isCanBreakDown && taskForm.status === 'ongoing' && isWorkLoadClear === false" type="primary" @click="breakDownTask()">分解任务</el-button>
			<el-button style="float: right;" v-show="isExecutor === true && taskForm.status === 'audit'" type="primary" @click="openWithdrawTaskDialog()">撤回任务</el-button>
			<el-button style="float: right;" v-show="(((taskForm.generalManagers !== undefined && taskForm.generalManagers.length > 0 && taskForm.generalManagers.findIndex(item => item.id === userDetail.id) > -1) || (taskForm.assistantManagers !== undefined && taskForm.assistantManagers.length > 0 && taskForm.assistantManagers.findIndex(item => item.id === userDetail.id) > -1) || (taskForm.majordomos !== undefined && taskForm.majordomos.length > 0 && taskForm.majordomos.findIndex(item => item.id === userDetail.id) > -1 && evaStatus !== '6')) || (isAudit === true && isEditEva === true) || (isExecutor === true && evaStatus !== '6')) && (taskForm.status === 'review' || taskForm.status === 'finished')" type="primary" @click="openEvaTaskDialog()">考评任务</el-button>
			<el-button style="float: right;" v-show="(taskForm.status === 'finished' && (taskForm.generalManagers !== undefined && taskForm.generalManagers.length > 0 && taskForm.generalManagers.findIndex(item => item.id === userDetail.id) === -1) && (taskForm.assistantManagers !== undefined && taskForm.assistantManagers.length > 0 && taskForm.assistantManagers.findIndex(item => item.id === userDetail.id) === -1)) || taskForm.status === 'delete'" type="primary" @click="openViewTaskEvaDialog()">查看考评</el-button>
			<!--(isAudit === true || isFinishCanEdit === true)  删除-->
			<el-button style="background: #FC1F1F;" v-show="(userDetail.roles !== undefined && userDetail.roles.length > 0 && userDetail.roles[0].authorities.findIndex(item => item.name === '删除任务') > -1) && (taskForm.status === 'audit' || taskForm.status === 'finished') && taskForm.status !== 'delete'" type="primary" @click="openDeleteTaskDialog('taskForm')">删除任务</el-button>
			<el-button style="float: right;" v-show="isAudit === true && taskForm.status === 'audit'" @click="reviewBtnClick('ongoing', 'taskForm')" type="primary" >审核不通过</el-button>
			<el-button style="float: right;" v-show="isAudit === true && taskForm.status === 'audit'" @click="reviewBtnClick('review', 'taskForm')" type="primary" >审核通过</el-button>
		</div>
		<div>

		</div>
		<history :showHistoryDialog="showHistoryDialog" :historyData="historyDatas" @close="closeHistory()"></history>

		<div>
			<el-dialog title="任务修改" :show-close="false" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false" :lock-scroll="true" :visible.sync="dialogTaskChangeVisible">
				<div slot="title" class="header-title">
					<span class="dialogHeader">任务修改</span>
					<img @click="closeChangeTaskDialog()" class="dialogHeaderClose" src="../../assets/images/dialogClose.png" />
				</div>
				<div class="taskPush">
					<span >修改说明：</span>
					<el-input
									type="textarea"
									:rows="12"
									style="margin-top: 30px;"
									placeholder="请输入修改说明"
									v-model="changeTaskTextarea">
					</el-input>
				</div>
				<div class="dialogBtns">
					<el-button class="mrgt" type="primary" @click="changeTaskSubmit()">确定</el-button>
				</div>
			</el-dialog>
		</div>
		<div>
			<el-dialog title="审核不通过" :show-close="false" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false" :lock-scroll="true" :visible.sync="dialogTaskFailVisible">
				<div slot="title" class="header-title">
					<span class="dialogHeader">审核不通过</span>
					<img @click="closeFailTaskDialog()" class="dialogHeaderClose" src="../../assets/images/dialogClose.png" />
				</div>
				<div class="taskPush">
					<span >审核不通过说明：</span>
					<el-input
									type="textarea"
									:rows="12"
									style="margin-top: 30px;"
									placeholder="请输入审核不通过说明"
									v-model="failTaskTextarea">
					</el-input>
				</div>
				<div class="dialogBtns">
					<el-button class="mrgt" type="primary" @click="failTaskSubmit('ongoing')">确定</el-button>
				</div>
			</el-dialog>
		</div>
		<div>
			<el-dialog title="完成任务" :show-close="false" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false" :lock-scroll="true" :visible.sync="dialogTaskSubmitVisible">
				<div slot="title" class="header-title">
					<span class="dialogHeader">完成任务</span>
					<img @click="closeSubmitTaskDialog()" class="dialogHeaderClose" src="../../assets/images/dialogClose.png" />
				</div>
				<div>
					<div class="taskUploadTitle">
						<span >完成任务说明：</span>
						<el-input
										type="textarea"
										:rows="12"
										style="margin-top: 10px;"
										placeholder="请输入提交说明"
										v-model="submitTaskTextarea">
						</el-input>
					</div>
					<div class="taskUpload">
						<div class="upload-container">
							<div class="upload-file" style="margin-left: 0px;">
								<el-upload
												class="upload-demo"
												ref="upload"
												action="https://jsonplaceholder.typicode.com/posts/"
												:http-request="handleChange"
												:on-remove="handleRemove"
												:on-exceed="handleExceed"
												:before-upload="beforeAvatarUpload"
												:file-list="fileList"
												:auto-load="false"
												:limit="5">
									<el-button size="small" @click="submitUpload" style="margin-top: 20px;">添加附件</el-button>
									<!--<button>添加附件</button>-->
									<div slot="tip" style="margin-top: 10px;">最多只能上传5个文件，否则请上传压缩包！</div>
								</el-upload>
							</div>
						</div>
					</div>
					<div class="dialogBtns">
						<el-button class="mrgt" type="primary" @click="statusTaskSubmit('audit', '提交')">确定</el-button>
					</div>
				</div>
			</el-dialog>
		</div>
		<div>
			<el-dialog title="任务撤回" :show-close="false" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false" :lock-scroll="true" :visible.sync="dialogTaskWithdrawVisible">
				<div slot="title" class="header-title">
					<span class="dialogHeader">任务撤回</span>
					<img @click="closeWithdrawTaskDialog()" class="dialogHeaderClose" src="../../assets/images/dialogClose.png" />
				</div>
				<div class="taskPush">
					<span >撤回说明：</span>
					<el-input
									type="textarea"
									:rows="12"
									style="margin-top: 30px;"
									placeholder="请输入撤回说明"
									v-model="withdrawTaskTextarea">
					</el-input>
				</div>
				<div class="dialogBtns">
					<el-button class="mrgt" type="primary" @click="statusTaskSubmit('ongoing', '撤回')">确定</el-button>
				</div>
			</el-dialog>
		</div>
		<div>
			<el-dialog title="任务评价" :show-close="false" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false" :lock-scroll="true" :visible.sync="dialogTaskEvaVisible">
				<div slot="title" class="header-title">
					<span class="dialogHeader">任务评价</span>
					<img @click="closeEvaTaskDialog()" class="dialogHeaderClose" src="../../assets/images/dialogClose.png" />
				</div>
				<div class="taskPushScore">
					<el-form ref="evaForm" :rules="evaRules" :model="evaForm" label-width="140px">
						<!--<el-form-item v-if="isPublisher === true || (isExecutor === true && isEditEva === true) || (isPublisher === false && isExecutor === false)" label="自我评分" >-->
							<!--&lt;!&ndash;prop="score1"&ndash;&gt;-->
							<!--<el-input :disabled="isPublisher === true || (isExecutor === true && isEditEva === true)" v-model="evaForm.score1"></el-input>-->
						<!--</el-form-item>-->
						<div v-if="dialogTaskEvaVisible === true">
							<el-form-item label="自我评分" prop="score1">
								<el-input :disabled="isExecutor === false || evaStatus !== '1'" v-model.number="evaForm.score1"></el-input>

								<!--<el-input :disabled="isExecutor === false || evaStatus !== '1'" v-model.number="evaForm.score1"></el-input>-->
							</el-form-item>
							<el-form-item label="组长评分" prop="groupLeaderScore2">
								<!--(taskForm.majordomos !== undefined && taskForm.majordomos.length > 0 && taskForm.majordomos.findIndex(item => item.id === userDetail.id) === -1) ||-->
								<el-input :disabled="isAudit === false || evaForm.viceScore3 !== '' || evaForm.justScore4 !== '' || evaStatus === '1' || evaStatus === '4' || evaStatus === '5'" v-model.number="evaForm.groupLeaderScore2"></el-input>
							</el-form-item>
							<el-form-item label="总监评分" prop="directorScore2">
								<el-input :disabled="(taskForm.majordomos !== undefined && taskForm.majordomos.length > 0 && taskForm.majordomos.findIndex(item => item.id === userDetail.id) === -1) || evaStatus === '1' || evaStatus === '4' || evaStatus === '5' || evaStatus === '6'" v-model.number="evaForm.directorScore2"></el-input>
							</el-form-item>
							<el-form-item label="副总经理评分" prop="viceScore3">
								<el-input :disabled="(taskForm.assistantManagers !== undefined && taskForm.assistantManagers.length > 0 && taskForm.assistantManagers.findIndex(item => item.id === userDetail.id) === -1) || evaStatus === '1' || evaStatus === '2'" v-model.number="evaForm.viceScore3"></el-input>
							</el-form-item>
							<el-form-item label="总经理评分" prop="justScore4">
								<el-input :disabled="(taskForm.generalManagers !== undefined && taskForm.generalManagers.length > 0 && taskForm.generalManagers.findIndex(item => item.id === userDetail.id) === -1) || evaStatus === '1' || evaStatus === '2' || evaStatus === '4'" v-model.number="evaForm.justScore4"></el-input>
							</el-form-item>
						</div>
					</el-form>
					<div class="dialogBtns" style="text-align: center;">
						<el-button class="mrgt" type="primary" @click="submitEvaDialog('evaForm')">确定</el-button>
					</div>
				</div>
			</el-dialog>
		</div>
		<div>
			<el-dialog title="查看任务评价" :show-close="false" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false" :lock-scroll="true" :visible.sync="dialogViewTaskEvaVisible">
				<div slot="title" class="header-title">
					<span class="dialogHeader">查看任务评价</span>
					<img @click="closeViewTaskEvaDialog()" class="dialogHeaderClose" src="../../assets/images/dialogClose.png" />
				</div>
				<div class="lookScore">
					<ul class="viewEvaLi">
						<li>自我评分：{{evaForm.score1}}</li>
						<li>组长评分：{{evaForm.groupLeaderScore2}}</li>
						<li>总监评分：{{evaForm.directorScore2}}</li>
						<li>副总经理评分：{{evaForm.viceScore3}}</li>
						<li>总经理评分：{{evaForm.justScore4}}</li>
					</ul>
				</div>
			</el-dialog>
		</div>
		<div>
			<el-dialog title="查看附件" :show-close="false" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false" :lock-scroll="true" :visible.sync="dialogViewTaskFileVisible">
				<div slot="title" class="header-title">
					<span class="dialogHeader">查看附件</span>
					<img @click="closeFileTaskDialog()" class="dialogHeaderClose" src="../../assets/images/dialogClose.png" />
				</div>
				<div style="text-align: left;">
					<ul class="viewFileLi">
						<li v-for="(item,index) in taskForm.attachment" :key="index">
							<div style="text-align: center;">
								<img v-show="item.suffix === 'pdf'" src="../../assets/images/yd-pdf.png"/>
								<img v-show="item.suffix === 'png'" src="../../assets/images/yd-png.png"/>
								<img v-show="item.suffix === 'rar'" src="../../assets/images/yd-rar.png"/>
								<img v-show="item.suffix === 'jpg'" src="../../assets/images/yd-jpg.png"/>
								<img v-show="item.suffix === 'tp'" src="../../assets/images/yd-tp.png"/>
								<img v-show="item.suffix === 'word'" src="../../assets/images/yd-word.png"/>
								<img v-show="item.suffix === 'xml'" src="../../assets/images/yd-xml.png"/>
								<img v-show="item.suffix === 'zip'" src="../../assets/images/yd-zip.png"/>
								<span>{{item.name}}</span>
							</div>
						</li>
					</ul>
				</div>
			</el-dialog>
		</div>
		<div>
			<el-dialog title="任务删除" :show-close="false" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false" :lock-scroll="true" :visible.sync="dialogDeleteTaskVisible">
				<div slot="title" class="header-title">
					<span class="dialogHeader">任务删除</span>
					<img @click="closeDeleteTaskDialog()" class="dialogHeaderClose" src="../../assets/images/dialogClose.png" />
				</div>
				<div class="taskPush">
					<div style="margin-bottom: 30px;">是否需要纳入统计：</div>
					<el-checkbox label="个人工作量" v-model="deleteCheck">个人工作量</el-checkbox>
					<el-checkbox label="任务工作量" v-model="deleteCheck">任务工作量</el-checkbox>
					<div style="margin-top: 30px;">
						<span >删除说明：</span>
						<el-input
										type="textarea"
										:rows="12"
										style="margin-top: 30px;"
										placeholder="请输入删除说明"
										v-model="deleteTextarea">
						</el-input>
					</div>
					<div class="dialogBtns" style="text-align: center;">
						<el-button class="mrgt" type="primary" @click="submitDeleteDialog()">确定</el-button>
					</div>
				</div>
			</el-dialog>
		</div>
		<div>
			<el-dialog title="相关任务" :show-close="false" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false" :lock-scroll="true" :visible.sync="dialogTaskMainVisible">
				<div slot="title" class="header-title">
					<span class="dialogHeader">相关任务查看</span>
					<img @click="closeTaskMainDialog()" class="dialogHeaderClose" src="../../assets/images/dialogClose.png" />
				</div>
				<div class="taskPush">
					<!--<el-tree :data="data"-->
						<!--@current-node-key="currentTask"-->
						<!--:default-expand-all="false"-->
						<!--:expand-on-click-node="false"-->
						<!--:props="defaultProps"-->
						<!--@node-click="handleNodeClick">-->
						<!--&lt;!&ndash; :render-content="renderContent" &ndash;&gt;-->
						<!--<span class="custom-tree-node" slot-scope="{ node, data }">-->
        			<!--<span :title="node.label" class="treeTitle">任务名称：{{ node.label }}</span>-->
        			<!--<span class="treeStatus" :style="{color: $common.colorStatus(node.data.status)}">{{$common.statusName(node.data.status)}}</span>-->
      			<!--</span>-->
					<!--</el-tree>-->
					<div class="mainTaskDialogDiv">
						<el-table
										:data="relatedTableData"
										style="width: 100%;margin-bottom: 20px;"
										row-key="workId"
										border
										default-expand-all
										:tree-props="{children: 'workMppings', hasChildren: 'hasChildren'}">
							<el-table-column
											prop="title"
											label="任务名称"
											show-overflow-tooltip
							>
							</el-table-column>
							<el-table-column
											prop="status"
											label="任务状态"
							>
								<template slot-scope="scope">
									<span :style="{color: $common.colorStatus(scope.row.status)}">{{$common.statusName(scope.row.status)}}</span>
								</template>
							</el-table-column>
						</el-table>
					</div>
					<!--<div>-->
						<!--<el-form v-if="taskForm.workVos !== undefined && taskForm.workVos !== null">-->
							<!--<el-row :gutter="20">-->
								<!--<el-col :span="8">-->
									<!--<el-form-item label="任务名称:" >-->
										<!--<span v-show="taskForm.workVos !== null">{{taskForm.workVos.title}}</span>-->
									<!--</el-form-item>-->
									<!--<el-form-item label="任务状态:" >-->
										<!--<span v-show="taskForm.workVos !== null" :style="{color: $common.colorStatus(taskForm.workVos.status)}">{{$common.statusName(taskForm.workVos.status)}}</span>-->
									<!--</el-form-item>-->
								<!--</el-col>-->
								<!--<el-col :span="8">-->
									<!--<el-form-item label="任务开始时间:" >-->
										<!--<span v-show="taskForm.workVos !== null">{{taskForm.workVos.stateTime}}</span>-->
									<!--</el-form-item>-->
									<!--<el-form-item label="发布者:" >-->
										<!--<span v-show="taskForm.workVos !== null">{{taskForm.workVos.publisher}}</span>-->
									<!--</el-form-item>-->
								<!--</el-col>-->
								<!--<el-col :span="8">-->
									<!--<el-form-item label="预计完成时间:" >-->
										<!--<span v-show="taskForm.workVos !== null">{{taskForm.workVos.completeTime}}</span>-->
									<!--</el-form-item>-->
									<!--<el-form-item label="组长:" >-->
										<!--<span v-show="taskForm.workVos !== null">{{taskForm.workVos.executor}}</span>-->
									<!--</el-form-item>-->
								<!--</el-col>-->
							<!--</el-row>-->
							<!--<div>-->
								<!--<el-form-item label="任务内容:" >-->
									<!--<div v-show="taskForm.workVos !== null" style="font-family: Alibaba;" class="mainTaskContent" v-html="taskForm.workVos.content">-->
										<!--{{taskForm.workVos.content}}-->
									<!--</div>-->
								<!--</el-form-item>-->
							<!--</div>-->
						<!--</el-form>-->
						<!--&lt;!&ndash;<div>&ndash;&gt;-->
							<!--&lt;!&ndash;<div style="width: 90%;">任务内容：</div>&ndash;&gt;-->

						<!--&lt;!&ndash;</div>&ndash;&gt;-->
					<!--</div>-->
					<!--<div class="dialogBtns" style="text-align: center;">-->
						<!--<el-button class="mrgt" @click="closeTaskMainDialog" type="primary">确定</el-button>-->
					<!--</div>-->
				</div>
			</el-dialog>
		</div>
	</div>
</template>

<script>
	//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
	//例如：import 《组件名称》 from '《组件路径》';
	import History from '../../components/taskHistory';
	import fileDownload from 'js-file-download'
	export default {
		name: "TaskDetails",
//import引入的组件需要注入到对象中才能使用
		components: { History },
		data () {
			let checkScore1 = (rule, value, callback) => {
				if (this.isExecutor === false) {
					callback();
				} else if (!value) {
					return callback(new Error('评分不能为空'));
				}
				if (this.evaStatus !== '1') {
					callback();
				}
				if (value > this.taskForm.workCoefficient) { //  * 100
					callback(new Error(`根据考评分数，评分不能超过${this.taskForm.workCoefficient}`)); //  * 100
				} else if (value < 50) {
					callback(new Error('根据考评分数，评分不能低于50'));
				} else if (!Number.isInteger(value)) {
					callback(new Error('评分必须为数字值'));
				} else {
					callback();
				}
			};
			let checkGroup = (rule, value, callback) => {
				console.log(rule)
				console.log(value)
				if (this.isAudit === false) {
					if ((this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) > -1) || this.evaStatus === '1' || this.evaStatus === '2' || this.evaStatus === '3' || this.evaStatus === '4' || this.evaStatus === '5' || this.evaStatus === '6') {
						callback();
					}
				} else {
					//this.evaForm.score1 === ''
					if (this.saveEvaScore.score1 === undefined || this.saveEvaScore.score1 === null || this.saveEvaScore.score1 === '') {
						callback();
					}
					// else if (this.evaForm.score1 !== '' && this.evaForm.groupLeaderScore2 !== '') {
					// 	console.log(22222222222)
					// 	callback();
					// }
					else if (this.evaStatus !== '1' && this.evaStatus !== '2') {
							callback();
					}
					else {
						if (!value) {
							return callback(new Error('评分不能为空'));
						} else if (value > this.taskForm.workCoefficient) { //  * 100
							callback(new Error(`根据考评分数，评分不能超过${this.taskForm.workCoefficient}`)); //  * 100
						} else if (value < 50) {
							callback(new Error('根据考评分数，评分不能低于50'));
						} else if (!Number.isInteger(value)) {
							callback(new Error('评分必须为数字值'));
						} else {
							callback();
						}
					}
				}
				// if (this.isAudit === false || this.evaStatus === '1' || this.evaStatus === '3' || this.evaStatus === '4' || this.evaStatus === '5' || this.evaStatus === '6') {
				// 	callback();
				// } else if (!value) {
				// 	return callback(new Error('评分不能为空'));
				// }

			};
			let checkDiretor = (rule, value, callback) => {
				if (this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1) {
					if (this.evaStatus === '1' || this.evaStatus === '2' || this.evaStatus === '4' || this.evaStatus === '5' || this.evaStatus === '6') {
						callback();
					}
				} else {
					if (this.evaStatus === '1' || this.evaStatus === '4' || this.evaStatus === '5' || this.evaStatus === '6') {
						callback();
					} else if (!value) {
						return callback(new Error('评分不能为空'));
					} else if (this.saveEvaScore.directorScore2 !== '') {
						callback();
					}
				}
				// if ((this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1) || this.evaStatus === '1' || this.evaStatus === '2' || this.evaStatus === '4' || this.evaStatus === '5' || this.evaStatus === '6') {
				// 	callback();
				// } else if (!value) {
				// 	return callback(new Error('评分不能为空'));
				// }
				if (value > this.taskForm.workCoefficient) { //  * 100
					callback(new Error(`根据考评分数，评分不能超过${this.taskForm.workCoefficient}`)); //  * 100
				} else if (value < 50) {
					callback(new Error('根据考评分数，评分不能低于50'));
				} else if (!Number.isInteger(value)) {
					callback(new Error('评分必须为数字值'));
				}
				// else if (this.evaForm.groupLeaderScore2 === '') {
				// 	this.evaForm.groupLeaderScore2 = value;
				// 	callback();
				// }
				else {
					callback();
				}
			};
			let checkVice = (rule, value, callback) => {
				console.log(rule, value)
				if ((this.taskForm.assistantManagers !== undefined && this.taskForm.assistantManagers.length > 0 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) === -1) || this.evaStatus === '1' || this.evaStatus === '2' || this.evaStatus === '3' || this.evaStatus === '5' || this.evaStatus === '6') {
					callback();
				} else if (!value) {
					return callback(new Error('评分不能为空'));
				}
				if (value > ((parseInt(this.evaForm.groupLeaderScore2) + parseInt(this.evaForm.directorScore2)) / 2)) { //  * 100
					// if (this.dialogTaskEvaVisible === true) {
						if (this.showAssTip === true && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) > -1) {
							this.$confirm(`根据考评分数最高为${this.taskForm.workCoefficient}, 是否继续?`, '提示', {
								confirmButtonText: '确定',
								cancelButtonText: '取消',
								type: 'warning'
							}).then(() => {
								// console.log(111)
								this.showAssTip = false;
								this.evaForm.viceScore3 = value;
							}).catch(() => {
								this.showAssTip = false;
								this.evaForm.viceScore3 = this.taskForm.workCoefficient;
							});
						}
					// }
					callback();
					// callback(new Error(`根据组长及总监评分，评分不能超过${((parseInt(this.evaForm.groupLeaderScore2) + parseInt(this.evaForm.directorScore2)) / 2)}`)); //  * 100
				} else if (value !== '' && value !== undefined && value < 50 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) > -1) {
					if (this.showAssTip === true) {
						this.$confirm('根据考评分数最低为50, 是否继续?', '提示', {
							confirmButtonText: '确定',
							cancelButtonText: '取消',
							type: 'warning'
						}).then(() => {
							this.showAssTip = false;
							this.evaForm.viceScore3 = value;
						}).catch(() => {
							this.showAssTip = false;
							this.evaForm.viceScore3 = 50;
						});
					}
					callback();
					// callback(new Error('根据考评分数，评分不能低于50'));
				}
				if (!Number.isInteger(value)) {
					callback(new Error('评分必须为数字值'));
				} else {
					callback();
				}
			};
			let checkJust = (rule, value, callback) => {
				if ((this.taskForm.generalManagers !== undefined && this.taskForm.generalManagers.length > 0 && this.taskForm.generalManagers.findIndex(item => item.id === this.userDetail.id) === -1) || this.evaStatus === '1' || this.evaStatus === '2' || this.evaStatus === '3' || this.evaStatus === '4') {
					callback();
				} else if (!value) {
					return callback(new Error('评分不能为空'));
				}
				if (value > ((parseInt(this.evaForm.groupLeaderScore2) + parseInt(this.evaForm.directorScore2)) / 2)) { //  * 100
					// if (this.dialogTaskEvaVisible === true) {
					if (this.showGenTip === true && this.taskForm.generalManagers.findIndex(item => item.id === this.userDetail.id) > -1) {
						this.$confirm(`根据考评分数最高为${this.taskForm.workCoefficient}, 是否继续?`, '提示', {
							confirmButtonText: '确定',
							cancelButtonText: '取消',
							type: 'warning'
						}).then(() => {
							// console.log(111)
							this.showGenTip = false;
							this.evaForm.justScore4 = value;
						}).catch(() => {
							this.showGenTip = false;
							this.evaForm.justScore4 = this.taskForm.workCoefficient;
						});
					}
					// }
					callback();
					// callback(new Error(`根据组长及总监评分，评分不能超过${((parseInt(this.evaForm.groupLeaderScore2) + parseInt(this.evaForm.directorScore2)) / 2)}`)); //  * 100
				} else if (value !== '' && value !== undefined && value < 50) {
					if (this.showGenTip === true && this.taskForm.generalManagers.findIndex(item => item.id === this.userDetail.id) > -1) {
						this.$confirm('根据考评分数最低为50, 是否继续?', '提示', {
							confirmButtonText: '确定',
							cancelButtonText: '取消',
							type: 'warning'
						}).then(() => {
							this.showGenTip = false;
							this.evaForm.justScore4 = value;
						}).catch(() => {
							this.showGenTip = false;
							this.evaForm.justScore4 = 50;
						});
					}
					callback();
					// callback(new Error('根据考评分数，评分不能低于50'));
				}
				if (!Number.isInteger(value)) {
					callback(new Error('评分必须为数字值'));
				} else {
					callback();
				}
			};
			let workScore = (rule, value, callback) => {
				if (!value) {
					return callback(new Error('考评系数不能为空'));
				}
				if (value < 50) {
					callback(new Error('考评系数不能低于50'));
				} else {
					callback();
				}
			};
			let workLoadScore = (rule, value, callback) => {
				if (!value) {
					return callback(new Error('任务量不能为空'));
				} else if(value.toString().length > 4) {
					return callback(new Error('长度在 4 个字符之内'));
				} else {
					callback();
				}
			};
//这里存放数据
			return {
				showHistoryDialog: false, // 查看历史弹框
				dialogVisible: false, // 详情弹框
				dialogTaskChangeVisible:false, // 修改弹框
				dialogTaskSubmitVisible: false, // 提交弹框
				dialogTaskEvaVisible: false, // 考评弹框
				dialogTaskWithdrawVisible: false, // 撤回弹框
				dialogViewTaskEvaVisible: false,  // 查看考评弹框
				dialogViewTaskFileVisible: false,  // 查看附件弹框
				dialogDeleteTaskVisible: false, // 删除任务弹框
				dialogTaskFailVisible: false, // 审核不通过弹框
				dialogTaskMainVisible: false, // 查看主任务
				showAssTip: true,
				showGenTip: true,
				taskForm: { // 表单数据
					attachment: [],
					completeTime: '',
					content: '',
					createTime: '',
					crewList: [],
					endTime: '',
					executor: '',
					id: '',
					publisher: '',
					pworkload: 1,
					stateTime: '',
					status: '',
					superiorId: '',
					title: '',
					updateTime: '',
					workCoefficient: 0,
					workload: 10,
					workloadCount: 1,
				},
				rules: { // 表单验证
					executor: [
						{ required: true, message: '请选择组长', trigger: 'change' }
					],
					crewList: [
						{ type: 'array', required: true, message: '请选择组员', trigger: 'change' },
					],
					workCoefficient: [
						{ validator: workScore, trigger: 'blur' },
						{ type: 'number', message: '考评分数必须为数字值'}
					],
					workload: [
						{ validator: workLoadScore, trigger: 'blur' },
						// { required: true, message: '工作量不能为空'},
						{ type: 'number', message: '任务量必须为数字值'},
					]
				},
				changeTaskTextarea: '', // 保存说明
				submitTaskTextarea: '', // 完成任务说明
				withdrawTaskTextarea: '', // 撤回说明
				failTaskTextarea: '', // 审核不通过
				evaForm:{ // 考评表单
					score1: '', // 个人
					endWorkLoad: '', // 最终工作量
					groupLeaderScore2: '', // 组长
					directorScore2: '', // 总监
					viceScore3: '', // 副总经理
					justScore4: '', // 总经理
					workId: '', // 任务id
					id: null,
					userId: ''
				},
				evaRules: { // 考评验证
					score1: [
						{ required: true, validator: checkScore1, trigger: 'blur' },
						// { type: 'number', message: '评分必须为数字值'}
						// { required: true, message: '请填写自我评分', trigger: 'blur' }
					],
					groupLeaderScore2: [
						{ required: true, validator: checkGroup, trigger: 'blur' },
						// { type: 'number', message: '评分必须为数字值'}
					],
					directorScore2: [
						{ required: true, validator: checkDiretor, trigger: 'blur' },
					],
					viceScore3: [
						{ required: true, validator: checkVice, trigger: 'blur' },
					],
					justScore4: [
						{ required: true, validator: checkJust, trigger: 'blur' },
					],
				},
				leaderOptions: [], // 组长数据
				memberOptions: [], // 组员数据
				isPublisher: false, // 判断是否是发布者
				isExecutor: false, // 是否是执行者
				isCanBreakDown: false, // 是否能分解任务
				isWorkLoadClear: false, // 任务量为零无法分解任务
				isAudit: false, // 是否是审核者
				isFinishCanEdit: false, // 有修改权限的人是否能对已完结的任务进行任务量及考评分数
				isEditEva: false, // 是否提交了评价
				evaStatus: '1', // 评价阶段
				hasAuthority: false, // 是否有分解权限
				isCanSubmit: false, // 判断是否可以提交
				userDetail: '', // 当前用户的信息
				taskListData: '', // 当前任务数据
				historyDatas: [], // 历史数据
				deleteCheck:['个人工作量', '任务工作量'], // 删除多选框
				deleteTextarea: '', // 删除说明
				workScores: 0,
				saveHistoryDetail: '', // 保存历史
				fileList: [], // 完成任务上传附件
				attachmentsArr: [], // 存储附件
				storeWorkLoadCount: 0, // 存储剩余任务量
				defaultProps: {
					children: 'workMppings',
					label: 'title'
				},
				relatedTableData: [],
				currentTask: '',
				timelines: 0, // 任务时间轴
				timelineList: [
					{name: '任务开始时间', des: ''},
					{name: '预计完成时间', des: ''},
					{name: '任务提交时间', des: ''},
					{name: '任务审核时间', des: ''},
					{name: '任务完结时间', des: ''}
				],
				isTimeLineReturn: false,
				saveEvaScore: '' // 保存获取的考评信息
			};
		},
//监听属性 类似于data概念
		computed: {
			canRouter() {
				return JSON.stringify(this.saveHistoryDetail) === JSON.stringify(this.taskForm);
			},
			showDialog() {
				return this.$store.getters.getShowDialog.showDialog;
			}
		},
//监控data中的数据变化
		watch: {
			canRouter: {
				immediate: true,
				handler(val) {
					console.log(val)
					this.$store.commit('changeRouterCanPush', {
						'routerCanPush': val
					})
				}
			},
			showDialog: {
				immediate: true,
				handler(val) {
					console.log(val)
					if (val === true) {
						this.goList();
					}
				}
			}
		},
//方法集合
		methods: {
			downloadFile(val) {
				console.log(val);
				this.$axios.postDownload(val.fileId).then(res => {
					fileDownload(res.data, val.name);
				})
			},
			goList() {
				// console.log(JSON.stringify(this.saveHistoryDetail));
				// console.log(JSON.stringify(this.taskForm));
				if (this.isPublisher === true) {
					if (JSON.stringify(this.saveHistoryDetail) !== JSON.stringify(this.taskForm)) {
						this.$confirm('是否保存修改信息？', '提示', {
							confirmButtonText: '确定',
							cancelButtonText: '取消',
							type: 'warning'
						}).then(() => {
							if (this.isPublisher === true) {
								this.changeTaskSubmit();
							}
						}).catch(() => {
							this.$store.commit('changeShowDialog', {
								'showDialog': false
							});
							this.$message({
								type: 'info',
								message: '已取消保存'
							});
						});
					} else {
						if (this.$store.getters.getSaveView.saveView !== undefined) {
							let data = this.$store.getters.getSaveView.saveView;
							data.url = 'taskDetails'
							this.$store.commit('changeSaveView', {
								saveView: data
							})
						}
						this.$router.push({name: 'viewTask'});
					}
				} else {
					if (this.$store.getters.getSaveView.saveView !== undefined) {
						let data = this.$store.getters.getSaveView.saveView;
						data.url = 'taskDetails'
						this.$store.commit('changeSaveView', {
							saveView: data
						})
					}
					this.$router.push({name: 'viewTask'});
				}
			},
			getUserById(val) {
				this.$axios.getUserById(val).then((res) => {
					console.log(res)
					if (res.request.status === 200) {
						this.leaderOptions = res.data;
						this.memberOptions = res.data;
					}
				})
			},
			getDetailsTask(val) {
				this.$axios.getWorkDetails(val).then((res) => {
					console.log(res)
					if (res.request.status === 200) {
						let postData = JSON.parse(JSON.stringify(res.data));
						if ((postData.workCoefficient.toString()).indexOf(".") > -1) {
							postData.workCoefficient = (Math.round(postData.workCoefficient*100)/100) * 100;
						} else {
							if ((postData.workCoefficient.toString()).length < 2) {
								postData.workCoefficient = (Math.round(postData.workCoefficient*100)/100) * 100;
							} else {
								postData.workCoefficient = JSON.parse(JSON.stringify(postData.workCoefficient));
							}
						}
						// postData.workCoefficient = (Math.round(postData.workCoefficient*100)/100) * 100;
						this.workScores = JSON.parse(JSON.stringify(postData.workCoefficient));
						this.taskForm = postData;
						let arr = [];
						if (res.data.publisher.id === this.userDetail.id) {
							this.isPublisher = true;
							if (postData.status === 'ongoing' || postData.status === 'unpublished') {
								if (postData.crewList !== null && postData.crewList.length > 0) {
									postData.crewList.forEach((v,i)=> {
										arr.push(v.id);
									})
									this.taskForm.crewList = arr;
								}
								let dataUser = JSON.parse(JSON.stringify(this.leaderOptions));
								console.log(dataUser)
								if (res.data.crewList !== null && res.data.crewList.length > 0) {
									dataUser.push(...res.data.crewList);
									console.log(dataUser)
								}
								// console.log()
								let dataUser2 = JSON.parse(JSON.stringify(dataUser));
								for(let i = 0; i < dataUser2.length; i++) {
									for(let j = i + 1; j < dataUser2.length ; j++) {
										if(dataUser2[i].id === dataUser2[j].id) {
											dataUser2.splice(j, 1)
											j--;
										}
									}
								}
								// let dataUser2 = Array.from(new Set(dataUser));
								this.leaderOptions = dataUser2;
								this.memberOptions = dataUser2;
							}
							let newObj = JSON.parse(JSON.stringify(this.taskForm));
							if (newObj.crewList === null || newObj.crewList.length === 0) {
								newObj.crewList = [];
							}
							this.taskForm = newObj;
							this.saveHistoryDetail = JSON.parse(JSON.stringify(newObj));
						} else {
							this.isPublisher = false;
						}
						if (res.data.executor.id === this.userDetail.id) {
							this.isExecutor = true;
						} else {
							this.isExecutor = false;
						}
						if (this.isExecutor === true) {
							if ((postData.crewList !== null && postData.crewList.length > 0) || (this.userDetail.roles !== null && this.userDetail.roles.length > 0 && this.userDetail.roles[0].authorities.findIndex(item => item.name === '分解任务') > -1)) {
								this.isCanBreakDown = true;
							} else {
								this.isCanBreakDown = false
							}
						} else {
							this.isCanBreakDown = false;
						}
						if (this.taskForm.status === 'finished') {
							this.getJudge(); // 获取是否能修改
						}
						this.getWorkLoadNum();
						this.getRelatedWorkIdTask(this.taskForm.id);
						if (this.userDetail.id === this.taskForm.audit.id) {
							this.isAudit = true;
						} else {
							this.isAudit = false;
						}
						console.log('audit-----' + this.isAudit);
					}
					this.$axios.putCanSubmitTask(res.data.id).then((res) => {
						console.log(res)
						if (res.status === 200) {
							console.log(res.data.isNotCommit === '1')
							this.isCanSubmit = res.data.isNotCommit === '1' ? true : false;
						}
					})
					this.$axios.getScore(res.data.id).then((res) => {
						console.log(res);
						if (res.status === 200) {
							if (res.data !== null && res.data.score1 !== '') {
								this.isEditEva = true;
							} else {
								this.isEditEva = false;
							}
							if (res.data !== null) {
								this.saveEvaScore = JSON.parse(JSON.stringify(res.data));
								if (res.data.score1 === '') {
									this.evaStatus = '1';
								} else if (res.data.score1 !== '' && (res.data.groupLeaderScore2 === '' || res.data.directorScore2 === '')) {
									this.evaStatus = '2';
								}
								// else if (res.data.score1 !== '' && res.data.groupLeaderScore2 !== '' && res.data.directorScore2 === '') {
								// 	this.evaStatus = '3';
								// }
								else if (res.data.score1 !== '' && res.data.groupLeaderScore2 !== '' && res.data.directorScore2 !== '' && res.data.viceScore3 === '') {
									this.evaStatus = '4';
								} else if (res.data.score1 !== '' && res.data.groupLeaderScore2 !== '' && res.data.directorScore2 !== '' && res.data.viceScore3 !== '' && res.data.justScore4 === '') {
									this.evaStatus = '5';
								} else if (res.data.score1 !== '' && res.data.groupLeaderScore2 !== '' && res.data.directorScore2 !== '' && res.data.viceScore3 !== '' && res.data.justScore4 !== '') {
									this.evaStatus = '6';
								}
							}
							console.log('evastatus------' + this.evaStatus);
						}
					});
					this.getBacks();
					// this.timeLineIndex();
				})
			},
			getBacks() {
				this.$axios.getTaskBack(this.taskForm.id).then((res) => {
					console.log(res.data)
					this.isTimeLineReturn = res.data.back;
					this.timeLineIndex();
				})
			},
			timeLineIndex() {
				let timeList = [];
				if (this.taskForm.status === 'ongoing') {
					this.timelines = 1;
					console.log(this.isTimeLineReturn)
					if (this.isTimeLineReturn === true) {
						timeList = [
							{name: '任务开始时间', des: this.taskForm.stateTime},
							{name: '预计完成时间', des: this.taskForm.completeTime},
							{name: '任务提交时间', des: this.taskForm.submitTime},
							{name: '任务审核时间', des: this.taskForm.auditTime},
							{name: '任务完结时间', des: this.taskForm.endTime}
						];
						this.timelines = 2;
					} else {
						// if (this.taskForm.submitTime !== null && this.taskForm.submitTime !== '') {
						// 	if (Date.parse(this.taskForm.submitTime) > Date.parse(this.taskForm.completeTime)) {
						// 		timeList = [
						// 			{name: '任务开始时间', des: this.taskForm.stateTime},
						// 			{name: '预计完成时间', des: this.taskForm.completeTime},
						// 			{name: '任务提交时间', des: this.taskForm.submitTime},
						// 			{name: '任务审核时间', des: this.taskForm.auditTime},
						// 			{name: '任务完结时间', des: this.taskForm.endTime}
						// 		];
						// 		this.timelines = 3;
						// 	} else {
						// 		timeList = [
						// 			{name: '任务开始时间', des: this.taskForm.stateTime},
						// 			{name: '任务提交时间', des: this.taskForm.submitTime},
						// 			{name: '预计完成时间', des: this.taskForm.completeTime},
						// 			{name: '任务审核时间', des: this.taskForm.auditTime},
						// 			{name: '任务完结时间', des: this.taskForm.endTime}
						// 		];
						// 		this.timelines = 3;
						// 		if (Date.parse(this.taskForm.auditTime) < Date.parse(this.taskForm.completeTime)) {
						// 			timeList = [
						// 				{name: '任务开始时间', des: this.taskForm.stateTime},
						// 				{name: '任务提交时间', des: this.taskForm.submitTime},
						// 				{name: '任务审核时间', des: this.taskForm.auditTime},
						// 				{name: '预计完成时间', des: this.taskForm.completeTime},
						// 				{name: '任务完结时间', des: this.taskForm.endTime}
						// 			];
						// 			this.timelines = 1;
						// 		}
						// 	}
						// 	console.log(timeList)
						// } else {
						// 	timeList = [
						// 		{name: '任务开始时间', des: this.taskForm.stateTime},
						// 		{name: '预计完成时间', des: this.taskForm.completeTime},
						// 		{name: '任务提交时间', des: this.taskForm.submitTime},
						// 		{name: '任务审核时间', des: this.taskForm.auditTime},
						// 		{name: '任务完结时间', des: this.taskForm.endTime}
						// 	]
						// 	this.timelines = 2;
						// }
							timeList = [
								{name: '任务开始时间', des: this.taskForm.stateTime},
								{name: '预计完成时间', des: this.taskForm.completeTime},
								{name: '任务提交时间', des: this.taskForm.submitTime},
								{name: '任务审核时间', des: this.taskForm.auditTime},
								{name: '任务完结时间', des: this.taskForm.endTime}
							]
						this.timelines = 2;
					}
				} else if (this.taskForm.status === 'audit') {
					if (Date.parse(this.taskForm.submitTime) > Date.parse(this.taskForm.completeTime)) {
						timeList = [
							{name: '任务开始时间', des: this.taskForm.stateTime},
							{name: '预计完成时间', des: this.taskForm.completeTime},
							{name: '任务提交时间', des: this.taskForm.submitTime},
							{name: '任务审核时间', des: this.taskForm.auditTime},
							{name: '任务完结时间', des: this.taskForm.endTime}
						];
						this.timelines = 3;
					} else {
						timeList = [
							{name: '任务开始时间', des: this.taskForm.stateTime},
							{name: '任务提交时间', des: this.taskForm.submitTime},
							{name: '预计完成时间', des: this.taskForm.completeTime},
							{name: '任务审核时间', des: this.taskForm.auditTime},
							{name: '任务完结时间', des: this.taskForm.endTime}
						];
						this.timelines = 3;
						if (Date.parse(this.taskForm.auditTime) < Date.parse(this.taskForm.completeTime)) {
							timeList = [
								{name: '任务开始时间', des: this.taskForm.stateTime},
								{name: '任务提交时间', des: this.taskForm.submitTime},
								{name: '预计完成时间', des: this.taskForm.completeTime},
								{name: '任务审核时间', des: this.taskForm.auditTime},
								{name: '任务完结时间', des: this.taskForm.endTime}
							];
							this.timelines = 3;
						}
					}
				} else if (this.taskForm.status === 'review') {
					this.timelines = 4;
					if (Date.parse(this.taskForm.submitTime) > Date.parse(this.taskForm.completeTime)) {
						timeList = [
							{name: '任务开始时间', des: this.taskForm.stateTime},
							{name: '预计完成时间', des: this.taskForm.completeTime},
							{name: '任务提交时间', des: this.taskForm.submitTime},
							{name: '任务审核时间', des: this.taskForm.auditTime},
							{name: '任务完结时间', des: this.taskForm.endTime}
						];
					} else {
						timeList = [
							{name: '任务开始时间', des: this.taskForm.stateTime},
							{name: '任务提交时间', des: this.taskForm.submitTime},
							{name: '预计完成时间', des: this.taskForm.completeTime},
							{name: '任务审核时间', des: this.taskForm.auditTime},
							{name: '任务完结时间', des: this.taskForm.endTime}
						];
						if (Date.parse(this.taskForm.auditTime) < Date.parse(this.taskForm.completeTime)) {
							timeList = [
								{name: '任务开始时间', des: this.taskForm.stateTime},
								{name: '任务提交时间', des: this.taskForm.submitTime},
								{name: '任务审核时间', des: this.taskForm.auditTime},
								{name: '预计完成时间', des: this.taskForm.completeTime},
								{name: '任务完结时间', des: this.taskForm.endTime}
							];
						}
					}
				} else if (this.taskForm.status === 'finished') {
					this.timelines = 5;
					if (Date.parse(this.taskForm.submitTime) > Date.parse(this.taskForm.completeTime)) {
						timeList = [
							{name: '任务开始时间', des: this.taskForm.stateTime},
							{name: '预计完成时间', des: this.taskForm.completeTime},
							{name: '任务提交时间', des: this.taskForm.submitTime},
							{name: '任务审核时间', des: this.taskForm.auditTime},
							{name: '任务完结时间', des: this.taskForm.endTime}
						];
					} else {
						timeList = [
							{name: '任务开始时间', des: this.taskForm.stateTime},
							{name: '任务提交时间', des: this.taskForm.submitTime},
							{name: '预计完成时间', des: this.taskForm.completeTime},
							{name: '任务审核时间', des: this.taskForm.auditTime},
							{name: '任务完结时间', des: this.taskForm.endTime}
						];
						if (Date.parse(this.taskForm.auditTime) < Date.parse(this.taskForm.completeTime)) {
							timeList = [
								{name: '任务开始时间', des: this.taskForm.stateTime},
								{name: '任务提交时间', des: this.taskForm.submitTime},
								{name: '任务审核时间', des: this.taskForm.auditTime},
								{name: '预计完成时间', des: this.taskForm.completeTime},
								{name: '任务完结时间', des: this.taskForm.endTime}
							];
						}
					}
				} else if (this.taskForm.status === 'delete'){
					if (this.taskForm.auditTime !== null && this.taskForm.auditTime !== '') {
						if (Date.parse(this.taskForm.submitTime) > Date.parse(this.taskForm.completeTime)) {
							timeList = [
								{name: '任务开始时间', des: this.taskForm.stateTime},
								{name: '预计完成时间', des: this.taskForm.completeTime},
								{name: '任务提交时间', des: this.taskForm.submitTime},
								{name: '任务审核时间', des: this.taskForm.auditTime},
								{name: '任务完结时间', des: this.taskForm.endTime}
							];
							this.timelines = 3;
						} else {
							timeList = [
								{name: '任务开始时间', des: this.taskForm.stateTime},
								{name: '任务提交时间', des: this.taskForm.submitTime},
								{name: '预计完成时间', des: this.taskForm.completeTime},
								{name: '任务审核时间', des: this.taskForm.auditTime},
								{name: '任务完结时间', des: this.taskForm.endTime}
							];
							this.timelines = 2;
							if (Date.parse(this.taskForm.auditTime) < Date.parse(this.taskForm.completeTime)) {
								timeList = [
									{name: '任务开始时间', des: this.taskForm.stateTime},
									{name: '任务提交时间', des: this.taskForm.submitTime},
									{name: '任务审核时间', des: this.taskForm.auditTime},
									{name: '预计完成时间', des: this.taskForm.completeTime},
									{name: '任务完结时间', des: this.taskForm.endTime}
								];
								this.timelines = 3;
							}
						}
					} else {
						if (Date.parse(this.taskForm.submitTime) > Date.parse(this.taskForm.completeTime)) {
							timeList = [
								{name: '任务开始时间', des: this.taskForm.stateTime},
								{name: '预计完成时间', des: this.taskForm.completeTime},
								{name: '任务提交时间', des: this.taskForm.submitTime},
								{name: '任务审核时间', des: this.taskForm.auditTime},
								{name: '任务完结时间', des: this.taskForm.endTime}
							];
							this.timelines = 3;
						} else {
							timeList = [
								{name: '任务开始时间', des: this.taskForm.stateTime},
								{name: '任务提交时间', des: this.taskForm.submitTime},
								{name: '预计完成时间', des: this.taskForm.completeTime},
								{name: '任务审核时间', des: this.taskForm.auditTime},
								{name: '任务完结时间', des: this.taskForm.endTime}
							];
							this.timelines = 3;
						}
					}
				}
				this.timelineList = timeList;
			},
			timeLineListChange() {
				let timeList = [];
				if (Date.parse(this.taskForm.submitTime) > Date.parse(this.taskForm.completeTime)) {
					timeList = [
						{name: '任务开始时间', des: this.taskForm.stateTime},
						{name: '预计完成时间', des: this.taskForm.completeTime},
						{name: '任务提交时间', des: this.taskForm.submitTime},
						{name: '任务审核时间', des: this.taskForm.auditTime},
						{name: '任务完结时间', des: this.taskForm.endTime}
					]
				} else if (Date.parse(this.taskForm.submitTime) < Date.parse(this.taskForm.completeTime)) {
					timeList = [
						{name: '任务开始时间', des: this.taskForm.stateTime},
						{name: '任务提交时间', des: this.taskForm.submitTime},
						{name: '预计完成时间', des: this.taskForm.completeTime},
						{name: '任务审核时间', des: this.taskForm.auditTime},
						{name: '任务完结时间', des: this.taskForm.endTime}
					];
					if (Date.parse(this.taskForm.auditTime) < Date.parse(this.taskForm.completeTime)) {
						timeList = [
							{name: '任务开始时间', des: this.taskForm.stateTime},
							{name: '任务提交时间', des: this.taskForm.submitTime},
							{name: '任务审核时间', des: this.taskForm.auditTime},
							{name: '预计完成时间', des: this.taskForm.completeTime},
							{name: '任务完结时间', des: this.taskForm.endTime}
						];
					}
				}
				console.log(timeList)
			},
			getRelatedWorkIdTask(val) {
				this.relatedTableData = [];
				this.$axios.getRelatedWorkId(val).then((res) => {
					console.log(res)
					if (res.status === 200) {
						this.relatedTableData.push(res.data);
						console.log(this.relatedTableData)
					}
				})
			},
			getWorkLoadNum() {
				this.$axios.putFindWorkload(this.taskForm.id).then((res) => {
					console.log(res);
					if (res.status === 200) {
						console.log(res.data)
						this.storeWorkLoadCount = res.data;
						if (res.data === 0) {
							this.isWorkLoadClear = true;
						} else {
							this.isWorkLoadClear = false;
						}
					}
				})
			},
			getJudge() {
				this.$axios.getJudgeParent(this.userDetail.id, this.taskForm.publisher.id).then((res) => {
					console.log(res)
					if (res.status === 200) {
						this.isFinishCanEdit = res.data
					}
				})
			},
			closeTaskMainDialog() {
				this.dialogTaskMainVisible = false;
			},
			showTaskMain() {
				this.dialogTaskMainVisible = true;
			},
			openHistory() {
				this.$axios.getTaskHistory(this.taskListData.workId).then((res) => {
					console.log(res)
					if (res.request.status === 200) {
						this.historyDatas = res.data;
					}
				})
				this.showHistoryDialog = true;
			},
			closeHistory() {
				this.showHistoryDialog = false;
			},
			closeChangeTaskDialog() {
				this.dialogTaskChangeVisible = false;
				this.changeTaskTextarea = '';
			},
			openChangeTaskDialog(val) {
				this.$refs[val].validate((valid) => {
					if (valid) {
						this.dialogTaskChangeVisible = true;
					} else {
						console.log('error submit');
						return false;
					}
				});
			},
			closeSubmitTaskDialog() {
				this.dialogTaskSubmitVisible = false;
				this.withdrawTaskTextarea = '';
				this.submitTaskTextarea = '';
				this.attachmentsArr = [];
				this.fileList = [];
				this.$refs.upload.clearFiles();
			},
			openSubmitTaskDialog() {
				this.dialogTaskSubmitVisible = true;
			},
			closeEvaTaskDialog() {
				this.dialogTaskEvaVisible = false;
			},
			openEvaTaskDialog() {
				// if (this.isPublisher === true) {
				this.isEditEva = false;
					this.$axios.getScore(this.taskForm.id).then((res) => {
						console.log(res);
						if (res.status === 200) {
							// this.evaForm = res.data;
							if (res.data !== null) {
								let newData = JSON.parse(JSON.stringify(res.data));
								if (newData.score1 !== '') {
									newData.score1 = parseInt(res.data.score1);
								}
								if (newData.score2 !== '' && newData.score2 !== null) {
									newData.score2 = parseInt(res.data.score2);
								} else {
									newData.score2 = '';
								}
								this.evaForm = newData;
								// if (this.isExecutor === true) {
								if (res.data.score1 !== '') {
									this.isEditEva = true;
								} else {
									this.isEditEva = false;
								}
								// }
							}
						}
					})
				// }
				console.log(this.isEditEva)
				this.dialogTaskEvaVisible = true;
			},
			closeFileTaskDialog() {
				this.dialogViewTaskFileVisible = false;
			},
			openFileTaskDialog() {
				this.dialogViewTaskFileVisible = true;
			},
			submitEvaDialog(formName) {
				this.$refs[formName].validate((valid) => {
					if (valid) {
						this.showAssTip = true;
						this.showGenTip = true;
						if (this.isEditEva === false) {
							if (this.isExecutor === true) {
								let obj = JSON.parse(JSON.stringify(this.evaForm));
								obj.score1 = obj.score1 + '';
								obj.workId = this.taskListData.workId;
								obj.userId = this.userDetail.id;
								obj.endWorkLoad = this.taskForm.workload;
								console.log(obj)
								this.$axios.postScore(obj).then((res) => {
									console.log(res)
									if (res.status === 200) {
										this.$message({
											message: '评价任务成功!',
											type: 'success'
										});
										this.$refs[formName].resetFields();
										this.dialogTaskEvaVisible = false;
										this.getDetailsTask(this.taskListData.workId);
									}
								})
							} else {
								this.dialogTaskEvaVisible = false;
								return false;
							}
						} else {
							if (this.isEditEva === true && this.isExecutor === true && this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 &&
								this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1 &&
								this.taskForm.assistantManagers !== undefined && this.taskForm.assistantManagers.length > 0 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) === -1 &&
								this.taskForm.generalManagers !== undefined && this.taskForm.generalManagers.length > 0 && this.taskForm.generalManagers.findIndex(item => item.id === this.userDetail.id) === -1) {
								// if (this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1) {
								// 	this.dialogTaskEvaVisible = false;
								// 	return false;
								// } else if (this.taskForm.assistantManagers !== undefined && this.taskForm.assistantManagers.length > 0 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) === -1) {
								// 	this.dialogTaskEvaVisible = false;
								// 	return false;
								// } else if (this.taskForm.generalManagers !== undefined && this.taskForm.generalManagers.length > 0 && this.taskForm.generalManagers.findIndex(item => item.id === this.userDetail.id) === -1) {
									this.dialogTaskEvaVisible = false;
									return false;
								// }
							}
							// else if (this.isAudit === true && this.evaForm.groupLeaderScore2 !== '' && this.evaStatus === '3') {
							// 	this.dialogTaskEvaVisible = false;
							// 	return false;
							// }
							else if (this.taskForm.generalManagers !== undefined && this.taskForm.generalManagers.length > 0 && this.taskForm.generalManagers.findIndex(item => item.id === this.userDetail.id) > -1) {
								if (this.isAudit === false) {
									if (this.evaStatus === '1' || this.evaStatus === '2' || this.evaStatus === '3' || this.evaStatus === '4') {
										this.dialogTaskEvaVisible = false;
										return false;
									}
								} else if (this.isAudit === true) {
									if (this.evaStatus !== '2' && this.evaStatus !== '5' && this.evaStatus !== '6') {
										this.dialogTaskEvaVisible = false;
										return false;
									}
								}
								// if (this.evaStatus !== '2') {
								// 	this.dialogTaskEvaVisible = false;
								// 	return false;
								// } else if (this.evaStatus !== '5' && this.evaStatus !== '6') {
								// 	this.dialogTaskEvaVisible = false;
								// 	return false;
								// }
								// this.showGenTip = true;
							} else if (this.taskForm.assistantManagers !== undefined && this.taskForm.assistantManagers.length > 0 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) > -1) {
								if (this.isAudit === false) {
									if (this.evaStatus === '1') {
										this.dialogTaskEvaVisible = false;
										return false;
									} else if (this.evaStatus === '2' && this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1){
										this.dialogTaskEvaVisible = false;
										return false;
									} else if (this.evaStatus === '5') {
										if (this.evaForm.viceScore3 === '') {
											this.dialogTaskEvaVisible = false;
											return false;
										}
									}
								} else if (this.isAudit === true) {
									if (this.evaStatus !== '2' && this.evaStatus !== '4' && this.evaStatus !== '5') {
										this.dialogTaskEvaVisible = false;
										return false;
									}
								}
							}
							else if (this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) > -1) {
								if (this.isAudit === false) {
									if (this.evaStatus === '1' || this.evaStatus === '4' || this.evaStatus === '5') {
										this.dialogTaskEvaVisible = false;
										return false;
									}
								} else if (this.isAudit === true) {
									if (this.evaStatus !== '2') {
										this.dialogTaskEvaVisible = false;
										return false;
									}
								}
							} else {
								if (this.isAudit === true) {
									if (this.evaStatus !== '2') {
										this.dialogTaskEvaVisible = false;
										return false;
									}
								}
							}
							// else if ((this.taskForm.generalManagers !== undefined && this.taskForm.generalManagers.length > 0 && this.taskForm.generalManagers.findIndex(item => item.id === this.userDetail.id) === -1) && (this.taskForm.assistantManagers !== undefined && this.taskForm.assistantManagers.length > 0 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) === -1) && (this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1)) {
							// 	console.log(33333333333)
							// 	this.dialogTaskEvaVisible = false;
							// 	return false;
							// }
							let objs = JSON.parse(JSON.stringify(this.evaForm));
							let msgs = '';
							if (this.evaStatus === '2') {
								if (this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) > -1) {
									if (this.saveEvaScore.groupLeaderScore2 !== '' && this.saveEvaScore.groupLeaderScore2 !== null && this.saveEvaScore.groupLeaderScore2 !== undefined && this.saveEvaScore.directorScore2 !== '' && this.saveEvaScore.directorScore2 !== null && this.saveEvaScore.directorScore2 !== undefined) {
										objs.score1 = objs.score1 + '';
										objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
										objs.directorScore2 = objs.directorScore2 + '';
										msgs = '总监考评';
									} else if ((this.saveEvaScore.groupLeaderScore2 === '' || this.saveEvaScore.groupLeaderScore2 === null || this.saveEvaScore.groupLeaderScore2 === undefined) && this.saveEvaScore.directorScore2 !== '' && this.saveEvaScore.directorScore2 !== null && this.saveEvaScore.directorScore2 !== undefined) {
										objs.score1 = objs.score1 + '';
										objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
										objs.directorScore2 = objs.directorScore2 + '';
										msgs = '组长考评';
									} else if (this.saveEvaScore.directorScore2 !== '' && this.saveEvaScore.directorScore2 !== null && this.saveEvaScore.directorScore2 !== undefined) {
										objs.score1 = objs.score1 + '';
										objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
										objs.directorScore2 = objs.directorScore2 + '';
										msgs = '修改考评';
									} else {
										objs.score1 = objs.score1 + '';
										objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
										objs.directorScore2 = objs.directorScore2 + '';
										msgs = '总监评价';
									}
								} else {
									if (this.saveEvaScore.groupLeaderScore2 !== '' && this.saveEvaScore.groupLeaderScore2 !== null && this.saveEvaScore.groupLeaderScore2 !== undefined) {
										objs.score1 = objs.score1 + '';
										objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
										msgs = '修改考评';
									} else {
										objs.score1 = objs.score1 + '';
										objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
										msgs = '组长评价';
									}
								}
							}
							// else if (this.evaStatus === '3') {
							// 	objs.score1 = objs.score1 + '';
							// 	objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
							// 	objs.directorScore2 = objs.directorScore2 + '';
							// 	msgs = '总监评价';
							// }
							else if (this.evaStatus === '4') {
								objs.score1 = objs.score1 + '';
								objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
								objs.directorScore2 = objs.directorScore2 + '';
								objs.viceScore3 = objs.viceScore3 + '';
								msgs = '副总经理评价';
							} else if (this.evaStatus === '5') {
								if (this.taskForm.assistantManagers !== undefined && this.taskForm.assistantManagers.length > 0 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) > -1) {
									objs.score1 = objs.score1 + '';
									objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
									objs.directorScore2 = objs.directorScore2 + '';
									objs.viceScore3 = objs.viceScore3 + '';
									msgs = '修改考评';
								} else {
									objs.score1 = objs.score1 + '';
									objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
									objs.directorScore2 = objs.directorScore2 + '';
									objs.viceScore3 = objs.viceScore3 + '';
									objs.justScore4 = objs.justScore4 + '';
									msgs = '总经理评价';
								}
							} else if (this.evaStatus === '6') {
								objs.score1 = objs.score1 + '';
								objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
								objs.directorScore2 = objs.directorScore2 + '';
								objs.viceScore3 = objs.viceScore3 + '';
								objs.justScore4 = objs.justScore4 + '';
								msgs = '修改考评';
							}
							console.log(objs, msgs)
							this.$axios.putScore(this.userDetail.id, msgs, objs).then((res) => {
								console.log(res)
								if (res.status === 200) {
									if (this.evaStatus === '5' && this.evaForm.justScore4 !== '') {
										let obj = {
											msg: '',
											userId: this.userDetail.id,
											workId: this.taskForm.id,
											status: 'finished',
											re: ''
										}
										this.$axios.putTaskStatus(obj).then((res) => {
											console.log(res)
											if (res.status === 200) {
												this.$message({
													message: '评价任务成功!',
													type: 'success'
												});
												// this.$refs['evaForm'].resetFields();
												this.dialogTaskEvaVisible = false;
												console.log(this.taskListData.workId)
												this.getDetailsTask(this.taskListData.workId);
											}
										})
									} else {
										this.$message({
											message: '评价任务成功!',
											type: 'success'
										});
										// this.$refs['evaForm'].resetFields();
										this.dialogTaskEvaVisible = false;
										console.log(this.taskListData.workId)
										this.getDetailsTask(this.taskListData.workId);
									}
								}
							})
						}
						// if (this.isPublisher === true) {
						// 	if (this.evaForm.score1 === '') {
						// 		this.$message({
						// 			message: '请先让任务执行者评分后在评价',
						// 			type: 'warning'
						// 		});
						// 		return false;
						// 	} else {
								// this.$axios.putScore(this.userDetail.id, this.evaForm).then((res) => {
								// 	console.log(res)
								// 	if (res.status === 200) {
								// 		let obj = {
								// 			msg: '',
								// 			userId: this.userDetail.id,
								// 			workId: this.taskForm.id,
								// 			status: 'finished'
								// 		}
								// 		this.$axios.putTaskStatus(obj).then((res) => {
								// 			console.log(res)
								// 			if (res.status === 200) {
								// 				this.$message({
								// 					message: '评价任务成功!',
								// 					type: 'success'
								// 				});
								// 				this.$refs[formName].resetFields();
								// 				this.dialogTaskEvaVisible = false;
								// 				this.getDetailsTask(this.taskListData.workId);
								// 			}
								// 		})
								// 	}
								// })
						// 	}
						// } else {
							// let obj = JSON.parse(JSON.stringify(this.evaForm));
							// obj.workId = this.taskListData.workId;
							// obj.userId = this.userDetail.id;
							// obj.score2 = null;
							// obj.comments2 = null;
							// obj.endWorkLoad = 1;
							// this.$axios.postScore(obj).then((res) => {
							// 	console.log(res)
							// 	if (res.status === 200) {
							// 		this.$message({
							// 			message: '评价任务成功!',
							// 			type: 'success'
							// 		});
							// 		this.$refs[formName].resetFields();
							// 		this.dialogTaskEvaVisible = false;
							// 		this.getDetailsTask(this.taskListData.workId);
							// 	}
							// })
						// }
					} else {
						console.log('error submit!!');
						return false;
					}
				});
			},

			closeWithdrawTaskDialog() {
				this.dialogTaskWithdrawVisible = false;
				this.withdrawTaskTextarea = '';
			},
			openWithdrawTaskDialog() {
				this.dialogTaskWithdrawVisible = true;
			},
			closeViewTaskEvaDialog() {
				this.dialogViewTaskEvaVisible = false;
			},
			openViewTaskEvaDialog() {
				this.$axios.getScore(this.taskForm.id).then((res) => {
					console.log(res);
					if (res.status === 200) {
						console.log(res.data)
						let data = JSON.parse(JSON.stringify(res.data));
						data.score1 = parseInt(data.score1);
						data.score2 = parseInt(data.score2);
						this.evaForm = data;
					}
				})
				this.dialogViewTaskEvaVisible = true;
			},
			closeDeleteTaskDialog() {
				this.dialogDeleteTaskVisible = false;
				this.deleteTextarea = '';
				this.deleteCheck = ['个人工作量', '任务工作量'];
			},
			openDeleteTaskDialog() {
				this.dialogDeleteTaskVisible = true;
			},
			changeTaskSubmit() {
				// 修改任务确定
				console.log(this.taskForm)
				if (this.taskForm.status === 'ongoing') {
					let obj = {
						"msg": this.changeTaskTextarea,
						"userid": this.userDetail.id,
						"users": this.taskForm.crewList,
						'workload': this.taskForm.workload,
						"workId": this.taskListData.workId
					}
					console.log(obj)
					this.$axios.putTaskGroup(obj).then((res) => {
						console.log(res)
						if (res.request.status === 200) {
							// if (res.data.id !== undefined) {
								this.$message({
									message: '修改任务成功!',
									type: 'success'
								});
							// }
							this.changeTaskTextarea = '';
							this.dialogTaskChangeVisible = false;
							this.getDetailsTask(this.taskListData.workId);
						}
					})
				} else if (this.taskForm.status === 'audit' || this.taskForm.status === 'finished') {
					let obj = {
						"msg": this.changeTaskTextarea,
						"userId": this.userDetail.id,
						"workCoefficient": parseFloat(this.taskForm.workCoefficient),
						"workload": this.taskForm.workload,
						"workId": this.taskListData.workId
					}
					this.$axios.putTaskWorkload(obj).then((res) => {
						console.log(res)
						if (res.request.status === 200) {
							if (res.data.id !== undefined) {
								this.$message({
									message: '修改任务成功!',
									type: 'success'
								});
							}
							this.changeTaskTextarea = '';
							this.dialogTaskChangeVisible = false;
							this.getDetailsTask(this.taskListData.workId);
						}
					})
				}
				this.$store.commit('changeRouterCanPush', {
					'routerCanPush': true
				})
				this.$store.commit('changeShowDialog', {
					'showDialog': false
				});
			},
			statusTaskSubmit(val, tip) {
				let msg = '';
				let re = '';
				if (tip === '撤回') {
					msg = this.withdrawTaskTextarea;
					re = '1';
				} else if (tip === '提交') {
					msg = this.submitTaskTextarea;
					re = '';
				}
				let obj = {
					msg: msg,
					status: val,
					userId: this.userDetail.id,
					workId: this.taskListData.workId,
					re: re
				}
				console.log(this.attachmentsArr);
				if (this.attachmentsArr.length === 0) {
					this.$axios.putTaskStatus(obj).then((res) => {
						console.log(res)
						if (res.request.status === 200) {
							// if (res.data.id !== undefined) {
							this.$message({
								message: tip + '任务成功!',
								type: 'success'
							});
							this.submitTaskTextarea = '';
							this.withdrawTaskTextarea = '';
							this.dialogTaskSubmitVisible = false;
							this.dialogTaskWithdrawVisible = false;
							this.getDetailsTask(this.taskListData.workId);
							// }
						}
					})
				} else {
					this.$axios.postAttachmentWorkId(this.taskListData.workId, this.attachmentsArr).then((res) => {
						console.log(res);
						if (res.status === 200) {
							this.withdrawTaskTextarea = '';
							this.submitTaskTextarea = '';
							this.attachmentsArr = [];
							this.fileList = [];
							this.$refs.upload.clearFiles();

							this.$axios.putTaskStatus(obj).then((res) => {
								console.log(res)
								if (res.request.status === 200) {
									// if (res.data.id !== undefined) {
									this.$message({
										message: tip + '任务成功!',
										type: 'success'
									});
									this.submitTaskTextarea = '';
									this.withdrawTaskTextarea = '';
									this.dialogTaskSubmitVisible = false;
									this.dialogTaskWithdrawVisible = false;
									this.getDetailsTask(this.taskListData.workId);
									// }
								}
							})

						}
					})
				}
			},
			submitDeleteDialog() {
				console.log(this.deleteCheck)
				let pw = this.deleteCheck.includes('个人工作量') ? 1 : 0;
				let wc =this.deleteCheck.includes('任务工作量') ? 1 : 0;
				console.log(pw, wc)
				let obj = {
					msg: this.deleteTextarea,
					personalWorkload: pw,
					userId: this.userDetail.id,
					workId: this.taskListData.workId,
					workloadCount: wc
				}
				console.log(obj)
				this.$axios.deleteTaskByParams(obj).then((res) => {
					console.log(res)
					if (res.request.status === 200) {
						this.$message({
							message: '删除任务完成!',
							type: 'success'
						});
						this.deleteTextarea = '';
						this.deleteCheck = ['个人工作量', '任务工作量'];
						this.$router.push({name: 'viewTask'})
					}
				})
			},
			closeFailTaskDialog() {
				this.dialogTaskFailVisible = false;
				this.failTaskTextarea = '';
			},
			failTaskSubmit(val) {
				let obj = {
					msg: this.failTaskTextarea,
					status: val,
					workId: this.taskListData.workId,
					userId: this.userDetail.id,
					re: '2'
				}
				this.$axios.putTaskStatus(obj).then((res) => {
					console.log(res)
					this.$message({
						message: '审核不通过!',
						type: 'success'
					});
					this.getDetailsTask(this.taskListData.workId);
					this.dialogTaskFailVisible = false;
					this.failTaskTextarea = '';
				})
			},
			reviewBtnClick(val, formName) {
				this.$refs[formName].validate((valid) => {
					if (valid) {
						if (val === 'ongoing') {
							this.dialogTaskFailVisible = true;
						} else {
							let obj = {
								msg: '',
								status: val,
								workId: this.taskListData.workId,
								userId: this.userDetail.id,
								re: ''
							}
							this.$axios.putTaskStatus(obj).then((res) => {
								console.log(res)
								this.$message({
									message: '审核通过!',
									type: 'success'
								});
								this.getDetailsTask(this.taskListData.workId);
							})
						}
					} else {
						console.log('error submit!!');
						return false;
					}
				});
			},
			breakDownTask() {
				console.log(this.taskForm)
				console.log(this.leaderOptions)
				let arr = [];
				if (this.taskForm.crewList !== null && this.taskForm.crewList.length > 0) {
					console.log(this.taskForm.crewList[0].username);
					if (this.taskForm.crewList[0].username !== undefined) {
						let crew = JSON.parse(JSON.stringify(this.taskForm.crewList));
						let le = JSON.parse(JSON.stringify(this.leaderOptions));
						console.log(crew)
						console.log(le)
						let arrPush = [...crew, ...le];
						arr = Array.from(new Set(arrPush));
					} else {
						arr = JSON.parse(JSON.stringify(this.leaderOptions));
					}
				} else {
					arr = JSON.parse(JSON.stringify(this.leaderOptions));
				}
				console.log(arr)
				let obj = {
					name: this.taskForm.title,
					id: this.taskForm.id,
					stateTime: this.taskForm.stateTime,
					completeTime: this.taskForm.completeTime,
					title: this.taskForm.title,
					crewList: arr,
					workloadCount: this.storeWorkLoadCount
				}
				this.$store.commit('changeSuperior', {
					superior: obj
				})
				this.$router.push({name: 'addTask'});
			},
			groupRemove(val) {
				// console.log(val)
				let crew = JSON.parse(JSON.stringify(this.saveHistoryDetail));
				// console.log(crew)
				if (this.isPublisher === true) {
					let index = crew.crewList.findIndex(item => item === val);
					if (index > -1) {
						this.$message({
							message: '不可删除已添加过得组员！',
							type: 'warning'
						});
						// console.log(this.taskForm.crewList)
						this.taskForm.crewList.splice(index, 0, val);
					}
				}
			},
			addGroupChange(val) {
				console.log(val)
				let count;
				let a1 = Date.parse(this.taskForm.stateTime);
				let a2 = Date.parse(this.taskForm.completeTime);
				console.log(a1, a2)
				console.log(a2-a1);
				count = Math.ceil((a2-a1)/ (1000 * 60 * 60 * 24)) + 1;//核心：时间戳相减，然后除以天数
				console.log(count)
				let crew = [...val];
				let index = crew.indexOf(this.taskForm.executor.id);
				console.log(index)
				if (index > -1) {
					crew.splice(index, 1);
				}
				console.log(crew.length)
				count = (1 + crew.length) * count;
				console.log(count)
				this.taskForm.workload = count;
			},
			// 完成任务附件添加
			handleExceed (files, fileList) { //  最多上传5个附件，多出时提示
				this.$message.warning(`最多只能上传 5 个文件`);
			},
			handleRemove (file, fileList) { // 删除附件
				let arr = JSON.parse(JSON.stringify(this.attachmentsArr));
				arr.splice(arr.findIndex(item => item.name === file.name), 1);
				this.attachmentsArr = arr;
				console.log(this.attachmentsArr);
				// for (let i = 0; i < arr; i++) {
				// if (file.name === this.attachmentsArr[a].name) {
				// 	console.log(22222)
				// 	this.attachmentsArr.splice(a, 1);
				// }
				// }
			},
			beforeAvatarUpload(file) { // 文件上传大小限制
				let isLt2M = file.size / 1024 / 1024 < 300;
				if (!isLt2M) {
					this.$message({
						message: '文件上传大小不能超过300M',
						type: 'warning'
					})
				}
				return isLt2M
			},
			submitUpload() {
				// this.$refs.uploaad.submit();
			},
			handleChange (files) { // 文件上传
				let Obj = {
					"fileId": "",
					"name": "",
					"suffix": "",
					"time": "",
					"type": "",
					"uploader": "",
					"id": null
				}
				console.log(files)
				let form = new FormData();
				form.append('file', files.file);
				this.$axios.postUpload(form).then(res => {
					console.log(res)
					if (res.status === 200) {
						Obj.fileId = res.data.id;
						this.$message({
							message: '附件上传成功!',
							type: 'success'
						});
						Obj.uploader = this.userDetail.id;
						Obj.name = files.file.name;
						Obj.type = 'work';

						let index = files.file.name.indexOf('.');
						let s = files.file.name.substring(index + 1);
						Obj.suffix = s;

						let time = new Date();
						let y = time.getFullYear();
						let m = time.getMonth() + 1;
						m = m < 10?'0' + m:m;
						let d = time.getDate();
						d = d < 10?'0' + d:d;
						let h = time.getHours();
						h = h < 10?'0' + h:h;
						let mm = time.getMinutes();
						mm = mm < 10?'0' + mm:mm;
						let ss = time.getSeconds();
						ss = ss < 10?'0' + ss:ss;
						Obj.time = `${y}-${m}-${d} ${h}:${mm}:${ss}`;
						console.log(Obj)
						this.attachmentsArr.push(Obj);
						// this.$axios.postAttachmentOneByOne(Obj).then((res) => {
						// 	console.log(res)
						// 	if (res.status === 200) {
						// 		let data = {
						// 			id: res.data.id,
						// 			name: Obj.name
						// 		}
						// 		this.attachmentsArr.push(data)
						// 	}
						// })
						// this.attachmentsArr.push(Obj); // 把多个附件添加到一个数组中，留到把附件添加到所属工作中时使用
						console.log(this.attachmentsArr);
					}
				})
			},
			handleNodeClick(data) {
				console.log(data);
				localStorage.setItem('taskDetail', this.$Base64.encode(JSON.stringify(data)));
				this.$router.push({name: 'taskDetails'});
			},
		},
//生命周期 - 创建完成（可以访问当前this实例）
		created () {

		},
//生命周期 - 挂载完成（可以访问DOM元素）
		mounted () {
			this.taskListData = JSON.parse(this.$Base64.decode(localStorage.getItem('taskDetail')));
			console.log(this.taskListData)
			this.userDetail = JSON.parse(this.$Base64.decode(localStorage.getItem('login')));
			this.getUserById(this.userDetail.id);
			let that = this;
			setTimeout(function () {
				if (that.taskListData.workId !== undefined) {
					that.getDetailsTask(that.taskListData.workId);
				} else {
					that.getDetailsTask(that.taskListData.id);
				}
			}, 100)
		},
		beforeCreate () {
		}, //生命周期 - 创建之前
		beforeMount () {
		}, //生命周期 - 挂载之前
		beforeUpdate () {
		}, //生命周期 - 更新之前
		updated () {
		}, //生命周期 - 更新之后
		beforeDestroy () {
		}, //生命周期 - 销毁之前
		destroyed () {
		}, //生命周期 - 销毁完成
		activated () {
		}, //如果页面有keep-alive缓存功能，这个函数会触发
	}
</script>
<style scoped>
	.taskDetails{
		/*height: 60%;*/
		margin: 30px 0;
		position: relative;
		/*overflow-y: auto;*/
	}

	.viewEvaLi {
		width: 600px;
		margin: 100px auto;
	}
	.viewEvaLi li{
		margin-top: 20px;
		height: 80px;
		margin-left: 100px;
		font-size: 20px;
	}

	.btnStyle{
		text-align: center;
		margin-top: 30px;
	}

	.upload-file{
		width: 500px;
	}

	.viewFileLi{
		float: left;
		display: block;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: left;
		align-items: center;
	}

	.viewFileLi li{
		margin-right: 40px;
		cursor: pointer;
		line-height: 50px;
		font-size: 18px;
	}

	.fileNameList{
		font-size: 20px;
		color: #5059D5;
		line-height: 40px;
	}

	.titleSpans{
		display: block;
		width: 99%;
		overflow: hidden;
		text-overflow:ellipsis;
		white-space: nowrap;
	}

	.detailHeader{
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.titleStatusName{
		margin-left: 0px;
	}

	.titleWid{
		display: inline;
		max-width: 500px;
		overflow: hidden;
		vertical-align: middle;
		text-overflow:ellipsis;
		white-space: nowrap;
		margin-right: 10px;
		font-size: 20px;
		font-weight: bold;
	}

	.statusBg{
		display: inline-block;
		/*width: 70px;*/
		text-align: center;
		vertical-align: middle;
		padding: 3px 10px;
		font-size: 18px;
		/*height: 25px;*/
		background: #EFF2FA;
	}

	.taskPush{
		width: 90%;
		margin: 70px auto;
		text-align: left;
	}

	.taskPushScore{
		width: 70%;
		margin: 50px auto;
		text-align: left;
	}

	.taskPush /deep/ .el-textarea__inner {
		display: block;
		resize: vertical;
		padding: 5px 15px;
		line-height: 1.5;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		width: 100%;
		font-size: inherit;
		color: #606266;
		background-color: #EFF2FA;
		background-image: none;
		border: 1px solid #DCDFE6;
		border-radius: 4px;
		-webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
		transition: border-color .2s cubic-bezier(.645,.045,.355,1);
	}


	.dialogBtns{
		position: fixed;
		bottom: 0;
		left: 10%;
		width: 80%;
		margin: 80px auto;
		text-align: center;
		border-top: 2px solid #5059D5;
	}

	.mrgt{
		margin-top: 20px;
	}

	/deep/ .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
		background-color: #5059D5;
		border-color: #5059D5;
	}

	/deep/ .el-checkbox__input.is-checked+.el-checkbox__label {
		color: #000;
	}

	/deep/ .el-checkbox__inner:hover {
		border-color: #5059D5;
	}

	/deep/ .el-form-item__label {
		/*text-align: center;*/
		vertical-align: middle;
		/*float: none;*/
		width: 135px;
		font-size: 18px;
		color: #787682;
		line-height: 40px;
		/*padding: 0 12px 0 0;*/
		/*-webkit-box-sizing: border-box;*/
		/*box-sizing: border-box;*/
	}

	.oneLeftLabel /deep/ .el-form-item__label {
		/*text-align: center;*/
		vertical-align: middle;
		/*float: none;*/
		width: 100px;
		font-size: 18px;
		color: #787682;
		line-height: 40px;
		/*padding: 0 12px 0 0;*/
		/*-webkit-box-sizing: border-box;*/
		/*box-sizing: border-box;*/
	}

	/deep/ .el-form-item__content {
		line-height: 40px;
		position: relative;
		font-size: 18px;
		margin-left: 0 !important;
		color: #19152c;
	}

	.taskUploadTitle{
		width: 90%;
		margin: 30px auto;
	}

	.taskUpload{
		width: 90%;
		margin: 0 auto;
	}

	/*/deep/ .el-textarea__inner {*/
		/*display: block;*/
		/*resize: vertical;*/
		/*padding: 5px 15px;*/
		/*line-height: 1.5;*/
		/*-webkit-box-sizing: border-box;*/
		/*box-sizing: border-box;*/
		/*width: 100%;*/
		/*font-size: inherit;*/
		/*color: #000;*/
		/*background-color: #EFF2FA;*/
		/*background-image: none;*/
		/*border: 1px solid #DCDFE6; !*no*!*/
		/*border-radius: 4px;*/
		/*-webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);*/
		/*transition: border-color .2s cubic-bezier(.645,.045,.355,1);*/
	/*}*/

	.mainTaskSpan{
		border-bottom: 1px solid #5059d5; /*no*/
		cursor: pointer;
	}
	.mainTaskSpan:hover{
		color: #5059d5;
	}

	.mainTaskContent{
		width: 950px;
		height: 350px;
		overflow-y: auto;
		/*border: 1px solid #5059d5;!*no*!*/
		text-indent: 10px;
		font-size: 18px !important;
		color: #19152c;
		border-radius: 4px;
		background: #EFF2FA;
		font-family: Alibaba !important;
	}

	.inputCount /deep/ .el-input {
		position: relative;
		font-size: 18px;
		display: inline-block;
		width: 55%;
	}

	/deep/ .el-upload-list__item {
		-webkit-transition: all .5s cubic-bezier(.55,0,.1,1);
		transition: all .5s cubic-bezier(.55,0,.1,1);
		font-size: 0.072917rem;
		color: #606266;
		line-height: 1.8;
		margin-top: 0.026042rem;
		position: relative;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		border-radius: 0.020833rem;
		width: 70%;
		font-size: 18px;
	}

	.contentDetails{
		padding: 20px 20px;
		height: 600px; /*no*/
		/*border: 1px solid #a8acea; !*no*!*/
		overflow-y: auto;
		font-size: 18px;
		border-radius: 4px;
		background: #EFF2FA;
	}

	/deep/ .el-input__inner{
		border-color: #a8acea;/*no*/
		font-size: 18px;
	}

	/deep/ .el-input__inner:hover {
		border-color: #5059d5;
	}

	/deep/ .el-input.is-active .el-input__inner, .el-input__inner:focus {
		border-color: #5059d5;
		outline: 0;
	}

	/deep/ .el-textarea__inner{
		border-color: #a8acea;
	}

	/deep/ .el-textarea__inner:hover {
		border-color: #5059d5;
	}

	/deep/ .el-textarea__inner:focus {
		outline: 0;
		border-color: #5059d5;
	}

	/deep/ .el-form-item__label{
		text-align: left;
	}

	.contentGroup /deep/ .el-form-item__label {
		text-align: center;
		vertical-align: middle;
		float: none;
		font-size: 18px;
		color: #787682;
		line-height: 40px;
		padding: 0 12px 0 0;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
	}

	.contentGroup /deep/ .el-form-item__content {
		line-height: 40px;
		position: relative;
		font-size: 18px;
		margin-left: 0 !important;
	}

	.groupItemDiv{
		width: 100%;
		height: 60px;
		border-radius: 4px;
		line-height: 60px;
		background: #EFF2FA;
	}
	.groupItemDiv span{
		display: inline-block;
		width: 100px;
		height: 30px;
		font-size: 16px;
		background: #FFF;
		line-height: 30px;
		margin: 0 20px;
		border-radius: 4px;
		text-align: center;
		cursor: default;
	}

	.textBtns {
		position: fixed;
		right: 80px;
		z-index: 1000;
	}

	.textBtns /deep/ .el-button {
		display: inline-block;
		white-space: nowrap;
		cursor: pointer;
		background: none;
		border: none;
		color: #5059d5;
		-webkit-appearance: none;
		text-align: center;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		outline: 0;
		margin: 0;
		-webkit-transition: .1s;
		transition: .1s;
		font-weight: 600;
		padding: 8px 24px;
		font-size: 18px;
		box-shadow: none;
	}

	.textBtns /deep/ .el-button:hover{
		color: #7c87e8;
	}

	.textBtns i{
		font-size: 18px;
		margin-right: 5px;
	}

	.groupAdd /deep/ .el-input__inner {
		-webkit-appearance: none;
		background-color: #EFF2FA;
		background-image: none;
		border-radius: 4px;
		border: 0px solid #DCDFE6;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		color: #19152c;
		display: inline-block;
		font-size: 18px;
		height: 60px !important;
		line-height: 60px !important;
		outline: 0;
		padding: 0 15px;
		-webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
		transition: border-color .2s cubic-bezier(.645,.045,.355,1);
		width: 100%;
		cursor: pointer;
	}

	.groupAdd /deep/ .el-tag {
		background-color: #FFF;
		border-color: #FFF;
		display: inline-block;
		height: 35px;
		padding: 0 15px;
		line-height: 35px;
		margin-right: 10px;
		font-size: 16px;
		color: #19152c;
		border-width: 1px;
		border-style: solid;
		border-radius: 4px;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		white-space: nowrap;
		cursor: pointer;
	}

	.groupAdd /deep/ .el-select .el-input .el-select__caret {
		color: #19152c;
	}

	.mainTaskDialogDiv{
		height: 590px;
		overflow-y: auto;
	}

	/deep/ .el-step.is-horizontal {
		display: inline-block;
		flex-basis: 350px !important;
		margin-right: 0px !important;
	}

	/deep/ .el-step__title {
		font-size: 16px;
		line-height: 38px;
	}

	/deep/ .el-step__description {
		padding-right: 10%;
		margin-top: 3px;
		font-size: 18px;
		line-height: 20px;
		font-weight: 400;
	}

	/deep/ .el-step__line {
		position: absolute;
		border-color: inherit;
		background-color: #d1d1d1;
	}

	.returnTimeLine /deep/ .el-step__head.is-wait {
		color: #fc9200;
		border-color: #fc9200;
	}

	.returnTimeLine /deep/ .el-step__icon.is-text {
		border-radius: 50%;
		border: 2px solid;
		border-color: #fc9200;
		color: #fc9200;
	}

	.returnTimeLine /deep/ .el-step__title.is-process {
		color: #fc9200;
	}

	.returnTimeLine /deep/ .el-step__description.is-process {
		color: #fc9200;
	}

	.returnTimeLine /deep/ .el-step__title.is-wait {
		color: #fc9200;
	}

	.returnTimeLineLeft /deep/ .el-step__line{
		position: absolute;
		border-color: inherit;
		background-color: #fc9200;
	}

	/deep/ .el-step__head.is-process {
		color: #d1d1d1;
		border-color: #d1d1d1;
	}

	/deep/ .el-step__description.is-success {
		color: #3cc65c;
	}

	/deep/ .el-step__title.is-process {
		font-weight: 500;
		color: #d1d1d1;
	}

	/deep/ .el-step__description.is-process {
		color: #d1d1d1;
	}

	/deep/ .el-step__head.is-wait {
		color: #d1d1d1;
		border-color: #d1d1d1;
	}

	/deep/ .el-step__head.is-success {
		color: #3cc65c;
		border-color: #3cc65c;
	}

	/deep/ .el-step__title.is-success {
		color: #3cc65c;
	}

	/*/deep/ .el-step__icon-inner{*/
		/*color: #5059d5;*/
	/*}*/

	/deep/ .el-step__title.is-wait {
		color: #d1d1d1;
	}

	/deep/ .el-step__description.is-wait {
		color: #d1d1d1;
	}

	/deep/ .el-step.is-horizontal .el-step__line {
		height: 2px;/*no*/
		top: 20px;
		left: 5px; /*no*/
		right: -1px; /*no*/
	}

	/*/deep/ .el-step__head.is-success .el-step__icon-inner {*/
		/*color: #3cc65c;*/
		/*border: 2px solid; !*no*!*/
		/*border-radius: 50%;*/
		/*padding: 3px 3px; !*no*!*/
	/*}*/
</style>
