diff --git a/src/api/http/http-api.js b/src/api/http/http-api.js index f4085a6..9a3cf2d 100644 --- a/src/api/http/http-api.js +++ b/src/api/http/http-api.js @@ -101,6 +101,10 @@ export default { name: 'plc未连接列表', method: 'GET' }, - + categoryList: { + url: '/category/page', + name: '分类列表', + method: 'POST' + }, } diff --git a/src/views/productSpecManage/index.vue b/src/views/productSpecManage/index.vue index 4a0721e..566512f 100644 --- a/src/views/productSpecManage/index.vue +++ b/src/views/productSpecManage/index.vue @@ -67,10 +67,6 @@ const columns = [ title: '品类', dataIndex: 'name', }, - { - title: '子类', - dataIndex: 'child', - }, { title: '修改时间', dataIndex: 'updateTime', @@ -116,12 +112,12 @@ export default { methods: { handleChange(data) { console.log(data) - // if (data.file.status == "done") { // 导入表格之后成功的回调 - // this.$message.success(data.file.response.message) - // this.handleGetCameraIoList(); - // } else if(data.file.status == 'error'){ // 导入表格之后失败的回调 - // this.$message.error(data.file.response.message) - // } + if (data.file.status == "done") { // 导入表格之后成功的回调 + this.$message.success(data.file.response.message) + this.handleGetCameraIoList(); + } else if (data.file.status == 'error') { // 导入表格之后失败的回调 + this.$message.error(data.file.response.message) + } }, handleGetCameraIoList(pagination) { console.log(pagination) @@ -134,22 +130,22 @@ export default { this.request(); }, request(){ - // this.$api.httpApi.getCameraIoList({ - // data: { - // page:this.pageNum, - // size:this.pageSize, - // } - // }).then(res => { - // const pagination = { ...this.pagination }; - // pagination.total = res.data.total; - // this.data = res.data.list; - // this.pagination = pagination; - // res.data.list.forEach((value,index) => { - // value.pageNumber = this.pagination.current - // }); - // }).catch(err => { - // - // }); + this.$api.httpApi.categoryList({ + data: { + pageNum: this.pageNum, + pageSize: this.pageSize, + } + }).then(res => { + const pagination = {...this.pagination}; + pagination.total = res.data.total; + this.data = res.data.list; + this.pagination = pagination; + res.data.list.forEach((value, index) => { + value.pageNumber = this.pagination.current + }); + }).catch(err => { + + }); }, showModel(type,data){ this.visible = true @@ -166,18 +162,18 @@ export default { this.modelData=data }, delDosage(data){ - // console.log(data.id) - // var id=data.id - // this.$axios.delete('/camera/config/'+id, { - // data: {} - // }).then(res => { - // if(res.code==200){ - // this.$message.success('删除球机IO成功'); - // this.handleGetCameraIoList() - // } - // }).catch(err => { - // - // }) + console.log(data.id) + var id = data.id + this.$axios.delete('/category/' + id, { + data: {} + }).then(res => { + if (res.code == 200) { + this.$message.success('删除分类成功'); + this.handleGetCameraIoList() + } + }).catch(err => { + + }) }, }, components:{