diff --git a/config/unplugin/auto-import.ts b/config/unplugin/auto-import.ts index 7778cc9..3b4b32f 100644 --- a/config/unplugin/auto-import.ts +++ b/config/unplugin/auto-import.ts @@ -16,7 +16,7 @@ export function configAutoImport() { '@vueuse/core', { dayjs: [['default', 'dayjs']], - 'lodash-es': ['cloneDeep', 'omit', 'pick', 'union', 'uniq', 'isNumber', 'uniqBy', 'isEmpty', 'merge', 'debounce'], + 'lodash-es': ['cloneDeep', 'omit', 'pick', 'union', 'uniq', 'isNumber', 'uniqBy', 'isEmpty', 'merge', 'debounce', 'isEqual'], '@/hooks': ['useModal'], }, ], diff --git a/src/assets/img/creative-generation-workshop/icon-close.png b/src/assets/img/creative-generation-workshop/icon-close.png new file mode 100644 index 0000000..0c06dc5 Binary files /dev/null and b/src/assets/img/creative-generation-workshop/icon-close.png differ diff --git a/src/components/text-over-tips/index.vue b/src/components/text-over-tips/index.vue index 72230c1..0460cc2 100644 --- a/src/components/text-over-tips/index.vue +++ b/src/components/text-over-tips/index.vue @@ -3,8 +3,8 @@ -
-
+
+
{{ props.context }}
import { ref, reactive, toRefs, onBeforeMount, onMounted, watchEffect, computed, watch, nextTick } from 'vue'; -import { useRoute, useRouter } from 'vue-router'; import elementResizeDetectorMaker from 'element-resize-detector'; -const route = useRoute(); -const router = useRouter(); const props = defineProps({ context: { type: String, diff --git a/src/router/routes/modules/creativeGenerationWorkshop.ts b/src/router/routes/modules/creativeGenerationWorkshop.ts index 1e5aa4e..ed40761 100644 --- a/src/router/routes/modules/creativeGenerationWorkshop.ts +++ b/src/router/routes/modules/creativeGenerationWorkshop.ts @@ -28,6 +28,20 @@ const COMPONENTS: AppRouteRecordRaw[] = [ }, component: () => import('@/views/creative-generation-workshop/manuscript/list/index.vue'), }, + { + path: 'upload/:id', + name: 'ManuscriptUpload', + meta: { + locale: '稿件上传', + requiresAuth: false, + requireLogin: false, + hideFooter: true, + roles: ['*'], + hideInMenu: true, + activeMenu: 'ManuscriptList', + }, + component: () => import('@/views/creative-generation-workshop/manuscript/upload/index.vue'), + }, { path: 'edit/:id', name: 'ManuscriptEdit', @@ -46,7 +60,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [ path: 'detail/:id', name: 'ManuscriptDetail', meta: { - locale: '账号详情', + locale: '稿件详情', requiresAuth: false, requireLogin: false, roles: ['*'], diff --git a/src/views/creative-generation-workshop/manuscript/components/edit-form/index.vue b/src/views/creative-generation-workshop/manuscript/components/edit-form/index.vue new file mode 100644 index 0000000..24396c9 --- /dev/null +++ b/src/views/creative-generation-workshop/manuscript/components/edit-form/index.vue @@ -0,0 +1,255 @@ + + + diff --git a/src/views/creative-generation-workshop/manuscript/edit/cancel-edit-modal.vue b/src/views/creative-generation-workshop/manuscript/edit/cancel-edit-modal.vue new file mode 100644 index 0000000..7aff674 --- /dev/null +++ b/src/views/creative-generation-workshop/manuscript/edit/cancel-edit-modal.vue @@ -0,0 +1,34 @@ + + + diff --git a/src/views/creative-generation-workshop/manuscript/edit/index.vue b/src/views/creative-generation-workshop/manuscript/edit/index.vue index 5bc07b6..6b95a0d 100644 --- a/src/views/creative-generation-workshop/manuscript/edit/index.vue +++ b/src/views/creative-generation-workshop/manuscript/edit/index.vue @@ -1,248 +1,99 @@ + diff --git a/src/views/creative-generation-workshop/manuscript/edit/style.scss b/src/views/creative-generation-workshop/manuscript/edit/style.scss index 1e7a19e..b574f60 100644 --- a/src/views/creative-generation-workshop/manuscript/edit/style.scss +++ b/src/views/creative-generation-workshop/manuscript/edit/style.scss @@ -1,6 +1,8 @@ $footer-height: 68px; .manuscript-edit-wrap { height: calc(100% - 72px); + display: flex; + flex-direction: column; .cts { color: #939499; font-family: $font-family-regular; @@ -12,44 +14,6 @@ $footer-height: 68px; font-family: $font-family-medium; } } - .left { - .upload-box { - display: flex; - width: 100px; - height: 100px; - padding: 24px 16px; - flex-direction: column; - justify-content: center; - align-items: center; - border-radius: 8px; - border: 1px dashed var(--Border-1, #d7d7d9); - background: var(--BG-200, #f2f3f5); - } - } - .right { - border-left: 1px solid var(--Border-2, #e6e6e8); - width: 320px; - flex-shrink: 0; - } - - .upload-box { - display: flex; - height: 120px; - padding: 0 16px; - flex-direction: column; - justify-content: center; - align-items: center; - border-radius: 8px; - border: 1px dashed var(--Border-1, #d7d7d9); - background: var(--BG-200, #f2f3f5); - cursor: pointer; - transition: all 0.3s ease; - - &:hover { - border-color: var(--Primary-6, #6D4CFE); - background: var(--Primary-1, #f0f0ff); - } - } } .footer-row { position: fixed; diff --git a/src/views/creative-generation-workshop/manuscript/list/components/manuscript-table/index.vue b/src/views/creative-generation-workshop/manuscript/list/components/manuscript-table/index.vue index 866537e..7dc91ae 100644 --- a/src/views/creative-generation-workshop/manuscript/list/components/manuscript-table/index.vue +++ b/src/views/creative-generation-workshop/manuscript/list/components/manuscript-table/index.vue @@ -103,6 +103,7 @@ import icon2 from '@/assets/img/creative-generation-workshop/icon-photo.png'; import icon3 from '@/assets/img/creative-generation-workshop/icon-video.png'; const emits = defineEmits(['edit', 'sorterChange', 'delete']); +const router = useRouter(); const props = defineProps({ dataSource: { @@ -120,10 +121,11 @@ const onDelete = (item) => { emits('delete', item); }; const onEdit = (item) => { - emits('edit', item); + router.push(`/manuscript/edit/${item.index}`); }; const onDetail = (item) => { console.log('onDetail'); + router.push(`/manuscript/detail/${item.index}`); }; const getStatusInfo = (status) => { diff --git a/src/views/creative-generation-workshop/manuscript/list/components/upload-manascript-modal/index.vue b/src/views/creative-generation-workshop/manuscript/list/components/upload-manascript-modal/index.vue index 282ea8b..c4b6fd1 100644 --- a/src/views/creative-generation-workshop/manuscript/list/components/upload-manascript-modal/index.vue +++ b/src/views/creative-generation-workshop/manuscript/list/components/upload-manascript-modal/index.vue @@ -144,8 +144,8 @@ export default { }; // 跳转编辑 - const goEdit = () => { - router.push(`/manuscript/edit/1`); + const goUpload = () => { + router.push(`/manuscript/upload/1`); onClose(); }; @@ -302,7 +302,7 @@ export default { - diff --git a/src/views/creative-generation-workshop/manuscript/list/index.vue b/src/views/creative-generation-workshop/manuscript/list/index.vue index 83a09ad..139a7df 100644 --- a/src/views/creative-generation-workshop/manuscript/list/index.vue +++ b/src/views/creative-generation-workshop/manuscript/list/index.vue @@ -24,7 +24,6 @@ :dataSource="dataSource" @sorterChange="handleSorterChange" @delete="handleDelete" - @edit="handleEdit" />
{ const { id, name } = item; deleteManuscriptModalRef.value?.open({ id, name: `“${name}”` }); }; -const handleEdit = (item) => { - // addManuscriptModalRef.value?.open(item.id); -}; onMounted(() => { getData(); diff --git a/src/views/creative-generation-workshop/manuscript/upload/cancel-upload-modal.vue b/src/views/creative-generation-workshop/manuscript/upload/cancel-upload-modal.vue new file mode 100644 index 0000000..358e4c4 --- /dev/null +++ b/src/views/creative-generation-workshop/manuscript/upload/cancel-upload-modal.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/views/creative-generation-workshop/manuscript/upload/index.vue b/src/views/creative-generation-workshop/manuscript/upload/index.vue new file mode 100644 index 0000000..acae812 --- /dev/null +++ b/src/views/creative-generation-workshop/manuscript/upload/index.vue @@ -0,0 +1,225 @@ + + + diff --git a/src/views/creative-generation-workshop/manuscript/upload/style.scss b/src/views/creative-generation-workshop/manuscript/upload/style.scss new file mode 100644 index 0000000..f1dadcd --- /dev/null +++ b/src/views/creative-generation-workshop/manuscript/upload/style.scss @@ -0,0 +1,28 @@ +$footer-height: 68px; +.manuscript-upload-wrap { + height: calc(100% - 72px); + .cts { + color: #939499; + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + &.bold { + font-family: $font-family-medium; + } + } + .right { + border-left: 1px solid var(--Border-2, #e6e6e8); + width: 320px; + flex-shrink: 0; + } +} +.footer-row { + position: fixed; + bottom: 0; + left: $sidebar-width; + width: calc(100% - $sidebar-width); + border-top: 1px solid #e6e6e8; + height: $footer-height; +} diff --git a/src/views/creative-generation-workshop/manuscript/upload/upload-success-modal.vue b/src/views/creative-generation-workshop/manuscript/upload/upload-success-modal.vue new file mode 100644 index 0000000..a821613 --- /dev/null +++ b/src/views/creative-generation-workshop/manuscript/upload/upload-success-modal.vue @@ -0,0 +1,63 @@ + + + +