Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
02c7ed03
Commit
02c7ed03
authored
May 14, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input
parent
0c62226b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
38 deletions
+40
-38
inputFile.vue
components/page/inputFile.vue
+39
-37
edit.vue
pages/technology/details/routingqccard/edit.vue
+1
-1
No files found.
components/page/inputFile.vue
View file @
02c7ed03
<!--一次只能上传一个文件 -->
<
template
>
<div>
<div>
<Input
v-model=
"newName"
style=
"height:30px;width:240px;float:left;"
placeholder=
"请选择上传文件"
disabled
/>
<Upload
v-model=
"name"
:action=
"postUrl"
:on-success=
"uploadSuccess"
:on-error=
"uploadError"
:on-remove=
"removeFile"
:format=
"formatList"
:max-size=
"maxSize"
:on-exceeded-size=
"onExceededSize"
:on-format-error=
"onFormatError"
:show-upload-list=
"false"
:files=
"files"
:on-progress=
"onProgress"
style=
"width:120px;float:left"
>
<Button
icon=
"ios-cloud-upload-outline"
>
上传文件
</Button>
</Upload>
<a
v-show=
"newName.length>2&&showButton"
:href=
"fileUrlPath"
@
click=
"downFile(newPath)"
target=
"_blank"
style=
"float:left"
>
查看
</a>
</div>
<Input
v-model=
"newName"
style=
"height:28px;width:400px;float:left;margin-top:2px;"
>
<Button
slot=
"prepend"
icon=
"ios-eye"
title=
"查看"
@
click=
"downFile(newName)"
></Button>
</Input>
<Upload
v-model=
"name"
:action=
"postUrl"
:on-success=
"uploadSuccess"
:on-error=
"uploadError"
:on-remove=
"removeFile"
:format=
"formatList"
:max-size=
"maxSize"
:on-exceeded-size=
"onExceededSize"
:on-format-error=
"onFormatError"
:show-upload-list=
"false"
:files=
"files"
:on-progress=
"onProgress"
>
<Button
icon=
"ios-cloud-upload-outline"
>
上传文件
</Button>
</Upload>
<Progress
:percent=
"per"
:stroke-width=
"5"
v-show=
"vshowPro"
/>
</div>
</
template
>
...
...
@@ -52,7 +44,7 @@ export default {
this
.
parms
,
formatList
:
[
"png"
,
"jpg"
,
"gif"
],
newName
:
""
,
newPath
:
''
,
newPath
:
""
,
per
:
0
,
vshowPro
:
false
};
...
...
@@ -72,9 +64,9 @@ export default {
type
:
String
,
default
:
""
},
showButton
:{
type
:
Boolean
,
default
:
true
,
showButton
:
{
type
:
Boolean
,
default
:
true
}
},
methods
:
{
...
...
@@ -96,8 +88,8 @@ export default {
objImag
.
fileName
=
file
.
response
.
data
.
fileName
;
objImag
.
filePath
=
file
.
response
.
data
.
downloadPath
;
filesList
.
push
(
objImag
);
this
.
newName
=
file
.
response
.
data
.
fileName
;
this
.
newPath
=
file
.
response
.
data
.
downloadPath
this
.
newName
=
file
.
response
.
data
.
downloadPath
;
this
.
newPath
=
file
.
response
.
data
.
downloadPath
;
this
.
$emit
(
"on-change"
,
JSON
.
stringify
(
filesList
));
this
.
per
=
100
;
setTimeout
(()
=>
{
...
...
@@ -146,9 +138,20 @@ export default {
}
return
this
.
formatList
;
},
downFile
(
path
)
{
this
.
fileUrlPath
=
this
.
downUrl
+
path
;
},
downFile
(
path
)
{
let
truePath
=
path
.
trim
();
if
(
truePath
.
length
>
2
)
{
if
(
truePath
.
substring
(
0
,
7
).
toLowerCase
()
==
"http://"
||
truePath
.
substring
(
0
,
8
).
toLowerCase
()
==
"https://"
)
{
window
.
open
(
truePath
,
"_blank"
);
}
else
{
this
.
fileUrlPath
=
this
.
downUrl
+
path
;
window
.
open
(
this
.
fileUrlPath
,
"_blank"
);
}
}
}
},
mounted
()
{
this
.
formatL
();
...
...
@@ -166,5 +169,4 @@ export default {
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/technology/details/routingqccard/edit.vue
View file @
02c7ed03
...
...
@@ -126,7 +126,7 @@ export default {
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$refs
.
inputfile
.
newName
=
this
.
entity
.
qualityTemplate
Name
;
this
.
$refs
.
inputfile
.
newName
=
this
.
entity
.
qualityTemplate
;
this
.
$refs
.
inputfile
.
newPath
=
this
.
entity
.
qualityTemplate
;
});
...
...
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