Commit 5899c566 authored by 陈明豪's avatar 陈明豪

数据统计-接口对接

parent 6de02958
......@@ -10,5 +10,8 @@ VUE_APP_BASE_API = '/dev-api'
# 图片显示
VUE_APP_TEST_API = 'http://127.0.0.1:8090'
# A端前端地址
VUE_APP_WEB = 'http://localhost:80'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
......@@ -12,3 +12,6 @@ VUE_APP_BASE_API = 'http://114.67.241.140:8091'
# 图片显示
VUE_APP_TEST_API = 'http://114.67.241.140:8090'
# A端前端地址
VUE_APP_WEB = 'http://114.67.241.140:80'
......@@ -10,3 +10,6 @@ VUE_APP_BASE_API = 'http://47.92.195.144:8091'
# 图片显示
VUE_APP_TEST_API = 'http://47.92.195.144:8090'
# A端前端地址
VUE_APP_WEB = 'http://47.92.195.144:80'
......@@ -12,3 +12,6 @@ VUE_APP_BASE_API = 'http://47.92.55.88:8091'
# 图片显示
VUE_APP_TEST_API = 'http://47.92.55.88:8090'
# A端前端地址
VUE_APP_WEB = 'http://47.92.55.88:80'
......@@ -89,7 +89,7 @@ export default {
trigger: 'item', // 出发方式
formatter: (item) => {
const unit = _this.unit
const percent = item.data.value / _this.sum * 100
const percent = (item.data.value / _this.sum * 100).toFixed(1)
return `<div>
${item.data.name}
<br>
......
......@@ -14,8 +14,8 @@ export default {
},
watch: {
max(newValue) {
// console.log('newMax',newValue)
this.formatMax(newValue)
console.log('newMax', newValue)
// this.formatMax(newValue)
}
},
mounted() {
......@@ -126,13 +126,6 @@ export default {
}
]
})
},
formatMax(max) {
const temp = max % 5
if (temp !== 0) {
this.max = max + (5 - temp)
this.setCharts()
}
}
}
}
......
......@@ -182,7 +182,18 @@
<el-row :gutter="24" class="row2">
<el-col :span="9">
<div class="cardDiv" style="padding-bottom: 0">
<china-map :map-data="mapData" unit="家" :sum="1000" title="医院所在城市分析" />
<china-map v-if="mapData.length > 0" :map-data="mapData" unit="家" :sum="mapData[mapData.length - 1].value" title="医院所在城市分析" />
<div v-else style="height: 386px;">
<div class="cardTitle">
医院所在城市分析
</div>
<div class="emptyDiv">
<div>
<img src="../../../assets/data_statistics/guahao_img_wushuju.png">
</div>
<div>暂无数据</div>
</div>
</div>
</div>
</el-col>
<el-col :span="6">
......@@ -217,7 +228,7 @@
v-if="radarChartData.yData1.length > 0 || radarChartData.yData2.length > 0"
:y-data1="radarChartData.yData1"
:y-data2="radarChartData.yData2"
:max="getArrayMax([getArrayMax(radarChartData.yData1),getArrayMax(radarChartData.yData2)])"
:max="radarChartData.max"
/>
<div v-else style="height: 386px;">
<div class="cardTitle">
......@@ -243,7 +254,6 @@
<el-table
style="margin:20px 0 0 7px"
:header-cell-style="{background:'#F4F4F4'}"
border
:data="hospitalList"
>
<el-table-column label="序号" align="left" type="index" width="55" />
......@@ -335,148 +345,7 @@ export default {
loading: true,
hospitalInfoStatistics: {},
hospitalPercentInfo: {},
mapData: [
{
name: '北京市',
value: 200
},
{
name: '天津市',
value: 0
},
{
name: '上海市',
value: 200
},
{
name: '重庆市',
value: 0
},
{
name: '河北省',
value: 0
},
{
name: '河南省',
value: 0
},
{
name: '云南省',
value: 0
},
{
name: '辽宁省',
value: 0
},
{
name: '黑龙江省',
value: 0
},
{
name: '湖南省',
value: 40
},
{
name: '安徽省',
value: 10
},
{
name: '山东省',
value: 60
},
{
name: '新疆维吾尔自治区',
value: 0
},
{
name: '江苏省',
value: 0
},
{
name: '浙江省',
value: 0
},
{
name: '江西省',
value: 90
},
{
name: '湖北省',
value: 70
},
{
name: '广西壮族自治区',
value: 0
},
{
name: '甘肃省',
value: 0
},
{
name: '山西省',
value: 0
},
{
name: '内蒙古自治区',
value: 10
},
{
name: '陕西省',
value: 0
},
{
name: '吉林省',
value: 0
},
{
name: '福建省',
value: 60
},
{
name: '贵州省',
value: 0
},
{
name: '广东省',
value: 800
},
{
name: '青海省',
value: 1
},
{
name: '西藏自治区',
value: 1
},
{
name: '四川省',
value: 0
},
{
name: '宁夏回族自治区',
value: 0
},
{
name: '海南省',
value: 0
},
{
name: '台湾省',
value: 0
},
{
name: '香港特别行政区',
value: 0
},
{
name: '澳门特别行政区',
value: 0
},
{
name: '南海诸岛',
value: 0
}
],
mapData: [],
yData1: {
label: '新增预储值总额',
data: [33, 31, 52, 66, 28, 71, 42, 95, 81, 92, 120, 21],
......@@ -499,7 +368,8 @@ export default {
},
radarChartData: {
yData1: [],
yData2: []
yData2: [],
max: 0
},
radarSelect: 'lastYear',
hospitalList: [],
......@@ -524,13 +394,14 @@ export default {
console.log('dataRes', res)
this.hospitalInfoStatistics = res.data.hospitalInfoStatistics
this.hospitalPercentInfo = res.data.hospitalPercentInfo
this.mapData = res.data.chinaMapDistributionList
this.hospitalPrestoredRank = res.data.prestoredRankList
this.hospitalTimeRank = res.data.enterTimeRankList
this.columnarChartData.yData = res.data.hospitalDoctorAnalyze
this.radarChartData.yData1 = res.data.rateDistributionHistory
this.radarChartData.yData2 = res.data.rateDistributionValid
// console.log('maxIIII', this.getArrayMax(res.data.rateDistributionValid))
this.radarChartData.max = this.getArrayMax([this.getArrayMax(this.radarChartData.yData1), this.getArrayMax(this.radarChartData.yData2)])
this.radarChartData.max = this.formatMax(this.radarChartData.max)
this.loading = false
})
},
......@@ -546,6 +417,15 @@ export default {
}
return max
},
formatMax(max) {
const temp = max % 5
if (temp !== 0) {
max = max + (5 - temp)
return max
} else {
return max
}
},
getHospitalList() {
listHospital(this.queryParams).then(response => {
this.hospitalList = response.rows
......@@ -594,10 +474,9 @@ export default {
console.log('详情', row)
const authorizationExpirationDate = this.addDays(row.createTime, row.dueDate)
row.authorizationExpirationDate = authorizationExpirationDate
this.$router.push({
path: '/hospital-management/hospital-details',
query: { detail: row }
})
const local = process.env.VUE_APP_WEB
console.log('local', local)
window.location.href = `${local}/hospital-management/hospital-details?detail=${row}`
localStorage.setItem('hospitalDetail', JSON.stringify(row))
}
}
......
......@@ -330,7 +330,7 @@
<el-col :span="6">
<div class="pet_info_statistics pet_info_statistics_register_owner">
<div style="display: flex;">
<div class="numberColor">{{formatNum(customerStatistics.customersNum || 0)}}</div>
<div class="numberColor">{{ formatNum(customerStatistics.customersNum || 0) }}</div>
<div class="fontColor"></div>
</div>
<div class="bottomText">
......@@ -344,7 +344,7 @@
<el-col :span="6">
<div class="pet_info_statistics pet_info_statistics_yifuwucz">
<div style="display: flex;">
<div class="numberColor">{{formatNum(customerStatistics.membersNum || 0)}}</div>
<div class="numberColor">{{ formatNum(customerStatistics.membersNum || 0) }}</div>
<div class="fontColor"></div>
</div>
<div class="bottomText">
......@@ -358,7 +358,7 @@
<el-col :span="6">
<div class="pet_info_statistics pet_info_statistics_register_pet">
<div style="display: flex;">
<div class="numberColor">{{formatNum(customerStatistics.servicePetNum || 0)}}</div>
<div class="numberColor">{{ formatNum(customerStatistics.servicePetNum || 0) }}</div>
<div class="fontColor"></div>
</div>
<div class="bottomText">
......@@ -372,7 +372,7 @@
<el-col :span="6">
<div class="pet_info_statistics pet_info_statistics_vipBalance">
<div style="display: flex;">
<div class="numberColor">{{formatNum(customerStatistics.memberAmount || 0)}}</div>
<div class="numberColor">{{ formatNum(customerStatistics.memberAmount || 0) }}</div>
<div class="fontColor"></div>
</div>
<div class="bottomText">
......@@ -424,11 +424,12 @@
<el-row :gutter="24" class="row2">
<el-col :span="12">
<div class="cardDiv" style="padding-bottom: 0">
<two-line-chart
v-if="yData1_2.data.length > 0 || yData2_2.data.length > 0"
:y-data1="yData1_2"
:y-data2="yData2_2"
title="会员卡金额波动" />
<two-line-chart
v-if="yData1_2.data.length > 0 || yData2_2.data.length > 0"
:y-data1="yData1_2"
:y-data2="yData2_2"
title="会员卡金额波动"
/>
<div v-else style="height: 361px;">
<div class="cardTitle">
会员卡金额波动
......
......@@ -485,7 +485,7 @@ color: #333333;"
}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="开药日期" prop="date" >
<el-table-column align="center" label="开药日期" prop="date">
<template slot-scope="scope">
<span v-if="scope.row.inputShow">-</span>
<span v-else>
......@@ -493,7 +493,7 @@ color: #333333;"
</span>
</template>
</el-table-column>
<el-table-column align="center" label="处方数量" prop="recipelNum" >
<el-table-column align="center" label="处方数量" prop="recipelNum">
<template slot-scope="scope">
<el-form-item
v-if="scope.row.inputShow"
......@@ -509,7 +509,7 @@ color: #333333;"
</span>
</template>
</el-table-column>
<el-table-column align="center" label="用法" prop="remark" >
<el-table-column align="center" label="用法" prop="remark">
<template slot-scope="scope">
<el-form-item
v-if="scope.row.inputShow"
......
......@@ -203,7 +203,7 @@
@click="handleDetail(scope.row)"
>详情
</el-button>
<!-- :disabled="checkRole(['pt-admin']) || scope.row.isUpdate === '1'"-->
<!-- :disabled="checkRole(['pt-admin']) || scope.row.isUpdate === '1'"-->
<el-button
v-hasPermi="['business:record:edit']"
:disabled="checkRole(['pt-admin']) || scope.row.isUpdate === '1'"
......
......@@ -167,7 +167,7 @@
:max="100"
:min="0"
controls-position="right"
/>&nbsp;{{singleItem.smallSallNormsUnit || '盒'}}
/>&nbsp;{{ singleItem.smallSallNormsUnit || '盒' }}
</el-form-item>
</div>
<div>
......
......@@ -195,7 +195,7 @@
@click="handleDetail(scope.row)"
>详情
</el-button>
<!-- :disabled="scope.row.isAdd === '1'"-->
<!-- :disabled="scope.row.isAdd === '1'"-->
<el-button
icon="el-icon-paperclip"
plain
......
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