Showing
4 changed files
with
29 additions
and
14 deletions
@@ -51,23 +51,21 @@ export const step1Schemas: FormSchema[] = [ | @@ -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 | label: '选择厂家', | 56 | label: '选择厂家', |
57 | + required: true, | ||
57 | colProps: { | 58 | colProps: { |
58 | span: 8, | 59 | span: 8, |
59 | }, | 60 | }, |
61 | + defaultValue: 'DIY_', | ||
60 | componentProps: { | 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 | ifShow: ({ values }) => isGateWay(values.deviceType), | 70 | ifShow: ({ values }) => isGateWay(values.deviceType), |
73 | }, | 71 | }, |
@@ -22,6 +22,15 @@ | @@ -22,6 +22,15 @@ | ||
22 | <TabPane key="4" tab="子设备" v-if="deviceDetail?.deviceType === 'GATEWAY'"> | 22 | <TabPane key="4" tab="子设备" v-if="deviceDetail?.deviceType === 'GATEWAY'"> |
23 | <ChildDevice :fromId="deviceDetail?.tbDeviceId" /> | 23 | <ChildDevice :fromId="deviceDetail?.tbDeviceId" /> |
24 | </TabPane> | 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 | </Tabs> | 34 | </Tabs> |
26 | </BasicDrawer> | 35 | </BasicDrawer> |
27 | </template> | 36 | </template> |
@@ -34,6 +43,7 @@ | @@ -34,6 +43,7 @@ | ||
34 | import RealTimeData from '../tabs/RealTimeData.vue'; | 43 | import RealTimeData from '../tabs/RealTimeData.vue'; |
35 | import Alarm from '../tabs/Alarm.vue'; | 44 | import Alarm from '../tabs/Alarm.vue'; |
36 | import ChildDevice from '../tabs/ChildDevice.vue'; | 45 | import ChildDevice from '../tabs/ChildDevice.vue'; |
46 | + import TBoxDetail from '../tabs/TBoxDetail.vue'; | ||
37 | import CommandIssuance from '../tabs/CommandIssuance.vue'; | 47 | import CommandIssuance from '../tabs/CommandIssuance.vue'; |
38 | import { getDeviceDetail } from '/@/api/device/deviceManager'; | 48 | import { getDeviceDetail } from '/@/api/device/deviceManager'; |
39 | export default defineComponent({ | 49 | export default defineComponent({ |
@@ -47,6 +57,7 @@ | @@ -47,6 +57,7 @@ | ||
47 | Alarm, | 57 | Alarm, |
48 | ChildDevice, | 58 | ChildDevice, |
49 | CommandIssuance, | 59 | CommandIssuance, |
60 | + TBoxDetail, | ||
50 | }, | 61 | }, |
51 | emits: ['reload', 'register'], | 62 | emits: ['reload', 'register'], |
52 | setup() { | 63 | setup() { |
@@ -53,12 +53,12 @@ | @@ -53,12 +53,12 @@ | ||
53 | <a-button type="primary" class="mr-4" @click="copyTbDeviceId">复制设备ID</a-button> | 53 | <a-button type="primary" class="mr-4" @click="copyTbDeviceId">复制设备ID</a-button> |
54 | <a-button type="primary" class="mr-4" @click="copyDeviceToken">复制访问令牌</a-button> | 54 | <a-button type="primary" class="mr-4" @click="copyDeviceToken">复制访问令牌</a-button> |
55 | <a-button type="primary" class="mr-4" @click="manageDeviceToken">管理设备凭证</a-button> | 55 | <a-button type="primary" class="mr-4" @click="manageDeviceToken">管理设备凭证</a-button> |
56 | - <a-button | 56 | + <!-- <a-button |
57 | type="primary" | 57 | type="primary" |
58 | v-if="deviceDetail.deviceType == 'GATEWAY'" | 58 | v-if="deviceDetail.deviceType == 'GATEWAY'" |
59 | @click="remoteConnectiondGateway" | 59 | @click="remoteConnectiondGateway" |
60 | >远程连接边缘网关</a-button | 60 | >远程连接边缘网关</a-button |
61 | - > | 61 | + > --> |
62 | <ManageDeviceTokenModal @register="registerModal" /> | 62 | <ManageDeviceTokenModal @register="registerModal" /> |
63 | </div> | 63 | </div> |
64 | <div v-if="deviceDetail?.deviceInfo?.address" class="mt-4"> | 64 | <div v-if="deviceDetail?.deviceInfo?.address" class="mt-4"> |