taskId:282,remark:'commit'
This commit is contained in:
@@ -7,13 +7,15 @@
|
||||
v-if="selectedTime"
|
||||
style="margin-left: 5%"
|
||||
valueFormat="YYYY"
|
||||
:value="selectYear"
|
||||
v-model:value="selectYear"
|
||||
@change="changeYear"
|
||||
picker="year" />
|
||||
<a-date-picker
|
||||
v-else
|
||||
style="margin-left: 5%"
|
||||
valueFormat="YYYY-MM"
|
||||
:value="selectMonth"
|
||||
v-model:value="selectMonth"
|
||||
@change="changeMonth"
|
||||
picker="month" />
|
||||
</div>
|
||||
<div class="operation">
|
||||
@@ -30,7 +32,13 @@
|
||||
</template>
|
||||
</div>
|
||||
<div class="tablePart">
|
||||
<a-table :columns="columns" :data-source="data" bordered :pagination="false"> </a-table>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
bordered
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1300, y: 300 }">
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,26 +60,35 @@
|
||||
return http.post(api, params);
|
||||
};
|
||||
const selectYear = ref<Dayjs>(dayjs(new Date().getFullYear().toString()));
|
||||
const selectMonth = ref<Dayjs>();
|
||||
const selectMonth = ref<Dayjs>(dayjs().startOf('year').month(0));
|
||||
// 年/月切换
|
||||
const monthStyles = ref('background: #f2f2f2');
|
||||
const yearStyles = ref('background: #2778ff');
|
||||
const selectedTime = ref(true);
|
||||
const changeMonth = () => {
|
||||
queryParams.value.yearMonth = selectMonth.value;
|
||||
getTableData();
|
||||
};
|
||||
const changeToMonth = () => {
|
||||
monthStyles.value = 'background: #2778ff';
|
||||
yearStyles.value = 'background: #f2f2f2';
|
||||
queryParams.value.yearAndMonth = 'month';
|
||||
queryParams.value.year = selectMonth.value;
|
||||
queryParams.value.yearMonth = selectMonth.value.format('YYYY-DD');
|
||||
columns.value[2].title = '月份';
|
||||
columns.value[2].dataIndex = 'month';
|
||||
columns.value[2].dataIndex = 'yearMonth';
|
||||
selectedTime.value = false;
|
||||
getTableData();
|
||||
};
|
||||
const changeYear = () => {
|
||||
queryParams.value.year = selectYear.value;
|
||||
getTableData();
|
||||
};
|
||||
const changeToYear = () => {
|
||||
monthStyles.value = 'background: #f2f2f2';
|
||||
yearStyles.value = 'background: #2778ff';
|
||||
queryParams.value.yearAndMonth = 'year';
|
||||
queryParams.value.year = selectYear.value;
|
||||
delete queryParams.value.yearMonth;
|
||||
// queryParams.value.year = selectYear.value;
|
||||
columns.value[2].title = '年份';
|
||||
columns.value[2].dataIndex = 'year';
|
||||
selectedTime.value = true;
|
||||
@@ -85,7 +102,7 @@
|
||||
const chart = echarts.init(document.getElementById(`ydlChart_${index}`)!);
|
||||
|
||||
const handred = 100;
|
||||
let point = parseInt(item.budgetAchievement.replace("%", ""));
|
||||
let point = parseInt(item.budgetAchievement.replace('%', ''));
|
||||
const option = {
|
||||
backgroundColor: 'transparent',
|
||||
title: [
|
||||
@@ -197,7 +214,7 @@
|
||||
},
|
||||
{
|
||||
title: '计量单位',
|
||||
dataIndex: 'name',
|
||||
dataIndex: 'unitMeasurement',
|
||||
},
|
||||
{
|
||||
title: '总实际用量',
|
||||
|
Reference in New Issue
Block a user