Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
84f986b4
Commit
84f986b4
authored
Oct 11, 2020
by
Mac
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huangyuanyuan/electricitysheep
parents
bd7585c1
b2ea78bd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
39 deletions
+41
-39
materialMan.vue
src/components/CommodityMan/materialMan.vue
+41
-39
No files found.
src/components/CommodityMan/materialMan.vue
View file @
84f986b4
...
...
@@ -17,7 +17,7 @@
<div
style=
"margin-right: 15px;width: auto;-webkit-box-flex: 0;flex-shrink: 0;flex-grow: 0;"
>
<el-button
@
click=
"addGroup"
style=
"margin-bottom: 12px;"
type=
"primary"
size=
"small"
>
添加分组
</el-button>
<div
style=
"border: 1px solid rgb(227, 227, 227);width:250px"
>
<div
class=
"el-scrollbar"
style=
"width: 100%;height:670px"
>
<div
class=
"el-scrollbar"
style=
"width: 100%;height:670px
;
"
>
<div
class=
"el-scrollbar__wrap"
style=
"margin-bottom: -8px; margin-right: -8px;"
>
<div
class=
"el-scrollbar__view"
>
<li
:class=
"PageMsg.GroupId==0?'selectActive' : ''"
@
click=
"SelectGroup(0)"
class=
"el-menu-item"
...
...
@@ -76,16 +76,16 @@
</el-dropdown>
</div>
</div>
<div
style=
"border: 1px solid rgb(227, 227, 227);height:674px"
>
<div
style=
"border: 1px solid rgb(227, 227, 227);height:674px
;overflow: scroll;
"
>
<div
class=
"basefix app-attachment-list"
>
<template
v-if=
"PageMsg.Type==1"
>
<div
class=
"material-item material-upload"
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 140px; height: 140px;"
>
<el-upload
class=
"avatar-uploader"
action=
""
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
:http-request=
"UploadImage"
multiple
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 140px; height: 140px;"
>
<i
class=
"el-icon-upload"
></i>
</el-upload>
</div>
</el-upload>
</div>
<el-tooltip
v-for=
"(item,index) in PageList"
:key=
"index"
class=
"item"
effect=
"dark"
:content=
"item.Name"
placement=
"top-start"
>
...
...
@@ -106,13 +106,13 @@
</
template
>
<
template
v-if=
"PageMsg.Type==2"
>
<div
class=
"material-item material-upload"
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 140px; height: 140px;"
>
<el-upload
class=
"avatar-uploader"
action=
""
:before-upload=
"beforeAvatarUpload"
accept=
"video/mp4,video/ogg,video/webm"
:show-file-list=
"false"
:http-request=
"UploadVideo"
multiple
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 140px; height: 140px;"
>
<i
class=
"el-icon-upload"
></i>
</el-upload>
</div>
</el-upload>
</div>
<el-tooltip
v-for=
"(item,index) in PageList"
:key=
"index"
class=
"item"
effect=
"dark"
:content=
"item.Name"
placement=
"top-start"
>
...
...
@@ -136,13 +136,12 @@
<
template
v-if=
"PageMsg.Type==3"
>
<div
class=
"material-item material-upload"
>
<el-upload
class=
"avatar-uploader"
action=
""
accept=
".pdf,.PDF,.ppt,.PPT,.doc,.docx"
:show-file-list=
"false"
:http-request=
"UploadpdfFile"
multiple
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width: 140px; height: 140px;"
>
<el-upload
class=
"avatar-uploader"
action=
""
accept=
".pdf,.PDF,.ppt,.PPT,.doc,.docx"
:show-file-list=
"false"
:http-request=
"UploadpdfFile"
multiple
>
<i
class=
"el-icon-upload"
></i>
</el-upload>
</div>
</el-upload>
</div>
<el-tooltip
v-for=
"(item,index) in PageList"
:key=
"index"
class=
"item"
effect=
"dark"
:content=
"item.Name"
placement=
"top-start"
>
...
...
@@ -515,10 +514,10 @@
})
},
//上传附件doc docx pdf ppt pptx
UploadpdfFile
(
file
){
UploadpdfFile
(
file
)
{
var
that
=
this
;
var
flieType
=
file
.
file
.
name
.
split
(
'.'
)[
1
];
if
(
flieType
!=
'doc'
&&
flieType
!=
'docx'
&&
flieType
!=
'pdf'
&&
flieType
!=
'ppt'
&&
flieType
!=
'pptx'
)
{
var
flieType
=
file
.
file
.
name
.
split
(
'.'
)[
1
];
if
(
flieType
!=
'doc'
&&
flieType
!=
'docx'
&&
flieType
!=
'pdf'
&&
flieType
!=
'ppt'
&&
flieType
!=
'pptx'
)
{
this
.
Error
(
'请上传word ppt pdf文件'
);
return
;
}
...
...
@@ -634,7 +633,7 @@
}
},
GroupsubmitForm
(
formName
)
{
console
.
log
(
this
.
addGroupMsg
,
'this.addGroupMsg'
);
console
.
log
(
this
.
addGroupMsg
,
'this.addGroupMsg'
);
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
apipost
(
'/api/product/SetMaterialGroupInfo'
,
this
.
addGroupMsg
,
...
...
@@ -691,19 +690,19 @@
this
.
GetPageList
();
},
//拆分后缀
getFileType
(
item
){
var
num
=
0
;
if
(
item
)
{
getFileType
(
item
)
{
var
num
=
0
;
if
(
item
)
{
var
name
=
item
.
split
(
'.'
)[
1
]
}
if
(
name
==
'doc'
||
name
==
'docx'
)
{
num
=
1
if
(
name
==
'doc'
||
name
==
'docx'
)
{
num
=
1
}
if
(
name
==
'ppt'
||
name
==
'pptx'
)
{
num
=
2
if
(
name
==
'ppt'
||
name
==
'pptx'
)
{
num
=
2
}
if
(
name
==
'pdf'
)
{
num
=
3
if
(
name
==
'pdf'
)
{
num
=
3
}
return
num
;
}
...
...
@@ -816,15 +815,18 @@
border-left
:
none
;
padding
:
0
15px
;
}
.mater_FileType
{
width
:
140px
;
height
:
140px
;
.mater_FileType
{
width
:
140px
;
height
:
140px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.mater_FileType
img
{
width
:
80%
;
height
:
80%
;
.mater_FileType
img
{
width
:
80%
;
height
:
80%
;
}
</
style
>
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