在修改项目中出的状况

需要修改的地方:

1.点击操作“开始执行”之后跳转到对应演练计划的drillResult.html页面,一定要注意是对应计划的页面。

2.点击编辑按钮之后,出现表单进行编辑修改,而不是找不到页面

3.数据库为asd,里面有表格:

-- auto-generated definition
create table drill_plan
(
    plan_id           int auto_increment
        primary key,
    plan_number       varchar(255)  not null,
    department        varchar(255)  not null,
    reason            varchar(255)  not null,
    project_detail    varchar(255)  not null,
    content           text          not null,
    drill_time        datetime      not null,
    participants      text          not null,
    impact_scope      text          null,
    cooperation_units text          null,
    plan_file         int           null,
    status            int default 0 not null,
    constraint plan_number
        unique (plan_number),
    constraint chk_status
        check (`status` in (0, 1))
);
-- auto-generated definition
create table drill_plan_evaluation
(
    evaluation_id int auto_increment
        primary key,
    plan_id       int  not null,
    issue_record  text not null,
    score         int  not null,
    constraint drill_plan_evaluation_ibfk_1
        foreign key (plan_id) references drill_plan (plan_id)
);

create index plan_id
    on drill_plan_evaluation (plan_id);
-- auto-generated definition
create table users
(
    user_id     int auto_increment
        primary key,
    username    varchar(50)                                      not null,
    password    varchar(255)                                     not null,
    real_name   varchar(50)                                      not null,
    phone       varchar(20)                                      not null,
    department  varchar(255)                                     null,
    role        enum ('admin', 'user') default 'user'            not null,
    status      int                                              null,
    last_login  datetime                                         null,
    create_time datetime               default CURRENT_TIMESTAMP null,
    update_time datetime                                         null on update CURRENT_TIMESTAMP,
    avatar_path varchar(255)                                     null,
    constraint phone
        unique (phone),
    constraint username
        unique (username)
)
    collate = utf8mb4_unicode_ci;

请根据表格内的实际内容进行功能的修改。如若用到其他的表格,你也可以添加。

4.对于整个工程的代码,我要经典的风格样式,(注意:是整个工程,不是单个模块)过程执行中的管理员的显示去掉,因为数据是假的,改为在整个工程中右上角显示用户信息

5.对于drillResult.html页面也要做出修改,要保证页面交互都能实现且数据真实,注意:数据真实。你可以自行添加对应springMVC层级的代码和前端代码。

我又几点要说明的:

1.演练列表中的的东西要根据drill_plan来呈现,而非虚构的,编辑页面中的各个条目的名称要和演练列表中的对应上。

2.开始执行按钮还是不能跳转到管理演练页面,在管理页面中要加个:开始演练,此功能支持60秒的语音播报。

Cannot delete or update a parent row: a foreign key constraint fails (asd.drill_plan_evaluation, CONSTRAINT drill_plan_evaluation_ibfk_1 FOREIGN KEY (plan_id) REFERENCES drill_plan (plan_id))

image-20250604162804344

image-20250604163051415

图片1中演练计划列表中表头的一系列内容替换为图片二中的文字项(右边的英文对应的是数据库中的字段名)

根据

<div class="col-md-3 mb-4">
    <div class="card">
        <div class="card-body text-center">
            <div class="participant-avatar mx-auto mb-3" style="background-color: #4caf50;">王</div>
            <h5 class="card-title">王技术</h5>
            <p class="card-text text-muted">技术专家</p>
            <div class="d-flex justify-content-center gap-2">
                <span class="badge bg-info">核心成员</span>
                <span class="badge bg-success">在线</span>
            </div>
        </div>
    </div>
</div>

生成演练成员表,放在asd中

<tr>
    <td>计划启动会议</td>
    <td>李安全</td>
    <td>2023-06-05</td>
    <td>2023-06-05</td>
    <td><span class="status-badge status-completed">已完成</span></td>
    <td>
        <div class="progress-container">
            <div class="progress-bar bg-success" style="width: 100%"></div>
        </div>
    </td>
    <td>
        <button class="btn btn-sm btn-outline-primary"><i class="fas fa-eye"></i></button>
    </td>
</tr>

把这些代码中的内容变成动态的,意思是为这个代码分配前后端的代码和数据库表。

那个“已完成”用一个按钮控制进度、

posted @ 2025-06-04 20:14  f-52Hertz  阅读(5)  评论(0)    收藏  举报