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
2f14e283
Commit
2f14e283
authored
Aug 10, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
1
parents
4411640c
904fc023
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
688 additions
and
331 deletions
+688
-331
quasar.conf.js
quasar.conf.js
+8
-7
wechat.js
src/api/system/wechat.js
+24
-0
index.js
src/api/teacher/index.js
+12
-0
allAddSC.vue
src/components/enterprise/material/allAddSC.vue
+3
-0
allmaterial.vue
src/components/enterprise/material/allmaterial.vue
+44
-40
addWelcome.vue
src/pages/enterprise/addWelcome.vue
+118
-66
welcomeList.vue
src/pages/enterprise/welcomeList.vue
+213
-161
examEdit.vue
src/pages/exam/examEdit.vue
+266
-57
No files found.
quasar.conf.js
View file @
2f14e283
...
...
@@ -45,15 +45,16 @@ module.exports = function (ctx) {
// Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
build
:
{
vueRouterMode
:
'hash'
,
// available values: 'hash', 'history'
env
:
ctx
.
dev
?
{
API
:
'http://192.168.20.51:8088/api'
,
API_ZC
:
'http://192.168.20.9:8087/api'
,
API_SK
:
'ws:192.168.20.214:'
API
:
'https://localhost:5001/api'
,
// API: 'http://192.168.20.51:8088/api',
API_ZC
:
'http://192.168.20.9:8087/api'
,
API_SK
:
'ws:192.168.20.214:'
}
:
{
API
:
'https://eduapi.oytour.com/api'
,
API_ZC
:
'http://propertyedu.oytour.com/api'
,
API_SK
:
'ws://47.96.23.199:'
API_ZC
:
'http://propertyedu.oytour.com/api'
,
API_SK
:
'ws://47.96.23.199:'
},
// transpile: false,
...
...
@@ -153,7 +154,7 @@ module.exports = function (ctx) {
],
directives
:
[
'ClosePopup'
],
],
// Quasar plugins
plugins
:
[
...
...
src/api/system/wechat.js
View file @
2f14e283
...
...
@@ -152,4 +152,28 @@ export function SetSynvEduEmployee(data) {
method
:
'post'
,
data
})
}
/**
* 获取欢迎语分页列表
*
*/
export
function
getWeChatWelcomesPageList
(
data
)
{
return
request
({
url
:
'/QYWeChat/GetWeChatWelcomesPageList'
,
method
:
'post'
,
data
})
}
/**
* 新增修改欢迎语
*
*/
export
function
setWeChatWelcomesInfo
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetWeChatWelcomesInfo'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/api/teacher/index.js
View file @
2f14e283
...
...
@@ -141,4 +141,16 @@ export function GetPaper(data) {
method
:
'post'
,
data
})
}
/**
* 保存试卷信息
* @param {JSON参数} data
*/
export
function
savePaperInfo
(
data
)
{
return
request
({
url
:
'/Exam/SetPaper'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/enterprise/material/allAddSC.vue
View file @
2f14e283
...
...
@@ -345,6 +345,7 @@
addMsg
:
{
Id
:
0
,
Type
:
1
,
Is_Sync
:
1
,
//是否同步 暂时默认为1 同步
MediaGroupId
:
''
,
}
...
...
@@ -353,6 +354,7 @@
created
()
{
if
(
this
.
editobj
!=
null
)
{
this
.
addMsg
=
this
.
editobj
this
.
addMsg
.
Is_Sync
=
1
}
else
{
this
.
gettype
()
}
...
...
@@ -361,6 +363,7 @@
gettype
()
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
Type
=
this
.
type
this
.
addMsg
.
Is_Sync
=
1
;
this
.
addMsg
.
MediaGroupId
=
''
;
if
(
this
.
type
==
1
)
{
//文本
this
.
addMsg
.
TextModel
=
{
...
...
src/components/enterprise/material/allmaterial.vue
View file @
2f14e283
...
...
@@ -6,8 +6,9 @@
</div>
</div>
-->
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table no-bottom-table"
separator=
"none"
title=
""
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table no-bottom-table"
separator=
"none"
title=
""
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:body-cell-title=
"props"
>
<q-td
:props=
"props"
>
...
...
@@ -17,47 +18,50 @@
<
template
v-slot:body-cell-Content=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.Type==1"
>
{{
getType
(
props
.
row
,
'content'
)
}}
</span>
<q-img
v-if=
"props.row.Type==2 || props.row.Type==3 || props.row.Type==6"
:src=
"getType(props.row,'content')"
style=
"width: 80px;height: 80px;border-radius: 6px;display: flex;"
>
</q-img>
<audio
controls=
"controls"
v-if=
'props.row.Type==4 && props.row.AudioModel && props.row.AudioModel.AudioPath'
style=
"width: 200px;height: 40px;"
>
<source
:src=
"props.row.AudioModel.AudioPath"
type=
"audio/ogg"
>
<source
:src=
"props.row.AudioModel.AudioPath"
type=
"audio/mpeg"
>
</audio>
<video
width=
"200"
height=
"120"
controls=
"controls"
v-if=
"props.row.Type==5 && props.row.VideoModel && props.row.VideoModel.VideoPath"
>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/ogg"
/>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/mp4"
/>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/webm"
/>
</video>
<div
v-if=
"props.row.Type==7 && props.row.FileModel && props.row.FileModel.FilePath!=''"
@
click
.
stop=
"showUpLoadFile(props.row.FileModel)"
>
<i
v-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='PDF'"
class=
"iconfont icon-pdf"
></i>
<i
v-else-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='TXT'"
class=
"iconfont icon-txt"
></i>
<i
v-else-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='DOCX' ||
<div
style=
"width: 200px;"
>
<span
v-if=
"props.row.Type==1"
>
{{
getType
(
props
.
row
,
'content'
)
}}
</span>
<q-img
v-if=
"props.row.Type==2 || props.row.Type==3 || props.row.Type==6"
:src=
"getType(props.row,'content')"
style=
"width: 80px;height: 80px;border-radius: 6px;display: flex;"
>
</q-img>
<audio
controls=
"controls"
v-if=
'props.row.Type==4 && props.row.AudioModel && props.row.AudioModel.AudioPath'
style=
"width: 200px;height: 40px;"
>
<source
:src=
"props.row.AudioModel.AudioPath"
type=
"audio/ogg"
>
<source
:src=
"props.row.AudioModel.AudioPath"
type=
"audio/mpeg"
>
</audio>
<video
width=
"200"
height=
"120"
controls=
"controls"
v-if=
"props.row.Type==5 && props.row.VideoModel && props.row.VideoModel.VideoPath"
>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/ogg"
/>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/mp4"
/>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/webm"
/>
</video>
<div
v-if=
"props.row.Type==7 && props.row.FileModel && props.row.FileModel.FilePath!=''"
@
click
.
stop=
"showUpLoadFile(props.row.FileModel)"
>
<i
v-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='PDF'"
class=
"iconfont icon-pdf"
></i>
<i
v-else-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='TXT'"
class=
"iconfont icon-txt"
></i>
<i
v-else-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='DOCX' ||
props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='DOC'
"
class=
"iconfont icon-word"
></i>
<i
v-else
class=
"iconfont icon-excel"
></i>
<i
v-else
class=
"iconfont icon-excel"
></i>
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
v-if=
"props.row.Type==1 || props.row.Type==3 || props.row.Type==6 "
@
click=
"goedit(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
v-if=
"props.row.Type==1 || props.row.Type==3 || props.row.Type==6 "
@
click=
"goedit(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"移动"
@
click=
"plmove(props)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"goDetailed(props.row,'0')"
/>
</q-td>
</
template
>
</q-table>
</div>
<div
v-if=
"Isadd==true"
>
...
...
@@ -72,8 +76,8 @@
import
alladdsc
from
'./allAddSC'
import
{
delWecharMediumInfo
,
//删除素材
}
from
'../../../api/system/wechat'
;
delWecharMediumInfo
,
//删除素材
}
from
'../../../api/system/wechat'
;
export
default
{
components
:
{
alladdsc
,
...
...
@@ -95,8 +99,8 @@
Isadd
:
false
,
ISsystem
:
false
,
editobj
:
null
,
showtype
:
1
,
editobj
:
null
,
showtype
:
1
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
...
...
@@ -243,20 +247,20 @@
this
.
editobj
.
Id
=
row
.
Id
;
this
.
editobj
.
MediaGroupId
=
row
.
MediaGroupId
;
this
.
editobj
.
Type
=
row
.
Type
;
if
(
row
.
Type
==
1
)
{
if
(
row
.
Type
==
1
)
{
this
.
editobj
.
TextModel
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
TextModel
));
}
else
if
(
row
.
Type
==
3
)
{
}
else
if
(
row
.
Type
==
3
)
{
this
.
editobj
.
ImgTextModel
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
ImgTextModel
));
}
else
if
(
row
.
Type
==
6
)
{
}
else
if
(
row
.
Type
==
6
)
{
this
.
editobj
.
AppletModel
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
AppletModel
));
}
this
.
showtype
=
row
.
Type
.
toString
()
this
.
Isadd
=
true
},
getchildren
(){
this
.
$emit
(
'editsuccess'
)
this
.
Isadd
=
false
getchildren
()
{
this
.
$emit
(
'editsuccess'
)
this
.
Isadd
=
false
},
}
...
...
src/pages/enterprise/addWelcome.vue
View file @
2f14e283
...
...
@@ -50,8 +50,9 @@
</div>
<div
style=
"padding: 20px;"
>
<div
style=
"display: flex;align-items: flex-start;"
>
<i
class=
"el-icon-user"
style=
"margin-right:20px;font-size: 40px;color: #1890ff;"
></i>
<div
style=
"width: 1px; flex:1;background: #f3f6fb;word-wrap: break-word;padding: 10px;border-radius: 4px;min-height: 40px;"
>
<i
class=
"el-icon-user"
style=
"margin-right:20px;font-size: 40px;color: #1890ff;"
></i>
<div
style=
"width: 1px; flex:1;background: #f3f6fb;word-wrap: break-word;padding: 10px;border-radius: 4px;min-height: 40px;"
>
{{
addMsg
.
Content
}}
</div>
</div>
...
...
@@ -61,14 +62,14 @@
<el-form
ref=
"addMsg"
:model=
"addMsg"
label-width=
"120px"
>
<el-form-item
label=
"企业微信成员:"
>
<div
class=
"q-gutter-sm"
style=
"align-items: center;display: flex;"
>
<q-radio
v-model=
"
addMsg.
membertype"
val=
"1"
label=
"通用"
/>
<q-radio
v-model=
"
addMsg.
membertype"
val=
"2"
label=
"指定企业成员"
/>
<q-radio
v-model=
"membertype"
val=
"1"
label=
"通用"
/>
<q-radio
v-model=
"membertype"
val=
"2"
label=
"指定企业成员"
/>
<q-btn
color=
"accent"
label=
"选择成员"
size=
'sm'
class=
"q-mr-md"
style=
"margin-left: 20px;"
v-if=
"
addMsg.
membertype==2"
@
click=
'getMember'
/>
<div
v-if=
"
addMsg.ryList.length>0 && addMsg.
membertype==2"
style=
"margin-top: 8px;"
>
<span
style=
"margin-left: 15px"
>
已选择
{{
addMsg
.
ryList
.
length
}}
名成员
</span>
v-if=
"membertype==2"
@
click=
'getMember'
/>
<div
v-if=
"
ryList.length>0 &&
membertype==2"
style=
"margin-top: 8px;"
>
<span
style=
"margin-left: 15px"
>
已选择
{{
ryList
.
length
}}
名成员
</span>
<span
style=
"cursor: pointer;color: #1890ff;margin-left: 15px;"
@
click=
'
addMsg.
ryList =[],showMember=[]'
>
重置
</span>
@
click=
'ryList =[],showMember=[]'
>
重置
</span>
</div>
</div>
...
...
@@ -76,20 +77,22 @@
</el-form-item>
<el-form-item
label=
"文本内容:"
>
<q-input
v-model=
"addMsg.Content"
filled
clearable
type=
"textarea"
label=
"文本内容"
style=
"width: 60%;"
/>
<q-input
v-model=
"addMsg.Content"
filled
clearable
type=
"textarea"
label=
"文本内容"
style=
"width: 60%;"
/>
<div
style=
"margin-top: 10px;"
>
<q-btn
color=
"accent"
label=
"+插入客户名称"
size=
'sm'
class=
"q-mr-md"
@
click=
'insert'
/>
<q-btn
color=
"accent"
label=
"+插入客户名称"
size=
'sm'
class=
"q-mr-md"
@
click=
'insert'
/>
</div>
</el-form-item>
<el-form-item
label=
"添加内容:"
>
<q-btn
color=
"white"
text-color=
"black"
label=
"+添加图片/图文/小程序"
size=
'md'
v-if=
"JSON.stringify(Selectobj) == '
{}'">
<q-btn
color=
"white"
text-color=
"black"
label=
"+添加图片/图文/小程序"
size=
'md'
v-if=
"JSON.stringify(Selectobj) == '
{}'">
<q-popup-proxy
ref=
'popupproxy'
>
<q-banner>
<q-btn-group
push
>
<q-btn
label=
"图片"
icon=
"images"
@
click=
"selectimg()"
/>
<q-btn
label=
"图文"
icon=
"visibility"
@
click=
"selecttextimg()"
/>
<q-btn
label=
"小程序"
icon=
"update"
@
click=
"selectxcx()"
/>
<q-btn
label=
"图片"
icon=
"images"
@
click=
"selectimg()"
/>
<q-btn
label=
"图文"
icon=
"visibility"
@
click=
"selecttextimg()"
/>
<q-btn
label=
"小程序"
icon=
"update"
@
click=
"selectxcx()"
/>
</q-btn-group>
</q-banner>
</q-popup-proxy>
...
...
@@ -102,12 +105,17 @@
</el-form-item>
</el-form>
<q-card-actions
align=
"left"
class=
"bg-white"
style=
"margin-top: 15px;"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"savemove()"
style=
"width: 100px;"
:loading=
"loading"
/>
<q-btn
class=
"q-mr-md"
label=
"返回"
@
click=
"goblck()"
style=
"width: 60px;"
/>
</q-card-actions>
</div>
<!-- 人员选择 -->
<el-dialog
custom-class=
'w700'
title=
"选择人员"
:visible
.
sync=
"outerVisible"
center
>
<div
class=
"fl"
style=
"width: 300px; margin: 0 20px;"
>
<p
style=
"margin: 0 0 10px 0;"
>
选择:
<el-input
class=
'w200'
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
@
input=
""
>
<p
style=
"margin: 0 0 10px 0;"
>
选择:
<el-input
class=
'w200'
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
@
input=
""
>
</el-input>
</p>
<el-tree
class=
'ApprovalProcessBg'
:data=
"memberList"
show-checkbox
:filter-node-method=
"filterNode"
...
...
@@ -129,35 +137,26 @@
</div>
</el-dialog>
<!-- 图片 -->
<selectMaterial
v-if=
"isshowselectMaterial"
:materialType=
"materialType"
:saveobj =
'Selectobj'
@
close =
"getclose()"
@
success=
'getsuccess'
>
<selectMaterial
v-if=
"isshowselectMaterial"
:materialType=
"materialType"
:saveobj=
'Selectobj'
@
close=
"getclose()"
@
success=
'getsuccess'
>
</selectMaterial>
<!-- 图文 -->
<imagetextform
v-if=
"isshowimagetext"
:saveobj =
'Selectobj'
@
close =
"gettwclose()"
@
success=
'gettwsuccess'
>
<imagetextform
v-if=
"isshowimagetext"
:saveobj=
'Selectobj'
@
close=
"gettwclose()"
@
success=
'gettwsuccess'
>
</imagetextform>
<!-- 小程序 -->
<appletform
v-if=
"isshowapplet"
:saveobj =
'Selectobj'
@
close =
"getxcxclose()"
@
success=
'getxcxsuccess'
>
<!-- 小程序 -->
<appletform
v-if=
"isshowapplet"
:saveobj=
'Selectobj'
@
close=
"getxcxclose()"
@
success=
'getxcxsuccess'
>
</appletform>
</div>
</
template
>
<
script
>
selectMaterial
import
{
setWeChatWelcomesInfo
,
}
from
'../../api/system/wechat'
;
import
selectMaterial
from
"../../components/enterprise/selectMaterial"
import
imagetextform
from
"../../components/enterprise/imagetext-form"
import
appletform
from
"../../components/enterprise/applet-form"
import
{
queryEmployee
}
from
'../../api/users/user'
...
...
@@ -178,20 +177,24 @@
filterText
:
''
,
//人员选择 帅选
memberList
:
[],
//
showMember
:
[],
membertype
:
'1'
,
ryList
:
[],
addMsg
:
{
membertype
:
1
,
ryList
:
[],
Id
:
0
,
UserIdList
:
[],
//成员列表
Content
:
""
,
MediumIds
:
''
,
//使用的素材id '1,2,3'格式
Type
:
1
,
//如果MediumIds不为空的情况 type为2
},
defaultProps
:
{
children
:
'ChildList'
,
label
:
'EmployeeName'
,
},
materialType
:
1
,
isshowselectMaterial
:
false
,
isshowimagetext
:
false
,
isshowapplet
:
false
,
Selectobj
:{},
//选中对象
materialType
:
1
,
isshowselectMaterial
:
false
,
isshowimagetext
:
false
,
isshowapplet
:
false
,
Selectobj
:
{},
//选中对象
}
},
created
()
{
...
...
@@ -244,55 +247,104 @@
},
getmember
()
{
//人员确定选择
this
.
outerVisible
=
false
;
this
.
addMsg
.
ryList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
showMember
))
this
.
ryList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
showMember
))
},
insert
()
{
this
.
addMsg
.
Content
=
this
.
addMsg
.
Content
+
'##客户名称##'
},
selectimg
(){
//素材选择 图片模式
selectimg
()
{
//素材选择 图片模式
this
.
materialType
=
2
;
this
.
isshowselectMaterial
=
true
;
if
(
this
.
$refs
.
popupproxy
)
{
this
.
isshowselectMaterial
=
true
;
if
(
this
.
$refs
.
popupproxy
)
{
this
.
$refs
.
popupproxy
.
hide
()
}
},
getclose
(){
//素材关闭
this
.
isshowselectMaterial
=
false
getclose
()
{
//素材关闭
this
.
isshowselectMaterial
=
false
},
getsuccess
(
data
){
//选择数据回来
getsuccess
(
data
)
{
//选择数据回来
this
.
Selectobj
=
data
this
.
isshowselectMaterial
=
false
this
.
isshowselectMaterial
=
false
},
selecttextimg
(){
//图文
this
.
isshowimagetext
=
true
;
if
(
this
.
$refs
.
popupproxy
)
{
selecttextimg
()
{
//图文
this
.
isshowimagetext
=
true
;
if
(
this
.
$refs
.
popupproxy
)
{
this
.
$refs
.
popupproxy
.
hide
()
}
},
gettwclose
(){
//图文
this
.
isshowimagetext
=
false
;
gettwclose
()
{
//图文
this
.
isshowimagetext
=
false
;
},
gettwsuccess
(
data
){
//图文返回成功
gettwsuccess
(
data
)
{
//图文返回成功
this
.
Selectobj
=
data
this
.
isshowimagetext
=
false
this
.
isshowimagetext
=
false
},
selectxcx
(){
//图文
this
.
isshowapplet
=
true
;
if
(
this
.
$refs
.
popupproxy
){
selectxcx
()
{
//图文
this
.
isshowapplet
=
true
;
if
(
this
.
$refs
.
popupproxy
)
{
this
.
$refs
.
popupproxy
.
hide
()
}
},
getxcxclose
(){
//小程序 关闭
this
.
isshowapplet
=
false
;
getxcxclose
()
{
//小程序 关闭
this
.
isshowapplet
=
false
;
},
getxcxsuccess
(){
//小程序 关闭
getxcxsuccess
()
{
//小程序 关闭
this
.
Selectobj
=
data
this
.
isshowapplet
=
false
this
.
isshowapplet
=
false
},
savemove
()
{
//保存
if
(
this
.
membertype
==
1
)
{
this
.
addMsg
.
UserIdList
=
[
"-1"
];
}
else
{
if
(
this
.
ryList
.
length
>
0
)
{
this
.
addMsg
.
UserIdList
=
[]
this
.
ryList
.
forEach
(
x
=>
{
this
.
addMsg
.
UserIdList
.
push
(
x
.
Id
)
})
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择人员列表`
,
position
:
'top'
})
return
}
}
if
(
this
.
addMsg
.
MediumIds
==
''
)
{
this
.
addMsg
.
Type
=
1
;
if
(
this
.
addMsg
.
Content
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请输入文本内容`
,
position
:
'top'
})
return
}
}
else
{
this
.
addMsg
.
Type
=
2
;
}
// 调取接口
this
.
loading
=
true
setWeChatWelcomesInfo
(
this
.
addMsg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
this
.
goblck
()
})
},
goblck
()
{
//返回上一个页面
this
.
$router
.
go
(
-
1
);
//返回上一层
},
...
...
src/pages/enterprise/welcomeList.vue
View file @
2f14e283
<
template
>
<div
class=
"welcomeList page-body"
>
<!--
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"welcomeList page-body"
>
<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
stack-label
@
input=
"changePage(1)"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.Type"
ref=
"Id"
:options=
"typeList"
label=
"类型"
:dense=
"false"
emit-value
map-options
/>
</div>
</div>
-->
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
title=
""
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
欢迎语列表
</div>
<q-space
/>
<q-btn
color=
"accent"
style=
"float:right;margin-right:0;"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增欢迎语"
@
click=
"goadd()"
></q-btn>
</
template
>
<
template
v-slot:body-cell-Type=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.Type==1"
>
图文
</span>
<span
v-if=
"props.row.Type==2"
>
图片
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-Content=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"max-width: 800px;white-space: normal;"
>
{{
props
.
row
.
Content
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
@
click=
"goDetailed(props.row,'0')"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"删除"
@
click=
"goDetailed(props.row,'0')"
/>
</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
>
</q-table>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
title=
""
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
欢迎语列表
</div>
<q-space
/>
<q-btn
color=
"accent"
style=
"float:right;margin-right:0;"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增欢迎语"
@
click=
"goadd()"
></q-btn>
</
template
>
<
template
v-slot:body-cell-Type=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.Type==1"
>
文本
</span>
<span
v-if=
"props.row.Type==2"
>
图片
</span>
<span
v-if=
"props.row.Type==3"
>
图文
</span>
<span
v-if=
"props.row.Type==4"
>
小程序
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-Content=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"max-width: 800px;white-space: normal;"
>
{{
props
.
row
.
Content
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
@
click=
"goedit(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"goDetailed(props.row)"
/>
</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
>
</q-table>
</div>
</template>
<
script
>
export
default
{
meta
:
{
title
:
"欢迎语列表"
},
name
:
"welcomeList"
,
data
()
{
return
{
loading
:
false
,
ISsystem
:
false
,
data
:
[{
Type
:
1
,
Content
:
'文本:您好,##客户名称##!亲~你終於來啦!!我是你的专属顾问,任何有关日语学习问题都可以问我哦!!~~~~~~~~~~ 加入甲鹤大家庭~优惠天天有 第一条~9.9块日语体验课!! 第二条~每周活动免费参加! 第三条~猛戳我,”赞羊”电商优惠券免费送!! 第四条~再戳我,”旅游优惠券”我再送! ~~~~~从现在起”甲鹤日语”就是你学习日语的好帮手!! 现在回复”甲鹤”两个字~看看甲鹤想给你看甚么?~呵呵呵!'
,
applymember
:
'通用'
,
UpdateTime
:
'2021-08-04 15:48'
}],
pageCount
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
rowsPerPage
:
10
,
Month
:
''
,
TeacherId
:
0
,
State
:
0
,
},
//公告column
columns
:
[{
name
:
'Type'
,
label
:
'欢迎语类型'
,
align
:
'left'
},
{
name
:
'Content'
,
field
:
'Content'
,
label
:
'欢迎语内容'
,
align
:
'left'
,
},
{
name
:
'applymember'
,
field
:
'applymember'
,
label
:
'使用成员'
,
align
:
'left'
},
{
name
:
'UpdateTime'
,
field
:
'UpdateTime'
,
label
:
'创建时间'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'DeptId'
}
],
</div>
</template>
<
script
>
import
{
getWeChatWelcomesPageList
,
}
from
'../../api/system/wechat'
;
export
default
{
meta
:
{
title
:
"欢迎语列表"
},
name
:
"welcomeList"
,
data
()
{
return
{
loading
:
false
,
ISsystem
:
false
,
data
:
[],
pageCount
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
rowsPerPage
:
15
,
Type
:
0
,
},
typeList
:[
{
Id
:
0
,
Name
:
'不限'
},
{
Id
:
1
,
Name
:
'文本'
},
{
Id
:
2
,
Name
:
'图片'
},
{
Id
:
3
,
Name
:
'图文'
},
{
Id
:
4
,
Name
:
'小程序'
},
],
//公告column
columns
:
[{
name
:
'Type'
,
label
:
'欢迎语类型'
,
align
:
'left'
},
{
name
:
'Content'
,
field
:
'Content'
,
label
:
'欢迎语内容'
,
align
:
'left'
,
},
{
name
:
'UserIdName'
,
field
:
'UserIdName'
,
label
:
'使用成员'
,
align
:
'left'
},
{
name
:
'UpdateByName'
,
field
:
'UpdateByName'
,
label
:
'创建者'
,
align
:
'left'
},
{
name
:
'UpdateTime'
,
field
:
'UpdateTime'
,
label
:
'创建时间'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'DeptId'
}
],
}
},
created
()
{
this
.
getList
()
},
methods
:
{
changePage
(
e
)
{
this
.
msg
.
pageIndex
=
1
this
.
getList
()
},
created
()
{
getList
()
{
this
.
loading
=
true
getWeChatWelcomesPageList
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
Count
this
.
data
.
forEach
(
x
=>
{
x
.
UserIdName
=
''
x
.
UserIdList
.
map
((
j
,
i
)
=>
{
if
(
j
==-
1
){
x
.
UserIdName
=
'通用'
return
}
else
{
if
(
i
+
1
!=
x
.
UserIdList
.
length
){
x
.
UserIdName
=
x
.
UserIdName
+
'某某、'
}
else
{
x
.
UserIdName
=
x
.
UserIdName
+
'某某'
}
}
})
})
})
},
methods
:
{
changePage
(
e
)
{
}
,
goadd
(){
this
.
$router
.
push
({
path
:
'/enterprise/addWelcome'
,
});
}
goadd
()
{
this
.
$router
.
push
(
{
path
:
'/enterprise/addWelcome'
,
}
);
},
goedit
(){
//编辑
},
goDetailed
(
row
){
//修改
console
.
log
(
row
)
}
}
</
script
>
<
style
>
.welcomeList
.Sysuser_Date
.el-input--prefix
.el-input__inner
{
background-color
:
red
;
border
:
0
;
}
.welcomeList
.state-item
{
padding
:
2px
5px
;
border-radius
:
3px
;
text-align
:
center
;
font-size
:
10px
;
}
.welcomeList
.frIdlist
{
padding
:
3px
10px
;
border-radius
:
3px
;
background
:
#EEEEEF
;
align-items
:
center
;
justify-content
:
center
;
margin-right
:
5px
;
margin-bottom
:
5px
;
cursor
:
pointer
;
}
.class-popover
.q-pr-lg
{
padding-right
:
0
;
margin-top
:
20px
;
}
.welcomeList
.el-date-editor.el-input
{
width
:
100%
;
}
.welcomeList
.el-date-editor.el-input
input
{
background-color
:
transparent
!important
;
}
.welcomeList
.el-range-editor
.el-range-input
{
background
:
none
;
}
.Sysuser_Date
.el-input__inner
{
background
:
transparent
!important
;
border
:
0
!important
;
}
.welcomeList
.el-drawer.rtl
{
overflow
:
inherit
;
}
</
style
>
\ No newline at end of file
}
</
script
>
<
style
>
.welcomeList
.Sysuser_Date
.el-input--prefix
.el-input__inner
{
background-color
:
red
;
border
:
0
;
}
.welcomeList
.state-item
{
padding
:
2px
5px
;
border-radius
:
3px
;
text-align
:
center
;
font-size
:
10px
;
}
.welcomeList
.frIdlist
{
padding
:
3px
10px
;
border-radius
:
3px
;
background
:
#EEEEEF
;
align-items
:
center
;
justify-content
:
center
;
margin-right
:
5px
;
margin-bottom
:
5px
;
cursor
:
pointer
;
}
.class-popover
.q-pr-lg
{
padding-right
:
0
;
margin-top
:
20px
;
}
.welcomeList
.el-date-editor.el-input
{
width
:
100%
;
}
.welcomeList
.el-date-editor.el-input
input
{
background-color
:
transparent
!important
;
}
.welcomeList
.el-range-editor
.el-range-input
{
background
:
none
;
}
.Sysuser_Date
.el-input__inner
{
background
:
transparent
!important
;
border
:
0
!important
;
}
.welcomeList
.el-drawer.rtl
{
overflow
:
inherit
;
}
</
style
>
\ No newline at end of file
src/pages/exam/examEdit.vue
View file @
2f14e283
...
...
@@ -37,6 +37,7 @@
width
:
880px
;
min-height
:
795px
;
background
:
#fff
;
padding
:
0px
20px
0
0px
;
border-radius
:
3px
;
overflow-y
:
auto
;
border
:
1px
solid
#d9d9d9
;
...
...
@@ -63,14 +64,16 @@
width
:
328px
;
border-top
:
1px
solid
#d9d9d9
;
}
.List-ul
{
margin
:
0
;
padding
:
0
;
.List-ul
{
margin
:
0
;
padding
:
0
;
}
.List-ul
li
{
height
:
33px
;
border-bottom
:
1px
solid
#f3f3f3
;
list-style-type
:
none
;
list-style-type
:
none
;
}
.List-ul-li-checked
{
...
...
@@ -78,7 +81,8 @@
color
:
#333
;
width
:
328px
;
}
.List-ul
li
a
{
.List-ul
li
a
{
display
:
block
;
padding-left
:
25px
;
line-height
:
33px
;
...
...
@@ -87,43 +91,36 @@
border-bottom
:
1px
solid
#f3f3f3
;
color
:
#555
;
text-decoration
:
none
;
}
}
.List-ul-li-checked
b
{
.List-ul-li-checked
b
{
color
:
#000
;
}
.Showbtn
{
}
.Showbtn
{
display
:
block
;
width
:
90px
;
float
:
right
;
padding-top
:
8px
;
z-index
:
1000
;
}
.Left-btn
{
height
:
58px
;
padding
:
20px
0
20px
20px
;
width
:
100%
;
border-bottom
:
1px
solid
#d9d9d9
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
}
</
style
>
<
template
>
<div
class=
"examPaper"
>
<div
class=
"examPaper_Top"
>
<div
style=
"width:80%;display:flex;"
>
<div
style=
"width:40%;margin:0 20px;"
>
<q-input
filled
label=
"标题"
/>
<q-input
filled
label=
"标题"
v-model=
"DataObj.PaperName"
/>
</div>
<div
style=
"width:20%;"
>
<q-select
filled
option-value=
"Id"
option-label=
"Name"
:options=
"easyList"
emit-value
map-options
label=
"难度"
use-input
clearable
/>
use-input
clearable
v-model=
"DataObj.DifficultyType"
/>
</div>
</div>
<div
style=
"width:20%;text-align:right;"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"预览"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"保存并返回"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"保存并返回"
@
click=
"SavePaper()"
/>
</div>
</div>
<div
class=
"Exam-main"
>
...
...
@@ -133,45 +130,194 @@
<span>
总分:
<i>
50.0
</i></span>
</p>
<div
class=
"Left-list"
style=
"height:740px;overflow:auto;"
>
<div
class=
"List-con1"
>
<ul
class=
"List-ul"
>
<li
class=
""
>
<a
href=
"#"
>
<b>
(
<label>
1
</label>
)
</b>
<b>
ここは郵便局です
</b>
<span
class=
"Showbtn"
></span>
</a>
</li>
</ul>
</div>
<template
v-if=
"DataObj&&DataObj.GroupList&&DataObj.GroupList.length>0"
>
<div
class=
"List-con1"
v-for=
"(gItem,gIndex) in DataObj.GroupList"
:key=
"gIndex"
>
<b>
(
<label>
{{
gIndex
+
1
}}
</label>
)
</b>
<b>
{{
gItem
.
GroupName
}}
</b>
<ul
class=
"List-ul"
v-if=
"gItem.DetailsList&&gItem.DetailsList.length>0"
>
<li
class=
""
style=
"cursor:pointer;"
v-for=
"(dItem,dIndex) in gItem.DetailsList"
:key=
"dIndex"
@
click=
"ClickItem(dItem)"
>
{{
dIndex
+
1
}}
<span
@
click=
"ClickItem(dItem)"
v-html=
"dItem.ShowTitle"
>
</span>
</li>
</ul>
</div>
</
template
>
</div>
</div>
<div
class=
"Exam-right f1"
>
<div
class=
"Left-btn"
>
<div></div>
<div>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"isShowQuestion=true"
class=
"q-mr-md"
label=
"题库选题"
/>
<span></span>
<div
class=
"row wrap"
v-if=
"ChooseItem"
>
<div
class=
"col-12"
style=
"margin-bottom:20px"
>
题型
<
template
v-for=
"(fItem,fIndex) in firstTypeList"
>
<q-btn
:key=
"fIndex"
color=
"accent"
:label=
"fItem.Name"
style=
"margin-left:5px;"
@
click=
"onItemClick(fItem)"
/>
</
template
>
<q-btn-dropdown
color=
"accent"
label=
"更多"
style=
"margin-left:5px;"
>
<q-list>
<q-item
v-for=
"(fItem,fIndex) in secondTypeList"
@
click=
"onItemClick(fItem)"
clickable
v-close-popup
:key=
"fIndex"
>
<q-item-section>
<q-item-label>
{{fItem.Name}}
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
<div
class=
"edit_stem"
>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"ChooseItem.Score"
class=
"col-12 q-pb-lg"
label=
"分数"
/>
</div>
<div
class=
"col-12"
>
<
template
v-if=
"ChooseItem.QuestionTypeKey=='cloze'"
>
<span
class=
"question_number"
>
选项处用##题号##替换,如##1##
</span>
</
template
>
<UeEditor
v-if=
"ChooseItem.QuestionTypeKey!='sharing-choose'"
v-model=
"ChooseItem.Title"
:config=
"config"
ref=
"UE_Title"
></UeEditor>
</div>
<br
/>
<!--单选题-->
<single
v-if=
"ChooseItem.QuestionTypeKey=='single'||ChooseItem.QuestionTypeKey=='single-number'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
:setOption=
"ChooseItem"
></single>
<!--多选题-->
<multiple
v-if=
"ChooseItem.QuestionTypeKey=='multiple'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
:setOption=
"ChooseItem"
></multiple>
<!--填空题-->
<fill-in
v-if=
"ChooseItem.QuestionTypeKey=='fill-in'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
:setOption=
"ChooseItem"
></fill-in>
<!--判断题-->
<judge
v-if=
"ChooseItem.QuestionTypeKey=='judge'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
:setOption=
"objOption"
></judge>
<!--简答题、名词解释、论述题、计算题、口语题、其它-->
<short-answer
v-if=
"ChooseItem.QuestionTypeKey=='short-answer'||ChooseItem.QuestionTypeKey=='noun-explanation'||ChooseItem.QuestionTypeKey=='essay-question'
||ChooseItem.QuestionTypeKey=='calculation' || ChooseItem.QuestionTypeKey=='spoken'|| ChooseItem.QuestionTypeKey=='other'
"
:setOption=
"objOption"
>
</short-answer>
<!--分录题、资料题-->
<entry-problem
v-if=
"ChooseItem.QuestionTypeKey=='entry-problem'|| ChooseItem.Key=='data-question'"
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
>
</entry-problem>
<!--连线题-->
<matching
v-if=
"ChooseItem.QuestionTypeKey=='matching'"
:questionData=
"AnswerList"
:setOption=
"ChooseItem"
@
getChild=
"getChildData"
></matching>
<!--排序题-->
<sorting-problem
v-if=
"ChooseItem.QuestionTypeKey=='sorting-problem'"
:questionData=
"AnswerList"
:setOption=
"ChooseItem"
@
getChild=
"getChildData"
></sorting-problem>
<!--完型填空-->
<cloze
v-if=
"ChooseItem.QuestionTypeKey=='cloze'"
:questionData=
"AnswerList"
:setOption=
"ChooseItem"
@
getChild=
"getChildData"
></cloze>
<!--阅读理解、听力题-->
<reading-comprehensio
v-if=
"ChooseItem.QuestionTypeKey=='reading-comprehensio'||ChooseItem.QuestionTypeKey=='listening'"
:questionData=
"AnswerList"
:setOption=
"ChooseItem"
@
getChild=
"getChildData"
></reading-comprehensio>
<!--共用选择题-->
<sharing-choose
v-if=
"ChooseItem.QuestionTypeKey=='sharing-choose'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
:setOption=
"ChooseItem"
>
</sharing-choose>
<br
/>
<div
class=
"col-12"
>
<div
style=
"margin:20px 0;"
>
答案解析
</div>
<UeEditor
v-model=
"ChooseItem.AnswerParse"
:config=
"config"
ref=
"AnswerParse"
></UeEditor>
</div>
<br
/>
<div
class=
"col-12"
>
<br
/>
<span
class=
"difficulty_Degree"
>
难度
</span>
<select
v-model=
"ChooseItem.DifficultyType"
class=
"selectBox blue-border"
>
<
template
v-for=
"(cItem,cIndex) in questionDifficultyTypeList"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Id"
>
</option>
</
template
>
</select>
</div>
<div
class=
"col-12"
>
<br
/>
<span
class=
"difficulty_Degree"
>
所属大类
</span>
<select
v-model=
"ChooseItem.Category"
class=
"selectBox blue-border"
>
<
template
v-for=
"(cItem,cIndex) in questionCategoryList"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Id"
>
</option>
</
template
>
</select>
</div>
<div
class=
"col-12"
>
<br
/>
<span
class=
"difficulty_Degree"
>
考级程度
</span>
<select
v-model=
"ChooseItem.LevelType"
class=
"selectBox blue-border"
>
<
template
v-for=
"(cItem,cIndex) in questionLevalTypeList"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Id"
>
</option>
</
template
>
</select>
</div>
<div
class=
"col-12"
style=
"margin-top:16px;"
>
<span
class=
"difficulty_Degree"
>
知识点:
</span>
<a
class=
"addKnowledge"
@
click=
"isShowPoint=true"
>
<i
class=
"iconfont icon-add"
style=
"position:relative;top:1px;"
></i>
选择知识点
</a>
<span
class=
"knowledge_List"
v-for=
"(x, i) in choosePointArray"
:key=
"i"
>
{{x.PointName}}
<i
class=
"iconfont icon-shanchu1"
@
click=
"removePointTag(i)"
></i>
</span>
</div>
</div>
</div>
</div>
<questionForm
v-if=
"isShowQuestion"
@
close=
"closeQuestForm"
@
success=
"refreshPage"
></questionForm>
</div>
</template>
<
script
>
import
UeEditor
from
'../../components/editor/UeEditor'
//知识点列表
import
questionpoint
from
'../../components/question/questionpoint'
import
single
from
'../../components/questiontype/single'
import
multiple
from
'../../components/questiontype/multiple'
import
fillIn
from
'../../components/questiontype/fill-in'
import
judge
from
'../../components/questiontype/judge'
import
shortAnswer
from
'../../components/questiontype/short-answer'
import
entryProblem
from
'../../components/questiontype/entry-problem'
import
matching
from
'../../components/questiontype/matching'
import
sortingProblem
from
'../../components/questiontype/sorting-problem'
import
cloze
from
'../../components/questiontype/cloze'
import
readingComprehensio
from
'../../components/questiontype/reading-comprehensio'
import
sharingChoose
from
'../../components/questiontype/sharing-choose'
import
{
GetPaper
GetPaper
,
savePaperInfo
,
}
from
'../../api/teacher/index'
;
import
questionForm
from
'../../components/exam/question-form'
import
{
queryQuestionTypeList
,
queryDifficultyType
,
queryQuestionCategory
,
queryQuestionLevelType
}
from
'../../api/question/question'
export
default
{
components
:
{
UeEditor
,
questionpoint
,
//知识点
single
,
//单选题
multiple
,
//多选题
fillIn
,
//填空题
judge
,
//判断题
shortAnswer
,
//简答题
entryProblem
,
//分录题
matching
,
//连线题
sortingProblem
,
//排序题
cloze
,
//完型填空
readingComprehensio
,
//阅读理解
sharingChoose
,
//共用选择题
},
meta
:
{
title
:
"考试"
},
components
:
{
questionForm
},
data
()
{
return
{
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
80
,
},
easyList
:
[{
Id
:
1
,
Name
:
'难'
...
...
@@ -183,33 +329,96 @@
Name
:
'易'
}],
msg
:
{
PaperId
:
1
PaperId
:
0
},
isShowQuestion
:
false
,
//试卷对象
DataObj
:
{},
//点击问题对象
ChooseItem
:
{},
questionDifficultyTypeList
:
[],
//难易程度列表
questionLevalTypeList
:
[],
questionCategoryList
:
[],
//分类
choosePointArray
:
[],
//选择知识点
firstTypeList
:
[],
//第一类题型
secondTypeList
:
[],
//第二类题型
}
},
created
()
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
Id
)
{
this
.
msg
.
PaperId
=
decodeURI
(
this
.
$route
.
query
.
Id
)
}
this
.
getQuestionType
();
this
.
getDifficultyType
();
this
.
getQuestionCategory
();
this
.
getQuestionLevelType
},
mounted
()
{
this
.
GetPaper
Timu
()
this
.
GetPaper
Info
()
},
methods
:
{
//获取题型列表
getQuestionType
()
{
queryQuestionTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
tempArray
=
res
.
Data
;
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
this
.
firstTypeList
=
tempArray
.
slice
(
0
,
5
);
this
.
secondTypeList
=
tempArray
.
slice
(
5
);
}
}
});
},
//题型点击
onItemClick
(
item
)
{
// this.AnswerList = [];
// this.questionObj = item;
// this.objOption.QuestionTypeId = item.QId;
// this.objOption.QuestionTypeKey = item.Key;
// var obj = CreateQuestion(item.Key);
// this.AnswerList = obj;
// if (obj) {
// this.objOption.QuestionContent = JSON.stringify(obj);
// }
},
//获取问题大类
getQuestionCategory
()
{
queryQuestionCategory
().
then
(
res
=>
{
this
.
questionCategoryList
=
res
.
Data
;
})
},
//获取问题考级程度
getQuestionLevelType
()
{
queryQuestionLevelType
().
then
(
res
=>
{
this
.
questionLevalTypeList
=
res
.
Data
;
})
},
//获取问题难易程度列表
getDifficultyType
()
{
queryDifficultyType
().
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
questionDifficultyTypeList
=
res
.
Data
;
}
});
},
//获取题目
GetPaper
Timu
()
{
GetPaper
Info
()
{
GetPaper
(
this
.
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'数据'
);
if
(
res
.
Code
==
1
)
{
this
.
DataObj
=
res
.
Data
;
}
console
.
log
(
"this.DataObj"
,
this
.
DataObj
);
})
},
//选题
choiceTi
(){
},
closeQuestForm
(){
this
.
isShowQuestion
=
false
;
//点击问题
ClickItem
(
questionItem
)
{
this
.
ChooseItem
=
questionItem
;
console
.
log
(
"questionItem"
,
questionItem
);
},
refreshPage
(){
//保存题目
SavePaper
()
{
savePaperInfo
(
this
.
DataObj
).
then
(
res
=>
{
console
.
log
(
"res"
,
res
);
})
}
}
}
...
...
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