Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_backstage
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_backstage
Commits
3b163d65
提交
3b163d65
authored
6月 29, 2022
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加布展单元
上级
14854e65
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
432 行增加
和
194 行删除
+432
-194
culturalRelic.js
src/api/culturalRelic.js
+7
-0
display.js
src/api/display.js
+17
-2
index.js
src/components/Dict/index.js
+0
-12
TableOperation.vue
src/components/Table/TableOperation.vue
+2
-2
TablePage.vue
src/components/Table/TablePage.vue
+14
-10
index.vue
src/components/Uploader/index.vue
+0
-1
image.svg
src/icons/svg/image.svg
+3
-0
video.svg
src/icons/svg/video.svg
+3
-0
InfoEditDialog.vue
src/views/culturalRelic/components/InfoEditDialog.vue
+28
-88
config.js
src/views/culturalRelic/config.js
+6
-5
index.vue
src/views/culturalRelic/index.vue
+66
-28
ExhibitionUnit.vue
src/views/display/components/ExhibitionUnit.vue
+218
-0
InfoEditDialog.vue
src/views/display/components/InfoEditDialog.vue
+0
-0
config.js
src/views/display/config.js
+18
-17
index.vue
src/views/display/index.vue
+50
-29
没有找到文件。
src/api/culturalRelic.js
浏览文件 @
3b163d65
...
...
@@ -32,3 +32,10 @@ export function getRCDetailById(params) {
})
}
export
function
deleteCultralRelic
(
data
)
{
return
request
({
url
:
'/bizCulturalRelic/delete'
,
method
:
'delete'
,
data
})
}
src/api/display.js
浏览文件 @
3b163d65
...
...
@@ -22,4 +22,20 @@ export function editDisplay(data) {
method
:
'put'
,
data
})
}
\ No newline at end of file
}
export
function
getDisplayById
(
data
)
{
return
request
({
url
:
'/bizExhibition/listById'
,
method
:
'get'
,
data
})
}
export
function
deleteDisplay
(
data
)
{
return
request
({
url
:
'/bizExhibition/delete'
,
method
:
'delete'
,
data
})
}
src/components/Dict/index.js
浏览文件 @
3b163d65
...
...
@@ -12,8 +12,6 @@ class Dict {
}
async
init
(
names
)
{
console
.
log
(
'names'
,
names
);
// const ps = [];
// 先判断list中的name是否存在,如果不存在,把不存在的放置在一个list中,再对list进行获取
var
nonExistentNames
=
[]
// debugger
...
...
@@ -43,7 +41,6 @@ class Dict {
value
:
Object
.
freeze
(
literatureList
),
});
}
}
if
(
nonExistentNames
.
length
>
0
)
{
// debugger
...
...
@@ -55,11 +52,6 @@ class Dict {
if
(
res
.
code
==
0
)
{
res
.
data
.
map
(
item
=>
{
if
(
item
.
dictType
===
n
)
{
// arr.push(item)
// console.log(' obj[item.value]', obj[item.value]);
// console.log(' obj[item.label]', obj[item.label]);
// console.log('item',item);
// debugger
obj
[
item
.
value
]
=
item
.
label
}
})
...
...
@@ -75,10 +67,6 @@ class Dict {
}
loadDictCode
()
{
}
}
const
install
=
function
(
Vue
)
{
...
...
src/components/Table/TableOperation.vue
浏览文件 @
3b163d65
...
...
@@ -19,13 +19,12 @@
<span>
<span
v-for=
"(op, index) in operations"
:key=
"index"
>
<span
v-if=
"op.type == 'delete'"
>
<el-popconfirm
title=
"确定删除吗?"
>
<el-popconfirm
title=
"确定删除吗?"
@
onConfirm=
"clickOperation(op)"
>
<el-button
type=
"danger"
size=
"mini"
slot=
"reference"
:icon=
"icons[op.type]"
@
click=
"clickOperation(op)"
style=
"margin-right: 4px"
>
{{
op
.
title
}}
</el-button
...
...
@@ -67,6 +66,7 @@ export default {
},
methods
:
{
clickOperation
(
operation
)
{
console
.
log
(
'123'
);
this
.
$emit
(
"handleOperation"
,
operation
,
this
.
rawData
);
},
},
...
...
src/components/Table/TablePage.vue
浏览文件 @
3b163d65
...
...
@@ -23,33 +23,37 @@
:header-align=
"item.titleAlign"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"item.prop
==
'faceImage'"
>
<template
v-if=
"item.prop
==
'faceImage'"
>
<slot
name=
"faceImage"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop
==
'images'"
>
<
template
v-else-if=
"item.prop
==
'images'"
>
<slot
name=
"images"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop
==
'audios'"
>
<
template
v-else-if=
"item.prop
==
'audios'"
>
<slot
name=
"audios"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop
==
'videos'"
>
<
template
v-else-if=
"item.prop
==
'videos'"
>
<slot
name=
"videos"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.isStatus"
>
<slot
name=
"status"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop=='type'"
>
<slot
name=
"type"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop=='years'"
>
<
template
v-else-if=
"item.prop == 'years'"
>
<slot
name=
"years"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop
==
'level'"
>
<
template
v-else-if=
"item.prop
==
'level'"
>
<slot
name=
"level"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop==
'textureType'"
>
<
template
v-else-if=
"item.prop ==
'textureType'"
>
<slot
name=
"textureType"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.isCulturalRelicType"
>
<slot
name=
"type"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.isDisplayType"
>
<slot
name=
"displayType"
:scope=
"scope.row"
></slot>
</
template
>
<span
v-else
>
{{ scope.row[item.prop] }}
</span>
</template>
</el-table-column>
...
...
src/components/Uploader/index.vue
浏览文件 @
3b163d65
...
...
@@ -80,7 +80,6 @@ export default {
watch
:
{
files
:
{
handler
:
function
(
newVal
,
oldVal
)
{
console
.
log
(
"newVal"
,
newVal
);
this
.
fileList
=
newVal
;
},
immediate
:
true
,
...
...
src/icons/svg/image.svg
0 → 100644
浏览文件 @
3b163d65
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1656489573468"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"11484"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><defs><style
type=
"text/css"
>
@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path
d=
"M853.161077 892.549156 362.595248 892.549156l-209.432916-0.413416c-0.605797-0.001023-1.210571-0.031722-1.813299-0.092098-24.848944-2.484587-47.825238-14.060227-64.696488-32.594349-16.990976-18.665105-26.349111-42.85504-26.349111-68.112284L60.303434 264.62596c0-55.80805 45.403073-101.211123 101.211123-101.211123l691.645496 0c55.80805 0 101.2101 45.403073 101.2101 101.211123l0 225.51315c0 0.275269-0.00614 0.551562-0.01842 0.825808-0.021489 0.494257-1.971911 51.723012 15.481599 85.46244 4.716418 9.118682 1.14815 20.335141-7.970532 25.052582-9.116635 4.714372-20.335141 1.149173-25.052582-7.970532-21.300119-41.176818-19.844977-97.642854-19.618826-103.738689L917.191392 264.62596c0-35.307134-28.724205-64.031339-64.031339-64.031339L161.51558 200.594621c-35.307134 0-64.031339 28.724205-64.031339 64.031339l0 526.71105c0 32.755008 24.320918 59.957557 56.717769 63.61997l208.4311 0.412392 490.528989 0c35.307134 0 64.031339-28.725228 64.031339-64.032362l-0.382717-93.676519c-0.104377-1.749854-1.587148-19.548218-19.549242-42.499953-0.050142-0.063445-0.098237-0.125867-0.147356-0.190335L875.401614 626.481358 758.174726 471.362464c-0.415462-0.550539-38.995129-50.852178-86.271876-45.534056-38.335097 4.314259-75.954903 45.163619-108.789729 118.131491-17.615193 39.141462-34.650171 68.26885-52.082192 89.046059-17.607006 20.985964-35.679617 33.519418-55.251372 38.316677-43.422975 10.638291-81.049944-18.99461-120.886231-50.372248l-5.057179-3.980661c-46.555315-36.57808-68.750827-28.223808-158.330028 59.60247-7.330966 7.187703-19.101033 7.071046-26.288736-0.25992-7.187703-7.330966-7.071046-19.101033 0.25992-26.287713 46.658669-45.74588 77.544097-72.726372 107.085924-84.282568 33.357735-13.048177 64.274886-6.266727 100.242052 21.99392l5.092995 4.00829c33.9226 26.719548 63.219857 49.795103 89.028663 43.466977 25.618471-6.279007 53.30095-42.114167 82.279958-106.508779 39.139415-86.97591 85.837994-134.027529 138.79716-139.849118 68.454068-7.515161 117.823476 57.404408 119.891578 60.171428l117.122511 154.980747 21.599947 28.343535c26.276457 33.630958 27.333532 61.638849 27.367301 64.72514 0.001023 0.042979 0.001023 0.084934 0.001023 0.127913l0.38374 94.059236C954.371176 847.146083 908.969127 892.549156 853.161077 892.549156z"
p-id=
"11485"
></path><path
d=
"M312.328401 446.967868c-42.324968 0-76.759221-34.434254-76.759221-76.759221s34.434254-76.759221 76.759221-76.759221 76.759221 34.434254 76.759221 76.759221S354.654392 446.967868 312.328401 446.967868zM312.328401 330.628186c-21.824051 0-39.579437 17.755386-39.579437 39.579437s17.755386 39.579437 39.579437 39.579437 39.579437-17.755386 39.579437-39.579437S334.153476 330.628186 312.328401 330.628186z"
p-id=
"11486"
></path></svg>
\ No newline at end of file
src/icons/svg/video.svg
0 → 100644
浏览文件 @
3b163d65
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1656489577888"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"11629"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><defs><style
type=
"text/css"
>
@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path
d=
"M783.397177 815.037804 99.259678 815.037804c-32.612769 0-59.144028-26.53433-59.144028-59.149145 0-0.13917 0.001023-0.277316 0.004093-0.416486l0.533143-23.604604c0.227174-10.028401 8.42795-18.004049 18.407232-18.004049 0.141216 0 0.282433 0.001023 0.424672 0.005117 10.17064 0.230244 18.228153 8.661264 17.998933 18.830881l-0.529049 23.370267c0.097214 12.218276 10.06524 22.128997 22.305005 22.128997l684.137499 0c12.301164 0 22.309098-10.007935 22.309098-22.310122l0-77.920674c0-5.936199 2.860141-11.508102 7.684006-14.9679 4.822842-3.459798 11.021008-4.38282 16.641005-2.479471l124.534318 42.147936c11.083429-1.287319 19.715017-10.732435 19.715017-22.155603L974.280622 378.76758c0-11.423167-8.631588-20.868283-19.715017-22.155603l-124.534318 42.148959c-5.623068 1.902326-11.81714 0.980327-16.641005-2.479471-4.823865-3.459798-7.684006-9.031701-7.684006-14.966876L805.706275 268.925892c0-12.299117-10.007935-22.305005-22.309098-22.305005L99.793844 246.620887c-12.300141 0-22.306029 10.005888-22.306029 22.305005L77.487815 587.012438c0.071631 4.729721 0.096191 57.173141-32.541137 96.333022-6.513344 7.812943-18.127869 8.868995-25.942859 2.356674-7.814989-6.513344-8.868995-18.127869-2.356674-25.942859 24.326035-29.186739 24.015973-71.721485 24.006763-72.143087-0.004093-0.145309-0.005117-0.290619-0.005117-0.436952L40.648792 268.925892c0-32.612769 26.532283-59.144028 59.145052-59.144028l683.603333 0c32.613792 0 59.148122 26.532283 59.148122 59.144028l0 86.707804 103.523795-35.038004c1.901303-0.64366 3.897773-0.972141 5.9055-0.972141 32.612769 0 59.145052 26.532283 59.145052 59.144028l0 301.745369c0 32.612769-26.532283 59.145052-59.145052 59.145052-2.007727 0-4.003174-0.328481-5.9055-0.972141l-103.523795-35.038004 0 52.241828C842.544275 788.503475 816.010969 815.037804 783.397177 815.037804z"
p-id=
"11630"
></path><path
d=
"M404.872121 647.215588c-2.798742 0-5.610788-0.63752-8.211009-1.933025-6.253424-3.115967-10.205433-9.500375-10.205433-16.486486L386.455679 404.165016c0-6.886851 3.842515-13.199627 9.960863-16.362666 6.118348-3.164063 13.489222-2.64934 19.10922 1.334391L569.047274 497.943866c4.79419 3.397377 7.67889 8.878205 7.766894 14.753005s-2.632967 11.43954-7.323802 14.978133L415.968853 643.499963C412.710646 645.956921 408.804686 647.215588 404.872121 647.215588zM423.294702 439.796538l0 152.029532 103.903441-78.389348L423.294702 439.796538z"
p-id=
"11631"
></path><path
d=
"M65.636906 731.924875"
p-id=
"11632"
></path></svg>
\ No newline at end of file
src/views/culturalRelic/components/InfoEditDialog.vue
浏览文件 @
3b163d65
...
...
@@ -285,6 +285,7 @@ export default {
{
name
:
""
,
url
:
this
.
dialogForm
.
faceImageUrl
,
fileId
:
this
.
dialogForm
.
faceImage
,
},
];
}
else
{
...
...
@@ -437,13 +438,6 @@ export default {
},
500
);
},
async
loadLiterature
()
{
this
.
dicts
.
literatureList
.
map
((
item
)
=>
{
if
(
this
.
dialogForm
.
literature
.
indexOf
(
item
.
literatureId
)
!=
-
1
)
{
this
.
literatureModelValue
.
push
(
item
.
literatureId
);
}
});
},
handlePreview
({
type
,
file
})
{
console
.
log
(
type
,
file
);
},
...
...
@@ -453,100 +447,43 @@ export default {
// 取消编辑
cancelForm
()
{
this
.
$emit
(
"handleClose"
);
this
.
f
orm
=
{};
this
.
dialogF
orm
=
{};
},
async
handleSubmit
()
{
const
mediaArr
=
[
"faceImage"
,
"images"
,
"audios"
,
"videos"
,
"sayExplain"
,
"audios"
,
];
if
(
this
.
dialogForm
.
crId
)
{
let
ps
=
[];
//ps为涵盖5种媒体的promise集合
mediaArr
.
forEach
((
media
)
=>
{
ps
.
push
(
this
.
handleEditUpload
(
media
));
});
Promise
.
all
(
ps
).
then
((
allResult
)
=>
{
console
.
log
(
"allResult"
,
allResult
);
});
// // 处理图片等媒体
// let imagesFiles = [...this.$refs["images"].getFiles()]; //imagesFiles中只存在(success)和新添加的(ready),不存在的已经在组件中被去除了
// if (imagesFiles.length > 0) {
// let formData = new FormData();
// let fileIds = [];
// imagesFiles.forEach((imageFile) => {
// switch (imageFile.status) {
// case "ready":
// formData.append(files, imageFile.raw);
// break;
// case "success":
// fileIds.push(imageFile.fileId);
// break;
// }
// });
// let imageUpRes = await upload(formData);
// if (imageUpRes.code == 0) {
// // 拿到已存在的和上传过后的结果进行拼接,并赋值给images,不用管imagesVo,后台自行处理
// const { data } = imageUpRes;
// data.map((item) => {
// fileIds.push(item.fileId);
// });
// this.dialogForm["images"] = fileIds.join(",");
// }
// } else {
// this.dialogForm["images"] = "";
// }
// mediaArr.map((media) => {
// let files = this.$refs[media].getFiles(); //获取每种媒体的文件
// let fileList = [...files]; //fileList中包含了有已经存在的(success)和新添加的(ready)
// if (fileList.length > 0) {
// let formData = new FormData();
// fileList.forEach((file) => {
// // 只会有Ready和success两种状态,success的不做处理,ready的上传后将
// if (file.status == "ready") {
// formData.append("files", file.raw);
// ps.push(upload(formData));
// } else {
// ps.push(file);
// }
// });
// } else {
// ps.push(null);
// }
// });
Promise
.
all
(
ps
).
then
(
async
(
allResult
)
=>
{
console
.
log
(
"allResult"
,
allResult
);
// allResult.forEach((item, index) => {
// if (item) {
// let fileIds = [];
// let files = item.data;
// files.forEach((file) => {
// fileIds.push(file.fileId);
// });
// this.dialogForm[mediaArr[index]] = fileIds.join(",");
// } else {
// this.dialogForm[mediaArr[index]] = "";
// }
// });
// const { deptId, regionCode } = this.userInfo;
// const params = { ...this.dialogForm, deptId, regionCode };
// params.literature = this.literatureModelValue.join(",");
// params.status = this.dialogForm.status ? 1 : 0;
// let res = await addCulturalRelic(params);
// if (res.code == 0) {
// this.$message.success("提交成功!");
// this.loading = false;
// this.literatureModelValue = [];
// this.$emit("handleClose");
// this.$emit("refresh");
// this.dialogForm = {};
// }
allResult
.
forEach
((
item
,
index
)
=>
{
this
.
dialogForm
[
mediaArr
[
index
]]
=
item
;
});
const
params
=
{
...
this
.
dialogForm
};
params
.
literature
=
this
.
literatureModelValue
.
join
(
","
);
params
.
status
=
this
.
dialogForm
.
status
?
1
:
0
;
console
.
log
(
"params"
,
params
);
let
res
=
await
editCulturalRelic
(
params
);
if
(
res
.
code
==
0
)
{
this
.
$message
.
success
(
"修改成功!"
);
this
.
loading
=
false
;
this
.
literatureModelValue
=
[];
this
.
$emit
(
"handleClose"
);
this
.
$emit
(
"refresh"
);
this
.
dialogForm
=
{};
}
},
(
reason
)
=>
{
console
.
log
(
reason
);
...
...
@@ -607,12 +544,11 @@ export default {
// 处理编辑时图片、视频、音频、讲解词媒体资源的上传问题
handleEditUpload
(
media
)
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
debugger
;
let
fileIds
=
[];
let
fileIdStr
=
""
;
//files中只存在(success)和新添加的(ready),不存在的已经在组件中被去除了
let
files
=
[...
this
.
$refs
[
media
].
getFiles
()];
if
(
files
.
length
>
0
)
{
let
fileIds
=
[];
let
fileIdStr
=
""
;
let
formData
=
new
FormData
();
files
.
forEach
((
file
)
=>
{
switch
(
file
.
status
)
{
...
...
@@ -624,6 +560,7 @@ export default {
break
;
}
});
if
(
formData
.
get
(
"files"
))
{
upload
(
formData
)
.
then
((
upRes
)
=>
{
...
...
@@ -633,16 +570,19 @@ export default {
data
.
map
((
item
)
=>
{
fileIds
.
push
(
item
.
fileId
);
});
fileIdStr
=
fileIds
.
join
(
","
);
resolve
(
fileIdStr
);
}
fileIdStr
=
fileIds
.
join
(
","
);
resolve
(
fileIdStr
);
})
.
catch
((
err
)
=>
{
reject
(
err
);
});
}
else
{
fileIdStr
=
""
;
fileIdStr
=
fileIds
.
join
(
","
);
resolve
(
fileIdStr
);
}
}
else
{
resolve
(
""
);
}
});
},
...
...
src/views/culturalRelic/config.js
浏览文件 @
3b163d65
...
...
@@ -30,11 +30,11 @@ export const title = [{
width
:
100
,
columnAlign
:
'center'
,
},
{
prop
:
"level"
,
label
:
"文物级别"
,
columnAlign
:
'center'
,
},
//
{
//
prop: "level",
//
label: "文物级别",
//
columnAlign: 'center',
//
},
// {
// prop: "detailSize",
// label: "尺寸",
...
...
@@ -50,6 +50,7 @@ export const title = [{
// label: "类别",
// width: 100,
// columnAlign: 'center',
// isCulturalRelicType:true
// },
// {
// prop: "createId",
...
...
src/views/culturalRelic/index.vue
浏览文件 @
3b163d65
...
...
@@ -24,9 +24,12 @@
<template
v-slot:status=
"data"
>
<el-popconfirm
:title=
"getStatusTitle(data.scope.status)"
@
confirm=
"handleChangeStatus(data.scope.status
)"
@
onConfirm=
"handleChangeStatus(data.scope
)"
>
<el-switch
slot=
"reference"
:value=
"data.scope.status"
></el-switch>
<el-switch
slot=
"reference"
:value=
"Boolean(Number(data.scope.status))"
></el-switch>
</el-popconfirm>
</
template
>
<
template
v-slot:years=
"data"
>
...
...
@@ -73,7 +76,12 @@
import
TablePage
from
"@/components/Table/TablePage.vue"
;
import
TableOperation
from
"@/components/Table/TableOperation.vue"
;
import
{
title
,
operates
,
operations
}
from
"./config"
;
import
{
getCulturalRelicList
,
getRCDetailById
}
from
"@/api/culturalRelic"
;
import
{
getCulturalRelicList
,
getRCDetailById
,
deleteCultralRelic
,
editCulturalRelic
,
}
from
"@/api/culturalRelic"
;
import
InfoEditDialog
from
"./components/InfoEditDialog"
;
import
SearchBar
from
"@/components/SearchBar"
;
...
...
@@ -108,24 +116,24 @@ export default {
type
:
"input"
,
label
:
"文物名称"
,
},
{
prop
:
"name
"
,
type
:
"inpu
t"
,
label
:
"文物级别"
,
selectOptions
:
[],
},
//
{
// prop: "level
",
// type: "selec
t",
//
label: "文物级别",
//
selectOptions: [],
//
},
{
prop
:
"status"
,
type
:
"select"
,
label
:
"状态"
,
selectOptions
:
[
{
label
:
"
在线
"
,
value
:
"
true
"
,
label
:
"
已上架
"
,
value
:
"
1
"
,
},
{
label
:
"
离线
"
,
value
:
"
false
"
,
label
:
"
已下架
"
,
value
:
"
0
"
,
},
],
},
...
...
@@ -163,7 +171,19 @@ export default {
dict
(
value
)
{
if
(
value
)
{
this
.
dict
=
value
;
this
.
culturalLevel
=
[];
// let culturalLevel = { ...this.dict.cultural_relic_level };
// let options = [];
// for (const key in culturalLevel) {
// let obj = {};
// obj["label"] = culturalLevel[key];
// obj["value"] = key;
// options.push(obj);
// }
// this.searchConfig.map((item) => {
// if (item.prop == "level") {
// item.selectOptions = options;
// }
// });
}
},
},
...
...
@@ -179,7 +199,7 @@ export default {
},
getStatusTitle
(
status
)
{
return
(
status
)
=>
{
if
(
status
)
{
if
(
Number
(
status
)
)
{
return
"是否确定要下架?"
;
}
else
{
return
"是否确定要上架?"
;
...
...
@@ -192,13 +212,18 @@ export default {
},
methods
:
{
async
search
(
form
)
{
console
.
log
(
form
);
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
...
form
,
};
if
(
!
params
.
level
)
{
delete
params
.
level
;
}
if
(
params
.
status
==
""
)
{
delete
params
.
status
;
}
console
.
log
(
"params"
,
params
);
let
res
=
await
getCulturalRelicList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
...
...
@@ -207,6 +232,7 @@ export default {
reset
()
{
console
.
log
(
"reset"
);
this
.
loadData
();
},
// 加载表格数据
...
...
@@ -230,22 +256,34 @@ export default {
case
"view"
:
break
;
case
"edit"
:
// 查询接口,并复制给form
const
{
crId
}
=
row
;
this
.
loading
=
true
;
let
res
=
await
getRCDetailById
({
crId
});
if
(
res
.
code
==
0
)
{
this
.
loading
=
false
;
this
.
form
=
res
.
data
;
let
detailRes
=
await
getRCDetailById
({
crId
:
row
.
crId
});
if
(
detailRes
.
code
==
0
)
{
this
.
form
=
detailRes
.
data
;
this
.
drawerVisible
=
true
;
}
break
;
// case "delete":
// break;
case
"delete"
:
let
deleteRes
=
await
deleteCultralRelic
([
row
.
crId
]);
if
(
deleteRes
.
code
==
0
)
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
loadData
();
}
break
;
}
},
handleChangeStatus
(
status
)
{
console
.
log
(
"status"
,
status
);
async
handleChangeStatus
(
row
)
{
console
.
log
(
"status"
,
row
);
const
{
status
}
=
row
;
let
newStatus
=
status
===
"0"
?
"1"
:
"0"
;
const
params
=
{
...
row
,
status
:
newStatus
,
};
let
res
=
await
editCulturalRelic
(
params
);
if
(
res
.
code
==
0
)
{
this
.
loadData
();
this
.
$message
.
success
(
"修改成功!"
);
}
},
// 多选
handleSelectionChange
(
val
)
{
...
...
src/views/display/components/ExhibitionUnit.vue
0 → 100644
浏览文件 @
3b163d65
<!-- -->
<
template
>
<div
class=
"exhibiton-unit"
ref=
"exhibitionUnit"
>
<el-tree
:data=
"treeData"
node-key=
"id"
default-expand-all
:expand-on-click-node=
"false"
>
<div
class=
"exhibition-units-tree-node"
slot-scope=
"
{ node, data }">
<el-row
:gutter=
"10"
>
<el-col
:span=
"7"
>
<el-input
placeholder=
"展览单元(如:前言、第一单元)"
v-model=
"node.unit"
>
</el-input>
</el-col>
<el-col
:span=
"7"
>
<el-input
placeholder=
"展览单元标题(如:单元的主题)"
v-model=
"node.title"
>
</el-input>
</el-col>
<el-col
:span=
"7"
>
<el-input
placeholder=
"展览单元介绍"
v-model=
"node.intro"
>
</el-input>
</el-col>
<el-col
:span=
"3"
style=
"display: flex; align-items: center"
>
<div>
<i
class=
"el-icon-close delete"
@
click=
"() => remove(node, data)"
></i>
<el-tooltip
content=
"添加子节点"
placement=
"top"
>
<i
class=
"el-icon-plus plus"
@
click=
"() => append(data)"
></i>
</el-tooltip>
</div>
</el-col>
</el-row>
<el-row
:gutter=
"10"
>
<el-col
:span=
"24"
style=
"display: flex; flex-direction: column"
>
<div
class=
"buttons"
>
<el-button
type=
"text"
@
click
.
native=
"handleAddUnitImage(node, data)"
>
<div
class=
"add-image"
>
<svg-icon
icon-class=
"image"
/>
<span>
添加单元图片
</span>
</div>
</el-button>
<el-button
type=
"text"
@
click
.
native=
"handleAddUnitVideo(node, data)"
>
<div
class=
"add-image"
>
<svg-icon
icon-class=
"video"
/>
<span>
添加单元视频
</span>
</div></el-button
>
</div>
</el-col>
<!--
<el-col
:span=
"12"
>
123
</el-col>
-->
</el-row>
<el-row
:gutter=
"50"
>
<el-col
:span=
"12"
>
<div>
单元图片:
</div>
<ManualUploader
:files=
"node.imagesVo"
:fileLimit=
"1"
:fileSize=
"50"
:fileType=
"['jpeg', 'jpg', 'png']"
listType=
"picture-card"
ref=
"images"
/>
</el-col>
<el-col
:span=
"12"
>
<div>
单元视频:
</div>
<ManualUploader
:files=
"node.videosVo"
:fileLimit=
"1"
:fileSize=
"50"
:fileType=
"['mp4']"
listType=
"picture-card"
ref=
"videos"
/>
</el-col>
</el-row>
</div>
</el-tree>
</div>
</
template
>
<
script
>
import
ManualUploader
from
"@/components/Uploader/ManualUploader.vue"
;
export
default
{
components
:
{
ManualUploader
,
},
props
:
{
exhibitionUnits
:
{
type
:
Array
,
default
:
()
=>
[],
},
},
computed
:
{
treeData
()
{
let
exhibitionUnits
=
[...
this
.
exhibitionUnits
];
exhibitionUnits
.
map
((
item
)
=>
{
if
(
item
.
imagesVo
&&
item
.
imagesVo
.
length
>
0
)
{
}
else
{
item
.
imagesVo
=
[];
}
if
(
item
.
VideosVo
&&
item
.
VideosVo
.
length
>
0
)
{
}
else
{
item
.
VideosVo
=
[];
}
});
return
exhibitionUnits
;
},
},
data
()
{
return
{};
},
mounted
()
{},
methods
:
{
append
(
data
)
{
const
newChild
=
{
unit
:
""
,
title
:
""
,
intro
:
""
,
showImageUploader
:
false
,
showVideoUploader
:
false
,
children
:
[],
};
if
(
!
data
.
children
)
{
this
.
$set
(
data
,
"children"
,
[]);
}
data
.
children
.
push
(
newChild
);
},
remove
(
node
,
data
)
{
const
parent
=
node
.
parent
;
const
children
=
parent
.
data
.
children
||
parent
.
data
;
const
index
=
children
.
findIndex
((
d
)
=>
d
.
id
===
data
.
id
);
children
.
splice
(
index
,
1
);
},
handleAddUnitImage
(
node
,
data
)
{
console
.
log
(
"node"
,
node
);
console
.
log
(
"data"
,
data
);
},
handleAddUnitVideo
(
node
,
data
)
{},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.exhibition-units-tree-node
{
display
:
flex
;
width
:
100%
;
flex-direction
:
column
;
}
::v-deep
.el-tree-node__content
{
// padding: 10px;
// min-height: 140px;
height
:
auto
;
padding
:
10px
;
display
:
flex
;
align-items
:
center
;
}
.plus
{
font-size
:
20px
;
font-weight
:
bold
;
color
:
#409eff
;
transition
:
all
ease
0
.5s
;
padding
:
4px
;
border-radius
:
4px
;
margin-left
:
10px
;
&
:hover
{
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.05
);
//
}
}
.delete
{
font-size
:
20px
;
font-weight
:
bold
;
color
:
#f56c6c
;
transition
:
all
ease
0
.5s
;
padding
:
4px
;
border-radius
:
4px
;
margin-left
:
10px
;
&
:hover
{
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.05
);
//
}
}
.add-image
{
display
:
flex
;
align-items
:
center
;
.svg-icon
{
width
:
24px
;
height
:
24px
;
color
:
#409eff
;
margin-left
:
10px
;
padding
:
4px
;
border-radius
:
4px
;
box-sizing
:
border-box
;
// &:hover {
// background-color: rgba($color: #000000, $alpha: 0.05);
// //
// }
}
}
</
style
>
src/views/display/components/InfoEditDialog.vue
浏览文件 @
3b163d65
差异被折叠。
点击展开。
src/views/display/config.js
浏览文件 @
3b163d65
...
...
@@ -13,14 +13,20 @@ export const title = [{
prop
:
"type"
,
label
:
"展览类型"
,
columnAlign
:
'center'
,
isDisplayType
:
true
},
{
prop
:
"depName"
,
label
:
"展览单位"
,
columnAlign
:
'center'
,
isDept
:
true
},
{
prop
:
"regionName"
,
label
:
"所在地区"
,
columnAlign
:
'center'
,
},
{
prop
:
"faceImage"
,
label
:
"封面"
,
...
...
@@ -29,11 +35,11 @@ export const title = [{
width
:
130
},
{
prop
:
"intro"
,
label
:
"展览介绍"
,
columnAlign
:
'center'
,
},
//
{
//
prop: "intro",
//
label: "展览介绍",
//
columnAlign: 'center',
//
},
// {
// prop: "literature",
...
...
@@ -56,11 +62,6 @@ export const title = [{
label
:
"浏览量"
,
columnAlign
:
'center'
,
},
{
prop
:
"regionCode"
,
label
:
"所在地区"
,
columnAlign
:
'center'
,
},
{
prop
:
"remark"
,
...
...
@@ -78,12 +79,12 @@ export const title = [{
label
:
"模板主题"
,
columnAlign
:
'center'
,
},
{
prop
:
"images"
,
label
:
"展览图片"
,
columnAlign
:
'center'
,
isImages
:
true
},
//
{
//
prop: "images",
//
label: "展览图片",
//
columnAlign: 'center',
//
isImages: true
//
},
// {
// prop: "audios",
// label: "展览音频",
...
...
src/views/display/index.vue
浏览文件 @
3b163d65
...
...
@@ -2,7 +2,10 @@
<div
class=
"app-container"
>
<div
class=
"top-bar"
>
<SearchBar
:config=
"searchConfig"
@
search=
"search"
@
reset=
"reset"
/>
<el-button
type=
"primary"
@
click
.
native=
"handleOperation(
{type:'add'})">
<el-button
type=
"primary"
@
click
.
native=
"handleOperation(
{ type: 'add' })"
>
<i
class=
"el-icon-s-promotion"
></i>
发布
</el-button
>
...
...
@@ -17,11 +20,14 @@
:title=
"getStatusTitle(data.scope.status)"
@
confirm=
"handleChangeStatus(data.scope.status)"
>
<el-switch
slot=
"reference"
:value=
"data.scope.status"
></el-switch>
<el-switch
slot=
"reference"
:value=
"Boolean(Number(data.scope.status))"
></el-switch>
</el-popconfirm>
</
template
>
<
template
v-slot:
t
ype=
"data"
>
{{
di
splayTypes
[
data
.
scope
.
type
]
}}
<
template
v-slot:
displayT
ype=
"data"
>
{{
di
ct
.
display_type
[
data
.
scope
.
type
]
}}
</
template
>
<
template
v-slot:faceImage=
"data"
>
<img
...
...
@@ -54,6 +60,7 @@
>
查看音频
</span
>
</
template
>
<
template
v-slot:operates=
"scope"
>
<TableOperation
:operations=
"tableOperations"
...
...
@@ -97,7 +104,7 @@
import
TablePage
from
"@/components/Table/TablePage.vue"
;
import
TableOperation
from
"@/components/Table/TableOperation.vue"
;
import
{
title
,
operates
,
operations
}
from
"./config"
;
import
{
getList
}
from
"@/api/display"
;
import
{
getList
,
deleteDisplay
}
from
"@/api/display"
;
import
InfoEditDialog
from
"./components/InfoEditDialog"
;
import
PreviewDialog
from
"./components/PreviewDialog"
;
import
SearchBar
from
"@/components/SearchBar"
;
...
...
@@ -125,7 +132,7 @@ export default {
},
searchConfig
:
[
{
prop
:
"
nam
e"
,
prop
:
"
titl
e"
,
type
:
"input"
,
label
:
"展览名称"
,
},
...
...
@@ -135,12 +142,12 @@ export default {
label
:
"状态"
,
selectOptions
:
[
{
label
:
"
在
线"
,
value
:
"
true
"
,
label
:
"
已上
线"
,
value
:
"
1
"
,
},
{
label
:
"
离
线"
,
value
:
"
false
"
,
label
:
"
已下
线"
,
value
:
"
0
"
,
},
],
},
...
...
@@ -171,16 +178,16 @@ export default {
displayTypes
:
{},
};
},
//
watch: {
//
dict(value) {
//
if (value) {
//
// value.display_type.map((item) => {
//
// this.displayTypes[item.value] = item.label;
//
// });
//
}
//
},
//
},
watch
:
{
dict
(
value
)
{
if
(
value
)
{
this
.
dict
=
value
;
// value.display_type.map((item) => {
// this.displayTypes[item.value] = item.label;
// });
}
},
},
computed
:
{
tableTitle
()
{
return
title
;
...
...
@@ -193,7 +200,7 @@ export default {
},
getStatusTitle
(
status
)
{
return
(
status
)
=>
{
if
(
status
)
{
if
(
Number
(
status
)
)
{
return
"是否确定要下架?"
;
}
else
{
return
"是否确定要上架?"
;
...
...
@@ -216,12 +223,14 @@ export default {
limit
:
this
.
list
.
size
,
...
form
,
};
if
(
params
.
status
==
""
)
{
delete
params
.
status
;
}
let
res
=
await
getList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
},
reset
()
{
this
.
loadData
();
console
.
log
(
"reset"
);
...
...
@@ -239,8 +248,8 @@ export default {
this
.
list
=
res
.
data
;
}
},
handleOperation
(
value
,
row
)
{
console
.
log
(
"handleOperation"
,
value
,
row
);
async
handleOperation
(
value
,
row
)
{
//
console.log("handleOperation", value, row);
switch
(
value
.
type
)
{
case
"add"
:
this
.
editDialogVisible
=
true
;
...
...
@@ -251,8 +260,14 @@ export default {
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
row
));
this
.
editDialogVisible
=
true
;
break
;
// case "delete":
// break;
case
"delete"
:
// console.log(row.exhibitionId);
let
deleteRes
=
await
deleteDisplay
([
row
.
exhibitionId
])
if
(
deleteRes
.
code
===
0
)
{
this
.
loadData
()
this
.
$message
.
success
(
'删除成功!'
)
}
break
;
}
},
handleChangeStatus
(
status
)
{
...
...
@@ -264,10 +279,16 @@ export default {
},
// 改变页容量
handleSizeChange
()
{},
handleSizeChange
(
value
)
{
this
.
list
.
size
=
value
;
this
.
loadData
();
},
// 改变当前显示页
handleCurrentChange
()
{},
handleCurrentChange
(
value
)
{
this
.
list
.
current
=
value
;
this
.
loadData
();
},
// 搜索
onSubmitSearch
()
{
...
...
@@ -276,7 +297,7 @@ export default {
// 关闭Dialog
handleClose
()
{
this
.
editDialogVisible
=
false
;
this
.
form
=
{}
this
.
form
=
{};
},
// 关闭预览图片
closeImgViewer
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论