Browse Source

优化,修改

master
wen 2 years ago
parent
commit
92c51d824f
  1. 4
      public/index.html
  2. 32
      public/loadhead.css
  3. 14
      src/layout/components/Sidebar/index.vue
  4. 7
      src/layout/components/Sidebar/leftMenusData.js
  5. 22
      src/router/index.js
  6. 56
      src/views/homepage/index.vue

4
public/index.html

@ -5,7 +5,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>jialuoma2.ico"> <link rel="icon" href="<%= BASE_URL %>jialuoma2.ico">
<title><%= webpackConfig.name %></title> <!-- <title><%= webpackConfig.name %></title> -->
<title>嘉洛马</title>
<link rel="stylesheet" type="text/css" href="loadhead.css">
</head> </head>
<body> <body>
<noscript> <noscript>

32
public/loadhead.css

@ -0,0 +1,32 @@
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,select,p,blockquote,th,td{margin:0;padding:0;font-weight:inherit;}
.clearfix{zoom:1;}
.clearfix:after{content:'.';display:block;visibility:hidden;clear:both;overflow:hidden;height:0px;}
body{font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;margin:0 auto;font-size:14px;min-height:100%;}
ul,li{list-style:none;margin:0;padding:0;}
a,img,span{display:inline-block;max-width:100%;}
a{color:#464c5c;text-decoration:none;}
.img-responsive{max-width:100%;display:block;}
.elementBlock{display:block !important;}
.elementNone{display:none !important;}
.elementhidden{visibility:hidden !important;}
.verMiddle{vertical-align:middle !important;}
.vercenter{text-align:center !important;}
.verbold{font-weight:bold !important;}
.qcmargin{margin:0 !important;}
.qcpadding{padding:0 !important;}
.qcbdbt{border-bottom:0 !important;}
.qcbdtop{border-top:0 !important;}
.qcbdlt{border-left:0 !important;}
.qcbdrt{border-right:0 !important;}
.bjcolor{background-color:#FFF !important;}
.minheight{min-height:537px;}
a:hover{text-decoration:none;}
a:active{text-decoration:none;}
a:visited{text-decoration:none;}
*{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

14
src/layout/components/Sidebar/index.vue

@ -29,7 +29,6 @@ import menusdata from './leftMenusData.js'
import { mirlist } from '@/api/user' import { mirlist } from '@/api/user'
//console.log(menusdata); //console.log(menusdata);
var dfdg = 10;
export default { export default {
components: { SidebarItem, Logo }, components: { SidebarItem, Logo },
created: function () { created: function () {
@ -55,8 +54,9 @@ export default {
const menusindex = window.location.href const menusindex = window.location.href
// path // path
let getcan = menusindex.split('?id'); //let getcan = menusindex.split('?id');
if (getcan[1]) { //console.log(menusindex.indexOf('?id'));
if (menusindex.indexOf('?id') != -1) {
//console.log(menusindex.split('/#')); //console.log(menusindex.split('/#'));
return menusindex.split('/#')[1] return menusindex.split('/#')[1]
} }
@ -88,8 +88,8 @@ export default {
// //menusdata[0].children = [] // //menusdata[0].children = []
// } // }
newMenu = { newMenu = {
path: '/filemange/subfile?id='+item.id, path: '/subfile?id='+item.id,
meta: { title: item.directory, activeMenu:'subfile?id='+item.id, icon: 'dashboard' }, meta: { title: item.directory, icon: 'dashboard' },
children:[] children:[]
} }
if (item.directories && item.directories.length > 0) { if (item.directories && item.directories.length > 0) {
@ -105,11 +105,9 @@ export default {
let thiss = this; let thiss = this;
//console.log(this.$route); //console.log(this.$route);
// console.log(this.$store); // console.log(this.$store);
mirlist().then(response => { mirlist().then(response => {
let datamain = response.data; let datamain = response.data;
this.routes[1].children = this.SplicingMenuTree(datamain.data.menus);
this.routes[0].children = this.SplicingMenuTree(datamain.data.menus);
}).catch(function (error) { }).catch(function (error) {
thiss.$message({ thiss.$message({

7
src/layout/components/Sidebar/leftMenusData.js

@ -27,6 +27,13 @@ var menusdata = [
// } // }
// ] // ]
// }, // },
{
id: '0',
path: '/homepage',
meta: { title: '首页', icon: 'dashboard' },
children:[]
},
{ {
id: '0', id: '0',
path: '/filemange', path: '/filemange',

22
src/router/index.js

@ -44,16 +44,25 @@ export const constantRoutes = [
hidden: true hidden: true
}, },
{ {
path: '/filemange', path: '/',
component: Layout,
children: [{
path: 'homepage',
name: 'Homepage',
component: () => import('@/views/homepage/index'),
meta: { title: '首页', icon: 'dashboard' }
}]
},
{
path: '/',
component: Layout, component: Layout,
name: 'filemange',
meta: { title: '文件管理', icon: 'el-icon-s-help' }, meta: { title: '文件管理', icon: 'el-icon-s-help' },
children: [ children: [
{ {
path: 'createDirectory', path: 'filemange',
name: 'CreateDirectory', name: 'filemange',
component: () => import('@/views/filemange/index'), component: () => import('@/views/filemange/index'),
meta: { title: '创建目录', icon: 'dashboard' } meta: { title: '文件管理', icon: 'dashboard' }
}, },
{ {
path: 'subfile', path: 'subfile',
@ -64,7 +73,7 @@ export const constantRoutes = [
] ]
}, },
{ {
path: '', path: '/',
component: Layout, component: Layout,
children: [{ children: [{
path: 'usermange', path: 'usermange',
@ -86,7 +95,6 @@ export const constantRoutes = [
{ {
path: '/systme', path: '/systme',
component: Layout, component: Layout,
redirect: '/systme/changepass',
name: 'systme', name: 'systme',
meta: { title: '系统管理', icon: 'el-icon-s-help' }, meta: { title: '系统管理', icon: 'el-icon-s-help' },
children: [ children: [

56
src/views/homepage/index.vue

@ -0,0 +1,56 @@
<template>
<div class="filemange_container">
<div class="mkdirm">
<el-button type="primary" @click="dirbox = true">创建目录</el-button>
</div>
<el-dialog title="创建目录" :visible.sync="dirbox">
<el-form :model="form">
<el-form-item label="目录名称" :label-width="formLabelWidth">
<el-input v-model="form.name" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="父级目录" :label-width="formLabelWidth">
<el-select v-model="form.region" placeholder="请选择父级目录">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dirbox = false"> </el-button>
<el-button type="primary" @click="dirbox = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
//import { mapGetters } from 'vuex'
export default {
data() {
return {
dirbox: false,
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
},
formLabelWidth: '120px'
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.mkdirm{text-align:center;margin:20% 0 0 0;}
</style>
Loading…
Cancel
Save