浏览代码

Merge remote-tracking branch 'origin/master'

sangwenwei 1 月之前
父节点
当前提交
0f63e11847

+ 23 - 16
src/api/human/depart/HandoverRecoveryService.js

@@ -2,25 +2,32 @@ import request from "@/utils/httpRequest";
 import { REGISTER_PATH as prefix } from "../../AppPath";
 
 export default {
-	save (inputForm) {
+	save(inputForm) {
 		return request({
-			url: prefix +  `/handoverRecovery/save`,
-			method: 'post',
-			data: inputForm
-		})
+			url: prefix + `/handoverRecovery/save`,
+			method: "post",
+			data: inputForm,
+		});
 	},
-	findById (id) {
+	findById(id) {
 		return request({
-			url: prefix + '/handoverRecovery/findById',
-			method: 'get',
-			params: {id: id}
-		})
+			url: prefix + "/handoverRecovery/findById",
+			method: "get",
+			params: { id: id },
+		});
 	},
-	updateStatusById (param) {
+	updateStatusById(param) {
 		return request({
-			url: prefix + '/handoverRecovery/updateStatusById',
-			method: 'post',
-			data: param
-		})
+			url: prefix + "/handoverRecovery/updateStatusById",
+			method: "post",
+			data: param,
+		});
 	},
-}
+	deleteDingTalkByTenantId(param) {
+		return request({
+			url: prefix + "/handoverRecovery/deleteDingTalkByTenantId",
+			method: "post",
+			params: param,
+		});
+	},
+};

+ 30 - 5
src/api/test/dd/dd.js

@@ -2,20 +2,23 @@ import request from "@/utils/httpRequest";
 import { TEST_PATH as prefix } from "../../AppPath";
 
 export default {
-	list(params) {
+	list(data) {
 		return request({
 			url: prefix + "/test/addressBook/list",
-			method: "get",
-			params: params,
+			method: "post",
+			data: data,
 		});
 	},
-	deptList(params) {
+	deptList(id) {
 		return request({
 			url: prefix + "/test/addressBook/deptList",
 			method: "get",
-			params: params,
+			params: {
+				deptId: id,
+			},
 		});
 	},
+
 	getWorkListCord(params) {
 		return request({
 			url: prefix + "/test/attendance/getWorkListCord",
@@ -81,4 +84,26 @@ export default {
 			params: params,
 		});
 	},
+	// 新建用户
+	addUser(data) {
+		return request({
+			url: prefix + "/test/addressBook/addUser",
+			method: "post",
+			data: data,
+		});
+	},
+	selectUserById(params) {
+		return request({
+			url: prefix + "/test/addressBook/selectUserById",
+			method: "get",
+			params: params,
+		});
+	},
+	updateUser(data) {
+		return request({
+			url: prefix + "/test/addressBook/updateUser",
+			method: "post",
+			data: data,
+		});
+	},
 };

+ 294 - 0
src/views/dd/UserAddForm.vue

@@ -0,0 +1,294 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog :title="title" :close-on-click-modal="false" width="60%" @close="close" @keyup.enter.native=""
+			v-model="visible" @open="handleOpen">
+			<el-form :model="inputForm" :rules="rules" ref="inputForm" v-loading="loading"
+				:class="method === 'view' ? 'readonly' : ''"
+				:disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" label-width="150px"
+				@submit.native.prevent>
+				<el-divider content-position="left"><i class="el-icon-user"></i> 基本信息</el-divider>
+				<el-row :gutter="15">
+					<el-col :span="12">
+						<el-form-item label="员工名称" prop="name">
+							<el-tooltip content="请输入员工真实姓名" placement="top">
+								<el-input placeholder="请填写员工名称" v-model="inputForm.name"></el-input>
+							</el-tooltip>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="工号" prop="jobNumber">
+							<el-input placeholder="请填写工号" v-model="inputForm.jobNumber"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="手机号" prop="mobile">
+							<el-input placeholder="请填写手机号" v-model="inputForm.mobile"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="是否隐藏手机号" prop="hideMobile">
+							<el-switch v-model="inputForm.hideMobile" size="large" active-text="是" inactive-text="否" />
+						</el-form-item>
+					</el-col>
+				</el-row>
+				<el-divider content-position="left"><i class="el-icon-office-building"></i> 职位信息</el-divider>
+				<el-row :gutter="15">
+					<el-col :span="12">
+						<el-form-item label="职位" prop="title">
+							<el-input placeholder="请填写职位" v-model="inputForm.title"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="办公地点" prop="workPlace">
+							<el-input placeholder="请填写办公地点" v-model="inputForm.workPlace"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="所属部门" prop="deptIdList">
+							<el-tree-select style="width: 100%;" v-model="inputForm.deptIdList" node-key="deptId"
+								:props="props" check-strictly default-expand-all :data="deptList" show-checkbox
+								check-on-click-node multiple />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="入职时间" prop="hiredDate">
+							<el-date-picker v-model="inputForm.hiredDate" type="date" placeholder="请填写入职日期"
+								format="YYYY/MM/DD" value-format="x" />
+						</el-form-item>
+					</el-col>
+				</el-row>
+				<el-divider content-position="left"><i class="el-icon-message"></i> 联系方式</el-divider>
+				<el-row :gutter="15">
+					<el-col :span="12">
+						<el-form-item label="邮箱" prop="email">
+							<el-input placeholder="请填写邮箱" v-model="inputForm.email"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="企业邮箱" prop="orgEmail">
+							<el-input placeholder="请填写企业邮箱" v-model="inputForm.orgEmail"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="24">
+						<el-form-item label="备注" prop="remark">
+							<el-input type="textarea" :rows="3" placeholder="请填写备注"
+								v-model="inputForm.remark"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+					<el-button type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check"
+						v-noMoreClick>确定</el-button>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+import ddService from "@/api/test/dd/dd.js"
+import { ElDatePicker } from 'element-plus';
+// eslint-disable-next-line no-unused-vars
+import moment from 'moment'
+export default {
+	props: {
+		formReadOnly: {
+			type: Boolean,
+			default: false
+		},
+		status: {
+			type: String,
+			default: ''
+		}
+	},
+	data() {
+		return {
+			props: {
+				label: 'name',
+				children: 'children',
+			},
+			title: '',
+			method: '',
+			loading: false,
+			visible: false,
+			inputForm: {
+				userid: '',
+				name: '',
+				deptIdList: []
+			},
+			deptList: [],
+			rules: {
+				deptIdList: [
+					{ required: true, message: "请选择所属部门", trigger: "change" },
+				],
+				name: [
+					{ required: true, message: "请填写员工名称", trigger: "blur" },
+					{ min: 2, max: 20, message: "长度在 2 到 20 个字符", trigger: "blur" }
+				],
+				mobile: [
+					{ required: true, message: "请填写手机号", trigger: "blur" },
+					{ pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号格式", trigger: "blur" }
+				],
+				email: [
+					{ type: "email", message: "请输入正确的邮箱格式", trigger: "blur" }
+				],
+				orgEmail: [
+					{ type: "email", message: "请输入正确的邮箱格式", trigger: "blur" }
+				],
+				jobNumber: [
+					{ required: true, message: "请填写工号", trigger: "blur" }
+				],
+				title: [
+					{ required: true, message: "请填写职位", trigger: "blur" }
+				],
+				hiredDate: [
+					{ required: true, message: "请选择入职日期", trigger: "change" }
+				]
+			},
+		}
+	},
+	created() {
+	},
+	mounted() {
+	},
+	activated() {
+	},
+	components: {
+		ElDatePicker,
+	},
+	methods: {
+		load(node, resolve) {
+			ddService.deptList({
+				deptId: node.data.deptId
+			}).then(res => {
+				resolve(res.result)
+			})
+
+		},
+		handleGetById() {
+			this.loading = true
+			ddService.selectUserById({
+				id: this.inputForm.userid
+			}).then(res => {
+				console.log(res);
+				this.inputForm = res.result
+				this.loading = false
+			})
+		},
+		init(method, id) {
+			this.method = method
+			this.visible = true
+			if (method === 'add') {
+				this.title = `创建用户`
+			} else if (method === 'edit') {
+				this.inputForm.userid = id
+				this.title = '修改用户'
+			}
+			this.visible = true
+			this.$nextTick(() => {
+				this.loading = true
+				this.$refs.inputForm.resetFields()
+				// ddService.deptList(1).then(res => {
+				// 	res.unshift({
+				// 		deptId: 1,
+				// 		name: '顶级部门节点',
+				// 		parentId: 0
+				// 	})
+				// 	this.deptList = this.buildTree(res)
+				if (this.commonJS.isNotEmpty(this.inputForm.userid)) {
+					this.handleGetById()
+				} else {
+					this.loading = false
+
+				}
+				// })
+
+			})
+		},
+		buildTree(data) {
+			const map = new Map();
+			const tree = [];
+			console.log(data);
+
+			// 先把所有项存到 Map 里,并初始化 children
+			data.forEach(item => {
+				map.set(item.deptId, { ...item, children: [] });
+			});
+			// 组装树结构
+			data.forEach(item => {
+				if (item.parentId) {
+					// 找到父级并添加到 children
+					const parent = map.get(item.parentId);
+					if (parent) {
+						parent.children.push(map.get(item.deptId));
+					}
+				} else {
+					// parentId 为空的就是根节点
+					tree.push(map.get(item.deptId));
+				}
+			});
+
+			return tree;
+		},
+		// 表单提交
+		async doSubmit() {
+			this.loading = true
+			this.$refs['inputForm'].validate(async (valid) => {
+				if (valid) {
+					this.loading = true
+					console.log(this.inputForm);
+
+					if (this.inputForm.userid) {
+						//将数组转成字符串,以逗号分隔
+						this.inputForm.deptIdList = this.inputForm.deptIdList.join(',');
+						const res = await ddService.updateUser(this.inputForm)
+						if (res.errcode == 0) {
+							this.visible = false
+							this.$emit('refreshList')
+							this.$refs.inputForm.resetFields()
+							this.$message.success("修改成功");
+							this.loading = false
+						} else {
+							this.$message.error("添加失败,请重试");
+							this.loading = false
+						}
+					} else {
+						const res = await ddService.addUser(this.inputForm)
+						if (res.errcode == 0) {
+							this.visible = false
+							this.$emit('refreshList')
+							this.$refs.inputForm.resetFields()
+							this.$message.success("添加成功");
+							this.loading = false
+						} else {
+							this.$message.error("添加失败,请重试");
+							this.loading = false
+						}
+					}
+				} else {
+					this.loading = false
+				}
+			})
+		},
+		close() {
+			this.inputForm = {
+				id: '',
+			}
+			this.visible = false
+		},
+	}
+
+}
+</script>
+<style scoped>
+/deep/ .el-input-number .el-input__inner {
+	text-align: left;
+}
+
+/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+	font-weight: 700;
+}
+</style>

+ 88 - 78
src/views/dd/UserList.vue

@@ -4,20 +4,13 @@
             @keyup.enter="refreshList()" @submit.prevent>
             <!-- 搜索框-->
             <el-form-item prop="deptId" label="所属部门:">
-                <el-tree-select @change="handleChange" v-model="searchForm.deptId" lazy :load="load" node-key="deptId"
-                    :props="props" :data="deptList" check-strictly :render-after-expand="false" check-on-click-node
-                    style="width: 240px" />
+                <el-tree-select style="width: 100%;" v-model="searchForm.deptId" node-key="deptId" :props="props"
+                    default-expand-all :data="deptList" check-strictly show-checkbox check-on-click-node />
+            </el-form-item>
+            <el-form-item label="工作时间" prop="workDates">
+                <el-date-picker style="width:50%;" v-model="searchForm.workDates" type="datetimerange"
+                    value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择日期" @change="handleDateChange" />
             </el-form-item>
-			<el-form-item label="工作时间" prop="workDates">
-				<el-date-picker
-					style="width:50%;"
-					v-model="searchForm.workDates"
-					type="datetimerange"
-					value-format="YYYY-MM-DD HH:mm:ss"
-					placeholder="请选择日期"
-					@change="handleDateChange"
-				/>
-			</el-form-item>
             <el-form-item>
                 <el-button type="primary" @click="refreshList()" icon="search">查询</el-button>
                 <el-button type="default" @click="resetSearch()" icon="refresh-right">重置</el-button>
@@ -47,63 +40,67 @@
                     </vxe-column>
                     <vxe-column field="requiredAttDays" title="应出勤天数(天)">
                     </vxe-column>
-					<vxe-column field="attDays" title="出勤天数(天)">
-					</vxe-column>
-					<vxe-column field="restDays" title="休息天数(天)">
-					</vxe-column>
-					<vxe-column field="lateTimes" title="迟到次数(次)">
-					</vxe-column>
+                    <vxe-column field="attDays" title="出勤天数(天)">
+                    </vxe-column>
+                    <vxe-column field="restDays" title="休息天数(天)">
+                    </vxe-column>
+                    <vxe-column field="lateTimes" title="迟到次数(次)">
+                    </vxe-column>
                     <vxe-column fixed="right" align="center" width="320" title="操作">
                         <template #default="scope">
-<!--                            <el-button type="success" text @click="handleAdd(scope.row)">打卡</el-button>-->
+                            <!-- <el-button type="success" text @click="handleAdd(scope.row)">打卡</el-button> -->
+                            <el-button type="success" text @click="edit(scope.row.userid)">修改基本信息</el-button>
                             <el-button type="success" text @click="attendance(scope.row)">考勤统计</el-button>
                         </template>
                     </vxe-column>
                 </vxe-table>
                 <vxe-pager background size="small" :current-page="tablePage.currentPage" :page-size="tablePage.pageSize"
                     :total="tablePage.total" :page-sizes="[
-                        10,
-                        20,
-                        100,
-                        1000,
-                        { label: '全量数据', value: 1000000 },
-                    ]" :layouts="[
-                        'PrevPage',
-                        'JumpNumber',
-                        'NextPage',
-                        'FullJump',
-                        'Sizes',
-                        'Total',
-                    ]" @page-change="currentChangeHandle">
+            10,
+            20,
+            100,
+            1000,
+            { label: '全量数据', value: 1000000 },
+        ]" :layouts="[
+            'PrevPage',
+            'JumpNumber',
+            'NextPage',
+            'FullJump',
+            'Sizes',
+            'Total',
+        ]" @page-change="currentChangeHandle">
                 </vxe-pager>
             </div>
         </div>
         <PunchCardListDia ref="punchCardListDia"></PunchCardListDia>
         <AttendanceListDia ref="attendanceListDia"></AttendanceListDia>
+        <UserAddForm ref="userAddForm"></UserAddForm>
     </div>
 </template>
 
 <script>
 import ddService from "@/api/test/dd/dd.js"
 import PunchCardListDia from "./PunchCardListDia";
+import UserAddForm from "./UserAddForm";
 import AttendanceListDia from "./AttendanceListDia";
 export default {
     components: {
         PunchCardListDia,
-		AttendanceListDia
+        AttendanceListDia,
+        UserAddForm
     },
     data() {
         return {
             props: {
-                isLeaf: 'isLeaf',
                 label: 'name',
+                chindren: 'children'
             },
             url: "",
             showViewer: false,
             searchVisible: true,
             searchForm: {
                 deptId: null,
-				workDates:[]
+                workDates: []
             },
             dataList: [],
             deptList: [],
@@ -133,40 +130,53 @@ export default {
             $table.connect($toolbar);
         });
         this.loading = true
-        ddService.deptList().then(res => {
-            res.result.unshift({
+        ddService.deptList(1).then(res => {
+            res.unshift({
                 deptId: 1,
-                name: "根部门",
-                isLeaf: true
+                name: '顶级部门节点',
+                parentId: 0
             })
-            this.deptList = res.result
-            this.searchForm.deptId = 1
-            this.refreshList();
+            this.deptList = this.buildTree(res)
         })
+        this.searchForm.deptId = 1
+        this.refreshList();
     },
     methods: {
+        buildTree(data) {
+            const map = new Map();
+            const tree = [];
+            // 先把所有项存到 Map 里,并初始化 children
+            data.forEach(item => {
+                map.set(item.deptId, { ...item, children: [] });
+            });
+            // 组装树结构
+            data.forEach(item => {
+                if (item.parentId) {
+                    // 找到父级并添加到 children
+                    const parent = map.get(item.parentId);
+                    if (parent) {
+                        parent.children.push(map.get(item.deptId));
+                    }
+                } else {
+                    // parentId 为空的就是根节点
+                    tree.push(map.get(item.deptId));
+                }
+            });
+
+            return tree;
+        },
         handleChange(value) {
             console.log(value);
             this.searchForm.deptId = value
             this.refreshList()
         },
-        load(node, resolve) {
-            console.log(node);
-            ddService.deptList({
-                deptId: node.data.deptId
-            }).then(res => {
-                resolve(res.result)
-            })
-
-        },
         handleAdd(row) {
-            console.log('row', row)
             this.$refs.punchCardListDia.init(row.userid, row.name, row.title)
         },
-		//考勤统计
-		attendance(row){
-			this.$refs.attendanceListDia.init(row.userid, row.name, row.title);
-		},
+        //考勤统计
+        attendance(row) {
+            this.$refs.attendanceListDia.init(row.userid, row.name, row.title);
+        },
         handleClick(tab, event) {
             console.log(tab.props.name);
             this.getUserList(tab.props.name)
@@ -185,12 +195,11 @@ export default {
             this.loading = true;
             ddService
                 .list({
-                    deptId: this.searchForm.deptId,
-					dateFrom:this.searchForm.workDates[0],
-					dateTo:this.searchForm.workDates[1]
+                    deptId: this.searchForm.deptId ?? 1,
+                    dateFrom: this.searchForm.workDates[0],
+                    dateTo: this.searchForm.workDates[1]
                 })
                 .then((data) => {
-					console.log('data',data)
                     this.userDataList = data;
                     // this.tablePage.total = data.total;
                     this.loading = false;
@@ -216,12 +225,13 @@ export default {
         },
         // 新增
         add() {
-            this.$refs.workCollectAccessoryRef.init("add")
+            this.$refs.userAddForm.deptList = this.deptList
+            this.$refs.userAddForm.init("add")
         },
         // 编辑
         edit(id) {
-            console.log(id);
-            this.$refs.workCollectAccessoryRef.init("edit", id)
+            this.$refs.userAddForm.deptList = this.deptList
+            this.$refs.userAddForm.init("edit", id)
         },
         // 查看
         view(id) {
@@ -262,21 +272,21 @@ export default {
             this.searchForm.workDates = []
             this.refreshList();
         },
-		handleDateChange(val) {
-			if (val && val[0] && val[1]) {
-				const startDate = new Date(val[0]);
-				const endDate = new Date(val[1]);
-				const diffDays = (endDate - startDate) / (1000 * 3600 * 24); // 计算日期差距
+        handleDateChange(val) {
+            if (val && val[0] && val[1]) {
+                const startDate = new Date(val[0]);
+                const endDate = new Date(val[1]);
+                const diffDays = (endDate - startDate) / (1000 * 3600 * 24); // 计算日期差距
 
-				if (diffDays > 31) {
-					this.$message.warning('选择的时间范围不能超过31天');
-					// 限制选中的日期范围为31天内
-					const newEndDate = new Date(startDate);
-					newEndDate.setDate(startDate.getDate() + 31);
-					this.searchForm.workDates = [startDate, newEndDate];
-				}
-			}
-		},
+                if (diffDays > 31) {
+                    this.$message.warning('选择的时间范围不能超过31天');
+                    // 限制选中的日期范围为31天内
+                    const newEndDate = new Date(startDate);
+                    newEndDate.setDate(startDate.getDate() + 31);
+                    this.searchForm.workDates = [startDate, newEndDate];
+                }
+            }
+        },
     },
 };
 </script>

+ 197 - 186
src/views/human/depart/handover/HandoverRecoveryAddForm.vue

@@ -5,225 +5,236 @@
 </template>
 
 <script>
-	import handoverRecoveryService from '@/api/human/depart/HandoverRecoveryService'
-	import CommonApi from '@/api/cw/common/CommonApi'
+import handoverRecoveryService from '@/api/human/depart/HandoverRecoveryService'
+import CommonApi from '@/api/cw/common/CommonApi'
 
-	export default {
-		props: {
-			businessId: {
-				type: String,
-				default: ''
+export default {
+	props: {
+		businessId: {
+			type: String,
+			default: ''
+		},
+		formReadOnly: {
+			type: Boolean,
+			default: false
+		},
+		status: {
+			type: String,
+			default: ''
+		}
+	},
+	data() {
+		return {
+			title: '',
+			method: '',
+			visible: false,
+			loading: false,
+			inputForm: {
+				userId: '',
+				name: '',
+				procInsId: '',
+				handoverId: '',
+				assigneeId: '',
+				draftAdministrator: '',
+				type: '',
 			},
-			formReadOnly: {
-				type: Boolean,
-				default: false
+			keyWatch: '',
+		}
+	},
+	commonApi: null,
+	created() {
+		this.commonApi = new CommonApi()
+	},
+	components: {
+	},
+	computed: {
+		bus: {
+			get() {
+				return this.businessId
 			},
-			status: {
-				type: String,
-				default: ''
+			set(val) {
+				this.businessId = val
 			}
 		},
-		data () {
-			return {
-				title: '',
-				method: '',
-				visible: false,
-				loading: false,
-				inputForm: {
-					userId: '',
-					name: '',
-					procInsId: '',
-					handoverId: '',
-					assigneeId: '',
-					draftAdministrator: '',
-					type: '',
-				},
-				keyWatch: '',
+		name() {
+			return this.$store.state.user.name
+		},
+		userId() {
+			return this.$store.state.user.id
+		}
+	},
+	watch: {
+		'keyWatch': {
+			handler(newVal) {
+				if (this.commonJS.isNotEmpty(this.bus)) {
+					this.init('', this.bus)
+				} else {
+					this.$nextTick(() => {
+						this.$refs.inputForm.resetFields()
+					})
+				}
 			}
 		},
-		commonApi: null,
-		created () {
-			this.commonApi = new CommonApi()
+		'loading': {
+			handler(newVal) {
+				this.$emit('changeLoading', newVal)
+			}
+		}
+	},
+	methods: {
+		getKeyWatch(keyWatch) {
+			this.keyWatch = keyWatch
 		},
-		components: {
+		getUpload() {
 		},
-		computed: {
-			bus: {
-				get () {
-					return this.businessId
-				},
-				set (val) {
-					this.businessId = val
-				}
-			},
-			name () {
-				return this.$store.state.user.name
-			},
-			userId () {
-				return this.$store.state.user.id
+		init(method, id) {
+			this.method = method
+			this.inputForm = {
+				userId: '',
+				name: '',
+				procInsId: '',
+				handoverId: '',
+				assigneeId: '',
+				draftAdministrator: '',
+				type: '',
 			}
-		},
-		watch: {
-			'keyWatch': {
-				handler (newVal) {
-					if (this.commonJS.isNotEmpty(this.bus)) {
-						this.init('', this.bus)
-					} else {
-						this.$nextTick(() => {
-							this.$refs.inputForm.resetFields()
-						})
-					}
-				}
-			},
-			'loading': {
-				handler (newVal) {
-					this.$emit('changeLoading', newVal)
-				}
+			if (method === 'add') {
+				this.title = `新建门卡回收`
+			} else if (method === 'edit') {
+				this.title = '修改门卡回收信息'
 			}
+			this.inputForm.id = id
+			this.visible = true
+			this.loading = false
+			this.$nextTick(() => {
+				this.loading = true
+				handoverRecoveryService.findById(this.inputForm.id).then(async (data) => {
+					if (this.status === 'audit' || this.status === 'taskFormDetail') {
+						method = 'view'
+					}
+					this.inputForm = this.recover(this.inputForm, data)
+					this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+					this.loading = false
+				})
+			})
 		},
-		methods: {
-			getKeyWatch (keyWatch) {
-				this.keyWatch = keyWatch
-			},
-			getUpload () {
-			},
-			init (method, id) {
-				this.method = method
-				this.inputForm = {
-					userId: '',
-					name: '',
-					procInsId: '',
-					handoverId: '',
-					assigneeId: '',
-					draftAdministrator: '',
-					type: '',
-				}
-				if (method === 'add') {
-					this.title = `新建门卡回收`
-				} else if (method === 'edit') {
-					this.title = '修改门卡回收信息'
+		// 表单提交
+		doSubmit() {
+			this.loading = true
+			this.inputForm.id = this.businessId
+			handoverRecoveryService.save(this.inputForm).then((data) => {
+				this.close()
+				this.$message.success(data)
+				this.$emit('refreshDataList')
+				this.loading = false
+			}).catch(() => {
+				this.loading = false
+			})
+		},
+		close() {
+			this.fileList = []
+			this.fileList2 = []
+			this.visible = false
+		},
+		reapplyForm(callback) {
+			this.loading = true
+			handoverRecoveryService.findById(this.inputForm.id).then((data) => {
+				if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+					this.loading = false
+					this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+				} else {
+					this.startForm(callback)
 				}
-				this.inputForm.id = id
-				this.visible = true
+			})
+		},
+		// 送审
+		async startForm(callback) {
+			this.loading = true
+			this.inputForm.type = '2'
+			handoverRecoveryService.save(this.inputForm).then((data) => {
+				this.inputForm.title = `${this.$store.state.user.name} 发起了 [门卡回收]`
+				this.inputForm.id = data.businessId
+				callback(data.businessTable, data.businessId, this.inputForm)
 				this.loading = false
-				this.$nextTick(() => {
+			}).catch(() => {
+				this.loading = false
+			})
+		},
+
+		// 通过
+		async agreeForm(callback) {
+			this.loading = true
+			handoverRecoveryService.findById(this.inputForm.id).then((data) => {
+				if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+					this.loading = false
+					this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+				} else {
 					this.loading = true
-					handoverRecoveryService.findById(this.inputForm.id).then( async (data) => {
-						if (this.status === 'audit' || this.status === 'taskFormDetail') {
-							method = 'view'
-						}
-						this.inputForm = this.recover(this.inputForm, data)
-						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+					this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+						if (this.commonJS.isNotEmpty(data)) {
+							if (data === '门卡注销') {
+								this.inputForm.type = '5'
 
-						this.loading = false
+								if (this.$dictUtils.getDictValue('dd_status', 'dd_status') == 1) {
+									//获取用户数据
+									let userInfo = this.$TOOL.data.get("USER_INFO");
+									if (userInfo.mobile && userInfo.mobile != "") {
+										//调用删除钉钉数据接口
+										handoverRecoveryService.deleteDingTalkByTenantId({
+											mobilePhone: userInfo.mobile
+										})
+									}
+								}
+
+							}
+						}
+						handoverRecoveryService.save(this.inputForm).then((data) => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
 					})
-				})
-			},
-			// 表单提交
-			doSubmit () {
-				this.loading = true
-				this.inputForm.id = this.businessId
-				handoverRecoveryService.save(this.inputForm).then((data) => {
-					this.close()
-					this.$message.success(data)
-					this.$emit('refreshDataList')
-					this.loading = false
-				}).catch(() => {
-					this.loading = false
-				})
-			},
-			close () {
-				this.fileList = []
-				this.fileList2 = []
-				this.visible = false
-			},
-			reapplyForm (callback) {
+				}
+			})
+		},
+		// 修改状态
+		updateStatusById(type, callback) {
+			if (type === 'reject') {
 				this.loading = true
 				handoverRecoveryService.findById(this.inputForm.id).then((data) => {
-					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
 						this.loading = false
 						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 					} else {
-						this.startForm(callback)
+						handoverRecoveryService.updateStatusById(this.inputForm).then(() => {
+							this.loading = false
+							callback()
+						})
+
 					}
 				})
-			},
-			// 送审
-			async startForm (callback) {
-				this.loading = true
-				this.inputForm.type = '2'
-				handoverRecoveryService.save(this.inputForm).then((data) => {
-					this.inputForm.title = `${this.$store.state.user.name} 发起了 [门卡回收]`
-					this.inputForm.id = data.businessId
-					callback(data.businessTable, data.businessId, this.inputForm)
-					this.loading = false
-				}).catch(() => {
-					this.loading = false
-				})
-			},
-
-			// 通过
-			async agreeForm (callback) {
+			} else if (type === 'hold') {
 				this.loading = true
 				handoverRecoveryService.findById(this.inputForm.id).then((data) => {
-					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
 						this.loading = false
 						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 					} else {
-						this.loading = true
-						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
-							if (this.commonJS.isNotEmpty(data)) {
-								if (data === '门卡注销') {
-									this.inputForm.type = '5'
-								}
-							}
-							handoverRecoveryService.save(this.inputForm).then((data) => {
-								callback(data.businessTable, data.businessId, this.inputForm)
-								this.loading = false
-							}).catch(() => {
-								this.loading = false
-							})
+						this.inputForm.type = '1'
+						handoverRecoveryService.updateStatusById(this.inputForm).then(() => {
+							this.loading = false
+							callback()
 						})
-
 					}
 				})
-			},
-			// 修改状态
-			updateStatusById (type, callback) {
-				if (type === 'reject') {
-					this.loading = true
-					handoverRecoveryService.findById(this.inputForm.id).then((data) => {
-						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						} else {
-							handoverRecoveryService.updateStatusById(this.inputForm).then(() => {
-								this.loading = false
-								callback()
-							})
-
-						}
-					})
-				} else if (type === 'hold') {
-					this.loading = true
-					handoverRecoveryService.findById(this.inputForm.id).then((data) => {
-						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						} else {
-							this.inputForm.type = '1'
-							handoverRecoveryService.updateStatusById(this.inputForm).then(() => {
-								this.loading = false
-								callback()
-							})
-						}
-					})
-				}
-			},
-		}
+			}
+		},
 	}
+}
 </script>

+ 1 - 0
src/views/human/depart/registration/DepartRegistrationList.vue

@@ -237,6 +237,7 @@ export default {
 			$table.connect($toolbar);
 		})
 		this.refreshList()
+
 	},
 	activated() {
 		this.refreshList()

文件差异内容过多而无法显示
+ 1085 - 1201
src/views/human/enrollment/registration/EnrollmentRegistrationEditForm.vue


+ 291 - 311
src/views/human/enrollment/registration/EnrollmentRegistrationList.vue

@@ -3,60 +3,40 @@
 		<pane size="20">
 			<el-container class="jp-container">
 				<el-header class="m-p-13-15">
-					<el-input
-						placeholder="请输入关键字过滤"
-						clearable
-						v-model="filterText"
-					>
+					<el-input placeholder="请输入关键字过滤" clearable v-model="filterText">
 					</el-input>
 				</el-header>
 				<el-main class="nopadding">
-					<el-tree
-						class="filter-tree"
-						:data="officeTreeData"
-						:props="{
-							value: 'id', // ID字段名
-							label: 'name', // 显示名称
-							children: 'children', // 子级字段名
-						}"
-						node-key="id"
-						default-expand-all
-						:filter-node-method="filterNode"
-						:expand-on-click-node="false"
-						highlight-current
-						@node-click="handleNodeClick"
-						ref="officeTree"
-					>
+					<el-tree class="filter-tree" :data="officeTreeData" :props="{
+						value: 'id', // ID字段名
+						label: 'name', // 显示名称
+						children: 'children', // 子级字段名
+					}" node-key="id" default-expand-all :filter-node-method="filterNode" :expand-on-click-node="false"
+						highlight-current @node-click="handleNodeClick" ref="officeTree">
 						<template #default="{ node, data }">
 							<span class="custom-tree-node el-tree-node__label">
 								<span class="label">
 									<el-icon class="m-r-5">
-										<qiye
-											v-if="data.type === '1'"
-											:style="{
-												color:
-													$TOOL.data.get(
-														'IS_PRIMARY_TENANT'
-													) &&
-													data.tenantDTO &&
-													$utils.getTenantColorById(
-														data.tenantDTO.id
-													),
-											}"
-										></qiye>
-										<bumen
-											v-else
-											:style="{
-												color:
-													$TOOL.data.get(
-														'IS_PRIMARY_TENANT'
-													) &&
-													data.tenantDTO &&
-													$utils.getTenantColorById(
-														data.tenantDTO.id
-													),
-											}"
-										></bumen>
+										<qiye v-if="data.type === '1'" :style="{
+											color:
+												$TOOL.data.get(
+													'IS_PRIMARY_TENANT'
+												) &&
+												data.tenantDTO &&
+												$utils.getTenantColorById(
+													data.tenantDTO.id
+												),
+										}"></qiye>
+										<bumen v-else :style="{
+											color:
+												$TOOL.data.get(
+													'IS_PRIMARY_TENANT'
+												) &&
+												data.tenantDTO &&
+												$utils.getTenantColorById(
+													data.tenantDTO.id
+												),
+										}"></bumen>
 									</el-icon>
 									{{ node.label }}
 								</span>
@@ -70,26 +50,27 @@
 			<el-container class="jp-container">
 				<el-header v-if="searchVisible">
 					<div class="left-panel">
-						<el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+						<el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm"
+							@keyup.enter.native="refreshList()" @submit.native.prevent>
 							<!-- 搜索框-->
 							<el-form-item label="姓名" prop="name">
 								<el-input v-model="searchForm.name" placeholder="请输入姓名" clearable></el-input>
 							</el-form-item>
-<!--							<el-form-item label="所属部门" prop="department">-->
-<!--								<SelectTree-->
-<!--									ref="officeTree"-->
-<!--									:props="{-->
-<!--										value: 'id',             // ID字段名-->
-<!--										label: 'name',         // 显示名称-->
-<!--										children: 'children'    // 子级字段名-->
-<!--									  }"-->
-<!--									:url="`/system-server/sys/office/treeData?type=2`"-->
-<!--									:value="searchForm.department"-->
-<!--									:clearable="true"-->
-<!--									:accordion="true"-->
-<!--									size="default"-->
-<!--									@getValue="(value,label) => {searchForm.department=value}"/>-->
-<!--							</el-form-item>-->
+							<!--							<el-form-item label="所属部门" prop="department">-->
+							<!--								<SelectTree-->
+							<!--									ref="officeTree"-->
+							<!--									:props="{-->
+							<!--										value: 'id',             // ID字段名-->
+							<!--										label: 'name',         // 显示名称-->
+							<!--										children: 'children'    // 子级字段名-->
+							<!--									  }"-->
+							<!--									:url="`/system-server/sys/office/treeData?type=2`"-->
+							<!--									:value="searchForm.department"-->
+							<!--									:clearable="true"-->
+							<!--									:accordion="true"-->
+							<!--									size="default"-->
+							<!--									@getValue="(value,label) => {searchForm.department=value}"/>-->
+							<!--							</el-form-item>-->
 							<el-form-item label="联系电话" prop="mobilePhone">
 								<el-input v-model="searchForm.mobilePhone" placeholder="请输入联系电话" clearable></el-input>
 							</el-form-item>
@@ -103,99 +84,95 @@
 				</el-header>
 				<el-main class="nopadding page2">
 					<div class="jp-table top" style="">
-						<vxe-toolbar :refresh="{query: resetSearch}" ref="toolbarRef" import export custom>
+						<vxe-toolbar :refresh="{ query: resetSearch }" ref="toolbarRef" import export custom>
 							<template #buttons>
 								<el-button type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
 							</template>
 							<template #tools>
-								<vxe-button
-									type="text"
-									:title="
-										searchVisible ? '收起检索' : '展开检索'
-									"
-									icon="vxe-icon-search"
-									class="tool-btn"
-									@click="searchVisible = !searchVisible"
-								></vxe-button>
-								<vxe-button
-									type="text"
-									title="下载导入模板"
-									icon="vxe-icon-copy"
-									class="tool-btn m-l-0"
-									@click="downloadTpl()"
-								>
+								<vxe-button type="text" :title="searchVisible ? '收起检索' : '展开检索'
+									" icon="vxe-icon-search" class="tool-btn" @click="searchVisible = !searchVisible"></vxe-button>
+								<vxe-button type="text" title="下载导入模板" icon="vxe-icon-copy" class="tool-btn m-l-0"
+									@click="downloadTpl()">
 								</vxe-button>
 							</template>
 						</vxe-toolbar>
 						<div style="height: calc(100% - 90px)">
-							<vxe-table
-								border="inner"
-								auto-resize
-								resizable
-								height="auto"
-								:loading="loading"
-								ref="clientTable"
-								show-header-overflow
-								show-overflow
-								highlight-hover-row
-								:print-config="{}"
-								:import-config="{
+							<vxe-table border="inner" auto-resize resizable height="auto" :loading="loading"
+								ref="clientTable" show-header-overflow show-overflow highlight-hover-row
+								:print-config="{}" :import-config="{
 									importMethod: importMethod,
 									types: ['csv', 'xls', 'xlsx'],
 									remote: true,
-								}"
-								:export-config="{
-                    remote: true,
-                    filename: `入职登记信息${moment(new Date()).format('YYYY-MM-DD')}`,
-                    sheetName: '入职登记信息',
-                    exportMethod: exportMethod,
-                    types: ['xlsx'],
-                    modes: ['current', 'selected', 'all']
-                  }"
-								:menu-config="{}"
-								@sort-change="sortChangeHandle"
-								:sort-config="{remote:true}"
-								:data="dataList"
+								}" :export-config="{
+									remote: true,
+									filename: `入职登记信息${moment(new Date()).format('YYYY-MM-DD')}`,
+									sheetName: '入职登记信息',
+									exportMethod: exportMethod,
+									types: ['xlsx'],
+									modes: ['current', 'selected', 'all']
+								}" :menu-config="{}" @sort-change="sortChangeHandle" :sort-config="{ remote: true }" :data="dataList"
 								:checkbox-config="{}">
 								<vxe-column type="seq" width="60" title="序号"></vxe-column>
 								<vxe-column min-width="160" align="center" title="姓名" field="name">
 									<template #default="scope">
-										<el-link  type="primary" :underline="false" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
+										<el-link type="primary" :underline="false" @click="view(scope.row.id)">{{
+											scope.row.name }}</el-link>
 									</template>
 								</vxe-column>
 								<vxe-column min-width="160" align="center" title="政治面貌" field="politicalOutlook">
 									<template #default="scope">
-										{{$dictUtils.getDictLabel('political_outlook', scope.row.politicalOutlook, '')}}
+										{{ $dictUtils.getDictLabel('political_outlook', scope.row.politicalOutlook, '')
+										}}
 									</template>
 								</vxe-column>
 								<vxe-column min-width="160" align="center" title="民族" field="nation"></vxe-column>
-								<vxe-column min-width="160" align="center" title="所属部门" field="departmentName"></vxe-column>
-								<vxe-column min-width="160" align="center" title="联系电话" field="mobilePhone"></vxe-column>
-								<vxe-column min-width="160" align="center" title="毕业院校" field="graduatedFrom"></vxe-column>
+								<vxe-column min-width="160" align="center" title="所属部门"
+									field="departmentName"></vxe-column>
+								<vxe-column min-width="160" align="center" title="联系电话"
+									field="mobilePhone"></vxe-column>
+								<vxe-column min-width="160" align="center" title="毕业院校"
+									field="graduatedFrom"></vxe-column>
+								<vxe-column min-width="160" fixed="right" align="center" title="是否已加入钉钉" field="ddType">
+									<template #default="scope">
+										<el-button v-if="scope.row.ddType === '1'" @click="detail(scope.row)"
+											type="success" effect="dark">{{ $dictUtils.getDictLabel("dd_type",
+												scope.row.ddType, '已加入')
+											}}
+										</el-button>
+										<el-button v-else @click="detail(scope.row)" type="warning" effect="dark">{{
+											$dictUtils.getDictLabel("dd_type", scope.row.ddType,
+												'未加入') }} </el-button>
+									</template>
+								</vxe-column>
 								<vxe-column min-width="100" title="状态" fixed="right" align="center" field="type">
 									<template #default="scope">
-										<el-button v-if="scope.row.processType === '1'" @click="detail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.type, '未开始')}} </el-button>
-										<el-button v-else @click="detail(scope.row)" :type="$dictUtils.getDictLabel('human_status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("human_status", scope.row.type, '未开始')}} </el-button>
+										<el-button v-if="scope.row.processType === '1'" @click="detail(scope.row)"
+											:type="$dictUtils.getDictLabel('status_info', scope.row.type, '')"
+											effect="dark">{{ $dictUtils.getDictLabel("status", scope.row.type, '未开始') }}
+										</el-button>
+										<el-button v-else @click="detail(scope.row)"
+											:type="$dictUtils.getDictLabel('human_status_info', scope.row.type, '')"
+											effect="dark">{{ $dictUtils.getDictLabel("human_status", scope.row.type,
+												'未开始') }} </el-button>
 									</template>
 								</vxe-column>
 
 								<vxe-column title="操作" width="200px" fixed="right" align="center">
-									<template  #default="scope">
+									<template #default="scope">
 										<div v-if="hasPermission('enrollmentRegistration:edit')">
 											<el-button v-if="
-                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="edit(scope.row.id)">修改</el-button>
+												scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary"
+												@click="edit(scope.row.id)">修改</el-button>
 											<el-button v-if="
-                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="del(scope.row.id)">删除</el-button>
+												scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary"
+												@click="del(scope.row.id)">删除</el-button>
 										</div>
 									</template>
 								</vxe-column>
 							</vxe-table>
-							<vxe-pager
-								background
-								:current-page="tablePage.currentPage"
-								:page-size="tablePage.pageSize"
+							<vxe-pager background :current-page="tablePage.currentPage" :page-size="tablePage.pageSize"
 								:total="tablePage.total"
-								:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+								:page-sizes="[10, 20, 100, 1000, { label: '全量数据', value: 1000000 }]"
 								:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
 								@page-change="currentChangeHandle">
 							</vxe-pager>
@@ -205,90 +182,91 @@
 			</el-container>
 		</pane>
 	</splitpanes>
-<!--  <div class="page">-->
+	<!--  <div class="page">-->
 
-	  <EnrollmentRegistrationEditForm ref="enrollmentRegistrationEditForm" @refreshDataList="refreshList"></EnrollmentRegistrationEditForm>
-<!--  </div>-->
+	<EnrollmentRegistrationEditForm ref="enrollmentRegistrationEditForm" @refreshDataList="refreshList">
+	</EnrollmentRegistrationEditForm>
+	<!--  </div>-->
 </template>
 
 <script>
-  import { Splitpanes, Pane } from "splitpanes";
-  import "splitpanes/dist/splitpanes.css";
-  import SelectTree from '@/components/treeSelect/treeSelect.vue'
-  import EnrollmentRegistrationEditForm from './EnrollmentRegistrationEditForm'
-  import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
-  import processService from '@/api/flowable/ProcessService'
-  import userService from '@/api/sys/UserService'
-  import taskService from '@/api/flowable/TaskService'
-  import pick from "lodash.pick";
-  import officeService from "@/api/sys/officeService";
-  export default {
-    data () {
-      return {
-        num: 0,
-        searchForm: {
-          name: '',
-			mobilePhone: '',
-			department: '',
-			companyId:'',
-        },
-        dataList: [],
-        tablePage: {
-          total: 0,
-          currentPage: 1,
-          pageSize: 10,
-          orders: []
-        },
-        tableKey: '',
-        loading: false,
-        processDefinitionAuditId: '',
-        procDefAuditKey: '',
-		processDefinitionAuditId2: '',
-        procDefAuditKey2: '',
-        isAdmin: false,
-        create: '',
-        haveProjectIds: '',
-		searchVisible: true,
-		  officeTreeData: [],
-		  filterText: "",
-      }
-    },
-    created () {
-    },
-    components: {
+import { Splitpanes, Pane } from "splitpanes";
+import "splitpanes/dist/splitpanes.css";
+import SelectTree from '@/components/treeSelect/treeSelect.vue'
+import EnrollmentRegistrationEditForm from './EnrollmentRegistrationEditForm'
+import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+import processService from '@/api/flowable/ProcessService'
+import userService from '@/api/sys/UserService'
+import taskService from '@/api/flowable/TaskService'
+import pick from "lodash.pick";
+import officeService from "@/api/sys/officeService";
+export default {
+	data() {
+		return {
+			num: 0,
+			searchForm: {
+				name: '',
+				mobilePhone: '',
+				department: '',
+				companyId: '',
+			},
+			dataList: [],
+			tablePage: {
+				total: 0,
+				currentPage: 1,
+				pageSize: 10,
+				orders: []
+			},
+			tableKey: '',
+			loading: false,
+			processDefinitionAuditId: '',
+			procDefAuditKey: '',
+			processDefinitionAuditId2: '',
+			procDefAuditKey2: '',
+			isAdmin: false,
+			create: '',
+			haveProjectIds: '',
+			searchVisible: true,
+			officeTreeData: [],
+			filterText: "",
+		}
+	},
+	created() {
+	},
+	components: {
 		SelectTree,
 		EnrollmentRegistrationEditForm,
 		Splitpanes,
 		Pane,
-    },
-	  watch: {
-		  filterText(val) {
-			  this.$refs.officeTree.filter(val);
-		  },
-	  },
-    computed: {
-      userName () {
-        return this.$store.state.user.name
-      },
-      user () {
-        this.createName = this.$store.state.user.name
-        return this.$store.state.user
-      }
-    },
-    mounted () {
+	},
+	watch: {
+		filterText(val) {
+			this.$refs.officeTree.filter(val);
+		},
+	},
+	computed: {
+		userName() {
+			return this.$store.state.user.name
+		},
+		user() {
+			this.createName = this.$store.state.user.name
+			return this.$store.state.user
+		}
+	},
+	mounted() {
 		this.$nextTick(() => {
 			//将表格和工具栏进行关联
 			const $table = this.$refs.clientTable;
 			const $toolbar = this.$refs.toolbarRef;
 			$table.connect($toolbar);
 		})
-      this.refreshList()
-	  this.refreshTree();
-    },
-    activated () {
-      this.refreshList()
-    },
-    methods: {
+		this.refreshList()
+		this.refreshTree();
+	},
+	activated() {
+		this.refreshList()
+	},
+	methods: {
 		filterNode(value, data) {
 			if (!value) return true;
 			return data.name.indexOf(value) !== -1;
@@ -303,107 +281,109 @@
 			}
 			this.refreshList();
 		},
-      // 新增
-      add () {
-      },
+		// 新增
+		add() {
+		},
 		// 查看
-		view (id) {
+		view(id) {
 			this.$refs.enrollmentRegistrationEditForm.init('view', id)
 		},
-      // 修改
-      edit (id) {
-        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
-          return item.id
-        })[0]
-		  this.$refs.enrollmentRegistrationEditForm.init('edit', id)
-      },
-      // 查询当前用户是否是管理员用户
-      checkIsAdmin () {
-        userService.is().then((data) => {
-          this.isAdmin = data
-        })
-      },
-      // 获取数据列表
-      refreshList () {
-        this.loading = true
-		  enrollmentRegistrationService.list({
-          'current': this.tablePage.currentPage,
-          'size': this.tablePage.pageSize,
-          'orders': this.tablePage.orders,
-          ...this.searchForm
-        }).then((data) => {
-          this.dataList = data.records
-          this.tablePage.total = data.total
-          this.tableKey = Math.random()
-          this.loading = false
-        })
-        this.checkIsAdmin()
-        processService.getByName('员工入职').then((data) => {
-          if (!this.commonJS.isEmpty(data.id)) {
-            this.processDefinitionAuditId = data.id
-            this.procDefAuditKey = data.key
-          }
-        })
-		  processService.getByName('完善个人信息').then((data) => {
-			  if (!this.commonJS.isEmpty(data.id)) {
-				  this.processDefinitionAuditId2 = data.id
-				  this.procDefAuditKey2 = data.key
-			  }
-		  })
-      },
+		// 修改
+		edit(id) {
+			id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+				return item.id
+			})[0]
+			this.$refs.enrollmentRegistrationEditForm.init('edit', id)
+		},
+		// 查询当前用户是否是管理员用户
+		checkIsAdmin() {
+			userService.is().then((data) => {
+				this.isAdmin = data
+			})
+		},
+		// 获取数据列表
+		refreshList() {
+			this.loading = true
+			enrollmentRegistrationService.list({
+				'current': this.tablePage.currentPage,
+				'size': this.tablePage.pageSize,
+				'orders': this.tablePage.orders,
+				...this.searchForm
+			}).then((data) => {
+				this.dataList = data.records
+				this.tablePage.total = data.total
+				this.tableKey = Math.random()
+				this.loading = false
+			})
+			this.checkIsAdmin()
+			processService.getByName('员工入职').then((data) => {
+				if (!this.commonJS.isEmpty(data.id)) {
+					this.processDefinitionAuditId = data.id
+					this.procDefAuditKey = data.key
+				}
+			})
+			processService.getByName('完善个人信息').then((data) => {
+				if (!this.commonJS.isEmpty(data.id)) {
+					this.processDefinitionAuditId2 = data.id
+					this.procDefAuditKey2 = data.key
+				}
+			})
+		},
 		refreshTree() {
 			officeService.treeData().then((data) => {
 				this.officeTreeData = data;
 			});
 		},
-      // 当前页
-      currentChangeHandle ({ currentPage, pageSize }) {
-        this.tablePage.currentPage = currentPage
-        this.tablePage.pageSize = pageSize
-        this.refreshList()
-      },
-      // 排序
-      sortChangeHandle (column) {
-        this.tablePage.orders = []
-        if (column.order != null) {
-          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
-        }
-        this.refreshList()
-      },
-      resetSearch () {
-	    this.searchForm.department = "";
-	    this.searchForm.companyId = "";
-	    this.filterText = "";
-	    this.$refs.officeTree.setCurrentKey(null);
-        this.$refs.searchForm.resetFields()
-        this.refreshList()
-      },
-      start () {
-		  // 读取流程表单
-		  let tabTitle = `发起流程【员工入职】`
-		  let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [员工入职]`
-		  taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
-			  status: 'startAndHold'}).then((data) => {
-			  this.$router.push({
-				  path: '/flowable/task/TaskForm',
-				  query: {
-					  ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-					  procDefId: this.processDefinitionAuditId,
-					  procDefKey: this.procDefKey,
-					  status: 'startAndHold',
-					  title: tabTitle,
-					  formType: data.formType,
-					  formUrl: data.formUrl,
-					  formTitle: processTitle,
-					  businessId: 'false',
-					  isShow: false,
-					  routePath: '/human/enrollment/registration/EnrollmentRegistrationList'
-				  }
-			  })
-		  })
-      },
+		// 当前页
+		currentChangeHandle({ currentPage, pageSize }) {
+			this.tablePage.currentPage = currentPage
+			this.tablePage.pageSize = pageSize
+			this.refreshList()
+		},
+		// 排序
+		sortChangeHandle(column) {
+			this.tablePage.orders = []
+			if (column.order != null) {
+				this.tablePage.orders.push({ column: this.$utils.toLine(column.property), asc: column.order === 'asc' })
+			}
+			this.refreshList()
+		},
+		resetSearch() {
+			this.searchForm.department = "";
+			this.searchForm.companyId = "";
+			this.filterText = "";
+			this.$refs.officeTree.setCurrentKey(null);
+			this.$refs.searchForm.resetFields()
+			this.refreshList()
+		},
+		start() {
+			// 读取流程表单
+			let tabTitle = `发起流程【员工入职】`
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [员工入职]`
+			taskService.getTaskDef({
+				procDefId: this.processDefinitionAuditId,
+				status: 'startAndHold'
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.processDefinitionAuditId,
+						procDefKey: this.procDefKey,
+						status: 'startAndHold',
+						title: tabTitle,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessId: 'false',
+						isShow: false,
+						routePath: '/human/enrollment/registration/EnrollmentRegistrationList'
+					}
+				})
+			})
+		},
 		// 查看员工入职流程结果
-		detail (row) {
+		detail(row) {
 			if (row.reviewStatus !== '0' && row.reviewStatus !== '1') {
 
 				if (this.commonJS.isNotEmpty(row.processType) && row.processType == '1') {
@@ -479,33 +459,33 @@
 		},
 
 
-      // 自定义服务端导出
-      exportMethod ({ options }) {
-        // 传给服务端的参数
-        const params = {
-          'current': this.tablePage.currentPage,
-          'size': this.tablePage.pageSize,
-          'orders': this.tablePage.orders,
-          ...this.searchForm,
-          filename: options.filename,
-          sheetName: options.sheetName,
-          isHeader: options.isHeader,
-          original: options.original,
-          mode: options.mode,
-          selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
-          exportFields: options.columns.map(column => column.property)
-        }
-        return enrollmentRegistrationService.exportExcel(params).then((res) => {
-          // 将二进制流文件写入excel表,以下为重要步骤
-          this.$utils.downloadExcel(res, options.filename)
-        }).catch(function (err) {
-          if (err.response) {
-            // console.log(err.response)
-          }
-        })
-      },
+		// 自定义服务端导出
+		exportMethod({ options }) {
+			// 传给服务端的参数
+			const params = {
+				'current': this.tablePage.currentPage,
+				'size': this.tablePage.pageSize,
+				'orders': this.tablePage.orders,
+				...this.searchForm,
+				filename: options.filename,
+				sheetName: options.sheetName,
+				isHeader: options.isHeader,
+				original: options.original,
+				mode: options.mode,
+				selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
+				exportFields: options.columns.map(column => column.property)
+			}
+			return enrollmentRegistrationService.exportExcel(params).then((res) => {
+				// 将二进制流文件写入excel表,以下为重要步骤
+				this.$utils.downloadExcel(res, options.filename)
+			}).catch(function (err) {
+				if (err.response) {
+					// console.log(err.response)
+				}
+			})
+		},
 		// 删除
-		del (id) {
+		del(id) {
 			let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
 				return item.id
 			}).join(',')
@@ -522,7 +502,7 @@
 				})
 			})
 		},
-		removeRedis(userId){
+		removeRedis(userId) {
 			this.$confirm(`确定清除所选项登录缓存吗?`, '提示', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
@@ -536,6 +516,6 @@
 				})
 			})
 		}
-    }
-  }
+	}
+}
 </script>