mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-11 14:17:24 +08:00
优化 小区功能
This commit is contained in:
parent
1b3601bcc6
commit
5dd1cfd250
@ -1,53 +1,51 @@
|
||||
(function(vc,vm){
|
||||
(function(vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data:{
|
||||
deleteCommunityInfo:{
|
||||
data: {
|
||||
deleteCommunityInfo: {
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
_initMethod: function() {
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('deleteCommunity','openDeleteCommunityModal',function(_params){
|
||||
},
|
||||
_initEvent: function() {
|
||||
vc.on('deleteCommunity', 'openDeleteCommunityModal', function(_params) {
|
||||
|
||||
vc.component.deleteCommunityInfo = _params;
|
||||
$('#deleteCommunityModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
deleteCommunity:function(){
|
||||
methods: {
|
||||
deleteCommunity: function() {
|
||||
//vc.component.deleteCommunityInfo.communityId=vc.getCurrentCommunity().communityId;
|
||||
vc.http.post(
|
||||
'deleteCommunity',
|
||||
'delete',
|
||||
JSON.stringify(vc.component.deleteCommunityInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
vc.http.apiPost(
|
||||
'/community.deleteCommunity',
|
||||
JSON.stringify(vc.component.deleteCommunityInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if(res.status == 200){
|
||||
if (res.status == 200) {
|
||||
//关闭model
|
||||
$('#deleteCommunityModel').modal('hide');
|
||||
vc.emit('communityManage','listCommunity',{});
|
||||
vc.emit('auditCommunityManage','listCommunity',{});
|
||||
return ;
|
||||
vc.emit('communityManage', 'listCommunity', {});
|
||||
vc.emit('auditCommunityManage', 'listCommunity', {});
|
||||
return;
|
||||
}
|
||||
vc.toast(json);
|
||||
},
|
||||
function(errInfo,error){
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(json);
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
closeDeleteCommunityModel:function(){
|
||||
closeDeleteCommunityModel: function() {
|
||||
$('#deleteCommunityModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc,window.vc.component);
|
||||
})(window.vc, window.vc.component);
|
||||
@ -57,9 +57,9 @@
|
||||
}
|
||||
})
|
||||
|
||||
_data = _data.sort(function(a, b) {
|
||||
return a.floorNum - b.floorNum
|
||||
});
|
||||
// _data = _data.sort(function(a, b) {
|
||||
// return a.seq - b.seq
|
||||
// });
|
||||
|
||||
$.jstree.destroy()
|
||||
$("#jstree_floorUnit").jstree({
|
||||
|
||||
@ -39,9 +39,9 @@
|
||||
|
||||
let _data = $that._doJsTreeRoomTreeData();
|
||||
|
||||
_data = _data.sort(function(a, b) {
|
||||
return a.floorNum - b.floorNum
|
||||
})
|
||||
// _data = _data.sort(function(a, b) {
|
||||
// return a.floorNum - b.floorNum
|
||||
// })
|
||||
$.jstree.destroy()
|
||||
$("#jstree_floorUnitRoom").jstree({
|
||||
"checkbox": {
|
||||
@ -100,7 +100,7 @@
|
||||
let childNodes = node.children;
|
||||
//$('#u_' + _unitId)
|
||||
if (childNodes && childNodes.length > 0) {
|
||||
$('#jstree_floorUnitRoom').jstree('open_node', '#u_' + _unitId);
|
||||
$('#jstree_floorUnitRoom').jstree('open_node', '#u_' + _unitId);
|
||||
return;
|
||||
}
|
||||
let param = {
|
||||
@ -138,10 +138,10 @@
|
||||
$('#jstree_floorUnitRoom').jstree('_append_json_data', $('#u_' + _unitId), _datas, function() {
|
||||
// 这个回调函数要加 不然会报错,即使这个函数里面什么也不做
|
||||
});
|
||||
setTimeout(function(){
|
||||
$('#jstree_floorUnitRoom').jstree('open_node', '#u_' + _unitId);
|
||||
},1000);
|
||||
|
||||
setTimeout(function() {
|
||||
$('#jstree_floorUnitRoom').jstree('open_node', '#u_' + _unitId);
|
||||
}, 1000);
|
||||
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
@ -36,9 +36,9 @@
|
||||
},
|
||||
_initJsTreeRoomTreeDivFloorUnit: function() {
|
||||
let _data = $that._doJsTreeRoomTreeDivData();
|
||||
_data = _data.sort(function(a, b) {
|
||||
return a.floorNum - b.floorNum
|
||||
})
|
||||
// _data = _data.sort(function(a, b) {
|
||||
// return a.floorNum - b.floorNum
|
||||
// })
|
||||
$.jstree.destroy()
|
||||
$("#jstree_floorUnitRoomDiv").jstree({
|
||||
"checkbox": {
|
||||
@ -135,10 +135,10 @@
|
||||
$('#jstree_floorUnitRoomDiv').jstree('_append_json_data', $('#u_' + _unitId), _datas, function() {
|
||||
// 这个回调函数要加 不然会报错,即使这个函数里面什么也不做
|
||||
});
|
||||
setTimeout(function(){
|
||||
setTimeout(function() {
|
||||
$('#jstree_floorUnitRoomDiv').jstree('open_node', '#u_' + _unitId);
|
||||
},1000);
|
||||
|
||||
}, 1000);
|
||||
|
||||
if (listRoomData.rooms && listRoomData.rooms.length > 0) {
|
||||
vc.emit($that.roomTreeDivInfo.callName, 'selectRoom', {
|
||||
roomName: listRoomData.rooms[0].floorNum + "-" + listRoomData.rooms[0].unitNum + "-" + listRoomData.rooms[0].roomNum,
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
</td>
|
||||
<td class="text-center">{{community.stateName}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group" v-if="community.state == '1200' && communityManageInfo.storeTypeCd == '800900000001'">
|
||||
<div class="btn-group" v-if=" communityManageInfo.storeTypeCd == '800900000001'">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openDeleteCommunityModel(community)"><span><vc:i18n name="删除" namespace="communityManage"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
@ -121,4 +121,4 @@
|
||||
<vc:create path="common/editCommunity"></vc:create>
|
||||
<vc:create path="common/deleteCommunity"></vc:create>
|
||||
<vc:create path="common/recallAuditFinishCommunity"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user