Commit 16f87b5b authored by hanfeng zhang's avatar hanfeng zhang

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

parents 551dccc6 c5e67198
......@@ -68,7 +68,7 @@ export default Vue.extend({
data() {
const addDep:AddSubDTO = {
entId: '',
leaderId: '1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR',
leaderId: '',
name: '',
parentId: ''
}
......@@ -97,7 +97,7 @@ export default Vue.extend({
addDep,
parentDep: {},
leader: {},
selectedLeaderId: ['1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR'],
selectedLeaderId: [] as Array<string>,
showMemberSelector: false,
entId: '',
depTree,
......@@ -108,7 +108,9 @@ export default Vue.extend({
}
},
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])
const depId = this.$route.query.id as string
this.selectedDepId = depId
......@@ -116,12 +118,6 @@ export default Vue.extend({
},
methods: {
addDepConfirm(){
// const { data, loading, error, run} =useRequest(this.$service.department.addDep({
// "entId": "entId",
// "leaderId": "leaderId",
// "name": "name",
// "parentId": "parentId"
// }))
if (this.name === '') {
this.$toast('请输入部门名称')
return
......@@ -192,17 +188,15 @@ export default Vue.extend({
})
},
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.showDepSelector = true
}
},
watch: {
selectedLeaderId: {
handler(val) {
selectedLeaderId(val) {
const newLeader = val[0]
this.getStaffInfo(newLeader)
}
},
selectedDepId(val: string) {
this.getDepInfo(val)
......
......@@ -116,12 +116,12 @@ export default Vue.extend({
}
const acceptJoin: AcceptJoinDTO = {
expiration: 0,
inviterId: '17MTDNzwBXXKNzwdzEnQrehmSEPAy31sUS',
inviterId: '',
name: '',
oaServer: 'oaServer',
oaServer: '',
depId: '',
entId: '',
hash: 'mock-hash',
hash: '',
joinTime: new Date().getTime(),
phone: '',
position: ''
......@@ -130,7 +130,7 @@ export default Vue.extend({
formatDate,
date: '请选择入职时间', // 入职时间
show: false, // 日期弹窗
depId: '123',
depId: '',
entId: '',
selectedDepId: '',
currentDep,
......@@ -150,7 +150,7 @@ export default Vue.extend({
},
methods: {
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)
this.depTree = dep.dep
this.depTree.children = dep.subDepList
......@@ -216,15 +216,12 @@ export default Vue.extend({
this.acceptJoin.entId = this.entId
this.acceptJoin.depId = this.selectedDepId
this.acceptJoin.expiration = this.acceptJoin.joinTime + 6000000
console.log(getPublicKey(),'getPublicKey');
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'
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
})
}) : 'mock-hash'
this.$store.commit('setAcceptJoin', this.acceptJoin)
this.$router.push('/team/two-code')
}).catch(() => { })
......
......@@ -145,7 +145,7 @@ export default Vue.extend({
this.$toast('创建成功')
this.name = ''
this.leaderName = ''
goBack()
this.$router.push('/team/team-frame')
} else {
this.$toast(data.msg)
}
......
......@@ -21,7 +21,6 @@
type="file"
id="uploadFile"
ref="uploadFile"
accept=".xlsx"
class="hidden"
@input="fileHandler"
/>
......@@ -139,7 +138,11 @@ export default Vue.extend({
if (target.files && target.files?.length !== 0) {
console.log(target.files);
const file = target.files[0];
if (file.name.match(/\.xlsx$/)) {
this.file = file;
} else {
Toast.fail('请选择xlsx文件')
}
}
},
uploadFile() {
......
......@@ -90,7 +90,7 @@ export default Vue.extend({
loading: false,
contacts: {},
parentId: '',
entId: '166961152260050944',
entId: '',
ifContainChildDep: true,
enterpriseInfo: {},
currentDep,
......@@ -101,7 +101,8 @@ export default Vue.extend({
}
},
mounted() {
// useLocalStorageState('USER_INFO',getUserInfo())
this.entId = getUserInfo()?.entId || '166961152260050944'
localStorage.setItem('USR_INFO', JSON.stringify(getUserInfo()))
this.getEntInfo()
},
computed: {
......@@ -115,10 +116,6 @@ export default Vue.extend({
this.getStaff()
},
appNavBack,
// appNavBack(){
// this.$router.go(-1)
// // appNavBack()
// },
getEntInfo() {
this.loading = true
return this.$service.enterprise.getEnterpriseInfo({
......
......@@ -19,7 +19,7 @@
/> -->
<div class="w-32 h-32">
<vue-qr
:logoSrc="require('@/assets/icons/y-chat33.png')"
:logoSrc="require('@/assets/icons/ssyx.png')"
:text="qrCodeText"
:margin="2"
: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