Browse Source

Merge branch 'master' of dd.tall.wiki:binbin0314/salt-lake-hospital

master
lucky 5 years ago
parent
commit
432cd78c2b
  1. 4
      .env.development
  2. 54
      src/components/Duration/Duration.js
  3. 8
      src/components/Duration/Duration.vue
  4. 7
      src/components/FastEd/FastEd.vue
  5. 7
      src/components/RFID/RFID.vue
  6. 62
      src/components/Statistics/Statistics.js
  7. 9
      src/components/Statistics/Statistics.vue
  8. 21
      src/config/api.js
  9. 1
      src/views/Index/Index.vue

4
.env.development

@ -1,8 +1,8 @@
VUE_APP_MODE=development
VUE_APP_NODE_ENV=development
VUE_APP_SCENE=greenvalley
VUE_APP_BASE_URL=http://www.sxwikionline.com/
VUE_APP_API_URL=http://www.sxwikionline.com/gateway
VUE_APP_BASE_URL=http://test.tall.wiki/
VUE_APP_API_URL=http://test.tall.wiki/gateway
VUE_APP_PROXY_URL=/gateway
VUE_APP_PUBLIC_PATH=/greenvalley
VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws

54
src/components/Duration/Duration.js

@ -1,12 +1,17 @@
var option = {
// title: {
// left: '10%',
// textStyle: {
// fontWeight: 'normal',
// color: '#fff', //标题颜色
// },
// text: '急救时长分析',
// },
import { getPointTime } from 'config/api';
const mixin = {
data() {
return {
pointTimeCurrentList: [],
pointTimeHospital: [],
pointTimeInternation: [],
};
},
computed: {
option() {
return {
tooltip: { trigger: 'axis' },
legend: {
x: 'center',
@ -37,7 +42,6 @@ var option = {
yAxis: {
type: 'value',
name: '秒',
interval: 200,
axisLabel: {
textStyle: {
fontWeight: 'normal',
@ -60,7 +64,7 @@ var option = {
stack: '总量',
symbolSize: 6,
// symbol: 'star',
data: [120, 132, 101, 134, 90, 230, 210],
data: this.pointTimeHospital,
color: 'rgb(18, 131, 227)',
},
{
@ -68,7 +72,7 @@ var option = {
type: 'line',
stack: '总量',
symbolSize: 6,
data: [220, 182, 191, 234, 290, 330, 310],
data: this.pointTimeInternation,
color: 'rgb(30, 231, 231)',
},
{
@ -76,10 +80,32 @@ var option = {
type: 'line',
stack: '总量',
symbolSize: 6,
data: [150, 232, 201, 154, 190, 330, 410],
data: this.pointTimeCurrentList,
color: 'rgb(227, 18, 187)',
},
],
};
},
},
methods: {
async getData() {
try {
const params = { param: { id: 0 } };
const res = await getPointTime(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.pointTimeCurrentList = data.pointTimeCurrentList;
this.pointTimeHospital = data.pointTimeHospital;
this.pointTimeInternation = data.pointTimeInternation;
} else {
console.log(msg);
}
} catch (error) {
console.log(error);
}
},
},
};
export default option;
export default mixin;

8
src/components/Duration/Duration.vue

@ -5,9 +5,10 @@
</div>
</template>
<script>
import option from './Duration.js';
import mixin from './Duration.js';
export default {
name: 'Duration',
mixins: [mixin],
data() {
return {
// msg: 'Welcome to Your Vue.js App',
@ -32,11 +33,12 @@ export default {
};
},
methods: {
drawLine() {
async drawLine() {
// domecharts
let myChart = this.$echarts.init(document.getElementById('Duration'));
//
myChart.setOption(option);
await this.getData();
myChart.setOption(this.option);
},
},
};

7
src/components/FastEd/FastEd.vue

@ -9,12 +9,7 @@
<div class="flex-1">{{ item.b }}</div>
<div class="flex-1">{{ item.c }}</div>
</div>
<div
:key="index"
class="flex-1 flex-row"
style="height: 25%"
v-for="(item,index) in dataList"
>
<div :key="index" class="flex-1 flex-row" style="height: 25%" v-for="(item, index) in dataList">
<div class="flex-1">{{ item.a }}</div>
<div class="flex-1">{{ item.b }}</div>
<div class="flex-1">{{ item.c }}</div>

7
src/components/RFID/RFID.vue

@ -1,12 +1,7 @@
<template>
<div class="flex-1 flex-column rfid">
<div :key="i + 1" v-for="(lists, i) in newArr" v-show="i === num">
<div
:class="`list${index+1} ${item.active ? 'active' : ''}`"
:key="index"
class="list"
v-for="(item,index) in lists"
>
<div :class="`list${index + 1} ${item.active ? 'active' : ''}`" :key="index" class="list" v-for="(item, index) in lists">
<span>{{ item.name }}</span>
</div>
</div>

62
src/components/Statistics/Statistics.js

@ -1,4 +1,18 @@
var option = {
import { selResult } from 'config/api';
const mixin = {
data() {
return {
sigleLast: [], // 去年柱形图
sigleNow: [], // 本年柱形图
sumLast: [], // 去年折线图
sumNow: [], // 本年折线图
};
},
computed: {
option() {
return {
tooltip: { trigger: 'axis' },
legend: [
{
@ -33,7 +47,7 @@ var option = {
yAxis: [
{
type: 'value',
interval: 200,
interval: 20,
name: '人次',
axisTick: {
//y轴刻度线
@ -56,7 +70,7 @@ var option = {
},
{
type: 'value',
interval: 200,
interval: 20,
name: '数量',
splitLine: {
show: true,
@ -77,22 +91,23 @@ var option = {
series: [
{
name: '本年',
data: [120, 232, 301, 434, 590, 630, 720, 301, 434, 590, 630, 720],
data: this.sumNow,
type: 'line',
color: 'rgb(24, 144, 255)',
},
{
name: '去年',
data: [820, 932, 901, 934, 1290, 1330, 1320, 932, 901, 934, 1290, 1330],
data: this.sumLast,
type: 'line',
color: 'rgb(26, 235, 235)',
},
{
name: '本年完成',
data: [120, 232, 301, 434, 590, 630, 720, 232, 301, 434, 590, 630],
data: this.sigleNow,
yAxisIndex: 1,
type: 'bar',
barWidth: '10%',
barGap: '100%',
barWidth: '20%',
color: 'rgb(24, 144, 255)',
itemStyle: {
normal: {
@ -110,10 +125,10 @@ var option = {
},
{
name: '去年同期',
data: [820, 932, 901, 934, 1290, 1330, 1320, 932, 901, 934, 1290, 1330],
data: this.sigleLast,
yAxisIndex: 1,
type: 'bar',
barWidth: '10%',
barWidth: '20%',
color: 'rgb(26, 235, 235)',
itemStyle: {
normal: {
@ -131,5 +146,32 @@ var option = {
},
],
};
},
},
methods: {
async getData() {
try {
const params = {
param: {
hospitalId: 0,
year: '2020',
},
};
const res = await selResult(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.sigleLast = data.sigleLast;
this.sigleNow = data.sigleNow;
this.sumLast = data.sumLast;
this.sumNow = data.sumNow;
} else {
console.log(msg);
}
} catch (error) {
console.log(error);
}
},
},
};
export default option;
export default mixin;

9
src/components/Statistics/Statistics.vue

@ -5,9 +5,10 @@
</div>
</template>
<script>
import option from './Statistics.js';
import mixin from './Statistics.js';
export default {
name: 'Statistics',
mixins: [mixin],
data() {
return {
width: '',
@ -20,7 +21,6 @@ export default {
let hg = window.innerHeight;
this.width = wh + 'px';
this.height = hg + 'px';
console.log(this.height);
window.onresize = () => {
return (() => {
wh = window.innerWidth;
@ -31,11 +31,12 @@ export default {
};
},
methods: {
drawLine() {
async drawLine() {
// domecharts
let myChart = this.$echarts.init(document.getElementById('myChart'));
//
myChart.setOption(option);
await this.getData();
myChart.setOption(this.option);
},
},
};

21
src/config/api.js

@ -6,22 +6,13 @@
import axios from 'axios';
let { proxyUrl, msgUrl } = require('@/config/setting');
const greenvalley = `${proxyUrl}/greenvalley`;
const page = `${greenvalley}/page`; // 创新平台相关操作
const policy = `${proxyUrl}/policy/policy`; // 创新政策相关接口
const wisdomcar = `${proxyUrl}/wisdomcar`; // 盐湖医院分路径
const statistics = `${wisdomcar}/statistics`; // 盐湖医院相关接口
// websocket基础地址
export const WS_BASE_URL = msgUrl;
// 页面列表查询
export const getPageList = params => axios.post(`${page}/list`, params);
// 查询政策列表
export const selLikePolicy = params => axios.post(`${policy}/selLikePolicy`, params);
// 查询政策详情
export const selPolicy = params => axios.post(`${policy}/selPolicy`, params);
// 申请加入三大平台
export const JoinPlatform = params => axios.post(`${greenvalley}/platform/JoinPlatform`, params);
// 上传附件
export const upload = `${greenvalley}/file/upload`;
// 加入我们
export const joinUs = params => axios.post(`${greenvalley}/PersonApply/joinUs`, params);
// 急救数量统计图数据
export const selResult = params => axios.post(`${statistics}/get/selResult`, params);
// 急救市场分析统计图数据
export const getPointTime = params => axios.post(`${statistics}/getPointTime`, params);

1
src/views/Index/Index.vue

@ -131,6 +131,7 @@ export default {
data() {
return {
nowTime: new Date(),
str: '',
};
},

Loading…
Cancel
Save