diff --git a/.env.development b/.env.development index 3db7fa8..285170f 100644 --- a/.env.development +++ b/.env.development @@ -7,5 +7,6 @@ NODE_ENV = 'development' # 本地环境接口地址 # 如果没有跨域问题,直接在这里配置即可 -VITE_APP_BASE_API = 'http://192.168.1.116:8080' +# VITE_APP_BASE_API = 'http://192.168.1.116:8080' +VITE_APP_BASE_API = 'http://121.41.36.72:8080' # VITE_APP_BASE_API = 'https://3lp9319797lh.vicp.fun' diff --git a/src/api/ApiManage/index.ts b/src/api/ApiManage/index.ts index de4f417..15c1c65 100644 --- a/src/api/ApiManage/index.ts +++ b/src/api/ApiManage/index.ts @@ -1,5 +1,5 @@ -import { PageRowsResult, PageRowsType } from '@/types'; -import { ApiManageType, StatisticsType } from '@/types/help'; +import { PageRowsResult } from '@/types'; +import { ApiManagePageType, ApiManageType, StatisticsType } from '@/types/help'; import http from '@/utils/request'; // api接口 @@ -9,6 +9,7 @@ const api = { apiPage: '/cargo/api/page', // 分页列表 apiSave: '/cargo/api/save', // 保存 statistics: '/cargo/statistics/', // 首页数据统计 + adImage: '/cargo/adver/image', // 广告图 }; /** @@ -31,10 +32,10 @@ export function postApiGetAPI(data: { id: number | string }) { /** * 分页列表 - * @param {PageRowsType} data 查询条件 + * @param {ApiManagePageType} data 查询条件 * @return 返回请求分页列表接口的结果 */ -export function postApiPageAPI(data: Partial) { +export function postApiPageAPI(data: Partial) { return http.post>(api.apiPage, data); } @@ -54,3 +55,11 @@ export function postApiSaveAPI(data: Partial) { export function getStatisticsAPI() { return http.get(api.statistics); } + +/** + * 广告图 + * @return 返回接口的结果 + */ +export function getAdImageAPI() { + return http.get(api.adImage); +} diff --git a/src/api/Boat/info.ts b/src/api/Boat/info.ts index fd7e8d0..65140de 100644 --- a/src/api/Boat/info.ts +++ b/src/api/Boat/info.ts @@ -1,5 +1,5 @@ import { PageRowsResult } from '@/types'; -import { BoatInfoPageType, BoatInfoType } from '@/types/boatInfo'; +import { BoatInfoPageType, BoatInfoType, vinSearchType } from '@/types/boatInfo'; import http from '@/utils/request'; // api接口 @@ -10,7 +10,10 @@ const api = { sailScheduleSave: '/cargo/sail_schedule/save', // 保存 sailScheduleTmpExport: '/cargo/sail_schedule/tmp/export', // 船期模板下载 sailScheduleImport: '/cargo/sail_schedule/import', // 导入 - historyList: '/cargo/sail_schedule/history/page', // 历史数据 + sailScheduleExport: '/cargo/sail_schedule/export', // 船期导出 + publishHistoryList: '/cargo/sail_schedule/history/publish/page', // 我发布的历史数据 + receiveHistoryList: '/cargo/sail_schedule/history/receive/page', // 我接受的历史数据 + vinSearch: '/cargo/sail_schedule/vin/query', // 车架号查询 }; /** @@ -73,10 +76,39 @@ export function getSailScheduleImportAPI(data: { file: File }) { } /** - * 历史数据 + * 船期导出 * @param {BoatInfoPageType} data 分页信息 * @return 返回请求分页列表接口的结果 */ -export function getHistoryListAPI(data: Partial) { - return http.post>(api.historyList, data); +export function getSailScheduleExportAPI(data: Partial) { + return http.get(api.sailScheduleExport, data, { + responseType: 'arraybuffer', + }); +} + +/** + * 我发布的历史数据 + * @param {BoatInfoPageType} data 分页信息 + * @return 返回请求分页列表接口的结果 + */ +export function getPublishHistoryListAPI(data: Partial) { + return http.post>(api.publishHistoryList, data); +} + +/** + * 我接受的历史数据 + * @param {BoatInfoPageType} data 分页信息 + * @return 返回请求分页列表接口的结果 + */ +export function getReceiveHistoryListAPI(data: Partial) { + return http.post>(api.receiveHistoryList, data); +} + +/** + * 车架号查询 + * @param {BoatInfoPageType} data 分页信息 + * @return 返回请求分页列表接口的结果 + */ +export function getVinSearchAPI(data: { vin: string }) { + return http.get(api.vinSearch, data); } diff --git a/src/api/Enterprise/employee.ts b/src/api/Enterprise/employee.ts index e5ba1e5..edcb533 100644 --- a/src/api/Enterprise/employee.ts +++ b/src/api/Enterprise/employee.ts @@ -10,7 +10,8 @@ const api = { employeeGet: '/cargo/employee/get', // 获取 employeeList: '/cargo/employee/list', // 字典列表 employeePage: '/cargo/employee/page', // 分页列表 - employeeSave: '/cargo/enterprise/employee/add', // 保存 + employeeAdd: '/cargo/enterprise/employee/add', // 保存 + employeeSave: '/cargo/employee/save', // 编辑 }; /** @@ -72,6 +73,15 @@ export function postEmployeeListAPI(data: dictionaryType) { * @param {EmployeeType} data 员工信息 * @return 返回请求保存接口的结果 */ +export function postEmployeeAddAPI(data: Partial) { + return http.post(api.employeeAdd, data); +} + +/** + * 编辑 + * @param {EmployeeType} data 员工信息 + * @return 返回请求保存接口的结果 + */ export function postEmployeeSaveAPI(data: Partial) { return http.post(api.employeeSave, data); } diff --git a/src/api/Help/index.ts b/src/api/Help/index.ts index 8bce31f..fd1bd28 100644 --- a/src/api/Help/index.ts +++ b/src/api/Help/index.ts @@ -1,5 +1,5 @@ import { PageRowsResult, PageRowsType } from '@/types'; -import { HelpType } from '@/types/help'; +import { agreeTextType, HelpType } from '@/types/help'; import http from '@/utils/request'; // api接口 @@ -8,6 +8,10 @@ const api = { helpGet: '/cargo/help/get', // 获取 helpPage: '/cargo/help/page', // 分页列表 helpSave: '/cargo/help/save', // 保存 + textAgree: '/cargo/text/agree', // 同意协议 + textGet: '/cargo/text/get', // 获取协议 + textSave: '/cargo/text/save', // 保存 + textIsAgree: '/cargo/text/sign', // 是否同意 }; /** @@ -45,3 +49,36 @@ export function postHelpPageAPI(data: Partial) { export function postHelpSaveAPI(data: Partial) { return http.post(api.helpSave, data); } + +/** + * 同意协议 + * @return 返回请求保存接口的结果 + */ +export function postTextAgreeAPI() { + return http.post(api.textAgree); +} + +/** + * 获取协议 + * @return 返回请求保存接口的结果 + */ +export function postTextGetAPI(data: { textType: string }) { + return http.get(api.textGet, data); +} + +/** + * 保存协议 + * @param {HelpType} data 参数 + * @return 返回请求保存接口的结果 + */ +export function postTextSaveAPI(data: Partial) { + return http.post(api.textSave, data); +} + +/** + * 是否同意 + * @return 返回请求保存接口的结果 + */ +export function postTextIsAgreeAPI() { + return http.post(api.textIsAgree); +} diff --git a/src/api/Manifest/index.ts b/src/api/Manifest/index.ts index 1587920..ee64149 100644 --- a/src/api/Manifest/index.ts +++ b/src/api/Manifest/index.ts @@ -10,6 +10,7 @@ const api = { manifestSave: '/cargo/manifest/save', // 保存 manifestImport: '/cargo/manifest/import', // 舱单导入 manifestExport: '/cargo/manifest/tmp/export', // 下载模版 + manifestFileExport: '/cargo/manifest/export', // 舱单导出 }; /** @@ -70,3 +71,13 @@ export function getManifestTmpExportAPI() { } ); } + +/** + * 舱单导出 + * @return 返回请求下载接口的结果 + */ +export function getManifestFileExportAPI(data: Partial) { + return http.get(api.manifestFileExport, data, { + responseType: 'arraybuffer', + }); +} diff --git a/src/api/System/menu.ts b/src/api/System/menu.ts index 385dcfa..4ca1a38 100644 --- a/src/api/System/menu.ts +++ b/src/api/System/menu.ts @@ -21,5 +21,5 @@ export function getAppListAPI() { * @return 返回请求获取系统操作权限树接口的结果 */ export function getMenuTreeAPI(data: menuParamsType) { - return http.post(api.menuTree, data); + return http.postParams(api.menuTree, data); } diff --git a/src/api/System/role.ts b/src/api/System/role.ts index acf2ed4..bb9ce10 100644 --- a/src/api/System/role.ts +++ b/src/api/System/role.ts @@ -1,29 +1,14 @@ -import { dictionaryListType, dictionaryType, PageRowsResult } from '@/types'; -import { getRoleListType, rolePremType, roleType } from '@/types/role'; +import { rolePremType } from '@/types/role'; import http from '@/utils/request'; // api接口 const api = { - roleSave: '/admin/role/save', // 角色保存 - rolePremSave: '/admin/role/perm/save', // 添加角色操作权限 - rolePage: '/admin/role/page', // 角色分页列表 - roleList: '/admin/role/list', // 角色字典列表 - roleGet: '/admin/role/get', // 角色详情 - roleDelete: '/admin/role/delete', // 角色删除 - roleMenuList: '/admin/role/perm/list', // 角色菜单列表 + rolePremSave: '/admin/user/perm/save', // 添加角色操作权限 + roleMenuList: '/admin/user/perm/list', // 用户菜单列表 }; /** - * 角色保存 - * @param {roleType} data 角色信息 - * @return 返回请求角色保存接口的结果 - */ -export function postRoleSaveAPI(data: roleType) { - return http.post(api.roleSave, data); -} - -/** - * 角色操作权限 + * 用户添加操作权限 * @param {rolePremType} data 角色权限 * @return 返回请求角色操作权限接口的结果 */ @@ -32,46 +17,10 @@ export function postRolePremSaveAPI(data: rolePremType) { } /** - * 角色分页列表 - * @param {getUserListType} data 分页信息 - * @return 返回请求角色分页列表接口的结果 - */ -export function postRolePageAPI(data: Partial) { - return http.post>(api.rolePage, data); -} - -/** - * 角色字典列表 - * @param {dictionaryType} data 字典信息 - * @return 返回请求角色字典列表接口的结果 - */ -export function getRoleListAPI(data: dictionaryType) { - return http.postParams(api.roleList, data); -} - -/** - * 角色详情 - * @param {string|number} data 角色id - * @return 返回请求角色详情接口的结果 - */ -export function getRoleGetAPI(data: { id: number | string }) { - return http.postParams(api.roleGet, data); -} - -/** - * 角色删除 - * @param {number} data 角色id - * @return 返回请求角色删除接口的结果 - */ -export function getRoleDeleteAPI(data: number[]) { - return http.post(api.roleDelete, data); -} - -/** - * 角色菜单列表 + * 用户操作权限菜单列表 * @param {string|number} data 角色id * @return 返回请求角色菜单列表接口的结果 */ -export function getRoleMenuListAPI(data: { roleId: number | string }) { +export function getUserRoleMenuListAPI(data: { userId: number | string }) { return http.postParams(api.roleMenuList, data); } diff --git a/src/api/System/user.ts b/src/api/System/user.ts index 076125a..987dac8 100644 --- a/src/api/System/user.ts +++ b/src/api/System/user.ts @@ -1,26 +1,11 @@ -import { dictionaryListType, dictionaryType, PageRowsResult } from '@/types'; -import { roleType } from '@/types/role'; -import { - getUserListType, - loginDataType, - userInfoRepType, - userPasswordType, - userRoleType, - userType, -} from '@/types/user'; +import { loginDataType, userInfoRepType, userPasswordType, userType } from '@/types/user'; import http from '@/utils/request'; // api接口 const api = { login: '/admin/user/login', // 用户登录接口 - userSave: '/admin/user/save', // 用户保存 userPassword: '/admin/user/password', // 用户修改密码 - userPage: '/admin/user/page', // 用户分页列表 - userList: '/admin/user/list', // 用户字典列表 userGet: '/admin/user/get', // 用户详情 - userDelete: '/admin/user/delete', // 用户删除 - userRole: '/admin/user/role/add', // 用户添加角色 - userRoleList: '/admin/user/role/list', // 用户角色列表 }; /** @@ -36,15 +21,6 @@ export function postLoginAPI(data: loginDataType) { }); } -/** - * 用户保存 - * @param {userType} data 用户信息 - * @return 返回请求保存接口的结果 - */ -export function postUserSaveAPI(data: userType) { - return http.post(api.userSave, data); -} - /** * 用户修改密码 * @param {userPasswordType} data 用户修改密码信息 @@ -54,24 +30,6 @@ export function postUserPasswordAPI(data: userPasswordType) { return http.post(api.userPassword, data); } -/** - * 用户分页列表 - * @param {getUserListType} data 分页信息 - * @return 返回请求分页列表接口的结果 - */ -export function postUserPageAPI(data: Partial) { - return http.post>(api.userPage, data); -} - -/** - * 用户字典列表 - * @param {dictionaryType} data 字典信息 - * @return 返回请求用户字典列表接口的结果 - */ -export function getUserListAPI(data: dictionaryType) { - return http.postParams(api.userList, data); -} - /** * 用户详情 * @param {string|number} data 用户id @@ -80,30 +38,3 @@ export function getUserListAPI(data: dictionaryType) { export function getUserGetAPI(data: { id: number | string }) { return http.postParams(api.userGet, data); } - -/** - * 用户删除 - * @param {number} data 用户id - * @return 返回请求用户删除接口的结果 - */ -export function getUserDeleteAPI(data: number[]) { - return http.post(api.userDelete, data); -} - -/** - * 用户添加角色 - * @param {userRoleType} data 用户角色 - * @return 返回请求用户添加角色接口的结果 - */ -export function postUserRoleAPI(data: userRoleType) { - return http.post(api.userRole, data); -} - -/** - * 用户角色列表 - * @param {string|number} data 用户id - * @return 返回请求用户角色列表接口的结果 - */ -export function getUserRoleListAPI(data: { userId: number | string }) { - return http.postParams(api.userRoleList, data); -} diff --git a/src/api/Wharf/index.ts b/src/api/Wharf/index.ts index 3f2f847..44b2e41 100644 --- a/src/api/Wharf/index.ts +++ b/src/api/Wharf/index.ts @@ -1,5 +1,5 @@ import { dictionaryListType, dictionaryType, PageRowsResult } from '@/types'; -import { LoadWharfPageType, LoadWharfType } from '@/types/boatInfo'; +import { LoadInfoType, LoadWharfPageType, LoadWharfType } from '@/types/boatInfo'; import http from '@/utils/request'; // api接口 @@ -9,6 +9,8 @@ const api = { wharfList: '/cargo/wharf/list', // 字典列表 wharfPage: '/cargo/wharf/page', // 分页列表 wharfSave: '/cargo/wharf/save', // 保存 + wharfInfo: '/cargo/wharf/get/info', // 获取绑定的码头信息 + wharfPhoto: '/cargo/wharf/image/', // 获取绑定的码头图片 }; /** @@ -55,3 +57,25 @@ export function postWharfPageAPI(data: Partial) { export function postWharfSaveAPI(data: Partial) { return http.post(api.wharfSave, data); } + +/** + * 获取绑定的码头信息 + * @return 返回请求保存接口的结果 + */ +export function postWharfInfoAPI() { + return http.get(api.wharfInfo); +} + +/** + * 获取绑定的码头图片 + * @return 返回请求保存接口的结果 + */ +export function getWharfPhotoAPI(id: string | number) { + return http.get( + `${api.wharfPhoto}/${id}`, + {}, + { + responseType: 'arraybuffer', + } + ); +} diff --git a/src/assets/icons/BoatInfo.svg b/src/assets/icons/BoatInfo.svg index c61e020..868fcc7 100644 --- a/src/assets/icons/BoatInfo.svg +++ b/src/assets/icons/BoatInfo.svg @@ -1,6 +1,6 @@ - - - - - - \ No newline at end of file + + + + + + diff --git a/src/assets/icons/History.svg b/src/assets/icons/History.svg index 59e6fb1..d41e643 100644 --- a/src/assets/icons/History.svg +++ b/src/assets/icons/History.svg @@ -1,6 +1,6 @@ - - - - - - \ No newline at end of file + + + + + + diff --git a/src/assets/icons/ManifestInfo.svg b/src/assets/icons/ManifestInfo.svg index 673bd61..67e4d5f 100644 --- a/src/assets/icons/ManifestInfo.svg +++ b/src/assets/icons/ManifestInfo.svg @@ -1,6 +1,6 @@ - - - - - - \ No newline at end of file + + + + + + diff --git a/src/assets/icons/SendInfo.svg b/src/assets/icons/SendInfo.svg index b9e0af0..126b845 100644 --- a/src/assets/icons/SendInfo.svg +++ b/src/assets/icons/SendInfo.svg @@ -1,6 +1,6 @@ - - - - - - \ No newline at end of file + + + + + + diff --git a/src/assets/icons/SubscribeInfo.svg b/src/assets/icons/SubscribeInfo.svg index f359e27..0b5d4ad 100644 --- a/src/assets/icons/SubscribeInfo.svg +++ b/src/assets/icons/SubscribeInfo.svg @@ -1,6 +1,6 @@ - - - - - - \ No newline at end of file + + + + + + diff --git a/src/assets/images/login-pc.png b/src/assets/images/login-pc.png new file mode 100644 index 0000000..9a20132 Binary files /dev/null and b/src/assets/images/login-pc.png differ diff --git a/src/assets/images/login.png b/src/assets/images/login.png new file mode 100644 index 0000000..c2d27da Binary files /dev/null and b/src/assets/images/login.png differ diff --git a/src/components/Pagination/Pagination.vue b/src/components/Pagination/Pagination.vue index 779ea7c..71906a0 100644 --- a/src/components/Pagination/Pagination.vue +++ b/src/components/Pagination/Pagination.vue @@ -31,4 +31,9 @@ interface PaginationProps { defineProps(); - + diff --git a/src/layouts/Header/index.vue b/src/layouts/Header/index.vue index add17a1..ee120b3 100644 --- a/src/layouts/Header/index.vue +++ b/src/layouts/Header/index.vue @@ -1,10 +1,10 @@