mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
181ba6bd63
commit
0de14e5a44
20
app.js
20
app.js
@ -32,13 +32,13 @@ let opts = {
|
||||
}
|
||||
|
||||
|
||||
app.use('/callComponent', proxy('http://192.168.100.108:8088', opts));
|
||||
app.use('/app', proxy('http://192.168.100.108:8088', opts));
|
||||
app.use('/ws', createProxyMiddleware({
|
||||
target: 'http://192.168.100.108:8008',
|
||||
changeOrigin: true,
|
||||
ws: true
|
||||
}));
|
||||
// app.use('/callComponent', proxy('http://192.168.100.108:8088', opts));
|
||||
// app.use('/app', proxy('http://192.168.100.108:8088', opts));
|
||||
// app.use('/ws', createProxyMiddleware({
|
||||
// target: 'http://192.168.100.108:8008',
|
||||
// changeOrigin: true,
|
||||
// ws: true
|
||||
// }));
|
||||
|
||||
// app.use('/callComponent', proxy('http://ynwyht.dk55.com:8008', opts));
|
||||
// app.use('/app', proxy('http://ynwyht.dk55.com:8008', opts));
|
||||
@ -48,9 +48,9 @@ app.use('/ws', createProxyMiddleware({
|
||||
// ws: true
|
||||
// }));
|
||||
|
||||
// app.use('/callComponent', proxy('http://127.0.0.1:8008', opts));
|
||||
// app.use('/app', proxy('http://127.0.0.1:8008', opts));
|
||||
// app.use('/ws',proxy('http://127.0.0.1:8008',opts));
|
||||
app.use('/callComponent', proxy('http://127.0.0.1:8008', opts));
|
||||
app.use('/app', proxy('http://127.0.0.1:8008', opts));
|
||||
app.use('/ws', proxy('http://127.0.0.1:8008', opts));
|
||||
// app.use('/callComponent',proxy('http://192.168.1.106:8012',opts));
|
||||
// app.use('/app',proxy('http://192.168.1.106:8012',opts));
|
||||
|
||||
|
||||
@ -13,15 +13,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='预约开始时间' namespace='addCommunitySpace'></vc:i18n></span></label>
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='开场时间' namespace='addCommunitySpace'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addCommunitySpaceInfo.startTime" type="text" :placeholder="vc.i18n('必填,请填写预约开始时间','addCommunitySpace')" class="form-control addSpaceStartTime">
|
||||
<input v-model="addCommunitySpaceInfo.startTime" type="text" :placeholder="vc.i18n('必填,请填写开场时间','addCommunitySpace')" class="form-control addSpaceStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='预约结束时间' namespace='addCommunitySpace'></vc:i18n></span></label>
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='关场时间' namespace='addCommunitySpace'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addCommunitySpaceInfo.endTime" type="text" :placeholder="vc.i18n('必填,请填写预约结束时间','addCommunitySpace')" class="form-control addSpaceEndTime">
|
||||
<input v-model="addCommunitySpaceInfo.endTime" type="text" :placeholder="vc.i18n('必填,请填写关场时间','addCommunitySpace')" class="form-control addSpaceEndTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
|
||||
@ -13,13 +13,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2"><span><vc:i18n name='预约开始时间' namespace='editCommunitySpace'></vc:i18n></span> </label>
|
||||
<label class="col-sm-2"><span><vc:i18n name='开场时间' namespace='editCommunitySpace'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCommunitySpaceInfo.startTime" type="text" :placeholder="vc.i18n('必填,请填写预约开始时间','editCommunitySpace')" class="form-control editSpaceStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2"><span><vc:i18n name='预约结束时间' namespace='editCommunitySpace'></vc:i18n></span> </label>
|
||||
<label class="col-sm-2"><span><vc:i18n name='关场时间' namespace='editCommunitySpace'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCommunitySpaceInfo.endTime" type="text" :placeholder="vc.i18n('必填,请填写预约结束时间','editCommunitySpace')" class="form-control editSpaceEndTime">
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
<div id="editCommunitySpaceOpenTimeModel" 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="editCommunitySpaceOpenTime"></vc:i18n></span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2"> <span><vc:i18n name='名称' namespace='editCommunitySpaceOpenTime'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCommunitySpaceOpenTimeInfo.name" type="text" :placeholder="vc.i18n('必填,请填写名称','editCommunitySpaceOpenTime')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2"><span><vc:i18n name='开场时间' namespace='editCommunitySpaceOpenTime'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCommunitySpaceOpenTimeInfo.startTime" type="text" :placeholder="vc.i18n('必填,请填写预约开始时间','editCommunitySpaceOpenTime')" class="form-control editSpaceStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2"><span><vc:i18n name='关场时间' namespace='editCommunitySpaceOpenTime'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCommunitySpaceOpenTimeInfo.endTime" type="text" :placeholder="vc.i18n('必填,请填写预约结束时间','editCommunitySpaceOpenTime')" class="form-control editSpaceEndTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2"><span><vc:i18n name='每小时费用' namespace='editCommunitySpaceOpenTime'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCommunitySpaceOpenTimeInfo.feeMoney" type="text" :placeholder="vc.i18n('必填,请填写每小时费用','editCommunitySpaceOpenTime')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2"><span><vc:i18n name='管理员' namespace='editCommunitySpaceOpenTime'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCommunitySpaceOpenTimeInfo.adminName" type="text" :placeholder="vc.i18n('必填,请填写管理员','editCommunitySpaceOpenTime')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2"> <span><vc:i18n name='管理员电话' namespace='editCommunitySpaceOpenTime'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCommunitySpaceOpenTimeInfo.tel" type="text" :placeholder="vc.i18n('必填,请填写管理员电话','editCommunitySpaceOpenTime')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2"><span><vc:i18n name='状态' namespace='editCommunitySpaceOpenTime'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editCommunitySpaceOpenTimeInfo.state">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择状态' ,'editCommunitySpaceOpenTime')}}</option>
|
||||
<option value="1001">{{vc.i18n('可预约' ,'editCommunitySpaceOpenTime')}} </option>
|
||||
<option value="2002">{{vc.i18n('不可预约' ,'editCommunitySpaceOpenTime')}} </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="editCommunitySpaceOpenTime()"><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"><span><vc:i18n name="取消"></vc:i18n></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,52 @@
|
||||
(function(vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
editCommunitySpaceOpenTimeInfo: {
|
||||
openTimes: []
|
||||
}
|
||||
},
|
||||
_initMethod: function() {
|
||||
|
||||
},
|
||||
_initEvent: function() {
|
||||
vc.on('editCommunitySpaceOpenTime', 'openEditCommunitySpaceModal', function(_params) {
|
||||
$that.editCommunitySpaceOpenTimeInfo.openTimes = _params.openTimes;
|
||||
$('#editCommunitySpaceOpenTimeModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
||||
editCommunitySpaceOpenTime: function() {
|
||||
if (!vc.component.editCommunitySpaceOpenTimeValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/communitySpace.updateCommunitySpace',
|
||||
JSON.stringify(vc.component.editCommunitySpaceOpenTimeInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#editCommunitySpaceOpenTimeModel').modal('hide');
|
||||
vc.emit('communitySpaceManage', 'listCommunitySpace', {});
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -58,8 +58,8 @@
|
||||
<tr>
|
||||
<!-- <th class="text-center"><span><vc:i18n name='编号' namespace='communitySpaceManage'></vc:i18n></span></th> -->
|
||||
<th class="text-center"><span><vc:i18n name='名称' namespace='communitySpaceManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='预约开始时间' namespace='communitySpaceManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='预约结束时间' namespace='communitySpaceManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='开场时间' namespace='communitySpaceManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='关场时间' namespace='communitySpaceManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='每小时费用' namespace='communitySpaceManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='管理员' namespace='communitySpaceManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='管理员电话' namespace='communitySpaceManage'></vc:i18n></span></th>
|
||||
@ -78,6 +78,9 @@
|
||||
<td class="text-center">{{communitySpace.tel}}</td>
|
||||
<td class="text-center">{{communitySpace.state == '1001'?'可预约':'不可预约'}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditOpenTime(communitySpace)"><span><vc:i18n name='开放时间'></vc:i18n></span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditCommunitySpaceModel(communitySpace)"><span><vc:i18n name='修改'></vc:i18n></span></button>
|
||||
</div>
|
||||
@ -107,6 +110,7 @@
|
||||
|
||||
<vc:create path="property/addCommunitySpace" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="property/editCommunitySpace"></vc:create>
|
||||
<vc:create path="property/editCommunitySpaceOpenTime"></vc:create>
|
||||
<vc:create path="property/deleteCommunitySpace"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -65,12 +65,14 @@
|
||||
_openEditCommunitySpaceModel: function(_communitySpace) {
|
||||
vc.emit('editCommunitySpace', 'openEditCommunitySpaceModal', _communitySpace);
|
||||
},
|
||||
_openEditOpenTime: function(_communitySpace) {
|
||||
vc.emit('editCommunitySpaceOpenTime', 'openEditCommunitySpaceModal', _communitySpace);
|
||||
},
|
||||
_openDeleteCommunitySpaceModel: function(_communitySpace) {
|
||||
vc.emit('deleteCommunitySpace', 'openDeleteCommunitySpaceModal', _communitySpace);
|
||||
},
|
||||
_queryCommunitySpaceMethod: function() {
|
||||
vc.component._listCommunitySpaces(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function() {
|
||||
if (vc.component.communitySpaceManageInfo.moreCondition) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user