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

Merge branch 'dev-phrase2.1-0316' into 'release'

学情报告V2.1 code reviewer:杨广俊

学情报告V2.1 code reviewer:杨广俊

See merge request !10
# COMPONENTS
**This directory is not required, you can delete it if you don't want to use it.**
The components directory contains your Vue.js Components.
_Nuxt.js doesn't supercharge these components._
<template>
<div class="about-container">
about nuxtjs ssr
</div>
</template>
<script>
// asyncData fetch 在组件中无效
export default {
data() {
return {
name: 'about'
}
}
}
</script>
<style lang="less">
.about-container {
font-size: 18px;
}
</style>
\ No newline at end of file
此差异已折叠。
<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="less">
.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>
<ul class="common-area-select">
<li class="center" @click="areaClick">
{{areaName}}<img v-show="!showArea" src="../../assets/images/arr-down.png"/><img v-show="showArea" src="../../assets/images/arr-up.png"/>
</li>
<li class="center" :class="{'gray': isNotVisible}" @click="orgClick">
{{orgName}}<img v-show="isNotVisible" src="../../assets/images/arr-down-white.png"/><img v-show="!showOrg && !isNotVisible" src="../../assets/images/arr-down.png"/><img v-show="showOrg && !isNotVisible" src="../../assets/images/arr-up.png"/>
</li>
</ul>
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: {
areaName: {
type: String,
default: "全部"
},
orgName: {
type: String,
default: "全部机构"
},
showArea: {
type: Boolean,
default: false,
},
showOrg: {
type: Boolean,
default: false
}
},
computed: {
...mapGetters({
orgList: 'orgList',
areaDegree: 'areaDegree'
}),
isNotVisible() {
if((this.orgList && this.orgList.length == 0) || this.areaDegree == 0 || this.areaDegree == 1 || this.areaDegree == 2) {
return true;
} else {
return false;
}
}
},
methods: {
areaClick() {
this.$emit("areaClick");
},
orgClick() {
this.$emit("orgClick");
}
}
};
</script>
<style lang="less" scoped>
.common-area-select {
// padding-top: 50px;
display: flex;
width: 100%;
height: 35px;
line-height: 35px;
margin: 2px 0 10px;
flex-direction: row nowrap;
align-content: center;
align-items: center;
text-align: center;
justify-content: center; /* 水平居中 */
.center {
flex: 1;
font-size: 15px;
font-weight: 400;
color: #676869;
&.gray {
color: #C7C8C9;
}
}
img {
// padding-top: 10px;
position: relative;
left: 3px;
top: 1px;
width: 12px;
height: 12px;
}
}
</style>
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<template> <template>
<ul class="common-area-select"> <ul class="common-area-select">
<li class="center" @click="areaClick"> <li class="center" @click="areaClick">
{{areaName}}<img v-show="!showArea" src="../../assets/images/arr-down.png"/><img v-show="showArea" src="../../assets/images/arr-up.png"/> <span><img class="map" src="../../assets/images/map-icon.png"/>{{areaName}}</span><img v-show="!showArea" src="../../assets/images/arr-down.png"/><img v-show="showArea" src="../../assets/images/arr-up.png"/>
</li>
<li class="center" :class="{'gray': isNotVisible}" @click="orgClick">
{{orgName}}<img v-show="isNotVisible" src="../../assets/images/arr-down-white.png"/><img v-show="!showOrg && !isNotVisible" src="../../assets/images/arr-down.png"/><img v-show="showOrg && !isNotVisible" src="../../assets/images/arr-up.png"/>
</li> </li>
</ul> </ul>
</template> </template>
...@@ -17,40 +14,21 @@ export default { ...@@ -17,40 +14,21 @@ export default {
type: String, type: String,
default: "全部" default: "全部"
}, },
orgName: {
type: String,
default: "全部机构"
},
showArea: { showArea: {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
showOrg: {
type: Boolean,
default: false
}
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
orgList: 'orgList',
areaDegree: 'areaDegree' areaDegree: 'areaDegree'
}), }),
isNotVisible() {
if((this.orgList && this.orgList.length == 0) || this.areaDegree == 0 || this.areaDegree == 1 || this.areaDegree == 2) {
return true;
} else {
return false;
}
}
}, },
methods: { methods: {
areaClick() { areaClick() {
this.$emit("areaClick"); this.$emit("areaClick");
}, },
orgClick() {
this.$emit("orgClick");
}
} }
}; };
</script> </script>
...@@ -65,8 +43,8 @@ export default { ...@@ -65,8 +43,8 @@ export default {
// padding-top: 50px; // padding-top: 50px;
display: flex; display: flex;
width: 100%; width: 100%;
height: 35px; height: 44px;
line-height: 35px; line-height: 44px;
margin: 2px 0 0px; margin: 2px 0 0px;
flex-direction: row nowrap; flex-direction: row nowrap;
align-content: center; align-content: center;
...@@ -74,18 +52,34 @@ export default { ...@@ -74,18 +52,34 @@ export default {
text-align: center; text-align: center;
justify-content: center; /* 水平居中 */ justify-content: center; /* 水平居中 */
.center { .center {
flex: 1; display: flex;
flex-direction: row;
justify-content: space-between;
align-content: center;
align-items: center;
padding: 0 15px;
width: 100%;
// flex: 1;
font-size: 15px; font-size: 15px;
font-weight: 400; font-weight: 400;
color: #676869; color: #676869;
background: #F8F9FA;
&.gray { &.gray {
color: #C7C8C9; color: #C7C8C9;
} }
.map {
position: relative;
top: 2.5px;
left: -2px;
margin-right: 3px;
width: 16px;
height: 16px;
}
} }
img { img {
// padding-top: 10px; // padding-top: 10px;
position: relative; position: relative;
left: 3px; left: 0;
top: 1px; top: 1px;
width: 12px; width: 12px;
height: 12px; height: 12px;
......
<!-- Tabs组件 --> <!-- Tabs组件 -->
<template> <template>
<div class="common-tabs-wrapper"> <div class="common-tabs-wrapper" :class="{'fixed': needFixed}">
<ul class="common-tabs"> <div class="sub-wrapper" :class="{'fixed': needFixed}">
<li <ul class="common-tabs" id="tabsWrapperId">
<li :id="'tabsItem' + index"
v-show="(item === '总体概况' v-show="(item === '总体概况'
|| item === '人群分析' || item === '人群分析'
|| item === '课程分析' && projectInfo.existCourse === 1) || item === '课程分析' && projectInfo.existCourse === 1)
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
<span class="over"></span> <span class="over"></span>
<span class="border"></span> <span class="border"></span>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
...@@ -35,6 +37,10 @@ export default { ...@@ -35,6 +37,10 @@ export default {
props: { props: {
projectInfo: { projectInfo: {
type: Object type: Object
},
needFixed: {
type: Boolean,
default: false
} }
}, },
mounted() {}, mounted() {},
...@@ -42,6 +48,7 @@ export default { ...@@ -42,6 +48,7 @@ export default {
clickTab(index) { clickTab(index) {
this.cIndex = index; this.cIndex = index;
this.$emit("tabClicked", index); this.$emit("tabClicked", index);
let tabsItemId = 'tabsItem' + index;
} }
} }
}; };
...@@ -49,17 +56,40 @@ export default { ...@@ -49,17 +56,40 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.common-tabs-wrapper { .common-tabs-wrapper {
.sub-wrapper {
display: flex; display: flex;
position: relative; position: relative;
width: 100%;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1; z-index: 1;
font-size: 13px; font-size: 13px;
width: 100%;
white-space: nowrap;
&.fixed {
position: fixed;
top: 70px;
width: 100%;
z-index: 1000000000;
background: #fff;
white-space: nowrap;
overflow-x: auto;
}
}
display: flex;
position: relative;
width: 100%;
top: 0;
left: 0;
z-index: 1000000000;
font-size: 13px;
.common-tabs { .common-tabs {
width: 100%;
white-space: nowrap; white-space: nowrap;
overflow-x: auto; overflow-x: auto;
padding-bottom: 6px; padding: 9px 0;
font-size: 13px; font-size: 13px;
// padding: 5px 0;
li { li {
display: inline-block; display: inline-block;
height: 30px; height: 30px;
...@@ -74,6 +104,9 @@ export default { ...@@ -74,6 +104,9 @@ export default {
&:first-child { &:first-child {
margin-left: 15px; margin-left: 15px;
} }
&:last-child {
margin-right: 15px;
}
&.active { &.active {
color: #449284; color: #449284;
background: #e3efed; background: #e3efed;
...@@ -87,19 +120,19 @@ export default { ...@@ -87,19 +120,19 @@ export default {
bottom: 0px; bottom: 0px;
left: 0; left: 0;
width: 100%; width: 100%;
height: 6px; height: 9px;
z-index: 2; z-index: 10000000;
background: #fff; background: #fff;
} }
.border { .border {
display: block; display: block;
width: 100%; width: 100%;
height: 1px; height: 1px;
bottom: -3px; bottom: 0px;
left: 0; left: 0;
border-bottom: 1px solid #f0f1f2; border-bottom: 1px solid #f0f1f2;
position: absolute; position: absolute;
z-index: 2; z-index: 10000000;
} }
} }
</style> </style>
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<template> <template>
<div class="common-tabs-wrapper" :class="{'fixed': needFixed}"> <div class="common-tabs-wrapper" :class="{'fixed': needFixed}">
<div class="sub-wrapper" :class="{'fixed': needFixed}"> <div class="sub-wrapper" :class="{'fixed': needFixed}">
<ul class="common-tabs"> <ul class="common-tabs" id="tabsWrapperId">
<li <li :id="'tabsItem' + index"
v-show="(item === '总体概况' v-show="(item === '总体概况'
|| item === '人群分析' || item === '人群分析'
|| item === '课程分析' && projectInfo.existCourse === 1) || item === '课程分析' && projectInfo.existCourse === 1)
...@@ -15,12 +15,13 @@ ...@@ -15,12 +15,13 @@
@click="clickTab(index)" @click="clickTab(index)"
>{{item}}</li> >{{item}}</li>
</ul> </ul>
<span class="over"></span> <!-- <span class="over"></span> -->
<span class="border"></span> <span class="border"></span>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
let scrollDom = [], maxScrollWidth = 375;
export default { export default {
data() { data() {
return { return {
...@@ -43,12 +44,15 @@ export default { ...@@ -43,12 +44,15 @@ export default {
default: false default: false
} }
}, },
mounted() {},
mounted() {
},
methods: { methods: {
clickTab(index) { clickTab(index) {
this.cIndex = index; this.cIndex = index;
this.$emit("tabClicked", index); this.$emit("tabClicked", index);
} // this.scrollTabs(index);
},
} }
}; };
</script> </script>
...@@ -88,6 +92,9 @@ export default { ...@@ -88,6 +92,9 @@ export default {
overflow-x: auto; overflow-x: auto;
padding: 9px 0; padding: 9px 0;
font-size: 13px; font-size: 13px;
&::-webkit-scrollbar {
display: none;
}
// padding: 5px 0; // padding: 5px 0;
li { li {
display: inline-block; display: inline-block;
...@@ -103,6 +110,9 @@ export default { ...@@ -103,6 +110,9 @@ export default {
&:first-child { &:first-child {
margin-left: 15px; margin-left: 15px;
} }
&:last-child {
margin-right: 15px;
}
&.active { &.active {
color: #449284; color: #449284;
background: #e3efed; background: #e3efed;
......
此差异已折叠。
此差异已折叠。
# LAYOUTS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Application Layouts.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
# MIDDLEWARE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your application middleware.
Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
"nuxt": "^2.0.0", "nuxt": "^2.0.0",
"v-charts": "^1.19.0", "v-charts": "^1.19.0",
"vant": "^2.2.13", "vant": "^2.2.13",
"web-buried-point": "^2.1.0", "web-buried-point": "^2.1.0"
"vconsole": "^3.3.4"
}, },
"devDependencies": { "devDependencies": {
"@nuxtjs/axios": "^5.5.4", "@nuxtjs/axios": "^5.5.4",
......
<template> <template>
<section class="container"> <section class="container">
<CommonHeader :title="projectInfo.projectName | shortName"></CommonHeader> <CommonHeader :title="projectInfo.projectName | shortName"></CommonHeader>
<CommonAreaSelect v-show="!isScroll" @areaClick="areaTabClick" @orgClick="orgTabClick" :areaName="areaName" :orgName="orgName" :showArea="isShowArea" :showOrg="isShowOrg"> <CommonAreaSelect v-show="!isScroll" @areaClick="areaTabClick" :areaName="areaName" :showArea="isShowArea">
</CommonAreaSelect> </CommonAreaSelect>
<CommonTaps :needFixed="isScroll" :projectInfo="projectInfo" @tabClicked="tabClicked"></CommonTaps> <CommonTaps :needFixed="isScroll" :projectInfo="projectInfo" @tabClicked="tabClicked"></CommonTaps>
<!-- 总体概况 --> <!-- 总体概况 -->
...@@ -83,11 +83,11 @@ ...@@ -83,11 +83,11 @@
</article> </article>
<PicaArea v-show="isShowArea" @confirm="areaConfirm" @cancel="areaCancel" :projectId="projectId" :token="token"></PicaArea> <PicaArea v-show="isShowArea" @confirm="areaConfirm" @cancel="areaCancel" :projectId="projectId" :token="token"></PicaArea>
<PicaOrg v-show="isShowOrg" @confirm="orgConfirm" @cancel="orgCancel"></PicaOrg>
<CommonLoading v-show="false"></CommonLoading> <CommonLoading v-show="false"></CommonLoading>
<PopTips :tipsContent="tipsContent" @clickTips="clickTips" v-show="isShowTips"></PopTips> <PopTips :tipsContent="tipsContent" @clickTips="clickTips" v-show="isShowTips"></PopTips>
<Loading v-show="isShowLoading"></Loading> <Loading v-show="isShowLoading"></Loading>
</section>
</section>
</template> </template>
<script> <script>
...@@ -95,12 +95,9 @@ const cookies = require("cookie-universal")(); ...@@ -95,12 +95,9 @@ const cookies = require("cookie-universal")();
import { import {
goPageByNative goPageByNative
} from "@/utils"; } from "@/utils";
import { mapGetters, mapActions } from "vuex";
import { import {
mapGetters, getAreaOrOrgList,
mapActions
} from "vuex";
import {
getProvinceList,
getUserAnalysis, getUserAnalysis,
getHospitalsCNT, getHospitalsCNT,
getGeneralPersonal, getGeneralPersonal,
...@@ -109,7 +106,6 @@ import { ...@@ -109,7 +106,6 @@ import {
getProjectInfo, getProjectInfo,
getGeneralExamList, getGeneralExamList,
getStudyEffect, getStudyEffect,
getHospitalsByRegionId
} from "@/service"; } from "@/service";
import CommonHeader from "@/components/common/common-header"; import CommonHeader from "@/components/common/common-header";
...@@ -188,12 +184,10 @@ export default { ...@@ -188,12 +184,10 @@ export default {
isShowLoading: true, isShowLoading: true,
isScroll: false, isScroll: false,
isShowArea: false, isShowArea: false,
isShowOrg: false,
isShowTips: false, isShowTips: false,
isShowRankingItemTips: false, isShowRankingItemTips: false,
tipsContent: '', tipsContent: '',
areaName: '全部', areaName: '全部',
orgName: '全部机构',
cIndex: 0, cIndex: 0,
colors: ["#39AF9A", "#FF9A4B", "#abb7bb", "#76d2d2"], colors: ["#39AF9A", "#FF9A4B", "#abb7bb", "#76d2d2"],
needBG: true, needBG: true,
...@@ -344,7 +338,7 @@ export default { ...@@ -344,7 +338,7 @@ export default {
methods: { methods: {
handleScroll() { handleScroll() {
var scrollTop = window.scrollY; var scrollTop = window.scrollY;
if (scrollTop > 40) { if (scrollTop > 49) {
this.isScroll = true; this.isScroll = true;
} else { } else {
this.isScroll = false; this.isScroll = false;
...@@ -371,14 +365,24 @@ export default { ...@@ -371,14 +365,24 @@ export default {
// 查询用户信息和权限 // 查询用户信息和权限
getProjectInfo(params) { getProjectInfo(params) {
getProjectInfo({ // getProjectInfo({
projectId: this.projectId // projectId: this.projectId
}).then(res => { // }).then(res => {
if (res.code === "000000") { // if (res.code === "000000") {
this.projectInfo = res.data; // this.projectInfo = res.data;
getProvinceList(params).then(res => { getAreaOrOrgList(params).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
let regionId = (res.data && res.data.list[0] && res.data.list[0].id) || ''; this.projectInfo = res.data.doctorInfoRep;
this.queryGDParams.originalFlag = res.data.doctorInfoRep.originalFlag;
// 如果直接是5级,则将其进行拆分(区域ID与机构ID)
let regionId = '', orgId = '', firstData = res.data.list[0];
if(firstData.degree == 5) {
let regionIdAndOrgId = firstData.id, lindex = regionIdAndOrgId.lastIndexOf('_');
regionId = regionIdAndOrgId.slice(0, lindex);
orgId = regionIdAndOrgId.slice(lindex + 1);
} else {
regionId = firstData.id || '';
}
this.queryGDParams.regionId = regionId; this.queryGDParams.regionId = regionId;
this.CNTParams.regionId = regionId; this.CNTParams.regionId = regionId;
let proviceList = (res.data && res.data.list) || []; let proviceList = (res.data && res.data.list) || [];
...@@ -386,26 +390,24 @@ export default { ...@@ -386,26 +390,24 @@ export default {
this.areaName = (proviceList.length && proviceList[0].label) || '全部'; this.areaName = (proviceList.length && proviceList[0].label) || '全部';
this.queryParams.projectId = this.projectId; this.queryParams.projectId = this.projectId;
this.queryParams.regionId = regionId; this.queryParams.regionId = regionId;
this.getHospitalsByRegionId(this.queryParams); if(proviceList.length && res.data.containHospitalFlag == 1) {
proviceList[0].containHospitalFlag = 1;
}
this.setProvinceList(proviceList); this.setProvinceList(proviceList);
this.setAreaDegree(degree); this.setAreaDegree(degree);
// if( degree == 3 || degree == 4) { if(firstData.degree == 5) {
// this.isShowOrg = true; this.isSingleOrg = true;
// } this.queryGDParams.hospitalIdList = [];
this.queryGDParams.hospitalIdList.push(orgId);
this.getGeneralPersonal(this.queryGDParams);
this.otherInterface();
} else {
this.getHospitalsCNT(this.CNTParams); this.getHospitalsCNT(this.CNTParams);
} }
});
}
});
},
// 根据区域获取机构列表(一般在是三、四级区域才调用此方法)
async getHospitalsByRegionId(params) {
await getHospitalsByRegionId(params).then(res => {
if (res.code === "000000") {
this.setOrgList(res.data.list || []);
} }
}); });
// }
// });
}, },
// 异步延迟调用其它Tabs接口(除了数据概述) // 异步延迟调用其它Tabs接口(除了数据概述)
...@@ -553,21 +555,26 @@ export default { ...@@ -553,21 +555,26 @@ export default {
// 清空参数 // 清空参数
clearParams() { clearParams() {
this.orgName = '全部机构';
this.queryGDParams.hospitalIdList = []; this.queryGDParams.hospitalIdList = [];
}, },
// 确认选择区域 // 确认选择区域
areaConfirm(selData) { areaConfirm(selData) {
console.log(selData);
if (selData.newOrgName || selData.townName || selData.countyName || selData.cityName || selData.provinceName) {
this.areaName = this.shortName(selData.newOrgName || selData.townName || selData.countyName || selData.cityName || selData.provinceName, 18)
}
if(selData.areaDegree == 5) {
this.orgConfirmNew(selData);
return;
}
this.clearParams(); this.clearParams();
this.queryGDParams.regionId = selData.regionId; this.queryGDParams.regionId = selData.regionId;
this.CNTParams.regionId = selData.regionId; this.CNTParams.regionId = selData.regionId;
this.getHospitalsCNT(this.CNTParams); this.getHospitalsCNT(this.CNTParams);
this.isShowArea = false; this.isShowArea = false;
this.setAreaDegree(selData.areaDegree); this.setAreaDegree(selData.areaDegree);
if (selData.townName || selData.countyName || selData.cityName || selData.provinceName) {
this.areaName = this.shortName(selData.townName || selData.countyName || selData.cityName || selData.provinceName, 6)
}
}, },
// 取消选择区域 // 取消选择区域
...@@ -576,27 +583,20 @@ export default { ...@@ -576,27 +583,20 @@ export default {
}, },
// 确认选择机构 // 确认选择机构
orgConfirm(selData) { orgConfirmNew(selData) {
let hospitalIds = []; let regionIdAndOrgId = selData.regionId, lindex = regionIdAndOrgId.lastIndexOf('_');
let hospitalNames = []; let regionId = regionIdAndOrgId.slice(0, lindex), orgId = regionIdAndOrgId.slice(lindex + 1);
let orgName = ''; let hospitalIds = [orgId];
selData.forEach(org => { this.isShowArea = false;
if (org.selected) { this.queryGDParams.regionId = regionId;
hospitalIds.push(org.hospitalId); this.CNTParams.regionId = regionId;
hospitalNames.push(org.hospitalName);
}
});
// 如果没有选择机构,则重新获取所有数据
this.isShowOrg = false;
this.orgName = this.shortName(hospitalNames[0] || '全部机构', 6);
this.queryGDParams.hospitalIdList = hospitalIds; this.queryGDParams.hospitalIdList = hospitalIds;
if (hospitalIds.length == 0) { if (hospitalIds.length == 0) {
this.getHospitalsCNT(this.CNTParams); this.getHospitalsCNT(this.CNTParams);
return; return;
} }
if (hospitalIds.length === 1) { if (hospitalIds.length === 1) {
// this.hospitalCnt = 1 this.hospitalCnt = 1 // todo
this.orgDoctorTabData.certUserList = []; this.orgDoctorTabData.certUserList = [];
this.orgDoctorTabData.noCertUserList = []; this.orgDoctorTabData.noCertUserList = [];
this.orgDoctorTabData.noJoinList = []; this.orgDoctorTabData.noJoinList = [];
...@@ -609,33 +609,11 @@ export default { ...@@ -609,33 +609,11 @@ export default {
this.otherInterface(); this.otherInterface();
}, },
// 取消选择机构
orgCancel() {
this.isShowOrg = false;
},
// 弹出选择区域控件 // 弹出选择区域控件
areaTabClick() { areaTabClick() {
if (this.isShowOrg) {
this.isShowOrg = false;
}
this.isShowArea = !this.isShowArea; this.isShowArea = !this.isShowArea;
}, },
// 弹出选择机构控件
orgTabClick() {
if (this.areaDegree !== 3 && this.areaDegree !== 4) {
this.$toast('选择区/县后才可选择机构');
return;
}
if (this.orgList.length === 0) {
this.$toast('此区域下无机构');
return;
}
this.isShowOrg = !this.isShowOrg;
},
// 通用跳转页面 // 通用跳转页面
gotoPage(subUrl, hasCert) { gotoPage(subUrl, hasCert) {
let subUrlAndParams = `${subUrl}?token=${this.token}&projectId=${this.queryGDParams.projectId}&regionId=${this.queryGDParams.regionId}&hospitalIdList=${this.queryGDParams.hospitalIdList.join(',')}` let subUrlAndParams = `${subUrl}?token=${this.token}&projectId=${this.queryGDParams.projectId}&regionId=${this.queryGDParams.regionId}&hospitalIdList=${this.queryGDParams.hospitalIdList.join(',')}`
...@@ -713,7 +691,8 @@ export default { ...@@ -713,7 +691,8 @@ export default {
setProvinceList: "setProvinceList", setProvinceList: "setProvinceList",
setExamTimesList: "setExamTimesList", setExamTimesList: "setExamTimesList",
setExamScoreList: "setExamScoreList", setExamScoreList: "setExamScoreList",
setAreaDegree: "setAreaDegree" setAreaDegree: "setAreaDegree",
setCurrentOrgList: 'setCurrentOrgList'
}) })
} }
}; };
...@@ -748,7 +727,8 @@ export default { ...@@ -748,7 +727,8 @@ export default {
} }
.pd-top-60 { .pd-top-60 {
padding-top: 85px; padding-top: 94px;
} }
} }
</style> </style>
...@@ -9,46 +9,9 @@ export const getHospital = async (params) => { ...@@ -9,46 +9,9 @@ export const getHospital = async (params) => {
}; };
/** /**
* 获取省列表 * 通用获取区域或机构列表
*/ */
export const getProvinceList = async params => { export const getAreaOrOrgList = async params => {
return request({
// baseURL: 'http://10.177.11.156:10443/',
method: 'get',
params: params,
withCredentials: true,
url: 'stats/region'
});
};
/**
* 获取市列表
*/
export const getCityList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: 'stats/region'
});
};
/**
* 获取县/区列表
*/
export const getCountyList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: 'stats/region'
});
};
/**
* 获取乡镇列表
*/
export const getTownList = async params => {
return request({ return request({
method: 'get', method: 'get',
params: params, params: params,
......
...@@ -8,7 +8,8 @@ export const state = () => ({ ...@@ -8,7 +8,8 @@ export const state = () => ({
orgList: [], orgList: [],
examTimesList: [], examTimesList: [],
examScoreList: [], examScoreList: [],
areaDegree: 0 areaDegree: 0,
currentOrgList: []
}) })
export const getters = { export const getters = {
projectId(state) { projectId(state) {
...@@ -41,6 +42,9 @@ export const getters = { ...@@ -41,6 +42,9 @@ export const getters = {
areaDegree(state) { areaDegree(state) {
return state.areaDegree; return state.areaDegree;
}, },
currentOrgList(state) {
return state.currentOrgList;
}
} }
export const mutations = { export const mutations = {
SET_PROJECT_ID(state, projectId) { SET_PROJECT_ID(state, projectId) {
...@@ -73,6 +77,9 @@ export const mutations = { ...@@ -73,6 +77,9 @@ export const mutations = {
SET_AREA_DEGREE(state, areaDegree) { SET_AREA_DEGREE(state, areaDegree) {
state.areaDegree = areaDegree; state.areaDegree = areaDegree;
}, },
SET_CURRENT_ORG_LIST(state, currentOrgList) {
state.currentOrgList = currentOrgList;
},
} }
export const actions = { export const actions = {
setProjectId({ commit }, projectId) { setProjectId({ commit }, projectId) {
...@@ -105,4 +112,7 @@ export const actions = { ...@@ -105,4 +112,7 @@ export const actions = {
setAreaDegree({ commit }, areaDegree) { setAreaDegree({ commit }, areaDegree) {
commit('SET_AREA_DEGREE', areaDegree); commit('SET_AREA_DEGREE', areaDegree);
}, },
setCurrentOrgList({ commit }, currentOrgList) {
commit('SET_CURRENT_ORG_LIST', currentOrgList);
},
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册