Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
roncoo
roncoo-education
提交
b38b1c02
R
roncoo-education
项目概览
roncoo
/
roncoo-education
大约 1 年 前同步成功
通知
146
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roncoo-education
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b38b1c02
编写于
7月 22, 2019
作者:
K
keyinghao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交
上级
9c990dd7
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
476 addition
and
228 deletion
+476
-228
roncoo-education-boss/src/views/index/system/navBar/index.vue
...oo-education-boss/src/views/index/system/navBar/index.vue
+1
-4
roncoo-education-boss/src/views/index/system/websiteLink/add.vue
...education-boss/src/views/index/system/websiteLink/add.vue
+111
-0
roncoo-education-boss/src/views/index/system/websiteLink/edit.vue
...ducation-boss/src/views/index/system/websiteLink/edit.vue
+50
-34
roncoo-education-boss/src/views/index/system/websiteLink/index.vue
...ucation-boss/src/views/index/system/websiteLink/index.vue
+123
-116
roncoo-education-boss/src/views/index/system/websiteNav/add.vue
...-education-boss/src/views/index/system/websiteNav/add.vue
+88
-0
roncoo-education-boss/src/views/index/system/websiteNav/edit.vue
...education-boss/src/views/index/system/websiteNav/edit.vue
+47
-32
roncoo-education-boss/src/views/index/system/websiteNav/index.vue
...ducation-boss/src/views/index/system/websiteNav/index.vue
+45
-40
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/biz/pc/PcApiWebsiteLinkBiz.java
.../education/system/service/biz/pc/PcApiWebsiteLinkBiz.java
+1
-1
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/biz/pc/PcApiWebsiteNavBiz.java
...o/education/system/service/biz/pc/PcApiWebsiteNavBiz.java
+10
-1
未找到文件。
roncoo-education-boss/src/views/index/system/navBar/index.vue
浏览文件 @
b38b1c02
...
...
@@ -149,11 +149,8 @@
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
this
.
map
=
{
id
:
id
}
this
.
ctrl
.
loading
=
true
apis
.
navBarDelete
(
this
.
map
).
then
(
res
=>
{
apis
.
navBarDelete
(
{
id
:
id
}
).
then
(
res
=>
{
this
.
ctrl
.
loading
=
false
if
(
res
.
code
===
200
&&
res
.
data
>
0
)
{
this
.
$message
({
...
...
roncoo-education-boss/src/views/index/system/websiteLink/add.vue
0 → 100644
浏览文件 @
b38b1c02
<
template
>
<!--弹窗-->
<el-dialog
width=
"35%"
:title=
"title"
:visible.sync=
"visible"
:before-close=
"handleClose"
>
<el-form
:model=
"formData"
:rules=
"rules"
ref=
"formData"
label-width=
"100px"
>
<el-form-item
label=
"链接地址:"
prop=
"linkUrl"
>
<el-input
v-model=
"formData.linkUrl"
placeholder=
"请输入链接地址"
></el-input>
</el-form-item>
<el-form-item
label=
"链接名称:"
prop=
"linkName"
>
<el-input
v-model=
"formData.linkName"
placeholder=
"请输入链接名称"
></el-input>
</el-form-item>
<el-form-item
label=
"打开方式:"
width=
"200"
>
<template>
<el-radio
v-model=
"formData.linkTarget"
label=
"_blank"
>
新窗口打开
</el-radio>
<el-radio
v-model=
"formData.linkTarget"
label=
"_self"
>
同窗口打开
</el-radio>
</
template
>
</el-form-item>
</el-form>
<el-row
style=
"margin-top:17px; "
>
<el-button
style=
"float:right"
size=
"mini"
type=
"primary"
@
click=
"submitForm('formData')"
>
确 定
</el-button>
<el-button
style=
"float:right;margin-left:6px;"
size=
"mini"
type=
"danger"
plain
@
click=
"handleClose"
>
取 消
</el-button>
</el-row>
</el-dialog>
</template>
<
script
>
import
*
as
api
from
'
@/api/system
'
export
default
{
name
:
'
Edit
'
,
data
()
{
return
{
ctrl
:
{
dialogVisible
:
true
},
formData
:
{
linkTarget
:
'
_blank
'
},
rules
:
{
linkUrl
:
[
{
required
:
true
,
message
:
'
请输入链接地址
'
,
trigger
:
'
blur
'
,
autocomplete
:
'
on
'
}
],
linkName
:
[
{
required
:
true
,
message
:
'
请输入链接名称
'
,
trigger
:
'
blur
'
}
]
}
}
},
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
},
title
:
{
type
:
String
,
default
:
''
}
},
methods
:
{
handleClose
(
done
)
{
this
.
formData
=
{}
this
.
$emit
(
'
close-callback
'
)
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
!
this
.
formData
.
linkUrl
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
请输入链接地址
'
});
return
false
}
if
(
!
this
.
formData
.
linkName
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
请输入链接名称
'
});
return
false
}
if
(
valid
)
{
this
.
loading
.
show
()
api
.
websiteLinkSave
(
this
.
formData
).
then
(
res
=>
{
this
.
loading
.
hide
()
if
(
res
.
code
===
200
&&
res
.
data
>
0
)
{
this
.
tips
(
'
操作成功
'
,
'
success
'
)
this
.
handleClose
()
}
else
{
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
}
}).
catch
(()
=>
{
this
.
loading
.
hide
()
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
})
}
else
{
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
}
})
}
}
}
</
script
>
roncoo-education-boss/src/views/index/system/websiteLink/edit.vue
浏览文件 @
b38b1c02
<
template
>
<!--弹窗-->
<el-dialog
width=
"35%"
:title=
"title"
:visible.sync=
"visible"
:before-close=
"handleClose"
>
<el-form
:model=
"formData"
:rules=
"rules"
ref=
"formData"
>
<el-form
:model=
"formData"
:rules=
"rules"
ref=
"formData"
label-width=
"100px"
>
<el-form-item
label=
"链接地址"
prop=
"linkUrl"
>
<el-input
v-model=
"formData.linkUrl"
></el-input>
</el-form-item>
...
...
@@ -18,19 +18,19 @@
<el-radio
v-model=
"formData.linkTarget"
label=
"_self"
>
同窗口打开
</el-radio>
</
template
>
</el-form-item>
<el-form-item
label=
"排序
"
prop=
"sort"
>
<el-input
v-model=
"formData.sort"
></el-input
>
<el-form-item
label=
"排序
:"
>
<el-input
-number
style=
"width: 300px;"
v-model=
"formData.sort"
@
change=
"handleChange"
:min=
"1"
:max=
"10000"
></el-input-number
>
</el-form-item>
</el-form>
<
div
slot=
"footer"
class=
"dialog-footer
"
>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm('formData')"
>
确 定
</el-button>
</
div
>
<
el-row
style=
"margin-top:17px;
"
>
<el-button
style=
"float:right"
size=
"mini"
type=
"primary"
@
click=
"submitForm('formData')"
>
确 定
</el-button>
<el-button
style=
"float:right;margin-left:6px;"
size=
"mini"
type=
"danger"
plain
@
click=
"handleClose"
>
取 消
</el-button>
</
el-row
>
</el-dialog>
</template>
<
script
>
import
*
as
api
s
from
'
@/api/system
'
import
*
as
api
from
'
@/api/system
'
export
default
{
name
:
'
Edit
'
,
data
()
{
...
...
@@ -68,40 +68,56 @@ import * as apis from '@/api/system'
}
},
methods
:
{
handleChange
(
value
)
{
this
.
formData
.
sort
=
value
},
handleClose
(
done
)
{
this
.
$emit
(
'
close-callback
'
)
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
!
this
.
formData
.
linkUrl
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
请输入链接地址
'
});
return
false
}
if
(
!
this
.
formData
.
linkName
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
请输入链接名称
'
});
return
false
}
if
(
valid
)
{
this
.
handleConfirm
()
this
.
loading
.
show
()
api
.
websiteLinkUpdate
(
this
.
formData
).
then
(
res
=>
{
this
.
loading
.
hide
()
if
(
res
.
code
===
200
&&
res
.
data
>
0
)
{
this
.
tips
(
'
操作成功
'
,
'
success
'
)
this
.
handleClose
()
}
else
{
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
}
}).
catch
(()
=>
{
this
.
loading
.
hide
()
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
})
}
else
{
console
.
log
(
'
error submit!!
'
);
return
false
;
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
}
});
},
async
handleConfirm
()
{
this
.
loading
.
show
()
let
res
=
{}
if
(
this
.
formData
.
id
===
undefined
)
{
res
=
await
apis
.
websiteLinkSave
(
this
.
formData
)
}
else
{
// 编辑
res
=
await
apis
.
websiteLinkUpdate
(
this
.
formData
)
}
this
.
loading
.
hide
()
if
(
res
.
code
===
200
)
{
// 提交成功, 关闭窗口, 刷新列表
this
.
$emit
(
'
close-callback
'
)
}
else
{
this
.
$alert
(
res
.
msg
||
'
提交失败
'
)
}
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
roncoo-education-boss/src/views/index/system/websiteLink/index.vue
浏览文件 @
b38b1c02
...
...
@@ -2,30 +2,23 @@
<div
class=
"pad20"
>
<div>
<el-form
:inline=
"true"
size=
"mini"
>
<el-form-item>
<el-button
class=
"filter-item"
type=
"success"
@
click=
"handleAddRow"
>
新增
</el-button>
</el-form-item>
<el-form-item
label=
"链接名称"
>
<el-input
v-model=
"map.linkName"
></el-input>
</el-form-item>
<el-form-item
label=
"状态"
>
<template>
<el-select
v-model=
"map.statusId"
placeholder=
"全部"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</
template
>
</el-form-item>
<el-form-item
label=
"状态:"
>
<el-select
v-model=
"map.statusId"
class=
"auto-width"
clearable
filterable
placeholder=
"状态"
style=
"width: 85px"
>
<el-option
v-for=
"item in opts.statusIdList"
:key=
"item.code"
:label=
"item.desc"
:value=
"item.code"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
:loading=
"ctrl.loading
"
@
click=
"handleCheck"
>
查询
</el-button>
<el-button
class=
"filter-item"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
icon=
'el-icon-search'
type=
"primary
"
@
click=
"handleCheck"
>
查询
</el-button>
<el-button
icon=
'el-icon-refresh'
class=
"filter-item"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus-outline"
size=
"mini"
@
click=
"handleAddRow()"
>
添加
</el-button>
</el-form-item>
</el-form>
</div>
...
...
@@ -34,23 +27,25 @@
<el-table-column
type=
"index"
label=
"序号"
width=
"40"
>
</el-table-column>
<el-table-column
prop=
"linkName,linkUrl"
label=
"链接名称/链接地址"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
linkName
}}
【
{{
scope
.
row
.
linkUrl
}}
】
</
template
>
<template
slot-scope=
"scope"
>
<el-link
type=
"primary"
@
click=
"jumpUrl(scope.row.linkUrl)"
target=
"_blank"
>
{{
scope
.
row
.
linkName
}}
</el-link>
【
{{
scope
.
row
.
linkUrl
}}
】
</
template
>
</el-table-column>
<el-table-column
prop=
"sort"
label=
"排序"
>
</el-table-column>
<el-table-column
label=
"状态
"
width=
"170
"
prop=
"statusId"
align=
"center
"
width=
"200
"
>
label=
"状态
"
align=
"center
"
>
<
template
slot-scope=
"scope"
>
<el-switch
@
change=
"handleChangeStatus(scope.$index, scope.row, $event)"
v-model=
"scope.row.statusId"
:active-value=
"1"
:inactive-value=
"0"
active-text=
"启用"
inactive-text=
"禁用"
>
@
change=
"handleChangeStatus(scope.row.id, scope.row.statusId)"
:active-value=
"0"
:inactive-value=
"1"
active-color=
"#ff4949"
inactive-color=
"#13ce66"
active-text=
"禁用"
inactive-text=
"正常"
>
</el-switch>
</
template
>
</el-table-column>
...
...
@@ -61,8 +56,8 @@
<
template
slot-scope=
"scope"
>
<ul
class=
"list-item-actions"
>
<li>
<el-button
type=
"
primary"
@
click=
"handleUpdateRow(scope.row)"
size=
"mini"
>
修改
</el-button>
<el-button
type=
"
danger"
@
click=
"handleDelRow(scope.row)"
size=
"mini"
>
删除
</el-button>
<el-button
type=
"
danger"
@
click=
"handleDelRow(scope.row.id)"
size=
"mini"
>
删除
</el-button>
<el-button
type=
"
success"
@
click=
"handleUpdateRow(scope.row)"
size=
"mini"
>
修改
</el-button>
</li>
</ul>
</
template
>
...
...
@@ -79,157 +74,169 @@
</el-pagination>
</div>
</div>
<edit
:visible=
"ctrl.dialogVisible"
:formData=
"formdata"
:title=
"ctrl.dialogTitle"
@
close-callback=
"closeCallback"
></edit>
<edit
:visible=
"ctrl.dialogVisible"
:formData=
"formData"
:title=
"ctrl.dialogTitle"
@
close-callback=
"closeCallback"
></edit>
<add
:visible=
"ctrl.addDialogVisible"
:title=
"ctrl.dialogTitle"
@
close-callback=
"closeCallback"
></add>
</div>
</template>
<
script
>
import
*
as
systemA
pi
from
'
@/api/system
'
import
*
as
a
pi
from
'
@/api/system
'
import
Edit
from
'
./edit
'
import
Add
from
'
./add
'
export
default
{
components
:
{
Edit
},
components
:
{
Edit
,
Add
},
data
()
{
return
{
//状态
options
:
[{
value
:
'
1
'
,
label
:
'
启用
'
},
{
value
:
'
0
'
,
label
:
'
禁用
'
}],
// 条件筛选参数
map
:
{
id
:
undefined
,
linkName
:
undefined
,
statusId
:
undefined
opts
:
{
statusIdList
:
[]
},
// 页面控制数据,例如形式弹窗,显示加载中等
ctrl
:
{
loading
:
false
,
remoteAuthorLoading
:
false
,
addDialogVisible
:
false
,
dialogVisible
:
false
},
// 表单数据, 例如新增编辑子项,页面表单
formdata
:
{},
tableData
:
[],
// 条件筛选参数
map
:
{},
formData
:
{},
list
:
[],
page
:
{
beginPageIndex
:
1
,
currentPage
:
1
,
pageCurrent
:
1
,
endPageIndex
:
8
,
numPerPag
e
:
20
,
pageSiz
e
:
20
,
totalCount
:
0
,
totalPage
:
0
,
list
:
[]
totalPage
:
0
}
}
},
mounted
()
{
this
.
$store
.
dispatch
(
'
GetOpts
'
,
{
enumName
:
"
StatusIdEnum
"
,
type
:
'
arr
'
}).
then
(
res
=>
{
this
.
opts
.
statusIdList
=
res
})
this
.
getList
()
},
methods
:
{
getList
()
{
this
.
ctrl
.
load
=
true
systemApi
.
websiteLinkList
(
this
.
map
,
this
.
page
.
pageCurrent
,
this
.
page
.
pageSize
).
then
(
res
=>
{
this
.
ctrl
.
load
=
false
this
.
list
=
res
.
data
.
list
this
.
page
.
pageSize
=
res
.
data
.
pageSize
this
.
page
.
totalCount
=
res
.
data
.
totalCount
}).
catch
(()
=>
{
this
.
ctrl
.
load
=
false
})
// 友情链接跳转
jumpUrl
(
url
)
{
window
.
open
(
url
)
},
// 关闭编辑弹窗回调
closeCallback
()
{
this
.
ctrl
.
dialogVisible
=
false
;
this
.
ctrl
.
addDialogVisible
=
false
this
.
reload
()
},
reload
()
{
this
.
getList
(
this
.
currentPage
)
},
handleSizeChange
(
val
)
{
// console.log(`每页 ${val} 条`)
this
.
map
.
pageSize
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
this
.
map
.
pageCurrent
=
val
this
.
getList
()
// console.log(`当前页: ${val}`)
},
handleCheck
()
{
this
.
map
.
pageNum
=
1
this
.
getList
()
},
// 重置查询条件
handleReset
()
{
this
.
map
=
{
}
this
.
getList
()
},
//新增
handleAddRow
()
{
this
.
formdata
=
{}
this
.
ctrl
.
dialogTitle
=
'
新增
'
this
.
ctrl
.
d
ialogVisible
=
true
this
.
ctrl
.
addD
ialogVisible
=
true
},
//编辑
handleUpdateRow
(
data
)
{
this
.
form
d
ata
=
data
this
.
ctrl
.
dialogTitle
=
'
编辑权限
'
this
.
form
D
ata
=
data
this
.
ctrl
.
dialogTitle
=
data
.
linkName
+
'
——编辑
'
this
.
ctrl
.
dialogVisible
=
true
},
handleChangeStatus
(
index
,
row
,
command
)
{
console
.
log
(
'
handleCommand ------>>
'
,
index
,
row
,
command
)
const
txt
=
{
1
:
'
启用
'
,
0
:
'
禁用
'
}
this
.
$confirm
(
`确定
${
txt
[
command
]}
友情链接:
${
row
.
linkName
}
?`
,
txt
[
command
]
+
'
此项
'
,
{
handleChangeStatus
(
id
,
statusId
)
{
const
title
=
{
0
:
'
禁用
'
,
1
:
'
启用
'
}
this
.
$confirm
(
`确定要
${
title
[
statusId
]}
吗?`
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
this
.
changeStatus
(
row
.
id
,
command
)
this
.
ctrl
.
loading
=
true
this
.
changeStatus
(
id
,
statusId
)
}).
catch
(()
=>
{
this
.
reload
()
})
},
//改变状态
changeStatus
(
id
,
statusId
)
{
systemApi
.
websiteLinkUpdate
({
id
,
statusId
}).
then
(
res
=>
{
const
msg
=
{
0
:
'
禁用成功
'
,
1
:
'
启用成功
'
}
this
.
$message
({
type
:
'
success
'
,
message
:
msg
[
statusId
]
});
this
.
reload
()
api
.
websiteLinkUpdate
({
id
,
statusId
}).
then
(
res
=>
{
this
.
ctrl
.
loading
=
false
if
(
res
.
code
===
200
&&
res
.
data
>
0
)
{
const
msg
=
{
0
:
'
禁用成功
'
,
1
:
'
启用成功
'
}
this
.
$message
({
type
:
'
success
'
,
message
:
msg
[
statusId
]
});
this
.
reload
()
}
else
{
const
msg
=
{
0
:
'
禁用失败
'
,
1
:
'
启用失败
'
}
this
.
$message
({
type
:
'
error
'
,
message
:
msg
[
statusId
]
});
this
.
reload
()
}
}).
catch
(()
=>
{
this
.
ctrl
.
loading
=
false
})
},
//删除
handleDelRow
(
data
)
{
console
.
log
(
'
handleCommand ------>>
'
,
data
)
handleDelRow
(
id
)
{
this
.
$confirm
(
`确定删除这条数据?`
,
'
我要删除
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
this
.
map
=
{
id
:
data
.
id
}
this
.
loading
.
show
()
systemApi
.
websiteLinkDelete
(
this
.
map
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
this
.
ctrl
.
loading
=
true
api
.
websiteLinkDelete
({
id
:
id
}).
then
(
res
=>
{
this
.
ctrl
.
loading
=
false
if
(
res
.
code
===
200
&&
res
.
data
>
0
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
删除成功
'
});
//刪除成功后刷新列表
this
.
closeCallback
()
this
.
reload
()
}
else
{
this
.
$alert
(
res
.
msg
)
this
.
$message
({
type
:
'
error
'
,
message
:
"
删除失败
"
});
this
.
reload
()
}
this
.
loading
.
hide
()
})
}).
catch
(()
=>
{
this
.
ctrl
.
loading
=
false
})
},
// 查询条件
handleCheck
()
{
this
.
page
.
pageCurrent
=
1
this
.
getList
()
},
// 重置查询条件
handleReset
()
{
this
.
reload
()
},
// 刷新当前页面
reload
()
{
this
.
formData
=
{}
this
.
map
=
{}
this
.
getList
()
},
handleSizeChange
(
val
)
{
// console.log(`每页 ${val} 条`)
this
.
page
.
pageSize
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
this
.
page
.
pageCurrent
=
val
this
.
getList
()
// console.log(`当前页: ${val}`)
},
getList
()
{
this
.
ctrl
.
loading
=
true
api
.
websiteLinkList
(
this
.
map
,
this
.
page
.
pageCurrent
,
this
.
page
.
pageSize
).
then
(
res
=>
{
this
.
ctrl
.
loading
=
false
this
.
list
=
res
.
data
.
list
this
.
page
.
pageSize
=
res
.
data
.
pageSize
this
.
page
.
totalCount
=
res
.
data
.
totalCount
}).
catch
(()
=>
{
this
.
ctrl
.
loading
=
false
})
}
}
...
...
roncoo-education-boss/src/views/index/system/websiteNav/
navTitle
.vue
→
roncoo-education-boss/src/views/index/system/websiteNav/
add
.vue
浏览文件 @
b38b1c02
<
template
>
<!--弹窗-->
<el-dialog
width=
"30%"
:title=
"title"
:visible.sync=
"visible"
:before-close=
"handleClose"
>
<el-form
:model=
"formData"
:rules=
"rules"
ref=
"formData"
>
<el-form-item
label=
"
名称
"
prop=
"navName"
>
<el-input
v-model=
"formData.navName"
></el-input>
<el-form
:model=
"formData"
:rules=
"rules"
ref=
"formData"
label-width=
"100px"
>
<el-form-item
label=
"
导航名称:
"
prop=
"navName"
>
<el-input
v-model=
"formData.navName"
placeholder=
"请输入导航名称"
></el-input>
</el-form-item>
</el-form>
<
div
slot=
"footer"
class=
"dialog-footer
"
>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm('formData')"
>
确 定
</el-button>
</
div
>
<
el-row
style=
"margin-top:17px;
"
>
<el-button
style=
"float:right"
size=
"mini"
type=
"primary"
@
click=
"submitForm('formData')"
>
确 定
</el-button>
<el-button
style=
"float:right;margin-left:6px;"
size=
"mini"
type=
"danger"
plain
@
click=
"handleClose"
>
取 消
</el-button>
</
el-row
>
</el-dialog>
</
template
>
<
script
>
import
*
as
api
s
from
'
@/api/system
'
import
*
as
api
from
'
@/api/system
'
export
default
{
name
:
'
NavTitle
'
,
name
:
'
Add
'
,
data
()
{
return
{
ctrl
:
{
...
...
@@ -53,33 +54,34 @@
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
!
this
.
formData
.
navName
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
请输入导航名称
'
});
return
false
}
if
(
valid
)
{
this
.
handleConfirm
()
this
.
loading
.
show
()
api
.
websiteNavSave
(
this
.
formData
).
then
(
res
=>
{
this
.
loading
.
hide
()
if
(
res
.
code
===
200
&&
res
.
data
>
0
)
{
this
.
tips
(
'
操作成功
'
,
'
success
'
)
this
.
handleClose
()
}
else
{
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
}
})
}
else
{
console
.
log
(
'
error submit!!
'
);
return
false
;
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
}
});
},
async
handleConfirm
()
{
this
.
loading
.
show
()
let
res
=
{}
if
(
this
.
addMap
.
id
===
undefined
)
{
//新增底部导航栏,给父ID赋值
this
.
formData
.
parentId
=
0
res
=
await
apis
.
websiteNavSave
(
this
.
formData
)
}
else
{
this
.
parentId
// 编辑
res
=
await
apis
.
websiteNavUpate
(
this
.
formData
)
}
this
.
loading
.
hide
()
if
(
res
.
code
===
200
)
{
// 提交成功, 关闭窗口, 刷新列表
this
.
$emit
(
'
close-callback
'
)
}
else
{
this
.
$alert
(
res
.
msg
||
'
提交失败
'
)
}
}
}
}
...
...
roncoo-education-boss/src/views/index/system/websiteNav/edit.vue
浏览文件 @
b38b1c02
<
template
>
<!--弹窗-->
<el-dialog
width=
"30%"
:title=
"title"
:visible.sync=
"visible"
:before-close=
"handleClose"
>
<el-form
:model=
"formData"
:rules=
"rules"
ref=
"formData"
>
<el-form-item
label=
"名称"
prop=
"navName"
>
<el-input
v-model=
"formData.navName"
></el-input>
<el-form
:model=
"formData"
:rules=
"rules"
ref=
"formData"
label-width=
"100px"
>
<el-form-item
label=
"导航名称"
prop=
"navName"
>
<el-input
v-model=
"formData.navName"
placeholder=
"请输入导航名称"
></el-input>
</el-form-item>
<el-form-item
label=
"排序:"
>
<el-input-number
style=
"width: 300px;"
v-model=
"formData.sort"
@
change=
"handleChange"
:min=
"1"
:max=
"10000"
></el-input-number>
</el-form-item>
</el-form>
<
div
slot=
"footer"
class=
"dialog-footer
"
>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm('formData')"
>
确 定
</el-button>
</
div
>
<
el-row
style=
"margin-top:17px;
"
>
<el-button
style=
"float:right"
size=
"mini"
type=
"primary"
@
click=
"submitForm('formData')"
>
确 定
</el-button>
<el-button
style=
"float:right;margin-left:6px;"
size=
"mini"
type=
"danger"
plain
@
click=
"handleClose"
>
取 消
</el-button>
</
el-row
>
</el-dialog>
</
template
>
<
script
>
import
*
as
api
s
from
'
@/api/system
'
import
*
as
api
from
'
@/api/system
'
export
default
{
name
:
'
Edit
'
,
data
()
{
...
...
@@ -49,37 +52,49 @@ export default {
}
},
methods
:
{
handleChange
(
value
)
{
this
.
formData
.
sort
=
value
},
handleClose
(
done
)
{
this
.
$emit
(
'
close-callback
'
)
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
!
this
.
formData
.
navName
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
请输入导航名称
'
});
return
false
}
if
(
valid
)
{
this
.
handleConfirm
()
if
(
this
.
formData
.
id
===
undefined
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
id不能为空
'
});
return
false
}
this
.
loading
.
show
()
api
.
websiteNavUpate
(
this
.
formData
).
then
(
res
=>
{
this
.
loading
.
hide
()
if
(
res
.
code
===
200
&&
res
.
data
>
0
)
{
this
.
tips
(
'
操作成功
'
,
'
success
'
)
this
.
handleClose
()
}
else
{
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
}
})
}
else
{
console
.
log
(
'
error submit!!
'
);
return
false
;
this
.
$message
({
type
:
'
error
'
,
message
:
"
提交失败
"
});
}
});
},
async
handleConfirm
()
{
this
.
loading
.
show
()
let
res
=
{}
if
(
this
.
formData
.
id
===
undefined
)
{
//新增底部导航栏,给父ID赋值
this
.
formData
.
parentId
=
0
res
=
await
apis
.
websiteNavSave
(
this
.
formData
)
}
else
{
// 编辑
res
=
await
apis
.
websiteNavUpate
(
this
.
formData
)
}
this
.
loading
.
hide
()
if
(
res
.
code
===
200
)
{
// 提交成功, 关闭窗口, 刷新列表
this
.
$emit
(
'
close-callback
'
)
}
else
{
this
.
$alert
(
res
.
msg
||
'
提交失败
'
)
}
})
}
}
}
...
...
roncoo-education-boss/src/views/index/system/websiteNav/index.vue
浏览文件 @
b38b1c02
...
...
@@ -2,11 +2,6 @@
<div
class=
"pad20"
>
<div>
<el-form
:inline=
"true"
size=
"mini"
>
<el-form-item>
<el-button
class=
"filter-item"
type=
"success"
@
click=
"handleAddRow"
>
新增
</el-button>
</el-form-item>
<el-form-item
label=
"分类名称"
>
<el-input
v-model=
"map.navName"
></el-input>
</el-form-item>
...
...
@@ -23,7 +18,7 @@
<el-form-item>
<el-button
icon=
'el-icon-search'
type=
"primary"
@
click=
"handleCheck"
>
查询
</el-button>
<el-button
icon=
'el-icon-refresh'
class=
"filter-item"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus-outline"
size=
"mini"
@
click=
"handleAddSubclass(
scope.row
)"
>
添加
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus-outline"
size=
"mini"
@
click=
"handleAddSubclass(
0
)"
>
添加
</el-button>
</el-form-item>
</el-form>
</div>
...
...
@@ -34,7 +29,7 @@
v-loading=
"ctrl.loading"
border
row-key=
"id"
:default-expand-all=
"
fals
e"
>
:default-expand-all=
"
tru
e"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"40"
>
</el-table-column>
<el-table-column
prop=
"navName"
label=
"导航名称"
>
...
...
@@ -68,7 +63,7 @@
<li>
<el-button
type=
"danger"
@
click=
"handleDelRow(scope.row.id)"
size=
"mini"
>
删除
</el-button>
<el-button
type=
"primary"
@
click=
"handleUpdateRow(scope.row)"
size=
"mini"
>
修改
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus-outline"
size=
"mini"
@
click=
"handleAddSubclass(scope.row
)"
>
添加
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus-outline"
size=
"mini"
v-if=
"scope.row.parentId == 0"
@
click=
"handleAddSubclass(scope.row.id
)"
>
添加
</el-button>
</li>
</ul>
</
template
>
...
...
@@ -88,30 +83,30 @@
</div>
</div>
<edit
:visible=
"ctrl.dialogVisible"
:formData=
"formData"
:title=
"ctrl.dialogTitle"
@
close-callback=
"closeCallback"
></edit>
<
nav-title
:visible=
"ctrl.navTitleVisible"
:formData=
"formData"
:title=
"ctrl.dialogTitle"
@
close-callback=
"closeCallback"
></nav-title
>
<
add
:visible=
"ctrl.addDialogVisible"
:formData=
"formData"
:title=
"ctrl.dialogTitle"
@
close-callback=
"closeCallback"
></add
>
</div>
</template>
<
script
>
import
*
as
api
from
'
@/api/system
'
import
Edit
from
'
./edit
'
import
NavTitle
from
'
./navTitle
'
import
Add
from
'
./add
'
export
default
{
components
:
{
Edit
,
NavTitle
},
components
:
{
Edit
,
Add
},
data
()
{
return
{
opts
:
{
statusIdList
:
[]
},
// 条件筛选参数
map
:
{},
// 页面控制数据,例如形式弹窗,显示加载中等
ctrl
:
{
loading
:
false
,
remoteAuthorLoading
:
false
,
dialogVisible
:
false
,
navTitle
Visible
:
false
addDialog
Visible
:
false
},
// 表单数据, 例如新增编辑子项,页面表单
// 条件筛选参数
map
:
{},
formData
:
{},
tableData
:
[],
list
:
[],
...
...
@@ -126,33 +121,30 @@
}
},
mounted
()
{
this
.
$store
.
dispatch
(
'
GetOpts
'
,
{
enumName
:
"
StatusIdEnum
"
,
type
:
'
arr
'
}).
then
(
res
=>
{
this
.
opts
.
statusIdList
=
res
})
this
.
getList
()
},
methods
:
{
//
跳转到底部导航文章添加页面
handleAddSubclass
(
data
)
{
this
.
formData
=
data
//
新增
handleAddSubclass
(
id
)
{
this
.
formData
.
parentId
=
id
this
.
ctrl
.
dialogTitle
=
'
添加
'
this
.
ctrl
.
navTitle
Visible
=
true
this
.
ctrl
.
addDialog
Visible
=
true
},
//编辑
handleUpdateRow
(
data
)
{
this
.
form
d
ata
=
data
this
.
ctrl
.
dialogTitle
=
'
编辑权限
'
this
.
form
D
ata
=
data
this
.
ctrl
.
dialogTitle
=
data
.
navName
+
'
——编辑
'
this
.
ctrl
.
dialogVisible
=
true
},
// 关闭编辑弹窗回调
closeCallback
()
{
this
.
ctrl
.
dialogVisible
=
false
this
.
ctrl
.
navTitle
Visible
=
false
this
.
ctrl
.
addDialog
Visible
=
false
this
.
reload
()
},
//新增
handleAddRow
()
{
this
.
formData
=
{}
this
.
ctrl
.
dialogTitle
=
'
添加
'
this
.
ctrl
.
dialogVisible
=
true
},
//删除
handleDelRow
(
id
)
{
this
.
$confirm
(
`确定删除这条数据?`
,
'
我要删除
'
,
{
...
...
@@ -161,20 +153,22 @@
type
:
'
warning
'
}).
then
(()
=>
{
this
.
map
.
id
=
id
this
.
loading
.
show
()
this
.
ctrl
.
load
=
true
api
.
websiteNavDelete
(
this
.
map
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
ctrl
.
load
=
false
if
(
res
.
code
===
200
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
删除成功
'
});
//刪除成功后刷新列表
this
.
closeCallback
()
this
.
reload
()
}
else
{
this
.
$alert
(
res
.
msg
)
this
.
$message
({
type
:
'
error
'
,
message
:
'
删除失败
'
});
}
this
.
loading
.
hide
()
})
}).
catch
(()
=>
{
})
...
...
@@ -189,19 +183,30 @@
this
.
ctrl
.
loading
=
true
this
.
changeStatus
(
id
,
statusId
)
}).
catch
(()
=>
{
this
.
reload
()
this
.
ctrl
.
loading
=
false
})
},
//改变状态
changeStatus
(
id
,
statusId
)
{
api
.
websiteNavUpate
({
id
,
statusId
}).
then
(
res
=>
{
this
.
ctrl
.
loading
=
false
const
msg
=
{
0
:
'
禁用成功
'
,
1
:
'
启用成功
'
}
this
.
$message
({
type
:
'
success
'
,
message
:
msg
[
statusId
]
});
this
.
reload
()
if
(
res
.
code
===
200
&&
res
.
data
>
0
)
{
const
msg
=
{
0
:
'
禁用成功
'
,
1
:
'
启用成功
'
}
this
.
$message
({
type
:
'
success
'
,
message
:
msg
[
statusId
]
});
this
.
reload
()
}
else
{
const
msg
=
{
0
:
'
禁用失败
'
,
1
:
'
启用失败
'
}
this
.
$message
({
type
:
'
error
'
,
message
:
msg
[
statusId
]
});
this
.
reload
()
}
}).
catch
(()
=>
{
this
.
ctrl
.
loading
=
false
})
},
// 查询条件
...
...
@@ -216,7 +221,7 @@
// 刷新当前页面
reload
()
{
this
.
map
=
{}
this
.
gmtCreate
=
''
this
.
formData
=
{}
this
.
getList
()
},
handleSizeChange
(
val
)
{
...
...
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/biz/pc/PcApiWebsiteLinkBiz.java
浏览文件 @
b38b1c02
...
...
@@ -41,7 +41,7 @@ public class PcApiWebsiteLinkBiz {
WebsiteLinkExample
example
=
new
WebsiteLinkExample
();
Criteria
c
=
example
.
createCriteria
();
if
(
StringUtils
.
hasText
(
req
.
getLinkName
()))
{
c
.
andLinkNameLike
(
PageUtil
.
rightL
ike
(
req
.
getLinkName
()));
c
.
andLinkNameLike
(
PageUtil
.
l
ike
(
req
.
getLinkName
()));
}
if
(
req
.
getStatusId
()
!=
null
)
{
c
.
andStatusIdEqualTo
(
req
.
getStatusId
());
...
...
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/biz/pc/PcApiWebsiteNavBiz.java
浏览文件 @
b38b1c02
...
...
@@ -50,7 +50,7 @@ public class PcApiWebsiteNavBiz {
WebsiteNavExample
example
=
new
WebsiteNavExample
();
Criteria
c
=
example
.
createCriteria
();
if
(
StringUtils
.
isNotEmpty
(
req
.
getNavName
()))
{
c
.
andNavNameLike
(
PageUtil
.
rightL
ike
(
req
.
getNavName
()));
c
.
andNavNameLike
(
PageUtil
.
l
ike
(
req
.
getNavName
()));
}
else
{
c
.
andParentIdEqualTo
(
Long
.
valueOf
(
0
));
}
...
...
@@ -89,6 +89,15 @@ public class PcApiWebsiteNavBiz {
}
public
Result
<
Integer
>
save
(
WebsiteNavSaveREQ
req
)
{
if
(
StringUtils
.
isEmpty
(
req
.
getNavName
()))
{
return
Result
.
error
(
"ID不能为空"
);
}
if
(
req
.
getParentId
()
!=
null
&&
!
req
.
getParentId
().
equals
(
0L
))
{
WebsiteNav
websiteNav
=
dao
.
getById
(
req
.
getParentId
());
if
(
ObjectUtil
.
isNull
(
websiteNav
))
{
return
Result
.
error
(
"找不到父级导航信息"
);
}
}
WebsiteNav
record
=
BeanUtil
.
copyProperties
(
req
,
WebsiteNav
.
class
);
int
results
=
dao
.
save
(
record
);
if
(
results
>
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录