Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_backstage
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_backstage
Commits
609346e9
提交
609346e9
authored
10月 20, 2022
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复图片文件回显的问题
上级
d8523ed7
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
72 行增加
和
78 行删除
+72
-78
ManualUploader.vue
src/components/Uploader/ManualUploader.vue
+25
-19
index.vue
src/components/VueQuillEditor/index.vue
+2
-2
index.js
src/utils/index.js
+14
-0
ExhibitionUnit.vue
src/views/display/components/ExhibitionUnit.vue
+13
-50
InfoEditDialog.vue
src/views/display/components/InfoEditDialog.vue
+2
-1
InfoEditDialog.vue
src/views/product/components/InfoEditDialog.vue
+16
-6
没有找到文件。
src/components/Uploader/ManualUploader.vue
浏览文件 @
609346e9
...
...
@@ -84,9 +84,9 @@ export default {
// 将回填的字段从url-->pressUrl
this
.
fileList
=
val
.
map
((
item
)
=>
{
return
{
highImg
:
this
.
$getFullUrl
(
item
.
url
)
,
lowImg
:
this
.
$getFullUrl
(
item
.
pressUrl
)
,
url
:
this
.
$getFullUrl
(
item
.
pressUrl
)
,
highImg
:
item
.
url
,
lowImg
:
item
.
pressUrl
,
url
:
item
.
pressUrl
,
// pressUrl:item.pressUrl,
name
:
item
.
name
,
fileId
:
item
.
fileId
,
...
...
@@ -99,12 +99,24 @@ export default {
value
:
{
handler
:
function
(
val
)
{
if
(
val
)
{
this
.
fileList
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
this
.
fileList
=
val
.
map
((
item
)
=>
{
return
{
highImg
:
item
.
url
,
lowImg
:
item
.
pressUrl
,
url
:
item
.
pressUrl
,
// pressUrl:item.pressUrl,
name
:
item
.
name
,
fileId
:
item
.
fileId
,
};
});
}
},
immediate
:
true
,
deep
:
true
,
},
advice
(
value
)
{
console
.
log
(
value
);
},
},
computed
:
{
// 是否显示提示
...
...
@@ -194,8 +206,6 @@ export default {
// 文件列表移除文件时的钩子
handleRemove
(
file
,
fileList
)
{
// debugger
// console.log("handleRemove", file, fileList);
let
that
=
this
;
that
.
fileList
.
map
(
async
(
item
,
index
)
=>
{
if
(
item
.
uid
===
file
.
uid
)
{
...
...
@@ -203,9 +213,9 @@ export default {
}
});
if
(
th
at
.
fileType
==
"jpg"
||
th
at
.
fileType
==
"png"
||
th
at
.
fileType
==
"jpeg"
th
is
.
fileType
.
indexOf
(
"jpg"
)
!=
-
1
||
th
is
.
fileType
.
indexOf
(
"jpeg"
)
!=
-
1
||
th
is
.
fileType
.
indexOf
(
"png"
)
!=
-
1
)
{
let
newFileList
=
that
.
fileList
.
map
((
item
)
=>
{
item
.
url
=
item
.
highImg
;
...
...
@@ -222,7 +232,7 @@ export default {
handleChange
(
file
,
fileList
)
{
let
that
=
this
;
//
console.log("handleChange", file, fileList);
console
.
log
(
"handleChange"
,
file
,
fileList
);
if
(
fileList
.
length
==
this
.
fileLimit
)
{
this
.
maxNum
=
this
.
fileLimit
;
}
...
...
@@ -231,11 +241,12 @@ export default {
.
then
((
res
)
=>
{
that
.
fileList
.
push
(
res
);
if
(
th
at
.
fileType
==
"jpg"
||
th
at
.
fileType
==
"png"
||
th
at
.
fileType
==
"jpeg"
th
is
.
fileType
.
indexOf
(
"jpg"
)
!=
-
1
||
th
is
.
fileType
.
indexOf
(
"jpeg"
)
!=
-
1
||
th
is
.
fileType
.
indexOf
(
"png"
)
!=
-
1
)
{
let
newFileList
=
that
.
fileList
.
map
((
item
)
=>
{
let
tempList
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
fileList
));
let
newFileList
=
tempList
.
map
((
item
)
=>
{
item
.
url
=
item
.
highImg
;
item
.
pressUrl
=
item
.
lowImg
;
item
.
name
=
item
.
name
;
...
...
@@ -259,11 +270,6 @@ export default {
.disabled
.el-upload--picture-card
{
display
:
none
!
important
;
}
// 上传抖动修复
.el-upload-list__item.is-ready
{
display
:
none
;
}
// 隐藏回显动画
.el-upload-list__item
{
transition
:
none
!
important
;
}
...
...
src/components/VueQuillEditor/index.vue
浏览文件 @
609346e9
...
...
@@ -90,9 +90,9 @@ export default {
},
handleEditAblequestion
()
{
if
(
this
.
qillInit
)
{
this
.
$refs
.
text
.
quill
.
enable
(
true
);
this
.
$refs
.
myQuillEditor
.
quill
.
enable
(
true
);
console
.
log
(
111
);
this
.
$refs
.
text
.
quill
.
focus
();
this
.
$refs
.
myQuillEditor
.
quill
.
focus
();
this
.
qillInit
=
false
;
}
},
...
...
src/utils/index.js
浏览文件 @
609346e9
...
...
@@ -175,6 +175,20 @@ export const Throttle = (fn, t) => {
}
}
// // 获取完整的url,根据环境进行配置
// export function getFullUrl(url) {
// let fullUrl = ''
// if (url && url.indexOf('http') != -1 && url.indexOf('files') != -1) {
// let urlArr = url.split('files')
// fullUrl = '/files' + urlArr[1]
// } else if (url && url.indexOf('http') == -1 && url.indexOf('files') == -1) {
// fullUrl = '/files' + url
// } else {
// fullUrl = url
// }
// return fullUrl
// }
// 获取完整的url,根据环境进行配置
export
function
getFullUrl
(
url
)
{
let
fullUrl
=
''
...
...
src/views/display/components/ExhibitionUnit.vue
浏览文件 @
609346e9
...
...
@@ -61,6 +61,7 @@
/>
</el-col>
<el-col
:span=
"24"
class=
"mg-bt20"
>
<div>
单元文物:
</div>
<el-select
v-model=
"currentData.crIds"
multiple
...
...
@@ -85,7 +86,6 @@
<el-col
:span=
"24"
>
<div>
单元图片:
</div>
<ManualUploader
v-model=
"currentData.imagesVo"
:files=
"currentData.imagesVo"
:fileLimit=
"7"
:fileSize=
"50"
...
...
@@ -178,22 +178,21 @@ export default {
arr
.
forEach
((
item
)
=>
{
if
(
item
.
culturalRelics
&&
item
.
culturalRelics
.
length
>
0
)
{
that
.
$set
(
that
,
"crList"
,
item
.
culturalRelics
);
that
.
crList
=
item
.
culturalRelics
;
item
.
crIds
=
[];
item
.
culturalRelics
.
map
((
cr
)
=>
{
//
item.crIds.push(cr.crId);
item
.
crIds
.
push
(
cr
.
crId
);
that
.
$nextTick
(()
=>
{
// console.log("remoteSelect", that.$refs["remoteSelect"]);
that
.
$refs
[
"remoteSelect"
].
cachedOptions
.
push
({
currentLabel
:
cr
.
name
,
// 当前绑定的数据的label
currentValue
:
cr
.
crId
,
// 当前绑定数据的value
label
:
cr
.
name
,
// 当前绑定的数据的label
value
:
cr
.
crId
,
// 当前绑定数据的value
});
});
//
that.$nextTick(() => {
//
//
console.log("remoteSelect", that.$refs["remoteSelect"]);
//
that.$refs["remoteSelect"].cachedOptions.push({
//
currentLabel: cr.name, // 当前绑定的数据的label
//
currentValue: cr.crId, // 当前绑定数据的value
//
label: cr.name, // 当前绑定的数据的label
//
value: cr.crId, // 当前绑定数据的value
//
});
//
});
});
}
else
{
that
.
$set
(
that
,
"crList"
,
[]);
}
...
...
@@ -265,7 +264,6 @@ export default {
this
.
$refs
[
ref
].
focus
();
console
.
log
(
this
.
$refs
[
`1Title`
]);
},
100
);
// this.$refs[data.euId+'Title'].focus();
},
appendChild
(
data
)
{
...
...
@@ -273,15 +271,11 @@ export default {
euId
:
euId
++
,
title
:
"单元标题"
,
intro
:
""
,
showMediaUploader
:
false
,
images
:
""
,
imagesVo
:
[],
crIds
:
[],
videos
:
""
,
children
:
[],
// unit: "",
// imagesVo: [],
// videosVo: [],
};
if
(
!
data
.
children
)
{
this
.
$set
(
data
,
"children"
,
[]);
...
...
@@ -296,7 +290,6 @@ export default {
title
:
"单元标题"
,
intro
:
""
,
crIds
:
[],
showMediaUploader
:
false
,
images
:
""
,
imagesVo
:
[],
videos
:
""
,
...
...
@@ -320,6 +313,7 @@ export default {
const
index
=
children
.
findIndex
((
d
)
=>
d
.
euId
===
data
.
euId
);
children
.
splice
(
index
,
1
);
},
changeFileList
(
fileList
)
{
this
.
currentData
.
imagesVo
=
fileList
;
},
...
...
@@ -344,25 +338,6 @@ export default {
break
;
}
},
//失去焦点事件
onEditorBlur
(
quill
)
{
console
.
log
(
"editor blur!"
,
quill
);
},
//获得焦点事件
onEditorFocus
(
quill
)
{
console
.
log
(
"editor focus!"
,
quill
);
},
// 准备富文本编辑器
onEditorReady
(
quill
)
{
console
.
log
(
"editor ready!"
,
quill
);
},
//内容改变事件
onEditorChange
({
quill
,
html
,
text
})
{
console
.
log
(
"editor change!"
,
quill
,
html
,
text
);
this
.
content
=
html
;
},
handleToUnit
(
type
)
{
// debugger
const
{
euId
}
=
this
.
currentData
;
...
...
@@ -371,8 +346,6 @@ export default {
let
that
=
this
;
// debugger
traverseTree
(
this
.
treeData
);
console
.
log
(
"next"
,
next
);
console
.
log
(
"prev"
,
prev
);
function
traverseTree
(
arr
)
{
if
(
arr
&&
arr
.
length
>
0
)
{
arr
.
map
((
item
,
index
)
=>
{
...
...
@@ -405,16 +378,6 @@ export default {
});
}
}
// this.treeData.map();
// switch (type) {
// case "prev":
// console.log(1);
// break;
// case "next":
// console.log(-1);
// break;
// }
},
},
};
...
...
src/views/display/components/InfoEditDialog.vue
浏览文件 @
609346e9
...
...
@@ -242,6 +242,7 @@
listType=
"picture-card"
:fileType=
"['png', 'jpeg', 'jpg']"
:files=
"faceImage"
v-model=
"faceImage"
ref=
"faceImage"
/>
</el-form-item>
...
...
@@ -694,7 +695,7 @@ export default {
this
.
reload
();
},
// 回到顶部
handleToTop
(){
let
el
=
document
.
getElementById
(
"dialog-content"
);
el
.
scrollIntoView
({
block
:
'start'
,
behavior
:
"smooth"
})
...
...
src/views/product/components/InfoEditDialog.vue
浏览文件 @
609346e9
...
...
@@ -49,7 +49,8 @@
</el-form-item>
<el-form-item
label=
"展览介绍"
:label-width=
"formLabelWidth"
>
<VueQuillEditor
ref=
"VueQuillEditor"
<VueQuillEditor
ref=
"VueQuillEditor"
v-model=
"dialogForm.intro"
:placeholder=
"'请输入产品介绍'"
/>
...
...
@@ -90,7 +91,7 @@ export default {
name
:
"InfoEditDialog"
,
components
:
{
ManualUploader
,
VueQuillEditor
VueQuillEditor
,
},
props
:
{
visible
:
{
...
...
@@ -134,7 +135,18 @@ export default {
// 回填状态
that
.
status
=
Boolean
(
Number
(
that
.
dialogForm
.
status
));
// 回填图片
that
.
images
=
that
.
dialogForm
.
imagesVo
||
[];
if
(
that
.
dialogForm
.
imagesVo
.
length
>
0
)
{
let
tempList
=
[];
that
.
dialogForm
.
imagesVo
.
map
((
item
)
=>
{
item
.
pressUrl
=
"/files"
+
item
.
pressUrl
;
item
.
url
=
"/files"
+
item
.
url
;
tempList
.
push
(
item
);
that
.
images
=
tempList
;
});
}
else
{
that
.
images
=
[];
}
}
},
immediate
:
true
,
...
...
@@ -240,8 +252,6 @@ export default {
ContentLength
:
typeof
prop
===
"string"
?
prop
.
length
:
prop
.
size
,
},
}));
console
.
log
(
"formDataArr.length"
,
formDataArr
.
length
);
console
.
log
(
"params"
,
params
);
// return;
// formData有长度时再进行上传
if
(
formDataArr
.
length
>
0
)
{
...
...
@@ -253,7 +263,7 @@ export default {
});
}
}
params
.
images
=
imgFileIds
.
join
(
','
);
params
.
images
=
imgFileIds
.
join
(
","
);
}
else
{
params
.
images
=
""
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论