fix(form): 修复 QA 审查发现的部门树点选、领导下拉回显与导出提示问题

- useTreeBiz onSelect 守卫改为 checkable != true,兼容非勾选模式点节点选中
- DeptRoleUserSelectDropDown 详情加载不再无条件清空领导下拉值
- exportXls 捕获导出异常并提示,避免静默失败

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wsm
2026-08-11 17:43:22 +08:00
co-authored by Claude Opus 4.7
parent 237a5810cf
commit b8213b662b
3 changed files with 15 additions and 6 deletions
@@ -77,8 +77,8 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
* 树节点选择
*/
function onSelect(keys, info) {
if (props.checkable == false) {
checkedKeys.value = props.checkStrictly ? keys.checked : keys;
if (props.checkable != true) {
checkedKeys.value = Array.isArray(keys) ? keys : [keys];
const { selectedNodes } = info;
let rows = <any[]>[];
selectedNodes.forEach((item) => {
@@ -62,9 +62,12 @@ onMounted(fetchUserList);
watch(
() => [props.deptId, props.roleId],
() => {
async () => {
await fetchUserList();
const current = modelValue.value;
if (current && !userList.value.some((u) => u.username === current)) {
modelValue.value = '';
fetchUserList();
}
},
);
+7 -1
View File
@@ -22,7 +22,13 @@ export function useMethods() {
*/
async function exportXls(name, url, params, isXlsx = false) {
//update-begin---author:wangshuai---date:2024-01-25---for:【QQYUN-8118】导出超时时间设置长点---
const data = await defHttp.get({ url: url, params: params, responseType: 'blob', timeout: 60000 }, { isTransformResponse: false });
let data;
try {
data = await defHttp.get({ url: url, params: params, responseType: 'blob', timeout: 60000 }, { isTransformResponse: false });
} catch (error) {
createMessage.error('导出失败,请稍后重试');
return;
}
//update-end---author:wangshuai---date:2024-01-25---for:【QQYUN-8118】导出超时时间设置长点---
if (!data) {
createMessage.warning('文件下载失败');