feat(api): 添加 parentId 和 choiceContent 字段支持

- 在 cmsDesign 模型中添加 parentId 字段
- 在 hjmChoices 模型中添加 choiceContent 字段
- 更新 shopExpressTemplate 模型字段注释并添加 sortNumber 和 comments 字段
- 更新 shopGoodsCoupon 模型添加 comments 字段- 在多个 Vue 组件中移除冗余字段并设置默认值- 移除未使用的导入和相关逻辑代码
- 清理版本管理页面的无用代码和样式
This commit is contained in:
2025-09-26 11:52:30 +08:00
parent 6ee52c4945
commit 1d3a94437c
18 changed files with 13 additions and 146 deletions

View File

@@ -52,6 +52,7 @@ export interface CmsDesign {
demoUrl?: string;
account?: string;
docUrl?: string;
parentId?: number;
}
/**

View File

@@ -26,6 +26,8 @@ export interface HjmChoices {
createTime?: string;
// 修改时间
updateTime?: string;
// 选择题内容
choiceContent?: string;
}
/**

View File

@@ -4,11 +4,11 @@ import type { PageParam } from '@/api';
* 运费模板
*/
export interface ShopExpressTemplate {
//
//
id?: number;
//
//
type?: string;
//
//
title?: string;
// 收件价格
firstAmount?: string;
@@ -24,8 +24,10 @@ export interface ShopExpressTemplate {
createTime?: string;
// 修改时间
updateTime?: string;
//
// 排序
sortNumber?: number;
// 备注
comments?: string;
// 首件数量/重量
firstNum?: string;
// 续件数量/重量

View File

@@ -4,7 +4,7 @@ import type { PageParam } from '@/api/index';
* 商品优惠券表
*/
export interface ShopGoodsCoupon {
//
//
id?: number;
// 商品id
goodsId?: number;
@@ -24,6 +24,8 @@ export interface ShopGoodsCoupon {
createTime?: string;
// 修改时间
updateTime?: string;
// 备注
comments?: string;
}
/**

View File

@@ -119,14 +119,8 @@
formId: undefined,
number: undefined,
totalPrice: undefined,
sortNumber: undefined,
comments: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
bszxPayRankingId: undefined,
bszxPayRankingName: '',
status: 0,
comments: '',
sortNumber: 100

View File

@@ -119,14 +119,9 @@
formId: undefined,
number: undefined,
totalPrice: undefined,
sortNumber: undefined,
comments: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
bszxPayRankingId: undefined,
bszxPayRankingName: '',
status: 0,
comments: '',
sortNumber: 100

View File

@@ -119,14 +119,7 @@
formId: undefined,
number: undefined,
totalPrice: undefined,
sortNumber: undefined,
comments: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
bszxPayRankingId: undefined,
bszxPayRankingName: '',
status: 0,
comments: '',
sortNumber: 100

View File

@@ -120,13 +120,8 @@
path: undefined,
url: undefined,
adId: undefined,
sortNumber: undefined,
comments: undefined,
status: undefined,
tenantId: undefined,
createTime: undefined,
cmsAdRecordId: undefined,
cmsAdRecordName: '',
status: 0,
comments: '',
sortNumber: 100

View File

@@ -207,18 +207,12 @@
pageId: undefined,
userId: undefined,
count: undefined,
sortNumber: undefined,
comments: undefined,
hide: undefined,
recommend: undefined,
showIndex: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
updateTime: undefined,
cmsArticleCategoryId: undefined,
cmsArticleCategoryName: '',
status: 0,
comments: '',
sortNumber: 100

View File

@@ -166,15 +166,10 @@
toUserId: undefined,
replyCommentId: undefined,
replyUserId: undefined,
sortNumber: undefined,
comments: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
updateTime: undefined,
cmsArticleCommentId: undefined,
cmsArticleCommentName: '',
status: 0,
comments: '',
sortNumber: 100

View File

@@ -181,14 +181,7 @@
parentId: undefined,
userId: undefined,
home: undefined,
sortNumber: undefined,
comments: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
cmsDesignId: undefined,
cmsDesignName: '',
status: 0,
comments: '',
sortNumber: 100

View File

@@ -126,17 +126,12 @@
questionId: undefined,
choiceContent: undefined,
isCorrect: undefined,
sortNumber: undefined,
comments: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
updateTime: undefined,
hjmChoicesId: undefined,
hjmChoicesName: '',
status: 0,
comments: '',
sortNumber: 100
});

View File

@@ -146,15 +146,10 @@
code: undefined,
image: undefined,
userId: undefined,
sortNumber: undefined,
comments: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
updateTime: undefined,
hjmCoursesId: undefined,
hjmCoursesName: '',
status: 0,
comments: '',
sortNumber: 100

View File

@@ -111,15 +111,10 @@
gpsNo: undefined,
longitude: undefined,
latitude: undefined,
comments: undefined,
status: undefined,
tenantId: undefined,
createTime: undefined,
hjmGpsLogId: undefined,
hjmGpsLogName: '',
status: 0,
comments: '',
sortNumber: 100
comments: ''
});
/* 更新visible */

View File

@@ -140,16 +140,12 @@
title: undefined,
firstAmount: undefined,
extraAmount: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
updateTime: undefined,
sortNumber: undefined,
firstNum: undefined,
extraNum: undefined,
shopExpressTemplateId: undefined,
shopExpressTemplateName: '',
status: 0,
comments: '',
sortNumber: 100

View File

@@ -118,7 +118,6 @@
import { storeToRefs } from 'pinia';
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
import { FormInstance } from 'ant-design-vue/es/form';
import { FileRecord } from '@/api/system/file/model';
// 是否是修改
const isUpdate = ref(false);
@@ -158,16 +157,11 @@
firstAmount: undefined,
extraAmount: undefined,
extraNum: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
updateTime: undefined,
sortNumber: undefined,
shopExpressTemplateDetailId: undefined,
shopExpressTemplateDetailName: '',
status: 0,
comments: '',
sortNumber: 100
});
@@ -188,20 +182,6 @@
]
});
const chooseImage = (data: FileRecord) => {
images.value.push({
uid: data.id,
url: data.path,
status: 'done'
});
form.image = data.path;
};
const onDeleteItem = (index: number) => {
images.value.splice(index, 1);
form.image = '';
};
const { resetFields } = useForm(form, rules);
/* 保存编辑 */
@@ -239,13 +219,6 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
}
isUpdate.value = true;
} else {
isUpdate.value = false;

View File

@@ -83,7 +83,6 @@
import { storeToRefs } from 'pinia';
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
import { FormInstance } from 'ant-design-vue/es/form';
import { FileRecord } from '@/api/system/file/model';
// 是否是修改
const isUpdate = ref(false);
@@ -117,15 +116,11 @@
id: undefined,
goodsId: undefined,
issueCouponId: undefined,
sortNumber: undefined,
status: undefined,
deleted: undefined,
userId: undefined,
tenantId: undefined,
createTime: undefined,
updateTime: undefined,
shopGoodsCouponId: undefined,
shopGoodsCouponName: '',
status: 0,
comments: '',
sortNumber: 100
@@ -148,20 +143,6 @@
]
});
const chooseImage = (data: FileRecord) => {
images.value.push({
uid: data.id,
url: data.path,
status: 'done'
});
form.image = data.path;
};
const onDeleteItem = (index: number) => {
images.value.splice(index, 1);
form.image = '';
};
const { resetFields } = useForm(form, rules);
/* 保存编辑 */
@@ -199,13 +180,6 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
}
isUpdate.value = true;
} else {
isUpdate.value = false;

View File

@@ -82,24 +82,11 @@ import { messageLoading } from "ele-admin-pro/es";
import { openNew } from "@/utils/common";
import { onClone } from "@/utils/plug-uitl";
import { hasRole } from "@/utils/permission";
// 中文语言文件
import zh_Hans from "bytemd/locales/zh_Hans.json";
import zh_HansGfm from "@bytemd/plugin-gfm/locales/zh_Hans.json";
import highlight from "@bytemd/plugin-highlight";
import gfm from "@bytemd/plugin-gfm";
import { uploadOss } from "@/api/system/file";
// 是否开启响应式布局
const themeStore = useThemeStore();
const { styleResponsive } = storeToRefs(themeStore);
const tenantStore = useTenantStore();
// tab 页选中
const active = ref("info");
// 保存按钮 loading
const loading = ref(false);
// 是否显示裁剪弹窗
const visible = ref(false);
const title = ref("");
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
@@ -125,14 +112,6 @@ const form = reactive<Company>({
updateTime: ""
});
// 插件
const plugins = ref([
gfm({
locale: zh_HansGfm
}),
highlight()
]);
const download = (row?: Version) => {
if (row?.vueDownloadUrl) {
openNew(row?.vueDownloadUrl);
@@ -224,12 +203,6 @@ export default {
}
.version-name {
.ele-text-heading {
font-weight: bold;
font-size: 16px;
margin-right: 10px;
}
margin-bottom: 10px;
.time {