mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
优化代码
This commit is contained in:
parent
79faa67f26
commit
ade2bb9eb8
@ -1,32 +1,48 @@
|
||||
<div id = "addNotepadModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
|
||||
<div id="addNotepadModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b "><span><vc:i18n name="添加记事薄" namespace="addNotepad"></vc:i18n></span></h3>
|
||||
<h3 class="m-t-none m-b "><span><vc:i18n name="登记" namespace="addNotepad"></vc:i18n></span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='类型' namespace='addNotepad'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addNotepadInfo.noteType" type="text" :placeholder="vc.i18n('必填,请填写类型','addNotepad')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='简介' namespace='addNotepad'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addNotepadInfo.title" type="text" :placeholder="vc.i18n('必填,请填写简介','addNotepad')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='房屋名称' namespace='addNotepad'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addNotepadInfo.roomName" type="text" :placeholder="vc.i18n('必填,请填写房屋名称','addNotepad')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='房屋' namespace='addNotepad'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addNotepadInfo.roomName" type="text" :placeholder="vc.i18n('必填,请填写内容','addNotepad')" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='联系人' namespace='addNotepad'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addNotepadInfo.objName" type="text" :placeholder="vc.i18n('必填,请填写内容','addNotepad')" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='联系电话' namespace='addNotepad'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addNotepadInfo.link" type="text" :placeholder="vc.i18n('必填,请填写内容','addNotepad')" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='类型' namespace='addNotepad'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addNotepadInfo.noteType">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择反馈类型','addNotepadInfo')}}</option>
|
||||
<option v-for="(item,index) in addNotepadInfo.noteTypes" :value="item.statusCd">{{item.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='内容' namespace='addNotepad'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<textarea v-model="addNotepadInfo.title" rows="10" :placeholder="vc.i18n('必填,请填写内容','addNotepad')" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveNotepadInfo()" ><i class="fa fa-check"></i>
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveNotepadInfo()"><i class="fa fa-check"></i>
|
||||
<span><vc:i18n name="保存"></vc:i18n></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">
|
||||
@ -39,4 +55,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,125 +1,163 @@
|
||||
(function(vc){
|
||||
(function(vc) {
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener:vc.propTypes.string, //父组件名称
|
||||
callBackFunction:vc.propTypes.string //父组件监听方法
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data:{
|
||||
addNotepadInfo:{
|
||||
noteId:'',
|
||||
noteType:'',
|
||||
title:'',
|
||||
roomName:'',
|
||||
data: {
|
||||
addNotepadInfo: {
|
||||
noteId: '',
|
||||
noteType: '',
|
||||
title: '',
|
||||
roomName: '',
|
||||
roomId: '',
|
||||
objId: '',
|
||||
objName: '',
|
||||
objType: '3309',
|
||||
link: '',
|
||||
noteTypes: [],
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
_initMethod: function() {
|
||||
vc.getDict('notepad', 'note_type', function(_data) {
|
||||
$that.addNotepadInfo.noteTypes = _data;
|
||||
})
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('addNotepad','openAddNotepadModal',function(){
|
||||
},
|
||||
_initEvent: function() {
|
||||
vc.on('addNotepad', 'openAddNotepadModal', function(_param) {
|
||||
vc.copyObject(_param, $that.addNotepadInfo);
|
||||
$that.listNotepadRoom();
|
||||
$('#addNotepadModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
addNotepadValidate(){
|
||||
methods: {
|
||||
addNotepadValidate() {
|
||||
return vc.validate.validate({
|
||||
addNotepadInfo:vc.component.addNotepadInfo
|
||||
},{
|
||||
'addNotepadInfo.noteType':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"类型不能为空"
|
||||
addNotepadInfo: vc.component.addNotepadInfo
|
||||
}, {
|
||||
'addNotepadInfo.noteType': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "类型不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"12",
|
||||
errInfo:"类型不能超过12"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "12",
|
||||
errInfo: "类型不能超过12"
|
||||
},
|
||||
],
|
||||
'addNotepadInfo.title':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"简介不能为空"
|
||||
'addNotepadInfo.title': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "简介不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"256",
|
||||
errInfo:"简介不能超过256"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "256",
|
||||
errInfo: "简介不能超过256"
|
||||
},
|
||||
],
|
||||
'addNotepadInfo.roomName':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"房屋名称不能为空"
|
||||
'addNotepadInfo.roomName': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋名称不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"128",
|
||||
errInfo:"房屋名称不能超过128"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "128",
|
||||
errInfo: "房屋名称不能超过128"
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
saveNotepadInfo:function(){
|
||||
if(!vc.component.addNotepadValidate()){
|
||||
saveNotepadInfo: function() {
|
||||
if (!vc.component.addNotepadValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
vc.component.addNotepadInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
//不提交数据将数据 回调给侦听处理
|
||||
if(vc.notNull($props.callBackListener)){
|
||||
vc.emit($props.callBackListener,$props.callBackFunction,vc.component.addNotepadInfo);
|
||||
if (vc.notNull($props.callBackListener)) {
|
||||
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addNotepadInfo);
|
||||
$('#addNotepadModel').modal('hide');
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'notepad.saveNotepad',
|
||||
JSON.stringify(vc.component.addNotepadInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
JSON.stringify(vc.component.addNotepadInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#addNotepadModel').modal('hide');
|
||||
vc.component.clearAddNotepadInfo();
|
||||
vc.emit('notepadManage','listNotepad',{});
|
||||
vc.emit('notepadManage', 'listNotepad', {});
|
||||
vc.emit('simplifyNotepadManage', 'listNotepad', {});
|
||||
|
||||
return ;
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
|
||||
},
|
||||
function(errInfo,error){
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
clearAddNotepadInfo:function(){
|
||||
vc.component.addNotepadInfo = {
|
||||
noteType:'',
|
||||
title:'',
|
||||
roomName:'',
|
||||
|
||||
};
|
||||
listNotepadRoom: function(_page, _row) {
|
||||
let param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 1,
|
||||
roomId: '',
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/room.queryRooms',
|
||||
param,
|
||||
function(json, res) {
|
||||
let listRoomData = JSON.parse(json);
|
||||
vc.copyObject(listRoomData.rooms[0], $that.addNotepadInfo);
|
||||
$that.addNotepadInfo.objId = listRoomData.rooms[0].ownerId;
|
||||
$that.addNotepadInfo.objName = listRoomData.rooms[0].ownerName;
|
||||
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
clearAddNotepadInfo: function() {
|
||||
vc.component.addNotepadInfo = {
|
||||
noteId: '',
|
||||
noteType: '',
|
||||
title: '',
|
||||
roomName: '',
|
||||
roomId: '',
|
||||
objId: '',
|
||||
objName: '',
|
||||
objType: '3309',
|
||||
link: '',
|
||||
noteTypes: [],
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
})(window.vc);
|
||||
@ -7,28 +7,24 @@
|
||||
<vc:i18n name="查询条件"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
|
||||
v-on:click="_moreCondition()">{{notepadManageInfo.moreCondition == true?'隐藏':'更多'}}</button>
|
||||
<button type="button" class="btn btn-link btn-sm" style="margin-right:10px;" v-on:click="_moreCondition()">{{notepadManageInfo.moreCondition == true?'隐藏':'更多'}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择类型','notepadManage')"
|
||||
v-model="notepadManageInfo.conditions.noteType" class=" form-control">
|
||||
<input type="text" :placeholder="vc.i18n('请选择类型','notepadManage')" v-model="notepadManageInfo.conditions.noteType" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择简介','notepadManage')"
|
||||
v-model="notepadManageInfo.conditions.title" class=" form-control">
|
||||
<input type="text" :placeholder="vc.i18n('请选择简介','notepadManage')" v-model="notepadManageInfo.conditions.title" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择业主名称','notepadManage')"
|
||||
v-model="notepadManageInfo.conditions.objName" class=" form-control">
|
||||
<input type="text" :placeholder="vc.i18n('请选择业主名称','notepadManage')" v-model="notepadManageInfo.conditions.objName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
@ -42,8 +38,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-4" v-if="notepadManageInfo.moreCondition == true">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择登记人','notepadManage')"
|
||||
v-model="notepadManageInfo.conditions.createUserName" class=" form-control">
|
||||
<input type="text" :placeholder="vc.i18n('请选择登记人','notepadManage')" v-model="notepadManageInfo.conditions.createUserName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" v-if="notepadManageInfo.moreCondition == true">
|
||||
@ -64,12 +59,12 @@
|
||||
</span></h5>
|
||||
<span style="font-size: 10px;">(业主反馈记录)</span>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddNotepadModal()">
|
||||
<!-- <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddNotepadModal()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
<span>
|
||||
<vc:i18n name="登记" namespace="notepadManage"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
@ -77,7 +72,7 @@
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='类型' namespace='notepadManage'></vc:i18n>
|
||||
</span></th>
|
||||
@ -96,28 +91,23 @@
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
</span></th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="notepad in notepadManageInfo.notepads">
|
||||
|
||||
<td class="text-center">{{notepad.noteType}}</td>
|
||||
<td class="text-center">{{notepad.title}}</td>
|
||||
<td class="text-center">{{notepad.roomName}}</td>
|
||||
<td class="text-center">{{notepad.ownerName}}</td>
|
||||
<td class="text-center">{{notepad.createTime}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditNotepadModel(notepad)"><span>
|
||||
<!-- <div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditNotepadModel(notepad)"><span>
|
||||
<vc:i18n name='修改'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteNotepadModel(notepad)"><span>
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openDeleteNotepadModel(notepad)"><span>
|
||||
<vc:i18n name='删除'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
@ -134,7 +124,16 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
<div class="row margin-top-xs">
|
||||
<div class="col-sm-9">
|
||||
<div>
|
||||
温馨提示:请到业务受理页面登记
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 float-right">
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -234,6 +234,11 @@
|
||||
<span><vc:i18n name="车辆信息" namespace="simplifyAcceptance"></vc:i18n></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 'simplifyNotepad'}" v-on:click="_toSimplifyNotepadPage()">
|
||||
<span><vc:i18n name="业主反馈" namespace="simplifyAcceptance"></vc:i18n></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 'simplifyOwnerRepair'}" v-on:click="changeTab('simplifyOwnerRepair')">
|
||||
<span><vc:i18n name="报修单" namespace="simplifyAcceptance"></vc:i18n></span>
|
||||
@ -246,7 +251,7 @@
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 'simplifyOwnerAccessContol'}" v-on:click="changeTab('simplifyOwnerAccessContol')">
|
||||
<span><vc:i18n name="门禁同步" namespace="simplifyAcceptance"></vc:i18n></span>
|
||||
<span><vc:i18n name="设备同步" namespace="simplifyAcceptance"></vc:i18n></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
@ -261,7 +266,7 @@
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 'simplifyShopsHireLog'}" v-on:click="changeTab('simplifyShopsHireLog')">
|
||||
<span><vc:i18n name="绑定记录" namespace="simplifyAcceptance"></vc:i18n></span>
|
||||
<span><vc:i18n name="历史业主" namespace="simplifyAcceptance"></vc:i18n></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
@ -283,6 +288,7 @@
|
||||
<div v-if="simplifyAcceptanceInfo._currentTab == 'simplifyOwnerCar'">
|
||||
<vc:create path="property/simplifyOwnerCar"></vc:create>
|
||||
</div>
|
||||
|
||||
<div v-if="simplifyAcceptanceInfo._currentTab == 'simplifyOwnerRepair'">
|
||||
<vc:create path="property/simplifyOwnerRepair"></vc:create>
|
||||
</div>
|
||||
|
||||
@ -186,6 +186,13 @@
|
||||
roomNum: $that.simplifyAcceptanceInfo.roomNum
|
||||
})
|
||||
},
|
||||
_toSimplifyNotepadPage: function() {
|
||||
if (!$that.simplifyAcceptanceInfo.ownerId) {
|
||||
vc.toast('请先选择房屋');
|
||||
return;
|
||||
}
|
||||
vc.jumpToPage('/#/pages/property/simplifyNotepadManage?roomId=' + $that.simplifyAcceptanceInfo.roomId + "&ownerId=" + $that.simplifyAcceptanceInfo.ownerId)
|
||||
},
|
||||
errorLoadImg: function() {
|
||||
vc.component.simplifyAcceptanceInfo.ownerPhoto = "/img/noPhoto.jpg";
|
||||
},
|
||||
|
||||
@ -0,0 +1,106 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5><span>
|
||||
<vc:i18n name="业主反馈" namespace="simplifyNotepadManage"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-white btn-sm" v-on:click="vc.goBack()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
<span>
|
||||
<vc:i18n name="返回" namespace="simplifyNotepadManage"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddNotepadModal()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
<span>
|
||||
<vc:i18n name="登记" namespace="simplifyNotepadManage"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='类型' namespace='simplifyNotepadManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='房屋' namespace='simplifyNotepadManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='业主' namespace='simplifyNotepadManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='记录时间' namespace='simplifyNotepadManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='登记人' namespace='simplifyNotepadManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='登记内容' namespace='simplifyNotepadManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="notepad in simplifyNotepadManageInfo.notepads">
|
||||
<td class="text-center">{{notepad.noteTypeName}}</td>
|
||||
<td class="text-center">{{notepad.roomName}}</td>
|
||||
<td class="text-center">{{notepad.objName}}</td>
|
||||
<td class="text-center">{{notepad.createTime}}</td>
|
||||
<td class="text-center">{{notepad.createUserName}}</td>
|
||||
<td class="text-center">{{notepad.title}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditNotepadModel(notepad)"><span>
|
||||
<vc:i18n name='修改'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openDeleteNotepadModel(notepad)"><span>
|
||||
<vc:i18n name='删除'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<div class="row margin-top-xs">
|
||||
<div class="col-sm-9">
|
||||
<div>
|
||||
温馨提示:请到业务受理页面登记
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 float-right">
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<vc:create path="property/addNotepad" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="property/editNotepad"></vc:create>
|
||||
<vc:create path="property/deleteNotepad"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -0,0 +1,97 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function(vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
simplifyNotepadManageInfo: {
|
||||
notepads: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
noteId: '',
|
||||
roomId: '',
|
||||
ownerId: '',
|
||||
conditions: {
|
||||
noteType: '',
|
||||
title: '',
|
||||
objName: '',
|
||||
createUserName: '',
|
||||
state: '',
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function() {
|
||||
let _roomId = vc.getParam('roomId');
|
||||
let _ownerId = vc.getParam('ownerId');
|
||||
$that.simplifyNotepadManageInfo.roomId = _roomId;
|
||||
$that.simplifyNotepadManageInfo.ownerId = _ownerId;
|
||||
vc.component._listNotepads(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function() {
|
||||
|
||||
vc.on('simplifyNotepadManage', 'listNotepad', function(_param) {
|
||||
vc.component._listNotepads(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function(_currentPage) {
|
||||
vc.component._listNotepads(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listNotepads: function(_page, _rows) {
|
||||
|
||||
vc.component.simplifyNotepadManageInfo.conditions.page = _page;
|
||||
vc.component.simplifyNotepadManageInfo.conditions.row = _rows;
|
||||
var param = {
|
||||
params: vc.component.simplifyNotepadManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/notepad.listNotepad',
|
||||
param,
|
||||
function(json, res) {
|
||||
var _simplifyNotepadManageInfo = JSON.parse(json);
|
||||
vc.component.simplifyNotepadManageInfo.total = _simplifyNotepadManageInfo.total;
|
||||
vc.component.simplifyNotepadManageInfo.records = _simplifyNotepadManageInfo.records;
|
||||
vc.component.simplifyNotepadManageInfo.notepads = _simplifyNotepadManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.simplifyNotepadManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddNotepadModal: function() {
|
||||
vc.emit('addNotepad', 'openAddNotepadModal', {
|
||||
roomId: $that.simplifyNotepadManageInfo.roomId,
|
||||
ownerId: $that.simplifyNotepadManageInfo.ownerId
|
||||
});
|
||||
},
|
||||
_openEditNotepadModel: function(_notepad) {
|
||||
vc.emit('editNotepad', 'openEditNotepadModal', _notepad);
|
||||
},
|
||||
_openDeleteNotepadModel: function(_notepad) {
|
||||
vc.emit('deleteNotepad', 'openDeleteNotepadModal', _notepad);
|
||||
},
|
||||
_queryNotepadMethod: function() {
|
||||
vc.component._listNotepads(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function() {
|
||||
if (vc.component.simplifyNotepadManageInfo.moreCondition) {
|
||||
vc.component.simplifyNotepadManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.simplifyNotepadManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user