提交 e5d3c92b 编写于 作者: guangjun.yang's avatar guangjun.yang

添加新页面

上级 10c68c53
......@@ -15,7 +15,7 @@ export default {
}
</script>
<style lang="less">
<style lang="scss">
.about-container {
font-size: 18px;
}
......
此差异已折叠。
<template>
<!-- 专项合作列表 -->
<section class="coop-container">
<div
v-for="(item , index) in dataList"
:key="index"
class="coop-item"
@click="jumpByAuthId(item)"
>
<div class="coop-item-left">
<img :src="item.attachmentUrl">
</div>
<div class="coop-item-right">
<span class="coop-item-right-title">{{item.projectName}}</span>
<span class="coop-item-right-other">
<img src="../../assets/images/org.png" >
{{item.organizationNameList | subOrgNames}}
</span>
<span v-if="item.authType == 1"
class="coop-item-right-other">
<img src="../../assets/images/pub-time.png" >
2010-10-10
<!-- {{item.oldTime}} -->
<!-- <span class="pro-status" :class="{continue: item.projectStatus == 5}">
{{item.projectStatus == 5 ? '进行中' : item.projectStatus == 10 ? '已结束' : ''}}
</span> -->
</span>
<span v-else
class="coop-item-right-other"
><img src="../../assets/images/pub-time.png" >
2010.01.10 ~ 2010.10.10
<!-- {{item.projectBegintimeLong | formatTime}}-{{item.projectEndtimeLong | formatTime}} -->
<!-- <span class="pro-status" :class="{continue: item.projectStatus == 5}">
{{item.projectStatus == 5 ? '进行中' : item.projectStatus == 10 ? '已结束' : ''}}
</span> -->
</span>
</div>
</div>
<!-- <NoMoreContent v-show="dataList.length > 9"></NoMoreContent> -->
<!-- <NoContent v-show="!dataList.length && isShow"></NoContent> -->
<!-- <van-popup
v-model="showGoUpdate"
position="bottom"
:style="{ height: '4.427rem' }"
>
<div class="update-dialog-content">
<p class="title">本项目需要更新至最新版本才能参加哦</p>
<p class="update-btn v-hairline-top confirm-btn" @click="goUpdateHandler">立即更新</p>
<p class="update-btn v-hairline-top" @click="showGoUpdate = false">取消</p>
</div>
</van-popup> -->
</section>
</template>
<script>
// import NoMoreContent from "@/components/business/no-more-content";
// import NoContent from "@/components/business/no-content";
// import UpdateDialog from "@/components/business/update-dialog";
// import { setEventByModuleCode, deepCopy, getWebPageUrl } from "@/utils/index";
import { goNativePage, goPageByNative } from "@/utils/index";
// import { getAppVersion } from "@/utils";
// import { mapActions, mapGetters } from "vuex";
// import { Popup } from 'vant';
export default {
name: "coop-list-item",
data() {
return {
bgColor: "green"
};
},
props: {
dataList: {
type: Array,
default: () => []
},
},
// computed: {
// ...mapGetters(["userInfo"])
// },
components: {
// NoMoreContent,
// NoContent,
// UpdateDialog,
},
mounted() {},
filters: {
subOrgNames(orgNameList) {
let allName = orgNameList[0];
for(let i = 1; i < orgNameList.length; i ++) {
allName += `/${orgNameList[i]}`
}
if (allName && allName.length > 13) {
return allName.substring(0, 13) + '...'
} else {
return allName
}
},
// 将字符串截短至指定长度,并用在最后追加特定字符串(例如:...)
shortNameL(value, length = 15, append = '...') {
if (value && value.length > length) {
return value.substring(0, length) + append
} else {
return value
}
},
},
methods: {
jumpByAuthId(pInfo) {
// this.$sendBuriedData({
// component_tag: '467#400141'
// });
if(pInfo.authId == 1) {
goNativePage(this, pInfo);
} else {
goPageByNative(this, pInfo);
}
}
}
};
</script>
<style scoped lang="scss">
.coop-container {
position: relative;
margin: 0px 15px;
&-status {
position: absolute;
top: 6px;
left: 0;
// display: block;
width: 44px;
height: 18px;
line-height: 18px;
padding: 0 0 0 4px;
background: rgba(88, 144, 221, 1);
color: #fff;
font-size: 11px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
}
.coop-item {
display: flex;
width: 100%;
height: 128px;
border-bottom: 1px solid #f0f0f0;
background: #fff;
flex-direction: row;
justify-content: center;
align-items: center;
img {
width: 115px;
height: 86px;
margin-right: 15px;
border-radius: 3px;
}
&-left {
display: flex;
position: relative;
top: 0;
}
&-right {
display: flex;
width: 215px;
flex-direction: column;
padding-top: 4px;
&-title {
height: 50px;
line-height: 23px;
font-size: 16px;
font-weight: 700;
color: rgba(55, 56, 57, 1);
}
&-other {
height: 20px;
line-height: 20px;
font-size: 13px;
font-weight: 400;
color: rgba(151, 152, 153, 1);
& > img {
position: relative;
top: 2px;
left: 0;
width: 15px;
height: 15px;
margin-right: 0;
}
.pro-status {
float: right;
font-size: 13px;
padding-right: 4px;
color: #979899;
&.continue {
color: #449284;
}
&.end {
color: #979899;
}
}
}
}
}
.update-dialog-content{
padding: 0 15px;
box-sizing: border-box;
.title{
text-align: center;
color: #373839;
font-size: 18px;
padding: 15px 0;
line-height: 25px;
}
.update-btn{
text-align: center;
height: 55px;
line-height: 55px;
font-size: 16px;
color: #979899;
&.confirm-btn{
color: #449284;
}
&.v-hairline-top::after{
border-top-width: 1px;
}
}
}
</style>
<style>
.van-overlay{
background-color: rgba(0,0,0,0.5);
}
</style>
<template>
<!-- 专项合作列表 -->
<section class="coop-container">
<div
v-for="(item , index) in dataList"
:key="index"
class="coop-item"
@click="jumpByAuthId(item)"
>
<div class="coop-item-left">
<img :src="item.attachmentUrl">
</div>
<div class="coop-item-right">
<span class="coop-item-right-title">{{item.projectName}}</span>
<span class="coop-item-right-other">
<img src="../../assets/images/org.png" >
{{item.organizationNameList | subOrgNames}}
</span>
<span v-if="item.authType == 1"
class="coop-item-right-other">
<img src="../../assets/images/pub-time.png" >
{{item.oldTime}}
</span>
<span v-else
class="coop-item-right-other"
><img src="../../assets/images/pub-time.png" >
{{item.projectBegintimeLong | formatTime}}-{{item.projectEndtimeLong | formatTime}}
</span>
</div>
</div>
</section>
</template>
<script>
import { goNativePage, goPageByNative, parseTime } from "@/utils/index";
export default {
name: "coop-list-item",
data() {
return {
bgColor: "green"
};
},
props: {
dataList: {
type: Array,
default: () => []
},
},
mounted() {},
filters: {
subOrgNames(orgNameList) {
let allName = orgNameList[0];
for(let i = 1; i < orgNameList.length; i ++) {
allName += `/${orgNameList[i]}`
}
if (allName && allName.length > 13) {
return allName.substring(0, 13) + '...'
} else {
return allName
}
},
// 将字符串截短至指定长度,并用在最后追加特定字符串(例如:...)
shortNameL(value, length = 15, append = '...') {
if (value && value.length > length) {
return value.substring(0, length) + append
} else {
return value
}
},
// 格式化日期
formatTime: function (timeStamp, format = '{yyyy}.{mm}.{dd}') {
return parseTime(timeStamp, format)
},
},
methods: {
jumpByAuthId(pInfo) {
this.$sendBuriedData && this.$sendBuriedData({
component_tag: '467#400141'
});
if(pInfo.authId == 1) {
goNativePage(this, pInfo);
} else {
goPageByNative(this, pInfo);
}
}
}
};
</script>
<style scoped lang="scss">
.coop-container {
position: relative;
margin: 0px 15px;
&-status {
position: absolute;
top: 6px;
left: 0;
// display: block;
width: 44px;
height: 18px;
line-height: 18px;
padding: 0 0 0 4px;
background: rgba(88, 144, 221, 1);
color: #fff;
font-size: 11px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
}
.coop-item {
display: flex;
width: 100%;
height: 128px;
border-bottom: 1px solid #f0f0f0;
background: #fff;
flex-direction: row;
justify-content: center;
align-items: center;
img {
width: 115px;
height: 86px;
margin-right: 15px;
border-radius: 3px;
}
&-left {
display: flex;
position: relative;
top: 0;
}
&-right {
display: flex;
width: 215px;
flex-direction: column;
padding-top: 4px;
&-title {
height: 50px;
line-height: 23px;
font-size: 16px;
font-weight: 700;
color: rgba(55, 56, 57, 1);
}
&-other {
height: 20px;
line-height: 20px;
font-size: 13px;
font-weight: 400;
color: rgba(151, 152, 153, 1);
& > img {
position: relative;
top: 2px;
left: 0;
width: 15px;
height: 15px;
margin-right: 0;
}
.pro-status {
float: right;
font-size: 13px;
padding-right: 4px;
color: #979899;
&.continue {
color: #449284;
}
&.end {
color: #979899;
}
}
}
}
}
.update-dialog-content{
padding: 0 15px;
box-sizing: border-box;
.title{
text-align: center;
color: #373839;
font-size: 18px;
padding: 15px 0;
line-height: 25px;
}
.update-btn{
text-align: center;
height: 55px;
line-height: 55px;
font-size: 16px;
color: #979899;
&.confirm-btn{
color: #449284;
}
&.v-hairline-top::after{
border-top-width: 1px;
}
}
}
// .van-overlay{
// background-color: rgba(0,0,0,0.5);
// }
</style>
......@@ -14,7 +14,7 @@
}
}
</script>
<style lang="less" scoped>
<style lang="scss" scoped>
.tips-info-wrapper {
height: 44px;
line-height: 44px;
......
......@@ -14,7 +14,7 @@
}
}
</script>
<style lang="less" scoped>
<style lang="scss" scoped>
.tips-info-wrapper {
height: 44px;
line-height: 44px;
......
......@@ -439,7 +439,7 @@ export default {
}
};
</script>
<style lang="less" scoped>
<style lang="scss" scoped>
.select-wrapper {
font-family: PingFangSC-Regular;
.mask {
......
......@@ -90,7 +90,7 @@ export default {
}
};
</script>
<style lang="less" scoped>
<style lang="scss" scoped>
.select-wrapper {
font-family: PingFangSC-Regular;
......
......@@ -6,7 +6,7 @@
"private": true,
"scripts": {
"test": "jest",
"dev": "cross-env NODE_ENV=development NUXT_ENV_APP=dev HOST=10.177.11.247 PORT=4001 nodemon server/index.js --watch server",
"dev": "cross-env NODE_ENV=development NUXT_ENV_APP=dev HOST=0.0.0.0 PORT=4001 nodemon server/index.js --watch server",
"build": "NUXT_ENV_APP=${ENV} nuxt build",
"start": "cross-env NUXT_ENV_APP=${ENV} HOST=0.0.0.0 PORT=3100 NODE_ENV=production node server/index.js",
"generate": "nuxt generate"
......@@ -18,7 +18,8 @@
"koa": "^2.6.2",
"nuxt": "^2.0.0",
"v-charts": "^1.19.0",
"vant": "^2.2.13"
"vant": "^2.2.13",
"vconsole": "^3.3.4"
},
"devDependencies": {
"@nuxtjs/axios": "^5.5.4",
......
<template>
<section>
<section class="exam-score-wrapper">
<CommonHeader title="完成项目考试分数情况"></CommonHeader>
<CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<ExamScoreList class="pdt-50" :dataList="dataList"></ExamScoreList>
......@@ -103,11 +103,13 @@ export default {
}
};
</script>
<style lang="less" scoped>
.pdt-50 {
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
<style lang="scss" scoped>
.exam-score-wrapper {
.pdt-50 {
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
}
}
</style>
\ No newline at end of file
<template>
<section>
<section class="exam-times-wrapper">
<CommonHeader title="完成项目考试次数情况"></CommonHeader>
<CommonTitleMini :title="title" :needRightBtn="needRightBtn"></CommonTitleMini>
<ExamTimesList class="pdt-50" :dataList="dataList"></ExamTimesList>
......@@ -81,11 +81,13 @@ export default {
}
};
</script>
<style lang="less" scoped>
.pdt-50 {
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
<style lang="scss" scoped>
.exam-times-wrapper {
.pdt-50 {
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
}
}
</style>
\ No newline at end of file
......@@ -739,7 +739,7 @@ export default {
};
</script>
<style lang="less" scoped>
<style lang="scss" scoped>
.container {
margin: 0 auto;
font-size: 17px;
......
<template>
<section>
<section class="klg-point-wrapper">
<CommonHeader title="培训前后知识点掌握情况"></CommonHeader>
<TitleKLGPoint :title="title"></TitleKLGPoint>
<TipsInfo :content="tipsContent"></TipsInfo>
......@@ -78,8 +78,10 @@ export default {
}
};
</script>
<style lang="less" scoped>
.mt-10 {
margin-top: 20px !important;
}
<style lang="scss" scoped>
.klg-point-wrapper {
.mt-10 {
margin-top: 20px !important;
}
}
</style>
\ No newline at end of file
<template>
<!-- 专项合作首页: 我参与的,其它项目 -->
<div class="pro-list-container">
<CommonHeader borderStyle="1px solid #e7e7e7" :title="title"></CommonHeader>
<CoopListItem style="margin: 10px 0;" :dataList="projectList"></CoopListItem>
<Loading v-if="showLoading"/>
</div>
</template>
<script>
import CommonHeader from "@/components/common/common-header";
import CoopListItem from "@/components/bussiness/coop-list-item";
import Loading from "@/components/common/common-loading";
import { getProjectList } from "@/service";
const cookies = require("cookie-universal")();
export default {
data() {
return {
token: '6177426E77F8435B88A5B946B3546904',
showLoading: false,
title: "学情报告",
projectList: []
};
},
components: {
CommonHeader,
CoopListItem,
Loading
},
created() {
if (process.client) {
var _this = this;
window.__getUserInfo = function(param) {
// _this.token = param.userToken;
cookies.set("lreporttoken", _this.token);
_this.getProjectList();
};
if (this.$rocNative.isWeb) {
cookies.set("lreporttoken", _this.token);
_this.getProjectList();
} else {
_this.getUserInfo();
}
}
},
mounted() {
},
methods: {
// 与原生交互,获取用户信息
getUserInfo() {
!this.$rocNative.isWeb && this.$rocNative.getUserInfo &&
this.$rocNative.getUserInfo().then(params => {
this.token = params.userToken;
this.getProjectList();
});
},
// //获取版本号
// getUserInfo() {
// rocNative.getUserInfo({
// __funcName: "__getUserInfo"
// });
// },
// 课程数据
getProjectList() {
let params = {
token: this.token
}
getProjectList(params).then(res => {
this.showLoading = true;
if (res.code === "000000") {
this.showLoading = false;
this.projectList = res.data && res.data.data || [];
}
});
// this.projectList = {"projectList":[{"id":552,"projectName":"CME学分演示证书","projectIntro":"CME学分演示证书","organizationId":0,"organizationName":"云鹊医","attachmentUrl":"https://test1-file.yunqueyi.com/image/png/protal/project/20200115154714593.png","authType":2,"newReportUrl":"http://uat-phome.yunqueyi.com/lreport_ssr/?projectId=552"},{"id":444,"projectName":"非学习时长项目-学情报告","projectIntro":"非学时长管控项目的测试","organizationId":0,"organizationName":"云鹊医","attachmentUrl":"https://test1-file.yunqueyi.com/image/png/protal/project/201912251034536.png","authType":2,"newReportUrl":"http://uat-phome.yunqueyi.com/lreport_ssr/?projectId=444"},{"id":558,"projectName":"学情报告四进行中","projectIntro":"学情报告进行中","organizationId":0,"organizationName":"云鹊医","attachmentUrl":"https://test1-file.yunqueyi.com/image/png/protal/project/20200115170759389.png","authType":2,"newReportUrl":"http://uat-phome.yunqueyi.com/lreport_ssr/?projectId=558"},{"id":539,"projectName":"学情报告课程二(向文)","projectIntro":"测试","organizationId":0,"organizationName":"云鹊医","attachmentUrl":"https://test1-file.yunqueyi.com/image/png/protal/project/20200114100237116.png","authType":2,"newReportUrl":"http://uat-phome.yunqueyi.com/lreport_ssr/?projectId=539"},{"id":567,"projectName":"213项目木不愧是第八届","projectIntro":"项目简介南沙看\n温湿度卡比较好发快递发","organizationId":0,"organizationName":"云鹊医","attachmentUrl":"https://test1-file.yunqueyi.com/image/png/protal/project/20200213133438218.png","authType":2,"newReportUrl":"http://uat-phome.yunqueyi.com/lreport_ssr/?projectId=567"},{"id":561,"projectName":"测试2020-0212-01","projectIntro":"测试","organizationId":0,"organizationName":"云鹊医","attachmentUrl":"https://test1-file.yunqueyi.com/image/png/protal/project/20200212102647699.png","authType":2,"newReportUrl":"http://uat-phome.yunqueyi.com/lreport_ssr/?projectId=561"},{"id":575,"projectName":"老项目回归","projectIntro":"测试","organizationId":0,"organizationName":"云鹊医","attachmentUrl":"https://test1-file.yunqueyi.com/image/png/protal/project/2020021316252631.png","authType":2,"newReportUrl":"http://uat-phome.yunqueyi.com/lreport_ssr/?projectId=575"},{"id":593,"projectName":"20200217学分问题重现","projectIntro":"20200217学分问题重现","organizationId":0,"organizationName":"云鹊医","attachmentUrl":"https://test1-file.yunqueyi.com/image/png/protal/project/20200217171249130.png","authType":2,"newReportUrl":"http://uat-phome.yunqueyi.com/lreport_ssr/?projectId=593"},{"id":581,"projectName":"CME重现线上问题","projectIntro":"CME重现线上问题","organizationId":0,"organizationName":"云鹊医","attachmentUrl":"https://test1-file.yunqueyi.com/image/png/protal/project/20200217145150569.png","authType":2,"newReportUrl":"http://uat-phome.yunqueyi.com/lreport_ssr/?projectId=581"}],"respMsg":"success","respCode":200};
},
}
};
</script>
<style lang="scss" scoped>
</style>
<template>
<section>
<section class="rank-days-wrapper">
<CommonHeader title="完成天数排名"></CommonHeader>
<CommonTitleWithDropdown :title="listTitle" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<RankingItemDays class="pdt-50" :rankList="rankList"></RankingItemDays>
......@@ -81,11 +81,13 @@ export default {
}
};
</script>
<style lang="less" scoped>
.pdt-50 {
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
<style lang="scss" scoped>
.rank-days-wrapper {
.pdt-50 {
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
}
}
</style>
\ No newline at end of file
<template>
<section>
<section class="rank-edu-wrapper">
<CommonHeader title="项目情况排名"></CommonHeader>
<CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<RankingList class="pdt-50" :certFlag="certFlag" :rankList="rankList"></RankingList>
......@@ -104,11 +104,14 @@ export default {
},
};
</script>
<style lang="less" scoped>
.pdt-50 {
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
<style lang="scss" scoped>
.rank-edu-wrapper {
.pdt-50 {
padding-top: 50px;
}
.mt-10 {
margin-top: 10px !important;
}
}
</style>
\ No newline at end of file
</style>
......@@ -2,11 +2,22 @@ import Vue from 'vue'
import rocNative from '@/utils/jsbridge'
import echarts from 'echarts'
import { Toast } from 'vant';
// import { BASE_URL } from '@/utils/enumerate';
// const { NUXT_ENV_APP } = process.env;
// import WebBuriedPoint, { sendBuriedData } from 'web-buried-point';
// Vue.use(WebBuriedPoint, {
// class_name: `template_v2`,
// url: `${BASE_URL[NUXT_ENV_APP]}/file/log/trace1`
// });
// Vue.prototype.$sendBuriedData = sendBuriedData;
Vue.use(Toast);
// "vconsole": "^3.3.4"
// import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
// let vConsole = new VConsole() // 初始化
import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
let vConsole = new VConsole() // 初始化
Vue.prototype.$echarts = echarts
Vue.prototype.$rocNative = new rocNative();
\ No newline at end of file
......@@ -228,4 +228,16 @@ export const getStudyTimeData = async data => {
withCredentials: true,
url: 'stats/report/studyTime/' + data.pageCfg.type
});
};
\ No newline at end of file
};
/**
* 查询用户项目列表
*/
export const getProjectList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: 'portal/report/getReportListForApp'
});
};
const { NUXT_ENV_APP } = process.env;
export const BASE_URL = {
// dev: 'https://dev-sc.yunqueyi.com',
dev: 'https://uat-sc.yunqueyi.com',
dev: 'https://dev-sc.yunqueyi.com',
// dev: 'https://uat-sc.yunqueyi.com',
// dev: 'https://sc.yunqueyi.com',
test: 'https://test1-sc.yunqueyi.com',
uat: 'https://uat-sc.yunqueyi.com',
......
......@@ -41,10 +41,42 @@ export const echartColors = [
"#FFB01B"
]
// 日期与时间解析函数
export function parseTime(time, cFormat) {
if (arguments.length === 0) {
return null
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if (('' + time).length === 10) time = parseInt(time) * 1000
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
if (key === 'a') return ['一', '二', '三', '四', '五', '六', '日'][value - 1]
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}
// 跳转到新的学情报告页面
export function goPageByNative(vm, pageSubUrl){
let url = getShareUrl() + pageSubUrl;
console.log('##########', url)
let paramList = [
{
"key":"pageUrl",
......@@ -67,4 +99,30 @@ export function goPageByNative(vm, pageSubUrl){
modeCode: 'M300',
jsonString: paramList
})
}
// 跳转到原生的学情详情页面
export function goNativePage(vm, config = {id: 1, authType: 1}){
let paramList = [
{
"key":"className",
"value": 'com.picahealth.yunque.activitys.learnreport.learnreport2.NewLearnReportActivity###NewLearnReportVC.PicaDo',
"type":4,
"seqNo":1
},{
"key":"id",
"value": config.id,
"type":1,
"seqNo":2
},{
"key":"authType",
"value": config.authType,
"type": 1,
"seqNo": 3
}
]
vm.$rocNative.dispatchEventByModuleCode && vm.$rocNative.dispatchEventByModuleCode({
modeCode: 'M200',
jsonString: paramList
})
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册