Pārlūkot izejas kodu

删除日志打印,影响速度

yesheng 2 nedēļas atpakaļ
vecāks
revīzija
5ac32d95f4

+ 0 - 7
src/views/mes/queryManage/components/FilterColumnInQuery.vue

@@ -164,7 +164,6 @@ export default {
   methods: {
     /* ---- 生命周期 ---- */
     async onPopoverShow() {
-      console.log("onPopoverShow被调用");
       this.$nextTick(() => this.$refs.seachRef?.focus());
       if (this.isFirstLoad || this.searchKey) {
         await this.fetchFilterListInQueryManage(true);
@@ -195,10 +194,6 @@ export default {
 
     /* ---- 数据获取 ---- */
     async fetchFilterListInQueryManage(reload) {
-      console.log(
-        "fetchFilterListInQueryManage被调用,htmlType:",
-        this.htmlType
-      );
       if (["datetime", "daterange"].includes(this.htmlType)) return;
       try {
         this.loading = true;
@@ -212,10 +207,8 @@ export default {
             params[k] = this.activeFilters[k].map((i) => i.column).join(",");
           }
         });
-        console.log("调用getFilterListInQuery,参数:", params);
         const { data } = await getFilterListInQuery(params);
         this.filterData = data || [];
-        console.log("获取筛选数据成功,filterData:", this.filterData);
       } catch (error) {
         console.error("获取筛选数据失败:", error);
       } finally {

+ 0 - 108
src/views/mes/queryManage/queryNew.vue

@@ -35,11 +35,6 @@
         <i class="el-icon-refresh mr-5px" style="font-size: 14px" />
         全条件重置
       </el-button>
-
-      <!--<el-button size="small" @click="handleBack">
-        <i class="el-icon-arrow-left mr-5px" style="font-size: 14px" />
-        返回
-      </el-button>-->
     </el-row>
 
     <!-- 表格 -->
@@ -283,14 +278,12 @@ export default {
         );
         // 确保queryData是数组
         this.queryData = Array.isArray(data.data) ? data.data || [] : [];
-        console.log("queryData长度", this.queryData.length);
         this.searchData = this.queryData.filter(
           (item) => item.listOperationResult && item.ifHide === false
         );
         this.showMultipleList = this.queryData.filter(
           (item) => item.listOperationCondition === "1"
         );
-        console.log("showMultipleList长度", this.showMultipleList.length);
         this.queryList = [];
         for (let i = 0; i < this.searchData.length; i++) {
           const { dataType, htmlType, dictType, columnName } =
@@ -311,26 +304,15 @@ export default {
     },
 
     async getList() {
-      console.log("getList被调用,queryParamList:", this.queryParamList);
       try {
         this.loading = true;
-        console.log("调用QueryManageApi.loadTableData,参数:", {
-          pageNo: this.pageNo,
-          pageSize: this.pageSize,
-          paramList: this.queryParamList,
-          id: this.$route.query?.id,
-        });
         const data = await QueryManageApi.loadTableData({
           pageNo: this.pageNo,
           pageSize: this.pageSize,
           paramList: this.queryParamList,
           id: this.$route.query?.id,
         });
-        console.log("后端返回", data);
         this.list = data?.data?.list || [];
-        console.log("赋值后 list =", this.list);
-        console.log("list.length =", this.list.length);
-        console.log("list 第一条 =", this.list[0]);
         this.originalList = JSON.parse(JSON.stringify(data?.data?.list || []));
         this.total = data?.data?.total || 0;
       } catch (error) {
@@ -355,12 +337,6 @@ export default {
       } = btn;
 
       // 确认数据值和类型
-      console.log(
-        "即将使用的 interfaceUrl:",
-        JSON.stringify(interfaceUrl),
-        "类型:",
-        typeof interfaceUrl
-      );
       if (ifJimu) {
         this.handlePrintByJimu(btn);
       } else if (this.isFullUrl(interfaceUrl) && printSoft) {
@@ -463,12 +439,6 @@ export default {
       }
 
       // 确认数据值和类型
-      console.log(
-        "handlePrintByJimu - interfaceUrl:",
-        JSON.stringify(params.interfaceUrl),
-        "类型:",
-        typeof params.interfaceUrl
-      );
 
       // 验证interfaceUrl
       const interfaceUrl = String(params.interfaceUrl || "").trim();
@@ -502,12 +472,6 @@ export default {
       }
 
       // 确认数据值和类型
-      console.log(
-        "handlePrintByOtherSoft - interfaceUrl:",
-        JSON.stringify(params.interfaceUrl),
-        "类型:",
-        typeof params.interfaceUrl
-      );
 
       const { interfaceUrl, paramList, restMethod, templet } = params;
       if (!templet) return this.$message.warning("未配置打印模板!");
@@ -538,12 +502,6 @@ export default {
       }
 
       // 确认数据值和类型
-      console.log(
-        "handleDynamic - interfaceUrl:",
-        JSON.stringify(params.interfaceUrl),
-        "类型:",
-        typeof params.interfaceUrl
-      );
 
       const {
         interfaceUrl,
@@ -552,19 +510,6 @@ export default {
         requestParameter = "0",
       } = params;
 
-      console.log(
-        "handleDynamic - restMethod:",
-        JSON.stringify(restMethod),
-        "类型:",
-        typeof restMethod
-      );
-      console.log(
-        "handleDynamic - request[restMethod]存在吗:",
-        !!request[restMethod],
-        "类型:",
-        typeof request[restMethod]
-      );
-
       // 确保 url 是合法字符串,而不是数字 0 或其他无效值
       const url = String(interfaceUrl || "").trim();
       if (!url || url === "0") {
@@ -574,35 +519,7 @@ export default {
 
       const fieldValues = this.paramsToConver(paramList);
       const config = { method: restMethod, url };
-      console.log(
-        "handleDynamic - 调用handleGetDelete前config:",
-        JSON.stringify(config),
-        "类型:",
-        typeof config.url
-      );
       this.handleGetDelete(config, fieldValues, String(requestParameter));
-      console.log(
-        "handleDynamic - 调用handleGetDelete后config:",
-        JSON.stringify(config),
-        "类型:",
-        typeof config.url
-      );
-
-      console.log(
-        "handleDynamic - 发起请求前完整config:",
-        JSON.stringify(config)
-      );
-      console.log(
-        "handleDynamic - 发起请求前config.url:",
-        JSON.stringify(config.url),
-        "类型:",
-        typeof config.url
-      );
-
-      console.log("handleDynamic - 准备调用request:", {
-        method: config.method,
-        url: config.url,
-      });
 
       // 直接使用request(config)而不是request[restMethod]?.(config),确保method被正确处理
       await request(config);
@@ -612,24 +529,11 @@ export default {
     },
 
     handleGetDelete(config, fieldValues, requestParameter) {
-      console.log("handleGetDelete - 入参:", {
-        config,
-        fieldValues,
-        requestParameter,
-      });
       switch (requestParameter) {
         case "1":
           config.params = fieldValues;
           break;
         case "3":
-          console.log(
-            "handleGetDelete - URLSearchParams(fieldValues):",
-            new URLSearchParams(fieldValues)
-          );
-          console.log(
-            "handleGetDelete - URLSearchParams(fieldValues).toString():",
-            new URLSearchParams(fieldValues).toString()
-          );
           const queryString = new URLSearchParams(fieldValues).toString();
           config.url = queryString
             ? `${config.url}?${queryString}`
@@ -641,12 +545,6 @@ export default {
         default:
           config.data = fieldValues;
       }
-      console.log(
-        "handleGetDelete - 处理后config.url:",
-        JSON.stringify(config.url),
-        "类型:",
-        typeof config.url
-      );
     },
 
     paramsToConver(paramList) {
@@ -757,7 +655,6 @@ export default {
     },
 
     filterData(data, field, type, row) {
-      console.log("filterData被调用:", { data, field, type, row });
       const { dataType } = row;
       this.$set(this.customFilters, field, data);
       const isDateRange = data[0]?.isRange;
@@ -774,10 +671,6 @@ export default {
             value: valueList,
           });
         }
-        console.log(
-          "filterData - 日期范围筛选后queryParamList:",
-          this.queryParamList
-        );
         this.getList();
         return;
       }
@@ -802,7 +695,6 @@ export default {
         const idx = this.queryParamList.findIndex((item) => item.key === field);
         if (idx > -1) this.queryParamList.splice(idx, 1);
       }
-      console.log("filterData - 筛选后queryParamList:", this.queryParamList);
       this.getList();
     },