update: 组件更换测试
This commit is contained in:
parent
351e4f35ab
commit
b66d48e626
|
@ -147,6 +147,19 @@
|
||||||
</template>
|
</template>
|
||||||
</CardBox>
|
</CardBox>
|
||||||
</template>
|
</template>
|
||||||
|
<template #type="slotProps">
|
||||||
|
<span> {{ getMethodTxt(slotProps.type) }}</span>
|
||||||
|
</template>
|
||||||
|
<template #provider="slotProps">
|
||||||
|
<span>
|
||||||
|
{{ getProviderTxt(slotProps.type, slotProps.provider) }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #description="slotProps">
|
||||||
|
<Ellipsis>
|
||||||
|
{{ slotProps.description }}
|
||||||
|
</Ellipsis>
|
||||||
|
</template>
|
||||||
<template #action="slotProps">
|
<template #action="slotProps">
|
||||||
<j-space :size="16">
|
<j-space :size="16">
|
||||||
<template
|
<template
|
||||||
|
@ -205,6 +218,7 @@ const columns = [
|
||||||
title: '配置名称',
|
title: '配置名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
key: 'name',
|
key: 'name',
|
||||||
|
width: 100,
|
||||||
search: {
|
search: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
|
@ -214,6 +228,7 @@ const columns = [
|
||||||
dataIndex: 'type',
|
dataIndex: 'type',
|
||||||
key: 'type',
|
key: 'type',
|
||||||
scopedSlots: true,
|
scopedSlots: true,
|
||||||
|
width: 100,
|
||||||
search: {
|
search: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: NOTICE_METHOD,
|
options: NOTICE_METHOD,
|
||||||
|
@ -227,6 +242,7 @@ const columns = [
|
||||||
dataIndex: 'provider',
|
dataIndex: 'provider',
|
||||||
key: 'provider',
|
key: 'provider',
|
||||||
scopedSlots: true,
|
scopedSlots: true,
|
||||||
|
width: 200,
|
||||||
search: {
|
search: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: providerList,
|
options: providerList,
|
||||||
|
@ -239,6 +255,7 @@ const columns = [
|
||||||
title: '说明',
|
title: '说明',
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
key: 'description',
|
key: 'description',
|
||||||
|
scopedSlots: true,
|
||||||
search: {
|
search: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
|
@ -272,6 +289,14 @@ const getLogo = (type: string, provider: string) => {
|
||||||
const getMethodTxt = (type: string) => {
|
const getMethodTxt = (type: string) => {
|
||||||
return NOTICE_METHOD.find((f) => f.value === type)?.label;
|
return NOTICE_METHOD.find((f) => f.value === type)?.label;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* 根据类型展示对应文案
|
||||||
|
* @param type
|
||||||
|
* @param provider
|
||||||
|
*/
|
||||||
|
const getProviderTxt = (type: string, provider: string) => {
|
||||||
|
return MSG_TYPE[type].find((f: any) => f.value === provider)?.label;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
|
|
|
@ -110,14 +110,19 @@
|
||||||
</template>
|
</template>
|
||||||
</CardBox>
|
</CardBox>
|
||||||
</template>
|
</template>
|
||||||
<template #bodyCell="{ column, text, record }">
|
<template #type="slotProps">
|
||||||
<span v-if="column.dataIndex === 'type'">
|
<span> {{ getMethodTxt(slotProps.type) }}</span>
|
||||||
{{ getMethodTxt(record.type) }}
|
</template>
|
||||||
</span>
|
<template #provider="slotProps">
|
||||||
<span v-if="column.dataIndex === 'provider'">
|
<span>
|
||||||
{{ getProviderTxt(record.type, record.provider) }}
|
{{ getProviderTxt(slotProps.type, slotProps.provider) }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #description="slotProps">
|
||||||
|
<Ellipsis>
|
||||||
|
{{ slotProps.description }}
|
||||||
|
</Ellipsis>
|
||||||
|
</template>
|
||||||
<template #action="slotProps">
|
<template #action="slotProps">
|
||||||
<j-space :size="16">
|
<j-space :size="16">
|
||||||
<template
|
<template
|
||||||
|
@ -210,6 +215,7 @@ const columns = [
|
||||||
title: '说明',
|
title: '说明',
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
key: 'description',
|
key: 'description',
|
||||||
|
scopedSlots: true,
|
||||||
search: {
|
search: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
|
|
|
@ -82,7 +82,7 @@ export const MSG_TYPE = {
|
||||||
],
|
],
|
||||||
email: [
|
email: [
|
||||||
{
|
{
|
||||||
label: 'email',
|
label: '邮件',
|
||||||
value: 'embedded',
|
value: 'embedded',
|
||||||
logo: getImage('/notice/email.png'),
|
logo: getImage('/notice/email.png'),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue