Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
courseSign
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
courseSign
Commits
adaea545
Commit
adaea545
authored
Nov 26, 2024
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
388cc06a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
22 deletions
+46
-22
course_action_users.go
server/api/v1/course/course_action_users.go
+3
-0
course_signup.go
server/model/course/course_signup.go
+1
-0
package.json
web/package.json
+1
-0
main.js
web/src/main.js
+4
-0
courseActionUsers.vue
web/src/view/courseActionUsers/courseActionUsers.vue
+3
-3
courseList.vue
web/src/view/courseList/courseList.vue
+10
-1
courseSignup.vue
web/src/view/courseSignup/courseSignup.vue
+23
-17
courseUsers.vue
web/src/view/courseUsers/courseUsers.vue
+1
-1
No files found.
server/api/v1/course/course_action_users.go
View file @
adaea545
...
@@ -504,6 +504,9 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignActionSimple(c *gin.Con
...
@@ -504,6 +504,9 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignActionSimple(c *gin.Con
if
courseSign
.
ID
>
0
&&
!*
courseSign
.
IsPass
{
if
courseSign
.
ID
>
0
&&
!*
courseSign
.
IsPass
{
response
.
FailWithMessage
(
"报名审核未通过"
,
c
)
response
.
FailWithMessage
(
"报名审核未通过"
,
c
)
return
return
}
else
if
courseSign
.
ID
>
0
&&
*
courseSign
.
IsFrozen
{
response
.
FailWithMessage
(
"账户已冻结"
,
c
)
return
}
}
signDate
:=
utils
.
GetTodayTime
(
time
.
DateOnly
)
signDate
:=
utils
.
GetTodayTime
(
time
.
DateOnly
)
courseActionUsers
:=
course
.
CourseActionUsers
{}
courseActionUsers
:=
course
.
CourseActionUsers
{}
...
...
server/model/course/course_signup.go
View file @
adaea545
...
@@ -12,6 +12,7 @@ type CourseSignup struct {
...
@@ -12,6 +12,7 @@ type CourseSignup struct {
Uid
*
int
`json:"uid" form:"uid" gorm:"column:uid;comment:用户;size:10;"`
Uid
*
int
`json:"uid" form:"uid" gorm:"column:uid;comment:用户;size:10;"`
Cid
*
int
`json:"cid" form:"cid" gorm:"column:cid;index;comment:课程;size:10;"`
Cid
*
int
`json:"cid" form:"cid" gorm:"column:cid;index;comment:课程;size:10;"`
IsPass
*
bool
`json:"isPass" form:"isPass" gorm:"column:is_pass;default:0;comment:通过 0 未 1 通过;"`
IsPass
*
bool
`json:"isPass" form:"isPass" gorm:"column:is_pass;default:0;comment:通过 0 未 1 通过;"`
IsFrozen
*
bool
`json:"isFrozen" form:"isFrozen" gorm:"column:is_frozen;default:0;comment:通过 0 未 1 冻结;"`
Addr
string
`json:"addr" form:"addr" gorm:"-"`
Addr
string
`json:"addr" form:"addr" gorm:"-"`
CourseName
string
`json:"courseName" form:"courseName" gorm:"-"`
CourseName
string
`json:"courseName" form:"courseName" gorm:"-"`
...
...
web/package.json
View file @
adaea545
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
"screenfull"
:
"^5.0.2"
,
"screenfull"
:
"^5.0.2"
,
"spark-md5"
:
"^3.0.1"
,
"spark-md5"
:
"^3.0.1"
,
"vue"
:
"^3.2.25"
,
"vue"
:
"^3.2.25"
,
"vue-quill-editor"
:
"^3.0.6"
,
"vue-router"
:
"^4.0.0-0"
"vue-router"
:
"^4.0.0-0"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
...
...
web/src/main.js
View file @
adaea545
...
@@ -15,6 +15,9 @@ import 'element-plus/es/components/notification/style/css'
...
@@ -15,6 +15,9 @@ import 'element-plus/es/components/notification/style/css'
import
'element-plus/es/components/message-box/style/css'
import
'element-plus/es/components/message-box/style/css'
import
'./style/element_visiable.scss'
import
'./style/element_visiable.scss'
import
VueQuillEditor
from
'vue-quill-editor'
import
'quill/dist/quill.snow.css'
initDom
()
initDom
()
/**
/**
* @description 导入加载进度条,防止首屏加载时间过长,用户等待
* @description 导入加载进度条,防止首屏加载时间过长,用户等待
...
@@ -37,6 +40,7 @@ app
...
@@ -37,6 +40,7 @@ app
.
use
(
store
)
.
use
(
store
)
.
use
(
auth
)
.
use
(
auth
)
.
use
(
router
)
.
use
(
router
)
.
use
(
VueQuillEditor
)
.
mount
(
'#app'
)
.
mount
(
'#app'
)
export
default
app
export
default
app
web/src/view/courseActionUsers/courseActionUsers.vue
View file @
adaea545
...
@@ -83,10 +83,10 @@
...
@@ -83,10 +83,10 @@
<
template
#
default=
"scope"
>
{{
formatDate
(
scope
.
row
.
signDate
)
}}
</
template
>
<
template
#
default=
"scope"
>
{{
formatDate
(
scope
.
row
.
signDate
)
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"left"
label=
"按钮组"
>
<el-table-column
align=
"left"
label=
"按钮组"
>
<
template
#
default=
"scope"
>
<!-- <template #default="scope">--
>
<!-- <el-button type="primary" link icon="edit" class="table-button" @click="updateCourseActionUsersFunc(scope.row)">变更</el-button>-->
<!-- <el-button type="primary" link icon="edit" class="table-button" @click="updateCourseActionUsersFunc(scope.row)">变更</el-button>-->
<el-button
type=
"primary"
link
icon=
"delete"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button
>
<!-- <el-button type="primary" link icon="delete" @click="deleteRow(scope.row)">删除</el-button>--
>
</
template
>
<!-- </template>--
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<div
class=
"gva-pagination"
>
<div
class=
"gva-pagination"
>
...
...
web/src/view/courseList/courseList.vue
View file @
adaea545
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
link
icon=
"edit"
class=
"table-button"
@
click=
"updateCourseListFunc(scope.row)"
>
变更
</el-button>
<el-button
type=
"primary"
link
icon=
"edit"
class=
"table-button"
@
click=
"updateCourseListFunc(scope.row)"
>
变更
</el-button>
<el-button
type=
"primary"
link
icon=
"plus"
@
click=
"toCourseAction(scope.row)"
>
活动管理
</el-button>
<el-button
type=
"primary"
link
icon=
"plus"
@
click=
"toCourseAction(scope.row)"
>
活动管理
</el-button>
<el-button
type=
"primary"
link
icon=
"delete"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button
>
<!--
<el-button
type=
"primary"
link
icon=
"delete"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button>
--
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -92,6 +92,15 @@
...
@@ -92,6 +92,15 @@
<el-form-item
label=
"课程描述:"
prop=
"courseDesc"
>
<el-form-item
label=
"课程描述:"
prop=
"courseDesc"
>
<el-input
v-model=
"formData.courseDesc"
:clearable=
"true"
type =
"textarea"
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.courseDesc"
:clearable=
"true"
type =
"textarea"
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
<!-- <el-form-item label="课程描述:" prop="courseDescOne" >-->
<!-- <quill-editor-->
<!-- v-model="formData.courseDesc"-->
<!-- ref="myQuillEditor"-->
<!-- :options="editorOptions"-->
<!-- @blur="onEditorBlur"-->
<!-- @focus="onEditorFocus"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item
label=
"展示图"
label-width=
"80px"
>
<el-form-item
label=
"展示图"
label-width=
"80px"
>
<div
style=
"display:inline-block"
@
click=
"openBannerChange"
>
<div
style=
"display:inline-block"
@
click=
"openBannerChange"
>
<img
v-if=
"formData.courseBanner"
alt=
"头像"
class=
"header-img-box"
:src=
"(formData.courseBanner && formData.courseBanner.slice(0, 4) !== 'http')?path+formData.courseBanner:formData.courseBanner"
>
<img
v-if=
"formData.courseBanner"
alt=
"头像"
class=
"header-img-box"
:src=
"(formData.courseBanner && formData.courseBanner.slice(0, 4) !== 'http')?path+formData.courseBanner:formData.courseBanner"
>
...
...
web/src/view/courseSignup/courseSignup.vue
View file @
adaea545
...
@@ -26,16 +26,16 @@
...
@@ -26,16 +26,16 @@
<div
class=
"gva-table-box"
>
<div
class=
"gva-table-box"
>
<div
class=
"gva-btn-list"
>
<div
class=
"gva-btn-list"
>
<!--
<el-button
type=
"primary"
icon=
"plus"
@
click=
"openDialog"
>
新增
</el-button>
-->
<!--
<el-button
type=
"primary"
icon=
"plus"
@
click=
"openDialog"
>
新增
</el-button>
-->
<el-popover
v-model:visible=
"deleteVisible"
placement=
"top"
width=
"160"
>
<!--
<el-popover
v-model:visible=
"deleteVisible"
placement=
"top"
width=
"160"
>
--
>
<p>
确定要删除吗?
</p
>
<!--
<p>
确定要删除吗?
</p>
--
>
<div
style=
"text-align: right; margin-top: 8px;"
>
<!--
<div
style=
"text-align: right; margin-top: 8px;"
>
--
>
<el-button
type=
"primary"
link
@
click=
"deleteVisible = false"
>
取消
</el-button
>
<!--
<el-button
type=
"primary"
link
@
click=
"deleteVisible = false"
>
取消
</el-button>
--
>
<el-button
type=
"primary"
@
click=
"onDelete"
>
确定
</el-button
>
<!--
<el-button
type=
"primary"
@
click=
"onDelete"
>
确定
</el-button>
--
>
</div
>
<!--
</div>
--
>
<template
#
reference
>
<!--
<template
#
reference
>
--
>
<el-button
icon=
"delete"
style=
"margin-left: 10px;"
:disabled=
"!multipleSelection.length"
@
click=
"deleteVisible = true"
>
删除
</el-button
>
<!--
<el-button
icon=
"delete"
style=
"margin-left: 10px;"
:disabled=
"!multipleSelection.length"
@
click=
"deleteVisible = true"
>
删除
</el-button>
--
>
</
template
>
<!--
</
template
>
--
>
</el-popover
>
<!-- </el-popover>--
>
</div>
</div>
<el-table
<el-table
ref=
"multipleTable"
ref=
"multipleTable"
...
@@ -51,13 +51,16 @@
...
@@ -51,13 +51,16 @@
</el-table-column>
</el-table-column>
<el-table-column
align=
"left"
label=
"用户"
prop=
"addr"
width=
"120"
/>
<el-table-column
align=
"left"
label=
"用户"
prop=
"addr"
width=
"120"
/>
<el-table-column
align=
"left"
label=
"课程"
prop=
"courseName"
width=
"120"
/>
<el-table-column
align=
"left"
label=
"课程"
prop=
"courseName"
width=
"120"
/>
<el-table-column
align=
"left"
label=
"通过
0 未 1 通过
"
prop=
"isPass"
width=
"120"
>
<el-table-column
align=
"left"
label=
"通过"
prop=
"isPass"
width=
"120"
>
<
template
#
default=
"scope"
>
{{
formatBoolean
(
scope
.
row
.
isPass
)
}}
</
template
>
<
template
#
default=
"scope"
>
{{
formatBoolean
(
scope
.
row
.
isPass
)
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"left"
label=
"冻结"
prop=
"isFrozen"
width=
"120"
>
<
template
#
default=
"scope"
>
{{
formatBoolean
(
scope
.
row
.
isFrozen
)
}}
</
template
>
</el-table-column>
<el-table-column
align=
"left"
label=
"按钮组"
>
<el-table-column
align=
"left"
label=
"按钮组"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
link
icon=
"edit"
class=
"table-button"
@
click=
"updateCourseSignupFunc(scope.row)"
>
审核
</el-button>
<el-button
type=
"primary"
v-if=
"!scope.row.isPass"
link
icon=
"edit"
class=
"table-button"
@
click=
"updateCourseSignupFunc(scope.row)"
>
审核
</el-button>
<el-button
type=
"primary"
link
icon=
"delete"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button
>
<!--
<el-button
type=
"primary"
link
icon=
"delete"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button>
--
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -76,16 +79,16 @@
...
@@ -76,16 +79,16 @@
<el-dialog
v-model=
"dialogFormVisible"
:before-close=
"closeDialog"
title=
"审核操作"
>
<el-dialog
v-model=
"dialogFormVisible"
:before-close=
"closeDialog"
title=
"审核操作"
>
<el-form
:model=
"formData"
label-position=
"right"
ref=
"elFormRef"
:rules=
"rule"
label-width=
"80px"
>
<el-form
:model=
"formData"
label-position=
"right"
ref=
"elFormRef"
:rules=
"rule"
label-width=
"80px"
>
<el-form-item
label=
"用户:"
prop=
"addr"
>
<el-form-item
label=
"用户:"
prop=
"addr"
>
<el-input
v-model=
"formData.addr"
:clearable=
"false"
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.addr"
:clearable=
"false"
placeholder=
"请输入"
disabled
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"性别 0 女性 1 男性:"
prop=
"sex"
>
<el-form-item
label=
"性别 0 女性 1 男性:"
prop=
"sex"
>
<el-switch
v-model=
"formData.sex"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
></el-switch>
<el-switch
v-model=
"formData.sex"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
disabled
></el-switch>
</el-form-item>
</el-form-item>
<el-form-item
label=
"年龄:"
prop=
"age"
>
<el-form-item
label=
"年龄:"
prop=
"age"
>
<el-input
v-model
.
number=
"formData.age"
placeholder=
"请输入"
/>
<el-input
v-model
.
number=
"formData.age"
placeholder=
"请输入"
disabled
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"公司:"
prop=
"company"
>
<el-form-item
label=
"公司:"
prop=
"company"
>
<el-input
v-model
.
number=
"formData.company"
placeholder=
"请输入"
/>
<el-input
v-model
.
number=
"formData.company"
placeholder=
"请输入"
disabled
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"头像:"
prop=
"photo"
>
<el-form-item
label=
"头像:"
prop=
"photo"
>
<img
v-if=
"formData.photo"
alt=
"头像"
class=
"header-img-box"
:src=
"(formData.photo && formData.photo.slice(0, 4) !== 'http')?path+formData.photo:formData.photo"
>
<img
v-if=
"formData.photo"
alt=
"头像"
class=
"header-img-box"
:src=
"(formData.photo && formData.photo.slice(0, 4) !== 'http')?path+formData.photo:formData.photo"
>
...
@@ -93,6 +96,9 @@
...
@@ -93,6 +96,9 @@
<el-form-item
label=
"通过:"
prop=
"isPass"
>
<el-form-item
label=
"通过:"
prop=
"isPass"
>
<el-switch
v-model=
"formData.isPass"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
clearable
></el-switch>
<el-switch
v-model=
"formData.isPass"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
clearable
></el-switch>
</el-form-item>
</el-form-item>
<el-form-item
label=
"冻结:"
prop=
"isFrozen"
>
<el-switch
v-model=
"formData.isFrozen"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
clearable
></el-switch>
</el-form-item>
</el-form>
</el-form>
<
template
#
footer
>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<div
class=
"dialog-footer"
>
...
...
web/src/view/courseUsers/courseUsers.vue
View file @
adaea545
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<el-table-column
align=
"left"
label=
"按钮组"
>
<el-table-column
align=
"left"
label=
"按钮组"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
link
icon=
"edit"
class=
"table-button"
@
click=
"updateCourseUsersFunc(scope.row)"
>
变更
</el-button>
<el-button
type=
"primary"
link
icon=
"edit"
class=
"table-button"
@
click=
"updateCourseUsersFunc(scope.row)"
>
变更
</el-button>
<el-button
type=
"primary"
link
icon=
"delete"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button
>
<!--
<el-button
type=
"primary"
link
icon=
"delete"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button>
--
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment