修复菜单排序问题
This commit is contained in:
Binary file not shown.
@@ -30,7 +30,7 @@ namespace Yi.Framework.Common.Helper
|
||||
SetTreeChildren(list, children, model, action);
|
||||
}
|
||||
}
|
||||
return result.OrderBy(m => (m as ITreeModel<T>).OrderNum).ToList();
|
||||
return result.OrderByDescending(m => (m as ITreeModel<T>).OrderNum).ToList();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ namespace Yi.Framework.Common.Helper
|
||||
SetTreeChildren(list, _children, item, action);
|
||||
}
|
||||
}
|
||||
mm.Children = mm.Children.OrderBy(m => (m as ITreeModel<T>).OrderNum).ToList();
|
||||
mm.Children = mm.Children.OrderByDescending(m => (m as ITreeModel<T>).OrderNum).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace Yi.Framework.Model.Models
|
||||
{
|
||||
|
||||
var r = new VueRouterModel();
|
||||
r.OrderNum = m.OrderNum ?? 0;
|
||||
var routerName = m.Router.Split("/").LastOrDefault();
|
||||
r.Id = m.Id;
|
||||
r.ParentId = (long)m.ParentId;
|
||||
@@ -40,14 +41,14 @@ namespace Yi.Framework.Model.Models
|
||||
r.AlwaysShow = true;
|
||||
|
||||
//判断是否为最顶层的路由
|
||||
if (0==m.ParentId)
|
||||
if (0 == m.ParentId)
|
||||
{
|
||||
r.Component = "Layout";
|
||||
}
|
||||
else
|
||||
{
|
||||
r.Component = "ParentView";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m.MenuType == MenuTypeEnum.Menu.GetHashCode())
|
||||
{
|
||||
|
||||
@@ -40,6 +40,6 @@ export function delData(code) {
|
||||
return request({
|
||||
url: '/article/delList',
|
||||
method: 'delete',
|
||||
data:"string"==typeof(code)?code:[code]
|
||||
data:"string"==typeof(code)?[code]:code
|
||||
})
|
||||
}
|
||||
|
||||
@@ -49,6 +49,6 @@ export function delData(code) {
|
||||
return request({
|
||||
url: '/<#= entityName #>/delList',
|
||||
method: 'delete',
|
||||
data:"string"==typeof(code)?code:[code]
|
||||
data:"string"==typeof(code)?[code]:code
|
||||
})
|
||||
}
|
||||
|
||||
@@ -297,9 +297,9 @@ function submitForm() {
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const ids = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除字典编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delData(ids);
|
||||
const delIds = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除字典编号为"' + delIds + '"的数据项?').then(function() {
|
||||
return delData(delIds);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
|
||||
@@ -40,6 +40,6 @@ export function delData(code) {
|
||||
return request({
|
||||
url: '/article/delList',
|
||||
method: 'delete',
|
||||
data:"string"==typeof(code)?code:[code]
|
||||
data:"string"==typeof(code)?[code]:code
|
||||
})
|
||||
}
|
||||
|
||||
@@ -373,11 +373,11 @@ function submitForm() {
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const ids = row.id || ids.value;
|
||||
const delIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除字典编号为"' + ids + '"的数据项?')
|
||||
.confirm('是否确认删除字典编号为"' + delIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delData(ids);
|
||||
return delData(delIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>Vite + Vue + TS</title>
|
||||
<title>大白荟</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="div-top">
|
||||
<span class="title">大白荟</span>
|
||||
<br />
|
||||
<span class="subtitle">农夫山泉有点甜</span>
|
||||
<span class="subtitle">有幸相遇、不负未来</span>
|
||||
</div>
|
||||
<div class="div-bottom">
|
||||
<h5>密码登录</h5>
|
||||
@@ -42,8 +42,8 @@ import { Toast } from "vant";
|
||||
const router = useRouter();
|
||||
const redirect = ref(undefined);
|
||||
const loginForm = ref({
|
||||
username: "cc",
|
||||
password: "123456",
|
||||
username: "",
|
||||
password: "",
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
uuid: "",
|
||||
|
||||
Reference in New Issue
Block a user