Commit d5893268 by liimin

调整样式

2 parents 1902227d 389169dc
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<body> <body>
<noscript> <noscript>
<strong> <strong>
很抱歉,如果没有 JavaScript 支持,D2Admin 将不能正常工作。请启用浏览器的 JavaScript 然后继续。 很抱歉,如果没有 JavaScript 支持,系统 将不能正常工作。请启用浏览器的 JavaScript 然后继续。
</strong> </strong>
</noscript> </noscript>
<div id="app"> <div id="app">
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
</div> </div>
<div class="d2-home__footer"> <div class="d2-home__footer">
<a href="http://www.glsx.com.cn" target="_blank"> <a href="http://www.glsx.com.cn" target="_blank">
版权所有&copy-2019 GLSX粤ICP备12020087号 <!-- 版权所有&copy-2019 GLSX粤ICP备12020087号 -->
</a> </a>
</div> </div>
</div> </div>
......
import request from './request'
const path = 'fims.device.'
function getListApi(data) {
data.method = `${path}list`
return request(data)
}
function editApi (data) {
data.method = `${path}edit`
return request(data)
}
function removeApi (data) {
data.method = `${path}remove`
return request(data)
}
function importApi (data) {
data.method = `${path}import`
return request(data)
}
function exportApi (data) {
data.method = `${path}export`
return request(data)
}
export {
getListApi,
editApi,
removeApi,
importApi,
exportApi
}
\ No newline at end of file \ No newline at end of file
import request from './request'
const path = 'fims.maintain.'
function getListApi (data) {
data.method = `${path}search`
return request(data)
}
function removeApi (data) {
data.method = `${path}delete`
return request(data)
}
function exportApi (data) {
data.method = `${path}export`
return request(data)
}
export {
getListApi,
removeApi,
exportApi
}
\ No newline at end of file \ No newline at end of file
import request from './request'
const path = 'fims.order.'
function getListApi(data) {
data.method = `${path}search`
return request(data)
}
function detailApi (data) {
data.method = `${path}detail`
return request(data)
}
function removeApi (data) {
data.method = `${path}delete`
return request(data)
}
function downloadApi (data) {
data.method = `${path}download`
return request(data)
}
export {
getListApi,
detailApi,
removeApi,
downloadApi
}
\ No newline at end of file \ No newline at end of file
import request from './request'
const path = 'fims.material.'
function getListApi (data) {
data.method = `${path}list`
return request(data)
}
export {
getListApi
}
\ No newline at end of file \ No newline at end of file
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
padding: 0px; padding: 0px;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
transition: .1s ease;
.d2-theme-container-main-layer { .d2-theme-container-main-layer {
position: absolute; position: absolute;
top: 2px; top: 2px;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
background: $theme-bg-mask; background: $theme-bg-mask;
} }
} }
// 菜单项目 // 菜单项目
@mixin theme-menu-hover-style { @mixin theme-menu-hover-style {
color: $theme-menu-item-color-hover; color: $theme-menu-item-color-hover;
...@@ -243,6 +242,9 @@ ...@@ -243,6 +242,9 @@
} }
.d2-theme-container-main { .d2-theme-container-main {
background-color: $theme-container-main-background-color; background-color: $theme-container-main-background-color;
&.is-search{
background-color: rgba($theme-header-background-color,.5)
}
// 主体部分分为多页面控制器 和主体 // 主体部分分为多页面控制器 和主体
.d2-theme-container-main-header { .d2-theme-container-main-header {
// 多页面控制器 // 多页面控制器
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
betterScroll: { betterScroll: {
type: Boolean, type: Boolean,
required: false, required: false,
default: true default: false
} }
}, },
computed: { computed: {
......
...@@ -39,12 +39,12 @@ export default { ...@@ -39,12 +39,12 @@ export default {
}), }),
handleChange (value) { handleChange (value) {
this.sizeSet(value) this.sizeSet(value)
this.$notify({ // this.$notify({
title: '提示', // title: '提示',
dangerouslyUseHTMLString: true, // dangerouslyUseHTMLString: true,
message: '已更新页面内 <b>组件</b> 的 <b>默认尺寸</b><br/>例如按钮大小,<b>非字号</b>', // message: '已更新页面内 <b>组件</b> 的 <b>默认尺寸</b><br/>例如按钮大小,<b>非字号</b>',
type: 'success' // type: 'success'
}) // })
}, },
iconName (name) { iconName (name) {
return name === this.value ? 'dot-circle-o' : 'circle-o' return name === this.value ? 'dot-circle-o' : 'circle-o'
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="activeName === scope.row.name" v-if="activeName === scope.row.name"
type="success" type="primary"
icon="el-icon-check" icon="el-icon-check"
class="btn-active-success" class="btn-active-success"
round> round>
......
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
flex-box="0" flex-box="0"
flex="dir:top main:center cross:center" flex="dir:top main:center cross:center"
@click.self="handlePanelClick"> @click.self="handlePanelClick">
<d2-icon-svg <!-- <d2-icon-svg
class="panel-search__logo" class="panel-search__logo"
name="d2-admin-text"/> name="d2-admin-text"/> -->
<img src="./image/logo.png" alt="">
<el-autocomplete <el-autocomplete
class="panel-search__input" class="panel-search__input"
ref="input" ref="input"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
}" }"
flex-box="0" flex-box="0"
flex> flex>
<div class="logo-group d2-theme-header-logo" :style="{width: asideCollapse ? asideWidthCollapse : asideWidth}" flex-box="0"> <div class="logo-group d2-theme-header-logo" :class="asideCollapse ? 'logo-only' : 'logo-all'" flex-box="0">
<img v-if="asideCollapse" :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/icon-only.png`"> <img v-if="asideCollapse" :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/icon-only.png`">
<img v-else :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/all.png`"> <img v-else :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/all.png`">
</div> </div>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" --> <!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" -->
<d2-header-search @click="handleSearchClick"/> <d2-header-search @click="handleSearchClick"/>
<d2-header-log v-if="$env === 'development'"/> <d2-header-log v-if="$env === 'development'"/>
<d2-header-size v-if="$env === 'development'"/> <d2-header-size/>
<d2-header-fullscreen/> <d2-header-fullscreen/>
<d2-header-locales v-if="$env === 'development'"/> <d2-header-locales v-if="$env === 'development'"/>
<d2-header-theme/> <d2-header-theme/>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<d2-menu-side/> <d2-menu-side/>
</div> </div>
<!-- 主体 --> <!-- 主体 -->
<div class="d2-theme-container-main" flex-box="1" flex> <div class="d2-theme-container-main" :class="this.searchActive ? 'is-search' : ''" flex-box="1" flex>
<!-- 搜索 --> <!-- 搜索 -->
<transition name="fade-scale"> <transition name="fade-scale">
<div v-if="searchActive" class="d2-theme-container-main-layer" flex> <div v-if="searchActive" class="d2-theme-container-main-layer" flex>
...@@ -165,4 +165,20 @@ export default { ...@@ -165,4 +165,20 @@ export default {
<style lang="scss"> <style lang="scss">
// 注册主题 // 注册主题
@import '~@/assets/style/theme/register.scss'; @import '~@/assets/style/theme/register.scss';
.d2-theme-header-logo{
}
.logo-all{
width: 200px;
img{
height: 75px !important;
transform: translate3d(-8px, -6px, 0) !important;
}
}
.logo-only{
width:65px;
img{
height: 35px !important;
transform: translate3d(0px,12px,0) !important;
}
}
</style> </style>
...@@ -13,7 +13,6 @@ import router from './router' ...@@ -13,7 +13,6 @@ import router from './router'
// import menuHeader from '@/menu/header' // import menuHeader from '@/menu/header'
// import menuAside from '@/menu/aside' // import menuAside from '@/menu/aside'
// import { frameInRoutes } from '@/router/routes' // import { frameInRoutes } from '@/router/routes'
import echarts from 'echarts'
// import VRM from 'vue-role-manager' // import VRM from 'vue-role-manager'
// Vue.use(VRM, { // Vue.use(VRM, {
...@@ -24,7 +23,6 @@ import echarts from 'echarts' ...@@ -24,7 +23,6 @@ import echarts from 'echarts'
// 核心插件 // 核心插件
Vue.use(d2Admin) Vue.use(d2Admin)
// Vue.use(D2Crud) // Vue.use(D2Crud)
Vue.prototype.$echarts = echarts
new Vue({ new Vue({
router, router,
store, store,
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
// 事件传递 // 事件传递
Vue.prototype.$event = new Vue() Vue.prototype.$event = new Vue()
// Element // Element
Vue.use(ElementUI) Vue.use(ElementUI,{ size: 'medium', zIndex: 3000 })
// 插件 // 插件
Vue.use(pluginError) Vue.use(pluginError)
Vue.use(pluginLog) Vue.use(pluginLog)
......
...@@ -132,7 +132,7 @@ export const resources = { ...@@ -132,7 +132,7 @@ export const resources = {
}, },
// '102': { // '102': {
// path: 'trafficManagement', // path: 'trafficManagement',
// icon: 'folder-o', // icon: 'train',
// name: '车辆管理', // name: '车辆管理',
// meta: { // meta: {
// auth: true, // auth: true,
...@@ -160,11 +160,11 @@ export const resources = { ...@@ -160,11 +160,11 @@ export const resources = {
name: '车辆管理', name: '车辆管理',
meta: { meta: {
auth: true, auth: true,
title: '车辆管理', title: '物料管理',
id: '104', id: '104',
pid: '0' pid: '0'
}, },
component: _import('trafficManagement') component: _import('deviceManagement')
}, },
'105': { '105': {
path: '/bb', path: '/bb',
...@@ -173,33 +173,33 @@ export const resources = { ...@@ -173,33 +173,33 @@ export const resources = {
meta: { meta: {
auth: true, auth: true,
title: '单据管理', title: '单据管理',
id: '105', id: '106',
pid: '0' pid: '0'
} }
}, },
'10501': { '10601': {
path: '/cc', path: '/materiaOrderManagement',
icon: 'archive', icon: 'archive',
name: '物料订单管理', name: '物料订单管理',
meta: { meta: {
auth: true, auth: true,
title: '物料订单管理', title: '物料订单管理',
id: '10501', id: '10601',
pid: '105' pid: '106'
}, },
component: _import('trafficManagement') component: _import('materiaOrderManagement')
}, },
'10502': { '10602': {
path: '/dd', path: '/maintainManagement',
icon: 'list-ol', icon: 'list-ol',
name: '作业单管理', name: '作业单管理',
meta: { meta: {
auth: true, auth: true,
title: '作业单管理', title: '作业单管理',
id: '10502', id: '10602',
pid: '105' pid: '106'
}, },
component: _import('trafficManagement') component: _import('maintainManagement')
}, },
'107': { '107': {
path: '/user', path: '/user',
......
...@@ -82,6 +82,7 @@ export default { ...@@ -82,6 +82,7 @@ export default {
await dispatch('d2admin/page/openedLoad', null, { root: true }) await dispatch('d2admin/page/openedLoad', null, { root: true })
// DB -> store 持久化数据加载侧边栏折叠状态 // DB -> store 持久化数据加载侧边栏折叠状态
await dispatch('d2admin/menu/asideCollapseLoad', null, { root: true }) await dispatch('d2admin/menu/asideCollapseLoad', null, { root: true })
// await dispatch('d2admin/size/set', 'medium', { root: true })
// DB -> store 持久化数据加载全局尺寸 // DB -> store 持久化数据加载全局尺寸
await dispatch('d2admin/size/load', null, { root: true }) await dispatch('d2admin/size/load', null, { root: true })
// // store 设置系统主色 // // store 设置系统主色
......
...@@ -5,7 +5,7 @@ export default { ...@@ -5,7 +5,7 @@ export default {
namespaced: true, namespaced: true,
state: { state: {
// 尺寸 // 尺寸
value: '' // medium small mini value: 'medium' // medium small mini
}, },
actions: { actions: {
/** /**
......
<!-- 编辑物料弹窗 -->
<template>
<div>
<el-dialog
title="编辑物料"
:visible.sync="isVisible"
:before-close="handleClose"
>
<el-form
:model="editForm"
:rules="rules"
ref="editRuleForm"
label-width="100px"
>
<el-form-item
label="物料代码"
prop="deviceNum">
<el-input
:disabled="disabled" v-model="editForm.deviceNum" placeholder="请输入物料代码" clearable
></el-input>
</el-form-item>
<el-form-item
label="物料编码"
prop="deviceCode">
<el-input
:disabled="disabled" v-model="editForm.deviceCode" placeholder="请输入物料编码" clearable
></el-input>
</el-form-item>
<el-form-item
label="CRC物料号"
prop="crcCode">
<el-input
:disabled="disabled" v-model="editForm.crcCode" placeholder="请输入CRC物料号" clearable
></el-input>
</el-form-item>
<el-form-item
label="图号"
prop="drawNum">
<el-input
:disabled="disabled" v-model="editForm.drawNum" placeholder="请输入图号" clearable
></el-input>
</el-form-item>
<el-form-item
label="物料名称"
prop="deviceName">
<el-input
:disabled="disabled" v-model="editForm.deviceName" placeholder="请输入物料名称" clearable
></el-input>
</el-form-item>
<el-form-item
label="规格"
prop="specifications">
<el-input
:disabled="disabled" v-model="editForm.specifications" placeholder="请输入规格" clearable
></el-input>
</el-form-item>
<el-form-item label="所在地" prop="stationName">
<el-select v-model="editForm.stationName" 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="stockCount">
<el-input
:disabled="disabled" v-model="editForm.stockCount" placeholder="请输入库存数量" clearable
></el-input>
</el-form-item>
<el-form-item
label="责任人"
prop="responsible">
<el-input
:disabled="disabled" v-model="editForm.responsible" placeholder="请输入责任人" clearable
></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button
type="primary"
@click="handleConfirm"
>保存</el-button>
<el-button
@click="handleClose"
>取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'EditDialog',
data () {
return {
disabled: false,
rules: {
deviceNum: [
{ required: true, message: '请输入物料代码', trigger: 'blur' }
],
deviceCode: [
{ required: true, message: '请输入物料编码', trigger: 'blur' }
],
crcCode: [
{ required: true, message: '请输入CRC物料号', trigger: 'blur' }
],
drawNum: [
{ required: true, message: '请输入图号', trigger: 'blur' }
],
deviceName: [
{ required: true, message: '请输入物料名称', trigger: 'blur' }
],
specifications: [
{ required: true, message: '请输入规格', trigger: 'blur' }
],
stationName: [
{ required: true, message: '请选择所在地', trigger: 'change' }
],
stockCount: [
{ required: true, message: '请输入库存数量', trigger: 'blur' }
],
responsible: [
{ required: true, message: '请输入责任人', trigger: 'blur' }
]
}
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
editForm: Object
},
watch: {
isVisible (val) {
// this.disabled = this.editForm.trafficCode ? true : false
this.$refs.editRuleForm && this.$refs.editRuleForm.resetFields()
}
},
mounted() {},
methods: {
handleClose () {
this.$emit('closeDialog')
},
handleConfirm () {
this.$refs.editRuleForm.validate((vaild) => {
if (vaild) {
this.$emit('confirmDialog')
}
})
}
}
}
</script>
<style scoped>
</style>
<!-- 物料管理 -->
<template>
<d2-container>
<el-form
:inline="true"
:model="searchForm"
label-width="85px"
>
<el-form-item label="物料">
<el-input v-model="searchForm.keyWord" placeholder="请输入物料代码/编码/名称" clearable></el-input>
</el-form-item>
<el-form-item label="所在地">
<el-select v-model="searchForm.stationCode" placeholder="请选择所在地" clearable filterable>
<el-option value="1" label="仓库"></el-option>
<el-option value="2" label="广州站"></el-option>
</el-select>
</el-form-item>
<el-form-item label="责任人">
<el-select v-model="searchForm.responsible" placeholder="请选择责任人" clearable filterable>
<el-option value="1" label="张三"></el-option>
<el-option value="2" label="李四"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">物料列表</el-col>
<el-col :span="12" style="text-align: right">
<el-button class="import-button" style="">导入
<input
type="file"
class="import-input"
accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)" />
</el-button>
<el-button>导出</el-button>
</el-col>
</el-row>
<el-table
:data="tableData"
v-loading="tableLoading"
border
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-column
align="center"
label="操作"
>
<template slot-scope="scope">
<el-button
type="text"
@click="handleEdit(scope.row, scope.$index)"
>编辑</el-button>
<el-button
type="text"
@click="handleDelete(scope.$index, scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10,20,30,40]"
:page-size="pageSize"
:total="total"
layout="sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
<edit-dialog
:isVisible="editVisible"
:editForm="editForm"
@closeDialog="handleEditClose"
@confirmDialog="handleEditConfirm"
></edit-dialog>
</d2-container>
</template>
<script>
import EditDialog from './editDialog'
import { getListApi, editApi, removeApi, importApi, exportApi } from '@api/deviceManagement'
import notice from '@/common/notice'
export default {
name: 'deviceManagement',
components: {
EditDialog
},
data() {
return {
// 编辑弹窗
editVisible: false,
editForm: {
id: '',
deviceNum: '',
deviceCode: '',
crcCode: '',
drawNum: '',
deviceName: '',
specifications: '',
stationCode: '',
stationName: '',
stockCount: '',
responsible: ''
},
// 搜索
searchForm: {
keyWord: '',
stationCode: '',
responsible: ''
},
// 表格
tableLoading: false,
tableData: [],
tableColumns: [{
label: '物料代码',
prop: 'deviceNum'
}, {
label: '物料编码',
prop: 'deviceCode'
}, {
label: 'CRC物料号',
prop: 'crcCode'
}, {
label: '图号',
prop: 'drawNum'
}, {
label: '物料名称',
prop: 'deviceName'
}, {
label: '规格',
prop: 'specifications'
}, {
label: '所在地',
prop: 'stationName'
}, {
label: '库存',
prop: 'stockCount'
}, {
label: '责任人',
prop: 'responsible'
}],
// 页码
currentPage: 1,
pageSize: 10,
total: 30
}
},
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
})
},
editDevice(params) {
editApi(params).then(res => {
// console.log(res)
this.handleEditClose()
notice.okTips()
this.loadingGetList()
}).catch(err => {
notice.errorTips()
})
},
// 导入
importFile(e) {
const params = {
file: e.target.files[0]
}
console.log(params)
importApi(params).then(res => {
notice.okTips()
}).catch(err => {
notice.errorTips()
})
},
/* 接口请求-end */
// 搜索
handleSearch () {
console.log(this.searchForm)
this.loadingGetList()
},
// 页码
handleSizeChange (value) {
// console.log(value)
this.pageSize = value
// 调接口
this.loadingGetList()
},
handleCurrentChange (value) {
// console.log(value)
this.currentPage = value
// 调接口
this.loadingGetList()
},
handleEditClose () {
this.editVisible = !this.editVisible
},
handleEditConfirm () {
// console.log(JSON.parse(JSON.stringify(this.editForm)))
var editParams = JSON.parse(JSON.stringify(this.editForm))
this.editDevice(editParams)
},
// 表格-编辑
handleEdit (row, index = -1) {
// console.log(index)
// console.log(row)
console.log(row)
this.editForm = JSON.parse(JSON.stringify(row))
this.editVisible = !this.editVisible
},
handleDelete (index, row) {
this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(index)
console.log(row)
this.$message({
type: 'success',
message: '删除成功'
})
}).catch(err => {})
}
}
}
</script>
<style scoped>
.import-button {
width: 70px;
height: 40px;
overflow: hidden;
position: relative;
cursor: pointer;
}
.import-input {
opacity: 0;
position: absolute;
left: 0;
top: 0;
width: 70px;
height: 100%;
cursor: pointer;
font-size:0
}
</style>
\ No newline at end of file \ No newline at end of file
<!-- 作业单管理 -->
<template>
<d2-container>
<el-form
:inline="true"
:model="searchForm"
label-width="100px"
>
<el-form-item
v-for="(item, index) in searchFormArr"
:key="index"
:label="item.label"
>
<el-input
v-if="item.type == 'input'"
v-model="searchForm[item.model]"
:placeholder= "'请输入' + item.label"
clearable>
</el-input>
<el-select
v-else-if="item.type == 'select'"
v-model="searchForm[item.model]"
:placeholder="'请选择' + item.label"
clearable
filterable>
<el-option
v-for="(optionItem, optionIndex) in item.options"
:key="optionIndex"
:label="optionItem.label"
:value="optionItem.value"
></el-option>
</el-select>
<el-date-picker
v-else-if="item.type == 'datePick'"
v-model="searchForm[item.model]"
:placeholder="'请选择' + item.label"
value-format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">作业单列表</el-col>
<el-col :span="12" style="text-align: right">
<el-button @click="exportOrder">导出订单</el-button>
</el-col>
</el-row>
<el-table
:data="tableData"
v-loading="tableLoading"
border
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-column
align="center"
label="操作"
>
<template slot-scope="scope">
<el-button
type="text"
@click="handleDelete(scope.$index, scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10,20,30,40]"
:page-size="pageSize"
:total="total"
layout="sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</d2-container>
</template>
<script>
import { getListApi, removeApi, exportApi } from '@api/maintainManagement'
import notice from '@/common/notice'
export default {
name: 'maintainManagement',
data() {
return {
// 搜索
searchForm: {
taskCode: '',
taskType: '',
downDeviceNum: '',
userName: '',
createTime: '',
trafficCode: '',
stationName: '',
subsystemTypeCode: ''
},
searchFormArr: [{
label: '订单编号',
type: 'input',
model: 'taskCode'
}, {
label: '创建时间',
type: 'datePick',
model: 'createTime'
}, {
label: '订单类型',
type: 'select',
model: 'taskType',
options: [{
label: '系统',
value: '1'
}, {
label: '人工',
value: '2'
}]
}, {
label: '故障物料代码',
type: 'input',
model: 'downDeviceNum'
}, {
label: '处理人',
type: 'input',
model: 'userName'
}, {
label: '车辆编号',
type: 'input',
model: 'trafficCode'
}, {
label: '车辆站点',
type: 'select',
model: 'stationName',
options: [{
label: '青岛',
value: '1'
}, {
label: '深圳',
value: '2'
}]
}, {
label: '子系统',
type: 'select',
model: 'subsystemTypeCode',
options: [{
label: '3#4F',
value: '1'
}, {
label: '3#5F',
value: '2'
}]
}],
// 表格
tableLoading: false,
tableData: [],
tableColumns: [{
label: '订单编号',
prop: 'taskCode'
}, {
label: '创建时间',
prop: 'createTime'
}, {
label: '类型',
prop: 'taskType'
}, {
label: '车辆编号',
prop: 'trafficCode'
}, {
label: '车辆站点',
prop: 'stationName'
}, {
label: '子系统',
prop: 'subsystemCode'
}, {
label: '子系统类型',
prop: 'subsystemType',
formatter: (cellValue) => {
if(cellValue.subsystemType)
return {
1: '座椅',
2: '电池'
}[cellValue.subsystemType]
}
}, {
label: '故障描述',
prop: 'downDescription'
}, {
label: '处理方式',
prop: 'treatment',
formatter: (cellValue) => {
if(cellValue.treatment) {
return {
1: '现场维修',
2: '更换'
}[cellValue.treatment]
}
}
}, {
label: '故障物料代码',
prop: 'downDeviceNum'
}, {
label: '故障物料编码',
prop: 'downDeviceCode'
}, {
label: '故障物料处理',
prop: 'downDeviceTreatment'
}, {
label: '更换物料物料代码',
prop: 'replaceDeviceNum'
}, {
label: '更换物料物料编码',
prop: 'replaceDeviceCode'
}, {
label: '使用数量',
prop: 'usedCount'
}, {
label: '处理人',
prop: 'userName'
}],
// 页码
currentPage: 1,
pageSize: 10,
total: 30
}
},
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
})
},
exportOrder() {
const params = this.getParams()
exportApi(params).then(res => {
notice.okTips()
}).catch(err => {
notice.errorTips()
})
},
/* 接口请求-end */
// 搜索
handleSearch () {
console.log(this.searchForm)
this.loadingGetList()
},
// 页码
handleSizeChange (value) {
console.log(value)
this.pageSize = value
// 调接口
this.loadingGetList()
},
handleCurrentChange (value) {
console.log(value)
this.currentPage = value
// 调接口
this.loadingGetList()
},
handleDelete (index, row) {
this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(index)
console.log(row)
this.$message({
type: 'success',
message: '删除成功'
})
}).catch(err => {})
}
}
}
</script>
<style scoped>
</style>
<!-- -->
<template>
<div class="detailDialog">
<el-dialog
:visible.sync="isVisible"
:before-close="handleClose"
>
<!-- <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>
<!-- <embed width="100%" height="800px" src="https://web.stanford.edu/~xgzhou/zhou_book2017.pdf"> -->
</el-dialog>
</div>
</template>
<script>
export default {
name: 'DetailDialog',
data() {
return {
}
},
props: {
isVisible: {
type: Boolean,
default: false
}
},
mounted() {},
methods: {
handleClose() {
this.$emit('closeDialog')
}
}
}
</script>
<style scoped>
.header-title {
text-align: center;
font-size: 18px;
font-weight: bold;
}
</style>
\ No newline at end of file \ No newline at end of file
<!-- 物料订单管理 -->
<template>
<d2-container>
<el-form
:inline="true"
:model="searchForm"
label-width="85px"
>
<el-form-item label="订单编号">
<el-input v-model="searchForm.orderCode" placeholder="请输入订单编号" clearable></el-input>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="searchForm.createTime" type="date" placeholder="请选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="订单类型">
<el-select v-model="searchForm.orderType" 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.userName" placeholder="请输入申请人" clearable></el-input>
</el-form-item>
<el-form-item label="订单状态">
<el-select v-model="searchForm.status" 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>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">订单列表</el-col>
<el-col :span="12" style="text-align: right">
<el-button>订单下载</el-button>
</el-col>
</el-row>
<el-table
:data="tableData"
v-loading="tableLoading"
border
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-column
align="center"
label="操作"
>
<template slot-scope="scope">
<el-button
type="text"
@click="handleDetail(scope.row, scope.$index)"
>查看详情</el-button>
<el-button
type="text"
@click="handleDelete(scope.$index, scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10,20,30,40]"
:page-size="pageSize"
:total="total"
layout="sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
<detail-dialog
:isVisible="detailVisible"
@closeDialog="handleDetailClose"
></detail-dialog>
</d2-container>
</template>
<script>
import DetailDialog from './detailDialog'
import { getListApi, detailApi, removeApi, downloadApi } from '@api/materiaOrderManagement'
import notice from '@/common/notice'
export default {
name: 'materiaOrderManagement',
components: {
DetailDialog
},
data() {
return {
detailVisible: false,
// 搜索
searchForm: {
orderCode: '',
orderType: '',
status: '',
userName: '',
createTime: ''
},
// 表格
tableLoading: false,
tableData: [],
tableColumns: [{
label: '订单编号',
prop: 'orderCode'
}, {
label: '创建时间',
prop: 'createTime'
}, {
label: '类型',
prop: 'orderType'
}, {
label: '申请人',
prop: 'userName'
}, {
label: '状态',
prop: 'status',
formatter: (cellValue) => {
if (cellValue.status) {
return {
1: '审批中',
2: '已驳回',
3: '待发货',
4: '已完成',
5: '待签收'
}[cellValue.status]
}
}
}],
// 页码
currentPage: 1,
pageSize: 10,
total: 30
}
},
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()
},
// 页码
handleSizeChange (value) {
console.log(value)
this.pageSize = value
// 调接口
this.loadingGetList()
},
handleCurrentChange (value) {
console.log(value)
this.currentPage = value
// 调接口
this.loadingGetList()
},
// resetForm (obj) {
// for (var item in obj) {
// if (obj[item] instanceof Array) {
// obj[item] = []
// } else {
// obj[item] = ''
// }
// }
// },
handleDetailClose () {
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) {
this.detailVisible = !this.detailVisible
},
handleDelete (index, row) {
this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(index)
console.log(row)
this.$message({
type: 'success',
message: '删除成功'
})
}).catch(err => {})
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file \ No newline at end of file
<!-- 物料列表 -->
<template>
<d2-container>
<el-form
:inline="true"
:model="searchForm"
label-width="85px"
>
<el-form-item label="物料">
<el-input v-model="searchForm.keyWord" placeholder="请输入物料代码/编码/名称" clearable></el-input>
</el-form-item>
<el-form-item label="责任人">
<el-select v-model="searchForm.responsible" 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>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">物料列表</el-col>
</el-row>
<el-table
:data="tableData"
v-loading="tableLoading"
border
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-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10,20,30,40]"
:page-size="pageSize"
:total="total"
layout="sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</d2-container>
</template>
<script>
import { getListApi } from '@api/materialList'
import notice from '@/common/notice'
export default {
name: 'materialList',
data() {
return {
searchForm: {
keyWord: '',
responsible: '',
},
// 表格
tableLoading: false,
tableData: [],
tableColumns: [{
label: '物料代码',
prop: 'deviceNum'
}, {
label: '物料编码',
prop: 'deviceCode'
}, {
label: 'CRC物料号',
prop: 'crcCode'
}, {
label: '图号',
prop: 'drawNum'
}, {
label: '物料名称',
prop: 'deviceName'
}, {
label: '规格',
prop: 'specifications'
}, {
label: '责任人',
prop: 'responsible'
}],
// 页码
currentPage: 1,
pageSize: 10,
total: 30
}
},
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
})
},
/* 接口请求-end */
// 搜索
handleSearch () {
console.log(this.searchForm)
this.loadingGetList()
},
// 页码
handleSizeChange (value) {
console.log(value)
this.pageSize = value
// 调接口
this.loadingGetList()
},
handleCurrentChange (value) {
console.log(value)
this.currentPage = value
// 调接口
this.loadingGetList()
},
handleDelete (index, row) {
this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(index)
console.log(row)
this.$message({
type: 'success',
message: '删除成功'
})
}).catch(err => {})
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file \ No newline at end of file
...@@ -114,6 +114,7 @@ export default { ...@@ -114,6 +114,7 @@ export default {
this.$refs.editRuleForm.resetFields() this.$refs.editRuleForm.resetFields()
} }
}, },
methods: { methods: {
handleClose () { handleClose () {
this.$emit('closeDialog') this.$emit('closeDialog')
......
...@@ -28,11 +28,12 @@ ...@@ -28,11 +28,12 @@
<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 @click="handleAdd">添加子系统</el-button> <el-button @click="handleEdit(editFormReset)">添加子系统</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
:data="tableData" :data="tableData"
v-loading="tableLoading"
border border
style="margin: 20px 0;" style="margin: 20px 0;"
> >
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@click="handleEdit(scope.$index, scope.row)" @click="handleEdit(scope.row, scope.$index)"
>编辑</el-button> >编辑</el-button>
<el-button <el-button
type="text" type="text"
...@@ -108,6 +109,16 @@ export default { ...@@ -108,6 +109,16 @@ export default {
return { return {
// 新增/编辑弹窗 // 新增/编辑弹窗
editVisible: false, editVisible: false,
editFormReset: {
subsystemCode: '',
systemType: '',
trafficCode: '',
merchantName: '',
sendSequence: '',
sendPort: '',
gatewayUrl: '',
gatewayPort: ''
},
editForm: { editForm: {
subsystemCode: '', subsystemCode: '',
systemType: '', systemType: '',
...@@ -125,34 +136,8 @@ export default { ...@@ -125,34 +136,8 @@ export default {
trafficCode: '', trafficCode: '',
merchantName: '' merchantName: ''
}, },
tableData: [{ tableLoading: false,
subsystemCode: '3#1F', tableData: [],
systemType: '座椅',
trafficCode: 'CRH45661-5648',
merchantName: '长春通富机电设备有限公司',
sendSequence: '1.56',
sendPort: '4000',
gatewayUrl: '192.168.1.1',
gatewayPort: '8000'
}, {
subsystemCode: '3#2F',
systemType: '桌板',
trafficCode: 'CRH45661-5648',
merchantName: '长春通富机电设备有限公司',
sendSequence: '1.56',
sendPort: '4000',
gatewayUrl: '192.168.1.1',
gatewayPort: '8000'
}, {
subsystemCode: '3#3F',
systemType: '座椅',
trafficCode: 'CRH45661-5648',
merchantName: '长春通富机电设备有限公司',
sendSequence: '1.56',
sendPort: '4000',
gatewayUrl: '192.168.1.1',
gatewayPort: '8000'
}],
tableColumns: [{ tableColumns: [{
label: '子系统编号', label: '子系统编号',
prop: 'subsystemCode' prop: 'subsystemCode'
...@@ -255,29 +240,20 @@ export default { ...@@ -255,29 +240,20 @@ export default {
} }
}, },
handleAdd () {
console.log(this.editForm)
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) // 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.editSubSystem(this.editForm) this.editSubSystem(this.editForm)
// this.editVisible = !this.editVisible
// this.resetForm(this.editForm)
}, },
// 表格-编辑 // 表格-编辑
handleEdit (index, row) { handleEdit (row, index = -1) {
console.log(index)
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
}, },
......
...@@ -94,11 +94,11 @@ export default { ...@@ -94,11 +94,11 @@ export default {
stationCode: '' stationCode: ''
}, },
rules: Object.freeze({ rules: Object.freeze({
loginName: [{ required: true, message: '用户名不能为空' }], loginName: [{ required: true, message: '用户名不能为空',trigger:'blur' }],
password: [{ required: true, message: '密码不能为空' }], password: [{ required: true, message: '密码不能为空',trigger:'blur' }],
userName: [{ required: true, message: '姓名不能为空' }], userName: [{ required: true, message: '姓名不能为空',trigger:'blur' }],
companyCode: [{ required: true, message: '用户名不能为空' }], companyCode: [{ required: true, message: '用户名不能为空',trigger:'blur' }],
loginName: [{ required: true, message: '用户名不能为空' }] loginName: [{ required: true, message: '用户名不能为空',trigger:'blur' }]
}) })
} }
}, },
......
...@@ -83,9 +83,9 @@ ...@@ -83,9 +83,9 @@
</div> </div>
<div class="page-login--content-footer"> <div class="page-login--content-footer">
<p class="page-login--content-footer-copyright"> <p class="page-login--content-footer-copyright">
版权所有 <!-- 版权所有 -->
<d2-icon name="copyright"/> <!-- <d2-icon name="copyright"/> -->
-2019 GLSX粤ICP备12020087号 <!-- -2019 GLSX粤ICP备12020087号 -->
</p> </p>
</div> </div>
</div> </div>
......
...@@ -112,6 +112,10 @@ ...@@ -112,6 +112,10 @@
<script> <script>
import { getListApi, reportApi } from '@api/systemMonitor' import { getListApi, reportApi } from '@api/systemMonitor'
import notice from '@/common/notice' import notice from '@/common/notice'
require('echarts/lib/chart/pie')
let echarts = require('echarts/lib/echarts')
export default { export default {
name: 'systemMonitor', name: 'systemMonitor',
data () { data () {
...@@ -233,6 +237,7 @@ export default { ...@@ -233,6 +237,7 @@ export default {
mounted () { mounted () {
// this.drawPie() // this.drawPie()
this.$echarts = echarts
this.loadingGetList() this.loadingGetList()
this.totalECharts = this.$echarts.init(document.getElementById('totalEcharts')) this.totalECharts = this.$echarts.init(document.getElementById('totalEcharts'))
this.getPie() this.getPie()
......
...@@ -80,12 +80,16 @@ export default { ...@@ -80,12 +80,16 @@ export default {
watch: { watch: {
isVisible (val) { isVisible (val) {
this.disabled = !!this.editForm.trafficCode this.disabled = this.editForm.trafficCode ? true : false
this.editForm.openType = this.editForm.trafficCode ? this.editForm.openType : '1' this.editForm.openType = this.editForm.trafficCode ? this.editForm.openType : '1'
this.$refs.editRuleForm.resetFields() this.$refs.editRuleForm && this.$refs.editRuleForm.resetFields()
} }
}, },
mounted() {},
methods: { methods: {
handleClose () { handleClose () {
this.$emit('closeDialog') this.$emit('closeDialog')
}, },
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<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 @click="handleAdd">添加车辆</el-button> <el-button @click="handleEdit(editFormReset)">添加车辆</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@click="handleEdit(scope.$index, scope.row)" @click="handleEdit(scope.row, scope.$index)"
>编辑</el-button> >编辑</el-button>
<el-button <el-button
type="text" type="text"
...@@ -112,8 +112,16 @@ export default { ...@@ -112,8 +112,16 @@ export default {
return { return {
// 新增/编辑弹窗 // 新增/编辑弹窗
editVisible: false, editVisible: false,
editFormReset: {
trafficCode: '',
stationCode: '',
stationName: '',
merchantName: '',
openType: ''
},
editForm: { editForm: {
trafficCode: '', trafficCode: '',
stationCode: '',
stationName: '', stationName: '',
merchantName: '', merchantName: '',
openType: '' openType: ''
...@@ -156,7 +164,7 @@ export default { ...@@ -156,7 +164,7 @@ export default {
} }
}, },
mounted () { mounted() {
this.loadingGetList() this.loadingGetList()
}, },
...@@ -226,27 +234,22 @@ export default { ...@@ -226,27 +234,22 @@ export default {
} }
}, },
handleAdd () {
console.log(this.editForm)
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) delete this.editForm.id
}, },
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.editTraffic(editParams) this.editTraffic(editParams)
}, },
// 表格-编辑 // 表格-编辑
handleEdit (index, row) { handleEdit (row, index = -1) {
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
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!