Browse Source

实习登记调整

sangwenwei 6 months ago
parent
commit
d9b9bdd43e

+ 7 - 0
src/api/sys/officeService.js

@@ -48,6 +48,13 @@ export default {
 			params: params,
 		});
 	},
+	treeDataPgAndKjAndXm: function (params) {
+		return request({
+			url: prefix + "/sys/office/treeDataPgAndKjAndXm",
+			method: "get",
+			params: params,
+		});
+	},
 	allTreeData: function (params) {
 		return request({
 			url: prefix + "/sys/office/allTreeData",

+ 478 - 0
src/components/userSelectKjXmPg/UserSelectDialog.vue

@@ -0,0 +1,478 @@
+<template>
+	<el-dialog
+		v-model="dialogVisible"
+		title="人员选择"
+		:width="type == 1 ? 680 : 460"
+		destroy-on-close
+		append-to-body
+		@closed="$emit('closed')"
+		draggable
+	>
+		<template v-if="type == 1">
+			<div class="user-select">
+				<div class="user-select__left">
+					<div class="user-select__search">
+						<el-input
+							v-model="searchForm.name"
+							prefix-icon="search"
+							placeholder="搜索成员"
+							clearable
+						>
+							<template #append>
+								<el-button
+									icon="search"
+									@click="search"
+								></el-button>
+							</template>
+						</el-input>
+					</div>
+					<div class="user-select__select">
+						<div
+							class="user-select__tree"
+							v-loading="showGrouploading"
+						>
+							<el-scrollbar>
+								<el-tree
+									class="menu"
+									ref="groupTree"
+									:data="group"
+									node-key="id"
+									:props="{
+										label: 'name',
+										children: 'children',
+									}"
+									highlight-current
+									:expand-on-click-node="false"
+									:current-node-key="groupId"
+									@node-click="groupClick"
+								>
+									<template #default="{ node, data }">
+										<span
+											class="custom-tree-node el-tree-node__label"
+										>
+											<span class="label">
+												<el-icon
+													:size="16"
+													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>
+												</el-icon>
+												{{ node.label }}
+											</span>
+										</span>
+									</template>
+								</el-tree>
+							</el-scrollbar>
+						</div>
+						<div
+							class="user-select__user"
+							v-loading="showUserloading"
+						>
+							<div class="user-select__user__list">
+								<el-scrollbar ref="userScrollbar">
+									<el-tree
+										class="menu"
+										ref="userTree"
+										:data="user"
+										node-key="id"
+										highlight-current
+										:props="{
+											key: 'id',
+											label: 'name',
+											children: 'children',
+										}"
+										:default-checked-keys="selectedIds"
+										:show-checkbox="limit > 1"
+										check-on-click-node
+										@check-change="userClick"
+									></el-tree>
+								</el-scrollbar>
+							</div>
+							<footer>
+								<el-pagination
+									background
+									layout="prev,next"
+									small
+									:total="total"
+									:page-size="pageSize"
+									v-model:currentPage="currentPage"
+									@current-change="paginationChange"
+								></el-pagination>
+							</footer>
+						</div>
+					</div>
+				</div>
+				<div class="user-select__toicon">
+					<el-icon><arrow-right /></el-icon>
+				</div>
+				<div class="user-select__selected">
+					<header>已选 ({{ selected.length }})</header>
+					<ul>
+						<el-scrollbar>
+							<li
+								v-for="(item, index) in selected"
+								:key="item.id"
+							>
+								<span class="name">
+									<el-avatar
+										v-if="
+											$TOOL.data.get('IS_PRIMARY_TENANT')
+										"
+										:size="30"
+										:style="{
+											background:
+												$utils.getTenantColorById(
+													item.tenantId
+												) + '!important',
+										}"
+										>{{
+											item.name.substring(0, 1)
+										}}</el-avatar
+									>
+									<el-avatar v-else>{{
+										item.name.substring(0, 1)
+									}}</el-avatar>
+									<label>{{ item.name }}</label>
+								</span>
+								<span class="delete">
+									<el-button
+										text
+										type="primary"
+										icon="del-filled"
+										circle
+										size="small"
+										@click="deleteSelected(index)"
+									></el-button>
+								</span>
+							</li>
+						</el-scrollbar>
+					</ul>
+				</div>
+			</div>
+		</template>
+
+		<template #footer>
+			<el-button @click="resetSearch()" style="background-color: #F2F6FC" icon="el-icon-refresh-right">重置</el-button>
+			<el-button @click="dialogVisible = false">取 消</el-button>
+			<el-button type="primary" @click="save">确 认</el-button>
+		</template>
+	</el-dialog>
+</template>
+
+<script>
+import userService from "@/api/sys/userService";
+import officeService from "@/api/sys/officeService";
+export default {
+	props: {
+		tenantId: { type: String, default: null },
+		limit: {
+			type: Number,
+			default: 999999,
+		},
+		clearable: {
+			type: Boolean,
+			default: false
+		},
+	},
+	data() {
+		return {
+			searchForm: {
+				loginName: "",
+				companyDTO: {
+					id: "",
+				},
+				officeDTO: {
+					id: "",
+				},
+				name: "",
+			},
+			dialogVisible: false,
+			showGrouploading: false,
+			showUserloading: false,
+			groupId: "",
+			pageSize: 10,
+			total: 0,
+			currentPage: 1,
+			group: [],
+			user: [],
+			role: [],
+			type: 1,
+			selected: [],
+			value: [],
+		};
+	},
+	computed: {
+		selectedIds() {
+			return this.selected.map((t) => t.id);
+		},
+	},
+	methods: {
+		//打开赋值
+		async open(data) {
+			console.log("进入open方法")
+			console.log('data',data)
+			this.value = data || [];
+			this.selected = JSON.parse(JSON.stringify(data || []));
+			this.dialogVisible = true;
+			await this.getGroup();
+			this.getUser();
+		},
+		//获取组织
+		async getGroup() {
+			console.log("进入getGroup方法")
+			this.showGrouploading = true;
+			// officeService.treeData().then((data) => {
+			// 	this.officeTreeData = data
+			// 	this.showGrouploading = false;
+			// })
+			var res = await officeService.treeDataPgAndKjAndXm();
+			this.showGrouploading = false;
+			// var allNode = { id: "", type: "1", name: "所有" };
+			// res.unshift(allNode);
+			this.group = res;
+			this.searchForm.companyDTO.id = this.group[0].id;
+		},
+		//获取用户
+		async getUser() {
+			this.showUserloading = true;
+			userService
+				.list({
+					current: this.currentPage,
+					size: this.pageSize,
+					...this.searchForm,
+					"tenantDTO.id": this.tenantId,
+				})
+				.then((data) => {
+					this.user = data.records;
+					this.total = data.total;
+					// this.pageNo = data.current
+					this.showUserloading = false;
+					this.$refs.userScrollbar.setScrollTop(0);
+				});
+		},
+		//组织点击
+		groupClick(data) {
+			if (data.type === "1") {
+				this.searchForm.companyDTO.id = data.id;
+				this.searchForm.officeDTO.id = "";
+			} else {
+				this.searchForm.companyDTO.id = "";
+				this.searchForm.officeDTO.id = data.id;
+			}
+			this.currentPage = 1;
+			this.groupId = data.id;
+			this.getUser();
+		},
+		//用户点击
+		userClick(data, checked) {
+			if (checked) {
+				if (this.limit === 1) {
+					this.selected = [
+						{
+							id: data.id,
+							name: data.name,
+							tenantId: data.tenantDTO?.id,
+						},
+					];
+				} else {
+					this.selected.push({
+						id: data.id,
+						name: data.name,
+						tenantId: data.tenantDTO?.id,
+					});
+				}
+			} else {
+				this.selected = this.selected.filter(
+					(item) => item.id != data.id
+				);
+			}
+		},
+
+		resetSearch () {
+			this.getGroup()
+			this.searchForm.companyDTO.id = ''
+			this.searchForm.name = ''
+			this.currentPage = 1;
+			this.getUser();
+		},
+		//用户分页点击
+		paginationChange() {
+			this.getUser();
+		},
+		//用户搜索
+		search() {
+			// this.groupId = ''
+			// this.$refs.groupTree.setCurrentKey(this.groupId)
+			this.currentPage = 1;
+			this.getUser();
+		},
+		//删除已选
+		deleteSelected(index) {
+			this.selected.splice(index, 1);
+			console.log(this.selected);
+			if (this.type == 1) {
+				this.$refs.userTree.setCheckedKeys(this.selectedIds);
+			} else if (this.type == 2) {
+				this.$refs.groupTree.setCheckedKeys(this.selectedIds);
+			}
+		},
+		//提交保存
+		save() {
+			this.value.splice(0, this.value.length);
+			this.selected.map((item) => {
+				this.value.push(item);
+			});
+			if (this.limit < this.value.length) {
+				this.$message.error(`你最多只能选择${this.limit}个用户`);
+				return;
+			}
+			this.$emit("doSubmit", this.value);
+			console.log(this.value)
+			this.dialogVisible = false;
+		},
+	},
+};
+</script>
+
+<style scoped>
+.user-select {
+	display: flex;
+}
+.user-select__left {
+	width: 400px;
+}
+.user-select__right {
+	flex: 1;
+}
+.user-select__selected li .name .el-avatar {
+	margin-right: 2px;
+	height: 10;
+	width: 25px;
+	height: 25px;
+}
+.user-select__search {
+	padding-bottom: 10px;
+}
+
+.user-select__select {
+	display: flex;
+	border: 1px solid var(--el-border-color-light);
+	background: var(--el-color-white);
+}
+.user-select__tree {
+	width: 200px;
+	height: 300px;
+	border-right: 1px solid var(--el-border-color-light);
+}
+.user-select__user {
+	width: 200px;
+	height: 300px;
+	display: flex;
+	flex-direction: column;
+}
+.user-select__user__list {
+	flex: 1;
+	overflow: auto;
+}
+.user-select__user footer {
+	height: 36px;
+	padding-top: 5px;
+	border-top: 1px solid var(--el-border-color-light);
+}
+
+.user-select__toicon {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	margin: 0 10px;
+}
+.user-select__toicon i {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	background: #ccc;
+	width: 20px;
+	height: 20px;
+	text-align: center;
+	line-height: 20px;
+	border-radius: 50%;
+	color: #fff;
+}
+
+.user-select__selected {
+	height: 345px;
+	width: 200px;
+	border: 1px solid var(--el-border-color-light);
+	background: var(--el-color-white);
+}
+.user-select__selected header {
+	height: 43px;
+	line-height: 43px;
+	border-bottom: 1px solid var(--el-border-color-light);
+	padding: 0 15px;
+	font-size: 16px;
+}
+.user-select__selected ul {
+	height: 300px;
+	overflow: auto;
+}
+.user-select__selected li {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	padding: 5px 5px 5px 15px;
+	height: 38px;
+}
+.user-select__selected li .name {
+	display: flex;
+	align-items: center;
+}
+.user-select__selected li .name .el-avatar {
+	margin-right: 10px;
+}
+.user-select__selected li .delete {
+	display: none;
+}
+.user-select__selected li:hover {
+	background: var(--el-color-primary-light-9);
+}
+.user-select__selected li:hover .delete {
+	display: inline-block;
+}
+.user-select-role .user-select__left {
+	width: 200px;
+}
+.user-select-role .user-select__tree {
+	border: none;
+	height: 343px;
+}
+</style>

+ 123 - 0
src/components/userSelectKjXmPg/index.vue

@@ -0,0 +1,123 @@
+<template>
+	<template v-if="printRead">
+		<label>{{ name }}</label>
+	</template>
+	<template v-else>
+		<el-input
+			placeholder="请选择"
+			:clearable="clearable"
+			:disabled="disabled"
+			style="line-hight: 40px"
+			v-model="name"
+		>
+			<template #append>
+				<el-button
+					:disabled="disabled"
+					:readonly="readonly"
+					@click="showUserSelect"
+					icon="search"
+				></el-button>
+			</template>
+		</el-input>
+		<user-select
+			ref="userSelect"
+			@doSubmit="selectUsersToInput"
+			:tenantId="tenantId"
+			:limit="limit"
+		></user-select>
+	</template>
+</template>
+<script>
+	import userSelect from "./UserSelectDialog";
+	import userService from "@/api/sys/userService";
+	export default {
+		data() {
+			return {
+				name: "",
+				selectData: [],
+			};
+		},
+		props: {
+			limit: Number,
+			modelValue: { type: String, default: "" },
+			tenantId: { type: String, default: null },
+			printRead: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			clearable: {
+				type: Boolean,
+				default: () => {
+					return true;
+				},
+			},
+			readonly: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			disabled: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+		},
+		components: {
+			userSelect,
+		},
+		watch: {
+			modelValue: {
+				handler(newVal) {
+					this.selectData = [];
+					if (newVal) {
+						newVal.split(",").forEach((id) => {
+							userService.queryById(id).then((data) => {
+								if (data && data.id !== "") {
+									this.selectData.push(data);
+									this.name = this.selectData
+										.map((user) => {
+											return user.name;
+										})
+										.join(",");
+								}
+							});
+						});
+					} else {
+						this.name = "";
+					}
+				},
+				immediate: true,
+				deep: false,
+			},
+		},
+		methods: {
+			selectUsersToInput(users) {
+				let selectIds = users
+					.map((user) => {
+						return user.id;
+					})
+					.join(",");
+				this.$emit("update:modelValue", selectIds);
+			},
+			showUserSelect() {
+				if (this.name == ""){
+					this.selectData = []
+				}
+				this.$refs.userSelect.open(this.selectData);
+			},
+		},
+	};
+</script>
+<style>
+	.el-form-item__content .el-input-group {
+		vertical-align: middle;
+	}
+	.el-tag + .el-tag {
+		margin-left: 5px;
+		margin-bottom: 5px;
+	}
+</style>

+ 39 - 5
src/views/human/enrollment/registration/EnrollmentRegistrationAddForm.vue

@@ -11,6 +11,11 @@
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
+					<el-form-item label="身份证号码" prop="idCard" :rules="[{required: true,validator: validator.isCardId, trigger:'blur'}]">
+						<el-input v-model="inputForm.idCard" @blur="idCardOnly(inputForm.idCard)"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
 					<el-form-item label="性别" prop="sex"
 								  :rules="[
 								  	{required: true, message: '性别不能为空', trigger: 'change'}
@@ -79,11 +84,7 @@
 						<el-input v-model="inputForm.mobilePhone" @blur="mobilePhoneOnly(inputForm.mobilePhone)"></el-input>
 					</el-form-item>
 				</el-col>
-				<el-col :span="12">
-					<el-form-item label="身份证号码" prop="idCard" :rules="[{required: true,validator: validator.isCardId, trigger:'blur'}]">
-						<el-input v-model="inputForm.idCard" @blur="idCardOnly(inputForm.idCard)"></el-input>
-					</el-form-item>
-				</el-col>
+
 				<el-col :span="12">
 					<el-form-item label="家庭住址" prop="homeAddress" :rules="[]">
 						<el-input v-model="inputForm.homeAddress"></el-input>
@@ -980,6 +981,39 @@
 						this.$message.error('身份证号码已存在,请重新确认')
 						this.inputForm.idCard = ''
 						throw new Error('身份证号码已存在,请重新确认')
+					}else {
+						let sex = null
+						let birth = null
+						let myDate = new Date()
+						let month = myDate.getMonth() + 1
+						let day = myDate.getDate()
+						let age = 0
+
+						if (idCard.length === 18) {
+							age = myDate.getFullYear() - idCard.substring(6, 10) - 1
+							sex = idCard.substring(16, 17)
+							birth = idCard.substring(6, 10) + '-' + idCard.substring(10, 12) + '-' + idCard.substring(12, 14)
+							// eslint-disable-next-line no-mixed-operators
+							if (idCard.substring(10, 12) < month || idCard.substring(10, 12) === month && idCard.substring(12, 14) <= day) age++
+
+						}
+						if (idCard.length === 15) {
+							age = myDate.getFullYear() - idCard.substring(6, 8) - 1901
+							sex = idCard.substring(13, 14)
+							birth = '19' + idCard.substring(6, 8) + '-' + idCard.substring(8, 10) + '-' + idCard.substring(10, 12)
+							// eslint-disable-next-line no-mixed-operators
+							if (idCard.substring(8, 10) < month || idCard.substring(8, 10) === month && idCard.substring(10, 12) <= day) age++
+						}
+
+						if (sex % 2 === 0) {
+							sex = '2'  // 性别代码 1代表男,2代表女,暂时不涉及其他类型性别
+						} else {
+							sex = '1'
+						}
+						this.inputForm.age=age
+						this.inputForm.sex=sex
+						this.inputForm.birthday=birth
+						return {age, sex, birth}
 					}
 				})
 			},

+ 39 - 5
src/views/human/enrollment/registration/EnrollmentRegistrationAddForm2.vue

@@ -11,6 +11,11 @@
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
+					<el-form-item label="身份证号码" prop="idCard" :rules="[{required: true,validator: validator.isCardId, trigger:'blur'}]">
+						<el-input v-model="inputForm.idCard" @blur="idCardOnly(inputForm.idCard)"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
 					<el-form-item label="性别" prop="sex"
 								  :rules="[
 								  	{required: true, message: '性别不能为空', trigger: 'change'}
@@ -84,11 +89,7 @@
 						<el-input v-model="inputForm.mobilePhone" @blur="mobilePhoneOnly(inputForm.mobilePhone)"></el-input>
 					</el-form-item>
 				</el-col>
-				<el-col :span="12">
-					<el-form-item label="身份证号码" prop="idCard" :rules="[{required: true,validator: validator.isCardId, trigger:'blur'}]">
-						<el-input v-model="inputForm.idCard" @blur="idCardOnly(inputForm.idCard)"></el-input>
-					</el-form-item>
-				</el-col>
+
 				<el-col :span="12">
 					<el-form-item label="家庭住址" prop="homeAddress" :rules="[]">
 						<el-input v-model="inputForm.homeAddress"></el-input>
@@ -716,6 +717,39 @@
 						this.$message.error('身份证号码已存在,请重新确认')
 						this.inputForm.idCard = ''
 						throw new Error('身份证号码已存在,请重新确认')
+					}else {
+						let sex = null
+						let birth = null
+						let myDate = new Date()
+						let month = myDate.getMonth() + 1
+						let day = myDate.getDate()
+						let age = 0
+
+						if (idCard.length === 18) {
+							age = myDate.getFullYear() - idCard.substring(6, 10) - 1
+							sex = idCard.substring(16, 17)
+							birth = idCard.substring(6, 10) + '-' + idCard.substring(10, 12) + '-' + idCard.substring(12, 14)
+							// eslint-disable-next-line no-mixed-operators
+							if (idCard.substring(10, 12) < month || idCard.substring(10, 12) === month && idCard.substring(12, 14) <= day) age++
+
+						}
+						if (idCard.length === 15) {
+							age = myDate.getFullYear() - idCard.substring(6, 8) - 1901
+							sex = idCard.substring(13, 14)
+							birth = '19' + idCard.substring(6, 8) + '-' + idCard.substring(8, 10) + '-' + idCard.substring(10, 12)
+							// eslint-disable-next-line no-mixed-operators
+							if (idCard.substring(8, 10) < month || idCard.substring(8, 10) === month && idCard.substring(10, 12) <= day) age++
+						}
+
+						if (sex % 2 === 0) {
+							sex = '2'  // 性别代码 1代表男,2代表女,暂时不涉及其他类型性别
+						} else {
+							sex = '1'
+						}
+						this.inputForm.age=age
+						this.inputForm.sex=sex
+						this.inputForm.birthday=birth
+						return {age, sex, birth}
 					}
 				})
 			},

+ 38 - 5
src/views/human/enrollment/registration/EnrollmentRegistrationEditForm.vue

@@ -22,6 +22,11 @@
 								</el-form-item>
 							</el-col>
 							<el-col :span="12">
+								<el-form-item label="身份证号码" prop="idCard">
+									<el-input v-model="inputForm.idCard" @blur="idCardOnly(inputForm.idCard)"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
 								<el-form-item label="性别" prop="sex"
 											  >
 									<el-radio-group v-model="inputForm.sex">
@@ -87,11 +92,6 @@
 								</el-form-item>
 							</el-col>
 							<el-col :span="12">
-								<el-form-item label="身份证号码" prop="idCard">
-									<el-input v-model="inputForm.idCard" @blur="idCardOnly(inputForm.idCard)"></el-input>
-								</el-form-item>
-							</el-col>
-							<el-col :span="12">
 								<el-form-item label="家庭住址" prop="homeAddress" :rules="[]">
 									<el-input v-model="inputForm.homeAddress"></el-input>
 								</el-form-item>
@@ -1404,6 +1404,39 @@
 						this.$message.error('身份证号码已存在,请重新确认')
 						this.inputForm.idCard = ''
 						throw new Error('身份证号码已存在,请重新确认')
+					}else {
+						let sex = null
+						let birth = null
+						let myDate = new Date()
+						let month = myDate.getMonth() + 1
+						let day = myDate.getDate()
+						let age = 0
+
+						if (idCard.length === 18) {
+							age = myDate.getFullYear() - idCard.substring(6, 10) - 1
+							sex = idCard.substring(16, 17)
+							birth = idCard.substring(6, 10) + '-' + idCard.substring(10, 12) + '-' + idCard.substring(12, 14)
+							// eslint-disable-next-line no-mixed-operators
+							if (idCard.substring(10, 12) < month || idCard.substring(10, 12) === month && idCard.substring(12, 14) <= day) age++
+
+						}
+						if (idCard.length === 15) {
+							age = myDate.getFullYear() - idCard.substring(6, 8) - 1901
+							sex = idCard.substring(13, 14)
+							birth = '19' + idCard.substring(6, 8) + '-' + idCard.substring(8, 10) + '-' + idCard.substring(10, 12)
+							// eslint-disable-next-line no-mixed-operators
+							if (idCard.substring(8, 10) < month || idCard.substring(8, 10) === month && idCard.substring(10, 12) <= day) age++
+						}
+
+						if (sex % 2 === 0) {
+							sex = '2'  // 性别代码 1代表男,2代表女,暂时不涉及其他类型性别
+						} else {
+							sex = '1'
+						}
+						this.inputForm.age=age
+						this.inputForm.sex=sex
+						this.inputForm.birthday=birth
+						return {age, sex, birth}
 					}
 				})
 			},

+ 0 - 2
src/views/human/enrollment/registration/EnrollmentRegistrationList.vue

@@ -186,8 +186,6 @@
                       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>
-											<el-button v-if="
-                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="removeRedis(scope.row.userId)">清除登录缓存</el-button>
 										</div>
 									</template>
 								</vxe-column>

+ 31 - 6
src/views/human/practice/register/RegistrationEditForm.vue

@@ -110,14 +110,23 @@
 										  label: 'name',         // 显示名称
 										  children: 'children'    // 子级字段名
 										}"
-												:url="`/system-server/sys/office/treeData?type=2`"
+												:url="`/system-server/sys/office/treeDataPgAndKjAndXm`"
 												:value="inputForm.practiceOffice"
 												:accordion="true"
+												clearable
 												size="default"
-												@getValue="(value) => {inputForm.practiceOffice=value}"/>
+												@getValue="(value,valueTitle,node) => handleBlur(value,node)"/>
 										</el-form-item>
 									</el-col>
-									<el-col :span="12">
+									<el-col :span="12" v-if="isXm">
+										<el-form-item label="项目经理" prop="projectManager"
+													  >
+											<UserSelectSignatory style="width: 100%" ref="userSelect1"
+																 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+																 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+										</el-form-item>
+									</el-col>
+									<el-col :span="12" v-else>
 										<el-form-item label="项目经理" prop="projectManager"
 													  :rules="[
 								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
@@ -290,8 +299,8 @@
 	import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
 	import registerService from '@/api/human/register/RegisterService'
 	import SelectTree from '@/components/treeSelect/treeSelect.vue'
-	import UserSelectSignatory from '@/components/userSelect'
-
+	import UserSelectSignatory from '@/components/userSelectKjXmPg'
+	import officeService from "@/api/sys/officeService";
 	export default {
 		props: {
 			businessId: {
@@ -338,7 +347,8 @@
 				},
 				keyWatch: '',
 				amountKey: '',
-				membersKey: ''
+				membersKey: '',
+				isXm: false
 			}
 		},
 		created () {
@@ -426,11 +436,17 @@
 					this.loading = true
 					this.$refs.inputForm.resetFields()
 					registerService.findById(this.inputForm.id).then((data) => {
+						console.log('data',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))
+						if (data.parentOfficeName === '兴光项目公司'){
+							this.isXm = true
+						}else {
+							this.isXm = false
+						}
 						this.loading = false
 					})
 				})
@@ -646,6 +662,15 @@
 					}
 				})
 			},
+			//获取实习部门是否所属项目公司
+			async handleBlur(value,node){
+				this.inputForm.practiceOffice = value
+				if (node.parent.name === '兴光项目公司'){
+					this.isXm = true
+				}else {
+					this.isXm = false
+				}
+			}
 		}
 	}
 </script>

+ 16 - 1
src/views/sys/user/UserList.vue

@@ -353,7 +353,7 @@
 								</vxe-column>
 								<vxe-column
 									title="操作"
-									width="200px"
+									width="350px"
 									fixed="right"
 									align="center"
 								>
@@ -390,6 +390,7 @@
 											@click="del(row.id)"
 											>删除</el-button
 										>
+										<el-button  text type="primary" @click="removeRedis(row.d)">清除登录缓存</el-button>
 									</template>
 								</vxe-column>
 							</vxe-table>
@@ -669,6 +670,20 @@ export default {
 			this.$refs.searchForm.resetFields();
 			this.refreshList();
 		},
+		removeRedis(userId){
+			this.$confirm(`确定清除所选项登录缓存吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				userService.removeRedis(userId).then((data) => {
+					this.$message.success(data)
+					this.refreshList()
+					this.loading = false
+				})
+			})
+		}
 	},
 };
 </script>