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
02bec44c
Commit
02bec44c
authored
Feb 25, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ad265dd8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
535 additions
and
818 deletions
+535
-818
course-form.vue
src/components/course/course-form.vue
+535
-818
No files found.
src/components/course/course-form.vue
View file @
02bec44c
<
template
>
<
template
>
<q-dialog
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px; max-width: 900px"
>
<q-card
style=
"width: 800px; max-width: 900px"
>
<q-card-section>
<q-card-section>
<div
class=
"text-h6"
>
<div
class=
"text-h6"
>
...
@@ -15,460 +9,185 @@
...
@@ -15,460 +9,185 @@
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<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"
>
基本设置
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<q-input
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.CourseName"
ref=
"CourseName"
filled
class=
"col-6 q-pr-lg q-pb-lg"
label=
"课程名称"
:rules=
"[val => !!val || '请填写课程名称']"
/>
stack-label
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"chooseTeacher"
:dense=
"false"
ref=
"Teacher_Id"
:options=
"TeacherList"
label=
"教师团队"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
v-model=
"objOption.CourseName"
map-options
multiple
/>
ref=
"CourseName"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"课程名称"
:rules=
"[val => !!val || '请填写课程名称']"
/>
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"chooseTeacher"
ref=
"Teacher_Id"
:options=
"TeacherList"
label=
"教师团队"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
multiple
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-6 q-pb-lg q-pr-lg"
>
<div
class=
"col-6 q-pb-lg q-pr-lg"
>
<q-uploader
<q-uploader
:style=
"
{ backgroundImage: 'url(' + objOption.CoverImg + ')' }"
:style=
"
{ backgroundImage: 'url(' + objOption.CoverImg + ')' }"
style="width: auto; height: 139px" flat hide-upload-btn max-files="1" label="课程封面" accept=".jpg, image/*"
style="width: auto; height: 139px"
:factory="uploadFile" auto-upload>
flat
hide-upload-btn
max-files="1"
label="课程封面"
accept=".jpg, image/*"
:factory="uploadFile"
auto-upload
>
</q-uploader>
</q-uploader>
</div>
</div>
<div
class=
"col-6 q-pr-lg q-pb-lg"
>
<div
class=
"col-6 q-pr-lg q-pb-lg"
>
<q-input
<q-input
v-model=
"objOption.CourseFeature"
filled
type=
"textarea"
placeholder=
"课程特色"
/>
v-model=
"objOption.CourseFeature"
</div>
filled
</div>
type=
"textarea"
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
v-if=
"isShowPrice == 1"
>
placeholder=
"课程特色"
/>
</div>
</div>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
v-if=
"isShowPrice == 1"
>
价格设置
价格设置
<q-toggle
<q-toggle
style=
"float: right"
size=
"md"
left-label
label=
"阶梯定价"
color=
"primary"
:false-value=
"0"
style=
"float: right"
:true-value=
"1"
v-model=
"objOption.IsOpenStepPrice"
/>
size=
"md"
left-label
label=
"阶梯定价"
color=
"primary"
:false-value=
"0"
:true-value=
"1"
v-model=
"objOption.IsOpenStepPrice"
/>
</div>
</div>
<div
class=
"row wrap"
v-if=
"isShowPrice == 1"
>
<div
class=
"row wrap"
v-if=
"isShowPrice == 1"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.OriginalPrice"
ref=
"OriginalPrice"
filled
class=
"col-6 q-pr-lg q-pb-lg"
label=
"原价"
@
keyup
.
native=
"checkPrice(objOption, 'OriginalPrice')"
stack-label
:rules=
"[val => !!val || '请填写原价']"
/>
:dense=
"false"
v-model=
"objOption.OriginalPrice"
ref=
"OriginalPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"原价"
@
keyup
.
native=
"checkPrice(objOption, 'OriginalPrice')"
:rules=
"[val => !!val || '请填写原价']"
/>
</div>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.SellPrice"
ref=
"SellPrice"
filled
class=
"col-6 q-pr-lg q-pb-lg"
label=
"卖价"
@
keyup
.
native=
"checkPrice(objOption, 'SellPrice')"
stack-label
:rules=
"[val => !!val || '请填写卖价']"
/>
:dense=
"false"
v-model=
"objOption.SellPrice"
ref=
"SellPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"卖价"
@
keyup
.
native=
"checkPrice(objOption, 'SellPrice')"
:rules=
"[val => !!val || '请填写卖价']"
/>
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
style=
"margin: 20px 0"
v-if=
"isShowPrice == 1"
>
<div
class=
"row wrap"
style=
"margin: 20px 0"
v-if=
"isShowPrice == 1"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-btn
<q-btn
v-if=
"objOption.IsOpenStepPrice == 1"
size=
"10px"
@
click=
"addStepPrice()"
round
color=
"primary"
v-if=
"objOption.IsOpenStepPrice == 1"
icon=
"iconfont icon-img_haha"
/>
size=
"10px"
@
click=
"addStepPrice()"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
</div>
</div>
</div>
</div>
<template
v-if=
"objOption.IsOpenStepPrice == 1 && isShowPrice == 1"
>
<template
v-if=
"objOption.IsOpenStepPrice == 1 && isShowPrice == 1"
>
<div
<div
class=
"row wrap"
v-for=
"(item, index) in ladderPriceList"
:key=
"index"
>
class=
"row wrap"
v-for=
"(item, index) in ladderPriceList"
:key=
"index"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
<q-input
filled
stack-label
v-model=
"item.PersionNum"
@
keyup
.
native=
"checkInteger(item, 'PersionNum')"
filled
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"人"
/>
stack-label
v-model=
"item.PersionNum"
@
keyup
.
native=
"checkInteger(item, 'PersionNum')"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"人"
/>
</div>
</div>
<div
class=
"col-6"
style=
"position: relative"
>
<div
class=
"col-6"
style=
"position: relative"
>
<q-input
<q-input
filled
stack-label
v-model=
"item.PersionPrice"
@
keyup
.
native=
"checkPrice(item, 'PersionPrice')"
filled
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"价格"
/>
stack-label
<q-btn
style=
"position: absolute; right: -5px; top: 20px"
size=
"6px"
@
click=
"delStepPrice(index)"
round
v-model=
"item.PersionPrice"
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
@
keyup
.
native=
"checkPrice(item, 'PersionPrice')"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"价格"
/>
<q-btn
style=
"position: absolute; right: -5px; top: 20px"
size=
"6px"
@
click=
"delStepPrice(index)"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<div
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
v-if=
"isShowPrice == 1"
>
class=
"text-caption q-mb-lg q-px-md text-grey-6"
v-if=
"isShowPrice == 1"
>
可续费课程
可续费课程
<q-toggle
<q-toggle
style=
"float: right"
size=
"md"
left-label
label=
"可续费课程"
color=
"primary"
:false-value=
"0"
style=
"float: right"
:true-value=
"1"
v-model=
"objOption.IsRenew"
/>
size=
"md"
left-label
label=
"可续费课程"
color=
"primary"
:false-value=
"0"
:true-value=
"1"
v-model=
"objOption.IsRenew"
/>
</div>
</div>
<div
class=
"row wrap"
v-if=
"objOption.IsRenew == 1 && isShowPrice == 1"
>
<div
class=
"row wrap"
v-if=
"objOption.IsRenew == 1 && isShowPrice == 1"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.RenewOgPrice"
ref=
"RenewOgPrice"
filled
class=
"col-6 q-pr-lg q-pb-lg"
label=
"续费原价"
@
keyup
.
native=
"checkPrice(objOption, 'RenewOgPrice')"
stack-label
:rules=
"[val => !!val || '请填写续费原价']"
/>
:dense=
"false"
v-model=
"objOption.RenewOgPrice"
ref=
"RenewOgPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"续费原价"
@
keyup
.
native=
"checkPrice(objOption, 'RenewOgPrice')"
:rules=
"[val => !!val || '请填写续费原价']"
/>
</div>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.RenewSlPrice"
ref=
"RenewSlPrice"
filled
class=
"col-6 q-pr-lg q-pb-lg"
label=
"续费售价"
@
keyup
.
native=
"checkPrice(objOption, 'RenewSlPrice')"
stack-label
:rules=
"[val => !!val || '请填写续费售价']"
/>
:dense=
"false"
v-model=
"objOption.RenewSlPrice"
ref=
"RenewSlPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"续费售价"
@
keyup
.
native=
"checkPrice(objOption, 'RenewSlPrice')"
:rules=
"[val => !!val || '请填写续费售价']"
/>
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
<q-input
filled
stack-label
:disable=
"!isHaveCourseHoursEdit"
filled
@
keyup
.
native=
"checkPrice(objOption, 'ClassHours')"
reverse-fill-mask
v-model=
"objOption.ClassHours"
stack-label
ref=
"ClassHours"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"课时数量"
:rules=
"[val => !!val || '请填写课时信息']"
/>
:disable=
"!isHaveCourseHoursEdit"
@
keyup
.
native=
"checkPrice(objOption, 'ClassHours')"
reverse-fill-mask
v-model=
"objOption.ClassHours"
ref=
"ClassHours"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"课时数量"
:rules=
"[val => !!val || '请填写课时信息']"
/>
</div>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-select
<q-select
filled
stack-label
@
input=
"changeCourseSubject(objOption.CateId)"
option-value=
"CateId"
filled
option-label=
"CateName"
v-model=
"objOption.CateId"
ref=
"CateId"
:options=
"TreeCategoryList"
label=
"所属系列"
stack-label
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
:rules=
"[val => !!val || '请选择课程所属系列']"
/>
@
input=
"getCourseSubject(objOption.CateId)"
option-value=
"CateId"
option-label=
"CateName"
v-model=
"objOption.CateId"
ref=
"CateId"
:options=
"TreeCategoryList"
label=
"所属系列"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
:rules=
"[val => !!val || '请选择课程所属系列']"
/>
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-select
<q-select
filled
stack-label
option-value=
"Id"
disable
option-label=
"SubjectName"
filled
v-model=
"objOption.CourseSubject"
ref=
"CourseSubject"
:options=
"courseSubjectList"
label=
"所属科目"
stack-label
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
option-value=
"Id"
disable
option-label=
"SubjectName"
v-model=
"objOption.CourseSubject"
ref=
"CourseSubject"
:options=
"courseSubjectList"
label=
"所属科目"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-select
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.CourseRate"
filled
ref=
"CourseRate"
:options=
"courseLevelList"
label=
"课程等级"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
stack-label
map-options
/>
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.CourseRate"
ref=
"CourseRate"
:options=
"courseLevelList"
label=
"课程等级"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<q-field
<q-field
label=
"是否支持约课报名"
stack-label
filled
class=
"col-6 q-pr-lg q-pb-lg"
>
label=
"是否支持约课报名"
stack-label
filled
class=
"col-6 q-pr-lg q-pb-lg"
>
<
template
v-slot:control
>
<
template
v-slot:control
>
<div
class=
"row col-12"
>
<div
class=
"row col-12"
>
<q-radio
<q-radio
v-model=
"objOption.IsScrollClass"
:val=
"0"
label=
"否"
size=
"xs"
/>
v-model=
"objOption.IsScrollClass"
<q-radio
v-model=
"objOption.IsScrollClass"
:val=
"1"
label=
"是"
size=
"xs"
/>
:val=
"0"
label=
"否"
size=
"xs"
/>
<q-radio
v-model=
"objOption.IsScrollClass"
:val=
"1"
label=
"是"
size=
"xs"
/>
</div>
</div>
</
template
>
</
template
>
</q-field>
</q-field>
<q-select
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.CourseTimeId"
filled
ref=
"CourseTime"
:options=
"CourseTimeList"
label=
"关联上课时段"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
stack-label
map-options
/>
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.CourseTimeId"
ref=
"CourseTime"
:options=
"CourseTimeList"
label=
"关联上课时段"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
</div>
<div
class=
"row"
v-if=
"objOption.IsScrollClass==1"
>
<div
class=
"row"
v-if=
"objOption.IsScrollClass==1"
>
<q-input
<q-input
filled
stack-label
v-model=
"objOption.ScrollMinNum"
ref=
"ScrollMinNum"
class=
"col-6 q-pr-lg q-pb-lg"
filled
label=
"最小上课人数"
:rules=
"[val => !!val || '请填写最小上课人数']"
/>
stack-label
<q-input
filled
stack-label
v-model=
"objOption.ScrollMaxNum"
ref=
"ScrollMaxNum"
class=
"col-6 q-pr-lg q-pb-lg"
v-model=
"objOption.ScrollMinNum"
label=
"最大上课人数"
:rules=
"[val => !!val || '请填写最大上课人数']"
/>
ref=
"ScrollMinNum"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"最小上课人数"
:rules=
"[val => !!val || '请填写最小上课人数']"
/>
<q-input
filled
stack-label
v-model=
"objOption.ScrollMaxNum"
ref=
"ScrollMaxNum"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"最大上课人数"
:rules=
"[val => !!val || '请填写最大上课人数']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-select
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"CourseEmphasis"
multiple
filled
use-chips
ref=
"CourseEmphasis"
:options=
"keynoteList"
label=
"课程重点"
class=
"col-6 q-pr-lg q-pb-lg"
stack-label
emit-value
map-options
/>
option-value=
"Id"
option-label=
"Name"
v-model=
"CourseEmphasis"
multiple
use-chips
ref=
"CourseEmphasis"
:options=
"keynoteList"
label=
"课程重点"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
</div>
<div
class=
"col-6 q-pb-lg q-pr-lg"
>
<div
class=
"col-6 q-pb-lg q-pr-lg"
>
<q-uploader
<q-uploader
:style=
"{ backgroundImage: 'url(' + objOption.B2BIcon + ')' }"
style=
"width: auto; "
flat
:style=
"{ backgroundImage: 'url(' + objOption.B2BIcon + ')' }"
hide-upload-btn
max-files=
"1"
label=
"图标"
accept=
".jpg, image/*"
:factory=
"uploadFile2"
auto-upload
>
style=
"width: auto; "
flat
hide-upload-btn
max-files=
"1"
label=
"图标"
accept=
".jpg, image/*"
:factory=
"uploadFile2"
auto-upload
>
</q-uploader>
</q-uploader>
<q-input
<q-input
filled
label=
"背景颜色"
v-model=
"objOption.B2BBackground"
:rules=
"['anyColor']"
class=
"my-input"
>
filled
label=
"背景颜色"
v-model=
"objOption.B2BBackground"
:rules=
"['anyColor']"
class=
"my-input"
>
<
template
v-slot:append
>
<
template
v-slot:append
>
<q-icon
name=
"colorize"
class=
"cursor-pointer"
>
<q-icon
name=
"colorize"
class=
"cursor-pointer"
>
<q-popup-proxy
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
transition-show=
"scale"
transition-hide=
"scale"
>
<q-color
v-model=
"objOption.B2BBackground"
/>
<q-color
v-model=
"objOption.B2BBackground"
/>
</q-popup-proxy>
</q-popup-proxy>
</q-icon>
</q-icon>
</
template
>
</
template
>
</q-input>
</q-input>
<img
<img
id=
"background"
:src=
"objOption.B2BIcon"
height=
"100"
width=
"100"
crossorigin=
"anonymous"
id=
"background"
style=
"display:none"
/>
:src=
"objOption.B2BIcon"
height=
"100"
width=
"100"
crossorigin=
"anonymous"
style=
"display:none"
/>
</div>
</div>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-12 q-pr-lg q-pb-lg"
>
<div
class=
"col-12 q-pr-lg q-pb-lg"
>
<q-input
<q-input
v-model=
"objOption.ContractInfo"
filled
type=
"textarea"
placeholder=
"合同补充协议"
/>
v-model=
"objOption.ContractInfo"
filled
type=
"textarea"
placeholder=
"合同补充协议"
/>
</div>
</div>
</div>
</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"
>
课程介绍
</div>
<ext-editor
<ext-editor
:defaultMsg=
"objOption.CourseIntro"
classStr=
"col-12"
@
getEditValue=
"getEditValue"
></ext-editor>
:defaultMsg=
"objOption.CourseIntro"
classStr=
"col-12"
@
getEditValue=
"getEditValue"
></ext-editor>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-9"
>
<div
class=
"col-9"
>
<span>
上架端口:
</span>
<span>
上架端口:
</span>
<
template
v-for=
"(item, index) in SaleplatList"
>
<
template
v-for=
"(item, index) in SaleplatList"
>
<q-checkbox
<q-checkbox
v-model=
"choosePlat"
:label=
"item.Name"
:val=
"item.Id"
:key=
"index"
/>
v-model=
"choosePlat"
:label=
"item.Name"
:val=
"item.Id"
:key=
"index"
/>
</
template
>
</
template
>
</div>
</div>
<div
class=
"col-3"
>
<div
class=
"col-3"
>
<q-toggle
<q-toggle
style=
"float: right"
size=
"md"
left-label
label=
"K12课程"
color=
"primary"
:false-value=
"0"
style=
"float: right"
:true-value=
"1"
v-model=
"objOption.IsKCourse"
/>
size=
"md"
left-label
label=
"K12课程"
color=
"primary"
:false-value=
"0"
:true-value=
"1"
v-model=
"objOption.IsKCourse"
/>
</div>
</div>
</div>
</div>
<div
class=
"row col-12"
v-if=
"choosePlat.find(e => e == 4)"
>
<div
class=
"row col-12"
v-if=
"choosePlat.find(e => e == 4)"
>
<span
class=
"q-mb-sm"
>
选择分类:
</span>
<span
class=
"q-mb-sm"
>
选择分类:
</span>
<q-card
class=
"full-width"
>
<q-card
class=
"full-width"
>
<q-tree
<q-tree
class=
"col-sm-6"
:nodes=
"goodClassify"
node-key=
"Id"
label-key=
"Name"
children-key=
"ChildList"
class=
"col-sm-6"
tick-strategy=
"strict"
:ticked
.
sync=
"chooseGoodsClassify"
default-expand-all
:nodes=
"goodClassify"
@
update:ticked=
"handleCheckChange"
/>
node-key=
"Id"
label-key=
"Name"
children-key=
"ChildList"
tick-strategy=
"strict"
:ticked
.
sync=
"chooseGoodsClassify"
default-expand-all
@
update:ticked=
"handleCheckChange"
/>
</q-card>
</q-card>
</div>
</div>
</q-card-section>
</q-card-section>
<q-separator
/>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight: 400 !important"
@
click=
"closeCourseForm"
/>
label=
"取消"
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight: 400 !important"
:loading=
"saveCourseLoading"
flat
@
click=
"saveCourse"
/>
color=
"grey-10"
style=
"font-weight: 400 !important"
@
click=
"closeCourseForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight: 400 !important"
:loading=
"saveCourseLoading"
@
click=
"saveCourse"
/>
</q-card-actions>
</q-card-actions>
</q-card>
</q-card>
</q-dialog>
</q-dialog>
</template>
</template>
<
script
>
<
script
>
import
ColorThief
from
"colorthief"
;
import
ColorThief
from
"colorthief"
;
import
{
import
{
queryCourseCategoryTree
,
queryCourseCategoryTree
,
saveCourseInfo
,
saveCourseInfo
,
queryCourseInfo
,
queryCourseInfo
,
...
@@ -476,13 +195,21 @@ import {
...
@@ -476,13 +195,21 @@ import {
getCourseRate
,
getCourseRate
,
getCourseSubject
,
getCourseSubject
,
getCourseEmphasisEnumList
getCourseEmphasisEnumList
}
from
"../../api/course/index"
;
}
from
"../../api/course/index"
;
import
{
getTeacherDropDownList
}
from
"../../api/school/index"
;
import
{
import
{
UploadSelfFile
}
from
"../../api/common/common"
;
getTeacherDropDownList
import
{
getScrollCourseTimeList
}
from
"../../api/course/roll"
;
}
from
"../../api/school/index"
;
import
extEditor
from
"../common/ext-editor"
;
import
{
import
{
mapState
}
from
"vuex"
;
UploadSelfFile
export
default
{
}
from
"../../api/common/common"
;
import
{
getScrollCourseTimeList
}
from
"../../api/course/roll"
;
import
extEditor
from
"../common/ext-editor"
;
import
{
mapState
}
from
"vuex"
;
export
default
{
components
:
{
components
:
{
extEditor
extEditor
},
},
...
@@ -547,14 +274,17 @@ export default {
...
@@ -547,14 +274,17 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
getCategorytree
();
this
.
GetTeacherList
();
this
.
GetTeacherList
();
this
.
getSaleplat
();
this
.
getSaleplat
();
//获取电商商品分类
this
.
getGoodsClassify
();
this
.
getGoodsClassify
();
this
.
getCourseRateList
();
this
.
getCourseRateList
();
this
.
getCourseEmphasisList
();
//获取课程重点枚举列表
this
.
getCourseEmphasisList
();
//获取课程重点枚举列表
this
.
initObj
();
this
.
initObj
();
},
},
computed
:
mapState
({
computed
:
mapState
({
//是否有编辑课时权限
isHaveCourseHoursEdit
(
state
)
{
isHaveCourseHoursEdit
(
state
)
{
if
(
if
(
state
.
user
.
userInfo
&&
state
.
user
.
userInfo
&&
...
@@ -578,7 +308,7 @@ export default {
...
@@ -578,7 +308,7 @@ export default {
},
},
methods
:
{
methods
:
{
//根据系列改变获取所属科目
//根据系列改变获取所属科目
get
CourseSubject
(
Id
)
{
change
CourseSubject
(
Id
)
{
if
(
Id
>
0
)
{
if
(
Id
>
0
)
{
let
val
=
this
.
TreeCategoryList
.
find
(
x
=>
x
.
CateId
==
Id
);
let
val
=
this
.
TreeCategoryList
.
find
(
x
=>
x
.
CateId
==
Id
);
this
.
objOption
.
CourseSubject
=
val
.
CourseSubject
;
this
.
objOption
.
CourseSubject
=
val
.
CourseSubject
;
...
@@ -633,13 +363,6 @@ export default {
...
@@ -633,13 +363,6 @@ export default {
getEditValue
(
obj
)
{
getEditValue
(
obj
)
{
this
.
objOption
.
CourseIntro
=
obj
;
this
.
objOption
.
CourseIntro
=
obj
;
},
},
getChild
(
obj
)
{
if
(
obj
==
""
)
{
this
.
objOption
.
CateId
=
0
;
}
else
{
this
.
objOption
.
CateId
=
obj
;
}
},
uploadFile
(
files
)
{
uploadFile
(
files
)
{
UploadSelfFile
(
"course"
,
files
[
0
],
res
=>
{
UploadSelfFile
(
"course"
,
files
[
0
],
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
...
@@ -698,17 +421,12 @@ export default {
...
@@ -698,17 +421,12 @@ export default {
return
string
;
return
string
;
}
}
},
},
//获取课程系列
getCategorytree
()
{
getCategorytree
()
{
this
.
TreeCategoryList
=
[];
this
.
TreeCategoryList
=
[];
var
qMsg
=
{};
var
qMsg
=
{};
queryCourseCategoryTree
(
qMsg
).
then
(
res
=>
{
queryCourseCategoryTree
(
qMsg
).
then
(
res
=>
{
this
.
TreeCategoryList
=
res
.
Data
;
this
.
TreeCategoryList
=
res
.
Data
;
// if (this.objOption.CateId > 0) {
// let val = this.TreeCategoryList.find(
// x => x.CourseSubject == this.objOption.CateId
// );
// this.objOption.CourseSubject = val.CourseSubject;
// }
});
});
},
},
//新增阶梯定价
//新增阶梯定价
...
@@ -791,7 +509,6 @@ export default {
...
@@ -791,7 +509,6 @@ export default {
});
});
}
}
this
.
defaultArray
.
push
(
res
.
Data
.
CateId
);
this
.
defaultArray
.
push
(
res
.
Data
.
CateId
);
this
.
getCategorytree
();
this
.
handleCheckChange
();
this
.
handleCheckChange
();
});
});
this
.
optionTitle
=
"修改课程信息"
;
this
.
optionTitle
=
"修改课程信息"
;
...
@@ -820,7 +537,6 @@ export default {
...
@@ -820,7 +537,6 @@ export default {
this
.
objOption
.
ScrollMinNum
=
0
;
this
.
objOption
.
ScrollMinNum
=
0
;
this
.
objOption
.
ScrollMaxNum
=
0
;
this
.
objOption
.
ScrollMaxNum
=
0
;
this
.
objOption
.
CourseTimeId
=
0
;
this
.
objOption
.
CourseTimeId
=
0
;
this
.
getCategorytree
();
}
}
},
},
//关闭弹窗
//关闭弹窗
...
@@ -949,6 +665,7 @@ export default {
...
@@ -949,6 +665,7 @@ export default {
});
});
});
});
},
},
//关联上课时间段
getCourseTimeList
()
{
getCourseTimeList
()
{
getScrollCourseTimeList
({}).
then
(
res
=>
{
getScrollCourseTimeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
...
@@ -957,5 +674,5 @@ export default {
...
@@ -957,5 +674,5 @@ export default {
});
});
}
}
}
}
};
};
</
script
>
</
script
>
\ No newline at end of file
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