Merge remote-tracking branch 'origin/optimize' into optimize

main
liu.shiyi 2 years ago
commit fb80350de2

@ -1,6 +1,6 @@
{ {
"name": "@gcpaas/data-room-ui", "name": "@gcpaas/data-room-ui",
"version": "0.0.1-2023070303-Alpha", "version": "0.0.1-2023070401-Alpha",
"description": "自定义大屏", "description": "自定义大屏",
"author": "gc-starter", "author": "gc-starter",
"license": "MIT", "license": "MIT",

@ -51,7 +51,6 @@ export default {
methods: { methods: {
// //
rowClick (row) { rowClick (row) {
console.log('点击')
this.linkage(row) this.linkage(row)
}, },
dataFormatting (config, data) { dataFormatting (config, data) {

@ -52,7 +52,6 @@ export default {
methods: { methods: {
// //
rowClick (row) { rowClick (row) {
console.log(row)
this.linkage(row) this.linkage(row)
}, },
dataFormatting (config, data) { dataFormatting (config, data) {

@ -1,7 +1,7 @@
import BigScreenManagement from './index.vue' import BigScreenComponentMag from './index.vue'
BigScreenManagement.install = function (Vue) { BigScreenComponentMag.install = function (Vue) {
Vue.component(BigScreenManagement.name, BigScreenManagement) Vue.component(BigScreenComponentMag.name, BigScreenComponentMag)
} }
export default BigScreenManagement export default BigScreenComponentMag

@ -468,8 +468,9 @@ export default {
.big-screen-list-wrap { .big-screen-list-wrap {
position: relative; position: relative;
height: 100%; height: 100%;
margin:0 16px; // margin:0 16px;
padding: 16px; // padding: 16px;
margin-bottom: 56px;
color: #9ea9b2; color: #9ea9b2;
background-color: var(--bs-background-2) !important; background-color: var(--bs-background-2) !important;
@ -637,14 +638,9 @@ export default {
} }
.footer-pagination-wrap { .footer-pagination-wrap {
margin-top: 16px;
position: absolute; position: absolute;
// display: flex;
// align-items: center;
// justify-content: flex-end;
width: 100%; width: 100%;
bottom: 16px;
right: 12px;
// padding: 0 16px;
} }
} }
.bs-pagination { .bs-pagination {

@ -218,8 +218,8 @@ export default {
.big-screen-list-wrap { .big-screen-list-wrap {
position: relative; position: relative;
height: 100%; height: 100%;
margin:0 16px; // margin:0 16px;
padding: 16px; // padding: 16px;
color: #9ea9b2; color: #9ea9b2;
background-color: var(--bs-background-2) !important; background-color: var(--bs-background-2) !important;
@ -389,15 +389,9 @@ export default {
} }
.footer-pagination-wrap { .footer-pagination-wrap {
// display: flex;
// align-items: center;
// justify-content: flex-end;
width: 100%; width: 100%;
// margin-top: 16px;
// padding: 0 16px;
position: absolute; position: absolute;
bottom: 16px; margin-top: 16px;
right: 12px;
} }
} }
.bs-pagination { .bs-pagination {

@ -1258,7 +1258,6 @@ export default {
} }
this.saveLoading = false this.saveLoading = false
}).catch((e) => { }).catch((e) => {
console.log('测试失败', e)
this.passTest = false this.passTest = false
this.saveLoading = false this.saveLoading = false
}) })

@ -967,7 +967,6 @@ export default {
} }
this.saveLoading = false this.saveLoading = false
}).catch((e) => { }).catch((e) => {
console.log('测试失败', e)
this.passTest = false this.passTest = false
this.saveLoading = false this.saveLoading = false
}) })

@ -4,7 +4,7 @@
<div class="inner-container"> <div class="inner-container">
<el-form <el-form
:inline="true" :inline="true"
class="filter-container bs-el-form" class="filter-container"
> >
<el-form-item class="filter-input filter-item"> <el-form-item class="filter-input filter-item">
<el-input <el-input
@ -171,8 +171,8 @@ export default {
sourceName: '', sourceName: '',
sourceType: '' sourceType: ''
}, },
size: 10, // pagesize size: 10,
current: 1, // currentpage current: 1,
curRow: null curRow: null
} }
}, },
@ -280,7 +280,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../assets/style/bsTheme.scss'; @import '~packages/assets/style/bsTheme.scss';
.bs-pagination { .bs-pagination {
::v-deep .el-input__inner { ::v-deep .el-input__inner {

@ -20,7 +20,6 @@
size="small" size="small"
label-position="right" label-position="right"
:label-width="dataForm.advanceSettingFlag ? '200px' : '150px'" :label-width="dataForm.advanceSettingFlag ? '200px' : '150px'"
class="bs-el-form"
> >
<el-form-item <el-form-item
label="类型" label="类型"
@ -209,7 +208,7 @@
</template> </template>
<script> <script>
import { checkRepeat, sourceLinkTest, addOrUpdateDataSource } from 'packages/js/utils/dataSourceService' import { checkRepeat, sourceLinkTest, add, update } from 'packages/js/utils/dataSourceService'
export default { export default {
props: { props: {
appCode: { appCode: {
@ -245,21 +244,7 @@ export default {
driverClassName: 'com.mysql.jdbc.Driver', driverClassName: 'com.mysql.jdbc.Driver',
username: '', username: '',
password: '', password: '',
coding: '自动',
url: 'jdbc:mysql://localhost:3306/db_name?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&useSSL=false&useOldAliasMetadataBehavior=true', url: 'jdbc:mysql://localhost:3306/db_name?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&useSSL=false&useOldAliasMetadataBehavior=true',
advanceSettingFlag: 0,
initConnNum: 0,
maxActiveConnNum: 0,
maxIdleConnNum: 0,
minIdleConnNum: 0,
maxWaitConnNum: 0,
sqlCheck: '',
getconnCheckFlag: 0,
returnCheckFlag: 0,
startIdleCheckFlag: 0,
idleConnDormantTime: 0,
idleConnCheckNum: 0,
keepIdleMinTime: 0,
remark: '' remark: ''
}, },
rules: { rules: {
@ -366,7 +351,7 @@ export default {
moduleCode: this.appCode moduleCode: this.appCode
}).then(r => { }).then(r => {
if (r) { if (r) {
callback(new Error(r)) callback(new Error('数据源名称已存在'))
} else { } else {
callback() callback()
} }
@ -435,21 +420,7 @@ export default {
driverClassName: 'com.mysql.jdbc.Driver', driverClassName: 'com.mysql.jdbc.Driver',
username: '', username: '',
password: '', password: '',
coding: '自动',
url: 'jdbc:mysql://localhost:3306/db_name?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&useSSL=false&useOldAliasMetadataBehavior=true', url: 'jdbc:mysql://localhost:3306/db_name?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&useSSL=false&useOldAliasMetadataBehavior=true',
advanceSettingFlag: 0,
initConnNum: 0,
maxActiveConnNum: 0,
maxIdleConnNum: 0,
minIdleConnNum: 0,
maxWaitConnNum: 0,
sqlCheck: '',
getconnCheckFlag: 0,
returnCheckFlag: 0,
startIdleCheckFlag: 0,
idleConnDormantTime: 0,
idleConnCheckNum: 0,
keepIdleMinTime: 0,
remark: '' remark: ''
} }
this.setDatasourceVisible = false this.setDatasourceVisible = false
@ -468,16 +439,29 @@ export default {
// } // }
this.$refs.dataForm.validate((valid) => { this.$refs.dataForm.validate((valid) => {
if (valid) { if (valid) {
addOrUpdateDataSource({ if (this.dataForm.id) {
...this.dataForm, update({
moduleCode: this.appCode, ...this.dataForm,
editable: this.appCode ? 1 : 0 moduleCode: this.appCode,
}).then(() => { editable: this.appCode ? 1 : 0
this.$message.success('保存成功') }).then(() => {
// this.$message.success('保存成功')
this.$emit('refreshTable') //
this.handleClose() this.$emit('refreshTable')
}) this.handleClose()
})
} else {
add({
...this.dataForm,
moduleCode: this.appCode,
editable: this.appCode ? 1 : 0
}).then(() => {
this.$message.success('保存成功')
//
this.$emit('refreshTable')
this.handleClose()
})
}
} else { } else {
return false return false
} }
@ -488,5 +472,5 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../assets/style/bsTheme.scss'; @import '~packages/assets/style/bsTheme.scss';
</style> </style>

@ -1,7 +1,7 @@
import BigScreenManagement from './index.vue' import BgiScreenSourceMag from './index.vue'
BigScreenManagement.install = function (Vue) { BgiScreenSourceMag.install = function (Vue) {
Vue.component(BigScreenManagement.name, BigScreenManagement) Vue.component(BgiScreenSourceMag.name, BgiScreenSourceMag)
} }
export default BigScreenManagement export default BgiScreenSourceMag

@ -1,17 +1,7 @@
// 大屏列表管理页面
import 'packages/assets/style/common/index.scss' import 'packages/assets/style/common/index.scss'
import 'packages/assets/style/bsTheme.scss' import 'packages/assets/style/bsTheme.scss'
// 大屏管理页面
import BigScreenManagement from 'packages/BigScreenMag'
// 渲染整个bigScreen的渲染引擎
import BigScreenRun from 'packages/BigScreenRun'
// 大屏设计引擎
import BigScreenDesign from 'packages/BigScreenDesign'
// 数据源管理
import DataSourceManagement from 'packages/DataSourceManagement'
// 数据集管理
import DataSetManagement from 'packages/DataSetManagement'
// 大屏管理-数据集管理的顶部路由框架
// import BigScreenTopLayout from 'packages/Layout'
// 大屏 vuex store数据 // 大屏 vuex store数据
import bigScreenStore from 'packages/js/store' import bigScreenStore from 'packages/js/store'
@ -20,14 +10,33 @@ import registerConfig from 'packages/js/utils/registerConfig'
// 更新主题 // 更新主题
import updateTheme from 'packages/js/utils/updateTheme' import updateTheme from 'packages/js/utils/updateTheme'
// 布局组件
const BigScreenTopLayout = () => import('./Layout/ApplicationCreateTop/index.vue')
// 大屏列表管理页面
const BigScreenManagement = () => import('./BigScreenMag')
// 大屏资源管理页面
const BgiScreenSourceMag = () => import('./SourceMag')
// 大屏组件管理页面
const BigScreenComponentMag = () => import('./BigScreenComponentMag')
// 大屏预览页面
const BigScreenRun = () => import('./BigScreenRun')
// 大屏设计页面
const BigScreenDesign = () => import('./BigScreenDesign')
// 数据集管理页面
const DataSetManagement = () => import('./DataSetManagement')
// 数据源管理页面
const DataSourceManagement = () => import('./DataSourceManagement')
// 存储组件列表 // 存储组件列表
const components = [ const components = [
BigScreenTopLayout,
BigScreenManagement, BigScreenManagement,
BgiScreenSourceMag,
BigScreenComponentMag,
BigScreenRun, BigScreenRun,
BigScreenDesign, BigScreenDesign,
DataSetManagement, DataSetManagement,
DataSourceManagement DataSourceManagement
// BigScreenTopLayout
] ]
const $bigScreen = { const $bigScreen = {
@ -42,13 +51,14 @@ function install (Vue) {
export { export {
install, install,
BigScreenTopLayout,
BigScreenManagement, BigScreenManagement,
BgiScreenSourceMag,
BigScreenComponentMag,
BigScreenRun, BigScreenRun,
BigScreenDesign, BigScreenDesign,
DataSetManagement, DataSetManagement,
DataSourceManagement, DataSourceManagement,
// BigScreenTopLayout,
$bigScreen, $bigScreen,
registerConfig, registerConfig,
updateTheme updateTheme
@ -56,12 +66,14 @@ export {
export default { export default {
install, install,
BigScreenTopLayout,
BgiScreenSourceMag,
BigScreenComponentMag,
BigScreenManagement, BigScreenManagement,
BigScreenRun, BigScreenRun,
BigScreenDesign, BigScreenDesign,
DataSetManagement, DataSetManagement,
DataSourceManagement, DataSourceManagement,
$bigScreen, $bigScreen,
registerConfig, registerConfig,
updateTheme updateTheme

@ -82,7 +82,7 @@ const getSourceView = (id = '-1', flag = false) => get(`/datasource/getViewList/
* @param flag * @param flag
* @returns {Promise<*>} * @returns {Promise<*>}
*/ */
const getTableFieldList = (sourceId = '-1', tableName = '', flag = false) => get(`/datasource//getFieldList/table/${sourceId}/${tableName}`, {}, flag) const getTableFieldList = (sourceId = '-1', tableName = '', flag = false) => get(`/datasource/getFieldList/table/${sourceId}/${tableName}`, {}, flag)
/** /**
* 获取数据源下视图字段列表 * 获取数据源下视图字段列表
@ -91,8 +91,7 @@ const getTableFieldList = (sourceId = '-1', tableName = '', flag = false) => get
* @param flag * @param flag
* @returns {Promise<*>} * @returns {Promise<*>}
*/ */
const getViewFieldList = (sourceId = '-1', viewName = '', flag = false) => get(`/datasource//getFieldList/view/${sourceId}/${viewName}`, {}, flag) const getViewFieldList = (sourceId = '-1', viewName = '', flag = false) => get(`/datasource/getFieldList/view/${sourceId}/${viewName}`, {}, flag)
export { export {
add, add,

Loading…
Cancel
Save