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
76f51f9d
Commit
76f51f9d
authored
Dec 09, 2021
by
Lyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面样式更改
parent
5efb5239
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
2293 additions
and
2513 deletions
+2293
-2513
_base.scss
src/assets/scss/_base.scss
+37
-29
index.js
src/router/index.js
+2
-0
indexcarouselmanage-add-or-update.vue
src/views/modules/info/indexcarouselmanage-add-or-update.vue
+18
-24
indexcarouselmanage.vue
src/views/modules/info/indexcarouselmanage.vue
+169
-175
news-add-or-update.vue
src/views/modules/info/news-add-or-update.vue
+24
-30
news.vue
src/views/modules/info/news.vue
+173
-175
newsmovie-add-or-update.vue
src/views/modules/info/newsmovie-add-or-update.vue
+20
-25
newsmovie.vue
src/views/modules/info/newsmovie.vue
+171
-176
newtopic-add-or-update.vue
src/views/modules/info/newtopic-add-or-update.vue
+20
-25
newtopic.vue
src/views/modules/info/newtopic.vue
+158
-163
picture-add-or-update.vue
src/views/modules/info/picture-add-or-update.vue
+24
-26
picture.vue
src/views/modules/info/picture.vue
+173
-178
logistics-add-or-update.vue
src/views/modules/logistics/logistics-add-or-update.vue
+18
-40
logistics.vue
src/views/modules/logistics/logistics.vue
+171
-176
medical-add-or-update.vue
src/views/modules/medical/medical-add-or-update.vue
+17
-40
medical.vue
src/views/modules/medical/medical.vue
+152
-157
center-add-or-update.vue
src/views/modules/party/center-add-or-update.vue
+18
-41
center.vue
src/views/modules/party/center.vue
+168
-172
hotFlow-add-or-update.vue
src/views/modules/party/hotFlow-add-or-update.vue
+19
-41
hotFlow.vue
src/views/modules/party/hotFlow.vue
+167
-171
rules-add-or-update.vue
src/views/modules/party/rules-add-or-update.vue
+19
-41
rules.vue
src/views/modules/party/rules.vue
+167
-171
topicnews-add-or-update.vue
src/views/modules/party/topicnews-add-or-update.vue
+19
-42
topicnews.vue
src/views/modules/party/topicnews.vue
+167
-171
policy-add-or-update.vue
src/views/modules/policy/policy-add-or-update.vue
+24
-41
policy.vue
src/views/modules/policy/policy.vue
+177
-182
ueditor.config.js
static/plugins/ueditor-1.4.3.3/ueditor.config.js
+1
-1
No files found.
src/assets/scss/_base.scss
View file @
76f51f9d
...
...
@@ -434,13 +434,37 @@ img {
>
.el-form
,>
.table-list
,>
.add-btn
,
.form-list
,
.sub-btn
{
width
:
96%
;
margin-left
:
2%
;
//
margin-left: 2%;
background-color
:
#fff
;
}
.avatar-uploader
>
.el-upload
{
border
:
2px
dashed
#666666
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
.avatar-uploader-icon
{
font-size
:
40px
;
color
:
#666666
;
width
:
64px
;
height
:
64px
;
line-height
:
64px
;
text-align
:
center
;
}
.avatar
{
width
:
64px
;
height
:
64px
;
display
:
block
;
}
.form-list
{
margin-top
:
20px
;
padding
:
40px
0
100px
20%
;
//
margin-top: 20px;
//
padding: 40px 0 100px 20%;
color
:
rgba
(
0
,
0
,
0
,
0
.847058823529412
);
.base-info
{
font-family
:
'PingFangSC-Semibold'
,
'PingFang SC Semibold'
,
'PingFang SC'
;
...
...
@@ -488,29 +512,7 @@ img {
.el-form-item
{
margin-bottom
:
32px
;
}
.avatar-uploader
>
.el-upload
{
border
:
2px
dashed
#666666
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
.avatar-uploader-icon
{
font-size
:
40px
;
color
:
#666666
;
width
:
64px
;
height
:
64px
;
line-height
:
64px
;
text-align
:
center
;
}
.avatar
{
width
:
64px
;
height
:
64px
;
display
:
block
;
}
}
.sub-btn
{
margin-top
:
20px
;
...
...
@@ -527,7 +529,7 @@ img {
}
>
.el-form
{
position
:
relative
;
margin-top
:
25px
;
//
margin-top: 25px;
padding-top
:
25px
;
border-bottom
:
1px
solid
rgba
(
242
,
242
,
242
,
1
);
...
...
@@ -572,14 +574,14 @@ img {
border-top-color
:
#666
}
.cell
{
white-space
:
pre-line
;
//
white-space: pre-line;
}
}
.el-table
td
.is-center
,
.el-table
th
.is-center
{
text-align
:
left
;
font-weight
:
500
;
font-style
:
normal
;
font-size
:
14px
;
//
font-size: 14px;
color
:
#656565
;
line-height
:
18px
;
}
...
...
@@ -592,6 +594,12 @@ img {
}
}
.el-dialog__body
{
p
{
font-size
:
12px
;
line-height
:
12px
;
}
}
}
...
...
src/router/index.js
View file @
76f51f9d
...
...
@@ -36,6 +36,8 @@ const mainRoutes = {
// 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
{
path
:
'/home'
,
component
:
_import
(
'common/home'
),
name
:
'home'
,
meta
:
{
title
:
'首页'
}
},
{
path
:
'/theme'
,
component
:
_import
(
'common/theme'
),
name
:
'theme'
,
meta
:
{
title
:
'主题'
}
},
{
path
:
'/demo-echarts'
,
component
:
_import
(
'demo/echarts'
),
name
:
'demo-echarts'
,
meta
:
{
title
:
'demo-echarts'
,
isTab
:
true
}
},
{
path
:
'/demo-ueditor'
,
component
:
_import
(
'demo/ueditor'
),
name
:
'demo-ueditor'
,
meta
:
{
title
:
'demo-ueditor'
,
isTab
:
true
}
},
{
path
:
'/picture-add'
,
component
:
_import
(
'modules/info/picture-add-or-update'
),
name
:
'picture-add'
,
meta
:
{
title
:
'图片资讯添加'
,
isTab
:
true
}
},
{
path
:
'/picture-update'
,
component
:
_import
(
'modules/info/picture-add-or-update'
),
name
:
'picture-update'
,
meta
:
{
title
:
'图片资讯编辑'
,
isTab
:
true
}
},
...
...
src/views/modules/info/indexcarouselmanage-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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=
"100px"
v-loading=
'loading'
>
<el-form-item
label=
"标题:"
prop=
"title"
>
<el-input
v-model=
"dataForm.title"
placeholder=
"请输入标题"
size=
"small"
v-show=
"!showInfo"
></el-input>
...
...
@@ -80,14 +81,11 @@
<p><img
:src=
"imgUrlStr"
class=
"avatar"
v-show=
"showInfo"
></p>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
<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
>
...
...
@@ -95,7 +93,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
!!
this
.
$route
.
query
.
showInfo
,
showInfo
:
false
,
visible
:
false
,
title
:
''
,
dataForm
:
{
id
:
0
,
...
...
@@ -167,25 +166,19 @@
mounted
()
{
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'添加首页轮播'
:
'修改首页轮播'
},
created
()
{
this
.
$route
.
meta
.
title
=
!
this
.
$route
.
query
.
id
?
'添加首页轮播'
:
'修改首页轮播'
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
loading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/indexCarouselManage/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
...
...
@@ -235,7 +228,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'info-indexcarouselmanage'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
src/views/modules/info/indexcarouselmanage.vue
View file @
76f51f9d
<
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"
clearable
></el-input>
...
...
@@ -50,7 +49,7 @@
<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:picture:save')"
type=
"primary"
@
click=
"addOrUpdateHandle()"
>
+ 添加
首页轮播
</el-button>
<el-button
v-if=
"isAuth('manage:picture:save')"
type=
"primary"
@
click=
"addOrUpdateHandle()"
>
+ 添加
</el-button>
</div>
<div
class=
"table-list"
>
<el-table
...
...
@@ -135,8 +134,8 @@
<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"
@
click=
"infoHandle(scope.row.id
)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true
)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
@@ -150,188 +149,183 @@
:total=
"totalPage"
layout=
"total, sizes, prev, pager, next, jumper"
>
</el-pagination>
</div>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
v-if=
"addOrUpdateVisible"
ref=
"addOrUpdate"
@
refreshDataList=
"getDataList"
></add-or-update>
</div>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
dataForm
:
{
title
:
''
,
levels
:
'0'
,
status
:
''
,
classnum
:
''
,
inputdate
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
addOrUpdateVisible
:
false
,
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
classnumList
:
[
{
label
:
'大轮播'
},
{
label
:
'小轮播'
}
],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
import
AddOrUpdate
from
'./indexcarouselmanage-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
title
:
''
,
levels
:
'0'
,
status
:
''
,
classnum
:
''
,
inputdate
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
classnumList
:
[
{
label
:
'大轮播'
},
{
label
:
'小轮播'
}
],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/indexCarouselManage/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'status'
:
this
.
dataForm
.
status
,
'levels'
:
this
.
dataForm
.
levels
,
'classnum'
:
this
.
dataForm
.
classnum
,
'inputDataStart'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
0
],
'inputDataEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
]
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/indexCarouselManage/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'status'
:
this
.
dataForm
.
status
,
'levels'
:
this
.
dataForm
.
levels
,
'classnum'
:
this
.
dataForm
.
classnum
,
'inputDataStart'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
0
],
'inputDataEnd'
:
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
})
},
})
}).
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'indexcarouselmanage-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'indexcarouselmanage-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'indexcarouselmanage-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/indexcarouselmanage/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
(()
=>
{})
},
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/indexcarouselmanage/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/indexCarouselManage/verifyIndexCarouselManage'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
id
,
'checkflagIndex'
:
1
})
}).
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/indexCarouselManage/verifyIndexCarouselManage'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
id
,
'checkflagIndex'
:
1
})
}).
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
>
<
style
scoped
>
.el-select-dropdown__item
{
...
...
src/views/modules/info/news-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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'
>
<div
class=
"base-info"
>
基本信息
</div>
<el-form-item
label=
"原始标题:"
prop=
"titleOld"
>
<el-input
v-model=
"dataForm.titleOld"
placeholder=
"请输入原始标题"
v-show=
"!showInfo"
size=
"small"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
titleOld
}}
</p>
...
...
@@ -101,14 +101,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
<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
>
...
...
@@ -120,7 +117,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
this
.
$route
.
query
.
showInfo
,
showInfo
:
false
,
visible
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -200,17 +198,9 @@
cclassName
:
''
}
},
activated
()
{
this
.
getClassList
([])
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'添加文章'
:
'修改文章'
},
created
()
{
created
()
{
this
.
getClassList
([])
},
mounted
()
{
console
.
log
(
this
.
classidList
)
...
...
@@ -222,12 +212,14 @@
})
return
arr
[
0
].
name
},
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
loading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/news/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
...
...
@@ -279,7 +271,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'info-news'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -357,7 +350,7 @@
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
dataForm
.
content
=
''
this
.
ueditor
.
value
=
''
},
// 更新父子组件内容
editorReady
(
instance
)
{
...
...
@@ -370,7 +363,7 @@
}
</
script
>
<
style
scoped
>
.form-list
{
/*
.form-list{
padding-left: 4%!important;
}
.el-form-item__content{
...
...
@@ -381,5 +374,5 @@
}
.edui-editor{
width: 100%;
}
}
*/
</
style
>
\ No newline at end of file
src/views/modules/info/news.vue
View file @
76f51f9d
<
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"
clearable
></el-input>
...
...
@@ -61,7 +60,7 @@
<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>
<el-button
v-if=
"isAuth('manage:news:save')"
type=
"primary"
@
click=
"addOrUpdateHandle()"
>
+ 添加
</el-button>
</div>
<div
class=
"table-list"
>
<el-table
...
...
@@ -73,6 +72,7 @@
prop=
"levels"
header-align=
"center"
align=
"center"
width=
"50px"
label=
"级别"
>
</el-table-column>
<el-table-column
...
...
@@ -145,12 +145,12 @@
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>
<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"
@
click=
"infoHandle(scope.row.id
)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true
)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -164,183 +164,181 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
'title'
:
''
,
'levels'
:
'0'
,
'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
:
{
import
AddOrUpdate
from
'./news-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
'title'
:
''
,
'levels'
:
'0'
,
'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
===
null
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
===
null
?
''
:
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
})
},
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
===
null
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
===
null
?
''
:
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'news-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'news-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'news-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/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
)
}
})
}).
catch
(()
=>
{})
},
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
)
}
})
}).
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/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
)
}
})
}).
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/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
)
}
})
}).
catch
(()
=>
{})
}
}
}
</
script
>
src/views/modules/info/newsmovie-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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'
>
<div
class=
"base-info"
>
基本信息
</div>
<el-form-item
label=
"原始标题:"
prop=
"titleOld"
>
...
...
@@ -93,14 +94,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
<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
>
...
...
@@ -112,7 +110,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
!!
this
.
$route
.
query
.
showInfo
,
showInfo
:
false
,
visible
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -185,25 +184,20 @@
title
:
''
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'添加视频'
:
'修改视频'
},
created
()
{
},
mounted
()
{
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
loading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/news/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
...
...
@@ -264,7 +258,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'info-newsmovie'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -328,7 +323,7 @@
this
.
videoUrlStr
=
windowURL
.
createObjectURL
(
file
)
this
.
dialogVisible2
=
true
this
.
videoUrl
.
append
(
'file'
,
file
)
console
.
log
(
this
.
videUrl
.
get
(
'file'
)
)
console
.
log
(
file
)
}
},
UploadVideo
()
{
...
...
src/views/modules/info/newsmovie.vue
View file @
76f51f9d
<
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>
...
...
@@ -181,12 +180,12 @@
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>
<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"
@
click=
"infoHandle(scope.row.id
)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true
)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -200,185 +199,181 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
'title'
:
''
,
'author'
:
''
,
'editor'
:
''
,
'keyword'
:
''
,
'status'
:
''
,
'clanguage'
:
''
,
'levels'
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
clanguageList
:
[
'中文'
],
updateDate
:
[],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
import
AddOrUpdate
from
'./newsmovie-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
'title'
:
''
,
'author'
:
''
,
'editor'
:
''
,
'keyword'
:
''
,
'status'
:
''
,
'clanguage'
:
''
,
'levels'
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
clanguageList
:
[
'中文'
],
updateDate
:
[],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/newsmovie/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
,
'clanguage'
:
this
.
dataForm
.
clanguage
,
'releaseTimeStart'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
===
null
?
''
:
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/newsmovie/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
,
'clanguage'
:
this
.
dataForm
.
clanguage
,
'releaseTimeStart'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
===
null
?
''
:
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'newsmovie-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'newsmovie-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'newsmovie-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/newsmovie/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
(()
=>
{})
},
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/newsmovie/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/newsmovie/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
(()
=>
{})
}
}
}
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/newsmovie/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/info/newtopic-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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'
>
<div
class=
"base-info"
>
基本信息
</div>
<el-form-item
label=
"专题描述:"
prop=
"title"
>
...
...
@@ -84,14 +85,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
<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
>
...
...
@@ -103,7 +101,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
!!
this
.
$route
.
query
.
showInfo
,
showInfo
:
false
,
visible
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -178,14 +177,7 @@
watch
:
{
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'添加深度专题'
:
'修改深度专题'
},
created
()
{
this
.
getClassList
([])
},
...
...
@@ -193,12 +185,14 @@
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
loading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/newtopic/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
...
...
@@ -244,7 +238,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'info-newtopic'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -314,7 +309,7 @@
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
$refs
.
ue
.
setClearUEContent
(
''
)
this
.
ueditor
.
value
=
''
},
// 更新父子组件内容
editorReady
(
instance
)
{
...
...
src/views/modules/info/newtopic.vue
View file @
76f51f9d
<
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"
clearable
></el-input>
...
...
@@ -40,7 +39,7 @@
<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>
<el-button
v-if=
"isAuth('manage:news:save')"
type=
"primary"
@
click=
"addOrUpdateHandle()"
>
+ 添加
</el-button>
</div>
<div
class=
"table-list"
>
<el-table
...
...
@@ -121,8 +120,8 @@
<el-button
type=
"text"
@
click=
"checkHandle(scope.row.classid,1)"
>
[成功]
</el-button>
<el-button
type=
"text"
@
click=
"checkHandle(scope.row.classid,-1)"
>
[失败]
</el-button>
<br
/>
<el-button
type=
"text"
@
click=
"infoHandle(scope.row.classid
)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.classid)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.classid,true
)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.classid)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.classid)"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
@@ -136,174 +135,170 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
title
:
''
,
levels
:
'0'
,
status
:
''
,
classnum
:
''
,
inputdate
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
import
AddOrUpdate
from
'./news-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
title
:
''
,
levels
:
'0'
,
status
:
''
,
classnum
:
''
,
inputdate
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
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/newtopic/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
+
''
,
'limit'
:
this
.
pageSize
+
''
,
'title'
:
this
.
dataForm
.
title
,
'status'
:
this
.
dataForm
.
status
,
'levels'
:
this
.
dataForm
.
levels
,
'inputDataStart'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
0
],
'inputDataEnd'
:
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/newtopic/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
+
''
,
'limit'
:
this
.
pageSize
+
''
,
'title'
:
this
.
dataForm
.
title
,
'status'
:
this
.
dataForm
.
status
,
'levels'
:
this
.
dataForm
.
levels
,
'inputDataStart'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
0
],
'inputDataEnd'
:
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'newtopic-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'newtopic-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'newtopic-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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
.
classid
})
this
.
$confirm
(
`确定对[id=
${
ids
.
join
(
','
)}
]进行[
${
id
?
'删除'
:
'批量删除'
}
]操作?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/newtopic/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
(()
=>
{})
},
deleteHandle
(
id
)
{
var
ids
=
id
?
[
id
]
:
this
.
dataListSelections
.
map
(
item
=>
{
return
item
.
classid
})
this
.
$confirm
(
`确定对[id=
${
ids
.
join
(
','
)}
]进行[
${
id
?
'删除'
:
'批量删除'
}
]操作?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/newtopic/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/newtopic/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
(()
=>
{})
}
}
}
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/newtopic/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/info/picture-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<el-dialog
:title=
"!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
:close-on-click-modal=
"false"
:visible
.
sync=
"visible"
>
<el-form
:model=
'dataForm'
:rules=
'dataRule'
...
...
@@ -70,15 +71,11 @@
<p><img
:src=
"imgUrlStr"
class=
"avatar"
v-show=
"showInfo"
></p>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
<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>
</div>
</div>
</el-dialog>
</
template
>
<
script
>
...
...
@@ -86,9 +83,11 @@ export default {
data
()
{
return
{
loading
:
false
,
showInfo
:
!!
this
.
$route
.
query
.
showInfo
,
visible
:
false
,
showInfo
:
false
,
title
:
''
,
dataForm
:
{
id
:
0
,
title
:
''
,
pictureType
:
''
,
picFile
:
''
,
...
...
@@ -176,26 +175,22 @@ export default {
dialogVisible
:
false
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
},
created
()
{
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
this
.
dataForm
.
pictureid
=
id
||
0
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
if
(
this
.
dataForm
.
pictureid
)
{
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
loading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/picture/info/
${
this
.
dataForm
.
picture
id
}
`
`/office/picture/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
()
...
...
@@ -245,7 +240,8 @@ export default {
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'info-picture'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -296,7 +292,9 @@ export default {
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
ueditor
.
value
=
''
}
}
}
</
script
>
...
...
src/views/modules/info/picture.vue
View file @
76f51f9d
<
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
size=
"small"
v-model=
'dataForm.title'
placeholder=
'请输入标题'
clearable
></el-input>
...
...
@@ -56,7 +55,7 @@
<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:picture:save')"
type=
"primary"
@
click=
"addOrUpdateHandle()"
>
+ 添加
图片
</el-button>
<el-button
v-if=
"isAuth('manage:picture:save')"
type=
"primary"
@
click=
"addOrUpdateHandle()"
>
+ 添加
</el-button>
</div>
<div
class=
"table-list"
>
<el-table
...
...
@@ -66,7 +65,7 @@
@
selection-change=
"selectionChangeHandle"
>
<el-table-column
prop=
"piclevel"
header-align=
"center"
label=
"级别"
>
</el-table-column>
<el-table-column
prop=
"title"
header-align=
"center"
:show-overflow-tooltip=
"true"
label=
"标题"
>
<el-table-column
prop=
"title"
header-align=
"center"
label=
"标题"
>
<template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
title
}}
...
...
@@ -74,7 +73,7 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"pictureType"
header-align=
"center"
label=
"分类"
>
</el-table-column>
<el-table-column
prop=
"showtime"
header-align=
"center"
sortable
show-overflow-tooltip
label=
"显示时间"
>
</el-table-column>
<el-table-column
prop=
"showtime"
header-align=
"center"
sortable
label=
"显示时间"
>
</el-table-column>
<el-table-column
prop=
"inputdate"
header-align=
"center"
sortable
label=
"发布时间"
>
</el-table-column>
<el-table-column
prop=
"keyword"
header-align=
"center"
label=
"关键字"
>
</el-table-column>
<el-table-column
prop=
"editor"
header-align=
"center"
label=
"编辑"
>
</el-table-column>
...
...
@@ -94,12 +93,12 @@
width=
"150"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"checkHandle(scope.row.pictureid,1)"
>
[成功]
</el-button>
<el-button
type=
"text"
@
click=
"checkHandle(scope.row.pictureid,-1)"
>
[失败]
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"checkHandle(scope.row.pictureid,1)"
>
[成功]
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"checkHandle(scope.row.pictureid,-1)"
>
[失败]
</el-button>
<br
/>
<el-button
type=
"text"
@
click=
"infoHandle(scope.row.pictureid
)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.pictureid)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.pictureid)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.pictureid,true
)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.pictureid)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteHandle(scope.row.pictureid)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -112,187 +111,183 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
title
:
''
,
pictureLevel
:
'0'
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
pictureType
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
pictureLevel
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
pictureTypeList
:
[
{
value
:
'1'
,
label
:
'图片信息'
}
],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
import
AddOrUpdate
from
'./picture-add-or-update'
export
default
{
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
title
:
''
,
pictureLevel
:
'0'
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
pictureType
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
pictureLevel
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
pictureTypeList
:
[
{
value
:
'1'
,
label
:
'图片信息'
}
],
releaseDate
:
[]
}
},
components
:
{
AddOrUpdate
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/picture/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'pictureLevel'
:
this
.
dataForm
.
pictureLevel
,
'editor'
:
this
.
dataForm
.
editor
,
'keyword'
:
this
.
dataForm
.
keyword
,
'status'
:
this
.
dataForm
.
status
,
'pictureType'
:
this
.
dataForm
.
pictureType
,
'inputDataStart'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
0
],
'inputDataEnd'
:
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/picture/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'pictureLevel'
:
this
.
dataForm
.
pictureLevel
,
'editor'
:
this
.
dataForm
.
editor
,
'keyword'
:
this
.
dataForm
.
keyword
,
'status'
:
this
.
dataForm
.
status
,
'pictureType'
:
this
.
dataForm
.
pictureType
,
'inputDataStart'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
0
],
'inputDataEnd'
:
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增 / 修改
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'picture-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'picture-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'picture-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/picture/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
(
e
=>
e
)
},
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/picture/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
(
e
=>
e
)
},
// 审核
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/picture/verifyPicture'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'pictureid'
:
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
(
e
=>
e
)
}
}
}
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/picture/verifyPicture'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'pictureid'
:
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
(
e
=>
e
)
}
}
}
</
script
>
<
style
scoped
>
.el-select-dropdown__item
{
...
...
src/views/modules/logistics/logistics-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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'
>
<div
class=
"base-info"
>
基本信息
</div>
<el-form-item
label=
"原始标题:"
prop=
"oldtitle"
>
<el-input
v-model=
"dataForm.oldtitle"
placeholder=
"请输入显示标题"
v-show=
"!showInfo"
size=
"small"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
titleOld
}}
</p>
...
...
@@ -81,14 +81,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
<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>
</div>
</div>
</el-dialog>
</
template
>
<
script
>
...
...
@@ -100,7 +97,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
this
.
$route
.
query
.
showInfo
||
false
,
visible
:
false
,
showInfo
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -182,23 +180,17 @@
title
:
''
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'新增'
:
'修改'
},
created
()
{
this
.
getMedicalTypeList
()
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/logistics/info/
${
this
.
dataForm
.
id
}
`
),
...
...
@@ -252,7 +244,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'logistics-logistics'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -267,7 +260,7 @@
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
dataForm
.
value
=
''
this
.
ueditor
.
value
=
''
},
// 获取医疗管理列表
getMedicalTypeList
()
{
...
...
@@ -285,17 +278,3 @@
}
}
</
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/logistics/logistics.vue
View file @
76f51f9d
<
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"
clearable
></el-input>
...
...
@@ -87,12 +86,12 @@
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>
<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"
@
click=
"infoHandle(scope.row.id)"
>
详情
</el-button>
--
>
<el-button
type=
"text"
@
click=
"updateHandle(scope.row.id)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
<
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>
...
...
@@ -106,187 +105,183 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
title
:
''
,
type
:
''
,
keyword
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
typeList
:
[
{
typeName
:
'标准'
},
{
typeName
:
'指南&案例'
},
{
typeName
:
'政策法规&行业资讯'
},
{
typeName
:
'常见问题'
}
]
}
},
activated
()
{
this
.
getDataList
()
},
created
()
{
this
.
getMedicalTypeList
()
},
methods
:
{
import
AddOrUpdate
from
'./logistics-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
title
:
''
,
type
:
''
,
keyword
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
typeList
:
[
{
typeName
:
'标准'
},
{
typeName
:
'指南&案例'
},
{
typeName
:
'政策法规&行业资讯'
},
{
typeName
:
'常见问题'
}
]
}
},
activated
()
{
this
.
getDataList
()
},
created
()
{
this
.
getMedicalTypeList
()
},
methods
:
{
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/logistics/list'
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'type'
:
this
.
dataForm
.
type
===
null
?
''
:
this
.
dataForm
.
type
,
'keyword'
:
this
.
dataForm
.
keyword
})
}).
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/logistics/list'
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'type'
:
this
.
dataForm
.
type
===
null
?
''
:
this
.
dataForm
.
type
,
'keyword'
:
this
.
dataForm
.
keyword
})
}).
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'logistics-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'logistics-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'logistics-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/logistics/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
(()
=>
{})
},
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/logistics/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
(()
=>
{})
},
// 获取医疗管理列表
getMedicalTypeList
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/medical/getMedicalTypeList'
),
method
:
'get'
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
typeList
=
data
.
list
}
else
{
this
.
typeList
=
[]
}
})
},
getMedicalTypeList
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/medical/getMedicalTypeList'
),
method
:
'get'
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
typeList
=
data
.
list
}
else
{
this
.
typeList
=
[]
}
})
},
// 审核
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/logistics/verifyLogistics'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
id
,
'status'
:
1
})
}).
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/logistics/verifyLogistics'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
id
,
'status'
:
1
})
}).
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/medical/medical-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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'
>
<div
class=
"base-info"
>
基本信息
</div>
<el-form-item
label=
"标题:"
prop=
"title"
>
<el-input
v-model=
"dataForm.title"
placeholder=
"请输入显示标题"
v-show=
"!showInfo"
size=
"small"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
title
}}
</p>
...
...
@@ -77,14 +77,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
<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>
</div>
</div>
</el-dialog>
</
template
>
<
script
>
...
...
@@ -96,7 +93,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
this
.
$route
.
query
.
showInfo
||
false
,
visible
:
false
,
showInfo
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -161,14 +159,6 @@
title
:
''
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'新增'
:
'修改'
},
created
()
{
this
.
getMedicalTypeList
()
...
...
@@ -176,11 +166,12 @@
mounted
()
{
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/medical/info/
${
this
.
dataForm
.
id
}
`
),
...
...
@@ -233,7 +224,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'medical-medical'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -261,22 +253,8 @@
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
dataForm
.
value
=
''
this
.
ueditor
.
value
=
''
}
}
}
</
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/medical/medical.vue
View file @
76f51f9d
<
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"
clearable
></el-input>
...
...
@@ -85,12 +84,12 @@
width=
"150"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
type=
"text"
@
click=
"infoHandle(scope.row.id)"
>
详情
</el-button>
-->
<el-button
type=
"text"
@
click=
"checkHandle(scope.row.id,1)"
>
[成功]
</el-button>
<el-button
type=
"text"
@
click=
"checkHandle(scope.row.id,-1)"
>
[失败]
</el-button>
<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"
@
click=
"updateHandle(scope.row.id)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
<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>
...
...
@@ -104,168 +103,164 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
title
:
''
,
type
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
typeList
:
[]
}
},
activated
()
{
this
.
getMedicalTypeList
()
this
.
getDataList
()
},
methods
:
{
import
AddOrUpdate
from
'./medical-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
title
:
''
,
type
:
''
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
typeList
:
[]
}
},
activated
()
{
this
.
getMedicalTypeList
()
this
.
getDataList
()
},
methods
:
{
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/medical/list'
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'type'
:
this
.
dataForm
.
type
===
null
?
''
:
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/medical/list'
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'type'
:
this
.
dataForm
.
type
===
null
?
''
:
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'medical-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'medical-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'medical-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/medical/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
(()
=>
{})
},
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/medical/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
(()
=>
{})
},
// 获取医疗管理列表
getMedicalTypeList
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/medical/getMedicalTypeList'
),
method
:
'get'
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
typeList
=
data
.
list
}
else
{
this
.
typeList
=
[]
}
})
},
getMedicalTypeList
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/medical/getMedicalTypeList'
),
method
:
'get'
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
typeList
=
data
.
list
}
else
{
this
.
typeList
=
[]
}
})
},
// 审核
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/medical/verifyMedical'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
id
,
'status'
:
1
})
}).
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/medical/verifyMedical'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'id'
:
id
,
'status'
:
1
})
}).
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/party/center-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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'
>
<div
class=
"base-info"
>
基本信息
</div>
<el-form-item
label=
"原始标题:"
prop=
"titleOld"
>
<el-input
v-model=
"dataForm.titleOld"
placeholder=
"请输入原始标题"
v-show=
"!showInfo"
size=
"small"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
titleOld
}}
</p>
...
...
@@ -75,14 +75,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
<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
>
...
...
@@ -94,7 +91,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
this
.
$route
.
query
.
showInfo
,
visible
:
false
,
showInfo
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -163,22 +161,15 @@
title
:
''
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'添加'
:
'修改'
},
created
()
{
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
// this.$refs['dataForm'].resetFields()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
$http
({
...
...
@@ -230,7 +221,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'party-center'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -290,7 +282,7 @@
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
dataForm
.
content
=
''
this
.
ueditor
.
value
=
''
},
// 更新父子组件内容
editorReady
(
instance
)
{
...
...
@@ -302,17 +294,3 @@
}
}
</
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/party/center.vue
View file @
76f51f9d
...
...
@@ -145,12 +145,12 @@
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>
<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"
@
click=
"infoHandle(scope.row.id)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -164,182 +164,178 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
title
:
''
,
author
:
''
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
levels
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
updateDate
:
[],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
import
AddOrUpdate
from
'./center-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
title
:
''
,
author
:
''
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
levels
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
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/center/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'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
]
===
undefined
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
[
1
]
===
undefined
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
[
0
]
===
undefined
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
[
1
]
===
undefined
?
''
:
this
.
updateDate
[
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/center/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'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
]
===
undefined
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
[
1
]
===
undefined
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
[
0
]
===
undefined
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
[
1
]
===
undefined
?
''
:
this
.
updateDate
[
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'center-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'center-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'center-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/center/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
(()
=>
{})
},
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/center/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/center/verifyTopic'
),
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
(()
=>
{})
}
}
}
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/center/verifyTopic'
),
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/party/hotFlow-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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'
>
<div
class=
"base-info"
>
基本信息
</div>
<el-form-item
label=
"原始标题:"
prop=
"titleOld"
>
<el-input
v-model=
"dataForm.titleOld"
placeholder=
"请输入原始标题"
v-show=
"!showInfo"
size=
"small"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
titleOld
}}
</p>
...
...
@@ -75,14 +75,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
<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
>
...
...
@@ -94,7 +91,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
this
.
$route
.
query
.
showInfo
,
visible
:
false
,
showInfo
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -160,22 +158,16 @@
title
:
''
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'添加'
:
'修改'
},
created
()
{
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/news/info/
${
this
.
dataForm
.
id
}
`
),
...
...
@@ -226,7 +218,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'party-hotFlow'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -286,7 +279,7 @@
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
dataForm
.
content
=
''
this
.
ueditor
.
value
=
''
},
// 更新父子组件内容
editorReady
(
instance
)
{
...
...
@@ -298,17 +291,3 @@
}
}
</
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/party/hotFlow.vue
View file @
76f51f9d
...
...
@@ -145,12 +145,12 @@
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>
<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"
@
click=
"infoHandle(scope.row.id)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -164,181 +164,177 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
title
:
''
,
author
:
''
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
levels
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
updateDate
:
[],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
import
AddOrUpdate
from
'./hotFlow-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
title
:
''
,
author
:
''
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
levels
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
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/hotFlow/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'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
]
===
undefined
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
[
1
]
===
undefined
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
[
0
]
===
undefined
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
[
1
]
===
undefined
?
''
:
this
.
updateDate
[
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/hotFlow/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'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
]
===
undefined
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
[
1
]
===
undefined
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
[
0
]
===
undefined
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
[
1
]
===
undefined
?
''
:
this
.
updateDate
[
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'hotFlow-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'hotFlow-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'hotFlow-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/hotFlow/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
(()
=>
{})
},
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/hotFlow/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/hotFlow/verifyTopic'
),
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
(()
=>
{})
}
}
}
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/hotFlow/verifyTopic'
),
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/party/rules-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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'
>
<div
class=
"base-info"
>
基本信息
</div>
<el-form-item
label=
"原始标题:"
prop=
"titleOld"
>
<el-input
v-model=
"dataForm.titleOld"
placeholder=
"请输入原始标题"
v-show=
"!showInfo"
size=
"small"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
titleOld
}}
</p>
...
...
@@ -75,14 +75,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
<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
>
...
...
@@ -94,7 +91,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
this
.
$route
.
query
.
showInfo
,
visible
:
false
,
showInfo
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -163,22 +161,16 @@
title
:
''
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'添加'
:
'修改'
},
created
()
{
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/news/info/
${
this
.
dataForm
.
id
}
`
),
...
...
@@ -229,7 +221,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'party-rules'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -281,7 +274,7 @@
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
dataForm
.
content
=
''
this
.
ueditor
.
value
=
''
},
// 更新父子组件内容
editorReady
(
instance
)
{
...
...
@@ -293,17 +286,3 @@
}
}
</
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/party/rules.vue
View file @
76f51f9d
...
...
@@ -145,12 +145,12 @@
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>
<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"
@
click=
"infoHandle(scope.row.id)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -164,181 +164,177 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
title
:
''
,
author
:
''
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
levels
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
updateDate
:
[],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
import
AddOrUpdate
from
'./rules-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
title
:
''
,
author
:
''
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
levels
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
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/rules/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'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
===
null
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/rules/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'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
===
null
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'rules-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'rules-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'rules-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/rules/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
(()
=>
{})
},
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/rules/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/rules/verifyTopic'
),
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
(()
=>
{})
}
}
}
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/rules/verifyTopic'
),
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/party/topicnews-add-or-update.vue
View file @
76f51f9d
<
template
>
<div
class=
"mod-config"
>
<div
class=
"title"
>
{{
title
}}
</div>
<div
class=
"form-list"
>
<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'
>
<div
class=
"base-info"
>
基本信息
</div>
<el-form-item
label=
"原始标题:"
prop=
"titleOld"
>
<el-input
v-model=
"dataForm.titleOld"
placeholder=
"请输入原始标题"
v-show=
"!showInfo"
size=
"small"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
titleOld
}}
</p>
...
...
@@ -75,14 +75,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
<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
>
...
...
@@ -94,7 +91,8 @@
data
()
{
return
{
loading
:
false
,
showInfo
:
this
.
$route
.
query
.
showInfo
,
visible
:
false
,
showInfo
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -163,23 +161,16 @@
title
:
''
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
clearInp
()
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'添加'
:
'修改'
},
created
()
{
},
methods
:
{
init
(
id
)
{
this
.
loading
=
true
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/news/info/
${
this
.
dataForm
.
id
}
`
),
...
...
@@ -230,7 +221,8 @@
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'party-topicnews'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -282,7 +274,7 @@
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
dataForm
.
content
=
''
this
.
ueditor
.
value
=
''
},
// 更新父子组件内容
editorReady
(
instance
)
{
...
...
@@ -294,17 +286,3 @@
}
}
</
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/party/topicnews.vue
View file @
76f51f9d
...
...
@@ -145,12 +145,12 @@
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>
<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"
@
click=
"infoHandle(scope.row.id)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -164,181 +164,177 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
title
:
''
,
author
:
''
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
levels
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
updateDate
:
[],
releaseDate
:
[]
}
},
activated
()
{
this
.
getDataList
()
},
methods
:
{
import
AddOrUpdate
from
'./topicnews-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
title
:
''
,
author
:
''
,
editor
:
''
,
keyword
:
''
,
status
:
''
,
levels
:
'0'
},
dataList
:
[],
pageIndex
:
1
,
pageSize
:
10
,
totalPage
:
0
,
dataListLoading
:
false
,
dataListSelections
:
[],
statusList
:
[
{
value
:
'0'
,
label
:
'待审核'
},
{
value
:
'-1'
,
label
:
'失败'
},
{
value
:
'1'
,
label
:
'成功'
}
],
levelList
:
[
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/topicnews/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'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
===
null
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/topicnews/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'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
===
null
?
''
:
this
.
releaseDate
[
0
],
'releaseTimeEnd'
:
this
.
releaseDate
===
null
?
''
:
this
.
releaseDate
[
1
],
'updateTimeStart'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
===
null
?
''
:
this
.
updateDate
[
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'topicnews-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'topicnews-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'topicnews-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/topicnews/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
(()
=>
{})
},
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/topicnews/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/topicnews/verifyTopic'
),
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
(()
=>
{})
}
}
}
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/topicnews/verifyTopic'
),
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/policy/policy-add-or-update.vue
View file @
76f51f9d
<
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
"
>
<
div
class=
"base-info"
>
基本信息
</div
>
<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=
"titleOld"
>
<el-input
v-model=
"dataForm.titleOld"
placeholder=
"请输入显示标题"
v-show=
"!showInfo"
size=
"small"
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
titleOld
}}
</p>
...
...
@@ -81,14 +81,11 @@
<div
v-show=
"showInfo"
v-html=
"dataForm.content"
></div>
</el-form-item>
</el-form>
</div>
<div
class=
"sub-btn"
v-show=
"!showInfo"
>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'clearInp()'
>
重置
</el-button>
<el-button
type=
'primary'
@
click=
'dataFormSubmit()'
>
确定
</el-button>
</span>
</div>
</div>
<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
>
...
...
@@ -99,7 +96,9 @@
},
data
()
{
return
{
showInfo
:
this
.
$route
.
query
.
showInfo
||
false
,
loading
:
false
,
visible
:
false
,
showInfo
:
false
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -176,25 +175,23 @@
title
:
''
}
},
activated
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
init
(
this
.
$route
.
query
.
id
)
}
this
.
title
=
!
this
.
$route
.
query
.
id
?
'新增'
:
'修改'
},
created
()
{
},
methods
:
{
init
(
id
)
{
init
(
id
,
showInfo
)
{
this
.
dataForm
.
id
=
id
||
0
this
.
visible
=
true
this
.
showInfo
=
showInfo
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
clearInp
()
if
(
this
.
dataForm
.
id
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/policy/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
params
:
this
.
$http
.
adornParams
()
}).
then
(({
data
})
=>
{
this
.
loading
=
false
if
(
data
&&
data
.
code
===
0
)
{
this
.
dataForm
=
data
.
policy
this
.
dataForm
.
publicdate
=
data
.
policy
.
releasedate
...
...
@@ -214,6 +211,7 @@
},
// 表单提交
dataFormSubmit
()
{
this
.
loading
=
true
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$http
({
...
...
@@ -235,13 +233,15 @@
'startdate'
:
this
.
dataForm
.
startdate
})
}).
then
(({
data
})
=>
{
this
.
loading
=
false
if
(
data
&&
data
.
code
===
0
)
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
,
duration
:
1500
,
onClose
:
()
=>
{
this
.
$router
.
push
({
name
:
'policy-policy'
})
this
.
visible
=
false
this
.
$emit
(
'refreshDataList'
)
}
})
}
else
{
...
...
@@ -254,25 +254,9 @@
clearInp
()
{
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
imgUrlStr
=
''
this
.
dialogVisible
=
false
this
.
dataForm
.
value
=
''
this
.
ueditor
.
value
=
''
}
}
}
</
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/policy/policy.vue
View file @
76f51f9d
<
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"
clearable
></el-input>
...
...
@@ -135,12 +134,12 @@
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>
<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"
@
click=
"infoHandle(scope.row.id
)"
>
预览
</el-button>
<el-button
type=
"text"
@
click=
"u
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrUpdateHandle(scope.row.id,true
)"
>
预览
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"addOrU
pdateHandle(scope.row.id)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteHandle(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -154,191 +153,187 @@
: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
>
export
default
{
data
()
{
return
{
dataForm
:
{
'title'
:
''
,
'levels'
:
'0'
,
'class1'
:
''
,
'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
:
[],
typeList
:
[
{
typeName
:
'法律法规'
},
{
typeName
:
'相关标准'
}
]
}
},
activated
()
{
this
.
getDataList
()
},
created
()
{
},
methods
:
{
import
AddOrUpdate
from
'./policy-add-or-update'
export
default
{
components
:
{
AddOrUpdate
},
data
()
{
return
{
addOrUpdateVisible
:
false
,
dataForm
:
{
'title'
:
''
,
'levels'
:
'0'
,
'class1'
:
''
,
'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
:
[],
typeList
:
[
{
typeName
:
'法律法规'
},
{
typeName
:
'相关标准'
}
]
}
},
activated
()
{
this
.
getDataList
()
},
created
()
{
},
methods
:
{
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/policy/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'levels'
:
this
.
dataForm
.
levels
,
'class1'
:
this
.
dataForm
.
class1
,
'editor'
:
this
.
dataForm
.
editor
,
'keyword'
:
this
.
dataForm
.
keyword
,
'status'
:
this
.
dataForm
.
status
,
'updateTimeStart'
:
this
.
updateDate
[
0
]
===
undefined
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
[
1
]
===
undefined
?
''
:
this
.
updateDate
[
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
})
},
getDataList
()
{
this
.
dataListLoading
=
true
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/policy/list'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'page'
:
this
.
pageIndex
,
'limit'
:
this
.
pageSize
,
'title'
:
this
.
dataForm
.
title
,
'levels'
:
this
.
dataForm
.
levels
,
'class1'
:
this
.
dataForm
.
class1
,
'editor'
:
this
.
dataForm
.
editor
,
'keyword'
:
this
.
dataForm
.
keyword
,
'status'
:
this
.
dataForm
.
status
,
'updateTimeStart'
:
this
.
updateDate
[
0
]
===
undefined
?
''
:
this
.
updateDate
[
0
],
'updateTimeEnd'
:
this
.
updateDate
[
1
]
===
undefined
?
''
:
this
.
updateDate
[
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
()
},
sizeChangeHandle
(
val
)
{
this
.
pageSize
=
val
this
.
pageIndex
=
1
this
.
getDataList
()
},
// 当前页
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
currentChangeHandle
(
val
)
{
this
.
pageIndex
=
val
this
.
getDataList
()
},
// 多选
selectionChangeHandle
(
val
)
{
this
.
dataListSelections
=
val
},
// 新增
addOrUpdateHandle
()
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'policy-add'
})
})
},
// 修改
updateHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'policy-update'
,
query
:
{
id
:
id
}})
})
},
// 详情
infoHandle
(
id
)
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
push
({
name
:
'policy-info'
,
query
:
{
id
:
id
,
showInfo
:
true
}})
})
},
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/policy/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
(()
=>
{})
},
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/policy/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/policy/verifyPolicy'
),
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
(()
=>
{})
}
}
}
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/policy/verifyPolicy'
),
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
>
static/plugins/ueditor-1.4.3.3/ueditor.config.js
View file @
76f51f9d
...
...
@@ -95,7 +95,7 @@
'searchreplace'
,
// 查询替换
// 'map', // Baidu地图
// 'gmap', // Google地图
//
'insertvideo', // 视频
'insertvideo'
,
// 视频
// 'help', // 帮助
'justifyleft'
,
// 居左对齐
'justifyright'
,
// 居右对齐
...
...
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