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
5548c7e2
Commit
5548c7e2
authored
Sep 15, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
productMix
parent
f63aa323
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
13 deletions
+96
-13
dataGrid.vue
components/page/dataGrid.vue
+4
-2
zh-CN.js
i18n/locale/zh-CN.js
+2
-2
index.vue
pages/technology/productMix/product/index.vue
+90
-9
No files found.
components/page/dataGrid.vue
View file @
5548c7e2
...
...
@@ -90,6 +90,7 @@ export default {
pageSize
:
20
,
conditions
:
[],
},
searchConditions
:
this
.
search
,
pageSizeOpts
:
[
20
,
50
,
100
],
tableHeight
:
0
,
firstY
:
0
,
...
...
@@ -408,6 +409,7 @@ export default {
},
reload
(
conditions
)
{
var
where
=
[];
this
.
searchConditions
=
conditions
if
(
conditions
)
{
Object
.
keys
(
conditions
).
forEach
((
u
)
=>
{
let
v
=
conditions
[
u
].
value
;
...
...
@@ -482,7 +484,7 @@ export default {
export2Excel
()
{
//当前显示数据
var
where
=
[];
var
conditions
=
this
.
c
onditions
;
var
conditions
=
this
.
searchC
onditions
;
if
(
conditions
)
{
Object
.
keys
(
conditions
).
forEach
((
u
)
=>
{
let
v
=
conditions
[
u
].
value
;
...
...
@@ -496,7 +498,7 @@ export default {
}
});
v
=
times
.
join
(
","
);
}
else
if
(
op
.
indexOf
(
"In"
)
>
-
1
)
{
}
else
if
(
op
.
indexOf
(
"In"
)
>
-
1
&&
Array
.
isArray
(
v
)
)
{
v
=
v
.
join
(
","
);
}
if
(
!
this
.
$u
.
isNull
(
v
))
{
...
...
i18n/locale/zh-CN.js
View file @
5548c7e2
...
...
@@ -1448,7 +1448,7 @@ export default {
product_info
:
{
mmcode
:
'物料编号'
,
materialId
:
'物料'
,
levelId
:
'产品分类'
,
levelId
:
'产品分类
ID
'
,
type
:
"类型"
,
drawingNo
:
'图号'
,
name
:
'名称'
,
...
...
@@ -1457,7 +1457,7 @@ export default {
madeCompanyTitle
:
'主承制单位'
,
status
:
''
,
remark
:
'备注'
,
madeCompany
:
'主承制单位'
,
madeCompany
:
'主承制单位
ID
'
,
creationTime
:
'创建时间'
,
extend
:
''
,
productUrl
:
'产品图像'
,
...
...
pages/technology/productMix/product/index.vue
View file @
5548c7e2
...
...
@@ -15,10 +15,9 @@
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
<Button
:icon=
"iconInfo"
shape=
"circle"
:title=
"titleInfo"
@
click=
"changeShwo"
></Button>
<Button
@
click=
"openModalIm"
>
导入
</Button>
</
template
>
<
template
slot=
"card"
slot-scope=
"{row}"
>
<div
class=
"body-card"
>
...
...
@@ -62,6 +61,7 @@
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
:fullscreen=
"fullscreen"
:mask-closable=
"false"
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
:parents=
"parent"
/>
</Modal>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</div>
</template>
...
...
@@ -131,26 +131,24 @@ export default {
{
key
:
"productUrl"
,
title
:
this
.
l
(
"productUrl"
),
align
:
"
left
"
,
align
:
"
center
"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"a
"
,
{
params
.
row
.
productUrl
.
length
>
0
?
"a"
:
"span
"
,
{
attrs
:
{
oprate
:
"detail"
,
// href: this.fileUrlPath,
// target: "_blank"
},
on
:
{
click
:
()
=>
{
this
.
downFile
(
params
.
row
.
productUrl
)
;
params
.
row
.
productUrl
.
length
>
0
?
this
.
downFile
(
params
.
row
.
productUrl
)
:
null
;
},
},
},
"查看图片"
params
.
row
.
productUrl
.
length
>
0
?
"查看图片"
:
'暂无图片'
),
]);
},
...
...
@@ -161,6 +159,14 @@ export default {
align
:
"left"
,
high
:
true
,
},
{
key
:
"levelId"
,
title
:
this
.
l
(
"levelId"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
import
:
true
,
},
{
key
:
"drawingNo"
,
title
:
this
.
l
(
"drawingNo"
),
...
...
@@ -174,6 +180,33 @@ export default {
width
:
260
,
high
:
true
,
},
{
key
:
"madeCompany"
,
title
:
this
.
l
(
"madeCompany"
),
align
:
"center"
,
width
:
260
,
high
:
true
,
hide
:
true
,
import
:
true
,
},
{
key
:
"version"
,
title
:
this
.
l
(
"version"
),
align
:
"center"
,
width
:
260
,
high
:
true
,
hide
:
true
,
import
:
true
,
},
{
key
:
"materialId"
,
title
:
this
.
l
(
"materialId"
),
align
:
"center"
,
width
:
260
,
high
:
true
,
hide
:
true
,
import
:
true
,
},
{
title
:
"操作"
,
key
:
"action"
,
...
...
@@ -234,6 +267,8 @@ export default {
typeInfo
:
"card"
,
iconInfo
:
"md-apps"
,
titleInfo
:
"卡片模式"
,
ModalIm
:
false
,
temTitle
:
"产品管理"
,
};
},
mounted
()
{
...
...
@@ -336,6 +371,52 @@ export default {
let
vkey
=
"product_info"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
//批量导入start
//导入功能
openModalIm
()
{
if
(
this
.
parent
.
id
)
{
this
.
ModalIm
=
true
}
else
{
this
.
$Message
.
error
(
"请先选择产品分类"
);
}
},
ModalImCancel
()
{
this
.
ModalIm
=
false
},
getData
(
val
)
{
let
url
=
`
${
technologyUrl
}
productinfoimportservice/import`
;
this
.
$refs
.
importExcel
.
deelData
(
url
,
this
.
columns
,
this
.
formatMethod
(
val
))
},
//根据页面二次处理数据
formatMethod
(
val
)
{
let
tempData
=
this
.
$u
.
clone
(
val
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
mmcode
:
ele
.
mmcode
?
ele
.
mmcode
:
''
,
drawingNo
:
ele
.
drawingNo
?
ele
.
drawingNo
:
''
,
name
:
ele
.
name
?
ele
.
name
:
''
,
type
:
ele
.
type
?
ele
.
type
:
1
,
madeCompany
:
ele
.
madeCompany
?
ele
.
madeCompany
:
null
,
madeCompanyTitle
:
ele
.
madeCompanyTitle
?
ele
.
madeCompanyTitle
:
""
,
version
:
ele
.
version
?
ele
.
version
:
0
,
productUrl
:
""
,
productUrlList
:
""
,
levelId
:
this
.
parent
.
id
,
levelTitle
:
this
.
parent
.
parentName
,
materialId
:
ele
.
materialId
?
ele
.
materialId
:
""
,
};
if
(
ele
.
name
&&
ele
.
name
!=
''
)
{
obj
.
ico
=
false
}
else
{
obj
.
ico
=
true
}
tempList
.
push
(
obj
);
});
return
tempList
},
//批量导入end
},
watch
:
{
"parent.id"
(
v
)
{
...
...
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