diff --git a/src/api/device-type-ver/index.ts b/src/api/device-type-ver/index.ts index 9f90f1b..e5d3aa1 100644 --- a/src/api/device-type-ver/index.ts +++ b/src/api/device-type-ver/index.ts @@ -1,4 +1,5 @@ import { + BindingTr069Form, DeviceTypeToVerPageResult, DeviceTypeToVerQuery, DeviceTypeVerForm, DevVerServicePageResult, @@ -142,3 +143,10 @@ export function addTypeVer(devTypeId: number, data: DeviceTypeVerForm) { data, }); } +export function tr069BindingDevType(data: BindingTr069Form) { + return request({ + url: `/api/device-type-ver/v1/tr069-binding-dev-type`, + method: "POST", + data, + }); +} diff --git a/src/api/device-type-ver/types.ts b/src/api/device-type-ver/types.ts index 765a027..83cfb15 100644 --- a/src/api/device-type-ver/types.ts +++ b/src/api/device-type-ver/types.ts @@ -41,3 +41,9 @@ export interface DeviceServiceVO { servDesc?: string; } export type DevVerServicePageResult = PageResult; + +export interface BindingTr069Form { + ids?: number[]; + + tr069VerId?: number; +} diff --git a/src/api/domain/types.ts b/src/api/domain/types.ts index a320122..8f80361 100644 --- a/src/api/domain/types.ts +++ b/src/api/domain/types.ts @@ -29,6 +29,6 @@ export interface DomainForm { } export interface DomainOption { - key: ?number; + key?: number; label?: string; } diff --git a/src/components/IconSelect/index.vue b/src/components/IconSelect/index.vue index 2c52504..afc5f3c 100644 --- a/src/components/IconSelect/index.vue +++ b/src/components/IconSelect/index.vue @@ -170,7 +170,7 @@ type IconNames = keyof typeof ElementPlusIconsVue; const renderIcon = (iconName: string) => { const iconComponent = ElementPlusIconsVue[iconName as IconNames]; if (iconComponent) { - return h(resolveComponent(iconComponent.name)); + return h(resolveComponent(iconComponent.name)); } return null; }; diff --git a/src/components/Table/TableBar.vue b/src/components/Table/TableBar.vue index 5980dfc..c049370 100644 --- a/src/components/Table/TableBar.vue +++ b/src/components/Table/TableBar.vue @@ -96,7 +96,7 @@ function showPopover() { } // 选择列 -function changeColumn(show: boolean, index: number) { +function changeColumn(show: any, index: number) { let columns = props.columns; columns.map((item, i) => { if (index === i) { diff --git a/src/views/resources/tr069/components/BindingDevType.vue b/src/views/resources/tr069/components/BindingDevType.vue index bec3177..ca655b2 100644 --- a/src/views/resources/tr069/components/BindingDevType.vue +++ b/src/views/resources/tr069/components/BindingDevType.vue @@ -57,6 +57,19 @@ +
([]); const searchForm = ref({ devTypeName: "", @@ -116,6 +131,8 @@ const searchForm = ref({ pageNum: 1, pageSize: 10, }); +const route = useRoute(); +let tr069VerId: number = parseInt(route.params.tr069VerId); const vendorNameOption = ref([]); const typeNameOption = ref([]); const hardVerOption = ref([]); @@ -158,6 +175,34 @@ const redirect = (devTypeId: number) => { path: `/resources/device_type_to_ver/${devTypeId}`, }); }; +const binding = () => { + let ids: number[] = []; + multiples.value.forEach((obj) => { + ids.push(obj.devTypeId); + }); + let form: BindingTr069Form = { + ids, + tr069VerId, + }; + loading.value = true; + tr069BindingDevType(form) + .then(() => { + ElMessage({ + message: "操作成功", + type: "success", + plain: true, + duration: 1000, + onClose: () => { + router.push({ + path: `/resources/tr069-dev-type-soft-ver/${tr069VerId}`, + }); + }, + }); + }) + .finally(() => { + loading.value = false; + }); +}; onMounted(() => { loadVendorNameOption(); loadTypeNameOption(); diff --git a/src/views/resources/tr069/components/Tr069DevTypeSoftVerList.vue b/src/views/resources/tr069/components/Tr069DevTypeSoftVerList.vue index f1ac611..652eda9 100644 --- a/src/views/resources/tr069/components/Tr069DevTypeSoftVerList.vue +++ b/src/views/resources/tr069/components/Tr069DevTypeSoftVerList.vue @@ -9,6 +9,10 @@ 新增 + + + 刷新 +
diff --git a/src/views/table/index.vue b/src/views/table/index.vue deleted file mode 100644 index feb396e..0000000 --- a/src/views/table/index.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - -