| | |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="标准号" prop="standardNo"> |
| | | <el-form-item label="标准号" prop="standardNo" v-if="tabIndex === '0'"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="searchForm.standardNo"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="存档名称" prop="archivedName" v-if="tabIndex === '1'"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="searchForm.archivedName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">查 询</el-button> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button size="medium" type="primary" @click="openApprovalDialog1">建 档</el-button> |
| | | <el-button size="small" type="primary" @click="openApprovalDialog1">建 档</el-button> |
| | | <el-upload ref='upload' :action="action" :before-upload="beforeUpload" :headers="uploadHeader" :on-error="onError" |
| | | :on-success="handleSuccessUp" :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | style="display: inline-block; margin-left: 10px;"> |
| | | <el-button :loading="upLoading" size="medium" type="primary">导入</el-button> |
| | | <el-button :loading="upLoading" size="small" type="primary">导入</el-button> |
| | | </el-upload> |
| | | <el-button size="medium" style="margin-left: 10px;" type="primary" @click="openFormDia">新 增</el-button> |
| | | <el-button size="small" style="margin-left: 10px;" type="primary" @click="openFormDia">新 增</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="table"> |
| | | <div class="table-tab"> |
| | | <el-radio-group v-model="tabIndex" @input="searchList"> |
| | | <el-radio-group v-model="tabIndex" @change="searchList"> |
| | | <el-radio-button label="0">今年标准记录</el-radio-button> |
| | | <el-radio-button label="1">历史档案</el-radio-button> |
| | | </el-radio-group> |
| | |
| | | searchForm: { |
| | | year: '', |
| | | standardNo: '', |
| | | archivedName: '' |
| | | }, |
| | | options: [ |
| | | { label: '上半年', value: '1' }, |
| | |
| | | methods: { |
| | | // 查询列表 |
| | | searchList() { |
| | | let params = {} |
| | | if (this.tabIndex === '0') { |
| | | params = { |
| | | entity: { |
| | | standardNo: this.searchForm.standardNo, |
| | | }, |
| | | page: this.page |
| | | } |
| | | } else { |
| | | params = { |
| | | entity: {}, |
| | | page: this.oldPage |
| | | } |
| | | } |
| | | if (this.tabIndex === '0') { |
| | | this.tableLoading = true |
| | | pageMethodSearchNew({ ...params.oldPage, ...params.entity }).then(res => { |
| | | pageMethodSearchNew({ standardNo: this.searchForm.standardNo, ...this.page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records |
| | |
| | | }) |
| | | } else { |
| | | this.oldTableLoading = true |
| | | pageSearchNewArchived({ |
| | | ...params.page, ...params.entity |
| | | }).then(res => { |
| | | pageSearchNewArchived({archivedName: this.searchForm.archivedName, ...this.oldPage}).then(res => { |
| | | this.oldTableLoading = false |
| | | if (res.code === 200) { |
| | | console.log('res>>>>>>>>>>>>', res) |
| | | this.oldTableData = res.data.records |
| | | this.oldPage.total = res.data.total |
| | | } |