mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
支持编码映射like
This commit is contained in:
parent
ad0846b50b
commit
a94de23b6b
@ -12,20 +12,17 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入域" v-model="mappingManageInfo.conditions.domain"
|
||||
class=" form-control">
|
||||
<input type="text" placeholder="请输入域" v-model="mappingManageInfo.conditions.domain" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入名称" v-model="mappingManageInfo.conditions.name"
|
||||
class=" form-control">
|
||||
<input type="text" placeholder="请输入名称" v-model="mappingManageInfo.conditions.nameLike" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入键" v-model="mappingManageInfo.conditions.key"
|
||||
class=" form-control">
|
||||
<input type="text" placeholder="请输入键" v-model="mappingManageInfo.conditions.key" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
@ -74,14 +71,12 @@
|
||||
<td class="text-center">{{mapping.value}}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditMappingModel(mapping)">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditMappingModel(mapping)">
|
||||
修改
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteMappingModel(mapping)">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openDeleteMappingModel(mapping)">
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -1,74 +1,75 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function(vc){
|
||||
(function(vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data:{
|
||||
mappingManageInfo:{
|
||||
mappings:[],
|
||||
name:'',
|
||||
total:0,
|
||||
records:1,
|
||||
conditions:{
|
||||
domain:'',
|
||||
name:'',
|
||||
key:''
|
||||
data: {
|
||||
mappingManageInfo: {
|
||||
mappings: [],
|
||||
name: '',
|
||||
total: 0,
|
||||
records: 1,
|
||||
conditions: {
|
||||
domain: '',
|
||||
nameLike: '',
|
||||
key: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
_initMethod: function() {
|
||||
vc.component._listMappings(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('mappingManage','listMapping',function(_param){
|
||||
vc.component._listMappings(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
_initEvent: function() {
|
||||
vc.on('mappingManage', 'listMapping', function(_param) {
|
||||
vc.component._listMappings(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination','page_event',function(_currentPage){
|
||||
vc.component._listMappings(_currentPage,DEFAULT_ROWS);
|
||||
vc.on('pagination', 'page_event', function(_currentPage) {
|
||||
vc.component._listMappings(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
_listMappings:function(_page, _rows){
|
||||
methods: {
|
||||
_listMappings: function(_page, _rows) {
|
||||
vc.component.mappingManageInfo.conditions.page = _page;
|
||||
vc.component.mappingManageInfo.conditions.row = _rows;
|
||||
var param = {
|
||||
params:vc.component.mappingManageInfo.conditions
|
||||
};
|
||||
params: vc.component.mappingManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('mappingManage',
|
||||
'list',
|
||||
param,
|
||||
function(json,res){
|
||||
var _mappingManageInfo=JSON.parse(json);
|
||||
vc.component.mappingManageInfo.total = _mappingManageInfo.total;
|
||||
vc.component.mappingManageInfo.records = _mappingManageInfo.records;
|
||||
vc.component.mappingManageInfo.mappings = _mappingManageInfo.mappings;
|
||||
vc.emit('pagination','init',{
|
||||
total: vc.component.mappingManageInfo.records,
|
||||
dataCount: vc.component.mappingManageInfo.total,
|
||||
currentPage:_page
|
||||
});
|
||||
},function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
//发送get请求
|
||||
vc.http.get('mappingManage',
|
||||
'list',
|
||||
param,
|
||||
function(json, res) {
|
||||
var _mappingManageInfo = JSON.parse(json);
|
||||
vc.component.mappingManageInfo.total = _mappingManageInfo.total;
|
||||
vc.component.mappingManageInfo.records = _mappingManageInfo.records;
|
||||
vc.component.mappingManageInfo.mappings = _mappingManageInfo.mappings;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.mappingManageInfo.records,
|
||||
dataCount: vc.component.mappingManageInfo.total,
|
||||
currentPage: _page
|
||||
});
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddMappingModal:function(){
|
||||
vc.emit('addMapping','openAddMappingModal',{});
|
||||
_openAddMappingModal: function() {
|
||||
vc.emit('addMapping', 'openAddMappingModal', {});
|
||||
},
|
||||
_openEditMappingModel:function(_mapping){
|
||||
vc.emit('editMapping','openEditMappingModal',_mapping);
|
||||
_openEditMappingModel: function(_mapping) {
|
||||
vc.emit('editMapping', 'openEditMappingModal', _mapping);
|
||||
},
|
||||
_openDeleteMappingModel:function(_mapping){
|
||||
vc.emit('deleteMapping','openDeleteMappingModal',_mapping);
|
||||
_openDeleteMappingModel: function(_mapping) {
|
||||
vc.emit('deleteMapping', 'openDeleteMappingModal', _mapping);
|
||||
},
|
||||
_queryMappingMethod:function(){
|
||||
_queryMappingMethod: function() {
|
||||
vc.component._listMappings(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user