提交 8848ee9a 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

增加系统信息轮询

上级 910c857e
/* eslint-disable */
export const toUpperCase = (str) => { export const toUpperCase = (str) => {
if (str[0]) { if (str[0]) {
return str.replace(str[0], str[0].toUpperCase()) return str.replace(str[0], str[0].toUpperCase())
...@@ -8,13 +9,13 @@ export const toUpperCase = (str) => { ...@@ -8,13 +9,13 @@ export const toUpperCase = (str) => {
// 驼峰转换下划线 // 驼峰转换下划线
export const toSQLLine = (str) => { export const toSQLLine = (str) => {
if (str=="ID") return "ID" if (str == "ID") return "ID"
return str.replace(/([A-Z])/g,"_$1").toLowerCase(); return str.replace(/([A-Z])/g, "_$1").toLowerCase();
} }
// 下划线转换驼峰 // 下划线转换驼峰
export const toHump = (name) => { export const toHump = (name) => {
return name.replace(/\_(\w)/g, function(all, letter){ return name.replace(/\_(\w)/g, function(all, letter) {
return letter.toUpperCase(); return letter.toUpperCase();
}); });
} }
\ No newline at end of file
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
apis && apis &&
apis.map(item => { apis.map(item => {
item.onlyId = "p:"+item.path+"m:"+item.method item.onlyId = "p:"+item.path+"m:"+item.method
if (apiObj.hasOwnProperty(item.apiGroup)) { if (Object.prototype.hasOwnProperty.call(apiObj,item.apiGroup)) {
apiObj[item.apiGroup].push(item) apiObj[item.apiGroup].push(item)
} else { } else {
Object.assign(apiObj, { [item.apiGroup]: [item] }) Object.assign(apiObj, { [item.apiGroup]: [item] })
......
...@@ -146,8 +146,11 @@ export default { ...@@ -146,8 +146,11 @@ export default {
], ],
}; };
}, },
created() { created() {
this.reload(); this.reload();
setInterval(() => {
this.reload();
}, 1000*10);
}, },
methods: { methods: {
async reload() { async reload() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册