perf: 细节优化

This commit is contained in:
weifashi 2023-12-01 14:52:50 +08:00
parent 0ceb2de79d
commit cef19488d2
13 changed files with 51 additions and 25 deletions

View File

@ -480,6 +480,8 @@ class FileController extends AbstractController
$only_update_at = Request::input('only_update_at', 'no'); $only_update_at = Request::input('only_update_at', 'no');
$history_id = intval(Request::input('history_id')); $history_id = intval(Request::input('history_id'));
// //
Base::checkClientVersion('0.31.75');
//
if (Base::isNumber($id)) { if (Base::isNumber($id)) {
$user = User::auth(); $user = User::auth();
$file = File::permissionFind(intval($id), $user, $down == 'yes' ? 1 : 0); $file = File::permissionFind(intval($id), $user, $down == 'yes' ? 1 : 0);

View File

@ -1251,6 +1251,7 @@ Markdown 格式发送
会议组件加载失败! 会议组件加载失败!
OKR管理 OKR管理
OKR结果
OKR结果分析 OKR结果分析
计划时间冲突提示 计划时间冲突提示
忽略并继续 忽略并继续
@ -1418,3 +1419,4 @@ APP推送
移动任务 移动任务
任务协助人 任务协助人
搜索项目名称 搜索项目名称
服务器版本过低,请升级服务器。

View File

@ -105,7 +105,7 @@ export default {
} }
if (this.userIsAdmin) { if (this.userIsAdmin) {
this.navMore[2].splice(0, 0, {icon: '', name: 'allUser', label: '团队管理'}) this.navMore[2].splice(0, 0, {icon: '', name: 'allUser', label: '团队管理'})
this.navMore[2].push({icon: '', name: 'okrAnalyze', label: 'OKR结果分析'}) this.navMore[2].push({icon: '', name: 'okrAnalyze', label: 'OKR结果'})
} }
}, },

View File

@ -163,7 +163,9 @@ export default {
} }
const documentKey = this.documentKey(); const documentKey = this.documentKey();
if (documentKey && documentKey.then) { if (documentKey && documentKey.then) {
documentKey.then(this.loadFile); documentKey.then(this.loadFile).catch(({msg})=>{
$A.modalError({content: msg});
});
} else { } else {
this.loadFile(); this.loadFile();
} }
@ -280,6 +282,14 @@ export default {
} }
// //
}).catch(({msg}) => { }).catch(({msg}) => {
if( msg.indexOf("404 not found") !== -1 ){
$A.modalInfo({
language: false,
title: '版本过低',
content: '服务器版本过低,请升级服务器。',
})
return;
}
$A.modalError({content: msg}); $A.modalError({content: msg});
}); });
}) })

View File

@ -48,7 +48,8 @@
v-else-if="item.path === 'team'" v-else-if="item.path === 'team'"
transfer transfer
transfer-class-name="page-manage-menu-dropdown" transfer-class-name="page-manage-menu-dropdown"
placement="right-start"> placement="right-start"
class="display-block" >
<DropdownItem :divided="!!item.divided"> <DropdownItem :divided="!!item.divided">
<div class="manage-menu-flex"> <div class="manage-menu-flex">
{{$L(item.name)}} {{$L(item.name)}}
@ -125,22 +126,22 @@
<div class="manage-box-new-group"> <div class="manage-box-new-group">
<ul> <ul>
<li> <li>
<Tooltip :content="$L('新建项目') + ' ('+mateName+'+B)'" placement="top-start" transfer :delay="300"> <Tooltip :content="$L('新建项目') + ' ('+mateName+'+B)'" placement="right" transfer :delay="300">
<i class="taskfont" @click="onAddShow">&#xe7b9;</i> <i class="taskfont" @click="onAddShow">&#xe7b9;</i>
</Tooltip> </Tooltip>
</li> </li>
<li> <li>
<Tooltip :content="$L('新建任务') + ' ('+mateName+'+K)'" placement="top-start" transfer :delay="300"> <Tooltip :content="$L('新建任务') + ' ('+mateName+'+K)'" placement="right" transfer :delay="300">
<i class="taskfont" @click="onAddMenu('task')">&#xe7b5;</i> <i class="taskfont" @click="onAddMenu('task')">&#xe7b5;</i>
</Tooltip> </Tooltip>
</li> </li>
<li> <li>
<Tooltip :content="$L('新会议') + ' ('+mateName+'+J)'" placement="top-start" transfer :delay="300"> <Tooltip :content="$L('新会议') + ' ('+mateName+'+J)'" placement="right" transfer :delay="300">
<i class="taskfont" @click="onAddMenu('createMeeting')">&#xe7c1;</i> <i class="taskfont" @click="onAddMenu('createMeeting')">&#xe7c1;</i>
</Tooltip> </Tooltip>
</li> </li>
<li> <li>
<Tooltip :content="$L('加入会议')" placement="top-start" transfer :delay="300"> <Tooltip :content="$L('加入会议')" placement="right" transfer :delay="300">
<i class="taskfont" @click="onAddMenu('joinMeeting')">&#xe794;</i> <i class="taskfont" @click="onAddMenu('joinMeeting')">&#xe794;</i>
</Tooltip> </Tooltip>
</li> </li>

View File

@ -326,7 +326,7 @@ export default {
]; ];
// //
let adminApplyList = !this.userIsAdmin ? [] : [ let adminApplyList = !this.userIsAdmin ? [] : [
{ value: "okrAnalyze", label: "OKR结果分析" }, { value: "okrAnalyze", label: "OKR结果" },
{ value: "ldap", label: "LDAP" }, { value: "ldap", label: "LDAP" },
{ value: "mail", label: "邮件" }, { value: "mail", label: "邮件" },
{ value: "appPush", label: "APP推送" }, { value: "appPush", label: "APP推送" },

View File

@ -1212,6 +1212,11 @@ export default {
* @param type * @param type
*/ */
sendMsg(text, type) { sendMsg(text, type) {
console.log( this.$refs.scroller.getSizes() )
return;
let textBody, let textBody,
textType = "text", textType = "text",
silence = "no", silence = "no",
@ -2226,6 +2231,8 @@ export default {
this.msgNew = 0; this.msgNew = 0;
} }
// //
console.log(this.allMsgs)
//
this.scrollAction = event.target.scrollTop; this.scrollAction = event.target.scrollTop;
this.scrollDirection = this.scrollTmp <= this.scrollAction ? 'down' : 'up'; this.scrollDirection = this.scrollTmp <= this.scrollAction ? 'down' : 'up';
setTimeout(_ => this.scrollTmp = this.scrollAction, 0); setTimeout(_ => this.scrollTmp = this.scrollAction, 0);

View File

@ -599,7 +599,7 @@ export default {
}, },
documentKey() { documentKey() {
return new Promise(resolve => { return new Promise((resolve,reject) => {
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'file/content', url: 'file/content',
data: { data: {
@ -608,8 +608,8 @@ export default {
}, },
}).then(({data}) => { }).then(({data}) => {
resolve(`${data.id}-${$A.Time(data.update_at)}`) resolve(`${data.id}-${$A.Time(data.update_at)}`)
}).catch(() => { }).catch((res) => {
resolve(0) reject(res)
}); });
}) })
}, },

View File

@ -144,7 +144,7 @@ export default {
}, },
documentKey() { documentKey() {
return new Promise(resolve => { return new Promise((resolve,reject) => {
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'file/content', url: 'file/content',
data: { data: {
@ -153,8 +153,8 @@ export default {
}, },
}).then(({data}) => { }).then(({data}) => {
resolve(`${data.id}-${$A.Time(data.update_at)}`) resolve(`${data.id}-${$A.Time(data.update_at)}`)
}).catch(() => { }).catch((res) => {
resolve(0) reject(res)
}); });
}) })
}, },

View File

@ -168,7 +168,7 @@ export default {
}, },
documentKey() { documentKey() {
return new Promise(resolve => { return new Promise((resolve,reject) => {
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'dialog/msg/detail', url: 'dialog/msg/detail',
data: { data: {
@ -177,8 +177,8 @@ export default {
}, },
}).then(({data}) => { }).then(({data}) => {
resolve(`${data.id}-${$A.Time(data.update_at)}`) resolve(`${data.id}-${$A.Time(data.update_at)}`)
}).catch(() => { }).catch((res) => {
resolve(0) reject(res)
}); });
}); });
}, },

View File

@ -155,7 +155,7 @@ export default {
}); });
}, },
documentKey() { documentKey() {
return new Promise(resolve => { return new Promise((resolve,reject) => {
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'project/task/filedetail', url: 'project/task/filedetail',
data: { data: {
@ -164,8 +164,8 @@ export default {
}, },
}).then(({data}) => { }).then(({data}) => {
resolve(`${data.id}-${$A.Time(data.update_at)}`) resolve(`${data.id}-${$A.Time(data.update_at)}`)
}).catch(() => { }).catch((res) => {
resolve(0) reject(res)
}); });
}) })
} }

View File

@ -1,6 +1,10 @@
body { body {
overflow: hidden; overflow: hidden;
.display-block{
display: block;
}
&.touch-back { &.touch-back {
.scrollbar-container .scrollbar-content, .scrollbar-container .scrollbar-content,
.dialog-wrapper .vue-recycle-scroller.direction-vertical:not(.page-mode), .dialog-wrapper .vue-recycle-scroller.direction-vertical:not(.page-mode),

View File

@ -730,7 +730,7 @@
} }
.open-approve-details { .open-approve-details {
width: 245px; width: 275px;
display: inline-block; display: inline-block;
max-width: 100%; max-width: 100%;