Merge remote-tracking branch 'origin/main' into feature/v1.2灵机空间-项目管理_rxd

# Conflicts:
#	src/api/all/common.ts
#	src/components/_base/navbar/index.vue
#	src/hooks/useTableSelectionWithPagination.ts
#	src/router/routes/modules/propertyMarketing.ts
#	src/stores/modules/side-bar/constants.ts
#	src/views/property-marketing/media-account/account-manage/components/account-table/index.vue
#	src/views/property-marketing/media-account/account-manage/components/add-account-modal/index.vue
#	src/views/property-marketing/put-account/account-data/components/filter-block/index.vue
#	src/views/property-marketing/put-account/account-manage/components/account-table/index.vue
#	src/views/property-marketing/put-account/account-manage/components/add-account-modal/index.vue
#	src/views/property-marketing/put-account/account-manage/components/filter-block/index.vue
#	src/views/property-marketing/put-account/components/status-select/constants.ts
This commit is contained in:
rd
2025-07-23 15:22:46 +08:00
66 changed files with 2144 additions and 673 deletions

View File

@ -266,9 +266,9 @@ const getProfileInfo = async () => {
let enterprises = data['enterprises'];
mobileNumber.value = data['mobile'];
accounts.value = enterprises;
enterpriseStore.setEnterpriseInfo(data);
if (enterprises.length > 0) {
enterpriseStore.setEnterpriseInfo(data.enterprises[0]);
if (enterprises.length === 1) {
handleUserLogin();
} else {

View File

@ -99,7 +99,9 @@ const addAccountVisible = ref(false);
const deleteVisible = ref(false);
const deleteTitle = ref('');
const enterpriseInfo = store.enterpriseInfo;
const enterpriseInfo = computed(() => {
return store.enterpriseInfo ?? {};
});
const okText = computed(() => {
if (!canAddAccount.value) {
@ -109,9 +111,9 @@ const okText = computed(() => {
});
const customerServiceVisible = ref(false);
const canAddAccount = computed(() => {
if (!enterpriseInfo) return false;
if (!enterpriseInfo.value) return false;
return enterpriseInfo.sub_account_quota > enterpriseInfo.used_sub_account_count;
return enterpriseInfo.value.sub_account_quota > enterpriseInfo.value.used_sub_account_count;
});
const currentSelectAccount = ref();

View File

@ -48,7 +48,9 @@ const form = reactive({
name: '',
});
const enterpriseInfo = store.enterpriseInfo;
const enterpriseInfo = computed(() => {
return store.enterpriseInfo ?? {};
});
const columns = [
{
@ -65,11 +67,13 @@ const infoVisible = ref(false);
const customerServiceVisible = ref(false);
const dataSource = computed(() => {
return enterpriseInfo ? [enterpriseInfo] : [];
return enterpriseInfo.value ? [enterpriseInfo.value] : [];
});
console.log({ dataSource });
const canUpdate = computed(() => {
if (!enterpriseInfo) return false;
return enterpriseInfo.update_name_quota > enterpriseInfo.used_update_name_count;
if (!enterpriseInfo.value) return false;
return enterpriseInfo.value.update_name_quota > enterpriseInfo.value.used_update_name_count;
});
const okText = computed(() => {
@ -81,7 +85,7 @@ const okText = computed(() => {
function handleUpdate() {
if (!canUpdate.value) {
form.name = enterpriseInfo!.name;
form.name = enterpriseInfo.value?.name;
}
infoVisible.value = true;
}

View File

@ -91,7 +91,9 @@ import axios from 'axios';
import { useUserStore } from '@/stores';
const store = useUserStore();
const userInfo = store.userInfo;
const userInfo = computed(() => {
return store.userInfo ?? {};
});
const columns = [
{
@ -115,7 +117,7 @@ const isSendCaptcha = ref(false);
const uploadInputRef = ref();
const dataSource = computed(() => {
return userInfo ? [userInfo] : [];
return userInfo.value ? [userInfo.value] : [];
});
// 表单校验规则