Commit bb778c9033f385ac7d20556814c9777d90ab8cf0
1 parent
f356590c
设备状态
Showing
6 changed files
with
104 additions
and
40 deletions
E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
0 → 100644
1 | +Exception during registration: | |
2 | +System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。 | |
3 | + 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) | |
4 | + 在 System.Diagnostics.Process.Start() | |
5 | + 在 System.CommandLine.Invocation.Process.StartProcess(String command, String args, String workingDir, Action`1 stdOut, Action`1 stdErr, ValueTuple`2[] environmentVariables) | |
6 | + 在 System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_1>d.MoveNext() | |
0 | 7 | \ No newline at end of file | ... | ... |
src/components/upload.vue
0 → 100644
src/store/index.js
... | ... | @@ -68,8 +68,13 @@ const store = new Vuex.Store({ |
68 | 68 | let response = res |
69 | 69 | if (response.status == 0) { |
70 | 70 | const userInfo = { ...response.data } |
71 | - commit("setToken", "isLogin"); | |
71 | + userInfo.permissions.push({ | |
72 | + role: "ROLE_XUEXIAO", | |
73 | + roleName: "学校管理员", | |
74 | + },) | |
75 | + commit("setToken", Cookies.get("ZT_YIJIAO_TOKEN")); | |
72 | 76 | commit("setInfo", { ...userInfo }); |
77 | + | |
73 | 78 | commit("setRouters", [...userInfo.authorityRouter]) |
74 | 79 | state.addRouters.forEach((res) => { |
75 | 80 | router.addRoute(res); |
... | ... | @@ -94,41 +99,36 @@ const store = new Vuex.Store({ |
94 | 99 | permissions({ state, commit }, that) { |
95 | 100 | // request.login(that.loginForm).then(res => { |
96 | 101 | // if (res.status == 200) { |
102 | + let userInfo = { | |
103 | + permissions: [ | |
104 | + { | |
105 | + role: "ROLE_XUEXIAO", | |
106 | + roleName: "学校管理员", | |
107 | + }, | |
108 | + { | |
109 | + role: "ROLE_LAOSHI", | |
110 | + roleName: "老师", | |
111 | + }, | |
112 | + ], | |
113 | + name: "李老师", | |
114 | + // avatar: data.avatar ? data.avatar : "", | |
115 | + // uid: data.id, | |
116 | + authorityRouter:[ | |
117 | + "setUpAccount", | |
118 | + "setUpSchool", | |
119 | + "setUpTeacher", | |
120 | + "setUpStudent", | |
121 | + "card", | |
122 | + "device", | |
123 | + "analysis", | |
124 | + "down", | |
125 | + "downClient", | |
126 | + "dataSync" | |
127 | + ], | |
128 | + } | |
97 | 129 | commit("setToken", "xxxx") |
98 | - commit("setInfo", { | |
99 | - permissions: [ | |
100 | - { | |
101 | - role: "superAdmin", | |
102 | - roleName: "超级管理员", | |
103 | - }, | |
104 | - ], | |
105 | - name: "李老师", | |
106 | - // avatar: data.avatar ? data.avatar : "", | |
107 | - // uid: data.id, | |
108 | - authorityRouter:[ | |
109 | - "examinationPaper", | |
110 | - "examinationPaperAdd", | |
111 | - "examinationPaperEdit", | |
112 | - "examinationPaperRecycle", | |
113 | - "ask", | |
114 | - "askAnalysis", | |
115 | - "test", | |
116 | - "testAnalysis", | |
117 | - "portrait", | |
118 | - "setUpConglomerate", | |
119 | - "setUpAccount", | |
120 | - "setUpSchool", | |
121 | - "setUpTeacher", | |
122 | - "setUpStudent", | |
123 | - "card", | |
124 | - "device", | |
125 | - "analysis", | |
126 | - "down", | |
127 | - "downClient", | |
128 | - "dataSync" | |
129 | - ], | |
130 | - }); | |
131 | - commit("setRouters", authorityRouter) | |
130 | + commit("setInfo", userInfo); | |
131 | + commit("setRouters", [...userInfo.authorityRouter]) | |
132 | 132 | state.addRouters.forEach((res) => { |
133 | 133 | router.addRoute(res); |
134 | 134 | }); | ... | ... |
src/views/commerViews.vue
src/views/device/index.vue
1 | 1 | <template> |
2 | - <div>设备状态</div> | |
2 | + <div> | |
3 | + <back-box> | |
4 | + <template slot="title"> | |
5 | + <span>设备管理</span> | |
6 | + </template> | |
7 | + <template slot="btns"> | |
8 | + <el-tooltip effect="dark" content="设备导入" placement="bottom"> | |
9 | + <el-button | |
10 | + type="primary" | |
11 | + icon="el-icon-upload2" | |
12 | + size="mini" | |
13 | + plain | |
14 | + circle | |
15 | + ></el-button> | |
16 | + </el-tooltip> | |
17 | + <el-tooltip effect="dark" content="添加答题器" placement="bottom"> | |
18 | + <el-button | |
19 | + type="primary" | |
20 | + icon="el-icon-mobile" | |
21 | + size="mini" | |
22 | + plain | |
23 | + circle | |
24 | + ></el-button> | |
25 | + </el-tooltip> | |
26 | + <el-tooltip effect="dark" content="添加基站" placement="bottom"> | |
27 | + <el-button | |
28 | + type="primary" | |
29 | + icon="el-icon-receiving" | |
30 | + size="mini" | |
31 | + plain | |
32 | + circle | |
33 | + ></el-button> | |
34 | + </el-tooltip> | |
35 | + </template> | |
36 | + </back-box> | |
37 | + <el-dialog title="设备导入" :visible.sync="diaUp" width="400" center> | |
38 | + <p>通过Excel名单导入设备,需要提供设备编码,点击<el-link>模板下载</el-link>。</p> | |
39 | + </el-dialog> | |
40 | + </div> | |
3 | 41 | </template> |
4 | 42 | |
5 | 43 | <script> |
6 | -export default { | |
7 | - | |
8 | -} | |
44 | +export default {}; | |
9 | 45 | </script> |
10 | 46 | |
11 | 47 | <style> |
12 | - | |
13 | 48 | </style> |
14 | 49 | \ No newline at end of file | ... | ... |
src/views/index/mainIndex.vue
... | ... | @@ -100,6 +100,11 @@ export default { |
100 | 100 | navList: [], |
101 | 101 | }; |
102 | 102 | }, |
103 | + watch:{ | |
104 | + "$store.getters.routers":function(val){ | |
105 | + window.location.reload() | |
106 | + } | |
107 | + }, | |
103 | 108 | created() { |
104 | 109 | this.type = this.$store.getters.info.permissions[0].role |
105 | 110 | this.navList = this.$store.getters.addRouters.map(item=>{ | ... | ... |