Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_backstage
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_backstage
Commits
481d885a
提交
481d885a
authored
2月 06, 2023
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
博物馆管理bug修复
上级
9ac77d2d
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
88 行增加
和
27 行删除
+88
-27
index.vue
src/views/museum/index.vue
+88
-27
没有找到文件。
src/views/museum/index.vue
浏览文件 @
481d885a
...
...
@@ -4,25 +4,53 @@
<SearchBar
:config=
"searchConfig"
@
search=
"search"
@
reset=
"reset"
/>
<el-button
type=
"primary"
@
click
.
native=
"handleOperation('add')"
>
<i
class=
"el-icon-plus"
></i>
添加
</el-button>
添加
</el-button
>
</div>
<el-table
:tree-props=
"
{ children: 'children' }" fit row-key="id" :data="orgTreeData" border stripe
default-expand-all v-loading="loading">
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
align=
"center"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"name"
label=
"名称"
></el-table-column>
<el-table-column
align=
"center"
prop=
"regionName"
label=
"归属地"
></el-table-column>
<el-table
:tree-props=
"
{ children: 'children' }"
fit
row-key="id"
:data="orgTreeData"
border
stripe
default-expand-all
v-loading="loading"
>
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
align=
"center"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"name"
label=
"名称"
></el-table-column>
<el-table-column
align=
"center"
prop=
"regionName"
label=
"归属地"
></el-table-column>
<el-table-column
align=
"center"
prop=
"status"
label=
"状态"
>
<template
slot-scope=
"scope"
>
<el-popconfirm
:title=
"getStatusTitle(scope.row.status)"
@
confirm=
"handleChangeStatus(scope.row)"
>
<el-switch
slot=
"reference"
:value=
"Boolean(Number(scope.row.status))"
></el-switch>
<el-popconfirm
:title=
"getStatusTitle(scope.row.status)"
@
confirm=
"handleChangeStatus(scope.row)"
>
<el-switch
slot=
"reference"
:value=
"Boolean(Number(scope.row.status))"
></el-switch>
</el-popconfirm>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"封面"
>
<
template
slot-scope=
"scope"
>
<img
:src=
"scope.row.faceImageUrl"
style=
"cursor: pointer"
width=
"100px"
@
click=
"handelPreviewImages(scope.row.faceImageUrl)"
/>
<img
:src=
"scope.row.faceImageUrl"
style=
"cursor: pointer"
width=
"100px"
@
click=
"handelPreviewImages(scope.row.faceImageUrl)"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"longitude"
label=
"经度"
>
...
...
@@ -41,17 +69,41 @@
</el-table-column> -->
<el-table-column
align=
"center"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
icon=
"el-icon-edit"
@
click
.
native=
"handleOperation('edit', scope.row)"
style=
"margin-right: 4px"
>
编辑
</el-button>
<el-popconfirm
title=
"确定删除吗?"
@
confirm=
"handleOperation('delete', scope.row)"
>
<el-button
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
slot=
"reference"
>
删除
</el-button>
<el-button
type=
"primary"
size=
"mini"
icon=
"el-icon-edit"
@
click
.
native=
"handleOperation('edit', scope.row)"
style=
"margin-right: 4px"
>
编辑
</el-button
>
<el-popconfirm
title=
"确定删除吗?"
@
confirm=
"handleOperation('delete', scope.row)"
>
<el-button
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
slot=
"reference"
>
删除
</el-button
>
</el-popconfirm>
</
template
>
</el-table-column>
</el-table>
<InfoEditDialog
:visible=
"drawerVisible"
:form=
"form"
:orgTreeData=
"orgTreeData"
@
handleClose=
"handleClose"
@
refresh=
"loadData"
/>
<el-image-viewer
v-if=
"imgViewerVisible"
:on-close=
"closeImgViewer"
:url-list=
"imgList"
/>
<InfoEditDialog
:visible=
"drawerVisible"
:form=
"form"
:orgTreeData=
"orgTreeData"
@
handleClose=
"handleClose"
@
refresh=
"loadData"
/>
<el-image-viewer
v-if=
"imgViewerVisible"
:on-close=
"closeImgViewer"
:url-list=
"imgList"
/>
</div>
</template>
...
...
@@ -136,9 +188,9 @@ export default {
this
.
loadData
(
true
);
},
watch
:
{
'searchForm.name'
:
function
(
value
)
{
"searchForm.name"
:
function
(
value
)
{
console
.
log
(
value
);
}
}
,
},
methods
:
{
async
search
(
form
)
{
...
...
@@ -200,14 +252,23 @@ export default {
* @param isReload {Boolean} 是否需要重新调用接口加载,默认不传则从vuex中获取
*/
loadData
(
isReload
)
{
this
.
loading
=
true
this
.
$store
.
dispatch
(
"org/getMuseumTreeData"
,
isReload
).
then
((
res
)
=>
{
this
.
orgTreeData
=
res
[
0
].
children
this
.
tableData
=
res
[
0
].
children
this
.
loading
=
false
}).
catch
(
err
=>
{
this
.
loading
=
false
});
this
.
loading
=
true
;
this
.
$store
.
dispatch
(
"org/getMuseumTreeData"
,
isReload
)
.
then
((
res
)
=>
{
if
(
res
[
0
].
pid
==
"0"
)
{
this
.
orgTreeData
=
res
[
0
].
children
;
this
.
tableData
=
res
[
0
].
children
;
}
else
{
this
.
orgTreeData
=
res
;
this
.
tableData
=
res
}
this
.
loading
=
false
;
})
.
catch
((
err
)
=>
{
this
.
loading
=
false
;
});
},
async
handleOperation
(
type
,
row
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论