mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-26 20:48:12 +00:00
no message
This commit is contained in:
parent
6562b74130
commit
ff48d543e7
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -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>
|
||||
|
||||
@ -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';
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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>
|
||||
25
resources/assets/js/pages/manage/appstore/store.vue
Normal file
25
resources/assets/js/pages/manage/appstore/store.vue
Normal 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>
|
||||
|
||||
5
resources/assets/js/routes.js
vendored
5
resources/assets/js/routes.js
vendored
@ -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',
|
||||
|
||||
44
resources/assets/js/store/actions.js
vendored
44
resources/assets/js/store/actions.js
vendored
@ -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
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
8
resources/assets/js/store/state.js
vendored
8
resources/assets/js/store/state.js
vendored
@ -248,14 +248,6 @@ export default {
|
||||
},
|
||||
appMeetingShow: false,
|
||||
|
||||
// okr窗口
|
||||
okrWindow: {
|
||||
type: 'open',
|
||||
model: 'details',
|
||||
id: 0,
|
||||
show: false
|
||||
},
|
||||
|
||||
// 翻译
|
||||
cacheTranslationLanguage: '',
|
||||
cacheTranslations: [],
|
||||
|
||||
4
resources/assets/sass/pages/page-apply.scss
vendored
4
resources/assets/sass/pages/page-apply.scss
vendored
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
12
resources/assets/sass/pages/page-microapp.scss
vendored
12
resources/assets/sass/pages/page-microapp.scss
vendored
@ -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%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Loading…
x
Reference in New Issue
Block a user