Commit c28b2d16 authored by sixiaofeng's avatar sixiaofeng

Merge branch 'main' of https://gitlab.33.cn/HF_web/OKR

parents 062b2818 8c4793c7
...@@ -7,7 +7,15 @@ import router from '@/router'; ...@@ -7,7 +7,15 @@ import router from '@/router';
import { AcceptJoinDTO } from '@/service/moudles/service.dto' import { AcceptJoinDTO } from '@/service/moudles/service.dto'
import dsbridge from 'dsbridge' import dsbridge from 'dsbridge'
interface GETUSERINFO{ export enum RoleType{
LEADER = 0,
SUPER_ADMIN = 1,
CUSTOMER_ADMIN = 2,
COMMON_MEMBER = 3,
CHILD_ADMIN = 4,
}
export interface GETUSERINFO{
    "company": any,     "company": any,
    "depId": string,     "depId": string,
...@@ -17,7 +25,7 @@ interface GETUSERINFO{ ...@@ -17,7 +25,7 @@ interface GETUSERINFO{
    "name": string,     "name": string,
    "phone": string,     "phone": string,
    "position": string,     "position": string,
    "role": number     "role":RoleType
} }
...@@ -42,8 +50,9 @@ export function isAppEnv() { ...@@ -42,8 +50,9 @@ export function isAppEnv() {
} }
export function appNavBack(){ export function appNavBack(){
const appEnv = isAppEnv()
console.log(111); console.log(111);
const appEnv = isAppEnv()
if(appEnv){ if(appEnv){
goBack() goBack()
...@@ -127,6 +136,8 @@ export function getSign(obj: object) { ...@@ -127,6 +136,8 @@ export function getSign(obj: object) {
export function getPublicKey(){ export function getPublicKey(){
const data = dsbridge.call(BridgeMethods.GET_PUBLIC_KEY,{},res=>{ const data = dsbridge.call(BridgeMethods.GET_PUBLIC_KEY,{},res=>{
console.log(res);
return res return res
}) })
return data return data
......
...@@ -121,7 +121,7 @@ export default Vue.extend({ ...@@ -121,7 +121,7 @@ export default Vue.extend({
this.loading = true this.loading = true
const {depId,entId,expiration,hash,inviterId,joinTime,name,oaServer,phone,position} = this.info as AcceptJoinDTO const {depId,entId,expiration,hash,inviterId,joinTime,name,oaServer,phone,position} = this.info as AcceptJoinDTO
let req = { let req = {
depId,entId,expiration: Number(expiration)/1000,hash,inviterId,joinTime:Number(joinTime)/1000,name,oaServer,phone,position depId,entId,expiration: Math.round(Number(expiration)/1000) ,hash,inviterId,joinTime: Math.round(Number(joinTime)/1000),name,oaServer,phone,position
} }
this.$service.enterprise.acceptJoin(req) this.$service.enterprise.acceptJoin(req)
.then((res: any) => { .then((res: any) => {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<c-button round @click="$router.push('/team/team-management')">确定</c-button> <c-button round @click="$router.push('/team/team-management')">确定</c-button>
</template> </template>
<template v-else> <template v-else>
<div class="grid grid-cols-3 gap-2.5"> <div class="grid grid-cols-3 gap-2.5" v-if="getUserInfo.role === 3" >
<c-button round @click="$router.push('/team/add-member')">添加成员</c-button> <c-button round @click="$router.push('/team/add-member')">添加成员</c-button>
<c-button round @click="$router.push('/team/add-department')">添加部门</c-button> <c-button round @click="$router.push('/team/add-department')">添加部门</c-button>
<c-button round @click="setDepartment">部门设置</c-button> <c-button round @click="setDepartment">部门设置</c-button>
...@@ -59,7 +59,7 @@ import Vue from 'vue' ...@@ -59,7 +59,7 @@ import Vue from 'vue'
import { team, contacts } from '@/DTO' import { team, contacts } from '@/DTO'
import { Member } from '@/DTO' import { Member } from '@/DTO'
import { getContacts } from '@/util/Contact' import { getContacts } from '@/util/Contact'
import { openCompanyUserInfo } from '@/util/Bridge' import { openCompanyUserInfo ,appNavBack, getUserInfo} from '@/util/Bridge'
export default Vue.extend({ export default Vue.extend({
name: 'TeamDetail', name: 'TeamDetail',
...@@ -101,6 +101,11 @@ export default Vue.extend({ ...@@ -101,6 +101,11 @@ export default Vue.extend({
immediate: false immediate: false
} }
}, },
computed:{
getUserInfo(){
return getUserInfo()
}
},
created() { created() {
this.showRadio = this.$route.query.showRadio === '1' this.showRadio = this.$route.query.showRadio === '1'
this.multiple = this.$route.query.multiple === '2' this.multiple = this.$route.query.multiple === '2'
...@@ -109,6 +114,7 @@ export default Vue.extend({ ...@@ -109,6 +114,7 @@ export default Vue.extend({
this.getStaff(this.parentId) this.getStaff(this.parentId)
}, },
methods: { methods: {
appNavBack,
// 获取成员 // 获取成员
getStaff(id: string) { getStaff(id: string) {
this.loading = true this.loading = true
......
...@@ -100,8 +100,9 @@ export default Vue.extend({ ...@@ -100,8 +100,9 @@ export default Vue.extend({
} }
}, },
mounted() { mounted() {
this.entId = getUserInfo()?.entId || '166961152260050944' this.entId = process.env.NODE_EN==='production'? getUserInfo()?.entId : '166961152260050944'
console.log(this.entId) console.log('这里出来了么?',this.entId);
localStorage.setItem('USR_INFO', JSON.stringify(getUserInfo())) localStorage.setItem('USR_INFO', JSON.stringify(getUserInfo()))
this.getEntInfo() this.getEntInfo()
}, },
...@@ -115,10 +116,7 @@ export default Vue.extend({ ...@@ -115,10 +116,7 @@ export default Vue.extend({
this.parentId = dep.id this.parentId = dep.id
this.getStaff() this.getStaff()
}, },
appNavBack(){ appNavBack,
// this.$router.go(-1)
appNavBack()
},
getEntInfo() { getEntInfo() {
this.loading = true this.loading = true
return this.$service.enterprise.getEnterpriseInfo({ return this.$service.enterprise.getEnterpriseInfo({
......
...@@ -103,8 +103,9 @@ export default Vue.extend({ ...@@ -103,8 +103,9 @@ export default Vue.extend({
async created() { async created() {
// console.log(Mock, 'mock') // console.log(Mock, 'mock')
this.joinInfo = this.$store.state.acceptJoin this.joinInfo = this.$store.state.acceptJoin
const urloutput = this.outputUrl(this.joinInfo) console.log(this.joinInfo);
const urloutput = await this.outputUrl(this.joinInfo)
this.qrCodeText = JSON.stringify(this.joinInfo) this.qrCodeText = JSON.stringify(this.joinInfo)
let url = window.location.origin + '/team/confirm-join' let url = window.location.origin + '/team/confirm-join'
this.qrCodeText = `${url}?${urloutput}` this.qrCodeText = `${url}?${urloutput}`
...@@ -129,7 +130,6 @@ export default Vue.extend({ ...@@ -129,7 +130,6 @@ export default Vue.extend({
string = `${i[0]}=${encodeURIComponent(i[1])}` string = `${i[0]}=${encodeURIComponent(i[1])}`
} }
res += string res += string
}) })
return res return res
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment