From 972ba28464b6e6c3e010c6576fdf880a4a07a841 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 27 Nov 2020 23:11:25 +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 --- app.js | 8 +- .../communityManage/communityManage.html | 4 + .../common/communityManage/communityManage.js | 159 +++++++++++------- 3 files changed, 110 insertions(+), 61 deletions(-) diff --git a/app.js b/app.js index 8f7dd3ea9..3e248b28b 100644 --- a/app.js +++ b/app.js @@ -36,14 +36,14 @@ let opts = { //app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); -//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); -//app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts)); +app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); +app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts)); //app.use('/callComponent',proxy('http://127.0.0.1:8012',opts)); //app.use('/app',proxy('http://127.0.0.1:8012',opts)); - app.use('/callComponent',proxy('http://192.168.1.16:8012',opts)); - app.use('/app',proxy('http://192.168.1.16:8012',opts)); + //app.use('/callComponent',proxy('http://192.168.1.16:8012',opts)); + //app.use('/app',proxy('http://192.168.1.16:8012',opts)); //app.listen(3000); app.use(express.json()); diff --git a/public/pages/common/communityManage/communityManage.html b/public/pages/common/communityManage/communityManage.html index 6667b4c14..02def5047 100644 --- a/public/pages/common/communityManage/communityManage.html +++ b/public/pages/common/communityManage/communityManage.html @@ -63,6 +63,7 @@ 附近地标 城市编码 + {{item}} 状态 操作 @@ -74,6 +75,9 @@ {{community.nearbyLandmarks}} {{community.cityName}} + + {{item}} + {{community.stateName}}
{ + $that._getColumnsValue(item); + }); + }, + _getColumnsValue: function (_community) { + _community.listValues = []; + if (!_community.hasOwnProperty('communityAttrDtos') || _community.communityAttrDtos.length < 1) { + $that.communityManageInfo.listColumns.forEach(_value => { + _community.listValues.push(''); + }) + return; + } + + let _communityAttrDtos = _community.communityAttrDtos; + + + + $that.communityManageInfo.listColumns.forEach(_value => { + let _tmpValue = ''; + _communityAttrDtos.forEach(_attrItem => { + if (_value == _attrItem.specCdName) { + _tmpValue = _attrItem.value; + } + }) + _community.listValues.push(_tmpValue); + }) + + }, + _getColumns: function (_call) { + console.log('_getColumns'); + $that.communityManageInfo.listColumns = []; + vc.getAttrSpec('building_community_attr', function (data) { + $that.communityManageInfo.listColumns = []; + data.forEach(item => { + if (item.listShow == 'Y') { + $that.communityManageInfo.listColumns.push(item.specName); + } + }); + _call(); + }); } - } }); })(window.vc); \ No newline at end of file