diff --git a/.env.development b/.env.development
new file mode 100644
index 00000000..f96c8641
--- /dev/null
+++ b/.env.development
@@ -0,0 +1,16 @@
+# 本地环境
+NODE_ENV = development
+
+# 标题
+VUE_APP_TITLE = ''
+VUE_APP_PJ = ''
+
+# 接口地址
+VUE_APP_API_BASEURL = http://127.0.0.1:226/api
+VUE_APP_BASEURL = http://127.0.0.1:226
+
+# 本地端口
+VUE_APP_PORT = 2800
+
+# 是否开启代理
+VUE_APP_PROXY = true
diff --git a/.env.production b/.env.production
new file mode 100644
index 00000000..892716be
--- /dev/null
+++ b/.env.production
@@ -0,0 +1,11 @@
+# 生产环境
+NODE_ENV = production
+
+# 标题
+VUE_APP_TITLE = '星途后台管理系统'
+VUE_APP_TITLE = ''
+
+
+# 接口地址
+VUE_APP_API_BASEURL = http://127.0.0.1:226/api
+VUE_APP_BASEURL = http://127.0.0.1:226
diff --git a/.gitignore b/.gitignore
index 702252a3..4a7a0d74 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,8 +6,6 @@ node_modules
# local env files
.env.local
.env.*.local
-.env.production
-.env.development
# Log files
npm-debug.log*
diff --git a/package.json b/package.json
index ad3435fc..dfb0baec 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "scui",
+ "name": "xt_scui",
"version": "1.6.9",
"private": true,
"scripts": {
diff --git a/src/api/model/ops.js b/src/api/model/ops.js
index acb77651..ee819629 100644
--- a/src/api/model/ops.js
+++ b/src/api/model/ops.js
@@ -4,30 +4,23 @@ import http from "@/utils/request"
export default {
logs: {
list: {
- url: `${config.API_URL}/monitor/request_log/`,
+ url: `${config.API_URL}/ops/request_log/`,
name: "请求日志",
req: async function(data){
return await http.get(this.url, data);
}
},
- audit: {
- url: `${config.API_URL}/monitor/auditlog/`,
- name: "审计日志",
- req: async function(data){
- return await http.get(this.url, data);
- }
- }
},
dbbackup: {
list: {
- url: `${config.API_URL}/monitor/dbbackup/`,
+ url: `${config.API_URL}/ops/dbbackup/`,
name: "数据库备份",
req: async function(data){
return await http.get(this.url, data);
}
},
deletes: {
- url: `${config.API_URL}/monitor/dbbackup/`,
+ url: `${config.API_URL}/ops/dbbackup/`,
name: "数据库备份",
req: async function(data){
return await http.delete(this.url, data);
@@ -36,7 +29,7 @@ export default {
},
file_logs: {
list: {
- url: `${config.API_URL}/monitor/log/`,
+ url: `${config.API_URL}/ops/log/`,
name: "文件日志",
req: async function(data){
return await http.get(this.url, data);
@@ -45,15 +38,27 @@ export default {
detail: {
name: "文件日志",
req: async function(name){
- return await http.get(`${config.API_URL}/monitor/log/${name}/`);
+ return await http.get(`${config.API_URL}/ops/log/${name}/`);
}
}
},
server: {
- info: {
- name: "服务器状态",
+ cpu: {
+ name: "cpu状态",
req: async function(name){
- return await http.get(`${config.API_URL}/monitor/server/`);
+ return await http.get(`${config.API_URL}/ops/server/cpu/`);
+ }
+ },
+ memory: {
+ name: "memory状态",
+ req: async function(name){
+ return await http.get(`${config.API_URL}/ops/server/memory/`);
+ }
+ },
+ disk: {
+ name: "disk状态",
+ req: async function(name){
+ return await http.get(`${config.API_URL}/ops/server/disk/`);
}
}
},
@@ -61,7 +66,7 @@ export default {
info: {
name: "celery状态",
req: async function(name){
- return await http.get(`${config.API_URL}/monitor/celery/`);
+ return await http.get(`${config.API_URL}/ops/celery/`);
}
}
},
@@ -69,7 +74,7 @@ export default {
info: {
name: "redis状态",
req: async function(name){
- return await http.get(`${config.API_URL}/monitor/redis/`);
+ return await http.get(`${config.API_URL}/ops/redis/`);
}
}
},
diff --git a/src/components/mySelect/epselect.vue b/src/components/mySelect/epselect.vue
deleted file mode 100644
index 67f26cf3..00000000
--- a/src/components/mySelect/epselect.vue
+++ /dev/null
@@ -1,386 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{
- scope.row.belong_dept_.name
- }}
-
-
-
-
- {{userTypeOptions[scope.row.type]}}
-
-
-
-
-
-
-
-
-
-
- {{index+1}}-{{item.name}}
-
-
-
-
-
- 取消
- 确定
-
-
-
-
-
diff --git a/src/components/mySelect/select.vue b/src/components/mySelect/select.vue
deleted file mode 100644
index db73d4b3..00000000
--- a/src/components/mySelect/select.vue
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/components/mySelect/tableSelect.vue b/src/components/mySelect/tableSelect.vue
deleted file mode 100644
index 152df008..00000000
--- a/src/components/mySelect/tableSelect.vue
+++ /dev/null
@@ -1,225 +0,0 @@
-
-
-
-
-
-
-
-
- {{scope.$index+(currentPage - 1) * pageSize + 1}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/mySelect/userselect.vue b/src/components/mySelect/userselect.vue
deleted file mode 100644
index b413fd68..00000000
--- a/src/components/mySelect/userselect.vue
+++ /dev/null
@@ -1,427 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{userTypeOptions[scope.row.type]}}
-
-
-
-
-
-
-
-
-
-
-
- {{index+1}}-{{item.name}}
-
-
-
-
-
- 取消
- 确定
-
-
-
-
-
diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue
index 59baa831..1bbcef89 100644
--- a/src/components/scTable/index.vue
+++ b/src/components/scTable/index.vue
@@ -92,6 +92,7 @@ export default {
tableName: { type: String, default: "" },
apiObj: { type: Object, default: () => { } },
params: { type: Object, default: () => ({}) },
+ query: { type: Object, default: () => ({}) },
data: { type: Object, default: () => { } },
height: { type: [String, Number], default: "100%" },
size: { type: String, default: "default" },
diff --git a/src/my.js b/src/my.js
deleted file mode 100644
index 3005b2a9..00000000
--- a/src/my.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import myUserSelect from './components/mySelect/userselect'
-import mySelect from './components/mySelect/select'
-import myTableSelect from './components/mySelect/tableSelect'
-export default {
- install(app) {
- app.component('myUserSelect', myUserSelect);
- app.component('mySelect', mySelect);
- app.component('myTableSelect', myTableSelect);
- }
-}
diff --git a/src/views/ops/server.vue b/src/views/ops/server.vue
index 81c5e724..b4108926 100644
--- a/src/views/ops/server.vue
+++ b/src/views/ops/server.vue
@@ -3,7 +3,7 @@
-
+
{{
cpuData.count
@@ -16,7 +16,7 @@
-
+
{{ memoryData.total }}GB
{{ memoryData.used }}GB
@@ -25,7 +25,7 @@
-
+
{{ diskData.total }}GB
{{ diskData.used }}GB
@@ -34,7 +34,7 @@
-
+
{{ celeryData.count_registered_task }}
{{ redisData.used_memory_human }}
@@ -69,7 +69,6 @@
export default {
data() {
return {
- loading: false,
cpuData: {},
diskData: {},
memoryData: {},
@@ -96,18 +95,9 @@ export default {
})
},
serverInfo() {
- this.loading = true;
- this.$API.ops.server.info
- .req()
- .then((res) => {
- this.loading = false;
- this.cpuData = res.cpu;
- this.diskData = res.disk;
- this.memoryData = res.memory;
- })
- .catch((e) => {
- this.loading = false;
- });
+ this.$API.ops.server.cpu.req().then(res=>{this.cpuData = res})
+ this.$API.ops.server.memory.req().then(res=>{this.memoryData = res})
+ this.$API.ops.server.disk.req().then(res=>{this.diskData = res})
},
resetQuery() {
this.query = {};
diff --git a/src/views/ops/thirdLogs.vue b/src/views/ops/thirdLogs.vue
index 54fecffe..286df01f 100644
--- a/src/views/ops/thirdLogs.vue
+++ b/src/views/ops/thirdLogs.vue
@@ -100,7 +100,7 @@ export default {
},
data() {
return {
- apiObj: this.$API.third.thirdLog,
+ apiObj: this.$API.ops.thirdLog,
query: {},
logLists: [],
infoDrawer: false,
diff --git a/src/xtui.js b/src/xtui.js
index 6f3298cf..7577234d 100644
--- a/src/xtui.js
+++ b/src/xtui.js
@@ -1,14 +1,6 @@
-import ehsUserSelect from './components/ehsSelect/userselect'
-import ehsEpSelect from './components/ehsSelect/epselect'
-import ehsSelect from './components/ehsSelect/select'
-import ehsTableSelect from './components/ehsSelect/tableSelect'
import xtSelect from './components/xtSelect/index.vue'
export default {
install(app) {
- app.component('ehsUserSelect', ehsUserSelect);
- app.component('ehsEpSelect', ehsEpSelect);
- app.component('ehsSelect', ehsSelect);
- app.component('ehsTableSelect', ehsTableSelect);
app.component('xtSelect', xtSelect);
}
}
diff --git a/vue.config.js b/vue.config.js
index 3090250b..8275c803 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -26,7 +26,7 @@ module.exports = defineConfig({
},
client: {
overlay: {
- // runtimeErrors: false,
+ runtimeErrors: false,
},
},
},