入职流程完成
This commit is contained in:
@@ -271,9 +271,9 @@ public class SysUserController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
||||
@GetMapping("/tempRole")
|
||||
public R<Void> insertTempRole(Long userId) {
|
||||
Long[] roleId = roleService.selectRoleByName();
|
||||
@GetMapping("/tempRole/{userId}")
|
||||
public R<Void> insertTempRole(@PathVariable("userId") Long userId) {
|
||||
Long[] roleId = roleService.selectTempRoleByName();
|
||||
userService.insertUserAuth(userId, roleId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@@ -66,8 +66,6 @@ public class WfProcessController extends BaseController {
|
||||
@SaCheckPermission("workflow:process:todoList")
|
||||
@GetMapping(value = "/todoList")
|
||||
public TableDataInfo<WfTaskVo> todoProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
System.out.println("processQuery====" + processQuery);
|
||||
System.out.println("pageQuery====" + pageQuery);
|
||||
return processService.selectPageTodoProcessList(processQuery, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,16 +44,11 @@ public class SysUser extends BaseEntity {
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@Xss(message = "用户账号不能包含脚本字符")
|
||||
@NotBlank(message = "用户账号不能为空")
|
||||
@Size(min = 0, max = 30, message = "用户账号长度不能超过{max}个字符")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@Xss(message = "用户昵称不能包含脚本字符")
|
||||
@Size(min = 0, max = 30, message = "用户昵称长度不能超过{max}个字符")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
@@ -64,15 +59,11 @@ public class SysUser extends BaseEntity {
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
@Sensitive(strategy = SensitiveStrategy.EMAIL)
|
||||
@Email(message = "邮箱格式不正确")
|
||||
@Size(min = 0, max = 50, message = "邮箱长度不能超过{max}个字符")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@Sensitive(strategy = SensitiveStrategy.PHONE)
|
||||
private String phonenumber;
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,10 +41,7 @@ public class EmployeeOnboarding extends BaseEntity {
|
||||
* 入职日期
|
||||
*/
|
||||
private Date joiningDate;
|
||||
/**
|
||||
* 试用期结束日期
|
||||
*/
|
||||
private Date probationPeriodEnd;
|
||||
|
||||
|
||||
private String address;
|
||||
|
||||
@@ -52,42 +49,7 @@ public class EmployeeOnboarding extends BaseEntity {
|
||||
* 直属经理ID
|
||||
*/
|
||||
private Long managerId;
|
||||
/**
|
||||
* 是否提交入职资料
|
||||
*/
|
||||
private Integer documentsSubmitted;
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
private Integer orientationCompleted;
|
||||
/**
|
||||
* 入职状态(pending,completed,onboarding)
|
||||
*/
|
||||
private Long joiningStatus;
|
||||
/**
|
||||
* 是否完成招聘与面试
|
||||
*/
|
||||
private Integer recruitmentCompleted;
|
||||
/**
|
||||
* 是否已发放Offer
|
||||
*/
|
||||
private Integer offerIssued;
|
||||
/**
|
||||
* 是否已签署合同
|
||||
*/
|
||||
private Integer contractSigned;
|
||||
/**
|
||||
* 入职材料/工作准备是否完成
|
||||
*/
|
||||
private Integer materialsPrepared;
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
private Integer trainingCompleted;
|
||||
/**
|
||||
* 是否完成工作条件准备(权限分配、工位等)
|
||||
*/
|
||||
private Integer workConditionsPrepared;
|
||||
|
||||
/**
|
||||
* 最高学历
|
||||
*/
|
||||
@@ -129,10 +91,6 @@ public class EmployeeOnboarding extends BaseEntity {
|
||||
* 体重
|
||||
*/
|
||||
private Long weight;
|
||||
/**
|
||||
* 编制类型
|
||||
*/
|
||||
private String staffType;
|
||||
/**
|
||||
* 紧急联系人1
|
||||
*/
|
||||
|
||||
@@ -46,65 +46,11 @@ public class EmployeeOnboardingBo extends BaseEntity {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date joiningDate;
|
||||
|
||||
/**
|
||||
* 试用期结束日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date probationPeriodEnd;
|
||||
|
||||
/**
|
||||
* 直属经理ID
|
||||
*/
|
||||
private Long managerId;
|
||||
|
||||
/**
|
||||
* 是否提交入职资料
|
||||
*/
|
||||
private Integer documentsSubmitted;
|
||||
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
private Integer orientationCompleted;
|
||||
|
||||
/**
|
||||
* 入职状态(pending,completed,onboarding)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Long joiningStatus;
|
||||
|
||||
/**
|
||||
* 是否完成招聘与面试
|
||||
*/
|
||||
private Integer recruitmentCompleted;
|
||||
|
||||
/**
|
||||
* 是否已发放Offer
|
||||
*/
|
||||
private Integer offerIssued;
|
||||
|
||||
/**
|
||||
* 是否已签署合同
|
||||
*/
|
||||
private Integer contractSigned;
|
||||
|
||||
/**
|
||||
* 入职材料/工作准备是否完成
|
||||
*/
|
||||
private Integer materialsPrepared;
|
||||
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
private Integer trainingCompleted;
|
||||
|
||||
/**
|
||||
* 是否完成工作条件准备(权限分配、工位等)
|
||||
*/
|
||||
private Integer workConditionsPrepared;
|
||||
|
||||
/**
|
||||
* 最高学历
|
||||
*/
|
||||
@@ -154,10 +100,6 @@ public class EmployeeOnboardingBo extends BaseEntity {
|
||||
*/
|
||||
private Long weight;
|
||||
|
||||
/**
|
||||
* 编制类型
|
||||
*/
|
||||
private String staffType;
|
||||
|
||||
/**
|
||||
* 紧急联系人1
|
||||
|
||||
@@ -48,11 +48,6 @@ public class EmployeeOnboardingVo extends EmployeeOnboarding {
|
||||
@ExcelProperty(value = "入职日期")
|
||||
private Date joiningDate;
|
||||
|
||||
/**
|
||||
* 试用期结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "试用期结束日期")
|
||||
private Date probationPeriodEnd;
|
||||
|
||||
/**
|
||||
* 直属经理ID
|
||||
@@ -60,62 +55,6 @@ public class EmployeeOnboardingVo extends EmployeeOnboarding {
|
||||
@ExcelProperty(value = "直属经理ID")
|
||||
private Long managerId;
|
||||
|
||||
/**
|
||||
* 是否提交入职资料
|
||||
*/
|
||||
@ExcelProperty(value = "是否提交入职资料")
|
||||
private Integer documentsSubmitted;
|
||||
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
@ExcelProperty(value = "是否完成入职培训")
|
||||
private Integer orientationCompleted;
|
||||
|
||||
/**
|
||||
* 入职状态(pending,completed,onboarding)
|
||||
*/
|
||||
@ExcelProperty(value = "入职状态(pending,completed,onboarding)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "joining_status")
|
||||
private Long joiningStatus;
|
||||
|
||||
/**
|
||||
* 是否完成招聘与面试
|
||||
*/
|
||||
@ExcelProperty(value = "是否完成招聘与面试")
|
||||
private Integer recruitmentCompleted;
|
||||
|
||||
/**
|
||||
* 是否已发放Offer
|
||||
*/
|
||||
@ExcelProperty(value = "是否已发放Offer")
|
||||
private Integer offerIssued;
|
||||
|
||||
/**
|
||||
* 是否已签署合同
|
||||
*/
|
||||
@ExcelProperty(value = "是否已签署合同")
|
||||
private Integer contractSigned;
|
||||
|
||||
/**
|
||||
* 入职材料/工作准备是否完成
|
||||
*/
|
||||
@ExcelProperty(value = "入职材料/工作准备是否完成")
|
||||
private Integer materialsPrepared;
|
||||
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
@ExcelProperty(value = "是否完成入职培训")
|
||||
private Integer trainingCompleted;
|
||||
|
||||
/**
|
||||
* 是否完成工作条件准备(权限分配、工位等)
|
||||
*/
|
||||
@ExcelProperty(value = "是否完成工作条件准备", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "权=限分配、工位等")
|
||||
private Integer workConditionsPrepared;
|
||||
|
||||
/**
|
||||
* 最高学历
|
||||
*/
|
||||
@@ -170,12 +109,6 @@ public class EmployeeOnboardingVo extends EmployeeOnboarding {
|
||||
@ExcelProperty(value = "体重")
|
||||
private Long weight;
|
||||
|
||||
/**
|
||||
* 编制类型
|
||||
*/
|
||||
@ExcelProperty(value = "编制类型")
|
||||
private String staffType;
|
||||
|
||||
/**
|
||||
* 紧急联系人1
|
||||
*/
|
||||
|
||||
@@ -13,4 +13,5 @@ import com.ruoyi.oa.domain.vo.EmployeeOnboardingVo;
|
||||
*/
|
||||
public interface EmployeeOnboardingMapper extends BaseMapperPlus<EmployeeOnboardingMapper, EmployeeOnboarding, EmployeeOnboardingVo> {
|
||||
|
||||
Boolean updateByUserId(EmployeeOnboarding update);
|
||||
}
|
||||
|
||||
@@ -83,17 +83,7 @@ public class EmployeeOnboardingServiceImpl implements IEmployeeOnboardingService
|
||||
LambdaQueryWrapper<EmployeeOnboarding> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getUserId() != null, EmployeeOnboarding::getUserId, bo.getUserId());
|
||||
lqw.eq(bo.getJoiningDate() != null, EmployeeOnboarding::getJoiningDate, bo.getJoiningDate());
|
||||
lqw.eq(bo.getProbationPeriodEnd() != null, EmployeeOnboarding::getProbationPeriodEnd, bo.getProbationPeriodEnd());
|
||||
lqw.eq(bo.getManagerId() != null, EmployeeOnboarding::getManagerId, bo.getManagerId());
|
||||
lqw.eq(bo.getDocumentsSubmitted() != null, EmployeeOnboarding::getDocumentsSubmitted, bo.getDocumentsSubmitted());
|
||||
lqw.eq(bo.getOrientationCompleted() != null, EmployeeOnboarding::getOrientationCompleted, bo.getOrientationCompleted());
|
||||
lqw.eq(bo.getJoiningStatus() != null, EmployeeOnboarding::getJoiningStatus, bo.getJoiningStatus());
|
||||
lqw.eq(bo.getRecruitmentCompleted() != null, EmployeeOnboarding::getRecruitmentCompleted, bo.getRecruitmentCompleted());
|
||||
lqw.eq(bo.getOfferIssued() != null, EmployeeOnboarding::getOfferIssued, bo.getOfferIssued());
|
||||
lqw.eq(bo.getContractSigned() != null, EmployeeOnboarding::getContractSigned, bo.getContractSigned());
|
||||
lqw.eq(bo.getMaterialsPrepared() != null, EmployeeOnboarding::getMaterialsPrepared, bo.getMaterialsPrepared());
|
||||
lqw.eq(bo.getTrainingCompleted() != null, EmployeeOnboarding::getTrainingCompleted, bo.getTrainingCompleted());
|
||||
lqw.eq(bo.getWorkConditionsPrepared() != null, EmployeeOnboarding::getWorkConditionsPrepared, bo.getWorkConditionsPrepared());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@@ -118,7 +108,8 @@ public class EmployeeOnboardingServiceImpl implements IEmployeeOnboardingService
|
||||
public Boolean updateByBo(EmployeeOnboardingBo bo) {
|
||||
EmployeeOnboarding update = BeanUtil.toBean(bo, EmployeeOnboarding.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
|
||||
return baseMapper.updateByUserId(update);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,17 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="idPhoto" column="id_photo"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="joiningDate" column="joining_date"/>
|
||||
<result property="probationPeriodEnd" column="probation_period_end"/>
|
||||
<result property="managerId" column="manager_id"/>
|
||||
<result property="documentsSubmitted" column="documents_submitted"/>
|
||||
<result property="orientationCompleted" column="orientation_completed"/>
|
||||
<result property="joiningStatus" column="joining_status"/>
|
||||
<result property="recruitmentCompleted" column="recruitment_completed"/>
|
||||
<result property="offerIssued" column="offer_issued"/>
|
||||
<result property="contractSigned" column="contract_signed"/>
|
||||
<result property="materialsPrepared" column="materials_prepared"/>
|
||||
<result property="trainingCompleted" column="training_completed"/>
|
||||
<result property="workConditionsPrepared" column="work_conditions_prepared"/>
|
||||
<result property="highestDegree" column="highest_degree"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
@@ -34,10 +24,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="politicalStatus" column="political_status"/>
|
||||
<result property="height" column="height"/>
|
||||
<result property="weight" column="weight"/>
|
||||
<result property="staffType" column="staff_type"/>
|
||||
<result property="emergencyContact1" column="emergency_contact1"/>
|
||||
<result property="emergencyContact2" column="emergency_contact2"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<update id="updateByUserId" parameterType="com.ruoyi.oa.domain.EmployeeOnboarding">
|
||||
|
||||
update employee_onboarding
|
||||
<set>
|
||||
<if test="idPhoto != null and idPhoto != 0">id_photo = #{idPhoto},</if>
|
||||
<if test="joiningDate != null and joiningDate != ''">joining_date = #{joiningDate},</if>
|
||||
<if test="managerId != null and managerId != ''">manager_id = #{managerId},</if>
|
||||
<if test="highestDegree != null and highestDegree != ''">highest_degree = #{highestDegree},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="birthDate != null and birthDate != ''">birth_date = #{birthDate},</if>
|
||||
<if test="ethnicity != null and ethnicity != ''">ethnicity = #{ethnicity},</if>
|
||||
<if test="confirmDate != null and confirmDate != ''">confirm_date = #{confirmDate},</if>
|
||||
<if test="maritalStatus != null and maritalStatus != ''">marital_status = #{maritalStatus},</if>
|
||||
<if test="politicalStatus != null and politicalStatus != ''">political_status = #{politicalStatus},</if>
|
||||
<if test="height != null and height != ''">height = #{height},</if>
|
||||
<if test="weight != null and weight != ''">weight = #{weight},</if>
|
||||
<if test="emergencyContact1 != null and emergencyContact1 != ''">emergency_contact1 = #{emergencyContact1},</if>
|
||||
<if test="emergencyContact2 != null and emergencyContact2 != ''">emergency_contact2 = #{emergencyContact2},</if>
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -65,4 +65,8 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, Sy
|
||||
* @return
|
||||
*/
|
||||
SysRole getCurrentRole(Long userId);
|
||||
|
||||
Long[] selectTempRoleByName();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public interface ISysRoleService {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Long[] selectRoleByName();
|
||||
Long[] selectTempRoleByName();
|
||||
|
||||
|
||||
SysRole getCurrentRole();
|
||||
|
||||
@@ -442,8 +442,9 @@ public class SysRoleServiceImpl implements ISysRoleService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long[] selectRoleByName() {
|
||||
return new Long[0];
|
||||
public Long[] selectTempRoleByName() {
|
||||
|
||||
return baseMapper.selectTempRoleByName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -313,9 +313,11 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
|
||||
//获取部门信息(新增于2024年2月29日)
|
||||
SysUser sysUser = sysUserService.selectUserById(userId);
|
||||
SysDept sysDept = sysDeptService.selectDeptById(sysUser.getDeptId());
|
||||
flowTask.setDeptName(sysDept.getDeptName());
|
||||
if (sysUser.getDeptId()!=null){
|
||||
SysDept sysDept = sysDeptService.selectDeptById(sysUser.getDeptId());
|
||||
flowTask.setDeptName(sysDept.getDeptName());
|
||||
|
||||
}
|
||||
// 流程变量
|
||||
flowTask.setProcVars(task.getProcessVariables());
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysRoleMapper">
|
||||
|
||||
<resultMap type="SysRole" id="SysRoleResult">
|
||||
<resultMap type="com.ruoyi.common.core.domain.entity.SysRole" id="SysRoleResult">
|
||||
<id property="roleId" column="role_id"/>
|
||||
<result property="roleName" column="role_name"/>
|
||||
<result property="roleKey" column="role_key"/>
|
||||
@@ -76,5 +76,8 @@
|
||||
join sys_user_role sur on sur.role_id = r.role_id
|
||||
where #{userId} = sur.user_id
|
||||
</select>
|
||||
<select id="selectTempRoleByName" resultType="Long">
|
||||
select r.role_id from sys_role r where r.role_key = 'temp'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -5,8 +5,8 @@ VUE_APP_TITLE = 福安德综合办公系统
|
||||
ENV = 'development'
|
||||
|
||||
# 若依管理系统/开发环境
|
||||
# VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_BASE_API = 'http://110.41.139.73:8080'
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
# VUE_APP_BASE_API = 'http://110.41.139.73:8080'
|
||||
|
||||
# 应用访问路径 例如使用前缀 /admin/
|
||||
VUE_APP_CONTEXT_PATH = '/'
|
||||
|
||||
@@ -9,6 +9,13 @@ export function listUser(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询用户列表
|
||||
export function tempRole(userId) {
|
||||
return request({
|
||||
url: '/system/user/tempRole/'+userId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询员工列表
|
||||
export function listWorker(query) {
|
||||
|
||||
@@ -62,3 +62,10 @@ export function returnList(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getTaskFormDetail(taskId) {
|
||||
return request({
|
||||
url: '/workflow/task/processVariables/'+taskId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -159,18 +159,20 @@ export default {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
}
|
||||
cur['on-success'] = (res, file, fileList) => {
|
||||
|
||||
formData[cur.__vModel__] = fileList;
|
||||
if (res.code === 200 && fileList) {
|
||||
config.defaultValue = fileList;
|
||||
fileList.forEach(val =>{
|
||||
val.url = val.response.data.url;
|
||||
val.ossId = val.response.data.ossId;
|
||||
val.url = val.response.url;
|
||||
val.fileName = val.response.fileName;
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
// 点击文件列表中已上传的文件时的钩子
|
||||
cur['on-preview'] = (file) => {
|
||||
this.$download(file.ossId)
|
||||
this.$download.resource(file.fileName)
|
||||
}
|
||||
}
|
||||
if (config.children) {
|
||||
@@ -235,7 +237,8 @@ export default {
|
||||
debugger
|
||||
this.$emit('getData', this[this.formConf.formModel])
|
||||
// this.$emit('getData',this.formConfCopy)
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
render(h) {
|
||||
return renderFrom.call(this, h)
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addUser, deptTreeSelect, listUser} from "@/api/system/user";
|
||||
import {addUser, deptTreeSelect, listUser, tempRole} from "@/api/system/user";
|
||||
import {addOnboarding} from "@/api/oa/onboarding";
|
||||
|
||||
export default {
|
||||
@@ -227,34 +227,28 @@ export default {
|
||||
});
|
||||
},
|
||||
/** 新增入职 */
|
||||
//TODO status:0 现在新增后账号立马开通不走流程
|
||||
saveFormToOnboarding(){
|
||||
this.loading=true;
|
||||
let userForm = {
|
||||
userName: this.form.userName,
|
||||
nickName: this.form.nickName,
|
||||
phonenumber: this.form.phonenumber,
|
||||
email: this.form.email,
|
||||
address: this.form.address,
|
||||
password: "123456",
|
||||
sex:this.form.sex,
|
||||
userType:"sys_user",
|
||||
deptId:this.form.deptId,
|
||||
avatar:this.form.idPhoto,
|
||||
status:0,
|
||||
idCard:this.form.idCard,
|
||||
bankCard:this.form.bankCard,
|
||||
}
|
||||
// 添加入职后添加用户账号
|
||||
addUser(userForm).then(response => {
|
||||
userForm.password = null;
|
||||
listUser(userForm).then(response => {
|
||||
this.form.userId = response.rows[0].userId;
|
||||
addOnboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.loading = false;
|
||||
this.goBack()
|
||||
let userId = response.rows[0].userId;
|
||||
this.form.userId = userId
|
||||
tempRole(userId).then(response => {
|
||||
addOnboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.loading = false;
|
||||
this.goBack()
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
@@ -38,21 +38,11 @@
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="toAddOnboarding"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:onboarding:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:onboarding:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
@@ -83,61 +73,12 @@
|
||||
<el-table-column label="姓名" align="center" prop="nickName"/>
|
||||
<el-table-column label="入职日期" align="center" prop="joiningDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.joiningDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{scope.row.joiningDate!==null?scope.row.joiningDate:'未完成审批流程'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="试用结束" align="center" prop="confirmDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.probationPeriodEnd, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入职资料" align="center" prop="documentsSubmitted">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.documentsSubmitted===1?'success':'warning'">{{ scope.row.documentsSubmitted===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="入职培训" align="center" prop="orientationCompleted" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.orientationCompleted===1?'success':'warning'">{{ scope.row.orientationCompleted===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入职状态" align="center" prop="joiningStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.joining_status" :value="scope.row.joiningStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成面试" align="center" prop="recruitmentCompleted" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.recruitmentCompleted===1?'success':'warning'">{{ scope.row.recruitmentCompleted===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Offer发放" align="center" prop="offerIssued" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.offerIssued===1?'success':'warning'">{{ scope.row.offerIssued===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签署合同" align="center" prop="contractSigned" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.contractSigned===1?'success':'warning'">{{ scope.row.contractSigned===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="条件准备" align="center" prop="workConditionsPrepared" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.workConditionsPrepared===1?'success':'warning'">{{ scope.row.workConditionsPrepared===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="学历" align="center" prop="highestDegree" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:onboarding:edit']"
|
||||
>完善信息</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -159,54 +100,20 @@
|
||||
|
||||
<!-- 添加或修改入职管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="用户ID (外键)" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户ID (外键)" />
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-form-item label="输入新员工姓名" prop="nickName">
|
||||
<el-input v-model="form.nickName" placeholder="请输入新员工姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入职日期" prop="joiningDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.joiningDate"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择入职日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="试用期结束日期" prop="probationPeriodEnd">
|
||||
<el-date-picker clearable
|
||||
v-model="form.probationPeriodEnd"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择试用期结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="直属经理ID" prop="managerId">
|
||||
<el-input v-model="form.managerId" placeholder="请输入直属经理ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否提交入职资料" prop="documentsSubmitted">
|
||||
<el-input v-model="form.documentsSubmitted" placeholder="请输入是否提交入职资料" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否完成入职培训" prop="orientationCompleted">
|
||||
<el-input v-model="form.orientationCompleted" placeholder="请输入是否完成入职培训" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入职状态(pending,completed,onboarding)" prop="joiningStatus">
|
||||
<el-select v-model="form.joiningStatus" placeholder="请选择入职状态(pending,completed,onboarding)">
|
||||
<el-option
|
||||
v-for="dict in dict.type.joining_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="最高学历" prop="highestDegree">
|
||||
<el-input v-model="form.highestDegree" placeholder="请输入最高学历" />
|
||||
<el-form-item label="输入新员工账号" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入新员工账号,建议使用员工拼音" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
<el-input v-model="form.remark" placeholder="请输入备注内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button type="primary" @click="saveFormToOnboarding">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -215,6 +122,7 @@
|
||||
|
||||
<script>
|
||||
import { listOnboarding, getOnboarding, delOnboarding, addOnboarding, updateOnboarding } from "@/api/oa/onboarding";
|
||||
import {addUser, listUser, tempRole} from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
name: "Onboarding",
|
||||
@@ -245,75 +153,18 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
idPhoto: undefined,
|
||||
userId: undefined,
|
||||
joiningDate: undefined,
|
||||
probationPeriodEnd: undefined,
|
||||
managerId: undefined,
|
||||
documentsSubmitted: undefined,
|
||||
orientationCompleted: undefined,
|
||||
joiningStatus: undefined,
|
||||
recruitmentCompleted: undefined,
|
||||
offerIssued: undefined,
|
||||
contractSigned: undefined,
|
||||
materialsPrepared: undefined,
|
||||
trainingCompleted: undefined,
|
||||
workConditionsPrepared: undefined,
|
||||
highestDegree: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
onboardingId: [
|
||||
{ required: true, message: "入职记录ID不能为空", trigger: "blur" }
|
||||
userName: [
|
||||
{ required: true, message: "系统账号不能为空", trigger: "blur" }
|
||||
],
|
||||
idPhoto: [
|
||||
{ required: true, message: "证件照不能为空", trigger: "blur" }
|
||||
nickName: [
|
||||
{ required: true, message: "姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: "用户ID (外键)不能为空", trigger: "blur" }
|
||||
],
|
||||
joiningDate: [
|
||||
{ required: true, message: "入职日期不能为空", trigger: "blur" }
|
||||
],
|
||||
probationPeriodEnd: [
|
||||
{ required: true, message: "试用期结束日期不能为空", trigger: "blur" }
|
||||
],
|
||||
managerId: [
|
||||
{ required: true, message: "直属经理ID不能为空", trigger: "blur" }
|
||||
],
|
||||
documentsSubmitted: [
|
||||
{ required: true, message: "是否提交入职资料不能为空", trigger: "blur" }
|
||||
],
|
||||
orientationCompleted: [
|
||||
{ required: true, message: "是否完成入职培训不能为空", trigger: "blur" }
|
||||
],
|
||||
joiningStatus: [
|
||||
{ required: true, message: "入职状态(pending,completed,onboarding)不能为空", trigger: "change" }
|
||||
],
|
||||
recruitmentCompleted: [
|
||||
{ required: true, message: "是否完成招聘与面试不能为空", trigger: "change" }
|
||||
],
|
||||
offerIssued: [
|
||||
{ required: true, message: "是否已发放Offer不能为空", trigger: "change" }
|
||||
],
|
||||
contractSigned: [
|
||||
{ required: true, message: "是否已签署合同不能为空", trigger: "change" }
|
||||
],
|
||||
materialsPrepared: [
|
||||
{ required: true, message: "入职材料/工作准备是否完成不能为空", trigger: "change" }
|
||||
],
|
||||
trainingCompleted: [
|
||||
{ required: true, message: "是否完成入职培训不能为空", trigger: "change" }
|
||||
],
|
||||
workConditionsPrepared: [
|
||||
{ required: true, message: "是否完成工作条件准备不能为空", trigger: "change" }
|
||||
],
|
||||
highestDegree: [
|
||||
{ required: true, message: "最高学历不能为空", trigger: "blur" }
|
||||
],
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -324,7 +175,6 @@ export default {
|
||||
|
||||
/** 新增入职员工界面 */
|
||||
toAddOnboarding(){
|
||||
|
||||
this.$router.push({
|
||||
path: '/people/addOnboarding',
|
||||
})
|
||||
@@ -334,7 +184,6 @@ export default {
|
||||
this.loading = true;
|
||||
listOnboarding(this.queryParams).then(response => {
|
||||
this.onboardingList = response.rows;
|
||||
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
@@ -350,19 +199,6 @@ export default {
|
||||
onboardingId: undefined,
|
||||
idPhoto: undefined,
|
||||
userId: undefined,
|
||||
joiningDate: undefined,
|
||||
probationPeriodEnd: undefined,
|
||||
managerId: undefined,
|
||||
documentsSubmitted: undefined,
|
||||
orientationCompleted: undefined,
|
||||
joiningStatus: undefined,
|
||||
recruitmentCompleted: undefined,
|
||||
offerIssued: undefined,
|
||||
contractSigned: undefined,
|
||||
materialsPrepared: undefined,
|
||||
trainingCompleted: undefined,
|
||||
workConditionsPrepared: undefined,
|
||||
highestDegree: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
@@ -392,36 +228,34 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加入职管理";
|
||||
this.title = "添加入职账户";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.$router.push('/people/updateOnboarding/'+row.onboardingId);
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.onboardingId != null) {
|
||||
updateOnboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
|
||||
/** 新增入职 */
|
||||
saveFormToOnboarding(){
|
||||
let userForm = {
|
||||
userName: this.form.userName,
|
||||
password: "123456",
|
||||
userType:"sys_user",
|
||||
status:0,
|
||||
nickName:this.form.nickName,
|
||||
}
|
||||
// 添加入职后添加用户账号
|
||||
addUser(userForm).then(response => {
|
||||
userForm.password = null;
|
||||
listUser(userForm).then(response => {
|
||||
let userId = response.rows[0].userId;
|
||||
this.form.userId = userId
|
||||
tempRole(userId).then(response => {
|
||||
addOnboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.reset()
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<!-- 初始状态 -->
|
||||
<div v-if="currentStep === 0" class="initiation-card">
|
||||
<div class="welcome-section">
|
||||
<el-image
|
||||
src="https://example.com/onboarding-illustration.svg"
|
||||
<el-image
|
||||
src="https://example.com/onboarding-illustration.svg"
|
||||
class="welcome-illustration"
|
||||
:preview-src-list="[]">
|
||||
<div slot="error" class="image-slot">
|
||||
@@ -30,8 +30,8 @@
|
||||
<p class="welcome-subtitle">让我们开始您的入职流程</p>
|
||||
</div>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
<el-button
|
||||
type="primary"
|
||||
class="start-button"
|
||||
@click="startOnboarding"
|
||||
:loading="loading">
|
||||
@@ -50,31 +50,19 @@
|
||||
<!-- 表单状态 -->
|
||||
<transition name="el-fade-in">
|
||||
<div v-if="currentStep === 1" class="form-container">
|
||||
<el-skeleton :rows="5" animated v-if="loading" />
|
||||
|
||||
<el-skeleton :rows="5" animated v-if="loading"/>
|
||||
|
||||
<div v-else class="form-content">
|
||||
<div class="form-header">
|
||||
<h3>入职信息登记(1/2)</h3>
|
||||
<el-progress :percentage="50" :show-text="false" />
|
||||
|
||||
</div>
|
||||
<div class="form-conf" v-if="formOpen">
|
||||
<parser :key="new Date().getTime()" :form-conf="formData" @submit="submit" ref="parser" @getData="getData"/>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<el-button @click="currentStep = 0">上一步</el-button>
|
||||
</div>
|
||||
|
||||
<el-form
|
||||
:model="employeeData"
|
||||
class="employee-form"
|
||||
label-position="top">
|
||||
<!-- 表单字段 -->
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="employeeData.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱">
|
||||
<el-input v-model="employeeData.email"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<div class="form-actions">
|
||||
<el-button @click="currentStep = 0">上一步</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交审核</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
@@ -93,31 +81,98 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Parser from "@/utils/generator/parser";
|
||||
import {
|
||||
detailProcess,
|
||||
getProcessForm,
|
||||
listOwnProcess,
|
||||
listProcess,
|
||||
listTodoProcess,
|
||||
startProcess
|
||||
} from "@/api/workflow/process";
|
||||
import {complete} from "@/api/workflow/task";
|
||||
|
||||
export default {
|
||||
components: {Parser},
|
||||
data() {
|
||||
return {
|
||||
currentStep: 0, // 0-开启流程 1-填写资料 2-等待审核
|
||||
loading: false,
|
||||
employeeData: {
|
||||
name: "",
|
||||
email: ""
|
||||
}
|
||||
formOpen: false,
|
||||
formData: {
|
||||
|
||||
},
|
||||
taskForm: {},
|
||||
queryParams: {
|
||||
category: "onboarding",
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
},
|
||||
deployId: "",
|
||||
definitionId: "",
|
||||
procInsId: null,
|
||||
dateRange: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOwnProcess(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.todoList = response.rows;
|
||||
console.log(response);
|
||||
if (response.rows.length > 0) {
|
||||
this.currentStep=2
|
||||
this.loading = false
|
||||
}else{
|
||||
listProcess(this.queryParams).then(response => {
|
||||
this.deployId = response.rows[0].deploymentId;
|
||||
this.definitionId = response.rows[0].definitionId;
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit(data) {
|
||||
if (data && this.definitionId) {
|
||||
// 启动流程并将表单数据加入流程变量
|
||||
startProcess(this.definitionId, JSON.stringify(data.valData)).then(res => {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.currentStep = 2;
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
async startOnboarding() {
|
||||
this.loading = true
|
||||
try {
|
||||
await new Promise(resolve => setTimeout(resolve, 1500))
|
||||
this.initData()
|
||||
this.currentStep = 1
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
submitForm() {
|
||||
// 这里添加实际提交逻辑
|
||||
this.currentStep = 2
|
||||
},
|
||||
}
|
||||
,
|
||||
|
||||
initData() {
|
||||
getProcessForm({
|
||||
definitionId: this.definitionId,
|
||||
deployId: this.deployId,
|
||||
procInsId: this.procInsId
|
||||
}).then(res => {
|
||||
if (res.data) {
|
||||
this.formData = res.data;
|
||||
this.formOpen = true
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
async logout() {
|
||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@@ -129,7 +184,32 @@ export default {
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
}
|
||||
,
|
||||
|
||||
/** 接收子组件传的值 */
|
||||
getData(data) {
|
||||
if (data) {
|
||||
const variables = [];
|
||||
data.fields.forEach(item => {
|
||||
let variableData = {};
|
||||
variableData.label = item.__config__.label
|
||||
// 表单值为多个选项时
|
||||
if (item.__config__.defaultValue instanceof Array) {
|
||||
const array = [];
|
||||
item.__config__.defaultValue.forEach(val => {
|
||||
array.push(val)
|
||||
})
|
||||
variableData.val = array;
|
||||
} else {
|
||||
variableData.val = item.__config__.defaultValue
|
||||
}
|
||||
variables.push(variableData)
|
||||
})
|
||||
this.variables = variables;
|
||||
}
|
||||
}
|
||||
,
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -163,6 +243,14 @@ export default {
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.form-content {
|
||||
padding-top: 360px;
|
||||
}
|
||||
|
||||
.form-conf {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
margin-top: 40px;
|
||||
display: flex;
|
||||
@@ -175,7 +263,6 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding: 2rem;
|
||||
height: 100vh;
|
||||
}
|
||||
@@ -253,6 +340,7 @@ export default {
|
||||
|
||||
.process-steps {
|
||||
margin: 2rem 0;
|
||||
|
||||
::v-deep .el-step__head {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
@@ -286,7 +374,7 @@ export default {
|
||||
.form-container {
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
padding: 40px;
|
||||
padding: 20px;
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
|
||||
@@ -294,7 +382,8 @@ export default {
|
||||
z-index: 1;
|
||||
|
||||
.form-header {
|
||||
margin-bottom: 2rem;
|
||||
margin-bottom: 5rem;
|
||||
|
||||
h3 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
@@ -327,14 +416,14 @@ export default {
|
||||
top: 10px;
|
||||
width: 95%;
|
||||
padding: 10px;
|
||||
|
||||
|
||||
::v-deep .el-step__title {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.onboarding-container {
|
||||
padding-top: 80px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<span>填写表单</span>
|
||||
</div>
|
||||
<el-col :span="20" :offset="2">
|
||||
<parser :form-conf="taskFormData" ref="taskFormParser"/>
|
||||
<parser :form-conf="taskFormData" ref="taskFormParser" @submit="submit"/>
|
||||
</el-col>
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="hover">
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-form-item label="审批意见" prop="comment">
|
||||
<el-input type="textarea" :rows="5" v-model="taskForm.comment" placeholder="请输入 审批意见"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="抄送人" prop="copyUserIds">
|
||||
<el-form-item label="抄送人" prop="copyUserIds">
|
||||
<el-tag
|
||||
:key="index"
|
||||
v-for="(item, index) in copyUser"
|
||||
@@ -30,7 +30,8 @@
|
||||
@close="handleClose('copy', item)">
|
||||
{{ item.nickName }}
|
||||
</el-tag>
|
||||
<el-button class="button-new-tag" type="primary" icon="el-icon-plus" size="mini" circle @click="onSelectCopyUsers" />
|
||||
<el-button class="button-new-tag" type="primary" icon="el-icon-plus" size="mini" circle
|
||||
@click="onSelectCopyUsers"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="指定审批人" prop="copyUserIds">
|
||||
<el-tag
|
||||
@@ -41,7 +42,8 @@
|
||||
@close="handleClose('next', item)">
|
||||
{{ item.nickName }}
|
||||
</el-tag>
|
||||
<el-button class="button-new-tag" type="primary" icon="el-icon-plus" size="mini" circle @click="onSelectNextUsers" />
|
||||
<el-button class="button-new-tag" type="primary" icon="el-icon-plus" size="mini" circle
|
||||
@click="onSelectNextUsers"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
@@ -72,7 +74,7 @@
|
||||
<!--流程处理表单模块-->
|
||||
<el-col :span="20" :offset="2">
|
||||
<claim-detail :form="form" :detailList="detailList" v-if="formType ==='claim'"></claim-detail>
|
||||
<parser :form-conf="formInfo" v-else/>
|
||||
<parser :form-conf="formInfo" v-else @getData="getData"/>
|
||||
</el-col>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -210,15 +212,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {detailProcess} from '@/api/workflow/process'
|
||||
import {detailProcess, startProcess} from '@/api/workflow/process'
|
||||
import Parser from '@/utils/generator/parser'
|
||||
import {complete, delegate, transfer, rejectTask, returnList, returnTask} from '@/api/workflow/task'
|
||||
import {selectUser, deptTreeSelect} from '@/api/system/user'
|
||||
import {complete, delegate, transfer, rejectTask, returnList, returnTask, getTaskFormDetail} from '@/api/workflow/task'
|
||||
import {selectUser, deptTreeSelect, updateUser} from '@/api/system/user'
|
||||
import ProcessViewer from '@/components/ProcessViewer'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import ClaimDetail from "../../components/ClaimDetail/index.vue";
|
||||
import {getOaClaim, getOaClaimByProcInsId} from "../../../api/oa/claim";
|
||||
import {updateOnboarding} from "@/api/oa/onboarding";
|
||||
|
||||
export default {
|
||||
name: "WorkDetail",
|
||||
@@ -348,10 +351,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.loading = true
|
||||
this.taskForm.procInsId = this.$route.params && this.$route.params.procInsId;
|
||||
this.taskForm.taskId = this.$route.query && this.$route.query.taskId;
|
||||
|
||||
this.formType = this.$route.query.category;
|
||||
|
||||
this.processed = this.$route.query && eval(this.$route.query.processed || false);
|
||||
if (this.$route.query.category === 'claim') {
|
||||
getOaClaimByProcInsId(this.$route.params.procInsId).then(res => {
|
||||
@@ -462,8 +466,8 @@ export default {
|
||||
getProcessDetails(procInsId, taskId) {
|
||||
const params = {procInsId: procInsId, taskId: taskId}
|
||||
detailProcess(params).then(res => {
|
||||
console.log(res.data)
|
||||
const data = res.data;
|
||||
|
||||
this.xmlData = data.bpmnXml;
|
||||
this.processFormList = data.processFormList;
|
||||
this.taskFormOpen = data.existTaskForm;
|
||||
@@ -515,10 +519,32 @@ export default {
|
||||
//执行是否同意的任务
|
||||
complete(this.taskForm).then(response => {
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
if (this.formType==="onboarding"){
|
||||
// 如果为入职流程则
|
||||
this.getOnboardingForm()
|
||||
}
|
||||
this.goBack();
|
||||
});
|
||||
})
|
||||
},
|
||||
getOnboardingForm() {
|
||||
// 如果为入职申请则将其记录到档案中,
|
||||
getTaskFormDetail(this.taskForm.taskId).then(res => {
|
||||
console.log(res.data)
|
||||
let form = res.data;
|
||||
form.idPhoto = res.data.idPhoto[0].fileName
|
||||
form.checkInFile = res.data.checkInFile[0].fileName;
|
||||
form.registerFile = res.data.registerFile[0].fileName;
|
||||
form.trainFile = res.data.trainFile[0].fileName;
|
||||
form.userId = res.data.initiator;
|
||||
form.avatar = form.idPhoto
|
||||
updateUser(form).then(res => {
|
||||
updateOnboarding(form).then(res => {
|
||||
// TODO 调用新增档案将此form存入档案表中,接下来 转正 各种记录 均进行更新档案表操作
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
/** 委派任务 */
|
||||
handleDelegate() {
|
||||
this.$refs["taskForm"].validate(valid => {
|
||||
@@ -541,6 +567,9 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getData(data) {
|
||||
console.log(JSON.stringify(data.valData))
|
||||
},
|
||||
/** 拒绝任务 */
|
||||
handleReject() {
|
||||
this.$refs["taskForm"].validate(valid => {
|
||||
@@ -564,28 +593,7 @@ export default {
|
||||
this.$tab.closePage(this.$route)
|
||||
this.$router.back()
|
||||
},
|
||||
/** 接收子组件传的值 */
|
||||
getData(data) {
|
||||
if (data) {
|
||||
const variables = [];
|
||||
data.fields.forEach(item => {
|
||||
let variableData = {};
|
||||
variableData.label = item.__config__.label
|
||||
// 表单值为多个选项时
|
||||
if (item.__config__.defaultValue instanceof Array) {
|
||||
const array = [];
|
||||
item.__config__.defaultValue.forEach(val => {
|
||||
array.push(val)
|
||||
})
|
||||
variableData.val = array;
|
||||
} else {
|
||||
variableData.val = item.__config__.defaultValue
|
||||
}
|
||||
variables.push(variableData)
|
||||
})
|
||||
this.variables = variables;
|
||||
}
|
||||
},
|
||||
|
||||
submitUserData() {
|
||||
let type = this.userData.type;
|
||||
if (type === 'copy' || type === 'next') {
|
||||
@@ -656,7 +664,8 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -153,7 +153,6 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProcess(this.queryParams).then(response => {
|
||||
console.log(3333,response)
|
||||
this.processList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false
|
||||
|
||||
@@ -49,6 +49,7 @@ export default {
|
||||
this.formOpen = true
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
/** 接收子组件传的值 */
|
||||
getData(data) {
|
||||
|
||||
@@ -144,6 +144,7 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listTodoProcess(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
console.log(response);
|
||||
if(this.queryParams.description != null){
|
||||
this.todoList = this.searchList(response.rows, this.queryParams.description);
|
||||
}else {
|
||||
@@ -170,7 +171,7 @@ export default {
|
||||
query: {
|
||||
taskId: row.taskId,
|
||||
processed: true,
|
||||
category:row.category,
|
||||
category:row.procDefName==="入职流程"?'onboarding':row.category,
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user