Commit 2af700b3 by lihu541

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

parent 630f0b7d
<template>
<div id="app">
<router-view/>
<router-view v-if="isRouterAlive"></router-view>
</div>
</template>
<script>
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>
......
......@@ -54,6 +54,9 @@
.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;}
.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;}
.card-01{ float: left; width: 470px; height: 165px;}
.card1-mod{ float: left; width: 233px; padding: 10px; height: 165px;}
......@@ -105,7 +108,7 @@
.card2-mod .modtitle2{ clear: both; line-height: 25px; color: #B3BFD2;}
.card2-mod .modtitle2 span{ padding: 0 5px; color: #0097FD;}
.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 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);}
......
......@@ -157,10 +157,10 @@
</swiper-slide>
<swiper-slide>
<screenTwoPag1 v-if="screenTagshow == 1" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag1>
<!--<screenTwoPag2 v-else-if="screenTagshow == 2" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag2>-->
<!--<screenTwoPag3 v-else-if="screenTagshow == 3" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag3>-->
<!--<screenTwoPag4 v-else-if="screenTagshow == 4" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag4>-->
<!--<screenTwoPag5 v-else-if="screenTagshow == 5" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag5>-->
<screenTwoPag2 v-else-if="screenTagshow == 2" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag2>
<screenTwoPag3 v-else-if="screenTagshow == 3" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag3>
<screenTwoPag4 v-else-if="screenTagshow == 4" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag4>
<screenTwoPag5 v-else-if="screenTagshow == 5" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag5>
</swiper-slide>
<div class="swiper-pagination" slot="pagination"></div>
</swiper>
......@@ -1183,6 +1183,9 @@
// 获取子组件传递来的数据 用以操作home页组件
this.screenTagshow = data
localStorage.setItem("ScreenPage", this.screenTagshow)
},
toSideTwo(){
this.$refs.mySwiper.swiper.slideTo(1, 10, true)
}
},
mounted() {
......
......@@ -10,9 +10,9 @@
<div class="area">
<el-button size="mini" type="primary" @click="CityGetBack()" v-if="BeginCode">返回</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>
<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>
<!---- 第一个模块---->
......@@ -160,6 +160,8 @@
<ul>
<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 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(4)"><i class="el-icon-first-aid-kit"></i> 早发现</li>
<li @click="pageChage(5)"><i class="el-icon-odometer"></i> 慢病监测</li>
......@@ -228,6 +230,7 @@
} from '@/api/home.js'
export default {
name: 'screenpage1',
inject:['reload'],
data() {
return {
groupNo: 1,
......@@ -237,8 +240,7 @@
tablename: '各区',
thname: '各区',
areaname: '',
value: '2019-09',
nowdate: '2019-09',
startTime: '2019-01',
sel: '筛选',
option: {
......@@ -587,28 +589,6 @@
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: {
textStyle: {
color: '#8393A9',
......@@ -928,7 +908,6 @@
rightlist1: '规范管理率',
rightlist2: '随访率',
rightlist3: '随访比',
selectStarttime: localStorage.getItem("EndTime"),
BeginCode: false,
PlaceYLGM: '',
areaclick: true,
......@@ -938,7 +917,15 @@
PlaceCode: '',
closeareaclick: true,
showtabnum:0,
pagedisname:'高血压'
pagedisname:'高血压',
userinfo:{},
userRole:'',
cxsj:'',
_xzqh:'',
_yljgdm:'',
_group:'',
pageLevel:''
}
},
methods: {
......@@ -1010,13 +997,7 @@
}
},
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.BarType = 'XZQH'
this.communhidden = true
......@@ -1028,16 +1009,68 @@
this.areaname = ''
this.tablename = "各区"
this.thname = "各区"
this.nowdate = DateNow
this.selectStarttime = DateNow
this.value = DateNow.substr(0,7)
this.DieaNo = 1
this.bingNo = 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(this.nowdate)
console.log(this.selectStarttime);
},
groupChange(num) {
this.groupNo = num
......@@ -1055,17 +1088,14 @@
},
dataSearch(value) {
console.log(value)
localStorage.setItem("EndTime", value)
localStorage.setItem("ywsj", value)
this.DieaChange(this.DieaNo)
this.startTime = value.slice(0, 4) + '-01'
if (value) {
this.nowdate = value
this.selectStarttime = value
this.homeinit()
this.reApplyCharts()
this.bottominit()
// this.DieaChange(this.DieaNo)
}
},
bingChange(num) {
this.bingNo = num
......@@ -1205,8 +1235,8 @@
let _this = this
let wd = [{
"name": "YWSJ",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"type": "2",
"compare": "between"
}, {
......@@ -1238,8 +1268,8 @@
//{\"name\":\"QYBZ\",\"value\":\"1\",\"type\":\"1\"}不加这个管
let wdq = [{
"name": "YWSJ",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"type": "2",
"compare": "between",
}, {
......@@ -1270,8 +1300,8 @@
let wdxj = [{
"name": "YWSJ",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"type": "2",
"compare": "between"
}, {
......@@ -1308,8 +1338,8 @@
"type": "1",
}, {
"name": "YWSJ",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"type": "2",
"compare": "between"
}, {
......@@ -1339,8 +1369,8 @@
let wdsf = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between"
}, {
"name": "SF",
......@@ -1375,8 +1405,8 @@
let wdsfq = [{
"name": "YWSJ",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"type": "2",
"compare": "between"
}, {
......@@ -1411,8 +1441,8 @@
let wd2 = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XZQH",
......@@ -1445,8 +1475,8 @@
let wd2q = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "QYBZ",
......@@ -1484,8 +1514,8 @@
let wdtnbg = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XZQH",
......@@ -1508,8 +1538,8 @@
let wdtnbq = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "QYBZ",
......@@ -1537,8 +1567,8 @@
let wdxb = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XB",
......@@ -1566,8 +1596,8 @@
let wdxb1 = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XB",
......@@ -1595,8 +1625,8 @@
let wdxbq = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "QYBZ",
......@@ -1628,8 +1658,8 @@
let wdxbq1 = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "QYBZ",
......@@ -1663,8 +1693,8 @@
let wdnl = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XZQH",
......@@ -1692,8 +1722,8 @@
let wdnl2 = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "QYBZ",
......@@ -1787,8 +1817,8 @@
let wd = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XZQH",
......@@ -1901,8 +1931,8 @@
wd = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}]
param = {
......@@ -1913,8 +1943,8 @@
wdq = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
},{
"name":"QYBZ",
......@@ -1933,8 +1963,8 @@
wd = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
},
{
......@@ -1951,8 +1981,8 @@
wdq = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
},
{
......@@ -1978,8 +2008,8 @@
this.closeareaclick = true
wd = [{
"name": "YWSJ",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
"type": "2",
}, {
......@@ -1994,8 +2024,8 @@
}
wdq = [{
"name": "YWSJ",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
"type": "2",
}, {
......@@ -2434,9 +2464,69 @@
}
},
mounted() {
this.cxsj = localStorage.getItem("ywsj")
this.userinfo = JSON.parse(localStorage.getItem("userinfo"))
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)
},
components: {}
......@@ -2444,6 +2534,11 @@
</script>
<style lang="stylus" scoped>
.disabledC {
background: #2F3034;
color: #525862;
border: 1px #2F3034 solid;
}
.myclk {color: #e4f4ff;font-weight: 600;font-size: 14px;}
#chartsright {width: 100px;height: 120px;float: left;}
#chartstxt {width: 120px;height: 100px;float: left;padding-top: 15px;}
......
......@@ -7,10 +7,10 @@
<p>{{areaname}}</p>
</div>
<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-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>
<div class="name"><i class="el-icon-s-custom el-icon--left"></i>市疾控 截止:{{nowdate}}</div>
<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>{{userinfo.userName}} 截止:{{cxsj}}</div>
</div>
</div>
<!--第一个模块-->
......@@ -215,7 +215,6 @@
themeId: 28,
agestructId: 34,
bleedtype: '血压',
BarType: 'XZQH', // 用于切换 各区与时间
selectID: 1, // 用于切换 规范管理
// 管 左侧变量
aualperNum_g: 0,
......@@ -279,13 +278,8 @@
data_g_ycl_qn: [],
data_q_ycl_qn: [],
areaname: '',
areaname2: '',
value: '2019-09',
nowdate: '2019-09',
startTime: '2019-01',
selectStarttime: localStorage.getItem("MyTime"),
sel: '筛选',
BeginCode: 1, // 用于判断当前的市级 状态
lastStatus: {},
PlaceCode: '',
option: {
......@@ -875,7 +869,15 @@
},
showtabnum: 0,
pagedisname: '高血压',
middlename:"规范管理人群"
middlename:"规范管理人群",
userinfo:{},
userRole:'',
cxsj:'',
_xzqh:'',
_yljgdm:'',
_group:'',
pageLevel:''
}
},
methods: {
......@@ -903,39 +905,32 @@
}
},
CityGetBack() {
console.log("this.BeginCode :" + this.BeginCode);
console.log("this.diastype :" + this.diastype);
this.communshow = true
if (this.BeginCode == 3) {
// 使用 this.BeginCode 的值来判断现在处于的区镇状态
if (this.pageLevel === 'qj') {
this.pageLevel = 'sj'
// 此时 处于第一次点击下的状态
this.PlaceCode = ''
this.BarType = 'XZQH'
this.BeginCode = 1
this._xzqh = ''
this._group = 'XZQH'
this.areaname = ''
this.tablename = "各区"
this.thname = "各区"
this.arname = '各区'
// this.BeginCode = false
console.log("现在处于一级状态");
}
if (this.BeginCode == 4) {
// 使用 this.BeginCode 的值来判断现在处于的区镇状态
// 此时 处于第二次点击下的状态
// console.log("现在处于二级状态");
this.PlaceCode = this.lastStatus.PlaceCode
this.BarType = this.lastStatus.BarType
this.BeginCode = 2
else if (this.pageLevel === 'sq') {
this.pageLevel = 'qj'
this._group = 'YLJGDM'
this.tablename = "社区"
this.thname = "医院"
this.arname = '社区'
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.change_age(1)
......@@ -946,94 +941,105 @@
});
},
changeReplay() {
var myDate = new Date();
let tempmonth = myDate.getMonth()
if (tempmonth < 10) {
tempmonth = '0' + tempmonth
}
// 用于 重置时间 入参
let DateNow = '' + myDate.getFullYear() + '-' + tempmonth + '-01'
console.log(DateNow);
//this.pageChage(2)
this.PlaceCode = ''
this.BarType = 'XZQH'
this.BeginCode = 1
if ('city' === this.userRole) {//市角色
this._xzqh = ""
this._group = "XZQH"
this.pageLevel = 'sj'
this.areaname = ''
this.tablename = '各区'
this.themeId = 28
this.thname = '各区'
this.arname = '各区'
this.nowdate = DateNow
this.selectStarttime = DateNow
this.value = DateNow.substr(0, 7)
// this.homeinit(this.themeId)
this.dataSearch(DateNow)
},
dataSearch(value) {
var myDate = new Date();
myDate.getYear();
localStorage.setItem("EndTime", value)
console.log(value);
this.startTime = value.slice(0, 4) + '-01'
if (value) {
this.nowdate = value
this.selectStarttime = value
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)
}
},
dataSearch() {
this.homeinit(this.themeId)
this.change_age(1)
},
changecity(code, name) {
if (this.BeginCode != 4) {
//当 this.BeginCode == 4 的时候 ,证明已经到了最底层,故不再请求方法
// console.log(code);
this.PlaceCode = code
if (this.BeginCode == 1) {
this.areaname = name
if (this.pageLevel === 'sj') {
// 点击区 -- 展示城镇信息
this.BarType = 'YLJGDM'
this.pageLevel = 'qj'
this._group = 'YLJGDM'
this._xzqh = code
this.communshow = true
// 用于记录当前的 区镇的入参状态
this.lastStatus.PlaceCode = this.PlaceCode
this.lastStatus.BarType = this.BarType
this.lastStatus.BeginCode = this.BeginCode
this.lastStatus.areaclick = this.areaclick
this.tablename = '社区'
this.thname = '医院'
this.arname = '社区'
this.areaname = name
}else if (this.pageLevel === 'qj') {
// 点击区 -- 展示城镇信息
this.pageLevel = 'sq'
this._group = 'YWSJ'
this._yljgdm = code
this.communshow = true
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.PlaceCode = code
console.log(this.BeginCode);
}else if (this.pageLevel === 'sq') {
return false
}
this.homeinit(this.themeId)
this.change_age(1)
if (this.BeginCode == 4) {
this.areaname = this.areaname2 + this.areaname
console.log(this.BeginCode);
this.communshow = false
}
if (this.BeginCode == 3) {
console.log(this.BeginCode);
this.areaname = this.areaname2
}
}
},
groupChange(num) {
this.groupNo = num
if (num == 1) {
this.BarType = "XZQH"
this.BeginCode = 1
this._group = "XZQH"
this.homeinit(this.themeId)
} else {
this.BarType = "YWSJ"
this.BeginCode = 4
this._group = "YWSJ"
this.homeinit(this.themeId)
}
},
......@@ -1057,28 +1063,28 @@
// 管数据 入参
let wd = [{
"name": "YWSJ",
"endTime": _this.selectStarttime,
"endTime": _this.cxsj,
"type": "2",
"startTime": this.startTime,
"startTime": '',
"compare": "between",
},
{
"name": "XZQH",
"value": this.PlaceCode, // 主题ID
"value": this._xzqh,
"type": "1"
}
]
// 签数据 入参
let wd2 = [{
"name": "YWSJ",
"endTime": _this.selectStarttime,
"endTime": _this.cxsj,
"type": "2",
"startTime": this.startTime,
"startTime": '',
"compare": "between",
},
{
"name": "XZQH",
"value": this.PlaceCode,
"value": this._xzqh,
"type": "1"
},
{
......@@ -1101,13 +1107,13 @@
let placeparam = {
"themeId": diastype,
"wd": JSON.stringify(wd),
"group": this.BarType
"group": this._group
}
let placeparam2 = {
"themeId": diastype,
"wd": JSON.stringify(wd2),
"group": this.BarType
"group": this._group
}
// =================================管部份 请求 ======================================
// 请求 管的 自动上传血压控制率 与 报告血压控制率 高糖并用
......@@ -1390,22 +1396,20 @@
this.listArray2 = []
this.listArrayFinal = []
// if(this.BeginCode == 1){
// // 默认状态就是一
// }
// 点击市区之后,改变入参
if (this.BeginCode == 2) {
if (this.pageLevel === 'qj') {
console.log('第一次点击事件执行 区-->城镇');
console.log(this.PlaceCode);
wd = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XZQH",
"value": this.PlaceCode,
"value": this._xzqh,
"type": "1"
}]
......@@ -1413,12 +1417,12 @@
wd2 = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XZQH",
"value": this.PlaceCode,
"value": this._xzqh,
"type": "1"
},
{
......@@ -1430,28 +1434,27 @@
placeparam = {
"themeId": diastype,
"wd": JSON.stringify(wd),
"group": this.BarType,
"group": this._group,
}
placeparam2 = {
"themeId": diastype,
"wd": JSON.stringify(wd2),
"group": this.BarType,
"group": this._group,
}
this.BeginCode = 3
this.BarType = 'YWSJ'
} else if (this.BeginCode == 3) {
this.BeginCode = 4
} else if (this.pageLevel === 'sq') {
this._group = 'YWSJ'
console.log('第二次点击:展示区镇 时间数据');
console.log(this.PlaceCode);
console.log(this._xzqh);
wd = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XZQH",
"value": this.PlaceCode,
"value": this._xzqh,
"type": "1"
}]
......@@ -1459,12 +1462,12 @@
wd2 = [{
"name": "YWSJ",
"type": "2",
"startTime": this.startTime,
"endTime": this.selectStarttime,
"startTime": '',
"endTime": this.cxsj,
"compare": "between",
}, {
"name": "XZQH",
"value": this.PlaceCode,
"value": this._xzqh,
"type": "1"
},
{
......@@ -1476,12 +1479,12 @@
placeparam = {
"themeId": diastype,
"wd": JSON.stringify(wd),
"group": this.BarType,
"group": this._group,
}
placeparam2 = {
"themeId": diastype,
"wd": JSON.stringify(wd2),
"group": this.BarType,
"group": this._group,
}
}
// 右下角列表 + 图表 (数据共用)
......@@ -1637,12 +1640,12 @@
})
// console.log(JSON.stringify(this.listArray2));
if (this.BeginCode != 4) {
if (this._group != 'YWSJ') {
for (var i = 0; i < this.listArray.length; i++) {
var obj = Object.assign(this.listArray[i], this.listArray2[i])
this.listArrayFinal.push(obj)
}
} else {
} else if (this._group === 'YWSJ') {
console.log(2222222222222222222);
this.tablename = "时间"
this.thname = "季度"
......@@ -2950,13 +2953,13 @@
// 右上柱状图 年龄结构 -themeId: 34 全市 35 区 36 社区
let wdnl = [{
"name": "YWSJ",
"endTime": this.selectStarttime,
"endTime": this.cxsj,
"type": "2",
"startTime": this.startTime,
"startTime": '',
"compare": "between"
}, {
"name": "XZQH",
"value": this.PlaceCode,
"value": this._xzqh,
"type": "1"
}]
let paramnl = {
......@@ -3084,13 +3087,13 @@
// 为了避免异步带来的影响,于是在回调函数内部再次请求数据
let wdnl2 = [{
"name": "YWSJ",
"endTime": this.selectStarttime,
"endTime": this.cxsj,
"type": "2",
"startTime": this.startTime,
"startTime": '',
"compare": "between"
}, {
"name": "XZQH",
"value": this.PlaceCode,
"value": this._xzqh,
"type": "1"
}]
let paramnl2 = {
......@@ -3240,11 +3243,48 @@
}
},
mounted() {
// console.log(this.PlaceCode);
this.cxsj = localStorage.getItem("ywsj")
this.userinfo = JSON.parse(localStorage.getItem("userinfo"))
this.userRole = localStorage.getItem("userRole")
if ('city' === this.userRole) {//市角色
this._xzqh = ""
this._group = "XZQH"
this.pageLevel = 'sj'
this.homeinit(this.themeId)
this.change_age(1)
this.value = localStorage.getItem("MyTime") ? localStorage.getItem("MyTime") : this.value
this.nowdate = localStorage.getItem("MyTime") ? localStorage.getItem("MyTime") : this.nowdate
} 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 dom = document.getElementById("rightTop")
if (dom) {
......@@ -3289,7 +3329,6 @@
}
}, 1000)
let _this = this
const obj2 = setInterval(() => {
const dom2 = document.getElementById("pag2bar")
if (dom2) {
......
......@@ -30,7 +30,44 @@ service.interceptors.response.use(
})
return Promise.reject('error')
} else {
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 => {
......
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