Merge remote-tracking branch 'yudao/master' into master-dev
commit
99b1e6da2c
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "yudao-ui-admin-vue3",
|
"name": "yudao-ui-admin-vue3",
|
||||||
"version": "2025.12-snapshot",
|
"version": "2026.01-snapshot",
|
||||||
"description": "基于vue3、vite4、element-plus、typesScript",
|
"description": "基于vue3、vite4、element-plus、typesScript",
|
||||||
"author": "xingyu",
|
"author": "xingyu",
|
||||||
"private": false,
|
"private": false,
|
||||||
|
|
|
||||||
|
|
@ -89,31 +89,22 @@ export const useApiSelect = (option: ApiSelectProps) => {
|
||||||
|
|
||||||
// 设置默认当前用户(仅当 defaultCurrentUser 为 true 且无预设值时)
|
// 设置默认当前用户(仅当 defaultCurrentUser 为 true 且无预设值时)
|
||||||
const setDefaultCurrentUser = () => {
|
const setDefaultCurrentUser = () => {
|
||||||
console.log('[UserSelect] setDefaultCurrentUser called, defaultCurrentUser:', props.defaultCurrentUser)
|
|
||||||
|
|
||||||
// 仅当组件名为 UserSelect 且 defaultCurrentUser 为 true 时处理
|
// 仅当组件名为 UserSelect 且 defaultCurrentUser 为 true 时处理
|
||||||
if (option.name !== 'UserSelect' || !props.defaultCurrentUser) {
|
if (option.name !== 'UserSelect' || !props.defaultCurrentUser) {
|
||||||
console.log('[UserSelect] skip - not UserSelect or defaultCurrentUser is false')
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否已有预设值(预设值优先级高于默认当前用户)
|
// 检查是否已有预设值(预设值优先级高于默认当前用户)
|
||||||
if (hasValidPresetValue()) {
|
if (hasValidPresetValue()) {
|
||||||
console.log('[UserSelect] has preset value, skip:', attrs.modelValue)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前用户 ID
|
// 获取当前用户 ID
|
||||||
const userStore = useUserStoreWithOut()
|
const userStore = useUserStoreWithOut()
|
||||||
const user = userStore.getUser
|
const user = userStore.getUser
|
||||||
const currentUserId = user?.id
|
const currentUserId = user?.id
|
||||||
|
|
||||||
console.log('[UserSelect] current user:', user, 'userId:', currentUserId)
|
|
||||||
|
|
||||||
if (currentUserId) {
|
if (currentUserId) {
|
||||||
// 根据多选/单选模式设置默认值
|
// 根据多选/单选模式设置默认值
|
||||||
const defaultValue = props.multiple ? [currentUserId] : currentUserId
|
const defaultValue = props.multiple ? [currentUserId] : currentUserId
|
||||||
console.log('[UserSelect] setting default value:', defaultValue)
|
|
||||||
emit('update:modelValue', defaultValue)
|
emit('update:modelValue', defaultValue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export const useFormCreateDesigner = async (designer: Ref) => {
|
||||||
type: 'switch',
|
type: 'switch',
|
||||||
field: 'defaultCurrentUser',
|
field: 'defaultCurrentUser',
|
||||||
title: '默认选中当前用户',
|
title: '默认选中当前用户',
|
||||||
value: true
|
value: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
@ -85,7 +85,7 @@ export const useFormCreateDesigner = async (designer: Ref) => {
|
||||||
type: 'switch',
|
type: 'switch',
|
||||||
field: 'defaultCurrentDept',
|
field: 'defaultCurrentDept',
|
||||||
title: '默认选中当前部门',
|
title: '默认选中当前部门',
|
||||||
value: true
|
value: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<Verify
|
<Verify
|
||||||
ref="verify"
|
ref="verify"
|
||||||
|
v-if="resetPasswordData.captchaEnable === 'true'"
|
||||||
:captchaType="captchaType"
|
:captchaType="captchaType"
|
||||||
:imgSize="{ width: '400px', height: '200px' }"
|
:imgSize="{ width: '400px', height: '200px' }"
|
||||||
mode="pop"
|
mode="pop"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
>
|
>
|
||||||
转化为客户
|
转化为客户
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-else disabled type="success">已转化客户</el-button>
|
<el-button v-if="clue.transformStatus" disabled type="success">已转化客户</el-button>
|
||||||
</ClueDetailsHeader>
|
</ClueDetailsHeader>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-tabs>
|
<el-tabs>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue