From f71bb7d6a8907b9219f39361725e94c28259bd61 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 四月 2021 18:01:00 +0800 Subject: [PATCH] 2021-04-06 --- src/tabviews/custom/components/card/cardcellList/index.jsx | 3 - src/tabviews/custom/components/carousel/cardItem/index.jsx | 3 - src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx | 2 src/menu/datasource/verifycard/settingform/index.jsx | 2 src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx | 2 src/tabviews/custom/components/card/cardItem/index.jsx | 4 - src/menu/components/form/normal-form/index.jsx | 5 + src/templates/modalconfig/index.jsx | 5 + src/menu/modalconfig/index.jsx | 5 + src/templates/modalconfig/dragelement/index.jsx | 1 src/tabviews/subtable/index.jsx | 14 ++-- src/menu/urlfieldcomponent/settingform/index.jsx | 11 +++ src/tabviews/commontable/index.jsx | 14 ++-- src/templates/modalconfig/dragelement/card.jsx | 2 src/tabviews/zshare/normalTable/index.scss | 51 +++++++--------- src/utils/utils.js | 5 + 16 files changed, 71 insertions(+), 58 deletions(-) diff --git a/src/menu/components/form/normal-form/index.jsx b/src/menu/components/form/normal-form/index.jsx index f609d62..07a76d1 100644 --- a/src/menu/components/form/normal-form/index.jsx +++ b/src/menu/components/form/normal-form/index.jsx @@ -506,6 +506,11 @@ _form.linkSubField = _form.linkSubField.filter(item => fields.includes(item)) } + if (!_form.span && standardform && standardform.span) { + _form.span = standardform.span + _form.labelwidth = standardform.labelwidth + } + this.setState({ standardform, visible: true, diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index ae179b2..c114793 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -315,7 +315,7 @@ {config.format === 'array' ? <Col span={8}> <Form.Item label="榛樿鎺掑簭"> {getFieldDecorator('order', { - initialValue: setting.order || 'ID asc', + initialValue: setting.order || 'ID desc', rules: [ { required: true, diff --git a/src/menu/modalconfig/index.jsx b/src/menu/modalconfig/index.jsx index 1800ca9..ed4bc4e 100644 --- a/src/menu/modalconfig/index.jsx +++ b/src/menu/modalconfig/index.jsx @@ -172,6 +172,11 @@ card.linkSubField = card.linkSubField.filter(item => fields.includes(item)) } + if (!card.span && standardform && standardform.span) { + card.span = standardform.span + card.labelwidth = standardform.labelwidth + } + this.setState({ standardform, visible: true, diff --git a/src/menu/urlfieldcomponent/settingform/index.jsx b/src/menu/urlfieldcomponent/settingform/index.jsx index 8214588..6dd6c93 100644 --- a/src/menu/urlfieldcomponent/settingform/index.jsx +++ b/src/menu/urlfieldcomponent/settingform/index.jsx @@ -30,6 +30,17 @@ } } + componentDidMount() { + try { + let _input = document.getElementById('field') + if (_input.focus) { + _input.focus() + } + } catch { + console.warn('focus error锛�') + } + } + render() { const { getFieldDecorator } = this.props.form diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index aed2a1b..ce0938e 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -290,6 +290,13 @@ if (col.field) { _arrField.push(col.field) + if (col.linkmenu && col.linkmenu.length > 0) { + let menu_id = col.linkmenu.slice(-1)[0] + col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || '' + } else { + col.linkThdMenu = '' + } + col.nameField && _arrField.push(col.nameField) // 閾炬帴鍚嶅瓧娈� if (col.Hide !== 'true' && col.type === 'number' && col.sum === 'true') { statFields.push(col) @@ -307,13 +314,6 @@ // 鐢熸垚鏄剧ず鍒楋紝澶勭悊鍚堝苟鍒椾腑鐨勫瓧娈� config.columns.forEach((col, index) => { if (_hideCol.includes(col.uuid)) return - - if (col.linkmenu && col.linkmenu.length > 0) { - let menu_id = col.linkmenu.slice(-1)[0] - col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || '' - } else { - col.linkThdMenu = '' - } col.sort = index diff --git a/src/tabviews/custom/components/card/cardItem/index.jsx b/src/tabviews/custom/components/card/cardItem/index.jsx index 76a4395..044bc4e 100644 --- a/src/tabviews/custom/components/card/cardItem/index.jsx +++ b/src/tabviews/custom/components/card/cardItem/index.jsx @@ -3,9 +3,6 @@ import { is, fromJS } from 'immutable' import asyncComponent from '@/utils/asyncComponent' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' - import './index.scss' const CardCellComponent = asyncComponent(() => import('../cardcellList')) @@ -18,7 +15,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, // 鍗$墖淇℃伅锛屽寘鎷鍙嶉潰 } diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 996c853..525c471 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -4,8 +4,6 @@ import { Icon, Col, Tooltip, notification } from 'antd' import moment from 'moment' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import asyncComponent from './asyncButtonComponent' import asyncElementComponent from '@/utils/asyncComponent' @@ -34,7 +32,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, // 缂栬緫涓厓绱� elements: null, // 鎸夐挳缁� } diff --git a/src/tabviews/custom/components/carousel/cardItem/index.jsx b/src/tabviews/custom/components/carousel/cardItem/index.jsx index 8b06726..709043f 100644 --- a/src/tabviews/custom/components/carousel/cardItem/index.jsx +++ b/src/tabviews/custom/components/carousel/cardItem/index.jsx @@ -3,8 +3,6 @@ import { is, fromJS } from 'immutable' import asyncComponent from '@/utils/asyncComponent' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import './index.scss' @@ -18,7 +16,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, // 鍗$墖淇℃伅锛屽寘鎷鍙嶉潰 } diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index 3b7bd4c..b31d3b2 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -179,6 +179,13 @@ if (col.field) { _arrField.push(col.field) + if (col.linkmenu && col.linkmenu.length > 0) { + let menu_id = col.linkmenu.slice(-1)[0] + col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || '' + } else { + col.linkThdMenu = '' + } + col.nameField && _arrField.push(col.nameField) // 閾炬帴鍚嶅瓧娈� if (col.Hide !== 'true' && col.type === 'number' && col.sum === 'true') { statFields.push(col) @@ -196,13 +203,6 @@ // 鐢熸垚鏄剧ず鍒楋紝澶勭悊鍚堝苟鍒椾腑鐨勫瓧娈� config.columns.forEach((col, index) => { if (_hideCol.includes(col.uuid)) return - - if (col.linkmenu && col.linkmenu.length > 0) { - let menu_id = col.linkmenu.slice(-1)[0] - col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || '' - } else { - col.linkThdMenu = '' - } col.sort = index diff --git a/src/tabviews/zshare/normalTable/index.scss b/src/tabviews/zshare/normalTable/index.scss index 3d4d957..5c27e47 100644 --- a/src/tabviews/zshare/normalTable/index.scss +++ b/src/tabviews/zshare/normalTable/index.scss @@ -54,6 +54,19 @@ table { .ant-table-tbody > tr > td { vertical-align: top; + position: relative; + + .baseboard { + position: absolute; + top: 0px; + left: 0px; + right: 0px; + bottom: 0px; + } + .link-menu { + cursor: pointer; + } + .content { position: relative; z-index: 1; @@ -112,6 +125,14 @@ width: calc(50% - 5px); } } + + p { + margin-bottom: 2px; + } + span { + display: inline-block; + margin-right: 5px; + } } .picture-col { img { @@ -153,35 +174,7 @@ .ant-table-tbody > tr > td[rowspan] { vertical-align: middle; } - .ant-table-tbody > tr > td.ant-table-column-has-actions { - position: relative; - .baseboard { - position: absolute; - top: 0px; - left: 0px; - right: 0px; - bottom: 0px; - } - .link-menu { - cursor: pointer; - } - - .content { - position: relative; - z-index: 1; - word-wrap: break-word; - word-break: break-word; - } - } - .ant-table-tbody > tr > td .content { - p { - margin-bottom: 2px; - } - span { - display: inline-block; - margin-right: 5px; - } - } + .ant-table-tbody > tr > td .button { .ant-btn { margin-bottom: 10px; diff --git a/src/templates/modalconfig/dragelement/card.jsx b/src/templates/modalconfig/dragelement/card.jsx index 3ea4921..bfb0c5b 100644 --- a/src/templates/modalconfig/dragelement/card.jsx +++ b/src/templates/modalconfig/dragelement/card.jsx @@ -13,7 +13,7 @@ const ColorSketch = asyncComponent(() => import('@/mob/colorsketch')) const CheckCard = asyncComponent(() => import('../checkCard')) -const Card = ({ id, card, cols, moveCard, findCard, editCard, closeCard, copyCard, showField }) => { +const Card = ({ id, card, moveCard, findCard, editCard, closeCard, copyCard, showField }) => { const originalIndex = findCard(id).index const [{ isDragging }, drag] = useDrag({ item: { type: 'form', id, originalIndex }, diff --git a/src/templates/modalconfig/dragelement/index.jsx b/src/templates/modalconfig/dragelement/index.jsx index 9457b16..42ded36 100644 --- a/src/templates/modalconfig/dragelement/index.jsx +++ b/src/templates/modalconfig/dragelement/index.jsx @@ -109,7 +109,6 @@ return <Col key={card.uuid} span={card.span || 24}> <Card id={card.uuid} - cols={setting.cols} card={card} showField={showField} moveCard={moveCard} diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index 2f3be6d..8934dad 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -281,6 +281,11 @@ card.linkSubField = card.linkSubField.filter(item => fields.includes(item)) } + if (!card.span && standardform && standardform.span) { + card.span = standardform.span + card.labelwidth = standardform.labelwidth + } + this.setState({ standardform, visible: true, diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx index a11ed88..27b3f4d 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx @@ -465,7 +465,7 @@ <Col span={12}> <Form.Item label="榛樿鎺掑簭"> {getFieldDecorator('order', { - initialValue: setting.order || 'ID asc', + initialValue: setting.order || 'ID desc', rules: [ { required: true, diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx index 0e2884c..4d1c6f3 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx @@ -402,7 +402,7 @@ <Col span={12}> <Form.Item label="鎺掑簭"> {getFieldDecorator('order', { - initialValue: setting.order || '', + initialValue: setting.order || 'ID desc', rules: [ { required: true, diff --git a/src/utils/utils.js b/src/utils/utils.js index 87e45c3..d0a9b07 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -729,6 +729,11 @@ sql = sql.replace(/@\$|\$@/ig, '') } + // 澶栬仈鏁版嵁搴撴浛鎹� + if (window.GLOB.externalDatabase !== null) { + sql = sql.replace(/@db@/ig, window.GLOB.externalDatabase) + } + if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) { console.info(sql) } -- Gitblit v1.8.0