dev
xiaowen 3 years ago
parent 6b9e290830
commit 928c5a06d3

@ -2,7 +2,6 @@
"component": true,
"usingComponents": {
"c-echars": "../../c-echars/index",
"time-component":"/components/timecomponent/index",
"time-channel": "/components/time-channel/index"
"time-component":"/components/timecomponent/index"
}
}

@ -1,10 +1,5 @@
<view>
<!-- 时间组件 -->
<view class="v-t-outer">
<time-channel></time-channel>
</view>
<!-- <time-component></time-component> -->
<time-component></time-component>
<view class="trend">
<view class="text">入库数据趋势</view>
<view class="trend_tu">

@ -1,89 +0,0 @@
import moment from "moment"
import Dialog from "../../miniprogram_npm/@vant/weapp/dialog/dialog"
Component({
data: {
start: moment().format("YYYY-MM-DD HH:mm:ss"),
startTime: moment().valueOf(),
end: moment().format("YYYY-MM-DD HH:mm:ss"),
endTime: moment().valueOf(),
show1: false,
show2: false,
dt: '',
dt1: '',
showDialog: false
},
methods: {
onDisplay() {
this.setData({
show1: true
});
},
onDisplay1() {
this.setData({
show2: true
});
},
onInput(event) {
let dt = moment(event.detail).format("YYYY-MM-DD HH:mm:ss");
this.setData({
dt: dt
});
},
onInput1(event) {
let dt = moment(event.detail).format("YYYY-MM-DD HH:mm:ss");
this.setData({
dt1: dt,
});
},
onConfirm() {
let isBefore = moment(this.data.dt).isBefore(this.data.dt1)
if(!isBefore) {
Dialog.alert({
title: '注意',
message: '开始时间不能大于结束时间',
zIndex: 1000
}).then(() => {
// on close
});
return
}
this.setData({
show1: false,
start: this.data.dt
});
},
onConfirm1() {
let isBefore = moment(this.data.dt).isBefore(this.data.dt1)
if(!isBefore) {
Dialog.alert({
title: '注意',
message: '开始时间不能大于结束时间',
zIndex: 1000
}).then(() => {
// on close
});
return
}
this.setData({
show2: false,
end: this.data.dt1
});
},
onCancel() {
this.setData({
show1: false,
});
},
onCancel1() {
this.setData({
show2: false,
});
},
cdialog() {
this.setData({
showDialog: false,
});
}
},
})

@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

@ -1,22 +0,0 @@
<view class="tc-outer">
<van-tabs type="card">
<van-tab title="二十四小时"></van-tab>
<van-tab title="最近七天"></van-tab>
<van-tab title="最近三十天"></van-tab>
<van-tab title="自定义">
<van-cell title="选择开始时间" is-link value="{{ start }}" bind:click="onDisplay" />
<van-cell title="选择结束时间" is-link value="{{ end }}" bind:click="onDisplay1" />
<van-popup show="{{ show1 }}" position="bottom">
<van-datetime-picker type="datetime" value="{{startTime}}" bind:input="onInput" bind:confirm="onConfirm"
bind:cancel="onCancel" />
</van-popup>
<van-popup show="{{ show2 }}" position="bottom">
<van-datetime-picker type="datetime" value="{{endTime}}" bind:input="onInput1" bind:confirm="onConfirm1"
bind:cancel="onCancel1" />
</van-popup>
<van-dialog use-slot title="注意" show="{{ showDialog }}" bind:confirm="cdialog">
<view class="tc-d-t">结束时间不能小于开始时间</view>
</van-dialog>
</van-tab>
</van-tabs>
</view>

@ -1,7 +0,0 @@
.tc-d-t {
font-size: 14px;
padding: 15px 0px;
color: #909497;
text-align: center;
}

@ -2,5 +2,6 @@
"usingComponents": {
},
"component": true,
"navigationStyle": "custom"
}

@ -2,8 +2,7 @@
<view class="navigation nav-top" style="background: #006BFF">
<view class="bs-top-title">硕为思汽车智能洞查</view>
<view class="bs-top">
<van-icon size="26px" color="#fff" name="arrow-left" style="background: #006BFF" />
<van-search style="width: 100%;" shape="round" background="#006BFF" value="{{ value }}" placeholder="请输入品牌" />
<van-search style="width: 100%;" background="#006BFF" value="{{ value }}" placeholder="请输入品牌" />
</view>
<view class="bs-tabs">
<scroll-view class="bs-tab-sv" scroll-x="true">

@ -46,13 +46,13 @@
}
.bs-bar {
position: relative;
}
.bs-bar .van-index-anchor-wrapper {
background: #F9F9F9;
}
.bs-bar .van-index-bar__sidebar {
top: 63%;
top: 63% !important;
}
/*横向列表项*/
.bs-tabs {

@ -9,6 +9,5 @@
"atlas-child":"../../components/indexCom/atlasChild/index",
"portrait-child":"../../components/indexCom/portraitChild/index",
"ranking-child":"../../components/indexCom/rankingChild/index"
}
}

@ -29,11 +29,25 @@ const words = [
]
Page({
data: {
minHour: 10,
maxHour: 20,
// minDate: new Date().getTime(),
// maxDate: new Date().getTime(),
currentDate: new Date().getTime(),
active: 0,
navData: [{
text: '品牌洞察',
component: 'data-child'
},
{
text: '车型洞察',
component: 'media-child'
},
{
text: '事件洞察',
component: 'sound-child'
},
{
text: '主题分析',
component: 'barometer-child'
}
],
dataArr:[{title: 'a', up: false}, {title: 'b', up: false}]
},
onShow() {
this.getTabBar().init();

@ -1,6 +1,5 @@
{
"usingComponents": {
"time-channel": "../../components/time-channel/index",
"time-component": "../../components/timecomponent/index"
},
"navigationStyle": "custom"

@ -1,9 +1,11 @@
<view class="view-page">
<view class="navigation nav-top" style="background: #006BFF">
<view class="bs-top-title">品牌洞察</view>
<view class="v-t-outer">
<time-component></time-component>
<!-- <time-channel></time-channel> -->
</view>
<view class="bs-top-title">硕为思汽车智能洞察</view>
<van-tabs class="menu-tabs" active="{{ active }}">
<van-tab wx:for="{{navData}}" title="{{item.text}}" wx:key="index">
</van-tab>
</van-tabs>
</view>
<view style="height: 180px;"></view>
<c-dropdown tabs="{{dataArr}}"></c-dropdown>
</view>

@ -54,5 +54,24 @@
.bs-bar .van-index-bar__sidebar {
top: 63%;
}
.menu-tabs .van-tabs__nav{
background-color: #006BFF;/* 标签背景颜色 */
}
.menu-tabs .van-tab {
color: #98CDFF; /* 字体颜色 */
background-color: #006BFF;/* 标签背景颜色 */
}
.menu-tabs .van-tab--active{
color: #FFFFFF; /* 字体颜色 */
font-size: 17px;
}
.menu-tabs .van-tabs__line {
background: transparent;
}
.a {
position: relative;
display: flex;
justify-content: flex-start;
}
Loading…
Cancel
Save