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>
</template>
<script>
@ -36,7 +36,8 @@
require("echarts/theme/macarons"); // echarts theme
import resize from "@/views/dashboard/mixins/resize";
import {
sffb,sftj
sffb,
sftj
} from "@/api/indexCom.js";
import {
followEcharts,
@ -49,8 +50,8 @@
data() {
return {
loading: false,
followValue: null, //
lossFollowValue:null, //
followValue: [], //
lossFollowValue: [], //
queryParams: {
param: {
startTime: "",
@ -72,31 +73,43 @@
//
async getData() {
try {
this.followValue = {}
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) => {
// this.lossFollowValue.xAxis = res.data.map(i => i.reason)
this.lossFollowValue = res.data
this.handleLossFollow()
});
this.loading = false;
} catch (e) {}
} catch (e) {
}
},
//
handleFollow() {
followEcharts.series[0].data = this.lossFollowValue?.map((item) => {
return item.value;
});
followEcharts.xAxis.data = this.lossFollowValue?.map((item) => {
return item.name;
});
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)
}
console.log('followEcharts',followEcharts)
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("follow"), null, {
height: 300,
@ -114,7 +127,7 @@
lossFollowEcharts.xAxis.data = this.lossFollowValue?.map((item) => {
return item.reason;
});
console.log('this.lossFollowValue',this.lossFollowValue)
console.log('this.lossFollowValue', this.lossFollowValue)
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("lossFollow"), null, {
height: 300,

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

@ -816,7 +816,7 @@ export const followEcharts = {
},
xAxis: {
type: "category",
data: ['<300元','300 ~ 900元','900 ~ 2000元','2000 ~ 5000元','>5000元'],
data: ['待随访','临近随访','超期随访','正常随访'],
},
grid: {
top: "12%",
@ -837,31 +837,6 @@ export const followEcharts = {
},
},
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 = {

Loading…
Cancel
Save