From e78548409c0c6223e47ac649606945014c6810c0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 29 三月 2025 15:33:53 +0800
Subject: [PATCH] 设备工具明细-增加数采配置检验项新增功能
---
src/api/cnas/resourceDemand/device.js | 8 ++++
src/views/system/customer/index.vue | 2
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue | 77 +++++++++++++++++++++++++++++++++++++-
3 files changed, 83 insertions(+), 4 deletions(-)
diff --git a/src/api/cnas/resourceDemand/device.js b/src/api/cnas/resourceDemand/device.js
index adb7ee4..0f15e18 100644
--- a/src/api/cnas/resourceDemand/device.js
+++ b/src/api/cnas/resourceDemand/device.js
@@ -108,6 +108,14 @@
params: query,
});
}
+// 鏁伴噰閰嶇疆--鏌ヨ妫�楠岄」
+export function getNoConfigProduct(query) {
+ return request({
+ url: "/deviceScope/getNoConfigProduct",
+ method: "get",
+ params: query,
+ });
+}
// 缁存姢鏁伴噰閰嶇疆
export function saveDataAcquisitionConfiguration(data) {
diff --git a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
index 37468d6..d1366d5 100644
--- a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
+++ b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
@@ -5,6 +5,7 @@
<el-col :span="6" style="padding-left: 20px;text-align: left;">鏁伴噰閰嶇疆</el-col>
<el-col :span="18" style="text-align: right;">
<el-button size="small" type="primary" @click="fileConfiguration">鏂囦欢閰嶇疆</el-button>
+ <el-button size="small" type="primary" @click="addItem">妫�楠岄」鏂板</el-button>
<el-button size="small" @click="$parent.closeDataVue()">
<span style="color: #3A7BFA;">杩斿洖</span>
</el-button>
@@ -156,6 +157,16 @@
</el-row>
</span>
</el-dialog>
+ <el-dialog title="娣诲姞妫�楠岄」" :visible.sync="dialogVisible5" width="1000px">
+ <lims-table :tableData="tableData5" :column="column5"
+ :isSelection="true" :handleSelectionChange="selectMethod"
+ height="540" :page="page5" :tableLoading="tableLoading5"
+ @pagination="pagination5"></lims-table>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dialogVisible5 = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitForm5" :loading="loading5">淇� 瀛�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -163,12 +174,17 @@
import {
queryDataAcquisitionConfiguration,
saveDataAcquisitionConfiguration,
- deleteDataAcquisitionConfiguration, getDeviceById, saveDeviceFileConfiguration, queryProductConfiguration,
+ deleteDataAcquisitionConfiguration,
+ getDeviceById,
+ saveDeviceFileConfiguration,
+ queryProductConfiguration,
+ getNoConfigProduct,
} from '@/api/cnas/resourceDemand/device.js'
+import limsTable from "@/components/Table/lims-table.vue";
export default {
name: "dataAcquisitionConfig",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: {},
+ components: {limsTable},
props: {
deviceId: {
type: Number,
@@ -286,7 +302,23 @@
]
}
},
- deleteList: []
+ deleteList: [],
+ tableData5: [],
+ column5: [
+ {label: '鏍峰搧鍚嶇О', prop: 'sample'},
+ {label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass'},
+ {label: '妫�楠岄」', prop: 'inspectionItem'},
+ {label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass'},
+ ],
+ page5: {
+ total:0,
+ size:20,
+ current:1
+ },
+ tableLoading5: false,
+ dialogVisible5: false,
+ loading5: false,
+ multipleSelection: []
};
},
mounted() {
@@ -319,6 +351,45 @@
const letterIndex = index % 26;
return alphabet.charAt(letterIndex) + (index + 1);
},
+ // 鎵撳紑鏂板妫�楠岄」寮规
+ addItem () {
+ this.dialogVisible5 = true;
+ this.getList5()
+ },
+ getList5() {
+ this.tableLoading5 = true;
+ getNoConfigProduct({deviceId: this.deviceId}).then(res => {
+ this.tableLoading5 = false;
+ this.tableData5 = res.data.records
+ this.page5.total = res.data.total
+ }).catch(err => {
+ this.tableLoading5 = false;
+ })
+ },
+ pagination5 (page) {
+ this.page5.size = page.limit
+ this.getList5()
+ },
+ // 琛ㄦ牸閫夋嫨鏂规硶
+ selectMethod(val) {
+ this.multipleSelection = val
+ },
+ // 鎻愪氦鏂板妫�楠岄」
+ submitForm5 () {
+ this.loading5 = true;
+ saveDataAcquisitionConfiguration({
+ deviceId: this.deviceId,
+ dataConfigList: this.multipleSelection,
+ }).then(res => {
+ this.loading5 = false;
+ this.dialogVisible5 = false;
+ this.init();
+ this.$message.success("娣诲姞鎴愬姛");
+ }).catch(err => {
+ this.loading5 = false;
+ })
+ },
+ // 鎵撳紑鏂囦欢閰嶇疆寮规
fileConfiguration() {
this.dialogVisible4 = true;
this.getInfo()
diff --git a/src/views/system/customer/index.vue b/src/views/system/customer/index.vue
index efe5f13..28f4d95 100644
--- a/src/views/system/customer/index.vue
+++ b/src/views/system/customer/index.vue
@@ -106,7 +106,7 @@
page: {
total:0,
size:20,
- current:0
+ current:1
},
tableLoading: false,
// 缂栬緫瀹㈡埛寮规
--
Gitblit v1.9.3