Commit ac45acc9 authored by xxx's avatar xxx

完善路径图删除方法

parent 14207815
...@@ -236,7 +236,7 @@ export default { ...@@ -236,7 +236,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then((e) => { }).then((e) => {
this.reqRemoveProject([id]) this.reqRemoveProject([id],item)
}).catch((e) => {}) }).catch((e) => {})
}, },
pageChange(e) { pageChange(e) {
...@@ -311,7 +311,7 @@ export default { ...@@ -311,7 +311,7 @@ export default {
}); });
}, },
//删除采点 //删除采点
reqRemoveProject(item){ reqRemoveProject(item,items){
HttpReq.truckDispatching.RegionalCaiDianDel(item).then((res) => { HttpReq.truckDispatching.RegionalCaiDianDel(item).then((res) => {
if(res.status == 400){ if(res.status == 400){
this.$notify({ this.$notify({
...@@ -328,8 +328,26 @@ export default { ...@@ -328,8 +328,26 @@ export default {
} }
this.loadData(); this.loadData();
}) })
},
//删除该采点所对应的路径图信息
let delname = items.areaName + '/' + items.name;
HttpReq.truckDispatching.apiPathmapQuery({size:9999,end:delname}).then((res1) => {
if(res1.code == 200){
let idArr1 = [];
res1.data.content.forEach((item1,index1)=>{
idArr1.push(item1.id);
})
//删除
HttpReq.truckDispatching.apiPathmapDel(idArr1).then((resDel1) => {})
}
})
HttpReq.truckDispatching.apiCpointQuery({name:delname}).then((res2) => {
if(res2.code == 200){
HttpReq.truckDispatching.apiCpointDel([res2.data.content[0].id]).then((res) => {})
}
})
},
//品味设置方法 //品味设置方法
......
...@@ -246,7 +246,7 @@ export default { ...@@ -246,7 +246,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then((e) => { }).then((e) => {
this.reqRemoveProject([id],[weilanName]) this.reqRemoveProject([id],[weilanName],item)
}).catch((e) => {}) }).catch((e) => {})
}, },
pageChange(e) { pageChange(e) {
...@@ -389,7 +389,7 @@ export default { ...@@ -389,7 +389,7 @@ export default {
}) })
}, },
//删除区域信息 //删除区域信息
reqRemoveProject(item,weilanName){ reqRemoveProject(item,weilanName,items){
HttpReq.truckDispatching.RegionalInformationDel(item).then((res) => { HttpReq.truckDispatching.RegionalInformationDel(item).then((res) => {
if(res.status == 400){ if(res.status == 400){
this.$notify({ this.$notify({
...@@ -406,21 +406,28 @@ export default { ...@@ -406,21 +406,28 @@ export default {
} }
this.loadData(); this.loadData();
}) })
HttpReq.truckDispatching.screenMapSetUpDel(weilanName).then((res) => { HttpReq.truckDispatching.screenMapSetUpDel(weilanName).then((res) => {})
// if(res.status == 400){
// this.$notify({ //删除该卸区点所对应的路径图信息
// title: res.msg, if(items.areaclass == '卸区'){
// type: 'error', let delname = items.name;
// duration: 2500 HttpReq.truckDispatching.apiPathmapQuery({size:9999,end:delname}).then((res1) => {
// }) if(res1.code == 200){
// }else{ let idArr1 = [];
// this.$notify({ res1.data.content.forEach((item1,index1)=>{
// title: '删除成功!', idArr1.push(item1.id);
// type: 'success', })
// duration: 2500 //删除
// }); HttpReq.truckDispatching.apiPathmapDel(idArr1).then((resDel1) => {})
// } }
}) })
HttpReq.truckDispatching.apiCpointQuery({name:delname}).then((res2) => {
if(res2.code == 200){
HttpReq.truckDispatching.apiCpointDel([res2.data.content[0].id]).then((res) => {})
}
})
}
}, },
//图片上传 //图片上传
excelImport(event) { excelImport(event) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment