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
8f87ce01
Commit
8f87ce01
authored
Sep 26, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
datagrid
parent
47b9c631
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
dataGrid.vue
components/page/dataGrid.vue
+49
-0
No files found.
components/page/dataGrid.vue
View file @
8f87ce01
...
...
@@ -102,6 +102,7 @@ export default {
treeData
:
[],
//物料数据
codeRuleData
:
[],
//物料编码
routingHeaderData
:
[],
//工艺规程
allUser
:
[]
//所有user
};
},
props
:
{
...
...
@@ -277,6 +278,7 @@ export default {
this
.
getTreeData
();
this
.
getcodeRuleData
();
this
.
getRoutingHeaderData
();
this
.
getAllUser
();
//获取所有用户
},
methods
:
{
//数据加载
...
...
@@ -472,6 +474,36 @@ export default {
selectAll
(
status
)
{
this
.
$refs
.
table
.
selectAll
(
status
);
},
//获取所有用户信息
getAllUser
()
{
this
.
$api
.
post
(
`
${
systemUrl
}
/user/paged`
,
{
conditions
:
[],
pageIndex
:
1
,
pageSize
:
1000
,
})
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
let
tempUserInfo
=
r
.
result
.
items
tempUserInfo
.
forEach
(
ele
=>
{
let
temObj
=
{
userId
:
ele
.
id
,
name
:
ele
.
userName
}
this
.
allUser
.
push
(
temObj
)
})
}
})
},
getUserName
(
id
)
{
let
name
=
''
this
.
allUser
.
forEach
(
ele
=>
{
if
(
id
==
ele
.
userId
)
{
name
=
ele
.
name
}
})
return
name
},
//批量取消
cancelBatch
()
{
this
.
footerToolbar
=
false
;
...
...
@@ -522,6 +554,7 @@ export default {
var
tempCol
=
[];
var
tempCol1
=
[];
//存放物料相关表头
var
tempCol2
=
[];
//存放工艺规程相关表头
var
tempColUser
=
[];
//存放type=user的表头
var
columnsCur
=
this
.
$u
.
clone
(
this
.
columnsCur
);
//导出列标题信息griddata this.$refs.grid.columnsCur
columnsCur
.
forEach
((
el
)
=>
{
if
(
...
...
@@ -549,6 +582,12 @@ export default {
code
:
el
.
techKey
,
});
//临时存放工艺规程相关转换
}
if
(
el
.
type
&&
el
.
type
==
"user"
)
{
tempColUser
.
push
({
key
:
el
.
key
,
code
:
el
.
type
,
});
//临时存放user列
}
tHeader
.
push
(
el
.
title
);
filterVal
.
push
(
el
.
key
);
...
...
@@ -609,6 +648,16 @@ export default {
e
[
elcol2
.
key
]
=
this
.
getRoutingHeaderName
(
e
[
elcol2
.
key
]);
}
});
//导出username相关信息
tempColUser
.
forEach
(
eluser
=>
{
if
(
e
[
eluser
.
key
]
&&
e
[
eluser
.
key
]
!=
""
&&
e
[
eluser
.
key
]
!=
null
)
{
e
[
eluser
.
key
]
=
this
.
getUserName
(
e
[
eluser
.
key
])
}
})
});
let
nowDate
=
this
.
$u
.
getNowTime
();
//年月日时分秒yyyyMMddhhmmss
...
...
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