Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
12d0d862
提交
12d0d862
authored
2月 23, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 菜单初始化提交
上级
6f3f98b1
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
17 行删除
+21
-17
ExtMenuMapper.java
.../main/java/io/dataease/base/mapper/ext/ExtMenuMapper.java
+2
-2
MsDeleteConfirm.vue
...business/components/common/components/MsDeleteConfirm.vue
+2
-2
menu.vue
frontend/src/business/components/settings/sys/menu.vue
+17
-13
没有找到文件。
backend/src/main/java/io/dataease/base/mapper/ext/ExtMenuMapper.java
浏览文件 @
12d0d862
...
@@ -8,8 +8,8 @@ import org.apache.ibatis.annotations.Update;
...
@@ -8,8 +8,8 @@ import org.apache.ibatis.annotations.Update;
public
interface
ExtMenuMapper
{
public
interface
ExtMenuMapper
{
@Update
(
" update sys_menu set sub_count = sub_count+1 where menu_id = #{menuId} "
)
@Update
(
" update sys_menu set sub_count = sub_count+1 where menu_id = #{menuId} "
)
int
incrementalSubcount
(
@Param
(
"
dept
Id"
)
Long
menuId
);
int
incrementalSubcount
(
@Param
(
"
menu
Id"
)
Long
menuId
);
@Update
(
" update sys_menu set sub_count = sub_count-1 where menu_id = #{menuId} and sub_count > 0"
)
@Update
(
" update sys_menu set sub_count = sub_count-1 where menu_id = #{menuId} and sub_count > 0"
)
int
decreasingSubcount
(
@Param
(
"
dept
Id"
)
Long
menuId
);
int
decreasingSubcount
(
@Param
(
"
menu
Id"
)
Long
menuId
);
}
}
frontend/src/business/components/common/components/MsDeleteConfirm.vue
浏览文件 @
12d0d862
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<el-row>
<el-row>
<el-col>
<el-col>
<span>
{{
$t
(
'commons.delete_confirm'
)
}}
</span>
<span>
{{
$t
(
'commons.delete_confirm'
)
}}
</span>
<span
class=
"delete-tip"
>
DELETE-
{{
record
.
name
}}
</span>
<span
class=
"delete-tip"
>
DELETE-
{{
record
.
name
||
record
.
title
}}
</span>
<br/>
<br/>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
this
.
record
=
record
;
this
.
record
=
record
;
},
},
confirm
()
{
confirm
()
{
if
(
this
.
value
.
trim
()
!=
'DELETE-'
+
this
.
record
.
name
)
{
if
(
this
.
value
.
trim
()
!=
'DELETE-'
+
(
this
.
record
.
name
||
this
.
record
.
title
)
)
{
this
.
$warning
(
this
.
$t
(
'commons.incorrect_input'
));
this
.
$warning
(
this
.
$t
(
'commons.incorrect_input'
));
return
;
return
;
}
}
...
...
frontend/src/business/components/settings/sys/menu.vue
浏览文件 @
12d0d862
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
:tree-props=
"{children: 'children', hasChildren: 'hasChildren'}"
:tree-props=
"{children: 'children', hasChildren: 'hasChildren'}"
row-key=
"menuId"
>
row-key=
"menuId"
>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"菜单标题"
width=
"1
25
px"
prop=
"title"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"菜单标题"
width=
"1
50
px"
prop=
"title"
/>
<el-table-column
prop=
"icon"
label=
"图标"
align=
"center"
width=
"60px"
>
<el-table-column
prop=
"icon"
label=
"图标"
align=
"center"
width=
"60px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<svg-icon
:icon-class=
"scope.row.icon ? scope.row.icon : ''"
/>
<svg-icon
:icon-class=
"scope.row.icon ? scope.row.icon : ''"
/>
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<span
v-else
>
是
</span>
<span
v-else
>
是
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"createTime"
label=
"创建日期"
width=
"1
35
px"
>
<el-table-column
prop=
"createTime"
label=
"创建日期"
width=
"1
60
px"
>
<
template
v-slot:default=
"scope"
>
<
template
v-slot:default=
"scope"
>
<span>
{{
scope
.
row
.
createTime
|
timestampFormatDate
}}
</span>
<span>
{{
scope
.
row
.
createTime
|
timestampFormatDate
}}
</span>
</
template
>
</
template
>
...
@@ -180,7 +180,8 @@ export default {
...
@@ -180,7 +180,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
menus
:
null
,
menus
:
[],
topMunu
:
{
id
:
0
,
label
:
'顶级类目'
,
children
:
null
},
formType
:
"add"
,
formType
:
"add"
,
queryPath
:
'/api/menu/childNodes/'
,
queryPath
:
'/api/menu/childNodes/'
,
deletePath
:
'/api/menu/delete'
,
deletePath
:
'/api/menu/delete'
,
...
@@ -192,6 +193,7 @@ export default {
...
@@ -192,6 +193,7 @@ export default {
tableData
:
[],
tableData
:
[],
maps
:
new
Map
(),
maps
:
new
Map
(),
oldPid
:
null
,
oldPid
:
null
,
defaultForm
:
{
menuId
:
null
,
title
:
null
,
menuSort
:
999
,
path
:
null
,
component
:
null
,
componentName
:
null
,
iframe
:
false
,
pid
:
0
,
icon
:
null
,
cache
:
false
,
hidden
:
false
,
type
:
0
,
permission
:
null
},
form
:
{},
form
:
{},
rule
:
{
rule
:
{
name
:
[
name
:
[
...
@@ -206,7 +208,8 @@ export default {
...
@@ -206,7 +208,8 @@ export default {
}
}
},
},
activated
()
{
activated
()
{
this
.
initTableData
();
this
.
form
=
Object
.
assign
({},
this
.
defaultForm
)
this
.
initTableData
()
},
},
methods
:
{
methods
:
{
create
()
{
create
()
{
...
@@ -219,7 +222,7 @@ export default {
...
@@ -219,7 +222,7 @@ export default {
},
},
edit
(
row
)
{
edit
(
row
)
{
this
.
dialog
OrgAdd
Visible
=
true
;
this
.
dialogVisible
=
true
;
this
.
formType
=
"modify"
;
this
.
formType
=
"modify"
;
this
.
oldPid
=
row
.
pid
;
this
.
oldPid
=
row
.
pid
;
this
.
form
=
Object
.
assign
({},
row
);
this
.
form
=
Object
.
assign
({},
row
);
...
@@ -283,7 +286,8 @@ export default {
...
@@ -283,7 +286,8 @@ export default {
if
(
!
row
){
if
(
!
row
){
data
.
some
(
node
=>
node
.
children
=
null
);
data
.
some
(
node
=>
node
.
children
=
null
);
_self
.
tableData
=
data
;
_self
.
tableData
=
data
;
_self
.
menus
=
null
;
_self
.
menus
=
[];
_self
.
menus
.
push
(
_self
.
topMunu
)
}
else
{
}
else
{
this
.
maps
.
set
(
row
.
menuId
,
{
row
,
treeNode
,
resolve
})
this
.
maps
.
set
(
row
.
menuId
,
{
row
,
treeNode
,
resolve
})
...
@@ -293,11 +297,11 @@ export default {
...
@@ -293,11 +297,11 @@ export default {
},
},
closeFunc
()
{
closeFunc
()
{
this
.
initTableData
();
this
.
initTableData
();
this
.
form
=
{}
;
this
.
form
=
this
.
defaultForm
;
this
.
oldPid
=
null
;
this
.
oldPid
=
null
;
this
.
menus
=
null
;
this
.
menus
=
null
;
removeGoBackListener
(
this
.
closeFunc
);
removeGoBackListener
(
this
.
closeFunc
);
this
.
dialog
OrgAdd
Visible
=
false
;
this
.
dialogVisible
=
false
;
},
},
...
@@ -328,7 +332,7 @@ export default {
...
@@ -328,7 +332,7 @@ export default {
}
}
return
{
return
{
id
:
node
.
menuId
,
id
:
node
.
menuId
,
label
:
node
.
nam
e
,
label
:
node
.
titl
e
,
children
:
node
.
children
children
:
node
.
children
}
}
},
},
...
@@ -336,7 +340,7 @@ export default {
...
@@ -336,7 +340,7 @@ export default {
return
{
return
{
id
:
node
.
menuId
,
id
:
node
.
menuId
,
pid
:
node
.
pid
,
pid
:
node
.
pid
,
label
:
node
.
nam
e
,
label
:
node
.
titl
e
,
children
:
node
.
children
children
:
node
.
children
}
}
},
},
...
@@ -353,7 +357,7 @@ export default {
...
@@ -353,7 +357,7 @@ export default {
this
.
initTableData
();
this
.
initTableData
();
this
.
oldPid
&&
this
.
reloadByPid
(
this
.
oldPid
)
this
.
oldPid
&&
this
.
reloadByPid
(
this
.
oldPid
)
this
.
reloadByPid
(
this
.
form
[
'pid'
])
this
.
reloadByPid
(
this
.
form
[
'pid'
])
this
.
dialog
OrgAdd
Visible
=
false
;
this
.
dialogVisible
=
false
;
});
});
}
else
{
}
else
{
return
false
;
return
false
;
...
@@ -370,8 +374,8 @@ export default {
...
@@ -370,8 +374,8 @@ export default {
cancelButtonText
:
this
.
$t
(
'commons.cancel'
),
cancelButtonText
:
this
.
$t
(
'commons.cancel'
),
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
let
request
s
=
[{
menuId
:
menu
.
menuId
,
pid
:
menu
.
pid
}]
let
request
=
{
menuId
:
menu
.
menuId
,
pid
:
menu
.
pid
}
this
.
$post
(
this
.
deletePath
,
request
s
,
()
=>
{
this
.
$post
(
this
.
deletePath
,
request
,
()
=>
{
this
.
$success
(
this
.
$t
(
'commons.delete_success'
));
this
.
$success
(
this
.
$t
(
'commons.delete_success'
));
this
.
initTableData
();
this
.
initTableData
();
this
.
reloadByPid
(
menu
.
pid
)
this
.
reloadByPid
(
menu
.
pid
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论