修改飞书登录 公司id 系统id 获取不到问题 客户及公海添加用户信息显示

This commit is contained in:
浅念
2025-07-30 11:46:31 +08:00
parent 0cef82279f
commit 3ea9d3d5df
7 changed files with 37 additions and 28 deletions
+3 -3
View File
@@ -20,11 +20,11 @@
const params = new URLSearchParams(window.location.search)
const companyid = params.get('corp_id')
const companyabbr = params.get('corp_abbr')
const systemid = params.get('system_id')
const system_code = params.get('system_code')
// const systemid = params.get('system_id')
// const system_code = params.get('system_code')
if (companyid) {
userStore.setCompany(companyid, companyabbr || '')
userStore.setSystems(systemid || '', system_code || '')
// userStore.setSystems(systemid || '', system_code || '')
// 你也可以加 localStorage/sessionStorage 备份
}
}
+3 -2
View File
@@ -104,8 +104,8 @@
</el-table-column>
<el-table-column prop="quality" label="客户商机">
<template #default="scope">
<span :style="scope.row.quality==0 ? { color: '#F5AB00' } : scope.row.quality==1 ? { color: '#8495B8' }: { color: '#9B7200' }">
{{scope.row.quality==0 ? '金牌商机' : scope.row.quality==1 ? '银牌商机' : '铜牌商机'}}
<span :style="scope.row.quality==1 ? { color: '#F5AB00' } : scope.row.quality==2 ? { color: '#8495B8' }: { color: '#9B7200' }">
{{scope.row.quality==1 ? '金牌商机' : scope.row.quality==2 ? '银牌商机' : '铜牌商机'}}
</span>
</template>
</el-table-column>
@@ -140,6 +140,7 @@
</span>
</template>
</el-table-column> -->
<el-table-column prop="created_at" label="创建时间"></el-table-column>
<el-table-column fixed="right" label="操作" width="260px">
<template #default="scope">
<div class="follow-action fenpei" @click="onFenpei(scope.row)">
+17 -19
View File
@@ -205,7 +205,7 @@
const isPassing = ref(false)
const isClickPass = ref(false)
const activeLoginType = ref<'password' | 'qrcode'>('qrcode')
const isInFeishu = /Lark|Feishu/i.test(navigator.userAgent);
const isInFeishu = /Lark|Feishu/i.test(navigator.userAgent)
// const isInFeishu = true;
const systemName = AppConfig.systemInfo.name
const formRef = ref<FormInstance>()
@@ -214,7 +214,7 @@
const systemsid = ref('')
systemsid.value = useUserStore().systemsid
const iscompany = ref(false)
const { companyabbr } = useUserStore()
const { companyabbr, systemsabbr } = useUserStore()
//获取公司 getCompanyList
const companyList = ref<any>()
//系统
@@ -222,13 +222,12 @@
const feishuresponse = ref()
const formData = reactive({
account: '',
systems: useUserStore().companyid ? Number(useUserStore().companyid) : '',
systems: useUserStore().systemsid ? Number(useUserStore().systemsid) : '',
company: useUserStore().companyid ? Number(useUserStore().companyid) : '',
username: '',
password: '',
rememberPassword: true
})
const rules = computed<FormRules>(() => ({
username: [{ required: true, message: t('login.placeholder[0]'), trigger: 'blur' }],
password: [{ required: true, message: t('login.placeholder[1]'), trigger: 'blur' }],
@@ -256,8 +255,8 @@
const getfeishuAppList = async () => {
feishuresponse.value = await UserService.getfeishuAppList({
corp_id: companyid.value,
system_id: systemsid.value
corp_id: useUserStore().companyid,
system_id: useUserStore().systemsid
})
if (activeLoginType.value == 'qrcode') {
feishulogin()
@@ -268,12 +267,11 @@
const systemsdata = systemsList.value.find((c: any) => c.id === systems)
systemsid.value = systems
userStore.setSystems(systems, systemsdata?.code)
if (companyid.value && systemsid.value) {
if (useUserStore().companyid && systemsid.value) {
getfeishuAppList()
}
}
//切换公司
const changeCompany = (company: any) => {
// if (companyid.value === company) return
const companyt = companyList.value.find((c: any) => c.id === company)
@@ -284,7 +282,7 @@
getfeishuAppList()
}
}
if (companyabbr != '') {
if (companyabbr != '' && systemsabbr != '') {
iscompany.value = true
getfeishuAppList()
}
@@ -443,20 +441,20 @@
const companyabbr = Array.isArray(route.query.corp_abbr)
? route.query.corp_abbr[0]
: route.query.corp_abbr
const system_id = Array.isArray(route.query.system_id)
? route.query.system_id[0]
: route.query.system_id
const system_code = Array.isArray(route.query.system_code)
? route.query.system_code[0]
: route.query.system_code
// const system_id = Array.isArray(route.query.system_id)
// ? route.query.system_id[0]
// : route.query.system_id
// const system_code = Array.isArray(route.query.system_code)
// ? route.query.system_code[0]
// : route.query.system_code
if (companyid) {
userStore.setCompany(companyid as string, (companyabbr as string) || '')
formData.company = Number(companyid)
}
if (system_id) {
userStore.setSystems(companyid as string, (system_code as string) || '')
formData.systems = Number(system_id)
}
// if (system_id) {
// userStore.setSystems(companyid as string, (system_code as string) || '')
// formData.systems = Number(system_id)
// }
// 只有两个 id 都有值时才调用
if (companyid && systemsid.value) {
getfeishuAppList()
+4 -1
View File
@@ -84,6 +84,8 @@
<el-table-column prop="magnitude_txt" label="客户商机" align="center" />
<el-table-column prop="channel_name" label="渠道" align="center" />
<el-table-column prop="phone" label="电话" align="center" />
<el-table-column prop="WhatsApp" label="WhatsApp" align="center" />
<el-table-column prop="email" label="邮箱" align="center" />
<el-table-column prop="grade_txt" label="等级" align="center" />
<el-table-column prop="follow" label="状态" align="center">
<template #default="scope">
@@ -92,6 +94,7 @@
</span>
</template>
</el-table-column>
<el-table-column prop="enter_user_name" label="录单人"></el-table-column>
<el-table-column fixed="right" label="操作" width="200px" align="center">
<template #default="scope">
<el-link
@@ -270,7 +273,7 @@
font-weight: bold;
}
:deep(.el-table__empty-block) {
height: 300px !important;
height: 450px !important;
}
:deep(.el-table__body tr.custom-table-row td) {
border-bottom: 1px solid #f7f9fa !important;
+4 -1
View File
@@ -31,9 +31,12 @@
<template #default>
<el-table-column prop="contacts" label="客户名称"></el-table-column>
<el-table-column prop="phone" label="电话"></el-table-column>
<el-table-column prop="WhatsApp" label="WhatsApp"></el-table-column>
<el-table-column prop="email" label="邮箱"></el-table-column>
<el-table-column prop="magnitude_txt" label="客户商机"></el-table-column>
<el-table-column prop="channel_name" label="渠道"></el-table-column>
<el-table-column prop="country_name" label="国家"></el-table-column>
<el-table-column prop="enter_user_name" label="录单人"></el-table-column>
<el-table-column fixed="right" label="操作" width="160px">
<template #default="scope">
<div class="follow-detli" @click="onDetail(scope.row)">
@@ -67,7 +70,7 @@
const loading = ref(false)
const pagination = reactive({
currentPage: 1,
pageSize: 20,
pageSize: 10,
total: 0
})
const remindRange = ref('')
+5 -1
View File
@@ -343,8 +343,12 @@
<style lang="scss" scoped>
.table {
::v-deep(.el-scrollbar__view) {
width: 100% !important;
}
:deep(.el-table__empty-block) {
height: 300px !important;
height: 400px !important;
width: 100% !important;
}
}
.homeheard {
+1 -1
View File
@@ -133,6 +133,6 @@
display: none;
}
:deep(.el-table__empty-block) {
height: 300px !important;
height: 400px !important;
}
</style>