From eaba814cd246117c31876afd8802031c47fa1e37 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 11 Oct 2023 17:31:38 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=A7=BB=E9=99=A4=E9=9D=9Eerror?= =?UTF-8?q?=E7=BA=A7=E5=88=ABconsole?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/configManage/configParam.ts | 4 -- src/plugins/http-fetch.ts | 1 - src/views/configManage/configParam/index.vue | 6 --- src/views/faultManage/active-alarm/index.vue | 48 +++++++++----------- src/views/mmlManage/neOperate/index.vue | 1 - src/views/mmlManage/omcOperate/index.vue | 1 - src/views/mmlManage/udmOperate/index.vue | 1 - 7 files changed, 22 insertions(+), 40 deletions(-) diff --git a/src/api/configManage/configParam.ts b/src/api/configManage/configParam.ts index 00fe238e..706b4fab 100644 --- a/src/api/configManage/configParam.ts +++ b/src/api/configManage/configParam.ts @@ -173,7 +173,6 @@ export async function getParamConfigInfo( } } } - console.log(wrRule, dataArr); } // 拼装数据 @@ -197,7 +196,6 @@ export async function getParamConfigInfo( let dataList = []; for (const item of dataArr) { for (const key of Object.keys(item)) { - // console.log(result.data.type, key, item[key]); // 规则为准 for (const rule of ruleArr) { if (rule['name'] === key) { @@ -247,7 +245,6 @@ export async function getParamConfigInfo( } dataArray.push(record); } - // console.log(dataArray); result.data.data = dataArray; // 无数据时,用于新增 @@ -266,7 +263,6 @@ export async function getParamConfigInfo( align: 'left', }); } - // console.log(columns); result.data.columns = columns; } return result; diff --git a/src/plugins/http-fetch.ts b/src/plugins/http-fetch.ts index 9704d23e..6a983902 100644 --- a/src/plugins/http-fetch.ts +++ b/src/plugins/http-fetch.ts @@ -133,7 +133,6 @@ function beforeRequest(options: OptionsType): OptionsType | Promise { requestObj.time - time < interval ) { const message = RESULT_MSG_URL_RESUBMIT; - console.warn(`[${url}]: ${message}`); return Promise.resolve({ code: RESULT_CODE_ERROR, msg: message, diff --git a/src/views/configManage/configParam/index.vue b/src/views/configManage/configParam/index.vue index b8e528f7..89baebe7 100644 --- a/src/views/configManage/configParam/index.vue +++ b/src/views/configManage/configParam/index.vue @@ -350,7 +350,6 @@ function arrayEditOk() { function arrayDelete(row: Record) { const from = toRaw(row); const loc = from['index']['value']; - console.log(from, loc); Modal.confirm({ title: '提示', @@ -564,7 +563,6 @@ function arrayChildExpand(key: Record, row: Record) { } dataArray.push(record); } - // console.log(dataArray); tableState.arrayChildData = dataArray; // 无数据时,需要临时数据用于新增 @@ -585,7 +583,6 @@ function arrayChildExpand(key: Record, row: Record) { align: 'left', }); } - // console.log(columns); tableState.arrayChildColumns = columns; tableState.arrayChildColumns.push({ title: t('common.operate'), @@ -698,7 +695,6 @@ function arrayChildEditOk() { function arrayChildDelete(row: Record) { const from = toRaw(row); const loc = `${tableState.arrayChildLoc}/${from['index']['value']}`; - console.log(from, loc); Modal.confirm({ title: '提示', @@ -819,7 +815,6 @@ function arrayChildAddOk() { const from = toRaw(tableState.arrayChildEditRecord); const loc = `${tableState.arrayChildLoc}/${from['index']['value']}`; const neType = neTypeSelect.value[0]; - console.log(from, loc); let data: Record = {}; for (const key in from) { @@ -978,7 +973,6 @@ function ruleVerification(row: Record): (string | boolean)[] { break; default: - console.warn('未知类型', type); return [false, `${display} 输入值是未知类型`]; } return result; diff --git a/src/views/faultManage/active-alarm/index.vue b/src/views/faultManage/active-alarm/index.vue index 36133a99..1f365428 100644 --- a/src/views/faultManage/active-alarm/index.vue +++ b/src/views/faultManage/active-alarm/index.vue @@ -16,7 +16,7 @@ import { clearAlarm, showPass, getPass, - exportAll + exportAll, } from '@/api/faultManage/actAlarm'; import useNeInfoStore from '@/store/modules/neinfo'; import useI18n from '@/hooks/useI18n'; @@ -474,9 +474,7 @@ const closeDrawer = () => { /**抽屉 告警帮助文档详细信息 */ function fnModalVisibleBy(code: string) { - const result = readLoalXlsx(code); - - result + readLoalXlsx(code) .then(res => { if (!res.length) { visible.value = false; @@ -486,7 +484,7 @@ function fnModalVisibleBy(code: string) { tableState.loading = false; }) - .catch(error => console.log(error)); + .catch(error => console.error(error)); } /** @@ -682,29 +680,27 @@ function fnShowSet() { /** * 导出全部 */ -function fnExportAll(){ +function fnExportAll() { const key = 'exportAlarm'; message.loading({ content: '请稍等...', key }); - exportAll(queryParams) - .then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - message.success({ - content: `已完成导出`, - key, - duration: 3, - }); - writeSheet(res.data, 'alarm').then(fileBlob => - saveAs(fileBlob, `alarm_${Date.now()}.xlsx`) - ); - } else { - message.error({ - content: `${res.msg}`, - key, - duration: 3, - }); - } - }) - + exportAll(queryParams).then(res => { + if (res.code === RESULT_CODE_SUCCESS) { + message.success({ + content: `已完成导出`, + key, + duration: 3, + }); + writeSheet(res.data, 'alarm').then(fileBlob => + saveAs(fileBlob, `alarm_${Date.now()}.xlsx`) + ); + } else { + message.error({ + content: `${res.msg}`, + key, + duration: 3, + }); + } + }); } /** * 对话框弹出关闭执行函数 diff --git a/src/views/mmlManage/neOperate/index.vue b/src/views/mmlManage/neOperate/index.vue index 73f5ddff..f6adda98 100644 --- a/src/views/mmlManage/neOperate/index.vue +++ b/src/views/mmlManage/neOperate/index.vue @@ -220,7 +220,6 @@ function ruleVerification( break; default: - console.warn('未知类型', type); return [false, `${display} 输入值是未知类型`]; } return result; diff --git a/src/views/mmlManage/omcOperate/index.vue b/src/views/mmlManage/omcOperate/index.vue index 6f0530d3..70824cdf 100644 --- a/src/views/mmlManage/omcOperate/index.vue +++ b/src/views/mmlManage/omcOperate/index.vue @@ -219,7 +219,6 @@ function ruleVerification( break; default: - console.warn('未知类型', type); return [false, `${display} 输入值是未知类型`]; } return result; diff --git a/src/views/mmlManage/udmOperate/index.vue b/src/views/mmlManage/udmOperate/index.vue index cd96a65b..cbeea176 100644 --- a/src/views/mmlManage/udmOperate/index.vue +++ b/src/views/mmlManage/udmOperate/index.vue @@ -219,7 +219,6 @@ function ruleVerification( break; default: - console.warn('未知类型', type); return [false, `${display} 输入值是未知类型`]; } return result;