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