Commit 05847f2f by liimin

合并冲突

2 parents fe04a447 bd581883
...@@ -11,7 +11,13 @@ function reportApi (data) { ...@@ -11,7 +11,13 @@ function reportApi (data) {
return request(data) return request(data)
} }
function exportApi (data) {
data.method = `${path}export`
return request(data)
}
export { export {
getListApi, getListApi,
reportApi reportApi,
exportApi
} }
...@@ -31,7 +31,10 @@ export const home = { ...@@ -31,7 +31,10 @@ export const home = {
auth: [{ auth: [{
authId: '10101', authId: '10101',
parentId: '101', parentId: '101',
label: '导出' label: '导出',
type: 'button',
category:'Button',
handle: 'exportFile'
}] }]
} }
export const sys = [ export const sys = [
...@@ -144,15 +147,20 @@ export const resources = { ...@@ -144,15 +147,20 @@ export const resources = {
auth: [{ auth: [{
authId: '10201', authId: '10201',
parentId: '102', parentId: '102',
label: '编辑' label: '编辑',
handle: 'handleEdit'
}, { }, {
authId: '10202', authId: '10202',
parentId: '102', parentId: '102',
label: '删除' label: '删除',
handle: 'handleDelete'
}, { }, {
authId: '10203', authId: '10203',
parentId: '102', parentId: '102',
label: '添加车辆' label: '添加车辆',
category: 'Button',
type: 'button',
handle: 'handleEdit'
}] }]
}, },
'103': { '103': {
...@@ -169,15 +177,20 @@ export const resources = { ...@@ -169,15 +177,20 @@ export const resources = {
auth: [{ auth: [{
authId: '10301', authId: '10301',
parentId: '103', parentId: '103',
label: '编辑' label: '编辑',
handle: 'handleEdit'
}, { }, {
authId: '10302', authId: '10302',
parentId: '103', parentId: '103',
label: '删除' label: '删除',
handle: 'handleDelete'
}, { }, {
authId: '10303', authId: '10303',
parentId: '103', parentId: '103',
label: '添加子系统' label: '添加子系统',
category: 'Button',
type: 'button',
handle: 'handleEdit'
}] }]
}, },
'104': { '104': {
...@@ -194,19 +207,26 @@ export const resources = { ...@@ -194,19 +207,26 @@ export const resources = {
auth: [{ auth: [{
authId: '10401', authId: '10401',
parentId: '104', parentId: '104',
label: '编辑' label: '编辑',
handle: 'handleEdit'
}, { }, {
authId: '10402', authId: '10402',
parentId: '104', parentId: '104',
label: '删除' label: '删除',
handle: 'handleDelete'
}, { }, {
authId: '10403', authId: '10403',
parentId: '104', parentId: '104',
label: '导入' label: '导出',
type:'button',
category:'Button',
handle: 'exportFile'
}, { }, {
authId: '10404', authId: '10404',
parentId: '104', parentId: '104',
label: '导出' label: '导入',
type:'button',
category:'Button'
}] }]
}, },
'105': { '105': {
...@@ -247,15 +267,20 @@ export const resources = { ...@@ -247,15 +267,20 @@ export const resources = {
auth: [{ auth: [{
authId: '1060101', authId: '1060101',
parentId: '10601', parentId: '10601',
label: '查看详情' label: '查看详情',
handle: 'handleDetail'
}, { }, {
authId: '1060102', authId: '1060102',
parentId: '10601', parentId: '10601',
label: '删除' label: '删除',
handle: 'handleDelete'
}, { }, {
authId: '1060103', authId: '1060103',
parentId: '10601', parentId: '10601',
label: '订单下载' label: '订单下载',
category: 'Button',
type: 'button',
handle: 'exportFile'
}] }]
}, },
'10602': { '10602': {
...@@ -272,11 +297,15 @@ export const resources = { ...@@ -272,11 +297,15 @@ export const resources = {
auth: [{ auth: [{
authId: '1060201', authId: '1060201',
parentId: '10602', parentId: '10602',
label: '删除' label: '删除',
handle: 'handleDelete'
}, { }, {
authId: '1060202', authId: '1060202',
parentId: '10602', parentId: '10602',
label: '导出订单' label: '导出订单',
category: 'Button',
type: 'button',
handle: 'exportOrder'
}] }]
}, },
'107': { '107': {
......
...@@ -27,11 +27,9 @@ ...@@ -27,11 +27,9 @@
</el-form> </el-form>
<el-row style="height: 40px; line-height: 40px"> <el-row style="height: 40px; line-height: 40px">
<el-col :span="12">物料列表</el-col> <el-col :span="12">物料列表</el-col>
<el-col :span="12" style="text-align: right"> <el-col :span="12" style="text-align: right; position: relative;">
<auth-button <auth-button
label="导入" category="Button"
class="import-button"
type=""
> >
<input <input
type="file" type="file"
...@@ -39,7 +37,7 @@ ...@@ -39,7 +37,7 @@
accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)" /> @change="importFile($event)" />
</auth-button> </auth-button>
<auth-button label="导出" type=""></auth-button> <!-- <auth-button label="导出" type="Button" @e-auth-click="exportFile"></auth-button> -->
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
...@@ -76,14 +74,15 @@ ...@@ -76,14 +74,15 @@
label="操作" label="操作"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <auth-button :data="scope.row"></auth-button>
<!-- <el-button
type="text" type="text"
@click="handleEdit(scope.row, scope.$index)" @click="handleEdit(scope.row, scope.$index)"
>编辑</el-button> >编辑</el-button>
<el-button <el-button
type="text" type="text"
@click="handleDelete(scope.$index, scope.row)" @click="handleDelete(scope.$index, scope.row)"
>删除</el-button> >删除</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -229,6 +228,15 @@ export default { ...@@ -229,6 +228,15 @@ export default {
notice.errorTips() notice.errorTips()
}) })
}, },
exportFile () {
const params = this.getParams()
exportApi(params).then(res => {
notice.okTips()
}).catch(err => {
notice.errorTips()
})
},
/* 接口请求-end */ /* 接口请求-end */
// 搜索 // 搜索
handleSearch () { handleSearch () {
...@@ -262,7 +270,7 @@ export default { ...@@ -262,7 +270,7 @@ export default {
}, },
// 表格-编辑 // 表格-编辑
handleEdit (row, index = -1) { handleEdit (row) {
// console.log(index) // console.log(index)
// console.log(row) // console.log(row)
console.log(row) console.log(row)
...@@ -270,7 +278,7 @@ export default { ...@@ -270,7 +278,7 @@ export default {
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
}, },
handleDelete (index, row) { handleDelete (row) {
this.$confirm('确认删除?', '删除', { this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认', comfirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -294,15 +302,15 @@ export default { ...@@ -294,15 +302,15 @@ export default {
</script> </script>
<style scoped> <style scoped>
.import-button { /* .import-button {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
cursor: pointer; cursor: pointer;
} } */
.import-input { .import-input {
opacity: 0; opacity: 0;
position: absolute; position: absolute;
left: 0; right: 0;
top: 0; top: 0;
width: 70px; width: 70px;
height: 100%; height: 100%;
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
<el-row style="height: 40px; line-height: 40px"> <el-row style="height: 40px; line-height: 40px">
<el-col :span="12">作业单列表</el-col> <el-col :span="12">作业单列表</el-col>
<el-col :span="12" style="text-align: right"> <el-col :span="12" style="text-align: right">
<auth-button label="导出订单" type="" @e-auth-click="exportOrder"></auth-button> <auth-button category="Button"></auth-button>
<!-- <auth-button label="导出订单" type="" @e-auth-click="exportOrder"></auth-button> -->
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
...@@ -82,9 +83,12 @@ ...@@ -82,9 +83,12 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<auth-button <auth-button
:data="scope.row"
></auth-button>
<!-- <auth-button
label="删除" label="删除"
@e-auth-click="handleDelete(scope.$index, scope.row)" @e-auth-click="handleDelete(scope.$index, scope.row)"
></auth-button> ></auth-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -306,7 +310,7 @@ export default { ...@@ -306,7 +310,7 @@ export default {
this.loadingGetList() this.loadingGetList()
}, },
handleDelete (index, row) { handleDelete (row) {
this.$confirm('确认删除?', '删除', { this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认', comfirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<div class="detailDialog"> <div class="detailDialog">
<el-dialog <el-dialog
:visible.sync="isVisible" :visible.sync="isVisible"
:title="title"
:before-close="handleClose" :before-close="handleClose"
width="800px"
> >
<!-- <embed src="file:///D:/project需求/高铁/物料申请单_20190830150550.pdf" width="100%" height="800px"></embed> --> <!-- <embed src="file:///D:/project需求/高铁/物料申请单_20190830150550.pdf" width="100%" height="800px"></embed> -->
<iframe width="100%" height="800px" scrolling="yes" frameborder="0" src="https://web.stanford.edu/~xgzhou/zhou_book2017.pdf"></iframe> <iframe width="100%" height="800px" scrolling="yes" frameborder="0" src="https://web.stanford.edu/~xgzhou/zhou_book2017.pdf"></iframe>
<!-- <iframe width="100%" height="550px" scrolling="yes" frameborder="0" src="https://pan.baidu.com/s/1Juauwf2c5nkNZuj6rc0W0Q"></iframe> -->
<!-- <embed width="100%" height="800px" src="https://web.stanford.edu/~xgzhou/zhou_book2017.pdf"> --> <!-- <embed width="100%" height="800px" src="https://web.stanford.edu/~xgzhou/zhou_book2017.pdf"> -->
</el-dialog> </el-dialog>
</div> </div>
...@@ -24,7 +27,8 @@ export default { ...@@ -24,7 +27,8 @@ export default {
isVisible: { isVisible: {
type: Boolean, type: Boolean,
default: false default: false
} },
title: ''
}, },
mounted () {}, mounted () {},
...@@ -37,10 +41,8 @@ export default { ...@@ -37,10 +41,8 @@ export default {
} }
</script> </script>
<style scoped> <style>
.header-title { .detailDialog .el-dialog__body {
text-align: center; padding: 0 20px;
font-size: 18px;
font-weight: bold;
} }
</style> </style>
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
<el-row style="height: 40px; line-height: 40px"> <el-row style="height: 40px; line-height: 40px">
<el-col :span="12">订单列表</el-col> <el-col :span="12">订单列表</el-col>
<el-col :span="12" style="text-align: right"> <el-col :span="12" style="text-align: right">
<auth-button label="订单下载" type=""></auth-button> <auth-button category="Button"></auth-button>
<!-- <auth-button label="订单下载" type="" @e-auth-click="exportFile"></auth-button> -->
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
...@@ -71,14 +72,15 @@ ...@@ -71,14 +72,15 @@
label="操作" label="操作"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<auth-button <auth-button :data="scope.row"></auth-button>
<!-- <el-button
label="查看详情" label="查看详情"
@e-auth-click="handleDetail(scope.row, scope.$index)" @click="handleDetail(scope.row, scope.$index)"
></auth-button> ></el-button>
<auth-button <auth-button
label="删除" label="删除"
@e-auth-click="handleDelete(scope.$index, scope.row)" @e-auth-click="handleDelete(scope.$index, scope.row)"
></auth-button> ></auth-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -95,6 +97,7 @@ ...@@ -95,6 +97,7 @@
</el-pagination> </el-pagination>
<detail-dialog <detail-dialog
:isVisible="detailVisible" :isVisible="detailVisible"
:title="dialogTitle"
@closeDialog="handleDetailClose" @closeDialog="handleDetailClose"
></detail-dialog> ></detail-dialog>
</d2-container> </d2-container>
...@@ -112,6 +115,7 @@ export default { ...@@ -112,6 +115,7 @@ export default {
data () { data () {
return { return {
detailVisible: false, detailVisible: false,
dialogTitle: '',
// 搜索 // 搜索
searchForm: { searchForm: {
orderCode: '', orderCode: '',
...@@ -195,6 +199,14 @@ export default { ...@@ -195,6 +199,14 @@ export default {
notice.errorTips() notice.errorTips()
}) })
}, },
exportFile () {
const params = this.getParams()
downloadApi(params).then(res => {
notice.okTips()
}).catch(err => {
notice.errorTips()
})
},
/* 接口请求-end */ /* 接口请求-end */
// 搜索 // 搜索
handleSearch () { handleSearch () {
...@@ -217,43 +229,22 @@ export default { ...@@ -217,43 +229,22 @@ export default {
this.loadingGetList() this.loadingGetList()
}, },
// resetForm (obj) {
// for (var item in obj) {
// if (obj[item] instanceof Array) {
// obj[item] = []
// } else {
// obj[item] = ''
// }
// }
// },
handleDetailClose () { handleDetailClose () {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
}, },
// handleEditConfirm () {
// console.log(JSON.parse(JSON.stringify(this.editForm)))
// var editParams = JSON.parse(JSON.stringify(this.editForm))
// this.editSubSystem(this.editForm)
// },
// 表格-查看详情 // 表格-查看详情
handleDetail (row, index = -1) { handleDetail (row) {
this.dialogTitle = row.orderType
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
}, },
handleDelete (index, row) { handleDelete (row) {
this.$confirm('确认删除?', '删除', { this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认', comfirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// console.log(index)
// console.log(row)
// this.$message({
// type: 'success',
// message: '删除成功'
// })
removeApi(row).then(res => { removeApi(row).then(res => {
notice.okTips() notice.okTips()
}).catch(err => { }).catch(err => {
......
...@@ -28,8 +28,9 @@ ...@@ -28,8 +28,9 @@
<el-row style="height: 40px; line-height: 40px"> <el-row style="height: 40px; line-height: 40px">
<el-col :span="12">子系统列表</el-col> <el-col :span="12">子系统列表</el-col>
<el-col :span="12" style="text-align: right"> <el-col :span="12" style="text-align: right">
<auth-button category="Button" :data="editFormReset"></auth-button>
<!-- <el-button @click="handleEdit(editFormReset)">添加子系统</el-button> --> <!-- <el-button @click="handleEdit(editFormReset)">添加子系统</el-button> -->
<auth-button label="添加子系统" type="" @e-auth-click="handleEdit(editFormReset)">添加子系统</auth-button> <!-- <auth-button label="添加子系统" type="" @e-auth-click="handleEdit(editFormReset)"></auth-button> -->
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
...@@ -67,13 +68,16 @@ ...@@ -67,13 +68,16 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<auth-button <auth-button
:data="scope.row"
></auth-button>
<!-- <auth-button
label="编辑" label="编辑"
@e-auth-click="handleEdit(scope.row, scope.$index)" @e-auth-click="handleEdit(scope.row, scope.$index)"
></auth-button> ></auth-button>
<auth-button <auth-button
label="删除" label="删除"
@e-auth-click="handleDelete(scope.$index, scope.row)" @e-auth-click="handleDelete(scope.$index, scope.row)"
></auth-button> ></auth-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -254,12 +258,12 @@ export default { ...@@ -254,12 +258,12 @@ export default {
}, },
// 表格-编辑 // 表格-编辑
handleEdit (row, index = -1) { handleEdit (row) {
this.editForm = JSON.parse(JSON.stringify(row)) this.editForm = JSON.parse(JSON.stringify(row))
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
}, },
handleDelete (index, row) { handleDelete (row) {
this.$confirm('确认删除?', '删除', { this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认', comfirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
<el-row style="height: 40px; line-height: 40px"> <el-row style="height: 40px; line-height: 40px">
<el-col :span="12">车辆状态列表</el-col> <el-col :span="12">车辆状态列表</el-col>
<el-col :span="12" style="text-align: right"> <el-col :span="12" style="text-align: right">
<!-- <el-button>导出</el-button> --> <auth-button category="Button"></auth-button>
<auth-button label="导出" type="Button"></auth-button> <!-- <auth-button label="导出" type="Button" @e-auth-click="exportFile"></auth-button> -->
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</template> </template>
<script> <script>
import { getListApi, reportApi } from '@api/systemMonitor' import { getListApi, reportApi, exportApi } from '@api/systemMonitor'
import notice from '@/common/notice' import notice from '@/common/notice'
require('echarts/lib/chart/pie') require('echarts/lib/chart/pie')
require("echarts/lib/component/tooltip"); require("echarts/lib/component/tooltip");
...@@ -281,6 +281,14 @@ export default { ...@@ -281,6 +281,14 @@ export default {
notice.errorTips(err) notice.errorTips(err)
}) })
}, },
exportFile () {
const params = this.getParams()
exportApi(params).then(res => {
notice.okTips()
}).catch(err => {
notice.errorTips()
})
},
/* 接口请求-end */ /* 接口请求-end */
/* onlineNum Int 在网数量 /* onlineNum Int 在网数量
offlineNum int 离网数量 offlineNum int 离网数量
......
...@@ -31,8 +31,9 @@ ...@@ -31,8 +31,9 @@
<el-row style="height: 40px; line-height: 40px"> <el-row style="height: 40px; line-height: 40px">
<el-col :span="12">车辆列表</el-col> <el-col :span="12">车辆列表</el-col>
<el-col :span="12" style="text-align: right"> <el-col :span="12" style="text-align: right">
<auth-button category="Button" :data="editFormReset"></auth-button>
<!-- <el-button @click="handleEdit(editFormReset)">添加车辆</el-button> --> <!-- <el-button @click="handleEdit(editFormReset)">添加车辆</el-button> -->
<auth-button label="添加车辆" type="" @e-auth-click="handleEdit(editFormReset)"></auth-button> <!-- <auth-button label="添加车辆" type="" @e-auth-click="handleEdit(editFormReset)"></auth-button> -->
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
...@@ -69,14 +70,15 @@ ...@@ -69,14 +70,15 @@
label="操作" label="操作"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<auth-button <auth-button :data="scope.row"></auth-button>
<!-- <auth-button
label="编辑" label="编辑"
@e-auth-click="handleEdit(scope.row, scope.$index)" @e-auth-click="handleEdit(scope.row, scope.$index)"
></auth-button> ></auth-button>
<auth-button <auth-button
label="删除" label="删除"
@e-auth-click="handleDelete(scope.$index, scope.row)" @e-auth-click="handleDelete(scope.$index, scope.row)"
></auth-button> ></auth-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -248,14 +250,14 @@ export default { ...@@ -248,14 +250,14 @@ export default {
}, },
// 表格-编辑 // 表格-编辑
handleEdit (row, index = -1) { handleEdit (row) {
// console.log(index) // console.log(index)
// console.log(row) // console.log(row)
this.editForm = JSON.parse(JSON.stringify(row)) this.editForm = JSON.parse(JSON.stringify(row))
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
}, },
handleDelete (index, row) { handleDelete (row) {
this.$confirm('确认删除?', '删除', { this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认', comfirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!