diff --git a/src/views/common/push/pushChatMessage/ChatMessageModal.vue b/src/views/common/push/pushChatMessage/ChatMessageModal.vue index 129ad26..6f84103 100644 --- a/src/views/common/push/pushChatMessage/ChatMessageModal.vue +++ b/src/views/common/push/pushChatMessage/ChatMessageModal.vue @@ -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 @@ // 处理清除脏数据 await resetFields(); await clearValidate(); + await updateSchema([ + + ]); // 处理设置数据 tag.value = data._tag; const refId = data.record?.id; diff --git a/src/views/common/push/pushChatMessage/chatMessage.data.ts b/src/views/common/push/pushChatMessage/chatMessage.data.ts index 92539dc..bd683fe 100644 --- a/src/views/common/push/pushChatMessage/chatMessage.data.ts +++ b/src/views/common/push/pushChatMessage/chatMessage.data.ts @@ -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[] = [ colProps: { span: 12 }, - componentProps: { - disabled: true - } }, { field: 'alias', @@ -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[] = [ 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[] = [ 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[] = [ 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[] = [ component: 'RadioGroup', defaultValue: '0', componentProps: { - disabled: true, options: [ { label: '否', value: '0' }, { label: '是', value: '1' } @@ -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 }, }, diff --git a/src/views/common/push/pushConcern/concern.data.ts b/src/views/common/push/pushConcern/concern.data.ts index 065987a..8f19012 100644 --- a/src/views/common/push/pushConcern/concern.data.ts +++ b/src/views/common/push/pushConcern/concern.data.ts @@ -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) => [ 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) => [ 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); diff --git a/src/views/common/push/pushConcern/index.vue b/src/views/common/push/pushConcern/index.vue index 511308d..d6cdd53 100644 --- a/src/views/common/push/pushConcern/index.vue +++ b/src/views/common/push/pushConcern/index.vue @@ -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 @@ 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; diff --git a/src/views/common/push/pushType/type.data.ts b/src/views/common/push/pushType/type.data.ts index fab78b6..323f82b 100644 --- a/src/views/common/push/pushType/type.data.ts +++ b/src/views/common/push/pushType/type.data.ts @@ -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) => [ 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) => [ 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[] = [ 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[] = [ 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[] = [ defaultValue: '0', componentProps: { options: [ - { label: '是', value: '0' }, - { label: '否', value: '1' } + { label: '否', value: '0' }, + { label: '是', value: '1' } ] }, colProps: {