You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.7 KiB
74 lines
1.7 KiB
<template>
|
|
<div id="app">
|
|
<!-- 主内容区域 -->
|
|
<transition name="fade">
|
|
<router-view></router-view>
|
|
</transition>
|
|
|
|
<!-- 全局审批通知管理器 -->
|
|
<approval-notification-manager ref="approvalNotificationManager"></approval-notification-manager>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ApprovalNotificationManager from '@/components/ApprovalNotificationManager.vue'
|
|
|
|
export default {
|
|
name: 'App',
|
|
|
|
components: {
|
|
ApprovalNotificationManager
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
query: {},
|
|
version: '1.3.3'
|
|
}
|
|
},
|
|
|
|
created () {
|
|
this.versionReload()
|
|
},
|
|
|
|
methods: {
|
|
/**
|
|
* 版本检查及自动刷新
|
|
*/
|
|
versionReload(){
|
|
let version = this.version //版本号(每次上线前需要更新下版本号)
|
|
console.log('最新系统版本: ',version)
|
|
console.log('当前系统版本: ',this.version)
|
|
let versionLocal = localStorage.getItem('_version_');
|
|
if(version!=versionLocal){
|
|
localStorage.setItem('_version_',version);
|
|
this.version=versionLocal;
|
|
location.reload();
|
|
}
|
|
},
|
|
|
|
/**
|
|
* 手动触发审批通知检查(供外部调用)
|
|
*/
|
|
checkApprovalNotifications() {
|
|
if (this.$refs.approvalNotificationManager) {
|
|
this.$refs.approvalNotificationManager.manualCheck()
|
|
}
|
|
},
|
|
|
|
/**
|
|
* 清除指定申请单的通知记录(审批完成后调用)
|
|
* @param {string} applyNo - 申请单号
|
|
*/
|
|
clearApprovalNotification(applyNo) {
|
|
if (this.$refs.approvalNotificationManager) {
|
|
this.$refs.approvalNotificationManager.clearNotification(applyNo)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
/* 全局样式 */
|
|
</style>
|