Blue Bridge Cup Entry Project (vue + springBoot)

Server nginx configuration

Please add a picture description

backend port 83

screen -S lanqiao

access link

domain name

public net

#databaseEduDb

create table

CREATE TABLE exam (
id INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
examName VARCHAR(255) NOT NULL COMMENT 'exam name',
startTime DATETIME NOT NULL COMMENT 'start time',
endTime DATETIME NOT NULL COMMENT 'end time ',
examStatus INT(11) NOT NULL COMMENT 'Exam Status',
testPaper INT(11) NOT NULL COMMENT 'Exam Paper',
examExplain VARCHAR(255) NOT NULL COMMENT 'Exam Description',
isOpen INT(11) NOT NULL DEFAULT 0 COMMENT 'Whether to open 0|1',
questionOutOfOrder INT(11) NOT NULL DEFAULT 0 COMMENT 'Question out of order 0|1',
PRIMARY KEY (id)
) COMMENT='examination table';

CREATE TABLE examstudent (
id INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
exam INT(11) NOT NULL COMMENT 'exam table association id',
student INT(11) NOT NULL COMMENT 'user table association id',
result INT(11) COMMENT 'Grade',
isUpload INT(11) NOT NULL DEFAULT 0 COMMENT 'Whether to submit 0|1',
uploadTime DATETIME COMMENT 'Submit time',
PRIMARY KEY (id),
CONSTRAINT fk_exam FOREIGN KEY (exam) REFERENCES exam (id),
CONSTRAINT fk_student FOREIGN KEY (student) REFERENCES user(id)
) COMMENT='examination student association table';

Exam Teacher Form

CREATE TABLE examteacher (
id INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
exam INT(11) NOT NULL COMMENT 'exam table association id',
teacher INT(11) NOT NULL COMMENT 'user table association id',
PRIMARY KEY (id),
CONSTRAINT fk_exam_2 FOREIGN KEY (exam) REFERENCES exam(id),
CONSTRAINT fk_teacher_2 FOREIGN KEY (teacher) REFERENCES user(id)
) COMMENT='exam teacher association table';

Why didn't you consider the problem of duplication of foreign key names

Group paper template table

CREATE TABLE grouptemplate (
id INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
subject INT(11) NOT NULL COMMENT 'subject',
name VARCHAR(255) NOT NULL COMMENT 'name',
isOpen INT(11) NOT NULL COMMENT 'Whether to enable 0|1',
userId INT(11) NOT NULL COMMENT 'User table association id',
createTime DATETIME NOT NULL COMMENT 'Creation time',
template INT(11) NOT NULL COMMENT 'Template score',
templateNote VARCHAR (255) COMMENT 'Template Remarks',
PRIMARY KEY (id),
CONSTRAINT fk_user FOREIGN KEY (userId) REFERENCES user(id)
) COMMENT='volume template table';

The following is the option table optionstable, the fields are id, test, sort, question, isTrue, isOpen, answer, optionType, the first three data types are int (11), then 4 varchar (255), and the last int ( 11). id is required, and is the primary key, remarks are, primary key auto-increment, test question table associated id, sorting, question stem, whether it is correct or not|yes, whether it is enabled or not|yes, reference answer, option type. id external link testpaper table id

CREATE TABLE optionstable (
id INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
test INT(11) NOT NULL COMMENT 'test question table association id',
sort INT(11) NOT NULL COMMENT 'sort',
question VARCHAR(255 ) NOT NULL COMMENT 'question stem',
isTrue VARCHAR(255) NOT NULL COMMENT 'whether it is correct or not|yes',
isOpen VARCHAR(255) NOT NULL COMMENT 'whether it is open or not|yes',
answer VARCHAR(255) NOT NULL COMMENT ' Reference answer',
optionType INT(11) NOT NULL COMMENT 'option type',
PRIMARY KEY (id),
CONSTRAINT fk_testpaper FOREIGN KEY (test) REFERENCES testpaper(id)
) COMMENT='option table';

The following is the question type table, questiontypetable, the field names are id, name, isUseParentTitle, isOpen, topic, the data type is only varchar (255), the others are int (11), and id is the primary key, which is required. Remarks are, primary key auto-increment, name, whether to use the parent question No|Yes, whether to enable No|Yes, question type selection|fill in the blank|short answer.

CREATE TABLE questiontypetable (
id int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
name varchar(255) NOT NULL COMMENT 'name',
isUseParentTitle int(11) NOT NULL COMMENT 'whether to use parent title 0|1',
isOpen int(11) NOT NULL COMMENT 'whether to open 0|1',
topic varchar(255) NOT NULL COMMENT 'question type selection|fill in the blank|short answer',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT= 'Title type table';

The following is the student answer table studentanswer, the field names are id, exam, testPaperTestQuestion, testPaperOption, student, studentAnswer, answerTime, evaluationTeacherId, evaluationNumber, evaluationTime. The data types are respectively, the first five are int (11), then varchar (255), then datetime, int (11), int (11), datetime

CREATE TABLE studentanswer (
id int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
exam int(11) DEFAULT NULL COMMENT 'exam id',
testPaperTestQuestion int(11) DEFAULT NULL COMMENT 'test paper-question id',
testPaperOption varchar( 255) DEFAULT NULL COMMENT 'test paper option',
student int(11) DEFAULT NULL COMMENT 'student id',
studentAnswer varchar(255) DEFAULT NULL COMMENT 'student answer',
answerTime datetime DEFAULT NULL COMMENT 'answer time',
evaluationTeacherId int(11 ) DEFAULT NULL COMMENT 'grading teacher id',
evaluationNumber int(11) DEFAULT NULL COMMENT 'grading score',
evaluationTime datetime DEFAULT NULL COMMENT 'grading time',
PRIMARY KEY (id)
) COMMENT='student answer table';

The following is the subject table subjectstable, the field names are id, subjectName, isOpen, the data types are int(11), varchar(255), int(11), id is the primary key, and the comments are, primary key auto-increment, name, whether open no | yes

CREATE TABLE subjectstable (
id INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
subjectName VARCHAR(255) COMMENT 'name',
isOpen INT(11) COMMENT 'whether to open or not|yes',
PRIMARY KEY (id)
) ENGINE =InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='table of subjects';

The following is the test table test, the field names are id, question, subject, questionTypeTable, parent, topic, isShare, the data type is only varchar (255) for question, and int (11) for all others, and id is the primary key. The annotations are, primary key self-increment, question stem, subject, question type table, question type, whether to share or not|yes

CREATE TABLE test (
id INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
question VARCHAR(255) NOT NULL COMMENT 'question stem',
subject INT(11) NOT NULL COMMENT 'subject',
questionTypeTable INT(11) NOT NULL COMMENT 'topic type table',
parent INT(11) DEFAULT NULL COMMENT 'parent topic',
topic INT(11) NOT NULL COMMENT 'topic type',
isShare INT(11) NOT NULL COMMENT 'whether to share 0|1' ,
PRIMARY KEY (id)
) COMMENT 'Exam question table';

The following is the test paper table, the field names are id, name, subject, isOpen, creator, createTime, testScore, testExplain, and the data types are int(11), varchar(255), varchar(255), int(11), varchar(255), datetime, int(11), varchar(255), id are the primary keys, and the comments are, primary key self-increment, name, subject, whether to open or not|yes, creator, creation time, test paper score, test paper illustrate

CREATE TABLE testpaper (
id int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
name varchar(255) DEFAULT NULL COMMENT 'name',
subject varchar(255) DEFAULT NULL COMMENT 'subject',
isOpen int(11) DEFAULT NULL COMMENT 'whether to open 0|1',
creator varchar(255) DEFAULT NULL COMMENT 'creator, foreign key associated user table id',
createTime datetime DEFAULT NULL COMMENT 'creation time',
testScore int(11) DEFAULT NULL COMMENT 'test paper score Value',
testExplain varchar(255) DEFAULT NULL COMMENT 'Explanation of test paper',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Table of test paper';

The following is the test paper-option table testpaperoption, the field names are id, testQuestionTableId, sort, question, isTrue, isOpen, answer, optionType, and the data types are int (11), int (11), int (11), varchar (255 ), int(11), int(11), varchar(255), int(11), id as the primary key. The annotations are, primary key self-increment, test paper test question table id, sorting, question stem, whether it is correct or not|yes, whether it is enabled or not|yes, reference answer, option type

CREATE TABLE testpaperoption (
id int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
testQuestionTableId int(11) NOT NULL COMMENT 'test paper question table id',
sort int(11) NOT NULL COMMENT 'sort',
question varchar(255 ) NOT NULL COMMENT 'Question Stem',
isTrue int(11) NOT NULL COMMENT 'Whether it is correct or not|Yes',
isOpen int(11) NOT NULL COMMENT 'Whether it is open or not|Yes',
answer varchar(255) DEFAULT NULL COMMENT ' Reference answer',
optionType int(11) NOT NULL COMMENT 'option type',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Examination paper-option table';

The following is the test paper-testquestions table, the fields are id, testPaper, question, questionParsing, subject, questionType, parent, topic, the data types are int (11), int (11), then two varchar (255), and finally Four int(11), id is the primary key. Remarks are primary key self-increment, test paper, question stem, question analysis, subject, question type, parent level, question type

CREATE TABLE testquestions(
idint(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
testPaperint(11) NOT NULL COMMENT 'examination paper',
questionvarchar(255) NOT NULL COMMENT 'question stem',
questionParsingvarchar(255) DEFAULT NULL COMMENT 'topic analysis ',
subjectint(11) NOT NULL COMMENT 'subject',
questionTypeint(11) NOT NULL COMMENT 'subject type',
parentint(11) DEFAULT NULL COMMENT 'parent',
topicint(11) NOT NULL COMMENT 'question type',
PRIMARY KEY ( id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Examination paper-Examination table';

The last user table user, the fields are id, account, password, isOpen, role, registrationTime, and the data types are int (11), varchar (255), varchar (255), int (11), int (11), datetime, id as the primary key, and comments as the primary key auto-increment, account number, password, whether to enable or not|yes, role, registration time

CREATE TABLE user (
id INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key auto-increment',
account VARCHAR(255) NOT NULL COMMENT 'account',
password VARCHAR(255) NOT NULL COMMENT 'password',
isOpen INT(11) NOT NULL COMMENT 'whether to enable 0|1',
role INT(11) NOT NULL COMMENT 'role',
registrationTime DATETIME NOT NULL COMMENT 'registration time',
PRIMARY KEY (id)
) COMMENT='user table';

front-end vue

Here is the front-end component of vue scaffolding, which is divided into two divs. First, the first div is at the top, accounting for 1/20 of the height of the screen, and the width is self-adaptive. The entire div has a prominent shadow effect, and the background is not modified, white By default, the leftmost part is the prominent yellow label of the "Examination Bank Management System", and the rightmost part has the "candidate" avatar, the "candidate" label, and the "logout" red button. Then the second div is divided into two divs, which are displayed under the first div. The width of the div accounts for 80% of the screen and the center is aligned. The first div is some option navigation, and the height is the same as the first div. , left and right two lable tags-type", which are option tags, all, preparing for the exam, completing the exam, not yet the exam time, then type, ready to sort, start time, exam time, the second div includes some div-boxes, 4 in each row, 3 rows full of design, and these div boxes are divided into two layers, the top is "*** midterm exam" and then filled with a certain color, and the bottom is some exam information labels, including start time, and Exam time information. Finally, there will be a button at the bottom right of each small div. These buttons will be changed according to the situation. For example, the default is "Start Exam".

third page

Help me organize the layout again. Now the tabs occupy the entire lower half of the screen. In fact, it should be on the left, accounting for 60% of the entire screen. On the right, there should be single-choice questions, multiple-choice questions, and judgment The tabs of the question are arranged in vertical rows and occupy 30% of the entire screen

The modes of multiple-choice questions, multiple-choice questions, and judgment questions should be arranged vertically and separated. Their tabs should be blank boxes, not themselves. Do you understand what I mean?

Please give me the code if you understand what I mean

#Backend SpringBoot

The user table is the user table

Complete the yml file development environment and test environment

vuex global variable

Guess you like

Origin blog.csdn.net/qq_39123467/article/details/129782754