update:bug修复

This commit is contained in:
2026-03-23 16:09:48 +08:00
parent 6a689b0d73
commit 7ba5fecb7b
7 changed files with 17 additions and 2 deletions

View File

@@ -87,6 +87,9 @@ const upload = async (url: string, formData = {}, onProgress?: any) => {
}
},
});
if (res.data.code !== 200) {
ElMessage.warning(res.data.message);
}
return res.data;
};

View File

@@ -6,6 +6,7 @@
:options="listData"
:placeholder="disabled ? '' : showCodeList ? '请选择项目编号' : '请选择项目名称'"
filterable
default-first-option
clearable
:disabled="disabled"
:multiple="multiple"
@@ -13,6 +14,7 @@
:fit-input-width="fitInputWidth"
@change="changeFun"
@clear="clearFun"
@keyup.enter="enterFun"
/>
</div>
</template>
@@ -45,7 +47,7 @@ const props = withDefaults(defineProps<Props>(), {
const listData = ref<any>([]);
const choseList = ref<any>([]);
const emit = defineEmits(['update:modelValue', 'change', 'clear']);
const emit = defineEmits(['update:modelValue', 'change', 'clear', 'enter']);
onMounted(() => {
getlistDataFun();
@@ -144,6 +146,10 @@ const changeFun = () => {
const clearFun = () => {
emit('clear');
};
const enterFun = () => {
emit('enter');
};
</script>
<style lang="scss" scoped>

View File

@@ -143,6 +143,7 @@
v-if="item.inputMode === 'uploadImg'"
:attrs="attrs"
v-model="formData[item.searchKey || item.key]"
:multiple="attrs.multiple"
:disabled="attrs.disabled || (item.disabled && showDisabled)"
@change="(val: any) => changeFun(item.key, val)"
/>
@@ -163,6 +164,7 @@
:disabled="attrs.disabled || (item.disabled && showDisabled)"
@change="(val: any) => changeFun(item.key, val)"
@clear="clearFun"
@enter="enterFun"
/>
<UserSelect
v-if="item.inputMode === 'userSelectMultiple'"

View File

@@ -21,6 +21,7 @@
englishName: { disabled: formData.nodeType === NODE_TYPE.DISCIPLINE },
nodeType: { disabled: localOperationType === 'edit' },
confidence: { min: 0, max: 100, step: 0.01 },
imageFileId: { multiple: true },
}"
:rule-data="ruleData"
:itemNum="localItemNum"

View File

@@ -497,6 +497,7 @@
<uploadImg
v-model="row.imageFileId"
v-if="[NODE_TYPE.TASK].includes(row.nodeType) || isMixedNodeType(row.nodeType)"
:multiple="true"
:disabled="!editMode"
viewMode="inline"
/>

View File

@@ -5,6 +5,7 @@
<el-upload
v-if="!disabled"
:show-file-list="false"
:multiple="multiple"
accept="image/*"
:before-upload="beforeUploadFun"
>
@@ -49,12 +50,14 @@ const previewUrl = `${env.VITE_API_IMAGE_PREVIEW_URL}/data/previewImage?fileId=`
interface Props {
modelValue: any;
multiple?: boolean;
disabled?: boolean;
viewMode?: string;
}
const props = withDefaults(defineProps<Props>(), {
modelValue: '',
multiple: false,
disabled: false,
viewMode: 'card', // card卡片模式 text文本模式 inline内联模式
});

View File

@@ -365,7 +365,6 @@ import { CommonStore } from '@/stores/common';
import AddApprove from '@/views/competenceCenter/condition/components/addApprove.vue';
import { queryDesignVersionsApi } from '@/api/project/project';
import { getSeeDisciplines } from '@/tenants/lyric/views/task/lyricTask';
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
const commonStore = CommonStore();