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
d493a532
Commit
d493a532
authored
Jan 07, 2022
by
Lyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台管理
parent
aa109009
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
576 additions
and
762 deletions
+576
-762
index.js
config/index.js
+2
-1
routerdata.js
src/utils/routerdata.js
+27
-27
login.vue
src/views/common/login.vue
+2
-2
newsmovie.vue
src/views/modules/info/newsmovie.vue
+11
-9
doc-add-or-update.vue
src/views/modules/service/doc-add-or-update.vue
+252
-0
doc.vue
src/views/modules/service/doc.vue
+257
-0
partners-add-or-update.vue
src/views/modules/service/partners-add-or-update.vue
+0
-371
partners.vue
src/views/modules/service/partners.vue
+0
-332
index-prod.js
static/config/index-prod.js
+8
-6
index-uat.js
static/config/index-uat.js
+8
-6
index.js
static/config/index.js
+7
-7
ueditor.config.js
static/plugins/ueditor-1.4.3.3/ueditor.config.js
+2
-1
No files found.
config/index.js
View file @
d493a532
...
@@ -14,7 +14,8 @@ module.exports = {
...
@@ -14,7 +14,8 @@ module.exports = {
// 代理列表, 是否开启代理通过[./dev.env.js]配置
// 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable
:
devEnv
.
OPEN_PROXY
===
false
?
{}
:
{
proxyTable
:
devEnv
.
OPEN_PROXY
===
false
?
{}
:
{
'/proxyApi'
:
{
'/proxyApi'
:
{
target
:
'http://81.68.189.225:9091/'
,
// target: 'http://81.68.189.225:9091/',
target
:
'http://192.168.0.77/'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
'^/proxyApi'
:
'/'
'^/proxyApi'
:
'/'
...
...
src/utils/routerdata.js
View file @
d493a532
...
@@ -228,34 +228,34 @@ export const menuData = {
...
@@ -228,34 +228,34 @@ export const menuData = {
'list'
:
null
'list'
:
null
}
}
]
]
},
{
'menuId'
:
18
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'服务管理'
,
'url'
:
null
,
'perms'
:
null
,
'type'
:
0
,
'icon'
:
'suoding'
,
'orderNum'
:
0
,
'open'
:
null
,
'list'
:
[
{
'menuId'
:
19
,
'parentId'
:
1
,
'parentName'
:
null
,
'name'
:
'文档管理'
,
'url'
:
'service/doc'
,
'perms'
:
'manage:doc:save'
,
'type'
:
1
,
'icon'
:
null
,
'orderNum'
:
1
,
'open'
:
null
,
'list'
:
null
}
]
}
}
// {
// 'menuId': 18,
// 'parentId': 1,
// 'parentName': null,
// 'name': '标准服务提供商管理',
// 'url': null,
// 'perms': null,
// 'type': 0,
// 'icon': 'suoding',
// 'orderNum': 0,
// 'open': null,
// 'list': [
// {
// 'menuId': 19,
// 'parentId': 1,
// 'parentName': null,
// 'name': '提供商管理',
// 'url': 'service/partners',
// 'perms': 'manage:logistics:save',
// 'type': 1,
// 'icon': null,
// 'orderNum': 1,
// 'open': null,
// 'list': null
// }
// ]
// }
],
],
permissions
:
[
permissions
:
[
...
...
src/views/common/login.vue
View file @
d493a532
...
@@ -144,8 +144,8 @@
...
@@ -144,8 +144,8 @@
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
right
:
50%
;
right
:
50%
;
margin-right
:
-2
2
5px
;
margin-right
:
-2
7
5px
;
width
:
4
49px
;
width
:
5
49px
;
min-height
:
100%
;
min-height
:
100%
;
}
}
.login-title
{
.login-title
{
...
...
src/views/modules/info/newsmovie.vue
View file @
d493a532
...
@@ -2,19 +2,19 @@
...
@@ -2,19 +2,19 @@
<div
class=
"mod-config mod-list-form"
>
<div
class=
"mod-config mod-list-form"
>
<el-form
:inline=
"true"
:model=
"dataForm"
@
keyup
.
enter
.
native=
"getDataList()"
>
<el-form
:inline=
"true"
:model=
"dataForm"
@
keyup
.
enter
.
native=
"getDataList()"
>
<el-form-item
label=
'显示标题'
prop=
'title'
>
<el-form-item
label=
'显示标题'
prop=
'title'
>
<el-input
v-model=
'dataForm.title'
placeholder=
'请输入标题'
size=
"small"
></el-input>
<el-input
v-model=
'dataForm.title'
placeholder=
'请输入标题'
size=
"small"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
'演讲人'
prop=
'author'
>
<el-form-item
label=
'演讲人'
prop=
'author'
>
<el-input
v-model=
'dataForm.author'
placeholder=
'请输入演讲人'
size=
"small"
></el-input>
<el-input
v-model=
'dataForm.author'
placeholder=
'请输入演讲人'
size=
"small"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
'编辑'
prop=
'editor'
>
<el-form-item
label=
'编辑'
prop=
'editor'
>
<el-input
v-model=
'dataForm.editor'
placeholder=
'请输入编辑'
size=
"small"
></el-input>
<el-input
v-model=
'dataForm.editor'
placeholder=
'请输入编辑'
size=
"small"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
'关键字'
prop=
'keyword'
>
<el-form-item
label=
'关键字'
prop=
'keyword'
>
<el-input
v-model=
'dataForm.keyword'
placeholder=
'请输入关键字'
size=
"small"
></el-input>
<el-input
v-model=
'dataForm.keyword'
placeholder=
'请输入关键字'
size=
"small"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
'状态'
prop=
'status'
>
<el-form-item
label=
'状态'
prop=
'status'
>
<el-select
v-model=
"dataForm.status"
placeholder=
"请选择状态"
size=
"small"
>
<el-select
v-model=
"dataForm.status"
placeholder=
"请选择状态"
size=
"small"
clearable
>
<el-option
<el-option
v-for=
"item in statusList"
v-for=
"item in statusList"
:key=
"item.value"
:key=
"item.value"
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
'语种'
prop=
'clanguage'
>
<el-form-item
label=
'语种'
prop=
'clanguage'
>
<el-select
v-model=
"dataForm.clanguage"
placeholder=
"请输入级别"
size=
"small"
>
<el-select
v-model=
"dataForm.clanguage"
placeholder=
"请输入级别"
size=
"small"
clearable
>
<el-option
<el-option
v-for=
"item in clanguageList"
v-for=
"item in clanguageList"
:key=
"item"
:key=
"item"
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
'级别'
prop=
'levels'
>
<el-form-item
label=
'级别'
prop=
'levels'
>
<el-select
v-model=
"dataForm.levels"
placeholder=
"请输入级别"
size=
"small"
>
<el-select
v-model=
"dataForm.levels"
placeholder=
"请输入级别"
size=
"small"
clearable
>
<el-option
<el-option
v-for=
"item in levelList"
v-for=
"item in levelList"
:key=
"item"
:key=
"item"
...
@@ -43,9 +43,10 @@
...
@@ -43,9 +43,10 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
'更新日期'
prop=
'updateDate'
>
<el-form-item
label=
'更新日期'
prop=
'updateDate'
>
<el-date-picker
<el-date-picker
size=
"small"
size=
"small"
clearable
v-model=
"updateDate"
v-model=
"updateDate"
type=
"daterange"
type=
"daterange"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
...
@@ -57,6 +58,7 @@
...
@@ -57,6 +58,7 @@
<el-form-item
label=
'发布日期'
prop=
'releaseDate'
>
<el-form-item
label=
'发布日期'
prop=
'releaseDate'
>
<el-date-picker
<el-date-picker
size=
"small"
size=
"small"
clearable
v-model=
"releaseDate"
v-model=
"releaseDate"
type=
"daterange"
type=
"daterange"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
...
@@ -263,7 +265,7 @@
...
@@ -263,7 +265,7 @@
'page'
:
this
.
pageIndex
+
''
,
'page'
:
this
.
pageIndex
+
''
,
'limit'
:
this
.
pageSize
+
''
,
'limit'
:
this
.
pageSize
+
''
,
'title'
:
this
.
dataForm
.
title
,
'title'
:
this
.
dataForm
.
title
,
'levels'
:
this
.
dataForm
.
levels
,
'levels'
:
this
.
dataForm
.
levels
+
''
,
'author'
:
this
.
dataForm
.
author
,
'author'
:
this
.
dataForm
.
author
,
'editor'
:
this
.
dataForm
.
editor
,
'editor'
:
this
.
dataForm
.
editor
,
'keyword'
:
this
.
dataForm
.
keyword
,
'keyword'
:
this
.
dataForm
.
keyword
,
...
...
src/views/modules/service/doc-add-or-update.vue
0 → 100644
View file @
d493a532
<
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=
"title"
>
<el-input
v-model=
"dataForm.title"
placeholder=
"请输入显示标题"
size=
"small"
v-show=
"!showInfo"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
title
}}
</p>
</el-form-item>
<el-form-item
label=
'级别:'
prop=
'levels'
>
<el-select
v-model=
"dataForm.levels"
placeholder=
"请输入级别"
size=
"small"
v-show=
"!showInfo"
>
<el-option
v-for=
"item in levelList"
: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=
'category'
>
<el-select
v-model=
"dataForm.category"
placeholder=
"请输入类型"
size=
"small"
v-show=
"!showInfo"
@
change=
"changeType"
>
<el-option
label=
'表格下载'
value=
"1"
>
表格下载
</el-option>
<el-option
label=
"分支机构培训计划"
value=
"2"
>
分支机构培训计划
</el-option>
</el-select>
<p
v-show=
"showInfo"
>
{{
dataForm
.
category
}}
</p>
</el-form-item>
<el-form-item
label=
"作者:"
prop=
"author"
>
<el-input
v-model=
"dataForm.author"
placeholder=
"请输入作者"
size=
"small"
v-show=
"!showInfo"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
author
}}
</p>
</el-form-item>
<el-form-item
label=
"文件:"
prop=
"file"
>
<el-upload
class=
"upload-demo"
drag
action=
""
:show-file-list=
"false"
:http-request=
"UploadFile"
:before-upload=
"beforeUploadFile"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
</el-upload>
<p
v-show=
"showInfo"
><a
:href=
"fileUrlStr"
></a></p>
</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
>
export
default
{
data
()
{
return
{
loading
:
false
,
showInfo
:
false
,
visible
:
false
,
dataForm
:
{
id
:
0
,
title
:
''
,
author
:
''
,
levels
:
''
,
file
:
''
,
category
:
''
},
dataRule
:
{
title
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
author
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
levels
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
category
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
]
},
fileUrl
:
new
FormData
(),
fileUrlStr
:
''
,
dialogVisible
:
false
,
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
typeList
:
[
{
value
:
'1'
,
label
:
'表格下载'
},
{
value
:
'2'
,
label
:
'分支机构培训计划'
}
],
id
:
[],
title
:
''
}
},
created
()
{
},
mounted
()
{
},
methods
:
{
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/doc/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
()
}).
then
(({
data
})
=>
{
this
.
loading
=
false
if
(
data
&&
data
.
code
===
0
)
{
this
.
dataForm
=
data
.
newsmovie
// this.dataForm.title = data.newsmovie.title
// this.dataForm.titleOld = data.newsmovie.titleOld
// this.dataForm.keyword = data.newsmovie.keyword
// this.dataForm.longStr = data.newsmovie.longStr
// this.dataForm.stdate = data.newsmovie.stdate
// this.dataForm.clanguage = data.newsmovie.clanguage
// this.dataForm.author = data.newsmovie.author
// this.dataForm.levels = data.newsmovie.levels
// this.dataForm.directpath = data.newsmovie.directpath
// this.dataForm.pic = data.newsmovie.pic
// this.dataForm.wavname = data.newsmovie.wavname
// this.dataForm.content = data.newsmovie.content
this
.
imgUrlStr
=
data
.
newsmovie
.
pic
this
.
dialogVisible
=
true
this
.
videoUrlStr
=
data
.
newsmovie
.
wavname
this
.
ueditor
.
value
=
this
.
dataForm
.
content
}
})
}
})
},
// 表单提交
dataFormSubmit
()
{
this
.
loading
=
true
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/doc/
${
!
this
.
dataForm
.
id
?
'save'
:
'update'
}
`
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
this
.
dataForm
.
id
||
undefined
,
'title'
:
this
.
dataForm
.
title
,
'levels'
:
this
.
dataForm
.
levels
,
'author'
:
this
.
dataForm
.
author
,
'docfile'
:
this
.
dataForm
.
file
})
}).
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
)
}
})
}
})
},
beforeUploadFile
(
file
)
{
const
isLt100M
=
file
.
size
/
1024
/
1024
<
10
var
index
=
file
.
name
.
lastIndexOf
(
'.'
)
// 获取后缀
var
ext
=
file
.
name
.
substr
(
index
+
1
).
toLowerCase
()
// 输出结果
var
extarr
=
[
'doc'
,
'excel'
,
'pdf'
,
'xlsx'
,
'docx'
,
'xls'
]
if
(
extarr
.
indexOf
(
ext
)
===
-
1
)
{
this
.
$message
.
error
(
'上传文件只能是doc/docx/excel/xlsx/xls/pdf格式!'
)
return
false
}
alert
(
file
.
type
)
if
(
!
isLt100M
)
{
this
.
$message
.
error
(
'上传视频大小不能超过100MB哦!'
)
return
false
}
if
(
file
)
{
var
windowURL
=
window
.
URL
||
window
.
webkitURL
this
.
fileUrlStr
=
windowURL
.
createObjectURL
(
file
)
this
.
dialogVisible
=
true
this
.
fileUrl
.
append
(
'file'
,
file
)
console
.
log
(
this
.
fileUrlStr
)
console
.
log
(
file
)
}
},
UploadFile
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/file/uploadFile'
),
method
:
'post'
,
data
:
this
.
videoUrl
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
dataForm
.
file
=
res
.
data
.
data
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
clearInp
()
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
fileUrlStr
=
''
this
.
dialogVisible
=
false
},
changeType
(
e
)
{
console
.
log
(
e
)
}
}
}
</
script
>
<
style
scoped
>
.form-list
{
padding-left
:
4%
!important
;
}
.el-form-item__content
{
width
:
50%
;
}
.el-select
,
.el-input
{
width
:
100%
;
}
.edui-editor
{
width
:
100%
;
}
</
style
>
\ No newline at end of file
src/views/modules/service/doc.vue
0 → 100644
View file @
d493a532
<
template
>
<div
class=
"mod-config mod-list-form"
>
<div
class=
"title"
>
文档管理
</div>
<el-form
:inline=
"true"
:model=
"dataForm"
@
keyup
.
enter
.
native=
"getDataList()"
>
<el-form-item
label=
'标题'
prop=
'title'
>
<el-input
v-model=
'dataForm.title'
placeholder=
'请输入标题'
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
'级别'
prop=
'levels'
>
<el-select
v-model=
"dataForm.levels"
placeholder=
"请输入级别"
size=
"small"
clearable
>
<el-option
v-for=
"item in levelList"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
'类型'
prop=
'category'
>
<el-select
v-model=
"dataForm.category"
placeholder=
"请选择类型"
size=
"small"
>
<el-option
v-for=
"item in typeList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-button
class=
"seach-btn"
@
click=
"getDataList()"
type=
"primary"
size=
"small"
>
搜索
</el-button>
</el-form>
<div
class=
"add-btn"
>
<el-button
v-if=
"isAuth('manage:news:save')"
type=
"primary"
@
click=
"addOrUpdateHandle()"
>
+ 添加
</el-button>
</div>
<div
class=
"table-list"
>
<el-table
:data=
"dataList"
v-loading=
"dataListLoading"
@
selection-change=
"selectionChangeHandle"
>
<el-table-column
prop=
"levels"
header-align=
"center"
align=
"center"
label=
"级别"
>
</el-table-column>
<el-table-column
prop=
"title"
header-align=
"center"
align=
"center"
label=
"标题"
>
<template
slot-scope=
"scope"
>
<div>
<a
href=
"scope.row.docfile"
>
{{
scope
.
row
.
title
}}
</a>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"author"
header-align=
"center"
align=
"center"
label=
"作者"
>
</el-table-column>
<el-table-column
prop=
"category"
header-align=
"center"
align=
"center"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<div>
<span
v-if=
"scope.row.category === 1"
>
表格下载
</span>
<span
v-if=
"scope.row.category === 2"
>
分支机构培训计划
</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
type=
"text"
size=
"small"
@
click=
"checkHandle(scope.row.id,1)"
>
[成功]
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"checkHandle(scope.row.id,-1)"
>
[失败]
</el-button>
<br
/>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
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
'./doc-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
'title'
:
''
,
'category'
:
''
,
'levels'
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
typeList
:
[
{
value
:
'1'
,
label
:
'表格下载'
},
{
value
:
'2'
,
label
:
'分支机构培训计划'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/doc/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
})
}).
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/doc/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
)
}
})
})
},
// 审核
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/doc/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
)
}
})
})
}
}
}
</
script
>
src/views/modules/service/partners-add-or-update.vue
deleted
100644 → 0
View file @
aa109009
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<el-form
:model=
"dataForm"
:rules=
"dataRule"
ref=
"dataForm"
@
keyup
.
enter
.
native=
"dataFormSubmit()"
label-width=
"120px"
>
<el-form-item
label=
"原始标题:"
prop=
"titleOld"
>
<el-input
v-model=
"dataForm.titleOld"
placeholder=
"请输入原始标题"
></el-input>
</el-form-item>
<el-form-item
label=
"显示标题:"
prop=
"title"
>
<el-input
v-model=
"dataForm.title"
placeholder=
"请输入显示标题"
></el-input>
</el-form-item>
<el-form-item
label=
"显示最新要闻:"
prop=
"ishead"
>
<el-radio
v-model=
"dataForm.ishead"
label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"dataForm.ishead"
label=
"2"
>
否
</el-radio>
</el-form-item>
<el-form-item
label=
"跳转至:"
prop=
"directpath"
>
<el-input
v-model=
"dataForm.directpath"
placeholder=
"请输入跳转地址"
></el-input>
</el-form-item>
<el-form-item
label=
"栏目:"
prop=
"titleOld"
>
<el-select
v-model=
"dataForm.classid"
@
change=
"getClassList([dataForm.classid])"
style=
'width:121px!important'
>
<el-option
v-for=
"item in classidList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
<el-select
v-model=
"dataForm.cclassid"
style=
'width:121px!important'
>
<el-option
v-for=
"item in cclassidList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
'级别:'
prop=
'levels'
>
<el-select
v-model=
"dataForm.levels"
placeholder=
"请输入级别"
>
<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=
"showtime"
>
<el-date-picker
v-model=
"dataForm.showtime"
value-format=
'yyyy-MM-dd'
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"关键字:"
prop=
"keyword"
>
<el-input
v-model=
"dataForm.keyword"
placeholder=
"请输入关键字"
></el-input>
</el-form-item>
<el-form-item
label=
"稿源:"
prop=
"source"
>
<el-input
v-model=
"dataForm.source"
placeholder=
"请输入稿源"
></el-input>
</el-form-item>
<el-form-item
label=
"作者:"
prop=
"author"
>
<el-input
v-model=
"dataForm.author"
placeholder=
"请输入作者"
></el-input>
</el-form-item>
<el-form-item
label=
"上传图片:"
prop=
"pic"
>
<el-upload
class=
"avatar-uploader"
action=
""
:show-file-list=
"false"
:http-request=
"Upload"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"dialogVisible"
:src=
"imgUrlStr"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
<el-form-item
label=
"简介:"
prop=
"brief"
>
<el-input
type=
"textarea"
v-model=
"dataForm.brief"
placeholder=
"请输入简介"
></el-input>
</el-form-item>
<el-form-item
label=
"文章内容:"
prop=
"content"
>
<Ueditor
:value=
"ueditor.value"
:config=
"ueditor.config"
ref=
"ue"
></Ueditor>
<!--
<el-input
v-model=
"dataForm.content"
placeholder=
"请输入内容"
></el-input>
-->
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
</
template
>
<
script
>
import
Ueditor
from
'../temps/ueditor'
export
default
{
components
:
{
Ueditor
},
data
()
{
return
{
defaultProps
:
{
children
:
'children'
,
label
:
'label'
},
dataForm
:
{
id
:
0
,
title
:
''
,
titleOld
:
''
,
keyword
:
''
,
brief
:
''
,
author
:
''
,
source
:
''
,
levels
:
''
,
directpath
:
''
,
pic
:
''
,
content
:
''
,
ishead
:
'1'
,
showtime
:
''
,
classid
:
''
,
cclassid
:
''
,
cclassname
:
''
},
cclassidStr
:
undefined
,
dataRule
:
{
title
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
titleOld
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
keyword
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
brief
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
author
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
source
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
levels
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
directpath
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
pic
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
// content: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
classid
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
ishead
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
showtime
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
]
},
imgUrl
:
new
FormData
(),
imgUrlStr
:
''
,
dialogVisible
:
false
,
ueditor
:
{
value
:
''
,
config
:
{}
},
piclevelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
id
:
[],
classidList
:
[],
cclassidList
:
[],
title
:
''
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'添加'
:
'修改'
},
created
()
{
this
.
getClassList
([])
},
mounted
()
{
// this.ueditor.value = this.dataForm.content
},
methods
:
{
init
(
id
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
if
(
this
.
dataForm
.
id
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/partners/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
()
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
dataForm
.
title
=
data
.
news
.
title
this
.
dataForm
.
titleOld
=
data
.
news
.
titleOld
this
.
dataForm
.
keyword
=
data
.
news
.
keyword
this
.
dataForm
.
brief
=
data
.
news
.
brief
this
.
dataForm
.
author
=
data
.
news
.
author
this
.
dataForm
.
source
=
data
.
news
.
source
this
.
dataForm
.
levels
=
data
.
news
.
levels
this
.
dataForm
.
directpath
=
data
.
news
.
directpath
this
.
dataForm
.
pic
=
data
.
news
.
pic
this
.
dataForm
.
content
=
data
.
news
.
content
let
classArr
=
[]
if
(
data
.
news
.
cclassid
===
''
||
data
.
news
.
cclassid
===
null
)
{
classArr
.
push
(
data
.
news
.
classid
)
}
else
{
classArr
.
push
(
data
.
news
.
classid
)
classArr
.
push
(
data
.
news
.
cclassid
)
}
this
.
cclassidArr
=
classArr
this
.
dataForm
.
ishead
=
data
.
news
.
ishead
this
.
dataForm
.
showtime
=
data
.
news
.
showtime
this
.
imgUrlStr
=
data
.
news
.
pic
this
.
dialogVisible
=
true
}
})
}
})
},
// 表单提交
dataFormSubmit
()
{
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/partners/
${
!
this
.
dataForm
.
id
?
'save'
:
'update'
}
`
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
this
.
dataForm
.
id
||
undefined
,
'title'
:
this
.
dataForm
.
title
,
'titleOld'
:
this
.
dataForm
.
titleOld
,
'keyword'
:
this
.
dataForm
.
keyword
,
'brief'
:
this
.
dataForm
.
brief
,
'author'
:
this
.
dataForm
.
author
,
'source'
:
this
.
dataForm
.
source
,
'levels'
:
this
.
dataForm
.
levels
,
'directpath'
:
this
.
dataForm
.
directpath
,
'pic'
:
this
.
dataForm
.
pic
,
'content'
:
this
.
dataForm
.
content
,
'classid'
:
this
.
dataForm
.
classid
,
'cclassid'
:
this
.
dataForm
.
cclassid
,
'ishead'
:
this
.
dataForm
.
ishead
,
'showtime'
:
this
.
dataForm
.
showtime
})
}).
then
(({
data
})
=>
{
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
)
}
})
}
})
},
// 获取栏目列表
getClassList
(
id
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/newsclass/getNewsClassList`
),
method
:
'post'
,
data
:
id
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
if
(
id
.
length
===
0
)
{
this
.
classidList
=
data
.
data
}
else
{
this
.
dataForm
.
cclassid
=
''
this
.
cclassidList
=
data
.
data
[
0
].
child
}
}
else
{
this
.
$message
.
error
(
data
.
msg
)
}
})
},
// 上传之前校验
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
const
isPNG
=
file
.
type
===
'image/png'
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
if
(
!
isJPG
)
{
if
(
!
isPNG
)
{
this
.
$message
.
error
(
'上传图片只能是 JPG, PNG 格式!'
)
}
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传头像图片大小不能超过 2MB!'
)
}
if
(
file
)
{
var
windowURL
=
window
.
URL
||
window
.
webkitURL
this
.
imgUrlStr
=
windowURL
.
createObjectURL
(
file
)
this
.
dialogVisible
=
true
this
.
imgUrl
.
append
(
'file'
,
file
)
console
.
log
(
this
.
imgUrl
.
get
(
'file'
))
}
},
Upload
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/file/uploadFile'
),
method
:
'post'
,
data
:
this
.
imgUrl
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
dataForm
.
pic
=
res
.
data
.
data
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
// 选择栏目
handleChange
(
value
)
{
if
(
value
.
length
===
1
)
{
this
.
classid
=
value
[
0
]
}
else
if
(
value
.
length
===
2
)
{
this
.
dataForm
.
classid
=
value
[
0
]
this
.
dataForm
.
cclassid
=
value
[
1
]
}
},
clearInp
()
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
ueditor
.
value
=
''
},
// 更新父子组件内容
editorReady
(
instance
)
{
instance
.
setContent
(
this
.
dataForm
.
content
)
instance
.
addListener
(
'contentChange'
,
()
=>
{
this
.
dataForm
.
content
=
instance
.
getContent
()
})
}
}
}
</
script
>
<
style
scoped
>
.form-list
{
padding-left
:
4%
!important
;
}
.el-form-item__content
{
width
:
50%
;
}
.el-select
,
.el-input
{
width
:
241px
!important
;
}
.edui-editor
{
width
:
100%
;
}
</
style
>
\ No newline at end of file
src/views/modules/service/partners.vue
deleted
100644 → 0
View file @
aa109009
<
template
>
<div
class=
"mod-config mod-list-form"
>
<div
class=
"title"
>
提供商管理
</div>
<el-form
:inline=
"true"
:model=
"dataForm"
@
keyup
.
enter
.
native=
"getDataList()"
>
<el-form-item
label=
'标题'
prop=
'title'
>
<el-input
v-model=
'dataForm.title'
placeholder=
'请输入标题'
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
'作者'
prop=
'title'
>
<el-input
v-model=
'dataForm.author'
placeholder=
'请输入作者'
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
'编辑'
prop=
'editor'
>
<el-input
v-model=
'dataForm.editor'
placeholder=
'请输入编辑'
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
'关键字'
prop=
'keyword'
>
<el-input
v-model=
'dataForm.keyword'
placeholder=
'请输入关键字'
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
'状态'
prop=
'status'
>
<el-select
v-model=
"dataForm.status"
placeholder=
"请选择状态"
size=
"small"
>
<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=
'levels'
>
<el-select
v-model=
"dataForm.levels"
placeholder=
"请输入级别"
size=
"small"
>
<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
size=
"small"
v-model=
"releaseDate"
type=
"daterange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
'更新日期'
prop=
'updateDate'
>
<el-date-picker
size=
"small"
v-model=
"updateDate"
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"
size=
"small"
>
搜索
</el-button>
</el-form>
<div
class=
"add-btn"
>
<el-button
v-if=
"isAuth('manage:news:save')"
type=
"primary"
@
click=
"addOrUpdateHandle()"
>
+ 添加文章
</el-button>
</div>
<div
class=
"table-list"
>
<el-table
:data=
"dataList"
v-loading=
"dataListLoading"
@
selection-change=
"selectionChangeHandle"
>
<el-table-column
prop=
"levels"
header-align=
"center"
align=
"center"
label=
"级别"
>
</el-table-column>
<el-table-column
prop=
"title"
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=
"editor"
header-align=
"center"
align=
"center"
label=
"编辑"
>
</el-table-column>
<el-table-column
prop=
"lasteditor"
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
type=
"text"
@
click=
"checkHandle(scope.row.id,1)"
>
[成功]
</el-button>
<el-button
type=
"text"
@
click=
"checkHandle(scope.row.id,-1)"
>
[失败]
</el-button>
<br
/>
<el-button
type=
"text"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"addOrUpdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
@
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>
</div>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
dataForm
:
{
'title'
:
''
,
'levels'
:
''
,
'author'
:
''
,
'editor'
:
''
,
'keyword'
:
''
,
'status'
:
''
,
'auditor'
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
piclevelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
updateDate
:
[],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/news/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'levels'
:
this
.
dataForm
.
levels
,
'author'
:
this
.
dataForm
.
author
,
'editor'
:
this
.
dataForm
.
editor
,
'keyword'
:
this
.
dataForm
.
keyword
,
'status'
:
this
.
dataForm
.
status
,
'releaseTimeStart'
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
[
1
],
'auditor'
:
this
.
dataForm
.
auditor
})
}).
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
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'news-add-or-update'
,
query
:
{
id
:
id
}})
})
},
// 删除
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/news/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
)
}
})
})
},
// 审核
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/news/verifyNews'
),
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
)
}
})
})
}
}
}
</
script
>
static/config/index-prod.js
View file @
d493a532
...
@@ -2,13 +2,15 @@
...
@@ -2,13 +2,15 @@
* 生产环境
* 生产环境
*/
*/
;(
function
()
{
;(
function
()
{
window
.
SITE_CONFIG
=
{}
;
window
.
SITE_CONFIG
=
{}
// api接口请求地址
// api接口请求地址
window
.
SITE_CONFIG
[
'baseUrl'
]
=
'http://demo.open.renren.io/renren-fast-server'
;
// window.SITE_CONFIG['baseUrl'] = 'http://demo.open.renren.io/renren-fast-server';
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.0.77:9091'
window
.
SITE_CONFIG
[
'baseUrl'
]
=
' http://81.68.189.225:9091'
// cdn地址 = 域名 + 版本号
// cdn地址 = 域名 + 版本号
window
.
SITE_CONFIG
[
'domain'
]
=
'./'
;
// 域名
window
.
SITE_CONFIG
[
'domain'
]
=
'./'
// 域名
window
.
SITE_CONFIG
[
'version'
]
=
''
;
// 版本号(年月日时分)
window
.
SITE_CONFIG
[
'version'
]
=
''
// 版本号(年月日时分)
window
.
SITE_CONFIG
[
'cdnUrl'
]
=
window
.
SITE_CONFIG
.
domain
+
window
.
SITE_CONFIG
.
version
;
window
.
SITE_CONFIG
[
'cdnUrl'
]
=
window
.
SITE_CONFIG
.
domain
+
window
.
SITE_CONFIG
.
version
})()
;
})()
static/config/index-uat.js
View file @
d493a532
...
@@ -2,13 +2,15 @@
...
@@ -2,13 +2,15 @@
* 验收环境
* 验收环境
*/
*/
;(
function
()
{
;(
function
()
{
window
.
SITE_CONFIG
=
{}
;
window
.
SITE_CONFIG
=
{}
// api接口请求地址
// api接口请求地址
window
.
SITE_CONFIG
[
'baseUrl'
]
=
'http://localhost:8080/renren-fast'
;
// window.SITE_CONFIG['baseUrl'] = 'http://localhost:8080/renren-fast';
// window.SITE_CONFIG['baseUrl'] = ' http://192.168.0.77:9091'
window
.
SITE_CONFIG
[
'baseUrl'
]
=
' http://81.68.189.225:9091'
// cdn地址 = 域名 + 版本号
// cdn地址 = 域名 + 版本号
window
.
SITE_CONFIG
[
'domain'
]
=
'./'
;
// 域名
window
.
SITE_CONFIG
[
'domain'
]
=
'./'
// 域名
window
.
SITE_CONFIG
[
'version'
]
=
''
;
// 版本号(年月日时分)
window
.
SITE_CONFIG
[
'version'
]
=
''
// 版本号(年月日时分)
window
.
SITE_CONFIG
[
'cdnUrl'
]
=
window
.
SITE_CONFIG
.
domain
+
window
.
SITE_CONFIG
.
version
;
window
.
SITE_CONFIG
[
'cdnUrl'
]
=
window
.
SITE_CONFIG
.
domain
+
window
.
SITE_CONFIG
.
version
})()
;
})()
static/config/index.js
View file @
d493a532
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
* 开发环境
* 开发环境
*/
*/
;(
function
()
{
;(
function
()
{
window
.
SITE_CONFIG
=
{}
;
window
.
SITE_CONFIG
=
{}
// api接口请求地址
// api接口请求地址
window
.
SITE_CONFIG
[
'baseUrl'
]
=
'http://81.68.189.225:9091'
;
// window.SITE_CONFIG['baseUrl'] = 'http://81.68.189.225:9091'
window
.
SITE_CONFIG
[
'baseUrl'
]
=
' http://192.168.0.77:9091'
// cdn地址 = 域名 + 版本号
// cdn地址 = 域名 + 版本号
window
.
SITE_CONFIG
[
'domain'
]
=
'./'
;
// 域名
window
.
SITE_CONFIG
[
'domain'
]
=
'./'
// 域名
window
.
SITE_CONFIG
[
'version'
]
=
''
;
// 版本号(年月日时分)
window
.
SITE_CONFIG
[
'version'
]
=
''
// 版本号(年月日时分)
window
.
SITE_CONFIG
[
'cdnUrl'
]
=
window
.
SITE_CONFIG
.
domain
+
window
.
SITE_CONFIG
.
version
;
window
.
SITE_CONFIG
[
'cdnUrl'
]
=
window
.
SITE_CONFIG
.
domain
+
window
.
SITE_CONFIG
.
version
})()
;
})()
static/plugins/ueditor-1.4.3.3/ueditor.config.js
View file @
d493a532
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
// 服务器统一请求接口路径
// 服务器统一请求接口路径
// serverUrl: URL + 'jsp/controller.jsp',
// serverUrl: URL + 'jsp/controller.jsp',
serverUrl
:
'http://81.68.189.225:9091/office/ueditorConfig'
,
// serverUrl: 'http://81.68.189.225:9091/office/ueditorConfig',
serverUrl
:
window
.
SITE_CONFIG
.
baseUrl
+
'/office/ueditorConfig'
,
// 工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
// 工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
toolbars
:
[[
toolbars
:
[[
...
...
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