Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-register
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-register
Commits
bb863701
提交
bb863701
authored
3月 25, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
9971d3d9
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
53 行增加
和
170 行删除
+53
-170
Create.vue
src/modules/activity/views/Create.vue
+9
-3
List.vue
src/modules/activity/views/List.vue
+24
-1
SetBasic.vue
src/modules/register/components/SetBasic.vue
+4
-3
importPeople.vue
src/modules/register/components/importPeople.vue
+14
-4
Create.vue
src/modules/register/views/Create.vue
+0
-157
List.vue
src/modules/register/views/List.vue
+1
-1
axios.js
src/utils/axios.js
+1
-1
没有找到文件。
src/modules/activity/views/Create.vue
浏览文件 @
bb863701
...
...
@@ -87,6 +87,12 @@ export default {
created
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
getRegisterDetail
()
}
else
{
const
stepStorage
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'stepData'
))
if
(
stepStorage
)
{
this
.
basicForm
=
stepStorage
.
basaForm
this
.
stepPageInfo
=
stepStorage
.
stepForm
}
}
},
methods
:
{
...
...
@@ -102,6 +108,7 @@ export default {
return
item
})
createRegister
(
params
).
then
(
res
=>
{
window
.
localStorage
.
removeItem
(
'stepData'
)
this
.
$message
({
message
:
'创建成功'
,
type
:
'success'
...
...
@@ -232,9 +239,8 @@ export default {
},
// 暂存配置
hanleLocalStorage
()
{
console
.
log
(
'111'
)
window
.
localStorage
.
setItem
(
'stepPageInfo'
,
JSON
.
stringify
(
this
.
stepPageInfo
))
console
.
log
(
window
.
localStorage
.
getItem
(
'stepPageInfo'
))
const
params
=
{
basaForm
:
this
.
basicForm
,
stepForm
:
this
.
stepPageInfo
}
window
.
localStorage
.
setItem
(
'stepData'
,
JSON
.
stringify
(
params
))
this
.
$message
.
success
(
'暂存数据成功'
)
// console.log(JSON.parse(window.localStorage.getItem('stepPageInfo'))
}
...
...
src/modules/activity/views/List.vue
浏览文件 @
bb863701
...
...
@@ -9,7 +9,7 @@
<template
v-slot:table-x=
"
{ row }">
<el-button
type=
"text"
v-if=
"!row.isEdit"
@
click=
"handleUpdate(row)"
>
编辑
</el-button>
<el-button
type=
"text"
v-if=
"!row.isEdit"
@
click=
"deleteRegister(row)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"
onRemove
(row)"
>
复制活动链接
</el-button>
<el-button
type=
"text"
@
click=
"
copyUrl
(row)"
>
复制活动链接
</el-button>
</
template
>
</app-list>
</app-card>
...
...
@@ -114,6 +114,29 @@ export default {
})
deleteRegister
({
id
:
row
.
id
}).
then
(
this
.
$refs
.
list
.
refetch
(
true
))
})
},
copyUrl
(
row
)
{
this
.
copyToClipboard
(
`https://register-show-h5.ezijing.com/SignMainPage?id=
${
row
.
id
}
`
)
},
copyToClipboard
(
str
)
{
const
el
=
document
.
createElement
(
'textarea'
)
el
.
value
=
str
el
.
setAttribute
(
'readonly'
,
''
)
el
.
style
.
position
=
'absolute'
el
.
style
.
left
=
'-9999px'
document
.
body
.
appendChild
(
el
)
const
selected
=
document
.
getSelection
().
rangeCount
>
0
?
document
.
getSelection
().
getRangeAt
(
0
)
:
false
el
.
select
()
document
.
execCommand
(
'copy'
)
document
.
body
.
removeChild
(
el
)
if
(
selected
)
{
document
.
getSelection
().
removeAllRanges
()
document
.
getSelection
().
addRange
(
selected
)
}
this
.
$message
({
message
:
'已复制'
,
type
:
'success'
})
}
}
}
...
...
src/modules/register/components/SetBasic.vue
浏览文件 @
bb863701
...
...
@@ -10,7 +10,7 @@
:key=
"cIndex"
v-for=
"(opt, cIndex) in item.optionList"
v-model=
"form[item.key]"
:label=
"opt.id
+ ':'
"
:label=
"opt.id"
>
{{
opt
.
option
}}
</el-radio
>
</el-form-item>
...
...
@@ -43,7 +43,7 @@ export default {
required
:
true
,
key
:
'name'
,
value
:
''
,
enable_edit
:
fals
e
enable_edit
:
tru
e
},
{
type
:
'input'
,
...
...
@@ -59,7 +59,7 @@ export default {
name
:
'性别'
,
key
:
'gender'
,
required
:
true
,
value
:
''
,
value
:
'
0
'
,
optionList
:
[
{
id
:
'0'
,
option
:
'未知'
},
{
id
:
'1'
,
option
:
'男'
},
...
...
@@ -283,6 +283,7 @@ export default {
}
})
this
.
dataList
=
formData
console
.
log
(
this
.
form
,
'form'
)
console
.
log
(
this
.
dataList
,
'fordata'
)
},
onSubmit
()
{
...
...
src/modules/register/components/importPeople.vue
浏览文件 @
bb863701
...
...
@@ -34,7 +34,7 @@
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
</el-upload>
<div
style=
"text-align: center"
>
<a
:href=
"file"
download=
"
试题模板.xlsx"
style=
"color: #c01c40"
>
<i
class=
"el-icon-download"
></i>
试题
模板.xlsx
</a>
<a
:href=
"file"
download=
"
人员模板.xlsx"
style=
"color: #c01c40"
>
<i
class=
"el-icon-download"
></i>
人员
模板.xlsx
</a>
<!--
<a
href=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/qbs/question.xlsx"
:download=
"试题模版"
></a>
-->
</div>
<div
style=
"text-align: center; margin-top: 15px"
>
...
...
@@ -108,10 +108,20 @@ export default {
this
.
$refs
.
upload
.
submit
()
},
cancel
()
{
this
.
$router
.
push
({
name
:
'teacher'
})
this
.
$emit
(
'cancel'
)
// this.$router.push({
// name: 'teacher'
// })
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.file-import
{
::v-deep
{
.el-upload-dragger
{
width
:
260px
!
important
;
}
}
}
</
style
>
src/modules/register/views/Create.vue
deleted
100644 → 0
浏览文件 @
9971d3d9
<
template
>
<div
class=
"create-box"
>
<div
class=
"title"
>
新建报名
</div>
<div
class=
"create-top"
>
<div
class=
"sub-title"
>
基本设置
</div>
<set-basic
class=
"set-basic"
></set-basic>
</div>
<div
class=
"create-bottom"
>
<div
class=
"sub-title"
>
展示设置
</div>
<div
class=
"create-bottom_mian"
>
<el-tabs
@
tab-click=
"handleClick"
v-model=
"activeName"
>
<el-tab-pane
:name=
"`$
{index}`"
:label="`第${index + 1}步`"
v-for="(item, index) in stepPageInfo"
:key="index"
>
<display-page
ref=
"display"
v-if=
"item.type == '1'"
:key=
"index"
></display-page>
<form-page
ref=
"display"
v-if=
"item.type == '2'"
:key=
"index"
></form-page>
</el-tab-pane>
</el-tabs>
</div>
<div
class=
"create-bottom_btn"
>
<el-button
type=
"primary"
style=
"margin-right: 80px"
@
click=
"hanleLocalStorage"
>
暂存配置
</el-button>
<el-button
type=
"primary"
@
click=
"handleAddPageClick"
>
添加步骤
</el-button>
<el-button
@
click=
"handleRemovePageClick"
>
删除步骤
</el-button>
</div>
</div>
<!-- 添加页面弹窗 -->
<el-dialog
title=
"添加步骤"
:visible
.
sync=
"dialogAddPageVisible"
width=
"25%"
center
>
<div
class=
"add-page_select"
>
<div
class=
"label"
>
步骤类型:
</div>
<el-select
v-model=
"dialogAddPageValue"
placeholder=
"请选择"
>
<el-option
v-for=
"item in dialogAddPageOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogAddPageVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"handleDialogAddPageClick"
>
确 定
</el-button>
</div>
</el-dialog>
<el-button
type=
"primary"
@
click=
"handleAddPageClick"
style=
"display: block; margin: 30px auto"
>
生成报名
</el-button>
</div>
</
template
>
<
script
>
import
SetBasic
from
'../components/SetBasic.vue'
import
FormPage
from
'../components/FormType.vue'
import
DisplayPage
from
'../components/DisplayType.vue'
export
default
{
components
:
{
SetBasic
,
FormPage
,
DisplayPage
},
data
()
{
return
{
// 添加步骤弹窗
dialogAddPageVisible
:
false
,
dialogAddPageValue
:
'1'
,
dialogAddPageOptions
:
[
{
value
:
'1'
,
label
:
'展示类型'
},
{
value
:
'2'
,
label
:
'表单类型'
}
],
// 步骤页面
activeName
:
'0'
,
stepPageInfo
:
[
{
type
:
'1'
,
index
:
0
}
]
}
},
methods
:
{
handleClick
(
tab
,
event
)
{
// console.log(tab, event)
},
handleAddPageClick
()
{
this
.
isDisplayPageForm
()
},
// 添加页面 && 跳转到添加的页面
handleDialogAddPageClick
()
{
this
.
stepPageInfo
.
push
({
type
:
this
.
dialogAddPageValue
,
index
:
this
.
stepPageInfo
.
length
})
this
.
dialogAddPageVisible
=
false
this
.
activeName
=
(
this
.
stepPageInfo
.
length
-
1
).
toString
()
},
// 点击添加步骤按钮判断
isDisplayPageForm
()
{
const
isFormValue
=
this
.
$refs
.
display
.
findIndex
(
item
=>
(
item
.
submitForm
?
!
item
.
submitForm
()
:
false
))
if
(
isFormValue
===
-
1
)
{
this
.
dialogAddPageVisible
=
true
}
else
{
this
.
activeName
=
isFormValue
.
toString
()
}
},
// 删除页面
handleRemovePageClick
()
{
if
(
this
.
stepPageInfo
.
length
>
1
)
{
this
.
stepPageInfo
=
this
.
stepPageInfo
.
filter
((
item
,
index
)
=>
index
!==
parseInt
(
this
.
activeName
))
this
.
activeName
=
(
this
.
activeName
===
'0'
?
'0'
:
this
.
activeName
-
1
).
toString
()
}
},
// 暂存配置
hanleLocalStorage
()
{
console
.
log
(
'111'
)
window
.
localStorage
.
setItem
(
'stepPageInfo'
,
JSON
.
stringify
(
this
.
stepPageInfo
))
console
.
log
(
window
.
localStorage
.
getItem
(
'stepPageInfo'
))
this
.
$message
.
success
(
'暂存数据成功'
)
// console.log(JSON.parse(window.localStorage.getItem('stepPageInfo'))
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.create-box
{
padding
:
20px
;
.title
{
font-size
:
18px
;
line-height
:
100%
;
color
:
#333333
;
margin-bottom
:
20px
;
}
.create-top
{
background
:
#fff
;
padding
:
30px
30px
15px
;
.set-basic
{
margin-top
:
20px
;
}
}
.sub-title
{
line-height
:
100%
;
font-size
:
16px
;
font-weight
:
bold
;
color
:
#333333
;
border-left
:
3px
solid
rgba
(
184
,
1
,
64
,
1
);
padding-left
:
7px
;
}
.create-bottom
{
background
:
#fff
;
padding
:
30px
30px
15px
;
margin-top
:
20px
;
.create-bottom_mian
{
margin-top
:
30px
;
}
}
.add-page_select
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.label
{
margin-right
:
5px
;
}
}
}
.create-bottom_btn
{
margin-top
:
15px
;
}
</
style
>
src/modules/register/views/List.vue
浏览文件 @
bb863701
...
...
@@ -88,7 +88,7 @@
</el-pagination>
</div>
</div>
<import-people
width=
"30%
"
:visible
.
sync=
"importDialogVisible"
></import-people>
<import-people
@
cancel=
"importDialogVisible = false"
width=
"400px
"
:visible
.
sync=
"importDialogVisible"
></import-people>
<set-tabel-heade
@
closeSetHeader=
"columnsOptionsVisible = false"
@
handleConfirm=
"handleConfirm"
...
...
src/utils/axios.js
浏览文件 @
bb863701
...
...
@@ -49,7 +49,7 @@ httpRequest.interceptors.response.use(
function
(
response
)
{
const
{
data
}
=
response
// 正常返回
if
(
data
.
code
===
0
)
{
if
(
data
.
code
===
0
||
!
Object
.
keys
(
data
).
includes
(
'code'
)
)
{
return
data
}
// 未登录
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论