|
@@ -1,143 +1,80 @@
|
|
|
<template>
|
|
|
- <div class="charge-box">
|
|
|
- <div class="charge-tools">
|
|
|
- <el-form :inline="true" :model="queryParams">
|
|
|
- <el-form-item label="换电编号:" style="margin-left: 35px;">
|
|
|
- <el-input v-model="queryParams.swapId" placeholder="请输入换电编号" clearable />
|
|
|
- </el-form-item>
|
|
|
+ <div class="charge-box">
|
|
|
+ <div class="charge-tools">
|
|
|
+ <el-form :inline="true" :model="queryParams">
|
|
|
+ <el-form-item label="换电编号:" style="margin-left: 35px">
|
|
|
+ <el-input v-model="queryParams.swapId" placeholder="请输入换电编号" clearable />
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- <el-form-item label="车牌号:" style="margin-left: 50px;">
|
|
|
- <el-input v-model="queryParams.vehiclePlate" placeholder="请输入车牌号" clearable />
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item label="车牌号:" style="margin-left: 50px">
|
|
|
+ <el-input v-model="queryParams.vehiclePlate" placeholder="请输入车牌号" clearable />
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- <el-form-item label="车辆识别码:" style="margin-left: 50px;">
|
|
|
- <el-input v-model="queryParams.PlateCode" placeholder="请输入车牌号" clearable />
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="时间范围:" style="margin-left: 50px">
|
|
|
- <el-date-picker
|
|
|
- v-model="dateTime"
|
|
|
- class="times"
|
|
|
- type="datetimerange"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- format="yyyy-MM-dd HH:mm:ss"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" class="serch actve" @click="handleQuery">查询</el-button>
|
|
|
- <el-button type="primary" class="serch" @click="resetForm">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="charge-table">
|
|
|
- <div class="charge-table-bottom">
|
|
|
- <el-table
|
|
|
- :data="datalist"
|
|
|
- :header-cell-style="{
|
|
|
- background: '#1d283e',
|
|
|
- borderColor: '#2f3c86',
|
|
|
- height: '36px',
|
|
|
- lineHeight: '36px',
|
|
|
- color:'white',
|
|
|
- fontSize: '15px',
|
|
|
- }"
|
|
|
- stripe
|
|
|
- fit
|
|
|
- :height="tableheight"
|
|
|
- style="width: 100%"
|
|
|
- :default-sort="{prop: 'chargerId', order: 'descending'}"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- width="55">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="index"
|
|
|
- label="序号"
|
|
|
- />
|
|
|
- <af-table-column
|
|
|
- prop="time"
|
|
|
- label="换电编号"
|
|
|
- fixed
|
|
|
- width="140">
|
|
|
- </af-table-column>
|
|
|
- <af-table-column
|
|
|
- prop="plcTag"
|
|
|
- label="车牌号"
|
|
|
- fixed
|
|
|
- width="120">
|
|
|
- </af-table-column>
|
|
|
- <af-table-column
|
|
|
- prop="plcTag"
|
|
|
- label="车辆识别码"
|
|
|
- fixed
|
|
|
- width="120">
|
|
|
- </af-table-column>
|
|
|
- <af-table-column
|
|
|
- prop="plcTag"
|
|
|
- label="换电开始时间"
|
|
|
- fixed
|
|
|
- width="120">
|
|
|
- </af-table-column>
|
|
|
- <af-table-column
|
|
|
- prop="plcTag"
|
|
|
- label="换电结束时间"
|
|
|
- fixed
|
|
|
- width="120">
|
|
|
- </af-table-column>
|
|
|
- <af-table-column
|
|
|
- prop="plcTag"
|
|
|
- label="换电时长"
|
|
|
- fixed
|
|
|
- width="120">
|
|
|
- </af-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="160">
|
|
|
+ <el-form-item label="车辆识别码:" style="margin-left: 50px">
|
|
|
+ <el-input v-model="queryParams.PlateCode" placeholder="请输入车牌号" clearable />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="时间范围:" style="margin-left: 50px">
|
|
|
+ <el-date-picker v-model="dateTime" class="times" type="datetimerange" range-separator="至"
|
|
|
+ start-placeholder="开始时间" end-placeholder="结束时间" format="yyyy-MM-dd HH:mm:ss" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" class="serch actve" @click="handleQuery">查询</el-button>
|
|
|
+ <el-button type="primary" class="serch" @click="resetForm">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="charge-table">
|
|
|
+ <div class="charge-table-bottom">
|
|
|
+ <el-table :data="datalist" :header-cell-style="{
|
|
|
+ background: '#1d283e',
|
|
|
+ borderColor: '#2f3c86',
|
|
|
+ height: '36px',
|
|
|
+ lineHeight: '36px',
|
|
|
+ color: 'white',
|
|
|
+ fontSize: '15px',
|
|
|
+ }" stripe fit :height="tableheight" style="width: 100%">
|
|
|
+ <el-table-column type="index" label="序号" width="55" />
|
|
|
+ <el-table-column prop="swapId" width="400" label="换电编号" />
|
|
|
+ <el-table-column prop="vehiclePlate" label="车牌号" />
|
|
|
+ <el-table-column prop="vehicleVin" label="车辆识别码" />
|
|
|
+ <el-table-column prop="swapBeginTime" label="换电开始时间" />
|
|
|
+ <el-table-column prop="swapEndTime" label="换电结束时间" />
|
|
|
+ <el-table-column prop="swapDuration" label="换电时长" />
|
|
|
+ <el-table-column label="操作" align="center" width="200">
|
|
|
<template v-if="scope.row.userAccount !== 'admin'" slot-scope="scope">
|
|
|
<el-button type="primary" class="handle" size="small" @click="handleEdit(scope.row)">日志查询</el-button>
|
|
|
- <el-button type="primary" class="handle" size="small" @click="handleDelete(scope.$index,scope.row.id)">导出日志</el-button>
|
|
|
+ <el-button type="primary" class="handle" size="small"
|
|
|
+ @click="handleDelete(scope.$index, scope.row.id)">导出日志</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <div class="pageblock">
|
|
|
- <el-pagination
|
|
|
- :current-page="queryParams.page"
|
|
|
- :page-sizes="[10, 20, 30, 40]"
|
|
|
- :page-size="queryParams.pageSize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- />
|
|
|
- </div>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="pageblock">
|
|
|
+ <el-pagination :current-page="queryParams.page" :page-sizes="[10, 20, 30, 40]" :page-size="queryParams.pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
|
+ </div>
|
|
|
|
|
|
- <!--新增账号弹窗-->
|
|
|
- <div class="exportmanage">
|
|
|
- <el-dialog
|
|
|
- :title="dialogType==='find'?'查看数据范围':'导出数据范围'"
|
|
|
- :visible.sync="dialogexportVisible"
|
|
|
- :destroy-on-close="true"
|
|
|
- @close="dialogClose"
|
|
|
- >
|
|
|
- <el-form
|
|
|
- ref="ruleForm"
|
|
|
- v-loading="loading"
|
|
|
- >
|
|
|
+ <!--导出弹窗-->
|
|
|
+ <div class="rolemanage">
|
|
|
+ <el-dialog :title="dialogType === 'find' ? '查看数据范围' : '导出数据范围'" :visible.sync="dialogexportVisible"
|
|
|
+ :destroy-on-close="true" @close="dialogClose">
|
|
|
+ <el-form ref="ruleForm" v-loading="loading">
|
|
|
<div class="checkFirst">
|
|
|
- <div>范围:</div>
|
|
|
+ <div>日志范围:</div>
|
|
|
<template>
|
|
|
- <el-checkbox-group v-model="checkList">
|
|
|
- <el-checkbox label="复选框 A"></el-checkbox>
|
|
|
- <el-checkbox label="复选框 B"></el-checkbox>
|
|
|
- <el-checkbox label="复选框 C"></el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
+ <el-form-item style="margin-left: 5px; margin-top: 20px">
|
|
|
+ <el-select multiple v-model="robotValue" filterable clearable placeholder="请选择" @change="changeSelect"
|
|
|
+ collapse-tags @remove-tag="removeTag">
|
|
|
+ <el-option label="全选" value="全选" @click.native="selectAll"></el-option>
|
|
|
+ <el-option v-for="item in logOptions" :key="item.alarmCode" :label="item.alarmName"
|
|
|
+ :value="item.alarmCode" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</template>
|
|
|
</div>
|
|
|
</el-form>
|
|
@@ -147,207 +84,208 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
- <!--新增账号弹窗结束-->
|
|
|
+ <!--导出弹窗结束-->
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <script>
|
|
|
- import './log.scss'
|
|
|
- import { chargeExport } from '@/api/records'
|
|
|
- import { logModel,robotList } from '@/api/log'
|
|
|
- import serverUrl from '../../../vue.config.js'
|
|
|
- export default {
|
|
|
- name: 'ChangeRecord',
|
|
|
- components: {},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- // 查询时间数组
|
|
|
- dateTime: '',
|
|
|
- // 充电机ID下拉列表
|
|
|
- chargerArr: null,
|
|
|
- checkList: ['选中且禁用','复选框 A'],
|
|
|
- // 数据列表
|
|
|
- datalist: [],
|
|
|
- dialogType: 'find', // 按钮类型(find、export)
|
|
|
- // 查询参数
|
|
|
- queryParams: {
|
|
|
- page: 1, // 当前页
|
|
|
- pageSize: 10, // 每页条数
|
|
|
- deviceNo: undefined,
|
|
|
- endTime: undefined, // 电池编号
|
|
|
- swapId: undefined, // 排序字段
|
|
|
- vehiclePlate:undefined,
|
|
|
- PlateCode:undefined,
|
|
|
- startTime: undefined,// 排序方式
|
|
|
- sort:1
|
|
|
- },
|
|
|
- total: 0, // 总条数,
|
|
|
- tableheight: 0, // 表格高度设置
|
|
|
- dialogexportVisible: true, // 弹窗显示
|
|
|
- chargeShowList: [],// 充电机明细弹窗列表
|
|
|
- checked: false,
|
|
|
- indeterminate: false,
|
|
|
- robotValue:'',
|
|
|
- logOptions: [],
|
|
|
- logheader:[],
|
|
|
- multipleSelection:[],
|
|
|
- loading:false,
|
|
|
+<script>
|
|
|
+import "./log.scss";
|
|
|
+import { swapList } from "@/api/records";
|
|
|
+import { logModel } from "@/api/log";
|
|
|
+export default {
|
|
|
+ name: "ChangeRecord",
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 查询时间数组
|
|
|
+ dateTime: "",
|
|
|
+ // 充电机ID下拉列表
|
|
|
+ chargerArr: null,
|
|
|
+ // 数据列表
|
|
|
+ datalist: [],
|
|
|
+ dialogType: "find", // 按钮类型(find、export)
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ page: 1, // 当前页
|
|
|
+ pageSize: 10, // 每页条数
|
|
|
+ vehiclePlate: undefined, // 车牌号
|
|
|
+ swapId: undefined, // 换电编号
|
|
|
+ swapBeginTime: undefined,
|
|
|
+ swapEndTime: undefined,
|
|
|
+ orderByField: undefined, // 排序字段
|
|
|
+ orderByWays: 'desc'// 排序方式
|
|
|
+ },
|
|
|
+ total: 0, // 总条数,
|
|
|
+ tableheight: 0, // 表格高度设置
|
|
|
+ dialogexportVisible: false, // 弹窗显示
|
|
|
+ checked: false,
|
|
|
+ indeterminate: false,
|
|
|
+ robotValue: "",
|
|
|
+ logOptions: [],
|
|
|
+ logheader: [],
|
|
|
+ loading: false,
|
|
|
+ heightTimer: false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ tableheight(val) {
|
|
|
+ // 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
|
|
+ if (!this.heightTimer) {
|
|
|
+ // 一旦监听到的screenWidth值改变,就将其重新赋给data里的screenWidth
|
|
|
+ this.screenHeight = val;
|
|
|
+ this.heightTimer = true;
|
|
|
+ setTimeout(function () {
|
|
|
+ this.heightTimer = false;
|
|
|
+ }, 400);
|
|
|
}
|
|
|
},
|
|
|
- watch: {
|
|
|
- tableheight(val) {
|
|
|
- // 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
|
|
- if (!this.heightTimer) {
|
|
|
- // 一旦监听到的screenWidth值改变,就将其重新赋给data里的screenWidth
|
|
|
- this.screenHeight = val
|
|
|
- this.heightTimer = true
|
|
|
- setTimeout(function() {
|
|
|
- this.heightTimer = false
|
|
|
- }, 400)
|
|
|
- }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.onLoadHeight();
|
|
|
+ this.changeWindow();
|
|
|
+ this.getLogModel();
|
|
|
+ this.getswapList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /* 设置初始视窗高度*/
|
|
|
+ onLoadHeight() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.tableheight = document.body.clientHeight - 400;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /* 设置窗口变化高度*/
|
|
|
+ changeWindow() {
|
|
|
+ window.onresize = () => {
|
|
|
+ return (() => {
|
|
|
+ this.tableheight = document.body.clientHeight - 400;
|
|
|
+ })();
|
|
|
+ };
|
|
|
+ },
|
|
|
+ selectAll() {
|
|
|
+ if (this.robotValue.length < this.logOptions.length) {
|
|
|
+ this.robotValue = [];
|
|
|
+ this.logOptions.map((item) => {
|
|
|
+ this.robotValue.push(item.value);
|
|
|
+ });
|
|
|
+ this.robotValue.unshift("全选");
|
|
|
+ } else {
|
|
|
+ this.robotValue = [];
|
|
|
}
|
|
|
+ this.$emit("SelectedData", this.robotValue);
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.onLoadHeight()
|
|
|
- this.changeWindow()
|
|
|
- this.getLogModel()
|
|
|
- this.getrobotList()
|
|
|
+ changeSelect(val) {
|
|
|
+ if (!val.includes("全选") && val.length === this.logOptions.length) {
|
|
|
+ this.robotValue.unshift("全选");
|
|
|
+ } else if (
|
|
|
+ val.includes("全选") &&
|
|
|
+ val.length - 1 < this.logOptions.length
|
|
|
+ ) {
|
|
|
+ this.robotValue = this.robotValue.filter((item) => {
|
|
|
+ return item !== "全选";
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.$emit("SelectedData", this.robotValue);
|
|
|
},
|
|
|
- methods: {
|
|
|
- /* 设置初始视窗高度*/
|
|
|
- onLoadHeight() {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.tableheight = document.body.clientHeight - 460
|
|
|
- })
|
|
|
- },
|
|
|
- /* 设置窗口变化高度*/
|
|
|
- changeWindow() {
|
|
|
- window.onresize = () => {
|
|
|
- return (() => {
|
|
|
- this.tableheight = document.body.clientHeight - 460
|
|
|
- })()
|
|
|
- }
|
|
|
- },
|
|
|
- AddUserinfo() {
|
|
|
+ removeTag(val) {
|
|
|
+ if (val === "全选") {
|
|
|
+ this.robotValue = [];
|
|
|
+ }
|
|
|
+ this.$emit("SelectedData", this.robotValue);
|
|
|
+ },
|
|
|
+ AddUserinfo() {
|
|
|
this.$refs.ruleForm.validate((valid) => {
|
|
|
if (valid) {
|
|
|
// 添加用户
|
|
|
- if (this.dialogType === 'new') {
|
|
|
- addUserinfo(this.formData).then(res => {
|
|
|
+ if (this.dialogType === "new") {
|
|
|
+ addUserinfo(this.formData).then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
- this.loading = false
|
|
|
- this.dialogUserVisible = false
|
|
|
+ this.loading = false;
|
|
|
+ this.dialogUserVisible = false;
|
|
|
this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '操作成功!'
|
|
|
- })
|
|
|
- this.getUserlist()
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!",
|
|
|
+ });
|
|
|
+ this.getUserlist();
|
|
|
} else {
|
|
|
- this.loading = false
|
|
|
- return this.$message.error(res.msg)
|
|
|
+ this.loading = false;
|
|
|
+ return this.$message.error(res.msg);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
// 修改用户
|
|
|
else {
|
|
|
- const updateFrom = this.formData
|
|
|
- delete updateFrom.pwd
|
|
|
- console.log(updateFrom)
|
|
|
- updateUser(updateFrom).then(res => {
|
|
|
+ const updateFrom = this.formData;
|
|
|
+ delete updateFrom.pwd;
|
|
|
+ console.log(updateFrom);
|
|
|
+ updateUser(updateFrom).then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
- this.loading = false
|
|
|
- this.dialogUserVisible = false
|
|
|
+ this.loading = false;
|
|
|
+ this.dialogUserVisible = false;
|
|
|
this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '操作成功!'
|
|
|
- })
|
|
|
- this.getUserlist()
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!",
|
|
|
+ });
|
|
|
+ this.getUserlist();
|
|
|
} else {
|
|
|
- this.loading = false
|
|
|
- return this.$message.error(res.msg)
|
|
|
+ this.loading = false;
|
|
|
+ return this.$message.error(res.msg);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- // 清空表单数据
|
|
|
- dialogClose() {
|
|
|
-
|
|
|
- },
|
|
|
- //获取机器人日志列表
|
|
|
- getrobotList(){
|
|
|
- robotList(this.queryParams).then( res =>{
|
|
|
- console.log(res)
|
|
|
- this.datalist= res.data.list
|
|
|
- this.total=res.data.total
|
|
|
- })
|
|
|
- },
|
|
|
- //获取日志数据字典
|
|
|
- getLogModel(){
|
|
|
- logModel().then( res =>{
|
|
|
- this.logOptions= res.data
|
|
|
- this.logheader=res.data
|
|
|
- console.log(this.logOptions)
|
|
|
- })
|
|
|
- },
|
|
|
- // 充电明细弹窗显示
|
|
|
- chargeShow(list) {
|
|
|
- this.dialogChargeVisible = true
|
|
|
- this.chargeShowList = list
|
|
|
- },
|
|
|
- /** 分页下一页 */
|
|
|
- handleSizeChange(val) {
|
|
|
- this.queryParams.pageSize = val
|
|
|
- this.getrobotList()
|
|
|
- },
|
|
|
- /** 分页选择页数 */
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.queryParams.page = val
|
|
|
- this.getrobotList()
|
|
|
- },
|
|
|
- // 搜索
|
|
|
- handleQuery() {
|
|
|
- if (this.dateTime) {
|
|
|
- this.queryParams.startTime = this.$moment(this.dateTime[0]).format('YYYY-MM-DD HH:mm:ss')
|
|
|
- this.queryParams.endTime = this.$moment(this.dateTime[1]).format('YYYY-MM-DD HH:mm:ss')
|
|
|
- }
|
|
|
- if(this.robotValue){
|
|
|
- this.queryParams.signals=this.robotValue
|
|
|
- // this.logheader.forEach((item)=>{
|
|
|
- // if(!this.robotValue.includes(item.alarmCode)){
|
|
|
- // this.logheader.splice(item.alarmCode,1)
|
|
|
- // }
|
|
|
- // })
|
|
|
- let differenceABSet = Array.from(new Set([...this.logOptions].filter(x => this.robotValue.includes(x.alarmCode))));
|
|
|
- this.logheader=differenceABSet
|
|
|
- }
|
|
|
- this.getrobotList()
|
|
|
- console.log(this.logheader)
|
|
|
- },
|
|
|
- // 搜索重置
|
|
|
- resetForm() {
|
|
|
- this.queryParams.startTime = undefined
|
|
|
- this.queryParams.endTime = undefined
|
|
|
- this.queryParams.signals = undefined
|
|
|
- this.getrobotList()
|
|
|
- },
|
|
|
- // 导出结果
|
|
|
- chargeExport() {
|
|
|
- this.$confirm('确认导出结果?', '导出结果', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(async() => {
|
|
|
- const res = await chargeExport(this.queryParams)
|
|
|
- const execlUrl=serverUrl.devServer.proxy['/api'].target+'/excel/'+res.data
|
|
|
- window.open(execlUrl,'_blank')
|
|
|
- })
|
|
|
- .catch(err => { console.error(err) })
|
|
|
+ // 清空表单数据
|
|
|
+ dialogClose() { },
|
|
|
+ //获取换电记录列表
|
|
|
+ getswapList() {
|
|
|
+ swapList(this.queryParams).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ this.datalist = res.data.records;
|
|
|
+ this.total = res.data.total;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取日志数据字典
|
|
|
+ getLogModel() {
|
|
|
+ logModel().then((res) => {
|
|
|
+ this.logOptions = res.data;
|
|
|
+ this.logheader = res.data;
|
|
|
+ console.log(this.logOptions);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 充电明细弹窗显示
|
|
|
+ chargeShow(list) {
|
|
|
+ this.dialogChargeVisible = true;
|
|
|
+ this.chargeShowList = list;
|
|
|
+ },
|
|
|
+ /** 分页下一页 */
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.queryParams.pageSize = val;
|
|
|
+ this.getswapList();
|
|
|
+ },
|
|
|
+ /** 分页选择页数 */
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.queryParams.page = val;
|
|
|
+ this.getswapList();
|
|
|
+ },
|
|
|
+ // 搜索
|
|
|
+ handleQuery() {
|
|
|
+ if (this.dateTime) {
|
|
|
+ this.queryParams.startTime = this.$moment(this.dateTime[0]).format(
|
|
|
+ "YYYY-MM-DD HH:mm:ss"
|
|
|
+ );
|
|
|
+ this.queryParams.endTime = this.$moment(this.dateTime[1]).format(
|
|
|
+ "YYYY-MM-DD HH:mm:ss"
|
|
|
+ );
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- </script>
|
|
|
-
|
|
|
+ this.getswapList();
|
|
|
+ },
|
|
|
+ // 搜索重置
|
|
|
+ resetForm() {
|
|
|
+ this.queryParams.startTime = undefined;
|
|
|
+ this.queryParams.endTime = undefined;
|
|
|
+ this.getswapList();
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|