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
5ac4c904
Commit
5ac4c904
authored
Jul 29, 2021
by
sixiaofeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团队搜索/申请团队页面
parent
58f6b9d5
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
318 additions
and
8 deletions
+318
-8
close-small.png
src/assets/icons/close-small.png
+0
-0
search-light.png
src/assets/icons/search-light.png
+0
-0
33.png
src/assets/images/33.png
+0
-0
main-page.vue
src/layout/main-page.vue
+5
-1
index.ts
src/router/index.ts
+18
-0
style.less
src/style.less
+11
-0
c-cell.vue
src/views/components/c-cell.vue
+1
-0
input-cell.vue
src/views/components/input-cell.vue
+7
-6
search-bar.vue
src/views/components/search-bar.vue
+90
-0
file.vue
src/views/file.vue
+5
-1
join-team.vue
src/views/join-team.vue
+107
-0
search-team.vue
src/views/search-team.vue
+69
-0
select-team.vue
src/views/select-team.vue
+1
-0
tailwind.config.js
tailwind.config.js
+4
-0
No files found.
src/assets/icons/close-small.png
0 → 100644
View file @
5ac4c904
776 Bytes
src/assets/icons/search-light.png
0 → 100644
View file @
5ac4c904
2.23 KB
src/assets/images/33.png
0 → 100644
View file @
5ac4c904
3.84 KB
src/layout/main-page.vue
View file @
5ac4c904
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</
template
>
</
template
>
<slot
name=
"left"
/>
<slot
name=
"left"
/>
</div>
</div>
<div
class=
"title w-1/2 text-center font-bold t
ext-text-primary truncate
"
>
{{ title }}
</div>
<div
class=
"title w-1/2 text-center font-bold t
runcate"
:class=
"titleColor
"
>
{{ title }}
</div>
<div
class=
"h-action-wrapper absolute flex justify-center items-center right-3 top-1/2 transform -translate-y-1/2"
>
<div
class=
"h-action-wrapper absolute flex justify-center items-center right-3 top-1/2 transform -translate-y-1/2"
>
<slot
name=
"right"
/>
<slot
name=
"right"
/>
</div>
</div>
...
@@ -38,6 +38,10 @@ export default Vue.extend({
...
@@ -38,6 +38,10 @@ export default Vue.extend({
headerBg
:
{
headerBg
:
{
type
:
String
,
type
:
String
,
default
:
'bg-common-bg'
default
:
'bg-common-bg'
},
titleColor
:
{
type
:
String
,
default
:
'text-text-primary'
}
}
},
},
components
:
{
components
:
{
...
...
src/router/index.ts
View file @
5ac4c904
...
@@ -29,6 +29,8 @@ const routes: Array<RouteConfig> = [
...
@@ -29,6 +29,8 @@ const routes: Array<RouteConfig> = [
* 申请管理 /request-management
* 申请管理 /request-management
* 添加成员 /file
* 添加成员 /file
* 选择部门 /select-team
* 选择部门 /select-team
* 搜索团队 /search-team
* 加入团队 /join-team
*
*
*/
*/
{
{
...
@@ -153,6 +155,22 @@ const routes: Array<RouteConfig> = [
...
@@ -153,6 +155,22 @@ const routes: Array<RouteConfig> = [
title
:
'选择团队'
title
:
'选择团队'
}
}
},
},
{
path
:
'/search-team'
,
name
:
'SearchTeam'
,
component
:
()
=>
import
(
'@/views/search-team.vue'
),
meta
:{
title
:
'搜索团队'
}
},
{
path
:
'/join-team'
,
name
:
'JoinTeam'
,
component
:
()
=>
import
(
'@/views/join-team.vue'
),
meta
:{
title
:
'加入团队'
}
}
]
]
const
router
=
new
VueRouter
({
const
router
=
new
VueRouter
({
...
...
src/style.less
View file @
5ac4c904
...
@@ -7,6 +7,17 @@ input {
...
@@ -7,6 +7,17 @@ input {
-webkit-tap-highlight-color: rgba(0,0,0,0); /*点击高亮的颜色*/
-webkit-tap-highlight-color: rgba(0,0,0,0); /*点击高亮的颜色*/
}
}
input[type=search] {
-webkit-appearance: textfield;
font-family: inherit;
font-size: 100%;
}
input::-webkit-search-decoration,
input::-webkit-search-cancel-button {
display: none;
}
body {
body {
color: #24374E;
color: #24374E;
}
}
...
...
src/views/components/c-cell.vue
View file @
5ac4c904
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
>
>
<div
v-if=
"checkIfEmpty(label)"
class=
"text-sm text-text-secondary py-2"
>
{{
label
}}
</div>
<div
v-if=
"checkIfEmpty(label)"
class=
"text-sm text-text-secondary py-2"
>
{{
label
}}
</div>
<div
class=
"flex py-3 items-center justify-between"
>
<div
class=
"flex py-3 items-center justify-between"
>
<slot
name=
"icon"
/>
<div
class=
"flex items-center justify-between flex-1"
>
<div
class=
"flex items-center justify-between flex-1"
>
<div
class=
"title text-text-primary flex-shrink-0 mr-4"
>
{{
title
}}
</div>
<div
class=
"title text-text-primary flex-shrink-0 mr-4"
>
{{
title
}}
</div>
<!-- 输入框 -->
<!-- 输入框 -->
...
...
src/views/components/input-cell.vue
View file @
5ac4c904
...
@@ -15,14 +15,15 @@
...
@@ -15,14 +15,15 @@
<input
<input
:type=
"type"
:type=
"type"
:value=
"value"
:value=
"value"
class=
"w-full text-text-primary"
class=
"w-full text-text-primary
flex-1
"
:placeholder=
"placeholder"
:placeholder=
"placeholder"
@
input=
"handleInput"
@
input=
"handleInput"
@
blur=
"handleChange"
@
blur=
"handleChange"
>
>
<slot
name=
"action"
/>
<div
class=
"flex-shrink-0"
>
<slot
name=
"action"
/>
</div>
</div>
</div>
<div
v-if=
"showError"
class=
"error text-xs text-warn-color mt-2"
>
{{
errorMsg
}}
</div>
<div
v-if=
"showError"
class=
"error text-xs text-warn-color mt-2"
>
{{
errorMsg
}}
</div>
</div>
</div>
<!--
<app-icon
<!--
<app-icon
...
@@ -37,9 +38,6 @@
...
@@ -37,9 +38,6 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
Vue
from
'vue'
import
{
Field
}
from
'vant'
Vue
.
use
(
Field
)
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
components
:{
components
:{
...
@@ -83,6 +81,9 @@ export default Vue.extend({
...
@@ -83,6 +81,9 @@ export default Vue.extend({
showError
:
false
showError
:
false
}
}
},
},
created
()
{
this
.
length
=
this
.
value
.
length
||
0
},
methods
:
{
methods
:
{
checkIfEmpty
(
string
:
string
)
{
checkIfEmpty
(
string
:
string
)
{
return
string
&&
string
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
''
)
!==
''
return
string
&&
string
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
''
)
!==
''
...
...
src/views/components/search-bar.vue
0 → 100644
View file @
5ac4c904
<
template
>
<div
class=
"top-0 left-0 w-full py-1.5 flex items-center"
:class=
"bgColor"
>
<div
class=
"input-wrapper flex-1 relative"
>
<app-icon
icon-name=
"search-light"
class-name=
"w-6 h-6 absolute left-2 top-1/2 transform -translate-y-1/2"
/>
<form
action=
"."
>
<input
type=
"search"
class=
"py-2 rounded-full w-full pl-9"
:class=
"clearable ? 'pr-9' : 'pr-4'"
:placeholder=
"placeholder"
:value=
"value"
@
input=
"handleInput"
@
keypress=
"keyPress"
>
<input
type=
"text"
style=
"display:none;"
/>
</form>
<div
v-if=
"clearable && value.length > 0"
class=
"clear absolute right-0 top-1/2 transform -translate-y-1/2 px-3.5 py-3.5 flex items-center justify-center"
@
click=
"clear"
>
<app-icon
icon-name=
"close-small"
class-name=
"w-2.5 h-2.5"
/>
</div>
</div>
<div
class=
"right flex-shrink-0 ml-4"
>
<slot
name=
'right'
>
<div
@
click=
"$emit('cancel')"
>
取消
</div>
</slot>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
export
default
Vue
.
extend
({
name
:
'SearchBar'
,
components
:{
'app-icon'
:()
=>
import
(
'@/components/common/Icon.vue'
)
// 'main-page': () => import('@/layout/main-page.vue')
},
props
:
{
clearable
:
{
type
:
Boolean
,
default
:
true
},
bgColor
:
{
type
:
String
,
default
:
'bg-common-bg'
},
placeholder
:
{
type
:
String
,
default
:
'请输入..'
},
value
:
String
},
data
()
{
return
{
// value: '',
length
:
0
,
showError
:
false
}
},
methods
:
{
handleInput
(
e
:
InputEvent
)
{
this
.
$emit
(
'input'
,
(
e
.
target
as
HTMLInputElement
).
value
)
},
clear
()
{
console
.
log
(
'xxx'
)
this
.
$emit
(
'input'
,
''
)
},
keyPress
(
e
:
KeyboardEvent
)
{
if
(
e
.
key
.
toLowerCase
()
===
'enter'
)
{
this
.
$emit
(
'search'
)
}
// alert(e.key)
}
}
})
</
script
>
<
style
lang=
"less"
>
</
style
>
src/views/file.vue
View file @
5ac4c904
...
@@ -50,7 +50,11 @@
...
@@ -50,7 +50,11 @@
/>
/>
<van-calendar
v-model=
"show"
:round=
"false"
@
confirm=
"onConfirm"
:show-confirm=
"false"
:style=
"{ height:'100%'}"
/>
<van-calendar
v-model=
"show"
:round=
"false"
@
confirm=
"onConfirm"
:show-confirm=
"false"
:style=
"{ height:'100%'}"
/>
<!-- 选择部门 -->
<!-- 选择部门 -->
<group-cell
class=
"mt-4"
title=
"所属部门"
>
<group-cell
dot
class=
"mt-4"
title=
"所属部门"
@
click=
"$router.push('/select-team')"
>
<c-cell
title=
"产品设计部(主要部门)"
/>
<c-cell
title=
"产品设计部(主要部门)"
/>
<c-cell
title=
"设计部(子部门)"
/>
<c-cell
title=
"设计部(子部门)"
/>
</group-cell>
</group-cell>
...
...
src/views/join-team.vue
0 → 100644
View file @
5ac4c904
<
template
>
<!-- 加入团队 -->
<div
class=
"team-frame"
>
<main-page
header-bg=
"bg-transparent"
title-color=
"text-white"
@
click-left=
"$router.go(-1)"
>
<!-- 顶部左侧插槽 -->
<template
slot=
"left"
>
<app-icon
type=
"png"
class-name=
"w-6.5 w-6.5"
:path=
"require('@/assets/icons/left-arrow-white.png')"
@
click=
"$router.go(-1)"
/>
</
template
>
<div
class=
"relative w-full h-40 bg-gradient-to-r from-linear-t to-linear-b"
>
<!-- 背景图 -->
<img
class=
"w-82 absolute top-0 right-0"
src=
"@/assets/images/header-bg.png"
alt=
""
>
<!-- logo -->
<div
class=
"absolute top-20 left-1/2 border transform -translate-x-1/2 z-10 w-15 h-15 bg-white rounded-full overflow-hidden flex items-center justify-center"
>
<img
src=
"@/assets/images/33.png"
alt=
""
class=
"max-w-full"
>
</div>
<div
class=
"top-28 px-4 w-full absolute top-10"
>
<div
class=
"bg-white w-full rounded pt-8 pb-4 flex flex-col items-center shadow-bg"
>
<div
class=
"font-medium"
>
杭州复杂美科技有限公司
</div>
<div
class=
"font-medium text-sm text-text-secondary mt-0.5"
>
团队号 HZFZM0001
</div>
</div>
</div>
</div>
<div
class=
"px-4 pt-16 pb-20"
>
<input-cell
v-model=
"name"
required
:limit=
"20"
label=
"真实姓名"
placeholder=
"请输入真实姓名"
error-msg=
"请输入真实姓名"
class=
"mt-2"
/>
<input-cell
v-model=
"phone"
required
label=
"手机号"
placeholder=
"请输入手机号"
error-msg=
"请输入手机号"
class=
"mt-4"
/>
<input-cell
v-model=
"validateNum"
required
placeholder=
"请输入验证码"
error-msg=
"请输入验证码"
>
<
template
slot=
"action"
>
<c-button
type=
"text"
class=
"ml-4"
>
获取验证码
</c-button>
</
template
>
</input-cell>
<input-cell
v-model=
"reason"
label=
"申请理由(选填)"
placeholder=
"请填写申请理由"
class=
"mt-4"
/>
<!-- 底部操作 -->
<div
class=
"py-2 px-4 bg-common-bg w-screen fixed bottom-0 left-0 z-30"
>
<c-button
round
@
click=
"submit"
>
提交申请
</c-button>
</div>
</div>
</main-page>
</div>
</template>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
export
default
Vue
.
extend
({
name
:
'JoinTeam'
,
components
:
{
'main-page'
:
()
=>
import
(
'@/layout/main-page.vue'
),
'app-icon'
:
()
=>
import
(
'@/components/common/Icon.vue'
),
'c-button'
:
()
=>
import
(
'./components/c-button.vue'
),
'input-cell'
:
()
=>
import
(
'./components/input-cell.vue'
)
},
created
()
{
// console.log(Mock, 'mock')
},
data
()
{
return
{
name
:
''
,
phone
:
''
,
validateNum
:
''
,
reason
:
''
}
},
methods
:
{
submit
()
{
console
.
log
(
'申请'
)
}
}
})
</
script
>
<
style
lang=
"less"
>
</
style
>
src/views/search-team.vue
0 → 100644
View file @
5ac4c904
<
template
>
<div
class=
"select-team min-h-screen bg-common-bg px-4"
>
<div
class=
"header px-4 fixed top-0 left-0 w-full z-10"
>
<search-bar
v-model=
"search"
placeholder=
"搜索团队名称、团队号"
@
search=
"handleSearch"
@
cancel=
"$router.go(-1)"
/>
</div>
<div
class=
"content pt-14"
>
<div
class=
"mt-2.5"
>
<div
v-for=
"(item, index) in result"
:key=
"index"
class=
"bg-white p-4 rounded flex items-center mb-px"
@
click=
"$router.push('/join-team')"
>
<div
class=
"w-10 h-10 mr-6 flex-shrink-0"
>
<img
src=
"@/assets/images/33.png"
alt=
""
class=
"max-w-full"
>
</div>
<div
class=
"flex-1 overflow-hidden"
>
<div
class=
"font-medium truncate"
>
{{
item
.
name
}}
</div>
<div
class=
"text-sm text-text-secondary font-medium truncate"
>
团队号
{{
item
.
number
}}
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
export
default
Vue
.
extend
({
name
:
'SearchTeam'
,
components
:{
'main-page'
:
()
=>
import
(
'@/layout/main-page.vue'
),
// 'app-icon': () => import('@/components/common/Icon.vue'),
'search-bar'
:
()
=>
import
(
'./components/search-bar.vue'
)
// 'c-button': () => import('./components/c-button.vue')
},
data
()
{
return
{
search
:
''
,
result
:
[
{
name
:
'杭州复杂美科技有限公司'
,
number
:
'HZFZM0001'
},
{
name
:
'杭州复杂美科技有限公司'
,
number
:
'HZFZM0001'
}
]
}
},
methods
:
{
handleSearch
()
{
console
.
log
(
'search '
+
this
.
search
)
}
}
})
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/views/select-team.vue
View file @
5ac4c904
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
type=
"png"
type=
"png"
class-name=
"w-6.5 h-6.5"
class-name=
"w-6.5 h-6.5"
:path=
"require('@/assets/icons/search.png')"
:path=
"require('@/assets/icons/search.png')"
@
click=
"$router.push('/search-team')"
/>
/>
</
template
>
</
template
>
<div
class=
"px-4 pt-14 pb-16"
>
<div
class=
"px-4 pt-14 pb-16"
>
...
...
tailwind.config.js
View file @
5ac4c904
...
@@ -29,6 +29,7 @@ module.exports = {
...
@@ -29,6 +29,7 @@ module.exports = {
6.5
:
'1.625rem'
,
6.5
:
'1.625rem'
,
10.5
:
'2.625rem'
,
10.5
:
'2.625rem'
,
13
:
'3.125rem'
,
13
:
'3.125rem'
,
15
:
'3.75rem'
,
50
:
'12.5rem'
,
50
:
'12.5rem'
,
82
:
'20.375rem'
,
82
:
'20.375rem'
,
},
},
...
@@ -43,6 +44,9 @@ module.exports = {
...
@@ -43,6 +44,9 @@ module.exports = {
zIndex
:
{
zIndex
:
{
'-1'
:
'-1'
'-1'
:
'-1'
},
},
boxShadow
:
{
bg
:
'0px 2px 24px 0px #D7E7EF'
}
},
},
screens
:
{
screens
:
{
sm
:
'640px'
,
sm
:
'640px'
,
...
...
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