소스 검색

Merge branch 'cheney' into dev

WanGxC 6 달 전
부모
커밋
03a2422758

+ 1 - 1
src/layout/routerView/parent.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="layout-parent justify-center">
+  <div class="layout-parent">
     <router-view v-slot="{ Component }">
       <transition :name="setTransitionName" mode="out-in">
         <keep-alive v-if="showView" :include="getKeepAliveNames">

+ 30 - 3
src/views/product-manage/competitor-monitor/component/DataTableSlot.vue

@@ -6,7 +6,7 @@
  */
 
 import { useCountryInfoStore } from '/@/stores/countryInfo';
-import { Delete, InfoFilled, Operation } from '@element-plus/icons-vue';
+import { Delete, InfoFilled, Operation, Tickets, Timer } from '@element-plus/icons-vue';
 import { getTagType } from '/@/utils/useTagColor';
 import PermissionButton from '/@/components/PermissionButton/index.vue';
 import ProductInfo from '/@/views/product-manage/product-list/component/ProductInfo.vue';
@@ -164,10 +164,28 @@ function starsPercent(goods: any) {
       </el-tag>
     </div>
     <div v-else-if="field === 'operate'">
+      <div class="flex justify-center gap-2 mb-2">
+        <el-tooltip :enterable="false" :show-arrow="false" content="评论详情" hide-after="0"
+                    placement="top" popper-class="custom-btn-tooltip">
+          <PermissionButton circle plain type="success">
+            <el-icon>
+              <Tickets/>
+            </el-icon>
+          </PermissionButton>
+        </el-tooltip>
+        <el-tooltip :enterable="false" :show-arrow="false" content="历史详情" hide-after="0"
+                    placement="top" popper-class="custom-btn-tooltip">
+          <PermissionButton circle plain type="success">
+            <el-icon>
+              <Timer/>
+            </el-icon>
+          </PermissionButton>
+        </el-tooltip>
+      </div>
       <div class="flex justify-center gap-2">
         <PermissionButton circle plain type="warning" @click="handleEdit">
           <el-icon>
-            <Operation />
+            <Operation/>
           </el-icon>
         </PermissionButton>
         <el-popconfirm
@@ -180,7 +198,7 @@ function starsPercent(goods: any) {
           <template #reference>
             <PermissionButton circle plain type="danger">
               <el-icon>
-                <Delete />
+                <Delete/>
               </el-icon>
             </PermissionButton>
           </template>
@@ -208,3 +226,12 @@ function starsPercent(goods: any) {
   font-size: 14px !important;
 }
 </style>
+
+<style lang="scss">
+.custom-btn-tooltip {
+  background-color: #EFF9EB !important;
+  color: #606266 !important;
+  border: 1px solid #67C23A !important;
+  font-size: 14px;
+}
+</style>

+ 1 - 1
src/views/product-manage/competitor-monitor/index.vue

@@ -81,7 +81,7 @@ function resetParameter() {
 </script>
 
 <template>
-  <div class="p-5 flex-grow">
+  <div class="p-5">
     <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
       <div ref="titleContainer" class="text-xl font-semibold pb-5">竞品监控</div>
       <!-- 查询条件 -->

+ 7 - 8
src/views/product-manage/product-list/component/ProductInfo.vue

@@ -23,7 +23,6 @@ const props = defineProps({
     default: false
   }
 });
-console.log('props.item=> ', props.item);
 </script>
 
 <template>
@@ -49,9 +48,9 @@ console.log('props.item=> ', props.item);
       </div>
     </el-image>
     <div class="text-left">
-      <el-tooltip :content="item.title" :disabled="showTitleTooltip" :show-after="300" effect="dark"
-                  placement="top-start">
-        <el-link :href=item.url :underline="false" target="_blank" type="primary">
+      <el-tooltip :content="item.title" :disabled="showTitleTooltip || !item.title" effect="dark" placement="top-start"
+                  show-after="350">
+        <el-link :disabled="!item.title" :href="item.url" :underline="false" target="_blank" type="primary">
           <span class="line-clamp-1 text-ellipsis whitespace-normal">{{ item.title || '--' }}</span>
         </el-link>
       </el-tooltip>
@@ -61,11 +60,11 @@ console.log('props.item=> ', props.item);
           <span style="color: #1d2129;">
             {{ item.asin || '--' }}
           </span>
-          
+
         </p>
-        <el-tooltip :content="item.sku" class="">
-          <p class="m-0 p-0 line-clamp-1 text-ellipsis"> 
-            SKU: 
+        <el-tooltip :content="item.sku" effect="light" show-after="300">
+          <p class="m-0 p-0 line-clamp-1 text-ellipsis">
+            SKU:
             <span style="color: #1d2129;">
               {{ item.sku || '--' }} 
             </span>

+ 9 - 19
src/views/product-manage/product-list/index.vue

@@ -36,32 +36,22 @@ const formInline = reactive<any>({
 });
 provide('query-parameter', formInline);
 
-const groupOptions: any = ref([]);
-const brandsOptions: any = ref([]);
-const shopOptions: any = ref([]);
+const groupOptions = <any>ref([]);
+const brandsOptions = <any>ref([]);
+const shopOptions = <any>ref([]);
 
 provide('groupOptions', groupOptions);
 provide('brandsOptions', brandsOptions);
 provide('shopOptions', shopOptions);
 
 onBeforeMount(() => {
-  fetchAllOptions();
+  fetchOptions();
 });
 
-async function fetchAllOptions() {
-  try {
-    const [ groupRes, brandsRes, shopRes ] = await Promise.all([
-      useResponse(api.getGroupOptions),
-      useResponse(api.getBrandsOptions),
-      useResponse(api.getShopOptions)
-    ]);
-
-    groupOptions.value = groupRes.data;
-    brandsOptions.value = brandsRes.data;
-    shopOptions.value = shopRes.data;
-  } catch (error) {
-    console.error('Error fetching options: ', error);
-  }
+async function fetchOptions() {
+  groupOptions.value = (await useResponse(api.getGroupOptions)).data;
+  brandsOptions.value = (await useResponse(api.getBrandsOptions)).data;
+  shopOptions.value = (await useResponse(api.getShopOptions)).data;
 }
 
 async function handleQuery() {
@@ -78,7 +68,7 @@ function resetParameter() {
 </script>
 
 <template>
-  <div class="p-5 flex-grow">
+  <div class="p-5">
     <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
       <div ref="titleContainer" class="text-xl font-semibold pb-5">商品列表</div>
       <!-- 查询条件 -->

+ 34 - 6
src/views/product-manage/product-monitor/component/DataTableSlot.vue

@@ -6,7 +6,7 @@
  */
 
 import { useCountryInfoStore } from '/@/stores/countryInfo';
-import { Delete, InfoFilled, Operation } from '@element-plus/icons-vue';
+import { Delete, InfoFilled, Operation, Tickets, Timer } from '@element-plus/icons-vue';
 import { getTagType } from '/@/utils/useTagColor';
 import PermissionButton from '/@/components/PermissionButton/index.vue';
 import ProductInfo from '/@/views/product-manage/product-list/component/ProductInfo.vue';
@@ -40,7 +40,7 @@ function onConfirm() {
 <template>
   <div class="font-medium">
     <div v-if="field === 'product_info'">
-      <ProductInfo :img-width="50" :item="row.goods" />
+      <ProductInfo :img-width="50" :item="row.goods"/>
     </div>
     <div v-else-if="field === 'country_code'">
       <el-tag :disable-transitions="true" :style="{ color: color, borderColor: color }" effect="plain" round>
@@ -120,10 +120,10 @@ function onConfirm() {
       </template>
     </div>
     <div v-else-if="field === 'stars'" class="flex flex-col font-normal" style="min-width: 170px">
-      <ProgressBar :row="row" percentage="ratings" />
+      <ProgressBar :row="row" percentage="ratings"/>
     </div>
     <div v-else-if="field === 'all_stars'" class="flex flex-col font-normal" style="min-width: 170px">
-      <ProgressBar :row="row" percentage="all_rate" />
+      <ProgressBar :row="row" percentage="all_rate"/>
     </div>
     <div v-else-if="field === 'status'">
       <el-tag :disable-transitions="true" :type=statusType>
@@ -131,10 +131,28 @@ function onConfirm() {
       </el-tag>
     </div>
     <div v-else-if="field === 'operate'">
+      <div class="flex justify-center gap-2 mb-2">
+        <el-tooltip :enterable="false" :show-arrow="false" content="评论详情" hide-after="0"
+                    placement="top" popper-class="custom-btn-tooltip">
+          <PermissionButton circle plain type="success">
+            <el-icon>
+              <Tickets/>
+            </el-icon>
+          </PermissionButton>
+        </el-tooltip>
+        <el-tooltip :enterable="false" :show-arrow="false" content="历史详情" hide-after="0"
+                    placement="top" popper-class="custom-btn-tooltip">
+          <PermissionButton circle plain type="success">
+            <el-icon>
+              <Timer/>
+            </el-icon>
+          </PermissionButton>
+        </el-tooltip>
+      </div>
       <div class="flex justify-center gap-2">
         <PermissionButton circle plain type="warning" @click="handleEdit">
           <el-icon>
-            <Operation />
+            <Operation/>
           </el-icon>
         </PermissionButton>
         <el-popconfirm
@@ -147,7 +165,7 @@ function onConfirm() {
           <template #reference>
             <PermissionButton circle plain type="danger">
               <el-icon>
-                <Delete />
+                <Delete/>
               </el-icon>
             </PermissionButton>
           </template>
@@ -174,4 +192,14 @@ function onConfirm() {
 :deep(.flex-1 .el-progress__text) {
   font-size: 14px !important;
 }
+
+</style>
+
+<style lang="scss">
+.custom-btn-tooltip {
+  background-color: #EFF9EB !important;
+  color: #606266 !important;
+  border: 1px solid #67C23A !important;
+  font-size: 14px;
+}
 </style>

+ 9 - 20
src/views/product-manage/product-monitor/index.vue

@@ -38,33 +38,22 @@ const formInline = reactive<any>({
 });
 provide('query-parameter', formInline);
 
-const groupOptions: any = ref([]);
-const brandsOptions: any = ref([]);
-const shopsOptions: any = ref([]);
+const groupOptions = ref<any>([]);
+const brandsOptions = ref<any>([]);
+const shopsOptions = ref<any>([]);
 
 provide('groupOptions', groupOptions);
 provide('brandsOptions', brandsOptions);
 provide('shopOptions', shopsOptions);
 
 onBeforeMount(() => {
-  fetchGroupOptions();
-  fetchBrandsOptions();
-  fetchShopsOptions();
+  fetchOptions();
 });
 
-async function fetchGroupOptions() {
-  const res = await useResponse(api.getGroupOptions);
-  groupOptions.value = res.data;
-}
-
-async function fetchBrandsOptions() {
-  const res = await useResponse(api.getBrandsOptions);
-  brandsOptions.value = res.data;
-}
-
-async function fetchShopsOptions() {
-  const res = await useResponse(api.getShopsOptions);
-  shopsOptions.value = res.data;
+async function fetchOptions() {
+  groupOptions.value = (await useResponse(api.getGroupOptions)).data;
+  brandsOptions.value = (await useResponse(api.getBrandsOptions)).data;
+  shopsOptions.value = (await useResponse(api.getShopsOptions)).data;
 }
 
 const btnLoading = ref(false);
@@ -83,7 +72,7 @@ function resetParameter() {
 </script>
 
 <template>
-  <div class="p-5 flex-grow">
+  <div class="p-5">
     <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
       <div ref="titleContainer" class="text-xl font-semibold pb-5">商品监控</div>
       <!-- 查询条件 -->

+ 1 - 1
src/views/sku-manage/product-attribute/index.vue

@@ -39,7 +39,7 @@ function resetParameter() {
 </script>
 
 <template>
-  <div class="p-5 flex-grow">
+  <div class="p-5">
     <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
       <div ref="titleContainer" class="text-xl font-semibold pb-5">产品属性</div>
       <!-- 查询条件 -->

+ 2 - 2
src/views/sku-manage/product-brand/index.vue

@@ -38,9 +38,9 @@ function resetParameter() {
 </script>
 
 <template>
-  <div class="p-5 flex-grow">
+  <div class="p-5">
     <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
-      <div ref="titleContainer" class="text-xl font-semibold pb-5">产品属性</div>
+      <div ref="titleContainer" class="text-xl font-semibold pb-5">产品品牌</div>
       <!-- 查询条件 -->
       <div ref="queryContainer" class="flex justify-between">
         <div class="flex flex-1">

+ 2 - 2
src/views/sku-manage/product-category/component/DataTableSlot.vue

@@ -31,7 +31,7 @@ function onConfirm() {
   <div class="font-medium">
     <div v-if="field === 'operate'">
       <div class="flex justify-center gap-2">
-        <PermissionButton circle plain type="warning" @click="handleEdit">
+        <PermissionButton :disabled="row.status == '3'" circle plain type="warning" @click="handleEdit">
           <el-icon>
             <Operation />
           </el-icon>
@@ -44,7 +44,7 @@ function onConfirm() {
             @confirm="onConfirm"
         >
           <template #reference>
-            <PermissionButton circle plain type="danger">
+            <PermissionButton :disabled="row.status == '3'" circle plain type="danger">
               <el-icon>
                 <Delete />
               </el-icon>

+ 1 - 1
src/views/sku-manage/product-category/index.vue

@@ -38,7 +38,7 @@ function resetParameter() {
 </script>
 
 <template>
-  <div class="p-5 flex-grow">
+  <div class="p-5">
     <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
       <div ref="titleContainer" class="text-xl font-semibold pb-5">产品种类</div>
       <!-- 查询条件 -->

+ 1 - 1
src/views/store-manage/market-store/index.vue

@@ -46,7 +46,7 @@ function resetParameter() {
 </script>
 
 <template>
-  <div class="p-5 flex-grow">
+  <div class="p-5">
     <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
       <div ref="titleContainer" class="text-xl font-semibold pb-5">市场店铺</div>
       <!-- 查询条件 -->

+ 1 - 1
src/views/store-manage/online-merchandise/index.vue

@@ -63,7 +63,7 @@ function resetParameter() {
 </script>
 
 <template>
-  <div class="p-5 flex-grow">
+  <div class="p-5">
     <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
       <div ref="titleContainer" class="text-xl font-semibold pb-5">在线商品</div>
       <!-- 查询条件 -->