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');
$history_id = intval(Request::input('history_id'));
//
Base::checkClientVersion('0.31.75');
//
if (Base::isNumber($id)) {
$user = User::auth();
$file = File::permissionFind(intval($id), $user, $down == 'yes' ? 1 : 0);

View File

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

View File

@ -105,7 +105,7 @@ export default {
}
if (this.userIsAdmin) {
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结果'})
}
},
@ -290,14 +290,14 @@ export default {
case 'contacts':
location = {name: 'manage-messenger', params: {dialogAction: 'contacts'}};
break;
case 'okrManage':
case 'okrAnalyze':
this.goForward({
path:'/manage/apps/' + ( path == 'okrManage' ? '/#/list' : '/#/analysis') ,
this.goForward({
path:'/manage/apps/' + ( path == 'okrManage' ? '/#/list' : '/#/analysis') ,
query: {
baseUrl: this.okrUrl
}
}
});
return;

View File

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

View File

@ -48,7 +48,8 @@
v-else-if="item.path === 'team'"
transfer
transfer-class-name="page-manage-menu-dropdown"
placement="right-start">
placement="right-start"
class="display-block" >
<DropdownItem :divided="!!item.divided">
<div class="manage-menu-flex">
{{$L(item.name)}}
@ -125,22 +126,22 @@
<div class="manage-box-new-group">
<ul>
<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>
</Tooltip>
</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>
</Tooltip>
</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>
</Tooltip>
</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>
</Tooltip>
</li>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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