mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
初始化功能完成
This commit is contained in:
parent
04aac91ef8
commit
5fa2231c4d
@ -0,0 +1,24 @@
|
||||
<div id = "chooseinitializeCommunityModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseinitializeCommunityModelLabel" aria-hidden="true" >
|
||||
<div class="modal-dialog modal-lg">
|
||||
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">温馨提示!</h5>
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<li style="color: red;">请慎重操作,此操作将清空所有本小区数据。谨慎期间,请再次跟相关人员核实确认!</li>
|
||||
</br>
|
||||
<input placeholder="请输入开发者密码" type="text" v-model="chooseinitializeCommunityInfo._devPassword" class="form-control form-control-sm">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteMappingModel()">点错了</button>
|
||||
<button type="button" class="btn btn-primary" v-on:click="authenticationDevPassword()">确认格式化</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,35 @@
|
||||
(function(vc){
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
emitChooseinitializeCommunity:vc.propTypes.string,
|
||||
emitLoadData:vc.propTypes.string
|
||||
},
|
||||
data:{
|
||||
chooseinitializeCommunityInfo:{
|
||||
initializeCommunitys: [],
|
||||
_devPassword:'',
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('chooseinitializeCommunity','openChooseinitializeCommunityModel',function(_param){
|
||||
$('#chooseinitializeCommunityModel').modal('show');
|
||||
vc.component._refreshChooseinitializeCommunityInfo();
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
chooseinitializeCommunity:function(devPassword){
|
||||
vc.emit($props.emitChooseinitializeCommunity,'chooseinitializeCommunity',devPassword);
|
||||
$('#chooseinitializeCommunityModel').modal('hide');
|
||||
},
|
||||
queryServices:function(){
|
||||
vc.component.chooseinitializeCommunity(vc.component.ChooseinitializeCommunityInfo._devPassword);
|
||||
},
|
||||
_refreshChooseinitializeCommunityInfo:function(){
|
||||
vc.component.ChooseinitializeCommunityInfo._devPassword = "";
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
})(window.vc);
|
||||
@ -0,0 +1,87 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>查询条件</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入小区ID"
|
||||
v-model="initializeCommunityManageInfo.conditions.communityId" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入小区名称"
|
||||
v-model="initializeCommunityManageInfo.conditions.name" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryCommunityMethod()">
|
||||
<i class="fa fa-search"></i> 查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>初始化小区数据</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>小区ID</th>
|
||||
<th>小区名称</th>
|
||||
<th width="25%">附近地标</th>
|
||||
<th>城市编码</th>
|
||||
<th>状态</th>
|
||||
<th class="text-right">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="initializeCommunity in initializeCommunityManageInfo.initializeCommunitys">
|
||||
<td>{{initializeCommunity.communityId}}</td>
|
||||
<td>{{initializeCommunity.name}}</td>
|
||||
<!--<td>{{community.address}}</td>-->
|
||||
<td>{{initializeCommunity.nearbyLandmarks}}</td>
|
||||
<td>{{initializeCommunity.cityName}}</td>
|
||||
<td>{{initializeCommunity.stateName}}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openChooseinInitializeCommunity(initializeCommunity)">格式化
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="dev/chooseinitializeCommunity"
|
||||
emitChooseinitializeCommunity="chooseinitializeCommunity"
|
||||
emitLoadData="chooseinitializeCommunity"
|
||||
></vc:create>
|
||||
</div>
|
||||
@ -0,0 +1,95 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
initializeCommunityManageInfo: {
|
||||
initializeCommunitys: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
storeTypeCd: vc.getData('/nav/getUserInfo').storeTypeCd,
|
||||
devPassword:'',
|
||||
conditions: {
|
||||
name: '',
|
||||
cityCode: '',
|
||||
communityId: ''
|
||||
},
|
||||
listColumns: []
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listCommunitys(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('initializeCommunityManage', 'listCommunity', function (_param) {
|
||||
vc.component._listCommunitys(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on("chooseinitializeCommunity", "chooseinitializeCommunity",function (_param) {
|
||||
console.log(_param);
|
||||
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listCommunitys(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listCommunitys: function (_page, _rows) {
|
||||
vc.component.initializeCommunityManageInfo.conditions.page = _page;
|
||||
vc.component.initializeCommunityManageInfo.conditions.row = _rows;
|
||||
var _param = {
|
||||
params: vc.component.initializeCommunityManageInfo.conditions
|
||||
}
|
||||
//发送get请求
|
||||
vc.http.get('communityManage',
|
||||
'list',
|
||||
_param,
|
||||
function (json, res) {
|
||||
var _initializeCommunityManageInfo = JSON.parse(json);
|
||||
vc.component.initializeCommunityManageInfo.total = _initializeCommunityManageInfo.total;
|
||||
vc.component.initializeCommunityManageInfo.records = _initializeCommunityManageInfo.records;
|
||||
vc.component.initializeCommunityManageInfo.initializeCommunitys = _initializeCommunityManageInfo.communitys;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.initializeCommunityManageInfo.records,
|
||||
dataCount: vc.component.initializeCommunityManageInfo.total,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_initializeCommunity: function (_community) {
|
||||
var _param = {
|
||||
communityId: _community.communityId,
|
||||
devPassword: vc.component.initializeCommunityManageInfo.devPassword
|
||||
}
|
||||
vc.http.apiPost(
|
||||
'/initializeBuildingUnit/deleteBuildingUnit',
|
||||
JSON.stringify(_param),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
vc.emit('initializeCommunityManage', 'listCommunity', {});
|
||||
return;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
_openChooseinInitializeCommunity: function(){
|
||||
vc.emit('chooseinitializeCommunity','openChooseinitializeCommunityModel', {});
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user