diff --git a/src/utils/api.js b/src/utils/api.js index 5c5101d..f176971 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -102,12 +102,15 @@ export default { modelClassList: `${host}/nakadai/model/reference/modelClassList`, saveReferenceCategory: `${host}/nakadai/model/reference/saveReferenceCategory`, updateModelClass: `${host}/nakadai/model/reference/updateModelClass`, + checkIsShowBySystemId: `${host}/nakadai/model/reference/checkIsShowBySystemId`, + modifyIsShowState: `${host}/nakadai/model/reference/modifyIsShowState`, 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`, + getAllModelList: `${host}/nakadai/model/reference/demo/getAllModelList`, deleteSourceModelCategory: `${host}/nakadai/model/category/deleteSourceModelCategory`, categorySave: `${host}/nakadai/model/category/save`, @@ -121,6 +124,7 @@ export default { sysModelDemoList: `${host}/nakadai/model/demo/sysModelDemoList`, updateSysModelDemo: `${host}/nakadai/model/demo/updateSysModelDemo`, runPythonCode: `${host}/nakadai/model/demo/runPythonCode`, + getAllModelListBySys: `${host}/nakadai/model/demo/getAllModelListBySys`, // 课程管理三级联查 courseDiscipline: `${host}/nakadai/nakadai/subject/courseDiscipline`, //课程学科类别 diff --git a/src/views/serve/backstage/model.vue b/src/views/serve/backstage/model.vue index 4277035..fda96e4 100644 --- a/src/views/serve/backstage/model.vue +++ b/src/views/serve/backstage/model.vue @@ -87,15 +87,28 @@ export default { mounted() {}, methods: { getData() { + const curNode = this.$refs.tree.$refs.tree.getCurrentNode() // 获取当前选中的分类 + // 如果是首级,要调另一个接口 + if (!curNode.level) { + this.$post(this.api.getAllModelList, { + pageNum: this.page, + pageSize: this.pageSize, + systemId: this.systemId + }).then(res => { + this.listData = res.data.records + this.total = res.data.total + }).catch(res => {}) + } else { this.$post(this.api.referenceDemoList, { - modelName: this.keyword, - pageNum: this.page, - pageSize: this.pageSize, - categoryId: this.$refs.tree.$refs.tree.getCurrentKey() + modelName: this.keyword, + pageNum: this.page, + pageSize: this.pageSize, + categoryId: curNode.id }).then(res => { - this.listData = res.data.records - this.total = res.data.total + this.listData = res.data.records + this.total = res.data.total }).catch(res => {}) + } }, initData() { this.$refs.table.clearSelection() @@ -138,7 +151,6 @@ export default { } }) e.children = [...e.children, ...modelChildren] - // console.log(11, e) resolve() }).catch(res => { reject() @@ -148,8 +160,6 @@ export default { }) } addType(data) - // debugger - console.log(data, promises) Promise.all(promises).then(_ => { this.modelData = data }).catch(res => {}) diff --git a/src/views/serve/backstage/modelType.vue b/src/views/serve/backstage/modelType.vue index 95b6b31..ed088cc 100644 --- a/src/views/serve/backstage/modelType.vue +++ b/src/views/serve/backstage/modelType.vue @@ -2,7 +2,7 @@
{{ item.updateTime }}
+修复
+{{ item.updateTime }}
-修复
-