Browse Source

```
refactor(console): 移除调试用的 console.log 输出

移除了多个组件和页面中用于调试的 console.log 语句,避免在生产环境中输出不必要的日志信息。同时清理了部分无用的导入和模板引用,优化代码整洁度。
```

zhangtao 4 days ago
parent
commit
211dbc92be

+ 2 - 2
src/components/zt/ApiSelect/api-select.vue

@@ -73,9 +73,9 @@ function handleFocus() {
 function handleScroll(e: Event) {
   const currentTarget = e.currentTarget as HTMLElement;
   if (currentTarget.scrollTop + currentTarget.offsetHeight >= currentTarget.scrollHeight) {
-    console.log('到底了');
+    // console.log('到底了');
     if (options.value.length < total.value && !fetchLoading.value) {
-      console.log('请求数据');
+      // console.log('请求数据');
       fetchLoading.value = true;
       page.value += 1;
       fetchApi();

+ 1 - 1
src/components/zt/ApiTreeSelect/api-tree-select.vue

@@ -29,7 +29,7 @@ watchEffect(() => {
 watch(
   () => modelVlaue.value,
   () => {
-    console.log(modelVlaue.value);
+    // console.log(modelVlaue.value);
   }
 );
 function handleFocus() {

+ 1 - 1
src/components/zt/ModalForm/hooks/useModalForm.ts

@@ -102,7 +102,7 @@ export function useModalFrom(props: modalFormProps): UseModalFormReturnType {
 
     // 模态框相关方法
     setModalLoading: async status => {
-      console.log(status, 'setModalLoading', getModalInstance());
+      // console.log(status, 'setModalLoading', getModalInstance());
 
       getModalInstance()?.setModalLoading(status);
     },

+ 1 - 1
src/hooks/common/router.ts

@@ -95,7 +95,7 @@ export function useRouterPush(inSetup = true) {
    */
   async function redirectFromLogin(needRedirect = true) {
     const redirect = route.value.query?.redirect as string;
-    console.log(needRedirect, redirect, '跳转至退出登录之前的页面');
+    // console.log(needRedirect, redirect, '跳转至退出登录之前的页面');
 
     if (needRedirect && redirect) {
       await routerPush(redirect);

+ 1 - 1
src/store/modules/auth/index.ts

@@ -110,7 +110,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
       imageCode,
       sessionUUID
     });
-    console.log('login', error, response);
+    // console.log('login', error, response);
 
     const loginToken: Api.Auth.LoginToken = {
       token: response.data.access_token,

+ 7 - 0
src/views/delivery/after-sales-order/order-modal.vue

@@ -0,0 +1,7 @@
+<script setup lang="ts"></script>
+
+<template>
+  <div></div>
+</template>
+
+<style scoped></style>

+ 4 - 11
src/views/delivery/normal-order/index.vue

@@ -1,6 +1,5 @@
 <script setup lang="tsx">
-import { nextTick, onMounted, reactive, ref, unref, useTemplateRef, watch } from 'vue';
-import type { TabsInst } from 'naive-ui';
+import { reactive, ref, unref, useTemplateRef, watch } from 'vue';
 import { NImage, NTag } from 'naive-ui';
 import { fetchGetDeliveryOrderList, fetchGetDeliveryStatusNum } from '@/service/api/delivery/normal-orde';
 import { useAppStore } from '@/store/modules/app';
@@ -15,15 +14,9 @@ const appStore = useAppStore();
 const checkedRowKeys = ref([]);
 const activeTab = ref('all');
 const statusList = ref<{ label: string; value: string; num?: number }[]>([]);
-const tabsInstRef = ref<TabsInst | null>(null);
 const orderMoadl = useTemplateRef('orderMoadl');
 const ShipmentModal = useTemplateRef('Shipment');
-onMounted(() => {
-  nextTick(() => {
-    tabsInstRef.value?.syncBarPosition();
-    console.log(tabsInstRef.value, 'tabsInstRef.value');
-  });
-});
+
 const [registerSearchForm, { getFieldsValue }] = useForm({
   schemas: SearchForm,
   showAdvancedButton: false,
@@ -237,7 +230,7 @@ async function getNums() {
     }
     return item;
   });
-  console.log(updatedOrderStatusList, 'updatedOrderStatusList');
+  // console.log(updatedOrderStatusList, 'updatedOrderStatusList');
   statusList.value = updatedOrderStatusList;
 }
 getNums();
@@ -281,7 +274,7 @@ async function handleCopy(row: Api.delivery.deliveryOrder) {
       </NCollapse>
     </NCard>
     <NCard title="订单列表" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
-      <NTabs ref="tabsInstRef" v-model:value="activeTab" type="line" animated class="mb-16px h-full">
+      <NTabs v-model:value="activeTab" type="line" animated class="mb-16px h-full">
         <NTabPane
           v-for="item in statusList"
           :key="item.value"

+ 1 - 1
src/views/government/user-list/index.vue

@@ -177,7 +177,7 @@ function hanleExportFailure(batchNo: string) {
 async function handleDelete(row: Api.government.userList) {
   setTableLoading(true);
   await fetchDeleteUser(row.userId);
-  console.log(row, 'row');
+  // console.log(row, 'row');
 
   refresh();
 }

+ 1 - 1
src/views/home/modules/header-banner.vue

@@ -36,7 +36,7 @@ const statisticData = computed<StatisticData[]>(() => [
     value: '12'
   }
 ]);
-console.log(authStore.userInfo);
+// console.log(authStore.userInfo);
 </script>
 
 <template>

+ 2 - 2
src/views/manage/department/index.vue

@@ -136,7 +136,7 @@ function handleAdd() {
 
 async function handleBatchDelete() {
   // request
-  console.log(checkedRowKeys.value);
+  // console.log(checkedRowKeys.value);
 }
 
 async function handleDelete(row: Recordable) {
@@ -160,7 +160,7 @@ function handleEdit(item: Api.SystemManage.DepartmentModel) {
   });
 }
 async function getDepartment(seachForm: Recordable) {
-  console.log(seachForm);
+  // console.log(seachForm);
 
   loading.value = true;
   const { data } = await fetchGetDepartmentList(seachForm as Recordable);

+ 2 - 2
src/views/manage/menu/index.vue

@@ -170,12 +170,12 @@ function handleAdd() {
 
 async function handleBatchDelete() {
   // request
-  console.log(checkedRowKeys.value);
+  // console.log(checkedRowKeys.value);
 }
 
 async function handleDelete(id: number) {
   // request
-  console.log(id);
+  // console.log(id);
   formLoading.value = true;
   await fetchDelMenu(id);
   init();