2023-04-25 15:06:35 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="app">
|
|
|
|
|
<view class="" style="background-color: #F4F5F7;height: 17rpx;width:100%"></view>
|
2023-04-26 13:41:34 +08:00
|
|
|
<!-- <u-tabs :list="tablist" :is-scroll="false" :current="tabcurrent" @change="tabchange" font-size='34'
|
2023-04-25 15:06:35 +08:00
|
|
|
bar-height='7' bar-width='43' inactive-color='#A09F9F' active-color='#4271B9'>
|
2023-04-25 17:12:47 +08:00
|
|
|
</u-tabs> -->
|
2023-04-25 15:06:35 +08:00
|
|
|
<view class="content" v-if="tabcurrent==0">
|
2023-04-26 13:41:34 +08:00
|
|
|
</view>
|
2023-04-25 15:06:35 +08:00
|
|
|
<view class="directory" v-if="tabcurrent==1">
|
|
|
|
|
<view class="imagetext" v-if="imgtextlist.length>0">
|
|
|
|
|
<view class="topheader">
|
|
|
|
|
图文学习
|
|
|
|
|
</view>
|
|
|
|
|
<view class="items">
|
2023-04-25 17:04:11 +08:00
|
|
|
<view class="item" v-for="(item,index) in imgtextlist" :key='item.trainingItemId'
|
|
|
|
|
@tap='goImglearning(item)'>
|
2023-04-25 15:06:35 +08:00
|
|
|
<image :src="baseurl+item.trainingItemCoverUrl" mode=""></image>
|
|
|
|
|
<view class="title">
|
|
|
|
|
{{item.trainingItemTitle}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text">
|
|
|
|
|
{{item.trainingItemDetails?item.trainingItemDetails:''}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="video" v-if="videolist.length>0">
|
|
|
|
|
<view class="topheader">
|
|
|
|
|
视频学习
|
|
|
|
|
</view>
|
|
|
|
|
<view class="items">
|
|
|
|
|
<view class="item" v-for="(item,index) in videolist" :key='item.trainingItemId'
|
|
|
|
|
@tap='goVideolearningdetails(item)'>
|
|
|
|
|
<image :src="baseurl+item.trainingItemCoverUrl" mode=""></image>
|
|
|
|
|
<view class="title">
|
|
|
|
|
{{item.trainingItemTitle}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text">
|
|
|
|
|
{{item.trainingItemDetails?item.trainingItemDetails:''}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if='videolist.length==0&&imgtextlist.length==0' class="" style="padding-top: 100rpx;">
|
|
|
|
|
<u-empty text="暂无目录" mode="list" icon-size='240' font-size='32'></u-empty>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
selectTrainingOrderItemList,
|
|
|
|
|
} from '@/api/Orderlearning/index.js'
|
|
|
|
|
import baseurl from '@/api/baseurl.js'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
baseurl: undefined,
|
|
|
|
|
videolist: [], //视频信息
|
|
|
|
|
imgtextlist: [], //图文信息
|
|
|
|
|
tabcurrent: 1, //tabsindex
|
|
|
|
|
tablist: [{ //tabs的list
|
|
|
|
|
name: '基础课程'
|
|
|
|
|
}, {
|
|
|
|
|
name: '进阶课程'
|
|
|
|
|
}],
|
|
|
|
|
trainingParentId: undefined,
|
|
|
|
|
nurseStationPersonId: undefined,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
const that = this
|
|
|
|
|
this.baseurl = baseurl
|
|
|
|
|
this.trainingParentId = options.trainingParentId
|
2023-04-25 17:12:47 +08:00
|
|
|
this.trainingOrderNo = options.trainingOrderNo
|
2023-04-25 15:06:35 +08:00
|
|
|
const value = uni.getStorageSync('nursePersonId');
|
|
|
|
|
if (value) {
|
|
|
|
|
that.nurseStationPersonId = value
|
|
|
|
|
that.info();
|
|
|
|
|
} else {}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2023-04-25 17:04:11 +08:00
|
|
|
//跳转图文学习
|
|
|
|
|
goImglearning(item) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/Imglearning/Imglearning?trainingItemId=${item.trainingItemId}`
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-04-25 15:06:35 +08:00
|
|
|
//跳转视频学习详情
|
|
|
|
|
goVideolearningdetails(item) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/Ordervideolearning/Ordervideolearning?trainingItemId=${item.trainingItemId}&trainingOrderNo=${item.trainingOrderNo}`
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
info() {
|
2023-04-25 17:12:47 +08:00
|
|
|
selectTrainingOrderItemList(this.trainingParentId, this.nurseStationPersonId, this.trainingOrderNo).then(
|
2023-04-25 15:06:35 +08:00
|
|
|
res => {
|
|
|
|
|
res.data.forEach(e => {
|
|
|
|
|
if (e.trainingItemType == 'VIDEO_LEARNING') {
|
|
|
|
|
this.videolist.push(e)
|
|
|
|
|
} else if (e.trainingItemType == 'GRAPHIC_LEARNING') {
|
|
|
|
|
this.imgtextlist.push(e)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//点击tabs
|
|
|
|
|
tabchange(index) {
|
|
|
|
|
this.tabcurrent = index;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
@import "./Orderlearning.scss";
|
|
|
|
|
</style>
|