提交 b70d2307 编写于 作者: 张磊's avatar 张磊

add page model

上级 6dbd6e21
<!-- 通用Navbar -->
<template>
<section
:class="isFixNavbar ? 'nav-top fixed' : 'nav-top'"
:style="'height:' + navHeight"
>
<div
class="nav-part"
:style="
'background:' +
bgColor +
';' +
'padding-top:' +
paddingTop +
';border-bottom:' +
borderStyle
"
>
<section class="nav-top fixed">
<div class="nav-part">
<div class="nav-title">
<span
class="nav-back"
@click="goBack"
>
<img
v-show="isBlack"
src="../../assets/images/left-arrow-black.png"
alt=""
>
<img
v-show="!isBlack"
src="../../assets/images/left-arrow-black.png"
alt=""
>
</span>
<span
v-show="bgColor !== 'none'"
class="nav-title-title"
>{{
title
}}</span>
<span
v-show="isShowShare"
class="nav-share"
@click="goShare"
>
<img
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/courses/Group17_hover%403x.png"
>
</span>
<span class="nav-title-title">{{ title }}</span>
<span
v-show="isShowKf && !isWeb"
class="nav-share"
......@@ -66,43 +32,14 @@ import { goKfFn } from '@/utils/kf';
export default {
name: 'CommonNavbar',
props: {
bgColor: {
type: String,
default: '',
},
title: {
type: String,
default: '暂无数据',
},
// 是否fix定位
isFixNavbar: {
type: Boolean,
default: true,
},
burialPoint: {
default: '',
type: String,
},
backMethod: {
type: String,
default: 'native', // inner native
},
isShowShare: {
type: Boolean,
default: false,
},
isShowKf: {
type: Boolean,
default: false,
},
borderStyle: {
type: String,
default: '0px solid #e7e7e7',
},
isBlack: {
type: Boolean,
default: true,
},
},
data() {
return {
......@@ -115,18 +52,7 @@ export default {
isWeb: false,
};
},
computed: {
navHeight() {
if (this.isFixNavbar) {
return '54px';
} else {
return (this.navbarHeight + this.contentHeight) / this.fontSize + 'rem';
}
},
paddingTop() {
return this.navbarHeight / this.fontSize + 'rem';
},
},
computed: {},
created() {
if (this.$rocNative.isWeb) {
this.isWeb = this.$rocNative.isWeb;
......@@ -145,18 +71,6 @@ export default {
this.$rocNative.goBack();
}
},
// 分享
goShare() {
this.rocNative.shareWechat({
type: 6,
shareId: 0,
shareUrl: 'shareUrl',
title1: 'this.shareTitle1',
title2: 'this.shareTitle2',
shareImageUrl:
'https://file.yunqueyi.com/logo.png?version=' + new Date().getTime(),
});
},
goKf() {
goKfFn({
code: '0002',
......
......@@ -78,7 +78,7 @@ export default {
white-space: nowrap;
&.fixed {
position: fixed;
top: 70px;
top: 40px;
width: 100%;
z-index: 1000000000;
background: #fff;
......
......@@ -11,6 +11,12 @@ const routerConfig = [
name: 'index',
meta: {
title: '学情报告',
content: [
{
name: '客服',
outShow: true,
},
],
},
component: () => import('@/views/index'),
},
......
// 跳转客服
import request from 'mn-template/plugins/http';
import Vue from 'vue';
/*
*code ("0003-药械专线 0004-问诊专线 0007-会员专线 0002-教培专线 0005-招募专线 0001-基础业务")
*type 1-详情,2-ID、名称
......@@ -24,7 +25,8 @@ function nativeGo(url) {
seqNo: 1,
},
];
this.$rocNative.dispatchEventByModuleCode({
Vue.prototype.$rocNative.dispatchEventByModuleCode({
modeCode: 'M300',
jsonString: paramList,
});
......
<template>
<section class="exam-score-wrapper">
<CommonHeader title="完成项目考试分数情况" />
<PageModel :header-info="headerInfo" />
<CommonTitleWithDropdown
:data-list="dropdownList"
:title="title"
......@@ -21,8 +21,8 @@
<script>
const cookies = require('cookie-universal')();
import { getGeneralExam } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import CommonTitleWithDropdown from '@/components/common/common-title-with-dropdown';
import CommonNoMore from '@/components/common/common-no-more';
import ExamScoreList from '@/components/bussiness/exam-score-list';
......@@ -31,14 +31,18 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
// CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
ExamScoreList,
Loading,
PageModel,
},
data() {
return {
headerInfo: {
title: '完成项目考试分数情况',
},
isShowLoading: true,
title: '共0条数据',
needRightBtn: true,
......
<template>
<section class="exam-times-wrapper">
<CommonHeader title="完成项目考试次数情况" />
<!-- <CommonHeader title="完成项目考试次数情况" />-->
<PageModel :header-info="headerInfo" />
<CommonTitleMini
:title="title"
:need-right-btn="needRightBtn"
......@@ -19,8 +20,8 @@
<script>
const cookies = require('cookie-universal')();
import { getGeneralExam } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import CommonTitleMini from '@/components/common/common-title-mini';
import CommonNoMore from '@/components/common/common-no-more';
import ExamTimesList from '@/components/bussiness/exam-times-list';
......@@ -29,14 +30,18 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
// CommonHeader,
CommonTitleMini,
CommonNoMore,
ExamTimesList,
Loading,
PageModel,
},
data() {
return {
headerInfo: {
title: '完成项目考试次数情况',
},
isShowLoading: true,
title: '共0条数据',
needRightBtn: false,
......
<template>
<section class="container">
<CommonHeader
:title="projectInfo.projectName | shortName"
:is-show-kf="isShowKf"
<PageModel
:header-info="headerInfo"
@onService="goKf"
/>
<CommonAreaSelect
v-show="!isScroll"
......@@ -209,6 +209,7 @@
<script>
const cookies = require('cookie-universal')();
import { goPageByNative } from '@/utils';
import { goKfFn } from '@/utils/kf';
import { mapGetters, mapActions } from 'vuex';
import {
getAreaOrOrgList,
......@@ -220,12 +221,10 @@ import {
getGeneralExamList,
getStudyEffect,
} from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
import CommonTitle from '@/components/common/common-title';
import CommonTitleWithWhat from '@/components/common/common-title-with-what';
import CommonTitleWithBtn from '@/components/common/common-title-with-btn';
// import CommonLoading from '@/components/common/common-loading';
import CommonTaps from '@/components/common/common-tabs';
import CommonSwiperItem from '@/components/common/common-swiper-item';
import CommonSplitLine from '@/components/common/common-split-line';
......@@ -254,9 +253,8 @@ import Loading from '@/components/common/common-loading';
import { getGeneralData } from '@/service/index';
export default {
components: {
CommonHeader,
CommonTitle,
// CommonLoading,
PageModel,
CommonTaps,
CommonSwiperItem,
CommonSplitLine,
......@@ -296,6 +294,9 @@ export default {
},
data() {
return {
headerInfo: {
title: '项目名称',
},
isShowKf: true,
isShowLoading: false,
isScroll: false,
......@@ -323,7 +324,7 @@ export default {
studyRankList: [],
costRankList: [],
projectId: '',
token: '8C124410C0904B69B06D0E65039984B9',
token: '0434E93C02524BE1BA103658B2BFC835',
isOrgStat: false,
// 区域选择通用接口参数
queryParams: {
......@@ -480,6 +481,8 @@ export default {
getAreaOrOrgList(params).then((res) => {
if (res.code === '000000') {
this.projectInfo = res.data.doctorInfoRep;
this.headerInfo.title =
this.shortName(this.projectInfo.projectName) || '项目名称';
this.queryGDParams.originalFlag = res.data.doctorInfoRep.originalFlag;
if (!this.queryGDParams.regionId) {
this.setOriginalFlag(res.data.doctorInfoRep.originalFlag);
......@@ -816,6 +819,12 @@ export default {
}
},
goKf() {
goKfFn({
code: '0002',
});
},
// 映射Store中的Actions
...mapActions({
setOrgList: 'setOrgList',
......
<template>
<section class="klg-point-wrapper">
<CommonHeader title="培训前后知识点掌握情况" />
<!-- <CommonHeader title="培训前后知识点掌握情况" />-->
<PageModel :header-info="headerInfo" />
<TitleKLGPoint :title="title" />
<TipsInfo :content="tipsContent" />
<ChartColumnHorizontalTCLong
......@@ -13,8 +14,8 @@
<script>
const cookies = require('cookie-universal')();
import { getStudyEffect } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import TitleKLGPoint from '@/components/bussiness/title-klg-point';
import TipsInfo from '@/components/bussiness/tips-info';
import ChartColumnHorizontalTCLong from '@/components/bussiness/charts/chart-column-horizontal-tc-long';
......@@ -23,7 +24,7 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
PageModel,
TitleKLGPoint,
ChartColumnHorizontalTCLong,
TipsInfo,
......@@ -31,6 +32,9 @@ export default {
},
data() {
return {
headerInfo: {
title: '培训前后知识点掌握情况',
},
isShowLoading: true,
title: '共0个知识点',
token: '',
......
......@@ -3,6 +3,7 @@
<div class="pro-list-container">
<!-- <CommonHeader :title="title"></CommonHeader> -->
<PageModel
ref="PageModel"
:header-info="headerInfo"
@onService="goKf"
/>
......@@ -31,9 +32,10 @@ export default {
title: '学情报告',
backMethod: 'native',
},
token: '0F1712A49D7F4DC79A31484ED97E9433',
token: '0434E93C02524BE1BA103658B2BFC835',
projectList: [],
isShowKf: true,
headerEl: null,
};
},
created() {
......@@ -101,7 +103,6 @@ export default {
seqNo: 1,
},
];
console.log('--paramList', paramList);
that.$rocNative.dispatchEventByModuleCode({
modeCode: 'M300',
jsonString: paramList,
......@@ -109,6 +110,9 @@ export default {
}
});
},
changlist() {
this.$refs.PageModel.onEditContent([]);
},
},
};
</script>
......
<template>
<section class="rank-days-wrapper">
<CommonHeader title="完成天数排名" />
<!-- <CommonHeader title="完成天数排名" />-->
<PageModel :header-info="headerInfo" />
<CommonTitleWithDropdown :title="listTitle" />
<RankingItemDays
class="pdt-50"
......@@ -16,8 +17,8 @@
<script>
const cookies = require('cookie-universal')();
import { getStudyTimeData } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import CommonTitleWithDropdown from '@/components/common/common-title-with-dropdown';
import RankingItemDays from '@/components/bussiness/ranking-item-days';
import CommonNoMore from '@/components/common/common-no-more';
......@@ -26,7 +27,7 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
PageModel,
CommonTitleWithDropdown,
RankingItemDays,
CommonNoMore,
......@@ -34,6 +35,9 @@ export default {
},
data() {
return {
headerInfo: {
title: '完成天数排名',
},
isShowLoading: true,
listTitle: '共0条数据',
rankList: [],
......
<template>
<section class="rank-edu-wrapper">
<CommonHeader title="项目情况排名" />
<!-- <CommonHeader title="项目情况排名" />-->
<PageModel :header-info="headerInfo" />
<CommonTitleWithDropdown
:data-list="dropdownList"
:title="title"
......@@ -22,8 +23,8 @@
<script>
const cookies = require('cookie-universal')();
import { getStudyRankData } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import CommonTitleWithDropdown from '@/components/common/common-title-with-dropdown';
import CommonNoMore from '@/components/common/common-no-more';
import RankingList from '@/components/bussiness/ranking-item';
......@@ -32,7 +33,7 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
PageModel,
CommonTitleWithDropdown,
CommonNoMore,
RankingList,
......@@ -40,6 +41,9 @@ export default {
},
data() {
return {
headerInfo: {
title: '项目情况排名',
},
isShowLoading: true,
title: '共0条数据',
rankList: [],
......
因为 它太大了无法显示 源差异 。您可以改为 查看blob
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册