diff --git a/package.json b/package.json index 8f49efb..a612dfc 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "test:ci": "npm run lint && npm run test:unit" }, "dependencies": { + "@jiaminghi/data-view": "^2.10.0", "@smallwei/avue": "^2.9.15", "axios": "0.18.1", "core-js": "3.6.5", diff --git a/src/api/customer/index.js b/src/api/customer/index.js index 59181a0..073414e 100644 --- a/src/api/customer/index.js +++ b/src/api/customer/index.js @@ -40,3 +40,11 @@ export function scheduleListSkus(params){ params }) } + +export function imports (data) { + return request({ + method: "post", + url: "/api/admin/customer/import", + data + }) +} diff --git a/src/assets/bigScreen/bkg.png b/src/assets/bigScreen/bkg.png new file mode 100644 index 0000000..e8b05dc Binary files /dev/null and b/src/assets/bigScreen/bkg.png differ diff --git a/src/assets/bigScreen/business-buy.png b/src/assets/bigScreen/business-buy.png new file mode 100644 index 0000000..3442bb8 Binary files /dev/null and b/src/assets/bigScreen/business-buy.png differ diff --git a/src/assets/bigScreen/img1.png b/src/assets/bigScreen/img1.png new file mode 100644 index 0000000..b49d390 Binary files /dev/null and b/src/assets/bigScreen/img1.png differ diff --git a/src/assets/bigScreen/img2.png b/src/assets/bigScreen/img2.png new file mode 100644 index 0000000..175ce65 Binary files /dev/null and b/src/assets/bigScreen/img2.png differ diff --git a/src/assets/bigScreen/img3.png b/src/assets/bigScreen/img3.png new file mode 100644 index 0000000..7f555f2 Binary files /dev/null and b/src/assets/bigScreen/img3.png differ diff --git a/src/assets/bigScreen/line.png b/src/assets/bigScreen/line.png new file mode 100644 index 0000000..af3e1a0 Binary files /dev/null and b/src/assets/bigScreen/line.png differ diff --git a/src/assets/bigScreen/title.png b/src/assets/bigScreen/title.png new file mode 100644 index 0000000..657ef24 Binary files /dev/null and b/src/assets/bigScreen/title.png differ diff --git a/src/assets/bigScreen/video-btn.png b/src/assets/bigScreen/video-btn.png new file mode 100644 index 0000000..5ecc995 Binary files /dev/null and b/src/assets/bigScreen/video-btn.png differ diff --git a/src/main.js b/src/main.js index a611e6b..cb4cfce 100644 --- a/src/main.js +++ b/src/main.js @@ -107,6 +107,8 @@ Vue.prototype.$successMessage = (type,name) => { message:`${word}${name}成功` }) } +import dataV from "@jiaminghi/data-view"; +Vue.use(dataV); new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index 7c5491a..45ca919 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -41,19 +41,28 @@ export const constantRoutes = [{ component: () => import('@/views/404'), hidden: true }, + { + path: '/bisscreen', + component: () => import('@/views/bigSreen'), + meta: { + title: '大屏展示', + icon: 'el-icon-data-board' + } + }, { path: '/', component: Layout, redirect: '/dashboard', - children: [{ - path: 'dashboard', - name: '系统首页', - component: () => import('@/views/dashboard/index'), - meta: { - title: '系统首页', - icon: 'dashboard' + children: [ + { + path: 'dashboard', + name: '系统首页', + component: () => import('@/views/dashboard/index'), + meta: { + title: '系统首页', + icon: 'dashboard' + } } - }, ] } ] diff --git a/src/store/index.js b/src/store/index.js index 76ec425..78783fe 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -18,5 +18,8 @@ const store = new Vuex.Store({ getters }) -store.dispatch('app/getVillageCodes') +function initVillage () { + store.dispatch('app/getVillageCodes') +} +initVillage() export default store diff --git a/src/styles/bigscreen.scss b/src/styles/bigscreen.scss new file mode 100644 index 0000000..b077653 --- /dev/null +++ b/src/styles/bigscreen.scss @@ -0,0 +1,112 @@ +$word-color: #59d4fc; +$card-color: rgba(6, 34, 108, 0.55); + +.color-word { + color: $word-color; +} +.color-white { + color: #fff; +} +//浮动 +.float-r { + float: right; +} + +//浮动 +.float-l { + float: left; +} + +// 字体加粗 +.fw-b { + font-weight: bold; +} + +//文章一行显示,多余省略号显示 +.title-item { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +//flex +.d-flex { + display: flex; +} +.flex-column { + flex-direction: column; +} +.flex-wrap { + flex-wrap: wrap; +} +.flex-nowrap { + flex-wrap: nowrap; +} +.flex-1 { + flex: 1; +} +$flex-jc: ( + start: flex-start, + end: flex-end, + center: center, + between: space-between, + around: space-around, + evenly: space-evenly, +); + +$flex-ai: ( + start: flex-start, + end: flex-end, + center: center, + stretch: stretch, +); +//对齐 +@each $var in (left, center, right) { + .text-#{$var} { + text-align: $var !important; + } +} + +//flex +@each $key, $value in $flex-jc { + .jc-#{$key} { + justify-content: $value; + } +} + +@each $key, $value in $flex-ai { + .ai-#{$key} { + align-items: $value; + } +} + +.bs-card { + background: $card-color; + border-radius: 10px; + padding: 20px 25px; + + &__title { + font-size: 24px; + font-weight: 500; + display: flex; + align-content: center; + + &--text { + color: #59d4fc; + position: relative; + padding-left: 22px; + + &::before { + content: ""; + width: 12px; + height: 18px; + background: linear-gradient(to left, #499eee, #499eee); + clip-path: polygon(0 0,55% 0, 100% 50%, 55% 100%, 0 100%); + + position: absolute; + left: 0; + top: calc(50% - 9px); + } + } + } +} diff --git a/src/views/bigSreen/component/Bottom.vue b/src/views/bigSreen/component/Bottom.vue new file mode 100644 index 0000000..bd5edaf --- /dev/null +++ b/src/views/bigSreen/component/Bottom.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/src/views/bigSreen/component/Center.vue b/src/views/bigSreen/component/Center.vue new file mode 100644 index 0000000..b21e0fd --- /dev/null +++ b/src/views/bigSreen/component/Center.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/src/views/bigSreen/component/CenterLeft.vue b/src/views/bigSreen/component/CenterLeft.vue new file mode 100644 index 0000000..24a04f1 --- /dev/null +++ b/src/views/bigSreen/component/CenterLeft.vue @@ -0,0 +1,261 @@ + + + + + diff --git a/src/views/bigSreen/component/CenterRight.vue b/src/views/bigSreen/component/CenterRight.vue new file mode 100644 index 0000000..d52aacd --- /dev/null +++ b/src/views/bigSreen/component/CenterRight.vue @@ -0,0 +1,799 @@ + + + + + diff --git a/src/views/bigSreen/component/top.vue b/src/views/bigSreen/component/top.vue new file mode 100644 index 0000000..8219af2 --- /dev/null +++ b/src/views/bigSreen/component/top.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/views/bigSreen/index.vue b/src/views/bigSreen/index.vue new file mode 100644 index 0000000..3963bf7 --- /dev/null +++ b/src/views/bigSreen/index.vue @@ -0,0 +1,76 @@ + + + + + + diff --git a/src/views/bigSreen/mixin.js b/src/views/bigSreen/mixin.js new file mode 100644 index 0000000..b3a3747 --- /dev/null +++ b/src/views/bigSreen/mixin.js @@ -0,0 +1,57 @@ +// 屏幕适配 mixin 函数 + +// * 默认缩放值 +const scale = { + width: '1', + height: '1', +} + +// * 设计稿尺寸(px) +const baseWidth = 1920 +const baseHeight = 1080 + +// * 需保持的比例(默认1.77778) +const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5)) + +export default { + data() { + return { + // * 定时函数 + drawTiming: null + } + }, + mounted () { + this.calcRate() + window.addEventListener('resize', this.resize) + }, + beforeDestroy () { + window.removeEventListener('resize', this.resize) + }, + methods: { + calcRate () { + const appRef = this.$refs["appRef"] + if (!appRef) return + // 当前宽高比 + const currentRate = parseFloat((window.innerWidth / window.innerHeight).toFixed(5)) + if (appRef) { + if (currentRate > baseProportion) { + // 表示更宽 + scale.width = ((window.innerHeight * baseProportion) / baseWidth).toFixed(5) + scale.height = (window.innerHeight / baseHeight).toFixed(5) + appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)` + } else { + // 表示更高 + scale.height = ((window.innerWidth / baseProportion) / baseHeight).toFixed(5) + scale.width = (window.innerWidth / baseWidth).toFixed(5) + appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)` + } + } + }, + resize () { + clearTimeout(this.drawTiming) + this.drawTiming = setTimeout(() => { + this.calcRate() + }, 200) + } + }, +} diff --git a/src/views/customer/component/addCustomer.vue b/src/views/customer/component/addCustomer.vue index 8c2f83b..383fff3 100644 --- a/src/views/customer/component/addCustomer.vue +++ b/src/views/customer/component/addCustomer.vue @@ -107,7 +107,7 @@ -