ow
This commit is contained in:
1 parent
c253805122
commit
7df55a11bf
46 files changed
+3689
-27
No files matched your search
@@ -592,6 +592,7 @@ const upSon = (index: number) => {
|
||||
const item = data.value.SecurityFunctionMapSons.splice(index, 1)[0];
|
||||
data.value.SecurityFunctionMapSons.splice(index - 1, 0, item);
|
||||
selectedSonIndex.value = index - 1;
|
||||
refreshSonOrderby();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -600,9 +601,17 @@ const downSon = (index: number) => {
|
||||
const item = data.value.SecurityFunctionMapSons.splice(index, 1)[0];
|
||||
data.value.SecurityFunctionMapSons.splice(index + 1, 0, item);
|
||||
selectedSonIndex.value = index + 1;
|
||||
|
||||
refreshSonOrderby();
|
||||
}
|
||||
};
|
||||
|
||||
const refreshSonOrderby = () => {
|
||||
data.value.SecurityFunctionMapSons.forEach((item, idx) => {
|
||||
item.Orderby = idx + 1; // orderby从1开始,也可以用 idx
|
||||
});
|
||||
};
|
||||
|
||||
const deleteSon = (key: string) => {
|
||||
data.value.SecurityFunctionMapSons = data.value.SecurityFunctionMapSons.filter(item => item.SonFunctionName !== key);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user