Skip to content

Commit

Permalink
Merge pull request #391 from EightyDollars/dev_shawn
Browse files Browse the repository at this point in the history
fix:隐藏报表后位置显示异常
  • Loading branch information
ZhaoZuohong authored Nov 14, 2023
2 parents aa3ccda + 84dbfbb commit 635f875
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 17 deletions.
8 changes: 6 additions & 2 deletions arknights_mower/solvers/recruit.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,15 @@ def run(self, priority: list[str] = None, send_message_config={}, recruit_config
logger.info(f"上次公招结果汇总{self.result_agent}")

if self.agent_choose:
logger.info(f'公招标签:{self.agent_choose}')
for pos in self.agent_choose:
agent = []
for item in self.agent_choose[pos]['result']:
agent.append(item['name'])
logger.info("第{}个位置:[" + ",".join(self.agent_choose[pos]['tags']) + "]:{}".format(pos, ",".join(agent)))
if self.agent_choose or self.result_agent:
self.send_message(recruit_template.render(recruit_results=self.agent_choose,
recruit_get_agent=self.result_agent,
permit_count=self.permit_count.__str__(),
permit_count=self.permit_count,
title_text="公招汇总"), "公招汇总通知", "html")

return self.agent_choose, self.result_agent
Expand Down
56 changes: 41 additions & 15 deletions ui/src/pages/report.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<template>
<div>
<n-grid x-gap="12" y-gap="12" cols="1 1000:2 " style="text-align: center" autoresize >
<n-gi>
<n-gi v-if=show_iron_chart >
<div class="report-card_1">
<v-chart class="chart" v-if=show_iron_chart :option="option_iron" />
<v-chart class="chart" :option="option_iron" />
</div>
</n-gi>
<n-gi>
<n-gi v-if=show_orundum_chart >
<div class="report-card_1">
<v-chart class="chart" v-if=show_orundum_chart :option="option_orundum"/>
<v-chart class="chart" :option="option_orundum"/>
</div>
</n-gi>
<n-gi>
<n-gi v-if=show_exp_chart >
<div class="report-card_1">
<v-chart class="chart" v-if=show_exp_chart :option="option_exp"/>
<v-chart class="chart" :option="option_exp"/>
</div>
</n-gi>
</n-grid>
Expand Down Expand Up @@ -106,7 +106,10 @@ const option_iron = computed(() => {
dataView: { show: true, readOnly: false },
magicType: { show: true, type: ['line', 'bar'] },
restore: { show: true },
saveAsImage: { show: true }
saveAsImage: {
show: true,
backgroundColor: '#FFFFFF'
}
}
},
legend: {
Expand Down Expand Up @@ -140,7 +143,14 @@ const option_iron = computed(() => {
name: '龙门币',
type: 'value',
axisLine:{
show:true
show:true,
symbol:['none','path://M5,20 L5,5 L8,8 L5,2 L2,8 L5,5 L5.3,6 L5.3,20 '],
symbolOffset:10,//箭头距离x轴末端距离
symbolSize:[35,38]//箭头的宽高
},
nameLocation:'end',
nameTextStyle:{
padding:[0,0,0,-50],//控制y轴标题位置
},
axisLabel: {
formatter: '{value}'
Expand All @@ -150,7 +160,11 @@ const option_iron = computed(() => {
name: '每单平均龙门币',
type: 'value',
axisLine:{
show:true
show:true,
},
axisTick: { show: false },
splitLine:{
show:false,
},
position: 'right',
offset: 25,
Expand Down Expand Up @@ -207,10 +221,13 @@ const option_orundum = computed(() => {
},
toolbox: {
feature: {
dataView: { show: true, readOnly: false },
dataView: { show: false, readOnly: false },
magicType: { show: true, type: ['line', 'bar'] },
restore: { show: true },
saveAsImage: { show: true }
saveAsImage: {
show: true,
backgroundColor: '#FFFFFF'
}
}
},
tooltip: {
Expand All @@ -235,7 +252,10 @@ const option_orundum = computed(() => {
{
type: 'value',
axisLine:{
show:true
show:true,
symbol:['none','path://M5,20 L5,5 L8,8 L5,2 L2,8 L5,5 L5.3,6 L5.3,20 '],
symbolOffset:10,//箭头距离x轴末端距离
symbolSize:[35,38]//箭头的宽高
},
axisLabel: {
formatter: '{value}'
Expand Down Expand Up @@ -282,9 +302,12 @@ const option_exp = computed(() => {
],
toolbox: {
feature: {
dataView: { show: true, readOnly: false },
dataView: { show: false, readOnly: false },
magicType: { show: true, type: ['line', 'bar'] },
saveAsImage: { show: true }
saveAsImage: {
show: true,
backgroundColor: '#FFFFFF'
}
}
},
tooltip: {
Expand All @@ -309,7 +332,10 @@ const option_exp = computed(() => {
{
type: 'value',
axisLine:{
show:true
show:true,
symbol:['none','path://M5,20 L5,5 L8,8 L5,2 L2,8 L5,5 L5.3,6 L5.3,20 '],
symbolOffset:10,//箭头距离x轴末端距离
symbolSize:[35,38]//箭头的宽高
},
axisLabel: {
formatter: '{value}'
Expand Down

0 comments on commit 635f875

Please sign in to comment.