|
@@ -197,6 +197,7 @@
|
|
|
import type { FormInstance } from 'element-plus';
|
|
import type { FormInstance } from 'element-plus';
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
|
|
import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
|
|
|
|
|
+ import { de } from 'element-plus/es/locale';
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
|
modelValue: boolean;
|
|
modelValue: boolean;
|
|
@@ -231,7 +232,7 @@
|
|
|
|
|
|
|
|
const cascaderProp = {
|
|
const cascaderProp = {
|
|
|
expandTrigger: 'click',
|
|
expandTrigger: 'click',
|
|
|
- checkStrictly: false,
|
|
|
|
|
|
|
+ checkStrictly: props.currentDepartmentKey === 'default',
|
|
|
value: 'id',
|
|
value: 'id',
|
|
|
label: 'deptName',
|
|
label: 'deptName',
|
|
|
multiple: !/A|B/.test(props.currentDepartmentKey),
|
|
multiple: !/A|B/.test(props.currentDepartmentKey),
|
|
@@ -241,10 +242,11 @@
|
|
|
() => [props.currentDepartmentKey, props.departmentOptions],
|
|
() => [props.currentDepartmentKey, props.departmentOptions],
|
|
|
([currentDepartmentKey, departmentOptions]) => {
|
|
([currentDepartmentKey, departmentOptions]) => {
|
|
|
if (!currentDepartmentKey) return;
|
|
if (!currentDepartmentKey) return;
|
|
|
- console.log('departmentOptions:', departmentOptions);
|
|
|
|
|
- // if (currentDepartmentKey === 'A') {
|
|
|
|
|
- // const id = departmentOptions.find((d) => d.deptName === '院领导');
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ // 针对院领导的特殊处理
|
|
|
|
|
+ if (currentDepartmentKey === 'A' && Array.isArray(departmentOptions) && departmentOptions.length) {
|
|
|
|
|
+ const id = departmentOptions.find((d) => d.deptName === '院领导')?.id;
|
|
|
|
|
+ formData.deptId = [id];
|
|
|
|
|
+ }
|
|
|
formData.leader1 = null;
|
|
formData.leader1 = null;
|
|
|
formData.leader2 = null;
|
|
formData.leader2 = null;
|
|
|
formData.signPerson = [];
|
|
formData.signPerson = [];
|