diff --git a/admin/package.json b/admin/package.json index 05758369..eef47181 100644 --- a/admin/package.json +++ b/admin/package.json @@ -15,6 +15,12 @@ "test:ci": "npm run lint && npm run test:unit" }, "dependencies": { + "@fullcalendar/core": "^6.1.15", + "@fullcalendar/daygrid": "^6.1.15", + "@fullcalendar/interaction": "^6.1.15", + "@fullcalendar/list": "^6.1.15", + "@fullcalendar/timegrid": "^6.1.15", + "@fullcalendar/vue": "^6.1.15", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^1.0.2", "axios": "0.18.1", @@ -30,6 +36,7 @@ "js-cookie": "2.2.0", "jsonlint": "1.6.3", "jszip": "3.2.1", + "moment": "^2.30.1", "normalize.css": "7.0.0", "nprogress": "0.2.0", "path-to-regexp": "2.4.0", diff --git a/admin/src/api/scheduling.js b/admin/src/api/scheduling.js new file mode 100644 index 00000000..be7a4dd3 --- /dev/null +++ b/admin/src/api/scheduling.js @@ -0,0 +1,41 @@ +import request from '@/utils/request' + +//直播间列表 +export function liveroom() { + return request({ + url: '/admin/liveroom/index', + method: 'get' + }) +} +// 排班列表 +export function roomWorks(live_room_id) { + return request({ + url: '/admin/liveroom/roomWorks', + method: 'get', + params: { live_room_id } + }) +} +// 可排班主播列表 +export function availableZhubo(params) { + return request({ + url: '/admin/liveroom/availableZhubo', + method: 'get', + params: params + }) +} +// 编辑直播间 +export function saveProducts(data) { + return request({ + url: '/admin/liveroom/saveProducts', + method: 'post', + data + }) +} +// 保存排班信息 +export function saveRoomWorks(data) { + return request({ + url: '/admin/liveroom/saveRoomWorks', + method: 'post', + data + }) +} diff --git a/admin/src/main.js b/admin/src/main.js index 0b3dbbf6..828a1849 100644 --- a/admin/src/main.js +++ b/admin/src/main.js @@ -3,7 +3,7 @@ import Vue from 'vue' import Cookies from 'js-cookie' import 'normalize.css/normalize.css' // a modern alternative to CSS resets - +import consts from '@/utils/consts' import Element from 'element-ui' import './styles/element-variables.scss' // import enLang from 'element-ui/lib/locale/lang/en'// 如果使用中文语言包请默认支持,无需额外引入,请删除该依赖 @@ -36,7 +36,7 @@ if (process.env.NODE_ENV === 'production') { const { mockXHR } = require('../mock') mockXHR() } - +Vue.prototype.$consts = consts Vue.use(Element, { size: Cookies.get('size') || 'medium' // set element-ui default size // locale: enLang // 如果使用中文,无需设置,请删除 diff --git a/admin/src/router/index.js b/admin/src/router/index.js index 142ba839..d2d8a97c 100644 --- a/admin/src/router/index.js +++ b/admin/src/router/index.js @@ -103,6 +103,15 @@ export const asyncRoutes = [ roles: ['admin'] } }, + { + path: 'scheduling', + component: () => import('@/views/scheduling/index'), + name: 'scheduling', + meta: { + title: '直播排班', + roles: ['admin'] + } + }, { path: 'onlines', component: () => import('@/views/onlines/online.vue'), diff --git a/admin/src/views/admin/works.vue b/admin/src/views/admin/works.vue index a9345fca..cd06a384 100644 --- a/admin/src/views/admin/works.vue +++ b/admin/src/views/admin/works.vue @@ -1,28 +1,56 @@ diff --git a/admin/src/views/scheduling/index.vue b/admin/src/views/scheduling/index.vue new file mode 100644 index 00000000..7e9218e0 --- /dev/null +++ b/admin/src/views/scheduling/index.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/admin/src/views/scheduling/liveroom-update.vue b/admin/src/views/scheduling/liveroom-update.vue new file mode 100644 index 00000000..a86fed2e --- /dev/null +++ b/admin/src/views/scheduling/liveroom-update.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/admin/src/views/scheduling/room-works.vue b/admin/src/views/scheduling/room-works.vue new file mode 100644 index 00000000..cb8e17ad --- /dev/null +++ b/admin/src/views/scheduling/room-works.vue @@ -0,0 +1,208 @@ + + + + + diff --git a/admin/vue.config.js b/admin/vue.config.js index e5d66379..c1a42cef 100644 --- a/admin/vue.config.js +++ b/admin/vue.config.js @@ -38,8 +38,8 @@ module.exports = { }, proxy: { '/dev-api': { // 接口地址 以 api开头的都走下面的配置 - target: 'https://www.szjinao.cn', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2 - // target: 'http://192.168.0.6:8787', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2 + // target: 'https://www.szjinao.cn', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2 + target: 'http://192.168.0.100:8787', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2 ws: true, // 是否支持 websocket 请求 支持 changeOrigin: true, // 是否启用跨域 pathRewrite: {