Browse Source

后台首页

newMaster
1747191978@qq.com 4 months ago
parent
commit
38c4e06e98
  1. 8
      acupuncture-后台/src/layout/components/Navbar.vue
  2. 2
      acupuncture-后台/src/store/modules/settings.js
  3. 739
      acupuncture-后台/src/views/indexCom/JM.vue
  4. 600
      acupuncture-后台/src/views/indexCom/XGZL.vue
  5. 445
      acupuncture-后台/src/views/indexCom/follow.vue
  6. BIN
      acupuncture-后台/src/views/indexCom/image.png
  7. 254
      acupuncture-后台/src/views/indexCom/index.js
  8. 646
      acupuncture-后台/src/views/indexCom/patient.vue
  9. 319
      acupuncture-后台/src/views/indexCom/query.vue

8
acupuncture-后台/src/layout/components/Navbar.vue

@ -15,7 +15,7 @@
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
<div class="right-menu">
<template v-if="device !== 'mobile'">
<!-- <template v-if="device !== 'mobile'">
<search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom">
@ -31,7 +31,7 @@
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</template>
</template> -->
<el-dropdown
class="avatar-container right-menu-item hover-effect"
@ -45,9 +45,9 @@
<router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link>
<el-dropdown-item @click.native="setting = true">
<!-- <el-dropdown-item @click.native="setting = true">
<span>布局设置</span>
</el-dropdown-item>
</el-dropdown-item> -->
<el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>

2
acupuncture-后台/src/store/modules/settings.js

@ -13,7 +13,7 @@ const {
const storageSetting = JSON.parse(localStorage.getItem("layout-setting")) || "";
const state = {
title: "",
theme: storageSetting.theme || "#fff",
theme: storageSetting.theme || "#5698FF",
sideTheme: storageSetting.sideTheme || sideTheme,
showSettings: showSettings,
topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,

739
acupuncture-后台/src/views/indexCom/JM.vue

@ -1,54 +1,76 @@
<template>
<div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">病种排名</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="diagnose" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">体型分布</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="system" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">体质分布</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="physique" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">体态评估TAPS</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="posture" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
<div class="app-container">
<div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">病种排名</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="diagnose" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">体型分布</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="system" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">体质分布</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="physique" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">体态评估TAPS</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="posture" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">失眠评估PHQ-9</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="agrypnia" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">焦虑HAMD-24</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="anxiety" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
<!-- <div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
@ -73,335 +95,326 @@
</el-card>
</div>
</div>
</div>
</div>
</div> -->
</div>
</template>
<script>
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize";
import {
zlInfo
} from "@/api/indexCom.js";
import {
diagnoseEcharts,
systemEcharts,
physiqueEcharts,
postureEcharts,
agrypniaEcharts,
anxietyEcharts,
} from "./index";
export default {
name: "Post",
props: ["title"],
mixins: [resize],
data() {
return {
queryParams: {
param: {
startTime: "",
endTime: "",
},
},
loading: false,
diagnoseValue: null, //
systemValue: null, //
physiqueValue: null, //
postureValue: null, //
agrypniaValue: null, //
anxietyValue: null, //
//
systemObj: {
yxfpz: "隐形肥胖型", //
zfgdx: "脂肪过多型", //
fpx: "肥胖型", //
jrbzx: "肌肉不足型", //
jkjcx: "健康匀称型", //
czjrx: "超重肌肉型", //
xsx: "消瘦型", //
dzfx: "低脂肪型", //
ydyx: "运动员型", //
},
//
physiqueObj: {
phz: "平和质", //
qxz: "气虚质", //
yangxz: "阳虚质", //
yinxz: "阴虚质", //
tsz: "痰湿质", //湿
srz: "湿热质", //湿
xyz: "血瘀质", //
qyz: "气郁质", //
tlz: "特禀质", //
},
};
},
created() {
// this.Linepatient();
this.getData();
},
methods: {
statistics(_data, _type) {
this.initial(_data, _type); //
this.loading = true;
this.getData(); //
},
//
async getData() {
try {
await zlInfo(this.queryParams).then((res) => {
const {
jlfb,
smfb,
sort,
ttfb,
txfb,
zytz
} = res.data;
//
this.diagnoseValue = sort.sort((a, b) => a.total - b.total);
this.handleDiagnose();
//
this.systemValue = [];
delete txfb.total;
for (let key in txfb) {
let data = {
name: this.systemObj[key],
value: txfb[key],
};
this.systemValue.push(data);
}
this.handleSystem();
//
this.physiqueValue = [];
delete zytz.total;
for (let key in zytz) {
let data = {
name: this.physiqueObj[key],
value: zytz[key],
};
this.physiqueValue.push(data);
}
this.handlePhysique();
//
this.postureValue = [{
value: ttfb?.score1 || 0,
name: "1分",
},
{
value: ttfb?.score2 || 0,
name: "2分",
},
{
value: ttfb?.score3 || 0,
name: "3分",
},
{
value: ttfb?.score4 || 0,
name: "4分",
},
{
value: ttfb?.score5 || 0,
name: "5分",
},
];
this.handlePosture();
// PHQ-9
this.agrypniaValue = [];
for (let key in smfb) {
this.agrypniaValue.push(smfb[key]);
}
this.handleAgrypnia();
//
this.anxietyValue = [];
for (let key in jlfb) {
this.anxietyValue.push(jlfb[key]);
}
this.handleAnxiety();
this.loading = false;
});
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize";
import { zlInfo } from "@/api/indexCom.js";
import {
diagnoseEcharts,
systemEcharts,
physiqueEcharts,
postureEcharts,
agrypniaEcharts,
anxietyEcharts,
} from "./index";
export default {
name: "Post",
props: ["title"],
mixins: [resize],
data() {
return {
queryParams: {
param: {
startTime: "",
endTime: "",
},
},
} catch (e) {
console.log('诊疗信息', e)
}
},
//
handleDiagnose() {
diagnoseEcharts.series[0].data = this.diagnoseValue?.map((item) => {
return item.total;
});
diagnoseEcharts.yAxis.data = this.diagnoseValue?.map((item) => {
return item.type;
});
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("diagnose"), null, {
height: 300,
});
myChart.setOption(diagnoseEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleSystem() {
systemEcharts.series[0].data = this.systemValue?.map((item) => {
return item.value;
});
systemEcharts.xAxis.data = this.systemValue?.map((item) => {
return item.name;
});
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("system"), null, {
height: 300,
});
myChart.setOption(systemEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handlePhysique() {
physiqueEcharts.series[0].data = this.physiqueValue?.map((item) => {
return item.value;
});
physiqueEcharts.xAxis.data = this.physiqueValue?.map((item) => {
return item.name;
});
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("physique"), null, {
height: 300,
});
myChart.setOption(physiqueEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handlePosture() {
postureEcharts.series[0].data = this.postureValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("posture"), null, {
height: 300,
});
myChart.setOption(postureEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");
_data[1] = this.$moment(_data[1]).format("YYYY-MM-DD");
this.queryParams.param = {
startTime: _data[0] + " " + "00:00:00",
endTime: _data[1] + " " + "23:59:59",
};
},
//
handleAgrypnia() {
agrypniaEcharts.series[0].data = this.agrypniaValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("agrypnia"), null, {
height: 300,
});
myChart.setOption(agrypniaEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleAnxiety() {
anxietyEcharts.series[0].data = this.anxietyValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("anxiety"), null, {
height: 300,
});
myChart.setOption(anxietyEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
getRenew() {
this.handleDiagnose();
this.handleSystem();
this.handlePhysique();
this.handlePosture();
this.handleAgrypnia();
this.handleAnxiety();
},
},
};
loading: false,
diagnoseValue: null, //
systemValue: null, //
physiqueValue: null, //
postureValue: null, //
agrypniaValue: null, //
anxietyValue: null, //
//
systemObj: {
yxfpz: "隐形肥胖型", //
zfgdx: "脂肪过多型", //
fpx: "肥胖型", //
jrbzx: "肌肉不足型", //
jkjcx: "健康匀称型", //
czjrx: "超重肌肉型", //
xsx: "消瘦型", //
dzfx: "低脂肪型", //
ydyx: "运动员型", //
},
//
physiqueObj: {
phz: "平和质", //
qxz: "气虚质", //
yangxz: "阳虚质", //
yinxz: "阴虚质", //
tsz: "痰湿质", //湿
srz: "湿热质", //湿
xyz: "血瘀质", //
qyz: "气郁质", //
tlz: "特禀质", //
},
};
},
created() {
// this.Linepatient();
this.getData();
},
methods: {
statistics(_data, _type) {
this.initial(_data, _type); //
this.loading = true;
this.getData(); //
},
//
async getData() {
try {
await zlInfo(this.queryParams).then((res) => {
const { jlfb, smfb, sort, ttfb, txfb, zytz } = res.data;
//
this.diagnoseValue = sort.sort((a, b) => a.total - b.total);
this.handleDiagnose();
//
this.systemValue = [];
delete txfb.total;
for (let key in txfb) {
let data = {
name: this.systemObj[key],
value: txfb[key] || 0,
};
this.systemValue.push(data);
}
this.handleSystem();
//
this.physiqueValue = [];
delete zytz.total;
for (let key in zytz) {
let data = {
name: this.physiqueObj[key],
value: zytz[key] || 0,
};
this.physiqueValue.push(data);
}
this.handlePhysique();
//
this.postureValue = [
{
value: ttfb?.score1 || 0,
name: "1分",
},
{
value: ttfb?.score2 || 0,
name: "2分",
},
{
value: ttfb?.score3 || 0,
name: "3分",
},
{
value: ttfb?.score4 || 0,
name: "4分",
},
{
value: ttfb?.score5 || 0,
name: "5分",
},
];
this.handlePosture();
// PHQ-9
this.agrypniaValue = [];
for (let key in smfb) {
this.agrypniaValue.push(smfb[key]);
}
this.handleAgrypnia();
//
this.anxietyValue = [];
for (let key in jlfb) {
this.anxietyValue.push(jlfb[key]);
}
this.handleAnxiety();
this.loading = false;
});
} catch (e) {
console.log("诊疗信息", e);
}
},
//
handleDiagnose() {
diagnoseEcharts.series[0].data = this.diagnoseValue?.map((item) => {
return item.total;
});
diagnoseEcharts.yAxis.data = this.diagnoseValue?.map((item) => {
return item.type;
});
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("diagnose"), null, {
height: 300,
});
myChart.setOption(diagnoseEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleSystem() {
systemEcharts.series[0].data = this.systemValue?.map((item) => {
return item.value;
});
systemEcharts.xAxis.data = this.systemValue?.map((item) => {
return item.name;
});
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("system"), null, {
height: 300,
});
myChart.setOption(systemEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handlePhysique() {
physiqueEcharts.series[0].data = this.physiqueValue?.map((item) => {
return item.value;
});
physiqueEcharts.xAxis.data = this.physiqueValue?.map((item) => {
return item.name;
});
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("physique"), null, {
height: 300,
});
myChart.setOption(physiqueEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handlePosture() {
postureEcharts.series[0].data = this.postureValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("posture"), null, {
height: 300,
});
myChart.setOption(postureEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");
_data[1] = this.$moment(_data[1]).format("YYYY-MM-DD");
this.queryParams.param = {
startTime: _data[0] + " " + "00:00:00",
endTime: _data[1] + " " + "23:59:59",
};
},
//
handleAgrypnia() {
agrypniaEcharts.series[0].data = this.agrypniaValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("agrypnia"), null, {
height: 300,
});
myChart.setOption(agrypniaEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleAnxiety() {
anxietyEcharts.series[0].data = this.anxietyValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("anxiety"), null, {
height: 300,
});
myChart.setOption(anxietyEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
getRenew() {
this.handleDiagnose();
this.handleSystem();
this.handlePhysique();
this.handlePosture();
this.handleAgrypnia();
this.handleAnxiety();
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
>>>.el-card__body {
padding: 10px 0 !important;
}
>>> .el-card__body {
padding: 10px 0 !important;
}
.dis {
display: flex;
}
.dis {
display: flex;
}
.header-title {
font-size: 18px;
}
.header-title {
font-size: 18px;
}
.title-box {
padding: 10px 20px;
border-bottom: 1px solid #dfe6ec;
}
.title-box {
padding: 10px 20px;
border-bottom: 1px solid #dfe6ec;
}
.dian-box {
align-items: center;
}
.dian-box {
align-items: center;
}
.dian {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
margin: 0 10px;
}
.dian {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
margin: 0 10px;
}
.title-box {
justify-content: space-between;
}
.title-box {
justify-content: space-between;
}
.>>>.el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
. >>> .el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
>>>.el-radio__input {
display: none;
}
>>> .el-radio__input {
display: none;
}
>>>.el-radio__label {
padding-left: 5px;
}
>>> .el-radio__label {
padding-left: 5px;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.title {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>

600
acupuncture-后台/src/views/indexCom/XGZL.vue

@ -1,28 +1,28 @@
<template>
<div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">治疗类型分布</span>
<div class="dis">
<div class="dian-box dis">
<div class="dian-box dis">
<span class="dian" style="background: #91CC75"></span>
中西医结合
</div>
<span class="dian" style="background: #5470C6"></span>
纯中医
</div>
</div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="healType" style="width: 100%"></div>
</div>
</el-card>
</div>
<!-- <div style="flex: 1; margin-right: 20px">
<div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">治疗类型分布</span>
<div class="dis">
<div class="dian-box dis">
<div class="dian-box dis">
<span class="dian" style="background: #c6a268"></span>
中西医结合
</div>
<span class="dian" style="background: #d8d8d8"></span>
纯中医
</div>
</div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="healType" style="width: 100%"></div>
</div>
</el-card>
</div>
<!-- <div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">病种方法分布</span>
@ -45,51 +45,50 @@
</div>
</el-card>
</div> -->
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">治疗效果</span>
<div class="dis">
<div class="dian-box dis">
<div class="dian-box dis">
<span class="dian" style="background: #5C7BD9"></span>
治愈
</div>
<div class="dian-box dis">
<span class="dian" style="background: #91CC75"></span>
显效
</div>
<div class="dian-box dis">
<span class="dian" style="background: #FAC858"></span>
好转
</div>
<div class="dian-box dis">
<span class="dian" style="background: #EE6666"></span>
无效
</div>
</div>
</div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="effect" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">诊疗费用分布</span>
<div class="dis">
</div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="cost" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
<!-- <div class="app-container">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">治疗效果</span>
<div class="dis">
<div class="dian-box dis">
<div class="dian-box dis">
<span class="dian" style="background: #c6a268"></span>
治愈
</div>
<div class="dian-box dis">
<span class="dian" style="background: #906c4a"></span>
显效
</div>
<div class="dian-box dis">
<span class="dian" style="background: #70483e"></span>
好转
</div>
<div class="dian-box dis">
<span class="dian" style="background: #c7bdb1"></span>
无效
</div>
</div>
</div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="effect" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">诊疗费用分布</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="cost" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
<!-- <div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
@ -135,252 +134,255 @@
</div>
</div>
</div> -->
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize";
import {
zlType
} from "@/api/indexCom.js";
import {
healTypeEcharts,
diseaseMethodEcharts,
effectEcharts,
costEcharts
} from "./index";
export default {
name: "Post",
props: ["title"],
mixins: [resize],
data() {
return {
queryParams: {
param: {
startTime: "",
endTime: "",
},
},
loading: false,
healTypeValue: null, //
diseaseMethod: null, //
effectValue: null, //
costValue: null, //
effectObj: {
"zy": "治愈", //
"xx": "显效", //
"hz": "好转", //
"wx": "无效" //
}
};
},
created() {
// this.Linepatient();
this.getData();
},
methods: {
statistics(_data, _type) {
this.initial(_data, _type); //
this.loading = true;
this.getData(); //
},
//
async getData() {
try {
await zlType(this.queryParams).then((res) => {
const {
bzfffb,
bzxwfb,
zlfy,
zllxtj,
zlxwfb
} = res.data;
//
this.healTypeValue = [{
value: zllxtj?.zxyjh || 0,
name: "中西医结合",
},
{
value: zllxtj?.czy || 0,
name: "纯中医",
},
]
this.handleHealType();
//
// let diseaseMethod = []
// let index = 0
// for(let i in bzfffb){
// for(let k in bzfffb[i]){
// console.log(bzfffb[i][k])
// }
// index ++
// }
// this.handleDiseaseMethod()
//
this.effectValue = [{
name: '治愈',
value: zlxwfb?.zy || 0
},
{
name: '显效',
value: zlxwfb?.xx || 0
},
{
name: '好转',
value: zlxwfb?.hz || 0
},
{
name: '无效',
value: zlxwfb?.wx || 0
}
]
this.handleEffect()
//
this.costValue = [zlfy.score1, zlfy.score2, zlfy.score3, zlfy.score4, zlfy.score5]
this.handleCost()
this.loading = false;
});
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize";
import { zlType } from "@/api/indexCom.js";
import {
healTypeEcharts,
diseaseMethodEcharts,
effectEcharts,
costEcharts,
} from "./index";
export default {
name: "Post",
props: ["title"],
mixins: [resize],
data() {
return {
queryParams: {
param: {
startTime: "",
endTime: "",
},
},
loading: false,
healTypeValue: null, //
diseaseMethod: null, //
effectValue: null, //
costValue: null, //
effectObj: {
zy: "治愈", //
xx: "显效", //
hz: "好转", //
wx: "无效", //
},
};
},
created() {
// this.Linepatient();
this.getData();
},
methods: {
statistics(_data, _type) {
this.initial(_data, _type); //
this.loading = true;
this.getData(); //
},
//
async getData() {
try {
await zlType(this.queryParams).then((res) => {
const { bzfffb, bzxwfb, zlfy, zllxtj, zlxwfb } = res.data;
//
this.healTypeValue = [
{
value: zllxtj?.zxyjh || 0,
name: "中西医结合",
},
{
value: zllxtj?.czy || 0,
name: "纯中医",
},
];
this.handleHealType();
//
// let diseaseMethod = []
// let index = 0
// for(let i in bzfffb){
// for(let k in bzfffb[i]){
// console.log(bzfffb[i][k])
// }
// index ++
// }
// this.handleDiseaseMethod()
} catch (e) {
console.log('治疗类型', e)
}
},
//
handleHealType() {
healTypeEcharts.series[0].data = this.healTypeValue
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("healType"), null, {
height: 300,
});
myChart.setOption(healTypeEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleDiseaseMethod() {
// diseaseMethodEcharts.series[0].data = this.diseaseMethod
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("diseaseMethod"), null, {
height: 300,
});
myChart.setOption(diseaseMethodEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleEffect() {
effectEcharts.series[0].data = this.effectValue
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("effect"), null, {
height: 300,
});
myChart.setOption(effectEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleCost() {
costEcharts.series[0].data = this.costValue
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("cost"), null, {
height: 300,
});
myChart.setOption(costEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");
_data[1] = this.$moment(_data[1]).format("YYYY-MM-DD");
this.queryParams.param = {
startTime: _data[0] + " " + "00:00:00",
endTime: _data[1] + " " + "23:59:59",
};
},
//
getRenew() {
this.handleHealType();
this.handleEffect();
this.handleCost()
},
},
};
//
this.effectValue = [
{
name: "治愈",
value: zlxwfb?.zy || 0,
},
{
name: "显效",
value: zlxwfb?.xx || 0,
},
{
name: "好转",
value: zlxwfb?.hz || 0,
},
{
name: "无效",
value: zlxwfb?.wx || 0,
},
];
this.handleEffect();
//
this.costValue = [
zlfy.score1,
zlfy.score2,
zlfy.score3,
zlfy.score4,
zlfy.score5,
];
this.handleCost();
this.loading = false;
});
} catch (e) {
console.log("治疗类型", e);
}
},
//
handleHealType() {
healTypeEcharts.series[0].data = this.healTypeValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("healType"), null, {
height: 300,
});
myChart.setOption(healTypeEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleDiseaseMethod() {
// diseaseMethodEcharts.series[0].data = this.diseaseMethod
this.$nextTick(() => {
var myChart = echarts.init(
document.getElementById("diseaseMethod"),
null,
{
height: 300,
}
);
myChart.setOption(diseaseMethodEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleEffect() {
effectEcharts.series[0].data = this.effectValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("effect"), null, {
height: 300,
});
myChart.setOption(effectEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleCost() {
costEcharts.series[0].data = this.costValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("cost"), null, {
height: 300,
});
myChart.setOption(costEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");
_data[1] = this.$moment(_data[1]).format("YYYY-MM-DD");
this.queryParams.param = {
startTime: _data[0] + " " + "00:00:00",
endTime: _data[1] + " " + "23:59:59",
};
},
//
getRenew() {
this.handleHealType();
this.handleEffect();
this.handleCost();
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
>>>.el-card__body {
padding: 10px 0 !important;
}
>>> .el-card__body {
padding: 10px 0 !important;
}
.dis {
display: flex;
}
.dis {
display: flex;
}
.header-title {
font-size: 18px;
}
.header-title {
font-size: 18px;
}
.title-box {
padding: 10px 20px;
border-bottom: 1px solid #dfe6ec;
}
.title-box {
padding: 10px 20px;
border-bottom: 1px solid #dfe6ec;
}
.dian-box {
align-items: center;
}
.dian-box {
align-items: center;
}
.dian {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
margin: 0 10px;
}
.dian {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
margin: 0 10px;
}
.title-box {
justify-content: space-between;
}
.title-box {
justify-content: space-between;
}
.>>>.el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
. >>> .el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
>>>.el-radio__input {
display: none;
}
>>> .el-radio__input {
display: none;
}
>>>.el-radio__label {
padding-left: 5px;
}
>>> .el-radio__label {
padding-left: 5px;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.title {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>

445
acupuncture-后台/src/views/indexCom/follow.vue

@ -1,224 +1,261 @@
<template>
<div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1;margin-right: 20px;">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">随访队列分布</span>
<div class="dis"></div>
</div>
<!-- 患者总数统计图 -->
<div style="height: 300px" v-loading="loading">
<div id="follow" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1;">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">失访原因分布</span>
<div class="dis"></div>
</div>
<!-- 患者总数统计图 -->
<div style="height: 300px" v-loading="loading">
<div id="lossFollow" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
</div>
<div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">随访队列分布</span>
<div class="dis"></div>
</div>
<!-- 患者总数统计图 -->
<div style="height: 300px" v-loading="loading">
<div id="follow" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">失访原因分布</span>
<div class="dis"></div>
</div>
<!-- 患者总数统计图 -->
<div style="height: 300px" v-loading="loading">
<div id="lossFollow" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize";
import {
sffb,
sftj
} from "@/api/indexCom.js";
import {
followEcharts,
lossFollowEcharts
} from "./index";
export default {
name: "Post",
props: ["title"],
mixins: [resize],
data() {
return {
loading: false,
followValue: [], //
lossFollowValue: [], //
queryParams: {
param: {
startTime: "",
endTime: "",
},
},
};
},
created() {
// this.Linepatient()
this.getData();
},
methods: {
statistics(_data, _type) {
this.initial(_data, _type); //
this.loading = true;
this.getData(); //
},
//
async getData() {
try {
this.followValue = {}
await sffb(this.queryParams).then((res) => {
res.data.forEach(i => {
let data = [i.dsf, i.ljsf, i.cqsf, i.zc]
this.followValue[i.queueName] = data
})
this.handleFollow()
});
await sftj(this.queryParams).then((res) => {
this.lossFollowValue = res.data
this.handleLossFollow()
});
this.loading = false;
} catch (e) {
console.log('随访', e)
}
},
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize";
import { sffb, sftj } from "@/api/indexCom.js";
import { followEcharts, lossFollowEcharts } from "./index";
export default {
name: "Post",
props: ["title"],
mixins: [resize],
data() {
return {
loading: false,
followValue: [], //
lossFollowValue: [], //
queryParams: {
param: {
startTime: "",
endTime: "",
},
},
};
},
created() {
// this.Linepatient()
this.getData();
},
methods: {
statistics(_data, _type) {
this.initial(_data, _type); //
this.loading = true;
this.getData(); //
},
//
async getData() {
try {
this.followValue = {};
await sffb(this.queryParams).then((res) => {
res.data.forEach((i) => {
let data = [i.dsf, i.ljsf, i.cqsf, i.zc];
this.followValue[i.queueName] = data;
});
this.handleFollow();
});
await sftj(this.queryParams).then((res) => {
this.lossFollowValue = res.data;
this.handleLossFollow();
});
this.loading = false;
} catch (e) {
console.log("随访", e);
}
},
//
handleFollow() {
followEcharts.series = []
for (let key in this.followValue) {
let series = {
name: key,
data: this.followValue[key],
type: "bar",
barMaxWidth: 24, //
itemStyle: {
normal: {
// []
barBorderRadius: [50, 50, 0, 0],
},
},
}
followEcharts.series.push(series)
}
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("follow"), null, {
height: 300,
});
myChart.setOption(followEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
// 访
handleLossFollow() {
lossFollowEcharts.series[0].data = this.lossFollowValue?.map((item) => {
return item.num;
});
lossFollowEcharts.xAxis.data = this.lossFollowValue?.map((item) => {
return item.reason;
});
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("lossFollow"), null, {
height: 300,
});
myChart.setOption(lossFollowEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");
_data[1] = this.$moment(_data[1]).format("YYYY-MM-DD");
this.queryParams.param = {
startTime: _data[0] + " " + "00:00:00",
endTime: _data[1] + " " + "23:59:59",
};
},
//
getRenew() {
this.handleFollow();
this.handleLossFollow()
},
},
};
//
handleFollow() {
followEcharts.series = [];
let colorArr = [
"#C7BDB1",
"#C6A268",
"#906C4A",
"#70483E",
"#582518",
"#C7BDB1",
"#C6A268",
"#906C4A",
"#70483E",
"#582518",
"#C7BDB1",
"#C6A268",
"#906C4A",
"#70483E",
"#582518",
"#C7BDB1",
"#C6A268",
"#906C4A",
"#70483E",
"#582518",
"#C7BDB1",
"#C6A268",
"#906C4A",
"#70483E",
"#582518",
"#C7BDB1",
"#C6A268",
"#906C4A",
"#70483E",
"#582518",
"#C7BDB1",
"#C6A268",
"#906C4A",
"#70483E",
"#582518",
"#C7BDB1",
"#C6A268",
"#906C4A",
"#70483E",
"#582518",
];
let index = 0;
for (let key in this.followValue) {
let series = {
name: key,
data: this.followValue[key],
type: "bar",
barMaxWidth: 24, //
color: colorArr[index],
};
followEcharts.series.push(series);
index++;
}
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("follow"), null, {
height: 300,
});
myChart.setOption(followEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
// 访
handleLossFollow() {
lossFollowEcharts.series[0].data = this.lossFollowValue?.map((item) => {
return item.num;
});
lossFollowEcharts.xAxis.data = this.lossFollowValue?.map((item) => {
return item.reason;
});
this.$nextTick(() => {
var myChart = echarts.init(
document.getElementById("lossFollow"),
null,
{
height: 300,
}
);
myChart.setOption(lossFollowEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");
_data[1] = this.$moment(_data[1]).format("YYYY-MM-DD");
this.queryParams.param = {
startTime: _data[0] + " " + "00:00:00",
endTime: _data[1] + " " + "23:59:59",
};
},
//
getRenew() {
this.handleFollow();
this.handleLossFollow();
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
>>>.el-card__body {
padding: 10px 0 !important;
}
>>> .el-card__body {
padding: 10px 0 !important;
}
.dis {
display: flex;
}
.dis {
display: flex;
}
.header-title {
font-size: 18px;
}
.header-title {
font-size: 18px;
}
.title-box {
padding: 10px 20px;
border-bottom: 1px solid #dfe6ec;
}
.title-box {
padding: 10px 20px;
border-bottom: 1px solid #dfe6ec;
}
.dian-box {
align-items: center;
}
.dian-box {
align-items: center;
}
.dian {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
margin: 0 10px;
}
.dian {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
margin: 0 10px;
}
.title-box {
justify-content: space-between;
}
.title-box {
justify-content: space-between;
}
.>>>.el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
. >>> .el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
>>>.el-radio__input {
display: none;
}
>>> .el-radio__input {
display: none;
}
>>>.el-radio__label {
padding-left: 5px;
}
>>> .el-radio__label {
padding-left: 5px;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.title {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>

BIN
acupuncture-后台/src/views/indexCom/image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

254
acupuncture-后台/src/views/indexCom/index.js

@ -23,7 +23,7 @@ export const HZXX = {
bottom: "0%",
containLabel: true,
},
color: ["#4f8bff", "#ffcd6c", "#00d1a1", "#a794fe"],
color: ["#C6A268"],
graphic: {
type: "text",
left: "center",
@ -76,7 +76,7 @@ export const gende = {
bottom: "0%",
containLabel: true,
},
color: ["#4F8BFF", "#FE4943"],
color: ["#70483E", "#C7BDB1"],
series: [
{
type: "pie",
@ -85,14 +85,14 @@ export const gende = {
label: {
show: false,
position: "center",
normal:{
show:true,
position:'inner',
formatter: '{b}:{c}个',
textStyle:{
color:'#fff'
}
},
normal: {
show: true,
position: "inner",
formatter: "{b}:{c}个",
textStyle: {
color: "#fff",
},
},
},
labelLine: {
show: false,
@ -127,7 +127,7 @@ export const ageEcharts = {
},
xAxis: {
type: "category",
data: ["<40岁","41-50岁","51-60岁","61-70岁","71-80岁",">80岁",],
data: ["<40岁", "41-50岁", "51-60岁", "61-70岁", "71-80岁", ">80岁"],
},
grid: {
top: "12%",
@ -153,20 +153,20 @@ export const ageEcharts = {
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
color: function (params)
{
var colorList = ['#FF9966', '#66B3FF', '#99FF99','#FFCC66','#FF6699','#CCCCCC'];
return colorList[params.dataIndex]
},
},
},
color: "#C6A268",
// itemStyle: {
// normal: {
// //这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
// barBorderRadius: [50, 50, 0, 0],
// color: function (params) {
// var colorList = [
// "#C6A268",
// ];
// return colorList[params.dataIndex];
// },
// },
// },
},
],
};
// 病种分布
@ -195,7 +195,7 @@ export const diseaseEcharts = {
},
xAxis: {
type: "category",
data: ["<40岁","41-50岁","51-60岁","61-70岁","71-80岁",">80岁",],
data: ["<40岁", "41-50岁", "51-60岁", "61-70岁", "71-80岁", ">80岁"],
},
grid: {
top: "12%",
@ -221,15 +221,8 @@ export const diseaseEcharts = {
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
color: "#4f8bff",
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
color: "#70483E",
},
],
};
@ -259,16 +252,15 @@ export const diagnoseEcharts = {
},
},
xAxis: {
name: "数量( 个 )",
type: "value",
minInterval: 1,
splitLine: {
show: true,
lineStyle: {
type: "dashed",
},
},
name: "数量( 个 )",
type: "value",
minInterval: 1,
splitLine: {
show: true,
lineStyle: {
type: "dashed",
},
},
},
grid: {
top: "12%",
@ -278,8 +270,8 @@ export const diagnoseEcharts = {
containLabel: true,
},
yAxis: {
type: "category",
data: [],
type: "category",
data: [],
},
series: [
{
@ -287,9 +279,8 @@ export const diagnoseEcharts = {
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
color: "#4f8bff",
color: "#906C4A",
},
],
};
// 体系
@ -344,15 +335,14 @@ export const systemEcharts = {
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
color: "#4f8bff",
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
color: "#C6A268",
// itemStyle: {
// normal: {
// //这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
// barBorderRadius: [50, 50, 0, 0],
// },
// },
},
],
};
// 体质
@ -407,15 +397,14 @@ export const physiqueEcharts = {
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
color: "#4f8bff",
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
color: "#70483E",
// itemStyle: {
// normal: {
// //这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
// barBorderRadius: [50, 50, 0, 0],
// },
// },
},
],
};
// 体态
@ -441,7 +430,7 @@ export const postureEcharts = {
bottom: "0%",
containLabel: true,
},
color: ["#4f8bff", "#ffcd6c", "#00d1a1", "#a794fe","#EE6666"],
color: ["#C7BDB1", "#C6A268", "#906C4A", "#70483E", "#582518"],
series: [
{
type: "pie",
@ -450,14 +439,14 @@ export const postureEcharts = {
label: {
show: false,
position: "center",
normal:{
show:true,
position:'inner',
formatter: '{b}:{c}个',
textStyle:{
color:'#fff'
}
},
normal: {
show: true,
position: "inner",
formatter: "{b}:{c}个",
textStyle: {
color: "#fff",
},
},
},
labelLine: {
show: false,
@ -492,8 +481,7 @@ export const agrypniaEcharts = {
},
xAxis: {
type: "category",
data: ['0~4分', '5~9分', '10~14分','15~19分','20~27分'],
data: ["0~4分", "5~9分", "10~14分", "15~19分", "20~27分"],
},
grid: {
top: "12%",
@ -519,15 +507,14 @@ export const agrypniaEcharts = {
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
color: "#4f8bff",
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
color: "#C6A268",
// itemStyle: {
// normal: {
// //这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
// barBorderRadius: [50, 50, 0, 0],
// },
// },
},
],
};
// 焦虑度
@ -556,8 +543,7 @@ export const anxietyEcharts = {
},
xAxis: {
type: "category",
data: ['<8分', '8~20分','21~35分','>35分'],
data: ["<8分", "8~20分", "21~35分", ">35分"],
},
grid: {
top: "12%",
@ -583,15 +569,14 @@ export const anxietyEcharts = {
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
color: "#4f8bff",
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
color: "#70483E",
// itemStyle: {
// normal: {
// //这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
// barBorderRadius: [50, 50, 0, 0],
// },
// },
},
],
};
// -------- 治疗类型 --------
@ -618,7 +603,7 @@ export const healTypeEcharts = {
bottom: "0%",
containLabel: true,
},
color: ["#91CC75", "#5470C6"],
color: ["#C6A268", "#D8D8D8"],
series: [
{
type: "pie",
@ -627,14 +612,14 @@ export const healTypeEcharts = {
label: {
show: false,
position: "center",
normal:{
show:true,
position:'inner',
formatter: '{b}:{c}个',
textStyle:{
color:'#fff'
}
},
normal: {
show: true,
position: "inner",
formatter: "{b}:{c}个",
textStyle: {
color: "#fff",
},
},
},
labelLine: {
show: false,
@ -669,8 +654,7 @@ export const diseaseMethodEcharts = {
},
xAxis: {
type: "category",
data: ['肥胖症', '失眠症','其他'],
data: ["肥胖症", "失眠症", "其他"],
},
grid: {
top: "12%",
@ -693,7 +677,7 @@ export const diseaseMethodEcharts = {
series: [
{
name: "数量1:",
data: [1,2],
data: [1, 2],
type: "bar",
barMaxWidth: 24, //柱图宽度
itemStyle: {
@ -705,7 +689,7 @@ export const diseaseMethodEcharts = {
},
{
name: "数量2:",
data: [1,3],
data: [1, 3],
type: "bar",
barMaxWidth: 24, //柱图宽度
itemStyle: {
@ -740,7 +724,7 @@ export const effectEcharts = {
bottom: "0%",
containLabel: true,
},
color: ["#5C7BD9", "#91CC75",'#FAC858','#EE6666'],
color: ["#C6A268", "#906C4A", "#70483E", "#C7BDB1"],
series: [
{
type: "pie",
@ -749,14 +733,14 @@ export const effectEcharts = {
label: {
show: false,
position: "center",
normal:{
show:true,
position:'inner',
formatter: '{b}:{c}个',
textStyle:{
color:'#fff'
}
},
normal: {
show: true,
position: "inner",
formatter: "{b}:{c}个",
textStyle: {
color: "#fff",
},
},
},
labelLine: {
show: false,
@ -765,7 +749,7 @@ export const effectEcharts = {
},
],
};
// 诊疗费
// 诊疗费
export const costEcharts = {
tooltip: {
trigger: "axis",
@ -791,7 +775,7 @@ export const costEcharts = {
},
xAxis: {
type: "category",
data: ['<300元','300 ~ 900元','900 ~ 2000元','2000 ~ 5000元','>5000元'],
data: ["<300元", "300 ~ 900元", "900 ~ 2000元", "2000 ~ 5000元", ">5000元"],
},
grid: {
top: "12%",
@ -817,14 +801,14 @@ export const costEcharts = {
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
color: "#C6A268",
// itemStyle: {
// normal: {
// //这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
// barBorderRadius: [50, 50, 0, 0],
// },
// },
},
],
};
// -------- 随访 --------
@ -853,7 +837,7 @@ export const followEcharts = {
},
xAxis: {
type: "category",
data: ['待随访','临近随访','超期随访','正常随访'],
data: ["待随访", "临近随访", "超期随访", "正常随访"],
},
grid: {
top: "12%",
@ -873,9 +857,9 @@ export const followEcharts = {
},
},
},
series: [
],
series: [],
};
// 失访原因
export const lossFollowEcharts = {
tooltip: {
trigger: "axis",
@ -901,7 +885,7 @@ export const lossFollowEcharts = {
},
xAxis: {
type: "category",
data: ['<300元','300 ~ 900元','900 ~ 2000元','2000 ~ 5000元','>5000元'],
data: ["<300元", "300 ~ 900元", "900 ~ 2000元", "2000 ~ 5000元", ">5000元"],
},
grid: {
top: "12%",
@ -927,13 +911,13 @@ export const lossFollowEcharts = {
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
}
color: "#70483E",
// itemStyle: {
// normal: {
// //这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
// barBorderRadius: [50, 50, 0, 0],
// },
// },
},
],
};

646
acupuncture-后台/src/views/indexCom/patient.vue

@ -1,58 +1,78 @@
<template>
<div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">患者总数</span>
<div class="dis"></div>
</div>
<!-- 患者总数统计图 -->
<div style="height: 300px" v-loading="loading">
<div id="patienty" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1;margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">性别数量</span>
<div class="dis">
<div class="dian-box dis">
<div class="dian-box dis">
<span class="dian" style="background: #4f8bff"></span>
</div>
<span class="dian" style="background: #fe4943"></span>
</div>
</div>
</div>
<!-- 性别统计图 -->
<div style="height: 300px" v-loading="loading">
<div id="gender" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">年龄分布</span>
<div class="dis"></div>
</div>
<!-- 患者总数统计图 -->
<div style="height: 300px" v-loading="loading">
<div id="age" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1;">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">既往病种分布</span>
<div class="dis">
<!-- <div class="dian-box dis">
<div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">患者总数</span>
<div class="dis"></div>
</div>
<!-- 患者总数统计图 -->
<div
style="
height: 300px;
display: flex;
align-items: center;
justify-content: center;
"
v-loading="loading"
>
<div class="div-hz">
<div class="div-hz-icon">
<img src="./image.png" alt="" width="60px" height="60px" />
</div>
<div class="div-hz-num">
<div class="">
{{ HZXXvalue[0].value || 0 }}<span></span>
</div>
<div class="hz-num-title">患者总数</div>
</div>
</div>
<!-- <div id="patienty" style="width: 100%"></div> -->
</div>
</el-card>
</div>
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">性别数量</span>
<div class="dis">
<div class="dian-box dis">
<div class="dian-box dis">
<span class="dian" style="background: #70483e"></span>
</div>
<span class="dian" style="background: #c7bdb1"></span>
</div>
</div>
</div>
<!-- 性别统计图 -->
<div style="height: 300px" v-loading="loading">
<div id="gender" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">年龄分布</span>
<div class="dis"></div>
</div>
<!-- 患者总数统计图 -->
<div style="height: 300px" v-loading="loading">
<div id="age" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">既往病种分布</span>
<div class="dis">
<!-- <div class="dian-box dis">
<div class="dian-box dis">
<span class="dian" style="background: #4f8bff"></span>
@ -60,268 +80,294 @@
<span class="dian" style="background: #ffcd6c"></span>
</div> -->
</div>
</div>
<!-- 既往病种分布 -->
<div style="height: 300px" v-loading="loading">
<div id="disease" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 既往病种分布 -->
<div style="height: 300px" v-loading="loading">
<div id="disease" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize";
import {
patientTotal,
queryByDatePatient
} from "@/api/indexCom.js";
import {
HZXX,
HZXXSJFX,
gende,
ageEcharts,
diseaseEcharts
} from "./index";
export default {
name: "Post",
props: ["title"],
mixins: [resize],
data() {
return {
loading: false,
HZXXvalue: null, //
gendeValue: null, //
ageValue: null, //
diseaseValue: null, //
queryParams: {
param: {
startTime: "",
endTime: "",
},
},
jwbzObj: {
"gxy": "高血压", //
"nxgb": "脑血管病", //
"exzl": "恶性肿瘤", //
"gxb": "冠心病", //
"jsjb": "精神疾病", //
"whsezcky": "胃和十二指肠溃疡", //
"fpz": "肥胖症", //
"gzssz": "骨质疏松症", //
"ycxXtxjb": "遗传性、先天性疾病", //
"tnb": "糖尿病", //尿
"mxfxjb": "慢性肺系疾病", //
"gzxz": "高脂血症", //
"gzjb": "肝脏疾病", //
"gmxjb": "过敏性疾病", //
"gjy": "关节炎", //
"tf": "痛风", //
"sySb": "肾炎、肾病", //
"other": "其他" //
}
};
},
created() {
// this.Linepatient()
this.getData();
},
methods: {
statistics(_data, _type) {
this.initial(_data, _type); //
this.loading = true;
this.getData(); //
},
//
async getData() {
try {
await patientTotal(this.queryParams).then((res) => {
//
this.HZXXvalue = [{
value: res.data.totalPatients,
name: "患者总数"
}, ];
//
this.gendeValue = [{
value: res.data.gender.male,
name: "男"
},
{
value: res.data.gender.female,
name: "女"
}
];
//
let ageValue = res.data.age
this.ageValue = [ageValue.num1, ageValue.num2, ageValue.num3, ageValue.num4, ageValue
.num5, ageValue.num6
]
//
let diseaseValue = res.data.jwbz
this.diseaseValue = []
for (let key in diseaseValue) {
let data = {
name: this.jwbzObj[key],
value: diseaseValue[key]
}
this.diseaseValue.push(data)
}
this.Linepatient(); //
this.handleAge(); //
this.columnar(); //
this.handleDisease(); //
});
this.loading = false;
} catch (e) {
console.log('患者统计', e)
}
},
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize";
import { patientTotal, queryByDatePatient } from "@/api/indexCom.js";
import { HZXX, HZXXSJFX, gende, ageEcharts, diseaseEcharts } from "./index";
export default {
name: "Post",
props: ["title"],
mixins: [resize],
data() {
return {
loading: false,
HZXXvalue: null, //
gendeValue: null, //
ageValue: null, //
diseaseValue: null, //
queryParams: {
param: {
startTime: "",
endTime: "",
},
},
jwbzObj: {
gxy: "高血压", //
nxgb: "脑血管病", //
exzl: "恶性肿瘤", //
gxb: "冠心病", //
jsjb: "精神疾病", //
whsezcky: "胃和十二指肠溃疡", //
fpz: "肥胖症", //
gzssz: "骨质疏松症", //
ycxXtxjb: "遗传性、先天性疾病", //
tnb: "糖尿病", //尿
mxfxjb: "慢性肺系疾病", //
gzxz: "高脂血症", //
gzjb: "肝脏疾病", //
gmxjb: "过敏性疾病", //
gjy: "关节炎", //
tf: "痛风", //
sySb: "肾炎、肾病", //
other: "其他", //
},
};
},
created() {
// this.Linepatient()
this.getData();
},
methods: {
statistics(_data, _type) {
this.initial(_data, _type); //
this.loading = true;
this.getData(); //
},
//
async getData() {
try {
await patientTotal(this.queryParams).then((res) => {
//
this.HZXXvalue = [
{
value: res.data.totalPatients,
name: "患者总数",
},
];
//
this.gendeValue = [
{
value: res.data.gender.male,
name: "男",
},
{
value: res.data.gender.female,
name: "女",
},
];
//
let ageValue = res.data.age;
this.ageValue = [
ageValue.num1,
ageValue.num2,
ageValue.num3,
ageValue.num4,
ageValue.num5,
ageValue.num6,
];
//
let diseaseValue = res.data.jwbz;
this.diseaseValue = [];
for (let key in diseaseValue) {
let data = {
name: this.jwbzObj[key],
value: diseaseValue[key] || 0,
};
this.diseaseValue.push(data);
}
// this.Linepatient(); //
this.handleAge(); //
this.columnar(); //
this.handleDisease(); //
});
this.loading = false;
} catch (e) {
console.log("患者统计", e);
}
},
//
Linepatient() {
HZXX.title.text = this.HZXXvalue[0].value;
HZXX.series[0].data = this.HZXXvalue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("patienty"), null, {
height: 300,
});
myChart.setOption(HZXX, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
columnar() {
gende.series[0].data = this.gendeValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("gender"), null, {
height: 300,
});
myChart.setOption(gende, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleAge() {
ageEcharts.series[0].data = this.ageValue
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("age"), null, {
height: 300,
});
myChart.setOption(ageEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleDisease() {
diseaseEcharts.series[0].data = this.diseaseValue?.map((item) => {
return item.value;
});
diseaseEcharts.xAxis.data = this.diseaseValue?.map((item) => {
return item.name;
});
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("disease"), null, {
height: 300,
});
myChart.setOption(diseaseEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");
_data[1] = this.$moment(_data[1]).format("YYYY-MM-DD");
this.queryParams.param = {
startTime: _data[0] + " " + "00:00:00",
endTime: _data[1] + " " + "23:59:59",
};
},
//
getRenew() {
this.Linepatient(); //
this.handleAge(); //
this.columnar(); //
this.handleDisease(); //
},
},
};
//
Linepatient() {
HZXX.title.text = this.HZXXvalue[0].value;
HZXX.series[0].data = this.HZXXvalue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("patienty"), null, {
height: 300,
});
myChart.setOption(HZXX, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
columnar() {
gende.series[0].data = this.gendeValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("gender"), null, {
height: 300,
});
myChart.setOption(gende, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleAge() {
ageEcharts.series[0].data = this.ageValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("age"), null, {
height: 300,
});
myChart.setOption(ageEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
handleDisease() {
diseaseEcharts.series[0].data = this.diseaseValue?.map((item) => {
return item.value;
});
diseaseEcharts.xAxis.data = this.diseaseValue?.map((item) => {
return item.name;
});
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("disease"), null, {
height: 300,
});
myChart.setOption(diseaseEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");
_data[1] = this.$moment(_data[1]).format("YYYY-MM-DD");
this.queryParams.param = {
startTime: _data[0] + " " + "00:00:00",
endTime: _data[1] + " " + "23:59:59",
};
},
//
getRenew() {
this.Linepatient(); //
this.handleAge(); //
this.columnar(); //
this.handleDisease(); //
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
>>>.el-card__body {
padding: 10px 0 !important;
}
.div-hz {
background: #c6a268;
width: 80%;
height: 70%;
border-radius: 10px;
display: flex;
flex-direction: column;
box-sizing: border-box;
padding: 24px;
}
.div-hz-icon {
flex: 1;
}
.div-hz-num {
flex: 1;
font-size: 50px;
color: #ffffff;
text-align: right;
}
.div-hz-num span {
font-size: 24px;
color: #ffffff;
}
.hz-num-title {
font-size: 22px;
color: #ffffff;
}
>>> .el-card__body {
padding: 10px 0 !important;
}
.dis {
display: flex;
}
.dis {
display: flex;
}
.header-title {
font-size: 18px;
}
.header-title {
font-size: 18px;
}
.title-box {
padding: 10px 20px;
border-bottom: 1px solid #dfe6ec;
}
.title-box {
padding: 10px 20px;
border-bottom: 1px solid #dfe6ec;
}
.dian-box {
align-items: center;
}
.dian-box {
align-items: center;
}
.dian {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
margin: 0 10px;
}
.dian {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
margin: 0 10px;
}
.title-box {
justify-content: space-between;
}
.title-box {
justify-content: space-between;
}
.>>>.el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
. >>> .el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
>>>.el-radio__input {
display: none;
}
>>> .el-radio__input {
display: none;
}
>>>.el-radio__label {
padding-left: 5px;
}
>>> .el-radio__label {
padding-left: 5px;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.title {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>

319
acupuncture-后台/src/views/indexCom/query.vue

@ -1,12 +1,12 @@
<template>
<div class="app-container">
<div class="title1">
<span class="title-bor"></span>
{{ title }}
</div>
<div>
<div>
<!-- <el-radio-group
<div class="app-container">
<div class="title1">
<span class="title-bor"></span>
{{ title }}
</div>
<div>
<div>
<!-- <el-radio-group
v-model="radioValue"
size="small"
style="height: 36px"
@ -17,158 +17,163 @@
<el-radio label="2" border style="margin: 0 20px 0 0"></el-radio>
<el-radio label="3" border style="margin: 0 20px 0 0"></el-radio>
</el-radio-group> -->
<el-date-picker v-model="pickerValue" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="pickerChage">
</el-date-picker>
</div>
</div>
</div>
<el-date-picker
v-model="pickerValue"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="pickerChage"
>
</el-date-picker>
</div>
</div>
</div>
</template>
<script>
// import { deviceType } from "./index.js";
// this.$store.commit('headerFun', data)
export default {
name: "Post",
props: ["title", "type"],
data() {
return {
radioValue: "1",
radioTime: [],
pickerValue: null,
pickerOptions: {
shortcuts: [{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
created() {
console.log(this.pickerValue, 222);
},
methods: {
radioChange() {
const start = new Date();
const end = new Date();
this.timeType = 4;
if (this.radioValue == 0) {
this.timeType = 4;
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.radioTime = [start, end];
}
if (this.radioValue == 1) {
this.timeType = 4;
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
this.radioTime = [start, end];
}
if (this.radioValue == 2) {
this.timeType = 1;
const now = new Date(); //
const nowYear = now.getFullYear(); //
const nowMonth = now.getMonth(); //
const nowDay = now.getDate(); //
const nowDayOfWeek = now.getDay(); //
const jd = Math.ceil((nowMonth + 1) / 3); //
const startDate = new Date(nowYear, (jd - 1) * 3, 1);
const endDate = new Date(nowYear, jd * 3, 0);
this.radioTime = [startDate, endDate];
}
if (this.radioValue == 3) {
this.timeType = 1;
end.setTime(start.getTime());
start.setTime(start.getTime() - 3600 * 1000 * 24 * 365);
this.radioTime = [start, end];
}
this.$emit(
"radio-change",
this.pickerValue || this.radioTime,
this.type,
this.timeType
);
},
pickerChage() {
if (!this.pickerValue) {
this.radioChange();
}
console.log(this.pickerValue, 111);
this.radioTime = [];
this.timeType = 4;
if (this.radioValue == 0) {
this.timeType = 4;
}
if (this.radioValue == 1) {
this.timeType = 4;
}
if (this.radioValue == 2) {
this.timeType = 1;
}
if (this.radioValue == 3) {
this.timeType = 1;
}
this.$emit("picker-change", this.pickerValue, this.type, this.timeType);
},
},
};
// import { deviceType } from "./index.js";
// this.$store.commit('headerFun', data)
export default {
name: "Post",
props: ["title", "type"],
data() {
return {
radioValue: "1",
radioTime: [],
pickerValue: null,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
created() {
console.log(this.pickerValue, 222);
},
methods: {
radioChange() {
const start = new Date();
const end = new Date();
this.timeType = 4;
if (this.radioValue == 0) {
this.timeType = 4;
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.radioTime = [start, end];
}
if (this.radioValue == 1) {
this.timeType = 4;
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
this.radioTime = [start, end];
}
if (this.radioValue == 2) {
this.timeType = 1;
const now = new Date(); //
const nowYear = now.getFullYear(); //
const nowMonth = now.getMonth(); //
const nowDay = now.getDate(); //
const nowDayOfWeek = now.getDay(); //
const jd = Math.ceil((nowMonth + 1) / 3); //
const startDate = new Date(nowYear, (jd - 1) * 3, 1);
const endDate = new Date(nowYear, jd * 3, 0);
this.radioTime = [startDate, endDate];
}
if (this.radioValue == 3) {
this.timeType = 1;
end.setTime(start.getTime());
start.setTime(start.getTime() - 3600 * 1000 * 24 * 365);
this.radioTime = [start, end];
}
this.$emit(
"radio-change",
this.pickerValue || this.radioTime,
this.type,
this.timeType
);
},
pickerChage() {
if (!this.pickerValue) {
this.radioChange();
}
console.log(this.pickerValue, 111);
this.radioTime = [];
this.timeType = 4;
if (this.radioValue == 0) {
this.timeType = 4;
}
if (this.radioValue == 1) {
this.timeType = 4;
}
if (this.radioValue == 2) {
this.timeType = 1;
}
if (this.radioValue == 3) {
this.timeType = 1;
}
this.$emit("picker-change", this.pickerValue, this.type, this.timeType);
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
.>>>.el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
>>>.el-radio__input {
display: none;
}
>>>.el-radio__label {
padding-left: 5px;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.title1 {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>
. >>> .el-radio--small.is-bordered {
margin-right: 20px !important;
margin-left: 0 !important;
}
>>> .el-radio__input {
display: none;
}
>>> .el-radio__label {
padding-left: 5px;
}
.app-container {
padding: 0;
display: flex;
justify-content: space-between;
}
.title1 {
display: flex;
align-items: center;
font-size: 20px;
font-weight: 600;
}
.title-bor {
display: inline-block;
height: 20px;
width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>

Loading…
Cancel
Save