From b8615008ca349e5b2d82452431025beb559b7a04 Mon Sep 17 00:00:00 2001 From: devezhao-mac Date: Fri, 29 Mar 2019 02:05:39 +0800 Subject: [PATCH] Page layout and db upgrade --- .vscode/settings.json | 3 +- src/main/resources/scripts/db-upgrade.sql | 28 +++++++++++++++ .../admin/entityhub/classification/editor.jsp | 36 ++++++++++++------- .../admin/entityhub/classification/list.jsp | 6 +++- .../webapp/admin/entityhub/entity-grid.jsp | 2 +- src/main/webapp/admin/entityhub/fields.jsp | 2 +- .../js/entity/classification-editor.jsx | 30 ++++++++++++++-- .../webapp/assets/js/entity/field-edit.jsx | 2 +- src/main/webapp/user/login.jsp | 9 +++-- src/main/webapp/user/signup.jsp | 2 +- 10 files changed, 95 insertions(+), 25 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a52f1d129..30696e75b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,5 +10,6 @@ ".eclipse/**": true }, "eslint.autoFixOnSave": true, - "editor.fontSize": 12 + "editor.fontSize": 12, + "editor.formatOnSave": true } \ No newline at end of file diff --git a/src/main/resources/scripts/db-upgrade.sql b/src/main/resources/scripts/db-upgrade.sql index 29041c5e6..ece123d6b 100644 --- a/src/main/resources/scripts/db-upgrade.sql +++ b/src/main/resources/scripts/db-upgrade.sql @@ -1,6 +1,34 @@ -- Database upgrade scripts for rebuild 1.x -- Each upgraded starts with `-- #VERSION` +-- #2 for Classification field +create table if not exists `classification` ( + `MODIFIED_ON` timestamp not null default '0000-00-00 00:00:00' comment '修改时间', + `DATA_ID` char(20) not null, + `CREATED_BY` char(20) not null comment '创建人', + `NAME` varchar(100) not null, + `DESCRIPTION` varchar(600), + `MODIFIED_BY` char(20) not null comment '修改人', + `IS_DISABLED` char(1) default 'F', + `CREATED_ON` timestamp not null default '0000-00-00 00:00:00' comment '创建时间', + primary key (`DATA_ID`) +)Engine=InnoDB; +create table if not exists `classification_data` ( + `ITEM_ID` char(20) not null, + `PARENT` char(20), + `MODIFIED_ON` timestamp not null default '0000-00-00 00:00:00' comment '修改时间', + `CODE` varchar(50), + `DATA_ID` char(20) not null, + `CREATED_BY` char(20) not null comment '创建人', + `NAME` varchar(100) not null, + `FULL_NAME` varchar(200) not null comment '父级fullName+fullName', + `MODIFIED_BY` char(20) not null comment '修改人', + `CREATED_ON` timestamp not null default '0000-00-00 00:00:00' comment '创建时间', + primary key (`ITEM_ID`) +)Engine=InnoDB; +alter table `classification_data` + add index `IX1_classification_data` (`DATA_ID`, `PARENT`, `NAME`, `FULL_NAME`); + -- #1 Add LoginLog table (v1.1) create table if not exists `login_log` ( `LOGOUT_TIME` timestamp null default '0000-00-00 00:00:00' comment '退出时间', diff --git a/src/main/webapp/admin/entityhub/classification/editor.jsp b/src/main/webapp/admin/entityhub/classification/editor.jsp index 0741619fc..05f66cea5 100644 --- a/src/main/webapp/admin/entityhub/classification/editor.jsp +++ b/src/main/webapp/admin/entityhub/classification/editor.jsp @@ -5,39 +5,49 @@ <%@ include file="/_include/Head.jsp"%> 分类数据编辑