Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-admin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-admin
Commits
efb57e1d
Commit
efb57e1d
authored
Jan 16, 2022
by
Lyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台bug修改
parent
e7ff6004
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
657 additions
and
23 deletions
+657
-23
index.js
config/index.js
+2
-1
_base.scss
src/assets/scss/_base.scss
+3
-0
index.js
src/router/index.js
+8
-8
httpRequest.js
src/utils/httpRequest.js
+1
-1
login.vue
src/views/common/login.vue
+8
-8
main-navbar.vue
src/views/main-navbar.vue
+1
-1
main-sidebar.vue
src/views/main-sidebar.vue
+2
-2
announce-add-or-update.vue
src/views/modules/info/announce-add-or-update.vue
+277
-0
announce.vue
src/views/modules/info/announce.vue
+345
-0
oss-upload.vue
src/views/modules/oss/oss-upload.vue
+1
-1
doc.vue
src/views/modules/service/doc.vue
+9
-1
No files found.
config/index.js
View file @
efb57e1d
...
...
@@ -35,7 +35,8 @@ module.exports = {
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint
:
true
,
// useEslint: true,
useEslint
:
false
,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay
:
false
,
...
...
src/assets/scss/_base.scss
View file @
efb57e1d
...
...
@@ -373,6 +373,9 @@ img {
position
:
relative
;
overflow
:
hidden
;
}
.avatar-uploaderFile
>
.el-upload
{
border
:none
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
...
...
src/router/index.js
View file @
efb57e1d
...
...
@@ -90,7 +90,7 @@ const mainRoutes = {
],
beforeEnter
(
to
,
from
,
next
)
{
// let token = Vue.cookie.get('token')
let
token
=
session
Storage
.
getItem
(
'token'
)
let
token
=
local
Storage
.
getItem
(
'token'
)
if
(
!
token
||
!
/
\S
/
.
test
(
token
))
{
clearLoginInfo
()
next
({
name
:
'login'
})
...
...
@@ -115,8 +115,8 @@ router.beforeEach((to, from, next) => {
}
else
{
// fnAddDynamicMenuRoutes(menuData.navDataList)
// router.options.isAddDynamicMenuRoutes = true
//
session
Storage.setItem('menuList', JSON.stringify(menuData.navDataList || '[]'))
//
session
Storage.setItem('permissions', JSON.stringify(menuData.permissions || '[]'))
//
local
Storage.setItem('menuList', JSON.stringify(menuData.navDataList || '[]'))
//
local
Storage.setItem('permissions', JSON.stringify(menuData.permissions || '[]'))
// next({ ...to, replace: true })
http
({
...
...
@@ -127,12 +127,12 @@ router.beforeEach((to, from, next) => {
if
(
data
&&
data
.
code
===
0
)
{
fnAddDynamicMenuRoutes
(
data
.
menuList
)
router
.
options
.
isAddDynamicMenuRoutes
=
true
session
Storage
.
setItem
(
'menuList'
,
JSON
.
stringify
(
data
.
menuList
||
'[]'
))
session
Storage
.
setItem
(
'permissions'
,
JSON
.
stringify
(
data
.
permissions
||
'[]'
))
local
Storage
.
setItem
(
'menuList'
,
JSON
.
stringify
(
data
.
menuList
||
'[]'
))
local
Storage
.
setItem
(
'permissions'
,
JSON
.
stringify
(
data
.
permissions
||
'[]'
))
next
({
...
to
,
replace
:
true
})
}
else
{
session
Storage
.
setItem
(
'menuList'
,
'[]'
)
session
Storage
.
setItem
(
'permissions'
,
'[]'
)
local
Storage
.
setItem
(
'menuList'
,
'[]'
)
local
Storage
.
setItem
(
'permissions'
,
'[]'
)
next
()
}
}).
catch
((
e
)
=>
router
.
push
({
name
:
'login'
}))
...
...
@@ -201,7 +201,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
mainRoutes
,
{
path
:
'*'
,
redirect
:
{
name
:
'404'
}
}
])
session
Storage
.
setItem
(
'dynamicMenuRoutes'
,
JSON
.
stringify
(
mainRoutes
.
children
||
'[]'
))
local
Storage
.
setItem
(
'dynamicMenuRoutes'
,
JSON
.
stringify
(
mainRoutes
.
children
||
'[]'
))
console
.
log
(
'
\
n'
)
console
.
log
(
'%c!<-------------------- 动态(菜单)路由 s -------------------->'
,
'color:blue'
)
console
.
log
(
mainRoutes
.
children
)
...
...
src/utils/httpRequest.js
View file @
efb57e1d
...
...
@@ -18,7 +18,7 @@ const http = axios.create({
*/
http
.
interceptors
.
request
.
use
(
config
=>
{
// config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
config
.
headers
[
'token'
]
=
session
Storage
.
getItem
(
'token'
)
config
.
headers
[
'token'
]
=
local
Storage
.
getItem
(
'token'
)
return
config
},
error
=>
{
return
Promise
.
reject
(
error
)
...
...
src/views/common/login.vue
View file @
efb57e1d
...
...
@@ -52,19 +52,19 @@
}
},
created
()
{
this
.
dataForm
.
userName
=
session
Storage
.
getItem
(
'username'
)
this
.
dataForm
.
password
=
session
Storage
.
getItem
(
'password'
)
this
.
dataForm
.
userName
=
local
Storage
.
getItem
(
'username'
)
this
.
dataForm
.
password
=
local
Storage
.
getItem
(
'password'
)
},
methods
:
{
// 提交表单
dataFormSubmit
()
{
if
(
this
.
dataForm
.
checked
)
{
session
Storage
.
setItem
(
'username'
,
this
.
dataForm
.
userName
)
session
Storage
.
setItem
(
'password'
,
this
.
dataForm
.
password
)
local
Storage
.
setItem
(
'username'
,
this
.
dataForm
.
userName
)
local
Storage
.
setItem
(
'password'
,
this
.
dataForm
.
password
)
this
.
submit
()
}
else
{
session
Storage
.
removeItem
(
'username'
)
session
Storage
.
removeItem
(
'password'
)
local
Storage
.
removeItem
(
'username'
)
local
Storage
.
removeItem
(
'password'
)
this
.
submit
()
}
},
...
...
@@ -80,8 +80,8 @@
})
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
session
Storage
.
setItem
(
'token'
,
data
.
token
)
session
Storage
.
setItem
(
'username'
,
this
.
dataForm
.
userName
)
local
Storage
.
setItem
(
'token'
,
data
.
token
)
local
Storage
.
setItem
(
'username'
,
this
.
dataForm
.
userName
)
this
.
$router
.
replace
({
name
:
'home'
})
}
else
{
...
...
src/views/main-navbar.vue
View file @
efb57e1d
...
...
@@ -78,7 +78,7 @@
set
(
val
)
{
this
.
$store
.
commit
(
'common/updateMainTabs'
,
val
)
}
},
userName
:
{
get
()
{
return
session
Storage
.
getItem
(
'username'
)
}
get
()
{
return
local
Storage
.
getItem
(
'username'
)
}
}
},
methods
:
{
...
...
src/views/main-sidebar.vue
View file @
efb57e1d
...
...
@@ -75,8 +75,8 @@
$route
:
'routeHandle'
},
created
()
{
this
.
menuList
=
JSON
.
parse
(
session
Storage
.
getItem
(
'menuList'
)
||
'[]'
)
this
.
dynamicMenuRoutes
=
JSON
.
parse
(
session
Storage
.
getItem
(
'dynamicMenuRoutes'
)
||
'[]'
)
this
.
menuList
=
JSON
.
parse
(
local
Storage
.
getItem
(
'menuList'
)
||
'[]'
)
this
.
dynamicMenuRoutes
=
JSON
.
parse
(
local
Storage
.
getItem
(
'dynamicMenuRoutes'
)
||
'[]'
)
this
.
routeHandle
(
this
.
$route
)
},
methods
:
{
...
...
src/views/modules/info/announce-add-or-update.vue
0 → 100644
View file @
efb57e1d
<
template
>
<el-dialog
:title=
"!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
:close-on-click-modal=
"false"
:visible
.
sync=
"visible"
>
<el-form
:model=
"dataForm"
:rules=
"dataRule"
ref=
"dataForm"
@
keyup
.
enter
.
native=
"dataFormSubmit()"
label-width=
"120px"
v-loading=
'loading'
>
<el-form-item
label=
'分类:'
prop=
'announcetype'
>
<el-select
v-model=
"dataForm.announcetype"
placeholder=
"请选择分类"
clearable
>
<el-option
v-for=
"item in typeList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
'级别:'
prop=
'levels'
>
<el-select
v-model=
"dataForm.levels"
placeholder=
"请输入级别"
v-show=
"!showInfo"
>
<el-option
v-for=
"item in piclevelList"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
<p
v-show=
"showInfo"
>
{{
dataForm
.
levels
}}
</p>
</el-form-item>
<el-form-item
label=
"标题:"
prop=
"title"
>
<el-input
v-model=
"dataForm.title"
placeholder=
"请输入显示标题"
v-show=
"!showInfo"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
title
}}
</p>
</el-form-item>
<!--
<el-form-item
label=
"跳转至:"
prop=
"directpath"
>
<el-input
v-model=
"dataForm.directpath"
placeholder=
"请输入跳转地址"
v-show=
"!showInfo"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
directpath
}}
</p>
</el-form-item>
-->
<el-form-item
label=
"作者:"
prop=
"author"
>
<el-input
v-model=
"dataForm.author"
placeholder=
"请输入作者"
v-show=
"!showInfo"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
author
}}
</p>
</el-form-item>
<el-form-item
label=
"显示时间:"
prop=
"showtime"
>
<el-date-picker
v-show=
"!showInfo"
v-model=
"dataForm.showtime"
value-format=
'yyyy-MM-dd'
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
<p
v-show=
"showInfo"
>
{{
dataForm
.
showtime
}}
</p>
</el-form-item>
<el-form-item
label=
"附件路径:"
prop=
"fileUrl"
>
<el-upload
v-show=
"!showInfo"
class=
"avatar-uploaderFile"
action=
""
:show-file-list=
"false"
:http-request=
"Upload"
:before-upload=
"beforeAvatarUpload"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
</el-upload>
<a
v-if=
"fileUrlStr"
:href=
"fileUrlStr"
target=
"_blank"
>
{{
fileUrlStr
}}
</a>
<p
v-show=
"showInfo"
><a
:href=
"fileUrlStr"
>
{{
fileUrlStr
}}
</a></p>
</el-form-item>
<el-form-item
label=
"文章内容:"
prop=
"content"
>
<Ueditor
@
ready=
"editorReady"
:value=
"ueditor.value"
:config=
"ueditor.config"
ref=
"ue"
v-show=
"!showInfo"
></Ueditor>
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
v-show=
"!showInfo"
>
<el-button
@
click=
"visible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"dataFormSubmit()"
>
确定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
Ueditor
from
'../temps/ueditor'
export
default
{
components
:
{
Ueditor
},
data
()
{
return
{
loading
:
false
,
showInfo
:
false
,
visible
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
},
dataForm
:
{
id
:
0
,
title
:
''
,
author
:
''
,
levels
:
''
,
fileurl
:
''
,
content
:
''
,
showtime
:
''
,
announcetype
:
''
},
typeList
:
[
{
value
:
1
,
label
:
'中心公告'
},
{
value
:
2
,
label
:
'地方公告'
}
],
cclassidStr
:
undefined
,
dataRule
:
{
title
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
author
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
levels
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
type
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
// fileurl: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
showtime
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
]
},
fileUrl
:
new
FormData
(),
fileUrlStr
:
''
,
dialogVisible
:
false
,
ueditor
:
{
value
:
''
,
config
:
{}
},
piclevelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
id
:
[],
classidList
:
[],
cclassidList
:
[],
title
:
''
,
className
:
''
,
cclassName
:
''
}
},
created
()
{
},
mounted
()
{
},
methods
:
{
getSelectName
(
list
,
id
)
{
let
arr
=
list
.
filter
((
item
)
=>
{
return
item
.
id
===
id
})
return
arr
[
0
].
name
},
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
loading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/announce/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
()
}).
then
(({
data
})
=>
{
this
.
loading
=
false
if
(
data
&&
data
.
code
===
0
)
{
this
.
dataForm
=
data
.
announce
this
.
fileUrlStr
=
data
.
announce
.
fileUrlStr
this
.
dialogVisible
=
true
this
.
ueditor
.
value
=
this
.
dataForm
.
content
}
})
}
})
},
// 表单提交
dataFormSubmit
()
{
this
.
loading
=
true
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/announce/
${
!
this
.
dataForm
.
id
?
'save'
:
'update'
}
`
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
this
.
dataForm
.
id
||
undefined
,
'title'
:
this
.
dataForm
.
title
,
'announcetype'
:
this
.
dataForm
.
announcetype
,
'author'
:
this
.
dataForm
.
author
,
'levels'
:
this
.
dataForm
.
levels
,
'fileurl'
:
this
.
dataForm
.
fileurl
,
'content'
:
this
.
dataForm
.
content
,
'showtime'
:
this
.
dataForm
.
showtime
})
}).
then
(({
data
})
=>
{
this
.
loading
=
false
if
(
data
&&
data
.
code
===
0
)
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
this
.
$message
.
error
(
data
.
msg
)
}
})
}
})
},
// 上传之前校验
beforeAvatarUpload
(
file
)
{
if
(
file
)
{
var
windowURL
=
window
.
URL
||
window
.
webkitURL
this
.
fileUrlStr
=
windowURL
.
createObjectURL
(
file
)
this
.
dialogVisible
=
true
this
.
fileUrl
.
append
(
'file'
,
file
)
}
},
Upload
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/file/uploadFile'
),
method
:
'post'
,
data
:
this
.
fileUrl
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
dataForm
.
fileurl
=
res
.
data
.
data
this
.
fileUrlStr
=
res
.
data
.
data
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
clearInp
()
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
fileUrlStr
=
''
this
.
dialogVisible
=
false
this
.
ueditor
.
value
=
''
},
// 更新父子组件内容
editorReady
(
instance
)
{
instance
.
setContent
(
this
.
dataForm
.
content
)
instance
.
addListener
(
'contentChange'
,
()
=>
{
this
.
dataForm
.
content
=
instance
.
getContent
()
})
}
}
}
</
script
>
<
style
scoped
>
.avatar-uploader
>
.el-upload
{
border
:
none
!important
;
}
</
style
>
\ No newline at end of file
src/views/modules/info/announce.vue
0 → 100644
View file @
efb57e1d
<
template
>
<div
class=
"mod-config mod-list-form"
>
<el-form
:inline=
"true"
:model=
"dataForm"
@
keyup
.
enter
.
native=
"getDataList()"
label-width=
"80px"
>
<el-form-item
label=
'标题'
prop=
'title'
>
<el-input
v-model=
'dataForm.title'
placeholder=
'请输入标题'
clearable
></el-input>
</el-form-item>
<el-form-item
label=
'编辑'
prop=
'editor'
>
<el-input
v-model=
'dataForm.editor'
placeholder=
'请输入编辑'
clearable
></el-input>
</el-form-item>
<el-form-item
label=
'状态'
prop=
'status'
>
<el-select
v-model=
"dataForm.status"
placeholder=
"请选择状态"
clearable
>
<el-option
v-for=
"item in statusList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
'分类'
prop=
'type'
>
<el-select
v-model=
"dataForm.type"
placeholder=
"请选择分类"
clearable
>
<el-option
v-for=
"item in typeList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
'级别'
prop=
'levels'
>
<el-select
v-model=
"dataForm.levels"
placeholder=
"请输入级别"
clearable
>
<el-option
v-for=
"item in piclevelList"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
'发布日期'
prop=
'releaseDate'
>
<el-date-picker
clearable
v-model=
"releaseDate"
type=
"daterange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-button
class=
"seach-btn"
@
click=
"getDataList()"
type=
"primary"
>
搜索
</el-button>
</el-form>
<div
class=
"add-btn"
>
<el-button
v-if=
"isAuth('manage:announce:save')"
type=
"primary"
@
click=
"addOrUpdateHandle()"
>
+ 添加
</el-button>
</div>
<div
class=
"table-list"
>
<el-table
:data=
"dataList"
v-loading=
"dataListLoading"
@
selection-change=
"selectionChangeHandle"
border
style=
"width: 100%; "
>
<el-table-column
prop=
"levels"
header-align=
"center"
align=
"center"
width=
"50px"
label=
"级别"
>
</el-table-column>
<el-table-column
prop=
"announcetype"
header-align=
"center"
align=
"center"
label=
"分类"
>
<template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
announcetype
==
1
?
'中心公告'
:
scope
.
row
.
announcetype
==
2
?
'地方公告'
:
''
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"editor"
header-align=
"center"
align=
"center"
label=
"编辑"
>
</el-table-column>
<el-table-column
prop=
"author"
header-align=
"center"
align=
"center"
label=
"作者"
>
</el-table-column>
<el-table-column
prop=
"showtime"
header-align=
"center"
align=
"center"
sortable
label=
"显示时间"
>
</el-table-column>
<el-table-column
prop=
"releasedate"
header-align=
"center"
align=
"center"
sortable
label=
"发布时间"
>
</el-table-column>
<!-- <el-table-column
prop="keyword"
header-align="center"
align="center"
label="关键字">
</el-table-column> -->
<el-table-column
prop=
"auditor"
header-align=
"center"
align=
"center"
label=
"审核人"
>
</el-table-column>
<el-table-column
prop=
"status"
header-align=
"center"
align=
"center"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<div>
<span
v-if=
"scope.row.status === 0"
>
待审核
</span>
<span
v-if=
"scope.row.status === -1"
>
失败
</span>
<span
v-if=
"scope.row.status === 1"
>
成功
</span>
</div>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
header-align=
"center"
align=
"center"
width=
"150"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"isAuth('manage:announce:check')"
type=
"text"
size=
"small"
@
click=
"checkHandle(scope.row.id,1)"
>
[成功]
</el-button>
<el-button
v-if=
"isAuth('manage:announce:check')"
type=
"text"
size=
"small"
@
click=
"checkHandle(scope.row.id,-1)"
>
[失败]
</el-button>
<br
v-if=
"isAuth('manage:announce:check')"
/>
<el-button
v-if=
"isAuth('manage:announce:info')"
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true)"
>
预览
</el-button>
<el-button
v-if=
"isAuth('manage:announce:update')"
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
v-if=
"isAuth('manage:announce:delete')"
type=
"text"
size=
"small"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
@
size-change=
"sizeChangeHandle"
@
current-change=
"currentChangeHandle"
:current-page=
"pageIndex"
:page-sizes=
"[10, 20, 50, 100]"
:page-size=
"pageSize"
:total=
"totalPage"
layout=
"total, sizes, prev, pager, next, jumper"
>
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
v-if=
"addOrUpdateVisible"
ref=
"addOrUpdate"
@
refreshDataList=
"getDataList"
></add-or-update>
</div>
</div>
</template>
<
script
>
import
AddOrUpdate
from
'./announce-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
'title'
:
''
,
'levels'
:
'0'
,
'editor'
:
''
,
'keyword'
:
''
,
'status'
:
''
,
'type'
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
typeList
:
[
{
value
:
'1'
,
label
:
'中心公告'
},
{
value
:
'2'
,
label
:
'地方公告'
}
],
piclevelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/announce/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'levels'
:
this
.
dataForm
.
levels
,
'type'
:
this
.
dataForm
.
type
,
'editor'
:
this
.
dataForm
.
editor
,
'keyword'
:
this
.
dataForm
.
keyword
,
'status'
:
this
.
dataForm
.
status
,
'releaseTimeStart'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
]
})
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
dataList
=
data
.
page
.
list
this
.
totalPage
=
data
.
page
.
totalCount
}
else
{
this
.
dataList
=
[]
this
.
totalPage
=
0
}
this
.
dataListLoading
=
false
})
},
// 每页数
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增 / 修改
addOrUpdateHandle
(
id
,
showInfo
)
{
this
.
addOrUpdateVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
addOrUpdate
.
init
(
id
,
showInfo
)
})
},
// 删除
deleteHandle
(
id
)
{
var
ids
=
id
?
[
id
]
:
this
.
dataListSelections
.
map
(
item
=>
{
return
item
.
id
})
this
.
$confirm
(
`确定对[id=
${
ids
.
join
(
','
)}
]进行[
${
id
?
'删除'
:
'批量删除'
}
]操作?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/announce/delete'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
(
ids
,
false
)
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
getDataList
()
}
})
}
else
{
this
.
$message
.
error
(
data
.
msg
)
}
})
}).
catch
(()
=>
{})
},
// 审核
checkHandle
(
id
,
status
)
{
let
str
=
''
if
(
status
===
1
)
{
str
=
'成功'
}
else
{
str
=
'失败'
}
this
.
$confirm
(
`确定对[id=
${
id
}
]进行['审核
${
str
}
']操作?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/announce/verify'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
id
,
'status'
:
status
})
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
getDataList
()
}
})
}
else
{
this
.
$message
.
error
(
data
.
msg
)
}
})
}).
catch
(()
=>
{})
}
}
}
</
script
>
src/views/modules/oss/oss-upload.vue
View file @
efb57e1d
...
...
@@ -32,7 +32,7 @@
},
methods
:
{
init
(
id
)
{
this
.
url
=
this
.
$http
.
adornUrl
(
`/office/sys/oss/upload?token=
${
session
Storage
.
getItem
(
'token'
)}
`
)
this
.
url
=
this
.
$http
.
adornUrl
(
`/office/sys/oss/upload?token=
${
local
Storage
.
getItem
(
'token'
)}
`
)
this
.
visible
=
true
},
// 上传之前
...
...
src/views/modules/service/doc.vue
View file @
efb57e1d
...
...
@@ -64,7 +64,7 @@
prop=
"category"
header-align=
"center"
align=
"center"
label=
"
状态
"
>
label=
"
类型
"
>
<
template
slot-scope=
"scope"
>
<div>
<span
v-if=
"scope.row.category === 1"
>
表格下载
</span>
...
...
@@ -73,6 +73,14 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"auditor"
header-align=
"center"
align=
"center"
label=
"审核人"
>
</el-table-column>
<el-table-column
fixed=
"right"
header-align=
"center"
align=
"center"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment