Commit 1bc4198c authored by 李志鸣's avatar 李志鸣

fea(设备基础数据): 设备基础数据模块联调完成

parent 5f7b853a
...@@ -214,6 +214,8 @@ ...@@ -214,6 +214,8 @@
for (let key in this.formData) { for (let key in this.formData) {
this.formData[key] = '' this.formData[key] = ''
} }
}).catch(() => {
this.loadingToggle = false
}) })
} }
}) })
......
This diff is collapsed.
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text"> type="text"
@click="doEditClick(scope.row)">
编辑 编辑
</el-button> </el-button>
<el-button <el-button
...@@ -60,6 +61,13 @@ ...@@ -60,6 +61,13 @@
ref="AddDeviceDialog" ref="AddDeviceDialog"
@doConfirmClick="doAddDeviceDialogConfirm"> @doConfirmClick="doAddDeviceDialogConfirm">
</AddDeviceDialog> </AddDeviceDialog>
<!-- 编辑设备对话框 -->
<EditDeviceDialog
ref="EditDeviceDialog"
:editDeviceBasicValue="editDeviceBasicValue"
@doConfirmClick="doEditDeviceDialogConfirm">
</EditDeviceDialog>
</div> </div>
</template> </template>
...@@ -67,16 +75,20 @@ ...@@ -67,16 +75,20 @@
import Table from '@/components/Table/index.vue' import Table from '@/components/Table/index.vue'
import Search from '@/components/Search' import Search from '@/components/Search'
import AddDeviceDialog from './components/AddDeviceDialog' import AddDeviceDialog from './components/AddDeviceDialog'
import EditDeviceDialog from './components/EditDeviceDialog'
export default { export default {
name: 'DeviceBasic', name: 'DeviceBasic',
components: { components: {
Search, Search,
Table, Table,
AddDeviceDialog AddDeviceDialog,
EditDeviceDialog
}, },
data () { data () {
return { return {
// 编辑设备基础数据
editDeviceBasicValue: {},
// 精准搜索关键字列表 // 精准搜索关键字列表
searchList: {}, searchList: {},
// 表格配置项 // 表格配置项
...@@ -111,7 +123,7 @@ ...@@ -111,7 +123,7 @@
}, },
// 点击搜索组件重置按钮 // 点击搜索组件重置按钮
doResetClick (searchValue) { doResetClick (searchValue) {
this.searchList = { ...searchList, filters: [] } this.searchList = { ...searchValue, filters: [] }
this.tableConfig.paginationConfig.currentPage = 1 this.tableConfig.paginationConfig.currentPage = 1
this.tableConfig.paginationConfig.pageSize = 20 this.tableConfig.paginationConfig.pageSize = 20
// 获取表格数据 // 获取表格数据
...@@ -178,6 +190,16 @@ ...@@ -178,6 +190,16 @@
doAddDeviceDialogConfirm () { doAddDeviceDialogConfirm () {
// 获取表格数据 // 获取表格数据
this.getTableList() this.getTableList()
},
// 点击编辑按钮
doEditClick (deviceValue) {
this.editDeviceBasicValue = _.cloneDeep(deviceValue)
this.$refs.EditDeviceDialog.dialogToggle = true
},
// 点击编辑设备对话框确认按钮
doEditDeviceDialogConfirm () {
// 获取表格数据
this.getTableList()
} }
}, },
mounted () { mounted () {
...@@ -197,6 +219,7 @@ ...@@ -197,6 +219,7 @@
width: 100%; width: 100%;
border: 1px solid #d2d3d5; border: 1px solid #d2d3d5;
background-color: #fff; background-color: #fff;
overflow-y: auto;
.title-pack { .title-pack {
height: 38px; height: 38px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment