mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化代码
This commit is contained in:
parent
3c898462bb
commit
c7098641f7
@ -83,6 +83,13 @@
|
||||
v-on:click="_openDeleteParkingAreaModel(parkingArea)">删除
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openParkingAreaText(parkingArea)">问候语
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -121,6 +121,9 @@
|
||||
});
|
||||
_call();
|
||||
});
|
||||
},
|
||||
_openParkingAreaText:function(_parkingArea){
|
||||
vc.jumpToPage('/admin.html#/pages/property/parkingAreaText?paId='+_parkingArea.paId)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
48
public/pages/property/parkingAreaText/parkingAreaText.html
Normal file
48
public/pages/property/parkingAreaText/parkingAreaText.html
Normal file
@ -0,0 +1,48 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12" v-for="(item,index) in parkingAreaTextInfo.texts">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>{{item.typeName}}</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_saveParkingAreaText(item)">
|
||||
<i class="glyphicon glyphicon-download-alt"></i>
|
||||
保存
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3">
|
||||
<input v-model="item.text1" type="text" placeholder="请填写第一个提示"
|
||||
class="form-control" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<input v-model="item.text2" type="text" placeholder="请填写第二个提示"
|
||||
class="form-control" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<input v-model="item.text3" type="text" placeholder="请填写第三个提示"
|
||||
class="form-control" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<input v-model="item.text4" type="text" placeholder="请填写第四个提示"
|
||||
class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-12">
|
||||
<input v-model="item.voice" type="text" placeholder="请填写语音"
|
||||
class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
95
public/pages/property/parkingAreaText/parkingAreaText.js
Normal file
95
public/pages/property/parkingAreaText/parkingAreaText.js
Normal file
@ -0,0 +1,95 @@
|
||||
/**
|
||||
权限组
|
||||
**/
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
parkingAreaTextInfo: {
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
paId: '',
|
||||
texts: []
|
||||
}
|
||||
},
|
||||
|
||||
_initMethod: function () {
|
||||
$that.parkingAreaTextInfo.paId = vc.getParam('paId');
|
||||
$that._initTexts();
|
||||
$that._listParkAreaTexts();
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
* 类型:1001 月租车进场,2002 月租车出场,3003 月租车到期,4004 临时车进场 5005 临时车出场 6006 临时车未缴费
|
||||
*/
|
||||
_initTexts: function () {
|
||||
|
||||
let _texts = [];
|
||||
//与租车进场
|
||||
_texts.push({
|
||||
typeCd: '1001',
|
||||
typeName: '月租车进场',
|
||||
});
|
||||
_texts.push({
|
||||
typeCd: '2002',
|
||||
typeName: '月租车出场',
|
||||
});
|
||||
_texts.push({
|
||||
typeCd: '3003',
|
||||
typeName: '月租车到期',
|
||||
});
|
||||
_texts.push({
|
||||
typeCd: '4004',
|
||||
typeName: '临时车进场',
|
||||
});
|
||||
_texts.push({
|
||||
typeCd: '5005',
|
||||
typeName: '临时车出场',
|
||||
});
|
||||
_texts.push({
|
||||
typeCd: '6006',
|
||||
typeName: '临时车未缴费',
|
||||
});
|
||||
|
||||
_texts.forEach(item => {
|
||||
item.voice = "";
|
||||
item.text1 = "";
|
||||
item.text2 = "";
|
||||
item.text3 = "";
|
||||
item.text4 = "";
|
||||
});
|
||||
$that.parkingAreaTextInfo.texts = _texts;
|
||||
},
|
||||
_listParkAreaTexts: function () {
|
||||
var param = {
|
||||
params: {
|
||||
paId: $that.parkingAreaTextInfo.paId,
|
||||
row: 10,
|
||||
page: 1
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/parkingAreaText.listParkingAreaText', param,
|
||||
function (json, res) {
|
||||
var _parkingAreaTexts = JSON.parse(json);
|
||||
_parkingAreaTexts = _parkingAreaTexts.data;
|
||||
if(_parkingAreaTexts.lenth < 1){
|
||||
return ;
|
||||
}
|
||||
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
});
|
||||
},
|
||||
_saveParkingAreaText: function () {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user