Commit 9f6265b4 authored by 罗超's avatar 罗超

1

parent 31f962d6
...@@ -219,7 +219,7 @@ export function saveChapter(data) { ...@@ -219,7 +219,7 @@ export function saveChapter(data) {
* 保存课程章节 * 保存课程章节
* @param {JSON参数} data * @param {JSON参数} data
*/ */
export function getCourseRate(data) { export function getCourseRate(data) {
return request({ return request({
url: "/Course/GetCourseRateEnumList", url: "/Course/GetCourseRateEnumList",
method: 'post', method: 'post',
...@@ -231,7 +231,7 @@ export function saveChapter(data) { ...@@ -231,7 +231,7 @@ export function saveChapter(data) {
* 保存课程章节 * 保存课程章节
* @param {JSON参数} data * @param {JSON参数} data
*/ */
export function deleteChapters(data) { export function deleteChapters(data) {
return request({ return request({
url: "/Course/BatchRemoveChapter", url: "/Course/BatchRemoveChapter",
method: 'post', method: 'post',
...@@ -243,7 +243,7 @@ export function saveChapter(data) { ...@@ -243,7 +243,7 @@ export function saveChapter(data) {
* 保存课程章节 * 保存课程章节
* @param {JSON参数} data * @param {JSON参数} data
*/ */
export function setChaptersRate(data) { export function setChaptersRate(data) {
return request({ return request({
url: "/Course/BatchSetChapterRate", url: "/Course/BatchSetChapterRate",
method: 'post', method: 'post',
...@@ -255,7 +255,7 @@ export function saveChapter(data) { ...@@ -255,7 +255,7 @@ export function saveChapter(data) {
* 批量更新章节编号和ID * 批量更新章节编号和ID
* @param {JSON参数} data * @param {JSON参数} data
*/ */
export function batchUpdateChapterNo(data) { export function batchUpdateChapterNo(data) {
return request({ return request({
url: "/Course/SetBatchChapterNo", url: "/Course/SetBatchChapterNo",
method: 'post', method: 'post',
...@@ -267,7 +267,7 @@ export function saveChapter(data) { ...@@ -267,7 +267,7 @@ export function saveChapter(data) {
* 修改章节名称 * 修改章节名称
* @param {JSON参数} data * @param {JSON参数} data
*/ */
export function updateChapterName(data) { export function updateChapterName(data) {
return request({ return request({
url: "/Course/SetChapterName", url: "/Course/SetChapterName",
method: 'post', method: 'post',
...@@ -396,7 +396,7 @@ export function saveOfferToOrder(data) { ...@@ -396,7 +396,7 @@ export function saveOfferToOrder(data) {
method: 'post', method: 'post',
data data
}) })
} }
/** /**
* 报价单申请改价 * 报价单申请改价
...@@ -535,7 +535,3 @@ export function SetImportCourse(data) { ...@@ -535,7 +535,3 @@ export function SetImportCourse(data) {
data data
}) })
} }
\ No newline at end of file
\ No newline at end of file
<template> <template>
<q-dialog v-model="persistent" persistent content-class="bg-grey-1" transition-show="scale" transition-hide="scale"> <q-dialog
<q-card style="width: 800px;max-width:900px;"> 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-section> <q-card-section>
<div class="text-h6"> <div class="text-h6">
{{ objOption.CourseId == 0 ? "新增课程信息" : "修改课程信息" }} {{ objOption.CourseId == 0 ? "新增课程信息" : "修改课程信息" }}
...@@ -9,140 +15,315 @@ ...@@ -9,140 +15,315 @@
<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 filled stack-label :dense="false" v-model="objOption.CourseName" ref="CourseName" <q-input
class="col-6 q-pr-lg q-pb-lg" label="课程名称" :rules="[val => !!val || '请填写课程名称']" /> filled
<q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="chooseTeacher" stack-label
ref="Teacher_Id" :options="TeacherList" label="教师团队" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value :dense="false"
map-options multiple /> v-model="objOption.CourseName"
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 :style="{ backgroundImage: 'url(' + objOption.CoverImg + ')' }" style="width:auto;height:139px" <q-uploader
flat hide-upload-btn max-files="1" label="课程封面" accept=".jpg, image/*" :factory="uploadFile" auto-upload> :style="{ backgroundImage: 'url(' + objOption.CoverImg + ')' }"
style="width: auto; height: 139px"
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 v-model="objOption.CourseFeature" filled type="textarea" placeholder="课程特色" /> <q-input
v-model="objOption.CourseFeature"
filled
type="textarea"
placeholder="课程特色"
/>
</div> </div>
</div> </div>
<div class="text-caption q-mb-lg q-px-md text-grey-6" v-if="isShowPrice == 1"> <div
class="text-caption q-mb-lg q-px-md text-grey-6"
v-if="isShowPrice == 1"
>
价格设置 价格设置
<q-toggle style="float:right;" size="md" left-label label="阶梯定价" color="primary" :false-value="0" <q-toggle
:true-value="1" v-model="objOption.IsOpenStepPrice" /> style="float: right"
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 filled stack-label :dense="false" v-model="objOption.OriginalPrice" ref="OriginalPrice" <q-input
class="col-6 q-pr-lg q-pb-lg" label="原价" @keyup.native="checkPrice(objOption, 'OriginalPrice')" filled
:rules="[val => !!val || '请填写原价']" /> stack-label
: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 filled stack-label :dense="false" v-model="objOption.SellPrice" ref="SellPrice" <q-input
class="col-6 q-pr-lg q-pb-lg" label="卖价" @keyup.native="checkPrice(objOption, 'SellPrice')" filled
:rules="[val => !!val || '请填写卖价']" /> stack-label
: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 v-if="objOption.IsOpenStepPrice == 1" size="10px" @click="addStepPrice()" round color="primary" <q-btn
icon="iconfont icon-img_haha" /> v-if="objOption.IsOpenStepPrice == 1"
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 class="row wrap" v-for="(item, index) in ladderPriceList" :key="index"> <div
class="row wrap"
v-for="(item, index) in ladderPriceList"
:key="index"
>
<div class="col-6"> <div class="col-6">
<q-input filled stack-label v-model="item.PersionNum" @keyup.native="checkInteger(item, 'PersionNum')" <q-input
:dense="false" class="col-6 q-pr-lg q-pb-lg" label="人" /> filled
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 filled stack-label v-model="item.PersionPrice" @keyup.native="checkPrice(item, 'PersionPrice')" <q-input
:dense="false" class="col-6 q-pr-lg q-pb-lg" label="价格" /> filled
<q-btn style="position:absolute;right:-5px;top:20px;" size="6px" @click="delStepPrice(index)" round stack-label
color="red" icon="iconfont icon-guanbi1" /> v-model="item.PersionPrice"
@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 class="text-caption q-mb-lg q-px-md text-grey-6" v-if="isShowPrice == 1"> <div
class="text-caption q-mb-lg q-px-md text-grey-6"
v-if="isShowPrice == 1"
>
可续费课程 可续费课程
<q-toggle style="float:right;" size="md" left-label label="可续费课程" color="primary" :false-value="0" <q-toggle
:true-value="1" v-model="objOption.IsRenew" /> style="float: right"
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 filled stack-label :dense="false" v-model="objOption.RenewOgPrice" ref="RenewOgPrice" <q-input
class="col-6 q-pr-lg q-pb-lg" label="续费原价" @keyup.native="checkPrice(objOption, 'RenewOgPrice')" filled
:rules="[val => !!val || '请填写续费原价']" /> stack-label
: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 filled stack-label :dense="false" v-model="objOption.RenewSlPrice" ref="RenewSlPrice" <q-input
class="col-6 q-pr-lg q-pb-lg" label="续费售价" @keyup.native="checkPrice(objOption, 'RenewSlPrice')" filled
:rules="[val => !!val || '请填写续费售价']" /> stack-label
: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 filled stack-label :disable="!isHaveCourseHoursEdit" @keyup.native="checkPrice(objOption, 'ClassHours')" reverse-fill-mask <q-input
v-model="objOption.ClassHours" ref="ClassHours" class="col-6 q-pr-lg q-pb-lg" label="课时数量" filled
:rules="[val => !!val || '请填写课时信息']" /> stack-label
: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 filled stack-label option-value="CateId" option-label="CateName" v-model="objOption.CateId" <q-select
ref="CateId" :options="TreeCategoryList" label="所属系列" class="col-6 q-pr-lg q-pb-lg" emit-value map-options filled
:rules="[val => !!val || '请选择课程所属系列']" /> stack-label
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="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 :defaultMsg="objOption.CourseIntro" classStr="col-12" @getEditValue="getEditValue"></ext-editor> <ext-editor
:defaultMsg="objOption.CourseIntro"
classStr="col-12"
@getEditValue="getEditValue"
></ext-editor>
<div class="row wrap"> <div class="row wrap">
<div class="col-6"> <div class="col-9">
<span>上架端口:</span> <span>上架端口:</span>
<template v-for="(item, index) in SaleplatList"> <template v-for="(item, index) in SaleplatList">
<q-checkbox v-model="choosePlat" :label="item.Name" :val="item.Id" /> <q-checkbox
v-model="choosePlat"
:label="item.Name"
:val="item.Id"
:key="index"
/>
</template> </template>
</div> </div>
<div class="col-6"> <div class="col-3">
<q-toggle style="float:right;" size="md" left-label label="K12课程" color="primary" :false-value="0" <q-toggle
:true-value="1" v-model="objOption.IsKCourse" /> style="float: right"
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)">
<span class="q-mb-sm">选择分类:</span>
<q-card class="full-width">
<q-tree
class="col-sm-6"
:nodes="goodClassify"
node-key="Id"
label-key="Name"
children-key="ChildList"
tick-strategy="strict"
:ticked.sync="chooseGoodsClassify"
default-expand-all
@update:ticked="handleCheckChange"
/>
</q-card>
</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 label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeCourseForm" /> <q-btn
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading" label="取消"
@click="saveCourse" /> flat
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 { import {
queryCourseCategoryTree, queryCourseCategoryTree,
saveCourseInfo, saveCourseInfo,
queryCourseInfo, queryCourseInfo,
querySaleplatList querySaleplatList,
} from "../../api/course/index"; } from "../../api/course/index";
import { import { getTeacherDropDownList } from "../../api/school/index";
getTeacherDropDownList import { UploadSelfFile } from "../../api/common/common";
} from "../../api/school/index"; import extEditor from "../common/ext-editor";
import { import { mapState } from "vuex";
UploadSelfFile export default {
} from "../../api/common/common";
import extEditor from "../common/ext-editor";
import {
mapState
} from "vuex";
export default {
components: { components: {
extEditor,
extEditor
}, },
props: { props: {
saveObj: { saveObj: {
type: Object, type: Object,
default: null default: null,
} },
}, },
data() { data() {
return { return {
...@@ -164,7 +345,8 @@ ...@@ -164,7 +345,8 @@
RenewSlPrice: 0, //续费售价 RenewSlPrice: 0, //续费售价
Saleplat: "", //销售平台 Saleplat: "", //销售平台
IsKCourse: 0, //是否是K12课程(1-是) IsKCourse: 0, //是否是K12课程(1-是)
ClassHours: 0 ClassHours: 0,
CategoryList: [],
}, },
optionTitle: "", optionTitle: "",
defaultArray: [], defaultArray: [],
...@@ -176,27 +358,34 @@ ...@@ -176,27 +358,34 @@
choosePlat: [], //选择的平台 choosePlat: [], //选择的平台
chooseTeacher: [], //选择老师 chooseTeacher: [], //选择老师
isShowPrice: 0, //是否显示价格【hk2021-03-05新增】 isShowPrice: 0, //是否显示价格【hk2021-03-05新增】
goodClassify: [], //商品分类列表
chooseGoodsClassify: [], //选中的商品分类
modifyClassifyList: [], //修改时返回的分类列表
}; };
}, },
created() { created() {
this.GetTeacherList(); this.GetTeacherList();
this.getSaleplat(); this.getSaleplat();
this.getGoodsClassify();
}, },
computed: mapState({ computed: mapState({
isHaveCourseHoursEdit(state) { isHaveCourseHoursEdit(state) {
if (state.user.userInfo && state.user.userInfo.ActionMenuList && state.user.userInfo.ActionMenuList.length > if (
0) { state.user.userInfo &&
let action = state.user.userInfo.ActionMenuList.find(x => { state.user.userInfo.ActionMenuList &&
state.user.userInfo.ActionMenuList.length > 0
) {
let action = state.user.userInfo.ActionMenuList.find((x) => {
if (x.FunctionCode == "Edit_CourseClassHours") { if (x.FunctionCode == "Edit_CourseClassHours") {
return x; return x;
} }
}); });
if(action){ if (action) {
return true return true;
} }
} }
return false; return false;
} },
}), }),
mounted() { mounted() {
this.initObj(); this.initObj();
...@@ -204,7 +393,7 @@ ...@@ -204,7 +393,7 @@
methods: { methods: {
//获取教师下拉 //获取教师下拉
GetTeacherList() { GetTeacherList() {
getTeacherDropDownList({}).then(res => { getTeacherDropDownList({}).then((res) => {
if (res.Code == 1) { if (res.Code == 1) {
this.TeacherList = res.Data; this.TeacherList = res.Data;
} }
...@@ -212,7 +401,7 @@ ...@@ -212,7 +401,7 @@
}, },
//获取销售端口列表 //获取销售端口列表
getSaleplat() { getSaleplat() {
querySaleplatList().then(res => { querySaleplatList().then((res) => {
this.SaleplatList = res.Data; this.SaleplatList = res.Data;
}); });
}, },
...@@ -228,7 +417,7 @@ ...@@ -228,7 +417,7 @@
} }
}, },
uploadFile(files) { uploadFile(files) {
UploadSelfFile("course", files[0], res => { UploadSelfFile("course", files[0], (res) => {
if (res.Code == 1) { if (res.Code == 1) {
this.objOption.CoverImg = res.FileUrl; this.objOption.CoverImg = res.FileUrl;
} }
...@@ -237,9 +426,8 @@ ...@@ -237,9 +426,8 @@
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;
}); });
}, },
//新增阶梯定价 //新增阶梯定价
...@@ -247,7 +435,7 @@ ...@@ -247,7 +435,7 @@
var obj = { var obj = {
ClassStepPriceId: 0, ClassStepPriceId: 0,
PersionNum: 2, PersionNum: 2,
PersionPrice: 0 PersionPrice: 0,
}; };
if (this.ladderPriceList && this.ladderPriceList.length > 0) { if (this.ladderPriceList && this.ladderPriceList.length > 0) {
var _index = this.ladderPriceList.length - 1; var _index = this.ladderPriceList.length - 1;
...@@ -264,8 +452,8 @@ ...@@ -264,8 +452,8 @@
this.defaultArray = []; this.defaultArray = [];
if (this.saveObj && this.saveObj.CourseId > 0) { if (this.saveObj && this.saveObj.CourseId > 0) {
queryCourseInfo({ queryCourseInfo({
CourseId: this.saveObj.CourseId CourseId: this.saveObj.CourseId,
}).then(res => { }).then((res) => {
this.objOption.CourseId = res.Data.CourseId; this.objOption.CourseId = res.Data.CourseId;
this.objOption.CoverImg = res.Data.CoverImg; this.objOption.CoverImg = res.Data.CoverImg;
this.objOption.CourseName = res.Data.CourseName; this.objOption.CourseName = res.Data.CourseName;
...@@ -292,8 +480,15 @@ ...@@ -292,8 +480,15 @@
if (res.Data.SalePlatList && res.Data.SalePlatList.length > 0) { if (res.Data.SalePlatList && res.Data.SalePlatList.length > 0) {
this.choosePlat = res.Data.SalePlatList; this.choosePlat = res.Data.SalePlatList;
} }
if (res.Data.CategoryList && res.Data.CategoryList.length > 0) {
this.modifyClassifyList = res.Data.CategoryList;
this.chooseGoodsClassify = res.Data.CategoryList.map((e) => {
return e.CategoryId;
});
}
this.defaultArray.push(res.Data.CateId); this.defaultArray.push(res.Data.CateId);
this.getCategorytree(); this.getCategorytree();
this.handleCheckChange();
}); });
this.optionTitle = "修改课程信息"; this.optionTitle = "修改课程信息";
} else { } else {
...@@ -317,7 +512,6 @@ ...@@ -317,7 +512,6 @@
this.objOption.IsKCourse = 0; this.objOption.IsKCourse = 0;
this.getCategorytree(); this.getCategorytree();
} }
}, },
//关闭弹窗 //关闭弹窗
closeCourseForm() { closeCourseForm() {
...@@ -329,11 +523,15 @@ ...@@ -329,11 +523,15 @@
this.$refs.CourseName.validate(); this.$refs.CourseName.validate();
this.$refs.ClassHours.validate(); this.$refs.ClassHours.validate();
this.$refs.CateId.validate(); this.$refs.CateId.validate();
if (!this.$refs.CourseName.hasError && !this.$refs.ClassHours.hasError && !this.$refs.CateId.hasError) { if (
!this.$refs.CourseName.hasError &&
!this.$refs.ClassHours.hasError &&
!this.$refs.CateId.hasError
) {
this.saveCourseLoading = true; this.saveCourseLoading = true;
var Teacher_Ids = ""; var Teacher_Ids = "";
if (this.chooseTeacher && this.chooseTeacher.length > 0) { if (this.chooseTeacher && this.chooseTeacher.length > 0) {
this.chooseTeacher.forEach(item => { this.chooseTeacher.forEach((item) => {
Teacher_Ids += "," + item; Teacher_Ids += "," + item;
}); });
} }
...@@ -342,7 +540,7 @@ ...@@ -342,7 +540,7 @@
} }
var salePlat = ""; var salePlat = "";
if (this.choosePlat && this.choosePlat.length > 0) { if (this.choosePlat && this.choosePlat.length > 0) {
this.choosePlat.forEach(item => { this.choosePlat.forEach((item) => {
salePlat += "," + item; salePlat += "," + item;
}); });
} }
...@@ -353,14 +551,14 @@ ...@@ -353,14 +551,14 @@
this.objOption.Teacher_Ids = Teacher_Ids; this.objOption.Teacher_Ids = Teacher_Ids;
this.objOption.Saleplat = salePlat; this.objOption.Saleplat = salePlat;
saveCourseInfo(this.objOption) saveCourseInfo(this.objOption)
.then(res => { .then((res) => {
this.saveCourseLoading = false; this.saveCourseLoading = false;
this.$q.notify({ this.$q.notify({
icon: "iconfont icon-chenggong", icon: "iconfont icon-chenggong",
color: "accent", color: "accent",
timeout: 2000, timeout: 2000,
message: "数据保存成功!", message: "数据保存成功!",
position: "top" position: "top",
}); });
this.$emit("success"); this.$emit("success");
this.closeSaveForm(); this.closeSaveForm();
...@@ -369,8 +567,73 @@ ...@@ -369,8 +567,73 @@
this.saveCourseLoading = false; this.saveCourseLoading = false;
}); });
} }
},
//获取商品分类
getGoodsClassify() {
let msg1 = {
Id: 0,
Name: "",
Tier: 0,
ParentId: 0,
Enabled: 1,
IsShow: 1,
CategoryPageType: 0,
};
this.apipostDS("/api/product/GetProductCategoryTreeList", msg1, (res) => {
if (res.data.resultCode === 1) {
this.goodClassify = res.data.data;
}
});
},
//处理选中后的商品分类参数
handleCheckChange() {
this.objOption.CategoryList = [];
this.chooseGoodsClassify.forEach((list) => {
this.goodClassify.forEach((item) => {
if (list == item.Id) {
let newItem = JSON.parse(JSON.stringify(item));
newItem.CategoryId = item.Id;
newItem.Id = 0;
//查找已提交的分类的id,否则为0
let findId = this.modifyClassifyList.find(
(e) => e.CategoryId === newItem.CategoryId
);
if (findId) {
newItem.Id = findId.Id;
}
this.objOption.CategoryList.push(newItem);
} }
item.ChildList.forEach((item2) => {
if (list == item2.Id) {
let newItem2 = JSON.parse(JSON.stringify(item2));
newItem2.CategoryId = item2.Id;
newItem2.Id = 0;
let findId2 = this.modifyClassifyList.find(
(e) => e.CategoryId === newItem2.CategoryId
);
if (findId2) {
newItem2.Id = findId2.Id;
} }
}; this.objOption.CategoryList.push(newItem2);
}
item2.ChildList.forEach((item3) => {
if (list == item3.Id) {
let newItem3 = JSON.parse(JSON.stringify(item3));
newItem3.CategoryId = item2.Id;
newItem3.Id = 0;
let findId3 = this.modifyClassifyList.find(
(e) => e.CategoryId === newItem3.CategoryId
);
if (findId3) {
newItem3.Id = findId3.Id;
}
this.objOption.CategoryList.push(newItem3);
}
});
});
});
});
},
},
};
</script> </script>
...@@ -3,34 +3,88 @@ ...@@ -3,34 +3,88 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称" <q-input
@clear="resetSearch" maxlength="20" /> @input="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.CourseName"
label="课程名称"
@clear="resetSearch"
maxlength="20"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<select-tree :treeData="TreeCategoryList" :defaultArray="returnString" nodeKey="CateId" :multiple="true" <select-tree
labelKey="CateName" childrenKey="ChildList" tipText="课程系列" @getChild="getChild"></select-tree> :treeData="TreeCategoryList"
:defaultArray="returnString"
nodeKey="CateId"
:multiple="true"
labelKey="CateName"
childrenKey="ChildList"
tipText="课程系列"
@getChild="getChild"
></select-tree>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="ShowOpts" <q-select
emit-value map-options label="状态" /> @input="resetSearch"
standout="bg-primary text-white"
v-model="msg.Status"
:options="ShowOpts"
emit-value
map-options
label="状态"
/>
</div>
<div class="col-3">
<q-select
@input="resetSearch"
standout="bg-primary text-white"
v-model="msg.Saleplat"
:options="platOpts"
option-label="Name"
option-value="Id"
emit-value
map-options
label="上架渠道"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table
class="sticky-tow-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns" :pagination="msg"
row-key="name"> :loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table sticky-right-column-table"
separator="none"
:data="data"
:columns="columns"
row-key="name"
>
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">课程信息</div> <div class="col-2 q-table__title">课程信息</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增课程" @click="EditCourse(null, 1)" /> <q-btn
color="accent"
size="sm"
class="q-mr-md"
icon="add"
label="新增课程"
@click="EditCourse(null, 1)"
/>
</div> </div>
</template> </template>
<template v-slot:body-cell-CoverImg="props"> <template v-slot:body-cell-CoverImg="props">
<q-td :props="props"> <q-td :props="props">
<q-img :src="props.value" spinner-color="white" style="height: 54px; max-width: 100px" <q-img
class="rounded-borders"> :src="props.value"
spinner-color="white"
style="height: 54px; max-width: 100px"
class="rounded-borders"
>
</q-img> </q-img>
</q-td> </q-td>
</template> </template>
...@@ -40,19 +94,19 @@ ...@@ -40,19 +94,19 @@
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-PreferentialList="props"> <template v-slot:body-cell-PreferentialList="props">
<q-td :props="props" style="padding-right:0px"> <q-td :props="props" style="padding-right: 0px">
<div v-for="x in props.value"> <div v-for="x in props.value">
<div class="border-bottom" v-if="x.PriceDiscountType == 1"> <div class="border-bottom" v-if="x.PriceDiscountType == 1">
{{ x.BuyNum }}{{ x.SendNum }} {{ x.BuyNum }}{{ x.SendNum }}
</div> </div>
<div class="border-bottom" v-if="x.PriceDiscountType == 2"> <div class="border-bottom" v-if="x.PriceDiscountType == 2">
单人报名享优惠{{x.PriceMoney }}% 单人报名享优惠{{ x.PriceMoney }}%
</div> </div>
<div class="border-bottom" v-if="x.PriceDiscountType == 3"> <div class="border-bottom" v-if="x.PriceDiscountType == 3">
双人报名优惠{{x.PriceMoney }}% 双人报名优惠{{ x.PriceMoney }}%
</div> </div>
<div class="border-bottom" v-if="x.PriceDiscountType == 4"> <div class="border-bottom" v-if="x.PriceDiscountType == 4">
续费享优惠{{x.PriceMoney }}% 续费享优惠{{ x.PriceMoney }}%
</div> </div>
<div class="remark-font" v-if="x.PriceDiscountType == 0"> <div class="remark-font" v-if="x.PriceDiscountType == 0">
暂无优惠政策 暂无优惠政策
...@@ -64,10 +118,14 @@ ...@@ -64,10 +118,14 @@
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-PreferentialListSellCommission="props"> <template v-slot:body-cell-PreferentialListSellCommission="props">
<q-td :props="props" style="padding-right:0px;padding-left:0px"> <q-td :props="props" style="padding-right: 0px; padding-left: 0px">
<div v-for="x in props.value"> <div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px" <div
:class="{ 'text-red': x.SaleCommissionType == 1 }" v-if="x.PriceDiscountType != 0"> class="border-bottom"
style="padding-left: 16px; padding-right: 16px"
:class="{ 'text-red': x.SaleCommissionType == 1 }"
v-if="x.PriceDiscountType != 0"
>
{{ x.SaleCommissionType == 1 ? "¥" : "" {{ x.SaleCommissionType == 1 ? "¥" : ""
}}{{ x.SaleCommissionMoney }}{{ x.SaleCommissionMoney
}}{{ x.SaleCommissionType == 0 ? "%" : "" }} }}{{ x.SaleCommissionType == 0 ? "%" : "" }}
...@@ -82,10 +140,14 @@ ...@@ -82,10 +140,14 @@
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-PreferentialListB2BCommission="props"> <template v-slot:body-cell-PreferentialListB2BCommission="props">
<q-td :props="props" style="padding-left:0px"> <q-td :props="props" style="padding-left: 0px">
<div v-for="x in props.value"> <div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.B2BCommissionType == 1 }" <div
v-if="x.PriceDiscountType != 0"> class="border-bottom"
style="padding-left: 16px"
:class="{ 'text-red': x.B2BCommissionType == 1 }"
v-if="x.PriceDiscountType != 0"
>
{{ x.B2BCommissionType == 1 ? "¥" : "" {{ x.B2BCommissionType == 1 ? "¥" : ""
}}{{ x.B2BCommissionMoney }}{{ x.B2BCommissionMoney
}}{{ x.B2BCommissionType == 0 ? "%" : "" }} }}{{ x.B2BCommissionType == 0 ? "%" : "" }}
...@@ -100,10 +162,14 @@ ...@@ -100,10 +162,14 @@
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-EducationCommission="props"> <template v-slot:body-cell-EducationCommission="props">
<q-td :props="props" style="padding-left:0px"> <q-td :props="props" style="padding-left: 0px">
<div v-for="x in props.value"> <div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.EduCommissionType == 1 }" <div
v-if="x.PriceDiscountType != 0"> class="border-bottom"
style="padding-left: 16px"
:class="{ 'text-red': x.EduCommissionType == 1 }"
v-if="x.PriceDiscountType != 0"
>
{{ x.EduCommissionType == 1 ? "¥" : "" {{ x.EduCommissionType == 1 ? "¥" : ""
}}{{ x.EduCommissionMoney }}{{ x.EduCommissionMoney
}}{{ x.EduCommissionType == 0 ? "%" : "" }} }}{{ x.EduCommissionType == 0 ? "%" : "" }}
...@@ -117,29 +183,78 @@ ...@@ -117,29 +183,78 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-plat="props">
<q-td :props="props">
<q-badge
color="green"
label="小程序"
v-if="props.row.Saleplat.includes(4)"
/>
</q-td>
</template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-badge :color="props.value == 1 ? 'negative' : 'primary'" :label="props.value == 0 ? '正常' : '删除'" /> <q-badge
:color="props.value == 1 ? 'negative' : 'primary'"
:label="props.value == 0 ? '正常' : '删除'"
/>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination
:input="true" @input="changePage" /> class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" <q-btn
@click="EditCourse(props.row, 1)" /> flat
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="价格设置" size="xs"
@click="EditCourse(props.row, 2)" v-if="isHavePriceAction" /> icon="edit"
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;"> color="accent"
style="font-weight: 400"
label="编辑"
@click="EditCourse(props.row, 1)"
/>
<q-btn
flat
size="xs"
icon="edit"
color="accent"
style="font-weight: 400"
label="价格设置"
@click="EditCourse(props.row, 2)"
v-if="isHavePriceAction"
/>
<q-btn-dropdown
flat
size="xs"
color="dark"
label="更多"
style="margin-left: 10px"
>
<q-list> <q-list>
<q-item clickable v-close-popup @click="DeleteCourse(props.row,1)" v-if="props.row.Status==0"> <q-item
clickable
v-close-popup
@click="DeleteCourse(props.row, 1)"
v-if="props.row.Status == 0"
>
<q-item-section> <q-item-section>
<q-item-label>删除</q-item-label> <q-item-label>删除</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup @click="DeleteCourse(props.row,0)" v-if="props.row.Status==1"> <q-item
clickable
v-close-popup
@click="DeleteCourse(props.row, 0)"
v-if="props.row.Status == 1"
>
<q-item-section> <q-item-section>
<q-item-label>恢复</q-item-label> <q-item-label>恢复</q-item-label>
</q-item-section> </q-item-section>
...@@ -154,45 +269,53 @@ ...@@ -154,45 +269,53 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<course-form v-if="isShowCourseForm" :save-obj="courseObjOption" @close="closeMenuSaveForm" <course-form
@success="refreshPage"> v-if="isShowCourseForm"
:save-obj="courseObjOption"
@close="closeMenuSaveForm"
@success="refreshPage"
>
</course-form> </course-form>
<courseprice-form v-if="isShowCoursePriceForm" :save-obj="courseObjOption" @close="closeMenuSaveForm" <courseprice-form
@success="refreshPage"> v-if="isShowCoursePriceForm"
:save-obj="courseObjOption"
@close="closeMenuSaveForm"
@success="refreshPage"
>
</courseprice-form> </courseprice-form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import {
queryCoursePage, queryCoursePage,
queryCourseCategoryTree, queryCourseCategoryTree,
deleteCourseInfo deleteCourseInfo,
} from "../../api/course/index"; querySaleplatList,
import courseForm from "../../components/course/course-form"; } from "../../api/course/index";
import coursepriceForm from "../../components/course/courseprice-form"; import courseForm from "../../components/course/course-form";
import selectTree from "../../components/common/select-tree"; import coursepriceForm from "../../components/course/courseprice-form";
import { openURL } from "quasar"; import selectTree from "../../components/common/select-tree";
import { import { openURL } from "quasar";
mapState import { mapState } from "vuex";
} from "vuex"; export default {
export default {
meta: { meta: {
title: "课程管理" title: "课程管理",
}, },
components: { components: {
courseForm, courseForm,
selectTree, selectTree,
coursepriceForm coursepriceForm,
}, },
data() { data() {
return { return {
currentUrl: "", currentUrl: "",
columns: [{ columns: [
{
name: "CoverImg", name: "CoverImg",
label: "课程封面", label: "课程封面",
field: "CoverImg", field: "CoverImg",
align: "left" align: "left",
}, },
{ {
...@@ -200,103 +323,111 @@ ...@@ -200,103 +323,111 @@
required: true, required: true,
label: "课程名称", label: "课程名称",
align: "left", align: "left",
field: row => row.CourseName field: (row) => row.CourseName,
}, },
{ {
name: "CateName", name: "CateName",
required: true, required: true,
label: "系列", label: "系列",
align: "left", align: "left",
field: row => row.CateName field: (row) => row.CateName,
}, },
{ {
name: "OriginalPrice", name: "OriginalPrice",
required: true, required: true,
label: "原价", label: "原价",
align: "left", align: "left",
field: row => row.OriginalPrice.toFixed(2) field: (row) => row.OriginalPrice.toFixed(2),
}, },
{ {
name: "SellPrice", name: "SellPrice",
required: true, required: true,
label: "售价", label: "售价",
align: "left", align: "left",
field: row => row.SellPrice.toFixed(2) field: (row) => row.SellPrice.toFixed(2),
}, },
{ {
name: "PreferentialList", name: "PreferentialList",
required: true, required: true,
label: "优惠政策", label: "优惠政策",
align: "left", align: "left",
field: row => row.PreferentialList field: (row) => row.PreferentialList,
}, },
{ {
name: "PreferentialListSellCommission", name: "PreferentialListSellCommission",
required: true, required: true,
label: "销售佣金", label: "销售佣金",
align: "left", align: "left",
field: row => row.PreferentialList field: (row) => row.PreferentialList,
}, },
{ {
name: "PreferentialListB2BCommission", name: "PreferentialListB2BCommission",
required: true, required: true,
label: "同行佣金", label: "同行佣金",
align: "left", align: "left",
field: row => row.PreferentialList field: (row) => row.PreferentialList,
}, },
{ {
name: "EducationCommission", name: "EducationCommission",
required: true, required: true,
label: "教育同行佣金", label: "教育同行佣金",
align: "left", align: "left",
field: row => row.PreferentialList field: (row) => row.PreferentialList,
}, },
{ {
name: "ClassHours", name: "ClassHours",
label: "课时长度", label: "课时长度",
field: "ClassHours", field: "ClassHours",
align: "left", align: "left",
format: (val, row) => `${val}课时` format: (val, row) => `${val}课时`,
},
{
name: "plat",
label: "上架渠道",
field: "plat",
align: "left",
}, },
{ {
name: "CreateByName", name: "CreateByName",
label: "创建人", label: "创建人",
field: "CreateByName", field: "CreateByName",
align: "left" align: "left",
}, },
{ {
name: "UpdateTimeStr", name: "UpdateTimeStr",
label: "更新时间", label: "更新时间",
field: "UpdateTimeStr", field: "UpdateTimeStr",
align: "left" align: "left",
}, },
{ {
name: "Status", name: "Status",
label: "状态", label: "状态",
align: "left", align: "left",
field: "Status" field: "Status",
}, },
{ {
name: "optioned", name: "optioned",
label: "操作", label: "操作",
field: "CourseId" field: "CourseId",
} },
], ],
data: [], data: [],
loading: true, loading: true,
ShowOpts: [{ ShowOpts: [
{
label: "全部", label: "全部",
value: "-1" value: "-1",
}, },
{ {
label: "正常", label: "正常",
value: "0" value: "0",
}, },
{ {
label: "删除", label: "删除",
value: "1" value: "1",
} },
], ],
platOpts: [], //上架渠道
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
...@@ -304,7 +435,8 @@ ...@@ -304,7 +435,8 @@
CourseName: "", CourseName: "",
QCateIds: "", QCateIds: "",
IsQPrice: 1, IsQPrice: 1,
Status: "0" Status: "0",
Saleplat: 0,
}, },
//课程分类树形列表 //课程分类树形列表
TreeCategoryList: [], TreeCategoryList: [],
...@@ -313,14 +445,17 @@ ...@@ -313,14 +445,17 @@
isShowCourseForm: false, //是否显示课程表单 isShowCourseForm: false, //是否显示课程表单
isShowCoursePriceForm: false, //是否显示课程价格表单 isShowCoursePriceForm: false, //是否显示课程价格表单
courseObjOption: null, //课程对象 courseObjOption: null, //课程对象
isShowPriceEditBtn: 1 //是否显示价格设置 isShowPriceEditBtn: 1, //是否显示价格设置
}; };
}, },
computed: mapState({ computed: mapState({
isHavePriceAction(state) { isHavePriceAction(state) {
if (state.user.userInfo && state.user.userInfo.ActionMenuList && state.user.userInfo.ActionMenuList.length > if (
0) { state.user.userInfo &&
let action = state.user.userInfo.ActionMenuList.find(x => { state.user.userInfo.ActionMenuList &&
state.user.userInfo.ActionMenuList.length > 0
) {
let action = state.user.userInfo.ActionMenuList.find((x) => {
if (x.FunctionCode == "Edit_CoursePrice") { if (x.FunctionCode == "Edit_CoursePrice") {
return x; return x;
} }
...@@ -328,12 +463,14 @@ ...@@ -328,12 +463,14 @@
return action && action.FunctionCode; return action && action.FunctionCode;
} }
return false; return false;
} },
}), }),
mounted() { mounted() {
if(this.$route.query && this.$route.query.Name){//从订单完成统计跳转过来的带的参数 if (this.$route.query && this.$route.query.Name) {
this.msg.CourseName = decodeURI(this.$route.query.Name) //从订单完成统计跳转过来的带的参数
this.msg.CourseName = decodeURI(this.$route.query.Name);
} }
this.getSaleplat();
this.getCategorytree(); this.getCategorytree();
this.currentUrl = this.$route.path; this.currentUrl = this.$route.path;
this.getcourselist(); this.getcourselist();
...@@ -343,48 +480,49 @@ ...@@ -343,48 +480,49 @@
DeleteCourse(item, status) { DeleteCourse(item, status) {
let delMsg = { let delMsg = {
CourseId: item.CourseId, CourseId: item.CourseId,
Status: status Status: status,
}; };
var message = "是否要删除该课程?"; var message = "是否要删除该课程?";
if (status == 0) { if (status == 0) {
message = "是否要恢复该课程?"; message = "是否要恢复该课程?";
} }
this.$q.dialog({ this.$q
title: '提示信息', .dialog({
title: "提示信息",
message: message, message: message,
cancel: true, cancel: true,
persistent: true, persistent: true,
ok: "确定", ok: "确定",
cancel: "取消", cancel: "取消",
}).onOk(() => { })
deleteCourseInfo(delMsg).then(res => { .onOk(() => {
deleteCourseInfo(delMsg).then((res) => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: "iconfont icon-chenggong",
color: 'accent', color: "accent",
timeout: 2000, timeout: 2000,
message: '删除成功!', message: "删除成功!",
position: 'top' position: "top",
}) });
this.getcourselist(); this.getcourselist();
} else { } else {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: "iconfont icon-chenggong",
color: 'accent', color: "accent",
timeout: 2000, timeout: 2000,
message: res.Message, message: res.Message,
position: 'top' position: "top",
}) });
} }
})
}).onCancel(() => {
}); });
})
.onCancel(() => {});
}, },
gotoSub(obj, routeStr) { gotoSub(obj, routeStr) {
var tempStr = "/course/" + routeStr + "?CourseId=" + obj.CourseId; var tempStr = "/course/" + routeStr + "?CourseId=" + obj.CourseId;
this.$router.push({ this.$router.push({
path: tempStr path: tempStr,
}); });
}, },
//分类改变 //分类改变
...@@ -400,7 +538,7 @@ ...@@ -400,7 +538,7 @@
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;
}); });
}, },
...@@ -418,7 +556,7 @@ ...@@ -418,7 +556,7 @@
getcourselist() { getcourselist() {
this.loading = true; this.loading = true;
queryCoursePage(this.msg) queryCoursePage(this.msg)
.then(res => { .then((res) => {
this.loading = false; this.loading = false;
this.data = res.Data.PageData; this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
...@@ -453,25 +591,35 @@ ...@@ -453,25 +591,35 @@
}, },
//跳转至我的课程 //跳转至我的课程
goMycourse(obj) { goMycourse(obj) {
var tempStr = window.location.origin +"/#/course/courseinfo?CourseId=" + obj.CourseId; var tempStr =
window.location.origin +
"/#/course/courseinfo?CourseId=" +
obj.CourseId;
// this.$router.push({ // this.$router.push({
// path: tempStr // path: tempStr
// }); // });
openURL(tempStr) openURL(tempStr);
} },
} //获取销售端口列表
}; getSaleplat() {
querySaleplatList().then((res) => {
this.platOpts = res.Data;
this.platOpts.unshift({
Name: "不限",
Id: 0,
});
});
},
},
};
</script> </script>
<style scoped> <style scoped>
.border-bottom { .border-bottom {
border-bottom: 1px dashed #EEE; border-bottom: 1px dashed #eee;
padding-bottom: 5px; padding-bottom: 5px;
margin-bottom: 5px; margin-bottom: 5px;
} }
</style> </style>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment