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
b9dee450
Commit
b9dee450
authored
May 29, 2020
by
康振飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product
parents
158623c0
f665ed86
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
144 additions
and
69 deletions
+144
-69
files.vue
components/page/files.vue
+51
-45
index.vue
pages/technology/productMix/index.vue
+42
-11
detail.vue
pages/technology/productMix/product/detail.vue
+32
-4
edit.vue
pages/technology/productMix/product/edit.vue
+1
-0
index.vue
pages/technology/productMix/product/index.vue
+16
-7
index.vue
pages/technology/productMix/productTree/index.vue
+2
-2
No files found.
components/page/files.vue
View file @
b9dee450
<!--一次可上传多个文件 -->
<
template
>
<div>
<Upload
:action=
"postUrl"
:on-success=
"uploadSuccess"
:on-error=
"uploadError"
:on-remove=
"removeFile"
:format=
"formatList"
:max-size=
"maxSize"
:show-upload-list=
"false"
:on-exceeded-size=
"onExceededSize"
:on-format-error=
"onFormatError"
:multiple=
"multiple"
:style=
"style"
:on-progress=
"onProgress"
>
<div
style=
"padding: 20px 0;text-align:center"
v-if=
"cloudIco"
>
<Icon
type=
"ios-cloud-upload"
size=
"52"
style=
"color: #3399ff"
></Icon>
<p>
将文件拖到此处,或点击上传
</p>
</div>
<Button
icon=
"ios-cloud-upload-outline"
v-if=
"!cloudIco"
>
上传文件
</Button>
<span
style=
"font-size:10px;color:#aaa"
v-if=
"fileFormat"
>
文件格式:
{{
formatList
.
join
()
}}
;文件最大:
{{
maxSize
}}
k
</span>
</Upload>
<Progress
:percent=
"per"
:stroke-width=
"5"
v-show=
"vshowPro"
/>
<div
v-if=
"Photo"
>
<Tag
v-for=
"(item,index) in nameList"
:key=
"index"
:name=
"item.id"
:closable=
"!unClosable"
@
on-close=
"handleClose2"
checkable
>
<a
:href=
"fileUrlPath"
@
click=
"downFile(item.filePath)"
target=
"_blank"
>
{{
item
.
fileName
}}
</a>
</Tag>
<div
v-show=
"showList"
>
<Upload
:action=
"postUrl"
:on-success=
"uploadSuccess"
:on-error=
"uploadError"
:on-remove=
"removeFile"
:format=
"formatList"
:max-size=
"maxSize"
:show-upload-list=
"false"
:on-exceeded-size=
"onExceededSize"
:on-format-error=
"onFormatError"
:multiple=
"multiple"
:style=
"style"
:on-progress=
"onProgress"
>
<div
style=
"padding: 20px 0;text-align:center"
v-if=
"cloudIco"
>
<Icon
type=
"ios-cloud-upload"
size=
"52"
style=
"color: #3399ff"
></Icon>
<p>
将文件拖到此处,或点击上传
</p>
</div>
<Button
icon=
"ios-cloud-upload-outline"
v-if=
"!cloudIco"
>
上传文件
</Button>
<span
style=
"font-size:10px;color:#aaa"
v-if=
"fileFormat"
>
文件格式:
{{
formatList
.
join
()
}}
;文件最大:
{{
maxSize
}}
k
</span>
</Upload>
<Progress
:percent=
"per"
:stroke-width=
"5"
v-show=
"vshowPro"
/>
</div>
<div
v-if=
"Photo"
>
<Tag
v-for=
"(item,index) in nameList"
:key=
"index"
:name=
"item.id"
:closable=
"!unClosable"
@
on-close=
"handleClose2"
checkable
>
<a
:href=
"fileUrlPath"
@
click=
"downFile(item.filePath)"
target=
"_blank"
>
{{
item
.
fileName
}}
</a>
</Tag>
</div>
<div
class=
"upload-body"
v-else
>
<div
...
...
@@ -51,7 +53,7 @@
<template>
<img
:src=
"downUrl+item.filePath"
/>
</
template
>
<div
class=
"demo-upload-list-cover"
>
<div
class=
"demo-upload-list-cover"
v-show=
"showList"
>
<Icon
type=
"ios-eye"
@
click
.
native=
"seeFile(item.filePath)"
></Icon>
<Icon
type=
"ios-trash-outline"
@
click
.
native=
"handleClose2($event,item.id)"
></Icon>
</div>
...
...
@@ -80,6 +82,7 @@ export default {
per
:
0
,
vshowPro
:
false
,
Photo
:
true
,
showList
:
true
,
isactive
:
0
};
},
...
...
@@ -118,6 +121,10 @@ export default {
Photos
:
{
type
:
Boolean
,
default
:
false
},
showList
:
{
type
:
Boolean
,
default
:
true
}
},
methods
:
{
...
...
@@ -245,7 +252,7 @@ export default {
//查询上传到文件服务器上的文件
this
.
$http
.
sysUser
.
getFile
(
this
.
parms
).
then
(
res
=>
{
if
(
res
.
data
!=
[]
&&
res
.
data
.
length
>
0
)
{
var
items
=
[]
var
items
=
[];
res
.
data
.
forEach
(
data
=>
{
let
objImag
=
{};
objImag
.
fileName
=
data
.
fileName
;
...
...
@@ -253,7 +260,7 @@ export default {
objImag
.
id
=
data
.
id
;
items
.
push
(
objImag
);
});
this
.
nameList
=
items
;
this
.
nameList
=
items
;
}
});
},
...
...
@@ -318,8 +325,8 @@ export default {
this
.
nameList
=
[];
this
.
nameList
=
v
;
},
"parms.eid"
(
v
){
if
(
v
)
{
"parms.eid"
(
v
)
{
if
(
v
)
{
this
.
intFiles
();
}
}
...
...
@@ -327,9 +334,8 @@ export default {
mounted
()
{
this
.
formatL
();
this
.
mutipleStatu
();
if
(
this
.
parms
.
eid
){
this
.
intFiles
();
if
(
this
.
parms
.
eid
)
{
this
.
intFiles
();
}
if
(
this
.
Photos
===
true
)
{
this
.
Photo
=
false
;
...
...
pages/technology/productMix/index.vue
View file @
b9dee450
<
template
>
<div
class=
"product-mix"
>
<Layout>
<Sider
width=
"300"
>
<!--
<h4>
产品列表
</h4>
-->
<Sider
width=
"300"
v-if=
"showMenu"
>
<div
class=
"p-list"
>
<!--
<Input
search
enter-button
placeholder=
"请输入产品名称"
/>
-->
<ProductTree
@
on-hide=
"onHide"
@
on-select=
"productSearch"
/>
</div>
</Sider>
<Content>
<div
v-if=
"!showMenu"
class=
"show_menu"
>
<a
class=
"menu_play fr"
@
click=
"showMenuFn"
title=
"展开"
>
<Icon
type=
"ios-arrow-forward"
size=
"24"
/>
</a>
</div>
<Content
:class=
"!showMenu?'con_bord':''"
>
<Product
:parent=
"parent"
/>
</Content>
</Layout>
...
...
@@ -28,10 +31,15 @@ export default {
id
:
null
,
parentName
:
""
,
ids
:
""
}
},
showMenu
:
true
};
},
methods
:
{
showMenuFn
()
{
//this.$Message.info("展开左侧树")
this
.
showMenu
=
true
;
},
productSearch
(
id
,
item
,
ids
)
{
this
.
parent
.
parentName
=
item
.
title
;
this
.
parent
.
id
=
id
;
...
...
@@ -49,11 +57,12 @@ export default {
<
style
lang=
"less"
>
.product-mix {
font-family: Microsoft YaHei;
height: 84vh;
.ivu-layout-sider {
background: rgba(255, 255, 255, 1);
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 87vh;
h4 {
height: 30px;
...
...
@@ -61,17 +70,39 @@ export default {
background: #eee;
padding-left: 10px;
}
// .p-list {
// // padding: 10px;
// overflow: auto;
// }
}
.show_menu {
width: 30px;
height: 30px;
position: fixed;
top: 100px;
left: 0;
z-index: 9;
.menu_play {
width: 30px;
height: 30px;
line-height: 34px;
font-size: 14px;
text-align: center;
color: #515a6e;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
background: #ffffff;
box-shadow: #ccc 2px 2px 4px 1px;
}
.menu_play:hover {
background-color: #2d8cf0;
color: white;
}
}
.ivu-layout-content {
margin-left: 5px;
//
margin-left: 5px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
overflow: auto;
padding: 10px;
height: 87vh;
overflow-y: hidden;
}
}
</
style
>
\ No newline at end of file
pages/technology/productMix/product/detail.vue
View file @
b9dee450
...
...
@@ -10,9 +10,18 @@
<Filed
:span=
"12"
:name=
"l('madeCompany')"
>
{{
entity
.
madeCompanyTitle
}}
</Filed>
<!--
<Filed
:span=
"12"
:name=
"l('extend')"
>
{{
entity
.
extend
}}
</Filed>
-->
<Filed
:span=
"24"
:name=
"l('productUrl')"
>
<a
href=
"#"
@
click=
"seeImg(entity.productUrl)"
>
{{
entity
.
productUrl
}}
</a>
<a
href=
"#"
@
click=
"seeImg(entity.productUrl)"
>
查看图片
</a>
</Filed>
<Filed
:span=
"24"
:name=
"l('productUrlList')"
>
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
:showList=
"false"
@
clickItem=
"clickData"
/>
</Filed>
<Filed
:span=
"24"
:name=
"l('productUrlList')"
>
{{
entity
.
productUrlList
}}
</Filed>
</Row>
</div>
</
template
>
...
...
@@ -26,6 +35,12 @@ export default {
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
},
parms
:
{
app
:
"technology"
,
eid
:
""
,
name
:
""
,
field
:
""
}
};
},
...
...
@@ -38,12 +53,20 @@ export default {
}
},
methods
:
{
clickData
(
data
)
{
window
.
open
(
data
,
"_blank"
);
},
seeImg
(
url
)
{
window
.
open
(
url
,
"_blank"
);
if
(
url
)
{
window
.
open
(
url
,
"_blank"
);
}
else
{
this
.
$Message
.
error
(
"暂无图片"
);
}
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
productUrlList
;
this
.
$emit
(
"on-load"
);
});
},
...
...
@@ -63,4 +86,9 @@ export default {
}
}
};
</
script
>
\ No newline at end of file
</
script
>
<
style
lang=
"less"
>
.detail .upload-body {
border: none;
}
</
style
>
\ No newline at end of file
pages/technology/productMix/product/edit.vue
View file @
b9dee450
...
...
@@ -117,6 +117,7 @@ export default {
methods
:
{
clickData
(
data
)
{
this
.
img
=
data
;
this
.
entity
.
productUrl
=
data
;
},
handleSelect1
(
data
)
{
if
(
data
.
length
>
0
)
{
...
...
pages/technology/productMix/product/index.vue
View file @
b9dee450
...
...
@@ -40,12 +40,12 @@
<Col
span=
"17"
class=
"c"
>
<div>
产品分类:
{{
row
.
productClass
}}
</div>
<div>
图号:
{{
row
.
drawingNo
}}
</div>
<div>
主制单位:
{{
row
.
madeCompany
}}
</div>
<div>
主制单位:
{{
row
.
madeCompany
Title
}}
</div>
<p
class=
"a-icon"
>
<a
@
click=
"edit(row.id)"
>
<Icon
type=
"md-create"
/>
编辑
</a>
<a
@
click=
"remove(row
.id
)"
>
<a
@
click=
"remove(row)"
>
<Icon
type=
"ios-trash"
/>
删除
</a>
<a
@
click=
"view(row.id)"
>
...
...
@@ -143,11 +143,20 @@ export default {
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
remove
(
row
)
{
this
.
$Modal
.
confirm
({
title
:
"删除"
,
content
:
"<p>您确定要删除此产品吗?</p>"
,
onOk
:
()
=>
{
Api
.
delete
(
row
.
id
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
onCancel
:
()
=>
{
this
.
$Message
.
success
(
"取消删除"
);
}
});
},
...
...
pages/technology/productMix/productTree/index.vue
View file @
b9dee450
<
template
>
<div
class=
"flex fd tree-menu"
>
<h3>
产品
列表
产品
分类
<div
class=
"fr mr10 mt10"
>
<ButtonGroup
class=
"fr"
size=
"small"
>
<Button
icon=
"md-add"
title=
"新增顶级"
@
click=
"addNew"
></Button>
...
...
@@ -227,7 +227,7 @@ export default {
}
.fg {
flex: none;
// height:0
;
height: 100%
;
overflow: auto;
padding-left: 10px;
}
...
...
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