Commit 1525aa94 authored by sixiaofeng's avatar sixiaofeng

1

parent ffe79234
...@@ -68,7 +68,7 @@ export default Vue.extend({ ...@@ -68,7 +68,7 @@ export default Vue.extend({
data() { data() {
const addDep:AddSubDTO = { const addDep:AddSubDTO = {
entId: '', entId: '',
leaderId: '1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR', leaderId: '',
name: '', name: '',
parentId: '' parentId: ''
} }
...@@ -97,7 +97,7 @@ export default Vue.extend({ ...@@ -97,7 +97,7 @@ export default Vue.extend({
addDep, addDep,
parentDep: {}, parentDep: {},
leader: {}, leader: {},
selectedLeaderId: ['1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR'], selectedLeaderId: [] as Array<string>,
showMemberSelector: false, showMemberSelector: false,
entId: '', entId: '',
depTree, depTree,
...@@ -108,7 +108,9 @@ export default Vue.extend({ ...@@ -108,7 +108,9 @@ export default Vue.extend({
} }
}, },
created(){ created(){
this.entId=JSON.parse(localStorage.getItem('ENT_INFO') || '{}').id this.entId=JSON.parse(localStorage.getItem('ENT_INFO') as string).id
const leaderId = JSON.parse(localStorage.getItem('UER_INFO') as string)?.id || '1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR'
this.selectedLeaderId = [leaderId]
this.getStaffInfo(this.selectedLeaderId[0]) this.getStaffInfo(this.selectedLeaderId[0])
const depId = this.$route.query.id as string const depId = this.$route.query.id as string
this.selectedDepId = depId this.selectedDepId = depId
...@@ -116,12 +118,6 @@ export default Vue.extend({ ...@@ -116,12 +118,6 @@ export default Vue.extend({
}, },
methods: { methods: {
addDepConfirm(){ addDepConfirm(){
// const { data, loading, error, run} =useRequest(this.$service.department.addDep({
// "entId": "entId",
// "leaderId": "leaderId",
// "name": "name",
// "parentId": "parentId"
// }))
if (this.name === '') { if (this.name === '') {
this.$toast('请输入部门名称') this.$toast('请输入部门名称')
return return
...@@ -192,17 +188,15 @@ export default Vue.extend({ ...@@ -192,17 +188,15 @@ export default Vue.extend({
}) })
}, },
selectDep() { selectDep() {
const parentId = JSON.parse(localStorage.getItem('ENT_INFO') || '{}').rootDepId const parentId = JSON.parse(localStorage.getItem('ENT_INFO') as string).rootDepId
this.getSub(parentId) this.getSub(parentId)
this.showDepSelector = true this.showDepSelector = true
} }
}, },
watch: { watch: {
selectedLeaderId: { selectedLeaderId(val) {
handler(val) { const newLeader = val[0]
const newLeader = val[0] this.getStaffInfo(newLeader)
this.getStaffInfo(newLeader)
}
}, },
selectedDepId(val: string) { selectedDepId(val: string) {
this.getDepInfo(val) this.getDepInfo(val)
......
...@@ -116,12 +116,12 @@ export default Vue.extend({ ...@@ -116,12 +116,12 @@ export default Vue.extend({
} }
const acceptJoin: AcceptJoinDTO = { const acceptJoin: AcceptJoinDTO = {
expiration: 0, expiration: 0,
inviterId: '17MTDNzwBXXKNzwdzEnQrehmSEPAy31sUS', inviterId: '',
name: '', name: '',
oaServer: 'oaServer', oaServer: '',
depId: '', depId: '',
entId: '', entId: '',
hash: 'mock-hash', hash: '',
joinTime: new Date().getTime(), joinTime: new Date().getTime(),
phone: '', phone: '',
position: '' position: ''
...@@ -130,7 +130,7 @@ export default Vue.extend({ ...@@ -130,7 +130,7 @@ export default Vue.extend({
formatDate, formatDate,
date: '请选择入职时间', // 入职时间 date: '请选择入职时间', // 入职时间
show: false, // 日期弹窗 show: false, // 日期弹窗
depId: '123', depId: '',
entId: '', entId: '',
selectedDepId: '', selectedDepId: '',
currentDep, currentDep,
...@@ -150,7 +150,7 @@ export default Vue.extend({ ...@@ -150,7 +150,7 @@ export default Vue.extend({
}, },
methods: { methods: {
async selectDep() { async selectDep() {
const parentId = JSON.parse(localStorage.getItem('ENT_INFO') || '{}').rootDepId const parentId = JSON.parse(localStorage.getItem('ENT_INFO') as string).rootDepId
const dep = await this.getSub(parentId) const dep = await this.getSub(parentId)
this.depTree = dep.dep this.depTree = dep.dep
this.depTree.children = dep.subDepList this.depTree.children = dep.subDepList
...@@ -216,14 +216,12 @@ export default Vue.extend({ ...@@ -216,14 +216,12 @@ export default Vue.extend({
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 + 6000000 this.acceptJoin.expiration = this.acceptJoin.joinTime + 6000000
this.acceptJoin.inviterId = process.env.NODE_ENV ==='production'? getPublicKey(): "1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR" this.acceptJoin.inviterId = process.env.NODE_ENV ==='production'? getPublicKey(): "1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR"
this.acceptJoin.oaServer = localStorage.getItem('ENT_INFO')? JSON.parse(localStorage.getItem('ENT_INFO') as any).oaServer : 'http://172.16.101.107:20000' 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 const {depId,entId,expiration,inviterId,joinTime,name,oaServer,phone,position} = this.acceptJoin
this.acceptJoin.hash = getSign({ this.acceptJoin.hash = process.env.NODE_ENV ==='production'? getSign({
depId,entId,expiration,inviterId,joinTime,name,oaServer,phone,position depId,entId,expiration,inviterId,joinTime,name,oaServer,phone,position
}) }) : 'mock-hash'
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(() => { })
......
...@@ -90,7 +90,7 @@ export default Vue.extend({ ...@@ -90,7 +90,7 @@ export default Vue.extend({
loading: false, loading: false,
contacts: {}, contacts: {},
parentId: '', parentId: '',
entId: '166961152260050944', entId: '',
ifContainChildDep: true, ifContainChildDep: true,
enterpriseInfo: {}, enterpriseInfo: {},
currentDep, currentDep,
...@@ -101,7 +101,8 @@ export default Vue.extend({ ...@@ -101,7 +101,8 @@ export default Vue.extend({
} }
}, },
mounted() { mounted() {
// useLocalStorageState('USER_INFO',getUserInfo()) this.entId = getUserInfo()?.entId || '166961152260050944'
localStorage.setItem('USR_INFO', JSON.stringify(getUserInfo()))
this.getEntInfo() this.getEntInfo()
}, },
computed: { computed: {
...@@ -115,8 +116,8 @@ export default Vue.extend({ ...@@ -115,8 +116,8 @@ export default Vue.extend({
this.getStaff() this.getStaff()
}, },
appNavBack(){ appNavBack(){
this.$router.go(-1) // this.$router.go(-1)
// appNavBack() appNavBack()
}, },
getEntInfo() { getEntInfo() {
this.loading = true this.loading = true
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
/> --> /> -->
<div class="w-32 h-32"> <div class="w-32 h-32">
<vue-qr <vue-qr
:logoSrc="require('@/assets/icons/y-chat33.png')" :logoSrc="require('@/assets/icons/ssyx.png')"
:text="qrCodeText" :text="qrCodeText"
:margin="2" :margin="2"
:size="400" :size="400"
......
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