Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanyeye committed Mar 24, 2020
1 parent e6499f6 commit c48eb56
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ENV = 'development'
# base api
VUE_APP_BASE_API = '/api'

# CorpId
VUE_APP_CORPID = 'dingeff939842ad9207f35c2f4657eb6378f'

# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().
Expand Down
2 changes: 2 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ ENV = 'production'
# base api
VUE_APP_BASE_API = '/api'

# CorpId
VUE_APP_CORPID = 'dingeff939842ad9207f35c2f4657eb6378f'
1 change: 1 addition & 0 deletions src/icons/svg/thesis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 3 additions & 10 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,13 @@ export const asyncRoutes = [
name: "Project",
meta: { title: "开发管理", icon: "dev" },
children: [
{
path: "manage",
name: "Manage",
component: () => import("@/views/project/manage"),
meta: { title: "开发管理", icon: "dev", roles: ["admin", "doctor"] }
},
{
path: "index",
name: "Task",
component: () => import("@/views/project/myproject"),
component: () => import("@/views/project/index"),
meta: {
title: "开发任务",
icon: "dev",
roles: ["postgraduate"]
icon: "dev"
}
},
{
Expand All @@ -165,7 +158,7 @@ export const asyncRoutes = [
path: "index",
name: "Paper",
component: () => import("@/views/paper/index"),
meta: { title: "论文管理", icon: "paper" }
meta: { title: "论文管理", icon: "thesis" }
},
{
path: "detail/:id",
Expand Down
1 change: 0 additions & 1 deletion src/views/dashboard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default {
...mapGetters(["roles"])
},
created() {
console.log(this.roles + "lllllg");
if (!this.roles.includes("postgraduate")) {
this.currentRole = "auditorDashboard";
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/dashboard/student/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
</router-link>
</div>
<div class="item">
<router-link to="/task/index">
<router-link to="/project/index">
<el-link type="primary">迭代任务 </el-link>
</router-link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {
// });
// 获取钉钉临时授权码
getAuthCode("dingeff939842ad9207f35c2f4657eb6378f").then(res => {
getAuthCode(process.env.VUE_APP_CORPID).then(res => {
this.code.authcode = res.code; // 获取authcode
this.$store
.dispatch("user/_login", this.code)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export default {
return {};
},
components: {
assign: () => import("./components/assign"),
auditbug: () => import("./components/auditbug"),
devlist: () => import("./components/devlist")
assign: () => import("../components/assign"),
auditbug: () => import("../components/auditbug"),
devlist: () => import("../components/devlist")
},
created() {},
methods: {}
Expand Down
28 changes: 28 additions & 0 deletions src/views/project/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div>
<component :is="currentRole" />
</div>
</template>

<script>
import { mapGetters } from "vuex";
import auditordev from "./auditor";
import studentdev from "./student";
export default {
name: "Dashboard",
components: { auditordev, studentdev },
data() {
return {
currentRole: "studentdev"
};
},
computed: {
...mapGetters(["roles"])
},
created() {
if (!this.roles.includes("postgraduate")) {
this.currentRole = "auditordev";
}
}
};
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export default {
};
},
components: {
myIteration: () => import("./components/myIteration"),
userbug: () => import("./components/userbug"),
devlist: () => import("./components/devlist")
myIteration: () => import("../components/myIteration"),
userbug: () => import("../components/userbug"),
devlist: () => import("../components/devlist")
},
created() {},
methods: {}
Expand Down

0 comments on commit c48eb56

Please sign in to comment.