generated from Leo_Ding/web-template
修复案场礼品bug
This commit is contained in:
parent
0aaea60ea5
commit
b811bf9370
@ -78,7 +78,7 @@ export default {
|
||||
// user
|
||||
'pages.system.user.add': '添加用户',
|
||||
'pages.system.user.edit': '编辑用户',
|
||||
'pages.system.user.delTip': '确定删除该用户吗?',
|
||||
'pages.system.user.delTip': '确定删除当前项?',
|
||||
'pages.system.user.form.username': '用户名',
|
||||
'pages.system.user.form.username.placeholder': '请输入用户名',
|
||||
'pages.system.user.form.username.required': '用户名是必填项!',
|
||||
|
||||
@ -129,14 +129,14 @@ function handleCreate() {
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
async function handleEdit(record = {}) {
|
||||
async function handleEdit(id) {
|
||||
showModal({
|
||||
type: 'edit',
|
||||
title: '编辑礼品',
|
||||
})
|
||||
try {
|
||||
showSpining()
|
||||
const { data, success } = await apis.houseProduct.getItem(record.id).catch()
|
||||
const { data, success } = await apis.houseProduct.getItem(id).catch()
|
||||
if (!success) {
|
||||
hideModal()
|
||||
return
|
||||
|
||||
@ -59,11 +59,11 @@
|
||||
<a-tag v-if="!record.isDaily" :color="'red'">否</a-tag>
|
||||
</template>
|
||||
<template v-if="'action' === column.key">
|
||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
|
||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record.product.id)">
|
||||
<a-tooltip>
|
||||
<template #title> {{ $t('pages.system.user.edit') }}</template>
|
||||
<edit-outlined /> </a-tooltip></x-action-button>
|
||||
<x-action-button @click="handleDelete(record)">
|
||||
<x-action-button @click="handleDelete(record.product.id)">
|
||||
<a-tooltip>
|
||||
<template #title>{{ $t('pages.system.delete') }}</template>
|
||||
<delete-outlined style="color: #ff4d4f" /> </a-tooltip></x-action-button>
|
||||
@ -143,7 +143,7 @@ async function getPageList() {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
function handleDelete({ id }) {
|
||||
function handleDelete(id) {
|
||||
Modal.confirm({
|
||||
title: t('pages.system.user.delTip'),
|
||||
content: t('button.confirm'),
|
||||
|
||||
@ -41,6 +41,7 @@ import { message } from 'ant-design-vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import dayjs from 'dayjs'
|
||||
import GxUpload from '@/components/GxUpload/index.vue'
|
||||
import { spliceUrl } from '@/utils/util'
|
||||
const areaFormRef = ref()
|
||||
const emit = defineEmits(['ok'])
|
||||
const { t } = useI18n() // 解构出t方法
|
||||
@ -116,7 +117,7 @@ function handleOk() {
|
||||
const params = {
|
||||
name: formData.value.name,
|
||||
status: formData.value.status,
|
||||
img: fileList.value[0]
|
||||
img:formData.value.fileList?spliceUrl(formData.value.fileList[0]):['']
|
||||
}
|
||||
let result = null
|
||||
switch (modal.value.type) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user