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