|
@@ -8,14 +8,24 @@
|
|
|
import { Edit, Monitor, Picture as IconPicture, RefreshLeft, Timer } from '@element-plus/icons-vue';
|
|
|
import { useResponse } from '/@/utils/useResponse';
|
|
|
import * as api from '/@/views/shop-information/api';
|
|
|
-import { computerColumns, historyColumns, shopCurrentColumns, companySelect } from '/@/views/shop-information/useColumns';
|
|
|
+import {
|
|
|
+ computerColumns,
|
|
|
+ historyColumns,
|
|
|
+ shopCurrentColumns,
|
|
|
+ companySelect
|
|
|
+} from '/@/views/shop-information/useColumns';
|
|
|
import { useTableData } from '/@/utils/useTableData';
|
|
|
import { usePagination } from '/@/utils/usePagination';
|
|
|
import EditDrawer from './EditDrawer.vue';
|
|
|
+import { getOperator } from '/@/views/shop-information/api';
|
|
|
+import { useTableHeight } from '/@/utils/useTableHeight';
|
|
|
+
|
|
|
+const cardContainer: Ref<HTMLElement | null> = useTemplateRef('cardContainer');
|
|
|
+const { tableHeight } = useTableHeight(cardContainer );
|
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
-const platformNumber = route.query.platformNumber;
|
|
|
+const platformNumber = route.query.platformNumber as string;
|
|
|
const shopOverview: any = ref([]);
|
|
|
const overviewLoading = ref(false);
|
|
|
const selectedTab = ref('1');
|
|
@@ -25,7 +35,7 @@ const gridOptions: any = reactive({
|
|
|
round: true,
|
|
|
stripe: true,
|
|
|
currentRowHighLight: true,
|
|
|
- height: 870,
|
|
|
+ height: '100%',
|
|
|
toolbarConfig: {
|
|
|
custom: true,
|
|
|
slots: {
|
|
@@ -59,6 +69,8 @@ const formSelect = ref<{ country: string[], line: string[] }>({
|
|
|
line: []
|
|
|
});
|
|
|
|
|
|
+const operatorName = ref<{ id: number; name: string }[]>([]);
|
|
|
+
|
|
|
// const companySelect = ref<{ id: string, company: string }>({
|
|
|
// id: '',
|
|
|
// company: ''
|
|
@@ -68,6 +80,7 @@ onBeforeMount(() => {
|
|
|
fetchShopDetailOverview();
|
|
|
handleTabChange(selectedTab.value);
|
|
|
fetchSelect();
|
|
|
+ fetchOperator();
|
|
|
});
|
|
|
|
|
|
async function fetchSelect() {
|
|
@@ -114,137 +127,150 @@ function handleRefresh() {
|
|
|
handleTabChange(selectedTab.value);
|
|
|
}
|
|
|
|
|
|
+async function fetchOperator() {
|
|
|
+ const res = await useResponse({}, api.getOperator);
|
|
|
+ operatorName.value = res.data;
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div class="p-2.5">
|
|
|
- <el-card v-loading="overviewLoading" body-class="flex items-center gap-10" shadow="hover" style="border: none">
|
|
|
- <div v-if="platformNumber" class="artistic-text-container mr-7 ">
|
|
|
- <div class="artistic-text">
|
|
|
- {{ platformNumber }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <el-image v-else class="mr-7 rounded-2xl" src="" style="height: 120px; width: 120px; object-fit: contain">
|
|
|
- <template #error>
|
|
|
- <div class="mr-3.5 flex items-center justify-center text-5xl"
|
|
|
- style="height: 100%; width: 100%; background-color: #f5f5f5">
|
|
|
- <el-icon>
|
|
|
- <icon-picture/>
|
|
|
- </el-icon>
|
|
|
+ <div class="p-5 flex flex-col gap-2.5">
|
|
|
+ <el-card v-loading="overviewLoading" shadow="hover" style="border: none">
|
|
|
+ <div ref="cardContainer" class="flex items-center gap-10">
|
|
|
+ <div v-if="platformNumber" class="artistic-text-container mr-7 ">
|
|
|
+ <div class="artistic-text">
|
|
|
+ {{ platformNumber }}
|
|
|
</div>
|
|
|
- </template>
|
|
|
- </el-image>
|
|
|
- <div class="text-lg">
|
|
|
- <div class="font-semibold">
|
|
|
- 平台编号:
|
|
|
- <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
+ </div>
|
|
|
+ <el-image v-else class="mr-7 rounded-2xl" src="" style="height: 120px; width: 120px; object-fit: contain">
|
|
|
+ <template #error>
|
|
|
+ <div class="mr-3.5 flex items-center justify-center text-5xl"
|
|
|
+ style="height: 100%; width: 100%; background-color: #f5f5f5">
|
|
|
+ <el-icon>
|
|
|
+ <icon-picture />
|
|
|
+ </el-icon>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-image>
|
|
|
+ <div class="text-lg">
|
|
|
+ <div class="font-semibold">
|
|
|
+ 平台编号:
|
|
|
+ <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
{{ shopOverview[0]?.platformNumber ? shopOverview[0]?.platformNumber : '--' }}
|
|
|
</span>
|
|
|
- </div>
|
|
|
- <div class="font-semibold">
|
|
|
- 所属公司:
|
|
|
- <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
+ </div>
|
|
|
+ <div class="font-semibold">
|
|
|
+ 所属公司:
|
|
|
+ <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
{{ shopOverview[0]?.company ? shopOverview[0]?.company : '--' }}
|
|
|
</span>
|
|
|
- </div>
|
|
|
- <div class="font-semibold">
|
|
|
- 所属平台:
|
|
|
- <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
+ </div>
|
|
|
+ <div class="font-semibold">
|
|
|
+ 所属平台:
|
|
|
+ <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
{{ shopOverview[0]?.platform ? shopOverview[0]?.platform : '--' }}
|
|
|
</span>
|
|
|
- </div>
|
|
|
- <div class="font-semibold">
|
|
|
- 运营:
|
|
|
- <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
+ </div>
|
|
|
+ <div class="font-semibold">
|
|
|
+ 运营:
|
|
|
+ <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
{{ shopOverview[0]?.operatorName ? shopOverview[0]?.operatorName : '--' }}
|
|
|
</span>
|
|
|
- </div>
|
|
|
- <div class="font-semibold">
|
|
|
- 电脑:
|
|
|
- <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
+ </div>
|
|
|
+ <div class="font-semibold">
|
|
|
+ 电脑:
|
|
|
+ <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
{{ shopOverview[0]?.countComputer === 0 ? '0' : shopOverview[0]?.countComputer || '--' }}
|
|
|
</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="text-lg">
|
|
|
- <div class="font-semibold">
|
|
|
- 主账户手机号及归属人:
|
|
|
- <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
+ <div class="text-lg">
|
|
|
+ <div class="font-semibold">
|
|
|
+ 主账户手机号及归属人:
|
|
|
+ <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
{{ shopOverview[0]?.shopPhoneAndNameStr ? shopOverview[0]?.shopPhoneAndNameStr : '--' }}
|
|
|
</span>
|
|
|
- </div>
|
|
|
- <div class="font-semibold">
|
|
|
- 主账户Email:
|
|
|
- <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
+ </div>
|
|
|
+ <div class="font-semibold">
|
|
|
+ 主账户Email:
|
|
|
+ <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
{{ shopOverview[0]?.shopEmail ? shopOverview[0]?.shopEmail : '--' }}
|
|
|
</span>
|
|
|
- </div>
|
|
|
- <div class="font-semibold">
|
|
|
- 子账户手机号及归属人:
|
|
|
- <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
+ </div>
|
|
|
+ <div class="font-semibold">
|
|
|
+ 子账户手机号及归属人:
|
|
|
+ <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
{{ shopOverview[0]?.subShopPhoneAndNameStr ? shopOverview[0]?.subShopPhoneAndNameStr : '--' }}
|
|
|
</span>
|
|
|
- </div>
|
|
|
- <div class="font-semibold">
|
|
|
- 子账户Email:
|
|
|
- <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
+ </div>
|
|
|
+ <div class="font-semibold">
|
|
|
+ 子账户Email:
|
|
|
+ <span class="font-medium italic ml-1.5" style="color: #64748b">
|
|
|
{{ shopOverview[0]?.subShopEmail ? shopOverview[0]?.subShopEmail : '--' }}
|
|
|
</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
</el-card>
|
|
|
- <el-card body-style="padding-top: 10px" class="mt-2.5" shadow="hover" style="border: none">
|
|
|
- <vxe-grid v-bind="gridOptions">
|
|
|
- <template #toolbar_buttons>
|
|
|
- <el-radio-group v-model="selectedTab" @change="handleTabChange(selectedTab)">
|
|
|
- <el-radio-button label="当前信息" value="1">
|
|
|
- <template #default>
|
|
|
- <el-icon style="top: 2px;">
|
|
|
- <Timer/>
|
|
|
- </el-icon>
|
|
|
- 当前信息
|
|
|
- </template>
|
|
|
- </el-radio-button>
|
|
|
- <el-radio-button label="历史记录" value="2">
|
|
|
- <template #default>
|
|
|
- <el-icon style="top: 2px;">
|
|
|
- <RefreshLeft/>
|
|
|
- </el-icon>
|
|
|
- 历史记录
|
|
|
- </template>
|
|
|
- </el-radio-button>
|
|
|
- <el-radio-button label="电脑信息" value="3">
|
|
|
- <template #default>
|
|
|
- <el-icon style="top: 2px;">
|
|
|
- <Monitor/>
|
|
|
- </el-icon>
|
|
|
- 电脑信息
|
|
|
- </template>
|
|
|
- </el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
- </template>
|
|
|
- <template #toolbar_tools>
|
|
|
- <div class="mr-2.5">
|
|
|
- <el-button :icon="Edit" plain circle type="warning" @click="drawerOpen" :disabled="selectedTab != '1'"></el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template #pager>
|
|
|
- <vxe-pager
|
|
|
- v-model:currentPage="gridOptions.pagerConfig.page"
|
|
|
- v-model:pageSize="gridOptions.pagerConfig.limit"
|
|
|
- :total="gridOptions.pagerConfig.total"
|
|
|
- @page-change="handlePageChange"
|
|
|
- >
|
|
|
- </vxe-pager>
|
|
|
- </template>
|
|
|
- </vxe-grid>
|
|
|
+ <el-card class="mt-2.5 flex-1" shadow="hover" style="border: none">
|
|
|
+ <div :style="{ height: tableHeight + 'px' }">
|
|
|
+ <vxe-grid v-bind="gridOptions">
|
|
|
+ <template #toolbar_buttons>
|
|
|
+ <el-radio-group v-model="selectedTab" @change="handleTabChange(selectedTab)">
|
|
|
+ <el-radio-button label="当前信息" value="1">
|
|
|
+ <template #default>
|
|
|
+ <el-icon style="top: 2px;">
|
|
|
+ <Timer />
|
|
|
+ </el-icon>
|
|
|
+ 当前信息
|
|
|
+ </template>
|
|
|
+ </el-radio-button>
|
|
|
+ <el-radio-button label="历史记录" value="2">
|
|
|
+ <template #default>
|
|
|
+ <el-icon style="top: 2px;">
|
|
|
+ <RefreshLeft />
|
|
|
+ </el-icon>
|
|
|
+ 历史记录
|
|
|
+ </template>
|
|
|
+ </el-radio-button>
|
|
|
+ <el-radio-button label="电脑信息" value="3">
|
|
|
+ <template #default>
|
|
|
+ <el-icon style="top: 2px;">
|
|
|
+ <Monitor />
|
|
|
+ </el-icon>
|
|
|
+ 电脑信息
|
|
|
+ </template>
|
|
|
+ </el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ </template>
|
|
|
+ <template #toolbar_tools>
|
|
|
+ <div class="mr-2.5">
|
|
|
+ <el-button :disabled="selectedTab != '1'" :icon="Edit" circle plain type="warning"
|
|
|
+ @click="drawerOpen"></el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #pager>
|
|
|
+ <vxe-pager
|
|
|
+ v-model:currentPage="gridOptions.pagerConfig.page"
|
|
|
+ v-model:pageSize="gridOptions.pagerConfig.limit"
|
|
|
+ :total="gridOptions.pagerConfig.total"
|
|
|
+ @page-change="handlePageChange"
|
|
|
+ >
|
|
|
+ </vxe-pager>
|
|
|
+ </template>
|
|
|
+ </vxe-grid>
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-card>
|
|
|
<EditDrawer
|
|
|
v-if="isOpen"
|
|
|
v-model="isOpen"
|
|
|
- :formSelect
|
|
|
:companySelect
|
|
|
+ :formSelect
|
|
|
:gridOptions="gridOptions"
|
|
|
+ :operatorName
|
|
|
:platformNumber
|
|
|
@refresh="handleRefresh"
|
|
|
/>
|