refactor(通用功能): 清理系统中所有console log #13643
This commit is contained in:
parent
6392d7a281
commit
547b404742
|
@ -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()
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -163,9 +163,6 @@ export default {
|
|||
activated() {
|
||||
this.search();
|
||||
},
|
||||
handleStatus(scope) {
|
||||
// console.log(scope.row.userId)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -167,9 +167,6 @@ export default {
|
|||
activated() {
|
||||
this.search();
|
||||
},
|
||||
handleStatus(scope) {
|
||||
// console.log(scope.row.userId)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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连接
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -151,7 +151,6 @@ export default {
|
|||
this.$refs.deleteConfirm.open(row);
|
||||
},
|
||||
copy(row) {
|
||||
// console.log(row);
|
||||
},
|
||||
setPermission(row) {
|
||||
this.$refs.editPermission.open(row);
|
||||
|
|
|
@ -167,9 +167,6 @@ export default {
|
|||
activated() {
|
||||
this.search();
|
||||
},
|
||||
handleStatus(scope) {
|
||||
// console.log(scope.row.userId)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue