forked from github/dataease
<proxy>
<id>optional</id> <active>true</active> <protocol>http</protocol> <username></username> <password></password> <host>127.0.0.1</host> <port>7890</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy> Merge branch 'main' of github.com:dataease/dataease into main
This commit is contained in:
commit
7e40ea46dd
@ -88,6 +88,9 @@ public class ChartViewService {
|
||||
|
||||
public ChartViewDTO getData(String id, ChartExtRequest requestList) throws Exception {
|
||||
ChartViewWithBLOBs view = chartViewMapper.selectByPrimaryKey(id);
|
||||
if (ObjectUtils.isEmpty(view)) {
|
||||
throw new RuntimeException(Translator.get("i18n_chart_delete"));
|
||||
}
|
||||
List<ChartViewFieldDTO> xAxis = new Gson().fromJson(view.getXAxis(), new TypeToken<List<ChartViewFieldDTO>>() {
|
||||
}.getType());
|
||||
List<ChartViewFieldDTO> yAxis = new Gson().fromJson(view.getYAxis(), new TypeToken<List<ChartViewFieldDTO>>() {
|
||||
@ -122,10 +125,16 @@ public class ChartViewService {
|
||||
|
||||
// 获取数据集
|
||||
DatasetTable table = dataSetTableService.get(view.getTableId());
|
||||
if (ObjectUtils.isEmpty(table)) {
|
||||
throw new RuntimeException(Translator.get("i18n_dataset_delete"));
|
||||
}
|
||||
// 判断连接方式,直连或者定时抽取 table.mode
|
||||
List<String[]> data = new ArrayList<>();
|
||||
if (table.getMode() == 0) {// 直连
|
||||
Datasource ds = datasourceService.get(table.getDataSourceId());
|
||||
if (ObjectUtils.isEmpty(ds)) {
|
||||
throw new RuntimeException(Translator.get("i18n_datasource_delete"));
|
||||
}
|
||||
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(ds.getType());
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(ds);
|
||||
|
@ -238,6 +238,9 @@ public class DataSetTableService {
|
||||
}
|
||||
if (StringUtils.equalsIgnoreCase(datasetTable.getType(), "db")) {
|
||||
Datasource ds = datasourceMapper.selectByPrimaryKey(dataSetTableRequest.getDataSourceId());
|
||||
if (ObjectUtils.isEmpty(ds)) {
|
||||
throw new RuntimeException(Translator.get("i18n_datasource_delete"));
|
||||
}
|
||||
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(ds.getType());
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(ds);
|
||||
@ -258,6 +261,9 @@ public class DataSetTableService {
|
||||
}
|
||||
} else if (StringUtils.equalsIgnoreCase(datasetTable.getType(), "sql")) {
|
||||
Datasource ds = datasourceMapper.selectByPrimaryKey(dataSetTableRequest.getDataSourceId());
|
||||
if (ObjectUtils.isEmpty(ds)) {
|
||||
throw new RuntimeException(Translator.get("i18n_datasource_delete"));
|
||||
}
|
||||
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(ds.getType());
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(ds);
|
||||
|
@ -312,23 +312,23 @@ CREATE TABLE `panel_design` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='仪表板和组件的关联关系 组件分为普通视图和系统组件';
|
||||
|
||||
DROP TABLE IF EXISTS `panel_group`;
|
||||
CREATE TABLE `panel_group` (
|
||||
`id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父级id',
|
||||
`level` int(10) NULL DEFAULT NULL COMMENT '层级',
|
||||
`node_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` bigint(13) NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`panel_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '仪表板类型 system 系统内置 self 用户自建 ',
|
||||
`panel_style` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'panel 样式',
|
||||
`panel_data` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'panel 数据',
|
||||
`source` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据来源 导入 或者 其他仪表板另存',
|
||||
`extend1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`extend2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
CREATE TABLE `panel_group` (
|
||||
`id` varchar(50) NOT NULL,
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) DEFAULT NULL COMMENT '父级id',
|
||||
`level` int(10) DEFAULT NULL COMMENT '层级',
|
||||
`node_type` varchar(255) DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` bigint(13) DEFAULT NULL COMMENT '创建时间',
|
||||
`panel_type` varchar(255) NOT NULL COMMENT '仪表板类型 system 系统内置 self 用户自建 ',
|
||||
`panel_style` longtext NOT NULL COMMENT 'panel 样式',
|
||||
`panel_data` longtext COMMENT 'panel 数据',
|
||||
`source` varchar(255) DEFAULT NULL COMMENT '数据来源 导入 或者 其他仪表板另存',
|
||||
`extend1` varchar(255) DEFAULT NULL,
|
||||
`extend2` varchar(255) DEFAULT NULL,
|
||||
`remark` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_view`;
|
||||
|
File diff suppressed because one or more lines are too long
@ -249,3 +249,6 @@ i18n_sql_not_empty=SQL can not be empty.
|
||||
i18n_datasource_not_allow_delete_msg= datasets are using this data source and cannot be deleted
|
||||
i18n_task_name_repeat=Name is used in same data set
|
||||
i18n_id_or_pwd_error=Invalid ID or password
|
||||
i18n_datasource_delete=Data source is delete
|
||||
i18n_dataset_delete=Data set is delete
|
||||
i18n_chart_delete=Chart is delete
|
||||
|
@ -159,7 +159,6 @@ quota_duration_excess_organization=压测时长超过组织限额
|
||||
import_xmind_count_error=思维导图导入用例数量不能超过 500 条
|
||||
license_valid_license_error=授权认证失败
|
||||
import_xmind_not_found=未找到测试用例
|
||||
|
||||
test_review_task_notice=测试评审任务通知
|
||||
test_track.length_less_than=标题过长,字数必须小于
|
||||
# check owner
|
||||
@ -185,7 +184,6 @@ automation_exec_info=没有测试步骤,无法执行
|
||||
authsource_name_already_exists=认证源名称已经存在
|
||||
authsource_name_is_null=认证源名称不能为空
|
||||
authsource_configuration_is_null=认证源配置不能为空
|
||||
|
||||
个人信息=个人信息
|
||||
仪表板=仪表板
|
||||
修改密码=修改密码
|
||||
@ -251,3 +249,6 @@ i18n_sql_not_empty=SQL 不能为空
|
||||
i18n_datasource_not_allow_delete_msg= 个数据集正在使用此数据源,无法删除
|
||||
i18n_task_name_repeat=同一数据集下任务名称已被使用
|
||||
i18n_id_or_pwd_error=无效的ID或密码
|
||||
i18n_datasource_delete=当前用到的数据源已被删除
|
||||
i18n_dataset_delete=当前用到的数据集已被删除
|
||||
i18n_chart_delete=当前用到的视图已被删除
|
||||
|
@ -251,3 +251,6 @@ i18n_sql_not_empty=SQL 不能為空
|
||||
i18n_datasource_not_allow_delete_msg= 個數據集正在使用此數據源,無法刪除
|
||||
i18n_task_name_repeat=同一數據集下任務名稱已被使用
|
||||
i18n_id_or_pwd_error=無效的ID或密碼
|
||||
i18n_datasource_delete=當前用到的數據源已被刪除
|
||||
i18n_dataset_delete=當前用到的數據集已被刪除
|
||||
i18n_chart_delete=當前用到的視圖已被刪除
|
||||
|
@ -89,6 +89,7 @@ export default {
|
||||
if (this.curComponent) {
|
||||
this.cursors = this.getCursor() // 根据旋转角度获取光标位置
|
||||
}
|
||||
this.element.type === 'custom' && (this.pointList = ['l', 'r'])
|
||||
|
||||
eventBus.$on('runAnimation', () => {
|
||||
if (this.element === this.curComponent) {
|
||||
@ -221,7 +222,7 @@ export default {
|
||||
|
||||
handleMouseDownOnShape(e) {
|
||||
this.$store.commit('setClickComponentStatus', true)
|
||||
if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape') {
|
||||
if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search') {
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ import { mapState } from 'vuex'
|
||||
import { commonStyle, commonAttr } from '@/components/canvas/custom-component/component-list'
|
||||
import eventBus from '@/components/canvas/utils/eventBus'
|
||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||
import { post } from '@/api/panel/panel'
|
||||
import { panelSave } from '@/api/panel/panel'
|
||||
import bus from '@/utils/bus'
|
||||
import {
|
||||
DEFAULT_COMMON_CANVAS_STYLE
|
||||
@ -233,8 +233,13 @@ export default {
|
||||
panelStyle: JSON.stringify(this.canvasStyleData),
|
||||
panelData: JSON.stringify(this.componentData)
|
||||
}
|
||||
post('panel/group/save', requestInfo, () => {})
|
||||
this.$message.success('保存成功')
|
||||
panelSave(requestInfo).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('commons.save_success'),
|
||||
type: 'success',
|
||||
showClose: true
|
||||
})
|
||||
})
|
||||
},
|
||||
clearCanvas() {
|
||||
this.$store.commit('setComponentData', [])
|
||||
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div v-loading="requestStatus==='waiting'" class="rect-shape">
|
||||
<div v-if="requestStatus==='error'" style=";width: 100%;height: 100%;background-color: #ece7e7; text-align: center">
|
||||
<div style="font-size: 12px; color: #9ea6b2;">
|
||||
{{ $t('panel.error_data') }}<br>
|
||||
{{ message }}
|
||||
<div v-if="requestStatus==='error'" class="chart-error-class">
|
||||
<div style="font-size: 12px; color: #9ea6b2;height: 100%;display: flex;align-items: center;justify-content: center;">
|
||||
{{ message.response.data.message }},{{ $t('chart.chart_show_error') }}
|
||||
<br>
|
||||
{{ $t('chart.chart_error_tips') }}
|
||||
</div>
|
||||
</div>
|
||||
<chart-component v-if="requestStatus==='success'&&chart.type && !chart.type.includes('table') && !chart.type.includes('text')" :ref="element.propValue.id" class="chart-class" :chart="chart" />
|
||||
@ -189,4 +190,12 @@ export default {
|
||||
.table-class{
|
||||
height: 100%;
|
||||
}
|
||||
.chart-error-class{
|
||||
text-align: center;
|
||||
height: calc(100% - 84px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #ece7e7;
|
||||
}
|
||||
</style>
|
||||
|
@ -130,7 +130,7 @@ export function changeStyleWithScale(value) {
|
||||
export function changeStyleWithScaleHeightInAuto(value) {
|
||||
const scale = store.state.canvasStyleData.scaleHeight ? store.state.canvasStyleData.scaleHeight : 100
|
||||
const result = value * scale / 100
|
||||
console.log('heightInAuto=>' + scale + ';' + result)
|
||||
// console.log('heightInAuto=>' + scale + ';' + result)
|
||||
return result
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ export function changeStyleWithScaleHeightInAuto(value) {
|
||||
export function changeStyleWithScaleWidthInAuto(value) {
|
||||
const scale = store.state.canvasStyleData.scaleWidth ? store.state.canvasStyleData.scaleWidth : 100
|
||||
const result = value * scale / 100
|
||||
console.log('widthInAuto=>' + scale + ';' + result)
|
||||
// console.log('widthInAuto=>' + scale + ';' + result)
|
||||
return result
|
||||
}
|
||||
|
||||
|
@ -3,9 +3,10 @@
|
||||
<el-input
|
||||
v-if="options!== null && options.attrs!==null"
|
||||
v-model="options.value"
|
||||
style="width: 260px"
|
||||
resize="vertical"
|
||||
:placeholder="options.attrs.placeholder"
|
||||
@keyup.enter.native="search"
|
||||
@dblclick="setEdit"
|
||||
>
|
||||
|
||||
<el-button slot="append" icon="el-icon-search" @click="search" />
|
||||
@ -30,7 +31,8 @@ export default {
|
||||
return {
|
||||
options: null,
|
||||
operator: 'like',
|
||||
values: null
|
||||
values: null,
|
||||
canEdit: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -48,6 +50,9 @@ export default {
|
||||
operator: this.operator
|
||||
}
|
||||
this.inDraw && this.$store.dispatch('conditions/add', param)
|
||||
},
|
||||
setEdit() {
|
||||
this.canEdit = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ const drawPanel = {
|
||||
type: 'custom',
|
||||
style: {
|
||||
width: 300,
|
||||
height: 47,
|
||||
height: 45.5,
|
||||
fontSize: 14,
|
||||
fontWeight: 500,
|
||||
lineHeight: '',
|
||||
|
@ -713,7 +713,9 @@ export default {
|
||||
y_M_d_H_m_s: 'Year Month Day Hour Minute Second',
|
||||
date_sub: 'yyyy-MM-dd',
|
||||
date_split: 'yyyy/MM/dd',
|
||||
chartName: 'New Chart'
|
||||
chartName: 'New Chart',
|
||||
chart_show_error: 'can not show normal',
|
||||
chart_error_tips: 'Please contact admin '
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',
|
||||
|
@ -713,7 +713,9 @@ export default {
|
||||
y_M_d_H_m_s: '年月日時分秒',
|
||||
date_sub: 'yyyy-MM-dd',
|
||||
date_split: 'yyyy/MM/dd',
|
||||
chartName: '新建視圖'
|
||||
chartName: '新建視圖',
|
||||
chart_show_error: '無法正常顯示',
|
||||
chart_error_tips: '如有疑問請聯系管理員'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多個sheet頁面,默認抽取第一個',
|
||||
|
@ -713,7 +713,9 @@ export default {
|
||||
y_M_d_H_m_s: '年月日时分秒',
|
||||
date_sub: 'yyyy-MM-dd',
|
||||
date_split: 'yyyy/MM/dd',
|
||||
chartName: '新建视图'
|
||||
chartName: '新建视图',
|
||||
chart_show_error: '无法正常显示',
|
||||
chart_error_tips: '如有疑问请联系管理员'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多个Sheet页,默认抽取第一个',
|
||||
|
@ -72,7 +72,7 @@ const data = {
|
||||
},
|
||||
|
||||
setCurComponent(state, { component, index }) {
|
||||
console.log('curComponent' + JSON.stringify(component))
|
||||
// console.log('curComponent' + JSON.stringify(component))
|
||||
state.curComponent = component
|
||||
state.curComponentIndex = index
|
||||
},
|
||||
@ -87,7 +87,7 @@ const data = {
|
||||
if (width) curComponent.style.width = parseInt(canvasStyleData.selfAdaption ? (width * 100 / curCanvasScale.scaleWidth) : width)
|
||||
if (height) curComponent.style.height = parseInt(canvasStyleData.selfAdaption ? (height * 100 / curCanvasScale.scaleHeight) : height)
|
||||
if (rotate) curComponent.style.rotate = rotate
|
||||
console.log('setShapeStyle' + JSON.stringify(curComponent))
|
||||
// console.log('setShapeStyle' + JSON.stringify(curComponent))
|
||||
},
|
||||
|
||||
setShapeSingleStyle({ curComponent }, { key, value }) {
|
||||
|
@ -187,6 +187,9 @@ div:focus {
|
||||
|
||||
.custom-component-class {
|
||||
width: 100%;
|
||||
div.el-input-group__append {
|
||||
width: 10% !important;
|
||||
}
|
||||
div {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
@ -264,8 +264,9 @@
|
||||
<label-normal v-if="httpRequest.status && chart.type && chart.type.includes('text')" :chart="chart" class="table-class" />
|
||||
<div v-if="!httpRequest.status" class="chart-error-class">
|
||||
<div style="font-size: 12px; color: #9ea6b2;height: 100%;display: flex;align-items: center;justify-content: center;">
|
||||
{{ $t('panel.error_data') }}<br>
|
||||
{{ httpRequest.msg }}
|
||||
{{ httpRequest.msg }},{{ $t('chart.chart_show_error') }}
|
||||
<br>
|
||||
{{ $t('chart.chart_error_tips') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -464,8 +465,8 @@ export default {
|
||||
this.initTableField(id)
|
||||
}).catch(err => {
|
||||
this.resetView()
|
||||
this.httpRequest.status = false
|
||||
this.httpRequest.msg = err
|
||||
this.httpRequest.status = err.response.data.success
|
||||
this.httpRequest.msg = err.response.data.message
|
||||
return true
|
||||
})
|
||||
}
|
||||
@ -476,8 +477,8 @@ export default {
|
||||
this.quota = response.data.quota
|
||||
}).catch(err => {
|
||||
this.resetView()
|
||||
this.httpRequest.status = false
|
||||
this.httpRequest.msg = err
|
||||
this.httpRequest.status = err.response.data.success
|
||||
this.httpRequest.msg = err.response.data.message
|
||||
return true
|
||||
})
|
||||
},
|
||||
@ -643,8 +644,8 @@ export default {
|
||||
this.httpRequest.status = true
|
||||
}).catch(err => {
|
||||
this.resetView()
|
||||
this.httpRequest.status = false
|
||||
this.httpRequest.msg = err
|
||||
this.httpRequest.status = err.response.data.success
|
||||
this.httpRequest.msg = err.response.data.message
|
||||
return true
|
||||
})
|
||||
} else {
|
||||
@ -668,8 +669,8 @@ export default {
|
||||
this.httpRequest.status = true
|
||||
}).catch(err => {
|
||||
this.resetView()
|
||||
this.httpRequest.status = false
|
||||
this.httpRequest.msg = err
|
||||
this.httpRequest.status = err.response.data.success
|
||||
this.httpRequest.msg = err.response.data.message
|
||||
return true
|
||||
})
|
||||
} else {
|
||||
|
@ -118,6 +118,7 @@ export default {
|
||||
this.templateInfo.templateStyle = this.importTemplateInfo.panelStyle
|
||||
this.templateInfo.templateData = this.importTemplateInfo.panelData
|
||||
this.templateInfo.snapshot = this.importTemplateInfo.snapshot
|
||||
this.templateInfo.nodeType = 'template'
|
||||
}
|
||||
reader.readAsText(file)
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user