feat: 打开微信模版列表弹出框,增加微信模版消息内容显示
This commit is contained in:
parent
257f7669fc
commit
6aff242687
|
|
@ -98,7 +98,7 @@ export default function Render(props) {
|
||||||
</Button>) : (<Button type="link" onClick={() => {
|
</Button>) : (<Button type="link" onClick={() => {
|
||||||
recoverItem(record.id);
|
recoverItem(record.id);
|
||||||
}}>
|
}}>
|
||||||
恢复
|
{t('common::action.recover')}
|
||||||
</Button>)}
|
</Button>)}
|
||||||
{!record.$$deleteAt$$ &&
|
{!record.$$deleteAt$$ &&
|
||||||
(!dirtyIds.includes(record.id) ? (<Button type="link" onClick={() => {
|
(!dirtyIds.includes(record.id) ? (<Button type="link" onClick={() => {
|
||||||
|
|
@ -108,7 +108,7 @@ export default function Render(props) {
|
||||||
</Button>) : (<Button type="link" onClick={() => {
|
</Button>) : (<Button type="link" onClick={() => {
|
||||||
resetItem(record.id);
|
resetItem(record.id);
|
||||||
}}>
|
}}>
|
||||||
恢复
|
{t('common::action.recover')}
|
||||||
</Button>))}
|
</Button>))}
|
||||||
</>);
|
</>);
|
||||||
},
|
},
|
||||||
|
|
@ -125,7 +125,7 @@ export default function Render(props) {
|
||||||
setCurrentPage(current);
|
setCurrentPage(current);
|
||||||
},
|
},
|
||||||
}}/>
|
}}/>
|
||||||
<Modal title="模板列表" open={open} destroyOnClose={true} onCancel={() => {
|
<Modal title="短信模板列表" open={open} destroyOnClose={true} onCancel={() => {
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
}} width={'80%'} footer={null}>
|
}} width={'80%'} footer={null}>
|
||||||
<Table dataSource={smsTemplates} rowKey="id" columns={[
|
<Table dataSource={smsTemplates} rowKey="id" columns={[
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ export default OakComponent({
|
||||||
id: 1,
|
id: 1,
|
||||||
wechatId: 1,
|
wechatId: 1,
|
||||||
title: 1,
|
title: 1,
|
||||||
|
content: 1,
|
||||||
},
|
},
|
||||||
type: 1,
|
type: 1,
|
||||||
},
|
},
|
||||||
|
|
@ -21,8 +22,7 @@ export default OakComponent({
|
||||||
const operations = this.getOperations();
|
const operations = this.getOperations();
|
||||||
const dirtyIds = operations
|
const dirtyIds = operations
|
||||||
? operations
|
? operations
|
||||||
.map((ele) => ele.operation
|
.map((ele) => ele.operation.data?.id || ele.operation.filter?.id)
|
||||||
.data?.id || ele.operation.filter?.id)
|
|
||||||
.filter((ele) => !!ele)
|
.filter((ele) => !!ele)
|
||||||
: [];
|
: [];
|
||||||
const selectedTypes = data ? data.map((ele) => ele.type) : [];
|
const selectedTypes = data ? data.map((ele) => ele.type) : [];
|
||||||
|
|
@ -62,6 +62,7 @@ export default OakComponent({
|
||||||
id: 1,
|
id: 1,
|
||||||
wechatId: 1,
|
wechatId: 1,
|
||||||
title: 1,
|
title: 1,
|
||||||
|
content: 1,
|
||||||
},
|
},
|
||||||
filter: {
|
filter: {
|
||||||
applicationId,
|
applicationId,
|
||||||
|
|
@ -81,6 +82,7 @@ export default OakComponent({
|
||||||
id: 1,
|
id: 1,
|
||||||
wechatId: 1,
|
wechatId: 1,
|
||||||
title: 1,
|
title: 1,
|
||||||
|
content: 1,
|
||||||
},
|
},
|
||||||
filter: {
|
filter: {
|
||||||
applicationId,
|
applicationId,
|
||||||
|
|
@ -96,8 +98,7 @@ export default OakComponent({
|
||||||
},
|
},
|
||||||
async updateMessageTypes(selectedTypes) {
|
async updateMessageTypes(selectedTypes) {
|
||||||
const { result: MessageTypes } = await this.features.template.getMessageType();
|
const { result: MessageTypes } = await this.features.template.getMessageType();
|
||||||
const messageTypes = MessageTypes
|
const messageTypes = MessageTypes.filter((ele) => !selectedTypes.includes(ele));
|
||||||
.filter((ele) => !selectedTypes.includes(ele));
|
|
||||||
this.setState({
|
this.setState({
|
||||||
messageTypes,
|
messageTypes,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ export default function Render(props) {
|
||||||
</Button>) : (<Button type="link" onClick={() => {
|
</Button>) : (<Button type="link" onClick={() => {
|
||||||
recoverItem(record.id);
|
recoverItem(record.id);
|
||||||
}}>
|
}}>
|
||||||
恢复
|
{t('common::action.recover')}
|
||||||
</Button>)}
|
</Button>)}
|
||||||
{!record.$$deleteAt$$ &&
|
{!record.$$deleteAt$$ &&
|
||||||
(!dirtyIds.includes(record.id) ? (<Button type="link" onClick={() => {
|
(!dirtyIds.includes(record.id) ? (<Button type="link" onClick={() => {
|
||||||
|
|
@ -106,7 +106,7 @@ export default function Render(props) {
|
||||||
</Button>) : (<Button type="link" onClick={() => {
|
</Button>) : (<Button type="link" onClick={() => {
|
||||||
resetItem(record.id);
|
resetItem(record.id);
|
||||||
}}>
|
}}>
|
||||||
恢复
|
{t('common::action.recover')}
|
||||||
</Button>))}
|
</Button>))}
|
||||||
</>);
|
</>);
|
||||||
},
|
},
|
||||||
|
|
@ -123,19 +123,24 @@ export default function Render(props) {
|
||||||
setCurrentPage(current);
|
setCurrentPage(current);
|
||||||
},
|
},
|
||||||
}}/>
|
}}/>
|
||||||
<Modal title="模板列表" open={open} destroyOnClose={true} onCancel={() => {
|
<Modal title="微信模板列表" open={open} destroyOnClose={true} onCancel={() => {
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
}} width={'80%'} footer={null}>
|
}} width={'80%'} footer={null}>
|
||||||
<Table dataSource={wechatTemplates} rowKey="id" columns={[
|
<Table dataSource={wechatTemplates} rowKey="id" columns={[
|
||||||
{
|
{
|
||||||
dataIndex: 'title',
|
dataIndex: 'title',
|
||||||
title: '消息标题',
|
title: '模板标题',
|
||||||
width: 200,
|
width: 200,
|
||||||
|
fixed: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'wechatId',
|
dataIndex: 'wechatId',
|
||||||
title: '微信模板Id',
|
title: '模板ID',
|
||||||
width: 300,
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'content',
|
||||||
|
title: '模板内容',
|
||||||
},
|
},
|
||||||
]}/>
|
]}/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
||||||
|
|
@ -954,7 +954,8 @@ const i18ns = [
|
||||||
"editor": "编辑",
|
"editor": "编辑",
|
||||||
"newAdd": "新增",
|
"newAdd": "新增",
|
||||||
"add": "添加",
|
"add": "添加",
|
||||||
"submit": "提交"
|
"submit": "提交",
|
||||||
|
"recover": "恢复"
|
||||||
},
|
},
|
||||||
"operate": "操作",
|
"operate": "操作",
|
||||||
"submit": "提交",
|
"submit": "提交",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@
|
||||||
"editor": "编辑",
|
"editor": "编辑",
|
||||||
"newAdd": "新增",
|
"newAdd": "新增",
|
||||||
"add": "添加",
|
"add": "添加",
|
||||||
"submit": "提交"
|
"submit": "提交",
|
||||||
|
"recover": "恢复"
|
||||||
},
|
},
|
||||||
"operate": "操作",
|
"operate": "操作",
|
||||||
"submit": "提交",
|
"submit": "提交",
|
||||||
|
|
|
||||||
|
|
@ -956,7 +956,8 @@ const i18ns = [
|
||||||
"editor": "编辑",
|
"editor": "编辑",
|
||||||
"newAdd": "新增",
|
"newAdd": "新增",
|
||||||
"add": "添加",
|
"add": "添加",
|
||||||
"submit": "提交"
|
"submit": "提交",
|
||||||
|
"recover": "恢复"
|
||||||
},
|
},
|
||||||
"operate": "操作",
|
"operate": "操作",
|
||||||
"submit": "提交",
|
"submit": "提交",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@
|
||||||
"editor": "编辑",
|
"editor": "编辑",
|
||||||
"newAdd": "新增",
|
"newAdd": "新增",
|
||||||
"add": "添加",
|
"add": "添加",
|
||||||
"submit": "提交"
|
"submit": "提交",
|
||||||
|
"recover": "恢复"
|
||||||
},
|
},
|
||||||
"operate": "操作",
|
"operate": "操作",
|
||||||
"submit": "提交",
|
"submit": "提交",
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ export default function Render(
|
||||||
recoverItem(record.id);
|
recoverItem(record.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
恢复
|
{t('common::action.recover')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{!record.$$deleteAt$$ &&
|
{!record.$$deleteAt$$ &&
|
||||||
|
|
@ -232,7 +232,7 @@ export default function Render(
|
||||||
resetItem(record.id);
|
resetItem(record.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
恢复
|
{t('common::action.recover')}
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
|
|
@ -254,7 +254,7 @@ export default function Render(
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Modal
|
<Modal
|
||||||
title="模板列表"
|
title="短信模板列表"
|
||||||
open={open}
|
open={open}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ export default OakComponent({
|
||||||
id: 1,
|
id: 1,
|
||||||
wechatId: 1,
|
wechatId: 1,
|
||||||
title: 1,
|
title: 1,
|
||||||
|
content: 1,
|
||||||
},
|
},
|
||||||
type: 1,
|
type: 1,
|
||||||
},
|
},
|
||||||
|
|
@ -23,11 +24,7 @@ export default OakComponent({
|
||||||
const dirtyIds = operations
|
const dirtyIds = operations
|
||||||
? operations
|
? operations
|
||||||
.map(
|
.map(
|
||||||
(ele) =>
|
(ele) => (ele.operation.data as EntityDict['messageTypeTemplate']['CreateOperationData'])?.id || ele.operation.filter?.id
|
||||||
(
|
|
||||||
ele.operation
|
|
||||||
.data as EntityDict['messageTypeTemplate']['CreateOperationData']
|
|
||||||
)?.id || ele.operation.filter?.id
|
|
||||||
)
|
)
|
||||||
.filter((ele) => !!ele)
|
.filter((ele) => !!ele)
|
||||||
: ([] as string[]);
|
: ([] as string[]);
|
||||||
|
|
@ -68,6 +65,7 @@ export default OakComponent({
|
||||||
id: 1,
|
id: 1,
|
||||||
wechatId: 1,
|
wechatId: 1,
|
||||||
title: 1,
|
title: 1,
|
||||||
|
content: 1,
|
||||||
},
|
},
|
||||||
filter: {
|
filter: {
|
||||||
applicationId,
|
applicationId,
|
||||||
|
|
@ -87,6 +85,7 @@ export default OakComponent({
|
||||||
id: 1,
|
id: 1,
|
||||||
wechatId: 1,
|
wechatId: 1,
|
||||||
title: 1,
|
title: 1,
|
||||||
|
content: 1,
|
||||||
},
|
},
|
||||||
filter: {
|
filter: {
|
||||||
applicationId,
|
applicationId,
|
||||||
|
|
@ -104,8 +103,7 @@ export default OakComponent({
|
||||||
},
|
},
|
||||||
async updateMessageTypes(selectedTypes: string[]) {
|
async updateMessageTypes(selectedTypes: string[]) {
|
||||||
const { result: MessageTypes } = await this.features.template.getMessageType();
|
const { result: MessageTypes } = await this.features.template.getMessageType();
|
||||||
const messageTypes = MessageTypes
|
const messageTypes = MessageTypes.filter((ele: string) => !selectedTypes.includes(ele));
|
||||||
.filter((ele: string) => !selectedTypes.includes(ele));
|
|
||||||
this.setState(
|
this.setState(
|
||||||
{
|
{
|
||||||
messageTypes,
|
messageTypes,
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ export default function Render(
|
||||||
recoverItem(record.id);
|
recoverItem(record.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
恢复
|
{t('common::action.recover')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{!record.$$deleteAt$$ &&
|
{!record.$$deleteAt$$ &&
|
||||||
|
|
@ -235,7 +235,7 @@ export default function Render(
|
||||||
resetItem(record.id);
|
resetItem(record.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
恢复
|
{t('common::action.recover')}
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
|
|
@ -257,7 +257,7 @@ export default function Render(
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Modal
|
<Modal
|
||||||
title="模板列表"
|
title="微信模板列表"
|
||||||
open={open}
|
open={open}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
|
|
@ -272,13 +272,18 @@ export default function Render(
|
||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
dataIndex: 'title',
|
dataIndex: 'title',
|
||||||
title: '消息标题',
|
title: '模板标题',
|
||||||
width: 200,
|
width: 200,
|
||||||
|
fixed: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'wechatId',
|
dataIndex: 'wechatId',
|
||||||
title: '微信模板Id',
|
title: '模板ID',
|
||||||
width: 300,
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'content',
|
||||||
|
title: '模板内容',
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -956,7 +956,8 @@ const i18ns: I18n[] = [
|
||||||
"editor": "编辑",
|
"editor": "编辑",
|
||||||
"newAdd": "新增",
|
"newAdd": "新增",
|
||||||
"add": "添加",
|
"add": "添加",
|
||||||
"submit": "提交"
|
"submit": "提交",
|
||||||
|
"recover": "恢复"
|
||||||
},
|
},
|
||||||
"operate": "操作",
|
"operate": "操作",
|
||||||
"submit": "提交",
|
"submit": "提交",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@
|
||||||
"editor": "编辑",
|
"editor": "编辑",
|
||||||
"newAdd": "新增",
|
"newAdd": "新增",
|
||||||
"add": "添加",
|
"add": "添加",
|
||||||
"submit": "提交"
|
"submit": "提交",
|
||||||
|
"recover": "恢复"
|
||||||
},
|
},
|
||||||
"operate": "操作",
|
"operate": "操作",
|
||||||
"submit": "提交",
|
"submit": "提交",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue