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
5193fa4f
Commit
5193fa4f
authored
Sep 07, 2021
by
hanfeng zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网址转译
parent
23e7569d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
17 deletions
+51
-17
index.ts
src/Interface/index.ts
+13
-0
index.ts
src/util/Bridge/index.ts
+15
-1
add-member.vue
src/views/team/add-member.vue
+10
-4
confirm-join.vue
src/views/team/join-team/confirm-join.vue
+5
-3
team-frame.vue
src/views/team/team-frame.vue
+1
-1
two-code.vue
src/views/team/two-code.vue
+7
-8
No files found.
src/Interface/index.ts
View file @
5193fa4f
...
...
@@ -31,3 +31,15 @@ export interface Department {
parentId
:
string
,
children
?:
Array
<
Department
>
}
export
interface
LocalStore
{
avatar
:
string
description
:
string
id
:
string
imServer
:
string
name
:
string
nodeServer
:
string
oaServer
:
string
rootDepId
:
string
}
\ No newline at end of file
src/util/Bridge/index.ts
View file @
5193fa4f
...
...
@@ -7,6 +7,20 @@ import router from '@/router';
import
{
AcceptJoinDTO
}
from
'@/service/moudles/service.dto'
import
dsbridge
from
'dsbridge'
interface
GETUSERINFO
{
"company"
:
any
,
"depId"
:
string
,
"entId"
:
string
,
"id"
:
string
,
"joinTime"
:
number
,
"name"
:
string
,
"phone"
:
string
,
"position"
:
string
,
"role"
:
number
}
enum
BridgeMethods
{
SIGN_AUTH
=
'signAuth'
,
GET_USERINFO
=
'getUserInfo'
,
...
...
@@ -42,7 +56,7 @@ export function appNavBack(){
* 获取用户的资料
* @returns
*/
export
function
getUserInfo
()
{
export
function
getUserInfo
()
:
GETUSERINFO
{
const
data
=
dsbridge
.
call
(
BridgeMethods
.
GET_USERINFO
,
{},
(
res
)
=>
{
return
res
})
...
...
src/views/team/add-member.vue
View file @
5193fa4f
...
...
@@ -82,10 +82,11 @@ import Vue from 'vue'
import
{
Calendar
,
Overlay
}
from
'vant'
import
{
AcceptJoinDTO
}
from
'@/service/moudles/service.dto'
import
{
trim
}
from
'@/util/Contact'
import
{
Department
}
from
'@/Interface'
import
{
Department
,
LocalStore
}
from
'@/Interface'
import
{
useLocalStorageState
}
from
'ahooks-vue'
import
{
formatDate
}
from
'@/util/FormatDate'
import
DepSelector
from
'@/views/team/components/dep-selector.vue'
import
{
getSign
,
getUserInfo
}
from
'@/util/Bridge'
Vue
.
use
(
Calendar
).
use
(
Overlay
)
export
default
Vue
.
extend
({
...
...
@@ -213,9 +214,14 @@ export default Vue.extend({
}).
then
(()
=>
{
this
.
acceptJoin
.
entId
=
this
.
entId
this
.
acceptJoin
.
depId
=
this
.
selectedDepId
this
.
acceptJoin
.
expiration
=
this
.
acceptJoin
.
joinTime
this
.
acceptJoin
.
inviterId
=
"1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR"
this
.
acceptJoin
.
oaServer
=
'http://172.16.101.107:20000'
this
.
acceptJoin
.
expiration
=
this
.
acceptJoin
.
joinTime
+
6000000
this
.
acceptJoin
.
inviterId
=
process
.
env
.
NODE_ENV
===
'production'
?
getUserInfo
().
id
:
"1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR"
this
.
acceptJoin
.
oaServer
=
localStorage
.
getItem
(
'ENT_INFO'
)?
JSON
.
parse
(
localStorage
.
getItem
(
'ENT_INFO'
)
as
any
).
oaServer
:
'http://172.16.101.107:20000'
const
{
depId
,
entId
,
expiration
,
inviterId
,
joinTime
,
name
,
oaServer
,
phone
,
position
}
=
this
.
acceptJoin
this
.
acceptJoin
.
hash
=
getSign
({
depId
,
entId
,
expiration
,
inviterId
,
joinTime
,
name
,
oaServer
,
phone
,
position
})
this
.
$store
.
commit
(
'setAcceptJoin'
,
this
.
acceptJoin
)
this
.
$router
.
push
(
'/team/two-code'
)
}).
catch
(()
=>
{
})
...
...
src/views/team/join-team/confirm-join.vue
View file @
5193fa4f
...
...
@@ -77,7 +77,7 @@
import
Vue
from
'vue'
import
{
formatDate
}
from
'@/util/FormatDate'
import
{
AcceptJoinDTO
}
from
'@/service/moudles/service.dto'
import
{
appNavBack
}
from
'@/util/Bridge'
import
{
appNavBack
,
getSign
}
from
'@/util/Bridge'
export
default
Vue
.
extend
({
name
:
'JoinTeam'
,
...
...
@@ -116,10 +116,12 @@ export default Vue.extend({
},
methods
:
{
appNavBack
,
submit
()
{
async
submit
()
{
console
.
log
(
'申请'
)
this
.
loading
=
true
this
.
$service
.
enterprise
.
acceptJoin
(
this
.
info
)
this
.
$service
.
enterprise
.
acceptJoin
(
this
.
info
)
.
then
((
res
:
any
)
=>
{
const
{
data
}
=
res
this
.
loading
=
false
...
...
src/views/team/team-frame.vue
View file @
5193fa4f
...
...
@@ -192,7 +192,7 @@ export default Vue.extend({
})
},
clickMember
(
member
:
Staff
)
{
openCompanyUserInfo
(
JSON
.
stringify
(
member
))
openCompanyUserInfo
(
JSON
.
stringify
(
member
.
id
))
// this.$router.push(`/team/team-member/${member.id}`)
},
clickItem
(
val
:
Department
)
{
...
...
src/views/team/two-code.vue
View file @
5193fa4f
...
...
@@ -93,17 +93,10 @@ export default Vue.extend({
async
created
()
{
// console.log(Mock, 'mock')
this
.
joinInfo
=
this
.
$store
.
state
.
acceptJoin
const
urloutput
=
this
.
outputUrl
(
this
.
joinInfo
)
console
.
log
(
urloutput
);
this
.
qrCodeText
=
JSON
.
stringify
(
this
.
joinInfo
)
let
url
=
window
.
location
.
origin
+
'/team/confirm-join'
this
.
qrCodeText
=
`
${
url
}
?
${
urloutput
}
`
console
.
log
(
this
.
qrCodeText
,
'output'
);
this
.
dpr
()
// this.drawCanvas()
},
...
...
@@ -114,7 +107,12 @@ export default Vue.extend({
const
arr
=
Object
.
entries
(
item
)
arr
.
map
((
i
,
index
)
=>
{
let
string
index
+
1
<
arr
.
length
?
string
=
`
${
i
[
0
]}
=
${
i
[
1
]}
&`
:
string
=
`
${
i
[
0
]}
=
${
i
[
1
]}
`
if
(
index
+
1
<
arr
.
length
){
string
=
`
${
i
[
0
]}
=
${
encodeURIComponent
(
i
[
1
])}
&`
}
else
{
string
=
`
${
i
[
0
]}
=
${
encodeURIComponent
(
i
[
1
])}
`
}
res
+=
string
})
...
...
@@ -128,6 +126,7 @@ export default Vue.extend({
if
(
window
.
devicePixelRatio
&&
window
.
devicePixelRatio
>
1
)
{
return
window
.
devicePixelRatio
}
return
1
},
async
drawCanvas
(
selector
:
string
)
{
...
...
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