fix(form): 修复 QA 审查发现的部门树点选、领导下拉回显与导出提示问题
- useTreeBiz onSelect 守卫改为 checkable != true,兼容非勾选模式点节点选中 - DeptRoleUserSelectDropDown 详情加载不再无条件清空领导下拉值 - exportXls 捕获导出异常并提示,避免静默失败 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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],
|
||||
() => {
|
||||
modelValue.value = '';
|
||||
fetchUserList();
|
||||
async () => {
|
||||
await fetchUserList();
|
||||
const current = modelValue.value;
|
||||
if (current && !userList.value.some((u) => u.username === current)) {
|
||||
modelValue.value = '';
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -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('文件下载失败');
|
||||
|
||||
Reference in New Issue
Block a user