delData.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div>
  3. <el-button type="text" size="mini" @click="onshow" :disabled="!tool.checkAuth($route.name,'delData')" style="color: #f56c6c">{{$t('删 除')}}</el-button>
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. name: "saleClueDel",
  9. props:["sys_object","ownerid"],
  10. methods:{
  11. onshow() {
  12. this.$confirm(this.$t('是否确认彻底删除数据,一旦删除,无法恢复')+'?', this.$t('提示'), {
  13. confirmButtonText: this.$t('确定'),
  14. cancelButtonText: this.$t('取消'),
  15. closeOnClickModal:false,
  16. type: 'warning'
  17. }).then(() => {
  18. this.onDel()
  19. }).catch(() => {
  20. this.$message({
  21. type: 'info',
  22. message: this.$t('已取消删除')
  23. });
  24. });
  25. },
  26. async onDel(){
  27. const res = await this.$api.requested({
  28. "id": 20230103131204,
  29. "content": {
  30. "sys_object": this.sys_object,//1-线索,2-客户,3-合同,4-项目商机,5-报价单
  31. "ownerids": [this.ownerid]
  32. }
  33. })
  34. this.tool.showMessage(res,()=>{
  35. this.$emit("delSuccess")
  36. })
  37. }
  38. }
  39. }
  40. </script>
  41. <style scoped>
  42. </style>