提交 af882fee 编写于 作者: huangwensu's avatar huangwensu

模块删除

上级 d819b19b
...@@ -737,7 +737,7 @@ export default { ...@@ -737,7 +737,7 @@ export default {
removeTab(targetName) { removeTab(targetName) {
for(let i = 0;i<vm.componentList.moduleModelList.length;i++) { for(let i = 0;i<vm.componentList.moduleModelList.length;i++) {
if((targetName - 1) == i) { if((targetName - 1) == i) {
if(isNotEmptyUtils(vm.componentList.moduleModelList[i].templetModelList)) { if(isNotEmptyUtils(vm.componentList.moduleModelList[i].templetModelList)) { // 模板不为空
vm.$confirm('删除模块会将改模块下已有模板同时删除,确认需要删除吗?', '提示', { vm.$confirm('删除模块会将改模块下已有模板同时删除,确认需要删除吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -762,13 +762,18 @@ export default { ...@@ -762,13 +762,18 @@ export default {
}) })
}) })
}else { }else {
vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => { if(vm.componentList.moduleModelList[i].id) {
if( res.code == '000000') { vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
vm.$message.info('成功删除模块!') if( res.code == '000000') {
} vm.$message.info('成功删除模块!')
vm.getModuleData() }
vm.getModuleData()
vm.firstTab = i + ''
})
}else {
vm.componentList.moduleModelList.splice(i,1)
vm.firstTab = i + '' vm.firstTab = i + ''
}) }
} }
break break
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册