no message

This commit is contained in:
kuaifan 2025-05-05 11:19:47 +08:00
parent 6562b74130
commit ff48d543e7
13 changed files with 128 additions and 119 deletions

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -54,6 +54,7 @@ export default {
}
}
},
data() {
return {
showSpin: false,
@ -61,28 +62,33 @@ export default {
appData: {},
}
},
mounted() {
this.showSpin = true;
this.appData = this.getAppData
},
watch: {
loading(val) {
if (val) {
this.showSpin = true;
}
},
path(val) {
this.appData = {path: val}
},
datas: {
handler(info) {
this.appData = info
},
deep: true,
},
'$route': {
handler(to) {
if (to.name == 'manage-apps' || to.name == 'single-apps') {
if (to.name == 'single-apps') {
this.appData = {
path: to.hash || to.fullPath
}
@ -90,6 +96,7 @@ export default {
},
immediate: true,
},
userToken(val) {
this.appData = this.getAppData;
if (!val) {
@ -100,11 +107,13 @@ export default {
}
},
},
computed: {
...mapState([
'userInfo',
'themeName',
]),
getAppData() {
return {
type: 'init',
@ -131,9 +140,11 @@ export default {
openAppChildPage: (objects) => {
this.$store.dispatch('openAppChildPage', objects);
},
openChildWindow: (params) => {
this.$store.dispatch('openChildWindow', params);
},
openWebTabWindow: (url) => {
this.$store.dispatch('openWebTabWindow', url);
},
@ -141,17 +152,20 @@ export default {
}
},
methods: {
//
handleCreate(e) {
//
window.eventCenterForAppNameVite = new EventCenterForMicroApp(e.detail.name)
this.appData = this.getAppData
this.showSpin = !window["eventCenterForAppNameViteLoad-" + e.detail.name]
},
//
handleBeforeMount(e) {
window["eventCenterForAppNameViteLoad-" + e.detail.name] = 1;
},
//
handleMount(e) {
//
if (this.datas) {
this.appData = this.datas;
}
@ -160,12 +174,21 @@ export default {
}
this.showSpin = false;
},
//
handleUnmount(e) {
//
window.dispatchEvent(new Event('apps-unmount'));
},
handleError(e) { },
handleDataChange(e) { }
//
handleError(e) {
//
},
//
handleDataChange(e) {
//
}
}
}
</script>

View File

@ -126,7 +126,7 @@ export default {
},
activeName() {
if (['manage-calendar', 'manage-file', 'manage-setting', 'manage-application', 'manage-approve', 'manage-apps'].includes(this.routeName)) {
if (['manage-calendar', 'manage-file', 'manage-setting', 'manage-application', 'manage-approve'].includes(this.routeName)) {
return 'application';
}

View File

@ -344,9 +344,6 @@
<MobileTabbar v-if="mobileTabbar" @on-click="onTabbarClick"/>
</transition>
<!-- okr明细 -->
<MicroApps v-show="false" v-if="$route.name != 'manage-apps'" name="okr-details" :url="okrUrl" :datas="okrWindow"/>
<!--审批详情-->
<DrawerOverlay v-model="approveDetailsShow" placement="right" :size="600">
<ApproveDetails v-if="approveDetailsShow" :data="approveDetails" @onBack="approveDetailsShow=false"/>
@ -354,10 +351,31 @@
<!--应用商店-->
<DrawerOverlay
v-model="appsShow"
v-model="appStoreShow"
placement="right"
:size="1200">
<AppStore v-if="appStoreShow"/>
</DrawerOverlay>
<!--应用详情-->
<MicroApps
v-if="appDetailData.mode=='window'"
v-show="appDetailData.show"
:name="appDetailData.name"
:url="appDetailData.url"
:path="appDetailData.path"
:datas="appDetailData.data"/>
<DrawerOverlay
v-else-if="appDetailData.mode=='drawer'"
v-model="appDetailData.show"
placement="right"
:size="1200">
<MicroApps
v-if="appDetailData.show"
:name="appDetailData.name"
:url="appDetailData.url"
:path="appDetailData.path"
:datas="appDetailData.data"/>
</DrawerOverlay>
</div>
</template>
@ -383,6 +401,7 @@ import MicroApps from "../components/MicroApps.vue";
import UserSelect from "../components/UserSelect.vue";
import ImgUpload from "../components/ImgUpload.vue";
import ApproveDetails from "./manage/approve/details.vue";
import AppStore from "./manage/appstore/store.vue";
import notificationKoro from "notification-koro1";
import emitter from "../store/events";
import SearchBox from "../components/SearchBox.vue";
@ -391,6 +410,7 @@ export default {
components: {
SearchBox,
ApproveDetails,
AppStore,
ImgUpload,
UserSelect,
TaskExport,
@ -466,7 +486,8 @@ export default {
approveDetails: {id: 0},
approveDetailsShow: false,
appsShow: false,
appStoreShow: false,
appDetailData: {mode:''},
}
},
@ -478,6 +499,7 @@ export default {
emitter.on('dialogMsgPush', this.addDialogMsg);
emitter.on('approveDetails', this.openApproveDetails);
emitter.on('openReport', this.openReport);
emitter.on('openAppDetail', this.openAppDetail);
//
document.addEventListener('keydown', this.shortcutEvent);
},
@ -501,6 +523,7 @@ export default {
emitter.off('dialogMsgPush', this.addDialogMsg);
emitter.off('approveDetails', this.openApproveDetails);
emitter.off('openReport', this.openReport);
emitter.off('openAppDetail', this.openAppDetail);
//
document.removeEventListener('keydown', this.shortcutEvent);
},
@ -528,7 +551,6 @@ export default {
'approveUnreadNumber',
'dialogIns',
'okrWindow',
'formOptions',
'mobileTabbar',
'longpressData',
@ -549,14 +571,6 @@ export default {
}
},
/**
* okr路由
* @returns {any|string}
*/
okrUrl() {
return import.meta.env.VITE_OKR_WEB_URL || $A.mainUrl("apps/okr")
},
/**
* 综合数未读提及待办
* @returns {string|string}
@ -839,12 +853,6 @@ export default {
this.goForward({name: 'manage-approve'});
}
return;
case 'okrManage':
case 'okrAnalyze':
this.goForward({
path:'/manage/apps/' + ( path == 'okrManage' ? '/#/list' : '/#/analysis'),
});
return;
case 'complaint':
this.complaintShow = true;
return;
@ -895,7 +903,7 @@ export default {
classNameRoute(path) {
let name = this.routeName
if (name == 'manage-approve' || name == 'manage-apps') {
if (name == 'manage-approve') {
name = `manage-application`
}
return {
@ -1154,6 +1162,17 @@ export default {
this.workReportShow = true;
},
openAppDetail(data) {
this.appDetailData = Object.assign({
mode: 'drawer',
show: false,
name: '',
url: '',
path: '',
data: {}
}, data);
},
handleLongpress(event) {
const {type, data, element} = this.longpressData;
this.$store.commit("longpress/clear")
@ -1229,8 +1248,8 @@ export default {
case 'workReport':
this.settingRoute(act)
break;
case 'apps':
this.appsShow = true
case 'appstore':
this.appStoreShow = true
break;
}
},

View File

@ -388,7 +388,7 @@ export default {
{ value: "addTask", label: "添加任务", sort: 120 },
{ value: "scan", label: "扫一扫", sort: 130, show: $A.isEEUiApp },
{ value: "setting", label: "设置", sort: 140 },
{ value: "apps", label: "应用商店", sort: 999 },
{ value: "appstore", label: "应用商店", sort: 999 },
];
//
if (this.windowPortrait) {
@ -403,7 +403,6 @@ export default {
];
if (this.userIsAdmin) {
adminApplyList.push(...[
{ value: "okrAnalyze", label: "OKR 结果", sort: 150 },
{ value: "ldap", label: "LDAP", sort: 160 },
{ value: "mail", label: "邮件通知", sort: 170 },
{ value: "appPush", label: "APP 推送", sort: 180 },
@ -444,9 +443,7 @@ export default {
break;
case 'okr':
case 'okrAnalyze':
this.goForward({
path: '/manage/apps/okr/' + (item.value == 'okr' ? 'list' : 'analysis'),
});
this.$store.dispatch("openOkr", '/manage/apps/okr/' + (item.value == 'okr' ? 'list' : 'analysis'));
break;
case 'report':
emitter.emit('openReport', area == 'badge' ? 'receive' : 'my');

View File

@ -1,40 +0,0 @@
<template>
<MicroApps :url="appUrl" :path="path" v-if="!loading && $route.name == 'manage-apps'" />
</template>
<script>
import MicroApps from "../../components/MicroApps.vue";
export default {
components: { MicroApps },
data() {
return {
loading: false,
appUrl: '',
path: '',
}
},
deactivated() {
this.loading = true;
},
watch: {
'$route': {
handler(to) {
this.loading = true;
if (to.name == 'manage-apps') {
this.$nextTick(() => {
this.loading = false;
this.appUrl = import.meta.env.VITE_OKR_WEB_URL || $A.mainUrl("apps/okr")
this.path = this.$route.query.path || '';
})
}else{
this.appUrl = '';
}
},
immediate: true
}
}
}
</script>

View File

@ -0,0 +1,25 @@
<template>
<div>
App Store
</div>
</template>
<script>
export default {
name: "store",
props: {
data: {
type: Object,
default() {
return {};
}
}
},
data() {
return {
}
}
}
</script>

View File

@ -39,11 +39,6 @@ export default [
path: 'approve',
component: () => import('./pages/manage/approve/index.vue'),
},
{
name: 'manage-apps',
path: 'apps/*',
component: () => import('./pages/manage/apps.vue')
},
{
name: 'manage-setting',
path: 'setting',

View File

@ -4657,33 +4657,39 @@ export default {
},
/** *****************************************************************************************/
/** *************************************** okr *********************************************/
/** *************************************** OKR *********************************************/
/** *****************************************************************************************/
/**
* 打开Okr详情页
* 打开OKR
* @param state
* @param dispatch
* @param link_id
* @param path
*/
openOkr({state}, link_id) {
if (link_id > 0) {
if (window.innerWidth < 910) {
$A.goForward({
path:'/manage/apps/okr/okrDetails?data=' + link_id,
});
}else{
state.okrWindow = {
openOkr({state}, path) {
if (/^\d+$/.test(path)) {
// 打开详情页
emitter.emit('openAppDetail', {
mode: 'window',
show: false,
name: 'okr-detail',
url: import.meta.env.VITE_OKR_WEB_URL || $A.mainUrl("apps/okr"),
data: {
show: true,
type: 'open',
model: 'details',
show: true,
id: link_id
};
setTimeout(()=>{
state.okrWindow.show = false;
state.okrWindow.id = 0;
},10)
}
id: path
}
});
} else {
// 打开列表、统计
emitter.emit('openAppDetail', {
mode: 'drawer',
show: true,
name: 'okr-app',
url: import.meta.env.VITE_OKR_WEB_URL || $A.mainUrl("apps/okr"),
path
});
}
},
}

View File

@ -248,14 +248,6 @@ export default {
},
appMeetingShow: false,
// okr窗口
okrWindow: {
type: 'open',
model: 'details',
id: 0,
show: false
},
// 翻译
cacheTranslationLanguage: '',
cacheTranslations: [],

View File

@ -239,8 +239,8 @@
background-image: url("../images/application/word-chain.svg");
}
&.apps {
background-image: url("../images/application/apps.svg");
&.appstore {
background-image: url("../images/application/appstore.svg");
}
}

View File

@ -1,16 +1,8 @@
.page-microapp {
.microapp-load{
.microapp-load {
align-items: center;
display: flex;
justify-content: center;
height: 90%;
height: 100vh;
}
}
.electron-single-micro-apps {
.page-microapp {
.microapp-load{
margin-top: 25%;
}
}
}

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB