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

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

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