Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_53854309
数字签名
提交
eeea7267
数
数字签名
项目概览
qq_53854309
/
数字签名
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
数
数字签名
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eeea7267
编写于
4月 24, 2023
作者:
H
hml
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
默认的
上级
ac2f0610
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
84 addition
and
41 deletion
+84
-41
src/main/java/com/hao/digitalsignature/controller/FileDealController.java
...m/hao/digitalsignature/controller/FileDealController.java
+0
-5
src/main/java/com/hao/digitalsignature/controller/FilesController.java
.../com/hao/digitalsignature/controller/FilesController.java
+10
-0
src/main/resources/static/img/01e1e51b-a508-47cd-a1ea-37dd483e97f3.png
...urces/static/img/01e1e51b-a508-47cd-a1ea-37dd483e97f3.png
+0
-0
src/main/resources/static/img/3a436c89-7bc3-4a11-9448-c07670c6b411.jpg
...urces/static/img/3a436c89-7bc3-4a11-9448-c07670c6b411.jpg
+0
-0
src/main/resources/static/img/3c673de3-36b0-4a72-aa87-f4e141a1e432.jpg
...urces/static/img/3c673de3-36b0-4a72-aa87-f4e141a1e432.jpg
+0
-0
src/main/resources/static/img/丢失.jpg
src/main/resources/static/img/丢失.jpg
+0
-0
src/main/resources/static/index.html
src/main/resources/static/index.html
+74
-36
未找到文件。
src/main/java/com/hao/digitalsignature/controller/FileDealController.java
浏览文件 @
eeea7267
...
...
@@ -69,11 +69,6 @@ public class FileDealController {
fileName
=
fileName
.
substring
(
0
,
fileName
.
length
()-
1
);
try
{
//下载图片
File
filep
=
new
File
(
""
);
String
filePath
=
filep
.
getCanonicalPath
();
...
...
src/main/java/com/hao/digitalsignature/controller/FilesController.java
浏览文件 @
eeea7267
...
...
@@ -76,6 +76,16 @@ public class FilesController {
else
return
"fail"
;
}
@PostMapping
(
value
=
"/file/verify"
)
public
String
verify
(
@RequestBody
String
file
){
String
[]
str
=
file
.
substring
(
1
,
file
.
length
()-
1
).
split
(
";"
);
// str[3];
return
"0"
;
}
@GetMapping
(
"/file/findAll"
)
public
List
<
Files
>
find
(){
return
fileMapper
.
selectList
(
null
);
...
...
src/main/resources/static/img/01e1e51b-a508-47cd-a1ea-37dd483e97f3.png
已删除
100644 → 0
浏览文件 @
ac2f0610
278.6 KB
src/main/resources/static/img/3a436c89-7bc3-4a11-9448-c07670c6b411.jpg
已删除
100644 → 0
浏览文件 @
ac2f0610
216.4 KB
src/main/resources/static/img/3c673de3-36b0-4a72-aa87-f4e141a1e432.jpg
已删除
100644 → 0
浏览文件 @
ac2f0610
139.7 KB
src/main/resources/static/img/丢失.jpg
0 → 100644
浏览文件 @
eeea7267
47.8 KB
src/main/resources/static/index.html
浏览文件 @
eeea7267
...
...
@@ -35,10 +35,10 @@
@
close=
"handleClose"
background-color=
"#545c64"
text-color=
"#fff"
active-text-color=
"#ffd04b"
>
<el-submenu
index=
"1"
>
<
template
slot=
"title"
>
<
div
slot=
"title"
>
<i
class=
"sel-icon-picture"
></i>
<span>
图片版权管理
</span>
</
template
>
</
div
>
<el-menu-item-group>
<el-menu-item
index=
"1-1"
>
图片管理
</el-menu-item>
...
...
@@ -47,10 +47,10 @@
</el-submenu>
<el-submenu
index=
"2"
>
<
template
slot=
"title"
>
<
div
slot=
"title"
>
<i
class=
"el-icon-menu"
></i>
<span>
系统管理
</span>
</
template
>
</
div
>
<el-menu-item-group>
<el-menu-item
index=
"2-1"
>
用户管理
</el-menu-item>
<el-menu-item
index=
"2-2"
>
注册
</el-menu-item>
...
...
@@ -83,9 +83,7 @@
list-type=
"picture-card"
:auto-upload=
"false"
:limit=
"1"
:on-change=
"handlePicturePreview"
:on-remove=
"handleRemove"
:on-success=
"handlePicturePreview"
accept=
"image/png, image/jpeg"
ref=
"mYupload"
:http-request=
"uploadFile"
>
...
...
@@ -126,34 +124,47 @@
</div>
<el-table
:data=
"filelist"
stripe
style=
"width: 100%"
:model=
"formData"
>
<el-table-column
prop=
"picture_name"
label=
"名称"
width=
"1
8
0"
>
<el-table-column
prop=
"picture_name"
label=
"名称"
width=
"1
2
0"
>
</el-table-column>
<el-table-column
prop=
"picture_realname"
label=
"真实名称"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"picture_type"
label=
"类型"
width=
"
18
0"
>
<el-table-column
prop=
"picture_type"
label=
"类型"
width=
"
5
0"
>
</el-table-column>
<el-table-column
prop=
"picture_user"
label=
"用户"
width=
"1
8
0"
>
<el-table-column
prop=
"picture_user"
label=
"用户"
width=
"1
0
0"
>
</el-table-column>
<el-table-column
label=
"图片"
align=
"center"
>
<
templmate
slot-scope=
"scope"
>
<img
:src=
"'./img/'+scope.row.picture_realname+'.'+scope.row.picture_type"
width=
"100px"
/>
</
templmate
>
<
div
slot-scope=
"scope"
>
<img
:src=
"'./img/'+scope.row.picture_realname+'.'+scope.row.picture_type"
width=
"100px"
onerror=
"this.src='./img/丢失.jpg;this.οnerrοr=null'"
/>
</
div
>
</el-table-column>
<el-table-column
prop=
"createtime"
label=
"创建时间"
>
</el-table-column>
<el-table-column
label=
"功能"
>
<
template
slot-scope=
"scope
"
>
<el-table-column
label=
"功能"
width=
"180"
>
<
div
slot-scope=
"scope"
style=
"display: flex;justify-content: space-around
"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleDownload(scope.row)"
>
下载
</el-button>
</template>
<el-upload
class=
"upload-demo"
action=
"#"
:on-change=
"(file) => {openFile(file, scope.row)}"
:auto-upload=
"false"
:show-file-list=
"false"
accept=
"text/plain"
:limit=
"1"
:file-list=
"verifyList"
>
<el-button
size=
"small"
type=
"primary"
>
验证
</el-button>
</el-upload>
</div>
</el-table-column>
<el-empty
description=
"描述文字"
></el-empty>
</el-table>
<div
class=
"block"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage
4
"
:page-sizes=
"[
10, 20, 3
0]"
:page-size=
"
10
"
:current-page=
"currentPage
1
"
:page-sizes=
"[
5, 1
0]"
:page-size=
"
5
"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"10"
>
</el-pagination>
...
...
@@ -173,6 +184,8 @@
return
{
par
:
''
,
filelist
:
[],
verify
:{},
verifyList
:[],
formData
:
{},
dialogFormVisible
:
false
,
dialogFormVisible4Edit
:
false
,
...
...
@@ -325,21 +338,28 @@
})
},
uploadFile
(
params
)
{
console
.
log
(
"
uploadFile
"
,
params
);
const
_file
=
params
.
file
;
// 通过 FormData 对象上传文件
var
formData
=
new
FormData
();
formData
.
append
(
"
file
"
,
_file
);
axios
.
post
(
"
/file/upload
"
,
formData
).
then
((
res
)
=>
{
console
.
log
(
res
.
data
)
this
.
formData
.
picture_realname
=
res
.
data
.
split
(
"
.
"
)[
0
]
console
.
log
(
this
.
picture_realname
)
this
.
formData
.
picture_type
=
res
.
data
.
split
(
"
.
"
)[
1
]
})
},
// uploadFile(params) {
// console.log("uploadFile", params);
// console.log("par:", this.par);
// const _file = params.file;
// // 通过 FormData 对象上传文件
// var formData = new FormData();
// formData.append("file", _file);
// console.log("data:"+this.formData)
// if(params.file.type!="text/plain") {
// axios.post("/file/upload", formData).then((res) => {
// console.log(res.data)
// this.formData.picture_realname = res.data.split(".")[0]
// console.log(this.picture_realname)
// this.formData.picture_type = res.data.split(".")[1]
//
// })
// }else{
// axios.post("/file/verify", formData).then((res) => {
// console.log(res)
// })
// }
// },
//重置表单
resetForm
()
{
this
.
formData
=
{};
...
...
@@ -352,10 +372,27 @@
handleCreate
()
{
this
.
resetForm
();
this
.
dialogFormVisible
=
true
;
},
handleVerify
()
{
this
.
resetForm
();
this
.
dialogFormVisible4Edit
=
true
;
},
openFile
(
file
,
name
)
{
//验证的文件
console
.
log
(
name
.
picture_name
)
var
reader
=
new
FileReader
();
reader
.
onload
=
function
()
{
if
(
reader
.
result
)
{
//打印文件内容
console
.
log
(
reader
.
result
);
axios
.
post
(
"
/file/verify
"
,
reader
.
result
,{
headers
:
{
'
Content-Type
'
:
'
application/json
'
,
'
data
'
:
'
JSON.stringify(Data)
'
}}).
then
((
res
)
=>
{
console
.
log
(
res
)
})
}
};
reader
.
readAsText
(
file
.
raw
);
},
handleEdit
()
{
const
_file
=
this
.
par
;
// 通过 FormData 对象上传文件
var
formData
=
new
FormData
();
...
...
@@ -366,6 +403,7 @@
console
.
log
(
this
.
picture_realname
)
this
.
formData
.
picture_type
=
res
.
data
.
split
(
"
.
"
)[
1
]
console
.
log
(
this
.
formData
.
picture_type
)
console
.
log
(
this
.
formData
)
axios
.
post
(
"
/file/save
"
,
this
.
formData
).
then
((
result
)
=>
{
console
.
log
(
result
)
console
.
log
(
this
.
formData
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录