Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OKR
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
OKR
Commits
b01abe06
Commit
b01abe06
authored
Jul 23, 2021
by
sixiaofeng
Browse files
Options
Browse Files
Download
Plain Diff
合并
parents
1927ce7a
dd7d41fa
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
149 additions
and
12 deletions
+149
-12
package-lock.json
package-lock.json
+0
-0
index.ts
src/router/index.ts
+8
-0
base.ts
src/service/base.ts
+8
-8
index.ts
src/util/index.ts
+2
-3
file.vue
src/views/file.vue
+130
-0
team-management.vue
src/views/team-management.vue
+1
-1
No files found.
package-lock.json
View file @
b01abe06
This diff is collapsed.
Click to expand it.
src/router/index.ts
View file @
b01abe06
...
@@ -38,6 +38,14 @@ const routes: Array<RouteConfig> = [
...
@@ -38,6 +38,14 @@ const routes: Array<RouteConfig> = [
}
}
},
},
{
{
path
:
'/file'
,
name
:
'File'
,
component
:
()
=>
import
(
'@/views/file.vue'
),
meta
:
{
title
:
'添加成员'
}
},
{
path
:
'/team/:id'
,
path
:
'/team/:id'
,
name
:
'TeamDetail'
,
name
:
'TeamDetail'
,
component
:
()
=>
import
(
'@/views/team-detail.vue'
),
component
:
()
=>
import
(
'@/views/team-detail.vue'
),
...
...
src/service/base.ts
View file @
b01abe06
...
@@ -21,16 +21,16 @@ export class Service {
...
@@ -21,16 +21,16 @@ export class Service {
return
ret
.
data
;
return
ret
.
data
;
}
}
return
ret
return
ret
}
else
{
}
/*
else {
// if(ret.code === 401){
if(ret.code === 401){
// await logoutUser().then(()=>{
await logoutUser().then(()=>{
// router.push({name:'Login'})
router.push({name:'Login'})
// })
})
// }
// Toast.fail(typeof ret.data === "string" ? ret.data : ret.message)
// throw new Error(ret.message)
}
}
Toast.fail(typeof ret.data === "string" ? ret.data : ret.message)
throw new Error(ret.message)
}*/
}
}
this
.
service
.
get
=
(...
res
)
=>
get
(...
res
).
then
(
ret
=>
resolveData
(
ret
.
data
)).
catch
(
err
=>
{
this
.
service
.
get
=
(...
res
)
=>
get
(...
res
).
then
(
ret
=>
resolveData
(
ret
.
data
)).
catch
(
err
=>
{
resolveData
(
err
.
response
.
data
)
resolveData
(
err
.
response
.
data
)
...
...
src/util/index.ts
View file @
b01abe06
import
validator
from
'validator'
import
validator
from
'validator'
// import cliboard from "./cliboard"
/*import cliboard from "./cliboard"
import
cliboard
from
'clipboard'
export default {
export default {
install(Vue: any) {
install(Vue: any) {
...
@@ -11,6 +10,6 @@ export default {
...
@@ -11,6 +10,6 @@ export default {
cliboard,
cliboard,
}
}
}
}
}
}
*/
src/views/file.vue
0 → 100644
View file @
b01abe06
<
template
>
<div
class=
"team-frame"
>
<main-page
left-arrow
@
click-left=
"handleClickLeft"
>
<!--
<template
slot=
"right"
>
<app-icon
type=
"png"
class-name=
"w-6.5 h-6.5"
:path=
"require('@/assets/icons/search.png')"
/>
</
template
>
-->
<div
class=
"px-4"
>
<!-- 输入任意文本 -->
<van-cell-group>
<van-field
label=
"真实姓名"
:required=
"true"
disabled
></van-field>
<input
type=
"text"
maxlength=
"10"
>
</van-cell-group>
<br>
<van-cell-group>
<van-field
label=
"职位"
disabled
/>
<input
type=
"text"
>
</van-cell-group>
<br>
<van-cell-group
>
<!-- 输入手机号,调起手机号键盘 -->
<van-field
dot
label=
"手机号"
v-model=
"tel"
type=
"tel"
input-align=
"right"
/>
<!-- 允许输入整数,调起数字键盘 -->
<van-field
label=
"员工编号"
v-model=
"digit"
type=
"digit"
input-align=
"right"
/>
<van-field
label=
"入职时间"
v-model=
"date"
:value=
"date"
input-align=
"right"
@
click=
"show = true"
right-icon=
"ellipsis"
></van-field>
<van-calendar
v-model=
"show"
:round=
"false"
@
confirm=
"onConfirm"
:show-confirm=
"false"
right-icon=
"ellipsis"
:style=
"{ height: '100% '}"
/>
</van-cell-group>
<br>
<van-cell-group>
<van-field
label=
"所属部门"
right-icon=
"ellipsis"
disabled
/>
<van-field/>
<van-field/>
</van-cell-group>
<br><br><br><br>
<c-button
round
buttonBg=
"bg-color-primary"
class=
"mt-16"
>
生成邀请二维码
</c-button>
</div>
</main-page>
</div>
</template>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
{
Field
,
Toast
}
from
'vant'
;
import
{
Calendar
}
from
'vant'
;
import
{
Popup
}
from
'vant'
;
import
{
Cell
,
CellGroup
}
from
'vant'
;
import
{
NavBar
}
from
'vant'
;
import
{
Icon
}
from
'vant'
;
import
{
RadioGroup
,
Radio
}
from
'vant'
;
Vue
.
use
(
Radio
);
Vue
.
use
(
RadioGroup
);
Vue
.
use
(
Icon
);
Vue
.
use
(
NavBar
);
Vue
.
use
(
Cell
);
Vue
.
use
(
CellGroup
);
Vue
.
use
(
Popup
);
Vue
.
use
(
Calendar
);
Vue
.
use
(
Field
);
export
default
Vue
.
extend
({
name
:
'TeamFrame'
,
components
:
{
'main-page'
:
()
=>
import
(
'@/layout/main-page.vue'
),
'c-button'
:
()
=>
import
(
'./components/c-button.vue'
),
},
created
()
{
// console.log(Mock, 'mock')
},
data
()
{
return
{
realname
:
''
,
job
:
''
,
tel
:
''
,
digit
:
''
,
//入职时间
date
:
''
,
show
:
false
,
}
},
methods
:
{
handleClickLeft
()
{
this
.
$router
.
go
(
-
1
)
},
formatDate
(
date
:
Date
)
{
return
`
${
date
.
getFullYear
()}
-
${
date
.
getMonth
()
+
1
}
-
${
date
.
getDate
()}
`
;
},
onConfirm
(
date
:
Date
)
{
this
.
show
=
false
;
this
.
date
=
this
.
formatDate
(
date
);
},
}
})
</
script
>
<
style
lang=
"less"
>
</
style
>
src/views/team-management.vue
View file @
b01abe06
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
</div>
</div>
</div>
</div>
<c-cell
dot
title=
"团队架构"
@
click-cell=
"$router.push('/team-frame')"
/>
<c-cell
dot
title=
"团队架构"
@
click-cell=
"$router.push('/team-frame')"
/>
<c-cell
dot
title=
"添加成员"
/>
<c-cell
dot
title=
"添加成员"
@
click-cell=
"$router.push('/file')"
/>
<c-cell
dot
title=
"添加部门"
/>
<c-cell
dot
title=
"添加部门"
/>
<div
class=
"mt-4"
>
<div
class=
"mt-4"
>
<c-cell
dot
title=
"团队管理权限"
content=
"共3人"
/>
<c-cell
dot
title=
"团队管理权限"
content=
"共3人"
/>
...
...
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