소스 검색

faet: 接口相关代码合并

wu.jian2 2 년 전
부모
커밋
19db8979ae

+ 2 - 4
data-room-ui/packages/js/api/bigScreenApi.js

@@ -13,9 +13,7 @@ export function saveScreen (data) {
 
 // 根据数据集获取数据集详情
 export function getDataSetDetails (id) {
-  return get('/bigScreen/ds/getDataSetDetails', {
-    id
-  })
+  return get('/dataset/datasetInfo/' + id)
 }
 // 模拟后端返回自定义主题配置
 export function getThemeConfig () {
@@ -24,7 +22,7 @@ export function getThemeConfig () {
 
 // 根据数据集id获取数据
 export function getDataByDataSetId (dataSetId) {
-  return post('/bigScreen/ds/getDataByDataSetId', {
+  return post('/dataset/execute', {
     dataSetId,
     params: []
   })

+ 1 - 1
data-room-ui/packages/js/config/commonConfig.js

@@ -65,7 +65,7 @@ export default function (customConfig) {
     ...customConfig.root,
     dataSource: {
       className:
-        'com.gccloud.dataroom.core.module.chart.components.datasource.DataSetDataSource',
+        'com.gccloud.bigscreen.core.module.chart.components.datasource.DataSetDataSource',
       dataSourceKey: '', // 数据源,选择不同数据库
       businessKey: '', // 数据集标识
       dimensionField: '', // 维度

+ 66 - 22
data-room-ui/packages/js/mixins/commonMixins.js

@@ -5,6 +5,7 @@
  */
 import _ from 'lodash'
 import { mapMutations, mapState } from 'vuex'
+import { EventBus } from 'packages/js/utils/eventBus'
 import { getChatInfo, getUpdateChartInfo } from '../api/bigScreenApi'
 export default {
   data () {
@@ -19,10 +20,15 @@ export default {
       pageCode: state => state.bigScreen.pageInfo.code
     }),
     isPreview () {
-      return this.$route.path !== window?.BS_CONFIG?.routers?.designUrl
+      return (this.$route.path === window?.BS_CONFIG?.routers?.previewUrl) || (this.$route.path === '/big-screen/preview')
     }
   },
-  mounted () {},
+  mounted () {
+    if (!['digitalFlop', 'screenScrollRanking', 'screenScrollBoard', 'tables'].includes(this.config.type)) {
+      this.chartInit()
+    }
+    this.watchCacheData()
+  },
   methods: {
     ...mapMutations({
       changeChartConfig: 'bigScreen/changeChartConfig'
@@ -34,21 +40,26 @@ export default {
       // 初始化组件和数据,若自己的组件的初始化和数据处理不一样,可重写该方法
       // 如果key和code相等,说明是一进来刷新,调用/chart/data/list,否则是更新,调用 chart/data/chart
       // 或者是组件联动isLink,也需要调用/chart/data/list更新
-      if (this.config.code === this.config.key || this.isPreview) {
-        // 根据数据集初始化的组件
-        if (this.isPreview) {
-          this.getCurrentOption().then(({ config, data }) => {
-            config = this?.buildOption(config, data)
-            if (config) {
-              this.changeChartConfig(config)
-              this?.newChart(config.option)
-            }
-          })
+      if (this.config.code === this.config.key) {
+        // 根据缓存数据初始化的组件
+        if (this.config.dataSource.dataSetType === '2') {
+          this.config = this.buildOption(this.config, { success: false })
+          this.changeChartConfig(this.config)
+          this.newChart(this.config.option)
         } else {
-          this.updateChartData(this.config)
+          // 根据数据集初始化的组件
+          if (this.isPreview) {
+            this.getCurrentOption().then(({ config, data }) => {
+              config = this.buildOption(config, data)
+              this.changeChartConfig(config)
+              this.newChart(config.option)
+            })
+          } else {
+            this.updateChartData(this.config)
+          }
         }
       } else {
-        this?.newChart(this.config.option)
+        this.newChart(this.config.option)
       }
     },
     /**
@@ -121,24 +132,57 @@ export default {
         type: config.type,
         filterList
       }
+      // if (config.type === 'remoteComponent') {
+      //   config = this.buildOption(config, { success: false })
+      //   config.key = new Date().getTime()
+      //   this.changeChartConfig(config)
+      //   return
+      // }
       getUpdateChartInfo(params).then((res) => {
-        // 获取数据后更新组件配置
-        config.key = new Date().getTime()
-        config = this.buildOption(config, res)
-        if (config) {
-          this.changeChartConfig(config)
+        console.log('更新组件数据', res)
+        console.log('更新组件数据', config)
+        // 数据集脚本前端执行
+        if (res.executionByFrontend) {
+          try {
+            const returnResult = eval(`(${res.data})`)()
+            res.data = returnResult
+          } catch (error) {
+            console.error('数据集脚本执行失败', error)
+          }
         }
+        config = this.buildOption(config, res)
+        config.key = new Date().getTime()
+        this.changeChartConfig(config)
+        // 获取数据后更新组件配置
+
         // this.$message.success('更新成功')
       }).catch((err) => {
         console.error(err)
         // this.$message.error('更新失败')
       })
     },
+    newChart () {
+      // 需要在自己的组件中重写此方法,用于构建自己的组件
+    },
     buildOption (config, data) {
-      // 覆盖
+      // 需要在自己的组件中重写此方法:config当前组件的配置,data后端返回的数据
+      return config
     },
-    newChart (option) {
-      // 覆盖
+    // 缓存组件数据监听
+    watchCacheData () {
+      EventBus.$on('cacheDataInit', (data, dataSetId) => {
+        // 如果是缓存数据集
+        // 且当前组件的businessKey和缓存的dataSetId相等时,更新组件
+        if (
+          this.config.dataSource.dataSetType === '2' &&
+          this.config.dataSource.businessKey === dataSetId
+        ) {
+          const config = this.buildOption(this.config, data)
+          config.key = new Date().getTime()
+          this.changeChartConfig(config)
+          this.newChart(config.option)
+        }
+      })
     }
   }
 }

+ 1 - 0
data-room-ui/packages/js/mixins/linkageMixins.js

@@ -45,6 +45,7 @@ export default {
       this.dataLoading = true
       return getUpdateChartInfo(params)
         .then(res => {
+          console.log(2, res)
           config = this.buildOption(config, res)
           this.changeChartConfig(config)
           this.changeChartKey(config.code)

+ 22 - 21
data-room-ui/packages/js/mixins/multipleSelectMixin.js

@@ -32,6 +32,27 @@ export default {
       pasteCharts: 'pasteCharts'
     }),
     keydown (event) {
+      if (event.keyCode === 37) {
+        // 关闭默认事件
+        event.preventDefault()
+        // 左箭头键被按下
+        this.changeActivePos({ diffX: -1, diffY: 0 })
+      } else if (event.keyCode === 38) {
+        // 关闭默认事件
+        event.preventDefault()
+        // 上箭头键被按下
+        this.changeActivePos({ diffX: 0, diffY: -1 })
+      } else if (event.keyCode === 39) {
+        // 关闭默认事件
+        event.preventDefault()
+        // 右箭头键被按下
+        this.changeActivePos({ diffX: 1, diffY: 0 })
+      } else if (event.keyCode === 40) {
+        // 关闭默认事件
+        event.preventDefault()
+        // 下箭头键被按下
+        this.changeActivePos({ diffX: 0, diffY: 1 })
+      }
       // ctrl/command + s保存
       if ((event.ctrlKey || event.metaKey) && event.keyCode === 83) {
         // 关闭默认事件
@@ -76,27 +97,6 @@ export default {
       }
     },
     designKeydown (event) {
-      if (event.keyCode === 37) {
-        // 关闭默认事件
-        event.preventDefault()
-        // 左箭头键被按下
-        this.changeActivePos({ diffX: -1, diffY: 0 })
-      } else if (event.keyCode === 38) {
-        // 关闭默认事件
-        event.preventDefault()
-        // 上箭头键被按下
-        this.changeActivePos({ diffX: 0, diffY: -1 })
-      } else if (event.keyCode === 39) {
-        // 关闭默认事件
-        event.preventDefault()
-        // 右箭头键被按下
-        this.changeActivePos({ diffX: 1, diffY: 0 })
-      } else if (event.keyCode === 40) {
-        // 关闭默认事件
-        event.preventDefault()
-        // 下箭头键被按下
-        this.changeActivePos({ diffX: 0, diffY: 1 })
-      }
       // 删除键被按下且鼠标没有在输入框中
       if (
         (event.keyCode === 8 || event.keyCode === 46) &&
@@ -125,6 +125,7 @@ export default {
       }
 
       if ((event.ctrlKey || event.metaKey) && event.keyCode === 86) {
+        console.log('粘贴')
         // 粘贴
         this.pasteCharts()
       }

+ 40 - 2
data-room-ui/packages/js/store/actions.js

@@ -1,8 +1,9 @@
 // 组件配置转化
 import _ from 'lodash'
 import { setModules } from 'packages/js/utils/configImport'
-import { getScreenInfo } from '../api/bigScreenApi'
+import { getScreenInfo, getDataSetDetails, getDataByDataSetId } from '../api/bigScreenApi'
 import { stringToFunction } from '../utils/evalFunctions'
+import { EventBus } from '../utils/eventBus'
 import plotList from 'packages/G2Plots/plotList'
 export default {
   // 初始化页面数据
@@ -13,11 +14,34 @@ export default {
         // 改变页面数据
         commit('changePageInfo', pageInfo)
         commit('changeZIndex', pageInfo.chartList)
+        // 初始化缓存数据集数据
+        // eslint-disable-next-line no-unused-expressions
+        pageInfo.pageConfig.cacheDataSets?.map((cacheDataSet) => {
+          dispatch('getCacheDataSetData', { dataSetId: cacheDataSet.dataSetId })
+          dispatch('getCacheDataFields', { dataSetId: cacheDataSet.dataSetId })
+        })
         // 页面加载成功
         resolve(true)
         commit('saveTimeLine', '初始化')
       })
     })
+  },
+  // 初始化缓存数据集数据
+  getCacheDataSetData ({ commit, dispatch }, { dataSetId }) {
+    getDataByDataSetId(dataSetId).then(res => {
+      const data = res.data
+      commit('changeCacheDataSetData', { dataSetId, data })
+      // 推送数据到各个组件
+      emitDataToChart(dataSetId, data)
+    })
+  },
+  // 初始化缓存数据集字段
+  getCacheDataFields ({ commit, dispatch }, { dataSetId }) {
+    getDataSetDetails(dataSetId).then(data => {
+      console.log(2, data)
+      commit('changeCacheDataFields', { dataSetId, data })
+      commit('changeCacheDataParams', { dataSetId, data })
+    })
   }
 }
 
@@ -39,7 +63,8 @@ export function handleResData (data) {
       }
     }
   }
-  pageInfo.pageConfig.refreshConfig = pageInfo.pageConfig.refreshConfig || []
+  // 如果pageConfig中的cacheDataSets为null,赋值[]
+  pageInfo.pageConfig.cacheDataSets = pageInfo.pageConfig.cacheDataSets || []
   pageInfo.chartList.forEach((chart) => {
     if (!['customComponent', 'remoteComponent'].includes(chart.type)) {
       chart.option = _.cloneDeep(setModules[chart.type])
@@ -54,3 +79,16 @@ export function handleResData (data) {
   })
   return pageInfo
 }
+
+// 推送数据到各个组件
+function emitDataToChart (dataSetId, data) {
+  if (data && data.length) {
+    EventBus.$emit('cacheDataInit',
+      {
+        success: true,
+        data: data
+      },
+      dataSetId
+    )
+  }
+}

+ 35 - 48
data-room-ui/packages/js/store/mutations.js

@@ -2,8 +2,8 @@
  * @description: vuex mutations 事件
  * @Date: 2023-03-13 10:04:59
  * @Author: xing.heng
- * @LastEditors: wujian
- * @LastEditTime: 2023-06-15 10:52:06
+ * @LastEditors: xing.heng
+ * @LastEditTime: 2023-06-08 15:24:01
  */
 
 import Vue from 'vue'
@@ -11,7 +11,6 @@ import _ from 'lodash'
 import { defaultData } from './state'
 import moment from 'moment'
 import { randomString } from 'packages/js/utils'
-import { EventBus } from 'packages/js/utils/eventBus'
 export default {
   // 改变页面基本信息,后端请求的页面信息存储到此处
   changePageInfo (state, pageInfo) {
@@ -27,22 +26,18 @@ export default {
   },
   // 改变当前选择组件id
   changeActiveCode (state, code) {
-    if (state.activeCode !== code) {
-      const activeItem = _.cloneDeep(state.pageInfo.chartList?.find(
-        item => item.code === code
-      ))
-      state.activeItemConfig = _.cloneDeep(activeItem)
-    }
     state.activeCode = code
     state.hoverCode = code
+
+    const activeItem = _.cloneDeep(state.pageInfo.chartList?.find(
+      item => item.code === code
+    ))
     changeGroup(code, state)
+    state.activeItemConfig = _.cloneDeep(activeItem)
   },
   changeActiveCodes (state, codes) {
     state.activeCodes = codes
     state.pageInfo.chartList = state.pageInfo.chartList?.map(chart => {
-      if (chart.group === 'tempGroup') {
-        chart.group = ''
-      }
       return {
         ...chart,
         group: (codes.includes(chart.code) && !chart.group) ? 'tempGroup' : chart.group
@@ -86,13 +81,6 @@ export default {
   changeActiveItemConfig (state, config) {
     state.activeItemConfig = _.cloneDeep(config)
   },
-  // 改变当前组件的xywh
-  changeActiveItemWH (state, pwh) {
-    state.activeItemConfig = {
-      ...state.activeItemConfig,
-      ...pwh
-    }
-  },
   // 新增一个组件
   addItem (state, itemConfig) {
     // 放到第一项
@@ -104,14 +92,11 @@ export default {
   delItem (state, codes) {
     if (Array.isArray(codes)) {
       state.pageInfo.chartList = state.pageInfo.chartList.filter(chart => !codes.includes(chart.code))
-      state.pageInfo.pageConfig.refreshConfig = state.pageInfo.pageConfig.refreshConfig.filter(timer => !codes.includes(timer.code))
     } else {
-      state.pageInfo.pageConfig.refreshConfig = state.pageInfo.pageConfig.refreshConfig.filter(item => item.code !== codes)
       state.pageInfo.chartList = state.pageInfo.chartList.filter(chart => codes !== chart.code)
     }
     // 存储删除后的状态
     saveTimeLineFunc(state, '删除组件')
-    EventBus.$emit('closeRightPanel')
   },
   changePageConfig (state, pageConfig) {
     Vue.set(state.pageInfo, 'pageConfig', _.cloneDeep(pageConfig))
@@ -153,6 +138,32 @@ export default {
     const config = state.pageInfo.chartList[index]
     Vue.set(config, 'key', config.code + new Date().getTime())
   },
+  // 改变缓存数据集中的字段列表
+  changeCacheDataFields (state, { dataSetId, data }) {
+    // 将 state.pageInfo.pageConfig.cacheDataSets 中的 dataSetId 对应fields字段数据替换为 data
+    const index = state.pageInfo.pageConfig.cacheDataSets.findIndex(cacheData => cacheData.dataSetId === dataSetId)
+    if (index < 0) {
+      return
+    }
+    Vue.set(state.pageInfo.pageConfig.cacheDataSets[index], 'fields', data?.fields || [])
+  },
+  // 改变缓存数据集中的数据参数
+  changeCacheDataParams (state, { dataSetId, data }) {
+    // 将 state.pageInfo.pageConfig.cacheDataSets 中的 dataSetId 对应fields字段数据替换为 data
+    const index = state.pageInfo.pageConfig.cacheDataSets.findIndex(cacheData => cacheData.dataSetId === dataSetId)
+    if (index < 0) {
+      return
+    }
+    Vue.set(state.pageInfo.pageConfig.cacheDataSets[index], 'params', data?.params || [])
+  },
+  // 改变缓存数据集中的数据
+  changeCacheDataSetData (state, { dataSetId, data }) {
+    const index = state.pageInfo.pageConfig.cacheDataSets.findIndex(cacheData => cacheData.dataSetId === dataSetId)
+    if (index < 0) {
+      return
+    }
+    state.pageInfo.pageConfig.cacheDataSets[index].data = data || []
+  },
   // 改变shift是否被按下
   changeCtrlOrCommandDown (state, isDown) {
     state.shiftKeyDown = isDown
@@ -169,9 +180,6 @@ export default {
   changeFitZoom (state, zoom) {
     state.fitZoom = zoom
   },
-  changeRefreshConfig (state, refreshConfig) {
-    state.pageInfo.pageConfig.refreshConfig = refreshConfig
-  },
   changeActivePos (state, { diffX, diffY }) {
     const activeCodes = state.activeCodes
     activeCodes?.forEach(code => {
@@ -296,16 +304,7 @@ function changeGroup (code, state) {
       state.activeCodes = state.pageInfo.chartList?.filter(chart => chart.group === group && chart.group).map(item => item.code)
     }
     if (state.shiftKeyDown) {
-      // 如果code 在 activeCodes中,就删除 且 当前code的组件group为''
-      if (state.activeCodes.includes(code)) {
-        state.activeCodes = state.activeCodes.filter(item => item !== code)
-        state.pageInfo.chartList = state.pageInfo.chartList?.map(chart => ({
-          ...chart,
-          group: chart.code === code ? '' : chart.group
-        }))
-      } else {
-        state.activeCodes = _.uniq([...state.activeCodes, code])
-      }
+      state.activeCodes = _.uniq([...state.activeCodes, code])
       // eslint-disable-next-line no-unused-expressions
       state.pageInfo.chartList?.forEach(chart => {
         if (state.activeCodes.includes(chart.code)) {
@@ -314,19 +313,7 @@ function changeGroup (code, state) {
       })
     } else {
       if (!group) {
-        if (!state.activeCodes?.includes(code)) {
-          state.activeCodes = [code]
-
-          state.pageInfo.chartList = state.pageInfo.chartList?.map(chart => {
-            if (chart.group === 'tempGroup') {
-              chart.group = ''
-            }
-            return {
-              ...chart,
-              group: chart.code === code ? '' : chart.group
-            }
-          })
-        }
+        state.activeCodes = [code]
       }
     }
   } else {

+ 1 - 2
data-room-ui/packages/js/store/state.js

@@ -3,7 +3,7 @@ export const defaultData = {
   // 大屏信息
   pageInfo: {
     className:
-      'com.gccloud.dataroom.core.module.manage.dto.BigScreenPageDTO',
+      'com.gccloud.bigscreen.core.module.manage.dto.BigScreenPageDTO',
     id: '',
     name: '测试bigScreen',
     code: '',
@@ -26,7 +26,6 @@ export const defaultData = {
       themeJson: {}, // 自定义主题配置
       // 缓存的数据集 { name: '', dataSetId: '' }
       cacheDataSets: [],
-      refreshConfig: [],
       // 自适应模式  无(none) 、自动(auto)、宽度铺满(fitWidth)、高度铺满(fitHeight)和 双向铺满(cover) 5 种自适应模式
       fitMode: 'none'
     },

+ 1 - 1
data-room-ui/packages/js/utils/commonConfig.js

@@ -65,7 +65,7 @@ export default function (customConfig) {
     ...customConfig.root,
     dataSource: {
       className:
-        'com.gccloud.dataroom.core.module.chart.components.datasource.DataSetDataSource',
+        'com.gccloud.bigscreen.core.module.chart.components.datasource.DataSetDataSource',
       dataSourceKey: '', // 数据源,选择不同数据库
       businessKey: '', // 数据集标识
       dimensionField: '', // 维度

+ 41 - 11
data-room-ui/packages/js/utils/dataSourceService.js

@@ -4,12 +4,20 @@
 import { get, post } from 'packages/js/utils/http'
 
 /**
- * 新增/修改数据源
+ * 修改数据源
  * @param params
  * @param flag
  * @returns {*}
  */
-const addOrUpdateDataSource = (params = {}, flag = false) => post('/bigScreen/datasource/addOrUpdateDataSource', params, flag)
+const add = (params = {}, flag = false) => post('/datasource/add', params, flag)
+
+/**
+ * 修改数据源
+ * @param params
+ * @param flag
+ * @returns {*}
+ */
+const update = (params = {}, flag = false) => post('/datasource/update', params, flag)
 
 /**
  * 数据源名称校验
@@ -17,7 +25,7 @@ const addOrUpdateDataSource = (params = {}, flag = false) => post('/bigScreen/da
  * @param flag
  * @returns {*}
  */
-const checkRepeat = (params = {}, flag = false) => post('/bigScreen/datasource/checkRepeat', params, flag)
+const checkRepeat = (params = {}, flag = false) => post('/datasource/checkRepeat', params, flag)
 
 /**
  * 数据源连接测试
@@ -25,7 +33,7 @@ const checkRepeat = (params = {}, flag = false) => post('/bigScreen/datasource/c
  * @param flag
  * @returns {*}
  */
-const sourceLinkTest = (params = {}, flag = false) => post('/bigScreen/datasource/sourceLinkTest', params, flag)
+const sourceLinkTest = (params = {}, flag = false) => post('/datasource/testConnect', params, flag)
 
 /**
  * 获取数据源列表
@@ -33,7 +41,7 @@ const sourceLinkTest = (params = {}, flag = false) => post('/bigScreen/datasourc
  * @param flag
  * @returns {*}
  */
-const datasourcePage = (params = {}, flag = false) => get('/bigScreen/datasource/page', params, flag)
+const datasourcePage = (params = {}, flag = false) => get('/datasource/page', params, flag)
 
 /**
  * 获取数据源列表
@@ -41,7 +49,7 @@ const datasourcePage = (params = {}, flag = false) => get('/bigScreen/datasource
  * @param flag
  * @returns {*}
  */
-const datasourceList = (params = {}, flag = false) => get('/bigScreen/datasource/list', params, flag)
+const datasourceList = (params = {}, flag = false) => get('/datasource/list', params, flag)
 
 /**
  * 删除数据源
@@ -49,7 +57,7 @@ const datasourceList = (params = {}, flag = false) => get('/bigScreen/datasource
  * @param flag
  * @returns {*}
  */
-const sourceRemove = (id = '-1', flag = false) => get(`/bigScreen/datasource/sourceRemove/${id}`, {}, flag)
+const sourceRemove = (id = '-1', flag = false) => post(`/datasource/delete/${id}`, {}, flag)
 
 /**
  * 获取数据源下表列表
@@ -57,7 +65,7 @@ const sourceRemove = (id = '-1', flag = false) => get(`/bigScreen/datasource/sou
  * @param flag
  * @returns {*}
  */
-const getSourceTable = (id = '-1', flag = false) => get(`/bigScreen/datasource/getSourceTable/${id}`, {}, flag)
+const getSourceTable = (id = '-1', flag = false) => get(`/datasource/getTableList/${id}`, {}, flag)
 
 /**
  * 获取数据源下视图列表
@@ -65,15 +73,37 @@ const getSourceTable = (id = '-1', flag = false) => get(`/bigScreen/datasource/g
  * @param flag
  * @returns {*}
  */
-const getSourceView = (id = '-1', flag = false) => get(`/bigScreen/datasource/getSourceView/${id}`, {}, flag)
+const getSourceView = (id = '-1', flag = false) => get(`/datasource/getViewList/${id}`, {}, flag)
+
+/**
+ * 获取数据源下表字段列表
+ * @param sourceId
+ * @param tableName
+ * @param flag
+ * @returns {Promise<*>}
+ */
+const getTableFieldList = (sourceId = '-1', tableName = '', flag = false) => get(`/datasource//getFieldList/table/${sourceId}/${tableName}`, {}, flag)
+
+/**
+ * 获取数据源下视图字段列表
+ * @param sourceId
+ * @param viewName
+ * @param flag
+ * @returns {Promise<*>}
+ */
+const getViewFieldList = (sourceId = '-1', viewName = '', flag = false) => get(`/datasource//getFieldList/view/${sourceId}/${viewName}`, {}, flag)
+
 
 export {
-  addOrUpdateDataSource,
+  add,
+  update,
   checkRepeat,
   sourceLinkTest,
   datasourcePage,
   datasourceList,
   sourceRemove,
   getSourceTable,
-  getSourceView
+  getSourceView,
+  getTableFieldList,
+  getViewFieldList
 }

+ 29 - 76
data-room-ui/packages/js/utils/datasetConfigService.js

@@ -9,15 +9,7 @@ import { get, post } from 'packages/js/utils/http'
  * @param flag
  * @returns {*}
  */
-const datasetPage = (params = {}, flag = false) => get('/bigScreen/dataset/page', params, flag)
-
-/**
- * 删除数据集
- * @param id
- * @param flag
- * @returns {*}
- */
-const datasetRemove = (id = '-1', flag = false) => get(`/bigScreen/dataset/remove/${id}`, {}, flag)
+const datasetPage = (params = {}, flag = false) => get('/dataset/page', params, flag)
 
 /**
  * 数据集名称校验
@@ -25,64 +17,51 @@ const datasetRemove = (id = '-1', flag = false) => get(`/bigScreen/dataset/remov
  * @param flag
  * @returns {*}
  */
-const nameCheckRepeat = (params = {}, flag = false) => post('/bigScreen/dataset/nameCheckRepeat', params, flag)
+const nameCheckRepeat = (params = {}, flag = false) => post('/dataset/checkRepeat', params, flag)
 
 /**
- * 数据集新增/修改【json/脚本/数据模型】
+ * 数据集新增
  * @param params
  * @param flag
  * @returns {*}
  */
-const datasetAddorUpdate = (params = {}, flag = false) => post('/bigScreen/dataset/addOrUpdate', params, flag)
+const datasetAdd = (params = {}, flag = false) => post('/dataset/add', params, flag)
 
 /**
- * 数据集执行【脚本】
+ * 数据集修改
  * @param params
  * @param flag
  * @returns {*}
  */
-const datasetExecute = (params = {}, flag = false) => post('/bigScreen/dataset/execute', params, flag)
+const datasetUpdate = (params = {}, flag = false) => post('/dataset/update', params, flag)
 
 /**
- * 获取数据集信息【json/数据模型/脚本】
+ * 删除数据集
  * @param id
  * @param flag
  * @returns {*}
  */
+const datasetRemove = (id = '-1', flag = false) => post(`/dataset/delete/${id}`, {}, flag)
 
-const getDataset = (id = '-1', flag = false) => get(`/bigScreen/dataset/getDataSetDetailById?id=${id}`, {}, flag)
 
 /**
- * 数据集加工测试
+ * 数据集执行
  * @param params
  * @param flag
  * @returns {*}
  */
-const sqlTest = (params = {}, flag = false) => post('/bigScreen/datasetProcess/sqlTest', params, flag)
+const datasetExecuteTest = (params = {}, flag = false) => post('/dataset/execute/test', params, flag)
 
 /**
- * 数据集新增
- * @param params
+ * 获取数据集详情
+ * @param id
  * @param flag
  * @returns {*}
  */
-const datasetAdd = (params = {}, flag = false) => post('/bigScreen/datasetProcess/add', params, flag)
 
-/**
-  * 数据集修改
-  * @param params
-  * @param flag
-  * @returns {*}
-  */
-const datasetUpdate = (params = {}, flag = false) => post('/bigScreen/datasetProcess/update', params, flag)
+const getDataset = (id = '-1', flag = false) => get(`/dataset/info/${id}`, {}, flag)
+
 
-/**
- * 获取自助数据集信息
- * @param id
- * @param flag
- * @returns {*}
- */
-const getDatasetInfo = (id = '-1', flag = false) => get(`/bigScreen/datasetProcess/getDatasetInfo/${id}`, {}, flag)
 
 /**
  * 获取数据集分类
@@ -90,70 +69,44 @@ const getDatasetInfo = (id = '-1', flag = false) => get(`/bigScreen/datasetProce
  * @param flag
  * @returns {*}
  */
-const getDatasetTypeList = (params = {}, flag = false) => get('/bigScreen/category/queryTreeList', params, flag)
+const getCategoryTree = (params = {}, flag = false) => get('/category/queryTreeList', params, flag)
 
 /**
- * 获取原始表信息,数据列表
+ * 新增分类树节点
  * @param params
  * @param flag
  * @returns {*}
  */
-const getOriginalTableDetail = (params = {}, flag = false) => post('/bigScreen/original/getOriginalTableDetail', params, flag)
+const categoryAdd = (params = {}, flag = false) => post('/category/add', params, flag)
 
 /**
- * 新增/修改原始数据集
+ * 编辑分类树节点
  * @param params
  * @param flag
  * @returns {*}
  */
-const addOrUpdateOriginal = (params = {}, flag = false) => post('/bigScreen/original/addOrUpdate', params, flag)
-/**
- * 获取原始数据集字段信息
- * @param params
- * @param flag
- * @returns {*}
- */
-const getOriginalTableFieldInfo = (params = {}, flag = false) => post('/bigScreen/original/getOriginalTableFieldInfo', params, flag)
+const categoryUpdate = (params = {}, flag = false) => post('/category/update', params, flag)
 
 /**
- * 获取数据集详细信息
- * @param id
- * @param flag
- * @returns {*}
- */
-const getOriginalTableDetailsById = (id = '-1', flag = false) => get(`/bigScreen/original/getOriginalTableDetailsById/${id}`, {}, flag)
-/**
- * 删除菜单树节点
+ * 删除分类树节点
  * @param id
  * @param flag
  * @returns {*}
  */
-const categoryRemove = (id = '-1', flag = false) => get(`/bigScreen/category/remove/${id}`, {}, flag)
+const categoryRemove = (id = '-1', flag = false) => post(`/category/delete/${id}`, {}, flag)
 
-/**
- * 新增/编辑菜单树节点
- * @param params
- * @param flag
- * @returns {*}
- */
-const addOrUpdateTree = (params = {}, flag = false) => post('/bigScreen/category/addOrUpdateTree', params, flag)
 
 export {
   datasetPage,
-  datasetRemove,
-  nameCheckRepeat,
-  sqlTest,
   datasetAdd,
   datasetUpdate,
-  getDatasetInfo,
-  getDatasetTypeList,
-  datasetAddorUpdate,
-  datasetExecute,
+  datasetRemove,
+  nameCheckRepeat,
+  datasetExecuteTest,
   getDataset,
-  getOriginalTableDetail,
-  addOrUpdateOriginal,
-  getOriginalTableFieldInfo,
-  getOriginalTableDetailsById,
-  categoryRemove,
-  addOrUpdateTree
+
+  getCategoryTree,
+  categoryAdd,
+  categoryUpdate,
+  categoryRemove
 }

+ 1 - 1
data-room-ui/packages/js/utils/getBorderComponentsConfig.js

@@ -4,7 +4,7 @@
  */
 export default function getComponentConfig (type, classNameType) {
   const className =
-    'com.gccloud.dataroom.core.module.chart.components.ScreenBorderChart'
+    'com.gccloud.bigscreen.core.module.chart.components.ScreenBorderChart'
   switch (type) {
     case 'border1':
       return {

+ 16 - 15
data-room-ui/packages/js/utils/getComponentConfig.js

@@ -2,6 +2,7 @@ import Icon from 'packages/assets/images/bigScreenIcon/export'
 // import _ from 'lodash'
 export default function getComponentConfig (type) {
   // const _type = _.upperFirst(type)
+  // const className = `com.gccloud.starter.lowcode.page.bigscreen.components.${_type}Chart`
   switch (type) {
     case 'texts':
       return {
@@ -9,7 +10,7 @@ export default function getComponentConfig (type) {
         title: '文本',
         icon: Icon.getNameList()[0],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenTextChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenTextChart',
         w: 150,
         h: 30,
         x: 0,
@@ -22,7 +23,7 @@ export default function getComponentConfig (type) {
         title: '超链接',
         icon: Icon.getNameList()[15],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenLinkChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenLinkChart',
         w: 150,
         h: 30,
         x: 0,
@@ -36,7 +37,7 @@ export default function getComponentConfig (type) {
         icon: Icon.getNameList()[10],
         component: null,
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenBorderChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenBorderChart',
         w: 300,
         h: 40,
         x: 0,
@@ -50,7 +51,7 @@ export default function getComponentConfig (type) {
         icon: Icon.getNameList()[11],
         component: null,
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenBorderChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenBorderChart',
         w: 40,
         h: 300,
         x: 0,
@@ -64,7 +65,7 @@ export default function getComponentConfig (type) {
         title: '图片',
         icon: Icon.getNameList()[1],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenPictureChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenPictureChart',
         w: 280,
         h: 200,
         x: 0,
@@ -77,7 +78,7 @@ export default function getComponentConfig (type) {
         title: '轮播表',
         icon: Icon.getNameList()[2],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenScrollBoardChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenScrollBoardChart',
         w: 500,
         h: 300,
         x: 0,
@@ -90,7 +91,7 @@ export default function getComponentConfig (type) {
         title: '排名表',
         icon: Icon.getNameList()[3],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenScrollRankingChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenScrollRankingChart',
         w: 550,
         h: 350,
         x: 0,
@@ -103,7 +104,7 @@ export default function getComponentConfig (type) {
         title: '表格',
         icon: Icon.getNameList()[4],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenTablesChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenTablesChart',
         w: 600,
         h: 400,
         x: 0,
@@ -116,7 +117,7 @@ export default function getComponentConfig (type) {
         title: '当前时间',
         icon: Icon.getNameList()[6],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenCurrentTimeChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenCurrentTimeChart',
         w: 380,
         h: 130,
         x: 0,
@@ -129,7 +130,7 @@ export default function getComponentConfig (type) {
         title: '倒计时',
         icon: Icon.getNameList()[7],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenTimeCountDownChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenTimeCountDownChart',
         w: 500,
         h: 130,
         x: 0,
@@ -142,7 +143,7 @@ export default function getComponentConfig (type) {
         title: '外链',
         icon: Icon.getNameList()[8],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenIframeChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenIframeChart',
         w: 500,
         h: 500,
         x: 0,
@@ -156,7 +157,7 @@ export default function getComponentConfig (type) {
         icon: null,
         img: require('packages/BasicComponents/DigitalFlop/images/fanpaiqi.png'),
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenDigitalFlopChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenDigitalFlopChart',
         w: 800,
         h: 150,
         x: 0,
@@ -169,7 +170,7 @@ export default function getComponentConfig (type) {
         title: '播放器',
         icon: Icon.getNameList()[12],
         className:
-          'com.gccloud.dataroom.core.module.chart.components.ScreenVideoChart',
+          'com.gccloud.bigscreen.core.module.chart.components.ScreenVideoChart',
         w: 800,
         h: 500,
         x: 0,
@@ -182,7 +183,7 @@ export default function getComponentConfig (type) {
         name: '输入框',
         title: '输入框',
         icon: Icon.getNameList()[13],
-        className: 'com.gccloud.dataroom.core.module.chart.components.ScreenInputChart',
+        className: 'com.gccloud.bigscreen.core.module.chart.components.ScreenInputChart',
         w: 180,
         h: 40,
         x: 0,
@@ -194,7 +195,7 @@ export default function getComponentConfig (type) {
         name: '按钮',
         title: '按钮',
         icon: Icon.getNameList()[14],
-        className: 'com.gccloud.dataroom.core.module.chart.components.ScreenButtonChart',
+        className: 'com.gccloud.bigscreen.core.module.chart.components.ScreenButtonChart',
         w: 80,
         h: 40,
         x: 0,

+ 1 - 1
data-room-ui/packages/js/utils/getDecorationComponentsConfig.js

@@ -3,7 +3,7 @@
  */
 export default function getComponentConfig (type, classNameType) {
   const className =
-    'com.gccloud.dataroom.core.module.chart.components.ScreenDecorationChart'
+    'com.gccloud.bigscreen.core.module.chart.components.ScreenDecorationChart'
   switch (type) {
     case 'decoration1':
       return {