|
@@ -1,18 +1,19 @@
|
|
|
import { wop } from '@/conf/config.js'
|
|
|
import { Tag } from 'antd'
|
|
|
+import { LongText } from 'wptpc-design'
|
|
|
|
|
|
export default {
|
|
|
apiUrl: `${wop}/v1/admin/developer/subscribe/get`,
|
|
|
requestFormat: data => {
|
|
|
// data.startTime = moment.unix(data.startTime)
|
|
|
// data.endTime = moment.unix(data.endTime)
|
|
|
- return data;
|
|
|
+ return data
|
|
|
},
|
|
|
dataFormat: data => {
|
|
|
data.data.list.forEach(item => {
|
|
|
- item.eventType = item.eventType?.split(',');
|
|
|
- });
|
|
|
- return data;
|
|
|
+ item.eventType = item.eventType?.split(',')
|
|
|
+ })
|
|
|
+ return data
|
|
|
},
|
|
|
constParam: {},
|
|
|
fetctWhenMount: true,
|
|
@@ -24,39 +25,45 @@ export default {
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: 'ID',
|
|
|
- dataIndex: 'id',
|
|
|
+ dataIndex: 'id'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '用户标识',
|
|
|
- dataIndex: 'userInfoId',
|
|
|
+ dataIndex: 'userInfoId'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: 'AppKey',
|
|
|
- dataIndex: 'appKey',
|
|
|
+ dataIndex: 'appKey'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '过滤规则',
|
|
|
dataIndex: 'rule',
|
|
|
- textLength: 20,
|
|
|
+ render: text => {
|
|
|
+ if (text === '') {
|
|
|
+ return '-'
|
|
|
+ } else {
|
|
|
+ return <LongText text={text} limit={20}/>
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '订阅类目',
|
|
|
- dataIndex: 'name',
|
|
|
+ dataIndex: 'name'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '回调地址',
|
|
|
dataIndex: 'callback',
|
|
|
- textLength: 20,
|
|
|
+ textLength: 20
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '事件类型',
|
|
|
- dataIndex: 'eventTypeName',
|
|
|
+ dataIndex: 'eventTypeName'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
@@ -64,16 +71,16 @@ export default {
|
|
|
dataIndex: 'stateDesc',
|
|
|
render: (t, record) => {
|
|
|
if (record.state === 1) {
|
|
|
- return <Tag color="green">{t}</Tag>;
|
|
|
+ return <Tag color="green">{t}</Tag>
|
|
|
} else {
|
|
|
- return <Tag color="red">{t}</Tag>;
|
|
|
+ return <Tag color="red">{t}</Tag>
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '创建时间',
|
|
|
- dataIndex: 'createdAt',
|
|
|
+ dataIndex: 'createdAt'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
@@ -83,7 +90,7 @@ export default {
|
|
|
dataIndex: 'nickname',
|
|
|
coloumnRender: [
|
|
|
{
|
|
|
- type: 'FontManage',
|
|
|
+ type: 'FontManage'
|
|
|
},
|
|
|
{
|
|
|
type: 'modalFormButton',
|
|
@@ -98,20 +105,19 @@ export default {
|
|
|
type: 'TextArea',
|
|
|
label: '过滤规则',
|
|
|
key: 'rule',
|
|
|
- isRequired: true,
|
|
|
componentProps: {
|
|
|
placeholder: '请输入',
|
|
|
- rows: 10,
|
|
|
+ rows: 10
|
|
|
},
|
|
|
extra:
|
|
|
- '示例: id>0 and isAuction=true and saving > 12.2 and (secCategory=3001 or secCategory=3002) and type != 0 and profileJson exist "name" and profileJson noexist "age" and profileJson.status = "normal"',
|
|
|
- },
|
|
|
+ '示例: id>0 and isAuction=true and saving > 12.2 and (secCategory=3001 or secCategory=3002) and type != 0 and profileJson exist "name" and profileJson noexist "age" and profileJson.status = "normal"'
|
|
|
+ }
|
|
|
],
|
|
|
params: {
|
|
|
cloumnParams: ['id'],
|
|
|
- formParams: [],
|
|
|
- },
|
|
|
- },
|
|
|
+ formParams: []
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
type: 'operatButton',
|
|
@@ -119,8 +125,8 @@ export default {
|
|
|
{
|
|
|
key: 'state',
|
|
|
relationship: '=',
|
|
|
- value: 0,
|
|
|
- },
|
|
|
+ value: 0
|
|
|
+ }
|
|
|
],
|
|
|
props: {
|
|
|
buttonType: 'link',
|
|
@@ -129,9 +135,9 @@ export default {
|
|
|
confirmText: '确认改变状态吗?',
|
|
|
apiUrl: `${wop}/v1/admin/developer/subscribe/check`,
|
|
|
params: {
|
|
|
- cloumnParams: ['id'],
|
|
|
- },
|
|
|
- },
|
|
|
+ cloumnParams: ['id']
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
{
|
|
@@ -140,8 +146,8 @@ export default {
|
|
|
{
|
|
|
key: 'state',
|
|
|
relationship: '=',
|
|
|
- value: 1,
|
|
|
- },
|
|
|
+ value: 1
|
|
|
+ }
|
|
|
],
|
|
|
props: {
|
|
|
buttonType: 'link',
|
|
@@ -150,9 +156,9 @@ export default {
|
|
|
confirmText: '确认改变状态吗?',
|
|
|
apiUrl: `${wop}/v1/admin/developer/subscribe/check`,
|
|
|
params: {
|
|
|
- cloumnParams: ['id'],
|
|
|
- },
|
|
|
- },
|
|
|
+ cloumnParams: ['id']
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
type: 'modalFormButton',
|
|
@@ -163,9 +169,9 @@ export default {
|
|
|
modalWidth: 600,
|
|
|
apiUrl: `${wop}/v1/admin/developer/subscribe/update`,
|
|
|
requestFormat: data => {
|
|
|
- data.eventType = data.eventType.length ? data.eventType.toLocaleString() : '';
|
|
|
- console.log(data, 1);
|
|
|
- return data;
|
|
|
+ data.eventType = data.eventType.length ? data.eventType.toLocaleString() : ''
|
|
|
+ console.log(data, 1)
|
|
|
+ return data
|
|
|
},
|
|
|
formFields: [
|
|
|
{
|
|
@@ -174,8 +180,8 @@ export default {
|
|
|
key: 'id',
|
|
|
isRequired: false,
|
|
|
componentProps: {
|
|
|
- disabled: true,
|
|
|
- },
|
|
|
+ disabled: true
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
type: 'CheckBox',
|
|
@@ -187,18 +193,18 @@ export default {
|
|
|
options: [
|
|
|
{
|
|
|
value: '1',
|
|
|
- label: 'insert',
|
|
|
+ label: 'insert'
|
|
|
},
|
|
|
{
|
|
|
value: '2',
|
|
|
- label: 'update',
|
|
|
+ label: 'update'
|
|
|
},
|
|
|
{
|
|
|
value: '3',
|
|
|
- label: 'delete',
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
+ label: 'delete'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
type: 'TextArea',
|
|
@@ -209,15 +215,15 @@ export default {
|
|
|
rows: 8,
|
|
|
placeholder: '请输入',
|
|
|
maxLength: 200,
|
|
|
- minLength: 2,
|
|
|
- },
|
|
|
- },
|
|
|
+ minLength: 2
|
|
|
+ }
|
|
|
+ }
|
|
|
],
|
|
|
params: {
|
|
|
cloumnParams: [],
|
|
|
- formParams: [],
|
|
|
- },
|
|
|
- },
|
|
|
+ formParams: []
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
type: 'operatButton',
|
|
@@ -228,14 +234,14 @@ export default {
|
|
|
confirmText: '确认删除吗?',
|
|
|
apiUrl: `${wop}/v1/admin/developer/subscribe/delete`,
|
|
|
params: {
|
|
|
- cloumnParams: ['id'],
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
+ cloumnParams: ['id']
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
],
|
|
|
- operateBar: [],
|
|
|
+ operateBar: []
|
|
|
},
|
|
|
filterSetting: {
|
|
|
formFields: [
|
|
@@ -244,21 +250,21 @@ export default {
|
|
|
type: 'input',
|
|
|
key: 'userInfoId',
|
|
|
placeholder: '请输入用户标识',
|
|
|
- allowEnterSearch: true,
|
|
|
+ allowEnterSearch: true
|
|
|
},
|
|
|
{
|
|
|
label: 'AppKey:',
|
|
|
type: 'input',
|
|
|
key: 'appKey',
|
|
|
placeholder: '请输入AppKey',
|
|
|
- allowEnterSearch: true,
|
|
|
+ allowEnterSearch: true
|
|
|
},
|
|
|
{
|
|
|
label: '订阅类目:',
|
|
|
type: 'input',
|
|
|
key: 'name',
|
|
|
placeholder: '请输入订阅类目',
|
|
|
- allowEnterSearch: true,
|
|
|
+ allowEnterSearch: true
|
|
|
},
|
|
|
{
|
|
|
label: '状态:',
|
|
@@ -266,24 +272,24 @@ export default {
|
|
|
option: [
|
|
|
{
|
|
|
value: '',
|
|
|
- label: '全部',
|
|
|
+ label: '全部'
|
|
|
},
|
|
|
{
|
|
|
value: '1',
|
|
|
- label: '启用',
|
|
|
+ label: '启用'
|
|
|
},
|
|
|
{
|
|
|
value: '0',
|
|
|
- label: '未启用',
|
|
|
- },
|
|
|
+ label: '未启用'
|
|
|
+ }
|
|
|
],
|
|
|
styles: {
|
|
|
- width: 120,
|
|
|
+ width: 120
|
|
|
},
|
|
|
key: 'state',
|
|
|
- defaultValue: '',
|
|
|
- },
|
|
|
+ defaultValue: ''
|
|
|
+ }
|
|
|
],
|
|
|
- hasClearBtn: false,
|
|
|
- },
|
|
|
-};
|
|
|
+ hasClearBtn: false
|
|
|
+ }
|
|
|
+}
|