|
@@ -8,8 +8,8 @@
|
|
|
<el-row :gutter="20">
|
|
|
<!-- 表格名称 -->
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="表格名称:" prop="table_name" label-width="auto">
|
|
|
- <el-input v-model="queryParams.table_name" placeholder="请输入表格名称"></el-input>
|
|
|
+ <el-form-item label="字段名称:" prop="table_name" label-width="auto">
|
|
|
+ <el-input v-model="queryParams.table_name" placeholder="请输入字段名称"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<!-- 表格状态 -->
|
|
@@ -46,7 +46,7 @@
|
|
|
<el-button type="primary" icon="Plus" @click="handleAdd">新增</el-button>
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">查询</el-button>
|
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
- <el-button type="warning" plain icon="Download" @click="exportTableData">导出</el-button>
|
|
|
+ <el-button type="warning" plain icon="Download" :disabled="multiple" @click="exportTableData">导出</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
@@ -54,7 +54,7 @@
|
|
|
</transition>
|
|
|
<!-- 表格组件 -->
|
|
|
<el-table ref="multipleTable" v-loading="loading" :data="tableData" @selection-change="handleSelectionChange" style="margin-top: 10px">
|
|
|
-<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="序号" align="center" type="index" width="50px" />
|
|
|
<el-table-column label="表格名称" align="center" prop="table_name" />
|
|
|
<el-table-column label="发布日期" align="center" prop="start_time" />
|
|
@@ -231,14 +231,16 @@ const resetQuery = () => {
|
|
|
|
|
|
const filename = ref();
|
|
|
const handleSelectionChange = (selection) => {
|
|
|
+ let idsArr = [];
|
|
|
selection.forEach((item) => {
|
|
|
- ids.value.push(item.report_id);
|
|
|
+ idsArr.push(item.report_id);
|
|
|
filename.value = item.table_name;
|
|
|
- })
|
|
|
+ });
|
|
|
+ ids.value = idsArr;
|
|
|
if (selection.length == 1) {
|
|
|
- multiple .value = false;
|
|
|
- }if (selection.length !== 1) {
|
|
|
- multiple .value = true;
|
|
|
+ multiple.value = false;
|
|
|
+ } else if (selection.length !== 1) {
|
|
|
+ multiple.value = true;
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -249,7 +251,7 @@ const handleTimeChange = () => {
|
|
|
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
|
|
const exportTableData = () => {
|
|
|
fillingTable(ids.value[0]);
|
|
|
- download2(baseUrl + '/api/dataFilling/export_to_excel?report_id='+ids.value[0], filename.value + '.xlsx');
|
|
|
+ download2(baseUrl + '/api/dataFilling/export_to_excel?report_id=' + ids.value[0], filename.value + '.xlsx');
|
|
|
};
|
|
|
|
|
|
const handlePagination = ({ page, limit }) => {
|