Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
1cd727d5
Commit
1cd727d5
authored
Aug 20, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a07c74c6
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1141 additions
and
66 deletions
+1141
-66
exam.js
src/api/exam.js
+25
-0
Connect.vue
src/components/subject/Connect.vue
+162
-0
FillInTheBlanks.vue
src/components/subject/FillInTheBlanks.vue
+131
-0
MultipleChoice.vue
src/components/subject/MultipleChoice.vue
+139
-0
SingleChoice.vue
src/components/subject/SingleChoice.vue
+132
-0
Sort.vue
src/components/subject/Sort.vue
+163
-0
judge.vue
src/components/subject/judge.vue
+132
-0
write.vue
src/components/subject/write.vue
+145
-0
manifest.json
src/manifest.json
+2
-2
askForLeaveList.vue
src/pages/course/askForLeaveList.vue
+13
-10
examPaper.vue
src/pages/exam/examPaper.vue
+42
-5
examPaperList.vue
src/pages/exam/examPaperList.vue
+42
-48
common.css
src/static/css/common.css
+5
-0
plugin.js
src/utils/plugin.js
+7
-0
request.js
src/utils/request.js
+1
-1
No files found.
src/api/exam.js
0 → 100644
View file @
1cd727d5
import
request
from
'../utils/request.js'
/**
* 获取试卷列表
* @param {JSON参数} data
*/
export
function
getPaperList
(
data
)
{
return
request
({
url
:
'/AppletIndex/GetGuestExaminationPublishPage'
,
method
:
'post'
,
data
})
}
/**
* 获取试卷详情
* @param {JSON参数} data
*/
export
function
getPaperDetail
(
data
)
{
return
request
({
url
:
'/appletindex/GetPaperDetails'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/subject/Connect.vue
0 → 100644
View file @
1cd727d5
<
template
>
<!-- 连线题 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
{{
changeNumToHan
(
data
.
GSortNum
+
1
)
}}
、
{{
data
.
GroupName
}}
</view
>
<!--
<canvas
class=
"canvas"
type=
"2d"
canvas-id=
"firstCanvas"
id=
"firstCanvas"
></canvas>
-->
<view
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<view
class=
"flex flex_wrap flex_between_center"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_wrap flex_start_between"
>
<view
v-for=
"(item3, index3) in item2"
:key=
"index3"
class=
"flex item3"
>
<view
class=
"chooseNum"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
v-html=
"item3.Content"
></view>
</view>
</view>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
},
setup
(
props
,
context
)
{
// console.log(57, props.paperData);
let
data
=
reactive
({
data
:
props
.
paperData
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
drawcanvas
()
{
let
ctx
=
uni
.
createCanvasContext
(
"firstCanvas"
);
ctx
.
beginPath
();
ctx
.
moveTo
(
0
,
0
);
ctx
.
lineWidth
=
2
;
ctx
.
strokeStyle
=
"red"
;
ctx
.
lineTo
(
20
,
0
);
ctx
.
lineTo
(
10
,
10
);
ctx
.
stroke
();
console
.
log
(
"tag"
,
ctx
);
},
//选题
change
(
index1
,
index2
)
{
data
.
data
.
DetailsList
[
index1
].
myAnswer
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
].
Name
;
},
};
methods
.
drawcanvas
();
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.canvas
{
width
:
100%
;
height
:
100
rpx
;
}
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
box-sizing
:
border-box
;
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
width
:
40%
;
height
:
100%
;
border-top
:
1
rpx
solid
#000
;
border-bottom
:
1
rpx
solid
#000
;
}
.item3
{
width
:
100%
;
box-sizing
:
border-box
;
margin
:
30
rpx
0
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
/* border: 1px solid #e2e2e2; */
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
</
style
>
\ No newline at end of file
src/components/subject/FillInTheBlanks.vue
0 → 100644
View file @
1cd727d5
<
template
>
<!-- 填空题 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
{{
changeNumToHan
(
data
.
GSortNum
+
1
)
}}
、
{{
data
.
GroupName
}}
</view
>
<view
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"item2.id"
class=
"flex item2 flex_start_center"
>
<view
class=
"chooseName"
@
click=
"change(index1, index2)"
>
<input
type=
"text"
v-model=
"item1.myAnswer"
class=
"input"
/>
</view>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
let
data
=
reactive
({
data
:
props
.
paperData
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
//选题
change
(
index1
,
index2
)
{
data
.
data
.
DetailsList
[
index1
].
choose
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
].
Name
;
},
};
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
}
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
.input
{
box-sizing
:
border-box
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
}
</
style
>
\ No newline at end of file
src/components/subject/MultipleChoice.vue
0 → 100644
View file @
1cd727d5
<
template
>
<!-- 多选题 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
{{
changeNumToHan
(
data
.
GSortNum
+
1
)
}}
、
{{
data
.
GroupName
}}
</view
>
<view
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"item2.id"
class=
"item2 flex flex_start_center"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item1.myAnswer.find((e) => e == item2.Name) }"
@click="change(index1, index2)"
>
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"change(index1, index2)"
v-html=
"item2.Content"
></view>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
},
setup
(
props
,
context
)
{
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
[];
});
let
data
=
reactive
({
data
:
props
.
paperData
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
//选题
change
(
index1
,
index2
)
{
let
myAnswer
=
data
.
data
.
DetailsList
[
index1
].
myAnswer
;
let
res
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
].
Name
;
let
find
=
myAnswer
.
indexOf
(
res
);
if
(
find
==
-
1
)
{
myAnswer
.
push
(
res
);
}
else
{
myAnswer
.
splice
(
find
,
1
);
}
},
};
onMounted
(()
=>
{});
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{},
};
</
script
>
<
style
scoped
>
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
</
style
>
\ No newline at end of file
src/components/subject/SingleChoice.vue
0 → 100644
View file @
1cd727d5
<
template
>
<!-- 单选题 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
{{
changeNumToHan
(
data
.
GSortNum
+
1
)
}}
、
{{
data
.
GroupName
}}
</view
>
<view
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"item2.id"
class=
"flex item2 flex_start_center"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item1.myAnswer === item2.Name }"
@click="change(index1, index2)"
>
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"change(index1, index2)"
v-html=
"item2.Content"
></view>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
data
:
props
.
paperData
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
//选题
change
(
index1
,
index2
)
{
data
.
data
.
DetailsList
[
index1
].
myAnswer
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
].
Name
;
},
};
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
</
style
>
\ No newline at end of file
src/components/subject/Sort.vue
0 → 100644
View file @
1cd727d5
<
template
>
<!-- 单选题 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
{{
changeNumToHan
(
data
.
GSortNum
+
1
)
}}
、
{{
data
.
GroupName
}}
</view
>
<view
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<!--
<view>
{{
item1
.
Title
}}
</view>
-->
</view>
<view
v-for=
"(item2, index2, index3) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_wrap flex_start_center"
v-if=
"index2 === 0"
>
<view
v-for=
"(item3, index3) in item2"
:key=
"index3"
class=
"flex item3 flex_start_center"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item1.myAnswer.find((e) => e == item3.Name) }"
@click="change(index1, index2, index3)"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"change(index1, index2, index3)"
v-html=
"item3.Content"
></view>
</view>
</view>
<view
class=
"flex chooseName"
>
答案:
<view
v-for=
"(i, n) in item1.myAnswer"
:key=
"n"
style=
"margin: 0 10rpx"
>
{{
i
}}
</view>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
[];
});
let
data
=
reactive
({
data
:
props
.
paperData
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
//选题
change
(
index1
,
index2
,
index3
)
{
let
myAnswer
=
data
.
data
.
DetailsList
[
index1
].
myAnswer
;
let
res
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
][
index3
].
Name
;
let
find
=
myAnswer
.
indexOf
(
res
);
if
(
find
==
-
1
)
{
myAnswer
.
push
(
res
);
}
else
{
myAnswer
.
splice
(
find
,
1
);
}
},
};
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
/* padding-left: 25rpx;
margin: 30rpx 0; */
}
.item3
{
width
:
100%
;
padding-left
:
25
rpx
;
margin
:
20
rpx
0
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
</
style
>
\ No newline at end of file
src/components/subject/judge.vue
0 → 100644
View file @
1cd727d5
<
template
>
<!-- 单选题 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
{{
changeNumToHan
(
data
.
GSortNum
+
1
)
}}
、
{{
data
.
GroupName
}}
</view
>
<view
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"item2.id"
class=
"flex item2 flex_start_center"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item1.myAnswer === item2.Name }"
@click="change(index1, index2)"
>
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"change(index1, index2)"
v-html=
"item2.Content"
></view>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
},
setup
(
props
,
context
)
{
console
.
log
(
57
,
props
.
paperData
);
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
data
:
props
.
paperData
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
//选题
change
(
index1
,
index2
)
{
data
.
data
.
DetailsList
[
index1
].
myAnswer
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
].
Name
;
},
};
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
</
style
>
\ No newline at end of file
src/components/subject/write.vue
0 → 100644
View file @
1cd727d5
<
template
>
<!-- 主观题 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
{{
changeNumToHan
(
data
.
GSortNum
+
1
)
}}
、
{{
data
.
GroupName
}}
</view
>
<view
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<!--
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"item2.id"
class=
"flex item2 flex_start_center"
>
-->
<view
class=
"chooseName"
>
<textarea
type=
"text"
v-model=
"item1.myAnswer"
class=
"input textarea"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
<!--
</view>
-->
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
let
data
=
reactive
({
data
:
props
.
paperData
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
};
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
}
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
.input
{
box-sizing
:
border-box
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
font-size
:
22
rpx
;
}
.textarea
{
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
}
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#cccccc
;
}
</
style
>
\ No newline at end of file
src/manifest.json
View file @
1cd727d5
{
{
"name"
:
""
,
"name"
:
"
甲鹤学生端
"
,
"appid"
:
""
,
"appid"
:
""
,
"description"
:
""
,
"description"
:
"
甲鹤小程序学生端
"
,
"versionName"
:
"1.0.0"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"transformPx"
:
false
,
...
...
src/pages/course/askForLeaveList.vue
View file @
1cd727d5
...
@@ -104,6 +104,7 @@ export default {
...
@@ -104,6 +104,7 @@ export default {
msg
:
{
msg
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
10
,
pageSize
:
10
,
rowsPerPage
:
10
,
},
},
PageCount
:
0
,
PageCount
:
0
,
userInfo
,
userInfo
,
...
@@ -130,16 +131,18 @@ export default {
...
@@ -130,16 +131,18 @@ export default {
},
},
async
getList
()
{
async
getList
()
{
let
res
=
await
getStudentLeaveList
(
data
.
msg
);
let
res
=
await
getStudentLeaveList
(
data
.
msg
);
data
.
PageCount
=
res
.
Data
.
PageCount
;
if
(
res
)
{
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
PageCount
=
res
.
Data
.
PageCount
;
data
.
data
=
res
.
Data
.
PageData
;
if
(
data
.
msg
.
pageIndex
===
1
)
{
}
else
{
data
.
data
=
res
.
Data
.
PageData
;
data
.
data
=
[...
res
.
Data
.
PageData
,
...
data
.
data
];
}
else
{
}
data
.
data
=
[...
res
.
Data
.
PageData
,
...
data
.
data
];
if
(
data
.
msg
.
pageIndex
===
res
.
Data
.
PageCount
)
{
}
data
.
pageState
=
"none"
;
if
(
data
.
msg
.
pageIndex
>=
res
.
Data
.
PageCount
)
{
}
else
{
data
.
pageState
=
"none"
;
data
.
pageState
=
"more"
;
}
else
{
data
.
pageState
=
"more"
;
}
}
}
},
},
invalidApply
(
item
)
{
invalidApply
(
item
)
{
...
...
src/pages/exam/examPaper.vue
View file @
1cd727d5
...
@@ -27,14 +27,39 @@
...
@@ -27,14 +27,39 @@
<view
v-for=
"(item, index) in peaperDetail.Paper.GroupList"
:key=
"index"
>
<view
v-for=
"(item, index) in peaperDetail.Paper.GroupList"
:key=
"index"
>
<SingleChoice
<SingleChoice
:paperData=
"item"
:paperData=
"item"
v-if=
"item.QuestionTypeKey === 'single'"
v-if=
"
item.QuestionTypeKey === 'single' ||
item.QuestionTypeKey === 'single-number'
"
/>
/>
<MultipleChoice
<MultipleChoice
:paperData=
"item"
:paperData=
"item"
v-if=
"item.QuestionTypeKey === 'multiple'"
v-if=
"item.QuestionTypeKey === 'multiple'"
/>
/>
<FillInTheBlanks
:paperData=
"item"
v-if=
"item.QuestionTypeKey === 'fill-in'"
/>
<Judge
:paperData=
"item"
v-if=
"item.QuestionTypeKey === 'judge'"
/>
<Write
:paperData=
"item"
v-if=
"
item.QuestionTypeKey === 'short-answer' ||
item.QuestionTypeKey === 'noun-explanation' ||
item.QuestionTypeKey === 'essay-question' ||
item.QuestionTypeKey === 'calculation' ||
item.QuestionTypeKey === 'entry-problem'
"
/>
<Connect
:paperData=
"item"
v-if=
"item.QuestionTypeKey === 'matching'"
/>
<Sort
:paperData=
"item"
v-if=
"
item.QuestionTypeKey === 'sorting-problem' ||
item.QuestionTypeKey === 'listening'
"
/>
</view>
</view>
<FillInTheBlanks
/>
</view>
</view>
<van-toast
id=
"van-toast"
/>
<van-toast
id=
"van-toast"
/>
</view>
</view>
...
@@ -55,9 +80,21 @@ import { getSystemInfo } from "../../utils/index";
...
@@ -55,9 +80,21 @@ import { getSystemInfo } from "../../utils/index";
import
{
getPaperDetail
}
from
"../../api/exam"
;
import
{
getPaperDetail
}
from
"../../api/exam"
;
import
SingleChoice
from
"../../components/subject/SingleChoice.vue"
;
import
SingleChoice
from
"../../components/subject/SingleChoice.vue"
;
import
MultipleChoice
from
"../../components/subject/MultipleChoice.vue"
;
import
MultipleChoice
from
"../../components/subject/MultipleChoice.vue"
;
import
FillInTheBlanks
from
"../../components/subject/FillInTheBlanks.vue"
;
import
FillInTheBlanks
from
"../../components/subject/FillInTheBlanks"
;
import
Judge
from
"../../components/subject/judge.vue"
;
import
Write
from
"../../components/subject/write.vue"
;
import
Connect
from
"../../components/subject/Connect.vue"
;
//"连线题"
import
Sort
from
"../../components/subject/Sort"
;
//"排序题"
export
default
{
export
default
{
components
:
{
SingleChoice
,
MultipleChoice
,
FillInTheBlanks
},
components
:
{
SingleChoice
,
MultipleChoice
,
FillInTheBlanks
,
Judge
,
Write
,
Connect
,
Sort
,
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
refs
}
=
getCurrentInstance
();
let
{
refs
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
...
@@ -80,9 +117,9 @@ export default {
...
@@ -80,9 +117,9 @@ export default {
},
},
async
getPaperDetail
()
{
async
getPaperDetail
()
{
let
res
=
await
getPaperDetail
(
data
.
msg
);
let
res
=
await
getPaperDetail
(
data
.
msg
);
console
.
log
(
74
,
res
.
Data
);
if
(
res
)
{
if
(
res
)
{
data
.
peaperDetail
=
res
.
Data
;
data
.
peaperDetail
=
res
.
Data
;
console
.
log
(
90
,
res
.
Data
.
Paper
.
GroupList
);
}
}
},
},
};
};
...
...
src/pages/exam/examPaperList.vue
View file @
1cd727d5
<
template
>
<
template
>
<view>
<view>
<van-tabs
<van-tabs
:active=
"
curtab
"
:active=
"
data.ExamStatus
"
title-inactive-color=
"#444444"
title-inactive-color=
"#444444"
title-active-color=
"#00ACF9"
title-active-color=
"#00ACF9"
line-height=
"0"
line-height=
"0"
@
change=
"changeTab"
@
change=
"changeTab"
>
>
<van-tab
title=
"未开始"
name=
"a"
></van-tab>
<van-tab
title=
"全部"
:name=
"0"
></van-tab>
<van-tab
title=
"已开始"
name=
"b"
></van-tab>
<van-tab
title=
"未开始"
:name=
"1"
></van-tab>
<van-tab
title=
"已缺考"
name=
"c"
></van-tab>
<van-tab
title=
"已开始"
:name=
"2"
></van-tab>
<van-tab
title=
"已完成"
name=
"d"
></van-tab>
<van-tab
title=
"已缺考"
:name=
"3"
></van-tab>
<van-tab
title=
"已完成"
:name=
"4"
></van-tab>
</van-tabs>
</van-tabs>
<view
class=
"exampaper-con"
>
<view
class=
"exampaper-con"
>
<van-empty
description=
"暂无数据"
v-if=
"examList.length === 0"
/>
<scroll-view
<scroll-view
:scroll-top=
"0"
:scroll-top=
"0"
scroll-y=
"true"
scroll-y=
"true"
class=
"scroll-box"
class=
"scroll-box"
@
scrolltolower=
"lower"
@
scrolltolower=
"lower"
v-if=
"examList.length > 0"
>
>
<view
<view
v-for=
"(item, index) in examList"
v-for=
"(item, index) in examList"
...
@@ -66,11 +69,14 @@ import {
...
@@ -66,11 +69,14 @@ import {
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
import
{
getPaperList
}
from
"../../api/exam"
;
export
default
{
export
default
{
components
:
{
components
:
{
Loadmore
,
Loadmore
,
},
},
setup
()
{
setup
()
{
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
console
.
log
(
77
,
Gid
);
let
data
=
reactive
({
let
data
=
reactive
({
pageState
:
"more"
,
pageState
:
"more"
,
examList
:
[
examList
:
[
...
@@ -82,52 +88,19 @@ export default {
...
@@ -82,52 +88,19 @@ export default {
teacherImg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
teacherImg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
status
:
"未开始"
,
status
:
"未开始"
,
},
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
],
],
curtab
:
"b"
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
rowsPerPage
:
10
,
ExamStatus
:
0
,
GuestId
:
Gid
,
},
pageCount
:
0
,
});
});
let
methods
=
{
let
methods
=
{
changeTab
(
e
)
{
changeTab
(
e
)
{
console
.
log
(
123
,
e
)
;
this
.
msg
.
ExamStatus
=
e
.
detail
.
name
;
},
},
jumpPage
()
{
jumpPage
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -135,8 +108,28 @@ export default {
...
@@ -135,8 +108,28 @@ export default {
});
});
},
},
lower
(
e
)
{
lower
(
e
)
{
if
(
data
.
msg
.
pageIndex
<
data
.
PageCount
)
{
data
.
pageState
=
"loading"
;
data
.
msg
.
pageIndex
++
;
that
.
getList
();
}
},
async
getList
()
{
data
.
pageState
=
"loading"
;
data
.
pageState
=
"loading"
;
console
.
log
(
131
,
e
);
let
res
=
await
getPaperList
(
data
.
msg
);
if
(
res
)
{
data
.
PageCount
=
res
.
Data
.
PageCount
;
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
examList
=
res
.
Data
.
PageData
;
}
else
{
data
.
examList
=
[...
res
.
Data
.
PageData
,
...
data
.
examList
];
}
if
(
data
.
msg
.
pageIndex
>=
res
.
Data
.
PageCount
)
{
data
.
pageState
=
"none"
;
}
else
{
data
.
pageState
=
"more"
;
}
}
},
},
};
};
onMounted
(()
=>
{});
onMounted
(()
=>
{});
...
@@ -149,6 +142,7 @@ export default {
...
@@ -149,6 +142,7 @@ export default {
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
"试卷列表"
,
title
:
"试卷列表"
,
});
});
this
.
getList
();
},
},
};
};
</
script
>
</
script
>
...
...
src/static/css/common.css
View file @
1cd727d5
...
@@ -58,6 +58,11 @@
...
@@ -58,6 +58,11 @@
align-items
:
flex-end
;
align-items
:
flex-end
;
}
}
.flex_start_between
{
justify-content
:
flex-start
;
align-content
:
space-between
;
}
.flex_direction
{
.flex_direction
{
flex-direction
:
column
;
flex-direction
:
column
;
}
}
...
...
src/utils/plugin.js
0 → 100644
View file @
1cd727d5
export
default
{
install
:
(
app
,
options
)
=>
{
app
.
config
.
globalProperties
.
$test
=
(
s
)
=>
{
console
.
log
(
"5,plugin"
,
s
)
}
}
}
\ No newline at end of file
src/utils/request.js
View file @
1cd727d5
...
@@ -28,7 +28,7 @@ let request = (param) => {
...
@@ -28,7 +28,7 @@ let request = (param) => {
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
// reject(err)
// reject(err)
console
.
log
(
"fail:"
+
JSON
.
stringify
(
err
));
console
.
warn
(
"fail:"
+
JSON
.
stringify
(
err
));
Toast
.
fail
(
"网络请求失败"
)
Toast
.
fail
(
"网络请求失败"
)
}
}
});
});
...
...
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