|
|
|
@ -45,17 +45,17 @@
|
|
|
|
|
<div class="page_content_head_right"> |
|
|
|
|
<div> |
|
|
|
|
<el-button @click="exportData" v-show="hasSelectData" |
|
|
|
|
><img src="@public/img/land/u1340.png" />导出</el-button |
|
|
|
|
><img style="margin-right: 5px;" src="@public/img/land/u1340.png" />导出</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button v-show="hasSelectData" |
|
|
|
|
><img src="@public/img/land/u1340.png" />批量删除</el-button |
|
|
|
|
<el-button @click="multiDelete" v-show="hasSelectData" |
|
|
|
|
><img style="margin-right: 5px;" src="@public/img/land/u1340.png" />批量删除</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button |
|
|
|
|
><img src="@public/img/land/u1401.png" />导入</el-button |
|
|
|
|
><img style="margin-right: 5px;" src="@public/img/land/u1401.png" />导入</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
@ -440,11 +440,58 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 删除单个 |
|
|
|
|
delItem(row) { |
|
|
|
|
delData(row.data_id).then((res) => { |
|
|
|
|
console.debug(res); |
|
|
|
|
console.log(row); |
|
|
|
|
let me = this; |
|
|
|
|
let ids = [row.dataId]; |
|
|
|
|
this.$confirm("确认删除?", "系统提示", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
cancelButtonClass: "btn-custom-cancel", |
|
|
|
|
type: "warning", |
|
|
|
|
}) |
|
|
|
|
.then(function () { |
|
|
|
|
delData(ids).then((res) => { |
|
|
|
|
if (res.data.success) { |
|
|
|
|
me.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '删除成功' |
|
|
|
|
}); |
|
|
|
|
me.onSubmit(); |
|
|
|
|
} else { |
|
|
|
|
me.$message("删除失败"); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(function () {}); |
|
|
|
|
// delData(row.dataId).then((res) => { |
|
|
|
|
// console.debug(res); |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
//批量删除 |
|
|
|
|
multiDelete() { |
|
|
|
|
if (this.selectedData.length < 1) { |
|
|
|
|
this.$message({ |
|
|
|
|
message: "未选中数据", |
|
|
|
|
type: "warning", |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
let ids = []; |
|
|
|
|
for (let item of this.selectedData) { |
|
|
|
|
ids.push(item["dataId"]); |
|
|
|
|
} |
|
|
|
|
delData(ids).then((res) => { |
|
|
|
|
if (res.data.success) { |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '删除成功' |
|
|
|
|
}); |
|
|
|
|
this.onSubmit(); |
|
|
|
|
} else { |
|
|
|
|
this.$message("删除失败"); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 查看 |
|
|
|
|
viewItem(row) { |
|
|
|
|
let data=JSON.stringify(row) |
|
|
|
|