|
@@ -4,77 +4,16 @@
|
|
:layout.sync="layout"
|
|
:layout.sync="layout"
|
|
:col-num="14"
|
|
:col-num="14"
|
|
:row-height="30"
|
|
:row-height="30"
|
|
- :is-draggable="true"
|
|
|
|
|
|
+ :is-draggable="false"
|
|
:is-resizable="true"
|
|
:is-resizable="true"
|
|
:is-mirrored="false"
|
|
:is-mirrored="false"
|
|
:vertical-compact="true"
|
|
:vertical-compact="true"
|
|
:margin="[10, 10]"
|
|
:margin="[10, 10]"
|
|
:use-css-transforms="true"
|
|
:use-css-transforms="true"
|
|
>
|
|
>
|
|
- <grid-item v-for="item in layout" :key="item.i" :x="item.x" :y="item.y" :w="item.w" :h="item.h" :i="item.i">
|
|
|
|
- <component :is="components[item.i]" class="card-box" />
|
|
|
|
|
|
+ <grid-item v-for="item in layout" :key="item.i" :x="item.x" :y="item.y" :w="item.w" :h="item.h" :i="item.i" :class="{'hidden': item.i !== '6'}">
|
|
|
|
+ <component :is="components[item.i]" class="card-box" :page-size="item.i === '4' ? 5 : 10" />
|
|
</grid-item>
|
|
</grid-item>
|
|
- <!-- <grid-item :key="layout[0].i" :x="layout[0].x" :y="layout[0].y" :w="layout[0].w" :h="layout[0].h" :i="layout[0].i">
|
|
|
|
- <el-row type="flex" justify="center" class="searh-row">
|
|
|
|
- <el-col :span="10"><el-input placeholder="请输入搜索内容" /></el-col>
|
|
|
|
- <el-col :span="2"><el-button type="primary" icon="el-icon-search">智搜</el-button></el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </grid-item>
|
|
|
|
- <grid-item :key="layout[1].i" :x="layout[1].x" :y="layout[1].y" :w="layout[1].w" :h="layout[1].h" :i="layout[1].i" />
|
|
|
|
- <grid-item :key="layout[2].i" :x="layout[2].x" :y="layout[2].y" :w="layout[2].w" :h="layout[2].h" :i="layout[2].i">
|
|
|
|
- <el-card class="card-box">
|
|
|
|
- <div slot="header" class="clearfix">
|
|
|
|
- <span>我的业务</span>
|
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text">More<i class="el-icon-arrow-right" /></el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-card>
|
|
|
|
- </grid-item>
|
|
|
|
- <grid-item :key="layout[3].i" :x="layout[3].x" :y="layout[3].y" :w="layout[3].w" :h="layout[3].h" :i="layout[3].i">
|
|
|
|
- <el-card class="card-box">
|
|
|
|
- <div slot="header" class="clearfix">
|
|
|
|
- <span>我的应用</span>
|
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text">More<i class="el-icon-arrow-right" /></el-button>
|
|
|
|
- </div>
|
|
|
|
- <el-carousel height="150px">
|
|
|
|
- <el-carousel-item v-for="item in 4" :key="item">
|
|
|
|
- <h3 class="small">{{ item }}</h3>
|
|
|
|
- </el-carousel-item>
|
|
|
|
- </el-carousel>
|
|
|
|
- </el-card>
|
|
|
|
- </grid-item>
|
|
|
|
- <grid-item :key="layout[4].i" :x="layout[4].x" :y="layout[4].y" :w="layout[4].w" :h="layout[4].h" :i="layout[4].i">
|
|
|
|
- <el-card class="card-box">
|
|
|
|
- <div slot="header" class="clearfix">
|
|
|
|
- <span>专项工具</span>
|
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text">More<i class="el-icon-arrow-right" /></el-button>
|
|
|
|
- </div>
|
|
|
|
- <div v-for="o in 4" :key="o" class="item">
|
|
|
|
- {{ '列表内容 ' + o }}
|
|
|
|
- </div>
|
|
|
|
- </el-card>
|
|
|
|
- </grid-item>
|
|
|
|
- <grid-item :key="layout[5].i" :x="layout[5].x" :y="layout[5].y" :w="layout[5].w" :h="layout[5].h" :i="layout[5].i">
|
|
|
|
- <el-card class="card-box">
|
|
|
|
- <div slot="header" class="clearfix">
|
|
|
|
- <span>标准规范</span>
|
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text">More<i class="el-icon-arrow-right" /></el-button>
|
|
|
|
- </div>
|
|
|
|
- <div v-for="o in 4" :key="o" class="item">
|
|
|
|
- {{ '列表内容 ' + o }}
|
|
|
|
- </div>
|
|
|
|
- </el-card>
|
|
|
|
- </grid-item>
|
|
|
|
- <grid-item :key="layout[6].i" :x="layout[6].x" :y="layout[6].y" :w="layout[6].w" :h="layout[6].h" :i="layout[6].i">
|
|
|
|
- <el-card class="card-box">
|
|
|
|
- <div slot="header" class="clearfix">
|
|
|
|
- <span>外部应用导航</span>
|
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text">More<i class="el-icon-arrow-right" /></el-button>
|
|
|
|
- </div>
|
|
|
|
- <div v-for="o in 4" :key="o" class="item">
|
|
|
|
- {{ '列表内容 ' + o }}
|
|
|
|
- </div>
|
|
|
|
- </el-card>
|
|
|
|
- </grid-item> -->
|
|
|
|
</grid-layout>
|
|
</grid-layout>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -85,6 +24,9 @@ import VueGridLayout from 'vue-grid-layout'
|
|
import Search from './components/Search'
|
|
import Search from './components/Search'
|
|
import Message from './components/Message'
|
|
import Message from './components/Message'
|
|
import System from './components/System'
|
|
import System from './components/System'
|
|
|
|
+// import System from './components/System'
|
|
|
|
+import Specification from './components/Specification'
|
|
|
|
+import Link from './components/Link'
|
|
import Test from './components/Test'
|
|
import Test from './components/Test'
|
|
|
|
|
|
let sseClient
|
|
let sseClient
|
|
@@ -97,20 +39,31 @@ export default {
|
|
Search,
|
|
Search,
|
|
Message,
|
|
Message,
|
|
System,
|
|
System,
|
|
|
|
+ Specification,
|
|
|
|
+ Link,
|
|
Test
|
|
Test
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ // layout: [
|
|
|
|
+ // { 'x': 0, 'y': 0, 'w': 14, 'h': 2, 'i': '0' },
|
|
|
|
+ // { 'x': 0, 'y': 2, 'w': 6, 'h': 12, 'i': '1' },
|
|
|
|
+ // { 'x': 0, 'y': 14, 'w': 6, 'h': 8, 'i': '2' },
|
|
|
|
+ // { 'x': 6, 'y': 2, 'w': 8, 'h': 8, 'i': '3' },
|
|
|
|
+ // { 'x': 6, 'y': 10, 'w': 8, 'h': 5, 'i': '4' },
|
|
|
|
+ // { 'x': 6, 'y': 16, 'w': 8, 'h': 6, 'i': '5' },
|
|
|
|
+ // { 'x': 0, 'y': 22, 'w': 14, 'h': 4, 'i': '6' }
|
|
|
|
+ // ],
|
|
layout: [
|
|
layout: [
|
|
- { 'x': 0, 'y': 0, 'w': 14, 'h': 2, 'i': '0' },
|
|
|
|
- { 'x': 0, 'y': 2, 'w': 6, 'h': 12, 'i': '1' },
|
|
|
|
- { 'x': 0, 'y': 14, 'w': 6, 'h': 8, 'i': '2' },
|
|
|
|
- { 'x': 6, 'y': 2, 'w': 8, 'h': 8, 'i': '3' },
|
|
|
|
- { 'x': 6, 'y': 10, 'w': 8, 'h': 6, 'i': '4' },
|
|
|
|
- { 'x': 6, 'y': 16, 'w': 8, 'h': 6, 'i': '5' },
|
|
|
|
- { 'x': 0, 'y': 22, 'w': 14, 'h': 4, 'i': '6' }
|
|
|
|
|
|
+ { 'x': 1, 'y': 0, 'w': 14, 'h': 2, 'i': '0' },
|
|
|
|
+ { 'x': 1, 'y': 2, 'w': 6, 'h': 12, 'i': '1' },
|
|
|
|
+ { 'x': 1, 'y': 14, 'w': 6, 'h': 8, 'i': '2' },
|
|
|
|
+ { 'x': 1, 'y': 0, 'w': 8, 'h': 8, 'i': '3' },
|
|
|
|
+ { 'x': 1, 'y': 8, 'w': 8, 'h': 5, 'i': '4' },
|
|
|
|
+ { 'x': 1, 'y': 0, 'w': 8, 'h': 6, 'i': '5' },
|
|
|
|
+ { 'x': 0, 'y': 0, 'w': 14, 'h': 4, 'i': '6' }
|
|
],
|
|
],
|
|
- components: ['Test', 'Test', 'Test', 'System', 'Test', 'Test', 'Test']
|
|
|
|
|
|
+ components: ['Search', 'Message', 'Test', 'System', 'System', 'Specification', 'Link']
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -118,7 +71,10 @@ export default {
|
|
'name'
|
|
'name'
|
|
])
|
|
])
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ },
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ this.calcLayoutWidth()
|
|
this.connect()
|
|
this.connect()
|
|
},
|
|
},
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
@@ -127,6 +83,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ calcLayoutWidth() {
|
|
|
|
+ document.getElementsByClassName('home-container')[0].style.width = document.getElementsByClassName('home-container')[0].offsetWidth + 'px'
|
|
|
|
+ },
|
|
connect() {
|
|
connect() {
|
|
sseClient = this.$sse.create({
|
|
sseClient = this.$sse.create({
|
|
url: process.env.VUE_APP_BASE_API + '/subscribe/test1',
|
|
url: process.env.VUE_APP_BASE_API + '/subscribe/test1',
|
|
@@ -164,6 +123,10 @@ export default {
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
$msgCardHeaderHeight: 43px;
|
|
$msgCardHeaderHeight: 43px;
|
|
|
|
|
|
|
|
+.vue-grid-item.hidden {
|
|
|
|
+ display: none;
|
|
|
|
+}
|
|
|
|
+
|
|
.card-box {
|
|
.card-box {
|
|
height: 100%;
|
|
height: 100%;
|
|
|
|
|