Commit 0b62b68b by zhaochengxiang

版本使用时间戳

parent e13ba314
...@@ -56,7 +56,7 @@ const VersionCompare = (props) => { ...@@ -56,7 +56,7 @@ const VersionCompare = (props) => {
(data||[]).forEach((item, index) => { (data||[]).forEach((item, index) => {
let name = item.name||''; let name = item.name||'';
name = name + '_' + formatVersionDate(item.ts); name = name + '_' + new Date(item.ts).toLocaleString();
if (index === 0 && item.id !== '-1') { if (index === 0 && item.id !== '-1') {
name = name+'(当前版本)'; name = name+'(当前版本)';
} }
......
...@@ -103,11 +103,11 @@ const Basic = ({ item }) => { ...@@ -103,11 +103,11 @@ const Basic = ({ item }) => {
<div className='model-version-compare'> <div className='model-version-compare'>
<div className='flex'> <div className='flex'>
<div style={{ flex: 1, paddingRight: 10, overflow: 'hidden'}}> <div style={{ flex: 1, paddingRight: 10, overflow: 'hidden'}}>
{`基线版本:${item?.forkedName??''}${item?.forkedLastModifiedTs?` V_${formatDate(item?.forkedLastModifiedTs)}`:''}`} {`基线版本:${item?.forkedName??''}${item?.forkedLastModifiedTs?` V_${new Date(item.forkedLastModifiedTs).toLocaleString()}`:''}`}
</div> </div>
<div style={{ flex: 1, paddingLeft: 10, overflow: 'hidden'}}> <div style={{ flex: 1, paddingLeft: 10, overflow: 'hidden'}}>
<div className='flex' style={{ justifyContent: 'space-between', alignItems: 'center' }}> <div className='flex' style={{ justifyContent: 'space-between', alignItems: 'center' }}>
<span>{`分支版本:${item?.name??''}${item?.modifiedTs?` V_${formatDate(item?.modifiedTs)}`:''}`}</span> <span>{`分支版本:${item?.name??''}${item?.modifiedTs?` V_${new Date(item.modifiedTs).toLocaleString()}`:''}`}</span>
<Checkbox onChange={onOnlyShowChange} checked={onlyShowChange}> <Checkbox onChange={onOnlyShowChange} checked={onlyShowChange}>
仅显示差异 仅显示差异
</Checkbox> </Checkbox>
......
...@@ -319,7 +319,7 @@ const DDLDetail = ({ config, setConfig }) => { ...@@ -319,7 +319,7 @@ const DDLDetail = ({ config, setConfig }) => {
const newData = [] const newData = []
for (const [index, item] of (data??[]).entries()) { for (const [index, item] of (data??[]).entries()) {
let name = item.name??'' let name = item.name??''
name = name + '_' + formatVersionDate(item.ts) name = name + '_' + new Date(item.ts).toLocaleString()
if ((index === 0&&item.id !== '-1') if ((index === 0&&item.id !== '-1')
|| (index === 1&&data[0].id === '-1')) { || (index === 1&&data[0].id === '-1')) {
name = name+'(当前版本)' name = name+'(当前版本)'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment