Commit 07f585a0 authored by hanfeng zhang's avatar hanfeng zhang

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

parents c4ca16cc ffe79234
...@@ -21,7 +21,7 @@ export default new Vuex.Store({ ...@@ -21,7 +21,7 @@ export default new Vuex.Store({
}, },
setAcceptJoin(state, payload) { setAcceptJoin(state, payload) {
state.acceptJoin = payload state.acceptJoin = payload
} },
}, },
actions: { actions: {
}, },
......
<template> <template>
<div class="createteam"> <main-page
<main-page left-arrow
left-arrow @click-left="handleClickLeft"
@click-left="handleClickLeft" >
> <div class="mx-4 pt-14 pb-2">
<div class="mx-4 pt-14 pb-2 flex flex-col h-screen"> <div class="text-xs text-color-primary bg-color-primary-light px-4 py-3 rounded">
<div class="text-xs text-color-primary bg-color-primary-light px-4 py-3 rounded"> 创建团队需选择或添加一台服务器为默认服务器,用于保存企业模块信息,聊天服务器和区块链节点自动配置。
创建团队需选择或添加一台服务器为默认服务器,用于保存企业模块信息,聊天服务器和区块链节点自动配置。 </div>
</div> <div class="mt-4">
<div class="mt-4"> <input-cell
<input-cell v-model="name"
v-model="name" required
required :limit="20"
:limit="20" label="企业/组织/团队名称"
label="企业/组织/团队名称" placeholder="请输入团队名称"
placeholder="请输入团队名称" error-msg="团队名称不能为空"
error-msg="团队名称不能为空" />
/> <input-cell
<input-cell v-model="leaderName"
v-model="leaderName" required
required :limit="20"
:limit="20" label="负责人真实姓名"
label="负责人真实姓名" placeholder="请输入真实姓名"
placeholder="请输入真实姓名" error-msg="姓名不能为空"
error-msg="姓名不能为空" class="mt-4"
class="mt-4" />
/> <group-cell
<group-cell title="选择服务器"
title="选择服务器" class="mt-4"
class="mt-4" >
> <c-cell dot>
<div slot="content" class="">
<div class="">企业服务器</div>
<div class="text-text-secondary">{{ oaServer }}</div>
</div>
</c-cell>
<div v-if="showServerList">
<c-cell dot> <c-cell dot>
<div slot="content" class=""> <div slot="content" class="">
<div class="">企业服务器</div> <div class="">聊天服务器</div>
<div class="text-text-secondary">{{ oaServer }}</div> <div class="text-text-secondary">{{ IMServer }}</div>
</div> </div>
</c-cell> </c-cell>
<div v-if="showServerList"> <c-cell dot>
<c-cell dot> <div slot="content" class="">
<div slot="content" class=""> <div class="">区块链节点</div>
<div class="">聊天服务器</div> <div class="text-text-secondary">{{ nodeServer }}</div>
<div class="text-text-secondary">{{ IMServer }}</div> </div>
</div> </c-cell>
</c-cell> </div>
<c-cell dot> <div class="bg-white flex items-center justify-center py-3" @click="showServer">
<div slot="content" class=""> <app-icon
<div class="">区块链节点</div> icon-name="right-arrow"
<div class="text-text-secondary">{{ nodeServer }}</div> :class-name="getClass"
</div> />
</c-cell> </div>
</div> </group-cell>
<div class="bg-white flex items-center justify-center py-3" @click="showServer"> </div>
<app-icon <div class="mt-6">
icon-name="right-arrow" <div class="text-center mb-3 text-text-secondary text-sm">确定创建团队将创建您的团队账号并绑定您的个人账号</div>
:class-name="getClass" <c-button @click="toConfirm">确定</c-button>
/>
</div>
</group-cell>
</div>
<div class="mt-6">
<div class="text-center mb-3 text-text-secondary text-sm">确定创建团队将创建您的团队账号并绑定您的个人账号</div>
<c-button @click="toConfirm">确定</c-button>
</div>
</div> </div>
</main-page> </div>
</div> </main-page>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
import { Dialog } from 'vant' import { Dialog } from 'vant'
import { getUserInfo } from '@/util/Bridge' import { getUserInfo, goBack } from '@/util/Bridge'
import { trim } from '@/util/Common' import { trim } from '@/util/Common'
export default Vue.extend({ export default Vue.extend({
...@@ -123,6 +121,7 @@ export default Vue.extend({ ...@@ -123,6 +121,7 @@ export default Vue.extend({
methods: { methods: {
handleClickLeft() { handleClickLeft() {
console.log('click left') console.log('click left')
goBack()
}, },
showServer() { showServer() {
this.showServerList = !this.showServerList this.showServerList = !this.showServerList
...@@ -146,6 +145,7 @@ export default Vue.extend({ ...@@ -146,6 +145,7 @@ export default Vue.extend({
this.$toast('创建成功') this.$toast('创建成功')
this.name = '' this.name = ''
this.leaderName = '' this.leaderName = ''
goBack()
} else { } else {
this.$toast(data.msg) this.$toast(data.msg)
} }
......
...@@ -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: {
...@@ -103,6 +113,9 @@ export default Vue.extend({ ...@@ -103,6 +113,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)
}
})
} }
} }
}) })
......
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