From 2c6fe60b1d0c47a3e132e65049df2fb81e3a7e9b Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 8 Mar 2022 14:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=A8=A1=E5=9E=8B=E5=8F=8A?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=A8=A1=E5=9E=8B=E3=80=81=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=AD=89=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/setting.js | 15 ++ src/utils/api.js | 23 ++- src/views/serve/addModel.vue | 26 +++- src/views/serve/backstage/model.vue | 172 +++++++++++------------ src/views/serve/backstage/modelType.vue | 89 ++++++++++++ src/views/serve/backstage/sourceType.vue | 5 +- src/views/system/addLog.vue | 44 +++--- src/views/system/index.vue | 11 +- src/views/system/log.vue | 34 +++-- src/views/system/manageLog.vue | 39 ++--- 10 files changed, 302 insertions(+), 156 deletions(-) diff --git a/src/setting.js b/src/setting.js index 2dbcf23..efd1b35 100644 --- a/src/setting.js +++ b/src/setting.js @@ -36,6 +36,21 @@ const Setting = { platformId: 3, // 平台标识,1职站,2数据平台,3中台 jumpPath, // 判分点系统跳转路径前缀 host, // 请求路径前缀 + // 平台列表 + platformList: [ + { + id: 1, + name: '职站' + }, + { + id: 2, + name: '数据平台' + }, + { + id: 3, + name: '中台' + } + ] }; export default Setting; diff --git a/src/utils/api.js b/src/utils/api.js index 475d300..5c5101d 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -1,9 +1,8 @@ import Setting from "@/setting"; -let host = Setting.host; -// let uploadURL = "http://www.huorantech.cn:9000"; -// let uploadURL = "http://124.71.12.62:9000"; -let uploadURL = "http://39.108.250.202:9000"; +const host = Setting.host; +const host1 = 'http://192.168.31.137:9000' +const uploadURL = "http://39.108.250.202:9000"; export default { @@ -104,6 +103,12 @@ export default { saveReferenceCategory: `${host}/nakadai/model/reference/saveReferenceCategory`, updateModelClass: `${host}/nakadai/model/reference/updateModelClass`, + delModelInfoBySystemId: `${host}/nakadai/model/reference/demo/delModelInfoBySystemId`, + deleteReferenceDemo: `${host}/nakadai/model/reference/demo/deleteReferenceDemo`, + referenceFindById: `${host}/nakadai/model/reference/demo/findById`, + saveReferenceDemo: `${host}/nakadai/model/reference/demo/saveReferenceDemo`, + referenceDemoList: `${host}/nakadai/model/reference/demo/referenceDemoList`, + deleteSourceModelCategory: `${host}/nakadai/model/category/deleteSourceModelCategory`, categorySave: `${host}/nakadai/model/category/save`, sourceModelClassification: `${host}/nakadai/model/category/sourceModelClassification`, @@ -200,5 +205,13 @@ export default { // 关键词 addKeyword: `${host}/data/keyword/addKeyword`, deleteKeyword: `${host}/data/keyword/deleteKeyword`, - getKeywordByCategoryId: `${host}/data/keyword/getKeywordByCategoryId` + getKeywordByCategoryId: `${host}/data/keyword/getKeywordByCategoryId`, + + // 日志管理 + logAdd: `${host1}/nakadai/log/add`, + logDel: `${host1}/nakadai/log/delete`, + logGet: `${host1}/nakadai/log/get`, + logManagementList: `${host1}/nakadai/log/logManagementList`, + platformLogList: `${host1}/nakadai/log/platformLogList`, + listUpdate: `${host1}/nakadai/log/update`, }; \ No newline at end of file diff --git a/src/views/serve/addModel.vue b/src/views/serve/addModel.vue index cd24539..7f3983e 100644 --- a/src/views/serve/addModel.vue +++ b/src/views/serve/addModel.vue @@ -40,7 +40,8 @@ export default { categoryId : Number(this.$route.query.categoryId), id : Number(this.$route.query.id), postStatus : Number(this.$route.query.postStatus), - isDetail : Boolean(this.$route.query.show), + isDetail : Boolean(this.$route.query.show), // 是否是查看 + isModel : Boolean(this.$route.query.model), // 是否是从模型列表进来的,模型和源模型查询详情的接口不一样 form: { modelName: '', modelDemo: '' @@ -54,12 +55,23 @@ export default { methods: { // 获取详情 getData() { - this.$post(`${this.api.modelFindById}?id=${this.id}`).then(res => { - const { data } = res - this.form.modelName = data.modelName - this.form.modelDemo = data.modelDemo - this.codeKey++ - }).catch(res => {}) + // 模型 + if (this.isModel) { + this.$post(`${this.api.referenceFindById}?id=${this.id}`).then(res => { + const { data } = res + this.form.modelName = data.modelName + this.form.modelDemo = data.modelDemo + this.codeKey++ + }).catch(res => {}) + } else { + // 源模型 + this.$post(`${this.api.modelFindById}?id=${this.id}`).then(res => { + const { data } = res + this.form.modelName = data.modelName + this.form.modelDemo = data.modelDemo + this.codeKey++ + }).catch(res => {}) + } }, // 保存 submit(postStatus){ diff --git a/src/views/serve/backstage/model.vue b/src/views/serve/backstage/model.vue index 62400b2..b748a93 100644 --- a/src/views/serve/backstage/model.vue +++ b/src/views/serve/backstage/model.vue @@ -1,7 +1,7 @@