Commit dd1ea82b authored by 黄奎's avatar 黄奎

页面修改

parent 27e880a4
......@@ -11,7 +11,7 @@
</div>
</div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增分类" @click="EditMenu(null)" />
<q-btn color="accent" class="q-mr-md" icon="add" label="新增分类" @click="EditCategory(null)" />
</div>
</div>
<div class="page-content">
......@@ -23,10 +23,10 @@
<div class="text-weight-bold text-primary">{{ prop.node.CateName }}</div>
<template v-if="prop.node.ChildList && prop.node.ChildList.length>0">
&nbsp;
<q-btn round icon="add" size="xs" @click="EditMenu(null)" />
<q-btn round icon="add" size="xs" @click="EditCategory(null)" />
</template>
&nbsp;
<q-btn round icon="edit" size="xs" @click="EditMenu(prop.node)" />
<q-btn round icon="edit" size="xs" @click="EditCategory(prop.node)" />
</div>
</template>
</q-tree>
......@@ -86,7 +86,7 @@
})
},
//新增修改角色
EditMenu(obj) {
EditCategory(obj) {
if (obj) {
this.categoryObj = obj
} else {
......
......@@ -4,11 +4,7 @@
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MenuName"
label="菜单名称" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MenuUrl"
label="菜单地址" />
label="课程名称" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.MenuType" :options="MenuTypeOpts"
......@@ -24,12 +20,12 @@
</div>
</div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增菜单" @click="EditMenu(null)" />
<q-btn color="accent" class="q-mr-md" icon="add" label="新增课程" @click="EditCourse(null)" />
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" title="菜单信息" :data="data" :columns="columns" row-key="name">
separator="none" title="课程信息" :data="data" :columns="columns" row-key="name">
<template v-slot:body-cell-Status="props">
<q-td :props="props">
<q-badge :color="props.value==1?'negative':'primary'" :label="props.value==0?'正常':'禁用'" />
......@@ -42,7 +38,7 @@
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditMenu(props.row)" />
@click="EditCourse(props.row)" />
</q-td>
</template>
</q-table>
......@@ -163,16 +159,10 @@
}
},
mounted() {
this.initData();
this.currentUrl = this.$route.path
this.getcourselist()
},
methods: {
//初始化下拉框
initData() {
this.MenuTypeOpts = getMenuTypeList();
this.MenuLevelOpts = getMenuLevelList();
},
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
......@@ -189,6 +179,7 @@
queryCoursePage(this.msg).then(res => {
this.loading = false
this.data = res.Data.PageData
console.log("this.data",this.data);
this.pageCount = res.Data.PageCount
}).catch(() => {
this.loading = false
......@@ -207,7 +198,7 @@
this.getmenulist()
},
//新增修改菜单
EditMenu(obj) {
EditCourse(obj) {
if (obj) {
this.menuObjOption = obj
} else {
......
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