Showing
4 changed files
with
29 additions
and
14 deletions
... | ... | @@ -51,23 +51,21 @@ export const step1Schemas: FormSchema[] = [ |
51 | 51 | }, |
52 | 52 | }, |
53 | 53 | { |
54 | - field: 'field7', | |
55 | - component: 'RadioGroup', | |
54 | + field: 'brand', | |
55 | + component: 'ApiRadioGroup', | |
56 | 56 | label: '选择厂家', |
57 | + required: true, | |
57 | 58 | colProps: { |
58 | 59 | span: 8, |
59 | 60 | }, |
61 | + defaultValue: 'DIY_', | |
60 | 62 | componentProps: { |
61 | - options: [ | |
62 | - { | |
63 | - label: '自定义厂家', | |
64 | - value: '1', | |
65 | - }, | |
66 | - { | |
67 | - label: 'TBox边缘网关', | |
68 | - value: '2', | |
69 | - }, | |
70 | - ], | |
63 | + api: findDictItemByCode, | |
64 | + params: { | |
65 | + dictCode: 'DEVICE_BRAND_GATEWAY', | |
66 | + }, | |
67 | + labelField: 'itemText', | |
68 | + valueField: 'itemValue', | |
71 | 69 | }, |
72 | 70 | ifShow: ({ values }) => isGateWay(values.deviceType), |
73 | 71 | }, | ... | ... |
... | ... | @@ -22,6 +22,15 @@ |
22 | 22 | <TabPane key="4" tab="子设备" v-if="deviceDetail?.deviceType === 'GATEWAY'"> |
23 | 23 | <ChildDevice :fromId="deviceDetail?.tbDeviceId" /> |
24 | 24 | </TabPane> |
25 | + <!-- 网关设备并且场家是TBox --> | |
26 | + <TabPane | |
27 | + key="6" | |
28 | + tab="TBox" | |
29 | + v-if="deviceDetail?.deviceType === 'GATEWAY' && deviceDetail?.brand == 'TBox'" | |
30 | + > | |
31 | + <TBoxDetail /> | |
32 | + </TabPane> | |
33 | + <!-- 网关设备并且是TBox --> | |
25 | 34 | </Tabs> |
26 | 35 | </BasicDrawer> |
27 | 36 | </template> |
... | ... | @@ -34,6 +43,7 @@ |
34 | 43 | import RealTimeData from '../tabs/RealTimeData.vue'; |
35 | 44 | import Alarm from '../tabs/Alarm.vue'; |
36 | 45 | import ChildDevice from '../tabs/ChildDevice.vue'; |
46 | + import TBoxDetail from '../tabs/TBoxDetail.vue'; | |
37 | 47 | import CommandIssuance from '../tabs/CommandIssuance.vue'; |
38 | 48 | import { getDeviceDetail } from '/@/api/device/deviceManager'; |
39 | 49 | export default defineComponent({ |
... | ... | @@ -47,6 +57,7 @@ |
47 | 57 | Alarm, |
48 | 58 | ChildDevice, |
49 | 59 | CommandIssuance, |
60 | + TBoxDetail, | |
50 | 61 | }, |
51 | 62 | emits: ['reload', 'register'], |
52 | 63 | setup() { | ... | ... |
... | ... | @@ -53,12 +53,12 @@ |
53 | 53 | <a-button type="primary" class="mr-4" @click="copyTbDeviceId">复制设备ID</a-button> |
54 | 54 | <a-button type="primary" class="mr-4" @click="copyDeviceToken">复制访问令牌</a-button> |
55 | 55 | <a-button type="primary" class="mr-4" @click="manageDeviceToken">管理设备凭证</a-button> |
56 | - <a-button | |
56 | + <!-- <a-button | |
57 | 57 | type="primary" |
58 | 58 | v-if="deviceDetail.deviceType == 'GATEWAY'" |
59 | 59 | @click="remoteConnectiondGateway" |
60 | 60 | >远程连接边缘网关</a-button |
61 | - > | |
61 | + > --> | |
62 | 62 | <ManageDeviceTokenModal @register="registerModal" /> |
63 | 63 | </div> |
64 | 64 | <div v-if="deviceDetail?.deviceInfo?.address" class="mt-4"> | ... | ... |