From 9fd104720e0109b3e5be3587da4a9de20afa02ab Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 22 Jul 2022 14:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../addAccessControlMachine.js | 4 +- .../editAccessControlMachine.js | 4 +- .../accessControlMachineManage.js | 4 +- .../property/machineManage/machineManage.html | 22 +------ .../property/machineManage/machineManage.js | 61 ++++++++++--------- 5 files changed, 41 insertions(+), 54 deletions(-) diff --git a/public/components/property/addAccessControlMachine/addAccessControlMachine.js b/public/components/property/addAccessControlMachine/addAccessControlMachine.js index 668291379..061877d90 100644 --- a/public/components/property/addAccessControlMachine/addAccessControlMachine.js +++ b/public/components/property/addAccessControlMachine/addAccessControlMachine.js @@ -210,7 +210,7 @@ } }); - }); + }, 'ACCESS_CONTROL'); }, _loadAttrValue: function(_specCd, _values) { vc.getAttrValue(_specCd, function(data) { @@ -220,7 +220,7 @@ } }); - }); + }, 'ACCESS_CONTROL'); } } }); diff --git a/public/components/property/editAccessControlMachine/editAccessControlMachine.js b/public/components/property/editAccessControlMachine/editAccessControlMachine.js index 6007959df..1155f5462 100644 --- a/public/components/property/editAccessControlMachine/editAccessControlMachine.js +++ b/public/components/property/editAccessControlMachine/editAccessControlMachine.js @@ -242,7 +242,7 @@ } }); - }); + }, 'ACCESS_CONTROL'); }, _loadEditAttrValue: function(_specCd, _values) { vc.getAttrValue(_specCd, function(data) { @@ -252,7 +252,7 @@ } }); - }); + }, 'ACCESS_CONTROL'); }, setEditMachineTypeCd: function(_typeId) { diff --git a/public/pages/property/accessControlMachineManage/accessControlMachineManage.js b/public/pages/property/accessControlMachineManage/accessControlMachineManage.js index 450828cf9..053e20450 100644 --- a/public/pages/property/accessControlMachineManage/accessControlMachineManage.js +++ b/public/pages/property/accessControlMachineManage/accessControlMachineManage.js @@ -19,8 +19,8 @@ machineName: '', machineIp: '', machineMac: '', - communityId: vc.getCurrentCommunity().communityId - + communityId: vc.getCurrentCommunity().communityId, + domain: 'ACCESS_CONTROL', }, listColumns: [] } diff --git a/public/pages/property/machineManage/machineManage.html b/public/pages/property/machineManage/machineManage.html index f293e74ae..0a4eb31b1 100755 --- a/public/pages/property/machineManage/machineManage.html +++ b/public/pages/property/machineManage/machineManage.html @@ -114,26 +114,10 @@ {{machine.createTime}} - - - @@ -155,4 +139,4 @@ - + \ No newline at end of file diff --git a/public/pages/property/machineManage/machineManage.js b/public/pages/property/machineManage/machineManage.js index b9d9dfbbb..7b3499d21 100755 --- a/public/pages/property/machineManage/machineManage.js +++ b/public/pages/property/machineManage/machineManage.js @@ -1,7 +1,7 @@ /** 入驻小区 **/ -(function (vc) { +(function(vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 10; vc.extends({ @@ -12,39 +12,40 @@ records: 1, moreCondition: false, machineName: '', - machineTypes:[], + machineTypes: [], conditions: { machineCode: '', machineTypeCd: '', machineName: '', machineIp: '', machineMac: '', - communityId: vc.getCurrentCommunity().communityId + communityId: vc.getCurrentCommunity().communityId, + domain: 'COMMON' }, listColumns: [] } }, - _initMethod: function () { + _initMethod: function() { //vc.component._listMachines(DEFAULT_PAGE, DEFAULT_ROWS); - vc.getDict('machine', "machine_type_cd", function (_data) { + vc.getDict('machine', "machine_type_cd", function(_data) { vc.component.machineManageInfo.machineTypes = _data; }); - $that._getColumns(function () { + $that._getColumns(function() { vc.component._listMachines(DEFAULT_PAGE, DEFAULT_ROWS); }); }, - _initEvent: function () { + _initEvent: function() { - vc.on('machineManage', 'listMachine', function (_param) { + vc.on('machineManage', 'listMachine', function(_param) { vc.component._listMachines(DEFAULT_PAGE, DEFAULT_ROWS); }); - vc.on('pagination', 'page_event', function (_currentPage) { + vc.on('pagination', 'page_event', function(_currentPage) { vc.component._listMachines(_currentPage, DEFAULT_ROWS); }); }, methods: { - _listMachines: function (_page, _rows) { + _listMachines: function(_page, _rows) { vc.component.machineManageInfo.conditions.page = _page; vc.component.machineManageInfo.conditions.row = _rows; @@ -56,7 +57,7 @@ vc.http.get('machineManage', 'list', param, - function (json, res) { + function(json, res) { let _machineManageInfo = JSON.parse(json); vc.component.machineManageInfo.total = _machineManageInfo.total; vc.component.machineManageInfo.records = _machineManageInfo.records; @@ -67,12 +68,13 @@ dataCount: vc.component.machineManageInfo.total, currentPage: _page }); - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); } ); }, - _listMachineTypes: function () { + _listMachineTypes: function() { var param = { params: { @@ -85,38 +87,39 @@ //发送get请求 vc.http.apiGet('machineType.listMachineType', param, - function (json, res) { + function(json, res) { var _machineTypeManageInfo = JSON.parse(json); vc.component.machineManageInfo.machineTypes = _machineTypeManageInfo.data; - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); } ); }, - _openAddMachineModal: function () { + _openAddMachineModal: function() { vc.emit('addMachine', 'openAddMachineModal', {}); }, - _openEditMachineModel: function (_machine) { + _openEditMachineModel: function(_machine) { vc.emit('editMachine', 'openEditMachineModal', _machine); }, - _openDeleteMachineModel: function (_machine) { + _openDeleteMachineModel: function(_machine) { vc.emit('deleteMachine', 'openDeleteMachineModal', _machine); }, - _queryMachineMethod: function () { + _queryMachineMethod: function() { vc.component._listMachines(DEFAULT_PAGE, DEFAULT_ROWS); }, - _moreCondition: function () { + _moreCondition: function() { if (vc.component.machineManageInfo.moreCondition) { vc.component.machineManageInfo.moreCondition = false; } else { vc.component.machineManageInfo.moreCondition = true; } }, - _openMachineDetailModel: function (_machine) { + _openMachineDetailModel: function(_machine) { }, - _openRestartMachineModel: function (_machine) { //设备重启处理 + _openRestartMachineModel: function(_machine) { //设备重启处理 vc.emit('machineState', 'openMachineStateModal', { machineCode: _machine.machineCode, stateName: '重启', @@ -124,7 +127,7 @@ url: '/machine/restartMachine' }); }, - _openDoorMachineModel: function (_machine) { //设备开门处理 + _openDoorMachineModel: function(_machine) { //设备开门处理 vc.emit('machineState', 'openMachineStateModal', { machineCode: _machine.machineCode, stateName: '开门', @@ -132,12 +135,12 @@ url: '/machine/openDoor' }); }, - dealMachineAttr: function (machines) { + dealMachineAttr: function(machines) { machines.forEach(item => { $that._getColumnsValue(item); }); }, - _getColumnsValue: function (_machine) { + _getColumnsValue: function(_machine) { _machine.listValues = []; if (!_machine.hasOwnProperty('machineAttrs') || _machine.machineAttrs.length < 1) { $that.machineManageInfo.listColumns.forEach(_value => { @@ -157,10 +160,10 @@ }) }, - _getColumns: function (_call) { + _getColumns: function(_call) { console.log('_getColumns'); $that.machineManageInfo.listColumns = []; - vc.getAttrSpec('machine_attr', function (data) { + vc.getAttrSpec('machine_attr', function(data) { $that.machineManageInfo.listColumns = []; data.forEach(item => { if (item.listShow == 'Y') { @@ -168,11 +171,11 @@ } }); _call(); - }); + }, 'COMMON'); } } }); -})(window.vc); +})(window.vc); \ No newline at end of file