问题修复

This commit is contained in:
BianLzhaoMin 2025-04-21 08:42:25 +08:00
parent f80b7a7e32
commit 5683f543f6
2 changed files with 36 additions and 4 deletions

View File

@ -197,7 +197,11 @@
:placeholder="props.addAndEditFormType == 3 ? '' : '请输入整改人'"
/>
</up-form-item>
<up-form-item prop="rectTime" label="整改日期">
<up-form-item
prop="rectTime"
label="整改日期"
:required="addAndEditModel.correctionImgList.length > 0"
>
<up-input
readonly
border="none"
@ -330,7 +334,7 @@
</template>
<script setup>
import { reactive, ref, watch, onMounted } from 'vue'
import { reactive, ref, watch, onMounted, computed } from 'vue'
import { debounce } from 'lodash-es' //
import { useCommon } from '@/hooks/useCommon.js'
import { getProcedureApi } from '@/services/common.js'
@ -410,6 +414,10 @@ const addAndEditModel = reactive({
rectStatus: 0,
})
const isRequired = computed(() => {
return addAndEditModel.correctionImgList.length > 0
})
//
const addAndEditModelRules = ref({
proName: [
@ -436,6 +444,14 @@ const addAndEditModelRules = ref({
trigger: ['blur', 'change'],
},
],
rectTime: [
{
type: 'string',
required: isRequired,
message: '请选择整改日期',
trigger: ['blur', 'change'],
},
],
checkUserName: [
{
trigger: ['blur', 'change'],

View File

@ -198,7 +198,11 @@
:placeholder="props.addAndEditFormType == 3 ? '' : '请输入整改人'"
/>
</up-form-item>
<up-form-item prop="rectTime" label="整改日期">
<up-form-item
prop="rectTime"
label="整改日期"
:required="addAndEditModel.correctionImgList.length > 0"
>
<up-input
readonly
border="none"
@ -332,7 +336,7 @@
</template>
<script setup>
import { reactive, ref, watch, onMounted } from 'vue'
import { reactive, ref, watch, onMounted, computed } from 'vue'
import { debounce } from 'lodash-es' //
import { useCommon } from '@/hooks/useCommon.js'
import { getProjectApi, getMajorApi, getProcedureApi } from '@/services/common.js'
@ -411,6 +415,10 @@ const addAndEditModel = reactive({
rectStatus: 0,
})
const isRequired = computed(() => {
return addAndEditModel.correctionImgList.length > 0
})
//
const addAndEditModelRules = ref({
proName: [
@ -448,6 +456,14 @@ const addAndEditModelRules = ref({
trigger: ['blur', 'change'],
},
],
rectTime: [
{
type: 'string',
required: isRequired,
message: '请选择整改日期',
trigger: ['blur', 'change'],
},
],
vioPlace: [
{
type: 'string',