Commit 7f6b27571a1c7b4abf63e77ea2996a5ca1ed0f67

Authored by fengtao
1 parent fb292a1f

pref:优化设备配置

@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <div style="margin-top: 1vh" v-else-if="isMqttType == 'LWM2M'"> 24 <div style="margin-top: 1vh" v-else-if="isMqttType == 'LWM2M'">
25 <Lwm2mCpns ref="lwm2mRef" /> 25 <Lwm2mCpns ref="lwm2mRef" />
26 </div> 26 </div>
27 - <div style="margin-top: 5vh" v-else-if="isMqttType == 'SNMP1'"> 27 + <div style="margin-top: 5vh" v-else-if="isMqttType == 'SNMP'">
28 <SnmpCpns ref="snmpRef" /> 28 <SnmpCpns ref="snmpRef" />
29 </div> 29 </div>
30 <div 30 <div
@@ -124,7 +124,7 @@ @@ -124,7 +124,7 @@
124 { label: 'MQTT', value: 'MQTT' }, 124 { label: 'MQTT', value: 'MQTT' },
125 { label: 'CoAP', value: 'COAP' }, 125 { label: 'CoAP', value: 'COAP' },
126 { label: 'LWM2M', value: 'LWM2M' }, 126 { label: 'LWM2M', value: 'LWM2M' },
127 - // { label: 'SNMP', value: 'SNMP' }, 127 + { label: 'SNMP', value: 'SNMP' },
128 ], 128 ],
129 onChange(e) { 129 onChange(e) {
130 isMqttType.value = e; 130 isMqttType.value = e;
@@ -176,4 +176,8 @@ @@ -176,4 +176,8 @@
176 ::-webkit-scrollbar { 176 ::-webkit-scrollbar {
177 display: none; 177 display: none;
178 } 178 }
  179 + :deep(.ant-btn) {
  180 + color: white;
  181 + background: #377dff;
  182 + }
179 </style> 183 </style>
@@ -4,7 +4,7 @@ export const snmpSchemas: FormSchema[] = [ @@ -4,7 +4,7 @@ export const snmpSchemas: FormSchema[] = [
4 { 4 {
5 field: 'timeoutMs', 5 field: 'timeoutMs',
6 component: 'InputNumber', 6 component: 'InputNumber',
7 - label: 'Timeout,ns', 7 + label: '超时毫秒',
8 required: true, 8 required: true,
9 defaultValue: 500, 9 defaultValue: 500,
10 colProps: { span: 11 }, 10 colProps: { span: 11 },
@@ -12,13 +12,13 @@ export const snmpSchemas: FormSchema[] = [ @@ -12,13 +12,13 @@ export const snmpSchemas: FormSchema[] = [
12 { 12 {
13 field: 'retries', 13 field: 'retries',
14 component: 'InputNumber', 14 component: 'InputNumber',
15 - label: 'Retries', 15 + label: '重试次数',
16 required: true, 16 required: true,
17 defaultValue: 0, 17 defaultValue: 0,
18 colProps: { span: 11 }, 18 colProps: { span: 11 },
19 }, 19 },
20 { 20 {
21 - field: 'noknown', 21 + field: '1',
22 component: 'Input', 22 component: 'Input',
23 label: '', 23 label: '',
24 slot: 'add', 24 slot: 'add',
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="snmp-form" :style="{ height: dynamicHeight + 'vh' }"> 2 <div class="snmp-form" :style="{ height: dynamicHeight + 'vh' }">
3 <div class="form-item1" :style="{ height: dynamicHeight + 'vh' }"> 3 <div class="form-item1" :style="{ height: dynamicHeight + 'vh' }">
4 <div style="margin-left: 1vw"> 4 <div style="margin-left: 1vw">
5 - <h3 style="color: gray">Scope*</h3> 5 + <h3 style="color: gray">范围*</h3>
6 <Select 6 <Select
7 v-model:value="selectValue" 7 v-model:value="selectValue"
8 style="width: 140px" 8 style="width: 140px"
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </div> 14 </div>
15 <div class="form-item2" :style="{ height: dynamicHeight + 'vh' }"> 15 <div class="form-item2" :style="{ height: dynamicHeight + 'vh' }">
16 <div style="margin-left: 1vw"> 16 <div style="margin-left: 1vw">
17 - <h3 style="color: gray">Querying frequency,ms*</h3> 17 + <h3 style="color: gray">查询频率(毫秒*)</h3>
18 <InputNumber 18 <InputNumber
19 v-if="selectValue == 'TELEMETRY_QUERYING' || selectValue == 'CLIENT_ATTRIBUTES_QUERYING'" 19 v-if="selectValue == 'TELEMETRY_QUERYING' || selectValue == 'CLIENT_ATTRIBUTES_QUERYING'"
20 v-model:value="inputNmberValue" 20 v-model:value="inputNmberValue"
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 style="text-align: center; line-height: 20vh" 34 style="text-align: center; line-height: 20vh"
35 :style="{ lineHeight: dynamicHeight + 'vh' }" 35 :style="{ lineHeight: dynamicHeight + 'vh' }"
36 > 36 >
37 - <Button size="small" type="default" @click="handleRemove(item, index)"> 37 + <Button size="small" type="dashed" @click="handleRemove(item, index)">
38 <template #icon> 38 <template #icon>
39 <MinusCircleOutlined /> 39 <MinusCircleOutlined />
40 </template> 40 </template>
@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
69 const emit = defineEmits(['removeItem', 'selectItem']); 69 const emit = defineEmits(['removeItem', 'selectItem']);
70 const selectValue = ref('CLIENT_ATTRIBUTES_QUERYING'); 70 const selectValue = ref('CLIENT_ATTRIBUTES_QUERYING');
71 const inputNmberValue = ref(5000); 71 const inputNmberValue = ref(5000);
72 - const dynamicHeight = ref(20); 72 + const dynamicHeight = ref(25);
73 const selectOptions: any = ref([ 73 const selectOptions: any = ref([
74 { 74 {
75 label: 'Telemetry', 75 label: 'Telemetry',
@@ -151,25 +151,25 @@ @@ -151,25 +151,25 @@
151 justify-content: space-between; 151 justify-content: space-between;
152 width: 40vw; 152 width: 40vw;
153 height: 20vh; 153 height: 20vh;
154 - border: 1px solid gray; 154 + border: 0.1px solid #bfbfbf;
155 margin-top: 2vh; 155 margin-top: 2vh;
156 156
157 .form-item1 { 157 .form-item1 {
158 width: 9vw; 158 width: 9vw;
159 height: 20vh; 159 height: 20vh;
160 - border: 1px solid gray; 160 + border: 0.1px solid #bfbfbf;
161 } 161 }
162 162
163 .form-item2 { 163 .form-item2 {
164 width: 28vw; 164 width: 28vw;
165 height: 20vh; 165 height: 20vh;
166 - border: 1px solid gray; 166 + border: 0.1px solid #bfbfbf;
167 } 167 }
168 168
169 .form-item3 { 169 .form-item3 {
170 width: 2vw; 170 width: 2vw;
171 height: 20vh; 171 height: 20vh;
172 - border: 1px solid gray; 172 + border: 0.1px solid #bfbfbf;
173 } 173 }
174 } 174 }
175 </style> 175 </style>
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 v-if="dynamicSNMP.communicationConfigs.length < 4" 30 v-if="dynamicSNMP.communicationConfigs.length < 4"
31 style="margin-left: 0vw; margin-top: 2vh" 31 style="margin-left: 0vw; margin-top: 2vh"
32 > 32 >
33 - <Button size="small" type="default" @click="handleAdd"> 33 + <Button size="middle" type="dashed" @click="handleAdd">
34 <template #icon> 34 <template #icon>
35 <PlusCircleOutlined /> 35 <PlusCircleOutlined />
36 </template> 36 </template>