diff --git a/src/api_mangage/business.js b/src/api_mangage/business.js new file mode 100644 index 0000000..1d68d25 --- /dev/null +++ b/src/api_mangage/business.js @@ -0,0 +1,52 @@ +import request from "@/utils/request.js"; + + +/** + * @description 获取合作商列表 + * @param {*} (pageNum,pageSize) + * @returns data + */ +export function businessListApi(pageNum, pageSize) { + return request({ + url: `/serviceInfo/page?pageNum=${pageNum}&pageSize=${pageSize}`, + method: 'get' + }) +} + +/** + * @description 通过id获取合作商 + * @param {*} id + * @returns data + */ +export function getBusinessByIdApi(id) { + return request({ + url: `/serviceInfo/get?id=${id}`, + method: 'get' + }) +} + +/** + * @description 新增合作商 + * @param {*} data + * @returns data + */ +export function addBusinessApi(data) { + return request({ + url: `/serviceInfo/save`, + method: 'post', + data + }) +} + +/** + * @description 修改合作商 + * @param {*} data + * @returns data + */ +export function updateBusinessApi(data) { + return request({ + url: `/serviceInfo/update`, + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/lang/package/en.ts b/src/lang/package/en.ts index 8beff8f..8425100 100644 --- a/src/lang/package/en.ts +++ b/src/lang/package/en.ts @@ -222,6 +222,19 @@ export default { businessMangage: { title: "Business", + name: "Owner", + address: "Address", + status: "Status", + code: "Code", + addNew: "Add new business", + createTime: "CreateTime", + cancel: "Cancel", + confirm: "Confirm", + nameInputText: "Please type owner", + addressInputText: "Please type address", + codeInputText: "Please type code and make sure it's only", + accessMethod: "Access Method", + typeInputText: "Please select your access method", }, keyMangage: { diff --git a/src/lang/package/zh-cn.ts b/src/lang/package/zh-cn.ts index cd6d088..f0b940e 100644 --- a/src/lang/package/zh-cn.ts +++ b/src/lang/package/zh-cn.ts @@ -221,6 +221,19 @@ export default { businessMangage: { title: "商务管理", + name: "所属人", + address: "地址", + status: "状态", + code: "凭证", + addNew: "新增合作商", + createTime: "创建时间", + cancel: "取消", + confirm: "确认", + nameInputText: "请输入所属人名称", + addressInputText: "请输入地址", + codeInputText: "请输入凭证并确保此字段是唯一值", + accessMethod: "接入方式", + typeInputText: "请选择接入方式", }, keyMangage: { diff --git a/src/layout/index.vue b/src/layout/index.vue index f13ca26..39f5967 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -40,7 +40,7 @@ -
+
{{ $t("businessMangage.title") }} @@ -287,9 +287,11 @@ const showChildrenRouter = ref(""); } .childrenRouter { cursor: pointer; + transition: all 0.3s; } .childrenRouter:hover { - background-color: #304156; + color: #ffffff; + background-color: #000000; } &:hover { // background: rgba(255, 255, 255, 0.2); diff --git a/src/router/index.ts b/src/router/index.ts index 92ee18c..3693ba4 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -45,7 +45,7 @@ export const constantRoutes: RouteRecordRaw[] = [ children: [ { path: "keyList", - component: () => import("@/views/mangage/keyList.vue"), + component: () => import("@/views/keys/keyList.vue"), name: "keyList", meta: { title: "keyList", @@ -63,7 +63,7 @@ export const constantRoutes: RouteRecordRaw[] = [ children: [ { path: "keyCheck", - component: () => import("@/views/mangage/keyCheck.vue"), + component: () => import("@/views/keys/keyCheck.vue"), name: "keyCheck", meta: { title: "keyCheck", @@ -74,6 +74,42 @@ export const constantRoutes: RouteRecordRaw[] = [ }, ], }, + { + path: "/", + component: Layout, + redirect: "/businessList", + children: [ + { + path: "businessList", + component: () => import("@/views/business/businessList.vue"), + name: "businessList", + meta: { + title: "businessList", + icon: "homepage", + affix: true, + name: "keyMangage.list", + }, + }, + ], + }, + { + path: "/", + component: Layout, + redirect: "/businessCheck", + children: [ + { + path: "businessCheck", + component: () => import("@/views/business/businessCheck.vue"), + name: "businessCheck", + meta: { + title: "businessCheck", + icon: "homepage", + affix: true, + name: "keyMangage.title", + }, + }, + ], + }, // 系统设置路由 { path: "/", diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 9ea2d5d..e5c7bdb 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -2,6 +2,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElForm: typeof import('element-plus/es')['ElForm'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] @@ -270,6 +271,7 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { readonly EffectScope: UnwrapRef + readonly ElForm: UnwrapRef readonly ElMessage: UnwrapRef readonly ElMessageBox: UnwrapRef readonly asyncComputed: UnwrapRef diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 70f8d65..a5771ae 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -14,26 +14,37 @@ declare module '@vue/runtime-core' { EditPosition: typeof import('./../components/EditPosition.vue')['default'] 'EditPosition copy': typeof import('./../components/EditPosition copy.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] + ElCard: typeof import('element-plus/es')['ElCard'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] + ElForm: typeof import('element-plus/es')['ElForm'] + ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElRadio: typeof import('element-plus/es')['ElRadio'] + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElUpload: typeof import('element-plus/es')['ElUpload'] GithubCorner: typeof import('./../components/GithubCorner/index.vue')['default'] Hamburger: typeof import('./../components/Hamburger/index.vue')['default'] IconSelect: typeof import('./../components/IconSelect/index.vue')['default'] + IEpCollection: typeof import('~icons/ep/collection')['default'] + IEpDelete: typeof import('~icons/ep/delete')['default'] IEpDocumentAdd: typeof import('~icons/ep/document-add')['default'] IEpEdit: typeof import('~icons/ep/edit')['default'] + IEpPlus: typeof import('~icons/ep/plus')['default'] + IEpRefresh: typeof import('~icons/ep/refresh')['default'] + IEpSearch: typeof import('~icons/ep/search')['default'] LangSelect: typeof import('./../components/LangSelect/index.vue')['default'] MultiUpload: typeof import('./../components/Upload/MultiUpload.vue')['default'] MyLoading: typeof import('./../components/myLoading.vue')['default'] @@ -49,5 +60,6 @@ declare module '@vue/runtime-core' { } export interface ComponentCustomProperties { vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] } } diff --git a/src/views/mangage/keyCheck.vue b/src/views/business/businessCheck.vue similarity index 100% rename from src/views/mangage/keyCheck.vue rename to src/views/business/businessCheck.vue diff --git a/src/views/business/businessList.vue b/src/views/business/businessList.vue new file mode 100644 index 0000000..7841f41 --- /dev/null +++ b/src/views/business/businessList.vue @@ -0,0 +1,351 @@ + + + + + + diff --git a/src/views/keys/keyCheck.vue b/src/views/keys/keyCheck.vue new file mode 100644 index 0000000..f4479b2 --- /dev/null +++ b/src/views/keys/keyCheck.vue @@ -0,0 +1,301 @@ + + + + + + diff --git a/src/views/mangage/keyList.vue b/src/views/keys/keyList.vue similarity index 98% rename from src/views/mangage/keyList.vue rename to src/views/keys/keyList.vue index a78ba77..d00a8e9 100644 --- a/src/views/mangage/keyList.vue +++ b/src/views/keys/keyList.vue @@ -112,6 +112,7 @@ const getKeyListFunc = async (PageNum, PageSize) => { const res = await keyListApi(PageNum, PageSize); console.log(res, "res"); tableData.value = res.data.list; + total.value = res.data.total * 1; } catch (error) { console.log(error, "err"); }