|
@@ -75,6 +75,9 @@
|
|
|
<el-button @click="staticsPop(scope.row)" type="text" size="small"
|
|
|
>数据统计</el-button
|
|
|
>
|
|
|
+ <el-button @click="deleteAsk(scope.row.id)" type="text" size="small"
|
|
|
+ >删除问卷</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -575,6 +578,33 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ deleteAsk(id){
|
|
|
+ let params = [{ id: id }];
|
|
|
+ this.$confirm("确定删除此问卷吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "deleteAsk", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "删除成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ if (this.page != 1 && this.tableData.length == 1) {
|
|
|
+ this.page--;
|
|
|
+ }
|
|
|
+ this.getAsk();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message.error("删除失败");
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
this.$nextTick(function () {
|