Commit bbc0adbf by jack

新增页面

1 parent c8519dcb
<template> <template>
<div id="app"> <div id="app">
<router-view /> <router-view />
</div> </div>
</template> </template>
<script> <script>
//import HelloWorld from './components/HelloWorld.vue' //import HelloWorld from './components/HelloWorld.vue'
export default { export default {
name: 'App' name: "App",
} };
</script> </script>
<style> <style>
...@@ -18,4 +18,58 @@ export default { ...@@ -18,4 +18,58 @@ export default {
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
color: #2c3e50; color: #2c3e50;
} }
.a_input::-webkit-input-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #c3c3c3;
letter-spacing: 0;
}
/* Firefox 4-18 */
.a_input:-moz-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #c3c3c3;
letter-spacing: 0;
}
/* Firefox 19-50 */
.a_input::-moz-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #c3c3c3;
letter-spacing: 0;
}
/* - Internet Explorer 10–11
- Internet Explorer Mobile 10-11 */
.a_input:-ms-input-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #c3c3c3;
letter-spacing: 0;
}
/* Edge (also supports ::-webkit-input-placeholder) */
.a_input::-ms-input-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #c3c3c3;
letter-spacing: 0;
}
/* CSS Working Draft */
.a_input::placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #c3c3c3;
letter-spacing: 0;
}
.nav_page {
min-height: 100vh;
background: #f1f2f3;
padding-top: 46px;
box-sizing: border-box;
}
</style> </style>
.page {
min-height: 100vh;
background: #f1f2f3;
padding-top: 46px;
box-sizing: border-box;
}
.content {
background: #FFFFFF;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
border-radius: 8px;
margin: 16px;
padding: 16px;
.cell {
margin-bottom: 16px;
.title {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
letter-spacing: 0;
margin-bottom: 4px;
.cred {
color: #f00;
}
}
.a_input {
background: #FFFFFF;
border: 1px solid #DDDDDD;
border-radius: 2px;
width: 100%;
min-height: 32px;
box-sizing: border-box;
padding: 0 6px;
}
}
.cell:last-child {
margin: 0;
}
}
.btn_group {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: #FFFFFF;
height: 68px;
.btn {
border: 0;
font-family: PingFangSC-Regular;
font-size: 16px;
color: #FFFFFF;
letter-spacing: 0;
text-align: center;
line-height: 22px;
}
.btn_cancel {
background: #A2A2A2;
border-radius: 22px 0 0 22px;
}
.btn_primary {
background: #3B74C5;
border-radius: 0 22px 22px 0;
}
}
\ No newline at end of file \ No newline at end of file
.add_icon {
width: 32px;
height: 32px;
}
/deep/ .van-search__content {
background: #fff;
}
.search_box {
margin-top: 46px;
}
.car_list {
padding-bottom: 50px;
}
.car_cell {
background: #FFFFFF;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
border-radius: 8px;
margin: 10px 16px 16px 16px;
padding: 16px;
box-sizing: border-box;
.info {
display: flex;
align-items: center;
margin-bottom: 16px;
.avatar {
width: 74px;
height: 36px;
img {
width: 36px;
height: 100%;
}
}
.plate {
flex: 1;
//margin-left: 40px;
font-family: PingFangSC-Medium;
font-size: 14px;
color: #437FCC;
letter-spacing: 0;
}
.more {
padding: 0 4px;
img {
width: 4px;
}
}
}
.cell_list {
.cell {
display: flex;
align-items: center;
margin:10px 0;
.name {
width: 74px;
font-family: PingFangSC-Medium;
font-size: 14px;
color: #333333;
letter-spacing: 0;
}
.txt {
flex: 1;
//padding-left: 36px;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #666666;
letter-spacing: 1px;
}
}
}
.status_box {
position:relative;
display: flex;
align-items: center;
padding: 12px 0;
.name {
width: 74px;
font-family: PingFangSC-Medium;
font-size: 14px;
color: #333333;
letter-spacing: 0;
}
.txt {
display: flex;
align-items: center;
.tag {
min-width: 40px;
height: 20px;
background: #FF3B3B;
border-radius: 2px;
text-align: center;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #FFFFFF;
margin: 0 12px 0 0;
box-sizing: border-box;
}
}
}
.status_box:after{
display:block;
content:"";
height:1px;
background:#EEEEEE;
position:absolute;
left:0;
right:0;
top:0;
}
}
.action_list {
width: 120px;
box-sizing: border-box;
.line {
position: relative;
display: flex;
align-items: center;
padding: 8px 0 8px 8px;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #FFFFFF;
margin: 5px 0;
img {
width: 20px;
height: 20px;
margin-right: 9px;
}
}
.line:after {
display: block;
content: "";
height: 1px;
background: #fff;
position: absolute;
left: 37px;
bottom: 0;
right: 10px;
opacity: 0.5;
transform: scaleY(0.5);
}
.line:last-child:after {
display: none;
}
}
\ No newline at end of file \ No newline at end of file
.car_info {
//height: 140px;
background: #FFFFFF;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
//padding: 0 16px;
.head {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 32px;
.name {
font-family: PingFangSC-Medium;
font-size: 14px;
color: #437FCC;
letter-spacing: 0;
}
.right {
display: flex;
align-items: center;
.tag {
min-width: 40px;
height: 20px;
background: #FF3B3B;
border-radius: 2px;
text-align: center;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #FFFFFF;
margin-left: 12px;
}
}
}
.head:after {
position: absolute;
display: block;
content: "";
height: 1px;
background: #eee;
bottom: 0;
left: 16px;
right: 16px;
}
.cell_box {
padding: 16px 32px;
.line {
display: flex;
margin-bottom: 6px;
.name {
width: 60px;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
letter-spacing: 0;
}
.txt {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #666666;
letter-spacing: 1px;
p {
margin: 0 0 6px 0;
padding: 0;
}
}
}
}
}
.device_list {
margin: 16px;
background: #FFFFFF;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
border-radius: 8px;
.cell {
position: relative;
display: flex;
align-items: center;
height: 54px;
padding-right: 16px;
.status {
min-width: 66px;
height: 24px;
background: rgba(77, 138, 210, 0.15);
font-family: PingFangSC-Regular;
font-size: 14px;
color: #3B74C5;
letter-spacing: 0;
text-align: center;
line-height: 24px;
margin-right: 12px;
}
.cgrey {
background: rgba(238, 238, 238, 1);
color: #999;
}
.info {
flex: 1;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
letter-spacing: 0;
}
}
.cell:after {
display: block;
content: "";
height: 1px;
background: #eee;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.cell:last-child::after {
display: none;
}
.cell:active {
background: #f2f3f5;
}
}
// tabbar
.tabbar_box {
/deep/ .van-tabs__line {
background-color: #3B74C5;
}
/deep/ .van-tab {
/deep/ .van-tab__text {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #999999;
letter-spacing: 0;
}
}
/deep/ .van-tab--active {
/deep/ .van-tab__text {
font-family: PingFangSC-Medium;
font-size: 14px;
color: #3B74C5;
letter-spacing: 0;
}
}
}
.content_box {
padding: 16px;
.panel_box {
background: #FFFFFF;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
border-radius: 4px;
padding: 0 16px;
.title_box {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 0;
.left {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
letter-spacing: 0;
line-height: 14px;
.sp2 {
font-family: PingFangSC-Medium;
font-size: 20px;
color: #437FCC;
line-height: 20px;
}
}
.right {
display: flex;
align-items: center;
.tag {
width: 40px;
height: 14px;
background: #EEEEEE;
border-radius: 2px;
font-family: PingFangSC-Regular;
font-size: 10px;
color: #999999;
text-align: center;
margin-left: 10px;
}
.active {
background: rgba(77, 138, 210, 0.15);
color: #3B74C5;
}
}
}
.title_box:after {
display: block;
content: "";
height: 1px;
background: #eee;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.list_box {
.tab_tr {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #666666;
letter-spacing: 0;
padding: 6px 0;
}
.tab_tr:after {
display: block;
position: absolute;
content: "";
height: 1px;
background: #eee;
left: 0;
right: 0;
bottom: 0;
transform: scaleY(0.5);
}
.tab_tr:last-child:after {
display: none;
}
.tab_head {
font-family: PingFangSC-Regular;
font-size: 12px;
color: #333333;
letter-spacing: 0;
}
.tab_head:after {
display: none;
}
}
.tab_more {
text-align: center;
font-family: PingFangSC-Regular;
font-size: 10px;
color: #999999;
letter-spacing: 0;
padding: 10px 0;
.sp {
margin-right: 4px;
}
}
}
}
\ No newline at end of file \ No newline at end of file
...@@ -128,51 +128,3 @@ ...@@ -128,51 +128,3 @@
text-decoration: underline; text-decoration: underline;
} }
} }
.a_input::-webkit-input-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #C3C3C3;
letter-spacing: 0;
}
/* Firefox 4-18 */
.a_input:-moz-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #C3C3C3;
letter-spacing: 0;
}
/* Firefox 19-50 */
.a_input::-moz-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #C3C3C3;
letter-spacing: 0;
}
/* - Internet Explorer 10–11
- Internet Explorer Mobile 10-11 */
.a_input:-ms-input-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #C3C3C3;
letter-spacing: 0;
}
/* Edge (also supports ::-webkit-input-placeholder) */
.a_input::-ms-input-placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #C3C3C3;
letter-spacing: 0;
}
/* CSS Working Draft */
.a_input::placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #C3C3C3;
letter-spacing: 0;
}
\ No newline at end of file \ No newline at end of file
.page {
min-height: 100vh;
}
.top_info {
background: #FFFFFF;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
display: flex;
align-items: center;
height: 96px;
padding: 0 16px;
.avatar {
width: 48px;
height: 48px;
margin-right: 16px;
img {
width: 100%;
height: 100%;
}
}
.info {
.h2,
.h3 {
margin: 0;
padding: 0;
}
.h2 {
font-family: PingFangSC-Semibold;
font-size: 16px;
color: #191E22;
}
.h3 {
font-family: PingFangSC-Regular;
font-size: 12px;
color: #333333;
font-weight: normal;
margin-top: 12px;
}
}
}
.menu_list {
background: #FFFFFF;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
border-radius: 8px;
margin: 15px;
overflow:hidden;
.cell {
position: relative;
display: flex;
align-items: center;
padding: 0 16px;
height: 54px;
.icon {
width: 18px;
height: 18px;
margin-right: 10px;
}
.txt {
flex: 1;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #2C2C2C;
letter-spacing: 0;
line-height: 20px;
}
}
.cell:after {
display: block;
content: "";
height: 1px;
position: absolute;
left: 16px;
right: 16px;
bottom: 0;
background: #DEDEDE;
transform: scaleY(0.5);
opacity: 0.6;
}
.cell:last-child:after {
display: none;
}
.cell:active {
background: #f2f3f5;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -10,7 +10,7 @@ Vue.config.productionTip = false ...@@ -10,7 +10,7 @@ Vue.config.productionTip = false
/** /**
* 引入vant常用组件 * 引入vant常用组件
*/ */
import 'vant/lib/index.css'; //import 'vant/lib/index.css';
import '@/permission'; import '@/permission';
new Vue({ new Vue({
......
...@@ -6,11 +6,50 @@ Vue.use(Router) ...@@ -6,11 +6,50 @@ Vue.use(Router)
export default new Router({ export default new Router({
//mode: 'history', //mode: 'history',
// base:'mobile', // base:'mobile',
routes: [{ routes: [
path: '/', {
name: 'index', path: '/',
meta: '登录', name: 'login',
component: () => import('@/views/login/index') meta: '登录',
}, component: () => import('@/views/login/index'),
] },
{
path: '/index',
name: 'index',
meta: '首页',
component: () => import('@/views/tabbar/index'),
children: [
{
path: '/car',
name: 'carTabbar',
meta: '试驾车辆',
component: () => import('@/views/tabbar/car'),
},
{
path: '/my',
name: 'myTabbar',
meta: '我的',
component: () => import('@/views/tabbar/my'),
},
],
},
{
path: '/car/add',
name: 'addCar',
meta: '新增车辆',
component: () => import('@/views/car/add'),
},
{
path: '/car/device',
name: 'carDevice',
meta: '车辆详情',
component: () => import('@/views/car/device'),
},
{
path: '/car/detail',
name: 'carDetail',
meta: '车辆详情',
component: () => import('@/views/car/detail'),
},
],
}) })
<template>
<div class="page">
<!-- 导航 开始 -->
<van-nav-bar :title="this.$route.meta" left-arrow right-text="保存" @click-left="onClickLeft" fixed>
<!-- <template #right>
<van-button size="small" type="primary">保存</van-button>
</template> -->
</van-nav-bar>
<!-- 导航 end -->
<!-- 内容 区域 开始 -->
<div class="content">
<div class="cell">
<div class="title">车牌号</div>
<div class="input_box">
<input type="text" class="a_input" placeholder="请输入车牌号" />
</div>
</div>
<div class="cell">
<div class="title"><span class="cred">*</span>车架号</div>
<div class="input_box">
<input type="text" class="a_input" placeholder="请输入车架号" />
</div>
</div>
<div class="cell">
<div class="title"><span class="cred">*</span>设备号</div>
<div class="input_box">
<input type="text" class="a_input" placeholder="请输入设备号" />
</div>
</div>
<div class="cell">
<div class="title">报警通知</div>
<div class="input_box">
<input type="text" class="a_input" placeholder="电话号码(两个及以下),用逗号隔开" />
</div>
</div>
<div class="cell">
<div class="title">备注</div>
<div class="input_box">
<!-- <input type="textarea" class="a_input" placeholder="请输入备注信息" /> -->
<van-field type="textarea" rows="2" v-model="form.text" autosize class="a_input" placeholder="请输入备注信息" />
</div>
</div>
</div>
<!-- 内容 区域 end -->
<!-- 底部按钮 开始 -->
<!-- <div class="btn_group">
<button class="btn btn_cancel">取消</button>
<button class="btn btn_primary">确认</button>
</div> -->
<!-- 底部按钮 end -->
</div>
</template>
<script>
import { NavBar, Field, Button } from "vant";
export default {
components: {
[NavBar.name]: NavBar,
[Field.name]: Field,
[Button.name]: Button,
},
data() {
return {
form: {},
};
},
mounted() {},
methods: {
// 返回
onClickLeft() {
this.$router.go(-1);
},
},
};
</script>
<style lang="less" scoped>
@import url("@/assets/styles/add.less");
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="page nav_page">
<!-- 导航 开始 -->
<van-nav-bar :title="this.$route.meta" left-arrow @click-left="onClickLeft" fixed>
</van-nav-bar>
<!-- 导航 end -->
<!-- 车辆信息 开始 -->
<div class="car_info">
<div class="head">
<span class="name">粤B-110V6</span>
<div class="right">
<div class="tag">断电</div>
<div class="tag">离线</div>
</div>
</div>
<div class="cell_box">
<div class="line">
<div class="name">设备号</div>
<div class="txt">
1234567890
</div>
</div>
<div class="line">
<div class="name">车架号</div>
<div class="txt">
LFPM4ACP1B1A08953
</div>
</div>
</div>
<!-- tabbar 开始 -->
<div class="tabbar_box">
<van-tabs v-model="active" title-active-color="#3B74C5">
<van-tab title="本车油耗" name="1"></van-tab>
<van-tab title="本车里程" name="2"></van-tab>
<van-tab title="本车试驾" name="3"></van-tab>
<van-tab title="本车报警" name="4"></van-tab>
<van-tab title="操作日志" name="5"></van-tab>
</van-tabs>
</div>
<!-- tabbar end -->
</div>
<!-- 车辆信息 end -->
<!-- 内容 开始 -->
<div class="content_box">
<div class="panel_box">
<div class="title_box">
<div class="left">
<span>油耗统计</span>
<span class="sp2">30L</span>
</div>
<div class="right">
<div class="tag" :class="tagName == item.id?'active':''" v-for="item in monthList" :key="item.id" @click="monthEvent(item)">{{item.name}}</div>
</div>
</div>
<div class="list_box">
<div class="tab_tr tab_head">
<span class="time">时间</span>
<span class="txt">油耗</span>
</div>
<div class="tab_tr" v-for="item in 5" :key="item">
<span class="time">2020/04/06</span>
<span class="txt">6L</span>
</div>
<div class="tab_more">
<span class="sp">展开查看全部</span> <van-icon name="arrow-down" />
</div>
</div>
</div>
</div>
<!-- 内容 end -->
</div>
</template>
<script>
import { NavBar, Icon, Tab, Tabs } from "vant";
export default {
components: {
[NavBar.name]: NavBar,
[Icon.name]: Icon,
[Tab.name]: Tab,
[Tabs.name]: Tabs,
},
data() {
return {
active: "1",
monthList: [
{ name: "本周", id: 1 },
{ name: "本月", id: 2 },
{ name: "上月", id: 3 },
],
tagName: 1,
};
},
mounted() {},
methods: {
// 返回
onClickLeft() {
this.$router.go(-1);
},
// 日期切换
monthEvent(row) {
this.tagName = row.id;
},
},
};
</script>
<style lang="less" scoped>
@import url("@/assets/styles/device.less");
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="page nav_page">
<!-- 导航 开始 -->
<van-nav-bar :title="this.$route.meta" left-arrow @click-left="onClickLeft" fixed>
</van-nav-bar>
<!-- 导航 end -->
<!-- 车辆信息 开始 -->
<div class="car_info">
<div class="head">
<span class="name">粤B-110V6</span>
<div class="right">
<div class="tag">断电</div>
<div class="tag">离线</div>
</div>
</div>
<div class="cell_box">
<div class="line">
<div class="name">设备号</div>
<div class="txt">
<p>1234567890</p>
<p>1234567890</p>
</div>
</div>
<div class="line">
<div class="name">车架号</div>
<div class="txt">
LFPM4ACP1B1A08953
</div>
</div>
</div>
</div>
<!-- 车辆信息 end -->
<!-- 设备列表 开始 -->
<div class="device_list">
<div class="cell" @click="lookDetail()">
<div class="status">当前</div>
<div class="info">设备号:1234657890</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
<div class="cell">
<div class="status">当前</div>
<div class="info">设备号:1234657890</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
<div class="cell">
<div class="status cgrey">历史</div>
<div class="info">设备号:1234657890</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
</div>
<!-- 设备列表 end -->
</div>
</template>
<script>
import { NavBar, Icon } from "vant";
export default {
components: {
[NavBar.name]: NavBar,
[Icon.name]: Icon,
},
data() {
return {};
},
mounted() {},
methods: {
// 返回
onClickLeft() {
this.$router.go(-1);
},
//查看详情
lookDetail() {
this.$router.push({ name: "carDetail" });
},
},
};
</script>
<style lang="less" scoped>
@import url("@/assets/styles/device.less");
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="page">
</div>
</template>
<script>
import {} from "@/http/interface";
import {} from "@/common/util";
export default {
data() {
return {
form: {},
loading: false,
};
},
mounted() {},
methods: {
/** 获取验证码 */
getCode() {
let that = this;
let time = 60;
let o = this.form;
if (!o.mobile) {
showToast({
message: "请输入手机号码",
});
return false;
}
if (!o.mobile) {
showToast({
message: "请输入手机号码",
});
return false;
}
let m = setInterval(function () {
if (time == 0) {
clearInterval(m);
that.time = "";
return false;
}
time--;
that.time = time--;
}, 1000);
let oParams = {};
oParams.mobile = o.mobile;
oParams.inviterId = this.inviterId;
SENDCODE(oParams).then((res) => {
console.log(res);
});
},
/** 保存 */
save() {
let _this = this;
let o = this.form;
let oParams = {};
oParams.inviterId = getUrlParams("id");
oParams.mobile = o.mobile;
oParams.inviteCode = o.code;
if (!o.mobile) {
showToast({
message: "请输入手机号码",
});
return false;
}
if (!o.mobile) {
showToast({
message: "请输入手机号码",
});
return false;
}
if (!o.code) {
showToast({
message: "请输入验证码",
});
return false;
}
showLoading();
this.loading = true;
INVITEREGISTER(oParams).then((res) => {
hideLoading();
_this.loading = false;
if (res.code == 200) {
showToast({
message: "注册成功",
type: "success",
});
_this.$router.push({
name: "down",
});
}
});
},
},
};
</script>
<style lang="less" scoped>
.btn_group {
padding: 60px 0;
text-align: center;
.btn {
background: linear-gradient(90deg, #ff9a48 0%, #ec5175 100%);
box-shadow: 0px 2px 10px 0px rgba(196, 26, 26, 0.5);
border-radius: 30px;
opacity: 0.84;
border: 0;
font-size: 15px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
width: 280px;
height: 50px;
}
.btn:before {
display: none !important;
}
}
.logo {
width: 137px;
height: 137px;
margin: 50px auto 0 auto;
img {
width: 100%;
height: 100%;
}
}
.title {
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #f57573;
line-height: 33px;
text-align: center;
}
.sub_title {
font-size: 24px;
font-family: TRENDS;
color: #f57573;
line-height: 29px;
text-align: center;
margin-top: 34px;
}
.login_box {
padding: 0 20px;
margin-top: 40px;
}
.input_box {
.left_icon {
width: 14px;
float: left;
margin-right: 4px;
}
}
.code_box {
position: relative;
padding-left: 10px;
.code {
background: none;
border: 0;
color: #333;
}
}
.code_box:after {
position: absolute;
display: block;
content: "";
width: 1px;
height: 50%;
left: 0px;
background: #d8d8d8;
top: 50%;
transform: translate(0, -50%);
}
</style>
<template>
<div class="page">
<!-- 导航 开始 -->
<van-nav-bar :title="this.$route.meta" fixed>
<template #right>
<img src="@/assets/add.png" class="add_icon" alt="" @click="goAdd" />
</template>
</van-nav-bar>
<!-- 导航 end -->
<!-- 搜索区域 开始 -->
<div class="search_box">
<van-search v-model="searchText" shape="round" left-icon="" background="#f1f2f3" placeholder="车牌号/车架号/设备号" />
</div>
<!-- 搜索区域 end -->
<!-- 车辆列表 开始 -->
<div class="car_list">
<div class="car_cell" v-for="(item,index) in list" :key="index">
<div class="info">
<div class="avatar"><img src="@/assets/car.png" alt="" /></div>
<div class="plate">粤B-110V6</div>
<div class="more">
<van-popover v-model="item.show" placement="left" trigger="click">
<div class="action_list">
<div class="line">
<img src="@/assets/edit.png" alt="">
<span>编辑</span>
</div>
<div class="line" @click="lookDetail()">
<img src="@/assets/detail.png" alt="">
<span>查看详情</span>
</div>
<div class="line">
<img src="@/assets/del.png" alt="">
<span>删除</span>
</div>
</div>
<template #reference>
<img src="@/assets/more.png" alt="">
</template>
</van-popover>
</div>
</div>
<div class="cell_list">
<div class="cell">
<span class="name">设备号</span>
<div class="txt">1234567890</div>
</div>
<div class="cell">
<span class="name">车架号</span>
<div class="txt">LFPM4ACP1B1A08953</div>
</div>
</div>
<div class="status_box">
<div class="name">报警状态</div>
<div class="txt">
<div class="tag">断电</div>
<div class="tag">离线</div>
</div>
</div>
</div>
</div>
<!-- 车辆列表 end -->
</div>
</template>
<script>
import { NavBar, Search, Popover } from "vant";
export default {
components: {
[NavBar.name]: NavBar,
[Search.name]: Search,
[Popover.name]: Popover,
},
data() {
return {
searchText: "",
list: [{}, {}, {}],
};
},
mounted() {},
methods: {
// 新增车辆
goAdd() {
this.$router.push({ name: "addCar" });
},
// 查看详情
lookDetail() {
this.$router.push({ name: "carDevice" });
},
},
};
</script>
<style lang="less" scoped>
@import url("@/assets/styles/car_tabbar.less");
</style>
<style lang="less">
.van-popover__content {
background: rgba(59, 116, 197, 0.8) !important;
}
.van-popover__arrow {
right: 1px !important;
border-left-color: rgba(59, 116, 197, 0.8) !important;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="">
<router-view />
<van-tabbar route>
<van-tabbar-item replace to="/car">
<span>车辆</span>
<template #icon="props">
<img :src="props.active ? carActive : carDefault" />
</template>
</van-tabbar-item>
<van-tabbar-item replace to="/my">
<span>我的</span>
<template #icon="props">
<img :src="props.active ? myActive : myDefault" />
</template>
</van-tabbar-item>
</van-tabbar>
</div>
</template>
<script>
import {} from "@/http/interface";
import {} from "@/common/util";
import { Tabbar, TabbarItem } from "vant";
export default {
components: {
[Tabbar.name]: Tabbar,
[TabbarItem.name]: TabbarItem,
},
data() {
return {
carDefault: require("@/assets/car_default.png"),
carActive: require("@/assets/car_active.png"),
myDefault: require("@/assets/my_default.png"),
myActive: require("@/assets/my_active.png"),
};
},
mounted() {},
methods: {},
};
</script>
<style lang="less" scoped>
.page {
min-height: 100vh;
background: #f1f2f3;
}
</style>
<template>
<div class="page">
<!-- 导航 开始 -->
<!-- <van-nav-bar :title="this.$route.meta" fixed>
</van-nav-bar> -->
<!-- 导航 end -->
<!-- 顶部信息 开始 -->
<div class="top_info">
<div class="avatar">
<img src="@/assets/avatar.png" alt="">
</div>
<div class="info">
<h2 class="h2">成都广汇天府店</h2>
<h3 class="h3">广汇试驾特约店角色</h3>
</div>
</div>
<!-- 顶部信息 end -->
<!-- 菜单列表 开始 -->
<div class="menu_list">
<div class="cell">
<img src="@/assets/icon_01.png" class="icon" alt="">
<div class="txt">油耗统计</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
<div class="cell">
<img src="@/assets/icon_02.png" class="icon" alt="">
<div class="txt">里程统计</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
<div class="cell">
<img src="@/assets/icon_03.png" class="icon" alt="">
<div class="txt">试驾统计</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
<div class="cell">
<img src="@/assets/icon_04.png" class="icon" alt="">
<div class="txt">报警统计</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
<div class="cell">
<img src="@/assets/icon_05.png" class="icon" alt="">
<div class="txt">操作记录</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
</div>
<!-- 菜单列表 end -->
<!-- 修改密码、退出登录 开始 -->
<div class="menu_list">
<div class="cell">
<img src="@/assets/icon_06.png" class="icon" alt="">
<div class="txt">修改密码</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
<div class="cell">
<img src="@/assets/icon_07.png" class="icon" alt="">
<div class="txt">退出</div>
<div class="arrow">
<van-icon name="arrow" />
</div>
</div>
</div>
<!-- 修改密码、退出登录 end -->
</div>
</template>
<script>
import { NavBar, Icon } from "vant";
export default {
components: {
[NavBar.name]: NavBar,
[Icon.name]: Icon,
},
data() {
return {};
},
mounted() {},
methods: {},
};
</script>
<style lang="less" scoped>
@import url("@/assets/styles/my.less");
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!