diff --git a/src/views/common/push/pushCustomType/customType.data.ts b/src/views/common/push/pushCustomType/customType.data.ts
deleted file mode 100644
index 0975e1c..0000000
--- a/src/views/common/push/pushCustomType/customType.data.ts
+++ /dev/null
@@ -1,144 +0,0 @@
-import { BasicColumn } from '/@/components/Table';
-import { FormSchema } from '/@/components/Table';
-import { listPushFile } from '/@/api/platform/common/controller/pushFile';
-import {useUserStore} from '/@/store/modules/user';
-
-const userStore = useUserStore();
-const userInfoStore = userStore.getUserInfo;
-
-/** 表格列配置 */
-export const columns: BasicColumn[] = [
- {
- title: '类型名称',
- dataIndex: 'name'
- },
- {
- title: '是否播放声音',
- dataIndex: 'playSound',
- customRender: ({record}) => {
- return ~~record?.playSound === 0 ? '是' : '否';
- }
- },
- {
- title: '是否震动',
- dataIndex: 'playVibrate',
- customRender: ({record}) => {
- return ~~record?.playVibrate === 0 ? '是' : '否';
- }
- },
- {
- title: '是否闪光',
- dataIndex: 'playLights',
- customRender: ({record}) => {
- return ~~record?.playLights === 0 ? '是' : '否';
- }
- },
- {
- title: '自定义播放文件名称',
- dataIndex: 'customPlayFileName'
- },
- {
- title: '创建人',
- dataIndex: 'createByName'
- },
- {
- title: '创建时间',
- dataIndex: 'createTime',
- width: 200
- }
-];
-
-/** 搜索表单配置 */
-export const searchFormSchema: FormSchema[] = [
- {
- field: 'name',
- label: '类型名称',
- component: 'Input',
- componentProps: {
- placeholder: '请输入类型名称',
- },
- colProps: { span: 6 }
- }
-];
-
-/** 表单配置 */
-export const formSchema: FormSchema[] = [
- {
- field: 'id',
- label: 'ID',
- component: 'Input',
- show: false
- },
- {
- field: 'name',
- label: '类型名称',
- component: 'Input',
- required: true,
- colProps: {
- span: 24
- }
- },
- {
- field: 'playSound',
- label: '是否播放声音',
- component: 'RadioGroup',
- required: true,
- defaultValue: '0',
- componentProps: {
- options: [
- { label: '是', value: '0' },
- { label: '否', value: '1' }
- ]
- },
- colProps: {
- span: 12
- }
- },
- {
- field: 'playVibrate',
- label: '是否震动',
- component: 'RadioGroup',
- required: true,
- defaultValue: '0',
- componentProps: {
- options: [
- { label: '是', value: '0' },
- { label: '否', value: '1' }
- ]
- },
- colProps: {
- span: 12
- }
- },
- {
- field: 'playLights',
- label: '是否闪光',
- component: 'RadioGroup',
- required: true,
- defaultValue: '0',
- componentProps: {
- options: [
- { label: '是', value: '0' },
- { label: '否', value: '1' }
- ]
- },
- colProps: {
- span: 12
- }
- },
- {
- field: 'customPlayFileName',
- label: '播放文件名称',
- component: 'ApiSelect',
- componentProps: {
- api: listPushFile,
- params: {
- size: 99,
- createById: userInfoStore.id
- },
- labelField: 'original',
- valueField: 'original',
- resultField: 'data'
- },
- },
-];
diff --git a/src/views/common/push/pushCustomType/CustomTypeModal.vue b/src/views/common/push/pushType/TypeModal.vue
similarity index 87%
rename from src/views/common/push/pushCustomType/CustomTypeModal.vue
rename to src/views/common/push/pushType/TypeModal.vue
index c707d74..ab2a54d 100644
--- a/src/views/common/push/pushCustomType/CustomTypeModal.vue
+++ b/src/views/common/push/pushType/TypeModal.vue
@@ -17,8 +17,8 @@
*/
import { ref, unref } from 'vue';
import { BasicForm, useForm } from '/@/components/Form/index';
- import { formSchema } from './customType.data';
- import { addPushCustomType, editPushCustomType, getPushCustomType } from '/@/api/platform/common/controller/pushCustomType';
+ import { formSchema } from './type.data';
+ import { addPushType, editPushType, getPushType } from '/@/api/platform/common/controller/pushType';
import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal';
/** 通用变量统一声明区域 */
@@ -46,7 +46,7 @@
break;
case 'edit':
props.title = '编辑推送类型';
- await setFieldsValue(await getPushCustomType(refId));
+ await setFieldsValue(await getPushType(refId));
break;
}
// 尾部:设置处理后的最终配置数据
@@ -63,10 +63,10 @@
// 采用tag标签区分操作
switch (unref(tag)) {
case 'add':
- await addPushCustomType(formData);
+ await addPushType(formData);
break;
case 'edit':
- await editPushCustomType(formData);
+ await editPushType(formData);
break;
}
// 处理提交完成之后逻辑
diff --git a/src/views/common/push/pushCustomType/index.vue b/src/views/common/push/pushType/index.vue
similarity index 80%
rename from src/views/common/push/pushCustomType/index.vue
rename to src/views/common/push/pushType/index.vue
index a69c6c0..3b4f2c3 100644
--- a/src/views/common/push/pushCustomType/index.vue
+++ b/src/views/common/push/pushType/index.vue
@@ -20,9 +20,9 @@
@click="handleDel()"
>删除推送类型
-
-
+
+
+ />
+
-
+