From 7bdc84b5844d2a481e2f17cdd2c8204fd4a403ee Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 29 九月 2025 16:48:31 +0800
Subject: [PATCH] 业务管理相关页面添加`批号`查询条件
---
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 103 insertions(+), 8 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
index 37468d6..7be6506 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>
@@ -149,11 +150,33 @@
<div class="search_label">鏂囦欢鍚嶇О锛�</div>
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.dbFileName"></el-input>
</div>
+ <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_label">鏁版嵁搴撹处鍙凤細</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.dbUserName"></el-input>
+ </div>
+ <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_label">鏁版嵁搴撳瘑鐮侊細</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.dbPassword"></el-input>
+ </div>
+ <div v-if="configForm.fileType === '.mysql'" class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>鏁版嵁搴撹〃锛�</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.dbTable"></el-input>
+ </div>
<span slot="footer" class="dialog-footer">
<el-row>
<el-button @click="dialogVisible4 = false">鍙� 娑�</el-button>
<el-button type="primary" @click="submitForm4" :loading="upLoad4">纭� 瀹�</el-button>
</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>
@@ -163,12 +186,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,
@@ -218,7 +246,10 @@
entrustCode: "",
sampleCode: "",
dbFileName: "",
- fiberOpticRibbon: ""
+ fiberOpticRibbon: "",
+ dbUserName: "",
+ dbPassword: "",
+ dbTable: ""
},
domains: [
{
@@ -237,8 +268,11 @@
{ label: "db", value: ".db" },
{ label: "mdb", value: ".mdb" },
{ label: "word", value: ".docx" },
- { label: "excel", value: ".xlsx" },
+ { label: "excelxlsx", value: ".xlsx" },
+ { label: "excelxls", value: ".xls" },
{ label: "txt", value: ".txt" },
+ { label: "mysql", value: ".mysql" },
+ { label: "mqtt", value: ".mqtt" },
{ label: "png", value: ".png" }
],
spanList: [],
@@ -286,7 +320,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 +369,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, ...this.page5 }).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()
@@ -333,7 +422,10 @@
this.$set(this.configForm, "entrustCode", res.data.entrustCode);
this.$set(this.configForm, "sampleCode", res.data.sampleCode);
this.$set(this.configForm, "dbFileName", res.data.dbFileName);
- this.$set(this.configForm, "fiberOpticRibbon", res.data.fiberOpticRibbon)
+ this.$set(this.configForm, "fiberOpticRibbon", res.data.fiberOpticRibbon);
+ this.$set(this.configForm, "dbUserName", res.data.dbUserName);
+ this.$set(this.configForm, "dbPassword", res.data.dbPassword);
+ this.$set(this.configForm, "dbTable", res.data.dbTable);
})
},
// 鎻愪氦鏂囦欢閰嶇疆
@@ -347,7 +439,10 @@
entrustCode: this.configForm.entrustCode,
sampleCode: this.configForm.sampleCode,
dbFileName: this.configForm.dbFileName,
- fiberOpticRibbon: this.configForm.fiberOpticRibbon
+ fiberOpticRibbon: this.configForm.fiberOpticRibbon,
+ dbUserName: this.configForm.dbUserName,
+ dbPassword: this.configForm.dbPassword,
+ dbTable: this.configForm.dbTable
});
this.upLoad4 = true;
saveDeviceFileConfiguration({ deviceId: this.deviceId, ...obj }).then(res => {
@@ -532,7 +627,7 @@
}
.search_thing {
- width: 350px;
+ width: 370px;
display: flex;
align-items: center;
}
--
Gitblit v1.9.3