Compare commits
2 Commits
prod-24-10
...
prod-24-08
Author | SHA1 | Date | |
---|---|---|---|
997f20ee06 | |||
d04304ea7d |
@ -30,7 +30,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script src="https://webapi.amap.com/maps?v=1.4.15&key=2560bbf04daef66c810c5e6a97e8c508&plugin=AMap.Polyline"></script>
|
<script src="https://webapi.amap.com/maps?v=1.4.15&key=2560bbf04daef66c810c5e6a97e8c508&plugin=AMap.Polyline"></script>
|
||||||
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>-->
|
|
||||||
<script>
|
<script>
|
||||||
// VConsole 默认会挂载到 `window.VConsole` 上
|
// VConsole 默认会挂载到 `window.VConsole` 上
|
||||||
// let vConsole = new window.VConsole();
|
// let vConsole = new window.VConsole();
|
||||||
|
@ -162,7 +162,7 @@ export function notifyInvoiceDetail(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 调度app获取新签列表
|
// /supplier/supplierTrainingMaterials/pageList 获取培训材料列表
|
||||||
export function pageList(data){
|
export function pageList(data){
|
||||||
return request({
|
return request({
|
||||||
url:'/supplierAppV2/dispatchApp/user/supplierTrainingMaterialsPageList',
|
url:'/supplierAppV2/dispatchApp/user/supplierTrainingMaterialsPageList',
|
||||||
@ -171,31 +171,6 @@ export function pageList(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 司机app获取新签列表
|
|
||||||
export function driverTrainList(key){
|
|
||||||
return request({
|
|
||||||
url:'/supplier/supplierTraining/trainingTask',
|
|
||||||
method:'GET',
|
|
||||||
params:key
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取普通材料
|
|
||||||
export function getNormalList(key) {
|
|
||||||
return request({
|
|
||||||
url: '/supplier/supplierTraining/normalList',
|
|
||||||
method: 'GET',
|
|
||||||
params:key
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//获取培训材料
|
|
||||||
export function getTrainingList(key) {
|
|
||||||
return request({
|
|
||||||
url: '/supplier/supplierTraining/trainingList',
|
|
||||||
method: 'GET',
|
|
||||||
params:key
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//用户操作权限
|
//用户操作权限
|
||||||
export function userOperationPermissions(){
|
export function userOperationPermissions(){
|
||||||
return request({
|
return request({
|
||||||
|
@ -77,21 +77,3 @@ export function updateOrderSettlement(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 电瓶数量列表
|
|
||||||
export function batteryCountList(){
|
|
||||||
return request({
|
|
||||||
url:'/supplierAppV2/dispatchApp/battery/batteryCountList',
|
|
||||||
method:'POST',
|
|
||||||
contentType:'application/json',
|
|
||||||
// data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 电瓶详情
|
|
||||||
export function batteryDetailList (data){
|
|
||||||
return request({
|
|
||||||
url:'/supplierAppV2/dispatchApp/battery/batteryDetailList',
|
|
||||||
method:'POST',
|
|
||||||
contentType:'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
@ -131,14 +131,6 @@ const routes = [
|
|||||||
path: '/trainDocment',
|
path: '/trainDocment',
|
||||||
name: 'trainDocment',
|
name: 'trainDocment',
|
||||||
component:()=>import('@/views/documentView/trainDocment.vue'),
|
component:()=>import('@/views/documentView/trainDocment.vue'),
|
||||||
meta: {
|
|
||||||
title:'培训文档',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/diverTrainDocment',
|
|
||||||
name: 'diverTrainDocment',
|
|
||||||
component:()=>import('@/views/documentView/diverTrainDocment.vue'),
|
|
||||||
meta: {
|
meta: {
|
||||||
title:'培训文档'
|
title:'培训文档'
|
||||||
}
|
}
|
||||||
@ -188,15 +180,7 @@ const routes = [
|
|||||||
name: 'newTrainingList',
|
name: 'newTrainingList',
|
||||||
component:()=>import('@/views/newcomerTraining/newTrainingList.vue'),
|
component:()=>import('@/views/newcomerTraining/newTrainingList.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title:'新服务商培训'
|
title:'新人培训'
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/driverTrainingList',
|
|
||||||
name: 'driverTrainingList',
|
|
||||||
component:()=>import('@/views/newcomerTraining/driverTrainingList.vue'),
|
|
||||||
meta: {
|
|
||||||
title:'新师傅培训'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -215,22 +199,6 @@ const routes = [
|
|||||||
title:'维保申请'
|
title:'维保申请'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/batteryList',
|
|
||||||
name: 'batteryList',
|
|
||||||
component:()=>import('@/views/battery/batteryList.vue'),
|
|
||||||
meta: {
|
|
||||||
title:'电瓶进销存'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/batteryDetail',
|
|
||||||
name: 'batteryDetail',
|
|
||||||
component:()=>import('@/views/battery/batteryDetail.vue'),
|
|
||||||
meta: {
|
|
||||||
title:'电瓶详情'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
...kpiRouter,
|
...kpiRouter,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
@import "@/styles/mixin.scss";
|
@import "@/styles/mixin.scss";
|
||||||
|
|
||||||
.wrap{
|
.wrap{
|
||||||
@include wh(100%,100%);
|
@include wh(100%,100%);
|
||||||
background-color: #F4F5F7;
|
background-color: #F4F5F7;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.navBar{
|
.navBar{
|
||||||
margin-bottom: 46px;
|
margin-bottom: 46px;
|
||||||
@ -14,44 +13,16 @@
|
|||||||
@include wh(17px, 17px);
|
@include wh(17px, 17px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tab_wrap {
|
|
||||||
@include fontWeightSize(bold, 12px);
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
padding: 5px 0 5px 0;
|
|
||||||
@include colorOpa(#737373,0.7);
|
|
||||||
div {
|
|
||||||
padding-top: 8px;
|
|
||||||
}
|
|
||||||
.active {
|
|
||||||
color: #3678FF;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.active:after {
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
@include wh(50px,2px);
|
|
||||||
background: linear-gradient(270deg, #33A3FF 0%, #176AFE 100%);
|
|
||||||
border-radius: 2px;
|
|
||||||
position: absolute;
|
|
||||||
margin-top: 3px;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.contentWrap{
|
.contentWrap{
|
||||||
@include sizingPadding(0,8px);
|
@include sizingPadding(0,8px);
|
||||||
overflow-y: auto;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 100px);
|
margin-top: 20px;
|
||||||
margin-top: 10px;
|
|
||||||
.itemWrap{
|
.itemWrap{
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
width: 100%;
|
@include wh(100%, 300px);
|
||||||
//@include wh(100%, 300px);
|
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
|
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
|
||||||
@include sizingPadRadius(6px ,0,6px);
|
@include sizingPadRadius(6px ,0,3px);
|
||||||
@include flexAround;
|
@include flexAround;
|
||||||
@include fontWeightSize(400, 12px);
|
@include fontWeightSize(400, 12px);
|
||||||
.flexBetween{
|
.flexBetween{
|
||||||
@ -60,16 +31,18 @@
|
|||||||
.common{
|
.common{
|
||||||
margin: 0 15px ;
|
margin: 0 15px ;
|
||||||
}
|
}
|
||||||
.time{
|
|
||||||
color: rgba(0,0,0,0.7);
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
.imgWrap{
|
.imgWrap{
|
||||||
@include wh(100%,200px);
|
@include wh(100%,200px);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 6px 0;
|
|
||||||
img{
|
img{
|
||||||
@include wh(100%,100%);
|
@include wh(100%,200px);
|
||||||
|
}
|
||||||
|
.name{
|
||||||
|
position: absolute;
|
||||||
|
left: 30px;
|
||||||
|
bottom: 30px;
|
||||||
|
@include fontWeightSize(bold,14px);
|
||||||
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.left{
|
.left{
|
||||||
|
@ -1,103 +0,0 @@
|
|||||||
@import "@/styles/mixin.scss";
|
|
||||||
::v-deep .van-nav-bar__content{
|
|
||||||
background-color: #3A3A3A !important;
|
|
||||||
}
|
|
||||||
.wrap{
|
|
||||||
@include wh(100%,100%);
|
|
||||||
background-color: #F4F5F7;
|
|
||||||
|
|
||||||
}
|
|
||||||
.navBar{
|
|
||||||
margin-bottom: 46px;
|
|
||||||
}
|
|
||||||
.search{
|
|
||||||
color: #AAADB3 !important;
|
|
||||||
font-weight: bolder;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
.navLeft{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
color: #9C9C9C;
|
|
||||||
font-size: 8px;
|
|
||||||
.icon{
|
|
||||||
font-size: 10px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-right: 5px;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.statisticContainer{
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
.statisticWrap{
|
|
||||||
@include wh(100%,100px);
|
|
||||||
background: #FFFFFF;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 8px 8px 15px;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid #c7c1c1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
.line1{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
span:first-child{
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
|
||||||
span:last-child{
|
|
||||||
opacity: .7;
|
|
||||||
//font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.numWrap{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
div{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
span:first-child{
|
|
||||||
margin-bottom: 3px;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.rightWrap {
|
|
||||||
@include flexCenter;
|
|
||||||
.img2 {
|
|
||||||
@include wh(17px, 17px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.driver_tab_wrap {
|
|
||||||
font-size: 12px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
padding: 5px 0 5px 0;
|
|
||||||
div {
|
|
||||||
padding-top: 8px;
|
|
||||||
}
|
|
||||||
.active {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.active:after {
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
@include wh(100px,2px);
|
|
||||||
background-color: #E8A524;
|
|
||||||
border-radius: 2px;
|
|
||||||
position: absolute;
|
|
||||||
margin-top: 3px;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.empty{
|
|
||||||
margin-top: 14px;
|
|
||||||
|
|
||||||
}
|
|
@ -16,20 +16,18 @@ localStorage.setItem('token', token);
|
|||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
let reqUrl=config.url
|
let reqUrl=config.url
|
||||||
// console.log("reqUrl",reqUrl)
|
|
||||||
config.data = config.contentType ? config.data : qs.stringify(config.data)
|
config.data = config.contentType ? config.data : qs.stringify(config.data)
|
||||||
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
||||||
let token = localStorage.getItem('token');
|
let token = localStorage.getItem('token');
|
||||||
|
// alert(token);
|
||||||
// let token='4099761587129c46b03c9316c9e866c9'
|
// let token='4099761587129c46b03c9316c9e866c9'
|
||||||
// let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MTI0NTQ5NTMsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiJDLeS4iua1t-a1i-ivleacjeWKoeWVhiIsInN1cHBsaWVySWQiOjMzMDQxLCJzdXBwbGllclR5cGUiOjIsInVzZXJuYW1lIjoic29uZyIsInVzZXJUeXBlIjoicmVzY3VlQXBwIiwiZGV2aWNlSWQiOiIyMmI0OWNhMjBmOWI4MzMwZDk4NzIxNzNmMzllYTY4YmMiLCJhdXRob3JpdGllcyI6W119LCJzY29wZSI6WyJhbGwiXSwiaXNzIjoiaHR0cHM6Ly9zaW5vYXNzaXN0LmNvbSIsImV4cCI6MTcxMjU0MTM1MywiaWF0IjoxNzEyNDU0OTUzfQ.sPU9_OD_TOWcTwqmlawEGyo4mCPrEaRYw2R02gnvYJw'
|
// let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MTI0NTQ5NTMsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiJDLeS4iua1t-a1i-ivleacjeWKoeWVhiIsInN1cHBsaWVySWQiOjMzMDQxLCJzdXBwbGllclR5cGUiOjIsInVzZXJuYW1lIjoic29uZyIsInVzZXJUeXBlIjoicmVzY3VlQXBwIiwiZGV2aWNlSWQiOiIyMmI0OWNhMjBmOWI4MzMwZDk4NzIxNzNmMzllYTY4YmMiLCJhdXRob3JpdGllcyI6W119LCJzY29wZSI6WyJhbGwiXSwiaXNzIjoiaHR0cHM6Ly9zaW5vYXNzaXN0LmNvbSIsImV4cCI6MTcxMjU0MTM1MywiaWF0IjoxNzEyNDU0OTUzfQ.sPU9_OD_TOWcTwqmlawEGyo4mCPrEaRYw2R02gnvYJw'
|
||||||
|
// console.log("tokentokentoken",token)
|
||||||
if (reqUrl.includes("/driverApp")) {
|
if (reqUrl.includes("/driverApp")) {
|
||||||
// console.log("司机app")
|
|
||||||
config.headers['token'] = `${token}`;
|
config.headers['token'] = `${token}`;
|
||||||
} else if(reqUrl.includes("/supplierApp") || reqUrl.includes("/supplierKPI") || reqUrl.includes('/supplier/select')){
|
} else {
|
||||||
// console.log("调度app,服务商kpi")
|
console.log("调度app")
|
||||||
config.headers['Authorization'] = `${token}`;
|
config.headers['Authorization'] = `${token}`;
|
||||||
}else{
|
|
||||||
config.headers['token'] = `${token}`;
|
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
|
@ -34,26 +34,19 @@ export const myMixins = {
|
|||||||
window.android.sendMessage("goBack");
|
window.android.sendMessage("goBack");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goH5Detail(item,type){//h5传参到app文档资料,培训文档
|
goH5Detail(item){//h5传参到app文档资料,培训文档
|
||||||
// console.log("type",type)
|
|
||||||
let data = {
|
let data = {
|
||||||
"action": "goTraining",
|
"action": "goTraining",
|
||||||
"params": {
|
"params": {
|
||||||
"id":type == '培训文档' ? Number(1000000+item.id) : item.id,
|
"id": item.id,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let u = navigator.userAgent;
|
let u = navigator.userAgent;
|
||||||
let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||||
if(isiOS){
|
if(isiOS){
|
||||||
// console.log("data",data)
|
|
||||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||||
}else {
|
}else {
|
||||||
if(type == '培训文档'){
|
window.android.sendMessage("articleId=" + item.id);
|
||||||
window.android.sendMessage("articleId=" +'q'+ item.id);
|
|
||||||
}else{
|
|
||||||
window.android.sendMessage("articleId=" + item.id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
h5GoBack(){
|
h5GoBack(){
|
||||||
|
@ -1,138 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="wrap" >
|
|
||||||
<div class="navBar">
|
|
||||||
<van-nav-bar
|
|
||||||
title="已售电瓶"
|
|
||||||
left-arrow
|
|
||||||
left-arrow-color="#FFFFFF"
|
|
||||||
:border="false"
|
|
||||||
:fixed="true"
|
|
||||||
:safe-area-inset-top="true"
|
|
||||||
@click-left="h5GoBack"
|
|
||||||
> </van-nav-bar>
|
|
||||||
</div>
|
|
||||||
<div class="container" v-if="batteryDetailList && batteryDetailList.length>0">
|
|
||||||
<div class="itemWrap" v-for="(item,index) in batteryDetailList" :key="index">
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">设备号</span>
|
|
||||||
<span class="allOpci">{{ item.productNo }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">品牌</span>
|
|
||||||
<span class="allOpci">{{ item.brand }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">型号</span>
|
|
||||||
<span class="allOpci">{{ item.model }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">售卖人员</span>
|
|
||||||
<span class="allOpci">{{ item.saleName }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">售卖时间</span>
|
|
||||||
<span class="allOpci">{{ item.createTime }}</span>
|
|
||||||
</div>
|
|
||||||
</div></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import {myMixins} from "@/utils/myMixins"
|
|
||||||
import {batteryDetailList} from "@/api/order"
|
|
||||||
export default {
|
|
||||||
name: "batteryDetail",
|
|
||||||
mixins:[myMixins],
|
|
||||||
data(){
|
|
||||||
return{
|
|
||||||
batteryDetailList:[],
|
|
||||||
isLoading: false,
|
|
||||||
loading: false,
|
|
||||||
brand: '',
|
|
||||||
model:'',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mounted() {
|
|
||||||
this.brand = this.$route.params.brand;
|
|
||||||
this.model = this.$route.params.model;
|
|
||||||
await this.getDetailList()
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
async getDetailList(){
|
|
||||||
let res = await batteryDetailList({
|
|
||||||
brand:this.brand,
|
|
||||||
model:this.model,
|
|
||||||
})
|
|
||||||
this.batteryDetailList=res.data.reverse();
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
@import '@/styles/mixin.scss';
|
|
||||||
@import "@/styles/common.scss";
|
|
||||||
|
|
||||||
.wrap {
|
|
||||||
background: #F4F5F7;
|
|
||||||
@include wh(100%, 100%);
|
|
||||||
}
|
|
||||||
.navBar{
|
|
||||||
margin-bottom: 46px;
|
|
||||||
.rightWrap{
|
|
||||||
@include wh(50px,20px);
|
|
||||||
border-radius: 10px;
|
|
||||||
opacity: 0.7;
|
|
||||||
border: 1px solid #FFFFFF;
|
|
||||||
@include flexTwoCenter;
|
|
||||||
img{
|
|
||||||
@include widHeiMar(9px,8px,4px);
|
|
||||||
}
|
|
||||||
.addTxt{
|
|
||||||
@include fontWeightSize(bolder,11px);
|
|
||||||
@include colorOpa( #FFFFFF,0.7);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.container{
|
|
||||||
@include wh(100%, calc(100% - 56px));
|
|
||||||
overflow-y: auto;
|
|
||||||
@include sizingPadding(13px,13px);
|
|
||||||
}
|
|
||||||
.itemWrap {
|
|
||||||
@include wh(100%, 104px);
|
|
||||||
@include radiusSizing(6px);
|
|
||||||
@include fontWeightSize(400, 12px);
|
|
||||||
@include flexBetween;
|
|
||||||
background: #FFFFFF;
|
|
||||||
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
|
|
||||||
margin-bottom: 10px;
|
|
||||||
padding: 11px 13px 9px 15px;
|
|
||||||
position: relative;
|
|
||||||
.halfOpci {
|
|
||||||
display: inline-block;
|
|
||||||
width: 60px;
|
|
||||||
opacity: .5;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
.allOpci {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.statusNo {
|
|
||||||
color: #FF0000;
|
|
||||||
}
|
|
||||||
.statusYes {
|
|
||||||
color: #09B820
|
|
||||||
}
|
|
||||||
.img{
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
top: 35%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,171 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="wrap" >
|
|
||||||
<div class="navBar">
|
|
||||||
<van-nav-bar
|
|
||||||
title="电瓶进销存"
|
|
||||||
left-arrow
|
|
||||||
left-arrow-color="#FFFFFF"
|
|
||||||
:border="false"
|
|
||||||
:fixed="true"
|
|
||||||
:safe-area-inset-top="true"
|
|
||||||
@click-left="goBack"
|
|
||||||
>
|
|
||||||
</van-nav-bar>
|
|
||||||
</div>
|
|
||||||
<van-field class="input" right-icon="search" v-model="keyword" placeholder="请输入品牌或型号" @input="filterBatteryList"/>
|
|
||||||
<div class="container" v-if="batteryList && batteryList.length>0">
|
|
||||||
<div class="itemWrap" v-for="(item,index) in batteryList" :key="index">
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">品牌</span>
|
|
||||||
<span class="allOpci">{{ item.brand }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">型号</span>
|
|
||||||
<span class="allOpci">{{ item.model }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">总量</span>
|
|
||||||
<span class="allOpci">{{ item.totalNum }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">库存数量</span>
|
|
||||||
<span class="allOpci">{{ item.stockNum }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="halfOpci">已售数量</span>
|
|
||||||
<span class="allOpci">{{ item.sellNum }}</span>
|
|
||||||
</div>
|
|
||||||
<img @click="goBatteryDetail(item)" class="img" src="@/assets/arrow_rht.png" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bgEmptyImg" v-show="show" >
|
|
||||||
<img src="@/assets/empty.png" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import {myMixins} from "@/utils/myMixins"
|
|
||||||
import {batteryCountList} from "@/api/order"
|
|
||||||
export default {
|
|
||||||
name: "batteryList",
|
|
||||||
mixins:[myMixins],
|
|
||||||
data(){
|
|
||||||
return{
|
|
||||||
batteryList:[],
|
|
||||||
isLoading: false,
|
|
||||||
keyword:'',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed:{
|
|
||||||
show() {
|
|
||||||
return (this.batteryList.length < 0 || this.batteryList.length == 0); // 判断数组长度是否大于 0
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
async filterBatteryList(){
|
|
||||||
await this.getList()
|
|
||||||
this.batteryList = this.batteryList.filter(item =>
|
|
||||||
item.brand.includes(this.keyword) || item.model.includes(this.keyword)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
goBatteryDetail(item){//电瓶详情
|
|
||||||
this.$router.push({
|
|
||||||
name: "batteryDetail",
|
|
||||||
params: {
|
|
||||||
brand: item.brand,
|
|
||||||
model: item.model,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async getList(){
|
|
||||||
let res = await batteryCountList()
|
|
||||||
this.batteryList=res.data
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
@import '@/styles/mixin.scss';
|
|
||||||
@import "@/styles/common.scss";
|
|
||||||
|
|
||||||
.wrap {
|
|
||||||
background: #F4F5F7;
|
|
||||||
@include wh(100%, 100%);
|
|
||||||
}
|
|
||||||
.navBar{
|
|
||||||
margin-bottom: 46px;
|
|
||||||
.rightWrap{
|
|
||||||
@include wh(50px,20px);
|
|
||||||
border-radius: 10px;
|
|
||||||
opacity: 0.7;
|
|
||||||
border: 1px solid #FFFFFF;
|
|
||||||
@include flexTwoCenter;
|
|
||||||
img{
|
|
||||||
@include widHeiMar(9px,8px,4px);
|
|
||||||
}
|
|
||||||
.addTxt{
|
|
||||||
@include fontWeightSize(bolder,11px);
|
|
||||||
@include colorOpa( #FFFFFF,0.7);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.input{
|
|
||||||
//@include sizingPadding(13px,13px);
|
|
||||||
//margin: 13px 0;
|
|
||||||
}
|
|
||||||
.container{
|
|
||||||
@include sizingPadding(13px,13px);
|
|
||||||
overflow-y: auto;
|
|
||||||
@include wh(100%, calc(100% - 96px));
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemWrap {
|
|
||||||
@include wh(100%, 104px);
|
|
||||||
@include radiusSizing(6px);
|
|
||||||
@include fontWeightSize(400, 12px);
|
|
||||||
@include flexBetween;
|
|
||||||
background: #FFFFFF;
|
|
||||||
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
|
|
||||||
margin-bottom: 10px;
|
|
||||||
padding: 11px 13px 9px 15px;
|
|
||||||
position: relative;
|
|
||||||
//margin-top: 10px;
|
|
||||||
.halfOpci {
|
|
||||||
display: inline-block;
|
|
||||||
width: 60px;
|
|
||||||
opacity: .5;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
.allOpci {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.statusNo {
|
|
||||||
color: #FF0000;
|
|
||||||
}
|
|
||||||
.statusYes {
|
|
||||||
color: #09B820
|
|
||||||
}
|
|
||||||
.img{
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
top: 35%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.bgEmptyImg{
|
|
||||||
@include flexTwoCenter;
|
|
||||||
height: 90% ;
|
|
||||||
background-color: #FAFAFA;
|
|
||||||
img{
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,175 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="wrap">
|
|
||||||
<div class="navBar">
|
|
||||||
<van-nav-bar
|
|
||||||
:border="false"
|
|
||||||
:fixed="true"
|
|
||||||
:safe-area-inset-top="true"
|
|
||||||
>
|
|
||||||
<template slot="title">
|
|
||||||
<van-field
|
|
||||||
v-model="keyword"
|
|
||||||
placeholder="名称/关键词/简介"
|
|
||||||
>
|
|
||||||
</van-field>
|
|
||||||
</template>
|
|
||||||
<template slot="left">
|
|
||||||
<div class="navLeft" @click="goBack">
|
|
||||||
<van-icon class="icon" name="arrow-left" />
|
|
||||||
<div>返回</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template slot="right">
|
|
||||||
<van-icon class="search" name="search" size="20" @click="getTrainingList"/>
|
|
||||||
</template>
|
|
||||||
</van-nav-bar>
|
|
||||||
</div>
|
|
||||||
<div class="statisticContainer">
|
|
||||||
<div class="statisticWrap">
|
|
||||||
<div class="line1">
|
|
||||||
<span>培训统计</span>
|
|
||||||
<span>更新时间:{{time}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="numWrap">
|
|
||||||
<div>
|
|
||||||
<span>{{ numInfo?.totalNum }}</span>
|
|
||||||
<span>文章总数</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span>{{ numInfo?.readNum }}</span><span>已培训数量</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span>{{ numInfo?.notReadNum }}</span> <span>未培训数量</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="driver_tab_wrap">
|
|
||||||
<div v-for="(item, index) in tabArr" :key="index" :class="{'active' : activeIndex == index}"
|
|
||||||
@click="changeTab(index)">
|
|
||||||
{{ item.name }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="contentWrap" v-show="!showEmpty">
|
|
||||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
|
||||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'培训文档')">
|
|
||||||
<div class="info flexBetween common">
|
|
||||||
<div class="title">{{ item.name }}<span v-if="item.mustRead===1" class="read">必读</span></div>
|
|
||||||
</div>
|
|
||||||
<div class="imgWrap">
|
|
||||||
<img :src="item.themePicture">
|
|
||||||
</div>
|
|
||||||
<div class="num common">{{ item.synopsis }}</div>
|
|
||||||
<div class="info flexBetween common" >
|
|
||||||
<div class="time">{{ item.pushTime }}</div>
|
|
||||||
<span style="color: red;font-size: 14px;margin-right: 8px" :class="item.alreadyRead===1 ? 'alRead' : ''">{{ item.alreadyRead===1 ? '已处理' : '未处理' }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</van-pull-refresh>
|
|
||||||
</div>
|
|
||||||
<div class="empty" v-show="showEmpty">
|
|
||||||
<img src="@/assets/empty.png" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {myMixins} from "@/utils/myMixins"
|
|
||||||
import {getTrainingList} from "@/api/mine"
|
|
||||||
import {timeFormat} from "@/utils/common";
|
|
||||||
export default {
|
|
||||||
name: "diverTrainDocment",
|
|
||||||
computed: {
|
|
||||||
},
|
|
||||||
mixins:[myMixins],
|
|
||||||
data(){
|
|
||||||
return{
|
|
||||||
tabArr: [{name: '车型技术参数', status: 1}, {name: '中道服务规范', status:2},{name: '中道小课堂', status: 3}],
|
|
||||||
activeIndex: 0,
|
|
||||||
pageList:[],
|
|
||||||
totalList:[],
|
|
||||||
numInfo:'',
|
|
||||||
keyword:'',
|
|
||||||
show:false,
|
|
||||||
showEmpty:false,
|
|
||||||
isLoading:false,
|
|
||||||
driverId:'',
|
|
||||||
time:'',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
|
||||||
this.driverId = urlParams.get('driverId');
|
|
||||||
this.time=timeFormat(Date.now())
|
|
||||||
this.getTrainingList();
|
|
||||||
document.addEventListener('visibilitychange', async ( ) => {
|
|
||||||
let state = document.visibilityState
|
|
||||||
if (state == 'hidden') { // 用户离开了
|
|
||||||
}
|
|
||||||
if (state == 'visible') {
|
|
||||||
this.getTrainingList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
onRefresh() {
|
|
||||||
this.getTrainingList()
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$toast('刷新成功');
|
|
||||||
this.isLoading = false;
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
async changeTab(index) {
|
|
||||||
this.activeIndex = index
|
|
||||||
await this.getTrainingList()
|
|
||||||
},
|
|
||||||
async getTrainingList(){
|
|
||||||
let res= await getTrainingList({
|
|
||||||
type:1,
|
|
||||||
id:this.driverId,
|
|
||||||
text:this.keyword || '',
|
|
||||||
})
|
|
||||||
this.totalList=[]
|
|
||||||
this.pageList=[]
|
|
||||||
this.numInfo=res.data
|
|
||||||
this.totalList=res.data.list
|
|
||||||
let result=[]
|
|
||||||
if(this.activeIndex === 0){
|
|
||||||
result=this.totalList?.filter(q => q.title === '车型技术参数');
|
|
||||||
}else if(this.activeIndex === 1){
|
|
||||||
result=this.totalList?.filter(q => q.title === '中道服务规范');
|
|
||||||
}else if(this.activeIndex === 2){
|
|
||||||
result=this.totalList?.filter(q => q.title === '中道小课堂');
|
|
||||||
}
|
|
||||||
if(result){
|
|
||||||
this.pageList=result[0].materials
|
|
||||||
this.time=timeFormat(Date.now())
|
|
||||||
}
|
|
||||||
if(this.pageList?.length === 0){
|
|
||||||
this.showEmpty = true
|
|
||||||
}else {
|
|
||||||
this.showEmpty = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
@import "@/styles/common.scss";
|
|
||||||
@import "@/styles/mixin.scss";
|
|
||||||
@import "@/styles/docment.scss";
|
|
||||||
@import "@/styles/driverDocment.scss";
|
|
||||||
.read{
|
|
||||||
padding: 2px 8px;
|
|
||||||
border-radius: 5px;
|
|
||||||
border: 1px solid red;
|
|
||||||
color: red;
|
|
||||||
font-size: 8px;
|
|
||||||
}
|
|
||||||
.alRead{
|
|
||||||
color: #cccccc !important;
|
|
||||||
}
|
|
||||||
.contentWrap{
|
|
||||||
height: calc(100% - 180px) !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,59 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<template v-if="supplierId">
|
<div class="navBar">
|
||||||
<div class="navBar">
|
<van-nav-bar
|
||||||
<van-nav-bar
|
left-arrow
|
||||||
left-arrow
|
left-arrow-color="#FFFFFF"
|
||||||
left-arrow-color="#FFFFFF"
|
:border="false"
|
||||||
class="supplier"
|
:fixed="true"
|
||||||
:border="false"
|
:safe-area-inset-top="true"
|
||||||
:fixed="true"
|
@click-left="goBack"
|
||||||
:safe-area-inset-top="true"
|
>
|
||||||
@click-left="goBack"
|
<template slot="title">
|
||||||
>
|
<div v-show="!show">文档资料</div>
|
||||||
<template slot="title">
|
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getList"/>
|
||||||
<div v-show="!show">文档资料</div>
|
</template>
|
||||||
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getNormalList"/>
|
<template slot="right">
|
||||||
</template>
|
<div class="rightWrap" @click="show = !show">
|
||||||
<template slot="right">
|
<img src="@/assets/serach.png" class="img2" v-show="!show"/>
|
||||||
<div class="rightWrap" @click="show = !show">
|
<img src="@/assets/delKey.png" class="img2" v-show="show" @click="initShow"/>
|
||||||
<img src="@/assets/serach.png" class="img2" v-show="!show"/>
|
</div>
|
||||||
<img src="@/assets/delKey.png" class="img2" v-show="show" @click="initShow"/>
|
</template>
|
||||||
</div>
|
</van-nav-bar>
|
||||||
</template>
|
</div>
|
||||||
</van-nav-bar>
|
|
||||||
</div>
|
<div class="tab_wrap">
|
||||||
</template>
|
|
||||||
<template v-if="driverId">
|
|
||||||
<div class="navBar">
|
|
||||||
<van-nav-bar
|
|
||||||
:border="false"
|
|
||||||
:fixed="true"
|
|
||||||
:safe-area-inset-top="true"
|
|
||||||
>
|
|
||||||
<template slot="title">
|
|
||||||
<van-field
|
|
||||||
v-model="keyword"
|
|
||||||
placeholder="名称/关键词/简介"
|
|
||||||
>
|
|
||||||
<!-- <template #button>
|
|
||||||
<van-icon class="search" name="search" size="20" @click="getTrainingList"/>
|
|
||||||
</template>-->
|
|
||||||
</van-field>
|
|
||||||
</template>
|
|
||||||
<template slot="left">
|
|
||||||
<div class="navLeft" @click="goBack">
|
|
||||||
<van-icon class="icon" name="arrow-left" />
|
|
||||||
<div>返回</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template slot="right">
|
|
||||||
<van-icon class="search" name="search" size="20" @click="getNormalList"/>
|
|
||||||
</template>
|
|
||||||
</van-nav-bar>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<div :class="supplierId ? 'tab_wrap' : 'driver_tab_wrap'">
|
|
||||||
<div v-for="(item, index) in tabArr" :key="index" :class="{'active' : activeIndex == index}"
|
<div v-for="(item, index) in tabArr" :key="index" :class="{'active' : activeIndex == index}"
|
||||||
@click="changeTab(index)">
|
@click="changeTab(index)">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
@ -61,15 +30,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="contentWrap" v-show="!showEmpty">
|
<div class="contentWrap" v-show="!showEmpty">
|
||||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'文档资料')">
|
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item)">
|
||||||
<div class="info flexBetween common">
|
<div class="info flexBetween common">
|
||||||
<div class="title">{{ item.name }}</div>
|
<div class="title">{{ item.pushUser }}</div>
|
||||||
|
<div class="time">{{ item.pushTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="imgWrap">
|
<div class="imgWrap">
|
||||||
<img :src="item.themePicture">
|
<img :src="item.themePicture">
|
||||||
|
<div class="name">{{item.name}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="num common">{{ item.synopsis }}</div>
|
<div class="num common">{{ item.synopsis }}</div>
|
||||||
<div class="time common">{{ item.pushTime }}</div>
|
<div class="doc flexBetween common">
|
||||||
|
<div class="left">{{ item.docType?.label }}</div>
|
||||||
|
<div class="right">
|
||||||
|
<span style="color: red;font-size: 14px;margin-right: 8px">{{ item.listShowButton==null ? '已处理' : '未处理' }}</span>
|
||||||
|
<span style="opacity: .9;color: #ccc">阅读 {{item.readCount}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</van-pull-refresh>
|
</van-pull-refresh>
|
||||||
</div>
|
</div>
|
||||||
@ -81,33 +58,30 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {getNormalList} from "@/api/mine";
|
import {pageList} from "@/api/mine";
|
||||||
export default {
|
export default {
|
||||||
name: "docmentList",
|
name: "trainDocment",
|
||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
tabArr: [{name: '车型技术参数', status: 1}, {name: '中道服务规范', status:2},{name: '中道小课堂', status: 3}, {name: '新手入列', status: 4},],
|
tabArr: [{name: '中道制度', status: 1}, {name: '技术参数', status: 2},],
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
pageList:[],
|
pageList:[],
|
||||||
totalList:[],
|
pageNum:1,
|
||||||
|
pageSize:10,
|
||||||
keyword:'',
|
keyword:'',
|
||||||
|
trainingType:1,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
show:false,
|
show:false,
|
||||||
showEmpty:false,
|
showEmpty:false
|
||||||
supplierId:'',
|
|
||||||
driverId:'',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
this.getList()
|
||||||
this.supplierId = urlParams.get('supplierId');
|
|
||||||
this.driverId = urlParams.get('driverId');
|
|
||||||
this.getNormalList()
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
this.getNormalList()
|
this.getList()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$toast('刷新成功');
|
this.$toast('刷新成功');
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
@ -115,41 +89,32 @@ export default {
|
|||||||
},
|
},
|
||||||
async changeTab(index) {
|
async changeTab(index) {
|
||||||
this.activeIndex = index
|
this.activeIndex = index
|
||||||
await this.getNormalList()
|
this.pageNum = 1
|
||||||
|
this.pageList = [];
|
||||||
|
if(this.activeIndex === 0){
|
||||||
|
this.trainingType =1
|
||||||
|
}else{
|
||||||
|
this.trainingType=2
|
||||||
|
}
|
||||||
|
await this.getList()
|
||||||
},
|
},
|
||||||
async getNormalList(){
|
async getList(){
|
||||||
let res= await getNormalList({
|
let res= await pageList({
|
||||||
type:this.supplierId ? 2 : 1,
|
pageNum:this.pageNum,
|
||||||
// type:2,
|
pageSize:this.pageSize,
|
||||||
id: this.supplierId ? this.supplierId : this.driverId,
|
docType:2,
|
||||||
// id:this.supplierId,//33041,
|
trainingType:this.trainingType,
|
||||||
text:this.keyword || '',
|
keyword:this.keyword || ''
|
||||||
})
|
})
|
||||||
this.totalList=[]
|
this.pageList=res.data;
|
||||||
this.pageList=[]
|
if(res.data.length === 0){
|
||||||
this.totalList=res.data.list
|
|
||||||
let result=[]
|
|
||||||
if(this.activeIndex === 0){
|
|
||||||
result=this.totalList?.filter(q => q.title === '车型技术参数');
|
|
||||||
}else if(this.activeIndex === 1){
|
|
||||||
result=this.totalList?.filter(q => q.title === '中道服务规范');
|
|
||||||
}else if(this.activeIndex === 2){
|
|
||||||
result=this.totalList?.filter(q => q.title === '中道小课堂');
|
|
||||||
}else if(this.activeIndex === 3){
|
|
||||||
result=this.totalList?.filter(q => q.title === '新手入列');
|
|
||||||
}
|
|
||||||
if(result){
|
|
||||||
this.pageList=result[0].materials
|
|
||||||
}
|
|
||||||
if(this.pageList?.length === 0){
|
|
||||||
this.showEmpty = true
|
this.showEmpty = true
|
||||||
}else {
|
}else {
|
||||||
this.showEmpty = false
|
this.showEmpty = false
|
||||||
}
|
} },
|
||||||
},
|
|
||||||
initShow(){
|
initShow(){
|
||||||
this.keyword= '',
|
this.keyword= '',
|
||||||
this.getNormalList()
|
this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -159,8 +124,29 @@ export default {
|
|||||||
@import "@/styles/common.scss";
|
@import "@/styles/common.scss";
|
||||||
@import "@/styles/mixin.scss";
|
@import "@/styles/mixin.scss";
|
||||||
@import "@/styles/docment.scss";
|
@import "@/styles/docment.scss";
|
||||||
@import "@/styles/driverDocment.scss";
|
.tab_wrap {
|
||||||
.supplier ::v-deep .van-nav-bar__content{
|
@include fontWeightSize(bolder, 15px);
|
||||||
background-color: #2C395F !important;
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding: 5px 0 5px 0;
|
||||||
|
@include colorOpa(#737373,0.7);
|
||||||
|
div {
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
color: #3678FF;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.active:after {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
@include wh(50px,3px);
|
||||||
|
background: linear-gradient(270deg, #33A3FF 0%, #176AFE 100%);
|
||||||
|
border-radius: 2px;
|
||||||
|
position: absolute;
|
||||||
|
margin-top: 3px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -11,7 +11,7 @@
|
|||||||
>
|
>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<div v-show="!show">培训文档</div>
|
<div v-show="!show">培训文档</div>
|
||||||
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getTrainingList"/>
|
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getList"/>
|
||||||
</template>
|
</template>
|
||||||
<template slot="right">
|
<template slot="right">
|
||||||
<div class="rightWrap" @click="show = !show">
|
<div class="rightWrap" @click="show = !show">
|
||||||
@ -21,26 +21,25 @@
|
|||||||
</template>
|
</template>
|
||||||
</van-nav-bar>
|
</van-nav-bar>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab_wrap">
|
|
||||||
<div v-for="(item, index) in tabArr" :key="index" :class="{'active' : activeIndex == index}"
|
|
||||||
@click="changeTab(index)">
|
|
||||||
{{ item.name }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="contentWrap" v-show="!showEmpty">
|
<div class="contentWrap" v-show="!showEmpty">
|
||||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'培训文档')">
|
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item)">
|
||||||
<div class="info flexBetween common">
|
<div class="info flexBetween common">
|
||||||
<div class="title">{{ item.name }}<span v-if="item.mustRead===1" class="read">必读</span></div>
|
<div class="title">{{ item.pushUser }}</div>
|
||||||
<!-- <div class="time">{{ item.pushTime }}</div>-->
|
<div class="time">{{ item.pushTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="imgWrap">
|
<div class="imgWrap">
|
||||||
<img :src="item.themePicture">
|
<img :src="item.themePicture">
|
||||||
|
<div class="name">{{item.name}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="num common">{{ item.synopsis }}</div>
|
<div class="num common">{{ item.synopsis }}</div>
|
||||||
<div class="info flexBetween common" >
|
<div class="doc flexBetween common">
|
||||||
<div class="time">{{ item.pushTime }}</div>
|
<div class="left">{{ item.docType?.label }}</div>
|
||||||
<span style="color: red;font-size: 14px;margin-right: 8px" :class="item.alreadyRead===1 ? 'alRead' : ''">{{ item.alreadyRead===1 ? '已处理' : '未处理' }}</span>
|
<div class="right">
|
||||||
|
<span style="color: red;font-size: 14px;margin-right: 8px">{{ item.listShowButton==null ? '已处理' : '未处理' }}</span>
|
||||||
|
<span style="opacity: .9;color: #ccc">阅读 {{item.readCount}}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</van-pull-refresh>
|
</van-pull-refresh>
|
||||||
@ -53,7 +52,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {getTrainingList} from "@/api/mine"
|
import {pageList} from "@/api/mine"
|
||||||
export default {
|
export default {
|
||||||
name: "trainDocment",
|
name: "trainDocment",
|
||||||
computed: {
|
computed: {
|
||||||
@ -61,65 +60,35 @@ export default {
|
|||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
tabArr: [{name: '车型技术参数', status: 1}, {name: '中道服务规范', status:2},{name: '中道小课堂', status: 3}],
|
|
||||||
activeIndex: 0,
|
|
||||||
pageNum:1,
|
pageNum:1,
|
||||||
pageSize:10,
|
pageSize:10,
|
||||||
pageList:[],
|
pageList:[],
|
||||||
totalList:[],
|
|
||||||
keyword:'',
|
keyword:'',
|
||||||
show:false,
|
show:false,
|
||||||
showEmpty:false,
|
showEmpty:false,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
supplierId:'',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
this.getList();
|
||||||
this.supplierId = urlParams.get('supplierId');
|
|
||||||
this.getTrainingList();
|
|
||||||
document.addEventListener('visibilitychange', async ( ) => {
|
|
||||||
let state = document.visibilityState
|
|
||||||
if (state == 'hidden') { // 用户离开了
|
|
||||||
}
|
|
||||||
if (state == 'visible') {
|
|
||||||
this.getTrainingList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
this.getTrainingList()
|
this.getList()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$toast('刷新成功');
|
this.$toast('刷新成功');
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
async changeTab(index) {
|
async getList(){
|
||||||
this.activeIndex = index
|
let res= await pageList({
|
||||||
await this.getTrainingList()
|
pageNum:this.pageNum,
|
||||||
},
|
pageSize:this.pageSize,
|
||||||
async getTrainingList(){
|
docType:1,
|
||||||
let res= await getTrainingList({
|
keyword:this.keyword || ''
|
||||||
type:2,
|
|
||||||
id: this.supplierId,
|
|
||||||
text:this.keyword || '',
|
|
||||||
})
|
})
|
||||||
this.totalList=[]
|
this.pageList=res.data;
|
||||||
this.pageList=[]
|
if(res.data.length === 0){
|
||||||
this.totalList=res.data.list
|
|
||||||
let result=[]
|
|
||||||
if(this.activeIndex === 0){
|
|
||||||
result=this.totalList?.filter(q => q.title === '车型技术参数');
|
|
||||||
}else if(this.activeIndex === 1){
|
|
||||||
result=this.totalList?.filter(q => q.title === '中道服务规范');
|
|
||||||
}else if(this.activeIndex === 2){
|
|
||||||
result=this.totalList?.filter(q => q.title === '中道小课堂');
|
|
||||||
}
|
|
||||||
if(result){
|
|
||||||
this.pageList=result[0].materials
|
|
||||||
}
|
|
||||||
if(this.pageList?.length === 0){
|
|
||||||
this.showEmpty = true
|
this.showEmpty = true
|
||||||
}else {
|
}else {
|
||||||
this.showEmpty = false
|
this.showEmpty = false
|
||||||
@ -127,7 +96,7 @@ export default {
|
|||||||
},
|
},
|
||||||
initShow(){
|
initShow(){
|
||||||
this.keyword= '',
|
this.keyword= '',
|
||||||
this.getTrainingList()
|
this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,14 +105,4 @@ export default {
|
|||||||
@import "@/styles/common.scss";
|
@import "@/styles/common.scss";
|
||||||
@import "@/styles/mixin.scss";
|
@import "@/styles/mixin.scss";
|
||||||
@import "@/styles/docment.scss";
|
@import "@/styles/docment.scss";
|
||||||
.read{
|
|
||||||
padding: 2px 8px;
|
|
||||||
border-radius: 5px;
|
|
||||||
border: 1px solid red;
|
|
||||||
color: red;
|
|
||||||
font-size: 8px;
|
|
||||||
}
|
|
||||||
.alRead{
|
|
||||||
color: #cccccc !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
@ -16,26 +16,13 @@
|
|||||||
<img class="startImg" src="@/assets/start.png" />
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
<span>身份证正面</span>
|
<span>身份证正面</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <van-image @click="handlePreview" @remove="handleRemove" style="width: 54px;height: 54px;" class="camerImg" v-if="identityCardFront" :src="identityCardFront" />-->
|
|
||||||
<!-- <el-upload-->
|
|
||||||
<!-- v-else-->
|
|
||||||
<!-- :action="baseURL + '/order/uploadImage'"-->
|
|
||||||
<!-- :headers='authorization'-->
|
|
||||||
<!-- accept=".png,.jpg,.jpeg,.zip,.rar,.xlsx,.xsavels,.pdf,.PDF,.doc,.docx"-->
|
|
||||||
<!-- :on-success="changeHandle"-->
|
|
||||||
<!-- :before-upload="checkImgType"-->
|
|
||||||
<!-- class="upload-demo"-->
|
|
||||||
<!-- :show-file-list="false"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <van-icon slot="default" name="plus" style="font-size: 54px" />-->
|
|
||||||
<!-- </el-upload>-->
|
|
||||||
<van-uploader
|
<van-uploader
|
||||||
v-model="identityCardFrontList"
|
v-model="identityCardFrontList"
|
||||||
:after-read="identityCardFrontHandler"
|
:after-read="identityCardFrontHandler"
|
||||||
:max-count="1"
|
:max-size="5 * 1024 * 1024"
|
||||||
:preview-size="54"
|
max-count="1"
|
||||||
:max-size="5 * 1024 * 1024"
|
:preview-size="54"
|
||||||
accept="image/*"
|
accept="image "
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="lineBot"></div>
|
<div class="lineBot"></div>
|
||||||
@ -152,15 +139,11 @@ import {saveDriver, uploadImage, ocrHandler} from "@/api/mine"
|
|||||||
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
||||||
import CellGroup from "@/components/cellGroup.vue"
|
import CellGroup from "@/components/cellGroup.vue"
|
||||||
import {formatDate1} from "@/utils/common"
|
import {formatDate1} from "@/utils/common"
|
||||||
// import {ImagePreview} from "vant";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "driverAdd",
|
name: "driverAdd",
|
||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
// baseURL:'',
|
|
||||||
// licenseOcrInfo:'',
|
|
||||||
id:'',
|
id:'',
|
||||||
driverName:"",
|
driverName:"",
|
||||||
driverPhone:"",
|
driverPhone:"",
|
||||||
@ -186,22 +169,9 @@ export default {
|
|||||||
idCardAuthority:'',
|
idCardAuthority:'',
|
||||||
idCardValidStartTime:'',
|
idCardValidStartTime:'',
|
||||||
idCardValidEndTime:'',
|
idCardValidEndTime:'',
|
||||||
// authorization:{Authorization: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MjY4MDk4MTQsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiLkuIrmtbfmtYvor5XkvpvlupTllYYiLCJzdXBwbGllcklkIjozMzA0MSwic3VwcGxpZXJUeXBlIjoyLCJ1c2VybmFtZSI6InNvbmciLCJ1c2VyVHlwZSI6InJlc2N1ZUFwcCIsImRldmljZUlkIjoiMTkwZTM1ZjdlMTRhYzdjMDAwNyIsImF1dGhvcml0aWVzIjpbXX0sInNjb3BlIjpbImFsbCJdLCJpc3MiOiJodHRwczovL3Npbm9hc3Npc3QuY29tIiwiZXhwIjoxNzI2ODk2MjE0LCJpYXQiOjE3MjY4MDk4MTR9.5KTAMXZf8ll6HS4Z49YJQ1HiRvHr79Q1goDAGEtsBmY'},
|
}
|
||||||
// authorization:{Authorization:''},
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
/* if (window.location.href.includes('www.sinoassist.com')) {
|
|
||||||
this.baseURL = 'https://api.sinoassist.com'
|
|
||||||
} else if (window.location.href.includes('ccreview.sino-assist.com')) {
|
|
||||||
this.baseURL = 'https://api.sinoassist.com'
|
|
||||||
} else {
|
|
||||||
this.baseURL = 'https://api1.sino-assist.com'
|
|
||||||
// this.baseURL = 'http://localhost:8080'
|
|
||||||
|
|
||||||
}
|
|
||||||
let token=localStorage.getItem('token')
|
|
||||||
this.authorization.Authorization=token;*/
|
|
||||||
this.id = this.$route.params?.id;
|
this.id = this.$route.params?.id;
|
||||||
this.driverName = this.$route.params?.name;
|
this.driverName = this.$route.params?.name;
|
||||||
this.driverPhone = this.$route.params?.phone;
|
this.driverPhone = this.$route.params?.phone;
|
||||||
@ -245,41 +215,6 @@ export default {
|
|||||||
isUse(e){
|
isUse(e){
|
||||||
this.states=e
|
this.states=e
|
||||||
},
|
},
|
||||||
/* checkImgType(file) {
|
|
||||||
const FileExt = file.name.replace(/.+\./, "");
|
|
||||||
const isLt5M = file.size / 1024 / 1024 < 5;
|
|
||||||
const whiteList = ['png', 'jpeg', 'jpg'];
|
|
||||||
if (whiteList.indexOf(FileExt.toLowerCase()) === -1) {
|
|
||||||
this.$message.error("请上传正确的文件格式:" + whiteList.join('、'))
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (!isLt5M) {
|
|
||||||
this.$message.error('上传图片大小不能超过 5MB!');
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleRemove() {
|
|
||||||
this.identityCardFront = ''
|
|
||||||
},
|
|
||||||
handlePreview() {
|
|
||||||
ImagePreview({
|
|
||||||
images: this.identityCardFront,
|
|
||||||
startPosition: 1,
|
|
||||||
closeable: true,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async changeHandle(response) {
|
|
||||||
if (response.success === true) {
|
|
||||||
this.$toast('上传成功')
|
|
||||||
// this.form.identityCardFront = response.data;
|
|
||||||
// await this.ocrFrontHandler()
|
|
||||||
this.identityCardFront = response.data;
|
|
||||||
console.log("this.identityCardFront",this.identityCardFront)
|
|
||||||
await this.idCardOcrHandler();
|
|
||||||
} else {
|
|
||||||
this.$toast('上传失败')
|
|
||||||
}
|
|
||||||
},*/
|
|
||||||
async identityCardFrontHandler(file) { // 上传身份证正面照片
|
async identityCardFrontHandler(file) { // 上传身份证正面照片
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file" , file.file);
|
formData.append("file" , file.file);
|
||||||
|
@ -70,22 +70,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="serviceInfo common">
|
|
||||||
<div class="title">电瓶信息:</div>
|
|
||||||
<div class="line"></div>
|
|
||||||
<div class="infoContent">
|
|
||||||
<div class="item">
|
|
||||||
<span class="leftTitle fontColor">设备号:</span><span class="rightContent"></span>
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="leftTitle fontColor">品牌:</span><span class="rightContent"></span>
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="leftTitle fontColor">型号:</span><span class="rightContent"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="map" v-show="showPopup" id="container">
|
<div class="map" v-show="showPopup" id="container">
|
||||||
<img @click="showPopup = false" src="@/assets/delKey.png" class="mapImg">
|
<img @click="showPopup = false" src="@/assets/delKey.png" class="mapImg">
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,308 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="wrap" :style="{ 'overflow-y': showPoup ? 'hidden' : 'auto' }">
|
|
||||||
<div class="navBar">
|
|
||||||
<van-nav-bar title="师傅培训" :border="false" :fixed="true" :safe-area-inset-top="true">
|
|
||||||
<template slot="left" v-if="isFinished">
|
|
||||||
<van-icon name="checked" color="#37ec37" size="20"/>
|
|
||||||
</template>
|
|
||||||
</van-nav-bar>
|
|
||||||
</div>
|
|
||||||
<div class="contentWrap" v-show="!showEmpty">
|
|
||||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
|
||||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'培训文档')">
|
|
||||||
<div class="info flexBetween common">
|
|
||||||
<div class="title">{{ item.name }}</div>
|
|
||||||
<!-- <div class="time">{{ item.pushTime }}</div>-->
|
|
||||||
</div>
|
|
||||||
<div class="imgWrap"><img :src="item.themePicture"></div>
|
|
||||||
<div class="num common">{{ item.synopsis }}</div>
|
|
||||||
<div class="info flexBetween common">
|
|
||||||
<div class="time">{{ item.pushTime }}</div>
|
|
||||||
<template v-if="item.alreadyRead === 1">
|
|
||||||
<div class="status" style="color: #cccccc">已处理</div>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div class="status" >未处理</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</van-pull-refresh>
|
|
||||||
</div>
|
|
||||||
<div class="empty" v-show="showEmpty">
|
|
||||||
<img src="@/assets/empty.png" />
|
|
||||||
</div>
|
|
||||||
<div class="poupCommon" v-if="showPoup">
|
|
||||||
<div class="container showPoupContainer">
|
|
||||||
<div class="con">
|
|
||||||
<div class="title">培训提醒</div>
|
|
||||||
<div class="content">欢迎使用中道司机APP。请您先完成培训,阅读文章,并问答相应问题。完成后即可正常使用APP。祝您使用愉快!</div>
|
|
||||||
<div class="line"></div>
|
|
||||||
<div class="btnWrap">
|
|
||||||
<div class="nextBtn" @click="showPoup = false">确定</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="poupCommon" v-if="isFinished">
|
|
||||||
<div class="container finishContainer">
|
|
||||||
<div class="con">
|
|
||||||
<div class="title">提示</div>
|
|
||||||
<div class="content">恭喜您,您已经全部完成培训!现在您可以正常使用我们的app,请前往体验。</div>
|
|
||||||
<div class="line"></div>
|
|
||||||
<div class="btnWrap">
|
|
||||||
<div class="nextBtn" @click="goApp">前往</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {myMixins} from "@/utils/myMixins"
|
|
||||||
import {driverTrainList} from "@/api/mine"
|
|
||||||
export default {
|
|
||||||
name: "driverTrainingList",
|
|
||||||
computed: {
|
|
||||||
},
|
|
||||||
mixins:[myMixins],
|
|
||||||
data(){
|
|
||||||
return{
|
|
||||||
pageList:[],
|
|
||||||
show:false,
|
|
||||||
showEmpty:false,
|
|
||||||
isLoading:false,
|
|
||||||
showPoup:true,//进入弹框
|
|
||||||
isFinished:false,
|
|
||||||
driverId:'',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
|
||||||
this.driverId = urlParams.get('driverId');
|
|
||||||
this.getList();
|
|
||||||
document.addEventListener('visibilitychange', async ( ) => {
|
|
||||||
let state = document.visibilityState
|
|
||||||
if (state == 'hidden') { // 用户离开了
|
|
||||||
}
|
|
||||||
if (state == 'visible') {
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
onRefresh() {
|
|
||||||
this.getList()
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$toast('刷新成功');
|
|
||||||
this.isLoading = false;
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
|
|
||||||
async getList(){
|
|
||||||
let res= await driverTrainList({
|
|
||||||
driverId:this.driverId,//79639
|
|
||||||
})
|
|
||||||
this.pageList=res.data?.list;
|
|
||||||
if(res.data.assessState == 0){
|
|
||||||
this.isFinished=false
|
|
||||||
}else {
|
|
||||||
this.isFinished=true //是否完成
|
|
||||||
}
|
|
||||||
if(this.pageList?.length === 0){
|
|
||||||
this.showEmpty = true
|
|
||||||
}else {
|
|
||||||
this.showEmpty = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
goApp(){
|
|
||||||
let data = {"action":"goBack","params":""}
|
|
||||||
var u = navigator.userAgent;
|
|
||||||
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
||||||
if(isiOS){
|
|
||||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
|
||||||
}else {
|
|
||||||
window.android.sendMessage("goBack");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
@import "@/styles/common.scss";
|
|
||||||
@import "@/styles/mixin.scss";
|
|
||||||
@import "@/styles/docment.scss";
|
|
||||||
@import "@/styles/driverDocment.scss";
|
|
||||||
.contentWrap{
|
|
||||||
height: calc(100% - 50px) !important;
|
|
||||||
}
|
|
||||||
.status{
|
|
||||||
color: red;
|
|
||||||
font-size: 14px;
|
|
||||||
margin-right: 8px;
|
|
||||||
text-align: right
|
|
||||||
}
|
|
||||||
.wrap{
|
|
||||||
position: relative;
|
|
||||||
overflow-y: hidden;
|
|
||||||
}
|
|
||||||
.poupCommon{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-color: rgba(0,0,0,.7);
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
.showPoupContainer{
|
|
||||||
height: 310px;
|
|
||||||
background-size: 320px 310px;
|
|
||||||
.content{
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.btnWrap{
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.finishContainer{
|
|
||||||
height: 260px;
|
|
||||||
background-size: 320px 260px;
|
|
||||||
.con{
|
|
||||||
top: 80px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.container{
|
|
||||||
width: 320px;
|
|
||||||
background-image: url("@/assets/trainBg.png");
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
margin: auto;
|
|
||||||
.con{
|
|
||||||
position: absolute;
|
|
||||||
top: 100px;
|
|
||||||
left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.title{
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 19px;
|
|
||||||
color: #3364B7;
|
|
||||||
line-height: 26px;
|
|
||||||
width: 70%;
|
|
||||||
margin-left: 35px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.content{
|
|
||||||
width: 70%;
|
|
||||||
height: 92px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #4C5361;
|
|
||||||
line-height: 23px;
|
|
||||||
text-align: justify;
|
|
||||||
margin-top: 8px;
|
|
||||||
margin-left: 35px;
|
|
||||||
}
|
|
||||||
.line{
|
|
||||||
width: 285px;
|
|
||||||
height: 1px;
|
|
||||||
border-bottom: 1px solid #F1F2F5;
|
|
||||||
}
|
|
||||||
.btnWrap{
|
|
||||||
width: 92%;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 13px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
.closeBtn{
|
|
||||||
color: #999B9F;
|
|
||||||
}
|
|
||||||
.line{
|
|
||||||
width: 1px;
|
|
||||||
height: 48px;
|
|
||||||
border-right: 1px solid #F1F2F5;
|
|
||||||
}
|
|
||||||
.nextBtn{
|
|
||||||
color: #3364B7;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//.poupWrap{
|
|
||||||
// width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
// background-color: rgba(0,0,0,.7);
|
|
||||||
// position: absolute;
|
|
||||||
// top: 0;
|
|
||||||
// left: 0;
|
|
||||||
// .container{
|
|
||||||
// width: 320px;
|
|
||||||
// height: 310px;
|
|
||||||
// background-image: url("@/assets/trainBg.png");
|
|
||||||
// background-size: 320px 310px;
|
|
||||||
// background-repeat: no-repeat;
|
|
||||||
// position: absolute;
|
|
||||||
// top: 0;
|
|
||||||
// bottom: 0;
|
|
||||||
// left: 0;
|
|
||||||
// right: 0;
|
|
||||||
// margin: auto;
|
|
||||||
// .con{
|
|
||||||
// position: absolute;
|
|
||||||
// top: 100px;
|
|
||||||
// left: 20px;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// .title{
|
|
||||||
// font-weight: bold;
|
|
||||||
// font-size: 19px;
|
|
||||||
// color: #3364B7;
|
|
||||||
// line-height: 26px;
|
|
||||||
// width: 70%;
|
|
||||||
// margin-left: 35px;
|
|
||||||
// text-align: center;
|
|
||||||
// }
|
|
||||||
// .content{
|
|
||||||
// width: 70%;
|
|
||||||
// height: 92px;
|
|
||||||
// font-size: 14px;
|
|
||||||
// color: #4C5361;
|
|
||||||
// line-height: 23px;
|
|
||||||
// text-align: justify;
|
|
||||||
// margin-top: 8px;
|
|
||||||
// margin-bottom: 20px;
|
|
||||||
// margin-left: 35px;
|
|
||||||
// }
|
|
||||||
// .line{
|
|
||||||
// width: 285px;
|
|
||||||
// height: 1px;
|
|
||||||
// border-bottom: 1px solid #F1F2F5;
|
|
||||||
// }
|
|
||||||
// .btnWrap{
|
|
||||||
// width: 92%;
|
|
||||||
// font-weight: bold;
|
|
||||||
// font-size: 13px;
|
|
||||||
// display: flex;
|
|
||||||
// justify-content: space-around;
|
|
||||||
// margin-top: 6px;
|
|
||||||
// height: 40px;
|
|
||||||
// line-height: 40px;
|
|
||||||
// .closeBtn{
|
|
||||||
// color: #999B9F;
|
|
||||||
// }
|
|
||||||
// .line{
|
|
||||||
// width: 1px;
|
|
||||||
// height: 48px;
|
|
||||||
// border-right: 1px solid #F1F2F5;
|
|
||||||
// }
|
|
||||||
// .nextBtn{
|
|
||||||
// color: #3364B7;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
</style>
|
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrap" :style="{ 'overflow-y': showPoup ? 'hidden' : 'auto' }">
|
<div class="wrap" :style="{ 'overflow-y': showPoup ? 'hidden' : 'auto' }">
|
||||||
<div class="navBar">
|
<div class="navBar">
|
||||||
<van-nav-bar title="培训" :border="false" :fixed="true" :safe-area-inset-top="true">
|
<van-nav-bar title="新人培训" :border="false" :fixed="true" :safe-area-inset-top="true">
|
||||||
<template slot="left" v-if="isFinished">
|
<template slot="left" v-if="isFinished">
|
||||||
<van-icon name="checked" color="#37ec37" size="20"/>
|
<van-icon name="checked" color="#37ec37" size="20"/>
|
||||||
</template>
|
</template>
|
||||||
@ -9,23 +9,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="contentWrap" v-show="!showEmpty">
|
<div class="contentWrap" v-show="!showEmpty">
|
||||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'培训文档')">
|
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item)">
|
||||||
<div class="info flexBetween common">
|
<div class="info flexBetween common">
|
||||||
<div class="title">{{ item.name }}</div>
|
<div class="title">{{ item.pushUser }}</div>
|
||||||
<!-- <div class="time">{{ item.updateTime }}</div>-->
|
<div class="time">{{ item.pushTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="imgWrap"><img :src="item.themePicture"></div>
|
<div class="imgWrap"><img :src="item.themePicture"></div>
|
||||||
<div class="num common">{{ item.synopsis }}</div>
|
<div class="num common">{{ item.synopsis }}</div>
|
||||||
<div class="info flexBetween common" >
|
<template v-if="item.listShowButton == null">
|
||||||
<div class="time">{{ item.pushTime }}</div>
|
|
||||||
<span style="color: red;font-size: 14px;margin-right: 8px" :class="item.alreadyRead===1 ? 'alRead' : ''">{{ item.alreadyRead===1 ? '已处理' : '未处理' }}</span>
|
|
||||||
</div>
|
|
||||||
<!-- <template v-if="item.alreadyRead === 1">
|
|
||||||
<div class="status" style="color: #cccccc">已处理</div>
|
<div class="status" style="color: #cccccc">已处理</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="status" >未处理</div>
|
<div class="status" >未处理</div>
|
||||||
</template>-->
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</van-pull-refresh>
|
</van-pull-refresh>
|
||||||
</div>
|
</div>
|
||||||
@ -42,6 +38,7 @@
|
|||||||
<div class="nextBtn" @click="showPoup = false">确定</div>
|
<div class="nextBtn" @click="showPoup = false">确定</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="poupCommon" v-if="isFinished">
|
<div class="poupCommon" v-if="isFinished">
|
||||||
@ -54,14 +51,17 @@
|
|||||||
<div class="nextBtn" @click="goApp">前往</div>
|
<div class="nextBtn" @click="goApp">前往</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// import { Dialog } from 'vant';
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {pageList} from "@/api/mine"
|
import {pageList} from "@/api/mine"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "newTrainingList",
|
name: "newTrainingList",
|
||||||
computed: {
|
computed: {
|
||||||
@ -78,26 +78,16 @@ export default {
|
|||||||
isLoading:false,
|
isLoading:false,
|
||||||
showPoup:true,//进入弹框
|
showPoup:true,//进入弹框
|
||||||
isFinished:false,
|
isFinished:false,
|
||||||
|
// showPoup:false,//进入弹框
|
||||||
|
// isFinished:true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.onRefresh();
|
// this.onRefresh();
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
document.addEventListener('visibilitychange', async ( ) => {
|
|
||||||
let state = document.visibilityState
|
|
||||||
if (state == 'hidden') { // 用户离开了
|
|
||||||
// console.log('用户离开了')
|
|
||||||
}
|
|
||||||
if (state == 'visible') {
|
|
||||||
// console.log('用户回来了')
|
|
||||||
this.getList();
|
|
||||||
//调用接口,获取订单状态
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log("createdcreatedcreated")
|
|
||||||
// this.getList();
|
// this.getList();
|
||||||
// 每次回答完问题之后返回需重新加结果
|
// 每次回答完问题之后返回需重新加结果
|
||||||
|
|
||||||
@ -121,14 +111,16 @@ export default {
|
|||||||
docType:1,
|
docType:1,
|
||||||
trainingType:4,
|
trainingType:4,
|
||||||
})
|
})
|
||||||
this.pageList=res.data?.list || [];
|
this.pageList=res.data;
|
||||||
if(res.data.assessState == 0){
|
let aaa=this.pageList.every(item=>item.listShowButton != 1)
|
||||||
this.isFinished=false
|
if(aaa){
|
||||||
}else {
|
this.showPoup=false
|
||||||
this.isFinished=true //是否完成
|
this.isFinished=true
|
||||||
|
// await this.allProcessed()
|
||||||
}
|
}
|
||||||
if(this.pageList?.length == 0){
|
if(res.data.length === 0){
|
||||||
this.showEmpty = true
|
this.showEmpty = true
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
this.showEmpty = false
|
this.showEmpty = false
|
||||||
}
|
}
|
||||||
@ -147,6 +139,28 @@ export default {
|
|||||||
window.android.sendMessage("goBack");
|
window.android.sendMessage("goBack");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/*allProcessed(){
|
||||||
|
Dialog.confirm({
|
||||||
|
title: '提示',
|
||||||
|
message: '恭喜您,您已经全部完成培训!现在您可以正常使用我们的app,请前往体验。',
|
||||||
|
confirmButtonText: '前往',
|
||||||
|
cancelButtonText: '稍后'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
let data = {"action":"goBack","params":""}
|
||||||
|
var u = navigator.userAgent;
|
||||||
|
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||||
|
if(isiOS){
|
||||||
|
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||||
|
}else {
|
||||||
|
window.android.sendMessage("goBack");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// on cancel
|
||||||
|
});
|
||||||
|
console.log("全部处理")
|
||||||
|
},*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -154,10 +168,6 @@ export default {
|
|||||||
@import "@/styles/common.scss";
|
@import "@/styles/common.scss";
|
||||||
@import "@/styles/mixin.scss";
|
@import "@/styles/mixin.scss";
|
||||||
@import "@/styles/docment.scss";
|
@import "@/styles/docment.scss";
|
||||||
.contentWrap{
|
|
||||||
height: calc(100% - 50px) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status{
|
.status{
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -254,8 +264,77 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.alRead{
|
//.poupWrap{
|
||||||
color: #cccccc !important;
|
// width: 100%;
|
||||||
}
|
// height: 100%;
|
||||||
|
// background-color: rgba(0,0,0,.7);
|
||||||
|
// position: absolute;
|
||||||
|
// top: 0;
|
||||||
|
// left: 0;
|
||||||
|
// .container{
|
||||||
|
// width: 320px;
|
||||||
|
// height: 310px;
|
||||||
|
// background-image: url("@/assets/trainBg.png");
|
||||||
|
// background-size: 320px 310px;
|
||||||
|
// background-repeat: no-repeat;
|
||||||
|
// position: absolute;
|
||||||
|
// top: 0;
|
||||||
|
// bottom: 0;
|
||||||
|
// left: 0;
|
||||||
|
// right: 0;
|
||||||
|
// margin: auto;
|
||||||
|
// .con{
|
||||||
|
// position: absolute;
|
||||||
|
// top: 100px;
|
||||||
|
// left: 20px;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// .title{
|
||||||
|
// font-weight: bold;
|
||||||
|
// font-size: 19px;
|
||||||
|
// color: #3364B7;
|
||||||
|
// line-height: 26px;
|
||||||
|
// width: 70%;
|
||||||
|
// margin-left: 35px;
|
||||||
|
// text-align: center;
|
||||||
|
// }
|
||||||
|
// .content{
|
||||||
|
// width: 70%;
|
||||||
|
// height: 92px;
|
||||||
|
// font-size: 14px;
|
||||||
|
// color: #4C5361;
|
||||||
|
// line-height: 23px;
|
||||||
|
// text-align: justify;
|
||||||
|
// margin-top: 8px;
|
||||||
|
// margin-bottom: 20px;
|
||||||
|
// margin-left: 35px;
|
||||||
|
// }
|
||||||
|
// .line{
|
||||||
|
// width: 285px;
|
||||||
|
// height: 1px;
|
||||||
|
// border-bottom: 1px solid #F1F2F5;
|
||||||
|
// }
|
||||||
|
// .btnWrap{
|
||||||
|
// width: 92%;
|
||||||
|
// font-weight: bold;
|
||||||
|
// font-size: 13px;
|
||||||
|
// display: flex;
|
||||||
|
// justify-content: space-around;
|
||||||
|
// margin-top: 6px;
|
||||||
|
// height: 40px;
|
||||||
|
// line-height: 40px;
|
||||||
|
// .closeBtn{
|
||||||
|
// color: #999B9F;
|
||||||
|
// }
|
||||||
|
// .line{
|
||||||
|
// width: 1px;
|
||||||
|
// height: 48px;
|
||||||
|
// border-right: 1px solid #F1F2F5;
|
||||||
|
// }
|
||||||
|
// .nextBtn{
|
||||||
|
// color: #3364B7;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user