feat:1.okr全局状态管理窗口的隐藏显示 2.聊天列表只缓存25条记录 3.审批中心-从设置返回取消动画

This commit is contained in:
weifashi 2023-09-15 16:43:24 +08:00
parent 304b22b1c1
commit db67d662d1
8 changed files with 42 additions and 10 deletions

View File

@ -386,7 +386,7 @@ class DialogController extends AbstractController
$prev_id = intval(Request::input('prev_id'));
$next_id = intval(Request::input('next_id'));
$msg_type = trim(Request::input('msg_type'));
$take = Base::getPaginate(100, 50, 'take');
$take = Base::getPaginate(100, 50);
$data = [];
//
$dialog = WebSocketDialog::checkDialog($dialog_id);

View File

@ -143,8 +143,6 @@ Vue.prototype.goBack = function () {
app.$store.state.routeHistorys.pop();
const length = app.$store.state.routeHistorys.length;
app.$store.state.routeHistoryLast = length >= 2 ? app.$store.state.routeHistorys[length - 2] : {};
} else if (app.$route.name == 'manage-apps') {
app.$router.back();
} else {
app.$router.replace({path: '/'}).catch(_ => {});
app.$store.state.routeHistorys = [];

View File

@ -7,6 +7,7 @@
<script>
import {mapState} from "vuex";
import microApp from '@micro-zoe/micro-app'
export default {
name: "MobileBack",
@ -130,10 +131,37 @@ export default {
}
}
}
//
let microAppIsVisible = false;
microApp.setGlobalData({ type:'modalVisible', callback: (appName, isVisible) => {
if(isVisible){
microAppIsVisible = true;
}
}})
if(microAppIsVisible){
return true;
}
//
return false;
},
onBack() {
//
let microAppIsAccept = false;
microApp.setGlobalData({
type:'route',
action: 'back',
route: this.$route,
callback: (appName, isAccept) => {
if(isAccept){
microAppIsAccept = true;
}
}
})
if(microAppIsAccept){
return;
}
//
if (this.$Modal.removeLast()) {
return;
}

View File

@ -29,7 +29,7 @@
</Button>
</div>
<Tabs class="page-approve-tabs" v-if="showType==1" :value="tabsValue" @on-click="tabsClick" size="small">
<Tabs class="page-approve-tabs" v-show="showType==1" :value="tabsValue" @on-click="tabsClick" size="small">
<TabPane :label="$L('待办') + (unreadTotal > 0 ? ('('+unreadTotal+')') : '')" name="unread" style="height: 100%;">
<div class="approve-main-search">
<div>
@ -161,7 +161,7 @@
</TabPane>
</Tabs>
<ApproveSetting v-else/>
<ApproveSetting v-show="showType!=1"/>
</div>

View File

@ -1,5 +1,5 @@
<template>
<MicroApps :url="appUrl" :path="path" v-if="!loading" />
<MicroApps :url="appUrl" :path="path" v-if="!loading && $route.name == 'manage-apps'" />
</template>
<script>
@ -29,6 +29,8 @@ export default {
this.appUrl = import.meta.env.VITE_OKR_WEB_URL || $A.apiUrl("../apps/okr")
this.path = this.$route.query.path || '';
})
}else{
this.appUrl = '';
}
},
immediate: true

View File

@ -157,7 +157,7 @@
:item-class-add="itemClassAdd"
:extra-props="{dialogData, operateVisible, operateItem, isMyDialog, msgId}"
:estimate-size="dialogData.type=='group' ? 105 : 77"
:keeps="50"
:keeps="25"
:disabled="scrollDisabled"
@scroll="onScroll"
@range="onRange"

View File

@ -2614,7 +2614,7 @@ export default {
dialog.extra_draft_has = dialog.extra_draft_content ? 1 : 0
}
// 关闭会话后只保留会话最后50条数据
const retain = 50
const retain = 25
const msgs = state.dialogMsgs.filter(item => item.dialog_id == dialog_id)
if (msgs.length > retain) {
const delIds = msgs.sort((a, b) => {
@ -2781,6 +2781,8 @@ export default {
state.dialogMsgs = state.dialogMsgs.filter(({dialog_id}) => dialog_id !== data.dialog_id)
$A.IDBSave("dialogMsgs", state.dialogMsgs, 600)
}
//
data.pagesize = 25;
//
dispatch("call", {
url: 'dialog/msg/list',
@ -3646,7 +3648,8 @@ export default {
});
}else{
state.okrWindow = {
type: 'okrDetails',
type: 'open',
model: 'details',
show: true,
id: link_id
};

View File

@ -208,7 +208,8 @@ export default {
// okr窗口
okrWindow: {
type: 'okrDetails',
type: 'open',
model: 'details',
id: 0,
show: false
}