mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
fix: 修复远程excel页面样式问题
This commit is contained in:
@@ -160,7 +160,10 @@ public class ExcelUtils {
|
||||
|
||||
public static String getSize(CoreDatasource datasource) throws DEException {
|
||||
if (datasource.getType().equalsIgnoreCase("ExcelRemote")) {
|
||||
return "0 B";
|
||||
ExcelConfiguration excelConfiguration = JsonUtil.parseObject(datasource.getConfiguration(), ExcelConfiguration.class);
|
||||
for (ExcelSheetData sheet : excelConfiguration.getSheets()) {
|
||||
return sheet.getSize();
|
||||
}
|
||||
}
|
||||
try {
|
||||
JsonNode rootNode = objectMapper.readTree(datasource.getConfiguration());
|
||||
@@ -170,7 +173,6 @@ public class ExcelUtils {
|
||||
} catch (Exception e) {
|
||||
DEException.throwException(e);
|
||||
}
|
||||
|
||||
return "0 B";
|
||||
}
|
||||
|
||||
|
||||
@@ -878,13 +878,11 @@ public class DatasourceServer implements DatasourceApi {
|
||||
if (ObjectUtils.isNotEmpty(remoteExcelRequest.getDatasourceId()) && 0L != remoteExcelRequest.getDatasourceId()) {
|
||||
coreDatasource = dataSourceManage.getCoreDatasource(remoteExcelRequest.getDatasourceId());
|
||||
}
|
||||
|
||||
if (coreDatasource != null) {
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(transDTO(coreDatasource));
|
||||
List<DatasetTableDTO> datasetTableDTOS = ExcelUtils.getTables(datasourceRequest);
|
||||
List<ExcelSheetData> excelSheetDataList = new ArrayList<>();
|
||||
|
||||
for (ExcelSheetData sheet : excelFileData.getSheets()) {
|
||||
for (DatasetTableDTO datasetTableDTO : datasetTableDTOS) {
|
||||
if (excelDataTableName(datasetTableDTO.getTableName()).equals(sheet.getTableName())) {
|
||||
@@ -900,7 +898,6 @@ public class DatasourceServer implements DatasourceApi {
|
||||
}
|
||||
excelFileData.setSheets(excelSheetDataList);
|
||||
}
|
||||
|
||||
for (ExcelSheetData sheet : excelFileData.getSheets()) {
|
||||
for (int i = 0; i < sheet.getFields().size() - 1; i++) {
|
||||
for (int j = i + 1; j < sheet.getFields().size(); j++) {
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_2326_66186)">
|
||||
<path d="M1 4C1 1.79086 2.79086 0 5 0H19C21.2091 0 23 1.79086 23 4V20C23 22.2091 21.2091 24 19 24H5C2.79086 24 1 22.2091 1 20V4Z" fill="#34C724"/>
|
||||
<path d="M7.0166 5.58331H15.3095C15.4421 5.58331 15.5693 5.63599 15.663 5.72976L17.3702 7.43687C17.4639 7.53064 17.5166 7.65781 17.5166 7.79042V17.9167C17.5166 18.1928 17.2927 18.4166 17.0166 18.4166H7.0166C6.74046 18.4166 6.5166 18.1928 6.5166 17.9167V6.08331C6.5166 5.80717 6.74046 5.58331 7.0166 5.58331ZM7.71658 17.2167H16.3166V8.58331H14.6916C14.5949 8.58331 14.5166 8.50496 14.5166 8.40831V6.78339H7.71658V17.2167ZM15.063 9.85465C15.1222 9.77796 15.0676 9.66665 14.9706 9.66665H13.8072C13.771 9.66665 13.737 9.68339 13.7149 9.71198L11.9076 11.8119L12.7291 12.875L15.063 9.85465ZM11.9076 11.8119L11.9092 11.814L12.7291 12.875L11.9092 13.936L11.9076 13.938L10.2849 16.038C10.2628 16.0666 10.2287 16.0833 10.1926 16.0833H9.02916C8.93224 16.0833 8.87758 15.972 8.93684 15.8953L11.2156 12.9463C11.2481 12.9043 11.2481 12.8456 11.2156 12.8036L8.93686 9.85465C8.87761 9.77796 8.93227 9.66665 9.02918 9.66665H10.1926C10.2287 9.66665 10.2628 9.68339 10.2849 9.71198L11.9076 11.8119ZM13.7149 16.038L11.9076 13.938L12.7291 12.875L15.063 15.8953C15.1222 15.972 15.0676 16.0833 14.9707 16.0833H13.8072C13.771 16.0833 13.737 16.0666 13.7149 16.038Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_2326_66186">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<path d="M4 2.5C4 1.94772 4.44772 1.5 5 1.5H14.7929C14.9255 1.5 15.0527 1.55268 15.1464 1.64645L19.8536 6.35355C19.9473 6.44732 20 6.5745 20 6.70711V21.5C20 22.0523 19.5523 22.5 19 22.5H5C4.44772 22.5 4 22.0523 4 21.5V2.5Z" fill="#34C724"/>
|
||||
<path d="M15 1.54492C15.054 1.56949 15.1037 1.6037 15.1464 1.64646L19.8536 6.35357C19.8963 6.39632 19.9305 6.44602 19.9551 6.50001H16C15.4477 6.50001 15 6.0523 15 5.50001V1.54492Z" fill="#2CA91F"/>
|
||||
<path d="M11.308 13.5956L8.33203 17.9996H9.60403L11.98 14.4596L14.284 17.9996H15.676L12.664 13.5956L15.496 9.43164H14.224L11.992 12.7796L9.85603 9.43164H8.48803L11.308 13.5956Z" fill="white"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 741 B |
@@ -1143,7 +1143,7 @@ export default {
|
||||
remote_excel_url: 'Remote Excel/CSV Address',
|
||||
remote_excel_url_placeholder:
|
||||
'Please enter the remote Excel/CSV address, for example, ftp://192.168.1.101/files/data.xlsx',
|
||||
remote_excel_url_empty: 'The remote address cannot be empty',
|
||||
remote_excel_url_empty: 'Please enter the remote Excel/CSV address',
|
||||
load_data: 'Load Data'
|
||||
},
|
||||
chart: {
|
||||
|
||||
@@ -1109,7 +1109,7 @@ export default {
|
||||
remote_excel_url: '遠端 Excel/CSV 地址',
|
||||
remote_excel_url_placeholder:
|
||||
'請輸入遠端 Excel/CSV 地址,例如 ftp://192.168.1.101/files/data.xlsx',
|
||||
remote_excel_url_empty: '遠端地址不能為空',
|
||||
remote_excel_url_empty: '請輸入遠端 Excel/CSV 地址',
|
||||
load_data: '載入資料'
|
||||
},
|
||||
chart: {
|
||||
|
||||
@@ -1114,7 +1114,7 @@ export default {
|
||||
remote_excel_url: '远程 Excel/CSV 地址',
|
||||
remote_excel_url_placeholder:
|
||||
'请输入远程 Excel/CSV 地址,例如 ftp://192.168.1.101/files/data.xlsx',
|
||||
remote_excel_url_empty: '远程地址不能为空',
|
||||
remote_excel_url_empty: '请输入远程 Excel/CSV 地址',
|
||||
load_data: '加载数据'
|
||||
},
|
||||
chart: {
|
||||
|
||||
@@ -41,9 +41,8 @@ const del = () => {
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 58px;
|
||||
padding: 0 16px 0 12px;
|
||||
padding: 0 0 0 0;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dee0e3;
|
||||
.excel {
|
||||
font-size: 32px;
|
||||
margin-right: 14.67px;
|
||||
|
||||
@@ -114,7 +114,7 @@ const defaultRule = {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: t('datasource.input_name'),
|
||||
message: t('sync_datasource.input_ds_name'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
@@ -739,7 +739,7 @@ defineExpose({
|
||||
v-show="activeStep !== 2"
|
||||
>
|
||||
<el-form-item
|
||||
:label="t('auth.datasource') + ' ' + t('chart.name')"
|
||||
:label="t('data_source.data_source_name')"
|
||||
prop="name"
|
||||
v-show="activeStep !== 2"
|
||||
>
|
||||
@@ -912,8 +912,8 @@ defineExpose({
|
||||
v-if="activeStep === 2"
|
||||
>
|
||||
<el-radio-group v-model="form.syncSetting.updateType">
|
||||
<el-radio label="all_scope">{{ t('datasource.all_scope') }}</el-radio>
|
||||
<el-radio label="add_scope"> {{ t('datasource.add_scope') }}</el-radio>
|
||||
<el-radio label="add_scope"> {{ t('datasource.append_data') }}</el-radio>
|
||||
<el-radio label="all_scope">{{ t('datasource.replace_data') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@@ -1009,100 +1009,6 @@ defineExpose({
|
||||
|
||||
<style lang="less" scoped>
|
||||
.editor-detail {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: calc(100% + 48px);
|
||||
margin: -8px -24px 0 -24px;
|
||||
.ed-form-item {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.table-select_mode {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #f5f6f7;
|
||||
padding: 16px;
|
||||
.btn-select {
|
||||
width: 164px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #ffffff;
|
||||
border: 1px solid #bbbfc4;
|
||||
border-radius: 4px;
|
||||
|
||||
.is-active {
|
||||
background: var(--ed-color-primary-1a, rgba(51, 112, 255, 0.1));
|
||||
}
|
||||
|
||||
.ed-button:not(.is-active) {
|
||||
color: #1f2329;
|
||||
}
|
||||
.ed-button.is-text {
|
||||
height: 24px;
|
||||
width: 74px;
|
||||
line-height: 24px;
|
||||
}
|
||||
.ed-button + .ed-button {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-operate {
|
||||
height: 56px;
|
||||
padding: 16px 24px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid rgba(31, 35, 41, 0.15);
|
||||
}
|
||||
.detail-inner {
|
||||
width: 800px;
|
||||
padding-top: 16px;
|
||||
height: calc(100vh - 280px);
|
||||
min-height: 700px;
|
||||
|
||||
.dropdown-icon {
|
||||
.down-outlined {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
&[aria-expanded='true'] {
|
||||
.down-outlined {
|
||||
transform: rotate(0);
|
||||
}
|
||||
}
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.error-status {
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.upload-tip {
|
||||
color: #8f959e;
|
||||
font-family: var(--de-custom_font, 'PingFang');
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.title-form_primary {
|
||||
margin: 16px 0;
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
width: 100%;
|
||||
height: calc(100% - 200px);
|
||||
&.info-table_height {
|
||||
height: calc(100% - 379px);
|
||||
}
|
||||
}
|
||||
}
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -1162,6 +1068,46 @@ defineExpose({
|
||||
}
|
||||
}
|
||||
.detail-inner {
|
||||
height: calc(100vh - 280px);
|
||||
min-height: 700px;
|
||||
|
||||
.dropdown-icon {
|
||||
.down-outlined {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
&[aria-expanded='true'] {
|
||||
.down-outlined {
|
||||
transform: rotate(0);
|
||||
}
|
||||
}
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.error-status {
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.upload-tip {
|
||||
color: #8f959e;
|
||||
font-family: var(--de-custom_font, 'PingFang');
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.title-form_primary {
|
||||
margin: 16px 0;
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
width: 100%;
|
||||
height: calc(100% - 200px);
|
||||
&.info-table_height {
|
||||
height: calc(100% - 379px);
|
||||
}
|
||||
}
|
||||
width: 800px;
|
||||
padding-top: 8px;
|
||||
|
||||
@@ -1277,6 +1223,47 @@ defineExpose({
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.table-select_mode {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #f5f6f7;
|
||||
padding: 16px;
|
||||
.btn-select {
|
||||
width: 164px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #ffffff;
|
||||
border: 1px solid #bbbfc4;
|
||||
border-radius: 4px;
|
||||
|
||||
.is-active {
|
||||
background: var(--ed-color-primary-1a, rgba(51, 112, 255, 0.1));
|
||||
}
|
||||
|
||||
.ed-button:not(.is-active) {
|
||||
color: #1f2329;
|
||||
}
|
||||
.ed-button.is-text {
|
||||
height: 24px;
|
||||
width: 74px;
|
||||
line-height: 24px;
|
||||
}
|
||||
.ed-button + .ed-button {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.detail-operate {
|
||||
height: 56px;
|
||||
padding: 16px 24px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid rgba(31, 35, 41, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
.api-card-content {
|
||||
|
||||
@@ -323,11 +323,7 @@ const handleShowFinishPage = ({ id, name, pid }) => {
|
||||
emitter.on('showFinishPage', handleShowFinishPage)
|
||||
|
||||
const prev = () => {
|
||||
if (
|
||||
((currentDsType.value.includes('API') || currentDsType.value === 'ExcelRemote') &&
|
||||
activeApiStep.value === 1) ||
|
||||
activeStep.value === 1
|
||||
) {
|
||||
if (activeApiStep.value === 1) {
|
||||
ElMessageBox.confirm(t('data_source.the_previous_step'), {
|
||||
confirmButtonType: 'primary',
|
||||
type: 'warning',
|
||||
|
||||
Reference in New Issue
Block a user