Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
51d3ffcb
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
343
Star
18155
Fork
5506
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
51d3ffcb
编写于
10月 09, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加工作流前端页面
上级
910c857e
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
542 addition
and
182 deletion
+542
-182
server/gva/init_data/init_data.go
server/gva/init_data/init_data.go
+4
-0
web/package-lock.json
web/package-lock.json
+444
-7
web/package.json
web/package.json
+66
-65
web/src/utils/stringFun.js
web/src/utils/stringFun.js
+7
-6
web/src/view/superAdmin/authority/components/apis.vue
web/src/view/superAdmin/authority/components/apis.vue
+1
-1
web/src/view/system/state.vue
web/src/view/system/state.vue
+4
-1
web/src/view/workflow/workflowCreate/workflowCreate.vue
web/src/view/workflow/workflowCreate/workflowCreate.vue
+16
-102
未找到文件。
server/gva/init_data/init_data.go
浏览文件 @
51d3ffcb
...
...
@@ -316,6 +316,8 @@ func InitSysBaseMenus() (err error) {
{
Model
:
gorm
.
Model
{
ID
:
25
,
CreatedAt
:
time
.
Now
(),
UpdatedAt
:
time
.
Now
()},
MenuLevel
:
0
,
Hidden
:
false
,
ParentId
:
"9"
,
Path
:
"simpleUploader"
,
Name
:
"simpleUploader"
,
Component
:
"view/example/simpleUploader/simpleUploader"
,
Sort
:
6
,
Meta
:
model
.
Meta
{
Title
:
"断点续传(插件版)"
,
Icon
:
"upload"
}},
{
Model
:
gorm
.
Model
{
ID
:
26
,
CreatedAt
:
time
.
Now
(),
UpdatedAt
:
time
.
Now
()},
MenuLevel
:
0
,
ParentId
:
"0"
,
Path
:
"https://www.gin-vue-admin.com"
,
Name
:
"https://www.gin-vue-admin.com"
,
Hidden
:
false
,
Component
:
"/"
,
Sort
:
0
,
Meta
:
model
.
Meta
{
Title
:
"官方网站"
,
Icon
:
"s-home"
}},
{
Model
:
gorm
.
Model
{
ID
:
27
,
CreatedAt
:
time
.
Now
(),
UpdatedAt
:
time
.
Now
()},
MenuLevel
:
0
,
ParentId
:
"0"
,
Path
:
"state"
,
Name
:
"state"
,
Hidden
:
false
,
Component
:
"view/system/state.vue"
,
Sort
:
6
,
Meta
:
model
.
Meta
{
Title
:
"服务器状态"
,
Icon
:
"cloudy"
}},
{
Model
:
gorm
.
Model
{
ID
:
28
,
CreatedAt
:
time
.
Now
(),
UpdatedAt
:
time
.
Now
()},
MenuLevel
:
0
,
ParentId
:
"0"
,
Path
:
"workflow"
,
Name
:
"workflow"
,
Hidden
:
false
,
Component
:
"view/workflow/index.vue"
,
Sort
:
6
,
Meta
:
model
.
Meta
{
Title
:
"工作流管理"
,
Icon
:
"s-flag"
}},
{
Model
:
gorm
.
Model
{
ID
:
29
,
CreatedAt
:
time
.
Now
(),
UpdatedAt
:
time
.
Now
()},
MenuLevel
:
0
,
ParentId
:
"0"
,
Path
:
"workflowCreate"
,
Name
:
"workflowCreate"
,
Hidden
:
false
,
Component
:
"view/workflow/workflowCreate/workflowCreate.vue"
,
Sort
:
6
,
Meta
:
model
.
Meta
{
Title
:
"工作流创建"
,
Icon
:
"plus"
}},
}
if
tx
.
Create
(
&
insert
)
.
Error
!=
nil
{
// 遇到错误时回滚事务
tx
.
Rollback
()
...
...
@@ -375,6 +377,8 @@ func InitSysAuthorityMenus() (err error) {
{
"888"
,
25
},
{
"888"
,
26
},
{
"888"
,
27
},
{
"888"
,
28
},
{
"888"
,
29
},
{
"8881"
,
1
},
{
"8881"
,
2
},
{
"8881"
,
8
},
...
...
web/package-lock.json
浏览文件 @
51d3ffcb
此差异已折叠。
点击以展开。
web/package.json
浏览文件 @
51d3ffcb
{
"name"
:
"qm-plus-vue-page"
,
"version"
:
"0.1.0"
,
"private"
:
true
,
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"build"
:
"vue-cli-service build"
,
"lint"
:
"vue-cli-service lint"
},
"dependencies"
:
{
"@moefe/vue-aplayer"
:
"^2.0.0-beta.5"
,
"axios"
:
"^0.19.0"
,
"core-js"
:
"^3.6.5"
,
"echarts"
:
"^4.7.0"
,
"element-ui"
:
"^2.12.0"
,
"mavon-editor"
:
"^2.7.7"
,
"node-sass"
:
"^4.14.1"
,
"path"
:
"^0.12.7"
,
"qs"
:
"^6.8.0"
,
"quill"
:
"^1.3.7"
,
"sass-loader"
:
"^8.0.0"
,
"screenfull"
:
"^5.0.2"
,
"script-ext-html-webpack-plugin"
:
"^2.1.4"
,
"spark-md5"
:
"^3.0.1"
,
"timeline-vuejs"
:
"1.1.1"
,
"vue"
:
"^2.6.10"
,
"vue-particle-line"
:
"^0.1.4"
,
"vue-quill-editor"
:
"^3.0.6"
,
"vue-router"
:
"^3.1.3"
,
"vue-simple-uploader"
:
"^0.7.4"
,
"vuescroll"
:
"^4.14.4"
,
"vuex"
:
"^3.1.1"
,
"vuex-persist"
:
"^2.1.0"
},
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"^4.5.6"
,
"@vue/cli-plugin-eslint"
:
"^4.5.6"
,
"@vue/cli-service"
:
"^4.5.6"
,
"babel-eslint"
:
"^10.1.0"
,
"eslint"
:
"^6.7.2"
,
"eslint-plugin-vue"
:
"^6.2.2"
,
"vue-template-compiler"
:
"^2.6.10"
},
"eslintConfig"
:
{
"root"
:
true
,
"env"
:
{
"node"
:
true
"name"
:
"qm-plus-vue-page"
,
"version"
:
"0.1.0"
,
"private"
:
true
,
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"build"
:
"vue-cli-service build"
,
"lint"
:
"vue-cli-service lint"
},
"extends"
:
[
"plugin:vue/essential"
,
"eslint:recommended"
],
"rules"
:
{},
"parserOptions"
:
{
"parser"
:
"babel-eslint"
}
},
"postcss"
:
{
"plugins"
:
{
"autoprefixer"
:
{}
}
},
"browserslist"
:
[
"> 1%"
,
"last 2 versions"
]
}
"dependencies"
:
{
"@moefe/vue-aplayer"
:
"^2.0.0-beta.5"
,
"axios"
:
"^0.19.0"
,
"core-js"
:
"^3.6.5"
,
"echarts"
:
"^4.7.0"
,
"element-ui"
:
"^2.12.0"
,
"mavon-editor"
:
"^2.7.7"
,
"node-sass"
:
"^4.14.1"
,
"path"
:
"^0.12.7"
,
"qs"
:
"^6.8.0"
,
"quill"
:
"^1.3.7"
,
"sass-loader"
:
"^8.0.0"
,
"screenfull"
:
"^5.0.2"
,
"script-ext-html-webpack-plugin"
:
"^2.1.4"
,
"spark-md5"
:
"^3.0.1"
,
"timeline-vuejs"
:
"1.1.1"
,
"vue"
:
"^2.6.10"
,
"vue-particle-line"
:
"^0.1.4"
,
"vue-quill-editor"
:
"^3.0.6"
,
"vue-router"
:
"^3.1.3"
,
"vue-simple-uploader"
:
"^0.7.4"
,
"vuescroll"
:
"^4.14.4"
,
"vuex"
:
"^3.1.1"
,
"vuex-persist"
:
"^2.1.0"
,
"wfd-gva"
:
"^1.0.0"
},
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"^4.5.6"
,
"@vue/cli-plugin-eslint"
:
"^4.5.6"
,
"@vue/cli-service"
:
"^4.5.6"
,
"babel-eslint"
:
"^10.1.0"
,
"eslint"
:
"^6.7.2"
,
"eslint-plugin-vue"
:
"^6.2.2"
,
"vue-template-compiler"
:
"^2.6.10"
},
"eslintConfig"
:
{
"root"
:
true
,
"env"
:
{
"node"
:
true
},
"extends"
:
[
"plugin:vue/essential"
,
"eslint:recommended"
],
"rules"
:
{},
"parserOptions"
:
{
"parser"
:
"babel-eslint"
}
},
"postcss"
:
{
"plugins"
:
{
"autoprefixer"
:
{}
}
},
"browserslist"
:
[
"> 1%"
,
"last 2 versions"
]
}
\ No newline at end of file
web/src/utils/stringFun.js
浏览文件 @
51d3ffcb
/* eslint-disable */
export
const
toUpperCase
=
(
str
)
=>
{
if
(
str
[
0
])
{
return
str
.
replace
(
str
[
0
],
str
[
0
].
toUpperCase
())
...
...
@@ -8,13 +9,13 @@ export const toUpperCase = (str) => {
// 驼峰转换下划线
export
const
toSQLLine
=
(
str
)
=>
{
if
(
str
==
"
ID
"
)
return
"
ID
"
return
str
.
replace
(
/
([
A-Z
])
/g
,
"
_$1
"
).
toLowerCase
();
}
if
(
str
==
"
ID
"
)
return
"
ID
"
return
str
.
replace
(
/
([
A-Z
])
/g
,
"
_$1
"
).
toLowerCase
();
}
// 下划线转换驼峰
export
const
toHump
=
(
name
)
=>
{
return
name
.
replace
(
/
\_(\w)
/g
,
function
(
all
,
letter
){
// 下划线转换驼峰
export
const
toHump
=
(
name
)
=>
{
return
name
.
replace
(
/
\_(\w)
/g
,
function
(
all
,
letter
)
{
return
letter
.
toUpperCase
();
});
}
\ No newline at end of file
web/src/view/superAdmin/authority/components/apis.vue
浏览文件 @
51d3ffcb
...
...
@@ -54,7 +54,7 @@ export default {
apis
&&
apis
.
map
(
item
=>
{
item
.
onlyId
=
"
p:
"
+
item
.
path
+
"
m:
"
+
item
.
method
if
(
apiObj
.
hasOwnProperty
(
item
.
apiGroup
))
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
apiObj
,
item
.
apiGroup
))
{
apiObj
[
item
.
apiGroup
].
push
(
item
)
}
else
{
Object
.
assign
(
apiObj
,
{
[
item
.
apiGroup
]:
[
item
]
})
...
...
web/src/view/system/state.vue
浏览文件 @
51d3ffcb
...
...
@@ -146,8 +146,11 @@ export default {
],
};
},
created
()
{
created
()
{
this
.
reload
();
setInterval
(()
=>
{
this
.
reload
();
},
1000
*
10
);
},
methods
:
{
async
reload
()
{
...
...
web/src/view/workflow/workflowCreate/workflowCreate.vue
浏览文件 @
51d3ffcb
<
template
>
<div>
<el-form
:model=
"form"
label-width=
"100px"
ref=
"form"
>
<el-form-item
label=
"工作流名称"
>
<el-input
type=
"text"
v-model=
"form.workflowNickName"
></el-input>
</el-form-item>
<el-form-item
label=
"工作流英文id"
>
<el-input
type=
"text"
v-model=
"form.workflowName"
></el-input>
</el-form-item>
<el-form-item
label=
"工作流描述"
>
<el-input
type=
"text"
v-model=
"form.workflowDescription"
></el-input>
</el-form-item>
</el-form>
<el-button
@
click=
"createWorkflowStep"
class=
"fl-right mg"
type=
"primary"
>
新增
</el-button>
<el-table
:data=
"form.workflowStep"
border
style=
"width: 100%"
>
<el-table-column
label=
"是否是完结流节点"
prop=
"isEnd"
>
<template
slot-scope=
"scope"
>
<el-select
placeholder=
"请选择"
v-model=
"scope.row.isEnd"
>
<el-option
:key=
"key"
:label=
"item.name"
:value=
"item.value"
v-for=
"(item,key) in options"
></el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"是否是开始流节点"
prop=
"isStrat"
>
<
template
slot-scope=
"scope"
>
<el-select
placeholder=
"请选择"
v-model=
"scope.row.isStrat"
>
<el-option
:key=
"key"
:label=
"item.name"
:value=
"item.value"
v-for=
"(item,key) in options"
></el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"操作者级别id"
prop=
"stepAuthorityID"
>
<
template
slot-scope=
"scope"
>
<el-input
placeholder=
"请输入"
type=
"text"
v-model=
"scope.row.stepAuthorityID"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"工作流名称"
prop=
"stepName"
>
<
template
slot-scope=
"scope"
>
<el-input
placeholder=
"请输入"
type=
"text"
v-model=
"scope.row.stepName"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"步骤id"
prop=
"stepNo"
>
<
template
slot-scope=
"scope"
>
<el-input
placeholder=
"请输入"
type=
"text"
v-model=
"scope.row.stepNo"
></el-input>
</
template
>
</el-table-column>
</el-table>
<el-button
@
click=
"submit"
type=
"primary"
class=
"fl-right mg"
>
提交
</el-button>
<wfd-gva
ref=
"wfd"
:data=
"demoData"
:height=
"600"
:users=
"candidateUsers"
:groups=
"candidateGroups"
:categorys=
"categorys"
:lang=
"lang"
/>
</div>
</
template
>
<
script
>
import
{
createWorkFlow
}
from
'
@/api/workflow
'
import
wfdGva
from
'
wfd-gva
'
export
default
{
name
:
'
Workflow
'
,
data
()
{
components
:{
wfdGva
},
data
()
{
return
{
form
:
{
workflowName
:
''
,
workflowDescription
:
''
,
workflowNickName
:
''
,
workflowStep
:
[
{
isEnd
:
false
,
isStrat
:
true
,
stepAuthorityID
:
''
,
stepName
:
''
,
stepNo
:
''
}
]
},
options
:
[
{
name
:
'
是
'
,
value
:
true
},
{
name
:
'
否
'
,
value
:
false
}
]
lang
:
"
zh
"
,
demoData
:
{},
candidateUsers
:
[],
candidateGroups
:
[]
}
},
methods
:
{
createWorkflowStep
()
{
this
.
form
.
workflowStep
.
push
({
isEnd
:
false
,
isStrat
:
false
,
stepAuthorityID
:
''
,
stepName
:
''
,
stepNo
:
''
})
},
async
submit
()
{
const
res
=
await
createWorkFlow
(
this
.
form
)
if
(
res
.
code
==
0
){
this
.
$message
({
message
:
"
创建成功
"
,
type
:
"
success
"
})
}
methods
:{
save
(){
console
.
log
(
this
.
$refs
[
'
wfd
'
].
graph
.
save
())
}
}
}
</
script
>
<
style
>
</
style
>
</
script
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录