Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_backstage
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_backstage
Commits
51947e87
提交
51947e87
authored
11月 06, 2023
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复无法查看展览导入记录的问题
上级
b55410bd
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
45 行增加
和
444 行删除
+45
-444
config.js
src/components/ImportRecordDialog/config.js
+2
-16
index.vue
src/components/ImportRecordDialog/index.vue
+29
-77
list.js
src/views/culturalRelic/configs/list.js
+6
-6
index.vue
src/views/culturalRelic/index.vue
+6
-10
ImportRecordDialog.vue
src/views/display/components/ImportRecordDialog.vue
+0
-276
import.js
src/views/display/configs/import.js
+0
-57
index.vue
src/views/display/index.vue
+2
-2
没有找到文件。
src/
views/culturalRelic/configs/import
.js
→
src/
components/ImportRecordDialog/config
.js
浏览文件 @
51947e87
...
...
@@ -27,18 +27,4 @@ export const importRecordsTitle = [{
columnAlign
:
"center"
,
width
:
"60px"
,
},
]
export
const
importOperates
=
{
operate
:
true
,
label
:
"操作"
,
width
:
"220px"
,
minwidth
:
"220px"
,
titleAlign
:
"center"
,
columnAlign
:
"center"
,
}
export
const
importOperations
=
[{
type
:
'delete'
,
title
:
'删除记录及文物'
},]
\ No newline at end of file
]
\ No newline at end of file
src/
views/culturalRelic/components/ImportRecordDialog
.vue
→
src/
components/ImportRecordDialog/index
.vue
浏览文件 @
51947e87
<
template
>
<el-dialog
:visible=
"
dialogV
isible"
:visible=
"
v
isible"
width=
"70%"
style=
"height: 98%"
:before-close=
"handleClose"
...
...
@@ -9,7 +9,7 @@
>
<div
class=
"title"
slot=
"title"
>
<div
class=
"divider"
></div>
<span
class=
"label"
>
文物导入记录
</span>
<span
class=
"label"
>
{{
getTitle
}}
</span>
</div>
<div
class=
"upload-progress"
>
<div
class=
"top-bar"
>
...
...
@@ -38,15 +38,6 @@
>
昨天
</el-tag>
</
template
>
<
template
v-slot:operates=
"scope"
>
<TableOperation
:operations=
"tableOperations"
:rawData=
"scope.scope.row"
:deleteTitle=
"'点击确定将会删除该批次导入的所有文物,确定删除?'"
@
handleOperation=
"handleOperation"
></TableOperation>
</
template
>
</TablePage>
<el-pagination
@
size-change=
"handleSizeChange"
...
...
@@ -69,30 +60,21 @@
</template>
<
script
>
import
{
importRecordsTitle
,
importOperates
,
importOperations
,
}
from
"../configs/import"
;
import
{
importRecordsTitle
}
from
"./config"
;
import
{
parseTime
,
getYestoday
,
renderSize
}
from
"@/utils/index"
;
import
{
getImportListPage
,
deleteByBatchNum
}
from
"@/api/file"
;
import
{
getImportListPage
}
from
"@/api/file"
;
export
default
{
name
:
"ImportRecordDialog"
,
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
,
},
filesList
:
{
type
:
Array
,
default
:
()
=>
[],
bizType
:
{
type
:
String
,
default
:
"biz_cultural_relic"
,
},
},
watch
:
{
visible
:
{
handler
:
function
(
value
)
{
this
.
dialogVisible
=
value
;
if
(
value
)
{
this
.
loadData
();
}
...
...
@@ -102,19 +84,18 @@ export default {
},
},
computed
:
{
getTitle
()
{
if
(
!
this
.
bizType
)
{
return
;
}
return
this
.
bizType
==
"biz_cultural_relic"
?
"文物导入记录"
:
"展览导入记录"
;
},
tableTitle
()
{
return
importRecordsTitle
;
},
tableOperates
()
{
return
importOperates
;
},
tableOperations
()
{
return
importOperations
;
},
getFileSize
(
fileSize
)
{
// return (fileSize) => {
// return (Number(fileSize) / 1024 / 1024).toFixed(2) + "M";
// };
return
(
fileSize
)
=>
{
return
renderSize
(
Number
(
fileSize
));
};
...
...
@@ -132,13 +113,12 @@ export default {
};
},
getYestoday
()
{
console
.
log
(
getYestoday
());
return
getYestoday
();
},
},
data
()
{
return
{
dialogV
isible
:
false
,
v
isible
:
false
,
list
:
{
records
:
[],
size
:
10
,
...
...
@@ -150,73 +130,44 @@ export default {
status
:
""
,
},
searchConfig
:
[
// {
// prop: "type",
// type: "select",
// label: "所属分类",
// selectOptions: [
// {
// label: "文物",
// value: "biz_cultural_relic",
// },
// {
// label: "展览",
// value: "biz_exhibition",
// },
// ],
// },
{
prop
:
"batchNum"
,
type
:
"input"
,
label
:
"批次"
,
},
],
searchParams
:
{},
};
},
methods
:
{
async
search
(
form
)
{
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
type
:
"biz_cultural_relic"
,
...
form
,
};
let
res
=
await
getImportListPage
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
// 记录搜索的参数
this
.
searchParams
=
form
;
this
.
resetPage
();
this
.
loadData
(
form
);
},
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
// 加载表格数据
async
loadData
()
{
async
loadData
(
form
)
{
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
type
:
"biz_cultural_relic"
,
type
:
this
.
bizType
,
};
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
let
res
=
await
getImportListPage
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
},
async
handleOperation
(
value
,
row
)
{
switch
(
value
.
type
)
{
case
"delete"
:
let
{
batchNum
,
type
,
id
}
=
row
;
let
deleteRes
=
await
deleteByBatchNum
({
batchNum
,
type
});
if
(
deleteRes
.
code
==
0
)
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
$emit
(
"reload"
);
this
.
loadData
();
}
break
;
}
},
// 改变页容量
handleSizeChange
(
value
)
{
this
.
list
.
size
=
value
;
...
...
@@ -230,6 +181,7 @@ export default {
},
handleClose
()
{
this
.
visible
=
false
;
this
.
$emit
(
"handleClose"
);
},
},
...
...
src/views/culturalRelic/configs/list.js
浏览文件 @
51947e87
...
...
@@ -39,12 +39,12 @@ export const passedTitle = [{
// columnAlign: 'center',
// },
//
{
//
prop: "deptName",
//
label: "馆藏单位",
//
columnAlign: 'center',
//
showOverFlowToolTip: true,
//
},
{
prop
:
"deptName"
,
label
:
"馆藏单位"
,
columnAlign
:
'center'
,
showOverFlowToolTip
:
true
,
},
// {
// prop: "regionName",
// label: "所属地",
...
...
src/views/culturalRelic/index.vue
浏览文件 @
51947e87
...
...
@@ -148,11 +148,7 @@
:options=
"multiUploadOptions"
/>
<ImportRecordDialog
:visible=
"importRecordVisible"
@
reload=
"loadData"
@
handleClose=
"handleImportRecordClose"
/>
<ImportRecordDialog
ref=
"ImportRecordDialog"
bizType=
"biz_cultural_relic"
/>
<View3dDialog
ref=
"View3dDialog"
/>
...
...
@@ -190,7 +186,7 @@ import {
}
from
"@/api/culturalRelic"
;
import
InfoEditDialog
from
"./components/InfoEditDialog"
;
import
UploadDialog
from
"@/components/UploadDialog"
;
//上传弹窗
import
ImportRecordDialog
from
"
.
/components/ImportRecordDialog"
;
import
ImportRecordDialog
from
"
@
/components/ImportRecordDialog"
;
import
PreviewDialog
from
"./components/PreviewDialog"
;
import
View3dDialog
from
"./components/View3dDialog"
;
import
{
rules
}
from
"./configs/validateRules"
;
...
...
@@ -447,7 +443,7 @@ export default {
}
},
view3d
(
row
)
{
this
.
$
refs
.
View3dDialog
.
visible
=
true
;
this
.
$
appCommon
.
openDialog
(
this
,
"View3dDialog"
)
;
},
getCurrentPreviewRequest
()
{
...
...
@@ -469,7 +465,7 @@ export default {
let
detailRes
=
await
getRCDetailByIdTemp
({
crId
});
if
(
detailRes
.
code
==
0
)
{
this
.
form
=
detailRes
.
data
;
this
.
$
refs
.
InfoEditDialog
.
visible
=
true
;
this
.
$
appCommon
.
openDialog
(
this
,
"InfoEditDialog"
)
;
}
},
async
deleteRow
(
row
)
{
...
...
@@ -481,10 +477,10 @@ export default {
}
},
multiAdd
()
{
this
.
$
refs
.
UploadDialog
.
visible
=
true
;
this
.
$
appCommon
.
openDialog
(
this
,
"UploadDialog"
)
;
},
viewImport
()
{
this
.
importRecordVisible
=
true
;
this
.
$appCommon
.
openDialog
(
this
,
"ImportRecordDialog"
)
;
},
//下载批量导入模板
handleDownloadTemplate
()
{
...
...
src/views/display/components/ImportRecordDialog.vue
deleted
100644 → 0
浏览文件 @
b55410bd
<
template
>
<el-dialog
:visible=
"visible"
width=
"70%"
style=
"height: 98%"
:before-close=
"handleClose"
top=
"5vh"
lock-scroll
>
<div
class=
"title"
slot=
"title"
>
<div
class=
"divider"
></div>
<span
class=
"label"
>
展览导入记录
</span>
</div>
<div
class=
"upload-progress"
>
<div
class=
"top-bar"
>
<SearchBar
:config=
"searchConfig"
@
search=
"search"
@
reset=
"reset"
/>
</div>
<TablePage
:data=
"list.records"
:tableTitle=
"tableTitle"
>
<template
v-slot:fileSize=
"scope"
>
{{
getFileSize
(
scope
.
scope
.
fileSize
)
}}
</
template
>
<
template
v-slot:createTime=
"scope"
>
{{
scope
.
scope
.
createTime
}}
<el-tag
size=
"mini"
type=
"success"
v-if=
"isToday(scope.scope.createTime)"
>
今天
</el-tag
>
<el-tag
size=
"mini"
type=
"primary"
v-if=
"getYestoday == scope.scope.createTime.split(' ')[0]"
>
昨天
</el-tag>
</
template
>
<
template
v-slot:optType=
"scope"
>
<el-tag
size=
"mini"
type=
"primary"
v-if=
"scope.scope.optType.indexOf('导入') != -1"
>
{{
scope
.
scope
.
optType
}}
</el-tag
>
<el-tag
size=
"mini"
type=
"danger"
v-if=
"scope.scope.optType.indexOf('删除') != -1"
>
{{
scope
.
scope
.
optType
}}
</el-tag>
</
template
>
<!-- <template v-slot:operates="scope">
<TableOperation
:operations="tableOperations"
:rawData="scope.scope.row"
:deleteTitle="'点击确定将会删除该批次导入的所有文物,确定删除?'"
@handleOperation="handleOperation"
></TableOperation>
</template> -->
</TablePage>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"Number(list.current)"
:page-sizes=
"[10, 20, 40, 50]"
:page-size=
"Number(list.size)"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"Number(list.total)"
class=
"pagination"
>
</el-pagination>
</div>
<div
class=
"dialog-footer"
>
<el-button
type=
"primary"
size=
"mini"
@
click
.
native=
"handleClose"
>
关闭
</el-button
>
</div>
</el-dialog>
</template>
<
script
>
import
{
importRecordsTitle
,
importOperates
,
importOperations
,
}
from
"../configs/import"
;
import
{
parseTime
,
getYestoday
}
from
"@/utils/index"
;
import
{
getImportListPage
,
deleteByBatchNum
}
from
"@/api/file"
;
import
{
getLogList
}
from
"@/api/log"
;
export
default
{
name
:
"ImportRecordDialog"
,
props
:
{
filesList
:
{
type
:
Array
,
default
:
()
=>
[],
},
},
watch
:
{
visible
:
{
handler
:
function
(
value
)
{
if
(
value
)
{
this
.
loadData
();
}
},
deep
:
true
,
immediate
:
true
,
},
},
computed
:
{
tableTitle
()
{
return
importRecordsTitle
;
},
tableOperates
()
{
return
importOperates
;
},
tableOperations
()
{
return
importOperations
;
},
getFileSize
(
fileSize
)
{
return
(
fileSize
)
=>
{
return
(
Number
(
fileSize
)
/
1024
/
1024
).
toFixed
(
2
)
+
"M"
;
};
},
isToday
(
time
)
{
return
(
time
)
=>
{
if
(
time
)
{
let
timeDate
=
time
.
split
(
" "
)[
0
];
let
today
=
parseTime
(
new
Date
(),
"{yy}-{mm}-{dd}"
);
return
timeDate
==
today
;
}
else
{
return
false
;
}
};
},
},
data
()
{
return
{
visible
:
false
,
list
:
{
records
:
[],
size
:
10
,
current
:
1
,
total
:
0
,
},
searchConfig
:
[
{
prop
:
"createTime"
,
type
:
"dateTimeRange"
,
label
:
"操作日期"
,
},
],
};
},
methods
:
{
getYestoday
,
async
search
(
form
)
{
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
optType
:
"整量"
,
...
form
,
};
if
(
params
.
createTime
&&
params
.
createTime
.
length
>
0
)
{
params
.
startTime
=
params
.
createTime
[
0
];
params
.
endTime
=
params
.
createTime
[
1
];
}
if
(
params
.
createTime
)
{
delete
params
.
createTime
;
}
let
res
=
await
getLogList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
},
reset
()
{
this
.
loadData
();
},
// 加载表格数据
async
loadData
()
{
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
// type: "biz_exhibition",
optType
:
"整量"
,
};
if
(
params
.
createTime
&&
params
.
createTime
.
length
>
0
)
{
params
.
startTime
=
params
.
createTime
[
0
];
params
.
endTime
=
params
.
createTime
[
1
];
}
if
(
params
.
createTime
)
{
delete
params
.
createTime
;
}
let
res
=
await
getLogList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
},
async
handleOperation
(
value
,
row
)
{
switch
(
value
.
type
)
{
case
"delete"
:
let
{
batchNum
,
type
,
id
}
=
row
;
let
deleteRes
=
await
deleteByBatchNum
({
batchNum
,
type
});
if
(
deleteRes
.
code
==
0
)
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
$emit
(
"reload"
);
this
.
loadData
();
}
break
;
}
},
// 改变页容量
handleSizeChange
(
value
)
{
this
.
list
.
size
=
value
;
this
.
loadData
();
},
// 改变当前显示页
handleCurrentChange
(
value
)
{
this
.
list
.
current
=
value
;
this
.
loadData
();
},
handleClose
()
{
this
.
visible
=
false
;
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.title
{
display
:
flex
;
.divider
{
width
:
8px
;
height
:
16px
;
border-left
:
4px
solid
#409eff
;
margin-right
:
8px
;
}
.label
{
font-weight
:
bold
;
}
}
.dialog-content
{
padding
:
0
32px
;
display
:
flex
;
flex-direction
:
column
;
}
.dialog-footer
{
margin-top
:
30px
;
display
:
flex
;
justify-content
:
flex-end
;
}
.el-dialog__body
{
padding
:
0
20px
30px
20px
;
}
.top-bar
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
10px
;
}
.pagination
{
margin
:
16px
;
}
</
style
>
src/views/display/configs/import.js
deleted
100644 → 0
浏览文件 @
b55410bd
export
const
importRecordsTitle
=
[{
prop
:
"createTime"
,
label
:
"导入时间"
,
columnAlign
:
"left"
,
needTimeTag
:
true
},
// {
// prop: "batchNum",
// label: "导入批次",
// columnAlign: "center",
// },
{
prop
:
"sourceName"
,
label
:
"文件名称"
,
columnAlign
:
"center"
,
width
:
300
},
{
prop
:
'username'
,
label
:
'操作用户'
,
columnAlign
:
"center"
,
},
{
prop
:
'optType'
,
label
:
'操作类型'
,
columnAlign
:
"center"
,
},
// {
// prop: "fileSize",
// label: "文件大小",
// columnAlign: "center",
// },
// {
// prop: "remark",
// label: "备注",
// columnAlign: "center",
// width: "60px",
// },
]
export
const
importOperates
=
{
operate
:
true
,
label
:
"操作"
,
width
:
"220px"
,
minwidth
:
"220px"
,
titleAlign
:
"center"
,
columnAlign
:
"center"
,
}
export
const
importOperations
=
[{
type
:
'delete'
,
title
:
'删除记录及展览'
},]
\ No newline at end of file
src/views/display/index.vue
浏览文件 @
51947e87
...
...
@@ -151,7 +151,7 @@
ref=
"InfoEditDialog"
/>
<PreviewDialog
ref=
"PreviewDialog"
:info=
"curPreview"
/>
<ImportRecordDialog
ref=
"ImportRecordDialog"
@
reload=
"loadData
"
/>
<ImportRecordDialog
ref=
"ImportRecordDialog"
bizType=
"biz_exhibition
"
/>
<UploadListDialog
:visible=
"multiUploadVisible"
...
...
@@ -194,7 +194,7 @@ import {
}
from
"@/api/display"
;
import
InfoEditDialog
from
"./components/InfoEditDialog"
;
import
PreviewDialog
from
"./components/PreviewDialog"
;
import
ImportRecordDialog
from
"
.
/components/ImportRecordDialog"
;
import
ImportRecordDialog
from
"
@
/components/ImportRecordDialog"
;
import
UploadListDialog
from
"./components/UploadListDialog"
;
//上传列表弹窗
import
UploadDialog
from
"@/components/UploadDialog"
;
//上传弹窗
import
{
mapGetters
}
from
"vuex"
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论