Commit c45748a3 by yuwei

项目初始化

parent b82bf289
package cn.datax.service.data.market.api.vo; package cn.datax.service.data.market.api.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -18,6 +19,7 @@ public class ApiLogVo implements Serializable { ...@@ -18,6 +19,7 @@ public class ApiLogVo implements Serializable {
private String callerUrl; private String callerUrl;
private Integer callerSize; private Integer callerSize;
private String callerParams; private String callerParams;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime callerDate; private LocalDateTime callerDate;
private Long time; private Long time;
private String msg; private String msg;
......
...@@ -40,9 +40,10 @@ public class ApiLogAspect { ...@@ -40,9 +40,10 @@ public class ApiLogAspect {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
Object result = joinPoint.proceed(); Object result = joinPoint.proceed();
long endTime = System.currentTimeMillis(); long endTime = System.currentTimeMillis();
ApiLogDto log = getLog(); System.out.println("endTime:" + endTime);
log.setTime(endTime - startTime); // ApiLogDto log = getLog();
handleLog(joinPoint, log); // log.setTime(endTime - startTime);
// handleLog(joinPoint, log);
return result; return result;
} }
...@@ -54,10 +55,11 @@ public class ApiLogAspect { ...@@ -54,10 +55,11 @@ public class ApiLogAspect {
*/ */
@AfterThrowing(value = "logPointCut()", throwing = "e") @AfterThrowing(value = "logPointCut()", throwing = "e")
public void doAfterThrowing(JoinPoint joinPoint, Exception e) { public void doAfterThrowing(JoinPoint joinPoint, Exception e) {
ApiLogDto log = getLog(); log.error("出错{}", e.getMessage());
log.setStatus(DataConstant.EnableState.DISABLE.getKey()); // ApiLogDto log = getLog();
log.setMsg(e.getMessage()); // log.setStatus(DataConstant.EnableState.DISABLE.getKey());
handleLog(joinPoint, log); // log.setMsg(e.getMessage());
// handleLog(joinPoint, log);
} }
private ApiLogDto getLog() { private ApiLogDto getLog() {
......
...@@ -32,16 +32,6 @@ export default { ...@@ -32,16 +32,6 @@ export default {
.content { .content {
padding: 6px; padding: 6px;
min-height: calc(100vh - 39px - 107px); min-height: calc(100vh - 39px - 107px);
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
} }
} }
.fixed-header+.app-main { .fixed-header+.app-main {
......
...@@ -66,6 +66,18 @@ export default { ...@@ -66,6 +66,18 @@ export default {
position: fixed; position: fixed;
top: 0; top: 0;
} }
.main-container{
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 10px;
}
}
} }
.drawer-bg { .drawer-bg {
background: #000; background: #000;
......
...@@ -28,7 +28,13 @@ ...@@ -28,7 +28,13 @@
<el-input v-model="form.time" /> <el-input v-model="form.time" />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-input v-model="form.status" /> <el-radio-group v-model="form.status">
<el-radio
v-for="dict in statusOptions"
:key="dict.id"
:label="dict.itemText"
>{{dict.itemValue}}</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="信息记录" prop="msg"> <el-form-item label="信息记录" prop="msg">
<el-input v-model="form.msg" /> <el-input v-model="form.msg" />
...@@ -66,11 +72,18 @@ export default { ...@@ -66,11 +72,18 @@ export default {
showDetail: false showDetail: false
}, },
// 表单参数 // 表单参数
form: {} form: {},
// 状态数据字典
statusOptions: []
} }
}, },
created() { created() {
console.log('id:' + this.data.id) console.log('id:' + this.data.id)
this.getDicts('sys_normal_status').then(response => {
if (response.success) {
this.statusOptions = response.data
}
})
}, },
mounted() { mounted() {
this.getLog(this.data.id) this.getLog(this.data.id)
......
...@@ -266,7 +266,6 @@ export default { ...@@ -266,7 +266,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delApiLog(row.id) delApiLog(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -303,7 +303,6 @@ export default { ...@@ -303,7 +303,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delApiMask(row.id) delApiMask(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -331,7 +331,6 @@ export default { ...@@ -331,7 +331,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delDataApi(row.id) delDataApi(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -312,7 +312,6 @@ export default { ...@@ -312,7 +312,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delDataService(row.id) delDataService(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -31,7 +31,13 @@ ...@@ -31,7 +31,13 @@
<el-input v-model="form.time" /> <el-input v-model="form.time" />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-input v-model="form.status" /> <el-radio-group v-model="form.status">
<el-radio
v-for="dict in statusOptions"
:key="dict.id"
:label="dict.itemText"
>{{dict.itemValue}}</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="信息记录" prop="msg"> <el-form-item label="信息记录" prop="msg">
<el-input v-model="form.msg" /> <el-input v-model="form.msg" />
...@@ -69,11 +75,18 @@ export default { ...@@ -69,11 +75,18 @@ export default {
showDetail: false showDetail: false
}, },
// 表单参数 // 表单参数
form: {} form: {},
// 状态数据字典
statusOptions: []
} }
}, },
created() { created() {
console.log('id:' + this.data.id) console.log('id:' + this.data.id)
this.getDicts('sys_normal_status').then(response => {
if (response.success) {
this.statusOptions = response.data
}
})
}, },
mounted() { mounted() {
this.getLog(this.data.id) this.getLog(this.data.id)
......
...@@ -265,7 +265,6 @@ export default { ...@@ -265,7 +265,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delDataServiceLog(row.id) delDataServiceLog(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -302,7 +302,6 @@ export default { ...@@ -302,7 +302,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delChangeRecord(row.id) delChangeRecord(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -303,7 +303,6 @@ export default { ...@@ -303,7 +303,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delDataSource(row.id) delDataSource(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -4,19 +4,25 @@ ...@@ -4,19 +4,25 @@
<div :style="classCardbody"> <div :style="classCardbody">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-select v-model="sqlDataSource" placeholder="请选择数据源"> <el-form :inline="true" class="demo-form-inline">
<el-option <el-form-item label="数据源">
v-for="source in sourceOptions" <el-select v-model="sqlDataSource" placeholder="请选择数据源">
:key="source.id" <el-option
:label="source.sourceName" v-for="source in sourceOptions"
:value="source.id" :key="source.id"
:disabled="source.status === '0'" :label="source.sourceName"
></el-option> :value="source.id"
</el-select> :disabled="source.status === '0'"
<el-button size="mini" round @click="runData" :disabled="sqlExecuting">运行</el-button> ></el-option>
<el-button size="mini" round @click="stopData" :disabled="!sqlExecuting">停止</el-button> </el-select>
<el-button size="mini" round @click="formaterSql" :disabled="sqlExecuting">格式化</el-button> </el-form-item>
<el-button size="mini" round @click="refreshData" :disabled="sqlExecuting">重置</el-button> <el-form-item>
<el-button size="mini" round @click="runData" :disabled="sqlExecuting">运行</el-button>
<el-button size="mini" round @click="stopData" :disabled="!sqlExecuting">停止</el-button>
<el-button size="mini" round @click="formaterSql" :disabled="sqlExecuting">格式化</el-button>
<el-button size="mini" round @click="refreshData" :disabled="sqlExecuting">重置</el-button>
</el-form-item>
</el-form>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
......
...@@ -256,7 +256,6 @@ export default { ...@@ -256,7 +256,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delLog(row.id) delLog(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -274,7 +274,6 @@ export default { ...@@ -274,7 +274,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delLog(row.id) delLog(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -338,7 +338,6 @@ export default { ...@@ -338,7 +338,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
pauseJob(row.id || this.ids[0]) pauseJob(row.id || this.ids[0])
}).then(() => {
this.$message.success('任务暂停成功') this.$message.success('任务暂停成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
...@@ -352,7 +351,6 @@ export default { ...@@ -352,7 +351,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
resumeJob(row.id || this.ids[0]) resumeJob(row.id || this.ids[0])
}).then(() => {
this.$message.success('任务恢复成功') this.$message.success('任务恢复成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
...@@ -366,7 +364,6 @@ export default { ...@@ -366,7 +364,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
runJob(row.id || this.ids[0]) runJob(row.id || this.ids[0])
}).then(() => {
this.$message.success('任务执行成功') this.$message.success('任务执行成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
...@@ -380,7 +377,6 @@ export default { ...@@ -380,7 +377,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delJob(row.id) delJob(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -285,7 +285,6 @@ export default { ...@@ -285,7 +285,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delLog(row.id) delLog(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -312,7 +312,6 @@ export default { ...@@ -312,7 +312,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delConfig(row.id) delConfig(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -241,7 +241,6 @@ export default { ...@@ -241,7 +241,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delDept(row.id) delDept(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -365,7 +365,6 @@ export default { ...@@ -365,7 +365,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delDict(row.id) delDict(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -339,7 +339,6 @@ export default { ...@@ -339,7 +339,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delDictItem(row.id) delDictItem(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -262,7 +262,6 @@ export default { ...@@ -262,7 +262,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delMenu(row.id) delMenu(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -303,7 +303,6 @@ export default { ...@@ -303,7 +303,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delPost(row.id) delPost(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -310,7 +310,6 @@ export default { ...@@ -310,7 +310,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delRole(row.id) delRole(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -385,7 +385,6 @@ export default { ...@@ -385,7 +385,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delUser(row.id) delUser(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
...@@ -304,7 +304,6 @@ export default { ...@@ -304,7 +304,6 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delDataSet(row.id) delDataSet(row.id)
}).then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment