recovery.vue 924 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <div>
  3. <el-button size="mini" :type="!disabled ?'':'primary'" slot="reference" @click="onRecovery" :disabled="!disabled ">恢 复</el-button>
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. name: "recovery",
  9. props:["disabled","rowData"],
  10. methods:{
  11. onRecovery() {
  12. this.$confirm('确定恢复当前项目嘛?', '提示', {
  13. confirmButtonText: '确定',
  14. cancelButtonText: '取消',
  15. type: 'warning'
  16. }).then(async () => {
  17. const res = await this.$api.requested({
  18. "id": 20221215164002,
  19. "content": {
  20. "sa_projectid": this.$route.query.id
  21. },
  22. })
  23. this.tool.showMessage(res,()=>{
  24. this.$emit("onRecovery")
  25. })
  26. }).catch(() => {
  27. this.$message({
  28. type: 'info',
  29. message: '已取消恢复项目'
  30. });
  31. });
  32. }
  33. }
  34. }
  35. </script>
  36. <style scoped>
  37. </style>