Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_backstage
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_backstage
Commits
b5326eb4
提交
b5326eb4
authored
6月 24, 2022
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
文物管理接口联调
上级
43a00b0e
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
677 行增加
和
113 行删除
+677
-113
culturalRelic.js
src/api/culturalRelic.js
+27
-2
audio.png
src/assets/imgs/audio.png
+0
-0
doc.png
src/assets/imgs/doc.png
+0
-0
pdf.png
src/assets/imgs/pdf.png
+0
-0
index.js
src/components/Dict/index.js
+13
-9
TablePage.vue
src/components/Table/TablePage.vue
+9
-0
ManualUploader.vue
src/components/Uploader/ManualUploader.vue
+326
-0
index.vue
src/components/Uploader/index.vue
+1
-0
upload.js
src/utils/upload.js
+11
-3
InfoEditDialog.vue
src/views/culturalRelic/components/InfoEditDialog.vue
+0
-0
PreviewDialog.vue
src/views/culturalRelic/components/PreviewDialog.vue
+144
-0
config.js
src/views/culturalRelic/config.js
+62
-65
index.vue
src/views/culturalRelic/index.vue
+73
-22
InfoEditDialog.vue
src/views/display/components/InfoEditDialog.vue
+1
-2
index.vue
src/views/display/index.vue
+10
-10
没有找到文件。
src/api/culturalRelic.js
浏览文件 @
b5326eb4
import
request
from
'@/utils/request'
export
function
get
List
(
params
)
{
export
function
get
CulturalRelicList
(
data
)
{
return
request
({
url
:
'/culturalRelic/getList'
,
url
:
'/bizCulturalRelic/listByPage'
,
method
:
'post'
,
data
})
}
export
function
addCulturalRelic
(
data
)
{
return
request
({
url
:
'/bizCulturalRelic/add'
,
method
:
'post'
,
data
})
}
export
function
editCulturalRelic
(
data
)
{
return
request
({
url
:
'/bizCulturalRelic/update'
,
method
:
'put'
,
data
})
}
// 根据文物id查询详情
export
function
getRCDetailById
(
params
)
{
return
request
({
url
:
'/bizCulturalRelic/listById'
,
method
:
'get'
,
params
})
}
src/assets/imgs/audio.png
0 → 100644
浏览文件 @
b5326eb4
5.0 KB
src/assets/imgs/doc.png
0 → 100644
浏览文件 @
b5326eb4
7.2 KB
src/assets/imgs/pdf.png
0 → 100644
浏览文件 @
b5326eb4
5.2 KB
src/components/Dict/index.js
浏览文件 @
b5326eb4
...
...
@@ -12,7 +12,7 @@ class Dict {
}
async
init
(
names
)
{
//
console.log('names', names);
console
.
log
(
'names'
,
names
);
// const ps = [];
// 先判断list中的name是否存在,如果不存在,把不存在的放置在一个list中,再对list进行获取
var
nonExistentNames
=
[]
...
...
@@ -24,11 +24,7 @@ class Dict {
nonExistentNames
.
push
(
name
)
//存入list中,单独进行处理调用
}
});
// console.log('nonExistentNames', nonExistentNames);
// 拿所有不存在的name去获取字典
// 对所有不存在的name进行遍历,如果里面有literature,则删除该数组中的literature
var
index
=
nonExistentNames
.
indexOf
(
'literature'
)
// console.log('index');
if
(
index
!=
-
1
)
{
// debugger
Vue
.
set
(
this
.
dict
,
'literature'
,
[]);
...
...
@@ -50,20 +46,28 @@ class Dict {
}
if
(
nonExistentNames
.
length
>
0
)
{
// debugger
var
res
=
await
getDictCode
(
nonExistentNames
)
nonExistentNames
.
forEach
(
n
=>
{
Vue
.
set
(
this
.
dict
,
n
,
[]);
var
arr
=
[]
// var arr = []
var
obj
=
{}
if
(
res
.
code
==
0
)
{
res
.
data
.
map
(
item
=>
{
if
(
item
.
dictType
===
n
)
{
arr
.
push
(
item
)
// 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
}
})
this
.
dict
[
n
]
=
Object
.
freeze
(
arr
)
this
.
dict
[
n
]
=
Object
.
freeze
(
obj
)
store
.
commit
(
"dict/SET_DICTS"
,
{
label
:
n
,
value
:
Object
.
freeze
(
arr
),
value
:
Object
.
freeze
(
obj
),
});
}
})
...
...
src/components/Table/TablePage.vue
浏览文件 @
b5326eb4
...
...
@@ -40,6 +40,15 @@
</
template
>
<
template
v-else-if=
"item.prop=='type'"
>
<slot
name=
"type"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop=='years'"
>
<slot
name=
"years"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop=='level'"
>
<slot
name=
"level"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.prop=='textureType'"
>
<slot
name=
"textureType"
:scope=
"scope.row"
></slot>
</
template
>
<span
v-else
>
{{ scope.row[item.prop] }}
</span>
</template>
...
...
src/components/Uploader/ManualUploader.vue
0 → 100644
浏览文件 @
b5326eb4
<
template
>
<div
class=
"images-list"
>
<el-upload
action
:on-remove=
"handleRemove"
:on-exceed=
"handleExceed"
:on-change=
"handleChange"
:file-list=
"fileList"
:multiple=
"fileLimit > 1"
:limit=
"fileLimit"
:list-type=
"listType"
:accept=
"fileAccept"
:auto-upload=
"false"
>
<i
v-if=
"listType === 'picture-card'"
class=
"el-icon-plus"
></i>
<el-button
v-else
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<div
v-if=
"showTip"
slot=
"tip"
class=
"el-upload__tip"
>
只能上传
{{
fileTypeName
||
"jpg/png"
}}
文件,且不超过
{{
fileSize
}}
MB,最多上传
{{
fileLimit
}}
个文件
</div>
</el-upload>
<!--
<el-upload
action
:before-upload=
"handleBeforeUpload"
:on-success=
"handleSuccess"
:on-error=
"handleUploadError"
:on-remove=
"handleRemove"
:on-exceed=
"handleExceed"
:on-change=
"handleChange"
:file-list=
"fileList"
:multiple=
"fileLimit > 1"
:headers=
"headers"
:limit=
"fileLimit"
:list-type=
"listType"
name=
"files"
:accept=
"fileAccept"
auto-upload=
"false"
>
<i
v-if=
"listType === 'picture-card'"
class=
"el-icon-plus"
></i>
<el-button
v-else
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<div
v-if=
"showTip"
slot=
"tip"
class=
"el-upload__tip"
>
只能上传
{{
fileTypeName
||
"jpg/png"
}}
文件,且不超过
{{
fileSize
}}
MB,最多上传
{{
fileLimit
}}
个文件
</div>
</el-upload>
-->
</div>
</
template
>
<
script
>
import
{
getToken
}
from
"@/utils/auth"
;
import
{
upload
}
from
"@/utils/upload"
;
import
{
Debounce
}
from
'@/utils/index'
export
default
{
name
:
"RcUploader"
,
props
:
{
// 值
// value: [String, Object, Array],
files
:
{
type
:
Array
,
default
:
()
=>
[],
},
// 大小限制(MB)
fileSize
:
{
type
:
Number
,
default
:
5
,
},
// 文件类型, 例如["doc", "xls", "ppt", "txt", "pdf"]
fileType
:
{
type
:
Array
,
default
:
()
=>
[
"png"
,
"jpg"
,
"jpeg"
],
},
// 文件列表类型 text/picture/picture-card
listType
:
{
type
:
String
,
default
:
"picture"
,
},
// 是否显示提示
isShowTip
:
{
type
:
Boolean
,
default
:
true
,
},
// 最大允许上传个数
fileLimit
:
{
type
:
Number
,
default
:
99
,
},
},
data
()
{
return
{
uploadUrl
:
process
.
env
.
NODE_ENV
===
"test"
||
process
.
env
.
NODE_ENV
===
"development"
?
"/api/sysFiles/upload"
:
process
.
env
.
NODE_ENV
+
"/sysFiles/upload"
,
// 上传的图片服务器地址
headers
:
{
authorization
:
getToken
(),
},
fileList
:
[],
// tempFileList: [],
uploadDisabled
:
false
,
upLoadList
:
[],
};
},
watch
:
{
files
:
{
handler
:
function
(
newVal
,
oldVal
)
{
console
.
log
(
"newVal"
,
newVal
);
this
.
fileList
=
newVal
;
},
immediate
:
true
,
deep
:
true
,
},
},
computed
:
{
// 是否显示提示
showTip
()
{
return
this
.
isShowTip
&&
(
this
.
fileType
||
this
.
fileSize
);
},
fileTypeName
()
{
let
typeName
=
""
;
this
.
fileType
.
forEach
((
item
)
=>
{
typeName
+=
`
${
item
}
,`
;
});
return
typeName
;
},
fileAccept
()
{
let
fileAccept
=
""
;
this
.
fileType
.
forEach
((
element
)
=>
{
fileAccept
+=
`.
${
element
}
,`
;
});
return
fileAccept
;
},
},
created
()
{
this
.
fileList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
files
));
},
methods
:
{
// 自定义上传实现,用于修改上传后的封面
httpRequest
(
e
)
{
var
formData
=
new
FormData
();
console
.
log
(
"e"
,
e
);
formData
.
append
(
"files"
,
e
.
file
);
// debugger
// let files = e.file.files;
// let formData = new FormData();
// files = Array.from(files); // files是类数组,需要先转为数组
// files.forEach((file) => {
// formData.append("file", file);
// });
// console.log('formData',formData.get('files'));
upload
(
formData
).
then
((
res
)
=>
{
console
.
log
(
"上传res"
,
res
);
if
(
res
.
data
.
code
==
0
)
{
console
.
log
(
res
);
var
file
=
res
.
data
.
data
[
0
];
this
.
fileList
.
push
({
url
:
file
.
url
,
//pdf封面图片
realUrl
:
file
.
url
,
fileId
:
file
.
fileId
,
name
:
file
.
name
,
//接口返回的pdf文件链接
});
// var last = res.data.substring(res.data.lastIndexOf(".")); //将接口中返回的各文件链接进行截取,来判断属于什么格式文件
// if (last == ".pdf") {
// this.fileList.push({
// url: res.data[0].url, //pdf封面图片
// realUrl: res.data[0].url,
// fileId: res.data[0].fileId,
// name: res.data[0].fileId,
// //接口返回的pdf文件链接
// });
// } else if (
// last == ".png" ||
// last == ".jpg" ||
// last == ".jpeg" ||
// last == ".jfif"
// ) {
// this.fileList.push({
// url: res.data.result,
// realurl: res.data.result,
// fileId: res.data[0].fileId,
// name: res.data[0].fileId,
// });
// } else if (last == ".doc" || last == ".docx") {
// this.fileList.push({
// url: res.data.result,
// realurl: res.data.result,
// fileId: res.data[0].fileId,
// name: res.data[0].fileId,
// });
// } else if (last == ".xls" || last == ".xlsx") {
// this.fileList.push({
// url: res.data.result,
// realurl: res.data.result,
// fileId: res.data[0].fileId,
// name: res.data[0].fileId,
// });
// } else if (last == ".mp4" || last == ".wav") {
// this.fileList.push({
// url: res.data.result,
// realurl: res.data.result,
// fileId: res.data[0].fileId,
// name: res.data[0].fileId,
// });
// }
}
else
{
this
.
$message
({
message
:
res
.
data
.
msg
,
type
:
"error"
,
offset
:
70
,
});
}
});
},
// 上传前校检格式和大小
handleBeforeUpload
(
file
)
{
// 校检文件类型
this
.
$emit
(
"endLoading"
);
this
.
$emit
(
"startLoading"
);
return
new
Promise
((
resolve
,
reject
)
=>
{
var
isValidated
=
true
;
if
(
this
.
fileType
&&
file
)
{
let
fileExtension
=
""
;
if
(
file
.
name
.
lastIndexOf
(
"."
)
>
-
1
)
{
fileExtension
=
file
.
name
.
slice
(
file
.
name
.
lastIndexOf
(
"."
)
+
1
);
}
const
isTypeOk
=
this
.
fileType
.
some
((
type
)
=>
{
if
(
file
.
raw
.
type
.
indexOf
(
type
)
>
-
1
)
return
true
;
if
(
fileExtension
&&
fileExtension
.
indexOf
(
type
)
>
-
1
)
return
true
;
return
false
;
});
if
(
!
isTypeOk
&
file
)
{
this
.
$message
.
error
(
`文件格式不正确, 请上传
${
this
.
fileType
.
join
(
"/"
)}
格式文件!`
);
this
.
$emit
(
"endLoading"
);
isValidated
=
false
;
}
}
// 校检文件大小
if
(
this
.
fileSize
&&
file
)
{
const
isLt
=
file
.
size
/
1024
/
1024
<
this
.
fileSize
;
if
(
!
isLt
)
{
this
.
$message
.
error
(
`上传文件大小不能超过
${
this
.
fileSize
}
MB!`
);
isValidated
=
false
;
}
}
if
(
isValidated
)
{
resolve
(
file
);
}
else
{
reject
(
"验证失败"
);
}
});
},
handleUploadError
(
err
)
{
this
.
$message
.
error
(
"上传失败, 请重试"
);
},
// 文件个数超出
handleExceed
()
{
this
.
$message
.
error
(
`超出上传文件个数,请删除以后再上传!`
);
},
// // 文件上传成功的钩子
// handleSuccess(res, file, fileList) {
// console.log("res", res);
// console.log("fileList", fileList);
// this.$message.success("上传成功");
// this.$emit("endLoading");
// this.changeFileList(fileList);
// },
// 文件列表移除文件时的钩子
handleRemove
(
file
,
fileList
)
{
this
.
changeFileList
(
fileList
);
},
handleChange
(
file
,
fileList
)
{
// console.log(fileList);
if
(
file
.
status
===
"ready"
)
{
console
.
log
(
"ready"
);
this
.
handleBeforeUpload
(
file
)
.
then
((
res
)
=>
{
console
.
log
(
"上传验证成功"
,
res
);
// this.list.push(file)
Debounce
(()
=>
{
this
.
totalList
=
fileList
;
console
.
log
(
'this.totalList'
,
this
.
totalList
);
},
500
);
// debugger;
})
.
catch
((
err
)
=>
{
console
.
log
(
"err"
,
err
);
});
}
// if (fileList.length == this.fileLimit) {
// this.uploadDisabled = true;
// }
},
// 文件列表改变的时候,更新组件的v-model的文的数据
changeFileList
(
fileList
)
{
console
.
log
(
"fileList"
,
fileList
);
const
tempFileList
=
fileList
.
map
((
item
)
=>
{
let
tempItem
=
{
name
:
item
.
name
,
url
:
item
.
response
?
item
.
response
.
data
[
0
].
url
:
item
.
url
,
};
return
tempItem
;
});
this
.
$emit
(
"endLoading"
);
this
.
$emit
(
"handleFileReady"
,
tempFileList
);
},
},
};
</
script
>
<
style
lang=
"scss"
>
// .images-list{
// border: 1px dashed #d5d5d5;
// padding: 10px;
// border-radius: 4px;
// background: #fff;
// }
.disabled
.el-upload--picture-card
{
display
:
none
!
important
;
}
</
style
>
\ No newline at end of file
src/components/Uploader/index.vue
浏览文件 @
b5326eb4
...
...
@@ -204,6 +204,7 @@ export default {
// 文件上传成功的钩子
handleSuccess
(
res
,
file
,
fileList
)
{
console
.
log
(
"res"
,
res
);
console
.
log
(
"fileList"
,
fileList
);
this
.
$message
.
success
(
"上传成功"
);
this
.
$emit
(
"endLoading"
);
this
.
changeFileList
(
fileList
);
...
...
src/utils/upload.js
浏览文件 @
b5326eb4
...
...
@@ -2,16 +2,24 @@ import axios from 'axios'
import
{
getToken
}
from
'@/utils/auth'
var
uploadUrl
=
process
.
env
.
NODE_ENV
===
"test"
||
process
.
env
.
NODE_ENV
===
"development"
?
"/api/sysFiles/upload"
:
process
.
env
.
NODE_ENV
+
"/sysFiles/upload"
/**
* 封装上传文件的post方法
* @param url
* @param data
* @returns {Promise}
*/
export
function
upload
(
url
,
data
)
{
export
function
upload
(
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
post
(
url
,
data
,
{
axios
.
post
(
u
ploadU
rl
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data;boundary = '
+
new
Date
().
getTime
(),
'authorization'
:
getToken
(),
}
}).
then
(
response
=>
{
...
...
src/views/culturalRelic/components/InfoEditDialog.vue
浏览文件 @
b5326eb4
差异被折叠。
点击展开。
src/views/culturalRelic/components/PreviewDialog.vue
0 → 100644
浏览文件 @
b5326eb4
<
template
>
<el-dialog
:visible
.
sync=
"dialogVisible"
width=
"50%"
style=
"height: 98%"
:before-close=
"handleClose"
top=
"5vh"
lock-scroll
>
<div
class=
"title"
slot=
"title"
>
<div
class=
"divider"
></div>
<div
class=
"label"
>
{{
title
}}
</div>
</div>
<div
class=
"dialog-content"
>
<el-main
style=
"height: 100%"
>
<el-row
v-if=
"videos.length == 1"
style=
"height: 100%"
>
<el-col
:span=
"24"
style=
"height: 100%"
class=
"video-container"
>
<video
:src=
"videos[0]"
style=
"height: auto; width: 100%"
controls
muted
loop
></video>
</el-col>
</el-row>
<el-row
v-if=
"videos.length > 1"
style=
"height: 100%"
:gutter=
"16"
>
<template
v-for=
"(item, index) in videos"
>
<el-col
:span=
"16"
:key=
"item"
v-if=
"index == 0"
style=
"height: 100%"
class=
"video-container"
>
<video
:src=
"videos[0]"
style=
"height: auto; width: 100%"
controls
loop
></video>
</el-col>
<el-col
:span=
"8"
:key=
"item"
v-else
>
<video
:src=
"videos[index]"
style=
"height: auto; width: 100%"
class=
"video-container"
controls
loop
></video>
</el-col>
</
template
>
</el-row>
</el-main>
<div
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleClose"
>
关闭
</el-button>
</div>
</div>
</el-dialog>
</template>
<
script
>
export
default
{
name
:
"PreviewDialog"
,
components
:
{},
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
,
},
videos
:
{
type
:
Array
,
default
:
()
=>
[],
},
},
computed
:
{
dialogVisible
:
{
get
:
function
()
{
return
this
.
visible
;
},
set
:
function
()
{},
},
title
()
{
return
"查看视频"
;
},
},
dicts
:
[],
data
()
{
return
{};
},
async
created
()
{
// console.log(this.videos);
},
methods
:
{
// 取消编辑
cancelForm
()
{
this
.
$emit
(
"handleClose"
);
},
handleClose
(
done
)
{
this
.
$emit
(
"handleClose"
);
},
},
};
</
script
>
<
style
lang=
'scss'
scoped
>
.title
{
display
:
flex
;
margin-bottom
:
16px
;
.divider
{
width
:
8px
;
border-left
:
4px
solid
#409eff
;
margin-right
:
8px
;
}
.label
{
font-weight
:
bold
;
}
}
.dialog-content
{
padding
:
0
32px
;
display
:
flex
;
flex-direction
:
column
;
.relate
{
flex
:
1
;
}
.dialog-footer
{
display
:
flex
;
justify-content
:
flex-end
;
}
}
.video-container
{
background-color
:
#000
;
display
:
flex
;
justify-content
:
center
;
}
.el-dialog__body
{
padding
:
0
20px
30px
20px
;
}
</
style
>
\ No newline at end of file
src/views/culturalRelic/config.js
浏览文件 @
b5326eb4
...
...
@@ -27,46 +27,56 @@
export
const
title
=
[{
prop
:
"name"
,
label
:
"名称"
,
columnAlign
:
'center'
,
},
{
prop
:
"num"
,
label
:
"数量"
,
columnAlign
:
'center'
,
},
{
prop
:
"years"
,
label
:
"年代"
,
columnAlign
:
'center'
,
},
{
prop
:
"type"
,
label
:
"类别"
,
width
:
100
,
columnAlign
:
'center'
,
},
{
prop
:
"level"
,
label
:
"级别"
,
columnAlign
:
'center'
,
},
{
prop
:
"textureType"
,
label
:
"质地"
,
columnAlign
:
'center'
,
},
{
prop
:
"detailSize"
,
label
:
"尺寸"
,
label
:
"文物级别"
,
columnAlign
:
'center'
,
},
// {
// prop: "detailSize",
// label: "尺寸",
// columnAlign: 'center',
// },
// {
// prop: "textureType",
// label: "质地",
// columnAlign: 'center',
// },
// {
// prop: "type",
// label: "类别",
// width: 100,
// columnAlign: 'center',
// },
// {
// prop: "createId",
// label: "创建人",
// columnAlign: 'center',
// },
// {
// prop: "createTime",
// label: "创建时间",
// columnAlign: 'center',
// },
{
prop
:
"deptName"
,
label
:
"收藏馆名称"
,
columnAlign
:
'center'
,
},
{
prop
:
"dept
Id
"
,
prop
:
"dept
Name
"
,
label
:
"馆藏单位"
,
columnAlign
:
'center'
,
},
{
prop
:
"region
Cod
e"
,
prop
:
"region
Nam
e"
,
label
:
"所属地"
,
width
:
100
,
columnAlign
:
'center'
,
},
{
...
...
@@ -76,15 +86,18 @@ export const title = [{
},
{
prop
:
"literature"
,
label
:
"关联文献"
,
prop
:
"themeWord"
,
label
:
"主题词"
,
width
:
100
,
columnAlign
:
'center'
,
},
{
prop
:
"collectCount"
,
label
:
"收藏量"
,
prop
:
"num"
,
label
:
"数量"
,
width
:
100
,
columnAlign
:
'center'
,
},
{
prop
:
"loveCount"
,
label
:
"点赞量"
,
...
...
@@ -92,38 +105,41 @@ export const title = [{
columnAlign
:
'center'
,
},
{
prop
:
"region"
,
label
:
"所在地区"
,
width
:
100
,
prop
:
"browseCount"
,
label
:
"浏览量"
,
columnAlign
:
'center'
,
},
{
prop
:
"remark"
,
label
:
"备注"
,
width
:
100
,
prop
:
"collectCount"
,
label
:
"收藏量"
,
columnAlign
:
'center'
,
},
{
prop
:
"s
tatus
"
,
label
:
"
状态
"
,
prop
:
"s
ourceWay
"
,
label
:
"
来源方式
"
,
width
:
100
,
columnAlign
:
'center'
,
isStatus
:
true
},
{
prop
:
"
themeType
"
,
label
:
"
模板主题
"
,
prop
:
"
status
"
,
label
:
"
上下架状态
"
,
width
:
100
,
columnAlign
:
'center'
,
isStatus
:
true
},
{
prop
:
"
videos
"
,
label
:
"
展览视频
"
,
prop
:
"
remark
"
,
label
:
"
备注
"
,
width
:
100
,
columnAlign
:
'center'
,
},
// directory 文件夹
// flag3d 是否有3d图片
// updateId 更新人
]
export
const
operates
=
{
...
...
@@ -149,21 +165,3 @@ export const operations = [{
},
]
export
const
literatureTableTitle
=
[
{
prop
:
"name"
,
label
:
"文献名称"
,
columnAlign
:
'center'
,
},
{
prop
:
"authors"
,
label
:
"作者"
,
columnAlign
:
'center'
,
},
{
prop
:
"remark"
,
label
:
"备注"
,
columnAlign
:
'center'
,
},
]
\ No newline at end of file
src/views/culturalRelic/index.vue
浏览文件 @
b5326eb4
...
...
@@ -2,13 +2,16 @@
<div
class=
"app-container"
>
<div
class=
"top-bar"
>
<SearchBar
:config=
"searchConfig"
@
search=
"search"
@
reset=
"reset"
/>
<el-button
type=
"primary"
@
click
.
native=
"handleOpenDialog('add')"
>
<el-button
type=
"primary"
@
click
.
native=
"handleOperation(
{ type: 'add' })"
>
<i
class=
"el-icon-s-promotion"
></i>
发布
</el-button
>
</div>
<TablePage
:data=
"list.record"
:data=
"list.record
s
"
:tableTitle=
"tableTitle"
:operates=
"tableOperates"
>
...
...
@@ -20,6 +23,18 @@
<el-switch
slot=
"reference"
:value=
"data.scope.status"
></el-switch>
</el-popconfirm>
</
template
>
<
template
v-slot:years=
"data"
>
{{
dict
.
cultural_relic_years
[
data
.
scope
.
years
]
}}
</
template
>
<
template
v-slot:level=
"data"
>
{{
dict
.
cultural_relic_level
[
data
.
scope
.
level
]
}}
</
template
>
<
template
v-slot:textureType=
"data"
>
{{
dict
.
cultural_relic_texture
[
data
.
scope
.
textureType
]
}}
</
template
>
<
template
v-slot:type=
"data"
>
{{
dict
.
cultural_relic_type
[
data
.
scope
.
type
]
}}
</
template
>
<
template
v-slot:operates=
"scope"
>
<TableOperation
:operations=
"tableOperations"
...
...
@@ -51,7 +66,7 @@
import
TablePage
from
"@/components/Table/TablePage.vue"
;
import
TableOperation
from
"@/components/Table/TableOperation.vue"
;
import
{
title
,
operates
,
operations
}
from
"./config"
;
import
{
get
List
}
from
"@/api/display
"
;
import
{
get
CulturalRelicList
}
from
"@/api/culturalRelic
"
;
import
InfoEditDialog
from
"./components/InfoEditDialog"
;
import
SearchBar
from
"@/components/SearchBar"
;
...
...
@@ -62,6 +77,12 @@ export default {
InfoEditDialog
,
SearchBar
,
},
dicts
:
[
"cultural_relic_years"
,
"cultural_relic_level"
,
"cultural_relic_texture"
,
"cultural_relic_type"
],
data
()
{
return
{
list
:
{
...
...
@@ -78,7 +99,13 @@ export default {
{
prop
:
"name"
,
type
:
"input"
,
label
:
"展览名称"
,
label
:
"文物名称"
,
},
{
prop
:
"name"
,
type
:
"input"
,
label
:
"文物级别"
,
selectOptions
:[]
},
{
prop
:
"status"
,
...
...
@@ -99,25 +126,42 @@ export default {
drawerVisible
:
false
,
isAdd
:
true
,
form
:
{
title
:
""
,
//标题
type
:
""
,
// 类别(待定)--枚举值(社会、生活等)
character
:
1
,
//展览性质(精品展2、布展1、文物展3)--此处填写布展类别
keyword
:
""
,
// 关键词
deptId
:
""
,
//展览单位id--暂填入用户自己的单位
regionCode
:
""
,
// 所在地域--暂填入用户自己的地区
intro
:
""
,
//展览介绍,
themeType
:
""
,
//模板主题--前端枚举
literature
:
""
,
//关联文献。id1,id2,id3--接口查询
name
:
""
,
//名称
type
:
""
,
//类别(字典值)
level
:
""
,
//文物级别(字典值)
textureType
:
""
,
//质地(字典值)
detailSize
:
""
,
// 具体尺寸
years
:
""
,
//年代
num
:
""
,
//数量
// deptId:'',//收藏馆id——传当前用户的deptId
intro
:
""
,
//馆藏介绍
literature
:
""
,
//关联文献。id1,id2,id3
// directory:'',// 文件夹(字母或者数字命名)
// regionCode:'',//所属地(分号分隔的编号)——传当前用户的regionCode
sourceWay
:
""
,
//来源方式
sayExplain
:
""
,
//讲解词文件。文件id
status
:
""
,
//上下架状态(0-下架,1-上架)
// flag3d:'',//是否有3D图片(字典值:1-有;0-无)
themeWord
:
""
,
//主题词
url3d
:
""
,
//3durl链接
remark
:
""
,
//备注
status
:
false
,
//上下架状态(0-下架,1-上架)
faceImage
:
""
,
// 封面(图片1张)
images
:
""
,
//展览图片
videos
:
""
,
//展览视频
audios
:
""
,
//展览音频
audios
:
""
,
//音频文件(文件id)
images
:
""
,
//图片文件(文件id,多个以逗号隔开)
videos
:
""
,
//视频文件(文件id)
},
loading
:
false
,
};
},
watch
:
{
dict
(
value
)
{
if
(
value
)
{
this
.
dict
=
value
;
this
.
culturalLevel
=
[]
console
.
log
(
"this.dict "
,
this
.
dict
);
}
},
},
computed
:
{
tableTitle
()
{
return
title
;
...
...
@@ -150,7 +194,7 @@ export default {
limit
:
this
.
list
.
size
,
...
form
,
};
let
res
=
await
getList
(
params
);
let
res
=
await
get
CulturalRelic
List
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
...
...
@@ -166,18 +210,25 @@ export default {
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
};
let
res
=
await
getList
(
params
);
let
res
=
await
get
CulturalRelic
List
(
params
);
if
(
res
.
code
==
0
)
{
// debugger
this
.
list
=
res
.
data
;
}
},
handleOperation
(
value
,
row
)
{
async
handleOperation
(
value
,
row
)
{
console
.
log
(
"handleOperation"
,
value
,
row
);
switch
(
value
.
type
)
{
case
"add"
:
this
.
drawerVisible
=
true
;
break
;
case
"view"
:
break
;
case
"edit"
:
this
.
drawerVisible
=
true
;
// 查询接口,并复制给form
// this.loading = true;
// let res = await getRCDetailById;
// this.drawerVisible = true;
break
;
// case "delete":
// break;
...
...
src/views/display/components/InfoEditDialog.vue
浏览文件 @
b5326eb4
...
...
@@ -274,7 +274,7 @@ export default {
}
},
},
dicts
:
[
"display_character"
,
"display_type"
],
dicts
:
[
"display_character"
,
"display_type"
,
'literature'
],
data
()
{
return
{
dialogForm
:
{
...
...
@@ -299,7 +299,6 @@ export default {
console
.
log
(
"22222this.dict"
,
this
.
dict
);
})
},
dicts
:
[
"literature"
],
methods
:
{
covertStrToArr
(
name
)
{
var
fileName
=
""
;
...
...
src/views/display/index.vue
浏览文件 @
b5326eb4
...
...
@@ -171,16 +171,16 @@ export default {
displayTypes
:
{},
};
},
watch
:
{
dict
(
value
)
{
if
(
value
)
{
console
.
log
(
"value.display_type"
,
value
.
display_type
);
value
.
display_type
.
map
((
item
)
=>
{
this
.
displayTypes
[
item
.
value
]
=
item
.
label
;
});
}
},
},
//
watch: {
//
dict(value) {
//
if (value) {
// //
value.display_type.map((item) => {
// //
this.displayTypes[item.value] = item.label;
// //
});
//
}
//
},
//
},
computed
:
{
tableTitle
()
{
return
title
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论