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
a60f0c00
Commit
a60f0c00
authored
Jul 19, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
5f26064d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2604 additions
and
2551 deletions
+2604
-2551
common.js
src/api/common/common.js
+57
-14
index.js
src/api/school/index.js
+1
-1
stufollowlistNew.vue
src/components/school/student/stufollowlistNew.vue
+51
-62
survey-form.vue
src/components/system/survey-form.vue
+39
-27
surveyStudentList-form.vue
src/components/system/surveyStudentList-form.vue
+53
-71
survey.vue
src/pages/system/survey.vue
+70
-53
surveyStudent.vue
src/pages/system/surveyStudent.vue
+179
-168
surveyStudentList.vue
src/pages/system/surveyStudentList.vue
+41
-47
routes.js
src/router/routes.js
+2113
-2108
No files found.
src/api/common/common.js
View file @
a60f0c00
...
...
@@ -444,13 +444,56 @@ export function saveArea(data) {
})
}
/**
* 获取问卷调查主表分页列表
*/
export
function
queryEducationSurveyMainPage
(
data
)
{
return
request
({
url
:
'/EduSurvey/GetEducationSurveyMainPage'
,
method
:
'post'
,
data
})
}
/**
* 获取问卷调查主表列表
*/
export
function
queryEducationSurveyMainList
(
data
)
{
return
request
({
url
:
'/EduSurvey/GetEducationSurveyMainList'
,
method
:
'post'
,
data
})
}
/**
* 根据编号删除问卷
*/
export
function
deleteEducationSurveyMain
(
data
)
{
return
request
({
url
:
'/EduSurvey/RemoveEducationSurveyMain'
,
method
:
'post'
,
data
})
}
/**
* 新增修改问卷调查
*/
export
function
saveEducationSurveyMain
(
data
)
{
return
request
({
url
:
'/EduSurvey/SetEducationSurveyMain'
,
method
:
'post'
,
data
})
}
/**
* 获取学生问卷调查信息分页列表
*/
export
function
querySurveyPage
(
data
)
{
export
function
querySurvey
Question
Page
(
data
)
{
return
request
({
url
:
'/
Survey/GetPageList
'
,
url
:
'/
EduSurvey/GetSurveyQuestionPage
'
,
method
:
'post'
,
data
})
...
...
@@ -459,9 +502,9 @@ export function querySurveyPage(data) {
/**
* 根据编号获取学生问卷调查信息详情
*/
export
function
querySurvey
Info
(
data
)
{
export
function
querySurvey
Question
(
data
)
{
return
request
({
url
:
'/
Survey/GetSurvey
'
,
url
:
'/
EduSurvey/GetSurveyQuestion
'
,
method
:
'post'
,
data
})
...
...
@@ -471,7 +514,7 @@ export function querySurveyInfo(data) {
*/
export
function
queryGuestSurvey
(
data
)
{
return
request
({
url
:
'/Survey/GetGuestSurvey'
,
url
:
'/
Edu
Survey/GetGuestSurvey'
,
method
:
'post'
,
data
})
...
...
@@ -479,9 +522,9 @@ export function queryGuestSurvey(data) {
/**
* 根据编号删除学生问卷调查信息
*/
export
function
deleteSurvey
(
data
)
{
export
function
deleteSurvey
Question
(
data
)
{
return
request
({
url
:
'/
Survey/DelSurvey
'
,
url
:
'/
EduSurvey/DelSurveyQuestion
'
,
method
:
'post'
,
data
})
...
...
@@ -490,9 +533,9 @@ export function deleteSurvey(data) {
/**
* 新增修改学生问卷调查信息
*/
export
function
saveSurvey
(
data
)
{
export
function
saveSurvey
Question
(
data
)
{
return
request
({
url
:
'/
Survey/SetSurvey
'
,
url
:
'/
EduSurvey/SetSurveyQuestion
'
,
method
:
'post'
,
data
})
...
...
@@ -502,7 +545,7 @@ export function saveSurvey(data) {
*/
export
function
querySurveyShowList
(
data
)
{
return
request
({
url
:
'/Survey/GetSurveyShowList'
,
url
:
'/
Edu
Survey/GetSurveyShowList'
,
method
:
'post'
,
data
})
...
...
@@ -513,7 +556,7 @@ export function querySurveyShowList(data) {
*/
export
function
queryStudentSurveyPage
(
data
)
{
return
request
({
url
:
'/Survey/GetStudentSurveyPage'
,
url
:
'/
Edu
Survey/GetStudentSurveyPage'
,
method
:
'post'
,
data
})
...
...
@@ -522,9 +565,9 @@ export function queryStudentSurveyPage(data) {
/**
* 填写意见调查表信息
*/
export
function
setEducationSurvey
(
data
)
{
export
function
set
Stu
EducationSurvey
(
data
)
{
return
request
({
url
:
'/
Survey/Set
EducationSurvey'
,
url
:
'/
EduSurvey/SetStu
EducationSurvey'
,
method
:
'post'
,
data
})
...
...
@@ -534,7 +577,7 @@ export function setEducationSurvey(data) {
*/
export
function
querySurveyTypeEnumList
(
data
)
{
return
request
({
url
:
'/Survey/GetSurveyTypeEnumList'
,
url
:
'/
Edu
Survey/GetSurveyTypeEnumList'
,
method
:
'post'
,
data
})
...
...
src/api/school/index.js
View file @
a60f0c00
...
...
@@ -355,7 +355,7 @@ export function saveStudentBaseInfo(data) {
*/
export
function
queryQrCodeImage
(
data
)
{
return
request
({
url
:
'/Survey/GetQrCodeImage'
,
url
:
'/
Edu
Survey/GetQrCodeImage'
,
method
:
'post'
,
data
})
...
...
src/components/school/student/stufollowlistNew.vue
View file @
a60f0c00
...
...
@@ -178,24 +178,22 @@
<!-- <div class="text-blue cursor-pointer" @click="getStudentSurvey(item)">
问卷调查
</div> -->
<div
class=
"text-blue cursor-pointer"
>
<div
push
flat
color=
"text-blue cursor-pointer"
@
click=
"getStudentSurveyImg(item,index)"
>
<
!-- <
div class="text-blue cursor-pointer">
<div push flat
color="text-blue cursor-pointer"
@click="getStudentSurveyImg(item,index)">
问卷调查
<q-popup-proxy>
<div
style=
"width:185px;padding:10px;border-radius:8px"
>
<q-img
:src=
"item.QrCodeUrl"
>
<
template
v-slot:loading
>
<div
class=
"text-subtitle1 text-white"
>
Loading...
</div>
</
template
>
</q-img>
</div>
</q-popup-proxy>
<q-popup-proxy>
<div style="width:185px;padding:10px;border-radius:8px">
<q-img :src="item.QrCodeUrl">
<template v-slot:loading>
<div class="text-subtitle1 text-white">
Loading...
</div>
</template>
</q-img>
</div>
</q-popup-proxy>
</div>
</div
>
</div> --
>
</td>
</tr>
</template>
...
...
@@ -209,10 +207,6 @@
</div>
<studentRight-form
v-if=
"isShowStuRight"
:BelongType=
"BelongType"
:save-obj=
"stuOption"
@
close=
"closeStuForm"
@
success=
"refreshTable"
>
</studentRight-form>
...
...
@@ -260,18 +254,15 @@
<q-dialog
v-if=
"isShowQrCode"
>
<
template
>
<div
class=
"q-pa-md"
>
<q-img
:src=
"QrCodeUrl"
style=
"height: 140px; max-width: 150px"
>
<template
v-slot:loading
>
<div
class=
"text-subtitle1 text-white"
>
Loading...
</div>
</
template
>
</q-img>
</div>
</template>
<q-img
:src=
"QrCodeUrl"
style=
"height: 140px; max-width: 150px"
>
<template
v-slot:loading
>
<div
class=
"text-subtitle1 text-white"
>
Loading...
</div>
</
template
>
</q-img>
</div>
</template>
</q-dialog>
</div>
</template>
...
...
@@ -283,7 +274,7 @@
}
from
"../../../api/sale/sale"
;
import
{
saveStudentBaseInfo
,
//保存学员信息
queryQrCodeImage
,
//问卷调查二维码生成
queryQrCodeImage
,
//问卷调查二维码生成
}
from
"../../../api/school/index"
;
import
UeEditor
from
"../../editor/UeEditor"
;
export
default
{
...
...
@@ -322,8 +313,8 @@
isShowStuFU
:
false
,
isShowStuRight
:
false
,
isShowStuBaseInfo
:
false
,
isShowQrCode
:
false
,
QrCodeUrl
:
""
,
isShowQrCode
:
false
,
QrCodeUrl
:
""
,
stuloading
:
false
,
//学习目的列表
goalsList
:
[],
...
...
@@ -395,38 +386,36 @@
this
.
OpenNewUrl
(
'/teacher/studentStudy'
,
qObj
)
},
//点击生成二维码
getStudentSurveyImg
(
obj
,
index
)
{
// console.log(this.$refs.qDateProxy[index],'--');
// this.$refs.qDateProxy[index].show()
getStudentSurveyImg
(
obj
,
index
)
{
if
(
this
.
dataObj
.
RList
[
index
].
QrCodeUrl
===
""
)
{
let
codeMsg
=
{
pUrl
:
"system/surveyStudent"
,
StudentId
:
obj
.
StuId
,
StuName
:
obj
.
StuName
}
queryQrCodeImage
(
codeMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
isShowQrCode
=
true
;
this
.
dataObj
.
RList
[
index
].
QrCodeUrl
=
"data:image/png;base64,"
+
res
.
Data
console
.
log
(
"res"
,
res
);
// this.stuloading = false;
// this.isShowStuBaseInfo = false;
codeMsg
=
{};
let
codeMsg
=
{
pUrl
:
"system/surveyStudent"
,
StudentId
:
obj
.
StuId
,
StuName
:
obj
.
StuName
,
MainId
:
0
,
}
});
queryQrCodeImage
(
codeMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
isShowQrCode
=
true
;
this
.
dataObj
.
RList
[
index
].
QrCodeUrl
=
"data:image/png;base64,"
+
res
.
Data
codeMsg
=
{};
}
});
}
},
//点击生成二维码,先跳转到页面吧
getStudentSurvey
(
obj
)
{
//点击生成二维码,先跳转到页面吧
getStudentSurvey
(
obj
)
{
let
nowUserInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
"loginUserInfo"
)).
data
var
qObj
=
{
StuId
:
obj
.
StuId
,
StuName
:
obj
.
StuName
,
GuestId
:
obj
.
GuestId
,
CourseRateName
:
obj
.
CourseRateName
,
Group_Id
:
nowUserInfo
.
Group_Id
};
this
.
OpenNewUrl
(
'/system/surveyStudent'
,
qObj
)
var
qObj
=
{
StuId
:
obj
.
StuId
,
StuName
:
obj
.
StuName
,
GuestId
:
obj
.
GuestId
,
CourseRateName
:
obj
.
CourseRateName
,
Group_Id
:
nowUserInfo
.
Group_Id
};
this
.
OpenNewUrl
(
'/system/surveyStudent'
,
qObj
)
},
//清除
clearMsg
()
{
...
...
src/components/system/survey-form.vue
View file @
a60f0c00
...
...
@@ -33,15 +33,16 @@
</div>
<div
v-for=
"(sItem,sIndex) in objOption.SurveyOptionsList"
:key=
"sIndex"
>
<div
class=
"row wrap"
>
<q-input
filled
class=
"col-10 q-pr-lg q-pb-lg"
v-model=
"sItem.OptionsName"
:label=
"`选项$
{sIndex+1}`" :dense="false">
</q-input>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"sItem.Sort"
class=
"col-2 q-pr-lg q-pb-lg"
label=
"排序"
:rules=
"[val => !!val || '请输入排序']"
>
<q-input
filled
class=
"col-10 q-pr-lg q-pb-lg"
v-model=
"sItem.OptionsName"
:label=
"`选项$
{sIndex+1}`"
:dense="false">
</q-input>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"sItem.Sort"
class=
"col-2 q-pr-lg q-pb-lg"
label=
"排序"
:rules=
"[val => !!val || '请输入排序']"
>
<template
v-slot:append
>
<q-btn
round
dense
flat
icon=
"delete"
@
click=
"delSurveyOptions(sIndex)"
/>
<q-btn
round
dense
flat
icon=
"delete"
@
click=
"delSurveyOptions(sIndex)"
/>
</
template
>
</q-input>
</div>
</div>
</div>
</template>
</q-card-section>
<q-separator
/>
...
...
@@ -55,36 +56,44 @@
</template>
<
script
>
import
{
number
}
from
'echarts'
;
import
{
querySurveyTypeEnumList
,
saveSurvey
,
querySurvey
Info
saveSurvey
Question
,
querySurvey
Question
}
from
'../../api/common/common'
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
},
MainId
:
{
type
:
number
,
default
:
0
,
}
},
data
()
{
return
{
persistent
:
true
,
objOption
:
{
MainId
:
0
,
ID
:
0
,
//编号
Title
:
""
,
//问题名称
SurveyType
:
1
,
//问题类型见枚举参数
Sort
:
0
,
//排序
IsShow
:
1
,
//0-不显示,1-显示
SurveyOptionsList
:[],
SurveyOptionsList
:
[],
},
optionTitle
:
""
,
SurveyTypeEnumList
:
[],
//问题类型
saveLoading
:
false
,
SurveyOptionsItem
:{
ID
:
0
,
OptionsName
:
""
,
Sort
:
0
,
SurveyOptionsItem
:
{
ID
:
0
,
OptionsName
:
""
,
Sort
:
0
,
}
}
},
...
...
@@ -96,18 +105,18 @@
this
.
initObj
()
},
methods
:
{
delSurveyOptions
(
index
){
delSurveyOptions
(
index
)
{
this
.
objOption
.
SurveyOptionsList
.
splice
(
index
,
1
);
if
(
this
.
objOption
&&
this
.
objOption
.
SurveyOptionsList
&&
this
.
objOption
.
SurveyOptionsList
.
length
>
0
)
{
this
.
objOption
.
SurveyOptionsList
.
forEach
((
item
,
index
)
=>
{
item
.
Sort
=
index
+
1
;
});
if
(
this
.
objOption
&&
this
.
objOption
.
SurveyOptionsList
&&
this
.
objOption
.
SurveyOptionsList
.
length
>
0
)
{
this
.
objOption
.
SurveyOptionsList
.
forEach
((
item
,
index
)
=>
{
item
.
Sort
=
index
+
1
;
});
}
},
addSurveyOptions
(){
addSurveyOptions
()
{
this
.
objOption
.
SurveyOptionsList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
SurveyOptionsItem
)));
this
.
objOption
.
SurveyOptionsList
.
forEach
((
item
,
index
)
=>
{
item
.
Sort
=
index
+
1
;
this
.
objOption
.
SurveyOptionsList
.
forEach
((
item
,
index
)
=>
{
item
.
Sort
=
index
+
1
;
});
},
...
...
@@ -123,13 +132,14 @@
this
.
objOption
.
ProviceId
=
""
;
this
.
objOption
.
CityId
=
""
;
},
//初始化表单
initObj
()
{
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
ID
>
0
)
{
querySurvey
Info
({
querySurvey
Question
({
SurveyID
:
this
.
saveObj
.
ID
}).
then
(
res
=>
{
var
tempData
=
res
.
Data
;
this
.
objOption
.
MainId
=
tempData
.
MainId
;
this
.
objOption
.
ID
=
tempData
.
ID
;
this
.
objOption
.
Title
=
tempData
.
Title
;
this
.
objOption
.
SurveyType
=
tempData
.
SurveyType
;
...
...
@@ -140,11 +150,12 @@
this
.
optionTitle
=
"修改学生意见调查"
}
else
{
this
.
optionTitle
=
"新增学生意见调查"
this
.
objOption
.
MainId
=
this
.
MainId
;
this
.
objOption
.
ID
=
0
;
this
.
objOption
.
Title
=
''
;
this
.
objOption
.
SurveyType
=
1
;
this
.
objOption
.
Sort
=
0
;
this
.
objOption
.
IsShow
=
1
;
this
.
objOption
.
IsShow
=
1
;
this
.
objOption
.
SurveyOptionsList
=
[];
}
},
...
...
@@ -156,7 +167,7 @@
//保存菜单
setSurvey
()
{
this
.
saveLoading
=
true
;
saveSurvey
(
this
.
objOption
).
then
(
res
=>
{
saveSurvey
Question
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
...
...
@@ -172,7 +183,8 @@
})
}
},
},
}
}
</
script
>
src/components/system/surveyStudentList-form.vue
View file @
a60f0c00
...
...
@@ -2,74 +2,69 @@
<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"
>
老师上课质量调查问卷
</div>
<div
class=
"text-h6"
>
{{
optionTitle
}}
老师上课质量调查问卷
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
老师上课质量调查问卷
</div>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
{{
optionTitle
}}
老师上课质量调查问卷
</div>
<div
class=
"row wrap"
style=
"margin-bottom:10px;"
>
<div
class=
"col-12"
>
<div
style=
"float:left;"
>
{{
saveObj
.
StudentName
}}
选择
评价的老师:
</div>
<div
class=
"col-12"
>
<div
style=
"float:left;"
>
{{
saveObj
.
StudentName
}}
评价的老师:
</div>
<div
style=
"text-decoration:underline;"
>
{{
saveObj
.
TeacherName
}}
</div>
</div>
</div>
<template
v-if=
"data&&data.length>0"
>
<div
v-for=
"(item,index) in data"
>
<div>
{{
index
+
1
}}
、
{{
item
.
Title
}}
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<template
v-if=
"item.SurveyType === 1"
>
<q-rating
v-model=
"item.ScoreNum"
size=
"1.5em"
icon=
"thumb_up"
min=
"1"
readonly
/>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==5"
>
非常满意
</span>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==4"
>
满意
</span>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==3"
>
感觉一般
</span>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==2"
>
不满意
</span>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==1"
>
非常不满意
</span>
</
template
>
<
template
v-if=
"item.SurveyType === 2"
>
<div
class=
"q-gutter-sm"
>
</div>
<template
v-if=
"data&&data.length>0"
>
<div
v-for=
"(item,index) in data"
>
<div>
{{
index
+
1
}}
、
{{
item
.
Title
}}
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<template
v-if=
"item.SurveyType === 1"
>
<q-rating
v-model=
"item.ScoreNum"
size=
"1.5em"
icon=
"thumb_up"
min=
"1"
readonly
/>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==5"
>
非常满意
</span>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==4"
>
满意
</span>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==3"
>
感觉一般
</span>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==2"
>
不满意
</span>
<span
class=
"ratestyle"
v-if=
"item.ScoreNum==1"
>
非常不满意
</span>
</
template
>
<
template
v-if=
"item.SurveyType === 2"
>
<div
class=
"q-gutter-sm"
>
<q-list>
<q-radio
v-for=
"(radio, rIndex) in item.SurveyOptionsList"
:key=
"rIndex"
disable
v-model=
"item.ScoreNum"
:label=
"radio.OptionsName"
:val=
"radio.ID"
/>
<q-radio
v-for=
"(radio, rIndex) in item.SurveyOptionsList"
:key=
"rIndex"
disable
v-model=
"item.ScoreNum"
:label=
"radio.OptionsName"
:val=
"radio.ID"
/>
</q-list>
</div>
</
template
>
<
template
v-if=
"item.SurveyType === 3
"
>
<div
class=
"q-gutter-sm"
>
<q-list>
<q-checkbox
v-for=
"(radio, rIndex) in item.SurveyOptionsList"
disable
:key=
"rIndex"
v-model=
"item.CheckInfo"
:val=
"radio.ID"
:label=
"radio.OptionsName"
/>
</
template
>
<
template
v-if=
"item.SurveyType === 3"
>
<div
class=
"q-gutter-sm
"
>
<q-list
>
<q-checkbox
v-for=
"(radio, rIndex) in item.SurveyOptionsList"
disable
:key=
"rIndex"
v-model=
"item.CheckInfo"
:val=
"radio.ID"
:label=
"radio.OptionsName"
/>
</q-list>
</div>
</
template
>
<
template
v-if=
"item.SurveyType === 4"
>
<q-input
type=
"textarea"
:rows=
"2"
:placeholder=
"$t('fnc.qsrneirong')"
v-model=
"item.TextContent"
disable
>
</q-input>
</
template
>
</
template
>
<
template
v-if=
"item.SurveyType === 4"
>
<q-field
label=
""
stack-label
>
<template
v-slot:control
>
<div
class=
"self-center full-width no-outline"
tabindex=
"0"
>
{{
item
.
TextContent
}}
</div>
</
template
>
</q-field>
<!-- <q-input type="textarea" :rows="2" v-model="item.TextContent" disable>
</q-input> -->
</template>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
</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-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
querySurveyTypeEnumList
,
saveSurvey
,
queryGuestSurvey
}
from
'../../api/common/common'
export
default
{
...
...
@@ -82,47 +77,34 @@
data
()
{
return
{
persistent
:
true
,
data
:[],
data
:
[],
optionTitle
:
""
,
SurveyTypeEnumList
:
[],
//问题类型
saveLoading
:
false
,
}
},
created
()
{
this
.
getSurveyTypeEnumList
();
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
//获取类型列表
getSurveyTypeEnumList
()
{
querySurveyTypeEnumList
({}).
then
(
res
=>
{
this
.
SurveyTypeEnumList
=
res
.
Data
;
})
},
//初始化表单
initObj
()
{
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
ID
>
0
)
{
queryGuestSurvey
({
SurveyID
:
this
.
saveObj
.
ID
}).
then
(
res
=>
{
this
.
data
=
res
.
Data
;
this
.
data
=
res
.
Data
.
surverList
;
this
.
optionTitle
=
res
.
Data
.
Title
;
})
}
}
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
},
}
</
script
>
\ No newline at end of file
},
}
</
script
>
src/pages/system/survey.vue
View file @
a60f0c00
...
...
@@ -12,11 +12,10 @@
@
input=
"refreshPage()"
/>
</div>
<div
class=
"col-3"
>
<q-select
filled
stack-label
class=
"col-6 q-pr-lg"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.IsShow"
:options=
"ShowList"
emit-value
map-options
label=
"是否显示"
@
input=
"refreshPage()"
/>
<q-select
filled
stack-label
class=
"col-6 q-pr-lg"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.IsShow"
:options=
"ShowList"
emit-value
map-options
label=
"是否显示"
@
input=
"refreshPage()"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
...
...
@@ -26,67 +25,63 @@
<div
class=
"col-2 q-table__title"
>
问卷调查信息
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
push
flat
color=
"accent"
class=
"q-mr-md bg-accent text-white"
icon=
"edit"
label=
"问卷调查二维码"
size=
"sm"
@
click=
"getStudentSurveyImg()"
>
<q-popup-proxy>
<div
style=
"width:185px;padding:10px;border-radius:8px"
>
<q-img
:src=
"qrCodelUrl"
>
<q-btn
push
flat
color=
"accent"
class=
"q-mr-md bg-accent text-white"
icon=
"edit"
label=
"问卷调查二维码"
size=
"sm"
@
click=
"getStudentSurveyImg()"
>
<q-popup-proxy>
<div
style=
"width:185px;padding:10px;border-radius:8px"
>
<q-img
:src=
"qrCodelUrl"
>
<template
v-slot:loading
>
<div
class=
"text-subtitle1 text-white"
>
Loading...
</div>
</
template
>
</q-img>
</div>
</q-popup-proxy>
</q-btn>
</div>
</q-popup-proxy>
</q-btn>
<q-btn
color=
"accent"
class=
"q-mr-md"
size=
"sm"
icon=
"add"
label=
"新增"
@
click=
"editSurvey(null)"
/>
</div>
</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=
"编辑"
<q-btn
flat
size=
"
small
"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"editSurvey(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
<q-btn
flat
size=
"small"
icon=
"delete"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
@
click=
"delSurvey(props.row)"
/>
</q-td>
</
template
>
</q-table>
<area-form
v-if=
"isShowAreaForm"
:save-obj=
"areaObjOption"
@
close=
"refreshPage"
@
success=
"refreshPage"
>
</area-form>
<survey-form
v-if=
"isShowAreaForm"
:save-obj=
"areaObjOption"
:MainId=
"msg.MainId"
@
close=
"refreshPage"
@
success=
"refreshPage"
>
</survey-form>
</div>
</div>
</template>
<
script
>
import
{
querySurveyPage
,
deleteSurvey
,
querySurvey
Question
Page
,
deleteSurvey
Question
,
querySurveyTypeEnumList
}
from
'../../api/common/common'
import
{
queryQrCodeImage
,
//问卷调查二维码生成
queryQrCodeImage
,
//问卷调查二维码生成
}
from
"../../api/school/index"
import
area
Form
from
'../../components/system/survey-form'
import
survey
Form
from
'../../components/system/survey-form'
export
default
{
meta
:
{
title
:
"学生问卷调查管理"
},
components
:
{
area
Form
,
survey
Form
,
},
data
()
{
return
{
currentUrl
:
""
,
columns
:
[
{
columns
:
[{
name
:
'Title'
,
label
:
'问题名称'
,
field
:
'Title'
,
...
...
@@ -109,7 +104,7 @@
required
:
true
,
label
:
'是否显示'
,
align
:
'left'
,
field
:
row
=>
row
.
IsShow
==
1
?
'显示'
:
"不显示"
field
:
row
=>
row
.
IsShow
==
1
?
'显示'
:
"不显示"
},
{
name
:
'optioned'
,
...
...
@@ -124,15 +119,32 @@
pageSize
:
12
,
rowsPerPage
:
12
,
Title
:
""
,
SurveyType
:
-
1
,
IsShow
:
-
1
,
SurveyType
:
-
1
,
IsShow
:
-
1
,
MainId
:
0
,
},
pageCount
:
0
,
isShowAreaForm
:
false
,
//是否显示新增修改地区表单
areaObjOption
:
null
,
SurveyTypeEnumList
:
[],
//问题类型
ShowList
:
[{
Id
:
-
1
,
Name
:
'不限'
},{
Id
:
1
,
Name
:
'显示'
},{
Id
:
0
,
Name
:
'不显示'
}],
//问题类型
qrCodelUrl
:
""
,
ShowList
:
[{
Id
:
-
1
,
Name
:
'不限'
},
{
Id
:
1
,
Name
:
'显示'
},
{
Id
:
0
,
Name
:
'不显示'
}],
//问题类型
qrCodelUrl
:
""
,
}
},
created
()
{
if
(
this
.
$route
.
query
)
{
if
(
this
.
$route
.
query
.
MainId
)
{
this
.
msg
.
MainId
=
this
.
$route
.
query
.
MainId
;
}
}
},
mounted
()
{
...
...
@@ -141,33 +153,36 @@
this
.
getSurveyTypeEnumList
();
},
methods
:
{
//获取类型列表
getSurveyTypeEnumList
()
{
//获取类型列表
getSurveyTypeEnumList
()
{
querySurveyTypeEnumList
({}).
then
(
res
=>
{
res
.
Data
.
unshift
({
Id
:
-
1
,
Name
:
"不限"
});
res
.
Data
.
unshift
({
Id
:
-
1
,
Name
:
"不限"
});
this
.
SurveyTypeEnumList
=
res
.
Data
;
})
},
//点击生成二维码
getStudentSurveyImg
()
{
if
(
this
.
qrCodelUrl
===
""
)
{
let
codeMsg
=
{
pUrl
:
"system/surveyStudent"
,
StudentId
:
0
,
StuName
:
""
}
queryQrCodeImage
(
codeMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
qrCodelUrl
=
"data:image/png;base64,"
+
res
.
Data
codeMsg
=
{};
//点击生成二维码
getStudentSurveyImg
()
{
if
(
this
.
qrCodelUrl
===
""
)
{
let
codeMsg
=
{
pUrl
:
"system/surveyStudent"
,
StudentId
:
0
,
StuName
:
""
,
MainId
:
this
.
msg
.
MainId
,
}
});
queryQrCodeImage
(
codeMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
qrCodelUrl
=
"data:image/png;base64,"
+
res
.
Data
codeMsg
=
{};
}
});
}
},
//删除问卷调查信息
delSurvey
(
item
)
{
var
that
=
this
;
var
that
=
this
;
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除?'
,
...
...
@@ -179,7 +194,7 @@
let
delMsg
=
{
SurveyID
:
item
.
ID
,
}
deleteSurvey
(
delMsg
).
then
(
res
=>
{
deleteSurvey
Question
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
...
...
@@ -219,7 +234,7 @@
//获取地区分页列表
getSurveypage
()
{
this
.
loading
=
true
;
querySurveyPage
(
this
.
msg
).
then
(
res
=>
{
querySurvey
Question
Page
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
this
.
pageCount
=
res
.
Data
.
PageCount
...
...
@@ -229,7 +244,9 @@
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
</
style
>
src/pages/system/surveyStudent.vue
View file @
a60f0c00
This diff is collapsed.
Click to expand it.
src/pages/system/surveyStudentList.vue
View file @
a60f0c00
...
...
@@ -3,50 +3,33 @@
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-select
filled
v-model=
"msg.TeacherId"
use-input
:dense=
"false"
ref=
"Teacher_Id"
label=
"选择评价的老师"
option-value=
"TId"
option-label=
"TeacherName"
:options=
"TeacherList"
@
filter=
"filterFnTeacher"
@
input=
"refreshPage()"
class=
"col-6 q-pb-lg"
emit-value
map-options
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
No results
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
<!-- <div class="col-3">
<q-select filled stack-label class="col-6 q-pr-lg" option-value="Id" option-label="Name"
v-model="msg.TeacherId" :options="SurveyTypeEnumList" emit-value map-options label="问题类型"
@input="refreshPage()" />
<q-select
filled
v-model=
"msg.MainId"
use-input
:dense=
"false"
ref=
"Teacher_Id"
label=
"筛选问卷"
option-value=
"Id"
option-label=
"Title"
:options=
"ServeyMainList"
@
input=
"refreshPage()"
class=
"col-3 q-pb-lg"
emit-value
map-options
>
</q-select>
</div>
<div
class=
"col-3"
>
<q-select filled stack-label class="col-6 q-pr-lg" option-value="Id" option-label="Name"
v-model="msg.StudentId" :options="ShowList" emit-value map-options label="是否显示"
@input="refreshPage()" />
</div> -->
<q-select
filled
v-model=
"msg.TeacherId"
use-input
:dense=
"false"
ref=
"Teacher_Id"
label=
"选择评价的老师"
option-value=
"TId"
option-label=
"TeacherName"
:options=
"TeacherList"
@
filter=
"filterFnTeacher"
@
input=
"refreshPage()"
class=
"col-3 q-pb-lg"
emit-value
map-options
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
No results
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<
template
v-slot:top
=
"props"
>
<
template
v-slot:top
1
>
<div
class=
"col-2 q-table__title"
>
老师问卷调查汇总
</div>
<q-space
/>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
...
...
@@ -66,8 +49,7 @@
<
script
>
import
{
queryStudentSurveyPage
,
deleteSurvey
,
querySurveyTypeEnumList
queryEducationSurveyMainList
}
from
'../../api/common/common'
import
{
getTeacherListByGroupId
...
...
@@ -83,7 +65,12 @@
data
()
{
return
{
currentUrl
:
""
,
columns
:
[
columns
:
[{
name
:
'Title'
,
label
:
'问卷名称'
,
field
:
'Title'
,
align
:
'left'
},
{
name
:
'TeacherName'
,
label
:
'老师'
,
...
...
@@ -117,37 +104,42 @@
pageSize
:
12
,
rowsPerPage
:
12
,
TeacherId
:
-
1
,
StudentId
:
-
1
,
StudentId
:
-
1
,
MainId
:
""
,
},
pageCount
:
0
,
isShowAreaForm
:
false
,
//是否显示新增修改地区表单
areaObjOption
:
null
,
SurveyTypeEnumList
:
[],
//问题类型
ShowList
:
[{
Id
:
-
1
,
Name
:
'不限'
},{
Id
:
1
,
Name
:
'显示'
},{
Id
:
0
,
Name
:
'不显示'
}],
//问题类型
ServeyMainList
:
[],
//问卷列表
}
},
mounted
()
{
this
.
currentUrl
=
this
.
$route
.
path
this
.
currentUrl
=
this
.
$route
.
path
;
this
.
getServeyMainList
();
this
.
GetTeacherList
();
this
.
getSurveypage
();
},
methods
:
{
//获取教师下拉
GetTeacherList
()
{
getServeyMainList
()
{
queryEducationSurveyMainList
({}).
then
(
res
=>
{
this
.
ServeyMainList
=
res
.
Data
;
})
},
//获取教师下拉
GetTeacherList
()
{
getTeacherListByGroupId
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
res
.
Data
;
var
obj
=
{
TeacherName
:
'请选择'
,
TId
:
-
1
}
this
.
TeacherList
.
unshift
(
obj
);
this
.
AllTeacherList
=
this
.
TeacherList
;
this
.
AllTeacherList
=
this
.
TeacherList
;
}
})
},
filterFnTeacher
(
val
,
update
)
{
filterFnTeacher
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
""
)
{
this
.
TeacherList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllTeacherList
));
...
...
@@ -195,7 +187,9 @@
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
</
style
>
src/router/routes.js
View file @
a60f0c00
This diff is collapsed.
Click to expand it.
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