Browse Source

修改,优化。文件夹图片换成svg,图片上传功能优化,增加上传失败处理。页面UI优化。增加刷新按钮

master
wen 2 years ago
parent
commit
a26102357b
  1. 2
      dist/index.html
  2. BIN
      dist/jialuoma2.ico
  3. 1
      dist/static/css/app.02ed341d.css
  4. 1
      dist/static/css/app.294e9f71.css
  5. 2
      dist/static/css/chunk-5840c19e.3f792b5c.css
  6. 0
      dist/static/css/chunk-e9a7ef4e.29596ba5.css
  7. BIN
      dist/static/img/file.8bc3a8bc.png
  8. 1
      dist/static/js/app.79669312.js
  9. 1
      dist/static/js/app.e3f2c470.js
  10. 1
      dist/static/js/chunk-0ca0b526.903554fe.js
  11. 1
      dist/static/js/chunk-3d88170c.50a3e894.js
  12. 1
      dist/static/js/chunk-5840c19e.f6998984.js
  13. 1
      dist/static/js/chunk-e9a7ef4e.051e2845.js
  14. 7
      src/api/user.js
  15. 2
      src/settings.js
  16. 1
      src/styles/element-ui.scss
  17. 56
      src/views/subfile/index.vue

2
dist/index.html vendored

File diff suppressed because one or more lines are too long

BIN
dist/jialuoma2.ico vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

1
dist/static/css/app.02ed341d.css vendored

File diff suppressed because one or more lines are too long

1
dist/static/css/app.294e9f71.css vendored

File diff suppressed because one or more lines are too long

2
dist/static/css/chunk-0ca0b526.36a6dc56.css → dist/static/css/chunk-5840c19e.3f792b5c.css vendored

@ -1 +1 @@ @@ -1 +1 @@
.subfile_main{padding:26px 5% 47px 5%}.subfile_main .block{margin:0 0 28px 0}.subfile_main .sou_bottom{margin-left:10px}.subfile_main .use_button{margin:15px 0 16px 0}.subfile_main .file_caozuo>button{margin:6px 10px 0 0}.subfile_main .el-table td{padding:9px 0}.subfile_main .folder_bottom a{margin:0 6px}.subfile_main .el-table__body-wrapper img{display:block;max-width:66%;max-height:286px}.subfile_main .el-drawer__body{text-align:center;padding:0 10% 20px 10%}.subfile_main .request_main{text-align:center;margin:12px 0}.subfile_main .addimgtext{line-height:25px;display:inline-block;color:#8c939d;vertical-align:middle}.subfile_main .el-upload--picture-card i{vertical-align:middle}.subfile_main .type_file_click img{width:64px;height:48px}.subfile_main .file_show a,.subfile_main .type_file_click a{display:block}
.subfile_main{padding:26px 5% 47px 5%}.subfile_main .block{margin:0 0 28px 0}.subfile_main .sou_bottom{margin-left:10px}.subfile_main .use_button{margin:15px 0 16px 0}.subfile_main .file_caozuo>button{margin:6px 10px 0 0}.subfile_main .el-table td{padding:9px 0}.subfile_main .folder_bottom a{margin:0 6px}.subfile_main .el-table__body-wrapper img{display:block;max-width:68%;max-height:286px}.subfile_main .el-drawer__body{text-align:center;padding:0 10% 20px 10%}.subfile_main .request_main{text-align:center;margin:12px 0}.subfile_main .addimgtext{line-height:25px;display:inline-block;color:#8c939d;vertical-align:middle}.subfile_main .el-upload--picture-card i{vertical-align:middle}.subfile_main .type_file_click img{width:64px;height:48px}.subfile_main .type_file_click a{display:block}.subfile_main .file_show a{display:block;min-height:156px;min-width:140px}@media(max-width:990px){.subfile_main .el-table__body-wrapper img{max-width:100%}}

0
dist/static/css/chunk-3d88170c.29596ba5.css → dist/static/css/chunk-e9a7ef4e.29596ba5.css vendored

BIN
dist/static/img/file.8bc3a8bc.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

1
dist/static/js/app.79669312.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/app.e3f2c470.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-0ca0b526.903554fe.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-3d88170c.50a3e894.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-5840c19e.f6998984.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-e9a7ef4e.051e2845.js vendored

File diff suppressed because one or more lines are too long

7
src/api/user.js

@ -12,13 +12,14 @@ export function captcha(datas) { @@ -12,13 +12,14 @@ export function captcha(datas) {
// 请求出错处理
export function requesterr(thiss, err) {
console.log(err);
// console.log(err.toJSON());
// console.log(err);
console.log(err.toJSON());
//console.log(err.toJSON());
if (err.response) {
thiss.$message({ showClose: true, message: err.response.data.err, type: 'error' });
} else if (err.request) {
thiss.$message({ showClose: true, message: err.request, type: 'error' });
thiss.$message({ showClose: true, message: err.message, type: 'error' });
} else {
thiss.$message({ showClose: true, message: err.message, type: 'error' });
}

2
src/settings.js

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
module.exports = {
title: '嘉洛马',
address: 'https://demo.jialuoma.com',
address: 'https://demo.jialuoma.cn',
/**
* @type {boolean} true | false

1
src/styles/element-ui.scss

@ -51,6 +51,7 @@ @@ -51,6 +51,7 @@
.el-submenu__title i{color:#FFF;}
.el-message{z-index:6000 !important;}
.content_main .el-drawer__wrapper{z-index:2200 !important;}
.el-message-box__wrapper{z-index:2300 !important;}
#nprogress .bar{background:#409EFF !important;}

56
src/views/subfile/index.vue

@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
<!-- 文件数据列表 -->
<el-table
:show-header="false"
empty-text="无文件数据"
:empty-text="emptyText"
:data="tableData"
style="width:100%;">
@ -175,7 +175,9 @@ @@ -175,7 +175,9 @@
<el-drawer
title="上传图片"
:visible.sync="uploadDrawer"
ref="drawerref"
:direction="direction"
:before-close="drawerClose"
size="100%"
>
@ -246,10 +248,11 @@ export default { @@ -246,10 +248,11 @@ export default {
data() {
return {
//
//imgurl:process.env.VUE_APP_IMG_URL,
imgurl:'https://demo.jialuoma.com',
imgurl:process.env.VUE_APP_IMG_URL,
//imgurl:'https://demo.jialuoma.cn',
loadingText: '文件获取中...',
emptyText: '无文件数据',
//haveRealpath: 0,
//
@ -464,7 +467,7 @@ export default { @@ -464,7 +467,7 @@ export default {
//console.log(num);
files.onProgress({percent: num}) //
}
//files.onError()
//console.log(uploaddata);
uploadrequest(uploaddata, Progress).then(response => {
let datamain = response.data;
@ -473,8 +476,10 @@ export default { @@ -473,8 +476,10 @@ export default {
//this.$message({showClose: true,message: datamain.msg, type:'success'});
files.onSuccess(); //()
this.uploadCount++; //
console.log(this.uploadCount);
console.log(this.uploadFilelist);
if (this.uploadCount == this.uploadFilelist.length) {
this.uploadDrawer = false;
this.uploadFilelist = [];
@ -488,7 +493,12 @@ export default { @@ -488,7 +493,12 @@ export default {
}
}).catch(error => {
// this.uploadCount++;
// console.log(this.uploadCount);
// console.log(this.uploadFilelist);
requesterr(this, error);
this.$message({showClose: true,message: error.message+ '/文件('+files.file.name+')上传失败,请重新上传', type:'error'});
files.onError(); //
this.uploadLoad = false;
});
//console.log(res)
@ -497,10 +507,33 @@ export default { @@ -497,10 +507,33 @@ export default {
},
//
// uploadDrawerClose(done) {
drawerClose(done) {
// this.uploadDrawer = false;
// this.uploadFilelist = [];
// },
//confirm('退')
console.log(this.uploadCount);
if (this.uploadFilelist.length == 0) {
done();
return;
}
this.$confirm('离开该页面将退出照片上传', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if(this.uploadCount > 0) {
this.getFileData();
this.loadingText = '新增上传文件中...'
}
done();
this.uploadFilelist = [];
}).catch(() => {
});
},
getFileData() {
let can = {};
const menusindex = window.location.href
@ -509,12 +542,13 @@ export default { @@ -509,12 +542,13 @@ export default {
can.id = menusindex.split('?id=')[1]
}
let thiss = this;
this.subloading = true
this.loadingText = '获取文件中...'
this.emptyText = ' ' //
this.dirdata = []
this.tableData = []
this.loadingText = '获取文件中...'
this.subloading = true
mirlist(can).then(response => {
let datamain = response.data;
let maindata = datamain.data.dirTree;
if (datamain.code == 1) {
@ -528,7 +562,7 @@ export default { @@ -528,7 +562,7 @@ export default {
this.tableData = this.forObjectData(maindata.files);
}
this.emptyText = '无文件数据'
//this.haveRealpath = maindata.realpath;
//console.log(this.haveRealpath);
this.dirform.parent = maindata.realpath; //
@ -838,7 +872,7 @@ export default { @@ -838,7 +872,7 @@ export default {
.type_file_click img{width:64px;height:48px;}
.type_file_click a{display:block;}
// .file_show{position:relative;}
.file_show a{display:block;}
.file_show a{display:block;min-height:156px;min-width:140px;}
// .link_copy{position:absolute;top:0;right:0;}
// .el-table .is-center{text-align:left;}
}

Loading…
Cancel
Save