能源监控
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
>
|
||||
<energy-plc-connect-add ref="energyPlcConnect" @successSubmit="successSubmit" />
|
||||
<energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
<!-- 参数绑定/查看 -->
|
||||
<energy-plc-param v-if="paramVisible" ref="plcParam" @closeDrawer="closeDrawer" :energyTypeList="energyTypeList"></energy-plc-param>
|
||||
@@ -48,16 +48,17 @@
|
||||
<script>
|
||||
import { getEnergyPlcConnectPage, deleteEnergyPlcConnect } from "@/api/base/energyPlcConnect";
|
||||
// import { publicFormatter } from '@/utils/dict'
|
||||
import { getTree } from '@/api/base/factory'
|
||||
import { getEnergyTypeListAll } from '@/api/base/energyType'
|
||||
import EnergyPlcConnectAdd from './components/energyPlcConnectAdd.vue'
|
||||
import EnergyPlcParam from './components/energyPlcParam.vue'
|
||||
import EnergyPlcParam from './components/energyPlcParam'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'bindObjectType',
|
||||
prop: 'objName',
|
||||
label: '对象'
|
||||
},
|
||||
{
|
||||
prop: 'bindObjectId',
|
||||
prop: 'objCode',
|
||||
label: '对象编码'
|
||||
},
|
||||
{
|
||||
@@ -75,6 +76,10 @@ const tableProps = [
|
||||
{
|
||||
prop: 'varNum',
|
||||
label: '绑定参数数量'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注'
|
||||
}
|
||||
]
|
||||
export default {
|
||||
@@ -147,7 +152,8 @@ export default {
|
||||
name: null
|
||||
},
|
||||
paramVisible: false,
|
||||
energyTypeList: []
|
||||
energyTypeList: [],
|
||||
objList: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -159,6 +165,8 @@ export default {
|
||||
mounted() {
|
||||
// 获取能源列表
|
||||
this.getEnergyTypeList()
|
||||
// 获取对象树形结构
|
||||
this.getObjTree()
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
@@ -224,7 +232,7 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除关联表名为"' + row.name + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除对象为"' + row.objName + '"的数据项?').then(function() {
|
||||
return deleteEnergyPlcConnect(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
@@ -239,6 +247,11 @@ export default {
|
||||
getEnergyTypeListAll().then((res) => {
|
||||
this.energyTypeList = res.data || []
|
||||
})
|
||||
},
|
||||
getObjTree() {
|
||||
getTree().then(res => {
|
||||
this.objList = res.data || []
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user