Commit b47abbe6 authored by 罗超's avatar 罗超

修改部分BUG

parent 32e61fc0
......@@ -48,7 +48,7 @@ module.exports = function (ctx) {
build: {
vueRouterMode: 'hash', // available values: 'hash', 'history'
env: ctx.dev ? {
API: 'http://192.168.1.27:8300/api'
API: 'http://eduapi.oytour.com/api'
} : {
API: 'http://eduapi.oytour.com/api'
},
......
......@@ -351,8 +351,9 @@ export default {
this.getSaleplat();
},
mounted() {
this.getCategorytree();
this.initObj();
},
methods: {
//获取教师下拉
......@@ -392,13 +393,14 @@ export default {
var qMsg = {};
queryCourseCategoryTree(qMsg).then(res => {
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=>{
if(x.CateId==this.objOption.CateId){
this.chosenCateId=x
}
})
}
//}
});
},
//新增阶梯定价
......@@ -452,6 +454,7 @@ export default {
this.choosePlat = res.Data.SalePlatList;
}
this.defaultArray.push(res.Data.CateId);
this.getCategorytree();
});
this.optionTitle = "修改课程信息";
} else {
......@@ -473,7 +476,9 @@ export default {
this.objOption.RenewSlPrice = 0;
this.objOption.Saleplat = "";
this.objOption.IsKCourse = 0;
this.getCategorytree();
}
},
//关闭弹窗
closeCourseForm() {
......
......@@ -43,14 +43,18 @@
<q-badge :color="props.value==1?'negative':'primary'" :label="props.value==0?'正常':'禁用'" />
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<template v-slot:body-cell-CateId="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditCategory(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400;display:none;" label="详情"
@click="deleteCategory(props.row.CateId)" />
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400;" label="删除"
@click="deleteCategory(props.row)" />
</q-td>
</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>
<category-form v-if="isShowCategory" :save-obj="categoryObj" @close="closeCagegoryForm" @success="refreshPage">
</category-form>
......@@ -63,6 +67,7 @@
queryCourseCategoryPage
} from '../../api/course/index'
import categoryForm from '../../components/course/category-form'
export default {
meta: {
title: "课程系类"
......@@ -72,6 +77,11 @@
},
data() {
return {
msg:{
PageIndex:1,
PageSize:20,
PageCount:1
},
currentUrl: "",
data: [],
keyWords: '',
......@@ -90,7 +100,8 @@
name: 'CourseCount',
label: '关联课程',
align: 'left',
field: row => row.CourseCount
field: row => row.CourseCount,
format: (val, row) => `${val}个课程`
},
{
name: 'Status',
......@@ -109,15 +120,54 @@
label: '修改时间',
align: 'left',
field: row => row.UpdateTimeStr
},
{
name: 'CateId',
label: '操作',
field: 'CateId'
}
],
}
},
mounted() {
this.currentUrl = this.$route.path
this.getcoursecategorytree()
},
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) {
return node.CateName && node.CateName.indexOf(filter) > -1;
......@@ -135,12 +185,13 @@
getcoursecategorytree() {
this.isShow = false;
queryCourseCategoryPage({
PageSize:50,
pageIndex:1
PageSize:this.msg.PageSize,
PageIndex:this.msg.PageIndex
}).then(res => {
this.isShow = true;
this.loading=false;
this.data = res.Data.PageData;
this.msg.PageCount=res.Data.PageCount
})
},
//新增修改角色
......
This diff is collapsed.
......@@ -8,6 +8,7 @@ const user = {
userInfo: null, // 用户信息
//TODO 用户权限
allAuth: ['/home', '/school/manager'],
actionList:[]
},
mutations: {
......@@ -16,7 +17,7 @@ const user = {
},
SET_ALLAUTH: (state, allAuth) => {
state.allAuth = allAuth
},
}
//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