初始化

This commit is contained in:
砂糖
2025-11-08 10:38:36 +08:00
commit 3beeec7296
1626 changed files with 198488 additions and 0 deletions

View File

@@ -0,0 +1,207 @@
<template>
<div class="application-create-top-wrap">
<header class="application-create-top">
<div class="top-center">
<el-tabs
v-model="activeName"
@tab-click="handleClick"
>
<el-tab-pane
v-for="tab in tabList"
:key="tab.path"
:label="tab.name"
:name="tab.path"
/>
</el-tabs>
</div>
</header>
<div class="router-view-wrap">
<router-view />
</div>
<div />
</div>
</template>
<script>
export default {
name: 'ApplicationCreateTop',
props: [],
data () {
return {
logo: require('./static/app.png'),
activeName: 'pageManagement',
app: {
id: '',
name: '',
visibility: '',
code: '',
icon: ''
},
// 和此处路由保持一致将会激活tab请按需更改
tabList: [
{
name: '大屏管理',
path: window.BS_CONFIG?.routers?.pageManagementUrl || '/pages'
},
{
name: '数据集管理',
path: window.BS_CONFIG?.routers?.dsManageUrl || '/data-sources'
}
]
}
},
created () {
},
methods: {
handleClick (tab) {
this.$router.push({
path: tab.name
})
}
}
}
</script>
<style lang="scss">
.header-new-drop {
::v-deep .el-dropdown-menu__item {
height: 50px !important;
}
}
</style>
<style lang="scss" scoped>
.application-create-top-wrap {
overflow: hidden;
height: 100vh;
.application-create-top {
height: 40px;
display: flex;
align-items: center;
background-color: var(--bs-el-color-primary) !important;
.top-left {
display: flex;
align-items: center;
.log-img,
.logo-text {
margin-left: 25px;
width: 100px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.log-img {
width: 18px;
height: 18px;
cursor: pointer;
}
.logo-text {
font-size: 14px;
/*font-weight: bold;*/
color: #ffffff;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.top-center {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
::v-deep .el-tabs__header {
margin: 0;
::v-deep .el-tabs__item {
height: 51px;
line-height: 51px;
color: #ffffff;
&:hover {
background-color: hsla(0, 0%, 100%, 0.1) !important;
}
}
}
::v-deep .el-tabs__header {
margin: 0 !important;
}
::v-deep .el-tabs__item {
height: 40px !important;
line-height: 40px !important;
padding:0 10px!important;
box-sizing: border-box;
}
::v-deep .el-tabs__active-bar {
width: 0 !important;
}
::v-deep .el-tabs__item.is-active {
color: #ffffff !important;
background-color: hsla(0, 0%, 100%, 0.1) !important;
}
::v-deep .el-tabs__item:hover {
color: #fff !important;
cursor: pointer;
background-color: hsla(0, 0%, 100%, 0.1) !important;
}
::v-deep .el-tabs__item {
color: #fff !important;
}
}
.top-right {
display: flex;
width: 150px;
align-items: center;
margin-right: 20px;
justify-content: flex-end;
::v-deep .el-dropdown {
padding: 4px 8px;
border-radius: 4px;
}
.el-dropdown:hover {
padding: 4px 8px;
background-color: rgba(255, 255, 255, 0.1) !important;
}
span {
cursor: pointer;
font-size: 14px;
color: #fff;
font-weight: 500;
}
}
}
.router-view-wrap {
box-sizing: border-box;
// overflow: auto;
overflow-y: auto;
overflow-x: hidden;
height: calc(100% - 40px);
}
.pt16 {
padding-top: 16px;
}
.padding16 {
padding: 16px;
}
::v-deep .el-tabs__nav-wrap::after {
width: 0 !important;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

View File

@@ -0,0 +1,130 @@
<template>
<div class="nav-main">
<span
v-for="nav in navs"
:key="nav.id"
class="nav-span"
:class="{ 'nav-active': activeNav === nav.id }"
>
<a
class="nav-link"
@click="toggleNav(nav)"
>
<span class="nav-icon">
<!-- <i :class="['iconfont-bigscreen', nav.icon]" /> -->
</span>
{{ nav.name }}
</a>
</span>
<span class="nav-span nav-span-last" />
</div>
</template>
<script lang='ts'>
export default {
name: 'NavMain',
components: {},
data () {
return {
nc: null,
activeNav: 0
}
},
props: {
navs: {
type: Array,
required: true
}
},
watch: {
$route () {
const nav = this.navs.find(m => m.path === this.$route.path)
if (nav) {
this.activeNav = nav.id
}
}
},
mounted () {
const nav = this.navs.find(m => m.path === this.$route.path)
this.activeNav = nav ? nav.id : 0
},
beforeDestroy () {
},
methods: {
toggleNav (nav) {
this.activeNav = nav.id
this.$emit('change', nav)
}
}
}
</script>
<style lang="scss" scoped>
.nav-main {
z-index: 10;
display: flex;
top: 30px;
position: sticky;
width: 100%;
margin-top: 109px;
min-width: 1024px;
user-select: none;
.nav-span {
position: relative;
top: 1px;
// background-image: url('./images/line.png');
background-repeat: repeat-x;
background-position: 0 34px;
.nav-link {
display: flex;
align-items: center;
transition: color 0.2s;
text-decoration: none !important;
color: var(--bs-el-title);
width: auto;
min-width: 140px;
line-height: 40px;
font-size: 14px;
text-align: left;
cursor: pointer;
padding: 0 40px;
&.nav-active,
&:hover {
color: var(--bs-el-text) !important;
}
}
.nav-icon {
margin-right: 5px;
}
&.nav-active {
background-color: var(--bs-background-1);
&:after{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 2px;
background-color: var(--bs-el-color-primary);
}
// background-image: url('./images/tab.png');
// background-size: 100% 100%;
// background-repeat: no-repeat;
// background-position: center bottom;
/* border-bottom: 1px solid var(--bs-background-1); */
/* background-color: var(--bs-background-1) */
}
}
.nav-span-last {
flex: 1;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,235 @@
<template>
<div class="big-screen-home-wrap">
<header class="big-screen-home-wrap-top">
<div class="logo-title">
<img
class="logo"
:src="logo"
>
<span>{{ title }}</span><span style="font-size: 18px;margin-left: 8px">2.x</span>
</div>
<div class="big-screen-nav-container">
<Nav
:navs="tabList"
@change="changeTab"
/>
</div>
<a
v-if="giteeSvg && giteeHref"
class="fork-me-on-gitee"
:href="giteeHref"
target="_blank"
>
<img
:src="giteeSvg"
alt="Fork me on Gitee"
>
</a>
</header>
<div class="big-screen-router-view-wrap">
<keep-alive>
<router-view />
</keep-alive>
</div>
</div>
</template>
<script>
import Nav from './NavTop.vue'
// import Nav from './Nav.vue'
export default {
name: 'BigScreenHome',
components: {
Nav
},
props: [],
data () {
return {
// 和此处路由保持一致将会激活tab请按需更改
giteeHref: '',
giteeSvg: ''
}
},
computed: {
title () {
if (this.$route.query.edit) return '大屏设计器'
return window?.BS_CONFIG?.starter?.title ?? 'DataRoom大屏设计器'
},
logo () {
return window?.BS_CONFIG?.starter?.logo ?? require('./images/logo.png')
},
tabList () {
if (this.$route.query.edit) {
return [
{
id: 1,
name: '资源库',
path: window?.BS_CONFIG?.routers?.sourceUrl || '/big-screen-source',
icon: 'icon-tupian'
},
{
id: 2,
name: '组件库',
path: window?.BS_CONFIG?.routers?.componentUrl || '/big-screen-components',
icon: 'icon-zujian1'
}
]
}
return [
{
id: 0,
name: '大屏管理',
path: window?.BS_CONFIG?.routers?.pageListUrl || '/big-screen-list',
icon: 'icon-icon-shujudaping'
},
// {
// id: 1,
// name: '模版管理',
// path: window?.BS_CONFIG?.routers?.templateListUrl || '/big-screen-template',
// icon: 'icon-xiangmuwenjianmobanku_mobanku'
// },
{
id: 1,
name: '资源库',
path: window?.BS_CONFIG?.routers?.sourceUrl || '/big-screen-source',
icon: 'icon-tupian'
},
{
id: 2,
name: '组件库',
path: window?.BS_CONFIG?.routers?.componentUrl || '/big-screen-components',
icon: 'icon-zujian1'
},
{
id: 3,
name: '数据源管理',
path:
window?.BS_CONFIG?.routers?.dataSourceUrl ||
'/big-screen-dataSource',
icon: 'icon-datafull'
},
{
id: 4,
name: '数据集管理',
path: window?.BS_CONFIG?.routers?.dataSetUrl || '/big-screen-dataSet',
icon: 'icon-data'
},
{
id: 5,
name: '地图数据管理',
path: '/big-screen-map-data',
icon: 'icon-data'
}
]
}
},
created () {
document.title = this.title
},
mounted () {
this.giteeHref = 'https://gitee.com/gcpaas/DataRoom'
this.giteeSvg = 'https://gitee.com/gcpaas/DataRoom/widgets/widget_1.svg?color=007bff'
},
methods: {
changeTab (tab) {
if (this.$route.query.edit) {
this.$router.push({
path: tab.path,
query: { edit: 1 }
})
} else {
this.$router.push({
path: tab.path
})
}
}
}
}
</script>
<style lang="scss" scoped>
.big-screen-home-wrap > * {
box-sizing: border-box;
}
.big-screen-home-wrap {
height: 100%;
.big-screen-home-wrap-top {
position: fixed;
top: 0;
width: 100%;
height: 150px;
background-image: url('./images/nav_img.png');
background-size: 100% 150px;
background-color: #0D0F12;
background-position: center right;
.logo-title {
// 禁用可选
user-select: none;
font-size: 30px;
position: absolute;
z-index: 23;
top: 40px;
left: 40px;
display: flex;
align-items: center;
color: var(--bs-el-color-primary);
.logo {
height: 30px;
}
span {
font-family: Source Han Sans CN;
font-size: 30px;
font-weight: 700;
padding-left: 8px;
-webkit-background-clip: text;
background-size: 400% 400%;
}
}
}
.big-screen-router-view-wrap {
position: absolute;
top: 150px;
overflow: hidden;
// padding-top: 16px;
width: 100%;
height: calc(100vh - 150px);
background-color: var(--bs-background-1);
box-sizing: border-box;
padding-top: 16px;
padding-right: 16px;
padding-bottom: 16px;
}
}
@keyframes text-animate {
0% {
background-position: 0 0;
-webkit-background-clip: text;
}
50% {
background-position: 0 0;
-webkit-background-clip: text;
}
100% {
background-position: 0 0;
-webkit-background-clip: text;
}
}
.fork-me-on-gitee{
position: absolute;
top: 0;
right: 0;
z-index: 999;
img{
width: 120px;
height: 120px;
}
}
</style>

View File

@@ -0,0 +1,28 @@
<template>
<div></div>
</template>
<script>
export default {
name: 'Redirect',
components: {
},
data () {
return {
}
},
created () {
if(this.$route.query.edit=='source'){
this.$router.push(window.BS_CONFIG.routers?.SourceUrl||'/big-screen-source')
}else{
this.$router.push(window.BS_CONFIG.routers?.componentUrl || '/big-screen-components')
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

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