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
d87fcd76
Commit
d87fcd76
authored
Sep 18, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门导入page
parent
b8520f72
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
753 additions
and
577 deletions
+753
-577
dataGrid.vue
components/page/dataGrid.vue
+702
-561
process.vue
components/page/import/process.vue
+15
-1
zh-CN.js
i18n/locale/zh-CN.js
+1
-0
henq.js
libs/henq.js
+1
-1
index.vue
pages/basicData/department/index.vue
+34
-14
No files found.
components/page/dataGrid.vue
View file @
d87fcd76
This diff is collapsed.
Click to expand it.
components/page/import/process.vue
View file @
d87fcd76
...
...
@@ -152,12 +152,23 @@ export default {
//重新处理colum
loadColum
(
columns
)
{
let
tempCol
=
this
.
$u
.
clone
(
columns
);
let
doCol
=
[]
tempCol
.
forEach
((
ele
,
index
)
=>
{
if
(
ele
.
key
==
"action"
||
ele
.
type
==
"selection"
||
ele
.
key
==
"ico"
)
{
ele
.
hide
=
true
;
}
if
(
ele
.
import
)
{
ele
.
hide
=
false
}
let
temColObj
=
{
key
:
ele
.
key
,
title
:
ele
.
title
,
align
:
ele
.
align
?
ele
.
align
:
'left'
,
hide
:
ele
.
hide
?
ele
.
hide
:
false
,
}
doCol
.
push
(
temColObj
)
});
this
.
colsIm
=
temp
Col
;
this
.
colsIm
=
do
Col
;
this
.
colsIm
.
unshift
({
type
:
'index'
,
width
:
80
,
...
...
@@ -350,6 +361,9 @@ export default {
let
imData
=
[];
let
imDataError
=
[]
this
.
dataIm
.
forEach
(
ele
=>
{
if
(
ele
.
parent_Id
&&
ele
.
parentTitle
)
{
//部门管理导入暂时处置
ele
.
parent_Id
=
null
}
if
(
!
ele
.
ico
)
{
imData
.
push
(
ele
)
}
else
{
...
...
i18n/locale/zh-CN.js
View file @
d87fcd76
...
...
@@ -432,6 +432,7 @@ export default {
location
:
'省市县'
,
parent_Id
:
'上级部门'
,
property
:
'属性'
,
parentTitle
:
'上级部门'
},
instance
:
{
id
:
'主键'
,
...
...
libs/henq.js
View file @
d87fcd76
...
...
@@ -164,7 +164,7 @@ henq.getDepartAllName = (list,id) => {
list
.
map
(
u
=>
{
if
(
id
==
u
.
id
)
{
names
=
u
.
name
+
"
-
"
+
names
names
=
u
.
name
+
"
/
"
+
names
if
(
u
.
parent_Id
>
0
)
{
getDepartAllName
(
list
,
u
.
parent_Id
)
}
...
...
pages/basicData/department/index.vue
View file @
d87fcd76
...
...
@@ -71,6 +71,11 @@ export default {
aId
:
0
,
rowData
:
null
,
columns
:
[{
key
:
"name"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
},
{
key
:
"parent_Id"
,
title
:
this
.
l
(
"parent_Id"
),
align
:
"left"
,
...
...
@@ -83,11 +88,6 @@ export default {
)
}
},
{
key
:
"name"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
},
{
key
:
"code"
,
title
:
this
.
l
(
"code"
),
...
...
@@ -101,7 +101,7 @@ export default {
import
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
this
.
getCity
(
params
.
row
.
location
?
params
.
row
.
location
:
0
))
this
.
getCity
Name
(
params
.
row
.
location
?
params
.
row
.
location
:
0
))
}
},
{
...
...
@@ -277,7 +277,7 @@ export default {
})
},
//根据value获取当前cityname
getCity
(
val
)
{
getCity
Name
(
val
)
{
let
cities
=
this
.
$u
.
clone
(
this
.
cityDatas
)
let
label
=
""
;
cities
.
forEach
(
ele
=>
{
...
...
@@ -287,12 +287,32 @@ export default {
})
return
label
},
//根据Id获取上级到本级的部门名称
getCityValue
(
val
)
{
let
cities
=
this
.
$u
.
clone
(
this
.
cityDatas
)
let
value
=
""
;
cities
.
forEach
(
ele
=>
{
if
(
val
==
ele
.
label
)
{
value
=
ele
.
value
}
})
return
value
},
//根据Id获取上级的部门名称
getParentDepart
(
val
)
{
let
departList
=
this
.
$u
.
clone
(
this
.
treeList
)
return
this
.
$u
.
getDepartAllName
(
departList
,
val
)
},
//根据名称获取上级部门的ID
getParentDepartName
(
val
)
{
let
departList
=
this
.
$u
.
clone
(
this
.
treeList
)
let
value
=
null
departList
.
forEach
(
ele
=>
{
if
(
val
==
ele
.
name
)
{
value
=
ele
.
id
}
})
return
value
},
ok
()
{
this
.
init
();
this
.
modal
=
false
;
...
...
@@ -340,7 +360,7 @@ export default {
);
});
tempCol1
.
forEach
((
ele1
)
=>
{
e
[
ele1
.
key
]
=
this
.
getCity
(
e
[
ele1
.
key
]);
e
[
ele1
.
key
]
=
this
.
getCity
Name
(
e
[
ele1
.
key
]);
});
tempCol2
.
forEach
((
ele2
)
=>
{
e
[
ele2
.
key
]
=
this
.
getParentDepart
(
e
[
ele2
.
key
]);
...
...
@@ -374,12 +394,12 @@ export default {
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
parentTitle
:
ele
.
parent
Title
?
ele
.
parentTitle
:
''
,
parentTitle
:
ele
.
parent
_Id
?
ele
.
parent_Id
:
''
,
name
:
ele
.
name
?
ele
.
name
:
''
,
//部门名称
parent_Id
:
ele
.
parent_Id
?
ele
.
parent_Id
:
0
,
//上级部门 [id]
parent_Id
:
ele
.
parent_Id
?
ele
.
parent_Id
:
''
,
//上级部门 [id]
code
:
ele
.
code
?
ele
.
code
:
''
,
//部门编号
location
:
ele
.
location
?
ele
.
location
:
''
,
//省市县
isProduction
:
1
,
//是否生产班组:1是,0否
location
:
ele
.
location
?
this
.
getCityValue
(
ele
.
location
)
:
''
,
//省市县
isProduction
:
0
,
//是否生产班组:1是,0否
property
:
ele
.
property
?
ele
.
property
:
''
//属性
};
if
(
ele
.
name
&&
ele
.
name
!=
''
)
{
...
...
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