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
98289a26
Commit
98289a26
authored
Apr 07, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
12e7fabe
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
430 additions
and
15 deletions
+430
-15
quesactive-form.vue
src/components/activity/quesactive-form.vue
+167
-0
wenjuan-form.vue
src/components/activity/wenjuan-form.vue
+0
-0
QuesActivityList.vue
src/pages/activity/QuesActivityList.vue
+238
-0
questionnaireList.vue
src/pages/activity/questionnaireList.vue
+20
-15
routes.js
src/router/routes.js
+5
-0
No files found.
src/components/activity/quesactive-form.vue
0 → 100644
View file @
98289a26
<
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 @
98289a26
src/pages/activity/QuesActivityList.vue
0 → 100644
View file @
98289a26
<
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
View file @
98289a26
...
...
@@ -40,31 +40,31 @@
<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">
<
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>
-->
</
template
>
</q-table>
<!-- <teacher-form v-if="persistent" :save-obj="objOption" @close="closeSaveForm" @success="RefreshPage">
</teacher-form> -->
<wenjuan-form
v-if=
"isShowWenjuan"
:save-obj=
"objOption"
@
close=
"closeSaveForm"
@
success=
"resetSearch"
></wenjuan-form>
</div>
</div>
</template>
<
script
>
// import teacherForm from '../../components/school/teacher/teacher
-form'
import
wenjuanForm
from
'../../components/activity/wenjuan
-form'
export
default
{
meta
:
{
title
:
"问卷调查"
},
components
:
{
// teacher
Form
wenjuan
Form
},
data
()
{
return
{
...
...
@@ -138,7 +138,7 @@
},
platList
:[],
pageCount
:
0
,
persistent
:
false
,
isShowWenjuan
:
false
,
objOption
:
null
,
}
},
...
...
@@ -164,7 +164,6 @@
})
},
resetSearch
()
{
this
.
loading
=
true
;
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
...
...
@@ -182,12 +181,18 @@
},
addObj
(){
}
// changePage(val) {
// this.msg.pageIndex = val;
// this.loading = true;
// this.getTeacher();
// },
},
//删除问卷
delQuestion
(){
},
closeSaveForm
(){
this
.
isShowWenjuan
=
false
;
},
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
},
}
</
script
>
...
...
src/router/routes.js
View file @
98289a26
...
...
@@ -1180,6 +1180,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/activity/myadvert.vue"
)
},
{
path
:
"/activity/QuesActivityList"
,
// 活动 官方活动列表
component
:
()
=>
import
(
"pages/activity/QuesActivityList.vue"
)
},
{
path
:
"/activity/questionnaireList"
,
//问卷调查表
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