Commit 15daad15 authored by 陈龙's avatar 陈龙

feat: 升级轻量化报表-beta版

parent d68c2f07
...@@ -11,7 +11,6 @@ import { returnDefaultValueOrConfigs } from '../utils/utils'; ...@@ -11,7 +11,6 @@ import { returnDefaultValueOrConfigs } from '../utils/utils';
const { Option } = Select; const { Option } = Select;
const { Search } = Input; const { Search } = Input;
const USER_ID = window.globalConfig.userInfo.OID;
const TextSearchComponent = ({ onChange, style, onSearch, placeholder }) => { const TextSearchComponent = ({ onChange, style, onSearch, placeholder }) => {
return ( return (
<Search <Search
......
...@@ -17,7 +17,6 @@ import { ...@@ -17,7 +17,6 @@ import {
Select, Select,
ConfigProvider, ConfigProvider,
} from 'antd'; } from 'antd';
import moment from 'moment'; import moment from 'moment';
import { submitReportData } from '../api/service/report'; import { submitReportData } from '../api/service/report';
import FileUpload from './Components/fileUpload/fileUpload'; import FileUpload from './Components/fileUpload/fileUpload';
...@@ -28,7 +27,7 @@ import style from './ReportEditForm.less'; ...@@ -28,7 +27,7 @@ import style from './ReportEditForm.less';
const { Option } = Select; const { Option } = Select;
const { TextArea } = Input; const { TextArea } = Input;
// 类型 // 类型
const USER_ID = window.globalConfig.userInfo.OID; const USER_ID = window?.globalConfig?.userInfo?.OID || 0;
const TEXT_ARRAY = ['文本', '标签']; const TEXT_ARRAY = ['文本', '标签'];
const TEXTAREA_ARRAY = ['多行文本']; const TEXTAREA_ARRAY = ['多行文本'];
const DATE_PICKER_ARRAY = ['日期']; const DATE_PICKER_ARRAY = ['日期'];
...@@ -66,7 +65,7 @@ const ReportEditForm = ({ reportDetails, reportData, onCancel, reportName, modal ...@@ -66,7 +65,7 @@ const ReportEditForm = ({ reportDetails, reportData, onCancel, reportName, modal
let _data = { ...data }; let _data = { ...data };
reportDetails.forEach((item) => { reportDetails.forEach((item) => {
if (DATE_TYPE.includes(item.type)) { if (DATE_TYPE.includes(item.type)) {
_data[item.fieldAlias] = data[item.fieldAlias] ? moment(data[item.fieldAlias]) : moment(); _data[item.fieldAlias] = data[item.fieldAlias] ? moment(data[item.fieldAlias]) : null;
} }
}); });
return _data; return _data;
...@@ -122,7 +121,7 @@ const ReportEditForm = ({ reportDetails, reportData, onCancel, reportName, modal ...@@ -122,7 +121,7 @@ const ReportEditForm = ({ reportDetails, reportData, onCancel, reportName, modal
} }
let _finalData = { let _finalData = {
fieldAlias: key, fieldAlias: key,
fieldValue: _value, fieldValue: _value === null ? _value : String(_value),
}; };
if (modalType === '编辑') { if (modalType === '编辑') {
_finalData.key = reportData.Key; _finalData.key = reportData.Key;
......
@import '~antd/es/style/themes/default.less'; @import "~antd/es/style/themes/default.less";
.reportEditForm { .reportEditForm {
:global { :global {
.@{ant-prefix}-form-item-label { .@{ant-prefix}-form-item-label {
width: 120px !important; width: 120px !important;
overflow: hidden;
label {
max-width: 100%;
white-space: break-spaces;
//overflow: ;
//text-overflow: ellipsis;
}
} }
input[disabled] { input[disabled] {
background-color: rgb(250, 250, 250);
cursor: default; cursor: default;
background-color: rgb(250, 250, 250);
} }
// 多行文本框 // 多行文本框
.@{ant-prefix}-input[disabled] { .@{ant-prefix}-input[disabled] {
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
background-color: rgb(250, 250, 250);
border-color: #d9d9d9; border-color: #d9d9d9;
box-shadow: none; box-shadow: none;
cursor: default; cursor: default;
opacity: 1; opacity: 1;
background-color: rgb(250, 250, 250);
} }
// 时间选择器的disabled样式 // 时间选择器的disabled样式
.@{ant-prefix}-picker-disabled { .@{ant-prefix}-picker-disabled {
color: rgba(0, 0, 0, 0.85);
background-color: rgb(250, 250, 250);
cursor: default; cursor: default;
color: rgba(0, 0, 0, .85);
background-color: rgb(250, 250, 250);
& + span { & + span {
cursor: default; cursor: default;
...@@ -42,6 +53,7 @@ ...@@ -42,6 +53,7 @@
cursor: default; cursor: default;
} }
} }
// 下拉选已选的disabled样式 // 下拉选已选的disabled样式
.@{ant-prefix}-cascader-picker-disabled { .@{ant-prefix}-cascader-picker-disabled {
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
...@@ -67,6 +79,7 @@ ...@@ -67,6 +79,7 @@
box-shadow: none; box-shadow: none;
} }
} }
// 多选下的tag的disabled样式 // 多选下的tag的disabled样式
.@{ant-prefix}-select-disabled.@{ant-prefix}-select-multiple { .@{ant-prefix}-select-disabled.@{ant-prefix}-select-multiple {
.@{ant-prefix}-select-selection-item { .@{ant-prefix}-select-selection-item {
...@@ -84,7 +97,10 @@ ...@@ -84,7 +97,10 @@
// 时间选择框 // 时间选择框
.@{ant-prefix}-picker-input > input[disabled] { .@{ant-prefix}-picker-input > input[disabled] {
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, .85);
}
.@{ant-prefix}-input-number{
min-width: 100px; // 设定数字输入框的最小长度为100px edit by zhangzhiwei 2023-07-04
} }
} }
} }
@import '~antd/es/style/themes/default.less'; @import "~antd/es/style/themes/default.less";
.reportsDataSourceSetting { .reportsDataSourceSetting {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
.contentWrapper { .contentWrapper {
height: calc(100% - 16px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: calc(100% - 16px);
margin: 8px; margin: 8px;
@media screen and (min-width: 1680px) { @media screen and (min-width: 1680px) {
.content { .content {
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
.controlRow { .controlRow {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-bottom: 8px;
padding: 8px;
background: #ffffff; background: #ffffff;
padding: 8px;
margin-bottom: 8px;
:global { :global {
.@{ant-prefix}-form-item { .@{ant-prefix}-form-item {
...@@ -58,23 +58,23 @@ ...@@ -58,23 +58,23 @@
.cardInfoItem { .cardInfoItem {
margin-bottom: 4px; margin-bottom: 4px;
color: rgb(100, 100, 100, 0.65); color: rgb(100, 100, 100, .65);
.item { .item {
color: rgba(58, 58, 58, 0.55);
font-weight: bold; font-weight: bold;
color: rgba(58, 58, 58, 0.55);
} }
.blue { .blue {
color: rgba(23, 130, 252, 0.65); color: rgba(23, 130, 252, .65);
} }
.ellipsis { .ellipsis {
display: inline-block;
max-width: 120px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
display: inline-block;
max-width: 120px;
vertical-align: top; vertical-align: top;
} }
} }
......
@import '~antd/es/style/themes/default.less'; @import "~antd/es/style/themes/default.less";
.lackParams { .lackParams {
display: flex;
align-items: center;
justify-content: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex;
justify-content: center;
align-items: center;
} }
.reportManage { .reportManage {
padding: 8px;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%;
padding: 8px;
.contentWrapper { .contentWrapper {
display: flex; display: flex;
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
height: 100%; height: 100%;
.controlRow { .controlRow {
display: flex;
flex-direction: row;
margin-bottom: 4px;
padding: 6px;
background: #ffffff; background: #ffffff;
padding: 6px;
border-radius: 4px; border-radius: 4px;
margin-bottom: 4px;
display: flex;
flex-direction: row;
} }
.tableContent { .tableContent {
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
} }
.deleteButton { .deleteButton {
color: rgb(255, 0, 0);
cursor: pointer; cursor: pointer;
color: rgb(255, 0, 0);
&:hover { &:hover {
//color: rgb(24, 144, 255); //color: rgb(24, 144, 255);
...@@ -56,24 +56,25 @@ ...@@ -56,24 +56,25 @@
} }
.spinWrapper { .spinWrapper {
display: flex;
align-items: center;
justify-content: center;
width: 100vw; width: 100vw;
height: 60vh; height: 60vh;
display: flex;
justify-content: center;
align-items: center
} }
:global { :global {
.@{ant-prefix}-table-container { .@{ant-prefix}-table-container {
height: 100%; height: 100%;
& > .@{ant-prefix}-table-body { & > .@{ant-prefix}-table-body {
border-right: 1px solid #dbe7fb;
border-bottom: 1px solid #dbe7fb; border-bottom: 1px solid #dbe7fb;
border-right: 1px solid #dbe7fb;
} }
.@{ant-prefix}-table-body { .@{ant-prefix}-table-body {
flex: 1; flex: 1
} }
.@{ant-prefix}-table-summary > table > tfoot > tr > td { .@{ant-prefix}-table-summary > table > tfoot > tr > td {
...@@ -96,11 +97,16 @@ ...@@ -96,11 +97,16 @@
} }
} }
.link { .link {
cursor: pointer; cursor: pointer;
width: 100%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
&:hover { &:hover {
//color: #1685FF; color: #1685FF;
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
...@@ -113,7 +119,7 @@ ...@@ -113,7 +119,7 @@
} }
.prefixOrSuffix { .prefixOrSuffix {
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, .65);
font-size: 10px; font-size: 10px;
} }
...@@ -126,14 +132,14 @@ ...@@ -126,14 +132,14 @@
::-webkit-scrollbar-track, ::-webkit-scrollbar-track,
*::-webkit-scrollbar-track { *::-webkit-scrollbar-track {
background: #f2f2f2; background: #F2F2F2;
border-radius: 10px; border-radius: 10px;
} }
::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb { *::-webkit-scrollbar-thumb {
background: #dcdcdc;
border-radius: 5px; border-radius: 5px;
background: #DCDCDC;
} }
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
@import '~antd/es/style/themes/default.less'; @import "~antd/es/style/themes/default.less";
.reportSettings { .reportSettings {
//width: 100%; //width: 100%;
...@@ -8,28 +8,28 @@ ...@@ -8,28 +8,28 @@
display: inline-block; display: inline-block;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
line-height: 1;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
line-height: 1;
&:hover { &:hover {
color: #1685ff; color: #1685FF;
} }
} }
.reportDetails { .reportDetails {
position: relative;
display: flex;
flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 8px; padding: 8px;
display: flex;
flex-direction: column;
position: relative;
.colorSketch { .colorSketch {
position: absolute;
z-index: 1001;
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute;
z-index: 1001;
} }
:global { :global {
...@@ -39,41 +39,41 @@ ...@@ -39,41 +39,41 @@
} }
.tableWrapper { .tableWrapper {
display: flex;
flex: 1; flex: 1;
display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
.controlRow { .controlRow {
display: flex; display: flex;
flex: 0 0 44px;
//justify-content: space-between; //justify-content: space-between;
align-items: center; align-items: center;
height: 44px;
margin-bottom: 4px; margin-bottom: 4px;
height: 44px;
flex: 0 0 44px;
padding: 6px; padding: 6px;
background: #ffffff; background: #ffffff;
.leftBtn { .leftBtn {
margin-right: 10px;
font-weight: bold;
font-size: 18px; font-size: 18px;
font-weight: bold;
cursor: pointer; cursor: pointer;
margin-right: 10px;
&:hover { &:hover {
color: #1685ff; color: #1685FF;
opacity: 0.8; opacity: 0.8;
} }
} }
} }
.tableContent { .tableContent {
flex: 1;
width: 100%; width: 100%;
max-height: calc(100% - 44px); max-height: calc(100% - 44px);
padding: 6px;
overflow: hidden; overflow: hidden;
background: #ffffff; flex: 1;
background: #FFFFFF;
padding: 6px;
.tableForm { .tableForm {
height: 100%; height: 100%;
...@@ -85,23 +85,23 @@ ...@@ -85,23 +85,23 @@
.boxShadow { .boxShadow {
border-color: #40a9ff; border-color: #40a9ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
border-right-width: 1px; border-right-width: 1px;
outline: 0; outline: 0;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
} }
.boxShadowOfSwitch { .boxShadowOfSwitch {
box-shadow: 0 0 4px 2px rgba(24, 144, 255, 0.6);
border-right-width: 1px; border-right-width: 1px;
outline: 0; outline: 0;
box-shadow: 0 0 4px 2px rgba(24, 144, 255, 0.6);
} }
.boxShadowOfSelect { .boxShadowOfSelect {
box-shadow: 0 0 2px 2px rgba(24, 144, 255, 0.2);
border-right-width: 1px; border-right-width: 1px;
outline: 0; outline: 0;
box-shadow: 0 0 2px 2px rgba(24, 144, 255, 0.2);
:global { :global {
.@{ant-prefix}-select-selector { .@{ant-prefix}-select-selector {
border-color: #40a9ff !important; border-color: #40a9ff!important;
} }
} }
} }
...@@ -110,10 +110,11 @@ ...@@ -110,10 +110,11 @@
cursor: pointer !important; cursor: pointer !important;
&:hover { &:hover {
color: #1685ff; color: #1685FF;
} }
&.active { &.active {
color: #1685ff; color: #1685FF;
} }
} }
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