diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..4aded7b --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,5 @@ +// eslint.config.js +import oxlint from 'eslint-plugin-oxlint' +export default [ + oxlint, // oxlint should be the last one +] diff --git a/package.json b/package.json index 1ba2f71..83921dd 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "easy-speech": "^2.2.0", "echarts": "^5.4.3", "eslint-plugin-import": "^2.29.1", + "eslint-plugin-oxlint": "^0.2.0", "eslint-plugin-prettier": "^5.1.2", "fast-xml-parser": "^4.3.2", "file-saver": "^2.0.5", diff --git a/src/App.vue b/src/App.vue index df189a0..1d4db85 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,14 +5,14 @@ - + - + diff --git a/src/components/FeedbackItem.vue b/src/components/FeedbackItem.vue new file mode 100644 index 0000000..c4d3072 --- /dev/null +++ b/src/components/FeedbackItem.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/router/index.ts b/src/router/index.ts index b8ccbaf..f1358db 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,6 +1,10 @@ import { useProviderStore } from '@/store/useProviderStore' import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router' import IndexView from '../views/IndexView.vue' +import manage from './manage' +import user from './user' +import obs from './obs' +import open_live from './open_live' const routes: Array = [ { @@ -54,294 +58,18 @@ const routes: Array = [ }, }, { - path: '/user/:id', - name: 'user', - children: [ - { - path: '', - name: 'user-index', - component: () => import('@/views/view/UserIndexView.vue'), - meta: { - title: '主页', - keepAlive: true, - }, - }, - { - path: 'song-list', - name: 'user-songList', - component: () => import('@/views/view/SongListView.vue'), - meta: { - title: '歌单', - keepAlive: true, - }, - }, - { - path: 'question-box', - name: 'user-questionBox', - component: () => import('@/views/view/QuestionBoxView.vue'), - meta: { - title: '提问箱', - keepAlive: true, - }, - }, - { - path: 'schedule', - name: 'user-schedule', - component: () => import('@/views/view/ScheduleView.vue'), - meta: { - title: '日程', - keepAlive: true, - }, - }, - ], - }, - //管理页面 - { - path: '/manage', - name: 'manage', - children: [ - { - path: '', - name: 'manage-index', - component: () => import('@/views/manage/DashboardView.vue'), - meta: { - title: '面板', - }, - }, - { - path: 'song-list', - name: 'manage-songList', - component: () => import('@/views/manage/SongListManageView.vue'), - meta: { - title: '歌单', - keepAlive: true, - }, - }, - { - path: 'question-box', - name: 'manage-questionBox', - component: () => import('@/views/manage/QuestionBoxManageView.vue'), - meta: { - title: '提问箱', - keepAlive: true, - }, - }, - { - path: 'lottery', - name: 'manage-lottery', - component: () => import('@/views/manage/LotteryView.vue'), - meta: { - title: '动态抽奖', - keepAlive: true, - }, - }, - { - path: 'history', - name: 'manage-history', - component: () => import('@/views/manage/HistoryView.vue'), - meta: { - title: '数据跟踪', - keepAlive: true, - }, - }, - { - path: 'schedule', - name: 'manage-schedule', - component: () => import('@/views/manage/ScheduleManageView.vue'), - meta: { - title: '日程', - keepAlive: true, - }, - }, - { - path: 'event', - name: 'manage-event', - component: () => import('@/views/manage/EventView.vue'), - meta: { - title: '事件记录', - keepAlive: true, - }, - }, - { - path: 'video-collect', - name: 'manage-videoCollect', - component: () => import('@/views/manage/VideoCollectManageView.vue'), - meta: { - title: '视频征集', - keepAlive: true, - }, - }, - { - path: 'video-collect/:id', - name: 'manage-videoCollect-Detail', - component: () => import('@/views/manage/VideoCollectDetailView.vue'), - meta: { - title: '详情 · 视频征集', - keepAlive: true, - parent: 'manage-videoCollect', - }, - }, - { - path: 'live-lottery', - name: 'manage-liveLottery', - component: () => import('@/views/open_live/OpenLottery.vue'), - meta: { - title: '直播抽奖', - keepAlive: true, - danmaku: true, - }, - }, - { - path: 'queue', - name: 'manage-liveQueue', - component: () => import('@/views/open_live/OpenQueue.vue'), - meta: { - title: '排队', - keepAlive: true, - danmaku: true, - }, - }, - { - path: 'speech', - name: 'manage-speech', - component: () => import('@/views/open_live/ReadDanmaku.vue'), - meta: { - title: '读弹幕', - keepAlive: true, - danmaku: true, - }, - }, - { - path: 'song-request', - name: 'manage-songRequest', - component: () => import('@/views/open_live/SongRequest.vue'), - meta: { - title: '点歌 (歌势', - keepAlive: true, - danmaku: true, - }, - }, - { - path: 'music-request', - name: 'manage-musicRequest', - component: () => import('@/views/open_live/MusicRequest.vue'), - meta: { - title: '点歌 (点播', - keepAlive: true, - danmaku: true, - }, - }, - { - path: 'live', - name: 'manage-live', - component: () => import('@/views/manage/LiveManager.vue'), - meta: { - title: '直播记录', - keepAlive: true, - }, - }, - { - path: 'live/:id', - name: 'manage-liveDetail', - component: () => import('@/views/manage/LiveDetailManage.vue'), - meta: { - title: '直播详情', - }, - }, - { - path: 'feedback', - name: 'manage-feedback', - component: () => import('@/views/FeedbackManage.vue'), - meta: { - title: '反馈', - }, - }, - ], - }, - { - path: '/open-live', - name: 'open-live', - children: [ - { - path: '', - name: 'open-live-index', - component: () => import('@/views/open_live/OpenLiveIndex.vue'), - meta: { - title: '开放平台', - }, - }, - { - path: 'lottery', - name: 'open-live-lottery', - component: () => import('@/views/open_live/OpenLottery.vue'), - meta: { - title: '直播抽奖', - }, - }, - { - path: 'song-request', - name: 'open-live-song-request', - component: () => import('@/views/open_live/SongRequest.vue'), - meta: { - title: '点歌', - }, - }, - { - path: 'queue', - name: 'open-live-queue', - component: () => import('@/views/open_live/OpenQueue.vue'), - meta: { - title: '排队', - }, - }, - { - path: 'speech', - name: 'open-live-speech', - component: () => import('@/views/open_live/ReadDanmaku.vue'), - meta: { - title: '读弹幕', - }, - }, - ], - }, - { - path: '/obs', - name: 'obs', - children: [ - { - path: 'live-lottery', - name: 'obs-live-lottery', - component: () => import('@/views/obs/LiveLotteryOBS.vue'), - meta: { - title: '直播抽奖', - }, - }, - { - path: 'song-request', - name: 'obs-song-request', - component: () => import('@/views/obs/SongRequestOBS.vue'), - meta: { - title: '弹幕点歌 (歌势', - }, - }, - { - path: 'queue', - name: 'obs-queue', - component: () => import('@/views/obs/QueueOBS.vue'), - meta: { - title: '弹幕排队', - }, - }, - { - path: 'music-request', - name: 'obs-music-request', - component: () => import('@/views/obs/MusicRequestOBS.vue'), - meta: { - title: '弹幕排队 (播放', - }, - }, - ], + path: '/feedback', + name: 'feedback', + component: () => import('@/views/ViewerFeedbackView.vue'), + meta: { + title: '反馈', + keepAlive: true, + }, }, + manage, + user, + obs, + open_live, { path: '/:pathMatch(.*)*', name: 'notfound', diff --git a/src/router/manage.ts b/src/router/manage.ts new file mode 100644 index 0000000..37e5e3f --- /dev/null +++ b/src/router/manage.ts @@ -0,0 +1,163 @@ +export default //管理页面 +{ + path: '/manage', + name: 'manage', + children: [ + { + path: '', + name: 'manage-index', + component: () => import('@/views/manage/DashboardView.vue'), + meta: { + title: '面板', + }, + }, + { + path: 'song-list', + name: 'manage-songList', + component: () => import('@/views/manage/SongListManageView.vue'), + meta: { + title: '歌单', + keepAlive: true, + }, + }, + { + path: 'question-box', + name: 'manage-questionBox', + component: () => import('@/views/manage/QuestionBoxManageView.vue'), + meta: { + title: '提问箱', + keepAlive: true, + }, + }, + { + path: 'lottery', + name: 'manage-lottery', + component: () => import('@/views/manage/LotteryView.vue'), + meta: { + title: '动态抽奖', + keepAlive: true, + }, + }, + { + path: 'history', + name: 'manage-history', + component: () => import('@/views/manage/HistoryView.vue'), + meta: { + title: '数据跟踪', + keepAlive: true, + }, + }, + { + path: 'schedule', + name: 'manage-schedule', + component: () => import('@/views/manage/ScheduleManageView.vue'), + meta: { + title: '日程', + keepAlive: true, + }, + }, + { + path: 'event', + name: 'manage-event', + component: () => import('@/views/manage/EventView.vue'), + meta: { + title: '事件记录', + keepAlive: true, + }, + }, + { + path: 'video-collect', + name: 'manage-videoCollect', + component: () => import('@/views/manage/VideoCollectManageView.vue'), + meta: { + title: '视频征集', + keepAlive: true, + }, + }, + { + path: 'video-collect/:id', + name: 'manage-videoCollect-Detail', + component: () => import('@/views/manage/VideoCollectDetailView.vue'), + meta: { + title: '详情 · 视频征集', + keepAlive: true, + parent: 'manage-videoCollect', + }, + }, + { + path: 'live-lottery', + name: 'manage-liveLottery', + component: () => import('@/views/open_live/OpenLottery.vue'), + meta: { + title: '直播抽奖', + keepAlive: true, + danmaku: true, + }, + }, + { + path: 'queue', + name: 'manage-liveQueue', + component: () => import('@/views/open_live/OpenQueue.vue'), + meta: { + title: '排队', + keepAlive: true, + danmaku: true, + }, + }, + { + path: 'speech', + name: 'manage-speech', + component: () => import('@/views/open_live/ReadDanmaku.vue'), + meta: { + title: '读弹幕', + keepAlive: true, + danmaku: true, + }, + }, + { + path: 'song-request', + name: 'manage-songRequest', + component: () => import('@/views/open_live/SongRequest.vue'), + meta: { + title: '点歌 (歌势', + keepAlive: true, + danmaku: true, + }, + }, + { + path: 'music-request', + name: 'manage-musicRequest', + component: () => import('@/views/open_live/MusicRequest.vue'), + meta: { + title: '点歌 (点播', + keepAlive: true, + danmaku: true, + }, + }, + { + path: 'live', + name: 'manage-live', + component: () => import('@/views/manage/LiveManager.vue'), + meta: { + title: '直播记录', + keepAlive: true, + }, + }, + { + path: 'live/:id', + name: 'manage-liveDetail', + component: () => import('@/views/manage/LiveDetailManage.vue'), + meta: { + title: '直播详情', + }, + }, + { + path: 'feedback', + name: 'manage-feedback', + component: () => import('@/views/FeedbackManage.vue'), + meta: { + title: '反馈', + }, + }, + ], +} diff --git a/src/router/obs.ts b/src/router/obs.ts new file mode 100644 index 0000000..f0b3ff0 --- /dev/null +++ b/src/router/obs.ts @@ -0,0 +1,38 @@ +export default { + path: '/obs', + name: 'obs', + children: [ + { + path: 'live-lottery', + name: 'obs-live-lottery', + component: () => import('@/views/obs/LiveLotteryOBS.vue'), + meta: { + title: '直播抽奖', + }, + }, + { + path: 'song-request', + name: 'obs-song-request', + component: () => import('@/views/obs/SongRequestOBS.vue'), + meta: { + title: '弹幕点歌 (歌势', + }, + }, + { + path: 'queue', + name: 'obs-queue', + component: () => import('@/views/obs/QueueOBS.vue'), + meta: { + title: '弹幕排队', + }, + }, + { + path: 'music-request', + name: 'obs-music-request', + component: () => import('@/views/obs/MusicRequestOBS.vue'), + meta: { + title: '弹幕排队 (播放', + }, + }, + ], + } \ No newline at end of file diff --git a/src/router/open_live.ts b/src/router/open_live.ts new file mode 100644 index 0000000..f2f8762 --- /dev/null +++ b/src/router/open_live.ts @@ -0,0 +1,46 @@ +export default { + path: '/open-live', + name: 'open-live', + children: [ + { + path: '', + name: 'open-live-index', + component: () => import('@/views/open_live/OpenLiveIndex.vue'), + meta: { + title: '开放平台', + }, + }, + { + path: 'lottery', + name: 'open-live-lottery', + component: () => import('@/views/open_live/OpenLottery.vue'), + meta: { + title: '直播抽奖', + }, + }, + { + path: 'song-request', + name: 'open-live-song-request', + component: () => import('@/views/open_live/SongRequest.vue'), + meta: { + title: '点歌', + }, + }, + { + path: 'queue', + name: 'open-live-queue', + component: () => import('@/views/open_live/OpenQueue.vue'), + meta: { + title: '排队', + }, + }, + { + path: 'speech', + name: 'open-live-speech', + component: () => import('@/views/open_live/ReadDanmaku.vue'), + meta: { + title: '读弹幕', + }, + }, + ], +} diff --git a/src/router/user.ts b/src/router/user.ts new file mode 100644 index 0000000..9bb7cad --- /dev/null +++ b/src/router/user.ts @@ -0,0 +1,42 @@ +export default { + path: '/user/:id', + name: 'user', + children: [ + { + path: '', + name: 'user-index', + component: () => import('@/views/view/UserIndexView.vue'), + meta: { + title: '主页', + keepAlive: true, + }, + }, + { + path: 'song-list', + name: 'user-songList', + component: () => import('@/views/view/SongListView.vue'), + meta: { + title: '歌单', + keepAlive: true, + }, + }, + { + path: 'question-box', + name: 'user-questionBox', + component: () => import('@/views/view/QuestionBoxView.vue'), + meta: { + title: '提问箱', + keepAlive: true, + }, + }, + { + path: 'schedule', + name: 'user-schedule', + component: () => import('@/views/view/ScheduleView.vue'), + meta: { + title: '日程', + keepAlive: true, + }, + }, + ], +} diff --git a/src/views/FeedbackManage.vue b/src/views/FeedbackManage.vue index 816d0bf..a510840 100644 --- a/src/views/FeedbackManage.vue +++ b/src/views/FeedbackManage.vue @@ -2,6 +2,7 @@ import { useAccount } from '@/api/account' import { FeedbackStatus, FeedbackType, ResponseFeedbackModel } from '@/api/api-models' import { QueryGetAPI, QueryPostAPI } from '@/api/query' +import FeedbackItem from '@/components/FeedbackItem.vue' import { FEEDBACK_API_URL } from '@/data/constants' import { List } from 'linqts' import { NButton, NCard, NCheckbox, NDivider, NEllipsis, NEmpty, NInput, NModal, NRadioButton, NRadioGroup, NSpace, NSpin, NTag, NText, NTime, NTooltip, useMessage } from 'naive-ui' @@ -24,6 +25,7 @@ const order = { [FeedbackStatus.Todo]: 3, [FeedbackStatus.Finish]: 4, [FeedbackStatus.Reject]: 5, + [FeedbackStatus.Developing]: 6, } const selectedFeedback = computed(() => { return feedbacks.value.sort((a, b) => { @@ -79,7 +81,12 @@ async function add() { diff --git a/yarn.lock b/yarn.lock index fa9f3fc..6dbc7b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2363,6 +2363,13 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-oxlint@npm:^0.2.0": + version: 0.2.0 + resolution: "eslint-plugin-oxlint@npm:0.2.0" + checksum: fc0d6b56e9e93129b16f46f5ddfd2bf7233292b6a643efeda4c421d2796ee009333ca3bada4241b14dcd14b21eb757ead4aaa84671af73da925042eabed425d8 + languageName: node + linkType: hard + "eslint-plugin-prettier@npm:^5.1.2": version: 5.1.2 resolution: "eslint-plugin-prettier@npm:5.1.2" @@ -4873,6 +4880,7 @@ __metadata: eslint: "npm:^8.56.0" eslint-config-prettier: "npm:^9.1.0" eslint-plugin-import: "npm:^2.29.1" + eslint-plugin-oxlint: "npm:^0.2.0" eslint-plugin-prettier: "npm:^5.1.2" eslint-plugin-vue: "npm:^9.19.2" fast-xml-parser: "npm:^4.3.2"