|
|
|
@ -3,10 +3,10 @@ import { BasicModal, useModalInner } from '@/components/Modal'
|
|
|
|
|
import type { FormSchema, FormSchemaInner, Rule } from '@/components/Form' |
|
|
|
|
import { BasicForm, useForm } from '@/components/Form' |
|
|
|
|
import { CloudCommandType } from '@/api/device-manage/device/types' |
|
|
|
|
import { getAllTopics } from '@/api/product/topic' |
|
|
|
|
import { sendCommandToDevice, sendMessageToDevice } from '@/api/device-manage/device/cloud-command' |
|
|
|
|
import CodeEditor from '@/components/CodeEditor/src/CodeEditor.vue' |
|
|
|
|
import { getAllModelAttributes } from '@/api/product/model' |
|
|
|
|
import { getDeviceTopicList } from '@/api/device-manage/device' |
|
|
|
|
import { ModelAttributeDataTypesEnum, type SimpleAttribute } from '@/api/product/types' |
|
|
|
|
import { useMessage } from '@/hooks/web/useMessage' |
|
|
|
|
|
|
|
|
@ -109,8 +109,8 @@ const MessageSchemas: FormSchema[] = [
|
|
|
|
|
required: true, |
|
|
|
|
component: 'ApiSelect', |
|
|
|
|
componentProps: { |
|
|
|
|
api: () => getAllTopics(productId!), |
|
|
|
|
valueField: 'id', |
|
|
|
|
api: async () => (await getDeviceTopicList({ deviceId, current: 1, size: 500 })).records, |
|
|
|
|
valueField: 'topic', |
|
|
|
|
labelField: 'topic', |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|