Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
997ce40b
提交
997ce40b
authored
3月 29, 2022
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 新增插件管理功能
上级
1104d33b
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
26 行增加
和
16 行删除
+26
-16
DeFileUtils.java
.../src/main/java/io/dataease/commons/utils/DeFileUtils.java
+7
-0
PluginService.java
.../src/main/java/io/dataease/service/sys/PluginService.java
+1
-0
V33__1.9.sql
backend/src/main/resources/db/migration/V33__1.9.sql
+5
-0
messages_en_US.properties
backend/src/main/resources/i18n/messages_en_US.properties
+1
-0
messages_zh_CN.properties
backend/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
messages_zh_TW.properties
backend/src/main/resources/i18n/messages_zh_TW.properties
+1
-0
index.vue
frontend/src/views/system/plugin/index.vue
+10
-16
没有找到文件。
backend/src/main/java/io/dataease/commons/utils/DeFileUtils.java
浏览文件 @
997ce40b
...
@@ -35,6 +35,12 @@ public class DeFileUtils {
...
@@ -35,6 +35,12 @@ public class DeFileUtils {
}
}
return
filename
;
return
filename
;
}
}
public
static
void
validateExist
(
String
path
)
{
File
dir
=
new
File
(
path
);
if
(
dir
.
exists
())
return
;
dir
.
mkdirs
();
}
/**
/**
* 将文件名解析成文件的上传路径
* 将文件名解析成文件的上传路径
*/
*/
...
@@ -42,6 +48,7 @@ public class DeFileUtils {
...
@@ -42,6 +48,7 @@ public class DeFileUtils {
String
name
=
getFileNameNoEx
(
file
.
getOriginalFilename
());
String
name
=
getFileNameNoEx
(
file
.
getOriginalFilename
());
String
suffix
=
getExtensionName
(
file
.
getOriginalFilename
());
String
suffix
=
getExtensionName
(
file
.
getOriginalFilename
());
try
{
try
{
validateExist
(
filePath
);
String
fileName
=
name
+
"."
+
suffix
;
String
fileName
=
name
+
"."
+
suffix
;
String
path
=
filePath
+
fileName
;
String
path
=
filePath
+
fileName
;
// getCanonicalFile 可解析正确各种路径
// getCanonicalFile 可解析正确各种路径
...
...
backend/src/main/java/io/dataease/service/sys/PluginService.java
浏览文件 @
997ce40b
...
@@ -175,6 +175,7 @@ public class PluginService {
...
@@ -175,6 +175,7 @@ public class PluginService {
MyPlugin
result
=
new
MyPlugin
();
MyPlugin
result
=
new
MyPlugin
();
try
{
try
{
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
populate
(
result
,
myPlugin
);
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
populate
(
result
,
myPlugin
);
result
.
setInstallTime
(
System
.
currentTimeMillis
());
}
catch
(
IllegalAccessException
e
)
{
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
catch
(
InvocationTargetException
e
)
{
}
catch
(
InvocationTargetException
e
)
{
...
...
backend/src/main/resources/db/migration/V33__1.9.sql
浏览文件 @
997ce40b
...
@@ -251,3 +251,8 @@ INSERT INTO `my_plugin`(`plugin_id`, `name`, `store`, `free`, `cost`, `category`
...
@@ -251,3 +251,8 @@ INSERT INTO `my_plugin`(`plugin_id`, `name`, `store`, `free`, `cost`, `category`
ALTER
TABLE
`panel_link_jump_info`
ALTER
TABLE
`panel_link_jump_info`
ADD
COLUMN
`attach_params`
tinyint
(
1
)
NULL
COMMENT
'是否附加点击参数'
AFTER
`checked`
;
ADD
COLUMN
`attach_params`
tinyint
(
1
)
NULL
COMMENT
'是否附加点击参数'
AFTER
`checked`
;
update
`sys_menu`
set
menu_id
=
100
where
title
=
'首页'
;
INSERT
INTO
`sys_menu`
VALUES
(
101
,
1
,
4
,
1
,
'插件管理'
,
'system-plugin'
,
'system/plugin/index'
,
1002
,
'peoples'
,
'plugin'
,
b
'0'
,
b
'0'
,
b
'0'
,
'plugin:read'
,
NULL
,
NULL
,
NULL
,
1620281952752
);
backend/src/main/resources/i18n/messages_en_US.properties
浏览文件 @
997ce40b
...
@@ -122,3 +122,4 @@ theme_name_repeat=name of theme has been existed
...
@@ -122,3 +122,4 @@ theme_name_repeat=name of theme has been existed
theme_name_empty
=
name can not be empty
theme_name_empty
=
name can not be empty
i18n_public_chart
=
【Public Chart】
i18n_public_chart
=
【Public Chart】
i18n_class_blue
=
Blue Tone
i18n_class_blue
=
Blue Tone
插件管理=Plugins
backend/src/main/resources/i18n/messages_zh_CN.properties
浏览文件 @
997ce40b
...
@@ -121,4 +121,5 @@ theme_name_repeat=名称已存在
...
@@ -121,4 +121,5 @@ theme_name_repeat=名称已存在
theme_name_empty
=
名称不能为空
theme_name_empty
=
名称不能为空
i18n_public_chart
=
【存量视图】
i18n_public_chart
=
【存量视图】
i18n_class_blue
=
蓝色调
i18n_class_blue
=
蓝色调
插件管理=插件管理
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
997ce40b
...
@@ -122,3 +122,4 @@ theme_name_repeat=名稱已存在
...
@@ -122,3 +122,4 @@ theme_name_repeat=名稱已存在
theme_name_empty
=
名稱不能為空
theme_name_empty
=
名稱不能為空
i18n_public_chart
=
【存量视图】
i18n_public_chart
=
【存量视图】
i18n_class_blue
=
蓝色调
i18n_class_blue
=
蓝色调
插件管理=插件管理
frontend/src/views/system/plugin/index.vue
浏览文件 @
997ce40b
...
@@ -30,7 +30,11 @@
...
@@ -30,7 +30,11 @@
</
template
>
</
template
>
<el-table-column
prop=
"name"
:label=
"$t('plugin.name')"
/>
<el-table-column
prop=
"name"
:label=
"$t('plugin.name')"
/>
<el-table-column
prop=
"free"
:label=
"$t('plugin.free')"
/>
<!-- <el-table-column prop="free" :label="$t('plugin.free')">
<template v-slot:default="scope">
<span>{{ scope.row.free ? '是' : '否' }}</span>
</template>
</el-table-column> -->
<el-table-column
prop=
"cost"
:label=
"$t('plugin.cost')"
/>
<el-table-column
prop=
"cost"
:label=
"$t('plugin.cost')"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"descript"
:label=
"$t('plugin.descript')"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"descript"
:label=
"$t('plugin.descript')"
/>
...
@@ -42,7 +46,7 @@
...
@@ -42,7 +46,7 @@
<span>
{{
scope
.
row
.
installTime
|
timestampFormatDate
}}
</span>
<span>
{{
scope
.
row
.
installTime
|
timestampFormatDate
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<
fu-table-operations
:buttons=
"buttons"
label=
"操作"
fix
/
>
<
!-- <fu-table-operations :buttons="buttons" label="操作" fix /> --
>
</complex-table>
</complex-table>
</layout-content>
</layout-content>
...
@@ -53,7 +57,7 @@ import LayoutContent from '@/components/business/LayoutContent'
...
@@ -53,7 +57,7 @@ import LayoutContent from '@/components/business/LayoutContent'
import
ComplexTable
from
'@/components/business/complex-table'
import
ComplexTable
from
'@/components/business/complex-table'
// import { checkPermission } from '@/utils/permission'
// import { checkPermission } from '@/utils/permission'
import
{
formatCondition
}
from
'@/utils/index'
import
{
formatCondition
,
formatQuickCondition
}
from
'@/utils/index'
import
{
pluginLists
,
uninstall
}
from
'@/api/system/plugin'
import
{
pluginLists
,
uninstall
}
from
'@/api/system/plugin'
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
'@/utils/auth'
export
default
{
export
default
{
...
@@ -70,21 +74,10 @@ export default {
...
@@ -70,21 +74,10 @@ export default {
// }
// }
],
],
searchConfig
:
{
searchConfig
:
{
useQuickSearch
:
fals
e
,
useQuickSearch
:
tru
e
,
quickPlaceholder
:
this
.
$t
(
'role.search_by_name'
),
quickPlaceholder
:
this
.
$t
(
'role.search_by_name'
),
components
:
[
components
:
[
{
field
:
'name'
,
label
:
this
.
$t
(
'plugin.name'
),
component
:
'FuComplexInput'
}
{
field
:
'name'
,
label
:
this
.
$t
(
'plugin.name'
),
component
:
'DeComplexInput'
}
// {
// field: 'u.enabled',
// label: '状态',
// component: 'FuComplexSelect',
// options: [
// { label: '启用', value: '1' },
// { label: '禁用', value: '0' }
// ],
// multiple: false
// }
]
]
},
},
paginationConfig
:
{
paginationConfig
:
{
...
@@ -107,6 +100,7 @@ export default {
...
@@ -107,6 +100,7 @@ export default {
methods
:
{
methods
:
{
search
(
condition
)
{
search
(
condition
)
{
condition
=
formatQuickCondition
(
condition
,
'name'
)
const
temp
=
formatCondition
(
condition
)
const
temp
=
formatCondition
(
condition
)
const
param
=
temp
||
{}
const
param
=
temp
||
{}
const
{
currentPage
,
pageSize
}
=
this
.
paginationConfig
const
{
currentPage
,
pageSize
}
=
this
.
paginationConfig
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论