fix: 问题修复

This commit is contained in:
huxuejian 2026-02-10 16:15:44 +08:00
parent 946d29ad97
commit 4d7de97445
4 changed files with 24 additions and 9 deletions

View File

@ -9,12 +9,12 @@
</common-cell>
</template>
<script setup>
import { computed } from 'vue';
import { computed, onMounted } from 'vue';
import { set } from '@/utils/cache';
import commonCell from '../common-cell.vue';
const emits = defineEmits(['change']);
const emits = defineEmits(['change', 'addRule']);
const props = defineProps({
form: {
type: Object,
@ -52,6 +52,18 @@ function select() {
})
}
onMounted(() => {
if (props.required && props.title) {
emits('addRule', {
title: props.title,
fn: () => {
if (value.value.length > 0) return true;
return `请选择${props.name || ''}`
}
})
}
})
</script>
<style>
@import '../cell-style.css';

View File

@ -12,10 +12,10 @@
@change="change" />
<form-textarea v-else-if="attrs.type === 'textarea'" v-bind="attrs" :form="form" :disableChange="disableChange"
@change="change" />
<form-mult-disease v-else-if="attrs.type === 'selfMultipleDiseases'" v-bind="attrs" :form="form"
@change="change"></form-mult-disease>
<form-mult-disease v-else-if="attrs.type === 'diagnosis'" v-bind="attrs" :form="form"
@change="change"></form-mult-disease>
<form-mult-disease v-else-if="attrs.type === 'selfMultipleDiseases'" v-bind="attrs" :form="form" @change="change"
@addRule="addRule"></form-mult-disease>
<form-mult-disease v-else-if="attrs.type === 'diagnosis'" v-bind="attrs" :form="form" @change="change"
@addRule="addRule"></form-mult-disease>
<form-upload v-else-if="attrs.type === 'files'" v-bind="attrs" :form="form" @change="change" />
<form-mult-other v-else-if="attrs.type === 'multiSelectAndOther'" v-bind="attrs" :form="form" @change="change" />
<!--
@ -52,11 +52,14 @@ defineProps({
})
const attrs = useAttrs();
const emits = defineEmits(['change']);
const emits = defineEmits(['change', 'addRule']);
function change(data) {
emits('change', data)
}
function addRule(data) {
emits('addRule', data)
}
</script>
<!-- <script>

View File

@ -42,7 +42,6 @@ const disabledMap = computed(() => props.disableTitles.reduce((m, i) => {
return m
}, {}))
provide('addRule', addRule);
const customRule = ref({});

View File

@ -35,7 +35,8 @@ const urlsConfig = {
getArticle: 'getArticle',
addArticleSendRecord: 'addArticleSendRecord',
addArticleReadRecord: 'addArticleReadRecord',
getMiniAppReceivedArticleList: 'getMiniAppReceivedArticleList'
getMiniAppReceivedArticleList: 'getMiniAppReceivedArticleList',
getPageDisease:'getPageDisease'
},
member: {
addCustomer: 'add',