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