Skip to content

Commit

Permalink
Add device form update
Browse files Browse the repository at this point in the history
Signed-off-by: rovast <rovast@163.com>
  • Loading branch information
rovast committed Sep 18, 2023
1 parent 045b0af commit 522a8a0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ user:
iot:
"new device": New Device
name: Name
mid: ID
protocol: Protocol
address: Address
driver_sku: Driver SKU
Expand Down
1 change: 1 addition & 0 deletions locales/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ user:
iot:
"new device": 接入新设备
name: 设备名称
mid: 设备ID
protocol: 通讯协议
address: 链接地址
driver_sku: 设备驱动SKU
Expand Down
17 changes: 9 additions & 8 deletions src/components/Modal/new-device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import emitter from "@/utils/event-bus";
const loading = ref(false);
const form = reactive({
name: "",
protocol: "HTTP",
address: "",
driver_sku: "",
driver_image: "",
instructions: "",
telemetries: ""
mid: ""
// protocol: "HTTP",
// address: "",
// driver_sku: "",
// driver_image: "",
// instructions: "",
// telemetries: ""
// name: "test-thermometer",
// protocol: "HTTP",
Expand All @@ -39,8 +40,8 @@ const res = ref({
});
const handleSubmit = () => {
const formData = clone(form);
formData.instructions = window.btoa(formData.instructions);
formData.telemetries = window.btoa(formData.telemetries);
// formData.instructions = window.btoa(formData.instructions);
// formData.telemetries = window.btoa(formData.telemetries);
loading.value = true;
loadData(res, "iot.device.add", formData, loading, () => {
Expand Down

0 comments on commit 522a8a0

Please sign in to comment.