Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Pig
提交
1cee70a6
P
Pig
项目概览
int
/
Pig
上一次同步 11 个月
通知
8
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Pig
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1cee70a6
编写于
10月 05, 2022
作者:
L
lbw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🔖
Releasing / Version tags. v3.6
上级
c8fc4ebb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
9 deletion
+14
-9
pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/service/GenCodeService.java
...ava/com/pig4cloud/pig/codegen/service/GenCodeService.java
+8
-3
pig-visual/pig-codegen/src/main/resources/template/avue/index.vue.vm
...pig-codegen/src/main/resources/template/avue/index.vue.vm
+4
-4
pig-visual/pig-codegen/src/main/resources/template/element/index.vue.vm
...-codegen/src/main/resources/template/element/index.vue.vm
+2
-2
未找到文件。
pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/service/GenCodeService.java
浏览文件 @
1cee70a6
...
...
@@ -27,6 +27,7 @@ import java.io.StringWriter;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipException
;
import
java.util.zip.ZipOutputStream
;
/**
...
...
@@ -87,9 +88,13 @@ public interface GenCodeService {
map
.
get
(
"moduleName"
).
toString
());
if
(
zip
!=
null
)
{
zip
.
putNextEntry
(
new
ZipEntry
(
Objects
.
requireNonNull
(
fileName
)));
IoUtil
.
write
(
zip
,
StandardCharsets
.
UTF_8
,
false
,
sw
.
toString
());
IoUtil
.
close
(
sw
);
try
{
zip
.
putNextEntry
(
new
ZipEntry
(
Objects
.
requireNonNull
(
fileName
)));
IoUtil
.
write
(
zip
,
StandardCharsets
.
UTF_8
,
false
,
sw
.
toString
());
IoUtil
.
close
(
sw
);
}
catch
(
ZipException
zipException
)
{
}
zip
.
closeEntry
();
}
resultMap
.
put
(
template
,
sw
.
toString
());
...
...
pig-visual/pig-codegen/src/main/resources/template/avue/index.vue.vm
浏览文件 @
1cee70a6
...
...
@@ -18,7 +18,7 @@
<div
class=
"execution"
>
<basic-container>
<avue-crud
ref=
"crud"
v-model=
"page"
v-model
:page
=
"page"
:data=
"tableData"
:permission=
"permissionList"
:table-loading=
"tableLoading"
...
...
@@ -60,9 +60,9 @@
...
mapGetters
([
'
permissions
'
]),
permissionList
()
{
return
{
addBtn
:
this
.
va
il
dData
(
this
.
permissions
.${
moduleName
}
_
${
pathName
}
_add
,
false
),
delBtn
:
this
.
va
il
dData
(
this
.
permissions
.${
moduleName
}
_
${
pathName
}
_del
,
false
),
editBtn
:
this
.
va
il
dData
(
this
.
permissions
.${
moduleName
}
_
${
pathName
}
_edit
,
false
)
addBtn
:
this
.
va
li
dData
(
this
.
permissions
.${
moduleName
}
_
${
pathName
}
_add
,
false
),
delBtn
:
this
.
va
li
dData
(
this
.
permissions
.${
moduleName
}
_
${
pathName
}
_del
,
false
),
editBtn
:
this
.
va
li
dData
(
this
.
permissions
.${
moduleName
}
_
${
pathName
}
_edit
,
false
)
};
}
},
...
...
pig-visual/pig-codegen/src/main/resources/template/element/index.vue.vm
浏览文件 @
1cee70a6
...
...
@@ -28,7 +28,7 @@
header-align=
"center"
align=
"center"
label=
"操作"
>
<template
slot-scope
=
"scope"
>
<template
#
="
scope
"
>
<el-button
v-if=
"permissions.
${
moduleName
}
_
${
pathName
}
_edit"
type=
"text"
size=
"small"
icon=
"el-icon-edit"
@
click=
"addOrUpdateHandle(scope.row.
${
pk
.
lowerAttrName
}
)"
>
修改
</el-button>
<el-button
v-if=
"permissions.
${
moduleName
}
_
${
pathName
}
_del"
type=
"text"
size=
"small"
icon=
"el-icon-delete"
@
click=
"deleteHandle(scope.row.
${
pk
.
lowerAttrName
}
)"
>
删除
</el-button>
</template>
...
...
@@ -56,7 +56,7 @@
<script>
import
{
fetchList
,
delObj
}
from
'
@/api/
${
pathName
}
'
import
TableForm
from
'
./
${
pathName
}
-form
'
import
TableForm
from
'
./
${
pathName
}
-form
.vue
'
import
{
mapGetters
}
from
'
vuex
'
export
default
{
data
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录