添加login

jc1.0
fanluyan 1 year ago
commit 6a648ee743

@ -1,9 +1,9 @@
<template>
<div class="sidebarBox">
<ul class="menuBoxUl">
<li class="menuItem" @click="linkHome()">
<!-- <li class="menuItem" @click="linkHome()">
<a>首页</a>
</li>
</li> -->
<li class="menuItem" v-for="(item, index) in routeItem" :key="index">
<router-link :to="item.path"> {{ item.name }} </router-link>
</li>
@ -18,10 +18,10 @@ export default {
hostName: "",
isProduction: "",
routeItem: [
// {
// path: "/home",
// name: "",
// },
{
path: "/home",
name: "首页",
},
{
path: "/dataReport",
name: "数据报表",

@ -4,24 +4,24 @@ import VueRouter from "vue-router";
Vue.use(VueRouter);
const routes = [
// {
// path: "/login",
// component: () => import("../views/login/index.vue"),
// meta: { title: "登录" },
// },
{
path: "/login",
component: () => import("../views/login/index.vue"),
meta: { title: "登录" },
},
{
path: "/",
redirect: "/dataReport",
component: () => import("../components/Home.vue"),
children: [
// {
// path: "/home",
// component: () => import("../views/homePage/index.vue"),
// name: "homepage",
// meta: {
// title: "首页",
// },
// },
{
path: "/home",
component: () => import("../views/homePage/index.vue"),
name: "homepage",
meta: {
title: "首页",
},
},
{
path: "/dataReport",
component: () => import("../views/dataReport/index.vue"),

@ -76,6 +76,17 @@
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-select v-model="formdata.dayValue" placeholder="请选择">
<el-option
v-for="item in dayOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" class="searchBtn" @click="handleSearch"
>查询</el-button
@ -162,6 +173,7 @@
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
:page-sizes="[20, 40, 100]"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
>
@ -218,7 +230,31 @@ export default {
label: "name",
key: "compositeKey", // 使 uniqueKey
},
formdata: {}, //form
formdata: {
dayValue: 4,
}, //form
dayOptions: [
{
value: -1,
label: "全部数据",
},
{
value: 1,
label: "每日最多1条",
},
{
value: 2,
label: "每日最多2条",
},
{
value: 4,
label: "每日最多4条",
},
{
value: 6,
label: "每日最多6条",
},
],
activeName: "dataTab",
tableLoading: false, //loading
checkAll: true, //
@ -495,6 +531,7 @@ export default {
if (this.tabName == "dataTab") {
this.getDetailTable(
this.currentId,
this.formdata.dayValue,
this.formdata.starttime,
this.formdata.endtime
);
@ -507,11 +544,12 @@ export default {
}
},
//
getDetailTable(id, stime, eTime) {
getDetailTable(id, dayval, stime, eTime) {
console.log(id, stime, eTime);
this.tableLoading = true;
getDetailApi({
id: id,
numPerDay: dayval,
startTime: stime,
endTime: eTime,
pageNum: this.page,
@ -578,6 +616,13 @@ export default {
this.formdata.starttime,
this.formdata.endtime
);
} else {
this.getDetailTable(
this.currentId,
this.formdata.dayValue,
this.formdata.starttime,
this.formdata.endtime
);
}
},
//
@ -591,6 +636,8 @@ export default {
window.location.href =
"/cac-api/nsensor/export?id=" +
this.currentId +
"&numPerDay=" +
this.formdata.dayValue +
"&startTime=" +
this.formdata.starttime +
"&endTime=" +
@ -620,13 +667,15 @@ export default {
window.location.href =
"/cac-api/nsensor/export?id=" +
this.currentId +
"&numPerDay=" +
this.formdata.dayValue +
"&startTime=" +
this.formdata.starttime +
"&endTime=" +
this.formdata.endtime +
"&pageNum=" +
this.page +
"&pageSizee=" +
"&pageSize=" +
this.pageSize;
},
//
@ -635,6 +684,7 @@ export default {
this.tableData = [];
this.getDetailTable(
this.currentId,
this.formdata.dayValue,
this.formdata.starttime,
this.formdata.endtime
);
@ -645,6 +695,7 @@ export default {
this.tableData = [];
this.getDetailTable(
this.currentId,
this.formdata.dayValue,
this.formdata.starttime,
this.formdata.endtime
);

Loading…
Cancel
Save