From ae500c94ce4ecb754b1f1422330a6841e7ed88e5 Mon Sep 17 00:00:00 2001
From: zhuhao <979263092@qq.com>
Date: Fri, 9 Aug 2024 15:06:13 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=EF=BC=9A=E9=A2=84=E7=BA=A6?=
=?UTF-8?q?=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
electron.vite.config.mjs | 4 +-
src/main/file.js | 4 +-
src/renderer/src/api/classManage/index.js | 29 ++++++-
.../src/views/classManage/classReserv.vue | 45 +++++++---
.../src/views/classManage/reserv-item.vue | 82 ++++++++++++++----
.../src/views/prepare/container/reserv.vue | 85 +++++++++++++++----
src/renderer/src/views/prepare/index.vue | 44 ++++++++--
7 files changed, 237 insertions(+), 56 deletions(-)
diff --git a/electron.vite.config.mjs b/electron.vite.config.mjs
index c48cc00..9b9c503 100644
--- a/electron.vite.config.mjs
+++ b/electron.vite.config.mjs
@@ -24,8 +24,8 @@ export default defineConfig({
server: {
proxy: {
'/dev-api': {
- target: 'http://27.128.240.72:7865',
- // target: 'http://192.168.2.52:7863',
+ // target: 'http://27.128.240.72:7865',
+ target: 'http://192.168.2.52:7863',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}
diff --git a/src/main/file.js b/src/main/file.js
index 9cc20ea..d3eede2 100644
--- a/src/main/file.js
+++ b/src/main/file.js
@@ -250,7 +250,9 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
onDownloadStarted: async ({ id, item, webContents }) => {
// Do something with the download id
},
- onDownloadProgress: async ({ id, item, percentCompleted }) => {},
+ onDownloadProgress: async ({ id, item, percentCompleted }) => {
+ e.reply('download-file-default-prog' + fileName, percentCompleted)
+ },
onDownloadCompleted: async ({ id, item }) => {
console.log('完成')
e.reply('download-file-default' + fileName, true)
diff --git a/src/renderer/src/api/classManage/index.js b/src/renderer/src/api/classManage/index.js
index e783daf..6db5913 100644
--- a/src/renderer/src/api/classManage/index.js
+++ b/src/renderer/src/api/classManage/index.js
@@ -138,6 +138,14 @@ export function addSmartClassReserv(data) {
data: data
})
}
+//修改课程预约
+export function updateSmartClassReserv(data) {
+ return request({
+ url: '/smarttalk/classReserv/updateSmartClassReserv',
+ method: 'post',
+ data: data
+ })
+}
//查询课程预约
export function getSelfReserv() {
return request({
@@ -145,4 +153,23 @@ export function getSelfReserv() {
method: 'get'
})
}
-
+export function deleteSmartReserv(id) {
+ return request({
+ url: '/smarttalk/classReserv/' + id,
+ method: 'delete'
+ })
+}
+export function startClass(id) {
+ return request({
+ url: '/smarttalk/classReserv/startClass',
+ method: 'get',
+ params: {id}
+ })
+}
+export function endClass(id) {
+ return request({
+ url: '/smarttalk/classReserv/endClass',
+ method: 'get',
+ params: {id}
+ })
+}
diff --git a/src/renderer/src/views/classManage/classReserv.vue b/src/renderer/src/views/classManage/classReserv.vue
index f47373b..408b62e 100644
--- a/src/renderer/src/views/classManage/classReserv.vue
+++ b/src/renderer/src/views/classManage/classReserv.vue
@@ -1,12 +1,25 @@
-
+
-
-
+
+
+
@@ -14,39 +27,45 @@
import { ref, onMounted, computed } from 'vue'
import { getSelfReserv } from '@/api/classManage'
import ReservItem from '@/views/classManage/reserv-item.vue'
-
-const tabOptions = ref(['进行中','已结束'])
+import Reserv from '@/views/prepare/container/reserv.vue'
+const reservDialog = ref(null)
+const tabOptions = ref(['进行中', '已结束'])
const tabActive = ref('进行中')
const dataList = ref([])
const activeDataList = computed(() => {
- return dataList.value.filter(item => {
- return item.status !== "已结束"
+ return dataList.value.filter((item) => {
+ return item.status !== '已结束'
})
})
+const deleteReserv = (item) => {
+ dataList.value = dataList.value.filter((is) => {
+ return is.id !== item.id
+ })
+}
const doneDataList = computed(() => {
- return dataList.value.filter(item => {
- return item.status === "已结束"
+ return dataList.value.filter((item) => {
+ return item.status === '已结束'
})
})
onMounted(() => {
- getSelfReserv().then(res => {
+ getSelfReserv().then((res) => {
dataList.value = res.data
})
})