Browse Source

feat:[模板管理][update]

ouqian
luojie 1 month ago
parent
commit
e978217d15
2 changed files with 11 additions and 3 deletions
  1. +9
    -2
      src/components/Template/HandleFormItem.vue
  2. +2
    -1
      src/views/business/comps/template/comps/dj/DJ003.vue

+ 9
- 2
src/components/Template/HandleFormItem.vue View File

@ -81,7 +81,9 @@
v-model="inputValue"
type="datetimerange"
range-separator="至"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')"
:picker-options="pickerOptions"
@change="(val) => onDateChange(val, 'yyyy/MM/DD HH:mm:ss')"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
@ -300,6 +302,7 @@ export default {
const defaultCheckedValue = getDefaultValueByOptions(this.item.options || []);
initialValue = { checkedValues: defaultCheckedValue, otherValues: {} };
}
const {type} = this;
return {
inputValue: initialValue,
oldValue: typeof initialValue === 'object' ? JSON.parse(JSON.stringify(initialValue)) : initialValue, //
@ -335,7 +338,7 @@ export default {
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
shortcuts: type === 'dateTimeRange' ? undefined:[{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
@ -657,7 +660,11 @@ export default {
this.onCommonHandleSaveRecord(this.inputValue);
},
onDateChange(val, format) {
this.inputValue = moment(val).format(format);
if (this.type === 'dateTimeRange') {
this.inputValue = [moment(val[0]).format(format), moment(val[1]).format(format)];
}else{
this.inputValue = moment(val).format(format);
}
this.onCommonHandleSaveRecord(this.inputValue);
},
getUserName(record) {

+ 2
- 1
src/views/business/comps/template/comps/dj/DJ003.vue View File

@ -197,7 +197,8 @@ export default {
{
label: 'template.dj.dj003.cysj',
prop: "cysj",
bodyType: 'input',
bodyType: 'dateTimeRange',
width: 450,
bodyFillType: 'actFill'
},
{

Loading…
Cancel
Save