diff --git a/components.d.ts b/components.d.ts
index 2ef70390..705ade7d 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -32,8 +32,11 @@ declare module '@vue/runtime-core' {
ASpin: typeof import('ant-design-vue/es')['Spin']
ASwitch: typeof import('ant-design-vue/es')['Switch']
ATable: typeof import('ant-design-vue/es')['Table']
+ ATabPane: typeof import('ant-design-vue/es')['TabPane']
+ ATabs: typeof import('ant-design-vue/es')['Tabs']
ATimePicker: typeof import('ant-design-vue/es')['TimePicker']
ATooltip: typeof import('ant-design-vue/es')['Tooltip']
+ ATree: typeof import('ant-design-vue/es')['Tree']
ATreeSelect: typeof import('ant-design-vue/es')['TreeSelect']
AUpload: typeof import('ant-design-vue/es')['Upload']
BadgeStatus: typeof import('./src/components/BadgeStatus/index.vue')['default']
diff --git a/src/api/link/accessConfig.js b/src/api/link/accessConfig.js
new file mode 100644
index 00000000..0b972bb5
--- /dev/null
+++ b/src/api/link/accessConfig.js
@@ -0,0 +1,33 @@
+import server from '@/utils/request';
+
+export const getProviders = () => server.get(`/gateway/device/providers`);
+
+export const detail = (id) => server.get(`/gateway/device/${id}`);
+
+export const getNetworkList = (networkType, data, params) =>
+ server.get(
+ `/network/config/${networkType}/_alive?include=${params.include}`,
+ data,
+ );
+
+export const getProtocolList = (transport, params) =>
+ server.get(`/protocol/supports/${transport ? transport : ''}`, params);
+
+export const getConfigView = (id, transport) =>
+ server.get(`/protocol/${id}/transport/${transport}`);
+
+export const getChildConfigView = (id) =>
+ server.get(`/protocol/${id}/transports`);
+
+export const save = (data) => server.post(`/gateway/device`, data);
+
+export const update = (data) => server.patch(`/gateway/device`, data);
+
+export const list = (data) =>
+ server.post(`/gateway/device/detail/_query`, data);
+
+export const undeploy = (id) => server.post(`/gateway/device/${id}/_shutdown`);
+
+export const deploy = (id) => server.post(`/gateway/device/${id}/_startup`);
+
+export const del = (id) => server.remove(`/gateway/device/${id}`);
diff --git a/src/router/menu.ts b/src/router/menu.ts
index 525ac2e8..fd37bff5 100644
--- a/src/router/menu.ts
+++ b/src/router/menu.ts
@@ -59,6 +59,10 @@ export default [
path: '/link/certificate/detail/add',
component: () => import('@/views/link/Certificate/Detail/index.vue')
},
+ {
+ path: '/link/accessConfig',
+ component: () => import('@/views/link/AccessConfig/index.vue')
+ },
{
path: '/link/accessConfig/detail/add',
component: () => import('@/views/link/AccessConfig/Detail/index.vue')
diff --git a/src/views/account/Center/bind/index.vue b/src/views/account/Center/bind/index.vue
index 2344c4a0..a564e14a 100644
--- a/src/views/account/Center/bind/index.vue
+++ b/src/views/account/Center/bind/index.vue
@@ -4,7 +4,7 @@
第三方账户绑定
-
+
-
![]()
+
用户名:-
-
名称:微信昵称
+
名称:{{ accountInfo?.name || '-' }}
@@ -74,23 +81,25 @@
-
- 图形验证码
-
+
登录并绑定账户
@@ -105,34 +114,58 @@
\ No newline at end of file
diff --git a/src/views/link/AccessConfig/components/Network.vue b/src/views/link/AccessConfig/components/Network.vue
new file mode 100644
index 00000000..8bb9b232
--- /dev/null
+++ b/src/views/link/AccessConfig/components/Network.vue
@@ -0,0 +1,733 @@
+
+
+
+
+
+
+
+
+
+
+ 使用选择的消息协议,对网络组件通信数据进行编解码、认证等操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 接入方式
+
+
+ {{ provider.name }}
+
+
+ {{ provider.description }}
+
+
+
+
+ 消息协议
+
+
+ {{
+ procotolList.find(
+ (i) => i.id === procotolCurrent,
+ ).name
+ }}
+
+
+ {{ config.document }}
+
+
+
+
+
+ {{
+ data.provider ===
+ 'mqtt-server-gateway' ||
+ data.provider ===
+ 'mqtt-client-gateway'
+ ? 'topic'
+ : 'URL信息'
+ }}
+
+
+
+ 上行、下行
+ 上行
+ 下行
+
+
+
+
+
+
+
+
+
+
+
+ 下一步
+
+
+ 保存
+
+
+ 上一步
+
+
+
+
+
+
+
+
diff --git a/src/views/link/AccessConfig/components/Provider/index.vue b/src/views/link/AccessConfig/components/Provider/index.vue
new file mode 100644
index 00000000..d73dad78
--- /dev/null
+++ b/src/views/link/AccessConfig/components/Provider/index.vue
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+ {{ item.name }}
+
+
+
+ {{ item.description || '' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/link/AccessConfig/index.vue b/src/views/link/AccessConfig/index.vue
index 5ce2ef66..e1509f3b 100644
--- a/src/views/link/AccessConfig/index.vue
+++ b/src/views/link/AccessConfig/index.vue
@@ -1,11 +1,18 @@
- 新增
+ 新增
diff --git a/src/views/link/Certificate/Detail/CertificateFile.vue b/src/views/link/Certificate/Detail/CertificateFile.vue
index b6ffb26c..ae64c8f0 100644
--- a/src/views/link/Certificate/Detail/CertificateFile.vue
+++ b/src/views/link/Certificate/Detail/CertificateFile.vue
@@ -64,16 +64,14 @@ const handleChange = (info: UploadChangeParam) => {
message.success('上传成功!');
const result = info.file.response?.result;
keystoreBase64.value = result;
- console.log(1114, result);
loading.value = false;
emit('change', result);
emit('update:modelValue', result);
}
};
const textChange = (val: any) => {
- val.name = props.name;
- emit('change', val);
- // emit('update:modelValue', val);
+ emit('change', keystoreBase64.value);
+ emit('update:modelValue', keystoreBase64.value);
};
watch(
diff --git a/src/views/link/Certificate/Detail/index.vue b/src/views/link/Certificate/Detail/index.vue
index ec301a57..1cb904b1 100644
--- a/src/views/link/Certificate/Detail/index.vue
+++ b/src/views/link/Certificate/Detail/index.vue
@@ -10,10 +10,8 @@
:label-col="{ span: 8 }"
:wrapper-col="{ span: 16 }"
autocomplete="off"
- @finish="onFinish"
- :rules="formRules"
>
-
+
-
+
-
+
-
+
@@ -61,6 +63,8 @@
class="form-submit"
html-type="submit"
type="primary"
+ @click.prevent="onSubmit"
+ :loading="loading"
>保存
@@ -89,7 +93,7 @@
diff --git a/src/views/link/Certificate/index.vue b/src/views/link/Certificate/index.vue
index 757828d4..c289ab74 100644
--- a/src/views/link/Certificate/index.vue
+++ b/src/views/link/Certificate/index.vue
@@ -3,8 +3,11 @@
+
+
diff --git a/src/views/system/apiPage/components/ApiTest.vue b/src/views/system/apiPage/components/ApiTest.vue
new file mode 100644
index 00000000..b0bb47d0
--- /dev/null
+++ b/src/views/system/apiPage/components/ApiTest.vue
@@ -0,0 +1,42 @@
+
+
+
+
{{ selectApi.summary }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/system/apiPage/components/ChooseApi.vue b/src/views/system/apiPage/components/ChooseApi.vue
new file mode 100644
index 00000000..24362336
--- /dev/null
+++ b/src/views/system/apiPage/components/ChooseApi.vue
@@ -0,0 +1,65 @@
+
+
+
+
+ {{ slotProps.row.url }}
+
+
+
+
保存
+
+
+
+
+
+
diff --git a/src/views/system/apiPage/components/InputCard.vue b/src/views/system/apiPage/components/InputCard.vue
new file mode 100644
index 00000000..c1742737
--- /dev/null
+++ b/src/views/system/apiPage/components/InputCard.vue
@@ -0,0 +1,35 @@
+
+
+ {{ props.value?.toLocaleUpperCase() }}
+
+
+
+
+
+
diff --git a/src/views/system/apiPage/components/LeftTree.vue b/src/views/system/apiPage/components/LeftTree.vue
index acdd1f5a..cbae4bea 100644
--- a/src/views/system/apiPage/components/LeftTree.vue
+++ b/src/views/system/apiPage/components/LeftTree.vue
@@ -15,51 +15,62 @@
import { TreeProps } from 'ant-design-vue';
import { getTreeOne_api, getTreeTwo_api } from '@/api/system/apiPage';
+import { treeNodeTpye } from '../index';
-type treeNodeTpye = {
- name: string;
- url: string;
- children?: treeNodeTpye[];
-};
const emits = defineEmits(['select']);
-const treeData: TreeProps['treeData'] = ref([]);
+const treeData = ref([]);
const getTreeData = () => {
let tree: treeNodeTpye[] = [];
- getTreeOne_api().then((resp) => {
- tree = resp.urls.map((item) => ({
+ getTreeOne_api().then((resp: any) => {
+ tree = resp.urls.map((item: any) => ({
...item,
key: item.url,
}));
const allPromise = tree.map((item) => getTreeTwo_api(item.name));
Promise.all(allPromise).then((values) => {
- values.forEach((item, i) => {
- tree[i].children = combData(item.paths);
+ values.forEach((item: any, i) => {
+ tree[i].children = combData(item?.paths);
});
- console.log(tree);
- treeData.value = tree
+ treeData.value = tree;
});
});
};
-const clickSelectItem = (key, { node }) => {
- emits('select', node);
+const clickSelectItem: TreeProps['onSelect'] = (key, node: any) => {
+ emits('select', node.node.dataRef);
};
onMounted(() => {
getTreeData();
});
-const combData = (dataSource: object): object[] => {
- const apiList: object[] = [];
+const combData = (dataSource: object) => {
+ const apiList: treeNodeTpye[] = [];
const keys = Object.keys(dataSource);
keys.forEach((key) => {
const method = Object.keys(dataSource[key] || {})[0];
const name = dataSource[key][method].tags[0];
- let apiObj = apiList.find((item) => item.name === name);
- if (!apiObj) {
- apiObj = { name, link: key, methods: dataSource[key], key };
+ let apiObj: treeNodeTpye | undefined = apiList.find(
+ (item) => item.name === name,
+ );
+ if (apiObj) {
+ apiObj.apiList?.push({
+ url: key,
+ method: dataSource[key],
+ });
+ } else {
+ apiObj = {
+ name,
+ key: name,
+ apiList: [
+ {
+ url: key,
+ method: dataSource[key],
+ },
+ ],
+ };
apiList.push(apiObj);
}
});
@@ -68,4 +79,17 @@ const combData = (dataSource: object): object[] => {
};
-
+
diff --git a/src/views/system/apiPage/index.d.ts b/src/views/system/apiPage/index.d.ts
new file mode 100644
index 00000000..e206edd0
--- /dev/null
+++ b/src/views/system/apiPage/index.d.ts
@@ -0,0 +1,22 @@
+export type treeNodeTpye = {
+ name: string;
+ key: string;
+ link?: string;
+ apiList?: object[];
+ children?: treeNodeTpye[];
+};
+export type methodType = {
+ [key: string]: object
+}
+export type apiObjType = {
+ url: string,
+ method: methodType
+}
+
+export type apiDetailsType = {
+ url: string;
+ method: string;
+ summary: string;
+ parameters: [];
+ requestBody?: any;
+}
\ No newline at end of file
diff --git a/src/views/system/apiPage/index.vue b/src/views/system/apiPage/index.vue
index 92339a94..cb82abca 100644
--- a/src/views/system/apiPage/index.vue
+++ b/src/views/system/apiPage/index.vue
@@ -1,15 +1,78 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+