Merge branch 'dev_m' into develop

This commit is contained in:
BOE\10867418
2023-03-30 10:07:21 +08:00
2 changed files with 58 additions and 15 deletions

View File

@@ -21,7 +21,7 @@
<a-input <a-input
style="width: 100%; height: 40px; border-radius: 8px" style="width: 100%; height: 40px; border-radius: 8px"
placeholder="请输入路径名称" placeholder="请输入路径名称"
v-model:value="boeRouterInfoName" v-model:value="routerName"
allowClear allowClear
showSearch showSearch
> >
@@ -300,7 +300,6 @@ export default {
startTime: state.startTime, startTime: state.startTime,
endTime: state.endTime, endTime: state.endTime,
name: state.name, name: state.name,
boeRouterInfoName: state.boeRouterInfoName,
}); });
if (res) { if (res) {
state.tableDataTotal = res.data.total; state.tableDataTotal = res.data.total;
@@ -318,7 +317,7 @@ export default {
const reset = async () => { const reset = async () => {
state.tableLoading = true; state.tableLoading = true;
state.createName = ""; state.createName = "";
state.boeRouterInfoName = ""; state.routerName = "";
state.orgId = state.resetOrgId; state.orgId = state.resetOrgId;
getTableData(); getTableData();
}; };
@@ -342,7 +341,7 @@ export default {
} else { } else {
const params = { const params = {
createName: state.createName, createName: state.createName,
boeRouterInfoName: state.boeRouterInfoName, routerName: state.routerName,
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
}; };
axios({ axios({
@@ -380,15 +379,9 @@ export default {
}; };
} else { } else {
const params = { const params = {
page: state.pageNo,
size: state.pageSize,
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
router: state.routerId,
routerName: state.routerName,
createName: state.createName, createName: state.createName,
startTime: state.startTime, routerName: state.routerName,
endTime: state.endTime, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
name: state.name,
}; };
axios({ axios({
method: "post", method: "post",

View File

@@ -200,16 +200,32 @@
<a-select <a-select
style="width: 100%" style="width: 100%"
placeholder="请选择日期格式" placeholder="请选择日期格式"
allowClear @change="rightChange"
:options="[
{ label: '按日查找', value: 0 },
{ label: '按月查找', value: 1 },
]"
v-model:value="forRightType"
></a-select> ></a-select>
</div> </div>
<div class="timeItemSearch"> <div class="timeItemSearch">
<a-range-picker <a-range-picker
v-if="forRightType == 0"
style="width: 100%" style="width: 100%"
format="YYYY-MM-DD" format="YYYY-MM-DD"
v-model:value="forDay"
separator="至" separator="至"
:placeholder="[' 开始时间', ' 结束时间']" :placeholder="[' 开始时间', ' 结束时间']"
/> />
<a-range-picker
v-if="threeLeftType == 1"
style="width: 100%"
v-model:value="forTime"
format="YYYY-MM"
separator="至"
:placeholder="[' 开始时间', ' 结束时间']"
picker="month"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -251,6 +267,10 @@ export default {
threeTime: [], threeTime: [],
threeDay: [], threeDay: [],
threeXData: [], threeXData: [],
forData: [],
forRightType: 1,
forTime: [],
forDay: [],
}); });
const surfaceRef = ref(null); const surfaceRef = ref(null);
const surface1Ref = ref(null); const surface1Ref = ref(null);
@@ -404,7 +424,9 @@ export default {
method: "post", method: "post",
url: "/report/data/statistics/export/v1", url: "/report/data/statistics/export/v1",
data: { data: {
startTime: dayjs(state.threeData[0]).format("YYYY-MM-01 00:00:01"), startTime: dayjs(state.threeData[0]).format(
"YYYY-MM-01 00:00:01"
),
endTime: monthEnd, endTime: monthEnd,
dateType: state.threeLeftType, dateType: state.threeLeftType,
}, },
@@ -423,6 +445,15 @@ export default {
} }
} }
}; };
const rightChange = (e) => {
if (e == 1) {
// leftMonthChange(state.threeTime);
} else if (e == 0) {
// leftDayChange(state.threeDay);
}
};
// 获取第三排第二个柱状图的数据
// 折线图配置项 // 折线图配置项
const option = ref({ const option = ref({
tooltip: { tooltip: {
@@ -545,12 +576,15 @@ export default {
top: "6%", top: "6%",
left: "0%", left: "0%",
right: "0%", right: "0%",
bottom: "2%", bottom: "15%",
containLabel: true, containLabel: true,
}, },
xAxis: { xAxis: {
type: "category", type: "category",
data: [], data: [],
axisLabel: {
interval: 0,
},
}, },
yAxis: { yAxis: {
type: "value", type: "value",
@@ -581,6 +615,20 @@ export default {
}, },
}, },
], ],
dataZoom: [
{
type: "slider",
show: true,
xAxisIndex: [0],
// start: 1,
// end: 35,
startValue: 0,
endValue: 5,
// brushSelect: false,
showDetail: false,
// zoomLock: true,
},
],
}); });
// 生成echarts的方法 // 生成echarts的方法
@@ -611,6 +659,7 @@ export default {
const monthEnd = dayjs(new Date()).endOf("year").format("YYYY-MM"); const monthEnd = dayjs(new Date()).endOf("year").format("YYYY-MM");
const start = dayjs(new Date()).startOf("year").format("YYYY-MM"); const start = dayjs(new Date()).startOf("year").format("YYYY-MM");
state.threeTime = [dayjs(start), dayjs(monthEnd)]; state.threeTime = [dayjs(start), dayjs(monthEnd)];
state.forTime = [dayjs(start), dayjs(monthEnd)];
leftMonthChange([dayjs(start), dayjs(monthEnd)]); leftMonthChange([dayjs(start), dayjs(monthEnd)]);
}; };
// 挂载完成 // 挂载完成
@@ -623,6 +672,7 @@ export default {
}); });
return { return {
...toRefs(state), ...toRefs(state),
rightChange,
exportThree, exportThree,
disabledDate, disabledDate,
onCalendarChange, onCalendarChange,