Compare commits

..

No commits in common. '1bf842201bb1acfb2e25772645bd1f7d5c33f49f' and '0a4373fba92274a00b17a76cf929ebe249507c77' have entirely different histories.

@ -39,7 +39,7 @@
<!-- 元素管理-->
<template v-for="(item,index) in form.fieldTemplateList">
<van-field v-if="item.type == '1'" :required="item.required" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" v-model="item.value" :label="item.label" :disabled="disabled || oaListIsDisabled" :name="item.field" placeholder="请输入" input-align="right"></van-field>
<van-field v-if="item.type == '2'" :label="item.label" :required="item.required" :name="item.field" :disabled="disabled || oaListIsDisabled" input-align="right" :rules="[{ message: `${item.label}不能为空`, required: false}]" label-width="9em">
<van-field v-if="item.type == '2'" :label="item.label" :required="item.required" :name="item.field" :disabled="disabled || oaListIsDisabled" input-align="right" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" label-width="9em">
<template #input>
<van-switch v-model="item.value" :disabled="disabled || oaListIsDisabled"/>
</template>
@ -408,7 +408,6 @@ export default {
})
// })
}).catch((err) => {
console.log(err)
this.$loading(false, 'form')
if (err && err.length > 0 && err[0].name) {
const fieldElement = this.$refs.form.$el.querySelector(`[name="${err[0].name}"]`);
@ -464,7 +463,7 @@ export default {
this.$set(this.form, 'endTime1', `${dayjs(this.form.endTime).format('YYYY/MM/DD')}`)
this.form.fieldTemplateList.forEach(function (item,index){
if(item.type == 3){
_this.$set(item, `${item.field}1`, `${dayjs(Number(item.value)).format('YYYY/MM/DD')}`)
_this.$set(item, `${item.field}1`, `${dayjs(item.value).format('YYYY/MM/DD')}`)
}
if(item.type == 2){
item.value =item.value? Boolean(item.value):false

@ -39,7 +39,7 @@
<!-- 元素控制-->
<template v-for="(item,index) in form.fieldTemplateList">
<van-field v-if="item.type == '1'" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" :required="item.required" v-model="item.value" :label="item.label" :disabled="disabled || oaListIsDisabled" :name="item.field" placeholder="请输入" input-align="right"></van-field>
<van-field v-if="item.type == '2'" :label="item.label" required :name="item.field" :disabled="disabled || oaListIsDisabled" input-align="right" :rules="[{ message: `${item.label}不能为空`, required: false}]" label-width="9em">
<van-field v-if="item.type == '2'" :label="item.label" required :name="item.field" :disabled="disabled || oaListIsDisabled" input-align="right" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" label-width="9em">
<template #input>
<van-switch v-model="item.value" :disabled="disabled || oaListIsDisabled" />
</template>
@ -465,7 +465,7 @@ export default {
this.$set(this.form, 'endTime1', `${dayjs(this.form.endTime).format('YYYY/MM/DD')}`)
res.data.fieldTemplateList.forEach(function (item) {
if (item.type == 3) {
_this.$set(item, `${item.field}1`, `${dayjs(Number(item.value)).format('YYYY/MM/DD')}`)
_this.$set(item, `${item.field}1`, `${dayjs(item.value).format('YYYY/MM/DD')}`)
}
if (item.type == 2) {
item.value = item.value ? Boolean(item.value) : false

Loading…
Cancel
Save