Merge remote-tracking branch 'origin/feature/0915_素材中心新增手动上传' into test
This commit is contained in:
@ -71,6 +71,7 @@ export default defineComponent({
|
||||
};
|
||||
|
||||
const handleTagChange = (value, option, record) => {
|
||||
// console.log('handleTagChange', value);
|
||||
if (value.length < 6) {
|
||||
record.tag_ids = value;
|
||||
} else {
|
||||
@ -88,8 +89,8 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
if (record.tag_ids.length >= 5) {
|
||||
message.warning('最多选择5个');
|
||||
if (record.tag_ids.length === 5) {
|
||||
// message.warning('最多选择5个');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -103,7 +104,8 @@ export default defineComponent({
|
||||
});
|
||||
e.target.value = '';
|
||||
|
||||
record.tag_ids = [...record.tag_ids, data.id];
|
||||
record.tag_ids = record.tag_ids.filter((item) => item !== inputValue);
|
||||
record.tag_ids.push(data.id);
|
||||
}
|
||||
} catch (error) {
|
||||
message.error('添加标签失败');
|
||||
@ -260,7 +262,6 @@ export default defineComponent({
|
||||
|
||||
const onConfirm = async () => {
|
||||
try {
|
||||
submitLoading.value = true;
|
||||
const hasUploading = uploadData.value.some((item) => item.uploadStatus === EnumUploadStatus.uploading);
|
||||
if (hasUploading) {
|
||||
modalRef.value = Modal.warning({
|
||||
@ -272,6 +273,7 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
submitLoading.value = true;
|
||||
const raw_materials = uploadData.value.filter((item) => item.uploadStatus !== EnumUploadStatus.error);
|
||||
const { code } = await postBatchRawMaterial({ raw_materials });
|
||||
if (code === 200) {
|
||||
@ -387,7 +389,7 @@ export default defineComponent({
|
||||
<Select
|
||||
disabled={record.uploadStatus === EnumUploadStatus.uploading}
|
||||
value={record.tag_ids}
|
||||
mode="multiple"
|
||||
mode="tags"
|
||||
size="middle"
|
||||
placeholder="请选择标签"
|
||||
allowClear
|
||||
|
||||
@ -126,8 +126,8 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
if (form.value.tag_ids.length >= 5) {
|
||||
message.warning('最多选择5个');
|
||||
if (form.value.tag_ids.length === 5) {
|
||||
// message.warning('最多选择5个');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -141,7 +141,8 @@ export default {
|
||||
});
|
||||
e.target.value = '';
|
||||
|
||||
form.value.tag_ids = [...form.value.tag_ids, data.id];
|
||||
form.value.tag_ids = form.value.tag_ids.filter((item) => item !== inputValue);
|
||||
form.value.tag_ids.push(data.id);
|
||||
}
|
||||
} catch (error) {
|
||||
message.error('添加标签失败');
|
||||
@ -203,7 +204,7 @@ export default {
|
||||
<FormItem label="标签" name="tag_ids" v-model:value={form.value.tag_ids}>
|
||||
<Select
|
||||
value={form.value.tag_ids}
|
||||
mode="multiple"
|
||||
mode="tags"
|
||||
size="large"
|
||||
placeholder="请选择标签"
|
||||
allowClear
|
||||
|
||||
Reference in New Issue
Block a user