Commit 02b0d615 authored by sixiaofeng's avatar sixiaofeng

1

parent cf23efb6
......@@ -19,6 +19,9 @@ export default new Vuex.Store({
setSelectedDep(state, payload) {
state.selectedDep = payload
},
setAcceptJoin(state, payload) {
state.acceptJoin = payload
},
},
actions: {
},
......
......@@ -2,13 +2,14 @@
<div class="two-code">
<main-page
left-arrow
:loading="loading"
@click-left="handleClickLeft"
>
<div class="mx-4 pt-14">
<div class="shadow-md rounded overflow-hidden" id="qrcode">
<div class="bg-color-primary text-center h-24 pt-6">
<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 class="bg-white">
<div class="flex flex-row justify-around">
......@@ -27,12 +28,18 @@
</div>
<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 >职位:{{ joinInfo.position }}</div>
<div >部门:产品设计部</div>
<div >{{ formatDate(joinInfo.joinTime, 'YYYY-MM-DD') || '2021-09-05' }}</div>
<div class="flex items-start">
<div class="flex-shrink-0 w-12">职位:</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 class=" text-center text-gray-400 pb-8 pt-4">{{msg3}}</div>
<div>{{ formatDate(joinInfo.joinTime, 'YYYY-MM-DD') || '2021-09-05' }}</div>
</div>
</div>
<div class=" text-center text-gray-400 pb-8 pt-4">扫描二维码加入我们{{entName}}的团队</div>
</div>
</div>
<div class="flex justify-center pt-8 text-color-primary font-medium text-sm text-center px-7">
......@@ -46,7 +53,7 @@
<code-icon :path="require('@/assets/icons/y-downlode.png')" class-name="h-9 w-9"/>保存
</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>
</main-page>
</div>
......@@ -59,6 +66,7 @@ import { formatDate } from '@/util/FormatDate'
import VueQr from 'vue-qr'
import html2canvas from 'html2canvas'
import { CanvasRenderer } from 'html2canvas/dist/types/render/canvas/canvas-renderer'
import { Department } from '@/Interface'
interface JoinInfoType{
depId: string
entId:string
......@@ -79,9 +87,11 @@ export default Vue.extend({
formatDate,
msg1:'团队名称',
msg2:'ABCDEF',
msg3:'扫描二维码加入我们chat33的团队',
entName:'',
joinInfo: {} as JoinInfoType,
qrCodeText:''
qrCodeText:'',
loading: false,
depInfo: {} as Department
}
},
components: {
......@@ -102,6 +112,9 @@ export default Vue.extend({
this.dpr()
// 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: {
......@@ -122,7 +135,7 @@ export default Vue.extend({
return res
},
handleClickLeft() {
this.$router.push('/team')
this.$router.push('/team/team-frame')
},
dpr() {
console.log(window.devicePixelRatio, 'pixel')
......@@ -158,6 +171,22 @@ export default Vue.extend({
},
async saveQrcode() {
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)
}
})
}
}
})
......
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