Browse Source

队列随访

newMaster
1747191978@qq.com 4 months ago
parent
commit
ddfafb8f49
  1. 51
      acupuncture-前台/src/views/indexCom/follow.vue
  2. 27
      acupuncture-前台/src/views/indexCom/index.js

51
acupuncture-前台/src/views/indexCom/follow.vue

@ -28,7 +28,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
@ -36,7 +36,8 @@
require("echarts/theme/macarons"); // echarts theme require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize"; import resize from "@/views/dashboard/mixins/resize";
import { import {
sffb,sftj sffb,
sftj
} from "@/api/indexCom.js"; } from "@/api/indexCom.js";
import { import {
followEcharts, followEcharts,
@ -49,8 +50,8 @@
data() { data() {
return { return {
loading: false, loading: false,
followValue: null, // followValue: [], //
lossFollowValue:null, // lossFollowValue: [], //
queryParams: { queryParams: {
param: { param: {
startTime: "", startTime: "",
@ -72,31 +73,43 @@
// //
async getData() { async getData() {
try { try {
this.followValue = {}
await sffb(this.queryParams).then((res) => { await sffb(this.queryParams).then((res) => {
const {jzdl,smdl} = res res.data.forEach(i => {
let data = [i.dsf, i.ljsf, i.cqsf, i.zc]
this.followValue[i.queueName] = data
})
this.handleFollow()
}); });
this.lossFollowValue = {
xAxis:[],
series:[]
}
await sftj(this.queryParams).then((res) => { await sftj(this.queryParams).then((res) => {
// this.lossFollowValue.xAxis = res.data.map(i => i.reason)
this.lossFollowValue = res.data this.lossFollowValue = res.data
this.handleLossFollow() this.handleLossFollow()
}); });
this.loading = false; this.loading = false;
} catch (e) {} } catch (e) {
}
}, },
// //
handleFollow() { handleFollow() {
followEcharts.series[0].data = this.lossFollowValue?.map((item) => { followEcharts.series = []
return item.value; for (let key in this.followValue) {
}); let series = {
followEcharts.xAxis.data = this.lossFollowValue?.map((item) => { name: key,
return item.name; data: this.followValue[key],
}); type: "bar",
barMaxWidth: 24, //
itemStyle: {
normal: {
// []
barBorderRadius: [50, 50, 0, 0],
},
},
}
followEcharts.series.push(series)
}
console.log('followEcharts',followEcharts)
this.$nextTick(() => { this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("follow"), null, { var myChart = echarts.init(document.getElementById("follow"), null, {
height: 300, height: 300,
@ -114,7 +127,7 @@
lossFollowEcharts.xAxis.data = this.lossFollowValue?.map((item) => { lossFollowEcharts.xAxis.data = this.lossFollowValue?.map((item) => {
return item.reason; return item.reason;
}); });
console.log('this.lossFollowValue',this.lossFollowValue) console.log('this.lossFollowValue', this.lossFollowValue)
this.$nextTick(() => { this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("lossFollow"), null, { var myChart = echarts.init(document.getElementById("lossFollow"), null, {
height: 300, height: 300,

27
acupuncture-前台/src/views/indexCom/index.js

@ -816,7 +816,7 @@ export const followEcharts = {
}, },
xAxis: { xAxis: {
type: "category", type: "category",
data: ['<300元','300 ~ 900元','900 ~ 2000元','2000 ~ 5000元','>5000元'], data: ['待随访','临近随访','超期随访','正常随访'],
}, },
grid: { grid: {
top: "12%", top: "12%",
@ -837,31 +837,6 @@ export const followEcharts = {
}, },
}, },
series: [ series: [
{
name: "肥胖队列",
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
},
{
name: "失眠队列",
data: [],
type: "bar",
barMaxWidth: 24, //柱图宽度
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
},
], ],
}; };
export const lossFollowEcharts = { export const lossFollowEcharts = {

Loading…
Cancel
Save