From 94fe37551855f542d1cbad8b7af7fe3311daeddb Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 02 六月 2022 00:56:51 +0800 Subject: [PATCH] 2022-06-02 --- src/tabviews/custom/components/form/tab-form/index.jsx | 9 +++------ src/menu/components/card/cardcellcomponent/formconfig.jsx | 12 ++++++++++++ src/tabviews/custom/components/card/cardcellList/index.jsx | 12 ++++++++++-- src/tabviews/custom/components/card/cardcellList/index.scss | 11 +++++++++++ src/menu/components/card/cardcellcomponent/elementform/index.jsx | 2 +- src/tabviews/zshare/mutilform/mkDatePicker/index.jsx | 4 ++-- src/views/appmanage/scriptform/index.jsx | 4 +++- 7 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx index be98901..f0fbb8e 100644 --- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx +++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx @@ -15,7 +15,7 @@ const cardTypeOptions = { sequence: ['eleType', 'width'], - text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'anchors', 'noValue', 'bgImage', 'fixStyle'], + text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'anchors', 'noValue', 'bgImage', 'fixStyle', 'copyable'], number: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'noValue', 'fixStyle'], picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'noValue'], video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop', 'startTime', 'noValue', 'posterType'], diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index 1d4d380..a97d103 100644 --- a/src/menu/components/card/cardcellcomponent/formconfig.jsx +++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx @@ -590,6 +590,18 @@ ] }, { + type: 'radio', + key: 'copyable', + label: '鍙鍒�', + initVal: card.copyable || 'false', + tooltip: '鍏冪礌鏄惁鍙鍒讹紝澶嶅埗鍐呭鍖呮嫭鍓嶇紑涓庡悗缂�銆�', + required: false, + options: [ + { value: 'true', text: '鏄�' }, + { value: 'false', text: '鍚�' } + ] + }, + { type: 'number', key: 'fixSize', min: 10, diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index e4d5f90..f5545c3 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Col, Tooltip, notification } from 'antd' +import { Col, Tooltip, notification, Typography } from 'antd' import moment from 'moment' // import Api from '@/api' @@ -13,6 +13,7 @@ import LostPng from '@/assets/img/lost.png' import './index.scss' +const { Paragraph } = Typography const NormalButton = asyncComponent(() => import('@/tabviews/zshare/actionList/normalbutton')) const ExcelInButton = asyncComponent(() => import('@/tabviews/zshare/actionList/excelInbutton')) const ExcelOutButton = asyncComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton')) @@ -337,7 +338,14 @@ if (val !== '') { if (card.fixStyle === 'alone') { let _s = {fontSize: card.fixSize, color: card.fixColor, marginLeft: card.fixLeft, marginRight: card.fixRight} - val = <><span style={_s}>{card.prefix || ''}</span>{val}<span style={_s}>{card.postfix || ''}</span></> + if (card.copyable === 'true') { + val = <><span style={_s}>{card.prefix || ''}</span><Paragraph copyable={{ text: `${card.prefix || ''}${val}${card.postfix || ''}` }}>{val}</Paragraph><span style={_s}>{card.postfix || ''}</span></> + } else { + val = <><span style={_s}>{card.prefix || ''}</span>{val}<span style={_s}>{card.postfix || ''}</span></> + } + } else if (card.copyable === 'true') { + val = `${card.prefix || ''}${val}${card.postfix || ''}` + val = <Paragraph copyable={{ text: val }}>{val}</Paragraph> } else { val = `${card.prefix || ''}${val}${card.postfix || ''}` } diff --git a/src/tabviews/custom/components/card/cardcellList/index.scss b/src/tabviews/custom/components/card/cardcellList/index.scss index ec32d1f..caa1265 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.scss +++ b/src/tabviews/custom/components/card/cardcellList/index.scss @@ -4,6 +4,17 @@ .ant-btn { padding: 0; } + .ant-typography { + margin: 0; + padding: 0; + font-style: inherit; + font-weight: inherit; + text-decoration: inherit; + color: inherit; + .anticon-copy { + color: var(--antd-wave-shadow-color); + } + } .ant-mk-text { font-style: inherit; font-weight: inherit; diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index 8856ad9..fb57e76 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -237,7 +237,7 @@ async loadData () { const { mainSearch, menuType } = this.props - const { config, arr_field, BID, group } = this.state + const { config, arr_field, BID } = this.state if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { this.setState({ @@ -264,14 +264,11 @@ if (result.status) { let _data = result.data && result.data[0] ? result.data[0] : {$$empty: true} - let _group = group - this.setState({ - group: null, - data: _data || {$$empty: true}, + data: null, loading: false }, () => { - this.setState({group: _group}) + this.setState({data: _data}) }) } else { this.setState({ diff --git a/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx b/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx index a3d0899..6643b2b 100644 --- a/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx +++ b/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx @@ -37,7 +37,7 @@ this.state = { value, - minDate: config.minDate ? moment().add(config.minDate, 'days').endOf('day') : '', + minDate: config.minDate ? moment().add(config.minDate, 'days').startOf('day') : '', maxDate: config.maxDate ? moment().add(config.maxDate, 'days').endOf('day') : '', mode, format @@ -76,7 +76,7 @@ if (!current || (!maxDate && !minDate)) { return false } - + if (!maxDate) { return current < minDate } else if (!minDate) { diff --git a/src/views/appmanage/scriptform/index.jsx b/src/views/appmanage/scriptform/index.jsx index 6b9e445..67c6224 100644 --- a/src/views/appmanage/scriptform/index.jsx +++ b/src/views/appmanage/scriptform/index.jsx @@ -43,7 +43,9 @@ this.viewList = {} - this.setState({sublist, appId, subAppId}) + this.setState({sublist, appId, subAppId}, () => { + this.getViews() + }) } /** -- Gitblit v1.8.0