generated from Leo_Ding/web-template
修复公告列表和活动列表bug
This commit is contained in:
parent
b085e15b46
commit
6815d7787c
2
.env.dev
2
.env.dev
@ -12,7 +12,7 @@ VITE_ROUTER_BASE=/
|
|||||||
VITE_ROUTER_HISTORY=hash
|
VITE_ROUTER_HISTORY=hash
|
||||||
|
|
||||||
# api
|
# api
|
||||||
VITE_API_BASIC=http://10.10.1.6:8070
|
VITE_API_BASIC=https://zh.shibeitong.com
|
||||||
VITE_API_HTTP=/api/v1/
|
VITE_API_HTTP=/api/v1/
|
||||||
# storage
|
# storage
|
||||||
VITE_STORAGE_NAMESPACE = gin-admin_local_
|
VITE_STORAGE_NAMESPACE = gin-admin_local_
|
||||||
@ -57,7 +57,7 @@ export default {
|
|||||||
// role
|
// role
|
||||||
'pages.system.role.add': '添加角色',
|
'pages.system.role.add': '添加角色',
|
||||||
'pages.system.role.edit': '编辑角色',
|
'pages.system.role.edit': '编辑角色',
|
||||||
'pages.system.role.delTip': '确定删除该角色吗?',
|
'pages.system.role.delTip': '确定删除该条项目?',
|
||||||
'pages.system.role.form.code': '编码',
|
'pages.system.role.form.code': '编码',
|
||||||
'pages.system.role.form.code.placeholder': '请输入编码',
|
'pages.system.role.form.code.placeholder': '请输入编码',
|
||||||
'pages.system.role.form.code.required': '编码是必填项!',
|
'pages.system.role.form.code.required': '编码是必填项!',
|
||||||
|
|||||||
@ -69,8 +69,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item :label="'活动图片'" name="fileList">
|
<a-form-item :label="'活动图片'" name="fileList">
|
||||||
<gx-upload v-model="formData.fileList" accept-types=".jpg,.png,.webp" :fileNumber="20"
|
<gx-upload v-model="formData.fileList" accept-types=".jpg,.png,.webp" :fileNumber="20" />
|
||||||
@uploadSuccess="uploadSuccess" />
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -91,6 +90,7 @@ import { useI18n } from 'vue-i18n'
|
|||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import GxUpload from '@/components/GxUpload/index.vue'
|
import GxUpload from '@/components/GxUpload/index.vue'
|
||||||
import { customersEnum, areaEnum } from "@/enums/useEnum"
|
import { customersEnum, areaEnum } from "@/enums/useEnum"
|
||||||
|
import {spliceUrl} from "@/utils/util"
|
||||||
const emit = defineEmits(['ok'])
|
const emit = defineEmits(['ok'])
|
||||||
const { t } = useI18n() // 解构出t方法
|
const { t } = useI18n() // 解构出t方法
|
||||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||||
@ -191,8 +191,8 @@ function handleOk() {
|
|||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...values,
|
...values,
|
||||||
cover: fileList.value[0],
|
cover:spliceUrl(formData.value.fileList[0]),
|
||||||
images:[...fileList.value]
|
images:formData.value.fileList?formData.value.fileList.map(item=>spliceUrl(item)):[]
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
switch (modal.value.type) {
|
switch (modal.value.type) {
|
||||||
|
|||||||
@ -79,13 +79,6 @@
|
|||||||
<template v-if="column.dataIndex === 'areaId'">
|
<template v-if="column.dataIndex === 'areaId'">
|
||||||
<span>{{ areaEnum.getName(record.areaId) }}</span>
|
<span>{{ areaEnum.getName(record.areaId) }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<template v-if="statusTypeEnum.is('disabled', record.status)">
|
|
||||||
{{ dayjs(record.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<template v-if="'createdAt' === column.dataIndex">
|
<template v-if="'createdAt' === column.dataIndex">
|
||||||
{{ dayjs(record.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
{{ dayjs(record.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||||
</template>
|
</template>
|
||||||
@ -187,7 +180,7 @@ function handleRemove({ id }) {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
; (async () => {
|
; (async () => {
|
||||||
try {
|
try {
|
||||||
const { success } = await apis.role.delRole(id).catch(() => {
|
const { success } = await apis.announcement.delNotices(id).catch(() => {
|
||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user