From bb778c9033f385ac7d20556814c9777d90ab8cf0 Mon Sep 17 00:00:00 2001 From: 阿宝 Date: Wed, 14 Dec 2022 14:20:40 +0800 Subject: [PATCH] 设备状态 --- E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null | 6 ++++++ src/components/upload.vue | 17 +++++++++++++++++ src/store/index.js | 70 +++++++++++++++++++++++++++++++++++----------------------------------- src/views/commerViews.vue | 1 + src/views/device/index.vue | 45 ++++++++++++++++++++++++++++++++++++++++----- src/views/index/mainIndex.vue | 5 +++++ 6 files changed, 104 insertions(+), 40 deletions(-) create mode 100644 E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null create mode 100644 src/components/upload.vue diff --git a/E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null b/E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null new file mode 100644 index 0000000..821db7c --- /dev/null +++ b/E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null @@ -0,0 +1,6 @@ +Exception during registration: +System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。 + 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) + 在 System.Diagnostics.Process.Start() + 在 System.CommandLine.Invocation.Process.StartProcess(String command, String args, String workingDir, Action`1 stdOut, Action`1 stdErr, ValueTuple`2[] environmentVariables) + 在 System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__10_1>d.MoveNext() \ No newline at end of file diff --git a/src/components/upload.vue b/src/components/upload.vue new file mode 100644 index 0000000..04ab282 --- /dev/null +++ b/src/components/upload.vue @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js index 8927fb2..5d93702 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -68,8 +68,13 @@ const store = new Vuex.Store({ let response = res if (response.status == 0) { const userInfo = { ...response.data } - commit("setToken", "isLogin"); + userInfo.permissions.push({ + role: "ROLE_XUEXIAO", + roleName: "学校管理员", + },) + commit("setToken", Cookies.get("ZT_YIJIAO_TOKEN")); commit("setInfo", { ...userInfo }); + commit("setRouters", [...userInfo.authorityRouter]) state.addRouters.forEach((res) => { router.addRoute(res); @@ -94,41 +99,36 @@ const store = new Vuex.Store({ permissions({ state, commit }, that) { // request.login(that.loginForm).then(res => { // if (res.status == 200) { + let userInfo = { + permissions: [ + { + role: "ROLE_XUEXIAO", + roleName: "学校管理员", + }, + { + role: "ROLE_LAOSHI", + roleName: "老师", + }, + ], + name: "李老师", + // avatar: data.avatar ? data.avatar : "", + // uid: data.id, + authorityRouter:[ + "setUpAccount", + "setUpSchool", + "setUpTeacher", + "setUpStudent", + "card", + "device", + "analysis", + "down", + "downClient", + "dataSync" + ], + } commit("setToken", "xxxx") - commit("setInfo", { - permissions: [ - { - role: "superAdmin", - roleName: "超级管理员", - }, - ], - name: "李老师", - // avatar: data.avatar ? data.avatar : "", - // uid: data.id, - authorityRouter:[ - "examinationPaper", - "examinationPaperAdd", - "examinationPaperEdit", - "examinationPaperRecycle", - "ask", - "askAnalysis", - "test", - "testAnalysis", - "portrait", - "setUpConglomerate", - "setUpAccount", - "setUpSchool", - "setUpTeacher", - "setUpStudent", - "card", - "device", - "analysis", - "down", - "downClient", - "dataSync" - ], - }); - commit("setRouters", authorityRouter) + commit("setInfo", userInfo); + commit("setRouters", [...userInfo.authorityRouter]) state.addRouters.forEach((res) => { router.addRoute(res); }); diff --git a/src/views/commerViews.vue b/src/views/commerViews.vue index 20c5912..1426402 100644 --- a/src/views/commerViews.vue +++ b/src/views/commerViews.vue @@ -5,6 +5,7 @@ \ No newline at end of file diff --git a/src/views/index/mainIndex.vue b/src/views/index/mainIndex.vue index b5bb9c2..5964b2b 100644 --- a/src/views/index/mainIndex.vue +++ b/src/views/index/mainIndex.vue @@ -100,6 +100,11 @@ export default { navList: [], }; }, + watch:{ + "$store.getters.routers":function(val){ + window.location.reload() + } + }, created() { this.type = this.$store.getters.info.permissions[0].role this.navList = this.$store.getters.addRouters.map(item=>{ -- libgit2 0.21.4