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

View File

@ -126,7 +126,7 @@ export default {
}, },
activeName() { 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'; return 'application';
} }

View File

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

View File

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

View File

@ -4657,33 +4657,39 @@ export default {
}, },
/** *****************************************************************************************/ /** *****************************************************************************************/
/** *************************************** okr *********************************************/ /** *************************************** OKR *********************************************/
/** *****************************************************************************************/ /** *****************************************************************************************/
/** /**
* 打开Okr详情页 * 打开OKR
* @param state * @param state
* @param dispatch * @param dispatch
* @param link_id * @param path
*/ */
openOkr({state}, link_id) { openOkr({state}, path) {
if (link_id > 0) { if (/^\d+$/.test(path)) {
if (window.innerWidth < 910) { // 打开详情页
$A.goForward({ emitter.emit('openAppDetail', {
path:'/manage/apps/okr/okrDetails?data=' + link_id, mode: 'window',
}); show: false,
}else{ name: 'okr-detail',
state.okrWindow = { url: import.meta.env.VITE_OKR_WEB_URL || $A.mainUrl("apps/okr"),
data: {
show: true,
type: 'open', type: 'open',
model: 'details', model: 'details',
show: true, id: path
id: link_id
};
setTimeout(()=>{
state.okrWindow.show = false;
state.okrWindow.id = 0;
},10)
} }
});
} 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, appMeetingShow: false,
// okr窗口
okrWindow: {
type: 'open',
model: 'details',
id: 0,
show: false
},
// 翻译 // 翻译
cacheTranslationLanguage: '', cacheTranslationLanguage: '',
cacheTranslations: [], cacheTranslations: [],

View File

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

View File

@ -3,14 +3,6 @@
align-items: center; align-items: center;
display: flex; display: flex;
justify-content: center; 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