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
})
})