Browse Source

项目启动, 根据 环境和楼层的 auto_start 初始化

master
修宁 6 months ago
parent
commit
7094bb3bbb
  1. 7
      doc/RCS数据库结构.md
  2. 14
      src/editor/ModelMain.vue

7
doc/RCS数据库结构.md

@ -84,6 +84,7 @@ create table lcc_env_info
env_name varchar(50) not null comment '环境名称', env_name varchar(50) not null comment '环境名称',
is_virtual boolean not null default false comment '是否虚拟环境', is_virtual boolean not null default false comment '是否虚拟环境',
env_payload varchar(3000) not null default 'N/A' comment '环境负载信息', env_payload varchar(3000) not null default 'N/A' comment '环境负载信息',
auto_start boolean not null default false comment '是否自动启动',
create_at timestamp not null comment '创建时间', create_at timestamp not null comment '创建时间',
create_by varchar(50) not null comment '创建人', create_by varchar(50) not null comment '创建人',
update_at timestamp null comment '更新时间', update_at timestamp null comment '更新时间',
@ -92,8 +93,8 @@ create table lcc_env_info
); );
create index idx_lcc_env_info_1 on lcc_env_info (world_id); create index idx_lcc_env_info_1 on lcc_env_info (world_id);
insert into lcc_env_info (env_id, world_id, env_name, is_virtual, env_payload, create_at, create_by, update_at, update_by) insert into lcc_env_info (env_id, world_id, env_name, is_virtual, env_payload, auto_start, create_at, create_by, update_at, update_by)
values (1, 'example1', '台湾展会生产', false, 'N/A', now(), 'system', now(), 'system'), values (1, 'example1', '台湾展会生产', false, 'N/A', true, now(), 'system', now(), 'system'),
(2, 'example1', '虚拟仿真', true, 'N/A', now(), 'system', now(), 'system'); (2, 'example1', '虚拟仿真', true, 'N/A', false, now(), 'system', now(), 'system');
``` ```

14
src/editor/ModelMain.vue

@ -22,10 +22,10 @@
</div> </div>
<div class="field-block" style="margin-right: 5px;"> <div class="field-block" style="margin-right: 5px;">
<el-select style="width:130px;" placeholder="时间速率" <el-select style="width:130px;" placeholder="时间速率"
v-model="worldModelState.runState.timeRate"> v-model="worldModelState.runState.timeRate"
<el-option label="1x" :value="1"></el-option> v-if="worldModelState.runState.isVirtual">
<el-option label="2x" :value="2"></el-option> <el-option v-for="option in timeRateOptions"
<el-option label="10x" :value="10"></el-option> :label="option.label" :value="option.value" />
</el-select> </el-select>
</div> </div>
<el-button :icon="renderIcon('Play')" type="primary" <el-button :icon="renderIcon('Play')" type="primary"
@ -207,6 +207,12 @@ export default {
data() { data() {
return { return {
Logo, Logo,
timeRateOptions: [
{ label: '1x', value: 1 },
{ label: '2x', value: 2 },
{ label: '5x', value: 5 },
{ label: '10x', value: 10 }
],
envList: [], envList: [],
isShowEditor: false, isShowEditor: false,
editorHash: 0, editorHash: 0,

Loading…
Cancel
Save