Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
ruoyi
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
范晓龙
ruoyi
Commits
c98d27d5
提交
c98d27d5
authored
10月 24, 2022
作者:
dingtalk_nnkplh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改上传图片的bug
上级
334d93d5
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
33 行增加
和
34 行删除
+33
-34
edit.html
...admin/src/main/resources/templates/system/atlas/edit.html
+33
-34
没有找到文件。
ruoyi-admin/src/main/resources/templates/system/atlas/edit.html
浏览文件 @
c98d27d5
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<input
type=
"hidden"
class=
"form-control"
th:field=
"*{atlasCover}"
>
<input
type=
"hidden"
class=
"form-control"
th:field=
"*{atlasCover}"
>
<div
class=
"file-loading"
>
<div
class=
"file-loading"
>
<input
id=
"singleFile"
name=
"file
s
"
type=
"file"
>
<input
id=
"singleFile"
name=
"file"
type=
"file"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
</form>
</form>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: footer"
/>
<!-- <th:block th:include="include :: summernote-js" />-->
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
th:inline=
"javascript"
>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"system/atlas"
;
var
prefix
=
ctx
+
"system/atlas"
;
...
@@ -104,38 +103,6 @@
...
@@ -104,38 +103,6 @@
});
});
}
}
// 多图上传
$
(
"#multipleFile"
).
on
(
'fileuploaded'
,
function
(
event
,
data
,
previewId
,
index
)
{
var
rsp
=
data
.
response
;
var
imgPath
=
$
(
"#atlasContent"
).
val
();
if
(
imgPath
!=
null
&&
imgPath
!=
''
){
$
(
"#atlasContent"
).
val
(
imgPath
+
","
+
rsp
.
fileNames
);
}
else
{
$
(
"#atlasContent"
).
val
(
rsp
.
fileNames
);
}
$
(
"#multipleFile"
).
fileinput
(
'destroy'
);
//销毁fileUploadFileInput
initUpload
();
//重新初始化文件预览数据和文件上传附件
$
(
'#multipleFile'
).
fileinput
(
'enable'
);
//enable作用:destroy并重新初始化fileinput插件后,插件会处于disable状态
});
//删除方法
$
(
'#multipleFile'
).
on
(
'filepredelete'
,
function
(
event
,
key
,
jqXHR
,
data
)
{
//就是在删除原图片之前触发,而新选择的图片不会触发。能满足我们的要求。
console
.
log
(
'Key = '
+
key
);
var
logoUrl
=
$
(
"#atlasContent"
).
val
();
var
urlLinkNew
=
''
;
var
imgArr
=
logoUrl
.
split
(
","
);
for
(
var
i
=
0
;
i
<
imgArr
.
length
;
i
++
)
{
if
(
i
==
key
)
continue
;
if
(
urlLinkNew
!=
''
){
urlLinkNew
=
urlLinkNew
+
","
+
imgArr
[
i
];
}
else
{
urlLinkNew
=
imgArr
[
i
];
}
}
$
(
"#atlasContent"
).
val
(
urlLinkNew
);
console
.
log
(
$
(
"#atlasContent"
).
val
())
});
function
initUpload1
()
{
function
initUpload1
()
{
var
logoUrl
=
$
(
"#atlasCover"
).
val
();
//拿到图片路径
var
logoUrl
=
$
(
"#atlasCover"
).
val
();
//拿到图片路径
var
preList
=
new
Array
();
var
preList
=
new
Array
();
...
@@ -202,6 +169,37 @@
...
@@ -202,6 +169,37 @@
});
});
}
}
// 多图上传
$
(
"#multipleFile"
).
on
(
'fileuploaded'
,
function
(
event
,
data
,
previewId
,
index
)
{
var
rsp
=
data
.
response
;
var
imgPath
=
$
(
"#atlasContent"
).
val
();
if
(
imgPath
!=
null
&&
imgPath
!=
''
){
$
(
"#atlasContent"
).
val
(
imgPath
+
","
+
rsp
.
fileNames
);
}
else
{
$
(
"#atlasContent"
).
val
(
rsp
.
fileNames
);
}
$
(
"#multipleFile"
).
fileinput
(
'destroy'
);
//销毁fileUploadFileInput
initUpload
();
//重新初始化文件预览数据和文件上传附件
$
(
'#multipleFile'
).
fileinput
(
'enable'
);
//enable作用:destroy并重新初始化fileinput插件后,插件会处于disable状态
});
//删除方法
$
(
'#multipleFile'
).
on
(
'filepredelete'
,
function
(
event
,
key
,
jqXHR
,
data
)
{
//就是在删除原图片之前触发,而新选择的图片不会触发。能满足我们的要求。
console
.
log
(
'Key = '
+
key
);
var
logoUrl
=
$
(
"#atlasContent"
).
val
();
var
urlLinkNew
=
''
;
var
imgArr
=
logoUrl
.
split
(
","
);
for
(
var
i
=
0
;
i
<
imgArr
.
length
;
i
++
)
{
if
(
i
==
key
)
continue
;
if
(
urlLinkNew
!=
''
){
urlLinkNew
=
urlLinkNew
+
","
+
imgArr
[
i
];
}
else
{
urlLinkNew
=
imgArr
[
i
];
}
}
$
(
"#atlasContent"
).
val
(
urlLinkNew
);
console
.
log
(
$
(
"#atlasContent"
).
val
())
});
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论