From fcbba75febaa36d23c6c49473ab5bcee0e1a2c04 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 08 四月 2025 09:37:11 +0800
Subject: [PATCH] 检验项目新增是否委托要求字段
---
src/views/CNAS/resourceDemand/device/component/management.vue | 115 +++++++++++++++++++++++++++++++--------------------------
1 files changed, 62 insertions(+), 53 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/management.vue b/src/views/CNAS/resourceDemand/device/component/management.vue
index ee38855..42ff186 100644
--- a/src/views/CNAS/resourceDemand/device/component/management.vue
+++ b/src/views/CNAS/resourceDemand/device/component/management.vue
@@ -1,37 +1,42 @@
<!-- 璁惧宸ュ叿鏄庣粏 -->
<template>
<div class="role_manage">
- <div class="search" v-show="!showData">
- <div class="search_thing">
- <div class="search_label">鐘舵�侊細</div>
- <el-select v-model="queryParams.deviceStatus" placeholder="鍏ㄩ儴" size="small">
- <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
+ <div class="search">
+ <div>
+ <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
+ <el-form-item label="鐘舵��" prop="deviceStatus" class="form-item">
+ <el-select v-model="queryParams.deviceStatus" placeholder="鍏ㄩ儴" size="small">
+ <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="璁惧鍚嶇О" prop="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()" style="width: 160px;"></el-input>
+ </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-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.deviceName"
- @keyup.enter.native="refreshTable()">
- </el-input>
- </div>
- </div>
- <div class="search_thing">
- <div class="search_label">瑙勬牸鍨嬪彿锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="queryParams.specificationModel" @keyup.enter.native="refreshTable()"></el-input>
- </div>
- </div>
- <div style="padding-left: 30px;">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- <el-button size="small" type="primary" @click="dialogVisible2 = true">鏂� 澧�</el-button>
- <el-button size="small" type="primary" @click="handleDownOne">瀵� 鍑�</el-button>
+ <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>
</div>
<div class="table" v-show="!showData">
- <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 320px)'"
+ <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 300px)'"
:page="page" @pagination="pagination"></lims-table>
</div>
<el-dialog :title="isUp ? '璁惧璇︽儏' : '妗f淇'" :visible.sync="dialogVisible" width="70%" top="5vh"
@@ -415,6 +420,7 @@
},
data() {
return {
+ uploadAction: process.env.VUE_APP_BASE_API + '/deviceScope/importDevice',
dateFormat: 'yyyy-MM-dd',
deviceId: '',
fileTypeOptions: [
@@ -484,17 +490,25 @@
{ label: "鎵�灞為儴闂�", prop: "laboratoryName" },
{ label: "妫�楠岄」鐩�", prop: "insProductItem" },
{ label: "鏍″噯鏈嶅姟鏈烘瀯", prop: "calibrationServices" },
- { label: "鏈�杩戞牎鍑嗘棩鏈�", prop: "lastCalibrationDateTwo" },
- { label: "鏈�杩戞牳鏌ユ棩鏈�", prop: "lastCalibrationDate" },
- { label: "涓嬫鏍″噯鏃ユ湡", prop: "nextCalibrationDateTwo" },
- { label: "涓嬫鏍告煡鏃ユ湡", prop: "nextCalibrationDate" },
+ { label: "鏈�杩戞牎鍑嗘棩鏈�", prop: "lastCalibrationDate" },
+ { label: "鏈�杩戞牳鏌ユ棩鏈�", prop: "lastCalibrationDateTwo" },
+ { label: "涓嬫鏍″噯鏃ユ湡", prop: "nextCalibrationDate" },
+ { label: "涓嬫鏍告煡鏃ユ湡", prop: "nextCalibrationDateTwo" },
{
label: "璁惧鍒嗙被", prop: "largeCategory", dataType: "tag",
formatData: (params) => {
- return this.equipmentList.find(m => m.value == params).label
+ if (this.equipmentList.find(m => m.value == params)) {
+ return this.equipmentList.find(m => m.value == params).label
+ } else {
+ return null
+ }
},
formatType: (params) => {
- return this.equipmentList.find(m => m.value == params).type
+ if (this.equipmentList.find(m => m.value == params)) {
+ return this.equipmentList.find(m => m.value == params).type
+ } else {
+ return null
+ }
}
},
{ label: "鍗曚环", prop: "unitPrice" },
@@ -757,6 +771,15 @@
})
}
},
+ 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('鏈緭鍏ヤ华鍣ㄥ悕绉�')
@@ -982,18 +1005,9 @@
</script>
<style scoped>
-.role_manage {
- width: 100%;
- height: 100%;
-}
-
-.title {
- line-height: 15px;
-}
-
.search {
+ height: 46px;
display: flex;
- align-items: center;
justify-content: space-between;
margin-top: 10px;
}
@@ -1010,18 +1024,9 @@
text-align: right;
}
-.search_input {
- width: calc(100% - 80px);
-}
-
.table {
- margin-top: 12px;
background-color: #fff;
- height: calc(100vh - 17em);
-}
-
-.el-form-item {
- margin-bottom: 16px;
+ height: calc(100vh - 16em);
}
.picName {
@@ -1031,4 +1036,8 @@
word-break: break-all;
width: 120px;
}
+
+.form-item>>>.el-form-item__content {
+ width: 120px;
+}
</style>
--
Gitblit v1.9.3