badge
This commit is contained in:
@ -66,13 +66,27 @@
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:disabled="!ids.length"
|
||||
type="danger"
|
||||
icon="delete"
|
||||
@click="handleDelete()"
|
||||
>批量删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="数据编号" align="center" prop="id" />
|
||||
<el-table-column label="企业名称" align="center" prop="name" />
|
||||
<!-- <el-table-column label="统一社会信用代码" align="center" prop="code" /> -->
|
||||
@ -365,6 +379,11 @@ const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const dataList = ref([]);
|
||||
|
||||
const ids = ref([]);
|
||||
const handleSelectionChange = (selection) => {
|
||||
ids.value = selection.map((el) => el.id);
|
||||
};
|
||||
|
||||
/** 查询企业列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
@ -569,9 +588,10 @@ function submitFileForm() {
|
||||
uploadRef.value.submit();
|
||||
}
|
||||
const handleDelete = async (id) => {
|
||||
ElMessageBox.confirm(`是否确认删除编号为${id}的数据项?`)
|
||||
const delIds = id || ids.value.join(",");
|
||||
ElMessageBox.confirm(`是否确认删除编号为${delIds}的数据项?`)
|
||||
.then(async () => {
|
||||
await companyDelete(id);
|
||||
await companyDelete(delIds);
|
||||
getList();
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user