Commit a59d4e44 authored by sixiaofeng's avatar sixiaofeng

合并

parents e5f4b2f3 e4d7f2ce
VUE_APP_OSS_TEMPLATE=https://ccccchy-test.obs.cn-east-3.myhuaweicloud.com/oa/员工导入模板.xlsx
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -31,3 +31,15 @@ export interface Department { ...@@ -31,3 +31,15 @@ export interface Department {
parentId: string, parentId: string,
children?: Array<Department> 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
...@@ -10,7 +10,7 @@ import service from './service' ...@@ -10,7 +10,7 @@ import service from './service'
import { global } from '@/const/Global' import { global } from '@/const/Global'
import dsbridge from 'dsbridge' import dsbridge from 'dsbridge'
import { Dialog, Toast, Notify } from 'vant' import { Dialog, Toast, Notify } from 'vant'
// import VConsole from 'vconsole' import VConsole from 'vconsole'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(Dialog).use(Toast).use(Notify) Vue.use(Dialog).use(Toast).use(Notify)
...@@ -20,7 +20,7 @@ Vue.use(utils).use(service) ...@@ -20,7 +20,7 @@ Vue.use(utils).use(service)
Vue.prototype.$dsbridge = dsbridge Vue.prototype.$dsbridge = dsbridge
Vue.prototype.$global = global Vue.prototype.$global = global
// new VConsole() new VConsole()
new Vue({ new Vue({
router, router,
......
...@@ -8,8 +8,8 @@ import { generateToken } from "@/util/Sign"; ...@@ -8,8 +8,8 @@ import { generateToken } from "@/util/Sign";
import { signAuth } from "@/util/Bridge"; import { signAuth } from "@/util/Bridge";
const Account = { export const Account = {
entId: '166910771849072640', entId: '166961152260050944',
staffId: '1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR' staffId: '1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR'
} }
interface RouterConfig{ interface RouterConfig{
...@@ -34,7 +34,7 @@ export default class BaseService { ...@@ -34,7 +34,7 @@ export default class BaseService {
} }
) )
} }
public async useService(routerConfig: RouterConfig,payload?:any){ public async useService(routerConfig: RouterConfig,payload?:any, ext?: {onUploadProgress?: (e: ProgressEvent)=>any}){
let token; let token;
let headerItems:{[key:string]:string|number} ={} let headerItems:{[key:string]:string|number} ={}
if(!routerConfig.method) routerConfig.method = 'post' if(!routerConfig.method) routerConfig.method = 'post'
...@@ -46,7 +46,8 @@ export default class BaseService { ...@@ -46,7 +46,8 @@ export default class BaseService {
headerItems[i[0]] = i[1] headerItems[i[0]] = i[1]
}) })
const res = await this.service.post(routerConfig.path,payload,{ const res = await this.service.post(routerConfig.path,payload,{
headers:headerItems headers:headerItems,
onUploadProgress: ext?.onUploadProgress
}) })
return res return res
} }
......
...@@ -4,7 +4,7 @@ import { AcceptJoinDTO, CreateEnterpriseDTO, DeleteEnterpriseDTO, DeleteSubDTO, ...@@ -4,7 +4,7 @@ import { AcceptJoinDTO, CreateEnterpriseDTO, DeleteEnterpriseDTO, DeleteSubDTO,
export default class Enterprise extends BaseService { export default class Enterprise extends BaseService {
router= { router= {
accept: { path: '/v1/enterprise/accept-join', crediential: true, headers: [['df', '1']] }, accept: { path: '/v1/enterprise/accept-join', crediential: true },
create: { path: '/v1/enterprise/create', crediential: true }, create: { path: '/v1/enterprise/create', crediential: true },
delete: { path: '/v1/enterprise/delete', crediential: true }, delete: { path: '/v1/enterprise/delete', crediential: true },
info: { path: '/v1/enterprise/info', crediential: true }, info: { path: '/v1/enterprise/info', crediential: true },
......
...@@ -3,8 +3,16 @@ import BaseService from '../base' ...@@ -3,8 +3,16 @@ import BaseService from '../base'
import { ChangeDepDTO, ChangeRoleDTO, GetRroupDTO, GetStaffInfoDTO, ResignDTO, UpdateStaffDTO } from './service.dto' import { ChangeDepDTO, ChangeRoleDTO, GetRroupDTO, GetStaffInfoDTO, ResignDTO, UpdateStaffDTO } from './service.dto'
export default class Staff extends BaseService { export default class Staff extends BaseService {
static instance: Staff
static getInstance(){
if(!Staff.instance){
Staff.instance = new Staff();
}
return Staff.instance;
}
router = { router = {
addexcel:{path:'/v1/staff/add-staffs-by-excel',crediential: true, headers:[['key','val']]}, addexcel:{path:'/v1/staff/add-staffs-by-excel',crediential: true, headers:[['content-type','multipart/form-data']]},
changeDep: { path: '/v1/staff/change-dep', crediential: true }, changeDep: { path: '/v1/staff/change-dep', crediential: true },
changeRole: { path: '/v1/staff/change-role', crediential: true }, changeRole: { path: '/v1/staff/change-role', crediential: true },
getGroup: { path: '/v1/staff/get-group', crediential: true }, getGroup: { path: '/v1/staff/get-group', crediential: true },
...@@ -15,6 +23,13 @@ export default class Staff extends BaseService { ...@@ -15,6 +23,13 @@ export default class Staff extends BaseService {
constructor() { constructor() {
super() super()
} }
async addExcel(data:File, entId: string, onUploadProgress: (e: ProgressEvent)=>any) {
const fd = new FormData();
fd.append('file_data', data)
fd.append('entId', entId)
return await this.useService(this.router.addexcel, fd, {onUploadProgress})
}
/** /**
* 变更员工部门 * 变更员工部门
......
...@@ -7,6 +7,20 @@ import router from '@/router'; ...@@ -7,6 +7,20 @@ 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{
    "company": any,
    "depId": string,
    "entId": string,
    "id": string,
    "joinTime":number,
    "name": string,
    "phone": string,
    "position": string,
    "role": number
}
enum BridgeMethods{ enum BridgeMethods{
SIGN_AUTH='signAuth', SIGN_AUTH='signAuth',
GET_USERINFO='getUserInfo', GET_USERINFO='getUserInfo',
...@@ -28,6 +42,8 @@ export function isAppEnv() { ...@@ -28,6 +42,8 @@ export function isAppEnv() {
export function appNavBack(){ export function appNavBack(){
const appEnv = isAppEnv() const appEnv = isAppEnv()
console.log(111);
if(appEnv){ if(appEnv){
goBack() goBack()
}else{ }else{
...@@ -40,7 +56,7 @@ export function appNavBack(){ ...@@ -40,7 +56,7 @@ export function appNavBack(){
* 获取用户的资料 * 获取用户的资料
* @returns * @returns
*/ */
export function getUserInfo() { export function getUserInfo():GETUSERINFO {
const data = dsbridge.call(BridgeMethods.GET_USERINFO, {}, (res) => { const data = dsbridge.call(BridgeMethods.GET_USERINFO, {}, (res) => {
return res return res
}) })
......
...@@ -4,4 +4,14 @@ export function trim(str: string) { ...@@ -4,4 +4,14 @@ export function trim(str: string) {
export function generateTree(arr: Array<any>, rootId: string) { export function generateTree(arr: Array<any>, rootId: string) {
console.log(arr, rootId) console.log(arr, rootId)
} }
\ No newline at end of file
export function formatFileSize(size: number) {
const kb = size / 1024
const mb = kb / 1024
if (mb > 1) {
return mb.toFixed(3) + 'MB'
} else {
return kb.toFixed(3) + 'KB'
}
}
...@@ -6,11 +6,12 @@ ...@@ -6,11 +6,12 @@
:ent-id="entId" :ent-id="entId"
:selected.sync="selectedDepId" :selected.sync="selectedDepId"
/> />
<main-page <main-page left-arrow :loading="loading" @click-left="handleClickLeft">
left-arrow <template #right>
:loading="loading" <div @click="$router.push({ name: 'Import' })">
@click-left="handleClickLeft" <img class="w-6 h-6" src="@/assets/icons/add_many_people.png" alt />
> </div>
</template>
<div class="px-4 pt-14 pb-16"> <div class="px-4 pt-14 pb-16">
<!-- 姓名/职位 --> <!-- 姓名/职位 -->
<input-cell <input-cell
...@@ -45,7 +46,7 @@ ...@@ -45,7 +46,7 @@
title="员工编号" title="员工编号"
placeholder="请输入员工编号" placeholder="请输入员工编号"
type="input" type="input"
/> --> />-->
<c-cell <c-cell
v-model="date" v-model="date"
dot dot
...@@ -59,24 +60,16 @@ ...@@ -59,24 +60,16 @@
:round="false" :round="false"
color="#4F62C1" color="#4F62C1"
:show-confirm="true" :show-confirm="true"
:style="{ height:'100%'}" :style="{ height: '100%' }"
@confirm="selectJoinTime" @confirm="selectJoinTime"
/> />
<!-- 选择部门 --> <!-- 选择部门 -->
<group-cell <group-cell dot required class="mt-4" title="所属部门" @click.native="selectDep">
dot
required
class="mt-4"
title="所属部门"
@click="selectDep"
>
<c-cell :title="currentDep.name" /> <c-cell :title="currentDep.name" />
</group-cell> </group-cell>
<!--按钮--> <!--按钮-->
<div class="fixed bottom-0 left-0 w-full px-4 py-1.5 bg-common-bg"> <div class="fixed bottom-0 left-0 w-full px-4 py-1.5 bg-common-bg">
<c-button @click="generateQrCode"> <c-button @click="generateQrCode">生成邀请二维码</c-button>
生成邀请二维码
</c-button>
</div> </div>
</div> </div>
</main-page> </main-page>
...@@ -86,13 +79,14 @@ ...@@ -86,13 +79,14 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
import { Calendar,Overlay } from 'vant' import { Calendar, Overlay } from 'vant'
import { AcceptJoinDTO } from '@/service/moudles/service.dto' import { AcceptJoinDTO } from '@/service/moudles/service.dto'
import { trim } from '@/util/Contact' import { trim } from '@/util/Contact'
import {Department} from '@/Interface' import { Department, LocalStore } from '@/Interface'
import { useLocalStorageState } from 'ahooks-vue' import { useLocalStorageState } from 'ahooks-vue'
import {formatDate} from '@/util/FormatDate' import { formatDate } from '@/util/FormatDate'
import DepSelector from '@/views/team/components/dep-selector.vue' import DepSelector from '@/views/team/components/dep-selector.vue'
import { getSign, getUserInfo } from '@/util/Bridge'
Vue.use(Calendar).use(Overlay) Vue.use(Calendar).use(Overlay)
export default Vue.extend({ export default Vue.extend({
...@@ -152,6 +146,7 @@ export default Vue.extend({ ...@@ -152,6 +146,7 @@ export default Vue.extend({
// this.acceptJoin = Object.assign(this.acceptJoin, this.$store.state.acceptJoin) // this.acceptJoin = Object.assign(this.acceptJoin, this.$store.state.acceptJoin)
const dep = await this.getSub(this.depId) const dep = await this.getSub(this.depId)
this.currentDep = dep.dep this.currentDep = dep.dep
this.date = this.formatDate(new Date())
}, },
methods: { methods: {
async selectDep() { async selectDep() {
...@@ -167,7 +162,7 @@ export default Vue.extend({ ...@@ -167,7 +162,7 @@ export default Vue.extend({
entId: this.entId, entId: this.entId,
parentId: parentId parentId: parentId
}).then((res: any) => { }).then((res: any) => {
const {data}=res const { data } = res
this.loading = false this.loading = false
if (data.code === this.$global.success) { if (data.code === this.$global.success) {
return data.data return data.data
...@@ -182,7 +177,7 @@ export default Vue.extend({ ...@@ -182,7 +177,7 @@ export default Vue.extend({
entId: this.entId, entId: this.entId,
id: depId id: depId
}).then((res: any) => { }).then((res: any) => {
const {data}=res const { data } = res
this.loading = false this.loading = false
if (data.code === this.$global.success) { if (data.code === this.$global.success) {
this.currentDep = data.data this.currentDep = data.data
...@@ -204,7 +199,7 @@ export default Vue.extend({ ...@@ -204,7 +199,7 @@ export default Vue.extend({
this.$router.go(-1) this.$router.go(-1)
}, },
// 入职日期 // 入职日期
selectJoinTime(date:Date) { selectJoinTime(date: Date) {
this.acceptJoin.joinTime = new Date(date).getTime() this.acceptJoin.joinTime = new Date(date).getTime()
this.show = false this.show = false
this.date = this.formatDate(date) this.date = this.formatDate(date)
...@@ -220,12 +215,17 @@ export default Vue.extend({ ...@@ -220,12 +215,17 @@ export default Vue.extend({
}).then(() => { }).then(() => {
this.acceptJoin.entId = this.entId this.acceptJoin.entId = this.entId
this.acceptJoin.depId = this.selectedDepId this.acceptJoin.depId = this.selectedDepId
this.acceptJoin.expiration = this.acceptJoin.joinTime this.acceptJoin.expiration = this.acceptJoin.joinTime + 6000000
this.acceptJoin.inviterId ="1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR"
this.acceptJoin.oaServer = 'http://172.16.101.107:20000' 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.$store.commit('setAcceptJoin', this.acceptJoin)
this.$router.push('/team/two-code') this.$router.push('/team/two-code')
}).catch(() => {}) }).catch(() => { })
} }
}, },
watch: { watch: {
...@@ -237,5 +237,4 @@ export default Vue.extend({ ...@@ -237,5 +237,4 @@ export default Vue.extend({
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
<template> <template>
<!-- 加入/创建团队 --> <!-- 加入/创建团队 -->
<div class="team-frame"> <div class="team-frame">
<main-page <main-page left-arrow @click-left="$router.go(-1)">
left-arrow
@click-left="$router.go(-1)"
>
<div class="px-4 pt-14 pb-4"> <div class="px-4 pt-14 pb-4">
<div class="rounded bg-indigo-100 text-indigo-500 px-2 py-2 text-sm">批量导入需要先下载下方的批量导入模版,将成员信息全部按要求完成填写后,可选择下方上传信息表,自动识别并添加所有成员。</div> <div
<div > class="rounded bg-indigo-100 text-indigo-500 px-2 py-2 text-sm"
<div class="flex justify-between items-center bg-white rounded px-4 py-3 my-4" > >批量导入需要先下载下方的批量导入模版,将成员信息全部按要求完成填写后,可选择下方上传信息表,自动识别并添加所有成员。</div>
<div>
<div
class="flex justify-between items-center bg-white rounded px-4 py-3 my-4"
@click="clickDownload"
>
<div>下载模板</div> <div>下载模板</div>
<app-icon <app-icon slot="right" icon-name="dot" class-name="w-1 h-1 flex items-center" />
slot="right"
icon-name="dot"
class-name="w-1 h-1 flex items-center"
/>
</div> </div>
<div class="flex justify-between items-center bg-white rounded px-4 py-3" @click='uploadFile'> <div class="bg-white rounded px-4 py-3" @click="!file && uploadFile()">
<div>上传信息表</div> <div class="flex justify-between items-center">
<input type="file" id="uploadFile" ref='uploadFile' class="hidden" @change='fileHandler'> <div>上传信息表</div>
<app-icon <input
slot="right" type="file"
icon-name="dot" id="uploadFile"
class-name="w-1 h-1 flex items-center" ref="uploadFile"
/> accept=".xlsx"
class="hidden"
@input="fileHandler"
/>
<app-icon slot="right" icon-name="dot" class-name="w-1 h-1 flex items-center" />
</div>
<div v-if="file" class="mt-3">
<div class="flex items-center">
<div
class="w-10 h-10 rounded-md bg-green-600 text-white text-3xl flex items-center justify-center"
>X</div>
<div class="ml-2">
<div>{{ file.name }}</div>
<div class="text-gray-500 text-sm">
<span class="mr-2">{{ formatDate(new Date(file.lastModified), 'YYYY/MM/DD') }}</span>
<span>{{ formatFileSize(file.size) }}</span>
</div>
</div>
</div>
<div class="flex justify-around mt-2">
<div class="flex flex-col items-center" @click.stop="clickUpload">
<img src="@/assets/icons/upload.png" alt />
<div class="text-gray-500 text-sm">上传</div>
</div>
<div class="flex flex-col items-center" @click.stop="clickDelete">
<img src="@/assets/icons/delete.png" alt />
<div class="text-gray-500 text-sm">删除</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="absolute flex justify-center bottom-1/4 inset-x-0 " v-show="show"> <!-- <div class="absolute flex justify-center bottom-1/4 inset-x-0" v-show="show">
<div class="bg-gray-700 text-white px-4 py-4 rounded w-1/3 text-center">下载已完成</div> <div class="bg-gray-700 text-white px-4 py-4 rounded w-1/3 text-center">下载已完成</div>
<div class="bg-gray-700 text-white px-4 py-4 rounded w-1/3 ml-4 text-center">上传成功</div> <div class="bg-gray-700 text-white px-4 py-4 rounded w-1/3 ml-4 text-center">上传成功</div>
</div> </div>-->
<van-popup v-model="show" position="bottom" class="px-4 py-3"> <van-popup v-model="show" position="bottom" class="px-4 py-3">
<div v-show="show" class="w-full rounded-full py-2 px-2 text-center bg-gray-500 text-white">上传中...</div> <div
<div v-show="show" class="w-full rounded-full py-2 px-2 text-center bg-gray-500 mt-3 text-white">下载中...</div> v-show="show1"
class="w-full rounded-full py-2 px-2 text-center bg-gray-500 text-white"
>上传中{{ progress }}%</div>
<div
v-show="show2"
class="w-full rounded-full py-2 px-2 text-center bg-gray-500 mt-3 text-white"
>下载中...</div>
</van-popup> </van-popup>
<van-overlay :show="show" /> <van-overlay :show="show" />
</div> </div>
</main-page> </main-page>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
import { Overlay } from 'vant'; import { Overlay, Toast } from 'vant';
import { Popup } from 'vant'; import { Popup } from 'vant';
import Staff from '@/service/moudles/Staff';
import { Account } from '@/service/base';
import { formatDate } from '@/util/FormatDate';
import { formatFileSize } from '@/util/Common';
Vue.use(Popup); Vue.use(Popup);
Vue.use(Overlay); Vue.use(Overlay);
...@@ -58,25 +95,61 @@ export default Vue.extend({ ...@@ -58,25 +95,61 @@ export default Vue.extend({
}, },
data() { data() {
return { return {
show:true, show: false,
show1: false,
show2: false,
file: undefined as undefined | File,
progress: undefined as undefined | number,
} }
}, },
methods: { methods: {
fileHandler(item:any){ clickDownload() {
console.log(item); const downloadUrl = process.env.VUE_APP_OSS_TEMPLATE as string;
const ele = document.createElement('a');
ele.target = "_self"
ele.href = downloadUrl;
document.body.appendChild(ele)
ele.click();
ele.remove();
},
formatDate,
formatFileSize,
clickDelete() {
this.file = undefined;
const fileInput = this.$refs.uploadFile as HTMLInputElement
fileInput.value = '';
}, },
uploadFile(){ onProgressChange(e: ProgressEvent) {
const percent = (e.loaded / e.total);
this.progress = Number.parseFloat((percent * 100).toFixed(1))
},
clickUpload() {
if (!this.file) return;
this.show = true;
this.show1 = true;
this.progress = 0;
Staff.getInstance().addExcel(this.file, Account.entId, this.onProgressChange).then(() => {
this.$router.push({ name: "Team" })
}).catch((err) => {
Toast.fail(err)
})
},
fileHandler(e: InputEvent) {
const target = e.target as HTMLInputElement
if (target.files && target.files?.length !== 0) {
console.log(target.files);
const file = target.files[0];
this.file = file;
}
},
uploadFile() {
console.log(this.$refs); console.log(this.$refs);
const fileInput = this.$refs.uploadFile as HTMLInputElement const fileInput = this.$refs.uploadFile as HTMLInputElement
fileInput.click() fileInput.click()
console.log(fileInput);
} }
} }
}) })
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
:loading="loading" :loading="loading"
> >
<!-- 顶部左侧插槽 --> <!-- 顶部左侧插槽 -->
<!-- <app-icon <app-icon
slot="left" slot="left"
class-name="w-6.5 w-6.5" class-name="w-6.5 w-6.5"
icon-name="left-arrow-white" icon-name="left-arrow-white"
@click="$router.go(-1)" @click="appNavBack()"
/> --> />
<div class="relative w-full h-40 bg-color-primary"> <div class="relative w-full h-40 bg-color-primary">
<!-- 背景图 --> <!-- 背景图 -->
<!-- <img class="w-82 absolute top-0 right-0" src="@/assets/images/header-bg.png" alt=""> --> <!-- <img class="w-82 absolute top-0 right-0" src="@/assets/images/header-bg.png" alt=""> -->
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
import Vue from 'vue' import Vue from 'vue'
import {formatDate} from '@/util/FormatDate' import {formatDate} from '@/util/FormatDate'
import {AcceptJoinDTO} from '@/service/moudles/service.dto' import {AcceptJoinDTO} from '@/service/moudles/service.dto'
import { appNavBack, getSign } from '@/util/Bridge'
export default Vue.extend({ export default Vue.extend({
name: 'JoinTeam', name: 'JoinTeam',
...@@ -111,15 +112,16 @@ export default Vue.extend({ ...@@ -111,15 +112,16 @@ export default Vue.extend({
created() { created() {
this.info = this.$route.query as unknown as AcceptJoinDTO this.info = this.$route.query as unknown as AcceptJoinDTO
// item = JSON.parse(query as string)
this.getDepInfo(this.info) this.getDepInfo(this.info)
}, },
methods: { methods: {
submit() { appNavBack,
async submit() {
console.log('申请') console.log('申请')
this.loading = true this.loading = true
this.$service.enterprise.acceptJoin(this.info)
this.$service.enterprise.acceptJoin(this.info)
.then((res: any) => { .then((res: any) => {
const {data} = res const {data} = res
this.loading = false this.loading = false
......
...@@ -154,7 +154,7 @@ export default Vue.extend({ ...@@ -154,7 +154,7 @@ export default Vue.extend({
console.log('添加部门') console.log('添加部门')
}, },
clickMember(member: Member) { clickMember(member: Member) {
openCompanyUserInfo(JSON.stringify(member.id)) openCompanyUserInfo(String(member.id))
// this.$router.push(`/team/team-member/${member.id}`) // this.$router.push(`/team/team-member/${member.id}`)
}, },
setDepartment() { setDepartment() {
......
...@@ -175,7 +175,14 @@ export default Vue.extend({ ...@@ -175,7 +175,14 @@ export default Vue.extend({
}) })
}, },
clickMember(member: Staff) { clickMember(member: Staff) {
<<<<<<< HEAD
openCompanyUserInfo(JSON.stringify(member)) openCompanyUserInfo(JSON.stringify(member))
=======
console.log(member.id,'dfjdsfkl');
openCompanyUserInfo(String(member.id))
// this.$router.push(`/team/team-member/${member.id}`)
>>>>>>> origin/main
}, },
clickItem(val: Department) { clickItem(val: Department) {
this.parentId = val.id this.parentId = val.id
......
...@@ -93,17 +93,10 @@ export default Vue.extend({ ...@@ -93,17 +93,10 @@ 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) const urloutput = this.outputUrl(this.joinInfo)
console.log(urloutput);
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}`
console.log( this.qrCodeText,'output');
this.dpr() this.dpr()
// this.drawCanvas() // this.drawCanvas()
}, },
...@@ -114,7 +107,12 @@ export default Vue.extend({ ...@@ -114,7 +107,12 @@ export default Vue.extend({
const arr = Object.entries(item) const arr = Object.entries(item)
arr.map((i,index)=>{ arr.map((i,index)=>{
let string 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 res += string
}) })
...@@ -128,6 +126,7 @@ export default Vue.extend({ ...@@ -128,6 +126,7 @@ export default Vue.extend({
if (window.devicePixelRatio && window.devicePixelRatio > 1) { if (window.devicePixelRatio && window.devicePixelRatio > 1) {
return window.devicePixelRatio return window.devicePixelRatio
} }
return 1 return 1
}, },
async drawCanvas(selector: string) { async drawCanvas(selector: string) {
......
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