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

1
src/api/user.js

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

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

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

2
src/router/index.js

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

1
src/settings.js

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

14
src/styles/index.scss

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

3
src/views/login/index.vue

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

123
src/views/subfile/index.vue

@ -1,74 +1,89 @@ @@ -1,74 +1,89 @@
<template>
<div class="app-container">
<el-table
v-loading="listLoading"
:data="list"
element-loading-text="Loading"
border
fit
highlight-current-row
>
<el-table-column align="center" label="ID" width="95">
<template slot-scope="scope">
{{ scope.$index }}
</template>
</el-table-column>
<el-table-column label="标题">
<template slot-scope="scope">
{{ scope.row.title }}
</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 class="subfile_main">
<div class="block">
<el-date-picker
v-model="value2"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions">
</el-date-picker>
<el-button type="primary" icon="el-icon-search">搜索</el-button>
</div>
<div>
</div>
</div>
</template>
<script>
//import { getList } from '@/api/table'
import { mirlist } from '@/api/user'
import defaultSettings from '@/settings.js'
export default {
watch: {
$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: {
statusFilter(status) {
const statusMap = {
published: 'success',
draft: 'gray',
deleted: 'danger'
}
return statusMap[status]
}
},
data() {
return {
list: null,
listLoading: true
}
pickerOptions: {
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() {

2
vue.config.js

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

Loading…
Cancel
Save