|
@@ -308,6 +308,19 @@ const actions = {
|
|
|
console.log("无工具", i);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ if (perData.admin.index.stuList) {
|
|
|
+ perData.admin.index.stuList.forEach((i, index) => {
|
|
|
+ let _index = toolList.findIndex((i2) => i == i2.id);
|
|
|
+ if (_index != -1) {
|
|
|
+ perData.admin.index.stuList[index] = toolList[_index];
|
|
|
+ perData.admin.index.stuList[index].hovered = false
|
|
|
+ } else {
|
|
|
+ console.log("无工具", i);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
perData.admin.sidebar.list.forEach((i, index) => {
|
|
|
if (i.children) {
|
|
|
i.children.forEach((i2, index2) => {
|
|
@@ -333,6 +346,35 @@ const actions = {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+ if (perData.admin.sidebar.stuList) {
|
|
|
+ perData.admin.sidebar.stuList.forEach((i, index) => {
|
|
|
+ if (i.children) {
|
|
|
+ i.children.forEach((i2, index2) => {
|
|
|
+ let _toolList = JSON.parse(JSON.stringify(toolList))
|
|
|
+ let _index = _toolList.findIndex((i3) => i2 == i3.id);
|
|
|
+
|
|
|
+ if (_index != -1) {
|
|
|
+ perData.admin.sidebar.stuList[index].children[index2] = _toolList[_index];
|
|
|
+ perData.admin.sidebar.stuList[index].children[index2].typeId = perData.admin.sidebar.stuList[index].typeId + "," +_toolList[_index].id;
|
|
|
+ } else {
|
|
|
+ console.log("无工具", i);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ let _toolList = JSON.parse(JSON.stringify(toolList))
|
|
|
+ let _index = _toolList.findIndex((i2) => i == i2.id);
|
|
|
+ if (_index != -1) {
|
|
|
+ perData.admin.sidebar.stuList[index] = _toolList[_index];
|
|
|
+ perData.admin.sidebar.stuList[index].typeId =
|
|
|
+ perData.admin.sidebar.stuList[index].id;
|
|
|
+ } else {
|
|
|
+ console.log("无工具", i);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
commit('SET_FROM', perData)
|
|
|
// console.log('state.fromL',state.fromL);
|