Commit b47abbe6 authored by 罗超's avatar 罗超

修改部分BUG

parent 32e61fc0
...@@ -48,7 +48,7 @@ module.exports = function (ctx) { ...@@ -48,7 +48,7 @@ module.exports = function (ctx) {
build: { build: {
vueRouterMode: 'hash', // available values: 'hash', 'history' vueRouterMode: 'hash', // available values: 'hash', 'history'
env: ctx.dev ? { env: ctx.dev ? {
API: 'http://192.168.1.27:8300/api' API: 'http://eduapi.oytour.com/api'
} : { } : {
API: 'http://eduapi.oytour.com/api' API: 'http://eduapi.oytour.com/api'
}, },
......
...@@ -351,8 +351,9 @@ export default { ...@@ -351,8 +351,9 @@ export default {
this.getSaleplat(); this.getSaleplat();
}, },
mounted() { mounted() {
this.getCategorytree();
this.initObj(); this.initObj();
}, },
methods: { methods: {
//获取教师下拉 //获取教师下拉
...@@ -392,13 +393,14 @@ export default { ...@@ -392,13 +393,14 @@ export default {
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){ console.log(this.objOption.CateId,this.TreeCategoryList)
//if(this.objOption.CateId!=0){
this.TreeCategoryList.forEach(x=>{ this.TreeCategoryList.forEach(x=>{
if(x.CateId==this.objOption.CateId){ if(x.CateId==this.objOption.CateId){
this.chosenCateId=x this.chosenCateId=x
} }
}) })
} //}
}); });
}, },
//新增阶梯定价 //新增阶梯定价
...@@ -452,6 +454,7 @@ export default { ...@@ -452,6 +454,7 @@ export default {
this.choosePlat = res.Data.SalePlatList; this.choosePlat = res.Data.SalePlatList;
} }
this.defaultArray.push(res.Data.CateId); this.defaultArray.push(res.Data.CateId);
this.getCategorytree();
}); });
this.optionTitle = "修改课程信息"; this.optionTitle = "修改课程信息";
} else { } else {
...@@ -473,7 +476,9 @@ export default { ...@@ -473,7 +476,9 @@ export default {
this.objOption.RenewSlPrice = 0; this.objOption.RenewSlPrice = 0;
this.objOption.Saleplat = ""; this.objOption.Saleplat = "";
this.objOption.IsKCourse = 0; this.objOption.IsKCourse = 0;
this.getCategorytree();
} }
}, },
//关闭弹窗 //关闭弹窗
closeCourseForm() { closeCourseForm() {
......
...@@ -43,14 +43,18 @@ ...@@ -43,14 +43,18 @@
<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:body-cell-optioned="props"> <template v-slot:body-cell-CateId="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 flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditCategory(props.row)" /> @click="EditCategory(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400;display:none;" label="详情" <q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400;" label="删除"
@click="deleteCategory(props.row.CateId)" /> @click="deleteCategory(props.row)" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.PageCount"
:input="true" @input="changePage" />
</template>
</q-table> </q-table>
<category-form v-if="isShowCategory" :save-obj="categoryObj" @close="closeCagegoryForm" @success="refreshPage"> <category-form v-if="isShowCategory" :save-obj="categoryObj" @close="closeCagegoryForm" @success="refreshPage">
</category-form> </category-form>
...@@ -63,6 +67,7 @@ ...@@ -63,6 +67,7 @@
queryCourseCategoryPage queryCourseCategoryPage
} from '../../api/course/index' } from '../../api/course/index'
import categoryForm from '../../components/course/category-form' import categoryForm from '../../components/course/category-form'
export default { export default {
meta: { meta: {
title: "课程系类" title: "课程系类"
...@@ -72,6 +77,11 @@ ...@@ -72,6 +77,11 @@
}, },
data() { data() {
return { return {
msg:{
PageIndex:1,
PageSize:20,
PageCount:1
},
currentUrl: "", currentUrl: "",
data: [], data: [],
keyWords: '', keyWords: '',
...@@ -90,7 +100,8 @@ ...@@ -90,7 +100,8 @@
name: 'CourseCount', name: 'CourseCount',
label: '关联课程', label: '关联课程',
align: 'left', align: 'left',
field: row => row.CourseCount field: row => row.CourseCount,
format: (val, row) => `${val}个课程`
}, },
{ {
name: 'Status', name: 'Status',
...@@ -109,15 +120,54 @@ ...@@ -109,15 +120,54 @@
label: '修改时间', label: '修改时间',
align: 'left', align: 'left',
field: row => row.UpdateTimeStr field: row => row.UpdateTimeStr
},
{
name: 'CateId',
label: '操作',
field: 'CateId'
} }
], ],
} }
}, },
mounted() { mounted() {
this.currentUrl = this.$route.path this.currentUrl = this.$route.path
this.getcoursecategorytree() this.getcoursecategorytree()
}, },
methods: { methods: {
changePage(val) {
this.msg.PageIndex = val;
this.getcoursecategorytree()
},
//删除系列
deleteCategory(item) {
let delMsg = {
CateId: item.CateId,
};
this.$q.dialog({
title: '提示信息',
message: '是否确定删除该系列?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
deleteCourseCategory(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.refreshPage();
}
})
}).onCancel(() => {
});
},
//搜索分类 //搜索分类
myFilterMethod(node, filter) { myFilterMethod(node, filter) {
return node.CateName && node.CateName.indexOf(filter) > -1; return node.CateName && node.CateName.indexOf(filter) > -1;
...@@ -135,12 +185,13 @@ ...@@ -135,12 +185,13 @@
getcoursecategorytree() { getcoursecategorytree() {
this.isShow = false; this.isShow = false;
queryCourseCategoryPage({ queryCourseCategoryPage({
PageSize:50, PageSize:this.msg.PageSize,
pageIndex:1 PageIndex:this.msg.PageIndex
}).then(res => { }).then(res => {
this.isShow = true; this.isShow = true;
this.loading=false; this.loading=false;
this.data = res.Data.PageData; this.data = res.Data.PageData;
this.msg.PageCount=res.Data.PageCount
}) })
}, },
//新增修改角色 //新增修改角色
......
...@@ -3,27 +3,65 @@ ...@@ -3,27 +3,65 @@
<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>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table" <q-table
separator="none" :data="data" :columns="columns" row-key="name"> :pagination="msg"
: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">
...@@ -44,14 +82,24 @@ ...@@ -44,14 +82,24 @@
</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">{{x.BuyNum}}{{x.SendNum}}</div> <div class="border-bottom" v-if="x.PriceDiscountType == 1">
<div class="border-bottom" v-if="x.PriceDiscountType==2">单人报名享{{100-x.PriceMoney}}折优惠</div> {{ x.BuyNum }}{{ x.SendNum }}
<div class="border-bottom" v-if="x.PriceDiscountType==3">双人报名享{{100-x.PriceMoney}}折优惠</div> </div>
<div class="border-bottom" v-if="x.PriceDiscountType==4">续费享{{100-x.PriceMoney}}折优惠</div> <div class="border-bottom" v-if="x.PriceDiscountType == 2">
<div class="remark-font" v-if="x.PriceDiscountType==0">暂无优惠政策</div> 单人报名享{{ 100 - x.PriceMoney }}折优惠
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 3">
双人报名享{{ 100 - x.PriceMoney }}折优惠
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 4">
续费享{{ 100 - x.PriceMoney }}折优惠
</div> </div>
<div v-if="!props.value || props.value.length==0"> <div class="remark-font" v-if="x.PriceDiscountType == 0">
暂无优惠政策
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无优惠政策</div> <div class="remark-font">暂无优惠政策</div>
</div> </div>
</q-td> </q-td>
...@@ -59,12 +107,21 @@ ...@@ -59,12 +107,21 @@
<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" :class="{'text-red':x.SaleCommissionType==1}" v-if="x.PriceDiscountType!=0">{{x.SaleCommissionType==1?'¥':''}}{{x.SaleCommissionMoney}}{{x.SaleCommissionType==0?'%':''}}</div> <div
<div 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.SaleCommissionMoney
}}{{ x.SaleCommissionType == 0 ? "%" : "" }}
</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div> <div class="remark-font">暂无佣金信息</div>
</div> </div>
</div> </div>
<div v-if="!props.value || props.value.length==0"> <div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div> <div class="remark-font">暂无佣金信息</div>
</div> </div>
</q-td> </q-td>
...@@ -72,54 +129,103 @@ ...@@ -72,54 +129,103 @@
<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}" v-if="x.PriceDiscountType!=0">{{x.B2BCommissionType==1?'¥':''}}{{x.B2BCommissionMoney}}{{x.B2BCommissionType==0?'%':''}}</div> <div
<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.B2BCommissionMoney
}}{{ x.B2BCommissionType == 0 ? "%" : "" }}
</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div> <div class="remark-font">暂无佣金信息</div>
</div> </div>
</div> </div>
<div v-if="!props.value || props.value.length==0"> <div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div> <div class="remark-font">暂无佣金信息</div>
</div> </div>
</q-td> </q-td>
</template> </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="isShowPriceEditBtn==1" /> icon="edit"
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400;display:none;" label="详情" color="accent"
@click="goMycourse(props.row)" /> 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
flat
size="xs"
icon="edit"
color="accent"
style="font-weight:400;display:none;"
label="详情"
@click="goMycourse(props.row)"
/>
</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
} from '../../api/course/index' } from "../../api/course/index";
import courseForm from '../../components/course/course-form' import courseForm from "../../components/course/course-form";
import coursepriceForm from '../../components/course/courseprice-form' import coursepriceForm from "../../components/course/courseprice-form";
import selectTree from '../../components/common/select-tree' import selectTree from "../../components/common/select-tree";
export default { import { mapState } from "vuex";
export default {
meta: { meta: {
title: "课程管理" title: "课程管理"
}, },
...@@ -133,10 +239,10 @@ ...@@ -133,10 +239,10 @@
currentUrl: "", currentUrl: "",
columns: [ columns: [
{ {
name: 'CoverImg', name: "CoverImg",
label: '课程封面', label: "课程封面",
field: 'CoverImg', field: "CoverImg",
align: 'left' align: "left"
}, },
// { // {
// name: 'CourseId', // name: 'CourseId',
...@@ -145,52 +251,52 @@ ...@@ -145,52 +251,52 @@
// align: 'left' // align: 'left'
// }, // },
{ {
name: 'CourseName', name: "CourseName",
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
}, },
{ {
...@@ -202,42 +308,43 @@ ...@@ -202,42 +308,43 @@
}, },
{ {
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: '全部', {
value: '-1' label: "全部",
value: "-1"
}, },
{ {
label: '正常', label: "正常",
value: '0' value: "0"
}, },
{ {
label: '删除', label: "删除",
value: '1' value: "1"
} }
], ],
msg: { msg: {
...@@ -246,8 +353,8 @@ ...@@ -246,8 +353,8 @@
rowsPerPage: 12, rowsPerPage: 12,
CourseName: "", CourseName: "",
QCateIds: "", QCateIds: "",
  IsQPrice: 1, IsQPrice: 1,
Status: "-1", Status: "-1"
}, },
//课程分类树形列表 //课程分类树形列表
TreeCategoryList: [], TreeCategoryList: [],
...@@ -256,17 +363,31 @@ ...@@ -256,17 +363,31 @@
isShowCourseForm: false, //是否显示课程表单 isShowCourseForm: false, //是否显示课程表单
isShowCoursePriceForm: false, //是否显示课程价格表单 isShowCoursePriceForm: false, //是否显示课程价格表单
courseObjOption: null, //课程对象 courseObjOption: null, //课程对象
isShowPriceEditBtn: 1, //是否显示价格设置 isShowPriceEditBtn: 1 //是否显示价格设置
} };
}, },
computed: mapState({
isHavePriceAction(state) {
console.log(state.user.userInfo)
if (state.user.userInfo.ActionMenuList) {
let action = state.user.userInfo.ActionMenuList.find(x => {
if (x.FunctionCode == "Edit_CoursePrice") {
return x;
}
});
return action && action.FunctionCode;
}
return false;
}
}),
mounted() { mounted() {
this.getCategorytree(); this.getCategorytree();
this.currentUrl = this.$route.path this.currentUrl = this.$route.path;
this.getcourselist(); this.getcourselist();
}, },
methods: { methods: {
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
}); });
...@@ -274,7 +395,7 @@ ...@@ -274,7 +395,7 @@
//分类改变 //分类改变
getChild(cateObj) { getChild(cateObj) {
var tempStr = ""; var tempStr = "";
if (cateObj && cateObj != '') { if (cateObj && cateObj != "") {
tempStr = cateObj; tempStr = cateObj;
} }
this.msg.QCateIds = tempStr; this.msg.QCateIds = tempStr;
...@@ -283,10 +404,10 @@ ...@@ -283,10 +404,10 @@
}, },
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;
}) });
}, },
//重新查询 //重新查询
resetSearch() { resetSearch() {
...@@ -296,31 +417,33 @@ ...@@ -296,31 +417,33 @@
//翻页 //翻页
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getcourselist() this.getcourselist();
}, },
//获取菜单分页列表 //获取菜单分页列表
getcourselist() { getcourselist() {
this.loading = true; this.loading = true;
queryCoursePage(this.msg).then(res => { queryCoursePage(this.msg)
this.loading = false .then(res => {
this.data = res.Data.PageData this.loading = false;
this.pageCount = res.Data.PageCount this.data = res.Data.PageData;
}).catch(() => { this.pageCount = res.Data.PageCount;
this.loading = false
}) })
.catch(() => {
this.loading = false;
});
}, },
//刷新页面 //刷新页面
refreshPage() { refreshPage() {
this.isShowCourseForm = false; this.isShowCourseForm = false;
this.isShowCoursePriceForm=false; this.isShowCoursePriceForm = false;
this.getcourselist(); this.getcourselist();
}, },
//新增修改课程及价格 //新增修改课程及价格
EditCourse(obj, type) { EditCourse(obj, type) {
if (obj) { if (obj) {
this.courseObjOption = obj this.courseObjOption = obj;
} else { } else {
this.courseObjOption = null this.courseObjOption = null;
} }
if (type == 1) { if (type == 1) {
this.isShowCourseForm = true; this.isShowCourseForm = true;
...@@ -335,18 +458,17 @@ ...@@ -335,18 +458,17 @@
}, },
//跳转至我的课程 //跳转至我的课程
goMycourse(obj) { goMycourse(obj) {
var tempStr = '/course/courseinfo?CourseId=' + obj.CourseId; var tempStr = "/course/courseinfo?CourseId=" + obj.CourseId;
this.$router.push({ this.$router.push({
path: tempStr path: tempStr
}); });
} }
} }
} };
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
.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
......
...@@ -8,6 +8,7 @@ const user = { ...@@ -8,6 +8,7 @@ const user = {
userInfo: null, // 用户信息 userInfo: null, // 用户信息
//TODO 用户权限 //TODO 用户权限
allAuth: ['/home', '/school/manager'], allAuth: ['/home', '/school/manager'],
actionList:[]
}, },
mutations: { mutations: {
...@@ -16,7 +17,7 @@ const user = { ...@@ -16,7 +17,7 @@ const user = {
}, },
SET_ALLAUTH: (state, allAuth) => { SET_ALLAUTH: (state, allAuth) => {
state.allAuth = allAuth state.allAuth = allAuth
}, }
//TODO 用户权限 //TODO 用户权限
}, },
......
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