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