Skip to content

Commit

Permalink
优化系统设置路由菜单
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Feb 9, 2022
1 parent 848359b commit 124666c
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 41 deletions.
1 change: 0 additions & 1 deletion resources/assets/js/pages/manage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ export default {
{path: 'password', name: '密码设置'},
{path: 'clearCache', name: '清除缓存'},
{path: 'system', name: '系统设置', divided: true},
{path: 'preference', name: '偏好设置'},
{path: 'workReport', name: '工作报告', divided: true},
{path: 'allUser', name: '团队管理'},
{path: 'allProject', name: '所有项目'},
Expand Down
1 change: 0 additions & 1 deletion resources/assets/js/pages/manage/setting/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export default {
if (this.userIsAdmin) {
menu.push(...[
{path: 'system', name: '系统设置', divided: true},
{path: 'preference', name: '偏好设置'},
])
}
return menu;
Expand Down
25 changes: 0 additions & 25 deletions resources/assets/js/pages/manage/setting/preference/index.vue

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="preference-project-create">
<div class="setting-system-item">
<Form ref="formDatum" label-width="auto" @submit.native.prevent>
<Row class="setting-template">
<Col span="8">{{$L('名称')}}</Col>
<Col span="16">{{$L('列表模板')}}</Col>
<Col span="16">{{$L('项目模板')}}</Col>
</Row>
<Row v-for="(item, key) in formDatum" :key="key" class="setting-template">
<Col span="8">
Expand Down Expand Up @@ -31,7 +31,7 @@
import {mapState} from "vuex";
export default {
name: 'PreferenceColumnTemplate',
name: 'SystemColumnTemplate',
data() {
return {
loadIng: 0,
Expand Down
29 changes: 29 additions & 0 deletions resources/assets/js/pages/manage/setting/system/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<div class="setting-item submit">
<Tabs v-model="tabAction">
<TabPane :label="$L('系统设置')" name="setting">
<SystemSetting/>
</TabPane>
<TabPane :label="$L('任务优先级')" name="taskPriority">
<SystemTaskPriority/>
</TabPane>
<TabPane :label="$L('项目模板')" name="columnTemplate">
<SystemColumnTemplate/>
</TabPane>
</Tabs>
</div>
</template>

<script>
import SystemSetting from "./setting";
import SystemTaskPriority from "./taskPriority";
import SystemColumnTemplate from "./columnTemplate";
export default {
components: {SystemColumnTemplate, SystemTaskPriority, SystemSetting},
data() {
return {
tabAction: 'setting',
}
},
}
</script>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="setting-item submit">
<div class="setting-system-item">
<Form ref="formDatum" :model="formDatum" label-width="auto" @submit.native.prevent>
<FormItem :label="$L('允许注册')" prop="reg">
<RadioGroup v-model="formDatum.reg">
Expand Down Expand Up @@ -69,6 +69,8 @@

<script>
export default {
name: 'SystemSetting',
data() {
return {
loadIng: 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="preference-task-priority">
<div class="setting-system-item">
<Form ref="formDatum" label-width="auto" @submit.native.prevent>
<Row class="setting-color">
<Col span="12">{{$L('名称')}}</Col>
Expand Down Expand Up @@ -47,7 +47,7 @@
import {mapState} from "vuex";
export default {
name: 'PreferenceTaskPriority',
name: 'SystemTaskPriority',
data() {
return {
loadIng: 0,
Expand Down
7 changes: 1 addition & 6 deletions resources/assets/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ export default [
{
name: 'manage-setting-system',
path: 'system',
component: () => import('./pages/manage/setting/system.vue'),
},
{
name: 'manage-setting-preference',
path: 'preference',
component: () => import('./pages/manage/setting/preference/index.vue'),
component: () => import('./pages/manage/setting/system/index.vue'),
},
]
},
Expand Down
3 changes: 1 addition & 2 deletions resources/assets/sass/pages/page-setting.scss
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@
height: 0;
.ivu-tabs-tabpane {
position: relative;
.preference-task-priority,
.preference-project-create {
.setting-system-item {
position: absolute;
top: 0;
left: 0;
Expand Down

0 comments on commit 124666c

Please sign in to comment.