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

3 years ago
2 days ago
3 years ago
2 days ago
3 years ago
2 days ago
3 years ago
2 days ago
3 years ago
2 days ago
3 years ago
2 days ago
3 years ago
2 days ago
  1. <template>
  2. <div id="app">
  3. <!-- 主内容区域 -->
  4. <transition name="fade">
  5. <router-view></router-view>
  6. </transition>
  7. <!-- 全局审批通知管理器 -->
  8. <approval-notification-manager ref="approvalNotificationManager"></approval-notification-manager>
  9. </div>
  10. </template>
  11. <script>
  12. import ApprovalNotificationManager from '@/components/ApprovalNotificationManager.vue'
  13. export default {
  14. name: 'App',
  15. components: {
  16. ApprovalNotificationManager
  17. },
  18. data() {
  19. return {
  20. query: {},
  21. version: '1.3.3'
  22. }
  23. },
  24. created () {
  25. this.versionReload()
  26. },
  27. methods: {
  28. /**
  29. * 版本检查及自动刷新
  30. */
  31. versionReload(){
  32. let version = this.version //版本号(每次上线前需要更新下版本号)
  33. console.log('最新系统版本: ',version)
  34. console.log('当前系统版本: ',this.version)
  35. let versionLocal = localStorage.getItem('_version_');
  36. if(version!=versionLocal){
  37. localStorage.setItem('_version_',version);
  38. this.version=versionLocal;
  39. location.reload();
  40. }
  41. },
  42. /**
  43. * 手动触发审批通知检查供外部调用
  44. */
  45. checkApprovalNotifications() {
  46. if (this.$refs.approvalNotificationManager) {
  47. this.$refs.approvalNotificationManager.manualCheck()
  48. }
  49. },
  50. /**
  51. * 清除指定申请单的通知记录审批完成后调用
  52. * @param {string} applyNo - 申请单号
  53. */
  54. clearApprovalNotification(applyNo) {
  55. if (this.$refs.approvalNotificationManager) {
  56. this.$refs.approvalNotificationManager.clearNotification(applyNo)
  57. }
  58. }
  59. }
  60. }
  61. </script>
  62. <style>
  63. /* 全局样式 */
  64. </style>