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
02b0d615
Commit
02b0d615
authored
Sep 07, 2021
by
sixiaofeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
cf23efb6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
9 deletions
+41
-9
index.ts
src/store/index.ts
+3
-0
two-code.vue
src/views/team/two-code.vue
+38
-9
No files found.
src/store/index.ts
View file @
02b0d615
...
@@ -19,6 +19,9 @@ export default new Vuex.Store({
...
@@ -19,6 +19,9 @@ export default new Vuex.Store({
setSelectedDep
(
state
,
payload
)
{
setSelectedDep
(
state
,
payload
)
{
state
.
selectedDep
=
payload
state
.
selectedDep
=
payload
},
},
setAcceptJoin
(
state
,
payload
)
{
state
.
acceptJoin
=
payload
},
},
},
actions
:
{
actions
:
{
},
},
...
...
src/views/team/two-code.vue
View file @
02b0d615
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
<div
class=
"two-code"
>
<div
class=
"two-code"
>
<main-page
<main-page
left-arrow
left-arrow
:loading=
"loading"
@
click-left=
"handleClickLeft"
@
click-left=
"handleClickLeft"
>
>
<div
class=
"mx-4 pt-14"
>
<div
class=
"mx-4 pt-14"
>
<div
class=
"shadow-md rounded overflow-hidden"
id=
"qrcode"
>
<div
class=
"shadow-md rounded overflow-hidden"
id=
"qrcode"
>
<div
class=
"bg-color-primary text-center h-24 pt-6"
>
<div
class=
"bg-color-primary text-center h-24 pt-6"
>
<div
class=
"text-white flex-initial"
>
{{
msg1
}}
</div>
<div
class=
"text-white flex-initial"
>
{{
msg1
}}
</div>
<
div
class=
"text-gray-300 flex-initial"
>
团队号:
{{
msg2
}}
</div>
<
!--
<div
class=
"text-gray-300 flex-initial"
>
团队号:
{{
msg2
}}
</div>
-->
</div>
</div>
<div
class=
"bg-white"
>
<div
class=
"bg-white"
>
<div
class=
"flex flex-row justify-around"
>
<div
class=
"flex flex-row justify-around"
>
...
@@ -27,12 +28,18 @@
...
@@ -27,12 +28,18 @@
</div>
</div>
<div
class=
"w-1/2 space-y-2 flex-col text-base text-left pt-7 px-4"
>
<div
class=
"w-1/2 space-y-2 flex-col text-base text-left pt-7 px-4"
>
<div
class=
"text-lg font-bold pb-1"
>
{{
joinInfo
.
name
||
'张三'
}}
</div>
<div
class=
"text-lg font-bold pb-1"
>
{{
joinInfo
.
name
||
'张三'
}}
</div>
<div
>
职位:
{{
joinInfo
.
position
}}
</div>
<div
class=
"flex items-start"
>
<div
>
部门:产品设计部
</div>
<div
class=
"flex-shrink-0 w-12"
>
职位:
</div>
<div
>
{{
formatDate
(
joinInfo
.
joinTime
,
'YYYY-MM-DD'
)
||
'2021-09-05'
}}
</div>
<div
class=
"flex-1"
>
{{
joinInfo
.
position
}}
</div>
</div>
<div
class=
"flex items-start"
>
<div
class=
"flex-shrink-0 w-12"
>
部门:
</div>
<div
class=
"flex-1"
>
{{
depInfo
.
name
}}
</div>
</div>
<div>
{{
formatDate
(
joinInfo
.
joinTime
,
'YYYY-MM-DD'
)
||
'2021-09-05'
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
" text-center text-gray-400 pb-8 pt-4"
>
{{
msg3
}}
</div>
<div
class=
" text-center text-gray-400 pb-8 pt-4"
>
扫描二维码加入我们
{{
entName
}}
的团队
</div>
</div>
</div>
</div>
</div>
<div
class=
"flex justify-center pt-8 text-color-primary font-medium text-sm text-center px-7"
>
<div
class=
"flex justify-center pt-8 text-color-primary font-medium text-sm text-center px-7"
>
...
@@ -46,7 +53,7 @@
...
@@ -46,7 +53,7 @@
<code-icon
:path=
"require('@/assets/icons/y-downlode.png')"
class-name=
"h-9 w-9"
/>
保存
<code-icon
:path=
"require('@/assets/icons/y-downlode.png')"
class-name=
"h-9 w-9"
/>
保存
</div>
</div>
</div>
</div>
<c-button
type=
"secondary"
class=
"mt-16"
>
进入团队工作台
</c-button>
<c-button
type=
"secondary"
class=
"mt-16"
@
click=
"$router.push('/team/team-frame')"
>
进入团队工作台
</c-button>
</div>
</div>
</main-page>
</main-page>
</div>
</div>
...
@@ -59,6 +66,7 @@ import { formatDate } from '@/util/FormatDate'
...
@@ -59,6 +66,7 @@ import { formatDate } from '@/util/FormatDate'
import
VueQr
from
'vue-qr'
import
VueQr
from
'vue-qr'
import
html2canvas
from
'html2canvas'
import
html2canvas
from
'html2canvas'
import
{
CanvasRenderer
}
from
'html2canvas/dist/types/render/canvas/canvas-renderer'
import
{
CanvasRenderer
}
from
'html2canvas/dist/types/render/canvas/canvas-renderer'
import
{
Department
}
from
'@/Interface'
interface
JoinInfoType
{
interface
JoinInfoType
{
depId
:
string
depId
:
string
entId
:
string
entId
:
string
...
@@ -79,9 +87,11 @@ export default Vue.extend({
...
@@ -79,9 +87,11 @@ export default Vue.extend({
formatDate
,
formatDate
,
msg1
:
'团队名称'
,
msg1
:
'团队名称'
,
msg2
:
'ABCDEF'
,
msg2
:
'ABCDEF'
,
msg3
:
'扫描二维码加入我们chat33的团队
'
,
entName
:
'
'
,
joinInfo
:
{}
as
JoinInfoType
,
joinInfo
:
{}
as
JoinInfoType
,
qrCodeText
:
''
qrCodeText
:
''
,
loading
:
false
,
depInfo
:
{}
as
Department
}
}
},
},
components
:
{
components
:
{
...
@@ -102,6 +112,9 @@ export default Vue.extend({
...
@@ -102,6 +112,9 @@ export default Vue.extend({
this
.
dpr
()
this
.
dpr
()
// this.drawCanvas()
// this.drawCanvas()
this
.
entName
=
JSON
.
parse
(
localStorage
.
getItem
(
'ENT_INFO'
)
as
string
).
name
console
.
log
(
this
.
joinInfo
,
'joinInfo'
)
this
.
getDepInfo
(
this
.
joinInfo
.
entId
,
this
.
joinInfo
.
depId
)
},
},
methods
:
{
methods
:
{
...
@@ -122,7 +135,7 @@ export default Vue.extend({
...
@@ -122,7 +135,7 @@ export default Vue.extend({
return
res
return
res
},
},
handleClickLeft
()
{
handleClickLeft
()
{
this
.
$router
.
push
(
'/team'
)
this
.
$router
.
push
(
'/team
/team-frame
'
)
},
},
dpr
()
{
dpr
()
{
console
.
log
(
window
.
devicePixelRatio
,
'pixel'
)
console
.
log
(
window
.
devicePixelRatio
,
'pixel'
)
...
@@ -158,6 +171,22 @@ export default Vue.extend({
...
@@ -158,6 +171,22 @@ export default Vue.extend({
},
},
async
saveQrcode
()
{
async
saveQrcode
()
{
await
this
.
drawCanvas
(
'qrcode'
)
await
this
.
drawCanvas
(
'qrcode'
)
},
getDepInfo
(
entId
:
string
,
depId
:
string
)
{
this
.
loading
=
true
this
.
$service
.
department
.
getDep
({
entId
,
id
:
depId
}).
then
((
res
:
any
)
=>
{
this
.
loading
=
false
const
{
data
}
=
res
if
(
data
.
code
===
this
.
$global
.
success
)
{
console
.
log
(
'xxx'
)
this
.
depInfo
=
data
.
data
}
else
{
this
.
$toast
(
data
.
msg
)
}
})
}
}
}
}
})
})
...
...
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