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