From 3a05fd672f3cf6fcd847e28d93ad3e3b9c01fea2 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 16 四月 2025 15:58:32 +0800
Subject: [PATCH] 网络分析仪
---
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue | 67 ++++++++++++++++++++++++++++-----
1 files changed, 57 insertions(+), 10 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
index c01e5c5..5c1b33e 100644
--- a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
+++ b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
@@ -124,17 +124,31 @@
</div>
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.ip"></el-input>
</div>
- <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && deviceName.includes('缃戠粶鍒嗘瀽')">
+ <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>绔彛锛�
+ </div>
+ <el-input size="small" placeholder="璇疯緭鍏�(缃戠粶鍒嗘瀽浠繀濉�)" clearable v-model="configForm.port"></el-input>
+ </div>
+ <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('缃戠粶鍒嗘瀽')">
<div class="search_label">
<span style="color:red;margin-right: 4px;">*</span>閲囬泦鍦板潃锛�
</div>
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.collectUrl"></el-input>
</div>
- <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && deviceName.includes('缃戠粶鍒嗘瀽')">
+ <div class="search_label" style="width: 130px;">
+ <span style="color:red;margin-right: 4px;">*</span>缃戝垎浠噰闆嗛�氶亾锛�
+ </div>
+ <el-select v-model="configForm.channel" multiple filterable allow-create placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in channelList" :key="index" :label="item" :value="item">
+ </el-option>
+ </el-select>
+ </div>
+ <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('缃戠粶鍒嗘瀽')">
<div class="search_label">鍌ㄥ瓨鍦板潃锛�</div>
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.storageUrl"></el-input>
</div>
- <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('缃戠粶鍒嗘瀽')">
<div class="search_label">
<span style="color:red;margin-right: 4px;">*</span>鏂囦欢鍚庣紑锛�
</div>
@@ -143,15 +157,15 @@
</el-option>
</el-select>
</div>
- <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('缃戠粶鍒嗘瀽')">
<div class="search_label">濮旀墭瀛楁锛�</div>
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.entrustCode"></el-input>
</div>
- <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('缃戠粶鍒嗘瀽')">
<div class="search_label">鏍峰搧瀛楁锛�</div>
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.sampleCode"></el-input>
</div>
- <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('缃戠粶鍒嗘瀽')">
<div class="search_label">鏂囦欢鍚嶇О锛�</div>
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="configForm.dbFileName"></el-input>
</div>
@@ -179,7 +193,11 @@
deviceId: {
type: Number,
default: () => []
- }
+ },
+ deviceName: {
+ type: String,
+ default: () => ''
+ },
},
mounted() {
this.init();
@@ -227,7 +245,9 @@
entrustCode: "",
sampleCode: "",
dbFileName: "",
- fiberOpticRibbon: ""
+ fiberOpticRibbon: "",
+ port: '',
+ channel: []
},
domains: [
{
@@ -295,7 +315,8 @@
]
}
},
- deleteList: []
+ deleteList: [],
+ channelList: []
};
},
// 鏂规硶闆嗗悎
@@ -395,6 +416,10 @@
"fiberOpticRibbon",
this.tableList[0].fiberOpticRibbon
)
+ this.$set(this.configForm, "port", this.tableList[0].port);
+ let arr = this.tableList[0].channel ? this.tableList[0].channel.split(',') : []
+ this.$set(this.configForm, "channel", arr);
+ this.channelList = arr
}
},
init() {
@@ -451,6 +476,18 @@
"fiberOpticRibbon",
this.tableList[0].fiberOpticRibbon
)
+ let arr = this.tableList[0].channel ? this.tableList[0].channel.split(',') : []
+ this.$set(
+ this.configForm,
+ "channel",
+ arr
+ )
+ this.$set(
+ this.configForm,
+ "port",
+ this.tableList[0].port
+ )
+ this.channelList = arr;
}
// 涓�鑸殑鍚堝苟琛�
if (
@@ -505,8 +542,18 @@
entrustCode: this.configForm.entrustCode,
sampleCode: this.configForm.sampleCode,
dbFileName: this.configForm.dbFileName,
- fiberOpticRibbon: this.configForm.fiberOpticRibbon
+ fiberOpticRibbon: this.configForm.fiberOpticRibbon,
+ port: this.configForm.port,
+ channel: this.configForm.channel
});
+ if (this.deviceName && this.deviceName.includes('缃戠粶鍒嗘瀽')) {
+ if (!this.configForm.port) {
+ return this.$message.error("璇峰~鍐欑鍙�");
+ }
+ if (!this.configForm.channel || !this.configForm.channel.length) {
+ return this.$message.error("璇峰~鍐欑綉鍒嗕华閲囬泦閫氶亾");
+ }
+ }
this.upLoad4 = true;
saveDataAcquisitionConfiguration({ deviceId: this.deviceId, ...obj }).then(res => {
if (res.code == 200) {
--
Gitblit v1.9.3