Office Automation System

repository·master·Indexed 19 days ago

https://github.com/berserkerhercules/officeautomatic-system

An Office Automation (OA) system built with Spring Boot and Vue + ElementUI. It features modules for information publishing, file management, administrative task tracking, approval workflows for leave and business trips, daily work logs, meeting room scheduling, and system administration.

Tokens
3.3K
Snippets
14
Records
18
Agent score
68%

What's inside officeautomatic-system

  1. Overview of Office Automation System features

    master

    The system provides several modules for organizational management:

    • Information Publishing Platform: Announcements, company activities, project progress, and weekly reports.
    • File Management Platform: Incoming/outgoing document management, file search, and archive management.
    • Administrative Office: Task viewing, task creation, deadline setting, and task delegation (requires permissions).
    • Approval Workflow: Employee status tracking (leave, business trips), leave/trip applications, and attendance record viewing.
    • Log System: Daily work logs and log querying.
    • Meeting Management: Meeting room availability, meeting notifications, employee meeting summons, and meeting room status management.
    • System Administration: Managing the information platform, log querying, attendance oversight, and permission management.
  2. Understand the frontend folder structure

    master

    The project follows a standard Vue CLI structure. Key directories include:

    • src/api: API service definitions.
    • src/assets: Static assets like images and themes.
    • src/components: Reusable Vue components.
    • src/mock: Mock data for development.
    • src/styles: Global styles and SCSS variables.
    • src/views: Page-level components.
    • src/vuex: State management.
    • src/main.js: The application entry point.
    • src/routes.js: Routing configuration.
    • build/ & config/: Webpack configuration files.
    • dist/: Production build output.
    • static/: Static assets.
  3. Quickstart guide for the Office Automation System

    master

    The Office Automation System is designed using Spring Boot (backend) and Vue + ElementUI (frontend). The frontend source code is located in the /oa directory. To run the system, you must start both the backend and frontend components.

    ### Backend Setup
    1. Install and run the database using `/doc/sql/oa.sql`.
    2. Configure database connection, ports, and MyBatis in `/src/main/resources/application.yml`.
    3. Run `OaApplication.java`.
    
    ### Frontend Setup
    1. Install Node.js.
    2. Navigate to the `/oa` folder and start the Vue project.
    3. Configure the backend API interface in `/oa/src/api/api.js` (ports can be modified if conflicts occur).
  4. Change the Element UI theme

    master

    To customize the visual theme of the application using Element UI:

    1. Generate a custom theme package using the Element UI Theme Previewer.
    2. Place the generated theme files into src/assets/theme/.
    3. Update src/main.js to import your new theme instead of the default one.
    4. Update src/styles/vars.scss to reflect your theme changes.
    // In src/main.js, change:
    import 'element-ui/lib/theme-default/index.css'
    
    // To your custom theme path:
    import './assets/theme/your-theme/index.css'
  5. Configure frontend API endpoints

    master

    To connect the Vue frontend to your running Spring Boot backend, you must configure the API base URL and port in the API configuration file. If you encounter port conflicts, you can modify the port settings in this file or the backend configuration.

    Configuration File Path: /oa/src/api/api.js

  6. Configure backend database and application settings

    master

    The backend configuration is managed via a YAML file. You must update the database credentials, connection URL, server port, and MyBatis settings in the following file to match your local environment before starting the application.

    Configuration File Path: /src/main/resources/application.yml

  7. Start the Vue-based Office Automation System frontend

    master

    This project uses vue-cli. To get the development environment running, install the necessary dependencies and start the development server. The server will run with hot reload enabled at http://localhost:8081.

    # install dependencies
    npm install
    
    # serve with hot reload at localhost:8081
    npm run dev
  8. Configure the frontend build and development environments

    master

    The oa/config/index.js file defines the Webpack configuration for both production builds and development server environments.

    Production Build (build)

    • env: Environment variables loaded from ./prod.env.
    • index: The output path for index.html (resolved to ../dist/index.html).
    • assetsRoot: The output directory for all assets (resolved to ../dist).
    • assetsSubDirectory: The subdirectory for static assets (defaults to static).
    • assetsPublicPath: The base path for assets (set to /vue-admin/).
    • productionSourceMap: Enables/disables source maps in production.
    • productionGzip: Enables Gzip compression. Note: requires compression-webpack-plugin to be installed if set to true.
    • productionGzipExtensions: File extensions to be gzipped (defaults to ['js', 'css']).
    • bundleAnalyzerReport: Controls whether the bundle analyzer report is generated. This can be triggered via CLI.

    Development Server (dev)

    • env: Environment variables loaded from ./dev.env.
    • port: The local development server port (defaults to 8080).
    • autoOpenBrowser: Automatically opens the browser on startup.
    • assetsPublicPath: The base path for assets in development (defaults to /).
    • proxyTable: Configuration for API proxying (currently empty {}).
    • cssSourceMap: Enables/disables CSS sourcemaps.
    module.exports = {
      build: {
        env: require('./prod.env'),
        index: path.resolve(__dirname, '../dist/index.html'),
        assetsRoot: path.resolve(__dirname, '../dist'),
        assetsSubDirectory: 'static',
        assetsPublicPath: '/vue-admin/',
        productionSourceMap: true,
        productionGzip: false,
        productionGzipExtensions: ['js', 'css'],
        bundleAnalyzerReport: process.env.npm_config_report
      },
      dev: {
        env: require('./dev.env'),
        port: 8080,
        autoOpenBrowser: true,
        assetsSubDirectory: 'static',
        assetsPublicPath: '/',
        proxyTable: {},
        cssSourceMap: false
      }
    }
  9. Manage Tasks and Logs with getRw, editUser, addUser, getLog, and addLog

    master

    Functions for handling task information (rwxx) and logs (rz):

    • getRw(params): Gets 'My Tasks' via POST to /rwxx/myRw.
    • editUser(params): Updates a task via GET to /rwxx/updateRw.
    • addUser(params): Adds a new task via GET to /rwxx/addRw.
    • getLog(params): Retrieves logs via GET to /rwxx/rzList.
    • addLog(params): Adds a new log via GET to /rwxx/addRz.
    import { getRw, addUser, addLog } from '@/api/api';
    
    // Get my tasks
    getRw({}).then(data => console.log(data));
    
    // Add a new task
    addUser({ taskName: 'New Task' }).then(data => console.log(data));
    
    // Add a log
    addLog({ content: 'Task completed' }).then(data => console.log(data));
  10. Manage Announcements with getGg, addGg, and delGg

    master

    The following functions manage system announcements (gsgg):

    • getGg(params): Retrieves announcements via POST to /gsxx/gsgg.
    • addGg(params): Creates a new announcement via POST to /gsxx/addGg.
    • delGg(params): Deletes an announcement via POST to /gsxx/delGg.
    import { getGg, addGg, delGg } from '@/api/api';
    
    // Get announcements
    getGg({}).then(data => console.log(data));
    
    // Add announcement
    addGg({ title: 'New Notice', content: '...' }).then(data => console.log(data));
    
    // Delete announcement
    delGg({ id: 1 }).then(data => console.log(data));