Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-admin-IM
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-admin-IM
提交
1d2f85fa
提交
1d2f85fa
编写于
2月 04, 2021
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
统一处理
上级
fdc289c5
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
82 行增加
和
199 行删除
+82
-199
mixins.js
src/utils/mixins.js
+81
-40
detail.vue
src/views/IM/chain-history/detail.vue
+0
-61
index.vue
src/views/IM/current-session/index.vue
+1
-50
detail.vue
src/views/IM/search-message/detail.vue
+0
-48
未找到文件。
src/utils/mixins.js
浏览文件 @
1d2f85fa
...
...
@@ -8,12 +8,12 @@ module.exports = {
}
},
created
:
function
()
{
// let query = this.$router.query
// let query = this.$router.query
// this.token = this.getUrlSearch(location.href, 'token') || (query && query.token) || null
// this.token = this.getUrlKey('token') || (query && query.token) || null
// this.token = this.getUrlKey('token') || (query && query.token) || null
},
mounted
:
function
()
{
mounted
:
function
()
{
},
methods
:
{
getUrlPara
(
obj
)
{
...
...
@@ -31,12 +31,12 @@ module.exports = {
return
''
},
setRouterParm
(
paramList
){
setRouterParm
(
paramList
)
{
let
parm
=
{};
if
(
paramList
.
length
<=
1
)
{
if
(
paramList
.
length
<=
1
)
{
return
''
;
}
for
(
let
i
=
1
;
i
<
paramList
.
length
;
i
++
)
{
for
(
let
i
=
1
;
i
<
paramList
.
length
;
i
++
)
{
parm
[
paramList
[
i
].
key
]
=
paramList
[
i
].
value
;
}
return
parm
;
...
...
@@ -44,12 +44,12 @@ module.exports = {
// 拼接多个参数
getUrlParmByCode
(
paramList
)
{
if
(
paramList
.
length
<=
1
)
{
if
(
paramList
.
length
<=
1
)
{
return
''
}
let
dataStr
=
''
let
list
=
[];
for
(
let
i
=
1
;
i
<
paramList
.
length
;
i
++
)
{
for
(
let
i
=
1
;
i
<
paramList
.
length
;
i
++
)
{
list
.
push
(
paramList
[
i
].
key
+
'='
+
paramList
[
i
].
value
)
}
dataStr
=
list
.
join
(
'&'
)
...
...
@@ -68,7 +68,7 @@ module.exports = {
// 根据条件排序
async
searchForOrder
(
searchCategory
=
'1'
,
searchValue
=
''
,
sortItem
=
1
,
pageSize
=
10
,
sourceData
=
[])
{
if
(
pageSize
<=
0
)
return
;
if
(
pageSize
<=
0
)
return
;
let
str2
=
(
searchValue
||
''
).
replace
(
/
[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]
/g
,
''
);
// 去掉特殊字符
let
_this
=
this
,
para
=
{
...
...
@@ -82,22 +82,22 @@ module.exports = {
setEntry
:
'headers'
,
}
let
url
=
'contents/searchKeyword/searchContent'
let
csourceData
=
await
this
.
GET
(
url
,
para
).
then
(
res
=>
{
// _this.searchText = ''
if
(
res
.
code
==
'000000'
)
{
// 课程
if
(
searchCategory
.
indexOf
(
'1'
)
>=
0
)
{
if
(
searchCategory
.
indexOf
(
'1'
)
>=
0
)
{
sourceData
=
(
res
.
data
&&
res
.
data
.
contentAppModels
)
||
[]
}
if
(
searchCategory
.
indexOf
(
'2'
)
>=
0
)
{
if
(
searchCategory
.
indexOf
(
'2'
)
>=
0
)
{
// sourceData = []
sourceData
=
this
.
handelFive
(
res
.
data
.
fiveMinutesMedicalContentList
||
[])
}
if
(
searchCategory
.
indexOf
(
'3'
)
>=
0
)
{
if
(
searchCategory
.
indexOf
(
'3'
)
>=
0
)
{
sourceData
=
(
res
.
data
&&
res
.
data
.
pCourseDoctorModels
)
||
[]
}
if
(
searchCategory
.
indexOf
(
'4'
)
>=
0
)
{
if
(
searchCategory
.
indexOf
(
'4'
)
>=
0
)
{
sourceData
=
res
.
data
.
educationContents
}
}
...
...
@@ -105,18 +105,18 @@ module.exports = {
})
return
csourceData
},
setEventByModuleCode
(
itemData
){
setEventByModuleCode
(
itemData
)
{
let
modeCode
=
itemData
.
appModuleInfo
.
code
||
''
;
let
paramList
=
itemData
.
appModuleInfo
.
paramList
?
itemData
.
appModuleInfo
.
paramList
:
''
if
(
modeCode
===
'M001'
||
modeCode
===
'M002'
||
modeCode
===
'M003'
)
{
if
(
modeCode
===
'M001'
||
modeCode
===
'M002'
||
modeCode
===
'M003'
)
{
paramList
=
''
}
else
if
(
modeCode
===
'M100'
||
modeCode
===
'M300'
)
{
}
else
if
(
modeCode
===
'M100'
||
modeCode
===
'M300'
)
{
// 支持多个参数
let
urlPara
=
this
.
getUrlParmByCode
(
paramList
);
if
(
paramList
[
0
])
{
if
(
paramList
[
0
].
value
.
indexOf
(
"?"
)
==
-
1
)
{
if
(
paramList
[
0
])
{
if
(
paramList
[
0
].
value
.
indexOf
(
"?"
)
==
-
1
)
{
paramList
[
0
].
value
+=
urlPara
}
}
...
...
@@ -126,25 +126,25 @@ module.exports = {
let
v
=
paramList
[
0
][
'value'
];
let
query
=
this
.
setRouterParm
(
paramList
);
paramList
=
[{
url
:
v
,
query
:
query
url
:
v
,
query
:
query
}]
this
.
$router
.
push
({
path
:
v
,
query
:
query
})
//alert(this.token);
return
'NO'
return
'NO'
}
if
(
typeof
paramList
===
'string'
&&
!
paramList
)
{
if
(
typeof
paramList
===
'string'
&&
!
paramList
)
{
paramList
=
[]
}
return
paramList
;
},
// 通用GET请求
GET
(
api
,
para
,
callback
,
str
)
{
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
GET
(
api
,
para
,
callback
,
str
)
{
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
let
url
=
api
+
this
.
getUrlPara
(
para
)
url
=
encodeURI
(
url
);
return
fetch
({
...
...
@@ -155,7 +155,7 @@ module.exports = {
},
// 通用DELETE请求
DELETE
(
api
,
para
,
callback
,
str
)
{
DELETE
(
api
,
para
,
callback
,
str
)
{
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
let
url
=
api
+
this
.
getUrlPara
(
para
)
return
fetch
({
...
...
@@ -174,17 +174,17 @@ module.exports = {
data
:
para
})
},
// 通用POST请求
PUT
(
api
,
para
,
callback
)
{
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
return
fetch
({
url
:
getBaseUrl
(
api
),
method
:
'put'
,
data
:
para
})
},
// 通用POST请求
PUT
(
api
,
para
,
callback
)
{
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
return
fetch
({
url
:
getBaseUrl
(
api
),
method
:
'put'
,
data
:
para
})
},
// 从html参数
getUrlKey
(
name
)
{
if
(
decodeURIComponent
&&
location
.
href
)
{
...
...
@@ -208,7 +208,48 @@ module.exports = {
}
}
return
null
}
},
// 图片处理-新
imgSizeHandleNew
(
item
,
imgWidth
,
imgHeight
)
{
let
lw
,
lh
,
newW
,
newH
,
imgProportion
=
(
imgWidth
/
imgHeight
).
toFixed
(
1
);
if
(
imgProportion
>
0.6
)
{
if
(
imgWidth
>
192
)
{
lw
=
192
;
lh
=
(
imgHeight
*
lw
)
/
imgWidth
;
}
else
if
(
imgWidth
<=
192
)
{
lw
=
imgWidth
;
lh
=
imgHeight
;
}
}
else
if
(
imgProportion
==
0.6
)
{
if
(
imgHeight
>
320
)
{
lh
=
320
;
}
else
{
lh
=
imgHeight
;
}
lw
=
lh
*
0.6
;
}
else
{
if
(
imgHeight
>
320
)
{
lh
=
320
;
lw
=
(
imgWidth
*
lh
)
/
imgHeight
;
}
else
if
(
imgHeight
<=
320
)
{
lh
=
imgHeight
;
lw
=
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
;
}
item
.
newW
=
newW
;
item
.
newH
=
newH
;
},
}
}
src/views/IM/chain-history/detail.vue
浏览文件 @
1d2f85fa
...
...
@@ -17,12 +17,6 @@
alt
/>
</div>
<!--
<img-size
:imgUrl=
"item.url"
:imgData=
"item"
:index=
"index"
@
imgHandle=
"imgHandle"
></img-size>
-->
</div>
<div
v-if=
"item.type == 2"
class=
"file-content"
>
<div
class=
"file-con"
@
click=
"openPDF(item.url)"
>
...
...
@@ -101,49 +95,6 @@ export default {
this
.
$set
(
this
.
detailData
.
contentModelList
[
data
.
index
],
'newH'
,
data
.
height
)
},
// 图片处理-新
imgSizeHandleNew
(
item
,
imgWidth
,
imgHeight
)
{
let
lw
,
lh
,
newW
,
newH
,
imgProportion
=
(
imgWidth
/
imgHeight
).
toFixed
(
1
);
if
(
imgProportion
>
0.6
)
{
if
(
imgWidth
>
192
)
{
lw
=
192
;
lh
=
(
imgHeight
*
lw
)
/
imgWidth
;
}
else
if
(
imgWidth
<=
192
)
{
lw
=
imgWidth
;
lh
=
imgHeight
;
}
}
else
if
(
imgProportion
==
0.6
)
{
if
(
imgHeight
>
320
)
{
lh
=
320
;
}
else
{
lh
=
imgHeight
;
}
lw
=
lh
*
0.6
;
}
else
{
if
(
imgHeight
>
320
)
{
lh
=
320
;
lw
=
(
imgWidth
*
lh
)
/
imgHeight
;
}
else
if
(
imgHeight
<=
320
)
{
lh
=
imgHeight
;
lw
=
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
;
}
item
.
newW
=
newW
;
item
.
newH
=
newH
;
// this.$set(item, "newW", newW);
// this.$set(item, "newH", newH);
},
// 下载目标文件
downFile
()
{
let
a
=
document
.
createElement
(
'a'
);
...
...
@@ -192,18 +143,6 @@ export default {
max-height
:
320px
;
overflow
:
hidden
;
}
// .img-box {
// max-width: 192px;
// max-height: 320px;
// overflow: hidden;
// // & > img {
// // // width: 170px;
// // // height: 108px;
// // border-radius: 8px;
// // }
// }
}
.file-content
{
padding
:
16px
0
;
...
...
src/views/IM/current-session/index.vue
浏览文件 @
1d2f85fa
...
...
@@ -103,13 +103,7 @@
alt
/>
</div>
<!--
<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
class=
"midp-left"
>
<span
class=
"name"
>
{{
item
.
text
|
shortName
(
23
)
}}
</span>
...
...
@@ -1111,49 +1105,6 @@ export default {
this
.
$set
(
item
,
"newW"
,
newW
);
this
.
$set
(
item
,
"newH"
,
newH
);
},
// 图片处理-新
imgSizeHandleNew
(
item
,
imgWidth
,
imgHeight
)
{
let
lw
,
lh
,
newW
,
newH
,
imgProportion
=
(
imgWidth
/
imgHeight
).
toFixed
(
1
);
if
(
imgProportion
>
0.6
)
{
if
(
imgWidth
>
192
)
{
lw
=
192
;
lh
=
(
imgHeight
*
lw
)
/
imgWidth
;
}
else
if
(
imgWidth
<=
192
)
{
lw
=
imgWidth
;
lh
=
imgHeight
;
}
}
else
if
(
imgProportion
==
0.6
)
{
if
(
imgHeight
>
320
)
{
lh
=
320
;
}
else
{
lh
=
imgHeight
;
}
lw
=
lh
*
0.6
;
}
else
{
if
(
imgHeight
>
320
)
{
lh
=
320
;
lw
=
(
imgWidth
*
lh
)
/
imgHeight
;
}
else
if
(
imgHeight
<=
320
)
{
lh
=
imgHeight
;
lw
=
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
;
}
item
.
newW
=
newW
;
item
.
newH
=
newH
;
// this.$set(item, "newW", newW);
// this.$set(item, "newH", newH);
}
},
beforeDestroy
()
{
...
...
src/views/IM/search-message/detail.vue
浏览文件 @
1d2f85fa
...
...
@@ -21,15 +21,9 @@
<div>
{{
item
.
content
}}
</div>
</div>
<div
v-if=
"item.type == 'PICTURE'"
class=
"img-content"
v-viewer
>
<!--
<img
:src=
"item.content.url"
/>
-->
<div
class=
"img-box"
>
<img
:src=
"item.content.url"
:style=
"
{width: item.newW + 'px', height: item.newH + 'px'}"/>
</div>
<!--
<img-size
:imgUrl=
"item.content.url"
:imgData=
"item"
:index=
"index"
@
imgHandle=
"imgHandle"
></img-size>
-->
</div>
<div
v-if=
"item.type == 'CUSTOM'"
>
<div
v-if=
"item.content.bizType == 18"
class=
"file-content"
>
...
...
@@ -231,48 +225,6 @@ export default {
});
return
data
;
},
// 图片处理-新
imgSizeHandleNew
(
item
,
imgWidth
,
imgHeight
)
{
let
lw
,
lh
,
newW
,
newH
,
imgProportion
=
(
imgWidth
/
imgHeight
).
toFixed
(
1
);
if
(
imgProportion
>
0.6
)
{
if
(
imgWidth
>
192
)
{
lw
=
192
;
lh
=
(
imgHeight
*
lw
)
/
imgWidth
;
}
else
if
(
imgWidth
<=
192
)
{
lw
=
imgWidth
;
lh
=
imgHeight
;
}
}
else
if
(
imgProportion
==
0.6
)
{
if
(
imgHeight
>
320
)
{
lh
=
320
;
}
else
{
lh
=
imgHeight
;
}
lw
=
lh
*
0.6
;
}
else
{
if
(
imgHeight
>
320
)
{
lh
=
320
;
lw
=
(
imgWidth
*
lh
)
/
imgHeight
;
}
else
if
(
imgHeight
<=
320
)
{
lh
=
imgHeight
;
lw
=
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
;
}
item
.
newW
=
newW
;
item
.
newH
=
newH
;
// this.$set(item, "newW", newW);
// this.$set(item, "newH", newH);
},
// 时间格式转换
timeChange
(
data
)
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录