generated from Leo_Ding/web-template
1
This commit is contained in:
parent
1a625fca72
commit
88e3e43b28
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//获取产品优势列表
|
||||
//获取活动列表
|
||||
export const getActiveList = (params) => request.basic.get('/api/v1/active', params)
|
||||
|
||||
//获取单个banner
|
||||
|
||||
@ -5,27 +5,27 @@
|
||||
<a-card class="mb-8-2">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<a-form-item :label="$t('pages.system.role.form.name')" name="name">
|
||||
<a-form-item :label="'标题'" name="name">
|
||||
<a-input v-model:value="formData.name"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<a-form-item :label="$t('pages.system.role.form.sequence')" name="sequence">
|
||||
<a-input :defaultValue="0" type="number" v-model:value="formData.sequence"></a-input>
|
||||
<a-form-item :label="$t('pages.system.role.form.sequence')" name="order">
|
||||
<a-input :defaultValue="0" type="number" v-model:value="formData.order"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item :label="$t('pages.system.role.form.status')" name="status">
|
||||
<a-radio-group v-model:value="formData.status" :options="[
|
||||
{ label: $t('pages.system.role.form.status.enabled'), value: 'enabled' },
|
||||
{ label: $t('pages.system.role.form.status.disabled'), value: 'disabled' },
|
||||
<a-form-item :label="'是否推荐到首页'" name="is_recommend">
|
||||
<a-radio-group v-model:value="formData.is_recommend" :options="[
|
||||
{ label: '是', value: true },
|
||||
{ label:'否', value: false },
|
||||
]"></a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item :label="'图片类型'" name="status">
|
||||
<a-radio-group v-model:value="formData.status" :options="[
|
||||
<a-form-item :label="'图片类型'" name="type">
|
||||
<a-radio-group v-model:value="formData.type" :options="[
|
||||
{ label: '轮播图片', value: '1'},
|
||||
{ label: '营销图片', value: '2'},
|
||||
]"></a-radio-group>
|
||||
@ -95,13 +95,7 @@ async function handleEdit(record = {}) {
|
||||
hideModal()
|
||||
return
|
||||
}
|
||||
let menus = []
|
||||
if (data.menus) {
|
||||
for (let item of data.menus) {
|
||||
menus.push(item.menu_id)
|
||||
}
|
||||
}
|
||||
checkedKeys.value = menus
|
||||
|
||||
formRecord.value = data
|
||||
formData.value = cloneDeep(data)
|
||||
}
|
||||
|
||||
@ -35,9 +35,9 @@
|
||||
<a-table :columns="columns" :data-source="listData" :loading="loading" :pagination="paginationState"
|
||||
:scroll="{ x: 1000 }" @change="onTableChange">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="'banner_type' === column.key">
|
||||
<template v-if="'type' === column.key">
|
||||
<!--状态-->
|
||||
<a-tag v-if="record.banner_type == 1" color="processing">
|
||||
<a-tag v-if="record.type == 1" color="processing">
|
||||
首页轮播图
|
||||
</a-tag>
|
||||
<!--状态-->
|
||||
@ -104,7 +104,7 @@ const { t } = useI18n() // 解构出t方法
|
||||
const columns = [
|
||||
{ title: '缩略图', dataIndex: 'code', width: 200 },
|
||||
{ title: '名称', dataIndex: 'name', width: 150 },
|
||||
{ title: '类型', dataIndex: 'banner_type', key: 'banner_type', width: 150 },
|
||||
{ title: '类型', dataIndex: 'type', key: 'type', width: 150 },
|
||||
{ title: t('pages.system.role.form.created_at'), key: 'createAt', fixed: 'right', width: 120 },
|
||||
{ title: '是否启用', key: 'is_recommend', fixed: 'is_recommend', width: 120 },
|
||||
{ title: t('button.action'), key: 'action', fixed: 'right', width: 120 },
|
||||
@ -195,8 +195,8 @@ function handleResetSearch() {
|
||||
* 搜索
|
||||
*/
|
||||
function handleSearch() {
|
||||
resetForm()
|
||||
resetPagination()
|
||||
// resetForm()
|
||||
// resetPagination()
|
||||
getPageList()
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user