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

数据统计-接口对接

parent 6de02958
...@@ -10,5 +10,8 @@ VUE_APP_BASE_API = '/dev-api' ...@@ -10,5 +10,8 @@ VUE_APP_BASE_API = '/dev-api'
# 图片显示 # 图片显示
VUE_APP_TEST_API = 'http://127.0.0.1:8090' VUE_APP_TEST_API = 'http://127.0.0.1:8090'
# A端前端地址
VUE_APP_WEB = 'http://localhost:80'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
...@@ -12,3 +12,6 @@ VUE_APP_BASE_API = 'http://114.67.241.140:8091' ...@@ -12,3 +12,6 @@ VUE_APP_BASE_API = 'http://114.67.241.140:8091'
# 图片显示 # 图片显示
VUE_APP_TEST_API = 'http://114.67.241.140:8090' 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' ...@@ -10,3 +10,6 @@ VUE_APP_BASE_API = 'http://47.92.195.144:8091'
# 图片显示 # 图片显示
VUE_APP_TEST_API = 'http://47.92.195.144:8090' 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' ...@@ -12,3 +12,6 @@ VUE_APP_BASE_API = 'http://47.92.55.88:8091'
# 图片显示 # 图片显示
VUE_APP_TEST_API = 'http://47.92.55.88:8090' 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 { ...@@ -89,7 +89,7 @@ export default {
trigger: 'item', // 出发方式 trigger: 'item', // 出发方式
formatter: (item) => { formatter: (item) => {
const unit = _this.unit const unit = _this.unit
const percent = item.data.value / _this.sum * 100 const percent = (item.data.value / _this.sum * 100).toFixed(1)
return `<div> return `<div>
${item.data.name} ${item.data.name}
<br> <br>
......
...@@ -14,8 +14,8 @@ export default { ...@@ -14,8 +14,8 @@ export default {
}, },
watch: { watch: {
max(newValue) { max(newValue) {
// console.log('newMax',newValue) console.log('newMax', newValue)
this.formatMax(newValue) // this.formatMax(newValue)
} }
}, },
mounted() { mounted() {
...@@ -126,13 +126,6 @@ export default { ...@@ -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 @@ ...@@ -182,7 +182,18 @@
<el-row :gutter="24" class="row2"> <el-row :gutter="24" class="row2">
<el-col :span="9"> <el-col :span="9">
<div class="cardDiv" style="padding-bottom: 0"> <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> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
...@@ -217,7 +228,7 @@ ...@@ -217,7 +228,7 @@
v-if="radarChartData.yData1.length > 0 || radarChartData.yData2.length > 0" v-if="radarChartData.yData1.length > 0 || radarChartData.yData2.length > 0"
:y-data1="radarChartData.yData1" :y-data1="radarChartData.yData1"
:y-data2="radarChartData.yData2" :y-data2="radarChartData.yData2"
:max="getArrayMax([getArrayMax(radarChartData.yData1),getArrayMax(radarChartData.yData2)])" :max="radarChartData.max"
/> />
<div v-else style="height: 386px;"> <div v-else style="height: 386px;">
<div class="cardTitle"> <div class="cardTitle">
...@@ -243,7 +254,6 @@ ...@@ -243,7 +254,6 @@
<el-table <el-table
style="margin:20px 0 0 7px" style="margin:20px 0 0 7px"
:header-cell-style="{background:'#F4F4F4'}" :header-cell-style="{background:'#F4F4F4'}"
border
:data="hospitalList" :data="hospitalList"
> >
<el-table-column label="序号" align="left" type="index" width="55" /> <el-table-column label="序号" align="left" type="index" width="55" />
...@@ -335,148 +345,7 @@ export default { ...@@ -335,148 +345,7 @@ export default {
loading: true, loading: true,
hospitalInfoStatistics: {}, hospitalInfoStatistics: {},
hospitalPercentInfo: {}, hospitalPercentInfo: {},
mapData: [ 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
}
],
yData1: { yData1: {
label: '新增预储值总额', label: '新增预储值总额',
data: [33, 31, 52, 66, 28, 71, 42, 95, 81, 92, 120, 21], data: [33, 31, 52, 66, 28, 71, 42, 95, 81, 92, 120, 21],
...@@ -499,7 +368,8 @@ export default { ...@@ -499,7 +368,8 @@ export default {
}, },
radarChartData: { radarChartData: {
yData1: [], yData1: [],
yData2: [] yData2: [],
max: 0
}, },
radarSelect: 'lastYear', radarSelect: 'lastYear',
hospitalList: [], hospitalList: [],
...@@ -524,13 +394,14 @@ export default { ...@@ -524,13 +394,14 @@ export default {
console.log('dataRes', res) console.log('dataRes', res)
this.hospitalInfoStatistics = res.data.hospitalInfoStatistics this.hospitalInfoStatistics = res.data.hospitalInfoStatistics
this.hospitalPercentInfo = res.data.hospitalPercentInfo this.hospitalPercentInfo = res.data.hospitalPercentInfo
this.mapData = res.data.chinaMapDistributionList
this.hospitalPrestoredRank = res.data.prestoredRankList this.hospitalPrestoredRank = res.data.prestoredRankList
this.hospitalTimeRank = res.data.enterTimeRankList this.hospitalTimeRank = res.data.enterTimeRankList
this.columnarChartData.yData = res.data.hospitalDoctorAnalyze this.columnarChartData.yData = res.data.hospitalDoctorAnalyze
this.radarChartData.yData1 = res.data.rateDistributionHistory this.radarChartData.yData1 = res.data.rateDistributionHistory
this.radarChartData.yData2 = res.data.rateDistributionValid this.radarChartData.yData2 = res.data.rateDistributionValid
this.radarChartData.max = this.getArrayMax([this.getArrayMax(this.radarChartData.yData1), this.getArrayMax(this.radarChartData.yData2)])
// console.log('maxIIII', this.getArrayMax(res.data.rateDistributionValid)) this.radarChartData.max = this.formatMax(this.radarChartData.max)
this.loading = false this.loading = false
}) })
}, },
...@@ -546,6 +417,15 @@ export default { ...@@ -546,6 +417,15 @@ export default {
} }
return max return max
}, },
formatMax(max) {
const temp = max % 5
if (temp !== 0) {
max = max + (5 - temp)
return max
} else {
return max
}
},
getHospitalList() { getHospitalList() {
listHospital(this.queryParams).then(response => { listHospital(this.queryParams).then(response => {
this.hospitalList = response.rows this.hospitalList = response.rows
...@@ -594,10 +474,9 @@ export default { ...@@ -594,10 +474,9 @@ export default {
console.log('详情', row) console.log('详情', row)
const authorizationExpirationDate = this.addDays(row.createTime, row.dueDate) const authorizationExpirationDate = this.addDays(row.createTime, row.dueDate)
row.authorizationExpirationDate = authorizationExpirationDate row.authorizationExpirationDate = authorizationExpirationDate
this.$router.push({ const local = process.env.VUE_APP_WEB
path: '/hospital-management/hospital-details', console.log('local', local)
query: { detail: row } window.location.href = `${local}/hospital-management/hospital-details?detail=${row}`
})
localStorage.setItem('hospitalDetail', JSON.stringify(row)) localStorage.setItem('hospitalDetail', JSON.stringify(row))
} }
} }
......
...@@ -330,7 +330,7 @@ ...@@ -330,7 +330,7 @@
<el-col :span="6"> <el-col :span="6">
<div class="pet_info_statistics pet_info_statistics_register_owner"> <div class="pet_info_statistics pet_info_statistics_register_owner">
<div style="display: flex;"> <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 class="fontColor"></div>
</div> </div>
<div class="bottomText"> <div class="bottomText">
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
<el-col :span="6"> <el-col :span="6">
<div class="pet_info_statistics pet_info_statistics_yifuwucz"> <div class="pet_info_statistics pet_info_statistics_yifuwucz">
<div style="display: flex;"> <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 class="fontColor"></div>
</div> </div>
<div class="bottomText"> <div class="bottomText">
...@@ -358,7 +358,7 @@ ...@@ -358,7 +358,7 @@
<el-col :span="6"> <el-col :span="6">
<div class="pet_info_statistics pet_info_statistics_register_pet"> <div class="pet_info_statistics pet_info_statistics_register_pet">
<div style="display: flex;"> <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 class="fontColor"></div>
</div> </div>
<div class="bottomText"> <div class="bottomText">
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
<el-col :span="6"> <el-col :span="6">
<div class="pet_info_statistics pet_info_statistics_vipBalance"> <div class="pet_info_statistics pet_info_statistics_vipBalance">
<div style="display: flex;"> <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 class="fontColor"></div>
</div> </div>
<div class="bottomText"> <div class="bottomText">
...@@ -424,11 +424,12 @@ ...@@ -424,11 +424,12 @@
<el-row :gutter="24" class="row2"> <el-row :gutter="24" class="row2">
<el-col :span="12"> <el-col :span="12">
<div class="cardDiv" style="padding-bottom: 0"> <div class="cardDiv" style="padding-bottom: 0">
<two-line-chart <two-line-chart
v-if="yData1_2.data.length > 0 || yData2_2.data.length > 0" v-if="yData1_2.data.length > 0 || yData2_2.data.length > 0"
:y-data1="yData1_2" :y-data1="yData1_2"
:y-data2="yData2_2" :y-data2="yData2_2"
title="会员卡金额波动" /> title="会员卡金额波动"
/>
<div v-else style="height: 361px;"> <div v-else style="height: 361px;">
<div class="cardTitle"> <div class="cardTitle">
会员卡金额波动 会员卡金额波动
......
...@@ -485,7 +485,7 @@ color: #333333;" ...@@ -485,7 +485,7 @@ color: #333333;"
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="开药日期" prop="date" > <el-table-column align="center" label="开药日期" prop="date">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.inputShow">-</span> <span v-if="scope.row.inputShow">-</span>
<span v-else> <span v-else>
...@@ -493,7 +493,7 @@ color: #333333;" ...@@ -493,7 +493,7 @@ color: #333333;"
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="处方数量" prop="recipelNum" > <el-table-column align="center" label="处方数量" prop="recipelNum">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
v-if="scope.row.inputShow" v-if="scope.row.inputShow"
...@@ -509,7 +509,7 @@ color: #333333;" ...@@ -509,7 +509,7 @@ color: #333333;"
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="用法" prop="remark" > <el-table-column align="center" label="用法" prop="remark">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
v-if="scope.row.inputShow" v-if="scope.row.inputShow"
......
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
@click="handleDetail(scope.row)" @click="handleDetail(scope.row)"
>详情 >详情
</el-button> </el-button>
<!-- :disabled="checkRole(['pt-admin']) || scope.row.isUpdate === '1'"--> <!-- :disabled="checkRole(['pt-admin']) || scope.row.isUpdate === '1'"-->
<el-button <el-button
v-hasPermi="['business:record:edit']" v-hasPermi="['business:record:edit']"
:disabled="checkRole(['pt-admin']) || scope.row.isUpdate === '1'" :disabled="checkRole(['pt-admin']) || scope.row.isUpdate === '1'"
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
:max="100" :max="100"
:min="0" :min="0"
controls-position="right" controls-position="right"
/>&nbsp;{{singleItem.smallSallNormsUnit || '盒'}} />&nbsp;{{ singleItem.smallSallNormsUnit || '盒' }}
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
@click="handleDetail(scope.row)" @click="handleDetail(scope.row)"
>详情 >详情
</el-button> </el-button>
<!-- :disabled="scope.row.isAdd === '1'"--> <!-- :disabled="scope.row.isAdd === '1'"-->
<el-button <el-button
icon="el-icon-paperclip" icon="el-icon-paperclip"
plain 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