From 01845c17e835028c3587f5bc15d84313a2746146 Mon Sep 17 00:00:00 2001
From: wangxiang <1827945911@qq.com>
Date: Fri, 7 Apr 2023 16:40:23 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=93=83=E5=A3=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/common/push/pushConcern/index.vue | 2 +-
src/views/common/push/pushRingtone/index.vue | 6 ++++++
src/views/common/push/pushType/TypeModal.vue | 19 ++++++++++++++++++-
src/views/common/push/pushType/type.data.ts | 4 ----
4 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/src/views/common/push/pushConcern/index.vue b/src/views/common/push/pushConcern/index.vue
index 0ed6c9e..8be38cb 100644
--- a/src/views/common/push/pushConcern/index.vue
+++ b/src/views/common/push/pushConcern/index.vue
@@ -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 });
}
/** 删除按钮操作,行内删除 */
diff --git a/src/views/common/push/pushRingtone/index.vue b/src/views/common/push/pushRingtone/index.vue
index b036238..d15e517 100644
--- a/src/views/common/push/pushRingtone/index.vue
+++ b/src/views/common/push/pushRingtone/index.vue
@@ -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 @@
// 非多个禁用
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 @@
dataIndex: 'action',
fixed: false
},
+ searchInfo: {
+ createById: userInfoStore.id
+ },
handleSearchInfoFn: () => clearSelectedRowKeys()
});
diff --git a/src/views/common/push/pushType/TypeModal.vue b/src/views/common/push/pushType/TypeModal.vue
index 5dd79e6..48565b2 100644
--- a/src/views/common/push/pushType/TypeModal.vue
+++ b/src/views/common/push/pushType/TypeModal.vue
@@ -15,12 +15,14 @@
* Copyright © 2020-2022 entfrm 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>('');
@@ -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 @@
// 处理设置数据
tag.value = data._tag;
const refId = data.record?.id;
+ const onlineRingtoneCreateId = data.onlineRingtoneCreateId;
const props: Partial = { confirmLoading: false };
+ await updateSchema([
+ {
+ field: 'onlineRingtone',
+ componentProps: {
+ api: listPushRingtone,
+ params: {
+ size: 99,
+ createById: onlineRingtoneCreateId || userInfoStore.id
+ },
+ }
+ },
+ ]);
// 采用tag标签区分操作
switch (unref(tag)) {
case 'add':
diff --git a/src/views/common/push/pushType/type.data.ts b/src/views/common/push/pushType/type.data.ts
index ea7f4d1..96620c6 100644
--- a/src/views/common/push/pushType/type.data.ts
+++ b/src/views/common/push/pushType/type.data.ts
@@ -183,10 +183,6 @@ export const formSchema: FormSchema[] = [
label: '在线铃声',
component: 'ApiSelect',
componentProps: {
- api: listPushRingtone,
- params: {
- size: 99
- },
labelField: 'name',
valueField: 'id',
resultField: 'data'