diff --git a/app/assets/config/locale/en-US.json b/app/assets/config/locale/en-US.json
index 8d23b77b..76e4e040 100644
--- a/app/assets/config/locale/en-US.json
+++ b/app/assets/config/locale/en-US.json
@@ -310,7 +310,10 @@
"defineFields": "Define Properties",
"setTTL": "Set TTL",
"uniqProperty": "Property name cannot be duplicated",
- "timestampFormat": "Supported data inserting methods:
1. call function now()
2. Time string, for example: '2019-10-01 10:00:00'
3. Input the timestamp directly, namely the number of seconds from 1970-01-01 00:00:00",
+ "timestampFormat": "Supported data inserting methods:
1. call function now()
2. call function timestamp(), for example: timestamp('2021-07-05T06:18:43.984000')
3. Input the timestamp directly, namely the number of seconds from 1970-01-01 00:00:00",
+ "dateFormat": "Supported data inserting methods:
Call function date(), for example: date('2021-03-17')",
+ "timeFormat": "Supported data inserting methods:
Call function time(), for example: time('17:53:59')",
+ "datetimeFormat": "Supported data inserting methods:
Call function datetime(), for example: datetime('2021-03-17T17:53:59')",
"cancelOperation": "Do you want to close this panel",
"cancelPropmt": "If you close the panel, the configuration will be deleted automatically. Are you sure that you want to close the panel?",
"fieldDisabled": "A TTL configuration is set for this property, so it cannot be edited. If you want to edit this property, delete the TTL configuration.",
diff --git a/app/assets/config/locale/zh-CN.json b/app/assets/config/locale/zh-CN.json
index 6e52fa81..a7784dcf 100644
--- a/app/assets/config/locale/zh-CN.json
+++ b/app/assets/config/locale/zh-CN.json
@@ -306,7 +306,10 @@
"defineFields": "定义属性",
"setTTL": "设置TTL",
"uniqProperty": "属性名称不允许重名",
- "timestampFormat": "时间类型支持插入方式:
1. 调用函数 now()
2. 时间字符串,例如:'2019-10-01 10:00:00'
3. 直接输入时间戳,即从 1970-01-01 00:00:00 开始的秒数",
+ "timestampFormat": "时间类型支持插入方式:
1. 调用函数 now()
2. 调用函数 timestamp(),例如:timestamp('2021-07-05T06:18:43.984000')
3. 直接输入时间戳,即从 1970-01-01 00:00:00 开始的秒数",
+ "dateFormat": "日期类型支持插入方式:
调用函数 date(),例如:date('2021-03-17')",
+ "timeFormat": "时间类型支持插入方式:
调用函数 time(),例如time('17:53:59')",
+ "datetimeFormat": "日期时间类型支持插入方式:
调用函数 datetime(),例如:datetime('2021-03-17T17:53:59')",
"cancelOperation": "是否取消配置并关闭面板",
"cancelPropmt": "关闭面板将删除所有属性,是否继续?",
"fieldDisabled": "该属性被 ttl_col 引用,不支持更改操作,如要更改,请先更新 ttl",
diff --git a/app/assets/modules/Import/Tasks/ConfigEdge/Edge.tsx b/app/assets/modules/Import/Tasks/ConfigEdge/Edge.tsx
index 177e966e..b2715ef7 100644
--- a/app/assets/modules/Import/Tasks/ConfigEdge/Edge.tsx
+++ b/app/assets/modules/Import/Tasks/ConfigEdge/Edge.tsx
@@ -6,6 +6,7 @@ import { connect } from 'react-redux';
import CSVPreviewLink from '#assets/components/CSVPreviewLink';
import { IDispatch, IRootState } from '#assets/store';
+import { dataType } from '#assets/utils/constant';
import './Edge.less';
@@ -114,12 +115,13 @@ class Edge extends React.Component {
disabled={record.name === 'srcId' || record.name === 'dstId'}
onChange={type => this.handleChangeEdgeType(record, type)}
>
-
-
-
-
-
-
+ {dataType.map(item => {
+ return (
+
+ );
+ })}
),
},
diff --git a/app/assets/modules/Import/Tasks/ConfigVertex/Tag.tsx b/app/assets/modules/Import/Tasks/ConfigVertex/Tag.tsx
index 30fea20b..57f2cf04 100644
--- a/app/assets/modules/Import/Tasks/ConfigVertex/Tag.tsx
+++ b/app/assets/modules/Import/Tasks/ConfigVertex/Tag.tsx
@@ -6,6 +6,7 @@ import { connect } from 'react-redux';
import CSVPreviewLink from '#assets/components/CSVPreviewLink';
import { IDispatch, IRootState } from '#assets/store';
+import { dataType } from '#assets/utils/constant';
import './Tag.less';
@@ -138,12 +139,13 @@ class Tag extends React.Component {
value={value}
onChange={type => this.handleChangeTagType(record, tag, type)}
>
-
-
-
-
-
-
+ {dataType.map(item => {
+ return (
+
+ );
+ })}
),
},
diff --git a/app/assets/modules/Schema/Edge/Create.tsx b/app/assets/modules/Schema/Edge/Create.tsx
index bef65661..911b4d29 100644
--- a/app/assets/modules/Schema/Edge/Create.tsx
+++ b/app/assets/modules/Schema/Edge/Create.tsx
@@ -204,11 +204,15 @@ class CreateEdge extends React.Component {
- {fields && fields[k] && fields[k].type === 'timestamp' ? (
+ {fields &&
+ fields[k] &&
+ ['date', 'time', 'datetime', 'timestamp'].includes(
+ fields[k].type,
+ ) ? (
{getFieldDecorator(`fields[${k}].value`, {
initialValue: '',
diff --git a/app/assets/modules/Schema/Edge/Edit.less b/app/assets/modules/Schema/Edge/Edit.less
index bd64c798..c89a862c 100644
--- a/app/assets/modules/Schema/Edge/Edit.less
+++ b/app/assets/modules/Schema/Edge/Edit.less
@@ -15,7 +15,7 @@
}
.ant-table-row {
- td input {
+ td input:not(.ant-checkbox-input) {
width: 60%;
min-width: 200px;
}
diff --git a/app/assets/modules/Schema/Edge/Edit.tsx b/app/assets/modules/Schema/Edge/Edit.tsx
index f5914523..b909149e 100644
--- a/app/assets/modules/Schema/Edge/Edit.tsx
+++ b/app/assets/modules/Schema/Edge/Edit.tsx
@@ -521,11 +521,13 @@ class EditEdge extends React.Component {
align: 'center' as const,
render: (record, row, index) => {
if (editRow === index) {
- return row.type === 'timestamp' ? (
+ return ['date', 'time', 'datetime', 'timestamp'].includes(
+ row.type,
+ ) ? (
{
- {fields && fields[k] && fields[k].type === 'timestamp' ? (
+ {fields &&
+ fields[k] &&
+ ['date', 'time', 'datetime', 'timestamp'].includes(
+ fields[k].type,
+ ) ? (
{getFieldDecorator(`fields[${k}].value`, {
initialValue: '',
diff --git a/app/assets/modules/Schema/Tag/Edit.less b/app/assets/modules/Schema/Tag/Edit.less
index 12f2513b..5043cdac 100644
--- a/app/assets/modules/Schema/Tag/Edit.less
+++ b/app/assets/modules/Schema/Tag/Edit.less
@@ -15,7 +15,7 @@
}
.ant-table-row {
- td input {
+ td input:not(.ant-checkbox-input) {
width: 60%;
min-width: 200px;
}
diff --git a/app/assets/modules/Schema/Tag/Edit.tsx b/app/assets/modules/Schema/Tag/Edit.tsx
index 47944cb3..aabffe3f 100644
--- a/app/assets/modules/Schema/Tag/Edit.tsx
+++ b/app/assets/modules/Schema/Tag/Edit.tsx
@@ -520,11 +520,13 @@ class EditTag extends React.Component {
align: 'center' as const,
render: (record, row, index) => {
if (editRow === index) {
- return row.type === 'timestamp' ? (
+ return ['date', 'time', 'datetime', 'timestamp'].includes(
+ row.type,
+ ) ? (