1
0
forked from ruoyi/RuoYi-Vue

remove all semicolons

This commit is contained in:
RuoYi
2025-04-27 10:05:55 +08:00
parent f30e737be2
commit 62630a5a95
92 changed files with 2285 additions and 2287 deletions

View File

@@ -65,8 +65,8 @@
</template>
<script>
import { getCache } from "@/api/monitor/cache";
import * as echarts from "echarts";
import { getCache } from "@/api/monitor/cache"
import * as echarts from "echarts"
export default {
name: "Cache",
@@ -81,17 +81,17 @@ export default {
}
},
created() {
this.getList();
this.openLoading();
this.getList()
this.openLoading()
},
methods: {
/** 查缓存询信息 */
getList() {
getCache().then((response) => {
this.cache = response.data;
this.$modal.closeLoading();
this.cache = response.data
this.$modal.closeLoading()
this.commandstats = echarts.init(this.$refs.commandstats, "macarons");
this.commandstats = echarts.init(this.$refs.commandstats, "macarons")
this.commandstats.setOption({
tooltip: {
trigger: "item",
@@ -109,8 +109,8 @@ export default {
animationDuration: 1000,
}
]
});
this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons");
})
this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons")
this.usedmemory.setOption({
tooltip: {
formatter: "{b} <br/>{a} : " + this.cache.info.used_memory_human,
@@ -132,17 +132,17 @@ export default {
]
}
]
});
})
window.addEventListener("resize", () => {
this.commandstats.resize();
this.usedmemory.resize();
});
});
this.commandstats.resize()
this.usedmemory.resize()
})
})
},
// 打开加载层
openLoading() {
this.$modal.loading("正在加载缓存监控数据,请稍候!");
this.$modal.loading("正在加载缓存监控数据,请稍候!")
}
}
};
}
</script>

View File

@@ -152,7 +152,7 @@
</template>
<script>
import { listCacheName, listCacheKey, getCacheValue, clearCacheName, clearCacheKey, clearCacheAll } from "@/api/monitor/cache";
import { listCacheName, listCacheKey, getCacheValue, clearCacheName, clearCacheKey, clearCacheAll } from "@/api/monitor/cache"
export default {
name: "CacheList",
@@ -165,77 +165,77 @@ export default {
subLoading: false,
nowCacheName: "",
tableHeight: window.innerHeight - 200
};
}
},
created() {
this.getCacheNames();
this.getCacheNames()
},
methods: {
/** 查询缓存名称列表 */
getCacheNames() {
this.loading = true;
this.loading = true
listCacheName().then(response => {
this.cacheNames = response.data;
this.loading = false;
});
this.cacheNames = response.data
this.loading = false
})
},
/** 刷新缓存名称列表 */
refreshCacheNames() {
this.getCacheNames();
this.$modal.msgSuccess("刷新缓存列表成功");
this.getCacheNames()
this.$modal.msgSuccess("刷新缓存列表成功")
},
/** 清理指定名称缓存 */
handleClearCacheName(row) {
clearCacheName(row.cacheName).then(response => {
this.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功");
this.getCacheKeys();
});
this.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功")
this.getCacheKeys()
})
},
/** 查询缓存键名列表 */
getCacheKeys(row) {
const cacheName = row !== undefined ? row.cacheName : this.nowCacheName;
const cacheName = row !== undefined ? row.cacheName : this.nowCacheName
if (cacheName === "") {
return;
return
}
this.subLoading = true;
this.subLoading = true
listCacheKey(cacheName).then(response => {
this.cacheKeys = response.data;
this.subLoading = false;
this.nowCacheName = cacheName;
});
this.cacheKeys = response.data
this.subLoading = false
this.nowCacheName = cacheName
})
},
/** 刷新缓存键名列表 */
refreshCacheKeys() {
this.getCacheKeys();
this.$modal.msgSuccess("刷新键名列表成功");
this.getCacheKeys()
this.$modal.msgSuccess("刷新键名列表成功")
},
/** 清理指定键名缓存 */
handleClearCacheKey(cacheKey) {
clearCacheKey(cacheKey).then(response => {
this.$modal.msgSuccess("清理缓存键名[" + cacheKey + "]成功");
this.getCacheKeys();
});
this.$modal.msgSuccess("清理缓存键名[" + cacheKey + "]成功")
this.getCacheKeys()
})
},
/** 列表前缀去除 */
nameFormatter(row) {
return row.cacheName.replace(":", "");
return row.cacheName.replace(":", "")
},
/** 键名前缀去除 */
keyFormatter(cacheKey) {
return cacheKey.replace(this.nowCacheName, "");
return cacheKey.replace(this.nowCacheName, "")
},
/** 查询缓存内容详细 */
handleCacheValue(cacheKey) {
getCacheValue(this.nowCacheName, cacheKey).then(response => {
this.cacheForm = response.data;
});
this.cacheForm = response.data
})
},
/** 清理全部缓存 */
handleClearCacheAll() {
clearCacheAll().then(response => {
this.$modal.msgSuccess("清理全部缓存成功");
});
this.$modal.msgSuccess("清理全部缓存成功")
})
}
},
};
}
}
</script>

View File

@@ -2,14 +2,14 @@
<i-frame :src="url" />
</template>
<script>
import iFrame from "@/components/iFrame/index";
import iFrame from "@/components/iFrame/index"
export default {
name: "Druid",
components: { iFrame },
data() {
return {
url: process.env.VUE_APP_BASE_API + "/druid/login.html"
};
},
};
}
}
}
</script>

View File

@@ -291,7 +291,7 @@
</template>
<script>
import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job";
import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job"
import Crontab from '@/components/Crontab'
export default {
@@ -346,29 +346,29 @@ export default {
{ required: true, message: "cron执行表达式不能为空", trigger: "blur" }
]
}
};
}
},
created() {
this.getList();
this.getList()
},
methods: {
/** 查询定时任务列表 */
getList() {
this.loading = true;
this.loading = true
listJob(this.queryParams).then(response => {
this.jobList = response.rows;
this.total = response.total;
this.loading = false;
});
this.jobList = response.rows
this.total = response.total
this.loading = false
})
},
// 任务组名字典翻译
jobGroupFormat(row, column) {
return this.selectDictLabel(this.dict.type.sys_job_group, row.jobGroup);
return this.selectDictLabel(this.dict.type.sys_job_group, row.jobGroup)
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
this.open = false
this.reset()
},
// 表单重置
reset() {
@@ -381,96 +381,96 @@ export default {
misfirePolicy: 1,
concurrent: 1,
status: "0"
};
this.resetForm("form");
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.jobId);
this.single = selection.length != 1;
this.multiple = !selection.length;
this.ids = selection.map(item => item.jobId)
this.single = selection.length != 1
this.multiple = !selection.length
},
// 更多操作触发
handleCommand(command, row) {
switch (command) {
case "handleRun":
this.handleRun(row);
break;
this.handleRun(row)
break
case "handleView":
this.handleView(row);
break;
this.handleView(row)
break
case "handleJobLog":
this.handleJobLog(row);
break;
this.handleJobLog(row)
break
default:
break;
break
}
},
// 任务状态修改
handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用";
let text = row.status === "0" ? "启用" : "停用"
this.$modal.confirm('确认要"' + text + '""' + row.jobName + '"任务吗?').then(function() {
return changeJobStatus(row.jobId, row.status);
return changeJobStatus(row.jobId, row.status)
}).then(() => {
this.$modal.msgSuccess(text + "成功");
this.$modal.msgSuccess(text + "成功")
}).catch(function() {
row.status = row.status === "0" ? "1" : "0";
});
row.status = row.status === "0" ? "1" : "0"
})
},
/* 立即执行一次 */
handleRun(row) {
this.$modal.confirm('确认要立即执行一次"' + row.jobName + '"任务吗?').then(function() {
return runJob(row.jobId, row.jobGroup);
return runJob(row.jobId, row.jobGroup)
}).then(() => {
this.$modal.msgSuccess("执行成功");
}).catch(() => {});
this.$modal.msgSuccess("执行成功")
}).catch(() => {})
},
/** 任务详细信息 */
handleView(row) {
getJob(row.jobId).then(response => {
this.form = response.data;
this.openView = true;
});
this.form = response.data
this.openView = true
})
},
/** cron表达式按钮操作 */
handleShowCron() {
this.expression = this.form.cronExpression;
this.openCron = true;
this.expression = this.form.cronExpression
this.openCron = true
},
/** 确定后回传值 */
crontabFill(value) {
this.form.cronExpression = value;
this.form.cronExpression = value
},
/** 任务日志列表查询 */
handleJobLog(row) {
const jobId = row.jobId || 0;
const jobId = row.jobId || 0
this.$router.push('/monitor/job-log/index/' + jobId)
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加任务";
this.reset()
this.open = true
this.title = "添加任务"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const jobId = row.jobId || this.ids;
this.reset()
const jobId = row.jobId || this.ids
getJob(jobId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改任务";
});
this.form = response.data
this.open = true
this.title = "修改任务"
})
},
/** 提交按钮 */
submitForm: function() {
@@ -478,29 +478,29 @@ export default {
if (valid) {
if (this.form.jobId != undefined) {
updateJob(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addJob(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
this.$modal.msgSuccess("新增成功")
this.open = false
this.getList()
})
}
}
});
})
},
/** 删除按钮操作 */
handleDelete(row) {
const jobIds = row.jobId || this.ids;
const jobIds = row.jobId || this.ids
this.$modal.confirm('是否确认删除定时任务编号为"' + jobIds + '"的数据项?').then(function() {
return delJob(jobIds);
return delJob(jobIds)
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
@@ -509,5 +509,5 @@ export default {
}, `job_${new Date().getTime()}.xlsx`)
}
}
};
}
</script>

View File

@@ -180,8 +180,8 @@
</template>
<script>
import { getJob} from "@/api/monitor/job";
import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog";
import { getJob} from "@/api/monitor/job"
import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog"
export default {
name: "JobLog",
@@ -214,75 +214,75 @@ export default {
jobGroup: undefined,
status: undefined
}
};
}
},
created() {
const jobId = this.$route.params && this.$route.params.jobId;
const jobId = this.$route.params && this.$route.params.jobId
if (jobId !== undefined && jobId != 0) {
getJob(jobId).then(response => {
this.queryParams.jobName = response.data.jobName;
this.queryParams.jobGroup = response.data.jobGroup;
this.getList();
});
this.queryParams.jobName = response.data.jobName
this.queryParams.jobGroup = response.data.jobGroup
this.getList()
})
} else {
this.getList();
this.getList()
}
},
methods: {
/** 查询调度日志列表 */
getList() {
this.loading = true;
this.loading = true
listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.jobLogList = response.rows;
this.total = response.total;
this.loading = false;
this.jobLogList = response.rows
this.total = response.total
this.loading = false
}
);
)
},
// 返回按钮
handleClose() {
const obj = { path: "/monitor/job" };
this.$tab.closeOpenPage(obj);
const obj = { path: "/monitor/job" }
this.$tab.closeOpenPage(obj)
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
this.dateRange = []
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.jobLogId);
this.multiple = !selection.length;
this.ids = selection.map(item => item.jobLogId)
this.multiple = !selection.length
},
/** 详细按钮操作 */
handleView(row) {
this.open = true;
this.form = row;
this.open = true
this.form = row
},
/** 删除按钮操作 */
handleDelete(row) {
const jobLogIds = this.ids;
const jobLogIds = this.ids
this.$modal.confirm('是否确认删除调度日志编号为"' + jobLogIds + '"的数据项?').then(function() {
return delJobLog(jobLogIds);
return delJobLog(jobLogIds)
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 清空按钮操作 */
handleClean() {
this.$modal.confirm('是否确认清空所有调度日志数据项?').then(function() {
return cleanJobLog();
return cleanJobLog()
}).then(() => {
this.getList();
this.$modal.msgSuccess("清空成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess("清空成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
@@ -291,5 +291,5 @@ export default {
}, `log_${new Date().getTime()}.xlsx`)
}
}
};
}
</script>

View File

@@ -130,7 +130,7 @@
</template>
<script>
import { list, delLogininfor, cleanLogininfor, unlockLogininfor } from "@/api/monitor/logininfor";
import { list, delLogininfor, cleanLogininfor, unlockLogininfor } from "@/api/monitor/logininfor"
export default {
name: "Logininfor",
@@ -165,32 +165,32 @@ export default {
userName: undefined,
status: undefined
}
};
}
},
created() {
this.getList();
this.getList()
},
methods: {
/** 查询登录日志列表 */
getList() {
this.loading = true;
this.loading = true
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.list = response.rows;
this.total = response.total;
this.loading = false;
this.list = response.rows
this.total = response.total
this.loading = false
}
);
)
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.queryParams.pageNum = 1;
this.dateRange = []
this.resetForm("queryForm")
this.queryParams.pageNum = 1
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
},
/** 多选框选中数据 */
@@ -198,41 +198,41 @@ export default {
this.ids = selection.map(item => item.infoId)
this.single = selection.length!=1
this.multiple = !selection.length
this.selectName = selection.map(item => item.userName);
this.selectName = selection.map(item => item.userName)
},
/** 排序触发事件 */
handleSortChange(column, prop, order) {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
this.getList();
this.queryParams.orderByColumn = column.prop
this.queryParams.isAsc = column.order
this.getList()
},
/** 删除按钮操作 */
handleDelete(row) {
const infoIds = row.infoId || this.ids;
const infoIds = row.infoId || this.ids
this.$modal.confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?').then(function() {
return delLogininfor(infoIds);
return delLogininfor(infoIds)
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 清空按钮操作 */
handleClean() {
this.$modal.confirm('是否确认清空所有登录日志数据项?').then(function() {
return cleanLogininfor();
return cleanLogininfor()
}).then(() => {
this.getList();
this.$modal.msgSuccess("清空成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess("清空成功")
}).catch(() => {})
},
/** 解锁按钮操作 */
handleUnlock() {
const username = this.selectName;
const username = this.selectName
this.$modal.confirm('是否确认解锁用户"' + username + '"数据项?').then(function() {
return unlockLogininfor(username);
return unlockLogininfor(username)
}).then(() => {
this.$modal.msgSuccess("用户" + username + "解锁成功");
}).catch(() => {});
this.$modal.msgSuccess("用户" + username + "解锁成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
@@ -241,6 +241,6 @@ export default {
}, `logininfor_${new Date().getTime()}.xlsx`)
}
}
};
}
</script>

View File

@@ -63,7 +63,7 @@
</template>
<script>
import { list, forceLogout } from "@/api/monitor/online";
import { list, forceLogout } from "@/api/monitor/online"
export default {
name: "Online",
@@ -82,41 +82,41 @@ export default {
ipaddr: undefined,
userName: undefined
}
};
}
},
created() {
this.getList();
this.getList()
},
methods: {
/** 查询登录日志列表 */
getList() {
this.loading = true;
this.loading = true
list(this.queryParams).then(response => {
this.list = response.rows;
this.total = response.total;
this.loading = false;
});
this.list = response.rows
this.total = response.total
this.loading = false
})
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.getList();
this.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
this.resetForm("queryForm")
this.handleQuery()
},
/** 强退按钮操作 */
handleForceLogout(row) {
this.$modal.confirm('是否确认强退名称为"' + row.userName + '"的用户?').then(function() {
return forceLogout(row.tokenId);
return forceLogout(row.tokenId)
}).then(() => {
this.getList();
this.$modal.msgSuccess("强退成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess("强退成功")
}).catch(() => {})
}
}
};
}
</script>

View File

@@ -207,7 +207,7 @@
</template>
<script>
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog"
export default {
name: "Operlog",
@@ -244,36 +244,36 @@ export default {
businessType: undefined,
status: undefined
}
};
}
},
created() {
this.getList();
this.getList()
},
methods: {
/** 查询登录日志 */
getList() {
this.loading = true;
this.loading = true
list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
this.list = response.rows;
this.total = response.total;
this.loading = false;
this.list = response.rows
this.total = response.total
this.loading = false
}
);
)
},
// 操作日志类型字典翻译
typeFormat(row, column) {
return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType);
return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType)
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.queryParams.pageNum = 1;
this.dateRange = []
this.resetForm("queryForm")
this.queryParams.pageNum = 1
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
},
/** 多选框选中数据 */
@@ -283,33 +283,33 @@ export default {
},
/** 排序触发事件 */
handleSortChange(column, prop, order) {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
this.getList();
this.queryParams.orderByColumn = column.prop
this.queryParams.isAsc = column.order
this.getList()
},
/** 详细按钮操作 */
handleView(row) {
this.open = true;
this.form = row;
this.open = true
this.form = row
},
/** 删除按钮操作 */
handleDelete(row) {
const operIds = row.operId || this.ids;
const operIds = row.operId || this.ids
this.$modal.confirm('是否确认删除日志编号为"' + operIds + '"的数据项?').then(function() {
return delOperlog(operIds);
return delOperlog(operIds)
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 清空按钮操作 */
handleClean() {
this.$modal.confirm('是否确认清空所有操作日志数据项?').then(function() {
return cleanOperlog();
return cleanOperlog()
}).then(() => {
this.getList();
this.$modal.msgSuccess("清空成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess("清空成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
@@ -318,6 +318,6 @@ export default {
}, `operlog_${new Date().getTime()}.xlsx`)
}
}
};
}
</script>

View File

@@ -176,7 +176,7 @@
</template>
<script>
import { getServer } from "@/api/monitor/server";
import { getServer } from "@/api/monitor/server"
export default {
name: "Server",
@@ -184,24 +184,24 @@ export default {
return {
// 服务器信息
server: []
};
}
},
created() {
this.getList();
this.openLoading();
this.getList()
this.openLoading()
},
methods: {
/** 查询服务器信息 */
getList() {
getServer().then(response => {
this.server = response.data;
this.$modal.closeLoading();
});
this.server = response.data
this.$modal.closeLoading()
})
},
// 打开加载层
openLoading() {
this.$modal.loading("正在加载服务监控数据,请稍候!");
this.$modal.loading("正在加载服务监控数据,请稍候!")
}
}
};
}
</script>