Browse Source

fix: patch chat msg

master
wangxiang 2 years ago
parent
commit
a2b08e5f92
  1. 4
      src/views/common/push/pushChatMessage/ChatMessageModal.vue
  2. 80
      src/views/common/push/pushChatMessage/chatMessage.data.ts
  3. 6
      src/views/common/push/pushConcern/concern.data.ts
  4. 2
      src/views/common/push/pushConcern/index.vue
  5. 18
      src/views/common/push/pushType/type.data.ts

4
src/views/common/push/pushChatMessage/ChatMessageModal.vue

@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
/** https://v3.cn.vuejs.org/api/options-data.html#emits */
const emit = defineEmits(['success', 'register']);
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({
disabled: true,
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
@ -29,6 +30,9 @@ @@ -29,6 +30,9 @@
//
await resetFields();
await clearValidate();
await updateSchema([
]);
//
tag.value = data._tag;
const refId = data.record?.id;

80
src/views/common/push/pushChatMessage/chatMessage.data.ts

@ -94,37 +94,6 @@ export const formSchema: FormSchema[] = [ @@ -94,37 +94,6 @@ export const formSchema: FormSchema[] = [
component: 'Input',
show: false
},
{
field: 'pushTypeId',
label: '推送类型',
component: 'ApiSelect',
componentProps: {
disabled: true,
api: listPushType,
params: {
size: 99
},
labelField: 'name',
valueField: 'id',
resultField: 'data'
},
},
{
field: 'status',
label: '推送状态',
component: 'Select',
colProps: {
span: 12
},
componentProps: {
disabled: true,
options: [
{ label: '待审核', value: '0' },
{ label: '未读', value: '1' },
{ label: '已读', value: '2' }
]
}
},
{
field: 'aliasType',
label: '别名类型',
@ -132,9 +101,6 @@ export const formSchema: FormSchema[] = [ @@ -132,9 +101,6 @@ export const formSchema: FormSchema[] = [
colProps: {
span: 12
},
componentProps: {
disabled: true
}
},
{
field: 'alias',
@ -142,26 +108,23 @@ export const formSchema: FormSchema[] = [ @@ -142,26 +108,23 @@ export const formSchema: FormSchema[] = [
component: 'Input',
colProps: {
span: 12
},
componentProps: {
disabled: true
}
},
{
field: 'title',
label: '通知标题',
component: 'Input',
componentProps: {
disabled: true
colProps: {
span: 12
}
},
{
field: 'text',
label: '通知内容',
component: 'Input',
componentProps: {
disabled: true
}
colProps: {
span: 12
},
},
{
field: 'playSound',
@ -169,10 +132,9 @@ export const formSchema: FormSchema[] = [ @@ -169,10 +132,9 @@ export const formSchema: FormSchema[] = [
component: 'RadioGroup',
defaultValue: '0',
componentProps: {
disabled: true,
options: [
{ label: '', value: '0' },
{ label: '', value: '1' }
{ label: '', value: '0' },
{ label: '', value: '1' },
]
},
colProps: {
@ -185,10 +147,9 @@ export const formSchema: FormSchema[] = [ @@ -185,10 +147,9 @@ export const formSchema: FormSchema[] = [
component: 'RadioGroup',
defaultValue: '0',
componentProps: {
disabled: true,
options: [
{ label: '', value: '0' },
{ label: '', value: '1' }
{ label: '', value: '0' },
{ label: '', value: '1' },
]
},
colProps: {
@ -201,10 +162,9 @@ export const formSchema: FormSchema[] = [ @@ -201,10 +162,9 @@ export const formSchema: FormSchema[] = [
component: 'RadioGroup',
defaultValue: '0',
componentProps: {
disabled: true,
options: [
{ label: '', value: '0' },
{ label: '', value: '1' }
{ label: '', value: '0' },
{ label: '', value: '1' },
]
},
colProps: {
@ -217,7 +177,6 @@ export const formSchema: FormSchema[] = [ @@ -217,7 +177,6 @@ export const formSchema: FormSchema[] = [
component: 'RadioGroup',
defaultValue: '0',
componentProps: {
disabled: true,
options: [
{ label: '否', value: '0' },
{ label: '是', value: '1' }
@ -232,34 +191,17 @@ export const formSchema: FormSchema[] = [ @@ -232,34 +191,17 @@ export const formSchema: FormSchema[] = [
label: '离线铃声',
component: 'Input',
componentProps: {
disabled: true,
placeholder: '格式为R.raw.[sound]',
},
colProps: {
span: 12
}
},
{
field: 'onlineRingtone',
label: '在线铃声',
component: 'ApiSelect',
componentProps: {
disabled: true,
api: listPushRingtone,
params: {
size: 99
},
labelField: 'name',
valueField: 'id',
resultField: 'data'
},
},
{
field: 'custom',
label: '自定义通知传输数据',
component: 'InputTextArea',
componentProps: {
disabled: true,
rows: 6
},
},

6
src/views/common/push/pushConcern/concern.data.ts

@ -136,7 +136,7 @@ export const pushTypeColumns = (refreshPushType: Function) => [ @@ -136,7 +136,7 @@ export const pushTypeColumns = (refreshPushType: Function) => [
width: 80,
customRender: ({ record }) => {
const playSound = record?.playSound;
const enable = ~~playSound === 0;
const enable = ~~playSound === 1;
const color = enable ? 'green' : 'red';
const text = enable ? '是' : '否';
return h(Tag, { color: color }, () => text);
@ -185,7 +185,7 @@ export const pushTypeColumns = (refreshPushType: Function) => [ @@ -185,7 +185,7 @@ export const pushTypeColumns = (refreshPushType: Function) => [
width: 80,
customRender: ({ record }) => {
const playVibrate = record?.playVibrate;
const enable = ~~playVibrate === 0;
const enable = ~~playVibrate === 1;
const color = enable ? 'green' : 'red';
const text = enable ? '是' : '否';
return h(Tag, { color: color }, () => text);
@ -197,7 +197,7 @@ export const pushTypeColumns = (refreshPushType: Function) => [ @@ -197,7 +197,7 @@ export const pushTypeColumns = (refreshPushType: Function) => [
width: 80,
customRender: ({ record }) => {
const playLights = record?.playLights;
const enable = ~~playLights === 0;
const enable = ~~playLights === 1;
const color = enable ? 'green' : 'red';
const text = enable ? '是' : '否';
return h(Tag, { color: color }, () => text);

2
src/views/common/push/pushConcern/index.vue

@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
{
label: '推送消息',
icon: 'fa6-regular:message',
ifShow: ![SystemUserType.ENTERPRISE_USER, userInfoStore.userType].includes(record.userType),
onClick: handleSend.bind(null, record)
}]"
:dropDownActions="[
@ -72,6 +73,7 @@ @@ -72,6 +73,7 @@
import TypeModal from '../pushType/TypeModal.vue';
import ConcernSendModal from './ConcernSendModal.vue';
import { PushConcernType, PushAuditStatus, PushConcernDynamicJoinType } from '/@/enums/pushEnum';
import { SystemUserType } from '/@/enums/permissionEnum';
const userStore = useUserStore();
const userInfoStore = userStore.getUserInfo;

18
src/views/common/push/pushType/type.data.ts

@ -55,7 +55,7 @@ export const columns = (refreshPushType: Function) => [ @@ -55,7 +55,7 @@ export const columns = (refreshPushType: Function) => [
width: 80,
customRender: ({ record }) => {
const playSound = record?.playSound;
const enable = ~~playSound === 0;
const enable = ~~playSound === 1;
const color = enable ? 'green' : 'red';
const text = enable ? '是' : '否';
return h(Tag, { color: color }, () => text);
@ -67,7 +67,7 @@ export const columns = (refreshPushType: Function) => [ @@ -67,7 +67,7 @@ export const columns = (refreshPushType: Function) => [
width: 80,
customRender: ({ record }) => {
const playVibrate = record?.playVibrate;
const enable = ~~playVibrate === 0;
const enable = ~~playVibrate === 1;
const color = enable ? 'green' : 'red';
const text = enable ? '是' : '否';
return h(Tag, { color: color }, () => text);
@ -79,7 +79,7 @@ export const columns = (refreshPushType: Function) => [ @@ -79,7 +79,7 @@ export const columns = (refreshPushType: Function) => [
width: 80,
customRender: ({ record }) => {
const playLights = record?.playLights;
const enable = ~~playLights === 0;
const enable = ~~playLights === 1;
const color = enable ? 'green' : 'red';
const text = enable ? '是' : '否';
return h(Tag, { color: color }, () => text);
@ -146,8 +146,8 @@ export const formSchema: FormSchema[] = [ @@ -146,8 +146,8 @@ export const formSchema: FormSchema[] = [
defaultValue: '0',
componentProps: {
options: [
{ label: '', value: '0' },
{ label: '', value: '1' }
{ label: '', value: '0' },
{ label: '', value: '1' }
]
},
colProps: {
@ -162,8 +162,8 @@ export const formSchema: FormSchema[] = [ @@ -162,8 +162,8 @@ export const formSchema: FormSchema[] = [
defaultValue: '0',
componentProps: {
options: [
{ label: '', value: '0' },
{ label: '', value: '1' }
{ label: '', value: '0' },
{ label: '', value: '1' }
]
},
colProps: {
@ -178,8 +178,8 @@ export const formSchema: FormSchema[] = [ @@ -178,8 +178,8 @@ export const formSchema: FormSchema[] = [
defaultValue: '0',
componentProps: {
options: [
{ label: '', value: '0' },
{ label: '', value: '1' }
{ label: '', value: '0' },
{ label: '', value: '1' }
]
},
colProps: {

Loading…
Cancel
Save