修复配置项没有数据时的问题
parent
26442645eb
commit
8d2b984abb
|
|
@ -381,7 +381,11 @@ queryParams.value.inTime = proxy.$dt(new Date()).format("YYYY-MM-DD");
|
|||
function getCfgList() {
|
||||
listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.cfgOptions = response.rows || []
|
||||
queryParams.value.cfgId = data.cfgOptions[0]?.id || null
|
||||
if (data.cfgOptions.length > 0) {
|
||||
queryParams.value.cfgId = data.cfgOptions[0].id
|
||||
} else {
|
||||
queryParams.value.cfgId = null
|
||||
}
|
||||
getList()
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,7 +211,11 @@ queryParams.value.inTime = proxy.$dt(new Date()).format("YYYY-MM-DD");
|
|||
function getCfgList() {
|
||||
listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.cfgOptions = response.rows || []
|
||||
queryParams.value.cfgId = data.cfgOptions[0]?.id || null
|
||||
if (data.cfgOptions.length > 0) {
|
||||
queryParams.value.cfgId = data.cfgOptions[0].id
|
||||
} else {
|
||||
queryParams.value.cfgId = null
|
||||
}
|
||||
handleQuery();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -417,7 +417,11 @@ function getWorkAreaTree() {
|
|||
function getCfgList() {
|
||||
listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.cfgOptions = response.rows || []
|
||||
queryParams.value.cfgId = data.cfgOptions[0]?.id || null
|
||||
if (data.cfgOptions.length > 0) {
|
||||
queryParams.value.cfgId = data.cfgOptions[0].id
|
||||
} else {
|
||||
queryParams.value.cfgId = null
|
||||
}
|
||||
getList()
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,7 +293,11 @@ function handleExport() {
|
|||
function getCfgList() {
|
||||
listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.cfgOptions = response.rows || []
|
||||
queryParams.value.cfgId = data.cfgOptions[0]?.id || null
|
||||
if (data.cfgOptions.length > 0) {
|
||||
queryParams.value.cfgId = data.cfgOptions[0].id
|
||||
} else {
|
||||
queryParams.value.cfgId = null
|
||||
}
|
||||
getList()
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue