fix: 修改自定义组件设计返回逻辑,激活左侧菜单并重新请求数据,修改数据集的分页样式

main
wu.jian2 2 years ago
parent 6f28d97767
commit 2c80b9b04a

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

@ -14,7 +14,6 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
components: {}, components: {},
data () { data () {
@ -37,23 +36,19 @@ export default {
} }
}, },
created () { created () {
const type = this.$route?.query?.type const { globalData } = this.$router.app.$options
if (type) { if (globalData?.componentsManagementType) {
this.componentHandle(this.componentList.find(item => item.type === type)) this.activeType = globalData.componentsManagementType
} else { this.$emit('getPageInfo', globalData.componentsManagementType)
this.componentHandle(this.componentList[0]) // this.$router.app.$options.globalData.componentsManagementType
delete globalData.componentsManagementType
} }
}, },
methods: { methods: {
// //
componentHandle (com) { componentHandle (com) {
this.activeType = com.type this.activeType = com.type
this.$router.push({ this.$emit('getPageInfo', com.type)
path: window.BS_CONFIG?.routers?.componentUrl || '/big-screen-components',
query: {
type: com.type
}
})
} }
} }
} }

@ -1,7 +1,7 @@
<template> <template>
<div class="bs-manage-main-wrap"> <div class="bs-manage-main-wrap">
<side-menu /> <side-menu @getPageInfo="getPageInfo" />
<menu-content /> <menu-content :catalog-info="catalogInfo" />
</div> </div>
</template> </template>
<script> <script>
@ -14,10 +14,15 @@ export default {
components: { SideMenu, MenuContent }, components: { SideMenu, MenuContent },
data () { data () {
return { return {
catalogInfo: 'component'
} }
}, },
mounted () { }, mounted () {},
methods: { } methods: {
getPageInfo (type) {
this.catalogInfo = type
}
}
} }
</script> </script>

@ -135,6 +135,12 @@ export default {
BizComponentPreview BizComponentPreview
}, },
props: {}, props: {},
beforeRouteLeave (to, from, next) {
//
const data = { componentsManagementType: 'bizComponent' }
this.$router.app.$options.globalData = data //
next() //
},
data () { data () {
return { return {
form: { form: {
@ -231,10 +237,7 @@ export default {
}, },
backManagement () { backManagement () {
this.$router.push({ this.$router.push({
path: window.BS_CONFIG?.routers?.componentUrl || '/big-screen-components', path: window.BS_CONFIG?.routers?.componentUrl || '/big-screen-components'
query: {
type: 'bizComponent'
}
}) })
}, },
save () { save () {

@ -153,7 +153,6 @@
</div> </div>
</div> </div>
</div> </div>
<div <div
v-if="catalogInfo !== 'system'" v-if="catalogInfo !== 'system'"
class="footer-pagination-wrap" class="footer-pagination-wrap"
@ -203,12 +202,16 @@ import innerRemoteComponents, { getRemoteComponents } from 'packages/RemoteCompo
export default { export default {
name: 'BigScreenList', name: 'BigScreenList',
mixins: [pageMixins], mixins: [pageMixins],
props: { }, props: {
catalogInfo: {
type: String,
default: ''
}
},
components: { EditForm, CatalogEditForm }, components: { EditForm, CatalogEditForm },
data () { data () {
return { return {
name: '', name: '',
catalogInfo: 'component',
catalogVisible: false, catalogVisible: false,
templateLoading: false, templateLoading: false,
searchKey: '', searchKey: '',
@ -235,8 +238,7 @@ export default {
} }
}, },
watch: { watch: {
$route (val) { catalogInfo () {
this.catalogInfo = val.query.type || 'component'
this.reset() this.reset()
this.init() this.init()
}, },
@ -245,7 +247,6 @@ export default {
} }
}, },
mounted () { mounted () {
this.catalogInfo = this.$route.query.type || 'component'
this.init() this.init()
}, },
methods: { methods: {

@ -1071,13 +1071,11 @@ export default {
customClass: 'bs-el-message-box' customClass: 'bs-el-message-box'
}).then(() => { }).then(() => {
this.saveFun(formName) this.saveFun(formName)
}).catch(() => { }).catch(() => {
}) })
} else { } else {
this.saveFun(formName) this.saveFun(formName)
} }
}, },
/** /**
@ -1470,6 +1468,9 @@ export default {
} }
.bs-pagination { .bs-pagination {
position: relative !important;
bottom: 0 !important;
padding: 0 12px 16px 16px !important;
::v-deep .el-input__inner { ::v-deep .el-input__inner {
width: 110px !important; width: 110px !important;
border: none; border: none;

@ -1081,10 +1081,8 @@ export default {
} }
/deep/ .bs-table-box.is-Edit .el-table { /deep/ .bs-table-box.is-Edit .el-table {
max-height: calc(100vh - 532px) !important;
.el-table__body-wrapper { .el-table__body-wrapper {
max-height: calc(100vh - 568px) !important; max-height: unset !important;
} }
} }
@ -1114,6 +1112,9 @@ export default {
} }
.bs-pagination { .bs-pagination {
position: relative !important;
bottom: 0 !important;
padding: 0 12px 16px 16px !important;
::v-deep .el-input__inner { ::v-deep .el-input__inner {
width: 110px !important; width: 110px !important;
border: none; border: none;

@ -608,6 +608,9 @@ export default {
padding-left: 16px !important; padding-left: 16px !important;
} }
.bs-pagination { .bs-pagination {
position: relative !important;
bottom: 0 !important;
padding: 0 12px 16px 16px !important;
::v-deep .el-input__inner { ::v-deep .el-input__inner {
width: 110px !important; width: 110px !important;
border:none; border:none;

@ -146,6 +146,22 @@ export default {
components: { components: {
setDatasource setDatasource
}, },
// -
beforeRouteLeave (to, from, next) {
const layoutEl = document.querySelector('.big-screen-router-view-wrap')
if (layoutEl) {
layoutEl.style.paddingLeft = '0'
}
next()
},
//
beforeRouteEnter (to, from, next) {
const layoutEl = document.querySelector('.big-screen-router-view-wrap')
if (layoutEl) {
layoutEl.style.paddingLeft = '16px'
}
next()
},
mixins: [pageMixins], mixins: [pageMixins],
props: { props: {
isDialog: { isDialog: {
@ -176,11 +192,12 @@ export default {
curRow: null curRow: null
} }
}, },
created () { },
mounted () { mounted () {
this.init() this.init()
const layoutEl = document.querySelector('.big-screen-router-view-wrap') const layoutEl = document.querySelector('.big-screen-router-view-wrap')
if (layoutEl) { if (layoutEl) {
layoutEl.style.padding = '16px' layoutEl.style.paddingLeft = '16px'
} }
}, },
methods: { methods: {

@ -1,6 +1,6 @@
window.ENV = 'development' window.ENV = 'development'
var developmentConfig = { var developmentConfig = {
baseUrl: 'http://127.0.0.1:8081/bigScreenServer' baseUrl: 'http://gcpaas.gccloud.com/bigScreenServer'
} }
// 必须的 // 必须的
window.CONFIG = configDeepMerge(window.CONFIG, developmentConfig) window.CONFIG = configDeepMerge(window.CONFIG, developmentConfig)

Loading…
Cancel
Save