refactor(通用功能): 清理系统中所有console log #13643

This commit is contained in:
fit2-zhao 2022-05-20 15:40:39 +08:00 committed by fit2-zhao
parent 6392d7a281
commit 547b404742
37 changed files with 2 additions and 121 deletions

View File

@ -83,9 +83,7 @@ export default {
},
methods: {
foucusTagInput() {
if (this.readOnly || !this.$el.querySelector('.tag-input')) {
console.log()
} else {
if (!this.readOnly && this.$el.querySelector('.tag-input')) {
this.$el.querySelector('.tag-input').focus()
}
},

View File

@ -306,7 +306,6 @@ export default {
methods: {
initForm() {
this.result = this.$get('/notice/search/message/' + this.testId, response => {
// console.log(response.data);
this.scheduleTask = response.data;
});
},
@ -341,7 +340,6 @@ export default {
},
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -361,8 +361,6 @@ export default{
this.oldColor = "rgb(241,200,196,0.45)"
this.newColor = "rgb(121, 225, 153,0.3)";
}
console.log(this.$refs.old)
console.log(this.$refs.new)
diff(oldVnode,vnode,this.oldColor,this.newColor);
this.isReloadData = false
},

View File

@ -125,9 +125,7 @@ export default {
open(param) {
this.$post("/api/definition/getResourceId", param, response => {
this.paramSwaggerUrlId = response.data
if (this.paramSwaggerUrlId === "" || this.paramSwaggerUrlId === null || this.paramSwaggerUrlId === undefined) {
console.log(this.paramSwaggerUrlId)
} else {
if (this.paramSwaggerUrlId ) {
this.findSchedule(this.paramSwaggerUrlId);
}

View File

@ -163,9 +163,6 @@ export default {
activated() {
this.search();
},
handleStatus(scope) {
// console.log(scope.row.userId)
}
}
</script>

View File

@ -167,9 +167,6 @@ export default {
activated() {
this.search();
},
handleStatus(scope) {
// console.log(scope.row.userId)
}
}
</script>

View File

@ -105,7 +105,6 @@ export default {
try {
this.content = JSON.parse(this.report.content);
} catch (e) {
// console.log(this.report.scenarioDefinition)
throw e;
}
this.getFails();

View File

@ -89,31 +89,6 @@ export default {
close() {
this.visible = false
},
// 穿transfer addressList
// changeMode() {
// if (this.mode == "transfer") {
// this.mode = "addressList";
// } else {
// this.mode = "transfer";
// }
// },
// // 穿
// add(fromData, toData, obj){
// // 穿transfer{keys,nodes,halfKeys,halfNodes}
// // addressList
// console.log("fromData:", fromData);
// console.log("toData:", toData);
// console.log("obj:", obj);
// },
// // 穿
// remove(fromData, toData, obj){
// // 穿transfer{keys,nodes,halfKeys,halfNodes}
// // addressList
// console.log("fromData:", fromData);
// console.log("toData:", toData);
// console.log("obj:", obj);
// }
}
}
</script>

View File

@ -187,7 +187,6 @@
"updateContabValue", name, value, from;
this.contabValueObj[name] = value;
if (from && from !== name) {
// console.log(` ${from} ${name} ${value}`);
this.changeRadio(name, value);
}
},

View File

@ -65,8 +65,6 @@ export default {
props: JSON.stringify(this.fieldSelected)
}
this.$post("/system/save/header", param, response => {
console.log(this.optionalFields)
console.log(this.fieldSelected)
this.$success(this.$t("commons.save_success"));
this.initTableData()
this.close();
@ -78,32 +76,6 @@ export default {
close() {
this.dialogTableVisible = false
},
// 穿transfer addressList
// changeMode() {
// if (this.mode == "transfer") {
// this.mode = "addressList";
// } else {
// this.mode = "transfer";
// }
// },
// // 穿
// add(fromData, toData, obj){
// // 穿transfer{keys,nodes,halfKeys,halfNodes}
// // addressList
// console.log("fromData:", fromData);
// console.log("toData:", toData);
// console.log("obj:", obj);
// },
// // 穿
// remove(fromData, toData, obj){
// // 穿transfer{keys,nodes,halfKeys,halfNodes}
// // addressList
// console.log("fromData:", fromData);
// console.log("toData:", toData);
// console.log("obj:", obj);
// }
}
}
</script>

View File

@ -20,7 +20,6 @@
},
methods: {
initWebSocket() {
// window.console.log("init WebSocket");
const uri = "ws://" + window.location.host + "/socket";
this.websocket = new WebSocket(uri);
this.websocket.onmessage = this.onMessage;
@ -36,10 +35,8 @@
window.console.error(e)
},
onMessage(e) {
// window.console.log(e.data)
},
onClose(e) {
// window.console.log('', e);
},
send(Data) {
this.websocket.send(Data);

View File

@ -321,7 +321,6 @@ export default {
},
onOpen() {
this.refresh();
// window.console.log("socket opening.");
},
onError(e) {
// window.console.error(e)
@ -336,7 +335,6 @@ export default {
this.$set(this.report, "status", 'Running');
this.status = 'Running';
this.initReportTimeInfo();
// window.console.log('receive a message:', e.data);
},
onClose(e) {
if (e.code === 1005) {
@ -346,7 +344,6 @@ export default {
this.$set(this.report, "refresh", Math.random()); //
this.$set(this.report, "status", 'Completed');
this.initReportTimeInfo();
// window.console.log("socket closed.");
},
handleExport(name) {
this.result.loading = true;
@ -522,7 +519,6 @@ export default {
this.initReportTimeInfo();
});
} else {
// console.log("close socket.");
this.websocket.close(); //websocket
}
},

View File

@ -506,7 +506,6 @@ export default {
},
handleGetTotalChart(res) {
res = res.filter(v => !!v);
// console.log(res);
for (let i = 0; i < res.length; i++) {
if (i === 0) {
this.baseOption.yAxis.push({

View File

@ -207,10 +207,7 @@ export default {
},
importAPITest() {
let apiTest = this.$store.state.test;
console.log("输出vuex的test");
console.log(apiTest);
if (apiTest && apiTest.name) {
console.log("set test name");
this.$set(this.test, "name", apiTest.name);
if (apiTest.jmx.scenarioId) {
this.$refs.basicConfig.importScenario(apiTest.jmx.scenarioId);
@ -247,10 +244,7 @@ export default {
this.$store.commit("clearTest");
} else {
let scenarioJmxs = this.$store.state.scenarioJmxs;
console.log("输出vuex的scenarioJmxs");
console.log(scenarioJmxs);
if (scenarioJmxs && scenarioJmxs.name) {
console.log("set scenarioJmxs name");
this.$set(this.test, "name", scenarioJmxs.name);
let relateApiList = [];
if (scenarioJmxs.jmxs) {

View File

@ -355,7 +355,6 @@ export default {
this.$refs.existScenarios.selectIds.add(scenarioId);
},
importCase(caseObj) {
console.log("case: ", caseObj);
let suffixIndex = caseObj.name.lastIndexOf(".jmx");
let jmxName = caseObj.name.substring(0, suffixIndex) + "_" + new Date().getTime() + ".jmx";
let threadGroups = findThreadGroup(caseObj.xml, jmxName);

View File

@ -728,7 +728,6 @@ export default {
handler.options.xAxis.data = handler.options.xAxis.data.sort((a, b) => a - b);
handler.options.series.push(seriesData);
}
// console.log(JSON.stringify(handler.options));
},
validConfig() {
if (!this.resourcePool) {

View File

@ -197,7 +197,6 @@ export default {
this.currentRow = row;
},
handleDelete(row) {
console.log(row);
this.$confirm(this.$t('project.file_delete_tip', [row.name]), '', {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),

View File

@ -174,7 +174,6 @@ export default {
methods: {
initForm() {
this.result = this.$get('/notice/search/message/' + this.testId, response => {
// console.log(response.data);
this.scheduleTask = response.data;
});
},
@ -209,7 +208,6 @@ export default {
},
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -337,7 +337,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -397,7 +397,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -271,7 +271,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -270,7 +270,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -197,7 +197,6 @@ export default {
},
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -286,7 +286,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -273,7 +273,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -272,7 +272,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -325,7 +325,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -298,7 +298,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -257,7 +257,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -275,7 +275,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -277,7 +277,6 @@ export default {
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -151,7 +151,6 @@ export default {
this.$refs.deleteConfirm.open(row);
},
copy(row) {
// console.log(row);
},
setPermission(row) {
this.$refs.editPermission.open(row);

View File

@ -167,9 +167,6 @@ export default {
activated() {
this.search();
},
handleStatus(scope) {
// console.log(scope.row.userId)
}
}
</script>

View File

@ -269,7 +269,6 @@ export default {
methods: {
initForm() {
this.result = this.$get('/notice/search/message/' + this.testId, response => {
// console.log(response.data);
this.scheduleTask = response.data;
});
},
@ -304,7 +303,6 @@ export default {
},
handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) {
// console.log(data.type)
if (data.type === 'NAIL_ROBOT' || data.type === 'WECHAT_ROBOT' || data.type === 'LARK') {
if (!data.webhook) {
this.$warning(this.$t('organization.message.message_webhook'));

View File

@ -334,20 +334,12 @@ export default {
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
}).then(() => {
// this.result = this.$post('/performance/run', {id: testId, triggerMode: 'MANUAL'}, (response) => {
// this.reportId = response.data;
// this.$router.push({path: '/performance/report/view/' + this.reportId});
// // socket
// this.initWebSocket();
// })
}).catch(() => {
});
},
onOpen() {
// window.console.log("socket opening.");
},
onError(e) {
// window.console.error(e)
},
onMessage(e) {
this.$set(this.report, "refresh", e.data); //
@ -359,7 +351,6 @@ export default {
this.$set(this.report, "status", 'Running');
this.status = 'Running';
this.initReportTimeInfo();
// window.console.log('receive a message:', e.data);
},
onClose(e) {
if (e.code === 1005) {
@ -369,7 +360,6 @@ export default {
this.$set(this.report, "refresh", Math.random()); //
this.$set(this.report, "status", 'Completed');
this.initReportTimeInfo();
// window.console.log("socket closed.");
},
handleExport(name) {
this.result.loading = true;

View File

@ -654,7 +654,6 @@ export default {
handler.options.xAxis.data = handler.options.xAxis.data.sort((a, b) => a - b);
handler.options.series.push(seriesData);
}
// console.log(JSON.stringify(handler.options));
},
validConfig() {
if (!this.resourcePool) {

View File

@ -371,7 +371,6 @@ export function _getBodyUploadFiles(request, bodyUploadFiles, obj) {
export function handleCtrlSEvent(event, func) {
if (event.keyCode === 83 && event.ctrlKey) {
// console.log('拦截到 ctrl + s');//ctrl+s
func();
event.preventDefault();
event.returnValue = false;