Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
5138f4e2
Commit
5138f4e2
authored
Apr 07, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
fcd60c92
51b001aa
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1106 additions
and
0 deletions
+1106
-0
quesactive-form.vue
src/components/activity/quesactive-form.vue
+167
-0
wenjuan-form.vue
src/components/activity/wenjuan-form.vue
+260
-0
QuesActivityList.vue
src/pages/activity/QuesActivityList.vue
+238
-0
questionnaireList.vue
src/pages/activity/questionnaireList.vue
+202
-0
resultPageList.vue
src/pages/activity/resultPageList.vue
+224
-0
routes.js
src/router/routes.js
+15
-0
No files found.
src/components/activity/quesactive-form.vue
0 → 100644
View file @
5138f4e2
<
style
>
.el-picker-panel
{
z-index
:
9999
!important
;
}
.el-range-editor--small.el-input__inner
{
background-color
:
transparent
!important
;
border
:
0
!important
;
height
:
40px
;
line-height
:
40px
;
}
.el-range-editor
.el-range-input
{
background-color
:
transparent
!important
;
}
.el-range-editor--small
.el-range-separator
{
line-height
:
30px
!important
;
}
</
style
>
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
addMsg
.
ID
==
0
?
'新增活动信息'
:
'修改活动信息'
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<q-input
filled
v-model=
"addMsg.Title"
class=
"col-6 q-pr-lg q-pb-lg"
:rules=
"[val => !!val || '请填写标题']"
ref=
"Title"
label=
"标题"
>
</q-input>
<q-input
filled
v-model=
"addMsg.SurveyNum"
@
keyup
.
native=
"checkInteger(addMsg,'SurveyNum')"
class=
"col-6 q-pb-lg"
:rules=
"[val => !!val || '请填写数量']"
ref=
"SurveyNum"
label=
"问卷调查份数"
>
</q-input>
<q-field
filled
dense
class=
"col-6 q-pb-lg q-pr-lg"
>
<template
v-slot:control
>
<el-date-picker
v-model=
"dateList"
size=
"small"
type=
"datetimerange"
range-separator=
"至"
value-format=
"yyyy-MM-dd HH:mm:ss"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</
template
>
</q-field>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"addMsg.PrizeType"
:options=
"platList"
label=
"领奖方式"
ref=
"PrizeType"
:rules=
"[val => !!val || '请填写标题']"
class=
"col-6 q-pb-lg"
emit-value
map-options
/>
<q-input
filled
v-model=
"addMsg.PrizeAddress"
class=
"col-6 q-pb-lg q-pr-lg"
:rules=
"[val => !!val || '请填写奖品地址']"
ref=
"PrizeAddress"
label=
"奖品地址"
>
</q-input>
<q-input
filled
type=
"textarea"
:rows=
"3"
v-model=
"addMsg.Description"
class=
"col-12 q-pb-lg"
:rules=
"[val => !!val || '请填写活动说明']"
ref=
"Description"
label=
"活动说明"
>
</q-input>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"saveActive"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
addMsg
:
{
ID
:
0
,
Title
:
''
,
StartDate
:
''
,
EndDate
:
""
,
SurveyNum
:
''
,
Description
:
''
,
PrizeAddress
:
''
,
PrizeType
:
''
,
},
platList
:
[],
dateList
:
[],
saveLoading
:
false
,
}
},
mounted
()
{
this
.
GetPrizeTypeEnumList
();
this
.
initObj
()
},
methods
:
{
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
ID
>
0
)
{
this
.
apipostDS
(
"/api/Survey/GetActivitySurvey"
,
{
ID
:
this
.
saveObj
.
ID
},
res
=>
{
this
.
addMsg
=
res
.
data
.
data
;
this
.
addMsg
.
PrizeType
=
this
.
addMsg
.
PrizeType
.
toString
()
this
.
dateList
=
[
this
.
addMsg
.
StartDate
,
this
.
addMsg
.
EndDate
]
})
}
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
GetPrizeTypeEnumList
()
{
this
.
apipostDS
(
"/api/Survey/GetPrizeTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
platList
=
res
.
data
.
data
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
res
.
data
.
message
})
}
})
},
//保存数据
saveActive
()
{
this
.
$refs
.
Title
.
validate
();
this
.
$refs
.
SurveyNum
.
validate
();
this
.
$refs
.
PrizeType
.
validate
();
this
.
$refs
.
PrizeAddress
.
validate
();
this
.
$refs
.
Description
.
validate
();
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
)
{
this
.
addMsg
.
StartDate
=
this
.
dateList
[
0
];
this
.
addMsg
.
EndDate
=
this
.
dateList
[
1
];
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
'请选择活动时间'
})
return
false
}
if
(
!
this
.
$refs
.
Title
.
hasError
&&
!
this
.
$refs
.
SurveyNum
.
hasError
&&
!
this
.
$refs
.
PrizeType
.
hasError
&&
!
this
.
$refs
.
PrizeAddress
.
hasError
&&
!
this
.
$refs
.
Description
.
hasError
)
{
this
.
apipostDS
(
"/api/Survey/SetActivitySurvey"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
'close'
);
this
.
$emit
(
'success'
);
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
res
.
data
.
message
})
}
})
}
}
}
}
</
script
>
src/components/activity/wenjuan-form.vue
0 → 100644
View file @
5138f4e2
<
style
>
.time-select
{
z-index
:
9999
!important
;
}
</
style
>
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
ReserveClassId
==
0
?
'新增试听课程'
:
'修改试听课程'
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<q-input
filled
v-model=
"objOption.ClassDate"
class=
"col-6 q-pr-lg q-pb-lg"
:rules=
"[val => !!val || '请选择预约日期']"
ref=
"ClassDate"
mask=
"date"
label=
"预约日期"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.ClassDate"
@
input=
"() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<div
class=
"Sysuser_Date col-6 q-pb-lg"
>
<q-field>
<
template
v-slot:control
>
<el-time-select
v-model=
"objOption.ClassTime"
ref=
"ClassTime"
style=
"width:50%"
:picker-options=
"
{
start: '09:00',
step: '00:15',
end: '21:00',
maxTime:objOption.EndTime
}" placeholder="预约开始时间">
</el-time-select>
<el-time-select
v-model=
"objOption.EndTime"
ref=
"EndTime"
style=
"width:50%"
:picker-options=
"
{
start: '09:00',
step: '00:15',
end: '21:00',
minTime:objOption.ClassTime
}" placeholder="预约结束时间">
</el-time-select>
</
template
>
</q-field>
</div>
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"objOption.TeacherId"
ref=
"TeacherId"
:options=
"TeacherList"
label=
"选择教师"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"RoomId"
option-label=
"RoomName"
v-model=
"objOption.ClassRoomId"
ref=
"ClassRoomId"
:options=
"ClassRoomList"
label=
"关联教室"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"LessonName"
v-model=
"objOption.TrialLessonId"
:options=
"TrialList"
label=
"试听课程"
:dense=
"false"
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Name"
option-label=
"Name"
v-model=
"objOption.ClassContent"
ref=
"ClassContent"
:options=
"ContentList"
label=
"主讲内容"
:dense=
"false"
class=
"col-12 q-pb-lg"
emit-value
map-options
/>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"saveCategory"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
getTeacherDropDownList
,
queryClassRoomList
,
GetTrialLessonList
}
from
"../../api/school/index"
;
import
{
GetReserveClass
,
SetReserveClass
}
from
'../../api/scheduling/schedu'
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
objOption
:
{
ReserveClassId
:
0
,
TeacherId
:
""
,
ClassDate
:
""
,
ClassTime
:
""
,
EndTime
:
""
,
ClassRoomId
:
""
,
ClassContent
:
''
,
TrialLessonId
:
''
},
saveLoading
:
false
,
TeacherList
:
[],
ClassRoomList
:
[],
ContentList
:
[{
Id
:
1
,
Name
:
'少儿类:主要以丰富可与时间和兴趣为主,要求课堂轻松活跃。趣味性十足'
},
{
Id
:
2
,
Name
:
'兴趣类:成年人,对日语学习从兴趣开始,要求课堂丰富有趣'
},
{
Id
:
3
,
Name
:
'实用类:对于日语学习有一定的需求(考研、就业等),要求学习过程专业,干货多'
},
{
Id
:
4
,
Name
:
'留学类:打算去往日本留学(本科、硕士、语言学校、私塾等)'
}],
TrialList
:
[]
//试听课程下拉数据
}
},
mounted
()
{
let
nowDay
=
new
Date
();
var
year
=
nowDay
.
getFullYear
();
//年
var
month
=
nowDay
.
getMonth
()
+
1
;
//月
var
day
=
nowDay
.
getDate
();
//日
if
(
month
<
10
)
{
month
=
'0'
+
month
}
this
.
objOption
.
ClassDate
=
year
+
'-'
+
month
+
'-'
+
day
;
this
.
GetTeacherList
();
this
.
getClassRoomList
();
this
.
GetTrialDrop
();
this
.
initObj
()
},
methods
:
{
GetTrialDrop
()
{
GetTrialLessonList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TrialList
=
res
.
Data
;
}
});
},
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
ReserveClassId
>
0
)
{
GetReserveClass
({
ReserveClassId
:
this
.
saveObj
.
ReserveClassId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
objOption
.
ReserveClassId
=
res
.
Data
.
ReserveClassId
;
this
.
objOption
.
TeacherId
=
res
.
Data
.
TeacherId
;
this
.
objOption
.
ClassDate
=
res
.
Data
.
ClassDateStr
;
this
.
objOption
.
ClassTime
=
res
.
Data
.
ClassTime
;
this
.
objOption
.
EndTime
=
res
.
Data
.
EndTime
;
this
.
objOption
.
ClassRoomId
=
res
.
Data
.
ClassRoomId
;
this
.
objOption
.
TrialLessonId
=
res
.
Data
.
TrialLessonId
;
this
.
objOption
.
ClassContent
=
res
.
Data
.
ClassContent
;
}
else
{
let
nowDay
=
new
Date
();
var
year
=
nowDay
.
getFullYear
();
//年
var
month
=
nowDay
.
getMonth
()
+
1
;
//月
var
day
=
nowDay
.
getDate
();
//日
this
.
objOption
.
ClassDate
=
year
+
'-'
+
month
+
'-'
+
day
;
this
.
objOption
.
TeacherId
=
''
;
this
.
objOption
.
ClassTime
=
''
;
this
.
objOption
.
EndTime
=
''
;
this
.
objOption
.
ClassRoomId
=
''
;
this
.
objOption
.
ClassContent
=
''
;
this
.
objOption
.
TrialLessonId
=
""
;
}
})
}
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
//保存菜单
saveCategory
()
{
if
(
this
.
objOption
.
ClassDate
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择预约日期`
})
return
}
if
(
this
.
objOption
.
ClassTime
==
''
||
this
.
objOption
.
ClassTime
==
null
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择预约开始时间`
})
return
}
if
(
this
.
objOption
.
EndTime
==
''
||
this
.
objOption
.
EndTime
==
null
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择预约结束时间`
})
return
}
if
(
this
.
objOption
.
TeacherId
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择教师`
})
return
}
if
(
this
.
objOption
.
ClassRoomId
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择关联教室`
})
return
}
if
(
this
.
objOption
.
TrialLessonId
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择试听课程`
})
return
}
this
.
saveLoading
=
true
;
SetReserveClass
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
res
.
Data
;
}
});
},
//获取教室下拉
getClassRoomList
()
{
queryClassRoomList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
ClassRoomList
=
res
.
Data
;
}
})
},
}
}
</
script
>
\ No newline at end of file
src/pages/activity/QuesActivityList.vue
0 → 100644
View file @
5138f4e2
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
dense
filled
v-model=
"msg.Title"
label=
"问卷调查名称"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
filled
dense
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.PrizeType"
ref=
"SurveyType"
:options=
"platList"
emit-value
map-options
label=
"领奖方式"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-right-column-table sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top
>
<div
class=
"col-2 q-table__title"
>
问卷信息
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
icon=
"add"
label=
"新增"
@
click=
"addObj(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-StartDateStr=
"props"
>
<q-td
:props=
"props"
>
<div>
{{
props
.
row
.
StartDateStr
}}
</div>
<div>
{{
props
.
row
.
EndDateStr
}}
</div>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-view"
color=
"accent"
style=
"font-weight:400"
label=
"意见调查表"
@
click=
"GoYijian(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"addObj(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
@
click=
"delQuestion(props.row)"
/>
</q-td>
</
template
>
</q-table>
<quesactive-form
v-if=
"isShowWenjuan"
:save-obj=
"objOption"
@
close=
"closeSaveForm"
@
success=
"resetSearch"
>
</quesactive-form>
</div>
</div>
</template>
<
script
>
import
quesactiveForm
from
'../../components/activity/quesactive-form'
export
default
{
meta
:
{
title
:
"活动列表"
},
components
:
{
quesactiveForm
},
data
()
{
return
{
columns
:
[{
name
:
'ID'
,
label
:
'ID'
,
align
:
'left'
,
field
:
'ID'
},
{
name
:
'Title'
,
label
:
'活动信息'
,
field
:
'Title'
,
align
:
'left'
},
{
name
:
'StartDateStr'
,
label
:
'活动时间'
,
field
:
'StartDateStr'
,
align
:
'left'
},
{
name
:
'PrizeTypeStr'
,
label
:
'领奖方式'
,
field
:
'PrizeTypeStr'
,
align
:
'left'
},
{
name
:
'PrizeAddress'
,
label
:
'领奖地址'
,
field
:
'PrizeAddress'
,
align
:
'left'
},
{
name
:
'Description'
,
label
:
'奖品说明'
,
field
:
'Description'
,
align
:
'left'
},
{
name
:
'SurveyNum'
,
label
:
'问卷调查份数'
,
field
:
'SurveyNum'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'TId'
}
],
dataList
:
[],
loading
:
true
,
msg
:
{
pageIndex
:
1
,
pageSize
:
20
,
PrizeType
:
0
,
Title
:
''
,
},
platList
:
[],
pageCount
:
0
,
isShowWenjuan
:
false
,
objOption
:
null
,
}
},
created
()
{},
mounted
()
{
this
.
GetPrizeTypeEnumList
();
this
.
getList
();
},
methods
:
{
GetPrizeTypeEnumList
()
{
this
.
apipostDS
(
"/api/Survey/GetPrizeTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
platList
=
res
.
data
.
data
;
let
obj
=
{
Id
:
0
,
Name
:
'不限'
}
this
.
platList
.
unshift
(
obj
);
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
res
.
data
.
message
})
}
})
},
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
getList
()
{
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/Survey/GetActivitySurveyPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
pageCount
=
res
.
data
.
data
.
pageCount
;
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
res
.
data
.
message
})
}
})
},
addObj
(
obj
)
{
if
(
obj
)
{
this
.
objOption
=
obj
}
else
{
this
.
objOption
=
null
}
this
.
isShowWenjuan
=
true
;
},
//删除问卷
delQuestion
(
row
)
{
let
that
=
this
;
this
.
$q
.
dialog
({
title
:
"提示"
,
message
:
'是否删除该活动信息?'
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
that
.
apipostDS
(
"/api/Survey/DelActivitySurvey"
,
{
ID
:
row
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据删除成功!'
,
position
:
'top'
})
that
.
getList
();
}
else
{
that
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
res
.
data
.
message
})
}
},
);
});
},
closeSaveForm
()
{
this
.
isShowWenjuan
=
false
;
},
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//跳转到意见调查表
GoYijian
(
row
)
{
this
.
OpenNewUrl
(
'/activity/questionnaireList'
,
{
ID
:
row
.
ID
});
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/activity/questionnaireList.vue
0 → 100644
View file @
5138f4e2
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
filled
v-model=
"msg.Title"
label=
"问卷调查名称"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
clearable
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.SurveyType"
ref=
"SurveyType"
:options=
"platList"
emit-value
map-options
label=
"类型"
:dense=
"false"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
filled
v-model=
"msg.IsShow"
:options=
"ShowOpts"
emit-value
map-options
label=
"是否显示"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-right-column-table sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top
>
<div
class=
"col-2 q-table__title"
>
问卷信息
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
icon=
"add"
label=
"新增"
@
click=
"addObj(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-IsRequired=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.IsRequired==0"
>
否
</span>
<span
v-if=
"props.row.IsRequired==1"
>
是
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-IsShow=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.IsShow==0"
>
是
</span>
<span
v-if=
"props.row.IsShow==1"
>
否
</span>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"addObj(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
@
click=
"delQuestion(props.row)"
/>
</q-td>
</
template
>
</q-table>
<wenjuan-form
v-if=
"isShowWenjuan"
:save-obj=
"objOption"
@
close=
"closeSaveForm"
@
success=
"resetSearch"
></wenjuan-form>
</div>
</div>
</template>
<
script
>
import
wenjuanForm
from
'../../components/activity/wenjuan-form'
export
default
{
meta
:
{
title
:
"问卷调查"
},
components
:
{
wenjuanForm
},
data
()
{
return
{
columns
:
[
{
name
:
'ID'
,
label
:
'ID'
,
align
:
'left'
,
field
:
'ID'
},
{
name
:
'Title'
,
label
:
'问题名称'
,
field
:
'Title'
,
align
:
'left'
},
{
name
:
'FormTypeStr'
,
label
:
'问卷类型'
,
field
:
'FormTypeStr'
,
align
:
'left'
},
{
name
:
'IsRequired'
,
label
:
'是否必填'
,
field
:
'IsRequired'
,
align
:
'left'
},
{
name
:
'IsShow'
,
label
:
'是否显示'
,
field
:
'IsShow'
,
align
:
'left'
},
{
name
:
'Sort'
,
label
:
'排序'
,
field
:
'Sort'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'TId'
}
],
dataList
:
[],
loading
:
true
,
ShowOpts
:
[{
label
:
'不限'
,
value
:
'-1'
},
{
label
:
'是'
,
value
:
'0'
},
{
label
:
'否'
,
value
:
'1'
}
],
msg
:{
pageIndex
:
1
,
pageSize
:
15
,
rowsPerPage
:
15
,
PrizeType
:
0
,
Title
:
''
,
IsShow
:
'-1'
,
SurveyType
:
0
,
ActivitySurveyId
:
0
,
//活动id
},
platList
:[],
pageCount
:
0
,
isShowWenjuan
:
false
,
objOption
:
null
,
}
},
created
()
{
},
mounted
()
{
this
.
getPlat
();
this
.
getList
();
},
methods
:
{
getPlat
(){
this
.
apipostDS
(
"/api/Survey/GetSurveyTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
platList
=
res
.
data
.
data
;
let
obj
=
{
Id
:
0
,
Name
:
'不限'
}
this
.
platList
.
unshift
(
obj
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
getList
(){
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/Survey/GetPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
pageCount
=
res
.
data
.
data
.
pageCount
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
addObj
(){
},
//删除问卷
delQuestion
(){
},
closeSaveForm
(){
this
.
isShowWenjuan
=
false
;
},
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/pages/activity/resultPageList.vue
0 → 100644
View file @
5138f4e2
<
template
>
<div
class=
"resultPageList"
>
<div
class=
"el-card__header"
><span>
问卷调查列表
</span></div>
<div
class=
"content"
>
<div
style=
"display: flex;flex-direction: row;align-items: center"
>
<div
class=
"block"
>
<div
class=
"searchInput"
style=
"width:250px"
>
<el-input
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入昵称搜索"
v-model=
"msg.AliasName"
size=
"small"
@
clear=
"getList"
@
keyup
.
enter
.
native=
"getList"
clearable
></el-input><span
@
click=
"getList"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div><span>
填写时间:
</span>
<el-date-picker
v-model=
"dateList"
@
change=
"getList()"
size=
"small"
type=
"datetimerange"
range-separator=
"至"
value-format=
"yyyy-MM-dd"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</div>
</div>
</div>
<div
style=
"padding: 20px;background: #fff;"
>
<el-table
:data=
"tableData"
header-cell-class-name=
"headClass"
style=
"width: 100%"
border
>
<el-table-column
prop=
"ID"
label=
"ID"
width=
"100"
></el-table-column>
<el-table-column
prop=
"ActiveSurveyName"
label=
"活动名称"
></el-table-column>
<el-table-column
prop=
"AliasName"
label=
"信息"
><template
slot-scope=
"scope"
>
<div
class=
"app-image"
:style=
"
{backgroundImage:'url(' + scope.row.Photo + ')',backgroundSize:'cover'}">
</div>
<div
flex=
"dir:left cross:center"
>
{{
scope
.
row
.
AliasName
}}
</div>
</
template
></el-table-column>
<el-table-column
label=
"创建时间"
prop=
"CreateDateStr"
></el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"180"
><
template
slot-scope=
"scope"
>
<!--
<el-tooltip
class=
"item"
effect=
"dark"
content=
"详情"
placement=
"top"
><img
src=
"../../assets/img/userman/detail.png"
alt=
""
class=
"imgstyle"
@
click=
"grant(scope.row)"
>
</el-tooltip>
-->
</
template
></el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"count"
></el-pagination>
</div>
<el-dialog
title=
"用户问卷调查详情"
:visible
.
sync=
"dialogVisible"
width=
"600px"
>
<div
class=
"wjstyle"
v-if=
"xqdata!=null"
>
<div
class=
"row"
style=
"font-size: 16px;margin-bottom: 10px"
><img
:src=
"xqdata.obj.Photo"
alt=
""
style=
"width: 50px;height: 50px;margin-right: 10px"
>
{{xqdata.obj.Name}}
</div>
<div>
创建时间: {{xqdata.obj.CreateDateStr}}
</div>
<div
style=
"font-size: 16px;margin: 10px 0 ;font-weight: bold"
>
用户信息
</div>
<div
v-for=
"(item,index) in xqdata.baseList"
:key=
"index"
>
<div>
{{index+1}}、 {{item.Title}}
</div>
<div
v-if=
"item.SurveyType==4"
style=
"margin: 10px 0;"
>
<el-input
v-if=
"item.FormType==2"
type=
"textarea"
placeholder=
"请输入内容"
v-model=
"item.TextContent"
:rows=
"3"
size=
"small"
:disabled=
"true"
></el-input>
<el-input
v-if=
"item.FormType==1"
type=
"text"
placeholder=
"请输入内容"
v-model=
"item.TextContent"
size=
"small"
:disabled=
"true"
></el-input>
</div>
<!-- 单选 -->
<div
v-if=
"item.SurveyType==2|| item.SurveyType==3"
style=
"margin: 10px 0;"
>
<el-checkbox
v-model=
"x.IsCheck==1?true:false"
disabled
v-for=
"(x,y) in item.SurveyOptionsList"
:key=
"y"
>
{{x.OptionsName}}
</el-checkbox>
</div>
<div
v-if=
"item.SurveyType==1"
style=
"margin: 10px 0;"
>
<el-rate
v-model=
"item.ScoreNum"
disabled
show-score
text-color=
"#ff9900"
score-template=
"{value}分"
>
</el-rate>
</div>
</div>
<div
style=
"font-size: 16px;margin: 10px 0 ;font-weight: bold"
>
问卷调查表信息
</div>
<div
v-for=
"(item,index) in xqdata.surverList"
:key=
"index"
>
<div>
{{index+1}}、 {{item.Title}}
</div>
<div
v-if=
"item.SurveyType==4"
style=
"margin: 10px 0;"
>
<el-input
v-if=
"item.FormType==2"
type=
"textarea"
placeholder=
"请输入内容"
v-model=
"item.TextContent"
:rows=
"3"
size=
"small"
:disabled=
"true"
></el-input>
<el-input
v-if=
"item.FormType==1"
type=
"text"
placeholder=
"请输入内容"
v-model=
"item.TextContent"
size=
"small"
:disabled=
"true"
></el-input>
</div>
<!-- 单选 -->
<div
v-if=
"item.SurveyType==2|| item.SurveyType==3"
style=
"margin: 10px 0;"
>
<el-checkbox
v-model=
"x.IsCheck==1?true:false"
disabled
v-for=
"(x,y) in item.SurveyOptionsList"
:key=
"y"
>
{{x.OptionsName}}
</el-checkbox>
</div>
<div
v-if=
"item.SurveyType==1"
style=
"margin: 10px 0;"
>
<el-rate
v-model=
"item.ScoreNum"
disabled
show-score
text-color=
"#ff9900"
score-template=
"{value}分"
>
</el-rate>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
name
:
"resultPageList"
,
data
()
{
return
{
msg
:
{
pageIndex
:
1
,
pageSize
:
20
,
AliasName
:
''
,
StartDate
:
''
,
EndDate
:
''
,
}
,
tableData
:
[],
count
:
0
,
loading
:
false
,
dateList
:
[],
dialogVisible
:
false
,
xqdata
:
null
,
}
}
,
created
()
{
this
.
getDateList
();
}
,
methods
:
{
getDateList
()
{
this
.
loading
=
true
;
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
)
{
this
.
msg
.
StartDate
=
this
.
dateList
[
0
];
this
.
msg
.
EndDate
=
this
.
dateList
[
1
];
}
else
{
this
.
msg
.
StartDate
=
''
;
this
.
msg
.
EndDate
=
''
;
}
this
.
apipost
(
"/api/Survey/GetResultPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
tableData
=
res
.
data
.
data
.
pageData
;
this
.
count
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
}
)
},
getList
()
{
this
.
msg
.
pageIndex
=
1
this
.
getDateList
();
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getDateList
();
},
grant
(
row
)
{
this
.
apipost
(
"/api/Survey/GetGuestSurveyDetails"
,
{
SurveyID
:
row
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
xqdata
=
res
.
data
.
data
;
this
.
dialogVisible
=
true
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
}
)
}
}
}
</
script
>
<
style
>
.resultPageList
.el-card__header
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#fff
;
}
.resultPageList
.el-button--small
{
padding
:
9px
15px
;
}
.resultPageList
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
margin-left
:
20px
;
}
.resultPageList
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.resultPageList
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
}
.resultPageList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
15px
;
box-sizing
:
border-box
;
}
.resultPageList
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
.resultPageList
.wjstyle
{
width
:
100%
;
;
}
</
style
>
src/router/routes.js
View file @
5138f4e2
...
...
@@ -1180,6 +1180,21 @@ const routes = [{
component
:
()
=>
import
(
"pages/activity/myadvert.vue"
)
},
{
path
:
"/activity/QuesActivityList"
,
// 活动 官方活动列表
component
:
()
=>
import
(
"pages/activity/QuesActivityList.vue"
)
},
{
path
:
"/activity/questionnaireList"
,
//问卷调查表
component
:
()
=>
import
(
"pages/activity/questionnaireList.vue"
)
},
{
path
:
"/activity/resultPageList"
,
//查看结果
component
:
()
=>
import
(
"pages/activity/resultPageList.vue"
)
},
{
path
:
"/sale/appointManagement"
,
//销售 约课管理
component
:
()
=>
...
...
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