Merge remote-tracking branch 'origin/feature/0915_素材中心新增手动上传' into feature/0918_账号管理新增视图_rxd
# Conflicts: # src/layouts/components/navbar/components/right-side/index.vue
This commit is contained in:
@ -522,12 +522,6 @@ function reset() {
|
||||
const emit = defineEmits(['submit']);
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PuzzleVerification',
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.vue-puzzle-vcode {
|
||||
position: fixed;
|
||||
|
||||
@ -105,7 +105,7 @@
|
||||
import { Button, Checkbox, Form, FormItem, Input, message, Tabs, Typography } from 'ant-design-vue';
|
||||
import PuzzleVerification from '../PuzzleVerification.vue';
|
||||
import SelectAccountModal from '../select-account-modal/index.vue';
|
||||
import { fetchAuthorizationsCaptcha, fetchLoginCaptCha, fetchProfileInfo, postLoginPassword } from '@/api/all/login';
|
||||
import { fetchAuthorizationsCaptcha, fetchLoginCaptCha, fetchUserInfo, postLoginPassword } from '@/api/all/login';
|
||||
import { postClearRateLimiter } from '@/api/all/common';
|
||||
import { joinEnterpriseByInviteCode } from '@/api/all';
|
||||
import { computed, onUnmounted, reactive, ref } from 'vue';
|
||||
@ -268,7 +268,7 @@ const onTabChange = () => {
|
||||
|
||||
// 获取用户信息
|
||||
const getProfileInfo = async () => {
|
||||
const { code, data } = await fetchProfileInfo();
|
||||
const { code, data } = await fetchUserInfo();
|
||||
if (code === 200) {
|
||||
const enterprises = data['enterprises'];
|
||||
mobileNumber.value = data['mobile'];
|
||||
@ -283,6 +283,7 @@ const getProfileInfo = async () => {
|
||||
selectAccountModalRef.value.open();
|
||||
}
|
||||
} else {
|
||||
userStore.setUserInfo(data);
|
||||
router.push({ name: 'Trial' });
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ import PuzzleVerification from '../PuzzleVerification.vue';
|
||||
import SelectAccountModal from '../select-account-modal/index.vue';
|
||||
import { postClearRateLimiter } from '@/api/all/common';
|
||||
import {
|
||||
fetchProfileInfo,
|
||||
fetchUserInfo,
|
||||
postForgetPassword,
|
||||
postForgetPasswordCaptcha,
|
||||
postRegister,
|
||||
@ -295,8 +295,9 @@ const handleVerificationSubmit = async () => {
|
||||
|
||||
// 获取用户信息
|
||||
const getProfileInfo = async () => {
|
||||
const { code, data } = await fetchProfileInfo();
|
||||
const { code, data } = await fetchUserInfo();
|
||||
if (code === 200) {
|
||||
|
||||
const enterprises = data['enterprises'];
|
||||
mobileNumber.value = data['mobile'];
|
||||
accounts.value = enterprises;
|
||||
@ -311,6 +312,7 @@ const getProfileInfo = async () => {
|
||||
selectAccountModalRef.value.open();
|
||||
}
|
||||
} else {
|
||||
userStore.setUserInfo(data);
|
||||
router.push({ name: 'Trial' });
|
||||
}
|
||||
}
|
||||
@ -348,7 +350,7 @@ const handleSubmit = async () => {
|
||||
}, 1500);
|
||||
return;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
userStore.setToken(data.access_token);
|
||||
|
||||
|
||||
@ -36,11 +36,33 @@ export default defineComponent({
|
||||
const uploadData = ref([]);
|
||||
const tagData = ref([]);
|
||||
const modalRef = ref(null);
|
||||
const isDragOver = ref(false);
|
||||
|
||||
const uploadSuccessNum = computed(() => {
|
||||
return uploadData.value.filter((item) => item.uploadStatus === EnumUploadStatus.done).length;
|
||||
});
|
||||
|
||||
// 添加拖拽事件处理函数
|
||||
const handleDragEnter = (e) => {
|
||||
e.preventDefault();
|
||||
isDragOver.value = true;
|
||||
};
|
||||
|
||||
const handleDragOver = (e) => {
|
||||
e.preventDefault();
|
||||
isDragOver.value = true;
|
||||
};
|
||||
|
||||
const handleDragLeave = (e) => {
|
||||
e.preventDefault();
|
||||
isDragOver.value = false;
|
||||
};
|
||||
|
||||
const handleDrop = (e) => {
|
||||
e.preventDefault();
|
||||
isDragOver.value = false;
|
||||
};
|
||||
|
||||
const getTagData = async () => {
|
||||
const { code, data } = await getRawMaterialTagsList();
|
||||
if (code === 200) {
|
||||
@ -137,6 +159,7 @@ export default defineComponent({
|
||||
modalRef.value?.destroy();
|
||||
modalRef.value = null;
|
||||
submitLoading.value = false;
|
||||
isDragOver.value = false;
|
||||
};
|
||||
|
||||
const handleUpload = async (option) => {
|
||||
@ -246,7 +269,9 @@ export default defineComponent({
|
||||
});
|
||||
return;
|
||||
}
|
||||
const { code, data } = await postBatchRawMaterial({ raw_materials: uploadData.value });
|
||||
|
||||
const raw_materials = uploadData.value.filter((item) => item.uploadStatus !== EnumUploadStatus.error);
|
||||
const { code } = await postBatchRawMaterial({ raw_materials });
|
||||
if (code === 200) {
|
||||
message.success('上传成功');
|
||||
emit('update');
|
||||
@ -289,7 +314,7 @@ export default defineComponent({
|
||||
return (
|
||||
<div>
|
||||
<p class="upload-text">上传失败</p>
|
||||
<span class="upload-text color-#F64B31">{record.statusText}</span>
|
||||
<p class="upload-text !color-#F64B31">{record.statusText}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -460,6 +485,7 @@ export default defineComponent({
|
||||
rootClassName="xt-add-raw-material-modal"
|
||||
v-model:open={visible.value}
|
||||
onClose={onClose}
|
||||
maskClosable={false}
|
||||
>
|
||||
<section class="content flex-1 pt-8px px-24px pb-24px overflow-hidden flex flex-col">
|
||||
<div class="rounded-16px bg-#F7F8FA p-16px flex flex-col items-center mb-24px">
|
||||
@ -469,10 +495,17 @@ export default defineComponent({
|
||||
multiple
|
||||
customRequest={handleUpload}
|
||||
class="w-full mb-16px"
|
||||
accept={[...imageExtensions, ...videoExtensions, ...documentExtensions].join(',')}
|
||||
showUploadList={false}
|
||||
>
|
||||
<div class="upload-box rounded-8px cursor-pointer h-100px w-full border border-dashed border-#D7D7D9 flex flex-col items-center justify-center w-full">
|
||||
<div
|
||||
class={`upload-box rounded-8px cursor-pointer h-100px w-full border border-dashed border-#D7D7D9 flex flex-col items-center justify-center w-full ${
|
||||
isDragOver.value ? 'bg-#F0EDFF' : 'bg-#F7F8FA'
|
||||
}`}
|
||||
onDragenter={handleDragEnter}
|
||||
onDragover={handleDragOver}
|
||||
onDragleave={handleDragLeave}
|
||||
onDrop={handleDrop}
|
||||
>
|
||||
<icon-plus size="14" class="mb-10px color-#55585F" />
|
||||
<span class="cts">点击或拖拽文件到此处上传</span>
|
||||
</div>
|
||||
|
||||
@ -17,7 +17,9 @@ import { Button, Modal, message } from 'ant-design-vue';
|
||||
import { deleteRawMaterial, batchDeleteRawMaterials } from '@/api/all/generationWorkshop';
|
||||
import icon1 from '@/assets/img/media-account/icon-warn-1.png';
|
||||
|
||||
const update = inject('update');
|
||||
// const update = inject('update');
|
||||
|
||||
const emits = defineEmits(['update', 'batchUpdate']);
|
||||
|
||||
const visible = ref(false);
|
||||
const fileId = ref(null);
|
||||
|
||||
@ -94,7 +94,7 @@ import { ref, computed } from 'vue';
|
||||
import { Button, Tooltip, Table, Tag } from 'ant-design-vue';
|
||||
const { Column } = Table;
|
||||
import { formatTableField, exactFormatTime, formatFileSize, downloadByUrl } from '@/utils/tools';
|
||||
import { slsWithCatch } from '@/utils/stroage.ts';
|
||||
// import { slsWithCatch } from '@/utils/stroage.ts';
|
||||
import { TABS_LIST, ORIGIN_LIST, RawMaterialType } from '../../constants';
|
||||
|
||||
import TextOverTips from '@/components/text-over-tips';
|
||||
|
||||
@ -132,7 +132,6 @@ import ImgLazyLoad from '@/components/img-lazy-load';
|
||||
import icon1 from '@/assets/img/media-account/icon-delete.png';
|
||||
import icon2 from '@/assets/img/creative-generation-workshop/icon-photo.png';
|
||||
import icon3 from '@/assets/img/creative-generation-workshop/icon-video.png';
|
||||
import { ORIGIN_LIST } from '@/views/material-center/components/raw-material/constants';
|
||||
// import icon4 from '@/assets/img/error-img.png';
|
||||
|
||||
const emits = defineEmits(['sorterChange', 'delete', 'select', 'selectAll']);
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
<script src="../../../../../../material-center/components/finished-products/manuscript/check-list/constants.ts"></script>
|
||||
<script lang="jsx">
|
||||
import axios from 'axios';
|
||||
import { Button, Form, FormItem, Input, message, Upload } from 'ant-design-vue';
|
||||
@ -12,8 +11,6 @@ import { formatFileSize, getVideoInfo, formatDuration, formatUploadSpeed } from
|
||||
import { EnumManuscriptType } from '@/views/writer-material-center/components/finished-products/manuscript/list/constants.ts';
|
||||
import { getVideoPreSignedUrlWriter, getImagePreSignedUrlWriter } from '@/api/all/generationWorkshop-writer';
|
||||
|
||||
// import icon1 from '@/assets/img/creative-generation-workshop/icon-close.png';
|
||||
|
||||
// 表单验证规则
|
||||
const FORM_RULES = {
|
||||
title: [{ required: true, message: '请输入标题' }],
|
||||
|
||||
@ -104,7 +104,6 @@ import ImgLazyLoad from '@/components/img-lazy-load';
|
||||
import icon1 from '@/assets/img/media-account/icon-delete.png';
|
||||
import icon2 from '@/assets/img/creative-generation-workshop/icon-photo.png';
|
||||
import icon3 from '@/assets/img/creative-generation-workshop/icon-video.png';
|
||||
import { ORIGIN_LIST } from '@/views/material-center/components/raw-material/constants';
|
||||
// import icon4 from '@/assets/img/error-img.png';
|
||||
|
||||
const emits = defineEmits(['edit', 'sorterChange', 'delete']);
|
||||
|
||||
Reference in New Issue
Block a user