Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
中汽研标准应用数据库
car-database-web
Commits
9d3dbae2
Commit
9d3dbae2
authored
Sep 06, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 文件上传问题
parent
bdd49ea6
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
141 additions
and
73 deletions
+141
-73
home.scss
src/assets/styles/home.scss
+32
-3
checkInputUpload.vue
src/components/CheckCoiumns/checkInputUpload.vue
+17
-7
checkboxUpload.vue
src/components/CheckCoiumns/checkboxUpload.vue
+21
-17
inputUpload.vue
src/components/CheckCoiumns/inputUpload.vue
+22
-11
radioUpload.vue
src/components/CheckCoiumns/radioUpload.vue
+18
-8
pieChart.vue
src/components/homeComponents/pieChart.vue
+4
-4
planChart2.vue
src/components/homeComponents/planChart2.vue
+13
-14
index.vue
src/views/index.vue
+7
-6
login.vue
src/views/login.vue
+2
-2
index.vue
src/views/setting/template/index.vue
+5
-1
No files found.
src/assets/styles/home.scss
View file @
9d3dbae2
...
...
@@ -44,8 +44,7 @@
margin-top
:
10%
;
width
:
40%
;
height
:
100%
;
background
:
url('../images/home/huxian.png')
no-repeat
;
background-size
:
100%
75%
;
position
:
relative
;
.center-item-1
{
...
...
@@ -249,11 +248,34 @@
padding
:
5px
20px
;
}
}
.center-back
{
background
:
url('../images/home/huxian.png')
no-repeat
;
background-size
:
100%
100%
;
position
:
absolute
;
left
:
-35px
;
top
:
-30px
;
width
:
821px
;
height
:
673px
;
animation
:
rotate
5s
linear
infinite
;
@keyframes
rotate
{
0
%
{
transform
:
scale
(
1
.1
);
}
50
%
{
transform
:
scale
(
0
.9
);
}
100
%
{
transform
:
scale
(
1
.1
);
}
}
}
.show-card
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-start
;
height
:
6
rem
;
height
:
8
rem
;
&
-img
{
width
:
100px
;
height
:
100px
;
...
...
@@ -284,6 +306,13 @@
margin
:
0
1%
;
padding
:
0
10px
;
cursor
:
pointer
;
&
:hover
{
animation
:
jump
2s
linear
infinite
;
@keyframes
jump
{
0
%
,
100
%
{
transform
:
translateY
(
20px
);
}
50
%
{
transform
:
translateY
(
-20px
);
}
}
}
&
-img
{
width
:
40px
;
height
:
40px
;
...
...
src/components/CheckCoiumns/checkInputUpload.vue
View file @
9d3dbae2
...
...
@@ -27,6 +27,7 @@
</div>
<el-upload
class=
"upload-demo"
ref=
"fileUpload"
:action=
"uploadImgUrl"
:on-preview=
"handlePreview"
v-model=
"model.file"
...
...
@@ -36,11 +37,16 @@
:limit=
"1"
:on-success=
"handleSuccess"
:on-exceed=
"handleExceed"
:headers=
"headers"
>
<el-button
size=
"small"
:disabled=
"status"
type=
"primary"
>
上传文件
</el-button
>
<div
slot=
"tip"
class=
"el-upload__tip"
></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<div
v-if=
"model.path"
>
<el-link
:href=
"model.path"
>
{{
model
.
name
}}
</el-link>
</div>
</div>
</el-upload>
</div>
</
template
>
...
...
@@ -60,7 +66,6 @@ export default {
default
:
false
},
defaultValue
:
{
default
:
''
}
},
...
...
@@ -70,7 +75,11 @@ export default {
value
:
''
,
list
:
[],
file
:
''
,
path
:
''
path
:
''
,
name
:
''
},
headers
:
{
Authorization
:
'Bearer '
+
this
.
$store
.
getters
.
token
},
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
'/common/uploadMinio'
// 上传的图片服务器地址
}
...
...
@@ -92,7 +101,7 @@ export default {
mounted
()
{
if
(
this
.
defaultValue
)
{
this
.
model
=
this
.
defaultValue
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
this
.
result
})
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
this
.
result
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:
this
.
model
})
}
else
{
this
.
reset
()
...
...
@@ -127,12 +136,13 @@ export default {
console
.
log
(
file
)
},
handleSuccess
(
res
,
file
)
{
if
(
res
===
200
)
{
this
.
model
.
path
=
res
.
url
if
(
res
.
code
===
200
)
{
this
.
model
.
path
=
process
.
env
.
VUE_APP_IMAGE_API
+
res
.
url
this
.
model
.
name
=
res
.
originalFilename
this
.
$refs
.
fileUpload
.
clearFiles
()
this
.
$message
.
success
(
'上传成功'
)
}
else
{
this
.
$message
.
error
(
'error'
)
console
.
log
(
res
,
file
)
}
},
handleExceed
(
files
,
fileList
)
{
...
...
src/components/CheckCoiumns/checkboxUpload.vue
View file @
9d3dbae2
<
template
>
<div
class=
"checkbox-upload"
>
<el-checkbox-group
:disabled=
"status"
v-model=
"model.value"
@
change=
"input"
>
<el-checkbox
v-for=
"(i, k) in items.options"
:label=
"i.id"
:key=
"k"
>
{{
i
.
object
}}
<el-checkbox
v-for=
"(i, k) in items.options"
:label=
"i.id"
:key=
"k"
>
{{
i
.
object
}}
</el-checkbox>
</el-checkbox-group>
<el-upload
...
...
@@ -18,13 +14,19 @@
:before-remove=
"beforeRemove"
:show-file-list=
"false"
:limit=
"1"
ref=
"fileUpload"
:on-success=
"handleSuccess"
:on-exceed=
"handleExceed"
:headers=
"headers"
>
<el-button
size=
"small"
:disabled=
"status"
type=
"primary"
>
上传文件
</el-button
>
<div
slot=
"tip"
class=
"el-upload__tip"
></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<div
v-if=
"model.path"
>
<el-link
:href=
"model.path"
>
{{
model
.
name
}}
</el-link>
</div>
</div>
</el-upload>
</div>
</
template
>
...
...
@@ -44,7 +46,6 @@ export default {
default
:
false
},
defaultValue
:
{
default
:
''
}
},
...
...
@@ -53,7 +54,11 @@ export default {
model
:
{
value
:
[],
file
:
''
,
path
:
''
path
:
''
,
name
:
''
},
headers
:
{
Authorization
:
'Bearer '
+
this
.
$store
.
getters
.
token
},
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
'/common/uploadMinio'
// 上传的图片服务器地址
}
...
...
@@ -71,7 +76,7 @@ export default {
mounted
()
{
if
(
this
.
defaultValue
)
{
this
.
model
=
this
.
defaultValue
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
this
.
value
})
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
this
.
value
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:
this
.
result
})
}
else
{
this
.
reset
()
...
...
@@ -81,9 +86,6 @@ export default {
input
()
{
let
arr
=
[]
this
.
items
.
options
.
map
(
i
=>
{
console
.
log
(
this
.
model
.
value
)
console
.
log
(
i
)
if
(
this
.
model
.
value
.
includes
(
i
.
id
))
{
arr
.
push
(
i
.
useCaseNo
)
}
...
...
@@ -99,7 +101,8 @@ export default {
this
.
model
=
{
value
:
[],
file
:
''
,
path
:
''
path
:
''
,
name
:
''
}
},
setDefaultValue
(
val
)
{
...
...
@@ -112,12 +115,13 @@ export default {
console
.
log
(
file
)
},
handleSuccess
(
res
,
file
)
{
if
(
res
===
200
)
{
this
.
model
.
path
=
res
.
url
if
(
res
.
code
===
200
)
{
this
.
model
.
path
=
process
.
env
.
VUE_APP_IMAGE_API
+
res
.
url
this
.
model
.
name
=
res
.
originalFilename
this
.
$refs
.
fileUpload
.
clearFiles
()
this
.
$message
.
success
(
'上传成功'
)
}
else
{
this
.
$message
.
error
(
'error'
)
console
.
log
(
res
,
file
)
}
},
handleExceed
(
files
,
fileList
)
{
...
...
src/components/CheckCoiumns/inputUpload.vue
View file @
9d3dbae2
...
...
@@ -14,17 +14,23 @@
:action=
"uploadImgUrl"
:on-preview=
"handlePreview"
v-model=
"model.file"
ref=
"fileUpload"
:on-remove=
"handleRemove"
:before-remove=
"beforeRemove"
:show-file-list=
"false"
:limit=
"1"
:on-success=
"handleSuccess"
:on-exceed=
"handleExceed"
:headers=
"headers"
>
<el-button
size=
"small"
:disabled=
"status"
type=
"primary"
>
上传文件
</el-button
>
<div
slot=
"tip"
class=
"el-upload__tip"
></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<div
v-if=
"model.path"
>
<el-link
:href=
"model.path"
>
{{
model
.
name
}}
</el-link>
</div>
</div>
</el-upload>
</div>
</
template
>
...
...
@@ -44,7 +50,6 @@ export default {
default
:
false
},
defaultValue
:
{
default
:
''
}
},
...
...
@@ -53,7 +58,11 @@ export default {
model
:
{
value
:
''
,
file
:
''
,
path
:
''
path
:
''
,
name
:
''
},
headers
:
{
Authorization
:
'Bearer '
+
this
.
$store
.
getters
.
token
},
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
'/common/uploadMinio'
// 上传的图片服务器地址
}
...
...
@@ -65,13 +74,13 @@ export default {
status
(
newVal
)
{
this
.
reset
()
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
[]
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:{}
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:
{}
})
}
},
mounted
()
{
if
(
this
.
defaultValue
)
{
this
.
model
=
this
.
defaultValue
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
this
.
result
})
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
this
.
result
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:
this
.
model
})
}
else
{
this
.
reset
()
...
...
@@ -85,8 +94,8 @@ export default {
arr
.
push
(
i
.
useCaseNo
)
})
}
console
.
log
(
arr
)
;
console
.
log
(
arr
)
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
arr
.
join
(
','
)
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:
this
.
model
})
},
...
...
@@ -94,7 +103,8 @@ export default {
this
.
model
=
{
value
:
''
,
file
:
''
,
path
:
''
path
:
''
,
name
:
''
}
},
setDefaultValue
(
val
)
{
...
...
@@ -107,12 +117,13 @@ export default {
console
.
log
(
file
)
},
handleSuccess
(
res
,
file
)
{
if
(
res
===
200
)
{
this
.
model
.
path
=
res
.
url
if
(
res
.
code
===
200
)
{
this
.
model
.
path
=
process
.
env
.
VUE_APP_IMAGE_API
+
res
.
url
this
.
model
.
name
=
res
.
originalFilename
this
.
$refs
.
fileUpload
.
clearFiles
()
this
.
$message
.
success
(
'上传成功'
)
}
else
{
this
.
$message
.
error
(
'error'
)
console
.
log
(
res
,
file
)
}
},
handleExceed
(
files
,
fileList
)
{
...
...
src/components/CheckCoiumns/radioUpload.vue
View file @
9d3dbae2
...
...
@@ -7,6 +7,7 @@
</el-radio-group>
<el-upload
class=
"upload-demo"
ref=
"fileUpload"
:action=
"uploadImgUrl"
:on-preview=
"handlePreview"
v-model=
"model.file"
...
...
@@ -16,11 +17,16 @@
:limit=
"1"
:on-success=
"handleSuccess"
:on-exceed=
"handleExceed"
:headers=
"headers"
>
<el-button
size=
"small"
:disabled=
"status"
type=
"primary"
>
上传文件
</el-button
>
<div
slot=
"tip"
class=
"el-upload__tip"
></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<div
v-if=
"model.path"
>
<el-link
:href=
"model.path"
>
{{
model
.
name
}}
</el-link>
</div>
</div>
</el-upload>
</div>
</
template
>
...
...
@@ -40,7 +46,6 @@ export default {
default
:
false
},
defaultValue
:
{
default
:
''
}
},
...
...
@@ -49,9 +54,12 @@ export default {
model
:
{
value
:
''
,
file
:
''
,
path
:
''
path
:
''
,
name
:
''
},
headers
:
{
Authorization
:
'Bearer '
+
this
.
$store
.
getters
.
token
},
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
'/common/uploadMinio'
// 上传的图片服务器地址
}
},
...
...
@@ -89,7 +97,8 @@ export default {
this
.
model
=
{
value
:
''
,
file
:
''
,
path
:
''
path
:
''
,
name
:
''
}
},
setDefaultValue
(
val
)
{
...
...
@@ -102,12 +111,13 @@ export default {
console
.
log
(
file
)
},
handleSuccess
(
res
,
file
)
{
if
(
res
===
200
)
{
this
.
model
.
path
=
res
.
url
if
(
res
.
code
===
200
)
{
this
.
model
.
path
=
process
.
env
.
VUE_APP_IMAGE_API
+
res
.
url
this
.
model
.
name
=
res
.
originalFilename
this
.
$refs
.
fileUpload
.
clearFiles
()
this
.
$message
.
success
(
'上传成功'
)
}
else
{
this
.
$message
.
error
(
'error'
)
console
.
log
(
res
,
file
)
}
},
handleExceed
(
files
,
fileList
)
{
...
...
src/components/homeComponents/pieChart.vue
View file @
9d3dbae2
<
template
>
<div
ref=
"chart"
style=
"width: 100%; height: 10rem; display: flex; justify-content: center"
style=
"width: 100%; height: 10rem; display: flex;
margin-top: 2rem;
justify-content: center"
></div>
</
template
>
<
script
>
...
...
@@ -41,7 +41,7 @@ export default {
value
:
1
}
],
radius
:
'
6
5%'
,
radius
:
'
7
5%'
,
// 水球颜色
color
:
[
'#49d088'
,
'#38b470'
,
'#2aaf66'
],
center
:
[
'15%'
,
'55%'
],
...
...
@@ -83,7 +83,7 @@ export default {
}
],
name
:
'修改'
,
radius
:
'
6
5%'
,
radius
:
'
7
5%'
,
// 水球颜色
color
:
[
'#FE5555'
,
'#F07581'
,
'#FB5E61'
],
center
:
[
'50%'
,
'55%'
],
...
...
@@ -126,7 +126,7 @@ export default {
],
//data: [0.6, 0.5, 0.4, 0.3],
data
:
[
0
,
0
,
0
,
0
],
radius
:
'
6
5%'
,
radius
:
'
7
5%'
,
// 水球颜色
color
:
[
'#FFBF11'
,
'#F4B30E'
,
'#EACE36'
],
center
:
[
'85%'
,
'55%'
],
...
...
src/components/homeComponents/planChart2.vue
View file @
9d3dbae2
<
template
>
<div
ref=
"chart"
style=
"width: 1
0
0%; height: 100%; display: flex; justify-content: center"
style=
"width: 1
3
0%; height: 100%; display: flex; justify-content: center"
></div>
</
template
>
<
script
>
import
{
Left
}
from
'@icon-park/vue'
export
default
{
name
:
'AverageTest'
,
props
:
{
...
...
@@ -31,22 +30,22 @@ export default {
const
option
=
{
grid
:
{
top
:
'10%'
,
bottom
:
'
2
0%'
,
//也可设置left和right设置距离来控制图表的大小
left
:
'
10
%'
,
right
:
'
10
%'
bottom
:
'
3
0%'
,
//也可设置left和right设置距离来控制图表的大小
left
:
'
8
%'
,
right
:
'
2
%'
},
xAxis
:
{
data
:
[
'信息收集'
,
'环境控制'
,
'初始访问'
,
'命令
/脚本
执行'
,
'持久
化控
制'
,
'权限提升'
,
'信息
\
n
收集'
,
'环境
\
n
控制'
,
'初始
\
n
访问'
,
'命令
\
n/脚本
\
n
执行'
,
'持久
\
n化控
\
n
制'
,
'权限
\
n
提升'
,
'绕过'
,
'凭证获取'
,
'信息发现'
,
'横向移动'
'凭证
\
n
获取'
,
'信息
\
n
发现'
,
'横向
\
n
移动'
],
axisLine
:
{
show
:
false
,
//隐藏X轴轴线
...
...
src/views/index.vue
View file @
9d3dbae2
...
...
@@ -38,12 +38,13 @@
</card>
</div>
<div
class=
"home-page-center"
>
<div
class=
"center-back"
></div>
<div
v-for=
"(item, key) in center"
:key=
"key"
:class=
"'center-item-' + (key + 1)"
>
<el-image
:src=
"item.img"
alt=
""
class=
"center-item-img"
/>
<el-image
:src=
"item.img"
alt=
""
class=
"center-item-img"
/>
<div
class=
"center-item-title"
>
{{
item
.
title
}}
</div>
...
...
@@ -181,27 +182,27 @@ export default {
center
:
[
{
title
:
'数据抓包'
,
number
:
13
,
number
:
13
,
img
:
require
(
'@/assets/images/home/box1.png'
)
},
{
title
:
'访问控制'
,
number
:
9
,
number
:
9
,
img
:
require
(
'@/assets/images/home/box2.png'
)
},
{
title
:
'扫描漏洞'
,
number
:
9
,
number
:
9
,
img
:
require
(
'@/assets/images/home/box5.png'
)
},
{
title
:
'拒绝服务'
,
number
:
9
,
number
:
9
,
img
:
require
(
'@/assets/images/home/box4.png'
)
},
{
title
:
'非授权访问写入'
,
number
:
13
,
number
:
13
,
img
:
require
(
'@/assets/images/home/box3.png'
)
}
]
...
...
src/views/login.vue
View file @
9d3dbae2
...
...
@@ -91,8 +91,8 @@ export default {
logoImg
:
logoImg
,
codeUrl
:
''
,
loginForm
:
{
username
:
'
admin
'
,
password
:
'
123456@a
'
,
username
:
''
,
password
:
''
,
rememberMe
:
false
,
code
:
''
,
uuid
:
''
...
...
src/views/setting/template/index.vue
View file @
9d3dbae2
...
...
@@ -95,7 +95,11 @@
:
file
-
list
=
"fileList"
>
<
el
-
button
size
=
"small"
type
=
"primary"
>
更新模板文件
<
/el-button
>
<
div
slot
=
"tip"
class
=
"el-upload__tip"
><
/div
>
<
div
slot
=
"tip"
class
=
"el-upload__tip"
>
<
div
v
-
if
=
"model.path"
>
<
el
-
link
:
href
=
"model.path"
>
{{
model
.
name
}}
<
/el-link
>
<
/div
>
<
/div
>
<
/el-upload
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"检验结论"
prop
=
"conclusion"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment