Commit c65384c8 authored by 黄奎's avatar 黄奎

页面修改

parent b1212478
......@@ -38,14 +38,7 @@
<th>父级菜单编号</th>
<th>状态</th>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>正常</td>
</tr>
</table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
v-if="dataList.length>0" layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total">
......@@ -61,7 +54,7 @@
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.MenuUrl"></el-input>
</el-form-item>
<el-form-item label="菜单等级" prop="MenuLevel">
<el-select style="width:234px;" size="small" v-model="addMsg.MenuLevel">
<el-select style="width:234px;" size="small" v-model="addMsg.MenuLevel" @change="getChildMenuList(addMsg.MenuLevel)">
<el-option label="一级" :key="1" :value="1"></el-option>
<el-option label="二级" :key="2" :value="2"></el-option>
<el-option label="三级" :key="3" :value="3"></el-option>
......@@ -76,7 +69,9 @@
<el-form-item label="图标" prop="IconClass">
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.IconClass"></el-input>
</el-form-item>
<el-form-item label="排序">
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.SortNum"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="menuDialog = false">取 消</el-button>
......@@ -101,10 +96,11 @@
addMsg: {
MenuName: '',
MenuUrl: '',
MenuLevel: 0,
MenuLevel: 1,
ParentId: 0,
IconClass: '',
Status: 0,
SortNum: 0,
},
menurules: {
......@@ -117,17 +113,87 @@
methods: {
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
this.getPageList();
},
//获取数据
getList() {
//获取分页数据
getPageList() {
this.apipost("/api/Tenant/GetMenuPage", this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
//添加修改菜单
addMenu() {
}
this.apipost("/api/Tenant/SetMenu", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.getPageList();
} else {
this.Info(res.data.message);
}
})
},
//根据编号获取菜单
getMenu(Id) {
this.apipost("/api/Tenant/GetMenu", {
MenuId: Id
}, res => {
console.log(res);
1
if (res.data.resultCode == 1) {
} else {
this.Info(res.data.message);
}
})
},
//删除菜单
delMenu(Id) {
this.apipost("/api/Tenant/SetMenuStatus", {
MenuId: Id,
Status: 1
}, res => {
console.log(res);
if (res.data.resultCode == 1) {
} else {
this.Info(res.data.message);
}
})
},
//恢复菜单
recoverMenu(Id) {
this.apipost("/api/Tenant/SetMenuStatus", {
MenuId: Id,
Status: 0
}, res => {
console.log(res);
if (res.data.resultCode == 1) {
} else {
this.Info(res.data.message);
}
})
},
//恢复菜单
getChildMenuList(MenuLevel) {
this.apipost("/api/Tenant/SetMenuStatus", {
MenuLevel: MenuLevel,
}, res => {
console.log(res);
if (res.data.resultCode == 1) {
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.getList();
this.getPageList();
}
};
......
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