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 @@