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

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

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