diff --git a/.env.development b/.env.development index 6a0f7ea..d5b5d4c 100644 --- a/.env.development +++ b/.env.development @@ -32,4 +32,4 @@ VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e' VITE_APP_WEBSOCKET = false # sse 开关 -VITE_APP_SSE = true +VITE_APP_SSE = false diff --git a/package.json b/package.json index 8df7bf2..1b4a63a 100644 --- a/package.json +++ b/package.json @@ -66,10 +66,10 @@ "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", "eslint-define-config": "2.1.0", + "eslint-plugin-import": "2.29.1", + "eslint-plugin-node": "11.1.0", "eslint-plugin-prettier": "5.1.3", "eslint-plugin-promise": "6.1.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-import": "2.29.1", "eslint-plugin-vue": "9.23.0", "fast-glob": "3.3.2", "postcss": "8.4.36", @@ -84,6 +84,7 @@ "vite": "5.2.12", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1", + "vite-plugin-vue-devtools": "^7.6.7", "vitest": "1.5.0", "vue-eslint-parser": "9.4.2", "vue-tsc": "2.0.13" diff --git a/src/api/manage/article/index.ts b/src/api/manage/article/index.ts new file mode 100644 index 0000000..7b71811 --- /dev/null +++ b/src/api/manage/article/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ArticleVO, ArticleForm, ArticleQuery } from '@/api/system/article/types'; + +/** + * 查询景点、租赁管理列表 + * @param query + * @returns {*} + */ + +export const listArticle = (query?: ArticleQuery): AxiosPromise => { + return request({ + url: '/system/article/list', + method: 'get', + params: query + }); +}; + +/** + * 查询景点、租赁管理详细 + * @param id + */ +export const getArticle = (id: string | number): AxiosPromise => { + return request({ + url: '/system/article/' + id, + method: 'get' + }); +}; + +/** + * 新增景点、租赁管理 + * @param data + */ +export const addArticle = (data: ArticleForm) => { + return request({ + url: '/system/article', + method: 'post', + data: data + }); +}; + +/** + * 修改景点、租赁管理 + * @param data + */ +export const updateArticle = (data: ArticleForm) => { + return request({ + url: '/system/article', + method: 'put', + data: data + }); +}; + +/** + * 删除景点、租赁管理 + * @param id + */ +export const delArticle = (id: string | number | Array) => { + return request({ + url: '/system/article/' + id, + method: 'delete' + }); +}; diff --git a/src/api/manage/article/types.ts b/src/api/manage/article/types.ts new file mode 100644 index 0000000..e0e632e --- /dev/null +++ b/src/api/manage/article/types.ts @@ -0,0 +1,276 @@ +export interface ArticleVO { + /** + * 景点ID/租赁ID/游艇ID + */ + id: string | number; + + /** + * 类别 景点-0、租赁-1 游艇-2 + */ + type: string; + + /** + * 二级类别(未定) + */ + secondType: string; + + /** + * 开放/营业 + */ + isOpen: string; + + /** + * 景点属性/商家属性 + */ + attribute: string; + + /** + * 状态 0-未发布 1-审核中 2-发布 + */ + status: string; + + /** + * 省code + */ + province: string; + + /** + * 市/区 + */ + city: string; + + /** + * 个人简介 + */ + remark: string; + + /** + * 会员等级 + */ + memberLevel: number; + + /** + * 标签 + */ + tagId: string | number; + + /** + * 推荐语 + */ + recommend: string; + + /** + * 介绍 + */ + intro: string; + + /** + * 详细地址 + */ + address: string; + + /** + * 经度 + */ + longitude: number; + + /** + * 纬度 + */ + latitude: number; + + /** + * 排序 + */ + orderNum: number; + + /** + * 景区等级 + */ + level: number; + +} + +export interface ArticleForm extends BaseEntity { + /** + * 景点ID/租赁ID/游艇ID + */ + id?: string | number; + + /** + * 类别 景点-0、租赁-1 游艇-2 + */ + type?: string; + + /** + * 二级类别(未定) + */ + secondType?: string; + + /** + * 开放/营业 + */ + isOpen?: string; + + /** + * 景点属性/商家属性 + */ + attribute?: string; + + /** + * 状态 0-未发布 1-审核中 2-发布 + */ + status?: string; + + /** + * 省code + */ + province?: string; + + /** + * 市/区 + */ + city?: string; + + /** + * 个人简介 + */ + remark?: string; + + /** + * 会员等级 + */ + memberLevel?: number; + + /** + * 标签 + */ + tagId?: string | number; + + /** + * 推荐语 + */ + recommend?: string; + + /** + * 介绍 + */ + intro?: string; + + /** + * 详细地址 + */ + address?: string; + + /** + * 经度 + */ + longitude?: number; + + /** + * 纬度 + */ + latitude?: number; + + /** + * 排序 + */ + orderNum?: number; + + /** + * 景区等级 + */ + level?: number; + +} + +export interface ArticleQuery extends PageQuery { + + /** + * 类别 景点-0、租赁-1 游艇-2 + */ + type?: string; + + /** + * 二级类别(未定) + */ + secondType?: string; + + /** + * 开放/营业 + */ + isOpen?: string; + + /** + * 景点属性/商家属性 + */ + attribute?: string; + + /** + * 状态 0-未发布 1-审核中 2-发布 + */ + status?: string; + + /** + * 省code + */ + province?: string; + + /** + * 市/区 + */ + city?: string; + + /** + * 会员等级 + */ + memberLevel?: number; + + /** + * 标签 + */ + tagId?: string | number; + + /** + * 推荐语 + */ + recommend?: string; + + /** + * 介绍 + */ + intro?: string; + + /** + * 详细地址 + */ + address?: string; + + /** + * 经度 + */ + longitude?: number; + + /** + * 纬度 + */ + latitude?: number; + + /** + * 排序 + */ + orderNum?: number; + + /** + * 景区等级 + */ + level?: number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index d85da55..9bdcd22 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -1,4 +1,8 @@ #app { + // 列表上方搜索框宽度 + .inputWidth { + width: 130px; + } .main-container { height: 100%; transition: margin-left 0.28s; diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index c2ed0b6..8a01903 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -23,11 +23,11 @@ - +
@@ -43,7 +43,7 @@
- +
diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index 631c261..3c04917 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -34,7 +34,7 @@ defineProps({ } }); -const title = ref('RuoYi-Vue-Plus'); +const title = ref('导游后台管理系统'); const settingsStore = useSettingsStore(); const sideTheme = computed(() => settingsStore.sideTheme); diff --git a/src/layout/index.vue b/src/layout/index.vue index ce47a30..628cb85 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -11,7 +11,7 @@ --> -
+
@@ -27,7 +27,7 @@ import { AppMain, Navbar, Settings, TagsView } from './components'; import useAppStore from '@/store/modules/app'; import useSettingsStore from '@/store/modules/settings'; import { initWebSocket } from '@/utils/websocket'; -import { initSSE } from "@/utils/sse"; +import { initSSE } from '@/utils/sse'; const settingsStore = useSettingsStore(); const theme = computed(() => settingsStore.theme); diff --git a/src/plugins/index.ts b/src/plugins/index.ts index 6c5e0c3..f1be897 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -9,7 +9,7 @@ import animate from '@/animate'; import { download as dl } from '@/utils/request'; import { useDict } from '@/utils/dict'; import { getConfigKey, updateConfigByKey } from '@/api/system/config'; -import { parseTime, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'; +import { parseTime, addDateRange, handleTree, selectDictLabel, selectDictLabels, autoTableHeight } from '@/utils/ruoyi'; import { App } from 'vue'; @@ -35,6 +35,7 @@ export default function installPlugin(app: App) { app.config.globalProperties.updateConfigByKey = updateConfigByKey; app.config.globalProperties.download = dl; app.config.globalProperties.parseTime = parseTime; + app.config.globalProperties.autoTableHeight = autoTableHeight; app.config.globalProperties.handleTree = handleTree; app.config.globalProperties.addDateRange = addDateRange; app.config.globalProperties.selectDictLabel = selectDictLabel; diff --git a/src/types/global.d.ts b/src/types/global.d.ts index 229e181..d6865d4 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -27,6 +27,11 @@ declare global { * 是否显示 */ visible: boolean; + /** + * 列表源数据 + * + */ + rowData?: any; } declare interface UploadOption { diff --git a/src/types/module.d.ts b/src/types/module.d.ts index 984df9f..f657904 100644 --- a/src/types/module.d.ts +++ b/src/types/module.d.ts @@ -5,7 +5,7 @@ import auth from '@/plugins/auth'; import cache from '@/plugins/cache'; import animate from '@/animate'; import { useDict } from '@/utils/dict'; -import { handleTree, addDateRange, selectDictLabel, selectDictLabels, parseTime } from '@/utils/ruoyi'; +import { handleTree, addDateRange, selectDictLabel, selectDictLabels, parseTime, autoTableHeight } from '@/utils/ruoyi'; import { getConfigKey, updateConfigByKey } from '@/api/system/config'; import { download as rd } from '@/utils/request'; @@ -26,6 +26,7 @@ declare module 'vue' { download: typeof rd; handleTree: typeof handleTree; getConfigKey: typeof getConfigKey; + autoTableHeight: typeof autoTableHeight; updateConfigByKey: typeof updateConfigByKey; selectDictLabel: typeof selectDictLabel; selectDictLabels: typeof selectDictLabels; diff --git a/src/utils/ruoyi.ts b/src/utils/ruoyi.ts index 8efd12c..c197de7 100644 --- a/src/utils/ruoyi.ts +++ b/src/utils/ruoyi.ts @@ -245,7 +245,16 @@ export const getNormalPath = (p: string): string => { export const blobValidate = (data: any) => { return data.type !== 'application/json'; }; - +// 自动计算设置表格高度 +export const autoTableHeight = () => { + // 视口高度 - 列表上方的元素高度 + let allHeight = window.innerHeight; + let element = [document.getElementById('topBar'), document.getElementById('search_div'), document.getElementById('table_page')]; + let domHeight = element.map((item) => (item.offsetHeight ? item.offsetHeight : 0)); + let tableHeight = allHeight - domHeight[0] - domHeight[1] - 80 - 50; + console.log('全局计算表格高度:', tableHeight, allHeight, domHeight[0], domHeight[1], domHeight[2]); + return tableHeight; +}; export default { handleTree }; diff --git a/src/views/index.vue b/src/views/index.vue index 3670a0c..010ba6d 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -2,9 +2,9 @@
-

RuoYi-Vue-Plus多租户管理系统

+

岛游后台管理系统

- RuoYi-Vue-Plus 是基于 RuoYi-Vue 针对 分布式集群 场景升级(不兼容原框架) + 岛游后台管理系统 是基于 RuoYi-Vue 针对 分布式集群 场景升级(不兼容原框架)
* 前端开发框架 Vue3、TS、Element Plus
* 后端开发框架 Spring Boot
diff --git a/src/views/login.vue b/src/views/login.vue index 7740ec7..5f292d5 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,13 +1,13 @@ diff --git a/src/views/manage/articleManage/index.vue b/src/views/manage/articleManage/index.vue new file mode 100644 index 0000000..f22ba78 --- /dev/null +++ b/src/views/manage/articleManage/index.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/manage/bannerManage/index.vue b/src/views/manage/bannerManage/index.vue new file mode 100644 index 0000000..4e7f949 --- /dev/null +++ b/src/views/manage/bannerManage/index.vue @@ -0,0 +1,384 @@ + + + + + diff --git a/src/views/manage/dyUser/index.vue b/src/views/manage/dyUser/index.vue index 4e1071a..af28c65 100644 --- a/src/views/manage/dyUser/index.vue +++ b/src/views/manage/dyUser/index.vue @@ -1,32 +1,38 @@ +