| | |
| | | <el-input v-model="listQuery.filter.equipmentName" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8" style="text-align: center"> |
| | | <el-button type="primary" icon="el-icon-search" @click="find()" class="btns" |
| | | >搜索</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | class="btns" |
| | | @click="handleClick('', '新增')" |
| | | >新增</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | class="btns" |
| | | @click="importData()" |
| | | >导入</el-button |
| | | > |
| | | <el-button type="primary" icon="el-icon-refresh" @click="reset()" class="btns" |
| | | >重置</el-button |
| | | > |
| | | <el-col :span="10" style="text-align: center"> |
| | | <el-button type="primary" icon="el-icon-search" @click="find()" class="btns">搜索</el-button> |
| | | <el-button type="primary" icon="el-icon-refresh" @click="reset()" class="btns">重置</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" class="btns" @click="handleClick('', '新增')">新增</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" class="btns" @click="importData()">导入</el-button> |
| | | <el-button type="primary" class="btns" @click="exportTemplate()">下载导入模板</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | } from "@/api/majorEquipmentData.js"; |
| | | import { majorEquipmentErt } from "@/api/majorEquipment.js"; |
| | | import XLSX from 'xlsx' |
| | | const exampleFile = require('@/assets/example/instrumentData.xlsx') |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | this.initMajorEquipment() |
| | | }, |
| | | methods: { |
| | | exportTemplate(){ |
| | | window.open(exampleFile, '_blank') |
| | | }, |
| | | |
| | | importData(){ |
| | | let input = document.createElement('input'); input.type = 'file'; |