Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
Overview
Overview
Details
Activity
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
黄营
datax-cloud
Commits
5d229104
Commit
5d229104
authored
May 22, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0.0项目初始化
parent
daafef81
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
67 deletions
+111
-67
user.js
datax-ui/src/store/modules/user.js
+0
-1
PostAdd.vue
datax-ui/src/views/system/post/PostAdd.vue
+15
-11
PostDetail.vue
datax-ui/src/views/system/post/PostDetail.vue
+14
-10
PostEdit.vue
datax-ui/src/views/system/post/PostEdit.vue
+14
-10
PostList.vue
datax-ui/src/views/system/post/PostList.vue
+49
-19
index.vue
datax-ui/src/views/system/post/index.vue
+19
-16
No files found.
datax-ui/src/store/modules/user.js
View file @
5d229104
...
...
@@ -57,7 +57,6 @@ const actions = {
return
new
Promise
((
resolve
,
reject
)
=>
{
getRoutes
(
userId
).
then
(
response
=>
{
const
{
data
}
=
response
console
.
log
(
'getRoutes:'
+
JSON
.
stringify
(
data
))
let
perms
=
data
.
perms
||
[]
let
routes
=
data
.
routes
||
[]
commit
(
'SET_USER_MENU'
,
routes
)
...
...
datax-ui/src/views/system/post/PostAdd.vue
View file @
5d229104
...
...
@@ -2,8 +2,11 @@
<div>
<el-card
class=
"box-card"
shadow=
"always"
:body-style=
"
{ height: bodyHeight }" style="overflow-y: auto;">
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
@
click=
"showCard"
>
返回列表
</el-button>
<span>
{{
title
}}
</span>
<el-button
size=
"mini"
icon=
"el-icon-plus"
style=
"float: right; padding: 3px 0"
round
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
style=
"float: right; padding: 3px 0"
round
@
click=
"showCard"
>
返回列表
</el-button>
<!--
<el-button-group
style=
"float: right;"
>
-->
<!--
</el-button-group>
-->
</div>
111
</el-card>
...
...
@@ -16,21 +19,22 @@ export default {
data
()
{
return
{
bodyHeight
:
document
.
body
.
offsetHeight
-
130
+
'px'
,
title
:
'新增岗位'
title
:
'岗位新增'
,
// 展示切换
showOptions
:
{
id
:
undefined
,
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
}
}
},
created
()
{
},
methods
:
{
showCard
()
{
let
data
=
{
id
:
undefined
,
isShowList
:
true
,
isShowAdd
:
false
,
isShowEdit
:
false
,
isShowDetail
:
false
}
this
.
$emit
(
'showCard'
,
data
)
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
}
}
}
...
...
datax-ui/src/views/system/post/PostDetail.vue
View file @
5d229104
...
...
@@ -3,9 +3,9 @@
<el-card
class=
"box-card"
shadow=
"always"
:body-style=
"
{ height: bodyHeight }" style="overflow-y: auto;">
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
@
click=
"show
List
"
>
返回列表
</el-button>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
@
click=
"show
Card
"
>
返回列表
</el-button>
</div>
111
333
</el-card>
</div>
</
template
>
...
...
@@ -22,19 +22,23 @@ export default {
data
()
{
return
{
bodyHeight
:
document
.
body
.
offsetHeight
-
130
+
'px'
,
title
:
'岗位'
title
:
'岗位详情'
,
// 展示切换
showOptions
:
{
id
:
undefined
,
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
}
}
},
created
()
{
if
(
this
.
id
)
{
this
.
title
=
'修改岗位'
}
else
{
this
.
title
=
'新增岗位'
}
console
.
log
(
'id:'
+
this
.
id
)
},
methods
:
{
show
List
()
{
this
.
$emit
(
'show
List'
)
show
Card
()
{
this
.
$emit
(
'show
Card'
,
this
.
showOptions
)
}
}
}
...
...
datax-ui/src/views/system/post/PostEdit.vue
View file @
5d229104
...
...
@@ -3,9 +3,9 @@
<el-card
class=
"box-card"
shadow=
"always"
:body-style=
"
{ height: bodyHeight }" style="overflow-y: auto;">
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
@
click=
"show
List
"
>
返回列表
</el-button>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
@
click=
"show
Card
"
>
返回列表
</el-button>
</div>
111
222
</el-card>
</div>
</
template
>
...
...
@@ -22,19 +22,23 @@ export default {
data
()
{
return
{
bodyHeight
:
document
.
body
.
offsetHeight
-
130
+
'px'
,
title
:
'岗位'
title
:
'岗位编辑'
,
// 展示切换
showOptions
:
{
id
:
undefined
,
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
}
}
},
created
()
{
if
(
this
.
id
)
{
this
.
title
=
'修改岗位'
}
else
{
this
.
title
=
'新增岗位'
}
console
.
log
(
'id:'
+
this
.
id
)
},
methods
:
{
show
List
()
{
this
.
$emit
(
'show
List'
)
show
Card
()
{
this
.
$emit
(
'show
Card'
,
this
.
showOptions
)
}
}
}
...
...
datax-ui/src/views/system/post/PostList.vue
View file @
5d229104
...
...
@@ -36,6 +36,14 @@
v-hasPerm=
"['system:post:edit']"
>
修改
</el-button>
<el-button
type=
"info"
icon=
"el-icon-view"
size=
"mini"
:disabled=
"single"
@
click=
"handleDetail"
v-hasPerm=
"['system:post:edit']"
>
详情
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
...
...
@@ -123,6 +131,13 @@
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:post:edit']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:post:remove']"
...
...
@@ -153,6 +168,14 @@ export default {
return
{
bodyHeight
:
document
.
body
.
offsetHeight
-
130
+
'px'
,
tableHeight
:
document
.
body
.
offsetHeight
-
230
+
'px'
,
// 展示切换
showOptions
:
{
id
:
undefined
,
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -199,10 +222,12 @@ export default {
this
.
loading
=
true
Object
.
assign
(
this
.
queryParams
,
this
.
pageParams
);
listPost
(
this
.
queryParams
).
then
(
response
=>
{
const
{
data
}
=
response
this
.
postList
=
data
.
data
this
.
pageParams
.
pageTotal
=
data
.
total
this
.
loading
=
false
if
(
response
.
success
)
{
const
{
data
}
=
response
this
.
postList
=
data
.
data
this
.
pageParams
.
pageTotal
=
data
.
total
}
})
},
initCols
()
{
...
...
@@ -242,25 +267,30 @@ export default {
},
/** 新增按钮操作 */
handleAdd
()
{
let
data
=
{
id
:
undefined
,
isShowList
:
false
,
isShowAdd
:
true
,
isShowEdit
:
false
,
isShowDetail
:
false
}
this
.
$emit
(
'showCard'
,
data
)
this
.
showOptions
.
id
=
undefined
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
true
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 修改按钮操作 */
handleEdit
(
row
)
{
let
data
=
{
id
:
row
.
id
,
isShowList
:
false
,
isShowAdd
:
false
,
isShowEdit
:
true
,
isShowDetail
:
false
}
this
.
$emit
(
'showCard'
,
data
)
this
.
showOptions
.
id
=
row
.
id
||
this
.
ids
[
0
]
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
true
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 详情按钮操作 */
handleDetail
(
row
)
{
this
.
showOptions
.
id
=
row
.
id
||
this
.
ids
[
0
]
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
true
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
...
...
datax-ui/src/views/system/post/index.vue
View file @
5d229104
<
template
>
<div
class=
"app-container"
>
<transition
name=
"el-zoom-in-center"
>
<post-list
v-if=
"
isS
howList"
@
showCard=
"showCard"
></post-list>
<post-list
v-if=
"
options.s
howList"
@
showCard=
"showCard"
></post-list>
</transition>
<transition
name=
"el-zoom-in-top"
>
<post-add
v-if=
"isShowAdd"
@
showCard=
"showCard"
></post-add>
<post-add
v-if=
"options.showAdd"
@
showCard=
"showCard"
></post-add>
</transition>
<transition
name=
"el-zoom-in-top"
>
<post-edit
v-if=
"options.showEdit"
:id=
"options.id"
@
showCard=
"showCard"
></post-edit>
</transition>
<transition
name=
"el-zoom-in-bottom"
>
<post-detail
v-if=
"options.showDetail"
:id=
"options.id"
@
showCard=
"showCard"
></post-detail>
</transition>
</div>
</
template
>
...
...
@@ -12,29 +18,26 @@
<
script
>
import
PostList
from
'./PostList'
import
PostAdd
from
'./PostAdd'
import
PostEdit
from
'./PostEdit'
import
PostDetail
from
'./PostDetail'
export
default
{
name
:
'Post'
,
components
:
{
PostList
,
PostAdd
},
components
:
{
PostList
,
PostAdd
,
PostEdit
,
PostDetail
},
data
()
{
return
{
id
:
undefined
,
isShowList
:
true
,
isShowAdd
:
false
,
isShowEdit
:
false
,
isShowDetail
:
false
options
:
{
id
:
undefined
,
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
}
}
},
methods
:
{
showCard
(
data
)
{
console
.
log
(
'data:'
+
JSON
.
stringify
(
data
))
// id: undefined
// data:{"isShowList":false,"isShowAdd":true,"isShowEdit":false,"isShowDetail":false}
// data:{"id":"1214825605782228993","isShowList":false,"isShowAdd":false,"isShowEdit":true,"isShowDetail":false}
// this.isShowList = true
// this.isShowAdd = false
// this.isShowEdit = false
// this.isShowDetail = false
Object
.
assign
(
this
.
options
,
data
);
}
}
}
...
...
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