优化 代码

This commit is contained in:
java110 2020-09-10 10:11:32 +08:00
parent d3bf92261d
commit 65a0b6e9e9
11 changed files with 159 additions and 75 deletions

8
app.js
View File

@ -34,10 +34,10 @@ let opts = {
//app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012/',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
//app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
app.use('/app',proxy('http://192.168.1.16:8012',opts));
//app.listen(3000);
app.use(express.json());

View File

@ -18,6 +18,11 @@
<div class="col-sm-10"><input v-model="addFloorInfo.name" type="text"
placeholder="必填,请填写名称" class="form-control"></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">建筑面积</label>
<div class="col-sm-10"><input v-model="addFloorInfo.floorArea" type="text"
placeholder="必填,请填写建筑面积" class="form-control"></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">备注</label>
<div class="col-sm-10"><textarea cols="5" v-model="addFloorInfo.remark" type="tel"

View File

@ -10,6 +10,7 @@
floorId:'',
name:'',
floorName:'',
floorArea:'',
floorNum:'',
remark:'',
errorInfo:''
@ -66,6 +67,18 @@
errInfo:"不是有效的数字"
},
],
'addFloorInfo.floorArea':[
{
limit:"required",
param:"",
errInfo:"建筑面积不能为空"
},
{
limit:"money",
param:"",
errInfo:"建筑面积错误如300.00"
},
],
'addFloorInfo.remark':[
{
@ -126,6 +139,7 @@
vc.component.addFloorInfo = {
name:'',
floorNum:'',
floorArea:'',
remark:'',
errorInfo:''
};

View File

@ -17,6 +17,11 @@
<div class="col-sm-10"><input v-model="addUnitInfo.layerCount" type="number"
placeholder="必填,请填写单元总层数" class="form-control"></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">建筑面积</label>
<div class="col-sm-10"><input v-model="addUnitInfo.unitArea" type="text"
placeholder="必填,请填写建筑面积" class="form-control"></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">电梯</label>
<div class="col-sm-10">

View File

@ -12,7 +12,8 @@
layerCount:'',
lift:'',
remark:'',
communityId:''
communityId:'',
unitArea:''
}
},
_initMethod:function(){
@ -79,6 +80,18 @@
errInfo:"单元楼层高度必须为数字"
}
],
'addUnitInfo.unitArea':[
{
limit:"required",
param:"",
errInfo:"建筑面积不能为空"
},
{
limit:"money",
param:"",
errInfo:"建筑面积错误 如300.00"
}
],
'addUnitInfo.lift':[
{
limit:"required",
@ -143,7 +156,8 @@
layerCount:'',
lift:'',
remark:'',
communityId:''
communityId:'',
unitArea:''
}
}
}

View File

@ -18,6 +18,11 @@
<div class="col-sm-10"><input v-model="editFloorInfo.floorName" type="text"
placeholder="必填,请填写名称" class="form-control"></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">建筑面积</label>
<div class="col-sm-10"><input v-model="editFloorInfo.floorArea" type="text"
placeholder="必填,请填写建筑面积" class="form-control"></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">备注</label>
<div class="col-sm-10"><textarea cols="5" v-model="editFloorInfo.remark" type="tel"

View File

@ -6,6 +6,7 @@
floorId: '',
floorName: '',
floorNum: '',
floorArea: '',
remark: '',
errorInfo: ''
}
@ -62,6 +63,18 @@
errInfo: "不是有效的数字"
},
],
'editFloorInfo.floorArea': [
{
limit: "required",
param: "",
errInfo: "建筑面积不能为空"
},
{
limit: "money",
param: "",
errInfo: "建筑面积错误如300.00"
},
],
'editFloorInfo.remark': [
{
@ -115,6 +128,7 @@
floorId: '',
floorName: '',
floorNum: '',
floorArea: '',
remark: '',
errorInfo: ''
};

View File

@ -14,6 +14,11 @@
<label class="col-sm-2 col-form-label">总层数</label>
<div class="col-sm-10"><input v-model="editUnitInfo.layerCount" type="number" placeholder="必填,请填写单元总层数" class="form-control"></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">建筑面积</label>
<div class="col-sm-10"><input v-model="editUnitInfo.unitArea" type="text"
placeholder="必填,请填写建筑面积" class="form-control"></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">电梯</label>
<div class="col-sm-10">

View File

@ -9,7 +9,8 @@
layerCount:'',
lift:'',
remark:'',
communityId:''
communityId:'',
unitArea:''
}
},
_initMethod:function(){
@ -60,6 +61,18 @@
errInfo:"单元楼层高度必须为数字"
}
],
'editUnitInfo.unitArea':[
{
limit:"required",
param:"",
errInfo:"建筑面积不能为空"
},
{
limit:"money",
param:"",
errInfo:"建筑面积错误 如300.00"
}
],
'editUnitInfo.lift':[
{
limit:"required",
@ -116,7 +129,8 @@
layerCount:'',
lift:'',
remark:'',
communityId:''
communityId:'',
unitArea:''
}
}
}

View File

@ -67,6 +67,7 @@
<tr>
<th class="text-center">名称</th>
<th class="text-center">编号</th>
<th class="text-center">建筑面积</th>
<th class="text-center">楼栋ID</th>
<th class="text-center">创建员工</th>
<th class="text-right">操作</th>
@ -81,6 +82,9 @@
<td class="text-center">
{{floor.floorNum}}
</td>
<td class="text-center">
{{floor.floorArea}}
</td>
<td class="text-center">
{{floor.floorId}}
</td>

View File

@ -84,6 +84,7 @@
<th>楼栋</th>
<th data-hide="phone">单元编号</th>
<th data-hide="phone">总层数</th>
<th data-hide="phone">建筑面积</th>
<th data-hide="phone">是否有电梯</th>
<th data-hide="phone,tablet">创建人</th>
<th class="text-right">操作</th>
@ -104,6 +105,9 @@
<td>
{{unit.layerCount}}层
</td>
<td>
{{unit.unitArea}}平方米
</td>
<td>
{{unit.lift == '1010'?'有':'无'}}
</td>