12345678910111213141516171819202122232425262728293031323334353637383940 |
- <template>
- <div>
- <el-button size="mini" :type="!disabled ?'':'primary'" slot="reference" @click="onRecovery" :disabled="!disabled ">恢 复</el-button>
- </div>
- </template>
- <script>
- export default {
- name: "recovery",
- props:["disabled","rowData"],
- methods:{
- onRecovery() {
- this.$confirm('确定恢复当前项目嘛?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(async () => {
- const res = await this.$api.requested({
- "id": 20221215164002,
- "content": {
- "sa_projectid": this.$route.query.id
- },
- })
- this.tool.showMessage(res,()=>{
- this.$emit("onRecovery")
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消恢复项目'
- });
- });
- }
- }
- }
- </script>
- <style scoped>
- </style>
|