Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
K
knowledgeServiceAdmin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
quanlili
knowledgeServiceAdmin
Commits
a6d1ac92
提交
a6d1ac92
authored
11月 07, 2019
作者:
王腾飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1107
上级
ebe9cb6c
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
59 行增加
和
84 行删除
+59
-84
main.js
src/main.js
+1
-1
photo.js
src/store/modules/photo.js
+2
-1
addnewphoto.vue
src/views/submission/infoview/addnewphoto.vue
+13
-10
atlas.vue
src/views/submission/infoview/atlas.vue
+13
-10
editphotoresource.vue
src/views/submission/infoview/editphotoresource.vue
+7
-7
photolook.vue
src/views/submission/infoview/photolook.vue
+23
-55
没有找到文件。
src/main.js
浏览文件 @
a6d1ac92
...
...
@@ -53,7 +53,7 @@ Vue.prototype.$echarts = echarts
require
(
'echarts-wordcloud'
)
import
EXIF
from
'exif-js'
Vue
.
prototype
.
$
EXIF
=
EXIF
Vue
.
prototype
.
EXIF
=
EXIF
Vue
.
config
.
productionTip
=
false
import
VeeValidate
from
'vee-validate'
;
...
...
src/store/modules/photo.js
浏览文件 @
a6d1ac92
...
...
@@ -9,7 +9,8 @@ const photo = {
},
actions
:
{
set_photo_id
:
({
commit
},
value
)
=>
{
commit
(
'SET_PHOTO_ID'
,
value
)
commit
(
'SET_PHOTO_ID'
,
value
);
localStorage
.
setItem
(
'photoId'
,
value
)
}
}
}
...
...
src/views/submission/infoview/addnewphoto.vue
浏览文件 @
a6d1ac92
...
...
@@ -95,9 +95,10 @@
<
script
>
import
{
uploadUrl
,
uploadPath
,
requestPath
}
from
"@/utils/global"
;
import
{
getItemDetailByIdAPI
,
resourceCommitAPI
,
myAtlasDelete
ItemAPI
}
from
'@/api/resourcecommit'
import
{
getItemDetailByIdAPI
,
resourceCommitAPI
,
deleteMyCommitRes
ItemAPI
}
from
'@/api/resourcecommit'
import
pagination
from
'@/components/pagination/pagination'
import
store
from
'@/store'
import
{
operationMsg
,
confirm
}
from
'@/utils/publicFunctions'
export
default
{
name
:
'photolook'
,
components
:{
pagination
},
...
...
@@ -211,15 +212,17 @@ export default {
})
},
deleteItem
(
item
,
key
)
{
myAtlasDeleteItemAPI
([
item
.
id
])
.
then
(
res
=>
{
console
.
log
(
res
,
'删除'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
photoInfo
.
splice
(
key
,
1
)
this
.
$message
.
success
(
'删除成功'
);
}
else
{
this
.
$message
.
error
(
'删除失败'
)
}
confirm
.
apply
(
this
,
[
'确认删除当前选中的照片吗?'
]).
then
(()
=>
{
deleteMyCommitResItemAPI
([
item
.
id
])
.
then
(
res
=>
{
console
.
log
(
res
,
'删除'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
photoInfo
.
splice
(
key
,
1
)
this
.
$message
.
success
(
'删除成功'
);
}
else
{
this
.
$message
.
error
(
'删除失败'
)
}
})
})
},
refPage
()
{
...
...
src/views/submission/infoview/atlas.vue
浏览文件 @
a6d1ac92
...
...
@@ -42,6 +42,7 @@
import
{
myAtlasListAPI
,
myAtlasInfoAPI
,
myAtlasDeleteItemAPI
}
from
'@/api/resourcecommit'
import
{
uploadUrl
}
from
"@/utils/global"
;
import
pagination
from
'@/components/pagination/pagination'
import
{
operationMsg
,
confirm
}
from
'@/utils/publicFunctions'
export
default
{
name
:
'atlas'
,
components
:{
pagination
},
...
...
@@ -107,16 +108,18 @@ export default {
})
},
deleteAtlasItem
(
item
,
key
)
{
console
.
log
(
key
,
"2222sdas"
)
myAtlasDeleteItemAPI
([
item
.
id
])
.
then
(
res
=>
{
console
.
log
(
res
,
'删除'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
myAtlasListData
.
splice
(
key
,
1
)
this
.
$message
.
success
(
'删除成功'
);
}
else
{
this
.
$message
.
error
(
'删除失败'
)
}
confirm
.
apply
(
this
,
[
'确认删除当前选中的图册吗?'
]).
then
(()
=>
{
console
.
log
(
key
,
"2222sdas"
)
myAtlasDeleteItemAPI
([
item
.
id
])
.
then
(
res
=>
{
console
.
log
(
res
,
'删除'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
myAtlasListData
.
splice
(
key
,
1
)
this
.
$message
.
success
(
'删除成功'
);
}
else
{
this
.
$message
.
error
(
'删除失败'
)
}
})
})
},
resetSearch
()
{
...
...
src/views/submission/infoview/editphotoresource.vue
浏览文件 @
a6d1ac92
...
...
@@ -7,8 +7,8 @@
<div
class=
"formLeft"
>
<h2>
>资源内容描述类
</h2>
<swiper
v-if=
"photoList.length"
:options=
"swiperOption"
ref=
"swiperOne"
>
<swiper-slide
v-for=
"(item, key) in photoList"
:key=
"key"
>
<
img
:src=
"`$
{uploadUrl}?fileName=${item.fileName}`" alt=""
>
<swiper-slide
v-for=
"(item, key) in photoList"
:key=
"key"
:style=
"
{backgroundImage: 'url('+`${uploadUrl}?fileName=${item.fileName}`+')', backgroundRepeat: 'no-repeat', backgroundPosition: '50%', backgroundSize: 'contain'}"
>
<
!--
<img
:src=
"`$
{uploadUrl}?fileName=${item.fileName}`" alt=""> --
>
</swiper-slide>
<div
class=
"swiper-button-next swiper-button-black"
slot=
"button-next"
></div>
<div
class=
"swiper-button-prev swiper-button-black"
slot=
"button-prev"
></div>
...
...
@@ -370,10 +370,10 @@ export default {
})
},
getLookContent
()
{
//查看
console
.
log
(
store
.
getters
.
photoId
,
"IIIIIIIIOOOO"
)
if
(
store
.
getters
.
photoId
)
{
console
.
log
(
localStorage
.
getItem
(
'photoId'
)
,
"IIIIIIIIOOOO"
)
if
(
localStorage
.
getItem
(
'photoId'
)
)
{
this
.
isShowSavaBtn
=
true
;
editItemAPI
(
store
.
getters
.
photoId
)
editItemAPI
(
localStorage
.
getItem
(
'photoId'
)
)
.
then
(
res
=>
{
console
.
log
(
res
,
'OPOPOPO'
);
if
(
res
.
data
.
code
===
0
)
{
...
...
@@ -540,8 +540,8 @@ export default {
.swiper-slide {
text-align:center;
img {
width:
100%
;
height:
auto
;
width:
auto
;
height:
100%
;
}
}
}
...
...
src/views/submission/infoview/photolook.vue
浏览文件 @
a6d1ac92
...
...
@@ -140,11 +140,11 @@
</tr>
<tr>
<th>
像高 (Image Height)
</th>
<td>
测试
</td>
<td>
{{
photoDetailInfo
.
PixelXDimension
}}
</td>
</tr>
<tr>
<th>
像宽 (Image Width)
</th>
<td>
测试
</td>
<td>
{{
photoDetailInfo
.
PixelYDimension
}}
</td>
</tr>
</table>
</div>
...
...
@@ -158,7 +158,6 @@ import { uploadUrl } from "@/utils/global";
import
'swiper/dist/css/swiper.css'
import
{
swiper
,
swiperSlide
}
from
'vue-awesome-swiper'
import
store
from
'@/store'
import
EXIF
from
'exif-js'
export
default
{
name
:
'photolook'
,
components
:
{
...
...
@@ -173,8 +172,9 @@ export default {
photoInfo
:
[],
photoItemId
:
null
,
activeIndex
:
0
,
photoDetailInfo
:
{},
swiperOptionTop
:
{
spaceBetween
:
1
0
,
spaceBetween
:
2
0
,
navigation
:
{
nextEl
:
'.swiper-button-next'
,
prevEl
:
'.swiper-button-prev'
...
...
@@ -185,49 +185,17 @@ export default {
click
:
()
=>
{
const
swiperTop
=
this
.
$refs
.
swiperTop
.
swiper
this
.
activeIndex
=
swiperTop
.
activeIndex
;
console
.
log
(
this
.
activeIndex
,
"当前索引"
);
let
flag
=
this
.
photoInfo
[
this
.
activeIndex
];
console
.
log
(
flag
,
"不知道是什么"
)
console
.
log
(
this
.
uploadUrl
,
"LL"
)
this
.
photoItemId
=
flag
.
id
this
.
exifImgPath
=
this
.
uploadUrl
+
'?fileName='
+
flag
.
fileName
;
var
imageObj
=
new
Image
();
console
.
log
(
imageObj
,
"KLKLk"
)
if
(
this
.
exifImgPath
)
{
imageObj
.
src
=
this
.
exifImgPath
;
console
.
log
(
imageObj
,
'ILIL'
)
console
.
log
(
this
.
exifImgPath
)
//var _this = this;
EXIF
.
getData
([
imageObj
],
function
()
{
alert
(
22222
)
console
.
log
(
EXIF
.
pretty
(
this
),
"33333"
);
console
.
log
(
EXIF
.
getAllTags
(
this
),
"::::"
)
// 此处打印的为选中图片的数据
})
var
res
=
EXIF
.
getAllTags
(
imageObj
);
console
.
log
(
res
,
"22222222222222"
);
console
.
log
(
res
,
"22222222222222"
);
/*var http = new XMLHttpRequest();
http.open("GET", this.exifImgPath, true);
http.responseType = "blob";
http.onload = function(e) {
if (this.status === 200) {
var image = new Image();
image.onload = function() {
EXIF.getData(image, function() {
console.log(22)
alert(EXIF.pretty(this));
});
};
image.src = URL.createObjectURL(http.response);
}
};
http.send();*/
this
.
getPhotoInfo
();
}
}
}
},
swiperOptionThumbs
:
{
spaceBetween
:
1
0
,
spaceBetween
:
2
0
,
centeredSlides
:
true
,
slidesPerView
:
'auto'
,
touchRatio
:
0.2
,
...
...
@@ -247,23 +215,8 @@ export default {
console
.
log
(
this
.
uploadUrl
,
"LL"
)
this
.
photoItemId
=
flag
.
id
this
.
exifImgPath
=
this
.
uploadUrl
+
'?fileName='
+
flag
.
fileName
;
const
imageObj
=
new
Image
();
if
(
this
.
exifImgPath
)
{
imageObj
.
src
=
this
.
exifImgPath
;
console
.
log
(
imageObj
,
'ILIL'
)
console
.
log
(
this
.
exifImgPath
)
EXIF
.
getData
(
imageObj
,
function
()
{
console
.
log
(
EXIF
.
pretty
(
this
));
});
// var _this = this;
// this.EXIF.getData(imageObj, function () {
// console.log(_this.EXIF.getAllTags(this), '()()()9999') // 此处打印的为选中图片的数据
// })
// var res = _this.EXIF.getAllTags(imageObj);
// console.log(res,"22222222222222");
this
.
getPhotoInfo
();
}
}
}
...
...
@@ -275,6 +228,21 @@ export default {
this
.
lunbo
();
},
methods
:
{
getPhotoInfo
()
{
//获取图片信息
const
imageObj
=
new
Image
();
imageObj
.
src
=
this
.
exifImgPath
;
console
.
log
(
imageObj
,
'ILIL'
)
console
.
log
(
this
.
exifImgPath
)
var
_this
=
this
;
setTimeout
(()
=>
{
this
.
EXIF
.
getData
(
imageObj
,
function
()
{
console
.
log
(
_this
.
EXIF
.
getAllTags
(
this
),
"::::"
)
// 此处打印的为选中图片的数据
_this
.
photoDetailInfo
=
_this
.
EXIF
.
getAllTags
(
this
);
console
.
log
(
_this
.
photoDetailInfo
,
"老子最帅"
)
console
.
log
(
_this
.
photoDetailInfo
.
PixelXDimension
,)
})
},
500
)
},
editPhotoBasicInfo
()
{
this
.
$router
.
push
({
path
:
'addatlas'
...
...
@@ -477,7 +445,7 @@ export default {
padding: 10px 0;
}
.gallery-thumbs .swiper-slide {
width:
25%
;
width:
100px
;
height: 100%;
opacity: 0.4;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论