优化优化
This commit is contained in:
parent
2107ea8a71
commit
4e5554cb50
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<PageWrapper>
|
<PageWrapper>
|
||||||
<a-row :gutter="10" class="mt-3">
|
<a-row :gutter="10" class="mt-3">
|
||||||
<a-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6">
|
<a-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
|
||||||
<a-card shadow="hover" class="border-0">
|
<a-card shadow="hover" class="border-0">
|
||||||
<template #title>
|
<template #title>
|
||||||
<a-row>
|
<a-row>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
/>
|
/>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xs="24" :sm="24" :md="18" :lg="18" :xl="18">
|
<a-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
|
||||||
<a-card shadow="hover" class="mb-4 border-0 proCard">
|
<a-card shadow="hover" class="mb-4 border-0 proCard">
|
||||||
<configItem :configId="configId" v-if="configItemShow" />
|
<configItem :configId="configId" v-if="configItemShow" />
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<PageWrapper>
|
<PageWrapper>
|
||||||
<a-row :gutter="10" class="mt-3">
|
<a-row :gutter="10" class="mt-3">
|
||||||
<a-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6">
|
<a-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
|
||||||
<a-card shadow="hover" class="border-0">
|
<a-card shadow="hover" class="border-0">
|
||||||
<template #title>
|
<template #title>
|
||||||
<a-row>
|
<a-row>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
/>
|
/>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xs="24" :sm="24" :md="18" :lg="18" :xl="18">
|
<a-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
|
||||||
<a-card shadow="hover" class="mb-4 border-0 proCard">
|
<a-card shadow="hover" class="mb-4 border-0 proCard">
|
||||||
<dictItem :dictId="dictId" v-if="dictItemShow" />
|
<dictItem :dictId="dictId" v-if="dictItemShow" />
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-drawer
|
||||||
v-model:visible="props.visible"
|
v-model:visible="props.visible"
|
||||||
:title="props.noticeId ? '编辑' : '新增'"
|
:title="props.noticeId ? '编辑' : '新增'"
|
||||||
:width="`${size}px`"
|
:width="`${size}px`"
|
||||||
@cancel="dialogClose"
|
:footer-style="{ textAlign: 'right' }"
|
||||||
style="top: 20px"
|
@close="dialogClose">
|
||||||
>
|
|
||||||
<a-form
|
<a-form
|
||||||
class="ls-form"
|
class="ls-form"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
@ -19,6 +19,21 @@
|
|||||||
>
|
>
|
||||||
<a-input class="ls-input" v-model:value="formData.title" placeholder="通知标题" clearable />
|
<a-input class="ls-input" v-model:value="formData.title" placeholder="通知标题" clearable />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
label="通知封面"
|
||||||
|
name="cover"
|
||||||
|
:rules="{ required: true, message: '请上传通知封面', trigger: 'change' }"
|
||||||
|
>
|
||||||
|
<UploadImg
|
||||||
|
@changeFileName="(name) => (formData.imageImgName = name)"
|
||||||
|
:fileType="['image/jpeg', 'image/png', 'image/jpg', 'image/gif']"
|
||||||
|
name="notice"
|
||||||
|
:fileSize="20"
|
||||||
|
v-model:image-url="formData.cover"
|
||||||
|
>
|
||||||
|
<template #tip>支持扩展名: jpg png jpeg;文件大小不超过20M</template>
|
||||||
|
</UploadImg>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item label="通知类型">
|
<a-form-item label="通知类型">
|
||||||
<a-select v-model:value="formData.type" placeholder="请选择通知类型">
|
<a-select v-model:value="formData.type" placeholder="请选择通知类型">
|
||||||
<a-select-option :value="1">通知</a-select-option>
|
<a-select-option :value="1">通知</a-select-option>
|
||||||
@ -48,12 +63,13 @@
|
|||||||
<a-button :loading="subLoading" type="primary" @click="submit"> 确定 </a-button>
|
<a-button :loading="subLoading" type="primary" @click="submit"> 确定 </a-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</a-modal>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { FormInstance } from 'element-plus';
|
import type { FormInstance } from 'element-plus';
|
||||||
import { getNoticeDetail, noticeAdd, noticeUpdate } from '@/api/data/notice';
|
import { getNoticeDetail, noticeAdd, noticeUpdate } from '@/api/data/notice';
|
||||||
import { onMounted, reactive, shallowRef, ref } from 'vue';
|
import { onMounted, reactive, shallowRef, ref } from 'vue';
|
||||||
|
import UploadImg from '@/components/Upload/Image.vue';
|
||||||
import Editor from '@/components/Editor/tinymce.vue';
|
import Editor from '@/components/Editor/tinymce.vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { useLockFn } from '@/utils/useLockFn';
|
import { useLockFn } from '@/utils/useLockFn';
|
||||||
@ -72,6 +88,7 @@
|
|||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
title: '',
|
title: '',
|
||||||
|
cover:'',
|
||||||
status: 1,
|
status: 1,
|
||||||
type: 1,
|
type: 1,
|
||||||
content: '',
|
content: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user