From 768bc58b16f23c55ce9eb34bb58173313fd30bab Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 九月 2020 11:14:20 +0800 Subject: [PATCH] 2020-09-21 --- src/index.js | 2 +- src/templates/zshare/formconfig.jsx | 2 +- src/tabviews/zshare/normalTable/index.jsx | 10 +++++----- src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx | 12 ++++-------- src/tabviews/zshare/normalTable/index.scss | 3 +++ src/tabviews/zshare/cardcomponent/index.scss | 1 + 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/index.js b/src/index.js index ea3cafa..7e310fb 100644 --- a/src/index.js +++ b/src/index.js @@ -107,7 +107,7 @@ // 涓氬姟绯荤粺涓嶅厑璁歌繛鎺ヤ簯绔紝涓氬姟绯荤粺杩炴帴sso.mk9h.cn鏃讹紝鏁版嵁铏氬寲澶勭悊 if (systemApi && systemApi.indexOf('cloud.mk9h.cn') > -1) { systemApi = '' - } else if (systemApi && systemApi.indexOf('sso.mk9h.cn') > -1) { + } else if (systemApi && systemApi.indexOf('sso.mk9h.cn') > -1 && process.env.NODE_ENV === 'production') { GLOB.dataFormat = true } diff --git a/src/tabviews/zshare/cardcomponent/index.scss b/src/tabviews/zshare/cardcomponent/index.scss index e0e90ae..05af64d 100644 --- a/src/tabviews/zshare/cardcomponent/index.scss +++ b/src/tabviews/zshare/cardcomponent/index.scss @@ -223,6 +223,7 @@ display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; + float: left; } .line2 { -webkit-line-clamp: 2; diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx index e207ef6..44063b1 100644 --- a/src/tabviews/zshare/normalTable/index.jsx +++ b/src/tabviews/zshare/normalTable/index.jsx @@ -334,9 +334,9 @@ } if (content !== '') { - if (item.format === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(content)) { + if (item.textFormat === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(content)) { content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)}` - } else if (item.format === 'YYYY-MM-DD HH:mm:ss' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1]).([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/.test(content)) { + } else if (item.textFormat === 'YYYY-MM-DD HH:mm:ss' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1]).([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/.test(content)) { content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}` } @@ -637,9 +637,9 @@ let content = record[col.field] if (content !== '') { - if (col.format === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(content)) { + if (col.textFormat === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(content)) { content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)}` - } else if (col.format === 'YYYY-MM-DD HH:mm:ss' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1]).([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/.test(content)) { + } else if (col.textFormat === 'YYYY-MM-DD HH:mm:ss' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1]).([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/.test(content)) { content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}` } @@ -1000,7 +1000,7 @@ } let _pagination = false - if (setting.laypage !== 'false') { + if (setting.laypage) { _pagination = { current: this.state.pageIndex, pageSize: this.state.pageSize, diff --git a/src/tabviews/zshare/normalTable/index.scss b/src/tabviews/zshare/normalTable/index.scss index 94d01db..edbcd5d 100644 --- a/src/tabviews/zshare/normalTable/index.scss +++ b/src/tabviews/zshare/normalTable/index.scss @@ -148,6 +148,9 @@ } } } + .ant-table-tbody > tr > td[rowspan] { + vertical-align: middle; + } .ant-table-tbody > tr > td.ant-table-column-has-actions { position: relative; .baseboard { diff --git a/src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx b/src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx index 07b39a2..d480eab 100644 --- a/src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx +++ b/src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx @@ -14,18 +14,14 @@ const [, drop] = useDrop({ accept: 'columns', canDrop: () => true, - drop: (item) => { - if (!item.hasOwnProperty('originalIndex')) { + drop: ({ id: draggedId, originalIndex }) => { + if (originalIndex === undefined) { hasDrop(card) - } - }, - hover({ id: draggedId }) { - if (!draggedId) return - if (draggedId !== id) { + } else if (draggedId && draggedId !== id) { const { index: overIndex } = findCard(id) moveCard(draggedId, overIndex) } - }, + } }) const opacity = isDragging ? 0 : 1 diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 060c858..5dc3afa 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -1211,7 +1211,7 @@ type: 'select', key: 'textFormat', label: Formdict['header.form.format'], - initVal: card.format || '', + initVal: card.textFormat || '', options: [{ value: '', text: Formdict['model.empty'] -- Gitblit v1.8.0