| | |
| | | <template> |
| | | <!-- 文件清单 --> |
| | | <div class="file-list" style="height: 100%;"> |
| | | <div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">文件名称:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="queryParams.name" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> |
| | | <el-form-item label="文件名称" prop="name"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.name" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="文件状态" prop="state"> |
| | | <el-select v-model="queryParams.state" size="small" @change="refreshTable()" clearable> |
| | | <el-option :label="item.label" :value="item.value" v-for="(item, index) in fileState" |
| | | :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="mini" @click="refreshTable">查询</el-button> |
| | | <el-button size="mini" @click="refresh">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">文件状态:</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="queryParams.state" size="small" @change="refreshTable()"> |
| | | <el-option :label="item.label" :value="item.value" v-for="(item, index) in fileState" |
| | | :key="index"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | | </div> |
| | | <div class="btns" style="padding-left: 30px;"> |
| | | <div> |
| | | <el-upload :action="action" :multiple="false" accept='.xls,.xlsx' :headers="uploadHeader" |
| | | :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp" |
| | | :show-file-list="false"> |
| | | :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp" |
| | | :show-file-list="false"> |
| | | <el-button size="small" type="primary" :loading="upLoading">导入</el-button></el-upload> |
| | | </div> |
| | | </div> |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | height: 46px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |