Files
ZERO_CODE/ZeroCodeProject/project_template/stand_table/stand_table.vue
vermouth789 fe39320977 123
123
2026-01-11 00:11:34 +08:00

75 lines
3.8 KiB
Vue

<template>
<div>
<div class="searchbox">
<el-input v-for="(inputs, index) in column" :key="inputs.field_en_name" v-model="search[inputs.field_en_name]"
:placeholder="'请输入' + inputs.field_cn_name" v-show="index + 1 <= 5" class="inputs" style="">
</el-input>
<el-button @click="searchrecord" v-if="true" class="search_button" style="margin-right: 20px">
<img src="@/assets/icons/svg/search.png" class="search_icon" />
搜索
</el-button>
<el-button type="success" @click="adddata" v-if="true" class="operation_button" style="">
<img src="@/assets/icons/svg/add.png" class="operation_button_icon" />
新增
</el-button>
<el-button type="success" @click="del_data" v-if="false" class="operation_button" style="">
<img src="@/assets/icons/svg/del.png" class="operation_button_icon_del" />
删除
</el-button>
<el-button type="success" @click="export_data" v-if="false" class="operation_button" style="">
<img src="@/assets/icons/svg/export.png" class="operation_button_icon" />
导出
</el-button>
<el-button type="success" @click="export_temp_data" v-if="false" class="operation_button" style="">
<img src="@/assets/icons/svg/export_temp.png" class="operation_button_icon" />
导出模版
</el-button>
<el-button type="success" @click="coustom_button_one" v-if="false" class="operation_button" style="">
自定按钮1
</el-button>
<el-button type="success" @click="coustom_button_two" v-if="false" class="operation_button" style="">
自定按钮2
</el-button>
</div>
<el-table :data="tableData.slice((currentPage - 1) * PageSize, currentPage * PageSize)" style="max-width: 1560px"
max-height="572px" @selection-change="handleSelectionChange"
:header-cell-style="{ 'text-align': 'center', 'background-color': '#389F37', 'height': '60px', 'color': '#ffffff', 'font-size': '18px', 'font-weight': '400' }"
:cell-style="{ 'text-align': 'center', 'font-size': '16px', 'height': '64px' }" :cell-class-name="cellStyle"
@select="handleSelection" :row-class-name="tableRowClassName">
<el-table-column fixed type="selection"></el-table-column>
<el-table-column fixed label="OPERATIONS" width="300" class="table_operation" style="">
<template #default="scope">
<el-button @click="delrecord(scope.row)" v-if="true" class="table_operation_button">
删除
</el-button>
<el-button @click="editrecord(scope.row)" v-if="true" class="table_operation_button">
编辑
</el-button>
<el-button @click="coustomOne(scope.row)" v-if="scope.row.verify !== '1'" class="table_operation_button">
审核
</el-button>
<el-button v-else class="table_operation_button_disable" disabled>
已审核
</el-button>
<el-button @click="coustomTwo(scope.row)" v-if="false" class="table_operation_button">
自定按键
</el-button>
</template>
</el-table-column>
<el-table-column v-for="(columns, index) in column" :prop="columns.name" :label="columns.cn_name" width="150"
:key="index" style="" :show-overflow-tooltip="true">
<template #default="scope">
<span style="">
{{ scope.row[columns.name] }}</span>
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="handlePageSizeChange" @current-change="handlePageChange" :current-page="currentPage"
:page-sizes="pageSizes" :page-size="PageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalCount"
class="page">
</el-pagination>
</div>
</template>
<script src="./stand_table.js"></script>
<style scoped src="./stand_table.css"></style>