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
011f22db
Commit
011f22db
authored
Oct 24, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
cf6de52e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
6 deletions
+54
-6
common.js
src/api/common/common.js
+7
-1
teachupload-form.vue
src/components/course/teachupload-form.vue
+37
-2
teachplan.vue
src/pages/course/teachplan.vue
+10
-3
No files found.
src/api/common/common.js
View file @
011f22db
import
request
from
'../../utils/request'
import
{
Loading
}
from
'quasar'
/**
* 获取富文本编辑器Font
*/
...
...
@@ -30,6 +32,9 @@ var uploadMsg = {
* 自定义上传文件
*/
export
function
UploadSelfFile
(
path
,
file
,
isTrans
,
callback
)
{
Loading
.
show
({
message
:
'正在上传文件,请稍后...'
})
var
newPath
=
'/Upload/'
+
path
+
"/"
;
let
url
=
uploadMsg
.
uploadUrl
+
"/Upload?filePath="
+
newPath
;
if
(
isTrans
&&
isTrans
==
1
)
{
...
...
@@ -47,6 +52,7 @@ export function UploadSelfFile(path, file, isTrans, callback) {
tempArray
.
push
(
uploadMsg
.
imgDomain
+
item
);
})
}
Loading
.
hide
();
var
uploadResult
=
{
resultCode
:
1
,
FileName
:
file
.
name
,
...
...
src/components/course/teachupload-form.vue
View file @
011f22db
...
...
@@ -12,6 +12,16 @@
accept=
".doc,.docx,.ppt,.pptx,.xls,.xlsx,.pdf"
auto-upload
:factory=
"uploadFile"
no-thumbnails
>
</q-uploader>
</div>
<div
class=
"text-caption q-my-md q-px-xs text-grey-6"
>
附件
</div>
<div
class=
"text-caption q-my-md q-px-xs text-grey-6"
v-if=
"objOption.SourceUrl!=''"
>
<a
:href=
"objOption.SourceUrl"
:download=
"objOption.PlanName"
>
{{
objOption
.
PlanName
}}
</a>
<div
class=
"col-6"
>
<template
v-for=
"item in tempFileList"
>
<q-img
:src=
"item"
style=
"height: 140px; max-width: 150px"
>
</q-img>
</
template
>
</div>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
...
...
@@ -25,7 +35,8 @@
<
script
>
import
{
saveTeachPlanInfo
saveTeachPlanInfo
,
queryTeachPlanInfo
,
}
from
'../../api/course/index'
import
{
UploadSelfFile
,
...
...
@@ -65,6 +76,7 @@
},
optionTitle
:
""
,
saveCourseLoading
:
false
,
tempFileList
:
[],
//生成文件图片路径
}
},
mounted
()
{
...
...
@@ -85,7 +97,30 @@
},
//初始化表单
initObj
()
{
this
.
optionTitle
=
""
;
if
(
this
.
saveObj
&&
this
.
saveObj
.
PlanId
>
0
)
{
queryTeachPlanInfo
({
PlanId
:
this
.
saveObj
.
PlanId
}).
then
(
res
=>
{
console
.
log
(
"res"
,
res
.
Data
)
this
.
objOption
.
PlanName
=
res
.
Data
.
PlanName
;
this
.
objOption
.
PlanId
=
res
.
Data
.
PlanId
;
this
.
objOption
.
CourseId
=
res
.
Data
.
CourseId
;
this
.
objOption
.
ClassBefore
=
res
.
Data
.
ClassBefore
;
this
.
objOption
.
ClassIn
=
res
.
Data
.
ClassIn
;
this
.
objOption
.
ClassAfter
=
res
.
Data
.
ClassAfter
;
this
.
objOption
.
ParentPlanId
=
res
.
Data
.
ParentPlanId
;
this
.
objOption
.
SourceUrl
=
res
.
Data
.
SourceUrl
;
this
.
objOption
.
PlanFileExtension
=
res
.
Data
.
PlanFileExtension
;
this
.
objOption
.
PlanNodeType
=
res
.
Data
.
PlanNodeType
;
this
.
objOption
.
ExtUrl
=
res
.
Data
.
ExtUrl
;
this
.
objOption
.
Remark
=
res
.
Data
.
Remark
;
this
.
tempFileList
=
res
.
Data
.
FileList
;
})
this
.
optionTitle
=
"重新上传教案信息"
}
else
{
this
.
optionTitle
=
"上传教案"
}
},
//关闭弹窗
closeCourseForm
()
{
...
...
src/pages/course/teachplan.vue
View file @
011f22db
...
...
@@ -56,8 +56,8 @@
<teachplan-form
v-if=
"IsShowTeachForm"
:CourseId=
"CourseId"
:save-obj=
"teachPlanObj"
@
close=
"closeTeachSaveForm"
@
success=
"refreshPage"
>
</teachplan-form>
<teachupload-form
v-if=
"IsShowTeachUploadForm"
:CourseId=
"CourseId"
:save-obj=
"teachPlanObj"
@
close=
"closeTeachUploadForm"
@
success=
"refreshPage"
>
<teachupload-form
v-if=
"IsShowTeachUploadForm"
:CourseId=
"CourseId"
:save-obj=
"teachPlanObj"
@
close=
"closeTeachUploadForm"
@
success=
"refreshPage"
>
</teachupload-form>
</div>
</div>
...
...
@@ -169,6 +169,7 @@
//刷新页面
refreshPage
()
{
this
.
IsShowTeachForm
=
false
;
this
.
IsShowTeachUploadForm
=
false
;
this
.
getteachplanList
();
},
//新增修改菜单
...
...
@@ -178,7 +179,13 @@
}
else
{
this
.
teachPlanObj
=
null
}
this
.
IsShowTeachForm
=
true
if
(
obj
.
PlanNodeType
==
0
)
{
this
.
IsShowTeachForm
=
true
;
this
.
IsShowTeachUploadForm
=
false
;
}
else
if
(
obj
.
PlanNodeType
==
1
)
{
this
.
IsShowTeachForm
=
false
;
this
.
IsShowTeachUploadForm
=
true
;
}
},
//关闭弹窗
closeTeachSaveForm
()
{
...
...
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