Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
gin-vue-admin
提交
04eba253
G
gin-vue-admin
项目概览
飞鱼0526
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
2
Star
0
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
04eba253
编写于
12月 27, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复了在当前表格当前页删除为空的情况下页面被锁死的bug
上级
466d7814
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
351 addition
and
303 deletion
+351
-303
server/resource/template/server/service.go.tpl
server/resource/template/server/service.go.tpl
+1
-1
server/resource/template/web/table.vue.tpl
server/resource/template/web/table.vue.tpl
+6
-0
server/service/exa_customer.go
server/service/exa_customer.go
+1
-1
server/service/exa_file_upload_download.go
server/service/exa_file_upload_download.go
+2
-2
server/service/sys_api.go
server/service/sys_api.go
+1
-1
server/service/sys_dictionary.go
server/service/sys_dictionary.go
+1
-1
server/service/sys_dictionary_detail.go
server/service/sys_dictionary_detail.go
+1
-1
server/service/sys_operation_record.go
server/service/sys_operation_record.go
+1
-1
server/service/sys_workflow.go
server/service/sys_workflow.go
+5
-5
web/src/view/example/customer/customer.vue
web/src/view/example/customer/customer.vue
+5
-2
web/src/view/example/upload/upload.vue
web/src/view/example/upload/upload.vue
+22
-34
web/src/view/superAdmin/api/api.vue
web/src/view/superAdmin/api/api.vue
+105
-97
web/src/view/superAdmin/authority/authority.vue
web/src/view/superAdmin/authority/authority.vue
+8
-5
web/src/view/superAdmin/dictionary/sysDictionary.vue
web/src/view/superAdmin/dictionary/sysDictionary.vue
+112
-99
web/src/view/superAdmin/dictionary/sysDictionaryDetail.vue
web/src/view/superAdmin/dictionary/sysDictionaryDetail.vue
+11
-9
web/src/view/superAdmin/menu/menu.vue
web/src/view/superAdmin/menu/menu.vue
+5
-2
web/src/view/superAdmin/operation/sysOperationRecord.vue
web/src/view/superAdmin/operation/sysOperationRecord.vue
+44
-38
web/src/view/workflow/workflowProcess/workflowProcess.vue
web/src/view/workflow/workflowProcess/workflowProcess.vue
+20
-4
未找到文件。
server/resource/template/server/service.go.tpl
浏览文件 @
04eba253
...
...
@@ -24,7 +24,7 @@ func Create{{.StructName}}({{.Abbreviation}} model.{{.StructName}}) (err error)
//@return: err error
func Delete{{.StructName}}({{.Abbreviation}} model.{{.StructName}}) (err error) {
err = global.GVA_DB.Delete({{.Abbreviation}}).Error
err = global.GVA_DB.Delete(
&
{{.Abbreviation}}).Error
return err
}
...
...
server/resource/template/web/table.vue.tpl
浏览文件 @
04eba253
...
...
@@ -227,6 +227,9 @@ export default {
type
:
'
success
'
,
message
:
'
删除成功
'
})
if
(
this
.
tableData
.
length
==
ids
.
length
)
{
this
.
page
--
;
}
this
.
deleteVisible
=
false
this
.
getTableData
()
}
...
...
@@ -269,6 +272,9 @@ export default {
type
:
"
success
"
,
message
:
"
删除成功
"
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
},
...
...
server/service/exa_customer.go
浏览文件 @
04eba253
...
...
@@ -24,7 +24,7 @@ func CreateExaCustomer(e model.ExaCustomer) (err error) {
//@return: err error
func
DeleteExaCustomer
(
e
model
.
ExaCustomer
)
(
err
error
)
{
err
=
global
.
GVA_DB
.
Delete
(
e
)
.
Error
err
=
global
.
GVA_DB
.
Delete
(
&
e
)
.
Error
return
err
}
...
...
server/service/exa_file_upload_download.go
浏览文件 @
04eba253
...
...
@@ -42,10 +42,10 @@ func DeleteFile(file model.ExaFileUploadAndDownload) (err error) {
var
fileFromDb
model
.
ExaFileUploadAndDownload
err
,
fileFromDb
=
FindFile
(
file
.
ID
)
oss
:=
upload
.
NewOss
()
if
err
=
oss
.
DeleteFile
(
fileFromDb
.
Key
);
err
!=
nil
{
if
err
=
oss
.
DeleteFile
(
fileFromDb
.
Key
);
err
!=
nil
{
return
errors
.
New
(
"文件删除失败"
)
}
err
=
global
.
GVA_DB
.
Where
(
"id = ?"
,
file
.
ID
)
.
Unscoped
()
.
Delete
(
file
)
.
Error
err
=
global
.
GVA_DB
.
Where
(
"id = ?"
,
file
.
ID
)
.
Unscoped
()
.
Delete
(
&
file
)
.
Error
return
err
}
...
...
server/service/sys_api.go
浏览文件 @
04eba253
...
...
@@ -28,7 +28,7 @@ func CreateApi(api model.SysApi) (err error) {
//@return: err error
func
DeleteApi
(
api
model
.
SysApi
)
(
err
error
)
{
err
=
global
.
GVA_DB
.
Delete
(
api
)
.
Error
err
=
global
.
GVA_DB
.
Delete
(
&
api
)
.
Error
ClearCasbin
(
1
,
api
.
Path
,
api
.
Method
)
return
err
}
...
...
server/service/sys_dictionary.go
浏览文件 @
04eba253
...
...
@@ -29,7 +29,7 @@ func CreateSysDictionary(sysDictionary model.SysDictionary) (err error) {
//@return: err error
func
DeleteSysDictionary
(
sysDictionary
model
.
SysDictionary
)
(
err
error
)
{
err
=
global
.
GVA_DB
.
Delete
(
sysDictionary
)
.
Delete
(
&
sysDictionary
.
SysDictionaryDetails
)
.
Error
err
=
global
.
GVA_DB
.
Delete
(
&
sysDictionary
)
.
Delete
(
&
sysDictionary
.
SysDictionaryDetails
)
.
Error
return
err
}
...
...
server/service/sys_dictionary_detail.go
浏览文件 @
04eba253
...
...
@@ -24,7 +24,7 @@ func CreateSysDictionaryDetail(sysDictionaryDetail model.SysDictionaryDetail) (e
//@return: err error
func
DeleteSysDictionaryDetail
(
sysDictionaryDetail
model
.
SysDictionaryDetail
)
(
err
error
)
{
err
=
global
.
GVA_DB
.
Delete
(
sysDictionaryDetail
)
.
Error
err
=
global
.
GVA_DB
.
Delete
(
&
sysDictionaryDetail
)
.
Error
return
err
}
...
...
server/service/sys_operation_record.go
浏览文件 @
04eba253
...
...
@@ -36,7 +36,7 @@ func DeleteSysOperationRecordByIds(ids request.IdsReq) (err error) {
//@return: err error
func
DeleteSysOperationRecord
(
sysOperationRecord
model
.
SysOperationRecord
)
(
err
error
)
{
err
=
global
.
GVA_DB
.
Delete
(
sysOperationRecord
)
.
Error
err
=
global
.
GVA_DB
.
Delete
(
&
sysOperationRecord
)
.
Error
return
err
}
...
...
server/service/sys_workflow.go
浏览文件 @
04eba253
...
...
@@ -36,12 +36,12 @@ func CreateWorkflowProcess(workflowProcess model.WorkflowProcess) (err error) {
func
DeleteWorkflowProcess
(
workflowProcess
model
.
WorkflowProcess
)
(
err
error
)
{
err
=
global
.
GVA_DB
.
Transaction
(
func
(
tx
*
gorm
.
DB
)
error
{
var
txErr
error
txErr
=
tx
.
Delete
(
workflowProcess
)
.
Error
txErr
=
tx
.
Delete
(
&
workflowProcess
)
.
Error
if
txErr
!=
nil
{
return
txErr
}
var
edges
[]
model
.
WorkflowEdge
txErr
=
tx
.
Delete
(
model
.
WorkflowNode
{},
"workflow_process_id = ?"
,
workflowProcess
.
ID
)
.
Error
txErr
=
tx
.
Delete
(
&
model
.
WorkflowNode
{},
"workflow_process_id = ?"
,
workflowProcess
.
ID
)
.
Error
if
txErr
!=
nil
{
return
txErr
}
...
...
@@ -86,7 +86,7 @@ func UpdateWorkflowProcess(workflowProcess *model.WorkflowProcess) (err error) {
if
txErr
!=
nil
{
return
txErr
}
txErr
=
tx
.
Unscoped
()
.
Delete
(
model
.
WorkflowNode
{},
"workflow_process_id = ?"
,
workflowProcess
.
ID
)
.
Error
txErr
=
tx
.
Unscoped
()
.
Delete
(
&
model
.
WorkflowNode
{},
"workflow_process_id = ?"
,
workflowProcess
.
ID
)
.
Error
if
txErr
!=
nil
{
return
txErr
}
...
...
@@ -101,11 +101,11 @@ func UpdateWorkflowProcess(workflowProcess *model.WorkflowProcess) (err error) {
for
_
,
v
:=
range
edges
{
edgesIds
=
append
(
edgesIds
,
v
.
ID
)
}
txErr
=
tx
.
Unscoped
()
.
Delete
(
model
.
WorkflowStartPoint
{},
"workflow_edge_id in ?"
,
edgesIds
)
.
Error
txErr
=
tx
.
Unscoped
()
.
Delete
(
&
model
.
WorkflowStartPoint
{},
"workflow_edge_id in ?"
,
edgesIds
)
.
Error
if
txErr
!=
nil
{
return
txErr
}
txErr
=
tx
.
Unscoped
()
.
Delete
(
model
.
WorkflowEndPoint
{},
"workflow_edge_id in ?"
,
edgesIds
)
.
Error
txErr
=
tx
.
Unscoped
()
.
Delete
(
&
model
.
WorkflowEndPoint
{},
"workflow_edge_id in ?"
,
edgesIds
)
.
Error
if
txErr
!=
nil
{
return
txErr
}
...
...
web/src/view/example/customer/customer.vue
浏览文件 @
04eba253
...
...
@@ -62,7 +62,7 @@
<el-button
@
click=
"enterDialog"
type=
"primary"
>
确 定
</el-button>
</div>
</el-dialog>
<div
class=
"tips"
>
在资源权限中将此角色的资源权限清空 或者不包含创建者的角色 即可屏蔽此客户资源的显示
</div>
<div
class=
"tips"
>
在资源权限中将此角色的资源权限清空 或者不包含创建者的角色 即可屏蔽此客户资源的显示
</div>
</div>
</template>
...
...
@@ -124,8 +124,11 @@ export default {
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
"
success
"
,
message
:
"
删除成功
"
message
:
""
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
},
...
...
web/src/view/example/upload/upload.vue
浏览文件 @
04eba253
...
...
@@ -12,9 +12,7 @@
:show-file-list="false"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传jpg/png文件,且不超过500kb
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传jpg/png文件,且不超过500kb
</div>
</el-upload>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -35,33 +33,20 @@
<div>
{{
scope
.
row
.
UpdatedAt
|
formatDate
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"文件名"
prop=
"name"
width=
"180"
></el-table-column>
<el-table-column
label=
"链接"
prop=
"url"
min-width=
"300"
></el-table-column>
<el-table-column
label=
"文件名"
prop=
"name"
width=
"180"
></el-table-column>
<el-table-column
label=
"链接"
prop=
"url"
min-width=
"300"
></el-table-column>
<el-table-column
label=
"标签"
prop=
"tag"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.tag === 'jpg' ? 'primary' : 'success'"
disable-transitions
>
{{
scope
.
row
.
tag
}}
</el-tag
>
>
{{
scope
.
row
.
tag
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"160"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"downloadFile(scope.row)"
size=
"small"
type=
"text"
>
下载
</el-button
>
<el-button
@
click=
"deleteFile(scope.row)"
size=
"small"
type=
"text"
>
删除
</el-button
>
<el-button
@
click=
"downloadFile(scope.row)"
size=
"small"
type=
"text"
>
下载
</el-button>
<el-button
@
click=
"deleteFile(scope.row)"
size=
"small"
type=
"text"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -93,7 +78,7 @@ export default {
mixins
:
[
infoList
],
components
:
{
CustomPic
,
UploadImage
,
UploadImage
},
data
()
{
return
{
...
...
@@ -101,43 +86,46 @@ export default {
listApi
:
getFileList
,
path
:
path
,
tableData
:
[],
imageUrl
:
""
,
imageUrl
:
""
};
},
computed
:
{
...
mapGetters
(
"
user
"
,
[
"
userInfo
"
,
"
token
"
])
,
...
mapGetters
(
"
user
"
,
[
"
userInfo
"
,
"
token
"
])
},
filters
:
{
formatDate
:
function
(
time
)
{
formatDate
:
function
(
time
)
{
if
(
time
!=
null
&&
time
!=
""
)
{
var
date
=
new
Date
(
time
);
return
formatTimeToStr
(
date
,
"
yyyy-MM-dd hh:mm:ss
"
);
}
else
{
return
""
;
}
}
,
}
},
methods
:
{
async
deleteFile
(
row
)
{
this
.
$confirm
(
"
此操作将永久文件, 是否继续?
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
type
:
"
warning
"
})
.
then
(
async
()
=>
{
const
res
=
await
deleteFile
(
row
);
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
"
success
"
,
message
:
"
删除成功!
"
,
message
:
"
删除成功!
"
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
已取消删除
"
,
message
:
"
已取消删除
"
});
});
},
...
...
@@ -161,7 +149,7 @@ export default {
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
"
success
"
,
message
:
"
上传成功
"
,
message
:
"
上传成功
"
});
if
(
res
.
code
==
0
)
{
this
.
getTableData
();
...
...
@@ -169,23 +157,23 @@ export default {
}
else
{
this
.
$message
({
type
:
"
warning
"
,
message
:
res
.
msg
,
message
:
res
.
msg
});
}
},
uploadError
()
{
this
.
$message
({
type
:
"
error
"
,
message
:
"
上传失败
"
,
message
:
"
上传失败
"
});
this
.
fullscreenLoading
=
false
;
},
downloadFile
(
row
)
{
downloadImage
(
row
.
url
,
row
.
name
);
}
,
}
},
created
()
{
this
.
getTableData
();
}
,
}
};
</
script
>
web/src/view/superAdmin/api/api.vue
浏览文件 @
04eba253
...
...
@@ -52,7 +52,12 @@
<el-table-column
fixed=
"right"
label=
"操作"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"editApi(scope.row)"
size=
"small"
type=
"primary"
icon=
"el-icon-edit"
>
编辑
</el-button>
<el-button
@
click=
"deleteApi(scope.row)"
size=
"small"
type=
"danger"
icon=
"el-icon-delete"
>
删除
</el-button>
<el-button
@
click=
"deleteApi(scope.row)"
size=
"small"
type=
"danger"
icon=
"el-icon-delete"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -108,194 +113,197 @@ import {
createApi
,
updateApi
,
deleteApi
}
from
'
@/api/api
'
import
infoList
from
'
@/mixins/infoList
'
import
{
toSQLLine
}
from
'
@/utils/stringFun
'
}
from
"
@/api/api
"
;
import
infoList
from
"
@/mixins/infoList
"
;
import
{
toSQLLine
}
from
"
@/utils/stringFun
"
;
const
methodOptions
=
[
{
value
:
'
POST
'
,
label
:
'
创建
'
,
type
:
'
success
'
value
:
"
POST
"
,
label
:
"
创建
"
,
type
:
"
success
"
},
{
value
:
'
GET
'
,
label
:
'
查看
'
,
type
:
''
value
:
"
GET
"
,
label
:
"
查看
"
,
type
:
""
},
{
value
:
'
PUT
'
,
label
:
'
更新
'
,
type
:
'
warning
'
value
:
"
PUT
"
,
label
:
"
更新
"
,
type
:
"
warning
"
},
{
value
:
'
DELETE
'
,
label
:
'
删除
'
,
type
:
'
danger
'
value
:
"
DELETE
"
,
label
:
"
删除
"
,
type
:
"
danger
"
}
]
]
;
export
default
{
name
:
'
Api
'
,
name
:
"
Api
"
,
mixins
:
[
infoList
],
data
()
{
return
{
listApi
:
getApiList
,
dialogFormVisible
:
false
,
dialogTitle
:
'
新增Api
'
,
dialogTitle
:
"
新增Api
"
,
form
:
{
path
:
''
,
apiGroup
:
''
,
method
:
''
,
description
:
''
path
:
""
,
apiGroup
:
""
,
method
:
""
,
description
:
""
},
methodOptions
:
methodOptions
,
type
:
''
,
type
:
""
,
rules
:
{
path
:
[{
required
:
true
,
message
:
'
请输入api路径
'
,
trigger
:
'
blur
'
}],
path
:
[{
required
:
true
,
message
:
"
请输入api路径
"
,
trigger
:
"
blur
"
}],
apiGroup
:
[
{
required
:
true
,
message
:
'
请输入组名称
'
,
trigger
:
'
blur
'
}
{
required
:
true
,
message
:
"
请输入组名称
"
,
trigger
:
"
blur
"
}
],
method
:
[
{
required
:
true
,
message
:
'
请选择请求方式
'
,
trigger
:
'
blur
'
}
{
required
:
true
,
message
:
"
请选择请求方式
"
,
trigger
:
"
blur
"
}
],
description
:
[
{
required
:
true
,
message
:
'
请输入api介绍
'
,
trigger
:
'
blur
'
}
{
required
:
true
,
message
:
"
请输入api介绍
"
,
trigger
:
"
blur
"
}
]
}
}
}
;
},
methods
:
{
// 排序
sortChange
({
prop
,
order
})
{
if
(
prop
)
{
this
.
searchInfo
.
orderKey
=
toSQLLine
(
prop
)
this
.
searchInfo
.
desc
=
order
==
'
descending
'
this
.
searchInfo
.
orderKey
=
toSQLLine
(
prop
)
;
this
.
searchInfo
.
desc
=
order
==
"
descending
"
;
}
this
.
getTableData
()
this
.
getTableData
()
;
},
//条件搜索前端看此方法
onSubmit
()
{
this
.
page
=
1
this
.
pageSize
=
10
this
.
getTableData
()
this
.
page
=
1
;
this
.
pageSize
=
10
;
this
.
getTableData
()
;
},
initForm
()
{
this
.
$refs
.
apiForm
.
resetFields
()
this
.
form
=
{
path
:
''
,
apiGroup
:
''
,
method
:
''
,
description
:
''
}
this
.
$refs
.
apiForm
.
resetFields
()
;
this
.
form
=
{
path
:
""
,
apiGroup
:
""
,
method
:
""
,
description
:
""
}
;
},
closeDialog
()
{
this
.
initForm
()
this
.
dialogFormVisible
=
false
this
.
initForm
()
;
this
.
dialogFormVisible
=
false
;
},
openDialog
(
type
)
{
switch
(
type
)
{
case
'
addApi
'
:
this
.
dialogTitlethis
=
'
新增Api
'
break
case
'
edit
'
:
this
.
dialogTitlethis
=
'
编辑Api
'
break
case
"
addApi
"
:
this
.
dialogTitlethis
=
"
新增Api
"
;
break
;
case
"
edit
"
:
this
.
dialogTitlethis
=
"
编辑Api
"
;
break
;
default
:
break
break
;
}
this
.
type
=
type
this
.
dialogFormVisible
=
true
this
.
type
=
type
;
this
.
dialogFormVisible
=
true
;
},
async
editApi
(
row
)
{
const
res
=
await
getApiById
({
id
:
row
.
ID
})
this
.
form
=
res
.
data
.
api
this
.
openDialog
(
'
edit
'
)
const
res
=
await
getApiById
({
id
:
row
.
ID
})
;
this
.
form
=
res
.
data
.
api
;
this
.
openDialog
(
"
edit
"
);
},
async
deleteApi
(
row
)
{
this
.
$confirm
(
'
此操作将永久删除所有角色下该菜单, 是否继续?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
this
.
$confirm
(
"
此操作将永久删除所有角色下该api, 是否继续?
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
})
.
then
(
async
()
=>
{
const
res
=
await
deleteApi
(
row
)
const
res
=
await
deleteApi
(
row
)
;
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
删除成功!
'
})
this
.
getTableData
()
type
:
"
success
"
,
message
:
"
删除成功!
"
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'
info
'
,
message
:
'
已取消删除
'
})
})
type
:
"
info
"
,
message
:
"
已取消删除
"
})
;
})
;
},
async
enterDialog
()
{
this
.
$refs
.
apiForm
.
validate
(
async
valid
=>
{
if
(
valid
)
{
switch
(
this
.
type
)
{
case
'
addApi
'
:
case
"
addApi
"
:
{
const
res
=
await
createApi
(
this
.
form
)
const
res
=
await
createApi
(
this
.
form
)
;
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
添加成功
'
,
type
:
"
success
"
,
message
:
"
添加成功
"
,
showClose
:
true
})
})
;
}
this
.
getTableData
()
this
.
closeDialog
()
this
.
getTableData
()
;
this
.
closeDialog
()
;
}
break
case
'
edit
'
:
break
;
case
"
edit
"
:
{
const
res
=
await
updateApi
(
this
.
form
)
const
res
=
await
updateApi
(
this
.
form
)
;
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
编辑成功
'
,
type
:
"
success
"
,
message
:
"
编辑成功
"
,
showClose
:
true
})
})
;
}
this
.
getTableData
()
this
.
closeDialog
()
this
.
getTableData
()
;
this
.
closeDialog
()
;
}
break
break
;
default
:
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
未知操作
'
,
type
:
"
error
"
,
message
:
"
未知操作
"
,
showClose
:
true
})
})
;
}
break
break
;
}
}
})
})
;
}
},
filters
:
{
methodFiletr
(
value
)
{
const
target
=
methodOptions
.
filter
(
item
=>
item
.
value
===
value
)[
0
]
const
target
=
methodOptions
.
filter
(
item
=>
item
.
value
===
value
)[
0
]
;
// return target && `${target.label}(${target.value})`
return
target
&&
`
${
target
.
label
}
`
return
target
&&
`
${
target
.
label
}
`
;
},
tagTypeFiletr
(
value
)
{
const
target
=
methodOptions
.
filter
(
item
=>
item
.
value
===
value
)[
0
]
return
target
&&
`
${
target
.
type
}
`
const
target
=
methodOptions
.
filter
(
item
=>
item
.
value
===
value
)[
0
]
;
return
target
&&
`
${
target
.
type
}
`
;
}
},
created
(){
this
.
getTableData
()
created
()
{
this
.
getTableData
()
;
}
}
}
;
</
script
>
<
style
scoped
lang=
"scss"
>
.button-box
{
...
...
web/src/view/superAdmin/authority/authority.vue
浏览文件 @
04eba253
...
...
@@ -106,10 +106,10 @@ export default {
mixins
:
[
infoList
],
data
()
{
var
mustUint
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
(
/^
[
0-9
]
*
[
1-9
][
0-9
]
*$/
).
test
(
value
))
{
return
callback
(
new
Error
(
"
请输入正整数
"
));
}
return
callback
()
if
(
!
/^
[
0-9
]
*
[
1-9
][
0-9
]
*$/
.
test
(
value
))
{
return
callback
(
new
Error
(
"
请输入正整数
"
));
}
return
callback
();
};
return
{
...
...
@@ -136,7 +136,7 @@ export default {
rules
:
{
authorityId
:
[
{
required
:
true
,
message
:
"
请输入角色ID
"
,
trigger
:
"
blur
"
},
{
validator
:
mustUint
,
trigger
:
'
blur
'
}
{
validator
:
mustUint
,
trigger
:
"
blur
"
}
],
authorityName
:
[
{
required
:
true
,
message
:
"
请输入角色名
"
,
trigger
:
"
blur
"
}
...
...
@@ -191,6 +191,9 @@ export default {
type
:
"
success
"
,
message
:
"
删除成功!
"
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
})
...
...
web/src/view/superAdmin/dictionary/sysDictionary.vue
浏览文件 @
04eba253
...
...
@@ -4,27 +4,19 @@
<el-form
:inline=
"true"
:model=
"searchInfo"
class=
"demo-form-inline"
>
<el-form-item
label=
"字典名(中)"
>
<el-input
placeholder=
"搜索条件"
v-model=
"searchInfo.name"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"字典名(英)"
>
<el-input
placeholder=
"搜索条件"
v-model=
"searchInfo.type"
></el-input>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"searchInfo.status"
clear
placeholder=
"请选择"
>
<el-option
key=
"true"
label=
"是"
value=
"true"
>
</el-option>
<el-option
key=
"false"
label=
"否"
value=
"false"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"searchInfo.status"
clear
placeholder=
"请选择"
>
<el-option
key=
"true"
label=
"是"
value=
"true"
></el-option>
<el-option
key=
"false"
label=
"否"
value=
"false"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"描述"
>
<el-input
placeholder=
"搜索条件"
v-model=
"searchInfo.desc"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-button
@
click=
"onSubmit"
type=
"primary"
>
查询
</el-button>
</el-form-item>
...
...
@@ -41,21 +33,21 @@
style=
"width: 100%"
tooltip-effect=
"dark"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
label=
"日期"
width=
"180"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
CreatedAt
|
formatDate
}}
</
template
>
</el-table-column>
<el-table-column
label=
"字典名(中)"
prop=
"name"
width=
"120"
></el-table-column>
<el-table-column
label=
"字典名(英)"
prop=
"type"
width=
"120"
></el-table-column>
<el-table-column
label=
"状态"
prop=
"status"
width=
"120"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
|
formatBoolean
}}
</
template
>
</el-table-column>
<el-table-column
label=
"描述"
prop=
"desc"
width=
"280"
></el-table-column>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
label=
"日期"
width=
"180"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
CreatedAt
|
formatDate
}}
</
template
>
</el-table-column>
<el-table-column
label=
"字典名(中)"
prop=
"name"
width=
"120"
></el-table-column>
<el-table-column
label=
"字典名(英)"
prop=
"type"
width=
"120"
></el-table-column>
<el-table-column
label=
"状态"
prop=
"status"
width=
"120"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
|
formatBoolean
}}
</
template
>
</el-table-column>
<el-table-column
label=
"描述"
prop=
"desc"
width=
"280"
></el-table-column>
<el-table-column
label=
"按钮组"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"toDetile(scope.row)"
size=
"small"
type=
"success"
>
详情
</el-button>
...
...
@@ -85,20 +77,30 @@
<el-dialog
:before-close=
"closeDialog"
:visible.sync=
"dialogFormVisible"
title=
"弹窗操作"
>
<el-form
ref=
"elForm"
:model=
"formData"
:rules=
"rules"
size=
"medium"
label-width=
"110px"
>
<el-form-item
label=
"字典名(中)"
prop=
"name"
>
<el-input
v-model=
"formData.name"
placeholder=
"请输入字典名(中)"
clearable
:style=
"{width: '100%'}"
></el-input>
</el-form-item>
<el-form-item
label=
"字典名(英)"
prop=
"type"
>
<el-input
v-model=
"formData.type"
placeholder=
"请输入字典名(英)"
clearable
:style=
"{width: '100%'}"
></el-input>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
required
>
<el-switch
v-model=
"formData.status"
active-text=
"开启"
inactive-text=
"停用"
></el-switch>
</el-form-item>
<el-form-item
label=
"描述"
prop=
"desc"
>
<el-input
v-model=
"formData.desc"
placeholder=
"请输入描述"
clearable
:style=
"{width: '100%'}"
></el-input>
</el-form-item>
</el-form>
<el-form-item
label=
"字典名(中)"
prop=
"name"
>
<el-input
v-model=
"formData.name"
placeholder=
"请输入字典名(中)"
clearable
:style=
"{width: '100%'}"
></el-input>
</el-form-item>
<el-form-item
label=
"字典名(英)"
prop=
"type"
>
<el-input
v-model=
"formData.type"
placeholder=
"请输入字典名(英)"
clearable
:style=
"{width: '100%'}"
></el-input>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
required
>
<el-switch
v-model=
"formData.status"
active-text=
"开启"
inactive-text=
"停用"
></el-switch>
</el-form-item>
<el-form-item
label=
"描述"
prop=
"desc"
>
<el-input
v-model=
"formData.desc"
placeholder=
"请输入描述"
clearable
:style=
"{width: '100%'}"
></el-input>
</el-form-item>
</el-form>
<div
class=
"dialog-footer"
slot=
"footer"
>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
@
click=
"enterDialog"
type=
"primary"
>
确 定
</el-button>
...
...
@@ -111,12 +113,12 @@
<
script
>
import
{
createSysDictionary
,
deleteSysDictionary
,
updateSysDictionary
,
findSysDictionary
,
getSysDictionaryList
}
from
"
@/api/sysDictionary
"
;
// 此处请自行替换地址
createSysDictionary
,
deleteSysDictionary
,
updateSysDictionary
,
findSysDictionary
,
getSysDictionaryList
}
from
"
@/api/sysDictionary
"
;
// 此处请自行替换地址
import
{
formatTimeToStr
}
from
"
@/utils/date
"
;
import
infoList
from
"
@/mixins/infoList
"
;
export
default
{
...
...
@@ -129,25 +131,34 @@ export default {
visible
:
false
,
type
:
""
,
formData
:
{
name
:
null
,
type
:
null
,
status
:
true
,
desc
:
null
name
:
null
,
type
:
null
,
status
:
true
,
desc
:
null
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'
请输入字典名(中)
'
,
trigger
:
'
blur
'
}],
type
:
[{
required
:
true
,
message
:
'
请输入字典名(英)
'
,
trigger
:
'
blur
'
}],
desc
:
[{
required
:
true
,
message
:
'
请输入描述
'
,
trigger
:
'
blur
'
}],
},
name
:
[
{
required
:
true
,
message
:
"
请输入字典名(中)
"
,
trigger
:
"
blur
"
}
],
type
:
[
{
required
:
true
,
message
:
"
请输入字典名(英)
"
,
trigger
:
"
blur
"
}
],
desc
:
[
{
required
:
true
,
message
:
"
请输入描述
"
,
trigger
:
"
blur
"
}
]
}
};
},
filters
:
{
...
...
@@ -161,30 +172,30 @@ export default {
},
formatBoolean
:
function
(
bool
)
{
if
(
bool
!=
null
)
{
return
bool
?
"
是
"
:
"
否
"
;
return
bool
?
"
是
"
:
"
否
"
;
}
else
{
return
""
;
}
}
},
methods
:
{
toDetile
(
row
)
{
this
.
$router
.
push
({
name
:
"
dictionaryDetail
"
,
params
:
{
id
:
row
.
ID
}
})
},
//条件搜索前端看此方法
onSubmit
()
{
this
.
page
=
1
this
.
pageSize
=
10
if
(
this
.
searchInfo
.
status
==
""
)
{
this
.
searchInfo
.
status
=
null
}
this
.
getTableData
()
},
toDetile
(
row
)
{
this
.
$router
.
push
({
name
:
"
dictionaryDetail
"
,
params
:
{
id
:
row
.
ID
}
});
},
//条件搜索前端看此方法
onSubmit
()
{
this
.
page
=
1
;
this
.
pageSize
=
10
;
if
(
this
.
searchInfo
.
status
==
""
)
{
this
.
searchInfo
.
status
=
null
;
}
this
.
getTableData
();
},
async
updateSysDictionary
(
row
)
{
const
res
=
await
findSysDictionary
({
ID
:
row
.
ID
});
this
.
type
=
"
update
"
;
...
...
@@ -196,10 +207,10 @@ export default {
closeDialog
()
{
this
.
dialogFormVisible
=
false
;
this
.
formData
=
{
name
:
null
,
type
:
null
,
status
:
true
,
desc
:
null
,
name
:
null
,
type
:
null
,
status
:
true
,
desc
:
null
};
},
async
deleteSysDictionary
(
row
)
{
...
...
@@ -210,12 +221,15 @@ export default {
type
:
"
success
"
,
message
:
"
删除成功
"
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
},
async
enterDialog
()
{
this
.
$refs
[
'
elForm
'
].
validate
(
async
valid
=>
{
if
(
!
valid
)
return
this
.
$refs
[
"
elForm
"
].
validate
(
async
valid
=>
{
if
(
!
valid
)
return
;
let
res
;
switch
(
this
.
type
)
{
case
"
create
"
:
...
...
@@ -228,12 +242,11 @@ export default {
res
=
await
createSysDictionary
(
this
.
formData
);
break
;
}
if
(
res
.
code
==
0
)
{
this
.
closeDialog
();
this
.
getTableData
();
}
})
if
(
res
.
code
==
0
)
{
this
.
closeDialog
();
this
.
getTableData
();
}
});
},
openDialog
()
{
this
.
type
=
"
create
"
;
...
...
web/src/view/superAdmin/dictionary/sysDictionaryDetail.vue
浏览文件 @
04eba253
...
...
@@ -210,13 +210,16 @@ export default {
type
:
"
success
"
,
message
:
"
删除成功
"
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
},
async
enterDialog
()
{
this
.
formData
.
sysDictionaryID
=
Number
(
this
.
$route
.
params
.
id
)
this
.
$refs
[
'
elForm
'
].
validate
(
async
valid
=>
{
if
(
!
valid
)
return
this
.
formData
.
sysDictionaryID
=
Number
(
this
.
$route
.
params
.
id
);
this
.
$refs
[
"
elForm
"
].
validate
(
async
valid
=>
{
if
(
!
valid
)
return
;
let
res
;
switch
(
this
.
type
)
{
case
"
create
"
:
...
...
@@ -231,14 +234,13 @@ export default {
}
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
"
success
"
,
message
:
"
创建/更改成功
"
})
type
:
"
success
"
,
message
:
"
创建/更改成功
"
})
;
this
.
closeDialog
();
this
.
getTableData
();
}
})
});
},
openDialog
()
{
this
.
type
=
"
create
"
;
...
...
@@ -246,7 +248,7 @@ export default {
}
},
created
()
{
this
.
searchInfo
.
sysDictionaryID
=
this
.
$route
.
params
.
id
this
.
searchInfo
.
sysDictionaryID
=
this
.
$route
.
params
.
id
;
this
.
getTableData
();
}
};
...
...
web/src/view/superAdmin/menu/menu.vue
浏览文件 @
04eba253
...
...
@@ -231,8 +231,8 @@ export default {
},
methods
:
{
addParameter
(
form
)
{
if
(
!
form
.
parameters
){
this
.
$set
(
form
,
"
parameters
"
,[])
if
(
!
form
.
parameters
)
{
this
.
$set
(
form
,
"
parameters
"
,
[]);
}
form
.
parameters
.
push
({
type
:
"
query
"
,
...
...
@@ -316,6 +316,9 @@ export default {
type
:
"
success
"
,
message
:
"
删除成功!
"
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
})
...
...
web/src/view/superAdmin/operation/sysOperationRecord.vue
浏览文件 @
04eba253
...
...
@@ -112,19 +112,19 @@ import {
deleteSysOperationRecord
,
getSysOperationRecordList
,
deleteSysOperationRecordByIds
}
from
'
@/api/sysOperationRecord
'
// 此处请自行替换地址
import
{
formatTimeToStr
}
from
'
@/utils/date
'
import
infoList
from
'
@/mixins/infoList
'
}
from
"
@/api/sysOperationRecord
"
;
// 此处请自行替换地址
import
{
formatTimeToStr
}
from
"
@/utils/date
"
;
import
infoList
from
"
@/mixins/infoList
"
;
export
default
{
name
:
'
SysOperationRecord
'
,
name
:
"
SysOperationRecord
"
,
mixins
:
[
infoList
],
data
()
{
return
{
listApi
:
getSysOperationRecordList
,
dialogFormVisible
:
false
,
visible
:
false
,
type
:
''
,
type
:
""
,
deleteVisible
:
false
,
multipleSelection
:
[],
formData
:
{
...
...
@@ -137,74 +137,80 @@ export default {
error_message
:
null
,
user_id
:
null
}
}
}
;
},
filters
:
{
formatDate
:
function
(
time
)
{
if
(
time
!=
null
&&
time
!=
''
)
{
var
date
=
new
Date
(
time
)
return
formatTimeToStr
(
date
,
'
yyyy-MM-dd hh:mm:ss
'
)
if
(
time
!=
null
&&
time
!=
""
)
{
var
date
=
new
Date
(
time
)
;
return
formatTimeToStr
(
date
,
"
yyyy-MM-dd hh:mm:ss
"
);
}
else
{
return
''
return
""
;
}
},
formatBoolean
:
function
(
bool
)
{
if
(
bool
!=
null
)
{
return
bool
?
'
是
'
:
'
否
'
return
bool
?
"
是
"
:
"
否
"
;
}
else
{
return
''
return
""
;
}
}
},
methods
:
{
//条件搜索前端看此方法
onSubmit
()
{
this
.
page
=
1
this
.
pageSize
=
10
this
.
getTableData
()
this
.
page
=
1
;
this
.
pageSize
=
10
;
this
.
getTableData
()
;
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
this
.
multipleSelection
=
val
;
},
async
onDelete
()
{
const
ids
=
[]
const
ids
=
[]
;
this
.
multipleSelection
&&
this
.
multipleSelection
.
map
(
item
=>
{
ids
.
push
(
item
.
ID
)
})
const
res
=
await
deleteSysOperationRecordByIds
({
ids
})
ids
.
push
(
item
.
ID
)
;
})
;
const
res
=
await
deleteSysOperationRecordByIds
({
ids
})
;
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
删除成功
'
})
this
.
deleteVisible
=
false
this
.
getTableData
()
type
:
"
success
"
,
message
:
"
删除成功
"
});
if
(
this
.
tableData
.
length
==
ids
.
length
)
{
this
.
page
--
;
}
this
.
deleteVisible
=
false
;
this
.
getTableData
();
}
},
async
deleteSysOperationRecord
(
row
)
{
this
.
visible
=
false
const
res
=
await
deleteSysOperationRecord
({
ID
:
row
.
ID
})
this
.
visible
=
false
;
const
res
=
await
deleteSysOperationRecord
({
ID
:
row
.
ID
})
;
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
删除成功
'
})
this
.
getTableData
()
type
:
"
success
"
,
message
:
"
删除成功
"
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
},
fmtBody
(
value
){
try
{
return
JSON
.
parse
(
value
)
}
catch
(
err
)
{
return
value
fmtBody
(
value
)
{
try
{
return
JSON
.
parse
(
value
)
;
}
catch
(
err
)
{
return
value
;
}
}
},
created
()
{
this
.
getTableData
()
this
.
getTableData
()
;
}
}
}
;
</
script
>
<
style
lang=
"scss"
>
...
...
web/src/view/workflow/workflowProcess/workflowProcess.vue
浏览文件 @
04eba253
...
...
@@ -56,9 +56,19 @@
<el-table-column
label=
"按钮组"
>
<
template
slot-scope=
"scope"
>
<el-button
class=
"table-button"
@
click=
"useWorkflowProcess(scope.row)"
size=
"success"
>
启动
</el-button>
<el-button
class=
"table-button"
@
click=
"updateWorkflowProcess(scope.row)"
size=
"small"
type=
"primary"
>
变更
</el-button>
<el-button
class=
"table-button"
@
click=
"viewWorkflowProcess(scope.row)"
size=
"small"
type=
"warning"
>
查看
</el-button>
<el-button
class=
"table-button"
@
click=
"useWorkflowProcess(scope.row)"
size=
"success"
>
启动
</el-button>
<el-button
class=
"table-button"
@
click=
"updateWorkflowProcess(scope.row)"
size=
"small"
type=
"primary"
>
变更
</el-button>
<el-button
class=
"table-button"
@
click=
"viewWorkflowProcess(scope.row)"
size=
"small"
type=
"warning"
>
查看
</el-button>
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.visible"
>
<p>
确定要删除吗?
</p>
<div
style=
"text-align: right; margin: 0"
>
...
...
@@ -147,6 +157,9 @@ export default {
type
:
"
success
"
,
message
:
"
删除成功
"
});
if
(
this
.
tableData
.
length
==
ids
.
length
)
{
this
.
page
--
;
}
this
.
deleteVisible
=
false
;
this
.
getTableData
();
}
...
...
@@ -160,7 +173,7 @@ export default {
}
});
},
async
useWorkflowProcess
(
row
){
async
useWorkflowProcess
(
row
)
{
this
.
$router
.
push
({
name
:
"
workflowUse
"
,
query
:
{
...
...
@@ -185,6 +198,9 @@ export default {
type
:
"
success
"
,
message
:
"
删除成功
"
});
if
(
this
.
tableData
.
length
==
1
)
{
this
.
page
--
;
}
this
.
getTableData
();
}
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录