| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="设备名称" prop="deviceName"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.deviceName" |
| | | <el-input size="small" style="width: 160px;" placeholder="请输入" clearable v-model="queryParams.deviceName" |
| | | @keyup.enter.native="refreshTable()"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号" prop="specificationModel"> |
| | | <el-input size="small" placeholder="请输入" clearable |
| | | v-model="queryParams.specificationModel" @keyup.enter.native="refreshTable()"></el-input> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.specificationModel" |
| | | @keyup.enter.native="refreshTable()" style="width: 160px;"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="mini" @click="refreshTable">查询</el-button> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-upload ref='upload' style="display: inline;margin-right: 8px" :action="uploadAction" |
| | | :before-upload="beforeUpload" :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" |
| | | :show-file-list="false" accept='.xls,.xlsx'> |
| | | <el-button size="small" type="primary">导入</el-button> |
| | | </el-upload> |
| | | <el-button size="small" type="primary" @click="dialogVisible2 = true">新增</el-button> |
| | | <el-button size="small" type="primary" @click="handleDownOne">导出</el-button> |
| | | </div> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | uploadAction: process.env.VUE_APP_BASE_API + '/deviceScope/importDevice', |
| | | dateFormat: 'yyyy-MM-dd', |
| | | deviceId: '', |
| | | fileTypeOptions: [ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | handleSuccessUp(response, file, fileList) { |
| | | this.$refs.upload.clearFiles() |
| | | if (response.code !== 200) { |
| | | this.$message.error(response.msg) |
| | | return |
| | | } |
| | | this.$message.success('上传成功') |
| | | this.refreshTable() |
| | | }, |
| | | submitForm() { |
| | | if (!this.formData.deviceName) { |
| | | this.$message.error('未输入仪器名称') |
| | |
| | | background-color: #fff; |
| | | height: calc(100vh - 16em); |
| | | } |
| | | |
| | | .picName { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | |
| | | word-break: break-all; |
| | | width: 120px; |
| | | } |
| | | |
| | | .form-item >>>.el-form-item__content { |
| | | width: 120px; |
| | | } |