task#15348,新加师傅界面
This commit is contained in:
@ -162,7 +162,7 @@ export function notifyInvoiceDetail(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取培训材料列表
|
||||
// 调度app获取新签列表
|
||||
export function pageList(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/user/supplierTrainingMaterialsPageList',
|
||||
@ -171,7 +171,14 @@ export function pageList(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 司机app获取新签列表
|
||||
export function driverTrainList(key){
|
||||
return request({
|
||||
url:'/supplier/supplierTraining/trainingTask',
|
||||
method:'GET',
|
||||
params:key
|
||||
})
|
||||
}
|
||||
|
||||
//获取普通材料
|
||||
export function getNormalList(key) {
|
||||
|
@ -135,6 +135,14 @@ const routes = [
|
||||
title:'培训文档'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/diverTrainDocment',
|
||||
name: 'diverTrainDocment',
|
||||
component:()=>import('@/views/documentView/diverTrainDocment.vue'),
|
||||
meta: {
|
||||
title:'培训文档'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/docmentList',
|
||||
name: 'docmentList',
|
||||
@ -180,7 +188,15 @@ const routes = [
|
||||
name: 'newTrainingList',
|
||||
component:()=>import('@/views/newcomerTraining/newTrainingList.vue'),
|
||||
meta: {
|
||||
title:'新人培训'
|
||||
title:'新服务商培训'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/driverTrainingList',
|
||||
name: 'driverTrainingList',
|
||||
component:()=>import('@/views/newcomerTraining/driverTrainingList.vue'),
|
||||
meta: {
|
||||
title:'新师傅培训'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1,4 +1,7 @@
|
||||
@import "@/styles/mixin.scss";
|
||||
::v-deep .van-nav-bar__content{
|
||||
background-color: #3A3A3A !important;
|
||||
}
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
|
103
src/styles/driverDocment.scss
Normal file
103
src/styles/driverDocment.scss
Normal file
@ -0,0 +1,103 @@
|
||||
@import "@/styles/mixin.scss";
|
||||
.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;
|
||||
|
||||
}
|
||||
.contentWrap{
|
||||
height: calc(100% - 180px) !important;
|
||||
}
|
@ -16,18 +16,20 @@ localStorage.setItem('token', token);
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
let reqUrl=config.url
|
||||
// console.log("reqUrl",reqUrl)
|
||||
config.data = config.contentType ? config.data : qs.stringify(config.data)
|
||||
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
||||
let token = localStorage.getItem('token');
|
||||
// alert(token);
|
||||
// let token='4099761587129c46b03c9316c9e866c9'
|
||||
// let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MTI0NTQ5NTMsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiJDLeS4iua1t-a1i-ivleacjeWKoeWVhiIsInN1cHBsaWVySWQiOjMzMDQxLCJzdXBwbGllclR5cGUiOjIsInVzZXJuYW1lIjoic29uZyIsInVzZXJUeXBlIjoicmVzY3VlQXBwIiwiZGV2aWNlSWQiOiIyMmI0OWNhMjBmOWI4MzMwZDk4NzIxNzNmMzllYTY4YmMiLCJhdXRob3JpdGllcyI6W119LCJzY29wZSI6WyJhbGwiXSwiaXNzIjoiaHR0cHM6Ly9zaW5vYXNzaXN0LmNvbSIsImV4cCI6MTcxMjU0MTM1MywiaWF0IjoxNzEyNDU0OTUzfQ.sPU9_OD_TOWcTwqmlawEGyo4mCPrEaRYw2R02gnvYJw'
|
||||
// console.log("tokentokentoken",token)
|
||||
if (reqUrl.includes("/driverApp")) {
|
||||
// console.log("司机app")
|
||||
config.headers['token'] = `${token}`;
|
||||
} else {
|
||||
console.log("调度app")
|
||||
} else if(reqUrl.includes("/supplierApp")){
|
||||
// console.log("调度app")
|
||||
config.headers['Authorization'] = `${token}`;
|
||||
}else{
|
||||
config.headers['token'] = `${token}`;
|
||||
}
|
||||
return config
|
||||
},
|
||||
|
@ -34,12 +34,12 @@ export const myMixins = {
|
||||
window.android.sendMessage("goBack");
|
||||
}
|
||||
},
|
||||
goH5Detail(item,type){//h5传参到app文档资料,培训文档
|
||||
goH5Detail(item){//h5传参到app文档资料,培训文档
|
||||
let data = {
|
||||
"action": "goTraining",
|
||||
"params": {
|
||||
"id": item.id,
|
||||
"docType" : type=='培训文档' ? 1 : 2,
|
||||
// "docType" : type=='培训文档' ? 1 : 2,
|
||||
}
|
||||
};
|
||||
|
||||
@ -48,7 +48,7 @@ export const myMixins = {
|
||||
if(isiOS){
|
||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||
}else {
|
||||
window.android.sendMessage("articleId=" + item.id+','+'docType='+(type=='培训文档' ? 1 : 2));
|
||||
window.android.sendMessage("articleId=" +'#'+ item.id);
|
||||
}
|
||||
},
|
||||
h5GoBack(){
|
||||
|
163
src/views/documentView/diverTrainDocment.vue
Normal file
163
src/views/documentView/diverTrainDocment.vue
Normal file
@ -0,0 +1,163 @@
|
||||
<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="名称/关键词/简介"
|
||||
>
|
||||
<!-- <template #button>
|
||||
<van-icon class="search" name="search" size="20" @click="getTrainingList"/>
|
||||
</template>-->
|
||||
</van-field>
|
||||
</template>
|
||||
<template slot="left">
|
||||
<div class="navLeft">
|
||||
<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>更新时间:2023-11-22 90:00:00</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"
|
||||
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:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.driverId = urlParams.get('driverId');
|
||||
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
|
||||
}
|
||||
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;
|
||||
}
|
||||
</style>
|
@ -1,28 +1,58 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="goBack"
|
||||
>
|
||||
<template slot="title">
|
||||
<div v-show="!show">文档资料</div>
|
||||
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getNormalList"/>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<div class="rightWrap" @click="show = !show">
|
||||
<img src="@/assets/serach.png" class="img2" v-show="!show"/>
|
||||
<img src="@/assets/delKey.png" class="img2" v-show="show" @click="initShow"/>
|
||||
</div>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
|
||||
<div class="tab_wrap">
|
||||
<template v-if="supplierId">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="goBack"
|
||||
>
|
||||
<template slot="title">
|
||||
<div v-show="!show">文档资料</div>
|
||||
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getNormalList"/>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<div class="rightWrap" @click="show = !show">
|
||||
<img src="@/assets/serach.png" class="img2" v-show="!show"/>
|
||||
<img src="@/assets/delKey.png" class="img2" v-show="show" @click="initShow"/>
|
||||
</div>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
</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">
|
||||
<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}"
|
||||
@click="changeTab(index)">
|
||||
{{ item.name }}
|
||||
@ -33,7 +63,6 @@
|
||||
<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">
|
||||
@ -61,19 +90,18 @@ export default {
|
||||
activeIndex: 0,
|
||||
pageList:[],
|
||||
totalList:[],
|
||||
/* pageNum:1,
|
||||
pageSize:10,*/
|
||||
keyword:'',
|
||||
// trainingType:1,
|
||||
isLoading:false,
|
||||
show:false,
|
||||
showEmpty:false,
|
||||
supplierId:'',
|
||||
driverId:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.supplierId = urlParams.get('supplierId');
|
||||
this.driverId = urlParams.get('driverId');
|
||||
this.getNormalList()
|
||||
},
|
||||
methods:{
|
||||
@ -90,8 +118,10 @@ export default {
|
||||
},
|
||||
async getNormalList(){
|
||||
let res= await getNormalList({
|
||||
type:2,
|
||||
id:this.supplierId,//33041,
|
||||
type:this.supplierId ? 2 : 1,
|
||||
// type:2,
|
||||
id: this.supplierId ? this.supplierId : this.driverId,
|
||||
// id:this.supplierId,//33041,
|
||||
text:this.keyword || '',
|
||||
})
|
||||
this.totalList=[]
|
||||
@ -128,5 +158,6 @@ export default {
|
||||
@import "@/styles/common.scss";
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/docment.scss";
|
||||
@import "@/styles/driverDocment.scss";
|
||||
|
||||
</style>
|
@ -77,7 +77,6 @@ export default {
|
||||
mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.supplierId = urlParams.get('supplierId');
|
||||
// this.$toast(this.supplierId);
|
||||
this.getTrainingList();
|
||||
},
|
||||
methods:{
|
||||
@ -95,7 +94,7 @@ export default {
|
||||
async getTrainingList(){
|
||||
let res= await getTrainingList({
|
||||
type:2,
|
||||
id:this.supplierId,//33041,
|
||||
id: this.supplierId,
|
||||
text:this.keyword || '',
|
||||
})
|
||||
this.totalList=[]
|
||||
|
298
src/views/newcomerTraining/driverTrainingList.vue
Normal file
298
src/views/newcomerTraining/driverTrainingList.vue
Normal file
@ -0,0 +1,298 @@
|
||||
<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() {
|
||||
this.getList();
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.driverId = urlParams.get('driverId');
|
||||
},
|
||||
async activated() {
|
||||
await 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.assessState === 0){
|
||||
this.showPoup=false
|
||||
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";
|
||||
.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>
|
@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<div class="imgWrap"><img :src="item.themePicture"></div>
|
||||
<div class="num common">{{ item.synopsis }}</div>
|
||||
<template v-if="item.listShowButton == null">
|
||||
<template v-if="item.alreadyRead === 1">
|
||||
<div class="status" style="color: #cccccc">已处理</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
@ -107,7 +107,9 @@ export default {
|
||||
})
|
||||
this.pageList=res.data;
|
||||
let aaa=this.pageList.every(item=>item.listShowButton != 1)
|
||||
if(aaa){
|
||||
console.log(aaa)
|
||||
// if(aaa){
|
||||
if(res.assessState === 0){
|
||||
this.showPoup=false
|
||||
this.isFinished=true
|
||||
}
|
||||
|
Reference in New Issue
Block a user