Skip to content

Commit c48eb56

Browse files
committed
update
1 parent e6499f6 commit c48eb56

File tree

10 files changed

+45
-19
lines changed

10 files changed

+45
-19
lines changed

.env.development

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ ENV = 'development'
44
# base api
55
VUE_APP_BASE_API = '/api'
66

7+
# CorpId
8+
VUE_APP_CORPID = 'dingeff939842ad9207f35c2f4657eb6378f'
9+
710
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
811
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
912
# It only does one thing by converting all import() to require().

.env.production

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ ENV = 'production'
44
# base api
55
VUE_APP_BASE_API = '/api'
66

7+
# CorpId
8+
VUE_APP_CORPID = 'dingeff939842ad9207f35c2f4657eb6378f'

src/icons/svg/thesis.svg

Lines changed: 1 addition & 0 deletions
Loading

src/router/index.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,13 @@ export const asyncRoutes = [
128128
name: "Project",
129129
meta: { title: "开发管理", icon: "dev" },
130130
children: [
131-
{
132-
path: "manage",
133-
name: "Manage",
134-
component: () => import("@/views/project/manage"),
135-
meta: { title: "开发管理", icon: "dev", roles: ["admin", "doctor"] }
136-
},
137131
{
138132
path: "index",
139133
name: "Task",
140-
component: () => import("@/views/project/myproject"),
134+
component: () => import("@/views/project/index"),
141135
meta: {
142136
title: "开发任务",
143-
icon: "dev",
144-
roles: ["postgraduate"]
137+
icon: "dev"
145138
}
146139
},
147140
{
@@ -165,7 +158,7 @@ export const asyncRoutes = [
165158
path: "index",
166159
name: "Paper",
167160
component: () => import("@/views/paper/index"),
168-
meta: { title: "论文管理", icon: "paper" }
161+
meta: { title: "论文管理", icon: "thesis" }
169162
},
170163
{
171164
path: "detail/:id",

src/views/dashboard/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export default {
2020
...mapGetters(["roles"])
2121
},
2222
created() {
23-
console.log(this.roles + "lllllg");
2423
if (!this.roles.includes("postgraduate")) {
2524
this.currentRole = "auditorDashboard";
2625
}

src/views/dashboard/student/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
</router-link>
112112
</div>
113113
<div class="item">
114-
<router-link to="/task/index">
114+
<router-link to="/project/index">
115115
<el-link type="primary">迭代任务 </el-link>
116116
</router-link>
117117
</div>

src/views/login/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default {
5858
// });
5959
6060
// 获取钉钉临时授权码
61-
getAuthCode("dingeff939842ad9207f35c2f4657eb6378f").then(res => {
61+
getAuthCode(process.env.VUE_APP_CORPID).then(res => {
6262
this.code.authcode = res.code; // 获取authcode
6363
this.$store
6464
.dispatch("user/_login", this.code)

src/views/project/manage.vue renamed to src/views/project/auditor/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ export default {
2323
return {};
2424
},
2525
components: {
26-
assign: () => import("./components/assign"),
27-
auditbug: () => import("./components/auditbug"),
28-
devlist: () => import("./components/devlist")
26+
assign: () => import("../components/assign"),
27+
auditbug: () => import("../components/auditbug"),
28+
devlist: () => import("../components/devlist")
2929
},
3030
created() {},
3131
methods: {}

src/views/project/index.vue

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<template>
2+
<div>
3+
<component :is="currentRole" />
4+
</div>
5+
</template>
6+
7+
<script>
8+
import { mapGetters } from "vuex";
9+
import auditordev from "./auditor";
10+
import studentdev from "./student";
11+
export default {
12+
name: "Dashboard",
13+
components: { auditordev, studentdev },
14+
data() {
15+
return {
16+
currentRole: "studentdev"
17+
};
18+
},
19+
computed: {
20+
...mapGetters(["roles"])
21+
},
22+
created() {
23+
if (!this.roles.includes("postgraduate")) {
24+
this.currentRole = "auditordev";
25+
}
26+
}
27+
};
28+
</script>

src/views/project/myproject.vue renamed to src/views/project/student/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export default {
2626
};
2727
},
2828
components: {
29-
myIteration: () => import("./components/myIteration"),
30-
userbug: () => import("./components/userbug"),
31-
devlist: () => import("./components/devlist")
29+
myIteration: () => import("../components/myIteration"),
30+
userbug: () => import("../components/userbug"),
31+
devlist: () => import("../components/devlist")
3232
},
3333
created() {},
3434
methods: {}

0 commit comments

Comments
 (0)