|
|
@ -34,6 +34,7 @@ |
|
|
|
import { |
|
|
|
cancleTakeOverPageJob, |
|
|
|
getOverPageJobList, |
|
|
|
packageoverRequestClose |
|
|
|
} from '@/api/request2.js'; |
|
|
|
import { |
|
|
|
goHome, |
|
|
@ -113,6 +114,14 @@ |
|
|
|
onReady() { |
|
|
|
this.detailOptions = getDetailOption(); |
|
|
|
this.detailGiveupOptions = getDetailGiveupOption(); |
|
|
|
this.detailOptions = [...this.detailOptions,{ |
|
|
|
text:"关闭", |
|
|
|
style:{ |
|
|
|
backgroundColor:"#F56C6C" |
|
|
|
} |
|
|
|
}] |
|
|
|
console.log('this.detailGiveupOptions',this.detailGiveupOptions) |
|
|
|
console.log('this.detailOptions',this.detailOptions) |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
//避免多次触发 |
|
|
@ -278,12 +287,33 @@ |
|
|
|
this.cancleJob(dataContent.masterId); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else if (e.content.text == "关闭") { |
|
|
|
this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?", |
|
|
|
res => { |
|
|
|
if (res) { |
|
|
|
this.closeJob(dataContent.masterId); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
openjobInfoPopup(item) { |
|
|
|
this.$refs.jobInfoPopup.openPopup(item) |
|
|
|
}, |
|
|
|
closeJob(id){ |
|
|
|
packageoverRequestClose(id).then(res => { |
|
|
|
if(res.data){ |
|
|
|
this.getList("refresh") |
|
|
|
uni.showToast({ |
|
|
|
title:"关闭任务成功" |
|
|
|
}) |
|
|
|
}else { |
|
|
|
this.showMessage("关闭任务失败") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
cancleJob(id) { |
|
|
|
cancleTakeOverPageJob(id).then(res => { |
|
|
|