A minimalist questionnaire system, just a few simple configuration can help you solve the questionnaire related needs. Front-end main frameworks and libraries: Vue, Element, Vuex, VUE-Router Back-end main frameworks and libraries: Express, mongodb, Mongoose

The business logic

  1. You need to create a questionnaire template on the template management page and then select the template to create a questionnaire on the questionnaire management page.
  2. One template can correspond to multiple questionnaires (period). For example, the consumption survey template can correspond to the January consumption survey, February consumption survey, and March consumption survey, but only one (period) questionnaire can be opened in the same template.
  3. Click the view button on the questionnaire management page to get the questionnaire filling link, which will be sent to all users who need to complete the questionnaire. If you have already filled in this questionnaire, you cannot fill in it again.
  4. Currently, the questionnaire statistics can only collect the voting data of a certain period, and it does not support to take the template as the main body to collect the multi-period comprehensive voting data of the template.

Use and installation

  1. Download the code git clone https://github.com/no5no6/questionnaire.git.

  2. To install backend dependencies, run NPM install in the project root directory.

  3. Install the front-end dependencies and run NPM install in the questionnaire_web directory.

  4. To configure the database, ensure that mongodb is properly installed and started on the host. Create a Questionnaire database locally and set the user name as ky1 and password as 123 (PS: If need to change the database name, username, password, please open the questionnaire/models/index. The js file, find the corresponding position ‘mongo: / / ky1:123 @ localhost: 27017 / questionnaire’ changes). (1) open the Terminal window. (2). Use the command line to enter mongodb and run mongo. (3). Create a questionnaire database and type and execute use questionnaire. (4). Create a user, enter it, and execute it

      db.createUser({
        user:'ky1',
        pwd:'123',
        roles:[{
          "role" : "readWrite",
          "db": "questionnaire"
        }]
      })
    Copy the code
  5. Start the back-end service and execute the Node Questionnaire in the root directory of the project.

  6. Start the front-end service and run NPM run dev in the questionnaire_web directory.

  7. Open your browser and go to localhost:8080/#/questionList.