Browse Source

fix: 修复铃声

master
wangxiang 2 years ago
parent
commit
01845c17e8
  1. 2
      src/views/common/push/pushConcern/index.vue
  2. 6
      src/views/common/push/pushRingtone/index.vue
  3. 19
      src/views/common/push/pushType/TypeModal.vue
  4. 4
      src/views/common/push/pushType/type.data.ts

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

@ -160,7 +160,7 @@ @@ -160,7 +160,7 @@
function handlePushTypeEdit(record?: Recordable) {
record = record || { id: getSelectRowKeys() };
pushTypeOpenModal(true, { _tag: 'concernEdit', record });
pushTypeOpenModal(true, { _tag: 'concernEdit', record, onlineRingtoneCreateId: record.concernUserId });
}
/** 删除按钮操作,行内删除 */

6
src/views/common/push/pushRingtone/index.vue

@ -57,6 +57,7 @@ @@ -57,6 +57,7 @@
import RingtoneModal from './RingtoneModal.vue';
import { columns, searchFormSchema } from './ringtone.data';
import { useMessage } from '/@/hooks/web/useMessage';
import { useUserStore } from '/@/store/modules/user';
/** 类型规范统一声明定义区域 */
interface TableState {
@ -71,6 +72,8 @@ @@ -71,6 +72,8 @@
//
multiple: true
});
const userStore = useUserStore();
const userInfoStore = userStore.getUserInfo;
const { createConfirm, createMessage } = useMessage();
const [registerModal, { openModal }] = useModal();
const [registerTable, { reload, clearSelectedRowKeys, getSelectRowKeys }] = useTable({
@ -98,6 +101,9 @@ @@ -98,6 +101,9 @@
dataIndex: 'action',
fixed: false
},
searchInfo: {
createById: userInfoStore.id
},
handleSearchInfoFn: () => clearSelectedRowKeys()
});

19
src/views/common/push/pushType/TypeModal.vue

@ -15,12 +15,14 @@ @@ -15,12 +15,14 @@
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved.
* author entfrm开发团队-王翔
*/
import { ref, unref } from 'vue';
import {ref, toRaw, unref} from 'vue';
import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchema } from './type.data';
import { addPushType, editPushType, getPushType } from '/@/api/platform/common/controller/pushType';
import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal';
import { getPushConcernFanType, editPushConcernFanType } from '/@/api/platform/common/controller/pushConcernFanType';
import { listPushRingtone } from '/@/api/platform/common/controller/pushRingtone';
import { useUserStore } from '/@/store/modules/user';
/** 通用变量统一声明区域 */
const tag = ref<Nullable<string>>('');
@ -32,6 +34,8 @@ @@ -32,6 +34,8 @@
showActionButtonGroup: false,
baseColProps: { span: 24 }
});
const userStore = useUserStore();
const userInfoStore = userStore.getUserInfo;
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data: WindowInnerData = { _tag: '' }) => {
//
await resetFields();
@ -39,7 +43,20 @@ @@ -39,7 +43,20 @@
//
tag.value = data._tag;
const refId = data.record?.id;
const onlineRingtoneCreateId = data.onlineRingtoneCreateId;
const props: Partial<ModalProps> = { confirmLoading: false };
await updateSchema([
{
field: 'onlineRingtone',
componentProps: {
api: listPushRingtone,
params: {
size: 99,
createById: onlineRingtoneCreateId || userInfoStore.id
},
}
},
]);
// tag
switch (unref(tag)) {
case 'add':

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

@ -183,10 +183,6 @@ export const formSchema: FormSchema[] = [ @@ -183,10 +183,6 @@ export const formSchema: FormSchema[] = [
label: '在线铃声',
component: 'ApiSelect',
componentProps: {
api: listPushRingtone,
params: {
size: 99
},
labelField: 'name',
valueField: 'id',
resultField: 'data'

Loading…
Cancel
Save