Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-admin-consultation
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-admin-consultation
提交
790800f1
提交
790800f1
编写于
1月 28, 2021
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
图片显示规则
上级
f7e56287
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
120 行增加
和
32 行删除
+120
-32
img-size.vue
src/components/IM/img-size.vue
+57
-8
detail.vue
src/views/IM/chain-history/detail.vue
+22
-8
index.scss
src/views/IM/current-session/index.scss
+5
-5
index.vue
src/views/IM/current-session/index.vue
+18
-4
detail.vue
src/views/IM/search-message/detail.vue
+18
-7
未找到文件。
src/components/IM/img-size.vue
浏览文件 @
790800f1
<
template
>
<
template
>
<div
class=
"img-container"
>
<div
class=
"img-handle-container"
>
<img
:src=
"imgData.url"
/>
<div
class=
"img-box"
>
<img
:src=
"imgUrl"
:style=
"
{width: imgData.newW + 'px', height: imgData.newH + 'px' }"/>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'imgSize'
,
name
:
'imgSize'
,
props
:
{
props
:
{
imgUrl
:
{
type
:
String
,
default
:
''
},
imgData
:
{
imgData
:
{
type
:
Object
,
type
:
Object
,
default
:
{}
default
:
{}
},
index
:
{
type
:
Number
,
default
:
0
}
}
},
},
data
()
{
data
()
{
return
{
return
{
imgWidth
:
0
,
imgWidth
:
0
,
imgHeight
:
0
,
imgHeight
:
0
,
imgProportion
:
0
imgProportion
:
0
,
lw
:
0
,
lh
:
0
,
newW
:
0
,
newH
:
0
,
}
}
},
},
mounted
()
{
mounted
()
{
this
.
imgWidth
=
this
.
imgData
.
width
;
console
.
log
(
"222222222222222"
,
this
.
imgData
)
this
.
imgHeight
=
this
.
imgData
.
height
;
let
{
lw
,
lh
,
newW
,
newH
}
=
this
;
this
.
imgWidth
=
this
.
imgData
.
width
||
JSON
.
parse
(
this
.
imgData
.
content
).
w
;
this
.
imgHeight
=
this
.
imgData
.
height
||
JSON
.
parse
(
this
.
imgData
.
content
).
h
;
this
.
imgProportion
=
(
this
.
imgWidth
/
this
.
imgHeight
).
toFixed
(
1
);
this
.
imgProportion
=
(
this
.
imgWidth
/
this
.
imgHeight
).
toFixed
(
1
);
console
.
log
(
"==========dddddddddd"
,
this
.
imgProportion
)
if
(
this
.
imgProportion
>
0.6
)
{
if
(
this
.
imgProportion
>
0.6
)
{
if
(
this
.
imgWidth
>
192
)
{
lw
=
192
;
lh
=
(
this
.
imgHeight
*
lw
)
/
this
.
imgWidth
;
}
else
if
(
this
.
imgWidth
<=
192
)
{
lw
=
this
.
imgWidth
;
lh
=
this
.
imgHeight
;
}
}
else
if
(
this
.
imgProportion
==
0.6
)
{
lh
=
320
;
lw
=
lh
*
0.6
;
}
else
{
if
(
this
.
imgHeight
>
320
)
{
lh
=
320
;
lw
=
(
this
.
imgWidth
*
lh
)
/
this
.
imgHeight
;
}
else
if
(
this
.
imgHeight
<=
320
)
{
lh
=
this
.
imgHeight
;
lw
=
this
.
imgWidth
;
}
}
}
if
((
lh
<
32
)
&&
(
lh
<
lw
))
{
newH
=
32
;
newW
=
(
lw
*
32
)
/
lh
;
}
else
if
((
lw
<
32
)
&&
(
lw
<
lh
))
{
newW
=
32
;
newH
=
(
lh
*
32
)
/
lw
;
}
else
{
newH
=
lh
;
newW
=
lw
;
}
this
.
$emit
(
'imgHandle'
,
{
width
:
newW
,
height
:
newH
,
index
:
this
.
index
});
},
},
methods
:
{
methods
:
{
...
@@ -34,5 +77,11 @@ export default {
...
@@ -34,5 +77,11 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.img-handle-container
{
.img-box
{
max-width
:
192px
;
max-height
:
320px
;
overflow
:
hidden
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/IM/chain-history/detail.vue
浏览文件 @
790800f1
...
@@ -9,8 +9,11 @@
...
@@ -9,8 +9,11 @@
<div>
{{
item
.
info
}}
</div>
<div>
{{
item
.
info
}}
</div>
</div>
</div>
<div
v-if=
"item.type == 1"
class=
"img-content"
v-viewer
>
<div
v-if=
"item.type == 1"
class=
"img-content"
v-viewer
>
<img
:src=
"item.url"
/>
<img-size
<!--
<img-size
:imgData=
"item"
></img-size>
-->
:imgUrl=
"item.url"
:imgData=
"item"
:index=
"index"
@
imgHandle=
"imgHandle"
></img-size>
</div>
</div>
<div
v-if=
"item.type == 2"
class=
"file-content"
>
<div
v-if=
"item.type == 2"
class=
"file-content"
>
<div
class=
"file-con"
@
click=
"openPDF(item.url)"
>
<div
class=
"file-con"
@
click=
"openPDF(item.url)"
>
...
@@ -61,6 +64,7 @@ export default {
...
@@ -61,6 +64,7 @@ export default {
mounted
()
{
mounted
()
{
commonUtil
.
resizeHeight
();
commonUtil
.
resizeHeight
();
this
.
getData
();
this
.
getData
();
},
},
methods
:
{
methods
:
{
// 获取历史群发数据
// 获取历史群发数据
...
@@ -72,13 +76,17 @@ export default {
...
@@ -72,13 +76,17 @@ export default {
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
code
==
"000000"
)
{
this
.
detailData
=
res
.
data
;
this
.
detailData
=
res
.
data
;
this
.
detailData
.
contentModelList
.
map
((
item
)
=>
{
this
.
detailData
.
contentModelList
.
map
((
item
)
=>
{
if
(
item
.
type
==
2
)
{
if
(
item
.
type
==
2
)
{
// 0 文本 1 图片 2PDF 3链接
item
.
fileSize
=
betaHandle
(
item
.
fileSize
);
item
.
fileSize
=
betaHandle
(
item
.
fileSize
);
}
}
})
})
}
}
});
});
},
},
imgHandle
(
data
)
{
this
.
$set
(
this
.
detailData
.
contentModelList
[
data
.
index
],
'newW'
,
data
.
width
)
this
.
$set
(
this
.
detailData
.
contentModelList
[
data
.
index
],
'newH'
,
data
.
height
)
},
// 下载目标文件
// 下载目标文件
downFile
()
{
downFile
()
{
let
a
=
document
.
createElement
(
'a'
);
let
a
=
document
.
createElement
(
'a'
);
...
@@ -121,11 +129,17 @@ export default {
...
@@ -121,11 +129,17 @@ export default {
padding
:
16px
0
;
padding
:
16px
0
;
border-bottom
:
1px
solid
#F0F1F2
;
border-bottom
:
1px
solid
#F0F1F2
;
cursor
:
pointer
;
cursor
:
pointer
;
&
>
img
{
// .img-box {
width
:
170px
;
// max-width: 192px;
height
:
108px
;
// max-height: 320px;
border-radius
:
8px
;
// overflow: hidden;
}
// // & > img {
// // // width: 170px;
// // // height: 108px;
// // border-radius: 8px;
// // }
// }
}
}
.file-content
{
.file-content
{
padding
:
16px
0
;
padding
:
16px
0
;
...
...
src/views/IM/current-session/index.scss
浏览文件 @
790800f1
...
@@ -248,11 +248,11 @@
...
@@ -248,11 +248,11 @@
// width: 20px;
// width: 20px;
// height: 20px;
// height: 20px;
// }
// }
&
>
.img
{
//
& > .img {
width
:
170px
;
//
width: 170px;
height
:
108px
;
//
height: 108px;
border-radius
:
8px
;
//
border-radius: 8px;
}
//
}
}
}
}
}
...
...
src/views/IM/current-session/index.vue
浏览文件 @
790800f1
...
@@ -91,8 +91,12 @@
...
@@ -91,8 +91,12 @@
<div
class=
"mid-text"
>
{{
item
.
text
}}
</div>
<div
class=
"mid-text"
>
{{
item
.
text
}}
</div>
</div>
</div>
<div
v-if=
"item.showType == 2"
class=
"mid-img"
v-viewer
>
<div
v-if=
"item.showType == 2"
class=
"mid-img"
v-viewer
>
<img
class=
"img"
:src=
"item.url"
alt
/>
<!--
<img
class=
"img"
:src=
"item.url"
alt
/>
-->
<!--
<img
:src=
"item.imgUrl"
alt
/>
-->
<img-size
:imgUrl=
"item.url"
:imgData=
"item"
:index=
"index"
@
imgHandle=
"imgHandle"
></img-size>
</div>
</div>
<div
v-if=
"item.showType == 3"
class=
"mid-pdf"
@
click=
"openPDF(item)"
>
<div
v-if=
"item.showType == 3"
class=
"mid-pdf"
@
click=
"openPDF(item)"
>
<div
class=
"midp-left"
>
<div
class=
"midp-left"
>
...
@@ -200,6 +204,7 @@
...
@@ -200,6 +204,7 @@
<
script
>
<
script
>
import
{
mapGetters
,
mapMutations
}
from
"vuex"
;
import
{
mapGetters
,
mapMutations
}
from
"vuex"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
ImgSize
from
"@/components/IM/img-size.vue"
;
import
{
doUpload
,
getFilePath
}
from
"@/utils/qiniu-util"
;
import
{
doUpload
,
getFilePath
}
from
"@/utils/qiniu-util"
;
import
{
validateWord
}
from
"@/utils/validate.js"
;
import
{
validateWord
}
from
"@/utils/validate.js"
;
import
{
import
{
...
@@ -220,7 +225,8 @@ let _this = null;
...
@@ -220,7 +225,8 @@ let _this = null;
export
default
{
export
default
{
components
:
{
components
:
{
BreadCrumb
,
BreadCrumb
,
UserInfo
UserInfo
,
ImgSize
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -1026,9 +1032,17 @@ export default {
...
@@ -1026,9 +1032,17 @@ export default {
// 文件大小单位转换
// 文件大小单位转换
fileSizeChange
(
val
)
{
fileSizeChange
(
val
)
{
return
betaHandle
(
val
);
return
betaHandle
(
val
);
}
},
imgHandle
(
data
)
{
this
.
$set
(
this
.
messageList
[
data
.
index
],
'newW'
,
data
.
width
)
this
.
$set
(
this
.
messageList
[
data
.
index
],
'newH'
,
data
.
height
)
},
},
},
beforeDestroy
()
{
beforeDestroy
()
{
console
.
log
(
"in beforeDestroy"
,
forwardMsgIntervalId
);
console
.
log
(
"in beforeDestroy"
,
forwardMsgIntervalId
);
sessionIntervalId
&&
clearInterval
(
sessionIntervalId
);
sessionIntervalId
&&
clearInterval
(
sessionIntervalId
);
...
...
src/views/IM/search-message/detail.vue
浏览文件 @
790800f1
...
@@ -21,7 +21,12 @@
...
@@ -21,7 +21,12 @@
<div>
{{
item
.
content
}}
</div>
<div>
{{
item
.
content
}}
</div>
</div>
</div>
<div
v-if=
"item.type == 'PICTURE'"
class=
"img-content"
v-viewer
>
<div
v-if=
"item.type == 'PICTURE'"
class=
"img-content"
v-viewer
>
<img
:src=
"item.content.url"
/>
<!--
<img
:src=
"item.content.url"
/>
-->
<img-size
:imgUrl=
"item.content.url"
:imgData=
"item"
:index=
"index"
@
imgHandle=
"imgHandle"
></img-size>
</div>
</div>
<div
v-if=
"item.type == 'CUSTOM'"
>
<div
v-if=
"item.type == 'CUSTOM'"
>
<div
v-if=
"item.content.bizType == 18"
class=
"file-content"
>
<div
v-if=
"item.content.bizType == 18"
class=
"file-content"
>
...
@@ -52,12 +57,14 @@
...
@@ -52,12 +57,14 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
ImgSize
from
"@/components/IM/img-size.vue"
;
import
{
doUpload
,
getFilePath
}
from
"@/utils/qiniu-util"
;
import
{
doUpload
,
getFilePath
}
from
"@/utils/qiniu-util"
;
import
{
openLoading
,
closeLoading
,
betaHandle
,
timeHandle
}
from
"@/utils/utils"
;
import
{
openLoading
,
closeLoading
,
betaHandle
,
timeHandle
}
from
"@/utils/utils"
;
import
{
getPicaKFAccid
}
from
"@/utils"
;
import
{
getPicaKFAccid
}
from
"@/utils"
;
export
default
{
export
default
{
components
:
{
components
:
{
BreadCrumb
BreadCrumb
,
ImgSize
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -188,6 +195,10 @@ export default {
...
@@ -188,6 +195,10 @@ export default {
}
}
})
})
},
},
imgHandle
(
data
)
{
this
.
$set
(
this
.
detailData
[
data
.
index
],
'newW'
,
data
.
width
)
this
.
$set
(
this
.
detailData
[
data
.
index
],
'newH'
,
data
.
height
)
},
// 按照时间大小排序
// 按照时间大小排序
timeSort
(
arrList
)
{
timeSort
(
arrList
)
{
arrList
.
sort
((
a
,
b
)
=>
{
arrList
.
sort
((
a
,
b
)
=>
{
...
@@ -302,11 +313,11 @@ export default {
...
@@ -302,11 +313,11 @@ export default {
.img-content
{
.img-content
{
padding
:
16px
0
;
padding
:
16px
0
;
cursor
:
pointer
;
cursor
:
pointer
;
&
>
img
{
//
& > img {
width
:
170px
;
//
width: 170px;
height
:
108px
;
//
height: 108px;
border-radius
:
8px
;
//
border-radius: 8px;
}
//
}
}
}
.file-content
{
.file-content
{
padding
:
16px
0
;
padding
:
16px
0
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录