feat: 远程配置

This commit is contained in:
pengqiao1993
2026-03-24 08:49:46 +08:00
parent 41b5d50cd4
commit a7c986fa3e
2 changed files with 2180 additions and 2108 deletions

View File

@ -99,6 +99,31 @@ export const formList = [
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "读柴发的周期参数",
label_en: "Read the periodic parameters of the diesel generator",
label_hl: "Lees de periodeparameters van de dieselgenerator",
label_gr: "Lesen Sie die Periodenparameter des Dieselgenerators",
label_fr: "Lire les paramètres de période du générateur diesel",
label_es: "Leer los parámetros de período del generador diésel",
label_al: "اقرأ معلمات الفترة لمولد الديزل",
label_bl: "Przeczytaj parametry okresu generatora diesla",
place_zh: "请输入柴发的周期参数",
place_en: "Please enter the periodic parameters of the diesel generator",
place_hl: "Voer de periodeparameters van de dieselgenerator in",
place_gr: "Bitte geben Sie die Periodenparameter des Dieselgenerators ein",
place_fr: "Veuillez entrer les paramètres de période du générateur diesel",
place_es: "Por favor, introduzca los parámetros de período del generador diésel",
place_al: "الرجاء إدخال معلمات الفترة لمولد الديزل",
place_bl: "Proszę wprowadzić parametry okresu generatora diesla",
prop: "sys_45",
selectArr: [],
sort: 35,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "储能电表循环周期(单位:100毫秒)",
@ -223,6 +248,37 @@ export const formList = [
min: 0,
max: 30,
default: 0,
},
{
type: "Switch",
label_zh: "柴发开关机",
label_en: "Diesel Generator Start/Stop",
abel_hl: "Dieselgenerator Aan/Uit",
label_gr: "Dieselgenerator Ein/Aus",
label_fr: "Générateur diesel Marche/Arrêt",
label_es: "Generador diésel Encendido/Apagado",
label_al: "مولد ديزل تشغيل/إيقاف",
label_bl: "Generator diesla Włącz/Wyłącz",
value_zh: "",
value_en: "",
value_hl: "",
value_gr: "",
value_fr: "",
value_es: "",
value_al: "",
value_bl: "",
values_zh: "",
values_en: "",
values_hl: "",
values_gr: "",
values_fr: "",
values_es: "",
values_al: "",
values_bl: "",
prop: "sys_44",
selectArr: [], //[]
sort: 85,
default: 0,
},
{
type: "Select",
@ -267,8 +323,8 @@ export const formList = [
value: 1,
},
{
label_zh: "自身ems",
label_en: "oneself ems",
label_zh: "储能启机",
label_en: "estorge start",
label_hl: "zelf ems", //荷兰语
label_gr: "selbst ems", //德文
label_fr: "soi-même ems", //法文
@ -383,7 +439,7 @@ export const formList = [
default: 0,
},
{
type: "Select",
type: "Switch",
label_zh: "计划曲线充放电使能",
label_en: "Plan curve charge and discharge enable",
label_hl: "Plan curve laad- en ontlaadfunctie inschakelen", //荷兰语
@ -392,28 +448,24 @@ export const formList = [
label_es: "Activar carga y descarga de la curva de plan", //西班牙语
label_al: "تفعيل شحن وتفريغ منحنى الخطة", //阿拉伯语
label_bl: "Włącz ładowanie i rozładowanie krzywej planu", //波兰语
place_zh: "请选择",
place_en: "Please select",
place_hl: "Selecteer aub", //荷兰语
place_gr: "Bitte auswählen", //德文
place_fr: "Veuillez sélectionner", //法文
place_es: "Por favor, seleccione", //西班牙语
place_al: "الرجاء التحديد", //阿拉伯语
place_bl: "Proszę wybrać", //波兰语
value_zh: "",
value_en: "",
value_hl: "",
value_gr: "",
value_fr: "",
value_es: "",
value_al: "",
value_bl: "",
values_zh: "",
values_en: "",
values_hl: "",
values_gr: "",
values_fr: "",
values_es: "",
values_al: "",
values_bl: "",
prop: "sys_11",
selectArr: [
{
label_zh: "充放电使能",
label_en: "Charge and discharge enable",
label_hl: "Laad- en ontlaadfunctie inschakelen", //荷兰语
label_gr: "Laden und Entladen aktivieren", //德文
label_fr: "Activer la charge et la décharge", //法文
label_es: "Activar carga y descarga", //西班牙语
label_al: "تفعيل الشحن والتفريغ", //阿拉伯语
label_bl: "Włącz ładowanie i rozładowanie", //波兰语
value: 0,
},
],
selectArr: [],
sort: 110,
default: 0,
},
@ -594,7 +646,7 @@ export const formList = [
selectArr: [],
sort: 170,
min: 0,
max: 30,
max: 500,
default: 0,
},
{
@ -619,7 +671,7 @@ export const formList = [
selectArr: [],
sort: 180,
min: 0,
max: 30,
max: 50,
default: 0,
},
{
@ -644,7 +696,7 @@ export const formList = [
selectArr: [],
sort: 190,
min: 0,
max: 30,
max: 50,
default: 0,
},
{
@ -669,7 +721,7 @@ export const formList = [
selectArr: [],
sort: 200,
min: 0,
max: 30,
max: 50,
default: 0,
},
{
@ -694,7 +746,7 @@ export const formList = [
selectArr: [],
sort: 210,
min: 0,
max: 30,
max: 100,
default: 0,
},
{
@ -719,7 +771,7 @@ export const formList = [
selectArr: [],
sort: 220,
min: 0,
max: 30,
max: 1000,
default: 0,
},
{
@ -744,7 +796,7 @@ export const formList = [
selectArr: [],
sort: 230,
min: 0,
max: 30,
max: 120,
default: 0,
},
{
@ -769,7 +821,7 @@ export const formList = [
selectArr: [],
sort: 240,
min: 0,
max: 30,
max: 60,
default: 0,
},
{
@ -794,7 +846,7 @@ export const formList = [
selectArr: [],
sort: 250,
min: 0,
max: 30,
max: 100,
default: 0,
},
{
@ -819,7 +871,7 @@ export const formList = [
selectArr: [],
sort: 260,
min: 0,
max: 30,
max: 95,
default: 0,
},
{
@ -844,7 +896,7 @@ export const formList = [
selectArr: [],
sort: 270,
min: 0,
max: 30,
max: 90,
default: 0,
},
{
@ -944,7 +996,7 @@ export const formList = [
selectArr: [],
sort: 310,
min: 0,
max: 30,
max: 100,
default: 0,
},
{
@ -969,7 +1021,7 @@ export const formList = [
selectArr: [],
sort: 320,
min: 0,
max: 30,
max: 60,
default: 0,
},
{
@ -994,7 +1046,7 @@ export const formList = [
selectArr: [],
sort: 330,
min: 0,
max: 30,
max: 110,
default: 0,
},
{
@ -1184,7 +1236,7 @@ export const formList = [
selectArr: [],
sort: 380,
min: 0,
max: 30,
max: 100,
default: 0,
},
{
@ -1209,7 +1261,7 @@ export const formList = [
selectArr: [],
sort: 390,
min: 0,
max: 30,
max: 500,
default: 0,
},
{
@ -1292,7 +1344,7 @@ export const formList = [
},
{
type: "Input",
label_zh: "外部光伏充电比例系数(o.1)",
label_zh: "外部光伏充电比例系数(0.1)",
label_en: "External photovoltaic charging ratio coefficient (0.1)",
label_hl: "Externe fotovoltaïsche oplaadsverhoudingscoëfficiënt (0.1)", //荷兰语
label_gr: "Externer photovoltaischer Ladeverhältnis-Koeffizient (0.1)", //德文
@ -1312,7 +1364,7 @@ export const formList = [
selectArr: [],
sort: 420,
min: 0,
max: 30,
max: 100,
default: 0,
},
{
@ -1333,336 +1385,298 @@ export const formList = [
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "sys_43",
prop: "sys_46",
selectArr: [],
sort: 430,
min: 0,
max: 30,
max: 110,
default: 0,
},
{
type: "Switch",
label_zh: "中自STS保存参数",
label_en: "Save STS Parameters",
label_hl: "STS parameters opslaan",
label_gr: "STS-Parameter speichern",
label_fr: "Enregistrer les paramètres STS",
label_es: "Guardar parámetros STS",
label_al: "حفظ معلمات STS",
label_bl: "Zapisz parametry STS",
value_zh: "",
value_en: "",
value_hl: "",
value_gr: "",
value_fr: "",
value_es: "",
value_al: "",
value_bl: "",
values_zh: "",
values_en: "",
values_hl: "",
values_gr: "",
values_fr: "",
values_es: "",
values_al: "",
values_bl: "",
prop: "sys_40",
selectArr: [],
sort: 431,
default: 0,
},
{
type: "Switch",
label_zh: "中自STS开关故障清除",
label_en: "Clear STS Switch Fault",
label_hl: "STS schakelaar fout wissen",
label_gr: "STS-Schalter Fehler löschen",
label_fr: "Effacer défaut commutateur STS",
label_es: "Borrar fallo del interruptor STS",
label_al: "مسح خطأ مفتاح STS",
label_bl: "Wyczyść błąd przełącznika STS",
value_zh: "",
value_en: "",
value_hl: "",
value_gr: "",
value_fr: "",
value_es: "",
value_al: "",
value_bl: "",
values_zh: "",
values_en: "",
values_hl: "",
values_gr: "",
values_fr: "",
values_es: "",
values_al: "",
values_bl: "",
prop: "sys_47",
selectArr: [],
sort: 432,
default: 0,
},
{
type: "Input",
label_zh: "备用参数1",
label_en: "Parameter 1",
label_hl: "Parameter 1", //荷兰语
label_gr: "Parameter 1", //德文
label_fr: "Paramètre 1", //法文
label_es: "Parámetro 1", //西班牙语
label_al: "معلمة 1", //阿拉伯语
label_bl: "Parametr 1", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_1",
label_zh: "中自STS电网欠压阈值(单位:0.1V)",
label_en: "STS Grid Undervoltage Threshold (Unit: 0.1V)",
label_hl: "STS net onderspanning drempel (Eenheid: 0.1V)",
label_gr: "STS Netz-Unterspannungsschwelle (Einheit: 0.1V)",
label_fr: "Seuil de sous-tension réseau STS (Unité: 0.1V)",
label_es: "Umbral de subtensión de red STS (Unidad: 0.1V)",
label_al: "حد انخفاض جهد الشبكة STS (الوحدة: 0.1V)",
label_bl: "Próg zaniżonego napięcia sieci STS (Jednostka: 0.1V)",
place_zh: "请输入",
place_en: "Please enter",
place_hl: "Voer in",
place_gr: "Geben Sie ein",
place_fr: "Veuillez entrer",
place_es: "Por favor, introduzca",
place_al: "الرجاء إدخال",
place_bl: "Wprowadź",
prop: "sys_48",
selectArr: [],
sort: 433,
min: 0,
max: 65535,
default: 0,
},
{
type: "Input",
label_zh: "中自STS电网过压阈值(单位:0.1V)",
label_en: "STS Grid Overvoltage Threshold (Unit: 0.1V)",
label_hl: "STS net overspanning drempel (Eenheid: 0.1V)",
label_gr: "STS Netz-Überspannungsschwelle (Einheit: 0.1V)",
label_fr: "Seuil de surtension réseau STS (Unité: 0.1V)",
label_es: "Umbral de sobretensión de red STS (Unidad: 0.1V)",
label_al: "حد ارتفاع جهد الشبكة STS (الوحدة: 0.1V)",
label_bl: "Próg podwyższonego napięcia sieci STS (Jednostka: 0.1V)",
place_zh: "请输入",
place_en: "Please enter",
place_hl: "Voer in",
place_gr: "Geben Sie ein",
place_fr: "Veuillez entrer",
place_es: "Por favor, introduzca",
place_al: "الرجاء إدخال",
place_bl: "Wprowadź",
prop: "sys_49",
selectArr: [],
sort: 434,
min: 0,
max: 65535,
default: 0,
},
{
type: "Input",
label_zh: "中自STS电网欠频阈值(单位:0.01Hz)",
label_en: "STS Grid Underfrequency Threshold (Unit: 0.01Hz)",
label_hl: "STS net onderfrequentie drempel (Eenheid: 0.01Hz)",
label_gr: "STS Netz-Unterfrequenzschwelle (Einheit: 0.01Hz)",
label_fr: "Seuil de sous-fréquence réseau STS (Unité: 0.01Hz)",
label_es: "Umbral de subfrecuencia de red STS (Unidad: 0.01Hz)",
label_al: "حد انخفاض تردد الشبكة STS (الوحدة: 0.01Hz)",
label_bl: "Próg zaniżonej częstotliwości sieci STS (Jednostka: 0.01Hz)",
place_zh: "请输入",
place_en: "Please enter",
place_hl: "Voer in",
place_gr: "Geben Sie ein",
place_fr: "Veuillez entrer",
place_es: "Por favor, introduzca",
place_al: "الرجاء إدخال",
place_bl: "Wprowadź",
prop: "sys_50",
selectArr: [],
sort: 435,
min: 0,
max: 65535,
default: 0,
},
{
type: "Input",
label_zh: "中自STS电网过频阈值(单位:0.01Hz)",
label_en: "STS Grid Overfrequency Threshold (Unit: 0.01Hz)",
label_hl: "STS net overfrequentie drempel (Eenheid: 0.01Hz)",
label_gr: "STS Netz-Überfrequenzschwelle (Einheit: 0.01Hz)",
label_fr: "Seuil de sur-fréquence réseau STS (Unité: 0.01Hz)",
label_es: "Umbral de sobrefrecuencia de red STS (Unidad: 0.01Hz)",
label_al: "حد ارتفاع تردد الشبكة STS (الوحدة: 0.01Hz)",
label_bl: "Próg podwyższonej częstotliwości sieci STS (Jednostka: 0.01Hz)",
place_zh: "请输入",
place_en: "Please enter",
place_hl: "Voer in",
place_gr: "Geben Sie ein",
place_fr: "Veuillez entrer",
place_es: "Por favor, introduzca",
place_al: "الرجاء إدخال",
place_bl: "Wprowadź",
prop: "sys_51",
selectArr: [],
sort: 436,
min: 0,
max: 65535,
default: 0,
},
{
type: "Input",
label_zh: "中自STS电网过流阈值(单位:0.01A)",
label_en: "STS Grid Overcurrent Threshold (Unit: 0.01A)",
label_hl: "STS net overstroom drempel (Eenheid: 0.01A)",
label_gr: "STS Netz-Überstromschwelle (Einheit: 0.01A)",
label_fr: "Seuil de surintensité réseau STS (Unité: 0.01A)",
label_es: "Umbral de sobrecorriente de red STS (Unidad: 0.01A)",
label_al: "حد ارتفاع تيار الشبكة STS (الوحدة: 0.01A)",
label_bl: "Próg nadprądowy sieci STS (Jednostka: 0.01A)",
place_zh: "请输入",
place_en: "Please enter",
place_hl: "Voer in",
place_gr: "Geben Sie ein",
place_fr: "Veuillez entrer",
place_es: "Por favor, introduzca",
place_al: "الرجاء إدخال",
place_bl: "Wprowadź",
prop: "sys_52",
selectArr: [],
sort: 437,
min: 0,
max: 65535,
default: 0,
},
{
type: "Input",
label_zh: "中自STS负载欠压阈值(单位:0.1V)",
label_en: "STS Load Undervoltage Threshold (Unit: 0.1V)",
label_hl: "STS belasting onderspanning drempel (Eenheid: 0.1V)",
label_gr: "STS Last-Unterspannungsschwelle (Einheit: 0.1V)",
label_fr: "Seuil de sous-tension charge STS (Unité: 0.1V)",
label_es: "Umbral de subtensión de carga STS (Unidad: 0.1V)",
label_al: "حد انخفاض جهد الحمل STS (الوحدة: 0.1V)",
label_bl: "Próg zaniżonego napięcia obciążenia STS (Jednostka: 0.1V)",
place_zh: "请输入",
place_en: "Please enter",
place_hl: "Voer in",
place_gr: "Geben Sie ein",
place_fr: "Veuillez entrer",
place_es: "Por favor, introduzca",
place_al: "الرجاء إدخال",
place_bl: "Wprowadź",
prop: "sys_53",
selectArr: [],
sort: 438,
min: 0,
max: 65535,
default: 0,
},
{
type: "Input",
label_zh: "中自STS相位差阈值(单位:0.1°)",
label_en: "STS Phase Difference Threshold (Unit: 0.1°)",
label_hl: "STS faseverschil drempel (Eenheid: 0.1°)",
label_gr: "STS Phasendifferenzschwelle (Einheit: 0.1°)",
label_fr: "Seuil de différence de phase STS (Unité: 0.1°)",
label_es: "Umbral de diferencia de fase STS (Unidad: 0.1°)",
label_al: "حد فرق الطور STS (الوحدة: 0.1°)",
label_bl: "Próg różnicy faz STS (Jednostka: 0.1°)",
place_zh: "请输入",
place_en: "Please enter",
place_hl: "Voer in",
place_gr: "Geben Sie ein",
place_fr: "Veuillez entrer",
place_es: "Por favor, introduzca",
place_al: "الرجاء إدخال",
place_bl: "Wprowadź",
prop: "sys_54",
selectArr: [],
sort: 439,
min: 0,
max: 65535,
default: 0,
},
{
type: "Input",
label_zh: "中自STS频率差阈值(单位:0.1Hz)",
label_en: "STS Frequency Difference Threshold (Unit: 0.1Hz)",
label_hl: "STS frequentieverschil drempel (Eenheid: 0.1Hz)",
label_gr: "STS Frequenzdifferenzschwelle (Einheit: 0.1Hz)",
label_fr: "Seuil de différence de fréquence STS (Unité: 0.1Hz)",
label_es: "Umbral de diferencia de frecuencia STS (Unidad: 0.1Hz)",
label_al: "حد فرق التردد STS (الوحدة: 0.1Hz)",
label_bl: "Próg różnicy częstotliwości STS (Jednostka: 0.1Hz)",
place_zh: "请输入",
place_en: "Please enter",
place_hl: "Voer in",
place_gr: "Geben Sie ein",
place_fr: "Veuillez entrer",
place_es: "Por favor, introduzca",
place_al: "الرجاء إدخال",
place_bl: "Wprowadź",
prop: "sys_55",
selectArr: [],
sort: 440,
min: 0,
max: 30,
max: 65535,
default: 0,
},
{
type: "Input",
label_zh: "备用参数2",
label_en: "Parameter 2",
label_hl: "Parameter 2", //荷兰语
label_gr: "Parameter 2", //德文
label_fr: "Paramètre 2", //法文
label_es: "Parámetro 2", //西班牙语
label_al: "معلمة 2", //阿拉伯语
label_bl: "Parametr 2", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_2",
label_zh: "中自STS电压系数阈值(单位:0.01)",
label_en: "STS Voltage Coefficient Threshold (Unit: 0.01)",
label_hl: "STS spanningscoëfficiënt drempel (Eenheid: 0.01)",
label_gr: "STS Spannungskoeffizientenschwelle (Einheit: 0.01)",
label_fr: "Seuil de coefficient de tension STS (Unité: 0.01)",
label_es: "Umbral de coeficiente de tensión STS (Unidad: 0.01)",
label_al: "حد معامل الجهد STS (الوحدة: 0.01)",
label_bl: "Próg współczynnika napięcia STS (Jednostka: 0.01)",
place_zh: "请输入",
place_en: "Please enter",
place_hl: "Voer in",
place_gr: "Geben Sie ein",
place_fr: "Veuillez entrer",
place_es: "Por favor, introduzca",
place_al: "الرجاء إدخال",
place_bl: "Wprowadź",
prop: "sys_56",
selectArr: [],
sort: 450,
sort: 441,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数3",
label_en: "Parameter 3",
label_hl: "Parameter 3", //荷兰语
label_gr: "Parameter 3", //德文
label_fr: "Paramètre 3", //法文
label_es: "Parámetro 3", //西班牙语
label_al: "معلمة 3", //阿拉伯语
label_bl: "Parametr 3", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_3",
selectArr: [],
sort: 460,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数4",
label_en: "Parameter 4",
label_hl: "Parameter 4", //荷兰语
label_gr: "Parameter 4", //德文
label_fr: "Paramètre 4", //法文
label_es: "Parámetro 4", //西班牙语
label_al: "معلمة 4", //阿拉伯语
label_bl: "Parametr 4", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_4",
selectArr: [],
sort: 470,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数5",
label_en: "Parameter 5",
label_hl: "Parameter 5", //荷兰语
label_gr: "Parameter 5", //德文
label_fr: "Paramètre 5", //法文
label_es: "Parámetro 5", //西班牙语
label_al: "معلمة 5", //阿拉伯语
label_bl: "Parametr 5", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_5",
selectArr: [],
sort: 480,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数6",
label_en: "Parameter 6",
label_hl: "Parameter 6", //荷兰语
label_gr: "Parameter 6", //德文
label_fr: "Paramètre 6", //法文
label_es: "Parámetro 6", //西班牙语
label_al: "معلمة 6", //阿拉伯语
label_bl: "Parametr 6", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_6",
selectArr: [],
sort: 490,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数7",
label_en: "Parameter 7",
label_hl: "Parameter 7", //荷兰语
label_gr: "Parameter 7", //德文
label_fr: "Paramètre 7", //法文
label_es: "Parámetro 7", //西班牙语
label_al: "معلمة 7", //阿拉伯语
label_bl: "Parametr 7", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_7",
selectArr: [],
sort: 500,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数8",
label_en: "Parameter 8",
label_hl: "Parameter 8", //荷兰语
label_gr: "Parameter 8", //德文
label_fr: "Paramètre 8", //法文
label_es: "Parámetro 8", //西班牙语
label_al: "معلمة 8", //阿拉伯语
label_bl: "Parametr 8", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_8",
selectArr: [],
sort: 510,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数9",
label_en: "Parameter 9",
label_hl: "Parameter 9", //荷兰语
label_gr: "Parameter 9", //德文
label_fr: "Paramètre 9", //法文
label_es: "Parámetro 9", //西班牙语
label_al: "معلمة 9", //阿拉伯语
label_bl: "Parametr 9", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_9",
selectArr: [],
sort: 520,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数10",
label_en: "Parameter 10",
label_hl: "Parameter 10", //荷兰语
label_gr: "Parameter 10", //德文
label_fr: "Paramètre 10", //法文
label_es: "Parámetro 10", //西班牙语
label_al: "معلمة 10", //阿拉伯语
label_bl: "Parametr 10", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_10",
selectArr: [],
sort: 530,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数11",
label_en: "Parameter 11",
label_hl: "Parameter 11", //荷兰语
label_gr: "Parameter 11", //德文
label_fr: "Paramètre 11", //法文
label_es: "Parámetro 11", //西班牙语
label_al: "معلمة 11", //阿拉伯语
label_bl: "Parametr 11", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_11",
selectArr: [],
sort: 540,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数12",
label_en: "Parameter 12",
label_hl: "Parameter 12", //荷兰语
label_gr: "Parameter 12", //德文
label_fr: "Paramètre 12", //法文
label_es: "Parámetro 12", //西班牙语
label_al: "معلمة 12", //阿拉伯语
label_bl: "Parametr 12", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_12",
selectArr: [],
sort: 550,
min: 0,
max: 30,
default: 0,
},
{
type: "Input",
label_zh: "备用参数13",
label_en: "Parameter 13",
label_hl: "Parameter 13", //荷兰语
label_gr: "Parameter 13", //德文
label_fr: "Paramètre 13", //法文
label_es: "Parámetro 13", //西班牙语
label_al: "معلمة 13", //阿拉伯语
label_bl: "Parametr 13", //波兰语
place_zh: "请输入", //中文
place_en: "Please enter",//英文
place_hl: "Voer in",//荷兰语
place_gr: "Geben Sie ein", //德文
place_fr: "Veuillez entrer", //法文
place_es: "Por favor, introduzca", //西班牙语
place_al: "الرجاء إدخال", //阿拉伯语
place_bl: "Wprowadź", //波兰语
prop: "Parameter_13",
selectArr: [],
sort: 560,
min: 0,
max: 30,
max: 65535,
default: 0,
},
{
@ -1840,4 +1854,4 @@ export const formList = [
max: 30,
default: 0,
},
];
];

View File

@ -1,8 +1,14 @@
<template>
<view style="height: 100vh">
<view class="">
<u-navbar :title="$t('homePage.policy.policyTitle')" :is-back="true" title-color="#FFF"
:background="background" :border-bottom="false" :custom-back="toback">
<u-navbar
:title="$t('homePage.policy.policyTitle')"
:is-back="true"
title-color="#FFF"
:background="background"
:border-bottom="false"
:custom-back="toback"
>
</u-navbar>
</view>
<view class="policeForm">
@ -10,9 +16,15 @@
<view class="" v-for="(item, index) in smallArr" :key="index">
<view class="" v-if="item.type == 'Input'">
<u-form-item :label="item[`label_${lang}`]" :prop="item.prop">
<u-input :key="'input_' + item.prop + '_' + item.inputKey" :min="item.min" :max="item.max"
:value="item.value" type="number" :placeholder="item[`place_${lang}`]"
@input="handleInput(item, $event)" />
<u-input
:key="'input_' + item.prop + '_' + item.inputKey"
:min="item.min"
:max="item.max"
:value="item.value"
type="number"
:placeholder="item[`place_${lang}`]"
@input="handleInput(item, $event)"
/>
</u-form-item>
</view>
<view class="" v-if="item.type == 'Switch'">
@ -20,29 +32,41 @@
<u-switch :size="40" v-model="item.value"></u-switch>
</u-form-item>
</view>
<view class="" v-if="item.type == 'Select'" @click="selectShow(item, index)">
<view class="" v-if="item.type == 'Select'">
<u-form-item :label="item[`label_${lang}`]" :prop="item.prop">
<view class="" v-show="false">
<u-input v-model="item.value" disabled @click="selectShow(item, index)" />
<u-input
v-model="item.value"
disabled
@click="selectShow(item, index)"
/>
</view>
<view class="">
<view class="select-value" @click.stop="selectShow(item, index)">
{{ item.selectLabel || $t("homePage.alarm.placeSelect") }}
</view>
<u-select :key="item.prop" @confirm="confirm($event, item)" v-model="item.isShow"
:list="getSelectList(item)"></u-select>
<u-select
:key="item.prop"
@confirm="confirm($event, item)"
v-model="item.isShow"
:list="getSelectList(item)"
></u-select>
</u-form-item>
</view>
</view>
</u-form>
<button @click="submitDevice" type="success" size="mini" style="
<button
@click="submitDevice"
type="success"
size="mini"
style="
background-color: #009458;
padding: 10rpx 0;
color: #fff;
margin-top: 40rpx;
width: 100%;
">
"
>
{{ $t("homePage.mine.submit") }}
</button>
</view>
@ -51,16 +75,11 @@
</template>
<script>
import {
formList
} from "@/common/form.js";
import {
Langlist
} from "@/common/lang";
import mqtt from "@/uni_modules/leliven-mqtt/index.js";
import pako from "pako";
export default {
import { formList } from "@/common/form.js";
import { Langlist } from "@/common/lang";
import mqtt from "@/uni_modules/leliven-mqtt/index.js";
import pako from "pako";
export default {
data() {
return {
formList: formList,
@ -72,91 +91,99 @@
backData: {},
smallArr: [],
user: {
username: 'admin', // 设置用户名
password: 'zzkj@688737' // 设置密码
}
username: "admin", // 设置用户名
password: "zzkj@688737", // 设置密码
},
};
},
onLoad() {
this.getSn()
},
computed: {
lang() {
return Langlist.find(v => v.value == this.$store.state.vuex_language).prop || 'en'
return (
Langlist.find((v) => v.value == this.$store.state.vuex_language).prop ||
"en"
);
},
currentStation() {
return this.vuex_currentStation;
},
},
onShow() {
this.initmqttClient()
onLoad() {
this.getSn();
},
methods: {
getSn(){
this.$u.api.station.getStationPostionSn({
stationId: this.currentStation.id
}).then(res => {
this.sn = res.data[0]?.sn
getSn() {
this.$u.api.station
.getStationPostionSn({
stationId: this.currentStation.id,
})
.then((res) => {
this.sn = res.data[0]?.sn;
this.initmqttClient();
});
},
initmqttClient() {
console.log(this.lang)
console.log(this.currentStation)
console.log(this.lang);
console.log(this.currentStation);
// 初始化客户端连接地址
// #ifdef H5
let mqttClient = mqtt.connect('ws://1.95.170.86:8083/mqtt', {
...this.user
})
let mqttClient = mqtt.connect("ws://1.95.170.86:8083/mqtt", {
...this.user,
});
// #endif
// #ifdef MP-WEIXIN||APP-PLUS
let mqttClient = mqtt.connect('wx://1.95.170.86:8083/mqtt', {
...this.user
})
let mqttClient = mqtt.connect("wx://1.95.170.86:8083/mqtt", {
...this.user,
});
// #endif
this.mqttClient = mqttClient
this.mqttClient = mqttClient;
// 连接MQ服务
mqttClient.on('connect', function(res) {
console.log('连接成功')
mqttClient
.on("connect", (res) => {
console.log("连接成功");
// 订阅主题
mqttClient.subscribe(`1/ems/${this.sn}/control/response`, (err) => {
console.log(`1/app/${this.sn}/control/request`);
if (!err) {
// 订阅成功
mqttClient.publish(`1/app/${this.sn}/control/request`, JSON.stringify({
fun: 'GET',
type: 'WJ_Get_NewControlSystem',
content: 0
}))
mqttClient.publish(
`1/app/${this.sn}/control/request`,
JSON.stringify({
fun: "GET",
type: "WJ_Get_NewControlSystem",
content: 0,
}),
);
}
});
})
}).on('reconnect', function() {
console.log('重新连接')
}).on('error', function() {
console.log('连接失败')
}).on('end', function() {
console.log('连接End')
}).on('message', (topic, message) => {
console.log(this.decodeGzipBase64(message.toString()))
let data = this.decodeGzipBase64(message.toString())
.on("reconnect", function () {
console.log("重新连接");
})
.on("error", function () {
console.log("连接失败");
})
.on("end", function () {
console.log("连接End");
})
.on("message", (topic, message) => {
console.log(this.decodeGzipBase64(message.toString()), "111");
let data = this.decodeGzipBase64(message.toString());
if (data.content && data.content.params) {
this.control(data.content)
} else
if (data.content == 1) {
this.control(data.content);
} else if (data.content == 1) {
this.$refs.uToast.show({
title: this.$t('homePage.mine.operateSuccess'),
type: 'success',
})
title: this.$t("homePage.mine.operateSuccess"),
type: "success",
});
} else {
uni.showToast({
title: this.$t('homePage.mine.operateFail'),
icon: 'none'
})
title: this.$t("homePage.mine.operateFail"),
icon: "none",
});
}
})
});
},
decodeGzipBase64(base64Str) {
@ -171,55 +198,78 @@
// 2. gunzip 解压
const decompressed = pako.ungzip(bytes, {
to: "string"
to: "string",
});
// 3. 转 JSON如果是 JSON
return JSON.parse(decompressed);
},
getSelectList(item) {
if (item.selectArr && item.selectArr.length > 0) {
return item.selectArr.map(option => ({
return item.selectArr.map((option) => ({
value: option.value.toString(),
label: option[`label_${this.lang}`] || option.label
}))
label: option[`label_${this.lang}`] || option.label,
}));
}
return []
return [];
},
control(NewControlSystemShow_data) {
console.log(NewControlSystemShow_data)
this.formList.forEach(item => {
if (item.type == "Switch") {
item.value = NewControlSystemShow_data?.params[item.prop] ? true : false
console.log(NewControlSystemShow_data, "123");
this.formList.forEach((item) => {
if (
item.type == "Switch" &&
NewControlSystemShow_data?.smallScreen?.includes(item.prop)
) {
this.$set(
item,
"value",
NewControlSystemShow_data?.params[item.prop] ? true : false,
);
}
if (item.type == "Input") {
item.value = NewControlSystemShow_data?.params[item.prop] || item.default
if (
item.type == "Input" &&
NewControlSystemShow_data?.smallScreen?.includes(item.prop)
) {
this.$set(
item,
"value",
NewControlSystemShow_data?.params[item.prop] ?? item.default,
);
}
if (item.type == 'Select') {
item.selectLabel = item.selectArr.find(v => v.value == item.value)?.[`label_${this.lang}`]
if (
item.type == "Select" &&
NewControlSystemShow_data?.smallScreen?.includes(item.prop)
) {
const newValue =
NewControlSystemShow_data?.params[item.prop] ?? item.default;
this.$set(item, "value", newValue);
item.selectLabel = item.selectArr.find((v) => v.value == newValue)?.[
`label_${this.lang}`
];
}
item.isShow = false
})
this.backData = NewControlSystemShow_data
this.smallArr = this.formList.filter(v => NewControlSystemShow_data?.smallScreen.includes(v.prop))
this.$set(item, "isShow", false);
});
this.backData = NewControlSystemShow_data;
this.smallArr = this.formList.filter((v) =>
NewControlSystemShow_data?.smallScreen.includes(v.prop),
);
console.log(this.smallArr, "234");
},
confirm(val, item) {
if (val && val.length > 0) {
item.value = val[0].value
item.selectLabel = val[0].label
this.$set(item, "value", val[0].value);
this.$set(item, "selectLabel", val[0].label);
}
item.isShow = false
this.$set(item, "isShow", false);
},
handleInput(item, value) {
try {
// u-input 组件 @input 事件直接传递 value 值,不是 event 对象
let iptval = String(value || '').replace(/[^0-9.]/g, '');
const parts = iptval.split('.');
let iptval = String(value || "").replace(/[^0-9.]/g, "");
const parts = iptval.split(".");
if (parts.length > 2) {
iptval = parts[0] + '.' + parts.slice(1).join('');
iptval = parts[0] + "." + parts.slice(1).join("");
}
if (!iptval || iptval === '.') {
if (!iptval || iptval === ".") {
item.value = 0;
return;
}
@ -241,50 +291,58 @@
// 如果值被限制,强制重新渲染输入框
if (needForceUpdate) {
this.$set(item, 'inputKey', (item.inputKey || 0) + 1);
this.$set(item, "inputKey", (item.inputKey || 0) + 1);
}
} catch (error) {
console.log('handleInput方法错误:', error);
console.log("handleInput方法错误:", error);
}
},
toback() {
uni.navigateBack()
uni.navigateBack();
},
selectShow(val, index) {
val.isShow = true
console.log(123);
this.$set(val, "isShow", true);
},
submitDevice() {
let smallParam = this.smallArr.reduce((pre, cur) => {
pre[cur.prop] = cur.type == "Switch" ? cur.value ? 1 : 0 : cur.value
pre[cur.prop] = Number(pre[cur.prop])
return pre
}, {})
pre[cur.prop] = cur.type == "Switch" ? (cur.value ? 1 : 0) : cur.value;
pre[cur.prop] = Number(pre[cur.prop]);
return pre;
}, {});
this.mqttClient.publish(`1/app/${this.sn}/control/request`, JSON.stringify({
fun: 'SET',
type: 'WJ_Set_NewControlSystem',
this.mqttClient.publish(
`1/app/${this.sn}/control/request`,
JSON.stringify({
fun: "SET",
type: "WJ_Set_NewControlSystem",
content: {
...this.backData,
params: {
...this.backData.params,
...smallParam
}
}
}))
...smallParam,
},
},
};
}),
);
},
},
};
</script>
<style lang="scss" scoped>
.policeForm {
.policeForm {
margin: 22rpx;
padding: 22rpx;
background-color: #fff;
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.1);
border-radius: 8rpx;
}
}
.select-value {
padding: 16rpx 0;
color: #333;
min-height: 60rpx;
}
</style>