|
|
@@ -94,7 +94,7 @@ const isShowHistory = ref(false);
|
|
|
|
|
|
onBeforeMount(() => {
|
|
|
gridOptions.pagerConfig.limit = 10;
|
|
|
-})
|
|
|
+});
|
|
|
|
|
|
onMounted(() => {
|
|
|
fetchList();
|
|
|
@@ -110,7 +110,7 @@ async function fetchList(isQuery = false) {
|
|
|
// 清空数据和列
|
|
|
gridOptions.data = [];
|
|
|
gridOptions.columns = [];
|
|
|
-
|
|
|
+
|
|
|
const query = {
|
|
|
country_code: queryParameter?.country,
|
|
|
goods__brand: queryParameter?.brand,
|
|
|
@@ -122,9 +122,9 @@ async function fetchList(isQuery = false) {
|
|
|
platform_number: queryParameter?.platformId,
|
|
|
goods__all_ratings: queryParameter?.scoreNumber,
|
|
|
goods__all_reviews: queryParameter?.commentNumber,
|
|
|
- goods__all_score: queryParameter?.displayScore,
|
|
|
+ goods__all_score: queryParameter?.displayScore
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
await useTableData(api.getTableData, query, gridOptions);
|
|
|
await gridRef.value.loadColumn(CompetitorMonitorColumns);
|
|
|
|
|
|
@@ -139,17 +139,17 @@ async function handleDownload() {
|
|
|
gridOptions.loading = true;
|
|
|
try {
|
|
|
const query = {
|
|
|
- country_code: queryParameter?.country,
|
|
|
- goods__brand: queryParameter?.brand,
|
|
|
- goods__tag: queryParameter?.group,
|
|
|
- status: queryParameter?.status,
|
|
|
- shop: queryParameter?.shop,
|
|
|
- asin: queryParameter?.asin,
|
|
|
- goods__sku: queryParameter?.sku,
|
|
|
- platform_number: queryParameter?.platformId,
|
|
|
- goods__all_ratings: queryParameter?.scoreNumber,
|
|
|
- goods__all_reviews: queryParameter?.commentNumber,
|
|
|
- goods__all_score: queryParameter?.displayScore,
|
|
|
+ country_code: queryParameter?.country,
|
|
|
+ goods__brand: queryParameter?.brand,
|
|
|
+ goods__tag: queryParameter?.group,
|
|
|
+ status: queryParameter?.status,
|
|
|
+ shop: queryParameter?.shop,
|
|
|
+ asin: queryParameter?.asin,
|
|
|
+ goods__sku: queryParameter?.sku,
|
|
|
+ platform_number: queryParameter?.platformId,
|
|
|
+ goods__all_ratings: queryParameter?.scoreNumber,
|
|
|
+ goods__all_reviews: queryParameter?.commentNumber,
|
|
|
+ goods__all_score: queryParameter?.displayScore
|
|
|
};
|
|
|
const response = await api.exportData(query);
|
|
|
const url = window.URL.createObjectURL(new Blob([ response.data ]));
|
|
|
@@ -172,7 +172,7 @@ async function batchDelete() {
|
|
|
const res = await useResponse(api.batchDeleteRow, { keys: ids });
|
|
|
checkedList.value.clear();
|
|
|
if (res.code === 2000) {
|
|
|
- ElMessage.success({ message: '删除成功', plain: true });
|
|
|
+ ElMessage.error({ message: '选中项已删除!', plain: true, icon: 'Delete' });
|
|
|
handleRefresh();
|
|
|
}
|
|
|
}
|
|
|
@@ -207,7 +207,7 @@ function handleEdit(row: any) {
|
|
|
async function singleDelete(row: any) {
|
|
|
const res = await useResponse(api.deleteRow, row);
|
|
|
if (res.code === 2000) {
|
|
|
- ElMessage.success({ message: '删除成功', plain: true });
|
|
|
+ ElMessage.error({ message: '已删除!', plain: true, icon: 'Delete' });
|
|
|
handleRefresh();
|
|
|
}
|
|
|
}
|
|
|
@@ -259,28 +259,30 @@ defineExpose({ fetchList });
|
|
|
@checkbox-all="selectAllChangeEvent">
|
|
|
<template #toolbar_buttons>
|
|
|
<div class="flex gap-2">
|
|
|
- <el-popconfirm
|
|
|
- :icon="InfoFilled"
|
|
|
- icon-color="#626AEF"
|
|
|
- title="你确定要删除此项吗?"
|
|
|
- width="220"
|
|
|
- @confirm="batchDelete"
|
|
|
- >
|
|
|
- <template #reference>
|
|
|
- <PermissionButton :disabled="!checkedList.size" :icon="Delete" plain round type="danger">
|
|
|
- 批量删除
|
|
|
- </PermissionButton>
|
|
|
- </template>
|
|
|
- <template #actions="{ confirm, cancel }">
|
|
|
- <el-button size="small" @click="cancel">No!</el-button>
|
|
|
- <el-button size="small" type="danger" @click="confirm">
|
|
|
- Yes?
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
- <PermissionButton :icon="Plus" plain round type="primary" @click="handleCreate">
|
|
|
- 新 增
|
|
|
- </PermissionButton>
|
|
|
+ <div>
|
|
|
+ <el-popconfirm
|
|
|
+ :icon="InfoFilled"
|
|
|
+ icon-color="#626AEF"
|
|
|
+ title="你确定要删除此项吗?"
|
|
|
+ width="220"
|
|
|
+ @confirm="batchDelete"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <PermissionButton :disabled="!checkedList.size" :icon="Delete" plain round type="danger">
|
|
|
+ 批量删除
|
|
|
+ </PermissionButton>
|
|
|
+ </template>
|
|
|
+ <template #actions="{ confirm, cancel }">
|
|
|
+ <el-button size="small" @click="cancel">No!</el-button>
|
|
|
+ <el-button size="small" type="danger" @click="confirm">
|
|
|
+ Yes?
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <PermissionButton :icon="Plus" plain round type="primary" @click="handleCreate">新 增</PermissionButton>
|
|
|
+ </div>
|
|
|
<div class="custom-el-input">
|
|
|
<el-select v-model="templateType" placeholder="Select" style="width: 190px">
|
|
|
<template #prefix>
|
|
|
@@ -312,11 +314,11 @@ defineExpose({ fetchList });
|
|
|
<!-- @confirm="handleDownload"-->
|
|
|
<!-->-->
|
|
|
<!-- <template #reference>-->
|
|
|
- <el-button circle class="mr-3 toolbar-btn" @click="handleDownload">
|
|
|
- <el-icon>
|
|
|
- <Download />
|
|
|
- </el-icon>
|
|
|
- </el-button>
|
|
|
+ <el-button circle class="mr-3 toolbar-btn" @click="handleDownload">
|
|
|
+ <el-icon>
|
|
|
+ <Download />
|
|
|
+ </el-icon>
|
|
|
+ </el-button>
|
|
|
<!-- </template>-->
|
|
|
<!-- <template #actions="{ confirm, cancel }">-->
|
|
|
<!-- <el-button size="small" @click="cancel">No!</el-button>-->
|