This commit is contained in:
2025-09-04 18:53:10 +08:00
parent 0f439c9220
commit 6f7d7e56c2
8 changed files with 108 additions and 82 deletions

View File

@ -298,6 +298,11 @@ const getList = async () => {
const res = await getProjectSquare(currentProject.value?.id);
if (res.data.length === 0) {
proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
matrixOptions.value = [];
queryParams.value.projectId = '';
form.value.projectId = '';
tabList.value = [];
activeTab.value = '';
} else {
let matrixList = res.data.map((item) => {
return {
@ -472,6 +477,7 @@ const matrixValue = ref<number | undefined>(matrixOptions.value.length > 0 ? mat
const resetMatrix = () => {
matrixValue.value = undefined;
queryParams.value.matrixId = undefined;
queryParams.value.projectId = undefined;
matrixOptions.value = [];
};
@ -491,8 +497,6 @@ onMounted(() => {
const listeningProject = watch(
() => currentProject.value?.id,
(nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;
resetMatrix();
getList();
}