Merge remote-tracking branch 'origin/master'

main
liu.shiyi 2 years ago
commit ce98bddb4c

@ -8,9 +8,7 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
/** /**
* * @Author qianxing
*
* @Author maoshufeng
* @Date 2020-06-16 * @Date 2020-06-16
* @Version 1.0.0 * @Version 1.0.0
*/ */

@ -14,11 +14,17 @@ import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
/**
* Jackson
* @Author hongyang
* @Date 2022/06/19
* @Version 1.0.0
*/
@Slf4j @Slf4j
@Configuration @Configuration
@ConditionalOnMissingClass(value = "com.gccloud.dashboard.core.config.ObjectMapperConfiguration") @ConditionalOnMissingClass(value = "com.gccloud.dashboard.core.config.ObjectMapperConfiguration")
//@ConditionalOnProperty(prefix = "gc.starter.dataroom.component", name = "ObjectMapperConfiguration", havingValue = "ObjectMapperConfiguration", matchIfMissing = true) @ConditionalOnProperty(prefix = "gc.starter.dataroom.component", name = "ObjectMapperConfiguration", havingValue = "ObjectMapperConfiguration", matchIfMissing = true)
public class ObjectMapperConfiguration { public class DataRoomObjectMapperConfiguration {
@Resource @Resource
private ObjectMapper objectMapper; private ObjectMapper objectMapper;

@ -101,6 +101,14 @@ public class ScreenFlyMapChart extends Chart{
@ApiModelProperty(notes = "名称") @ApiModelProperty(notes = "名称")
private String name; private String name;
@ApiModelProperty(notes = "图形")
private List<String> graphic;
@ApiModelProperty(notes = "图形字体颜色")
private String fontGraphicColor;
@ApiModelProperty(notes = "图形字体大小")
private String fontSize;
} }
} }

@ -20,16 +20,6 @@
"to": "河北省", "to": "河北省",
"type": "move_in", "type": "move_in",
"value": 10 "value": 10
},
{
"from": "合肥",
"lat1": 32.0581,
"lat2": 25.9222,
"lng1": 117.29,
"lng2": 119.4543,
"to": "福州",
"type": "move_in",
"value": 50
} }
], ],
"columnData": { "columnData": {

@ -345,6 +345,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { displayOption } from 'data-room-ui/js/config'
import { pageMixins } from 'data-room-ui/js/mixins/page' import { pageMixins } from 'data-room-ui/js/mixins/page'
// import _ from 'lodash' // import _ from 'lodash'
import isEmpty from 'lodash/isEmpty' import isEmpty from 'lodash/isEmpty'
@ -425,14 +426,22 @@ export default {
} }
this.$emit('setRemoteComponent', this.focus) this.$emit('setRemoteComponent', this.focus)
} if (['bizComponent'].includes(this.activeName)) { } if (['bizComponent'].includes(this.activeName)) {
let config = {} let config = {
setting: [],
option: {}
}
if (isEmpty(this.focus)) { if (isEmpty(this.focus)) {
return return
} }
config.code = this.focus.code config.code = this.focus.code
config.name = this.focus.name config.name = this.focus.name
config = getRemoteComponentConfig(this.focus.code, this.focus.name) config = cloneDeep(getRemoteComponentConfig(this.focus.code, this.focus.name))
const settingContent = cloneDeep(this.resolveStrSetting(this.focus.settingContent))
config.setting = settingContent.setting
config.option = settingContent.option
this.$emit('setRemoteComponent', config) this.$emit('setRemoteComponent', config)
// config = getRemoteComponentConfig(this.focus.code, this.focus.name)
// this.$emit('setRemoteComponent', config)
} }
}, },
getDataList () { getDataList () {
@ -472,6 +481,33 @@ export default {
}) })
} }
}, },
/**
* 处理当前组件的字符串配置
*/
resolveStrSetting (settingContent) {
// eslint-disable-next-line prefer-const
let option = {}
// eslint-disable-next-line prefer-const
let setting = []
// eslint-disable-next-line prefer-const, no-unused-vars
let title = []
// eslint-disable-next-line prefer-const, no-unused-vars
let data = []
// eslint-disable-next-line prefer-const
settingContent = settingContent.replaceAll('const ', '')
// export default
settingContent = settingContent.replace(/export default[\s\S]*/, '')
eval(settingContent)
option = {
data,
displayOption,
...option
}
return {
option,
setting
}
},
// //
getCatalogList () { getCatalogList () {
const url = this.activeName === 'combination' ? '/bigScreen/type/list/componentCatalog' : '/bigScreen/type/list/bizComponentCatalog' const url = this.activeName === 'combination' ? '/bigScreen/type/list/componentCatalog' : '/bigScreen/type/list/bizComponentCatalog'

@ -373,7 +373,7 @@ export default {
this.form.refreshConfig = [] this.form.refreshConfig = []
} else { } else {
this.pageInfo.chartList.forEach(chart => { this.pageInfo.chartList.forEach(chart => {
if (chart.dataSource.businessKey) { if (chart.dataSource?.businessKey) {
this.chartOptions.push({ this.chartOptions.push({
code: chart.code, code: chart.code,
title: chart.title, title: chart.title,
@ -470,7 +470,7 @@ export default {
this.$emit('close') this.$emit('close')
}, },
timerEmptyState () { timerEmptyState () {
return this.pageInfo.chartList.every(chart => chart.dataSource.businessKey === '') return this.pageInfo.chartList.every(chart => chart.dataSource?.businessKey === '')
} }
} }
} }

@ -4,13 +4,13 @@
* @Author: xing.heng * @Author: xing.heng
*/ */
// import _ from 'lodash' // import _ from 'lodash'
import cloneDeep from 'lodash/cloneDeep'
import { mapMutations, mapState } from 'vuex' import { mapMutations, mapState } from 'vuex'
import { EventBus } from 'data-room-ui/js/utils/eventBus' import { EventBus } from 'data-room-ui/js/utils/eventBus'
import { getChatInfo, getUpdateChartInfo } from '../api/bigScreenApi' import { getChatInfo, getUpdateChartInfo } from '../api/bigScreenApi'
import axiosFormatting from '../../js/utils/httpParamsFormatting' import axiosFormatting from '../../js/utils/httpParamsFormatting'
import {settingToTheme} from "data-room-ui/js/utils/themeFormatting"; import { settingToTheme } from 'data-room-ui/js/utils/themeFormatting'
import _ from "lodash"; import cloneDeep from 'lodash/cloneDeep'
export default { export default {
data () { data () {
return { return {
@ -100,14 +100,14 @@ export default {
const scriptMethod = new Function(scriptAfterReplacement) const scriptMethod = new Function(scriptAfterReplacement)
_res.data = scriptMethod() _res.data = scriptMethod()
} catch (error) { } catch (error) {
console.error('JS数据集脚本执行失败', error) console.info('JS数据集脚本执行失败', error)
} }
} }
} }
config = this.dataFormatting(config, _res) config = this.dataFormatting(config, _res)
this.changeChartConfig(config) this.changeChartConfig(config)
}).catch((err) => { }).catch((err) => {
console.error(err) console.info(err)
}).finally(() => { }).finally(() => {
resolve(config) resolve(config)
}) })
@ -151,7 +151,7 @@ export default {
const scriptMethod = new Function(scriptAfterReplacement) const scriptMethod = new Function(scriptAfterReplacement)
_res.data = scriptMethod() _res.data = scriptMethod()
} catch (error) { } catch (error) {
console.error('JS数据集脚本执行失败', error) console.info('JS数据集脚本执行失败', error)
} }
} }
} }
@ -165,7 +165,7 @@ export default {
} }
} }
}).catch(err => { }).catch(err => {
console.error(err) console.info(err)
}).finally(() => { }).finally(() => {
resolve(config) resolve(config)
}) })
@ -191,7 +191,7 @@ export default {
changeStyle (config) { changeStyle (config) {
config = { ...this.config, ...config } config = { ...this.config, ...config }
// 样式改变时更新主题配置 // 样式改变时更新主题配置
config.theme = settingToTheme(_.cloneDeep(config), this.customTheme) config.theme = settingToTheme(cloneDeep(config), this.customTheme)
this.changeChartConfig(config) this.changeChartConfig(config)
if (config.code === this.activeCode) { if (config.code === this.activeCode) {
this.changeActiveItemConfig(config) this.changeActiveItemConfig(config)

@ -32,5 +32,4 @@ export default function speak ({ text, speechRate, lang, volume, pitch }, endEve
startEvent && startEvent() startEvent && startEvent()
} }
speechSynthesis.speak(speechUtterance) speechSynthesis.speak(speechUtterance)
console.log(2)
} }

@ -45,7 +45,7 @@ module.exports = {
outputDir: 'dataRoomUi', outputDir: 'dataRoomUi',
assetsDir: 'static', assetsDir: 'static',
lintOnSave: false, lintOnSave: false,
productionSourceMap: false, productionSourceMap: true,
runtimeCompiler: true, runtimeCompiler: true,
devServer: { devServer: {
hot: true, hot: true,

Loading…
Cancel
Save