Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
P
park-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
huang
park-ui
Commits
d429a83b
提交
d429a83b
authored
6月 15, 2020
作者:
350505825@qq.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交代码
上级
c1c64a04
全部展开
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
620 行增加
和
5 行删除
+620
-5
index.vue
src/views/formalRecipe/formalRecipeCheck/index.vue
+360
-4
index.vue
src/views/forum/postList/index.vue
+260
-1
没有找到文件。
src/views/formalRecipe/formalRecipeCheck/index.vue
浏览文件 @
d429a83b
差异被折叠。
点击展开。
src/views/forum/postList/index.vue
浏览文件 @
d429a83b
<
template
>
<div>
666
</div>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"发帖人:"
prop=
"companyName"
>
<el-input
v-model=
"queryParams.companyName"
placeholder=
"请填写发帖人名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"日期筛选"
prop=
"exchangeTime"
>
<el-date-picker
clearable
size=
"small"
style=
"width: 200px"
v-model=
"queryParams.exchangeTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
" "
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"至"
prop=
"exchangeTime2"
>
<el-date-picker
clearable
size=
"small"
style=
"width: 200px"
v-model=
"queryParams.exchangeTime2"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
" "
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
删除
</el-button
>
</el-form-item>
</el-form>
<!--列表-->
<el-table
v-loading=
"loading"
:data=
"announcementList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"40"
align=
"center"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"发帖人"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"发帖人账号"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"帖子内容"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"点赞数"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"发帖日期"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"viewDetails(scope.row)"
v-hasPermi=
"['synergy:exchange:edit']"
>
查看详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['synergy:exchange:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<!--分页按钮组-->
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改公告通知对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1200px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-table
v-loading=
"loading"
:data=
"announcementList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"评论人"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"内容"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"评论时间"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"回复人名称"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"回复内容"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"回复时间"
align=
"center"
prop=
"content"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['synergy:exchange:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
getList
,
getCurrent
,
addAnnouncement
,
getAnnouncement
,
updateAnnouncement
,
delAnnouncement
,
activateAnnouncement
}
from
"@/api/announcement/announcementList"
;
export
default
{
//页签缓存页面的name要和路由中的那么要相同,才能缓存,
//如果是自定义菜单,则页面的name和菜单管理中路由地址要相同,才能页签缓存
name
:
"announcement"
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
ids
:
[],
// 选中数组
single
:
true
,
// 非单个禁用
multiple
:
true
,
// 非多个禁用
total
:
0
,
// 总条数
announcementList
:
[],
// 所有公告列表
announcement
:
null
,
//当前公告
title
:
""
,
// 弹出层标题
open
:
false
,
// 是否显示弹出层
queryParams
:
{
// 查询参数
pageNum
:
1
,
pageSize
:
10
},
form
:
{},
// 表单参数
rules
:
{
// 表单校验
}
};
},
created
()
{
this
.
getList
();
this
.
getCurrent
()
},
methods
:
{
/** get all announcement list */
getList
()
{
this
.
loading
=
true
;
getList
(
this
.
queryParams
).
then
(
response
=>
{
this
.
announcementList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
})
},
/** get current announcement */
getCurrent
()
{
this
.
loading
=
true
;
getCurrent
().
then
(
response
=>
{
if
(
response
.
data
){
this
.
announcement
=
response
.
data
this
.
loading
=
false
}
})
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
undefined
};
this
.
resetForm
(
"form"
);
},
//多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!=
1
this
.
multiple
=
!
selection
.
length
},
/** 修改按钮操作 */
viewDetails
(
row
)
{
//清空表单
const
id
=
row
.
id
||
this
.
ids
[
0
]
let
data
=
{
id
:
id
}
getAnnouncement
(
data
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"查看详情"
;
});
},
/** 激活按钮操作 */
handleActivate
(
row
){
const
ids
=
row
.
id
||
this
.
ids
[
0
]
this
.
$confirm
(
'激活以在小程序端展示?'
,
"确认"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
activateAnnouncement
(
ids
);
}).
then
(()
=>
{
//重置
this
.
getCurrent
()
this
.
msgSuccess
(
"激活成功"
);
}).
catch
(
function
()
{});
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
undefined
)
{
updateAnnouncement
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
else
{
this
.
msgError
(
"修改失败:"
+
response
.
msg
);
}
});
}
else
{
addAnnouncement
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
else
{
this
.
msgError
(
"新增失败:"
+
response
.
msg
);
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
dictId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除已选中的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delAnnouncement
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
getCurrent
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(
function
()
{});
}
}
};
</
script
>
<
style
scoped
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论