|
|
@ -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, |
|
|
|