修改产品部分内容

This commit is contained in:
qingyu 2025-06-27 11:34:34 +08:00
parent def686b838
commit ad849ad26a
2 changed files with 17 additions and 4 deletions

View File

@ -77,6 +77,9 @@
<a-tag v-if="record.status === 'enabled'" :color="'green'">启用</a-tag>
<a-tag v-if="record.status === 'disabled'" :color="'red'">停用</a-tag>
</template>
<template v-if="'month' === column.dataIndex">
<span>{{ record.month }}{{ record.title }}</span>
</template>
<template v-if="'action' === column.key">
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<a-tooltip>
@ -112,6 +115,13 @@
</div>
</div>
<div class="timeline">
<div v-for="item in listData" :key="item.id" class="timeline-item">
<div class="timeline-date">{{ item.year }}{{ item.month }}</div>
<div class="timeline-event">{{ item.title }}</div>
</div>
</div>
</template>
<script setup>
@ -140,6 +150,7 @@ const columns = [
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
{ title: '发布日期', dataIndex: 'pushAt', width: 120, align: 'center' },
{ title: '链接', dataIndex: 'link', align: 'center' },
{ title: '月份+事件', dataIndex: 'month', key: 'month' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
]

View File

@ -14,7 +14,7 @@
<a-form-item :label="'产品类别'" name="categoryID">
<div style="display: flex;justify-content: space-between;">
<a-select v-model:value="formData.categoryID" allowClear>
<a-select-option v-for="item in areaList" :value="item.code">{{ item.name }}</a-select-option>
<a-select-option v-for="item in areaList" :value="item.code">{{ item.categoryIDName }}</a-select-option>
</a-select>
<a-button type="primary" @click="childOpen = true">新增产品类别</a-button>
</div>
@ -29,7 +29,7 @@
<a-form-item :label="'适用对象'" name="target">
<div style="display: flex;justify-content: space-between;">
<a-select v-model:value="formData.target" allowClear>
<a-select-option v-for="item in areaList" :value="item.code">{{ item.name }}</a-select-option>
<a-select-option v-for="item in areaList" :value="item.code">{{ item.targetName }}</a-select-option>
</a-select>
<a-button type="primary" @click="childOpen = true">新增适用对象</a-button>
</div>
@ -86,7 +86,7 @@
<a-col :span="24">
<a-form-item v-for="(img, index) in formData.images" :key="index" :label="`产品图片 ${index + 1}`">
<x-upload-image v-model="formData.images[index]" @imgChange="(value) => imgChange(index, value)" />
<a-button danger @click="removeImage(index)" size="small">删除</a-button>
<a-button danger @click="removeImage(index)" size="small" style="margin: 10px 0" >删除</a-button>
</a-form-item>
<a-form-item>
<a-button type="dashed" block @click="addImage">
@ -386,4 +386,6 @@ function removeImage(index) {
}
</script>
<style lang="less" scoped></style>
<style lang="less" scoped>
</style>