mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-14 21:02:49 +00:00
no message
This commit is contained in:
parent
a4cb5d1b14
commit
c55f64e209
@ -846,3 +846,4 @@ AI机器人不存在
|
|||||||
删除备注长度限制(*)个字
|
删除备注长度限制(*)个字
|
||||||
系统机器人不能删除
|
系统机器人不能删除
|
||||||
「(*)」移动至「(*)」
|
「(*)」移动至「(*)」
|
||||||
|
设备不存在或已被删除
|
||||||
|
|||||||
@ -2051,3 +2051,13 @@ AI开启新会话失败
|
|||||||
关闭视频格式转换功能。
|
关闭视频格式转换功能。
|
||||||
视频压缩
|
视频压缩
|
||||||
关闭视频压缩功能。
|
关闭视频压缩功能。
|
||||||
|
将MOV、WEBM格式的视频转换为MP4格式。
|
||||||
|
对MP4格式的视频进行压缩处理。
|
||||||
|
登录时间
|
||||||
|
更新时间
|
||||||
|
过期时间
|
||||||
|
当前设备
|
||||||
|
浏览器
|
||||||
|
客户端
|
||||||
|
是否在该设备上退出登录?
|
||||||
|
登录设备
|
||||||
|
|||||||
@ -14,7 +14,6 @@ export default {
|
|||||||
...mapState([
|
...mapState([
|
||||||
'previewImageIndex',
|
'previewImageIndex',
|
||||||
'previewImageList',
|
'previewImageList',
|
||||||
'previewImageBase64',
|
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -93,15 +92,7 @@ export default {
|
|||||||
$A.eeuiAppSendMessage({
|
$A.eeuiAppSendMessage({
|
||||||
action: 'picturePreview',
|
action: 'picturePreview',
|
||||||
position: index,
|
position: index,
|
||||||
paths: paths.map(item => {
|
paths
|
||||||
if (!$A.isJson(item)) {
|
|
||||||
item = {path: item}
|
|
||||||
}
|
|
||||||
if (this.previewImageBase64.has(item.path)) {
|
|
||||||
item.preview = this.previewImageBase64.get(item.path);
|
|
||||||
}
|
|
||||||
return item
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
} else if ($A.isElectron) {
|
} else if ($A.isElectron) {
|
||||||
this.$Electron.sendMessage('openMediaViewer', {
|
this.$Electron.sendMessage('openMediaViewer', {
|
||||||
|
|||||||
43
resources/assets/js/store/actions.js
vendored
43
resources/assets/js/store/actions.js
vendored
@ -3988,49 +3988,6 @@ export default {
|
|||||||
state.previewImageList = data.list;
|
state.previewImageList = data.list;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 预览图片缓存 base64
|
|
||||||
* @param state
|
|
||||||
* @param imgElement
|
|
||||||
*/
|
|
||||||
previewCacheBase64({state}, imgElement) {
|
|
||||||
try {
|
|
||||||
const src = $A.thumbRestore(imgElement.currentSrc || imgElement.src);
|
|
||||||
const canvas = document.createElement('canvas');
|
|
||||||
const ctx = canvas.getContext('2d');
|
|
||||||
|
|
||||||
// 计算缩放比例,保持原有比例,确保最长边不超过 200
|
|
||||||
const MAX_SIZE = 200;
|
|
||||||
const originalWidth = imgElement.naturalWidth;
|
|
||||||
const originalHeight = imgElement.naturalHeight;
|
|
||||||
let width = originalWidth;
|
|
||||||
let height = originalHeight;
|
|
||||||
if (originalWidth > originalHeight && originalWidth > MAX_SIZE) {
|
|
||||||
width = MAX_SIZE;
|
|
||||||
height = Math.floor(originalHeight * (MAX_SIZE / originalWidth));
|
|
||||||
} else if (originalHeight > MAX_SIZE) {
|
|
||||||
height = MAX_SIZE;
|
|
||||||
width = Math.floor(originalWidth * (MAX_SIZE / originalHeight));
|
|
||||||
}
|
|
||||||
|
|
||||||
canvas.width = width;
|
|
||||||
canvas.height = height;
|
|
||||||
ctx.drawImage(imgElement, 0, 0);
|
|
||||||
const base64 = canvas.toDataURL('image/jpeg', 0.8);
|
|
||||||
state.previewImageBase64.set(src, base64);
|
|
||||||
//
|
|
||||||
if (state.previewImageBase64.size >= 10) {
|
|
||||||
const keys = Array.from(state.previewImageBase64.keys());
|
|
||||||
const removeCount = keys.length - 10;
|
|
||||||
for (let i = 0; i < removeCount; i++) {
|
|
||||||
state.previewImageBase64.delete(keys[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 播放音频
|
* 播放音频
|
||||||
* @param state
|
* @param state
|
||||||
|
|||||||
1
resources/assets/js/store/state.js
vendored
1
resources/assets/js/store/state.js
vendored
@ -225,7 +225,6 @@ export default {
|
|||||||
// 预览图片
|
// 预览图片
|
||||||
previewImageIndex: 0,
|
previewImageIndex: 0,
|
||||||
previewImageList: [],
|
previewImageList: [],
|
||||||
previewImageBase64: new Map(),
|
|
||||||
|
|
||||||
// 工作报告未读数量
|
// 工作报告未读数量
|
||||||
reportUnreadNumber: 0,
|
reportUnreadNumber: 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user