diff --git a/public/images/application/apps.svg b/public/images/application/appstore.svg
similarity index 100%
rename from public/images/application/apps.svg
rename to public/images/application/appstore.svg
diff --git a/resources/assets/js/components/MicroApps.vue b/resources/assets/js/components/MicroApps.vue
index 4f21a84bf..c8624dc53 100644
--- a/resources/assets/js/components/MicroApps.vue
+++ b/resources/assets/js/components/MicroApps.vue
@@ -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) {
+ //
+ }
}
}
diff --git a/resources/assets/js/components/Mobile/Tabbar.vue b/resources/assets/js/components/Mobile/Tabbar.vue
index 51688a5ee..f94077e70 100644
--- a/resources/assets/js/components/Mobile/Tabbar.vue
+++ b/resources/assets/js/components/Mobile/Tabbar.vue
@@ -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';
}
diff --git a/resources/assets/js/pages/manage.vue b/resources/assets/js/pages/manage.vue
index ede342c02..a3d7fe48f 100644
--- a/resources/assets/js/pages/manage.vue
+++ b/resources/assets/js/pages/manage.vue
@@ -344,9 +344,6 @@
-
-
-
@@ -354,10 +351,31 @@
+
+
+
+
+
+
@@ -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;
}
},
diff --git a/resources/assets/js/pages/manage/application.vue b/resources/assets/js/pages/manage/application.vue
index 216b04d72..b51cb3f8e 100644
--- a/resources/assets/js/pages/manage/application.vue
+++ b/resources/assets/js/pages/manage/application.vue
@@ -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');
diff --git a/resources/assets/js/pages/manage/apps.vue b/resources/assets/js/pages/manage/apps.vue
deleted file mode 100644
index afbdc133a..000000000
--- a/resources/assets/js/pages/manage/apps.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
diff --git a/resources/assets/js/pages/manage/appstore/store.vue b/resources/assets/js/pages/manage/appstore/store.vue
new file mode 100644
index 000000000..66611b833
--- /dev/null
+++ b/resources/assets/js/pages/manage/appstore/store.vue
@@ -0,0 +1,25 @@
+
+
+ App Store
+
+
+
+
+
diff --git a/resources/assets/js/routes.js b/resources/assets/js/routes.js
index 3f861a58f..b44754a9c 100755
--- a/resources/assets/js/routes.js
+++ b/resources/assets/js/routes.js
@@ -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',
diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js
index ad1b6528b..9554ad0ad 100644
--- a/resources/assets/js/store/actions.js
+++ b/resources/assets/js/store/actions.js
@@ -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
+ });
}
},
}
diff --git a/resources/assets/js/store/state.js b/resources/assets/js/store/state.js
index 527fd85bb..55dd03a3a 100644
--- a/resources/assets/js/store/state.js
+++ b/resources/assets/js/store/state.js
@@ -248,14 +248,6 @@ export default {
},
appMeetingShow: false,
- // okr窗口
- okrWindow: {
- type: 'open',
- model: 'details',
- id: 0,
- show: false
- },
-
// 翻译
cacheTranslationLanguage: '',
cacheTranslations: [],
diff --git a/resources/assets/sass/pages/page-apply.scss b/resources/assets/sass/pages/page-apply.scss
index 500c3bd26..b1a26d1a7 100644
--- a/resources/assets/sass/pages/page-apply.scss
+++ b/resources/assets/sass/pages/page-apply.scss
@@ -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");
}
}
diff --git a/resources/assets/sass/pages/page-microapp.scss b/resources/assets/sass/pages/page-microapp.scss
index 2be4535c7..795c174de 100644
--- a/resources/assets/sass/pages/page-microapp.scss
+++ b/resources/assets/sass/pages/page-microapp.scss
@@ -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%;
- }
- }
-}
-
diff --git a/resources/assets/statics/public/images/application/apps.svg b/resources/assets/statics/public/images/application/appstore.svg
similarity index 100%
rename from resources/assets/statics/public/images/application/apps.svg
rename to resources/assets/statics/public/images/application/appstore.svg