Commit 5da647b6 by 胡悦

提交初始布局

1 parent f850e0a3
<!--
* @Description:
* @Description: 内容
* @Author: huyue
* @Date: 2023-07-04 16:12:38
* @LastEditors: huyue
* @LastEditTime: 2023-07-04 16:12:44
* @LastEditTime: 2023-07-05 10:40:02
-->
<template>
<div class="ViewContainer">
<div class="ViewContainer-title">
<slot name="title" />
</div>
<div class="title-line"></div>
<div class="ViewContainer-body">
<slot name="content" />
</div>
......@@ -21,28 +22,34 @@ export default {
name: 'ViewContainer',
props: {
},
data () {
data() {
return {
}
},
mounted () { },
mounted() { },
methods: {}
}
</script>
<style scoped lang='scss'>
.ViewContainer {
width: 100vw;
height: 100vh;
// width: 100vw;
// height: 100vh;
&-title {
height: 6.1vh;
width:100%;
background-image: url('../assets/images/bg-title.jpg');
background-repeat: no-repeat;
background-size:cover;
background-image: linear-gradient(90deg, #0A214A 0%, #061422 50%, #0A214A 100%);
// background-image: url('../assets/images/bg-title.jpg');
// background-repeat: no-repeat;
// background-size:cover;
}
&-body {
height: 93.9vh;
height: calc(93.9vh - 2px);
}
.title-line {
width: 100%;
height: 2px;
background-image: linear-gradient(90deg, #27B0FF 0%, #4792ff00 34%, #5784ff00 66%, #6379FF 100%);
}
}
</style>
\ No newline at end of file
</style>
<template>
<div class="view-date">统计年份:业务开始时间:2022年6月30日</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'ViewDate'
}
</script>
<style scoped lang='scss'>
.view-date {
display: flex;
align-items: center;
// width: 100%;
height: 6.67vh;
color: #C9C9C9;
padding: 0 1.33vh;
background-color: #091C40;
margin-top: 1.78vh;
}
</style>
......@@ -2,16 +2,19 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2023-07-04 17:21:08
* @LastEditTime: 2023-07-05 10:57:40
* @FilePath: \dj-data-view\src\components\ViewTitle.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="content flex">
<div class="logo user-select">
<img style="height: 3.17vh" src="@/assets/images/logo.png" alt="logo" />
<img style="height: 2.89vh" src="@/assets/images/logo.png" alt="logo" />
</div>
<div class="view-title user-select">嘀加智慧门店运营看板</div>
<div>
<div>业务数据</div>
</div>
<!-- <div class="view-title user-select">嘀加智慧门店运营看板</div> -->
<div class="time">
<div class="top flex">
<div class="now">{{ now }}</div>
......@@ -46,7 +49,7 @@ export default {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0 42px 0 76px;
padding: 0 26px 0 24px;
justify-content: space-between;
.view-title {
font-weight: 600;
......@@ -57,7 +60,7 @@ export default {
}
.time {
text-align: right;
font-size: 14px;
font-size: 16px;
color: #ffffff;
.top {
justify-content: flex-end;
......
......@@ -11,7 +11,7 @@ import Router from 'vue-router'
import routes from './routes'
// hack router push callback
const originalPush = Router.prototype.push
Router.prototype.push = function push (location, onResolve, onReject) {
Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch(err => err)
}
......@@ -20,11 +20,11 @@ Vue.use(Router)
const router = createRouter()
function createRouter () {
function createRouter() {
return new Router({
// mode: 'history', // 如果是 history模式 需要配置vue.config.js publicPath
base: process.env.BASE_URL,
scrollBehavior: function (to, from, savedPosition) {
scrollBehavior: function(to, from, savedPosition) {
return savedPosition || { x: 0, y: 0 }
},
routes
......@@ -35,9 +35,9 @@ router.beforeEach((to, from, next) => {
next()
})
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter () {
export function resetRouter() {
const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
}
export default router
\ No newline at end of file
export default router
......@@ -6,19 +6,25 @@ const pages = [
keepAlive: true,
backgroundColor: '#F7F7F7'
},
children: [
]
children: []
},
{
name: 'boutique',
meta: {
isTab: true,
keepAlive: true,
backgroundColor: '#F7F7F7'
}
}
]
const keepAlives = []
const setChildren = (e, parent) => {
let arr = []
const arr = []
e.children.map(child => {
const { children, meta } = child
let url = `${parent}/${child.name}`
let name = url.replace(/\//g, '.')
let route = {
const url = `${parent}/${child.name}`
const name = url.replace(/\//g, '.')
const route = {
path: `/${url}`,
name,
meta: meta || {},
......@@ -31,15 +37,15 @@ const setChildren = (e, parent) => {
return arr
}
const getPages = _ => {
let router = {
const router = {
path: '/',
name: 'home',
redirect: '/home',
component: resolve => require([`views/home.vue`], resolve)
}
router.children = pages.map(e => {
let name = `${e.name}`
let route = {
const name = `${e.name}`
const route = {
path: `/${name}`,
name,
meta: e.meta || {},
......
<!--
* @Description:
* @Author: huyue
* @Date: 2023-07-04 13:55:35
* @LastEditors: huyue
* @LastEditTime: 2023-07-05 10:26:49
-->
<template>
<div class="layout">
<view-container>
<template #title>
<view-title>
</view-title>
</template>
<template #content>
<Charts></Charts>
</template>
</view-container>
</div>
</template>
<script>
export default {
name: '',
data() {
return {}
},
mounted() { },
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-04 11:49:12
* @LastEditors: huyue
* @LastEditTime: 2023-07-04 11:49:15
* @LastEditTime: 2023-07-05 10:05:05
-->
<!-- home -->
<template>
......@@ -32,6 +32,6 @@ export default {
</script>
<style lang="scss" scoped>
.data-view-container{
background: #090E2B;
background: #061422;
}
</style>
<!--
* @Description: 1.0 左侧
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditTime: 2023-07-05 10:50:54
-->
<template>
<div class="left">左侧内容</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'ContentLeft'
}
</script>
<style scoped lang='scss'>
.left {
display: flex;
flex-direction: column;
width: 64.17vw;
overflow: hidden;
background: #091C40;
}
</style>
<!--
* @Description: 1.0 右侧内容
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditTime: 2023-07-05 10:50:16
-->
<template>
<div class="right">右侧内容</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'ContentLeft'
}
</script>
<style scoped lang='scss'>
.right {
display: flex;
flex-direction: column;
width: 31.39vw;
overflow: hidden;
background: #091C40;
}
</style>
<!--
* @Description:
* @Description: 内容
* @Author: huyue
* @Date: 2023-07-04 13:56:33
* @LastEditors: huyue
* @LastEditTime: 2023-07-04 17:24:02
* @LastEditTime: 2023-07-05 10:47:13
-->
<template>
<div class="content">
<Charts></Charts>
<!-- <view-content-left />
<view-content-right /> -->
<div class="view-content">
<ViewDate></ViewDate>
<div class="content">
<ContentLeft></ContentLeft>
<ContentRight></ContentRight>
</div>
</div>
</template>
<script>
import ContentLeft from './ContentLeft.vue'
import ContentRight from './ContentRight.vue'
export default {
name: 'ViewContent',
components: {
ContentLeft,
ContentRight
},
props: {
},
data() {
......@@ -26,17 +34,20 @@ export default {
}
</script>
<style scoped lang='scss'>
.content {
.view-content {
width: 100%;
height: 100%;
box-sizing: border-box;
position: relative;
padding: 1.46vh 24px 1.95vh;
padding: 1.78vh 24px;
gap: 0 16px;
}
.content {
display: flex;
justify-content: space-between;
padding: 1.78vh 0;
> div {
height: 100%;
// height: 100%;
}
}
</style>
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-04 13:55:35
* @LastEditors: huyue
* @LastEditTime: 2023-07-04 13:55:41
* @LastEditTime: 2023-07-05 10:41:52
-->
<template>
<div class="layout">
......@@ -20,12 +20,16 @@
</template>
<script>
import ViewContent from './components/ViewContent.vue'
export default {
name: '',
data () {
components: {
ViewContent
},
data() {
return {}
},
mounted () { },
mounted() { },
methods: {
}
}
......
......@@ -10,7 +10,7 @@ const name = defaultSettings.title || 'vue mobile template'
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
module.exports = {
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work/', // 署应用包时的基本 URL。 vue-router hash 模式使用
publicPath: IS_PROD ? './' : '/glsk-data-view-pd/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: '/dj-scrm-wx-work-main/', // 署应用包时的基本 URL。 vue-router history模式使用 微信开发环境需打开
outputDir: 'dist', // 生产环境构建文件的目录
assetsDir: 'static', // outputDir的静态资源(js、css、img、fonts)目录
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!