Browse Source

修改, 以及删除package.js里面core.js包

master
wen 2 years ago
parent
commit
247edc4eae
  1. 1
      package.json
  2. 1
      src/api/user.js
  3. 2
      src/layout/components/Sidebar/index.vue
  4. 2
      src/router/index.js
  5. 1
      src/settings.js
  6. 14
      src/styles/index.scss
  7. 3
      src/views/login/index.vue
  8. 123
      src/views/subfile/index.vue
  9. 2
      vue.config.js

1
package.json

@ -15,7 +15,6 @@
}, },
"dependencies": { "dependencies": {
"axios": "^1.1.2", "axios": "^1.1.2",
"core-js": "3.6.5",
"element-ui": "2.13.2", "element-ui": "2.13.2",
"js-cookie": "2.2.0", "js-cookie": "2.2.0",
"normalize.css": "7.0.0", "normalize.css": "7.0.0",

1
src/api/user.js

@ -16,6 +16,7 @@ export function login(datas) {
}) })
} }
// 获取目录和文件数据
export function mirlist(datas) { export function mirlist(datas) {
return request({ return request({
url: '/api/ls', url: '/api/ls',

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

@ -90,7 +90,7 @@ export default {
// } // }
newMenu = { newMenu = {
path: '/subfile?id='+item.id, path: '/subfile?id='+item.id,
meta: { title: item.directory, icon: 'dashboard' }, meta: { title: item.directory },
class: 'file', class: 'file',
children:[] children:[]
} }

2
src/router/index.js

@ -62,7 +62,7 @@ export const constantRoutes = [
path: 'filemange', path: 'filemange',
name: 'filemange', name: 'filemange',
component: () => import('@/views/filemange/index'), component: () => import('@/views/filemange/index'),
meta: { title: '文件管理', icon: 'dashboard' } meta: { title: '', icon: 'dashboard' }
}, },
{ {
path: 'subfile', path: 'subfile',

1
src/settings.js

@ -1,6 +1,7 @@
module.exports = { module.exports = {
title: '嘉洛马', title: '嘉洛马',
address: 'http://192.168.0.100',
/** /**
* @type {boolean} true | false * @type {boolean} true | false

14
src/styles/index.scss

@ -4,13 +4,13 @@
@import './element-ui.scss'; @import './element-ui.scss';
@import './sidebar.scss'; @import './sidebar.scss';
body { // body {
height: 100%; // height: 100%;
-moz-osx-font-smoothing: grayscale; // -moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased; // -webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility; // text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; // font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
} // }
label { label {
font-weight: 700; font-weight: 700;

3
src/views/login/index.vue

@ -192,6 +192,7 @@ export default {
message: error, message: error,
type: 'error' type: 'error'
}); });
this.loading = false
}); });
} else { } else {
console.log('error submit!!') console.log('error submit!!')
@ -259,7 +260,7 @@ $cursor: #3c3535;
position: relative; position: relative;
width: 520px; width: 520px;
max-width: 100%; max-width: 100%;
padding:0 35px 0 35px; padding:0 32px 0 32px;
margin: 160px auto 0 auto; margin: 160px auto 0 auto;
overflow: hidden; overflow: hidden;
} }

123
src/views/subfile/index.vue

@ -1,74 +1,89 @@
<template> <template>
<div class="app-container"> <div class="subfile_main">
<el-table <div class="block">
v-loading="listLoading" <el-date-picker
:data="list" v-model="value2"
element-loading-text="Loading" type="daterange"
border align="right"
fit unlink-panels
highlight-current-row range-separator="至"
> start-placeholder="开始日期"
<el-table-column align="center" label="ID" width="95"> end-placeholder="结束日期"
<template slot-scope="scope"> :picker-options="pickerOptions">
{{ scope.$index }} </el-date-picker>
</template> <el-button type="primary" icon="el-icon-search">搜索</el-button>
</el-table-column> </div>
<el-table-column label="标题"> <div>
<template slot-scope="scope">
{{ scope.row.title }} </div>
</template>
</el-table-column>
<el-table-column label="昵称" width="110" align="center">
<template slot-scope="scope">
<span>{{ scope.row.author }}</span>
</template>
</el-table-column>
<el-table-column label="时间" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.pageviews }}
</template>
</el-table-column>
<el-table-column class-name="status-col" label="状态" width="110" align="center">
<template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilter">{{ scope.row.status }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="created_at" label="操作" width="200">
<template slot-scope="scope">
<i class="el-icon-time" />
<span>{{ scope.row.display_time }}</span>
</template>
</el-table-column>
</el-table>
</div> </div>
</template> </template>
<script> <script>
//import { getList } from '@/api/table' import { mirlist } from '@/api/user'
import defaultSettings from '@/settings.js'
export default { export default {
watch: { watch: {
$route(to, from) { $route(to, from) {
let can = {};
const menusindex = window.location.href
if (menusindex.indexOf('?id') != -1) {
//console.log(menusindex.split('?id=')[1]);
can.id = menusindex.split('?id=')[1]
}
mirlist(can).then(response => {
let datamain = response.data;
}).catch(function (error) {
thiss.$message({
showClose: true,
message: error,
type: 'error'
});
});
} }
}, },
filters: { filters: {
statusFilter(status) {
const statusMap = {
published: 'success',
draft: 'gray',
deleted: 'danger'
}
return statusMap[status]
}
}, },
data() { data() {
return { return {
list: null, pickerOptions: {
listLoading: true shortcuts: [{
} text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
value2: ''
};
}, },
created() { created() {

2
vue.config.js

@ -41,7 +41,7 @@ module.exports = {
//before: require('./mock/mock-server.js'), //before: require('./mock/mock-server.js'),
proxy: { proxy: {
'/api': { '/api': {
target: 'https://dev.filesite.io',// 你要请求的后端接口ip+port target: defaultSettings.address,// 你要请求的后端接口ip+port
changeOrigin: true,// 允许跨域,在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题 changeOrigin: true,// 允许跨域,在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题
ws: true,// 开启webSocket ws: true,// 开启webSocket
pathRewrite: { pathRewrite: {

Loading…
Cancel
Save