修改表格序号以及分页序号数字问题
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<template #select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
||||
clearable maxlength="32" show-word-limit></el-input>
|
||||
clearable maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市">
|
||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||
@@ -16,7 +16,8 @@
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">模板下载</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate"
|
||||
:loading="loading">模板下载</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
@@ -65,7 +66,11 @@ const tableStore = new TableStore({
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
@@ -256,20 +261,20 @@ const deleteEven = () => {
|
||||
} else {
|
||||
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
@@ -341,9 +346,9 @@ const getUserTypeName = (userType: any) => {
|
||||
return '新建电网工程'
|
||||
}
|
||||
//导出模板
|
||||
const exportExcelTemplate = async() => {
|
||||
const exportExcelTemplate = async () => {
|
||||
loading.value = true
|
||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
@@ -357,7 +362,7 @@ const exportExcelTemplate = async() => {
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
},0)
|
||||
}, 0)
|
||||
}
|
||||
|
||||
//批量导入用户数据
|
||||
|
||||
Reference in New Issue
Block a user