| | |
| | | </div> |
| | | <div style="line-height: 30px;" v-if="tabIndex === '0'"> |
| | | <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="small" type="primary">导入</el-button> |
| | | </el-upload> |
| | | <el-button size="small" type="primary" style="margin-left: 10px;" |
| | | @click="$refs.importDialog.open()">导入</el-button> |
| | | <el-button size="small" style="margin-left: 10px;" type="primary" @click="openFormDia">新 增</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | @pagination="pagination1"> |
| | | </limsTable> |
| | | </el-dialog> |
| | | <import-dialog |
| | | ref="importDialog" |
| | | title="导入标准查新" |
| | | :action="action" |
| | | accept=".xls,.xlsx" |
| | | template-url="/import-templates/标准查新导入模板.xlsx" |
| | | template-name="标准查新导入模板.xlsx" |
| | | :tips="[ |
| | | '表头为两行,请从第 3 行开始填写数据', |
| | | '标准名称、标准号请填写现行标准的名称和编号', |
| | | '查新来源按“标准网 → 委托情报所 → 标准书店 → 其他”的顺序取第一个非空项', |
| | | '备注列只能填写“替换”或“作废”,留空表示无备注' |
| | | ]" |
| | | @success="searchList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import ImportDialog from '@/components/ImportDialog/index.vue' |
| | | import FormDialog from './component/FormDialog.vue'; |
| | | import EditFormDia from './component/EditFormDia.vue'; |
| | | import { |
| | |
| | | components: { |
| | | FormDialog, |
| | | limsTable, |
| | | ImportDialog, |
| | | EditFormDia |
| | | }, |
| | | data() { |
| | |
| | | ], |
| | | formDialog: false, |
| | | editFormDialog: false, |
| | | upLoading: false, |
| | | outLoading: false, |
| | | ratifyInfo: { |
| | | writeUserId: '', |
| | |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '标准查新导出.xlsx') |
| | | }) |
| | | }, |
| | | // 导入 |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('上传文件不超过10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | this.upLoading = true; |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('上传失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('上传成功'); |
| | | this.searchList() |
| | | } |
| | | }, |
| | | // 分页 |
| | | pagination(page) { |