优化报表支持日期格式

This commit is contained in:
java110 2021-11-13 23:37:46 +08:00
parent 9c194ae17f
commit 14498c5bbe
7 changed files with 53 additions and 7 deletions

View File

@ -33,10 +33,18 @@
<div class="col-sm-10"> <div class="col-sm-10">
<select class="custom-select" v-model="addComponentConditionInfo.type"> <select class="custom-select" v-model="addComponentConditionInfo.type">
<option selected disabled value="">必填,请选择类型</option> <option selected disabled value="">必填,请选择类型</option>
<option value="input">文本框</option> <option value="text">文本框</option>
<option value="date">日期</option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">排序</label>
<div class="col-sm-10">
<input v-model="addComponentConditionInfo.seq" type="text" placeholder="必填,请填写排序"
class="form-control">
</div>
</div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label">描述</label> <label class="col-sm-2 col-form-label">描述</label>
<div class="col-sm-10"> <div class="col-sm-10">

View File

@ -13,6 +13,7 @@
param: '', param: '',
type: '', type: '',
remark: '', remark: '',
seq:''
} }
}, },
_initMethod: function () { _initMethod: function () {
@ -89,6 +90,18 @@
errInfo: "类型不能超过12" errInfo: "类型不能超过12"
}, },
], ],
'addComponentConditionInfo.seq': [
{
limit: "required",
param: "",
errInfo: "排序不能为空"
},
{
limit: "num",
param: "",
errInfo: "排序必须是数字"
},
],
'addComponentConditionInfo.remark': [ 'addComponentConditionInfo.remark': [
{ {
limit: "maxLength", limit: "maxLength",
@ -147,7 +160,7 @@
param: '', param: '',
type: '', type: '',
remark: '', remark: '',
seq:''
}; };
} }
} }

View File

@ -33,10 +33,18 @@
<div class="col-sm-10"> <div class="col-sm-10">
<select class="custom-select" v-model="editComponentConditionInfo.type"> <select class="custom-select" v-model="editComponentConditionInfo.type">
<option selected disabled value="">必填,请选择类型</option> <option selected disabled value="">必填,请选择类型</option>
<option value="input">文本框</option> <option value="text">文本框</option>
<option value="date">日期</option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">排序</label>
<div class="col-sm-10">
<input v-model="editComponentConditionInfo.seq" type="text" placeholder="必填,请填写排序"
class="form-control">
</div>
</div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label">描述</label> <label class="col-sm-2 col-form-label">描述</label>
<div class="col-sm-10"> <div class="col-sm-10">

View File

@ -10,6 +10,7 @@
param: '', param: '',
type: '', type: '',
remark: '', remark: '',
seq:''
} }
}, },
_initMethod: function () { _initMethod: function () {
@ -87,6 +88,18 @@
errInfo: "类型不能超过12" errInfo: "类型不能超过12"
}, },
], ],
'editComponentConditionInfo.seq': [
{
limit: "required",
param: "",
errInfo: "排序不能为空"
},
{
limit: "num",
param: "",
errInfo: "排序必须为数字"
},
],
'editComponentConditionInfo.remark': [ 'editComponentConditionInfo.remark': [
{ {
limit: "maxLength", limit: "maxLength",
@ -141,7 +154,7 @@
param: '', param: '',
type: '', type: '',
remark: '', remark: '',
seq:''
} }
} }
} }

View File

@ -11,8 +11,8 @@
<div class="row"> <div class="row">
<div class="col-sm-3" v-for="(conditionItem,conditionIndex) in item.conditions"> <div class="col-sm-3" v-for="(conditionItem,conditionIndex) in item.conditions">
<div class="form-group"> <div class="form-group">
<input type="text" :placeholder="conditionItem.holdpace" <input :type="conditionItem.type" :placeholder="conditionItem.holdpace"
v-model="conditionItem.value" class=" form-control"> v-model="conditionItem.value" class=" form-control" :class="">
</div> </div>
</div> </div>
<div class="col-sm-1"> <div class="col-sm-1">

View File

@ -74,6 +74,8 @@
let _componentConditionManageInfo = JSON.parse(json); let _componentConditionManageInfo = JSON.parse(json);
_component.conditions = _componentConditionManageInfo.data; _component.conditions = _componentConditionManageInfo.data;
$that.$forceUpdate(); $that.$forceUpdate();
//处理日期类型
}, function (errInfo, error) { }, function (errInfo, error) {
console.log('请求失败处理'); console.log('请求失败处理');
} }

View File

@ -26,6 +26,7 @@
<th class="text-center">提示</th> <th class="text-center">提示</th>
<th class="text-center">参数</th> <th class="text-center">参数</th>
<th class="text-center">类型</th> <th class="text-center">类型</th>
<th class="text-center">序号</th>
<th class="text-center">描述</th> <th class="text-center">描述</th>
<th class="text-center">操作</th> <th class="text-center">操作</th>
</tr> </tr>
@ -36,7 +37,8 @@
<td class="text-center">{{componentCondition.name}}</td> <td class="text-center">{{componentCondition.name}}</td>
<td class="text-center">{{componentCondition.holdpace}}</td> <td class="text-center">{{componentCondition.holdpace}}</td>
<td class="text-center">{{componentCondition.param}}</td> <td class="text-center">{{componentCondition.param}}</td>
<td class="text-center">{{componentCondition.type == 'input'?'文本框':'未知'}}</td> <td class="text-center">{{componentCondition.type == 'text'?'文本框':'日期'}}</td>
<td class="text-center">{{componentCondition.seq}}</td>
<td class="text-center">{{componentCondition.remark}}</td> <td class="text-center">{{componentCondition.remark}}</td>
<td class="text-center"> <td class="text-center">
<div class="btn-group"> <div class="btn-group">