任务记录 删除功能添加

master
wanglei 1 year ago
parent 4db66ce7e2
commit 2900921acd

@ -83,6 +83,13 @@
type="text" type="text"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>查看任务进度</el-button> >查看任务进度</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dangan:task:remove']"
>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -520,7 +527,7 @@
</template> </template>
<script> <script>
import { listTask, listByIds, getTask } from "@/api/dangan/task"; import { listTask, listByIds, getTask, delTask } from "@/api/dangan/task";
import { reRecongnize } from "@/api/dangan/collection"; import { reRecongnize } from "@/api/dangan/collection";
import { addCzrkdj, batchAdd } from "@/api/dangan/czrkdj"; import { addCzrkdj, batchAdd } from "@/api/dangan/czrkdj";
import { addBirthDJ } from "@/api/dangan/birthDJ"; import { addBirthDJ } from "@/api/dangan/birthDJ";
@ -1176,7 +1183,17 @@
}, },
delOption1(index){ delOption1(index){
this.option1List.splice(index, 1) this.option1List.splice(index, 1)
} },
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除该数据项?').then(function() {
return delTask(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
} }
}; };
</script> </script>

Loading…
Cancel
Save