Commit 2af700b3 by lihu541

不同角色登录,显示内容修改

parent 630f0b7d
<template> <template>
<div id="app"> <div id="app">
<router-view/> <router-view v-if="isRouterAlive"></router-view>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'App' name: 'App',
provide (){
return {
reload:this.reload
}
},
data(){
return {
isRouterAlive:true
}
},
methods:{
reload (){
this.isRouterAlive = false
this.$nextTick(function(){
this.isRouterAlive = true
})
}
},
components:{
}
} }
</script> </script>
......
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
.header2 .area .name{ clear: both; line-height: 30px; color:#B3BFD2; text-align: right; padding-right: 5px;} .header2 .area .name{ clear: both; line-height: 30px; color:#B3BFD2; text-align: right; padding-right: 5px;}
.el-button--primary{ color: #fff; width: 50px; background-color: #FF69B4; border-color: #FF69B4;} .el-button--primary{ color: #fff; width: 50px; background-color: #FF69B4; border-color: #FF69B4;}
.card-dark {background: rgba(0, 0, 0, 0.21) none repeat scroll 0% 0%; border: 1px solid #000;position: relative; border-radius:5px;} .card-dark {background: rgba(0, 0, 0, 0.21) none repeat scroll 0% 0%; border: 1px solid #000;position: relative; border-radius:5px;}
.card-dark ::-webkit-scrollbar {
display: none;
}
.clear10{ clear: both; height: 10px;} .clear10{ clear: both; height: 10px;}
.card-01{ float: left; width: 470px; height: 165px;} .card-01{ float: left; width: 470px; height: 165px;}
.card1-mod{ float: left; width: 233px; padding: 10px; height: 165px;} .card1-mod{ float: left; width: 233px; padding: 10px; height: 165px;}
...@@ -105,7 +108,7 @@ ...@@ -105,7 +108,7 @@
.card2-mod .modtitle2{ clear: both; line-height: 25px; color: #B3BFD2;} .card2-mod .modtitle2{ clear: both; line-height: 25px; color: #B3BFD2;}
.card2-mod .modtitle2 span{ padding: 0 5px; color: #0097FD;} .card2-mod .modtitle2 span{ padding: 0 5px; color: #0097FD;}
.card2-mod .modtitle2 span.myclk{color: #42CCFF; font-weight: 600; font-size: 14px} .card2-mod .modtitle2 span.myclk{color: #42CCFF; font-weight: 600; font-size: 14px}
.card-03{ float: left; width: 150px; height: 310px; padding:10px 10px 0px 10px; overflow: hidden; overflow-y: scroll;} .card-03{ float: left; width: 150px; height: 310px; padding:10px 10px 0px 10px;}
.card-03 ul{width: 100%;} .card-03 ul{width: 100%;}
.card-03 ul li{font-size: 14px;width: 100%; text-align: left; color: #B3BFD2; padding-left: 15px; margin-bottom: 9px; height: 50px; line-height: 50px; background: #1a1d25; border: 1px #13161d solid; border-radius: 25px;} .card-03 ul li{font-size: 14px;width: 100%; text-align: left; color: #B3BFD2; padding-left: 15px; margin-bottom: 9px; height: 50px; line-height: 50px; background: #1a1d25; border: 1px #13161d solid; border-radius: 25px;}
.card-03 ul li.clk{color: #fff; background: -webkit-linear-gradient(left, #0097fd, #4fb6fb);} .card-03 ul li.clk{color: #fff; background: -webkit-linear-gradient(left, #0097fd, #4fb6fb);}
......
...@@ -157,10 +157,10 @@ ...@@ -157,10 +157,10 @@
</swiper-slide> </swiper-slide>
<swiper-slide> <swiper-slide>
<screenTwoPag1 v-if="screenTagshow == 1" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag1> <screenTwoPag1 v-if="screenTagshow == 1" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag1>
<!--<screenTwoPag2 v-else-if="screenTagshow == 2" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag2>--> <screenTwoPag2 v-else-if="screenTagshow == 2" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag2>
<!--<screenTwoPag3 v-else-if="screenTagshow == 3" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag3>--> <screenTwoPag3 v-else-if="screenTagshow == 3" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag3>
<!--<screenTwoPag4 v-else-if="screenTagshow == 4" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag4>--> <screenTwoPag4 v-else-if="screenTagshow == 4" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag4>
<!--<screenTwoPag5 v-else-if="screenTagshow == 5" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag5>--> <screenTwoPag5 v-else-if="screenTagshow == 5" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag5>
</swiper-slide> </swiper-slide>
<div class="swiper-pagination" slot="pagination"></div> <div class="swiper-pagination" slot="pagination"></div>
</swiper> </swiper>
...@@ -1183,6 +1183,9 @@ ...@@ -1183,6 +1183,9 @@
// 获取子组件传递来的数据 用以操作home页组件 // 获取子组件传递来的数据 用以操作home页组件
this.screenTagshow = data this.screenTagshow = data
localStorage.setItem("ScreenPage", this.screenTagshow) localStorage.setItem("ScreenPage", this.screenTagshow)
},
toSideTwo(){
this.$refs.mySwiper.swiper.slideTo(1, 10, true)
} }
}, },
mounted() { mounted() {
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<div class="area"> <div class="area">
<el-button size="mini" type="primary" @click="CityGetBack()" v-if="BeginCode">返回</el-button> <el-button size="mini" type="primary" @click="CityGetBack()" v-if="BeginCode">返回</el-button>
<el-button size="mini" @click="changeReplay()" type="primary">重置</el-button> <el-button size="mini" @click="changeReplay()" type="primary">重置</el-button>
<el-date-picker v-model="value" type="month" @change="dataSearch" align="left" size='mini' format="yyyy-MM" <el-date-picker v-model="cxsj" type="month" @change="dataSearch" align="left" size='mini' format="yyyy-MM"
value-format="yyyy-MM" :placeholder="sel"></el-date-picker> value-format="yyyy-MM" :placeholder="sel"></el-date-picker>
<div class="name"><i class="el-icon-s-custom el-icon--left"></i>市疾控 截止:{{nowdate}}</div> <div class="name"><i class="el-icon-s-custom el-icon--left"></i>{{userinfo.userName}} 截止:{{cxsj}}</div>
</div> </div>
</div> </div>
<!---- 第一个模块----> <!---- 第一个模块---->
...@@ -160,6 +160,8 @@ ...@@ -160,6 +160,8 @@
<ul> <ul>
<li @click="pageChage(1)" class="clk"><i class="el-icon-s-cooperation"></i> 慢病管理</li> <li @click="pageChage(1)" class="clk"><i class="el-icon-s-cooperation"></i> 慢病管理</li>
<li @click="pageChage(2)"><i class="el-icon-bangzhu"></i> 管理效果</li> <li @click="pageChage(2)"><i class="el-icon-bangzhu"></i> 管理效果</li>
<!--<li v-if="userRole != 'hospital'" @click="pageChage(2)"><i class="el-icon-bangzhu"></i> 管理效果</li>-->
<!--<li v-else class="disabledC"><i class="el-icon-bangzhu"></i> 管理效果</li>-->
<li @click="pageChage(3)"><i class="el-icon-service"></i> 服务质量</li> <li @click="pageChage(3)"><i class="el-icon-service"></i> 服务质量</li>
<li @click="pageChage(4)"><i class="el-icon-first-aid-kit"></i> 早发现</li> <li @click="pageChage(4)"><i class="el-icon-first-aid-kit"></i> 早发现</li>
<li @click="pageChage(5)"><i class="el-icon-odometer"></i> 慢病监测</li> <li @click="pageChage(5)"><i class="el-icon-odometer"></i> 慢病监测</li>
...@@ -228,6 +230,7 @@ ...@@ -228,6 +230,7 @@
} from '@/api/home.js' } from '@/api/home.js'
export default { export default {
name: 'screenpage1', name: 'screenpage1',
inject:['reload'],
data() { data() {
return { return {
groupNo: 1, groupNo: 1,
...@@ -237,8 +240,7 @@ ...@@ -237,8 +240,7 @@
tablename: '各区', tablename: '各区',
thname: '各区', thname: '各区',
areaname: '', areaname: '',
value: '2019-09',
nowdate: '2019-09',
startTime: '2019-01', startTime: '2019-01',
sel: '筛选', sel: '筛选',
option: { option: {
...@@ -587,28 +589,6 @@ ...@@ -587,28 +589,6 @@
return res return res
} }
}, },
dataZoom: {
start: 0, //默认为0
end: 50, //默认为100
type: 'slider',
show: true ,
xAxisIndex: [0] ,
handleSize: 20 , //滑动条的 左右2个滑动条的大小
height: 5 , //组件高度
left: 50, //左边的距离
right: 50, //右边的距离
bottom: 40, //右边的距离
backgroundColor: '#ccc', //两边未选中的滑动条区域的颜色
showDataShadow: true, //是否显示数据阴影 默认auto
handleStyle: {
borderColor: "#CBBCDB",
borderWidth: "1",
shadowBlur: 1,
background: "#000",
shadowColor: "#000",
},
filterMode: 'filter',
},
legend: { legend: {
textStyle: { textStyle: {
color: '#8393A9', color: '#8393A9',
...@@ -928,7 +908,6 @@ ...@@ -928,7 +908,6 @@
rightlist1: '规范管理率', rightlist1: '规范管理率',
rightlist2: '随访率', rightlist2: '随访率',
rightlist3: '随访比', rightlist3: '随访比',
selectStarttime: localStorage.getItem("EndTime"),
BeginCode: false, BeginCode: false,
PlaceYLGM: '', PlaceYLGM: '',
areaclick: true, areaclick: true,
...@@ -938,7 +917,15 @@ ...@@ -938,7 +917,15 @@
PlaceCode: '', PlaceCode: '',
closeareaclick: true, closeareaclick: true,
showtabnum:0, showtabnum:0,
pagedisname:'高血压' pagedisname:'高血压',
userinfo:{},
userRole:'',
cxsj:'',
_xzqh:'',
_yljgdm:'',
_group:'',
pageLevel:''
} }
}, },
methods: { methods: {
...@@ -1010,13 +997,7 @@ ...@@ -1010,13 +997,7 @@
} }
}, },
changeReplay() { changeReplay() {
var myDate = new Date();
let tempmonth = myDate.getMonth()
if(tempmonth<10){
tempmonth = '0'+tempmonth
}
// 用于 重置时间 入参
let DateNow = '' + myDate.getFullYear()+'-' + tempmonth + '-01'
this.themeID = 7 this.themeID = 7
this.BarType = 'XZQH' this.BarType = 'XZQH'
this.communhidden = true this.communhidden = true
...@@ -1028,16 +1009,68 @@ ...@@ -1028,16 +1009,68 @@
this.areaname = '' this.areaname = ''
this.tablename = "各区" this.tablename = "各区"
this.thname = "各区" this.thname = "各区"
this.nowdate = DateNow
this.selectStarttime = DateNow
this.value = DateNow.substr(0,7)
this.DieaNo = 1 this.DieaNo = 1
this.bingNo = 1 this.bingNo = 1
this.BarSelect = 1 this.BarSelect = 1
this.dataSearch(DateNow) if ('city' === this.userRole) {//市角色
this.PlaceCode = ""
this._group = "XZQH"
this.pageLevel = 'sj'
this.homeinit()
this.reApplyCharts()
this.bottominit()
} else if ('area' === this.userRole) {//区角色
this._yljgdm = ''
this._group = "YLJGDM"
this.pageLevel = 'qj'
this.commun = "社区"
console.log("此处是第一次点击");
console.log("diann");
this.areaname = localStorage.getItem("organizcodeName")
this.PlaceCode = localStorage.getItem("organizcode")
this.BackCLick = false
this.BarType = 'YLJGDM'
this.BeginCode = false
this.areaclick = false
this.lastStatus.PlaceCode = this.PlaceCode
this.lastStatus.BackCLick = this.BackCLick
this.lastStatus.BarType = this.BarType
this.lastStatus.BeginCode = this.BeginCode
this.lastStatus.areaclick = this.areaclick
// console.log(this.lastStatus);
// console.log(this.PlaceCode);
this.homeinit()
this.reApplyCharts()
this.bottominit()
this.SheQuCode = 2
this.tablename = '社区'
this.thname = '医院'
} else if ('hospital' === this.userRole) {//社区角色
this.PlaceCode = localStorage.getItem("porgcode")
this._yljgdm = localStorage.getItem("organizcode")
this._group = "YWSJ"
this.pageLevel = 'sq'
console.log(111);
this.closeareaclick = false
// this.PlaceCode = yldm
this.areaname = localStorage.getItem("organizcodeName")
this.BeginCode = false
this.communhidden = false
this.BarType = 'YWSJ'
this.homeinit()
this.reApplyCharts()
this.bottominit()
this.SheQuCode = 3
this.tablename = '时间'
this.thname = '月份'
}
console.log(111); console.log(111);
console.log(this.nowdate)
console.log(this.selectStarttime);
}, },
groupChange(num) { groupChange(num) {
this.groupNo = num this.groupNo = num
...@@ -1055,17 +1088,14 @@ ...@@ -1055,17 +1088,14 @@
}, },
dataSearch(value) { dataSearch(value) {
console.log(value) console.log(value)
localStorage.setItem("EndTime", value) localStorage.setItem("ywsj", value)
this.DieaChange(this.DieaNo) this.DieaChange(this.DieaNo)
this.startTime = value.slice(0, 4) + '-01'
if (value) {
this.nowdate = value
this.selectStarttime = value
this.homeinit() this.homeinit()
this.reApplyCharts() this.reApplyCharts()
this.bottominit() this.bottominit()
// this.DieaChange(this.DieaNo) // this.DieaChange(this.DieaNo)
}
}, },
bingChange(num) { bingChange(num) {
this.bingNo = num this.bingNo = num
...@@ -1205,8 +1235,8 @@ ...@@ -1205,8 +1235,8 @@
let _this = this let _this = this
let wd = [{ let wd = [{
"name": "YWSJ", "name": "YWSJ",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"type": "2", "type": "2",
"compare": "between" "compare": "between"
}, { }, {
...@@ -1238,8 +1268,8 @@ ...@@ -1238,8 +1268,8 @@
//{\"name\":\"QYBZ\",\"value\":\"1\",\"type\":\"1\"}不加这个管 //{\"name\":\"QYBZ\",\"value\":\"1\",\"type\":\"1\"}不加这个管
let wdq = [{ let wdq = [{
"name": "YWSJ", "name": "YWSJ",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"type": "2", "type": "2",
"compare": "between", "compare": "between",
}, { }, {
...@@ -1270,8 +1300,8 @@ ...@@ -1270,8 +1300,8 @@
let wdxj = [{ let wdxj = [{
"name": "YWSJ", "name": "YWSJ",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"type": "2", "type": "2",
"compare": "between" "compare": "between"
}, { }, {
...@@ -1308,8 +1338,8 @@ ...@@ -1308,8 +1338,8 @@
"type": "1", "type": "1",
}, { }, {
"name": "YWSJ", "name": "YWSJ",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"type": "2", "type": "2",
"compare": "between" "compare": "between"
}, { }, {
...@@ -1339,8 +1369,8 @@ ...@@ -1339,8 +1369,8 @@
let wdsf = [{ let wdsf = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between" "compare": "between"
}, { }, {
"name": "SF", "name": "SF",
...@@ -1375,8 +1405,8 @@ ...@@ -1375,8 +1405,8 @@
let wdsfq = [{ let wdsfq = [{
"name": "YWSJ", "name": "YWSJ",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"type": "2", "type": "2",
"compare": "between" "compare": "between"
}, { }, {
...@@ -1411,8 +1441,8 @@ ...@@ -1411,8 +1441,8 @@
let wd2 = [{ let wd2 = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XZQH", "name": "XZQH",
...@@ -1445,8 +1475,8 @@ ...@@ -1445,8 +1475,8 @@
let wd2q = [{ let wd2q = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "QYBZ", "name": "QYBZ",
...@@ -1484,8 +1514,8 @@ ...@@ -1484,8 +1514,8 @@
let wdtnbg = [{ let wdtnbg = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XZQH", "name": "XZQH",
...@@ -1508,8 +1538,8 @@ ...@@ -1508,8 +1538,8 @@
let wdtnbq = [{ let wdtnbq = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "QYBZ", "name": "QYBZ",
...@@ -1537,8 +1567,8 @@ ...@@ -1537,8 +1567,8 @@
let wdxb = [{ let wdxb = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XB", "name": "XB",
...@@ -1566,8 +1596,8 @@ ...@@ -1566,8 +1596,8 @@
let wdxb1 = [{ let wdxb1 = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XB", "name": "XB",
...@@ -1595,8 +1625,8 @@ ...@@ -1595,8 +1625,8 @@
let wdxbq = [{ let wdxbq = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "QYBZ", "name": "QYBZ",
...@@ -1628,8 +1658,8 @@ ...@@ -1628,8 +1658,8 @@
let wdxbq1 = [{ let wdxbq1 = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "QYBZ", "name": "QYBZ",
...@@ -1663,8 +1693,8 @@ ...@@ -1663,8 +1693,8 @@
let wdnl = [{ let wdnl = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XZQH", "name": "XZQH",
...@@ -1692,8 +1722,8 @@ ...@@ -1692,8 +1722,8 @@
let wdnl2 = [{ let wdnl2 = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "QYBZ", "name": "QYBZ",
...@@ -1787,8 +1817,8 @@ ...@@ -1787,8 +1817,8 @@
let wd = [{ let wd = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XZQH", "name": "XZQH",
...@@ -1901,8 +1931,8 @@ ...@@ -1901,8 +1931,8 @@
wd = [{ wd = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}] }]
param = { param = {
...@@ -1913,8 +1943,8 @@ ...@@ -1913,8 +1943,8 @@
wdq = [{ wdq = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
},{ },{
"name":"QYBZ", "name":"QYBZ",
...@@ -1933,8 +1963,8 @@ ...@@ -1933,8 +1963,8 @@
wd = [{ wd = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, },
{ {
...@@ -1951,8 +1981,8 @@ ...@@ -1951,8 +1981,8 @@
wdq = [{ wdq = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, },
{ {
...@@ -1978,8 +2008,8 @@ ...@@ -1978,8 +2008,8 @@
this.closeareaclick = true this.closeareaclick = true
wd = [{ wd = [{
"name": "YWSJ", "name": "YWSJ",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
"type": "2", "type": "2",
}, { }, {
...@@ -1994,8 +2024,8 @@ ...@@ -1994,8 +2024,8 @@
} }
wdq = [{ wdq = [{
"name": "YWSJ", "name": "YWSJ",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
"type": "2", "type": "2",
}, { }, {
...@@ -2434,9 +2464,69 @@ ...@@ -2434,9 +2464,69 @@
} }
}, },
mounted() { mounted() {
this.homeinit() this.cxsj = localStorage.getItem("ywsj")
this.reApplyCharts() this.userinfo = JSON.parse(localStorage.getItem("userinfo"))
this.bottominit() this.userRole = localStorage.getItem("userRole")
if ('city' === this.userRole) {//市角色
this.PlaceCode = ""
this._group = "XZQH"
this.pageLevel = 'sj'
this.homeinit()
this.reApplyCharts()
this.bottominit()
} else if ('area' === this.userRole) {//区角色
this._yljgdm = ''
this._group = "YLJGDM"
this.pageLevel = 'qj'
this.commun = "社区"
console.log("此处是第一次点击");
console.log("diann");
this.areaname = localStorage.getItem("organizcodeName")
this.PlaceCode = localStorage.getItem("organizcode")
this.BackCLick = false
this.BarType = 'YLJGDM'
this.BeginCode = false
this.areaclick = false
this.lastStatus.PlaceCode = this.PlaceCode
this.lastStatus.BackCLick = this.BackCLick
this.lastStatus.BarType = this.BarType
this.lastStatus.BeginCode = this.BeginCode
this.lastStatus.areaclick = this.areaclick
// console.log(this.lastStatus);
// console.log(this.PlaceCode);
this.homeinit()
this.reApplyCharts()
this.bottominit()
this.SheQuCode = 2
this.tablename = '社区'
this.thname = '医院'
} else if ('hospital' === this.userRole) {//社区角色
this.PlaceCode = localStorage.getItem("porgcode")
this._yljgdm = localStorage.getItem("organizcode")
this._group = "YWSJ"
this.pageLevel = 'sq'
console.log(111);
this.closeareaclick = false
// this.PlaceCode = yldm
this.areaname = localStorage.getItem("organizcodeName")
this.BeginCode = false
this.communhidden = false
this.BarType = 'YWSJ'
this.homeinit()
this.reApplyCharts()
this.bottominit()
this.SheQuCode = 3
this.tablename = '时间'
this.thname = '月份'
}
localStorage.setItem("ScreenPage", 1) localStorage.setItem("ScreenPage", 1)
}, },
components: {} components: {}
...@@ -2444,6 +2534,11 @@ ...@@ -2444,6 +2534,11 @@
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.disabledC {
background: #2F3034;
color: #525862;
border: 1px #2F3034 solid;
}
.myclk {color: #e4f4ff;font-weight: 600;font-size: 14px;} .myclk {color: #e4f4ff;font-weight: 600;font-size: 14px;}
#chartsright {width: 100px;height: 120px;float: left;} #chartsright {width: 100px;height: 120px;float: left;}
#chartstxt {width: 120px;height: 100px;float: left;padding-top: 15px;} #chartstxt {width: 120px;height: 100px;float: left;padding-top: 15px;}
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<p>{{areaname}}</p> <p>{{areaname}}</p>
</div> </div>
<div class="area"> <div class="area">
<el-button size="mini" type="primary" @click="CityGetBack()" v-if="this.BeginCode != 1">返回</el-button> <el-button size="mini" type="primary" @click="CityGetBack()" v-if="this.pageLevel != 'sj'">返回</el-button>
<el-button size="mini" @click="changeReplay()" type="primary">重置</el-button> <el-button size="mini" @click="changeReplay()" type="primary">重置</el-button>
<el-date-picker v-model="value" type="month" @change="dataSearch" align="left" size='mini' format="yyyy-MM" value-format="yyyy-MM" :placeholder="sel"></el-date-picker> <el-date-picker v-model="cxsj" type="month" @change="dataSearch" align="left" size='mini' format="yyyy-MM" cxsj-format="yyyy-MM" :placeholder="sel"></el-date-picker>
<div class="name"><i class="el-icon-s-custom el-icon--left"></i>市疾控 截止:{{nowdate}}</div> <div class="name"><i class="el-icon-s-custom el-icon--left"></i>{{userinfo.userName}} 截止:{{cxsj}}</div>
</div> </div>
</div> </div>
<!--第一个模块--> <!--第一个模块-->
...@@ -215,7 +215,6 @@ ...@@ -215,7 +215,6 @@
themeId: 28, themeId: 28,
agestructId: 34, agestructId: 34,
bleedtype: '血压', bleedtype: '血压',
BarType: 'XZQH', // 用于切换 各区与时间
selectID: 1, // 用于切换 规范管理 selectID: 1, // 用于切换 规范管理
// 管 左侧变量 // 管 左侧变量
aualperNum_g: 0, aualperNum_g: 0,
...@@ -279,13 +278,8 @@ ...@@ -279,13 +278,8 @@
data_g_ycl_qn: [], data_g_ycl_qn: [],
data_q_ycl_qn: [], data_q_ycl_qn: [],
areaname: '', areaname: '',
areaname2: '',
value: '2019-09',
nowdate: '2019-09',
startTime: '2019-01',
selectStarttime: localStorage.getItem("MyTime"),
sel: '筛选', sel: '筛选',
BeginCode: 1, // 用于判断当前的市级 状态
lastStatus: {}, lastStatus: {},
PlaceCode: '', PlaceCode: '',
option: { option: {
...@@ -875,7 +869,15 @@ ...@@ -875,7 +869,15 @@
}, },
showtabnum: 0, showtabnum: 0,
pagedisname: '高血压', pagedisname: '高血压',
middlename:"规范管理人群" middlename:"规范管理人群",
userinfo:{},
userRole:'',
cxsj:'',
_xzqh:'',
_yljgdm:'',
_group:'',
pageLevel:''
} }
}, },
methods: { methods: {
...@@ -903,39 +905,32 @@ ...@@ -903,39 +905,32 @@
} }
}, },
CityGetBack() { CityGetBack() {
console.log("this.BeginCode :" + this.BeginCode);
console.log("this.diastype :" + this.diastype);
this.communshow = true this.communshow = true
if (this.BeginCode == 3) { if (this.pageLevel === 'qj') {
// 使用 this.BeginCode 的值来判断现在处于的区镇状态
this.pageLevel = 'sj'
// 此时 处于第一次点击下的状态 // 此时 处于第一次点击下的状态
this.PlaceCode = '' this._xzqh = ''
this.BarType = 'XZQH' this._group = 'XZQH'
this.BeginCode = 1
this.areaname = '' this.areaname = ''
this.tablename = "各区" this.tablename = "各区"
this.thname = "各区" this.thname = "各区"
this.arname = '各区' this.arname = '各区'
// this.BeginCode = false
console.log("现在处于一级状态"); console.log("现在处于一级状态");
} }
if (this.BeginCode == 4) { else if (this.pageLevel === 'sq') {
// 使用 this.BeginCode 的值来判断现在处于的区镇状态
// 此时 处于第二次点击下的状态 this.pageLevel = 'qj'
// console.log("现在处于二级状态"); this._group = 'YLJGDM'
this.PlaceCode = this.lastStatus.PlaceCode
this.BarType = this.lastStatus.BarType
this.BeginCode = 2
this.tablename = "社区" this.tablename = "社区"
this.thname = "医院" this.thname = "医院"
this.arname = '社区' this.arname = '社区'
this.areaname = this.areaname2 this.areaname = this.areaname2
// this.BeginCode = this.lastStatus.BeginCode
// this.BackCLick = this.lastStatus.BackCLick
// this.areaclick = true
// this.BeginCode = 2
console.log(this.lastStatus);
} }
this.homeinit(this.themeId) this.homeinit(this.themeId)
this.change_age(1) this.change_age(1)
...@@ -946,94 +941,105 @@ ...@@ -946,94 +941,105 @@
}); });
}, },
changeReplay() { changeReplay() {
var myDate = new Date();
let tempmonth = myDate.getMonth()
if (tempmonth < 10) { if ('city' === this.userRole) {//市角色
tempmonth = '0' + tempmonth this._xzqh = ""
} this._group = "XZQH"
// 用于 重置时间 入参 this.pageLevel = 'sj'
let DateNow = '' + myDate.getFullYear() + '-' + tempmonth + '-01'
console.log(DateNow); this.areaname = ''
//this.pageChage(2) this.tablename = '各区'
this.PlaceCode = '' this.themeId = 28
this.BarType = 'XZQH' this.thname = '各区'
this.BeginCode = 1 this.arname = '各区'
this.areaname = '' this.homeinit(this.themeId)
this.tablename = '各区' this.change_age(1)
this.themeId = 28 } else if ('area' === this.userRole) {//区角色
this.thname = '各区'
this.arname = '各区' // 点击区 -- 展示城镇信息
this.nowdate = DateNow this._xzqh = localStorage.getItem("organizcode")
this.selectStarttime = DateNow this._group = "YLJGDM"
this.value = DateNow.substr(0, 7) this.pageLevel = 'qj'
// this.homeinit(this.themeId)
this.dataSearch(DateNow) this.communshow = true
}, this.tablename = '社区'
dataSearch(value) { this.thname = '医院'
var myDate = new Date(); this.arname = '社区'
myDate.getYear();
localStorage.setItem("EndTime", value) this.areaname = localStorage.getItem("organizcodeName")
console.log(value);
this.homeinit(this.themeId)
this.startTime = value.slice(0, 4) + '-01' this.change_age(1)
if (value) {
this.nowdate = value } else if ('hospital' === this.userRole) {//社区角色
this.selectStarttime = value this._xzqh = localStorage.getItem("organizcode")
this._group = "YWSJ"
this.pageLevel = 'sq'
this.tablename = "社区"
this.thname = "医院"
this.arname = '社区'
this.areaname = localStorage.getItem("organizcodeName")
this.homeinit(this.themeId) this.homeinit(this.themeId)
this.change_age(1) this.change_age(1)
} }
},
dataSearch() {
this.homeinit(this.themeId)
this.change_age(1)
}, },
changecity(code, name) { changecity(code, name) {
if (this.BeginCode != 4) {
//当 this.BeginCode == 4 的时候 ,证明已经到了最底层,故不再请求方法 this.areaname = name
// console.log(code);
this.PlaceCode = code if (this.pageLevel === 'sj') {
if (this.BeginCode == 1) { // 点击区 -- 展示城镇信息
// 点击区 -- 展示城镇信息 this.pageLevel = 'qj'
this.BarType = 'YLJGDM' this._group = 'YLJGDM'
this.communshow = true this._xzqh = code
// 用于记录当前的 区镇的入参状态 this.communshow = true
this.lastStatus.PlaceCode = this.PlaceCode
this.lastStatus.BarType = this.BarType this.tablename = '社区'
this.lastStatus.BeginCode = this.BeginCode this.thname = '医院'
this.lastStatus.areaclick = this.areaclick this.arname = '社区'
this.tablename = '社区'
this.thname = '医院'
this.arname = '社区'
this.areaname2 = name
this.BeginCode = 2 // 当begin值为1的时候可以触发点击事件,点击事件执行后,
// 我们就需要把状态码置为2 在下文的判断中以请求 乡镇 的数据信息
console.log(JSON.stringify(this.lastStatus));
console.log(this.PlaceCode);
}
console.log('这是地区的code码:' + code);
this.areaname = name this.areaname = name
this.PlaceCode = code
console.log(this.BeginCode);
this.homeinit(this.themeId)
this.change_age(1)
if (this.BeginCode == 4) { }else if (this.pageLevel === 'qj') {
this.areaname = this.areaname2 + this.areaname // 点击区 -- 展示城镇信息
console.log(this.BeginCode); this.pageLevel = 'sq'
this.communshow = false this._group = 'YWSJ'
}
if (this.BeginCode == 3) { this._yljgdm = code
console.log(this.BeginCode); this.communshow = true
this.areaname = this.areaname2
} this.tablename = '社区'
this.thname = '医院'
this.arname = '社区'
this.areaname = name
}else if (this.pageLevel === 'sq') {
return false
} }
this.homeinit(this.themeId)
this.change_age(1)
}, },
groupChange(num) { groupChange(num) {
this.groupNo = num this.groupNo = num
if (num == 1) { if (num == 1) {
this.BarType = "XZQH" this._group = "XZQH"
this.BeginCode = 1
this.homeinit(this.themeId) this.homeinit(this.themeId)
} else { } else {
this.BarType = "YWSJ" this._group = "YWSJ"
this.BeginCode = 4
this.homeinit(this.themeId) this.homeinit(this.themeId)
} }
}, },
...@@ -1057,28 +1063,28 @@ ...@@ -1057,28 +1063,28 @@
// 管数据 入参 // 管数据 入参
let wd = [{ let wd = [{
"name": "YWSJ", "name": "YWSJ",
"endTime": _this.selectStarttime, "endTime": _this.cxsj,
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"compare": "between", "compare": "between",
}, },
{ {
"name": "XZQH", "name": "XZQH",
"value": this.PlaceCode, // 主题ID "value": this._xzqh,
"type": "1" "type": "1"
} }
] ]
// 签数据 入参 // 签数据 入参
let wd2 = [{ let wd2 = [{
"name": "YWSJ", "name": "YWSJ",
"endTime": _this.selectStarttime, "endTime": _this.cxsj,
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"compare": "between", "compare": "between",
}, },
{ {
"name": "XZQH", "name": "XZQH",
"value": this.PlaceCode, "value": this._xzqh,
"type": "1" "type": "1"
}, },
{ {
...@@ -1101,13 +1107,13 @@ ...@@ -1101,13 +1107,13 @@
let placeparam = { let placeparam = {
"themeId": diastype, "themeId": diastype,
"wd": JSON.stringify(wd), "wd": JSON.stringify(wd),
"group": this.BarType "group": this._group
} }
let placeparam2 = { let placeparam2 = {
"themeId": diastype, "themeId": diastype,
"wd": JSON.stringify(wd2), "wd": JSON.stringify(wd2),
"group": this.BarType "group": this._group
} }
// =================================管部份 请求 ====================================== // =================================管部份 请求 ======================================
// 请求 管的 自动上传血压控制率 与 报告血压控制率 高糖并用 // 请求 管的 自动上传血压控制率 与 报告血压控制率 高糖并用
...@@ -1390,22 +1396,20 @@ ...@@ -1390,22 +1396,20 @@
this.listArray2 = [] this.listArray2 = []
this.listArrayFinal = [] this.listArrayFinal = []
// if(this.BeginCode == 1){
// // 默认状态就是一
// }
// 点击市区之后,改变入参 // 点击市区之后,改变入参
if (this.BeginCode == 2) { if (this.pageLevel === 'qj') {
console.log('第一次点击事件执行 区-->城镇'); console.log('第一次点击事件执行 区-->城镇');
console.log(this.PlaceCode); console.log(this.PlaceCode);
wd = [{ wd = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XZQH", "name": "XZQH",
"value": this.PlaceCode, "value": this._xzqh,
"type": "1" "type": "1"
}] }]
...@@ -1413,12 +1417,12 @@ ...@@ -1413,12 +1417,12 @@
wd2 = [{ wd2 = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XZQH", "name": "XZQH",
"value": this.PlaceCode, "value": this._xzqh,
"type": "1" "type": "1"
}, },
{ {
...@@ -1430,28 +1434,27 @@ ...@@ -1430,28 +1434,27 @@
placeparam = { placeparam = {
"themeId": diastype, "themeId": diastype,
"wd": JSON.stringify(wd), "wd": JSON.stringify(wd),
"group": this.BarType, "group": this._group,
} }
placeparam2 = { placeparam2 = {
"themeId": diastype, "themeId": diastype,
"wd": JSON.stringify(wd2), "wd": JSON.stringify(wd2),
"group": this.BarType, "group": this._group,
} }
this.BeginCode = 3
this.BarType = 'YWSJ' } else if (this.pageLevel === 'sq') {
} else if (this.BeginCode == 3) { this._group = 'YWSJ'
this.BeginCode = 4
console.log('第二次点击:展示区镇 时间数据'); console.log('第二次点击:展示区镇 时间数据');
console.log(this.PlaceCode); console.log(this._xzqh);
wd = [{ wd = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XZQH", "name": "XZQH",
"value": this.PlaceCode, "value": this._xzqh,
"type": "1" "type": "1"
}] }]
...@@ -1459,12 +1462,12 @@ ...@@ -1459,12 +1462,12 @@
wd2 = [{ wd2 = [{
"name": "YWSJ", "name": "YWSJ",
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"endTime": this.selectStarttime, "endTime": this.cxsj,
"compare": "between", "compare": "between",
}, { }, {
"name": "XZQH", "name": "XZQH",
"value": this.PlaceCode, "value": this._xzqh,
"type": "1" "type": "1"
}, },
{ {
...@@ -1476,12 +1479,12 @@ ...@@ -1476,12 +1479,12 @@
placeparam = { placeparam = {
"themeId": diastype, "themeId": diastype,
"wd": JSON.stringify(wd), "wd": JSON.stringify(wd),
"group": this.BarType, "group": this._group,
} }
placeparam2 = { placeparam2 = {
"themeId": diastype, "themeId": diastype,
"wd": JSON.stringify(wd2), "wd": JSON.stringify(wd2),
"group": this.BarType, "group": this._group,
} }
} }
// 右下角列表 + 图表 (数据共用) // 右下角列表 + 图表 (数据共用)
...@@ -1637,12 +1640,12 @@ ...@@ -1637,12 +1640,12 @@
}) })
// console.log(JSON.stringify(this.listArray2)); // console.log(JSON.stringify(this.listArray2));
if (this.BeginCode != 4) { if (this._group != 'YWSJ') {
for (var i = 0; i < this.listArray.length; i++) { for (var i = 0; i < this.listArray.length; i++) {
var obj = Object.assign(this.listArray[i], this.listArray2[i]) var obj = Object.assign(this.listArray[i], this.listArray2[i])
this.listArrayFinal.push(obj) this.listArrayFinal.push(obj)
} }
} else { } else if (this._group === 'YWSJ') {
console.log(2222222222222222222); console.log(2222222222222222222);
this.tablename = "时间" this.tablename = "时间"
this.thname = "季度" this.thname = "季度"
...@@ -2950,13 +2953,13 @@ ...@@ -2950,13 +2953,13 @@
// 右上柱状图 年龄结构 -themeId: 34 全市 35 区 36 社区 // 右上柱状图 年龄结构 -themeId: 34 全市 35 区 36 社区
let wdnl = [{ let wdnl = [{
"name": "YWSJ", "name": "YWSJ",
"endTime": this.selectStarttime, "endTime": this.cxsj,
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"compare": "between" "compare": "between"
}, { }, {
"name": "XZQH", "name": "XZQH",
"value": this.PlaceCode, "value": this._xzqh,
"type": "1" "type": "1"
}] }]
let paramnl = { let paramnl = {
...@@ -3084,13 +3087,13 @@ ...@@ -3084,13 +3087,13 @@
// 为了避免异步带来的影响,于是在回调函数内部再次请求数据 // 为了避免异步带来的影响,于是在回调函数内部再次请求数据
let wdnl2 = [{ let wdnl2 = [{
"name": "YWSJ", "name": "YWSJ",
"endTime": this.selectStarttime, "endTime": this.cxsj,
"type": "2", "type": "2",
"startTime": this.startTime, "startTime": '',
"compare": "between" "compare": "between"
}, { }, {
"name": "XZQH", "name": "XZQH",
"value": this.PlaceCode, "value": this._xzqh,
"type": "1" "type": "1"
}] }]
let paramnl2 = { let paramnl2 = {
...@@ -3240,11 +3243,48 @@ ...@@ -3240,11 +3243,48 @@
} }
}, },
mounted() { mounted() {
// console.log(this.PlaceCode); this.cxsj = localStorage.getItem("ywsj")
this.homeinit(this.themeId) this.userinfo = JSON.parse(localStorage.getItem("userinfo"))
this.change_age(1) this.userRole = localStorage.getItem("userRole")
this.value = localStorage.getItem("MyTime") ? localStorage.getItem("MyTime") : this.value if ('city' === this.userRole) {//市角色
this.nowdate = localStorage.getItem("MyTime") ? localStorage.getItem("MyTime") : this.nowdate this._xzqh = ""
this._group = "XZQH"
this.pageLevel = 'sj'
this.homeinit(this.themeId)
this.change_age(1)
} else if ('area' === this.userRole) {//区角色
this._xzqh = localStorage.getItem("organizcode")
this._group = "YLJGDM"
this.pageLevel = 'qj'
// 点击区 -- 展示城镇信息
this.communshow = true
this.tablename = '社区'
this.thname = '医院'
this.arname = '社区'
this.areaname = localStorage.getItem("organizcodeName")
this.homeinit(this.themeId)
this.change_age(1)
} else if ('hospital' === this.userRole) {//社区角色
this._xzqh = localStorage.getItem("organizcode")
this._group = "YWSJ"
this.pageLevel = 'sq'
this.tablename = "社区"
this.thname = "医院"
this.arname = '社区'
this.areaname = localStorage.getItem("organizcodeName")
this.homeinit(this.themeId)
this.change_age(1)
}
const obj = setInterval(() => { const obj = setInterval(() => {
const dom = document.getElementById("rightTop") const dom = document.getElementById("rightTop")
if (dom) { if (dom) {
...@@ -3289,7 +3329,6 @@ ...@@ -3289,7 +3329,6 @@
} }
}, 1000) }, 1000)
let _this = this
const obj2 = setInterval(() => { const obj2 = setInterval(() => {
const dom2 = document.getElementById("pag2bar") const dom2 = document.getElementById("pag2bar")
if (dom2) { if (dom2) {
......
...@@ -30,7 +30,44 @@ service.interceptors.response.use( ...@@ -30,7 +30,44 @@ service.interceptors.response.use(
}) })
return Promise.reject('error') return Promise.reject('error')
} else { } else {
return response.data const statusCode = response.data.code
if(statusCode === 1){
return response.data
} else
if (statusCode) {
if (statusCode === 401) {
MessageBox.alert(
'登录状态已过期,请重新登录',
'系统提示',
{
confirmButtonText: '确定',
showClose:false,
type: 'warning'
}
).then(() => {
location.href = '/'
}).catch(() => {
});
} else if (statusCode === 403) {
console.log('网址错误')
} else {
const errorMsg = response.data.message
if (errorMsg !== undefined) {
Notification.error({
title: errorMsg,
duration: 5000
})
}
}
} else {
Notification.error({
title: '接口请求失败',
duration: 5000
})
}
} }
}, },
error => { error => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment