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

add page model

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