Commit 3f42034c by liimin

Merge branch 'master' of http://192.168.3.233:8090/glsx-web/tFIMS

2 parents cfd68fc2 0341a211
import request from './request'
const path = 'fims.subsystem.'
const methods = {
Add: `${path}add`,
Edit: `${path}edit`
}
function getListApi (data) {
data.method = `${path}list`
return request(data)
}
function editApi (data) {
return request(data)
}
function removeApi (data) {
data.method = `${path}remove`
return request(data)
}
export {
getListApi,
methods,
editApi,
removeApi
}
\ No newline at end of file \ No newline at end of file
const sysMonitorPath = 'fims.system.'
const trafficManagePath = 'fims.traffic.'
const sysMonitorMethods = {
Search: `${sysMonitorPath}list`,
Report: `${sysMonitorPath}report`
}
const trafficManageMethods = {
Add: `${trafficManagePath}add`,
Search: `${trafficManagePath}list`,
Edit: `${trafficManagePath}edit`,
Remove: `${trafficManagePath}remove`
}
export {
sysMonitorMethods,
trafficManageMethods
}
import request from './request' import request from './request'
const sysMonitorPath = 'fims.system.' const path = 'fims.system.'
function getListApi (data) { function getListApi (data) {
data.method = `${sysMonitorPath}list` data.method = `${path}list`
return request(data) return request(data)
} }
function reportApi (data) { function reportApi (data) {
data.method = `${sysMonitorPath}report` data.method = `${path}report`
return request(data) return request(data)
} }
export { export {
......
import request from './request' import request from './request'
const trafficManagePath = 'fims.traffic.' const path = 'fims.traffic.'
function getListApi (data) { const methods = {
data.method = `${trafficManagePath}list` Add: `${path}add`,
return request(data) Edit: `${path}edit`
} }
function addApi (data) { function getListApi (data) {
data.method = `${trafficManagePath}add` data.method = `${path}list`
return request(data) return request(data)
} }
// function addApi (data) {
// data.method = `${path}add`
// return request(data)
// }
function editApi (data) { function editApi (data) {
data.method = `${trafficManagePath}edit` // data.method = `${path}edit`
return request(data) return request(data)
} }
function removeApi (data) { function removeApi (data) {
data.method = `${trafficManagePath}remove` data.method = `${path}remove`
return request(data) return request(data)
} }
export { export {
getListApi, getListApi,
addApi, methods,
// addApi,
editApi, editApi,
removeApi removeApi
} }
const userManagePath = 'fims.user.' import request from './request'
import RequestMethods from './request.methods'
const path = 'fims.user.'
const userMethods = { export function Modify (data) {
Modify: `${userManagePath}modify`, data.method = `${path}modify`
Loginlog: `${userManagePath}search.loginlog` return request(data, RequestMethods.POST)
} }
export { export function getLoginlogs (data) {
userMethods data.method = `${path}search.loginlog`
return request(data)
} }
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</template> </template>
<script> <script>
// import { ctMethods, request } from '@/api' import { Modify } from '@api/userManage'
export default { export default {
name: 'PasswordDialog', name: 'PasswordDialog',
components: { components: {
...@@ -151,17 +151,13 @@ export default { ...@@ -151,17 +151,13 @@ export default {
this.passwordDialogVisible = false this.passwordDialogVisible = false
}, },
mergePassWord (params) { // mergePassWord (params) {
// mergeBg // Modify(params)
// .req(params) // .then(res => {
// .then(res => {
// this.$message({ // })
// message: '密码已修改', // .catch(err => console.log(err))
// type: 'success' // }
// });
// })
// .catch(err => console.log(err))
}
} }
} }
......
...@@ -127,14 +127,14 @@ export const resources = { ...@@ -127,14 +127,14 @@ export const resources = {
}, },
component: _import('demo/page3') component: _import('demo/page3')
}, },
// '103': { // '102': {
// path: 'trafficManagement', // path: 'trafficManagement',
// icon: 'folder-o', // icon: 'folder-o',
// name: '车辆管理', // name: '车辆管理',
// meta: { // meta: {
// auth: true, // auth: true,
// title: '车辆管理', // title: '车辆管理',
// id: '103', // id: '102',
// pid: '0' // pid: '0'
// }, // },
// component: _import('trafficManagement') // component: _import('trafficManagement')
...@@ -154,10 +154,10 @@ export const resources = { ...@@ -154,10 +154,10 @@ export const resources = {
'104': { '104': {
path: 'trafficManagement', path: 'trafficManagement',
icon: 'folder-o', icon: 'folder-o',
name: '物料管理', name: '车辆管理',
meta: { meta: {
auth: true, auth: true,
title: '物料管理', title: '车辆管理',
id: '104', id: '104',
pid: '0' pid: '0'
}, },
...@@ -243,7 +243,7 @@ export const resources = { ...@@ -243,7 +243,7 @@ export const resources = {
component: _import('userManage/loginLogs') component: _import('userManage/loginLogs')
}, },
'108': { '108': {
path: 'page', path: 'reportingLogs',
icon: 'folder-o', icon: 'folder-o',
name: '上报日志', name: '上报日志',
meta: { meta: {
......
...@@ -3,7 +3,7 @@ import { constants } from 'fs'; ...@@ -3,7 +3,7 @@ import { constants } from 'fs';
<template> <template>
<div> <div>
<el-dialog <el-dialog
:title="!editForm.subSystemNum ? '添加子系统' : '编辑子系统'" :title="!editForm.subsystemCode ? '添加子系统' : '编辑子系统'"
:visible.sync="isVisible" :visible.sync="isVisible"
:before-close="handleClose" :before-close="handleClose"
> >
...@@ -15,42 +15,42 @@ import { constants } from 'fs'; ...@@ -15,42 +15,42 @@ import { constants } from 'fs';
> >
<el-form-item <el-form-item
label="子系统编号" label="子系统编号"
prop="subSystemNum"> prop="subsystemCode">
<el-input <el-input
:disabled="disabled" :disabled="disabled"
v-model="editForm.subSystemNum" v-model="editForm.subsystemCode"
placeholder="请输入子系统编号" placeholder="请输入子系统编号"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="车辆编号" label="车辆编号"
prop="carNum"> prop="trafficCode">
<el-input <el-input
:disabled="disabled" :disabled="disabled"
v-model="editForm.carNum" v-model="editForm.trafficCode"
placeholder="请输入车辆编号" placeholder="请输入车辆编号"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="type"> <el-form-item label="类型" prop="systemType">
<el-select v-model="editForm.type" placeholder="请选择类型" clearable filterable> <el-select v-model="editForm.systemType" placeholder="请选择类型" clearable filterable>
<el-option label="座椅" value="1"></el-option> <el-option label="座椅" value="1"></el-option>
<el-option label="桌板" value="2"></el-option> <el-option label="桌板" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="生产厂家" prop="manufacturer"> <el-form-item label="生产厂家" prop="merchantName">
<el-input v-model="editForm.manufacturer" placeholder="请输入生产厂家" clearable></el-input> <el-input v-model="editForm.merchantName" placeholder="请输入生产厂家" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="发送结点序列" prop="xl"> <el-form-item label="发送结点序列" prop="sendSequence">
<el-input v-model="editForm.xl" placeholder="请输入发送结点序列" clearable></el-input> <el-input v-model="editForm.sendSequence" placeholder="请输入发送结点序列" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="发送节点端口" prop="jk"> <el-form-item label="发送节点端口" prop="sendPort">
<el-input v-model="editForm.jk" placeholder="请输入发送节点端口" clearable></el-input> <el-input v-model="editForm.sendPort" placeholder="请输入发送节点端口" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="网关地址" prop="wgdz"> <el-form-item label="网关地址" prop="gatewayUrl">
<el-input v-model="editForm.wgdz" placeholder="请输入网关地址" clearable></el-input> <el-input v-model="editForm.gatewayUrl" placeholder="请输入网关地址" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="网关端口" prop="wgdk"> <el-form-item label="网关端口" prop="gatewayPort">
<el-input v-model="editForm.wgdk" placeholder="请输入网关端口" clearable></el-input> <el-input v-model="editForm.gatewayPort" placeholder="请输入网关端口" clearable></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
...@@ -73,28 +73,28 @@ export default { ...@@ -73,28 +73,28 @@ export default {
return { return {
disabled: false, disabled: false,
rules: { rules: {
subSystemNum: [ subsystemCode: [
{ required: true, message: '请输入子系统编号', trigger: 'blur' } { required: true, message: '请输入子系统编号', trigger: 'blur' }
], ],
carNum: [ trafficCode: [
{ required: true, message: '请输入车辆编号', trigger: 'blur' } { required: true, message: '请输入车辆编号', trigger: 'blur' }
], ],
type: [ systemType: [
{ required: true, message: '请选择类型', trigger: 'change' } { required: true, message: '请选择类型', trigger: 'change' }
], ],
manufacturer: [ merchantName: [
{ required: true, message: '请输入生产厂家', trigger: 'blur' } { required: true, message: '请输入生产厂家', trigger: 'blur' }
], ],
xl: [ sendSequence: [
{ required: true, message: '请输入发送节点序列', trigger: 'blur' } { required: true, message: '请输入发送节点序列', trigger: 'blur' }
], ],
jk: [ sendPort: [
{ required: true, message: '请输入发送节点端口', trigger: 'blur' } { required: true, message: '请输入发送节点端口', trigger: 'blur' }
], ],
wgdz: [ gatewayUrl: [
{ required: true, message: '请输入网关地址', trigger: 'blur' } { required: true, message: '请输入网关地址', trigger: 'blur' }
], ],
wgdk: [ gatewayPort: [
{ required: true, message: '请输入网关端口', trigger: 'blur' } { required: true, message: '请输入网关端口', trigger: 'blur' }
] ]
} }
...@@ -110,8 +110,7 @@ export default { ...@@ -110,8 +110,7 @@ export default {
watch: { watch: {
isVisible (val) { isVisible (val) {
this.disabled = !!this.editForm.subSystemNum this.disabled = this.editForm.subsystemCode ? true : false
// this.editForm.interface = this.editForm.carNum ? this.editForm.interface : '1'
this.$refs.editRuleForm.resetFields() this.$refs.editRuleForm.resetFields()
} }
}, },
......
...@@ -7,19 +7,19 @@ ...@@ -7,19 +7,19 @@
label-width="85px" label-width="85px"
> >
<el-form-item label="子系统编号"> <el-form-item label="子系统编号">
<el-input v-model="searchForm.subSystemNum" placeholder="请输入子系统编号" clearable></el-input> <el-input v-model="searchForm.subsystemCode" placeholder="请输入子系统编号" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="类型"> <el-form-item label="类型">
<el-select v-model="searchForm.type" placeholder="请选择类型" clearable filterable> <el-select v-model="searchForm.systemTypeCode" placeholder="请选择类型" clearable filterable>
<el-option label="座椅" value="1"></el-option> <el-option label="座椅" value="1"></el-option>
<el-option label="桌板" value="2"></el-option> <el-option label="桌板" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="车辆编号"> <el-form-item label="车辆编号">
<el-input v-model="searchForm.carNum" placeholder="请输入车辆编号" clearable></el-input> <el-input v-model="searchForm.trafficCode" placeholder="请输入车辆编号" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="生产厂家"> <el-form-item label="生产厂家">
<el-input v-model="searchForm.manufacturer" placeholder="请输入生产厂家" clearable></el-input> <el-input v-model="searchForm.merchantName" placeholder="请输入生产厂家" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
...@@ -97,6 +97,8 @@ ...@@ -97,6 +97,8 @@
<script> <script>
import EditDialog from './editDialog' import EditDialog from './editDialog'
import { getListApi, methods, editApi, removeApi } from '@api/subSysManagement'
import notice from '@/common/notice'
export default { export default {
name: 'subSysManagement', name: 'subSysManagement',
components: { components: {
...@@ -107,74 +109,74 @@ export default { ...@@ -107,74 +109,74 @@ export default {
// 新增/编辑弹窗 // 新增/编辑弹窗
editVisible: false, editVisible: false,
editForm: { editForm: {
subSystemNum: '', subsystemCode: '',
type: '', systemType: '',
carNum: '', trafficCode: '',
manufacturer: '', merchantName: '',
xl: '', sendSequence: '',
jk: '', sendPort: '',
wgdz: '', gatewayUrl: '',
wgdk: '' gatewayPort: ''
}, },
// 搜索 // 搜索
searchForm: { searchForm: {
subSystemNum: '', subsystemCode: '',
type: '', systemTypeCode: '',
carNum: '', trafficCode: '',
manufacturer: '' merchantName: ''
}, },
tableData: [{ tableData: [{
subSystemNum: '3#1F', subsystemCode: '3#1F',
type: '座椅', systemType: '座椅',
carNum: 'CRH45661-5648', trafficCode: 'CRH45661-5648',
manufacturer: '长春通富机电设备有限公司', merchantName: '长春通富机电设备有限公司',
xl: '1.56', sendSequence: '1.56',
jk: '4000', sendPort: '4000',
wgdz: '192.168.1.1', gatewayUrl: '192.168.1.1',
wgdk: '8000' gatewayPort: '8000'
}, { }, {
subSystemNum: '3#2F', subsystemCode: '3#2F',
type: '桌板', systemType: '桌板',
carNum: 'CRH45661-5648', trafficCode: 'CRH45661-5648',
manufacturer: '长春通富机电设备有限公司', merchantName: '长春通富机电设备有限公司',
xl: '1.56', sendSequence: '1.56',
jk: '4000', sendPort: '4000',
wgdz: '192.168.1.1', gatewayUrl: '192.168.1.1',
wgdk: '8000' gatewayPort: '8000'
}, { }, {
subSystemNum: '3#3F', subsystemCode: '3#3F',
type: '座椅', systemType: '座椅',
carNum: 'CRH45661-5648', trafficCode: 'CRH45661-5648',
manufacturer: '长春通富机电设备有限公司', merchantName: '长春通富机电设备有限公司',
xl: '1.56', sendSequence: '1.56',
jk: '4000', sendPort: '4000',
wgdz: '192.168.1.1', gatewayUrl: '192.168.1.1',
wgdk: '8000' gatewayPort: '8000'
}], }],
tableColumns: [{ tableColumns: [{
label: '子系统编号', label: '子系统编号',
prop: 'subSystemNum' prop: 'subsystemCode'
}, { }, {
label: '类型', label: '类型',
prop: 'type' prop: 'systemType'
}, { }, {
label: '车辆编号', label: '车辆编号',
prop: 'carNum' prop: 'trafficCode'
}, { }, {
label: '生产厂家', label: '生产厂家',
prop: 'manufacturer' prop: 'merchantName'
}, { }, {
label: '发送结点序列', label: '发送结点序列',
prop: 'xl' prop: 'sendSequence'
}, { }, {
label: '发送结点接口', label: '发送结点接口',
prop: 'jk' prop: 'sendPort'
}, { }, {
label: '网关地址', label: '网关地址',
prop: 'wgdz' prop: 'gatewayUrl'
}, { }, {
label: '网关端口', label: '网关端口',
prop: 'wgdk' prop: 'gatewayPort'
}], }],
// 页码 // 页码
currentPage: 1, currentPage: 1,
...@@ -183,10 +185,49 @@ export default { ...@@ -183,10 +185,49 @@ export default {
} }
}, },
mounted() {
this.loadingGetList()
},
methods: { methods: {
loadingGetList () {
this.tableLoading = true
this.getList()
},
/* 接口请求-start */
getParams () {
return {
pageCount: this.pageSize,
pageSize: this.currentPage,
...this.searchForm
}
},
getList () {
const params = this.getParams()
getListApi(params).then(res => {
this.tableData = res
this.tableLoading = false
}).catch(err => {
notice.errorTips(err)
this.tableLoading = false
})
},
editSubSystem(value) {
const params = value
params.method = value.id ? methods.Edit : methods.Add
editApi(params).then(res => {
this.handleEditClose()
notice.okTips()
this.loadingGetList()
}).catch(err => {
notice.errorTips()
})
},
/* 接口请求-end */
// 搜索 // 搜索
handleSearch () { handleSearch () {
console.log(this.searchForm) console.log(this.searchForm)
this.loadingGetList()
}, },
// 页码 // 页码
...@@ -194,12 +235,14 @@ export default { ...@@ -194,12 +235,14 @@ export default {
console.log(value) console.log(value)
this.pageSize = value this.pageSize = value
// 调接口 // 调接口
this.loadingGetList()
}, },
handleCurrentChange (value) { handleCurrentChange (value) {
console.log(value) console.log(value)
this.currentPage = value this.currentPage = value
// 调接口 // 调接口
this.loadingGetList()
}, },
resetForm (obj) { resetForm (obj) {
...@@ -213,18 +256,22 @@ export default { ...@@ -213,18 +256,22 @@ export default {
}, },
handleAdd () { handleAdd () {
console.log(this.editForm)
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
}, },
handleEditClose () { handleEditClose () {
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
this.resetForm(this.editForm) this.resetForm(this.editForm)
console.log(this.editForm)
}, },
handleEditConfirm () { handleEditConfirm () {
console.log(JSON.parse(JSON.stringify(this.editForm))) console.log(JSON.parse(JSON.stringify(this.editForm)))
this.editVisible = !this.editVisible var editParams = JSON.parse(JSON.stringify(this.editForm))
this.resetForm(this.editForm) this.editSubSystem(this.editForm)
// this.editVisible = !this.editVisible
// this.resetForm(this.editForm)
}, },
// 表格-编辑 // 表格-编辑
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<script> <script>
import EditDialog from './editDialog' import EditDialog from './editDialog'
import { getListApi, addApi, editApi, removeApi } from '@api/trafficManagement' import { getListApi, methods, editApi, removeApi } from '@api/trafficManagement'
import notice from '@/common/notice' import notice from '@/common/notice'
export default { export default {
name: 'trafficManagement', name: 'trafficManagement',
...@@ -175,7 +175,6 @@ export default { ...@@ -175,7 +175,6 @@ export default {
}, },
getList () { getList () {
const params = this.getParams() const params = this.getParams()
// params.method = trafficManageMethods.Search
getListApi(params).then(res => { getListApi(params).then(res => {
this.tableData = res this.tableData = res
this.tableLoading = false this.tableLoading = false
...@@ -184,9 +183,10 @@ export default { ...@@ -184,9 +183,10 @@ export default {
this.tableLoading = false this.tableLoading = false
}) })
}, },
addTraffic (value) { editTraffic(value) {
const params = value const params = value
addApi(params).then(res => { params.method = value.id ? methods.Edit : methods.Add
editApi(params).then(res => {
this.handleEditClose() this.handleEditClose()
notice.okTips() notice.okTips()
this.loadingGetList() this.loadingGetList()
...@@ -227,19 +227,20 @@ export default { ...@@ -227,19 +227,20 @@ export default {
}, },
handleAdd () { handleAdd () {
console.log(this.editForm)
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
}, },
handleEditClose () { handleEditClose () {
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
this.resetForm(this.editForm) this.resetForm(this.editForm)
console.log(this.editForm)
}, },
handleEditConfirm () { handleEditConfirm () {
console.log(JSON.parse(JSON.stringify(this.editForm))) console.log(JSON.parse(JSON.stringify(this.editForm)))
var editParams = JSON.parse(JSON.stringify(this.editForm)) var editParams = JSON.parse(JSON.stringify(this.editForm))
// this.editVisible = !this.editVisible this.editTraffic(editParams)
// this.resetForm(this.editForm)
}, },
// 表格-编辑 // 表格-编辑
......
...@@ -32,33 +32,9 @@ ...@@ -32,33 +32,9 @@
<el-col>登录日志列表</el-col> <el-col>登录日志列表</el-col>
</el-row> </el-row>
<el-table <el-table
:data="tableData" :table="tableData"
border v-loading="tableLoading"
style="margin: 20px 0;"
> >
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
align="center"
>
<template slot-scope="scope">
<template v-if="item.formatter">
{{item.formatter(scope.row)}}
</template>
<template v-else>
{{tableData[scope.$index][item.prop]}}
</template>
</template>
</el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
background background
...@@ -75,10 +51,12 @@ ...@@ -75,10 +51,12 @@
</template> </template>
<script> <script>
import { getLoginlogs } from '@api/userManage'
export default { export default {
name: 'loginLogs', name: 'loginLogs',
data () { data () {
return { return {
tableLoading: false,
times: [], times: [],
searchForm: { searchForm: {
beginTime: '', beginTime: '',
...@@ -86,58 +64,135 @@ export default { ...@@ -86,58 +64,135 @@ export default {
field: '', field: '',
loginType: '' loginType: ''
}, },
tableData: [{ // tableData: [{
loginTime: '2019-08-16 14:45:21', // loginTime: '2019-08-16 14:45:21',
loginUser: 'abc123', // loginUser: 'abc123',
userName: '张三', // userName: '张三',
phone: '13511111111', // phone: '13511111111',
loginType: 'PC', // loginType: 'PC',
loginDevice: 'win10/chrome' // loginDevice: 'win10/chrome'
}, { // }, {
loginTime: '2019-08-16 14:45:21', // loginTime: '2019-08-16 14:45:21',
loginUser: 'abc123', // loginUser: 'abc123',
userName: '李四', // userName: '李四',
phone: '13511111111', // phone: '13511111111',
loginType: '小程序', // loginType: '小程序',
loginDevice: 'iphone8' // loginDevice: 'iphone8'
}, { // }, {
loginTime: '2019-08-16 14:45:21', // loginTime: '2019-08-16 14:45:21',
loginUser: 'abc123', // loginUser: 'abc123',
userName: '王五', // userName: '王五',
phone: '13511111111', // phone: '13511111111',
loginType: 'PC', // loginType: 'PC',
loginDevice: 'win10/chrome' // loginDevice: 'win10/chrome'
}], // }],
tableColumns: [{ // tableColumns: [{
label: '登录时间', // label: '登录时间',
prop: 'loginTime' // prop: 'loginTime'
}, { // }, {
label: '登录用户', // label: '登录用户',
prop: 'loginUser' // prop: 'loginUser'
}, { // }, {
label: '姓名', // label: '姓名',
prop: 'userName' // prop: 'userName'
}, { // }, {
label: '联系电话', // label: '联系电话',
prop: 'phone' // prop: 'phone'
}, { // }, {
label: '登录方式', // label: '登录方式',
prop: 'loginType' // prop: 'loginType'
}, { // }, {
label: '登录设备', // label: '登录设备',
prop: 'loginDevice' // prop: 'loginDevice'
}], // }],
tableData: {
border: true,
align: 'center',
// height: parseInt(this.$client_height() - 140),
data: [],
column: [
{
label: '登录时间',
prop: 'loginTime'
},
{
label: '登录用户',
prop: 'loginUser'
},
{
label: '姓名',
prop: 'userName'
},
{
label: '联系电话',
prop: 'phone'
},
{
label: '登录方式',
prop: 'loginType'
},
{
label: '登录设备',
prop: 'loginDevice'
}
],
number: {
label: '序号',
width: '50px',
index: index => {
++index
return index < 10 && index > 0 ? '0' + index : index
}
},
console: {
}
},
// 页码 // 页码
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
total: 30 total: 10
} }
}, },
mounted() {
this.loadingGetList()
},
methods: { methods: {
loadingGetList() {
this.tableLoading = true
this.getList()
},
getParams() {
return Object.assign(
{
pageCount: this.pageSize,
pageSize: this.pageNum
},
this.searchForm
)
},
getList() {
if (this.times.length) {
this.searchForm.beginTime = this.times[0]
this.searchForm.endTime = this.times[1]
}
const params = this.getParams()
getLoginlogs(params).then(res => {
// res.pagination && (this.total = res.pagination.totalCount)
this.tableData.data = res
console.log(this.tableData)
this.tableLoading = false
})
.catch(err => {
this.tableLoading = false
console.log(err)
})
},
// 搜索 // 搜索
handleSearch () { handleSearch () {
console.log(this.searchForm) this.loadingGetList()
}, },
// 页码 // 页码
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!