parent
32587fb68a
commit
d8529a297f
|
|
@ -309,7 +309,8 @@ export default {
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
sort: 0
|
sort: 0,
|
||||||
|
isCollect: '',
|
||||||
},
|
},
|
||||||
//英语一言数据
|
//英语一言数据
|
||||||
oneEnglishData: {},
|
oneEnglishData: {},
|
||||||
|
|
@ -317,11 +318,11 @@ export default {
|
||||||
rulesEdit: {
|
rulesEdit: {
|
||||||
englishWord: [
|
englishWord: [
|
||||||
{required: true, message: "英语单词不能为空", trigger: "blur"},
|
{required: true, message: "英语单词不能为空", trigger: "blur"},
|
||||||
{ min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
|
{min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
chineseWord: [
|
chineseWord: [
|
||||||
{required: true, message: "中文不能为空", trigger: "blur"},
|
{required: true, message: "中文不能为空", trigger: "blur"},
|
||||||
{ min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur' }
|
{min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
isCollect: [
|
isCollect: [
|
||||||
{required: true, message: "收藏不能为空", trigger: "blur"}
|
{required: true, message: "收藏不能为空", trigger: "blur"}
|
||||||
|
|
@ -334,7 +335,7 @@ export default {
|
||||||
rulesAdd: {
|
rulesAdd: {
|
||||||
content: [
|
content: [
|
||||||
{required: true, message: "中英文不能为空", trigger: "blur"},
|
{required: true, message: "中英文不能为空", trigger: "blur"},
|
||||||
{ min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
|
{min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
isCollect: [
|
isCollect: [
|
||||||
{required: true, message: "收藏不能为空", trigger: "blur"}
|
{required: true, message: "收藏不能为空", trigger: "blur"}
|
||||||
|
|
@ -349,6 +350,8 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
//获取英语一言api数据
|
//获取英语一言api数据
|
||||||
getOneEnglishApi() {
|
getOneEnglishApi() {
|
||||||
|
|
@ -423,8 +426,8 @@ export default {
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.daterangeCreateTime = [];
|
this.daterangeCreateTime = [];
|
||||||
this.queryParams.createTime=null
|
this.queryParams.createTime = null
|
||||||
this.queryParams.endCreateTime=null
|
this.queryParams.endCreateTime = null
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
@ -439,6 +442,10 @@ export default {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.openAdd = true;
|
this.openAdd = true;
|
||||||
this.title = "添加英语单词";
|
this.title = "添加英语单词";
|
||||||
|
//下拉框默认选中
|
||||||
|
this.form.isCollect= parseInt(this.dict.type.english_collect[0].value)
|
||||||
|
this.form.top = parseInt(this.dict.type.english_top[1].value)
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,13 @@
|
||||||
<el-table-column label="爬虫地址" align="center" prop="url" :show-overflow-tooltip="true"/>
|
<el-table-column label="爬虫地址" align="center" prop="url" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="请求时间" align="center" prop="requestTime">
|
<el-table-column label="请求时间" align="center" prop="requestTime">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ Math.round(scope.row.requestTime / 1000) }}秒</span>
|
<span>{{
|
||||||
|
scope.row.requestTime < 1000
|
||||||
|
?
|
||||||
|
scope.row.requestTime + '毫秒'
|
||||||
|
:
|
||||||
|
Math.round(scope.row.requestTime / 1000) + '秒'
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="复杂度" align="center" prop="complexRate">
|
<el-table-column label="复杂度" align="center" prop="complexRate">
|
||||||
|
|
@ -180,10 +186,10 @@ export default {
|
||||||
// 表单校验
|
// 表单校验
|
||||||
queryRules: {
|
queryRules: {
|
||||||
beginRequestTime: [
|
beginRequestTime: [
|
||||||
{ type: 'number', message: '必须数字!', trigger: 'blur'}
|
{type: 'number', message: '必须数字!', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
endRequestTime: [
|
endRequestTime: [
|
||||||
{ type: 'number', message: '必须数字!', trigger: 'blur'}
|
{type: 'number', message: '必须数字!', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.xjs.common.aop;
|
package com.xjs.common.aop;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.xjs.annotation.ReptileLog;
|
import com.xjs.annotation.ReptileLog;
|
||||||
import com.xjs.business.log.RemoteLogFeign;
|
import com.xjs.business.log.RemoteLogFeign;
|
||||||
|
|
@ -16,8 +15,6 @@ import org.springframework.stereotype.Component;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.temporal.ChronoUnit;
|
|
||||||
|
|
||||||
import static com.xjs.consts.ReqConst.ERROR;
|
import static com.xjs.consts.ReqConst.ERROR;
|
||||||
import static com.xjs.consts.ReqConst.SUCCESS;
|
import static com.xjs.consts.ReqConst.SUCCESS;
|
||||||
|
|
@ -51,13 +48,15 @@ public class reptileLogAspect {
|
||||||
Object obj = null;
|
Object obj = null;
|
||||||
try {
|
try {
|
||||||
//切入前-----
|
//切入前-----
|
||||||
LocalDateTime localDateTime1 = DateUtil.date().toLocalDateTime();
|
// 开始时间
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
|
||||||
obj = joinPoint.proceed();
|
obj = joinPoint.proceed();
|
||||||
|
|
||||||
//切入后-----
|
//切入后-----
|
||||||
LocalDateTime localDateTime2 = DateUtil.date().toLocalDateTime();
|
// 结束时间
|
||||||
long between = ChronoUnit.MILLIS.between(localDateTime1, localDateTime2);
|
long endTime = System.currentTimeMillis();
|
||||||
|
long between = endTime - startTime;
|
||||||
log.info("调用爬虫接口耗费时间:{}ms", between);
|
log.info("调用爬虫接口耗费时间:{}ms", between);
|
||||||
|
|
||||||
this.handle(joinPoint, between, obj);
|
this.handle(joinPoint, between, obj);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue