add button store diary list
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<div v-can="pageAccess" class="store-diary-edit">
|
||||
<t-form class="form" label-align="left" label-width="5rem" v-entrance-transition>
|
||||
<t-form-item label="所属门店">
|
||||
<div class="picker-text" v-text="selectedStoreName" />
|
||||
</t-form-item>
|
||||
<t-form-item label="日记标题" required-mark>
|
||||
<t-input
|
||||
v-model.trim="article.title"
|
||||
@@ -127,6 +124,11 @@ function updateArticle(value: ArticleEditorArticle): void {
|
||||
};
|
||||
}
|
||||
|
||||
function getCreateTitle(): string {
|
||||
const title = route.query.title;
|
||||
return Array.isArray(title) ? String(title[0] || "") : String(title || "");
|
||||
}
|
||||
|
||||
// ---------- 附加照片 ----------
|
||||
|
||||
const photoInputRef = ref<HTMLInputElement>();
|
||||
@@ -204,12 +206,6 @@ function buildAdditionalAttachmentList(): Attachment[] {
|
||||
});
|
||||
}
|
||||
|
||||
const selectedStoreName = computed(() => {
|
||||
const store = currentStoreStore.storeList.find(item => item.id === article.value.bizId)
|
||||
|| (currentStoreStore.loginStore?.id === article.value.bizId ? currentStoreStore.loginStore : undefined);
|
||||
return store?.name || store?.code || "请选择门店";
|
||||
});
|
||||
|
||||
// ---------- 媒体上传 ----------
|
||||
|
||||
async function uploadMedia(file: File): Promise<UploadResult> {
|
||||
@@ -334,6 +330,7 @@ async function loadArticle(): Promise<void> {
|
||||
if (isCreateMode.value) {
|
||||
article.value = {
|
||||
...createEmptyArticle(),
|
||||
title: getCreateTitle(),
|
||||
bizId: article.value.bizId || currentStoreStore.currentStoreId
|
||||
};
|
||||
photoItemList.value = [];
|
||||
|
||||
Reference in New Issue
Block a user