diff --git a/backend/src/main/java/io/dataease/datasource/dto/JdbcDTO.java b/backend/src/main/java/io/dataease/datasource/dto/JdbcDTO.java index e22657cdf0..a854397b4b 100644 --- a/backend/src/main/java/io/dataease/datasource/dto/JdbcDTO.java +++ b/backend/src/main/java/io/dataease/datasource/dto/JdbcDTO.java @@ -14,4 +14,12 @@ public class JdbcDTO { private String dataBase; private String schema; private String dataSourceType = "jdbc"; + + private int initialPoolSize = 5; + private int minPoolSize = 5; + private int maxPoolSize = 50; + private int maxIdleTime = 30; + private int acquireIncrement = 5; + private int idleConnectionTestPeriod = 5; + private int connectTimeout = 5; } diff --git a/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java b/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java index e53caacbc9..5918a7f361 100644 --- a/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java +++ b/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java @@ -373,12 +373,12 @@ public class JdbcProvider extends DatasourceProvider { private void addToPool(DatasourceRequest datasourceRequest) throws PropertyVetoException { ComboPooledDataSource dataSource; dataSource = new ComboPooledDataSource(); - setCredential(datasourceRequest, dataSource); - dataSource.setMaxIdleTime(30); // 最大空闲时间 - dataSource.setAcquireIncrement(5);// 增长数 - dataSource.setInitialPoolSize(initPoolSize);// 初始连接数 - dataSource.setMinPoolSize(initPoolSize); // 最小连接数 - dataSource.setMaxPoolSize(maxConnections); // 最大连接数 + JdbcDTO jdbcDTO = setCredential(datasourceRequest, dataSource); + dataSource.setMaxIdleTime(jdbcDTO.getMaxIdleTime()); // 最大空闲时间 + dataSource.setAcquireIncrement(jdbcDTO.getAcquireIncrement());// 增长数 + dataSource.setInitialPoolSize(jdbcDTO.getInitialPoolSize());// 初始连接数 + dataSource.setMinPoolSize(jdbcDTO.getMinPoolSize()); // 最小连接数 + dataSource.setMaxPoolSize(jdbcDTO.getMaxPoolSize()); // 最大连接数 dataSource.setAcquireRetryAttempts(30);// 获取连接重试次数 dataSource.setIdleConnectionTestPeriod(60); // 每60s检查数据库空闲连接 dataSource.setMaxStatements(0); // c3p0全局的PreparedStatements缓存的大小 @@ -449,8 +449,9 @@ public class JdbcProvider extends DatasourceProvider { } - private void setCredential(DatasourceRequest datasourceRequest, ComboPooledDataSource dataSource) throws PropertyVetoException { + private JdbcDTO setCredential(DatasourceRequest datasourceRequest, ComboPooledDataSource dataSource) throws PropertyVetoException { DatasourceTypes datasourceType = DatasourceTypes.valueOf(datasourceRequest.getDatasource().getType()); + JdbcDTO jdbcDTO = new JdbcDTO(); switch (datasourceType) { case mysql: MysqlConfigration mysqlConfigration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), MysqlConfigration.class); @@ -458,6 +459,7 @@ public class JdbcProvider extends DatasourceProvider { dataSource.setDriverClass(mysqlConfigration.getDriver()); dataSource.setPassword(mysqlConfigration.getPassword()); dataSource.setJdbcUrl(mysqlConfigration.getJdbc()); + jdbcDTO = mysqlConfigration; break; case doris: MysqlConfigration dorisConfigration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), MysqlConfigration.class); @@ -465,6 +467,7 @@ public class JdbcProvider extends DatasourceProvider { dataSource.setDriverClass(dorisConfigration.getDriver()); dataSource.setPassword(dorisConfigration.getPassword()); dataSource.setJdbcUrl(dorisConfigration.getJdbc()); + jdbcDTO = dorisConfigration; break; case sqlServer: SqlServerConfigration sqlServerConfigration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), SqlServerConfigration.class); @@ -472,6 +475,7 @@ public class JdbcProvider extends DatasourceProvider { dataSource.setDriverClass(sqlServerConfigration.getDriver()); dataSource.setPassword(sqlServerConfigration.getPassword()); dataSource.setJdbcUrl(sqlServerConfigration.getJdbc()); + jdbcDTO = sqlServerConfigration; break; case oracle: OracleConfigration oracleConfigration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), OracleConfigration.class); @@ -479,6 +483,7 @@ public class JdbcProvider extends DatasourceProvider { dataSource.setDriverClass(oracleConfigration.getDriver()); dataSource.setPassword(oracleConfigration.getPassword()); dataSource.setJdbcUrl(oracleConfigration.getJdbc()); + jdbcDTO = oracleConfigration; break; case pg: PgConfigration pgConfigration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), PgConfigration.class); @@ -486,10 +491,12 @@ public class JdbcProvider extends DatasourceProvider { dataSource.setDriverClass(pgConfigration.getDriver()); dataSource.setPassword(pgConfigration.getPassword()); dataSource.setJdbcUrl(pgConfigration.getJdbc()); + jdbcDTO = pgConfigration; break; default: break; } + return jdbcDTO; } private String getDatabase(DatasourceRequest datasourceRequest) { diff --git a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java index 8500c1d245..4f78726e6f 100644 --- a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java +++ b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java @@ -28,6 +28,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import javax.xml.crypto.Data; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -77,7 +78,11 @@ public class DatasourceService { public List getDatasourceList(DatasourceUnionRequest request) throws Exception { request.setSort("update_time desc"); - return extDataSourceMapper.queryUnion(request); + List datasourceDTOS = extDataSourceMapper.queryUnion(request); + datasourceDTOS.forEach(datasourceDTO -> { + datasourceDTO.getType(); + }); + return datasourceDTOS; } public List gridQuery(BaseGridRequest request) { diff --git a/backend/src/main/java/io/dataease/dto/dataset/ExcelFileData.java b/backend/src/main/java/io/dataease/dto/dataset/ExcelFileData.java index 7259dd55be..31119400a2 100644 --- a/backend/src/main/java/io/dataease/dto/dataset/ExcelFileData.java +++ b/backend/src/main/java/io/dataease/dto/dataset/ExcelFileData.java @@ -1,10 +1,8 @@ package io.dataease.dto.dataset; -import io.dataease.datasource.dto.TableFiled; import lombok.Data; import java.util.List; -import java.util.Map; @Data public class ExcelFileData { diff --git a/backend/src/main/java/io/dataease/job/sechedule/Schedular.java b/backend/src/main/java/io/dataease/job/sechedule/Schedular.java new file mode 100644 index 0000000000..54e2efe260 --- /dev/null +++ b/backend/src/main/java/io/dataease/job/sechedule/Schedular.java @@ -0,0 +1,19 @@ +package io.dataease.job.sechedule; + +import com.fit2cloud.quartz.anno.QuartzScheduled; +import io.dataease.service.dataset.DataSetTableService; + +public class Schedular { + private DataSetTableService dataSetTableService; + + @QuartzScheduled(cron = "0 0/3 * * * ?") + public void updateDatasetTableStatus() { + dataSetTableService.updateDatasetTableStatus(); + } + + @QuartzScheduled(cron = "0 0/30 * * * ?") + public void updateDatasourceStatus() { + dataSetTableService.updateDatasetTableStatus(); + } + +} diff --git a/backend/src/main/resources/db/migration/V23__datasource_status.sql b/backend/src/main/resources/db/migration/V23__datasource_status.sql new file mode 100644 index 0000000000..c479cbc83d --- /dev/null +++ b/backend/src/main/resources/db/migration/V23__datasource_status.sql @@ -0,0 +1 @@ +ALTER TABLE `datasource` ADD COLUMN `status` VARCHAR(45) NULL COMMENT '状态' AFTER `create_by`; diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue index b47cb117ca..300e8c53c3 100644 --- a/frontend/src/components/DeDrag/index.vue +++ b/frontend/src/components/DeDrag/index.vue @@ -629,7 +629,7 @@ export default { elementMouseDown(e) { // private 设置当前组件数据及状态 this.$store.commit('setClickComponentStatus', true) - if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-number-range') { + if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-select-grid' && this.element.component !== 'de-number-range') { e.preventDefault() } // 阻止冒泡事件 diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index 88216e9e1a..b789d127d8 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -104,7 +104,7 @@ export default { elementMouseDown(e) { // private 设置当前组件数据及状态 this.$store.commit('setClickComponentStatus', true) - if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-number-range') { + if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-select-grid' && this.config.component !== 'de-number-range') { e.preventDefault() } // 阻止冒泡事件 diff --git a/frontend/src/components/canvas/components/Editor/Shape.vue b/frontend/src/components/canvas/components/Editor/Shape.vue index b0475bd00d..b4c0e74bbf 100644 --- a/frontend/src/components/canvas/components/Editor/Shape.vue +++ b/frontend/src/components/canvas/components/Editor/Shape.vue @@ -226,7 +226,7 @@ export default { handleMouseDownOnShape(e) { this.$store.commit('setClickComponentStatus', true) - if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-number-range') { + if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-select-grid' && this.element.component !== 'de-number-range') { e.preventDefault() } diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 939be53126..c978f9e800 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -296,6 +296,8 @@ export default { this.drillClickDimensionList = [] if (this.chart.type === 'map') { this.backToParent(0, length) + const current = this.$refs[this.element.propValue.id] + current && current.registerDynamicMap && current.registerDynamicMap(null) } }, diff --git a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue index c50648ee74..ccf8d14349 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue @@ -4,14 +4,13 @@ -
+
@@ -71,7 +70,7 @@ export default { label: 'text', children: 'children' }, - keyWord: null, + keyWord: '', allNode: { id: (-2 << 16) + '', text: this.$t('commons.all'), @@ -107,10 +106,11 @@ export default { sourceValid && Array.isArray(sourceValue) && (this.options.value = sourceValue[0]) !this.inDraw && (this.options.value = null) } - }, - keyWord(val) { - this.$refs.deSelectGrid.filter(val) } + // keyWord(val) { + // console.log(val) + // this.$refs.deSelectGrid.filter(val) + // } }, created() { this.options = this.element.options @@ -206,10 +206,10 @@ export default { this.options.value = null this.changeRadioBox() }, - filterNode(value, data) { - if (!value) return true - return data[this.defaultProp.label].indexOf(value) !== -1 - }, + // filterNode(value, data) { + // if (!value) return true + // return data[this.defaultProp.label].indexOf(value) !== -1 + // }, styleChange() { this.$store.state.styleChangeTimes++ } @@ -246,4 +246,13 @@ export default { border-radius: 0px; } } +.de-select-grid-class { + .list { + overflow-y: auto; + width: 100%; + position: absolute; + top: 30px; + bottom: 0; + } +} diff --git a/frontend/src/icons/svg/exclamationmark.svg b/frontend/src/icons/svg/exclamationmark.svg new file mode 100644 index 0000000000..612b62011a --- /dev/null +++ b/frontend/src/icons/svg/exclamationmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 4d44955432..033b0da0bf 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -840,7 +840,9 @@ export default { bubble_symbol: 'Shape', gap_width: 'Gap Width', width: 'Width', - height: 'Height' + height: 'Height', + system_case: 'System', + custom_case: 'Custom' }, dataset: { sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default', @@ -1044,7 +1046,21 @@ export default { get_schema: 'Get Schema', schema: 'Database Schema', please_choose_schema: 'Please select Schema', - in_valid: 'Invalid datasource' + in_valid: 'Invalid datasource', + initial_pool_size: 'Initial connections', + min_pool_size: 'Minimum of connections', + max_pool_size: 'Maximum connection', + max_idle_time: 'Maximum idle (seconds)', + acquire_increment: 'Growth number', + connect_timeout: 'Connection timeout (seconds)', + please_input_initial_pool_size: 'Please enter the number of initial connections', + please_input_min_pool_size: 'Please enter the minimum number of connections', + please_input_max_pool_size: 'Please enter the maximum number of connections', + please_input_max_idle_time: 'Please enter the maximum idle (seconds)', + please_input_acquire_increment: 'Please enter the growth number', + please_input_connect_timeout: 'Please enter the connection timeout (seconds)', + no_less_then_0: 'Parameters in advanced settings cannot be less than zero', + priority: 'Advanced setting' }, pblink: { key_pwd: 'Please enter the password to open the link', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index de5f09c092..a973e69f36 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -840,7 +840,9 @@ export default { bubble_symbol: '圖形', gap_width: '間隔', width: '寬度', - height: '高度' + height: '高度', + system_case: '系統方案', + custom_case: '自定義' }, dataset: { sheet_warn: '有多個sheet頁面,默認抽取第一個', @@ -1044,7 +1046,21 @@ export default { get_schema: '獲取 Schema', schema: '數據庫 Schema', please_choose_schema: '請選擇數據庫 Schema', - in_valid: '無效數據源' + in_valid: '無效數據源', + initial_pool_size: '初始連結數', + min_pool_size: '最小連結數', + max_pool_size: '最大連結數', + max_idle_time: '最大空閒(秒)', + acquire_increment: '增長數', + connect_timeout: '連接超時(秒)', + please_input_initial_pool_size: '請輸入初始連結數', + please_input_min_pool_size: '請輸入最小連結數', + please_input_max_pool_size: '請輸入最大連結數', + please_input_max_idle_time: '請輸入最大空閒(秒)', + please_input_acquire_increment: '請輸入增長數', + please_input_connect_timeout: '請輸入連接超時(秒)', + no_less_then_0: '高級設置中的參數不能小於零', + priority: '高級設置' }, pblink: { key_pwd: '請輸入密碼打開鏈接', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 555aaad834..285de2d1d8 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -840,7 +840,9 @@ export default { bubble_symbol: '图形', gap_width: '间隔', width: '宽度', - height: '高度' + height: '高度', + system_case: '系统方案', + custom_case: '自定义' }, dataset: { sheet_warn: '有多个 Sheet 页,默认抽取第一个', @@ -1046,7 +1048,21 @@ export default { schema: '数据库 Schema', please_choose_schema: '请选择数据库 Schema', edit_datasource_msg: '修改数据源信息,可能会导致改数据源下的数据集不可用,确认修改?', - in_valid: '无效数据源' + in_valid: '无效数据源', + initial_pool_size: '初始连接数', + min_pool_size: '最小连接数', + max_pool_size: '最大连接数', + max_idle_time: '最大空闲(秒)', + acquire_increment: '增长数', + connect_timeout: '连接超时(秒)', + please_input_initial_pool_size: '请输入初始连接数', + please_input_min_pool_size: '请输入最小连接数', + please_input_max_pool_size: '请输入最大连接数', + please_input_max_idle_time: '请输入最大空闲(秒)', + please_input_acquire_increment: '请输入增长数', + please_input_connect_timeout: '请输入连接超时(秒)', + no_less_then_0: '高级设置中的参数不能小于零', + priority: '高级设置' }, pblink: { key_pwd: '请输入密码打开链接', diff --git a/frontend/src/styles/deicon/demo.css b/frontend/src/styles/deicon/demo.css index a67054a0a0..127f5c8dab 100644 --- a/frontend/src/styles/deicon/demo.css +++ b/frontend/src/styles/deicon/demo.css @@ -215,35 +215,35 @@ margin: 1em 0; } -.markdown>p, -.markdown>blockquote, -.markdown>.highlight, -.markdown>ol, -.markdown>ul { +.markdown >p, +.markdown >blockquote, +.markdown >.highlight, +.markdown >ol, +.markdown >ul { width: 80%; } -.markdown ul>li { +.markdown ul >li { list-style: circle; } -.markdown>ul li, -.markdown blockquote ul>li { +.markdown >ul li, +.markdown blockquote ul >li { margin-left: 20px; padding-left: 4px; } -.markdown>ul li p, -.markdown>ol li p { +.markdown >ul li p, +.markdown >ol li p { margin: 0.6em 0; } -.markdown ol>li { +.markdown ol >li { list-style: decimal; } -.markdown>ol li, -.markdown blockquote ol>li { +.markdown >ol li, +.markdown blockquote ol >li { margin-left: 20px; padding-left: 4px; } @@ -260,7 +260,7 @@ font-weight: 600; } -.markdown>table { +.markdown >table { border-collapse: collapse; border-spacing: 0px; empty-cells: show; @@ -269,14 +269,14 @@ margin-bottom: 24px; } -.markdown>table th { +.markdown >table th { white-space: nowrap; color: #333; font-weight: 600; } -.markdown>table th, -.markdown>table td { +.markdown >table th, +.markdown >table td { border: 1px solid #e9e9e9; padding: 8px 16px; text-align: left; diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 424329d78f..c9ac0ad0dd 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -235,6 +235,15 @@ div:focus { div.el-input-group__append { width: 10% !important; } + .de-select-grid-class { + .list { + position: relative !important; + height: 200px !important; + overflow-y: scroll !important; + top: 0px !important; + } + } + } %field-icon { diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue index 8a78a069d7..9368cb3129 100644 --- a/frontend/src/views/chart/components/ChartComponent.vue +++ b/frontend/src/views/chart/components/ChartComponent.vue @@ -48,7 +48,6 @@ export default { return { myChart: {}, chartId: uuid.v1(), - currentGeoJson: null, showTrackBar: true, trackBarStyle: { position: 'absolute', @@ -57,7 +56,7 @@ export default { }, pointParam: null, - downOrUp: false + dynamicAreaCode: null } }, @@ -144,52 +143,50 @@ export default { if (chart.type === 'map') { const customAttr = JSON.parse(chart.customAttr) if (!customAttr.areaCode) return - - if (this.$store.getters.geoMap[customAttr.areaCode]) { - const json = this.$store.getters.geoMap[customAttr.areaCode] + const cCode = this.dynamicAreaCode || customAttr.areaCode + if (this.$store.getters.geoMap[cCode]) { + const json = this.$store.getters.geoMap[cCode] this.initMapChart(json, chart) return } - geoJson(customAttr.areaCode).then(res => { - this.initMapChart(res, chart) - + geoJson(cCode).then(res => { this.$store.dispatch('map/setGeo', { - key: customAttr.areaCode, + key: cCode, value: res - // value: res.data + }).then(() => { + this.initMapChart(res, chart) }) - this.currentGeoJson = res }) return } this.myEcharts(chart_option) }, registerDynamicMap(areaCode) { - this.downOrUp = true - if (this.$store.getters.geoMap[areaCode]) { - const json = this.$store.getters.geoMap[areaCode] - this.$echarts.registerMap('MAP', json) - console.log('开始切换地图:' + areaCode) - return - } - geoJson(areaCode).then(res => { - this.$echarts.registerMap('MAP', res) - console.log('开始切换地图:' + areaCode) - this.$store.dispatch('map/setGeo', { - key: areaCode, - value: res - }) - }).catch(() => { - this.downOrUp = true - }) + this.dynamicAreaCode = areaCode + // if (this.$store.getters.geoMap[areaCode]) { + // const json = this.$store.getters.geoMap[areaCode] + // this.myChart.dispose() + // this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId)) + // this.$echarts.registerMap('MAP', json) + // return + // } + // geoJson(areaCode).then(res => { + // this.$store.dispatch('map/setGeo', { + // key: areaCode, + // value: res + // }).then(() => { + // this.myChart.dispose() + // this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId)) + // this.$echarts.registerMap('MAP', res) + // }) + // }).catch(() => { + // this.downOrUp = true + // }) }, initMapChart(geoJson, chart) { - if (!this.$echarts.getMap('MAP') || !this.downOrUp) { - console.log('开始初始化地图:') - this.$echarts.registerMap('MAP', geoJson) - } + this.$echarts.registerMap('MAP', geoJson) // this.$echarts.getMap('MAP') || this.$echarts.registerMap('MAP', geoJson) const base_json = JSON.parse(JSON.stringify(BASE_MAP)) const chart_option = baseMapOption(base_json, chart) diff --git a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue index f397633982..7ea65b4b82 100644 --- a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue @@ -4,14 +4,46 @@
- - -
- + +
+
+ {{ $t('chart.system_case') }} + + +
+ +
+ {{ option.name }} +
+
+ {{ $t('commons.reset') }}
- {{ option.name }} - - +
+ {{ $t('chart.custom_case') }} + + + + + + + +
+
+ + + + +
+
+
+ +
+
@@ -149,12 +181,16 @@ export default { colors: ['#00a3af', '#4da798', '#57baaa', '#62d0bd', '#6ee4d0', '#86e7d6', '#aeede1', '#bde1e6', '#e5e5e5'] } ], - colorForm: JSON.parse(JSON.stringify(DEFAULT_COLOR_CASE)) + colorForm: JSON.parse(JSON.stringify(DEFAULT_COLOR_CASE)), + customColor: null, + colorIndex: 0 } }, watch: { 'chart': { handler: function() { + this.customColor = null + this.colorIndex = 0 this.init() } } @@ -172,6 +208,8 @@ export default { val.value = items[0].value val.colors = items[0].colors this.$emit('onColorChange', val) + this.customColor = null + this.colorIndex = 0 }, init() { const chart = JSON.parse(JSON.stringify(this.chart)) @@ -184,8 +222,26 @@ export default { } if (customAttr.color) { this.colorForm = customAttr.color + if (!this.customColor) { + this.customColor = this.colorForm.colors[0] + this.colorIndex = 0 + } } } + }, + + switchColor(index) { + this.colorIndex = index + }, + switchColorCase() { + this.colorForm.colors[this.colorIndex] = this.customColor + this.$emit('onColorChange', this.colorForm) + }, + + resetCustomColor() { + this.customColor = this.colorForm.colors[0] + this.colorIndex = 0 + this.changeColorCase() } } } @@ -220,4 +276,22 @@ export default { cursor: pointer; z-index: 1003; } + .color-label{ + display: inline-block; + width: 60px; + } + + .color-type>>>.el-radio__input{ + display: none; + } + .el-radio{ + margin:0 2px 0 0!important; + } + .el-radio>>>.el-radio__label{ + padding-left: 0; + } + + .el-radio.is-checked{ + border: 1px solid #0a7be0; + } diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 532e947917..387e47457d 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1425,6 +1425,7 @@ export default { if (this.chart.type === 'map') { this.backToParent(0, length) this.currentAcreaNode = null + this.$refs.dynamicChart && this.$refs.dynamicChart.registerDynamicMap && this.$refs.dynamicChart.registerDynamicMap(null) } }, drillJump(index) { diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 5149e7ab18..729d4f6f62 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -116,7 +116,7 @@ diff --git a/frontend/src/views/panel/filter/filterDialog.vue b/frontend/src/views/panel/filter/filterDialog.vue index c655a042b1..af9c4f8d90 100644 --- a/frontend/src/views/panel/filter/filterDialog.vue +++ b/frontend/src/views/panel/filter/filterDialog.vue @@ -39,8 +39,18 @@ @node-click="handleNodeClick" >
- - {{ node.label }} + + + + + + + + +
{{ node.label }}
+ {{ node.label }} +
+
diff --git a/frontend/src/views/system/datasource/form.vue b/frontend/src/views/system/datasource/form.vue index 1916bbe5a5..20576c9bbc 100644 --- a/frontend/src/views/system/datasource/form.vue +++ b/frontend/src/views/system/datasource/form.vue @@ -11,8 +11,7 @@
- - + @@ -62,7 +61,30 @@ /> + + + + + + + + + + + + + + + + + + + + + + +