Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import type { MeterInfoVO, MeterInfoForm, MeterInfoQuery } from './model';
|
import type { MeterInfoVO, MeterInfoForm, MeterInfoQuery } from './model'
|
||||||
|
|
||||||
import type { ID, IDS } from '#/api/common';
|
import type { ID, IDS, PageResult, TreeNode } from '#/api/common';
|
||||||
import type { PageResult } from '#/api/common';
|
|
||||||
|
|
||||||
import { commonExport } from '#/api/helper';
|
import { commonExport } from '#/api/helper'
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询水电气列表
|
* 查询水电气列表
|
||||||
@@ -12,7 +11,7 @@ import { requestClient } from '#/api/request';
|
|||||||
* @returns 水电气列表
|
* @returns 水电气列表
|
||||||
*/
|
*/
|
||||||
export function meterInfoList(params?: MeterInfoQuery) {
|
export function meterInfoList(params?: MeterInfoQuery) {
|
||||||
return requestClient.get<PageResult<MeterInfoVO>>('/property/meterInfo/list', { params });
|
return requestClient.get<PageResult<MeterInfoVO>>('/property/meterInfo/list', { params })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,7 +20,7 @@ export function meterInfoList(params?: MeterInfoQuery) {
|
|||||||
* @returns 水电气列表
|
* @returns 水电气列表
|
||||||
*/
|
*/
|
||||||
export function meterInfoExport(params?: MeterInfoQuery) {
|
export function meterInfoExport(params?: MeterInfoQuery) {
|
||||||
return commonExport('/property/meterInfo/export', params ?? {});
|
return commonExport('/property/meterInfo/export', params ?? {})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,7 +29,7 @@ export function meterInfoExport(params?: MeterInfoQuery) {
|
|||||||
* @returns 水电气详情
|
* @returns 水电气详情
|
||||||
*/
|
*/
|
||||||
export function meterInfoInfo(id: ID) {
|
export function meterInfoInfo(id: ID) {
|
||||||
return requestClient.get<MeterInfoVO>(`/property/meterInfo/${id}`);
|
return requestClient.get<MeterInfoVO>(`/property/meterInfo/${id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,7 +38,7 @@ export function meterInfoInfo(id: ID) {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function meterInfoAdd(data: MeterInfoForm) {
|
export function meterInfoAdd(data: MeterInfoForm) {
|
||||||
return requestClient.postWithMsg<void>('/property/meterInfo', data);
|
return requestClient.postWithMsg<void>('/property/meterInfo', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,7 +47,7 @@ export function meterInfoAdd(data: MeterInfoForm) {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function meterInfoUpdate(data: MeterInfoForm) {
|
export function meterInfoUpdate(data: MeterInfoForm) {
|
||||||
return requestClient.putWithMsg<void>('/property/meterInfo', data);
|
return requestClient.putWithMsg<void>('/property/meterInfo', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,5 +56,14 @@ export function meterInfoUpdate(data: MeterInfoForm) {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function meterInfoRemove(id: ID | IDS) {
|
export function meterInfoRemove(id: ID | IDS) {
|
||||||
return requestClient.deleteWithMsg<void>(`/property/meterInfo/${id}`);
|
return requestClient.deleteWithMsg<void>(`/property/meterInfo/${id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询水电气树
|
||||||
|
* @param level
|
||||||
|
* @returns 水电气树
|
||||||
|
*/
|
||||||
|
export function queryTree(meterType: number | string) {
|
||||||
|
return requestClient.get<TreeNode<Number>[]>(`/property/meterInfo/tree/${meterType}`)
|
||||||
|
}
|
@@ -1,18 +1,24 @@
|
|||||||
import type { AlarmEventProcessVO, AlarmEventProcessForm, AlarmEventProcessQuery } from './model';
|
import type {
|
||||||
|
AlarmEventProcessForm,
|
||||||
|
AlarmEventProcessQuery,
|
||||||
|
AlarmEventProcessVO,
|
||||||
|
} from './model';
|
||||||
|
|
||||||
import type { ID, IDS } from '#/api/common';
|
import type { ID, IDS, PageResult } from '#/api/common';
|
||||||
import type { PageResult } from '#/api/common';
|
|
||||||
|
|
||||||
import { commonExport } from '#/api/helper';
|
import { commonExport } from '#/api/helper';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询告警信息处理流程记录列表
|
* 查询告警信息处理流程记录列表
|
||||||
* @param params
|
* @param params
|
||||||
* @returns 告警信息处理流程记录列表
|
* @returns 告警信息处理流程记录列表
|
||||||
*/
|
*/
|
||||||
export function alarmEventProcessList(params?: AlarmEventProcessQuery) {
|
export function alarmEventProcessList(params?: AlarmEventProcessQuery) {
|
||||||
return requestClient.get<PageResult<AlarmEventProcessVO>>('/sis/alarmEventProcess/list', { params });
|
return requestClient.get<PageResult<AlarmEventProcessVO>>(
|
||||||
|
'/sis/alarmEventProcess/list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,3 +65,14 @@ export function alarmEventProcessUpdate(data: AlarmEventProcessForm) {
|
|||||||
export function alarmEventProcessRemove(id: ID | IDS) {
|
export function alarmEventProcessRemove(id: ID | IDS) {
|
||||||
return requestClient.deleteWithMsg<void>(`/sis/alarmEventProcess/${id}`);
|
return requestClient.deleteWithMsg<void>(`/sis/alarmEventProcess/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除告警信息处理流程记录
|
||||||
|
* @param id id
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function queryResult(id: ID | IDS) {
|
||||||
|
return requestClient.get<AlarmEventProcessVO>(
|
||||||
|
`/sis/alarmEventProcess/query/result/${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@@ -3,13 +3,8 @@ import { computed } from 'vue';
|
|||||||
|
|
||||||
import { useAntdDesignTokens } from '@vben/hooks';
|
import { useAntdDesignTokens } from '@vben/hooks';
|
||||||
import { preferences, usePreferences } from '@vben/preferences';
|
import { preferences, usePreferences } from '@vben/preferences';
|
||||||
|
|
||||||
import { App, ConfigProvider, theme } from 'ant-design-vue';
|
import { App, ConfigProvider, theme } from 'ant-design-vue';
|
||||||
|
|
||||||
import { antdLocale } from '#/locales';
|
import { antdLocale } from '#/locales';
|
||||||
|
|
||||||
import { useUploadTip } from './upload-tip';
|
|
||||||
|
|
||||||
defineOptions({ name: 'App' });
|
defineOptions({ name: 'App' });
|
||||||
|
|
||||||
const { isDark } = usePreferences();
|
const { isDark } = usePreferences();
|
||||||
@@ -30,8 +25,6 @@ const tokenTheme = computed(() => {
|
|||||||
token: tokens,
|
token: tokens,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
useUploadTip();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@@ -1,36 +0,0 @@
|
|||||||
import { onMounted } from 'vue';
|
|
||||||
|
|
||||||
import { useLocalStorage } from '@vueuse/core';
|
|
||||||
import { Modal } from 'ant-design-vue';
|
|
||||||
|
|
||||||
export function useUploadTip() {
|
|
||||||
const readTip = useLocalStorage<boolean>('__upload_tip_read_5.4.0', false);
|
|
||||||
onMounted(() => {
|
|
||||||
if (readTip.value || !import.meta.env.DEV) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const modalInstance = Modal.info({
|
|
||||||
title: '提示',
|
|
||||||
centered: true,
|
|
||||||
content:
|
|
||||||
'如果你的版本是从低版本升级到后端>5.4.0, 记得执行升级sql, 否则跳转页面(如oss 代码生成配置)等会404',
|
|
||||||
okButtonProps: { disabled: true },
|
|
||||||
onOk() {
|
|
||||||
modalInstance.destroy();
|
|
||||||
readTip.value = true;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
let time = 3;
|
|
||||||
const interval = setInterval(() => {
|
|
||||||
modalInstance.update({
|
|
||||||
okText: time === 0 ? '我知道了, 不再弹出' : `${time}秒后关闭`,
|
|
||||||
okButtonProps: { disabled: time > 0 },
|
|
||||||
});
|
|
||||||
if (time <= 0) {
|
|
||||||
clearInterval(interval);
|
|
||||||
}
|
|
||||||
time--;
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
}
|
|
@@ -1,60 +0,0 @@
|
|||||||
import type { DemoForm, DemoQuery, DemoVO } from './model';
|
|
||||||
|
|
||||||
import type { ID, IDS, PageResult } from '#/api/common';
|
|
||||||
|
|
||||||
import { commonExport } from '#/api/helper';
|
|
||||||
import { requestClient } from '#/api/request';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询测试单表列表
|
|
||||||
* @param params
|
|
||||||
* @returns 测试单表列表
|
|
||||||
*/
|
|
||||||
export function demoList(params?: DemoQuery) {
|
|
||||||
return requestClient.get<PageResult<DemoVO>>('/demo/demo/list', { params });
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出测试单表列表
|
|
||||||
* @param params
|
|
||||||
* @returns 测试单表列表
|
|
||||||
*/
|
|
||||||
export function demoExport(params?: DemoQuery) {
|
|
||||||
return commonExport('/demo/demo/export', params ?? {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询测试单表详情
|
|
||||||
* @param id id
|
|
||||||
* @returns 测试单表详情
|
|
||||||
*/
|
|
||||||
export function demoInfo(id: ID) {
|
|
||||||
return requestClient.get<DemoVO>(`/demo/demo/${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增测试单表
|
|
||||||
* @param data
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
export function demoAdd(data: DemoForm) {
|
|
||||||
return requestClient.postWithMsg<void>('/demo/demo', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新测试单表
|
|
||||||
* @param data
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
export function demoUpdate(data: DemoForm) {
|
|
||||||
return requestClient.putWithMsg<void>('/demo/demo', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除测试单表
|
|
||||||
* @param id id
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
export function demoRemove(id: ID | IDS) {
|
|
||||||
return requestClient.deleteWithMsg<void>(`/demo/demo/${id}`);
|
|
||||||
}
|
|
82
apps/web-antd/src/views/demo/demo/api/model.d.ts
vendored
82
apps/web-antd/src/views/demo/demo/api/model.d.ts
vendored
@@ -1,82 +0,0 @@
|
|||||||
import type { BaseEntity, PageQuery } from '#/api/common';
|
|
||||||
|
|
||||||
export interface DemoVO {
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
id: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 排序号
|
|
||||||
*/
|
|
||||||
orderNum: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* key键
|
|
||||||
*/
|
|
||||||
testKey: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 值
|
|
||||||
*/
|
|
||||||
value: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 版本
|
|
||||||
*/
|
|
||||||
version: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DemoForm extends BaseEntity {
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
id?: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 排序号
|
|
||||||
*/
|
|
||||||
orderNum?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* key键
|
|
||||||
*/
|
|
||||||
testKey?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 值
|
|
||||||
*/
|
|
||||||
value?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 版本
|
|
||||||
*/
|
|
||||||
version?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DemoQuery extends PageQuery {
|
|
||||||
/**
|
|
||||||
* 排序号
|
|
||||||
*/
|
|
||||||
orderNum?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* key键
|
|
||||||
*/
|
|
||||||
testKey?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 值
|
|
||||||
*/
|
|
||||||
value?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 版本
|
|
||||||
*/
|
|
||||||
version?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日期范围参数
|
|
||||||
*/
|
|
||||||
params?: any;
|
|
||||||
}
|
|
@@ -1,93 +0,0 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'orderNum',
|
|
||||||
label: '排序号',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'testKey',
|
|
||||||
label: 'key键',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'value',
|
|
||||||
label: '值',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'version',
|
|
||||||
label: '版本',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
|
||||||
{ type: 'checkbox', width: 60 },
|
|
||||||
{
|
|
||||||
title: '主键',
|
|
||||||
field: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '排序号',
|
|
||||||
field: 'orderNum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'key键',
|
|
||||||
field: 'testKey',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '值',
|
|
||||||
field: 'value',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '版本',
|
|
||||||
field: 'version',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'action',
|
|
||||||
fixed: 'right',
|
|
||||||
slots: { default: 'action' },
|
|
||||||
title: '操作',
|
|
||||||
resizable: false,
|
|
||||||
width: 'auto',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const modalSchema: FormSchemaGetter = () => [
|
|
||||||
{
|
|
||||||
label: '主键',
|
|
||||||
fieldName: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
dependencies: {
|
|
||||||
show: () => false,
|
|
||||||
triggerFields: [''],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '排序号',
|
|
||||||
fieldName: 'orderNum',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'key键',
|
|
||||||
fieldName: 'testKey',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '值',
|
|
||||||
fieldName: 'value',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '版本',
|
|
||||||
fieldName: 'version',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
];
|
|
@@ -1,87 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { computed, ref } from 'vue';
|
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
|
||||||
import { $t } from '@vben/locales';
|
|
||||||
import { cloneDeep } from '@vben/utils';
|
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
|
||||||
|
|
||||||
import { demoAdd, demoInfo, demoUpdate } from './api';
|
|
||||||
import { modalSchema } from './data';
|
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
|
||||||
|
|
||||||
const isUpdate = ref(false);
|
|
||||||
const title = computed(() => {
|
|
||||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
|
||||||
});
|
|
||||||
|
|
||||||
const [BasicForm, formApi] = useVbenForm({
|
|
||||||
commonConfig: {
|
|
||||||
// 默认占满两列
|
|
||||||
formItemClass: 'col-span-2',
|
|
||||||
// 默认label宽度 px
|
|
||||||
labelWidth: 80,
|
|
||||||
// 通用配置项 会影响到所有表单项
|
|
||||||
componentProps: {
|
|
||||||
class: 'w-full',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
schema: modalSchema(),
|
|
||||||
showDefaultActions: false,
|
|
||||||
wrapperClass: 'grid-cols-2',
|
|
||||||
});
|
|
||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
|
||||||
fullscreenButton: false,
|
|
||||||
onCancel: handleCancel,
|
|
||||||
onConfirm: handleConfirm,
|
|
||||||
onOpenChange: async (isOpen) => {
|
|
||||||
if (!isOpen) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
modalApi.modalLoading(true);
|
|
||||||
|
|
||||||
const { id } = modalApi.getData() as { id?: number | string };
|
|
||||||
isUpdate.value = !!id;
|
|
||||||
|
|
||||||
if (isUpdate.value && id) {
|
|
||||||
const record = await demoInfo(id);
|
|
||||||
await formApi.setValues(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
modalApi.modalLoading(false);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
async function handleConfirm() {
|
|
||||||
try {
|
|
||||||
modalApi.modalLoading(true);
|
|
||||||
const { valid } = await formApi.validate();
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
|
||||||
const data = cloneDeep(await formApi.getValues());
|
|
||||||
await (isUpdate.value ? demoUpdate(data) : demoAdd(data));
|
|
||||||
emit('reload');
|
|
||||||
await handleCancel();
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
} finally {
|
|
||||||
modalApi.modalLoading(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleCancel() {
|
|
||||||
modalApi.close();
|
|
||||||
await formApi.resetForm();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<BasicModal :close-on-click-modal="false" :title="title" class="w-[550px]">
|
|
||||||
<BasicForm />
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
@@ -1,165 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { VbenFormProps } from '@vben/common-ui';
|
|
||||||
import type { Recordable } from '@vben/types';
|
|
||||||
|
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
|
||||||
import { getPopupContainer } from '@vben/utils';
|
|
||||||
|
|
||||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
|
||||||
|
|
||||||
import { demoExport, demoList, demoRemove } from './api';
|
|
||||||
import { columns, querySchema } from './data';
|
|
||||||
import demoModal from './demo-modal.vue';
|
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
|
||||||
commonConfig: {
|
|
||||||
labelWidth: 80,
|
|
||||||
},
|
|
||||||
schema: querySchema(),
|
|
||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
|
||||||
};
|
|
||||||
|
|
||||||
const gridOptions: VxeGridProps = {
|
|
||||||
checkboxConfig: {
|
|
||||||
// 高亮
|
|
||||||
highlight: true,
|
|
||||||
// 翻页时保留选中状态
|
|
||||||
reserve: true,
|
|
||||||
// 点击行选中
|
|
||||||
// trigger: 'row',
|
|
||||||
},
|
|
||||||
columns,
|
|
||||||
height: 'auto',
|
|
||||||
keepSource: true,
|
|
||||||
pagerConfig: {},
|
|
||||||
proxyConfig: {
|
|
||||||
ajax: {
|
|
||||||
query: async ({ page }, formValues = {}) => {
|
|
||||||
return await demoList({
|
|
||||||
pageNum: page.currentPage,
|
|
||||||
pageSize: page.pageSize,
|
|
||||||
...formValues,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rowConfig: {
|
|
||||||
isHover: true,
|
|
||||||
keyField: 'id',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const checked = ref(false);
|
|
||||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
|
||||||
formOptions,
|
|
||||||
gridOptions,
|
|
||||||
});
|
|
||||||
|
|
||||||
const [DemoModal, modalApi] = useVbenModal({
|
|
||||||
connectedComponent: demoModal,
|
|
||||||
});
|
|
||||||
|
|
||||||
function handleAdd() {
|
|
||||||
modalApi.setData({});
|
|
||||||
modalApi.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleEdit(record: Recordable<any>) {
|
|
||||||
modalApi.setData({ id: record.id });
|
|
||||||
modalApi.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleDelete(row: Recordable<any>) {
|
|
||||||
await demoRemove(row.id);
|
|
||||||
await tableApi.query();
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleMultiDelete() {
|
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
|
||||||
const ids = rows.map((row: any) => row.id);
|
|
||||||
Modal.confirm({
|
|
||||||
title: '提示',
|
|
||||||
okType: 'danger',
|
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
|
||||||
onOk: async () => {
|
|
||||||
await demoRemove(ids);
|
|
||||||
await tableApi.query();
|
|
||||||
checked.value = false;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page :auto-content-height="true">
|
|
||||||
<BasicTable>
|
|
||||||
<template #toolbar-actions>
|
|
||||||
<span class="pl-[7px] text-[16px]">测试单列表</span>
|
|
||||||
</template>
|
|
||||||
<template #toolbar-tools>
|
|
||||||
<Space>
|
|
||||||
<a-button
|
|
||||||
v-access:code="['system:demo:export']"
|
|
||||||
@click="
|
|
||||||
commonDownloadExcel(
|
|
||||||
demoExport,
|
|
||||||
'测试单数据',
|
|
||||||
tableApi.formApi.form.values,
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.export') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
|
||||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
|
||||||
danger
|
|
||||||
type="primary"
|
|
||||||
v-access:code="['system:demo:remove']"
|
|
||||||
@click="handleMultiDelete"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.delete') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
v-access:code="['system:demo:add']"
|
|
||||||
@click="handleAdd"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.add') }}
|
|
||||||
</a-button>
|
|
||||||
</Space>
|
|
||||||
</template>
|
|
||||||
<template #action="{ row }">
|
|
||||||
<Space>
|
|
||||||
<ghost-button
|
|
||||||
v-access:code="['system:demo:edit']"
|
|
||||||
@click.stop="handleEdit(row)"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.edit') }}
|
|
||||||
</ghost-button>
|
|
||||||
<Popconfirm
|
|
||||||
:get-popup-container="getPopupContainer"
|
|
||||||
placement="left"
|
|
||||||
title="确认删除?"
|
|
||||||
@confirm="handleDelete(row)"
|
|
||||||
>
|
|
||||||
<ghost-button
|
|
||||||
danger
|
|
||||||
v-access:code="['system:demo:remove']"
|
|
||||||
@click.stop=""
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.delete') }}
|
|
||||||
</ghost-button>
|
|
||||||
</Popconfirm>
|
|
||||||
</Space>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<DemoModal @reload="tableApi.query()" />
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -1,50 +0,0 @@
|
|||||||
import type { TreeForm, TreeQuery, TreeVO } from './model';
|
|
||||||
|
|
||||||
import type { ID, IDS } from '#/api/common';
|
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询测试树列表
|
|
||||||
* @param params
|
|
||||||
* @returns 测试树列表
|
|
||||||
*/
|
|
||||||
export function treeList(params?: TreeQuery) {
|
|
||||||
return requestClient.get<TreeVO[]>('/demo/tree/list', { params });
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询测试树详情
|
|
||||||
* @param id id
|
|
||||||
* @returns 测试树详情
|
|
||||||
*/
|
|
||||||
export function treeInfo(id: ID) {
|
|
||||||
return requestClient.get<TreeVO>(`/demo/tree/${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增测试树
|
|
||||||
* @param data
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
export function treeAdd(data: TreeForm) {
|
|
||||||
return requestClient.postWithMsg<void>('/demo/tree', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新测试树
|
|
||||||
* @param data
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
export function treeUpdate(data: TreeForm) {
|
|
||||||
return requestClient.putWithMsg<void>('/demo/tree', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除测试树
|
|
||||||
* @param id id
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
export function treeRemove(id: ID | IDS) {
|
|
||||||
return requestClient.deleteWithMsg<void>(`/demo/tree/${id}`);
|
|
||||||
}
|
|
102
apps/web-antd/src/views/demo/tree/api/model.d.ts
vendored
102
apps/web-antd/src/views/demo/tree/api/model.d.ts
vendored
@@ -1,102 +0,0 @@
|
|||||||
import type { BaseEntity } from '#/api/common';
|
|
||||||
|
|
||||||
export interface TreeVO {
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
id: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 父id
|
|
||||||
*/
|
|
||||||
parentId: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 部门id
|
|
||||||
*/
|
|
||||||
deptId: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
userId: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 值
|
|
||||||
*/
|
|
||||||
treeName: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 版本
|
|
||||||
*/
|
|
||||||
version: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 子对象
|
|
||||||
*/
|
|
||||||
children: TreeVO[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TreeForm extends BaseEntity {
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
id?: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 父id
|
|
||||||
*/
|
|
||||||
parentId?: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 部门id
|
|
||||||
*/
|
|
||||||
deptId?: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
userId?: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 值
|
|
||||||
*/
|
|
||||||
treeName?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 版本
|
|
||||||
*/
|
|
||||||
version?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TreeQuery {
|
|
||||||
/**
|
|
||||||
* 父id
|
|
||||||
*/
|
|
||||||
parentId?: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 部门id
|
|
||||||
*/
|
|
||||||
deptId?: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
userId?: number | string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 值
|
|
||||||
*/
|
|
||||||
treeName?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 版本
|
|
||||||
*/
|
|
||||||
version?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日期范围参数
|
|
||||||
*/
|
|
||||||
params?: any;
|
|
||||||
}
|
|
@@ -1,108 +0,0 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'parentId',
|
|
||||||
label: '父id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'deptId',
|
|
||||||
label: '部门id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'userId',
|
|
||||||
label: '用户id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'treeName',
|
|
||||||
label: '值',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'version',
|
|
||||||
label: '版本',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
|
||||||
{
|
|
||||||
title: '主键',
|
|
||||||
field: 'id',
|
|
||||||
treeNode: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '父id',
|
|
||||||
field: 'parentId',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '部门id',
|
|
||||||
field: 'deptId',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '用户id',
|
|
||||||
field: 'userId',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '值',
|
|
||||||
field: 'treeName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '版本',
|
|
||||||
field: 'version',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'action',
|
|
||||||
fixed: 'right',
|
|
||||||
slots: { default: 'action' },
|
|
||||||
title: '操作',
|
|
||||||
resizable: false,
|
|
||||||
width: 'auto',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const modalSchema: FormSchemaGetter = () => [
|
|
||||||
{
|
|
||||||
label: '主键',
|
|
||||||
fieldName: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
dependencies: {
|
|
||||||
show: () => false,
|
|
||||||
triggerFields: [''],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '父id',
|
|
||||||
fieldName: 'parentId',
|
|
||||||
component: 'TreeSelect',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '部门id',
|
|
||||||
fieldName: 'deptId',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '用户id',
|
|
||||||
fieldName: 'userId',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '值',
|
|
||||||
fieldName: 'treeName',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '版本',
|
|
||||||
fieldName: 'version',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
];
|
|
@@ -1,146 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { VbenFormProps } from '@vben/common-ui';
|
|
||||||
import type { Recordable } from '@vben/types';
|
|
||||||
|
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
import { nextTick } from 'vue';
|
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
|
||||||
import { getPopupContainer, listToTree } from '@vben/utils';
|
|
||||||
|
|
||||||
import { Popconfirm, Space } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
import { treeList, treeRemove } from './api';
|
|
||||||
import { columns, querySchema } from './data';
|
|
||||||
import treeModal from './tree-modal.vue';
|
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
|
||||||
commonConfig: {
|
|
||||||
labelWidth: 80,
|
|
||||||
},
|
|
||||||
schema: querySchema(),
|
|
||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
|
||||||
};
|
|
||||||
|
|
||||||
const gridOptions: VxeGridProps = {
|
|
||||||
columns,
|
|
||||||
height: 'auto',
|
|
||||||
keepSource: true,
|
|
||||||
pagerConfig: {
|
|
||||||
enabled: false,
|
|
||||||
},
|
|
||||||
proxyConfig: {
|
|
||||||
ajax: {
|
|
||||||
query: async (_, formValues = {}) => {
|
|
||||||
const resp = await treeList({
|
|
||||||
...formValues,
|
|
||||||
});
|
|
||||||
const treeData = listToTree(resp, {
|
|
||||||
id: 'id',
|
|
||||||
pid: 'parentId',
|
|
||||||
children: 'children',
|
|
||||||
});
|
|
||||||
return { rows: treeData };
|
|
||||||
},
|
|
||||||
// 默认请求接口后展开全部 不需要可以删除这段
|
|
||||||
querySuccess: () => {
|
|
||||||
nextTick(() => {
|
|
||||||
expandAll();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rowConfig: {
|
|
||||||
keyField: 'id',
|
|
||||||
},
|
|
||||||
|
|
||||||
treeConfig: {
|
|
||||||
parentField: 'parentId',
|
|
||||||
rowField: 'id',
|
|
||||||
transform: false,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const [BasicTable, tableApi] = useVbenVxeGrid({ formOptions, gridOptions });
|
|
||||||
const [TreeModal, modalApi] = useVbenModal({
|
|
||||||
connectedComponent: treeModal,
|
|
||||||
});
|
|
||||||
|
|
||||||
function handleAdd() {
|
|
||||||
modalApi.setData({ update: false });
|
|
||||||
modalApi.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleEdit(row: Recordable<any>) {
|
|
||||||
modalApi.setData({ id: row.id, update: true });
|
|
||||||
modalApi.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleDelete(row: Recordable<any>) {
|
|
||||||
await treeRemove(row.id);
|
|
||||||
await tableApi.query();
|
|
||||||
}
|
|
||||||
|
|
||||||
function expandAll() {
|
|
||||||
tableApi.grid?.setAllTreeExpand(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
function collapseAll() {
|
|
||||||
tableApi.grid?.setAllTreeExpand(false);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page :auto-content-height="true">
|
|
||||||
<BasicTable>
|
|
||||||
<template #toolbar-actions>
|
|
||||||
<span class="pl-[7px] text-[16px]">测试树列表</span>
|
|
||||||
</template>
|
|
||||||
<template #toolbar-tools>
|
|
||||||
<Space>
|
|
||||||
<a-button @click="collapseAll">
|
|
||||||
{{ $t('pages.common.collapse') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button @click="expandAll">
|
|
||||||
{{ $t('pages.common.expand') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
v-access:code="['system:tree:add']"
|
|
||||||
@click="handleAdd"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.add') }}
|
|
||||||
</a-button>
|
|
||||||
</Space>
|
|
||||||
</template>
|
|
||||||
<template #action="{ row }">
|
|
||||||
<Space>
|
|
||||||
<ghost-button
|
|
||||||
v-access:code="['system:tree:edit']"
|
|
||||||
@click.stop="handleEdit(row)"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.edit') }}
|
|
||||||
</ghost-button>
|
|
||||||
<Popconfirm
|
|
||||||
:get-popup-container="getPopupContainer"
|
|
||||||
placement="left"
|
|
||||||
title="确认删除?"
|
|
||||||
@confirm="handleDelete(row)"
|
|
||||||
>
|
|
||||||
<ghost-button
|
|
||||||
danger
|
|
||||||
v-access:code="['system:tree:remove']"
|
|
||||||
@click.stop=""
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.delete') }}
|
|
||||||
</ghost-button>
|
|
||||||
</Popconfirm>
|
|
||||||
</Space>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<TreeModal @reload="tableApi.query()" />
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -1,104 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { computed, ref } from 'vue';
|
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
|
||||||
import { $t } from '@vben/locales';
|
|
||||||
import { cloneDeep, listToTree } from '@vben/utils';
|
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
|
||||||
|
|
||||||
import { treeAdd, treeInfo, treeList, treeUpdate } from './api';
|
|
||||||
import { modalSchema } from './data';
|
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
|
||||||
|
|
||||||
const isUpdate = ref(false);
|
|
||||||
const title = computed(() => {
|
|
||||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
|
||||||
});
|
|
||||||
|
|
||||||
const [BasicForm, formApi] = useVbenForm({
|
|
||||||
commonConfig: {
|
|
||||||
// 默认占满两列
|
|
||||||
formItemClass: 'col-span-2',
|
|
||||||
// 默认label宽度 px
|
|
||||||
labelWidth: 80,
|
|
||||||
// 通用配置项 会影响到所有表单项
|
|
||||||
componentProps: {
|
|
||||||
class: 'w-full',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
schema: modalSchema(),
|
|
||||||
showDefaultActions: false,
|
|
||||||
wrapperClass: 'grid-cols-2',
|
|
||||||
});
|
|
||||||
|
|
||||||
async function setupTreeSelect() {
|
|
||||||
const listData = await treeList();
|
|
||||||
const treeData = listToTree(listData, { id: 'id', pid: 'parentId' });
|
|
||||||
formApi.updateSchema([
|
|
||||||
{
|
|
||||||
fieldName: 'parentId',
|
|
||||||
componentProps: {
|
|
||||||
treeData,
|
|
||||||
treeLine: { showLeafIcon: false },
|
|
||||||
fieldNames: { label: 'treeName', value: 'id' },
|
|
||||||
treeDefaultExpandAll: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
|
||||||
fullscreenButton: false,
|
|
||||||
onCancel: handleCancel,
|
|
||||||
onConfirm: handleConfirm,
|
|
||||||
onOpenChange: async (isOpen) => {
|
|
||||||
if (!isOpen) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
modalApi.modalLoading(true);
|
|
||||||
|
|
||||||
const { id } = modalApi.getData() as { id?: number | string };
|
|
||||||
isUpdate.value = !!id;
|
|
||||||
|
|
||||||
if (isUpdate.value && id) {
|
|
||||||
const record = await treeInfo(id);
|
|
||||||
await formApi.setValues(record);
|
|
||||||
}
|
|
||||||
await setupTreeSelect();
|
|
||||||
|
|
||||||
modalApi.modalLoading(false);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
async function handleConfirm() {
|
|
||||||
try {
|
|
||||||
modalApi.modalLoading(true);
|
|
||||||
const { valid } = await formApi.validate();
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
|
||||||
const data = cloneDeep(await formApi.getValues());
|
|
||||||
await (isUpdate.value ? treeUpdate(data) : treeAdd(data));
|
|
||||||
emit('reload');
|
|
||||||
await handleCancel();
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
} finally {
|
|
||||||
modalApi.modalLoading(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleCancel() {
|
|
||||||
modalApi.close();
|
|
||||||
await formApi.resetForm();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<BasicModal :close-on-click-modal="false" :title="title" class="w-[550px]">
|
|
||||||
<BasicForm />
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
@@ -4,8 +4,8 @@ import type { PropType } from 'vue'
|
|||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { handleNode } from '@vben/utils'
|
import { handleNode } from '@vben/utils'
|
||||||
import { Empty, Skeleton, Tree } from 'ant-design-vue'
|
import { Empty, Skeleton, Tree } from 'ant-design-vue'
|
||||||
import { communityTree } from "#/api/property/community"
|
import { queryTree } from "#/api/property/energyManagement/meterInfo"
|
||||||
import type { CommunityVO } from "#/api/property/community/model"
|
import type { TreeNode } from '#/api/common'
|
||||||
|
|
||||||
defineOptions({ inheritAttrs: false })
|
defineOptions({ inheritAttrs: false })
|
||||||
|
|
||||||
@@ -31,26 +31,31 @@ const searchValue = defineModel('searchValue', {
|
|||||||
default: '',
|
default: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
type TreeArray = CommunityVO[]
|
const treeArray = ref<TreeNode[]>([])
|
||||||
const treeArray = ref<TreeArray>([])
|
|
||||||
/** 骨架屏加载 */
|
/** 骨架屏加载 */
|
||||||
const showTreeSkeleton = ref<boolean>(true)
|
const showTreeSkeleton = ref<boolean>(true)
|
||||||
|
|
||||||
async function loadTree() {
|
async function loadTree() {
|
||||||
showTreeSkeleton.value = true
|
showTreeSkeleton.value = true
|
||||||
searchValue.value = ''
|
searchValue.value = ''
|
||||||
selectFloorId.value = []
|
const ret = await queryTree(1)
|
||||||
const ret = await communityTree(3)
|
handleNode(ret, 3)
|
||||||
const splitStr = '/'
|
|
||||||
handleNode(ret, 'label', splitStr, function (node: any) {
|
|
||||||
if (node.level != 3) {
|
|
||||||
node.disabled = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
treeArray.value = ret
|
treeArray.value = ret
|
||||||
showTreeSkeleton.value = false
|
showTreeSkeleton.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleNode(nodes: any[], level: number) {
|
||||||
|
nodes.forEach((node) => {
|
||||||
|
node.key = node.id
|
||||||
|
if (node.level < level) {
|
||||||
|
node.disabled = true
|
||||||
|
}
|
||||||
|
if (node.children) {
|
||||||
|
handleNode(node.children, level)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(loadTree);
|
onMounted(loadTree);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -59,8 +64,7 @@ onMounted(loadTree);
|
|||||||
<Skeleton :loading="showTreeSkeleton" :paragraph="{ rows: 8 }" active class="p-[8px] flex-1 min-h-0">
|
<Skeleton :loading="showTreeSkeleton" :paragraph="{ rows: 8 }" active class="p-[8px] flex-1 min-h-0">
|
||||||
<div class="bg-background flex h-full flex-col overflow-y-auto rounded-lg">
|
<div class="bg-background flex h-full flex-col overflow-y-auto rounded-lg">
|
||||||
<div class="h-full overflow-x-hidden px-[8px]">
|
<div class="h-full overflow-x-hidden px-[8px]">
|
||||||
<Tree v-bind="$attrs" v-if="treeArray.length > 0" v-model:selected-keys="selectFloorId"
|
<Tree v-bind="$attrs" v-if="treeArray.length > 0" :show-line="{ showLeafIcon: false }" :tree-data="treeArray"
|
||||||
:field-names="{ title: 'label', key: 'id' }" :show-line="{ showLeafIcon: false }" :tree-data="treeArray"
|
|
||||||
:virtual="false" default-expand-all @select="$emit('select')">
|
:virtual="false" default-expand-all @select="$emit('select')">
|
||||||
<template #title="{ label }">
|
<template #title="{ label }">
|
||||||
<span v-if="label.indexOf(searchValue) > -1">
|
<span v-if="label.indexOf(searchValue) > -1">
|
||||||
|
@@ -257,7 +257,7 @@ function handleSelectFloor() {
|
|||||||
<template>
|
<template>
|
||||||
<Page :auto-content-height="true">
|
<Page :auto-content-height="true">
|
||||||
<div class="flex h-full gap-[8px]">
|
<div class="flex h-full gap-[8px]">
|
||||||
<FloorTree class="w-[260px]" @select="handleSelectFloor" v-model:select-floor-id="selectFloorId"></FloorTree>
|
<FloorTree class="w-[260px]"></FloorTree>
|
||||||
<div class="flex-1 overflow-hidden">
|
<div class="flex-1 overflow-hidden">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="comparison-section-container">
|
<div class="comparison-section-container">
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<Page :auto-content-height="true">
|
<Page :auto-content-height="true">
|
||||||
<div class="flex h-full gap-[8px]">
|
<div class="flex h-full gap-[8px]">
|
||||||
<DpTree class="h-full w-[300px]" @checked="onNodeChecked" />
|
<div class="h-full tree-box">
|
||||||
|
<DpTree class="h-full w-[300px]" @checked="onNodeChecked" />
|
||||||
|
</div>
|
||||||
<div class="bg-background flex-1">
|
<div class="bg-background flex-1">
|
||||||
<div class="video-play-area flex h-full flex-wrap">
|
<div class="video-play-area flex h-full flex-wrap">
|
||||||
<div
|
<div
|
||||||
|
@@ -46,7 +46,7 @@ onMounted(loadChannelTree);
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="$attrs.class">
|
<div class="h-[800px]" :class="$attrs.class">
|
||||||
<Skeleton
|
<Skeleton
|
||||||
:loading="showTreeSkeleton"
|
:loading="showTreeSkeleton"
|
||||||
:paragraph="{ rows: 8 }"
|
:paragraph="{ rows: 8 }"
|
||||||
@@ -54,12 +54,12 @@ onMounted(loadChannelTree);
|
|||||||
class="p-[8px]"
|
class="p-[8px]"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="bg-background flex h-full flex-col overflow-y-auto rounded-lg"
|
class="flex h-full flex-col overflow-y-auto rounded-lg"
|
||||||
>
|
>
|
||||||
<!-- 固定在顶部 必须加上bg-background背景色 否则会产生'穿透'效果 -->
|
<!-- 固定在顶部 必须加上bg-background背景色 否则会产生'穿透'效果 -->
|
||||||
<div
|
<divx
|
||||||
v-if="showSearch"
|
v-if="showSearch"
|
||||||
class="bg-background z-100 sticky left-0 top-0 p-[8px]"
|
class="z-100 sticky left-0 top-0 p-[8px]"
|
||||||
>
|
>
|
||||||
<InputSearch
|
<InputSearch
|
||||||
v-model:value="searchValue"
|
v-model:value="searchValue"
|
||||||
@@ -72,7 +72,7 @@ onMounted(loadChannelTree);
|
|||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
</InputSearch>
|
</InputSearch>
|
||||||
</div>
|
</divx>
|
||||||
<div class="h-full overflow-x-hidden px-[8px]">
|
<div class="h-full overflow-x-hidden px-[8px]">
|
||||||
<Tree
|
<Tree
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
@@ -2,7 +2,12 @@
|
|||||||
<Page class="h-full w-full">
|
<Page class="h-full w-full">
|
||||||
<!-- 设备分组区域 -->
|
<!-- 设备分组区域 -->
|
||||||
<div class="flex h-full gap-[8px]">
|
<div class="flex h-full gap-[8px]">
|
||||||
<ChannelTree class="h-full w-[300px]" @check="onNodeChecked" />
|
<div class="h-full pb-[5px] c-tree bg-background">
|
||||||
|
<ChannelTree
|
||||||
|
class="w-[300px]"
|
||||||
|
@check="onNodeChecked"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 设备分组区域 -->
|
<!-- 设备分组区域 -->
|
||||||
<div class="bg-background flex-1">
|
<div class="bg-background flex-1">
|
||||||
@@ -287,13 +292,12 @@ function streamProxy(nodeData: any, cb: Function) {
|
|||||||
pwd: nodeData.devicePwd,
|
pwd: nodeData.devicePwd,
|
||||||
channelId: nodeData.channelNo,
|
channelId: nodeData.channelNo,
|
||||||
};
|
};
|
||||||
|
}
|
||||||
if (isSupportH265) {
|
if (isSupportH265) {
|
||||||
addStreamProxy(params).then((res) => cb(res));
|
addStreamProxy(params).then((res) => cb(res));
|
||||||
} else {
|
} else {
|
||||||
// addFFmpegStreamProxy(params).then((res) => cb(res));
|
addFFmpegStreamProxy(params).then((res) => cb(res));
|
||||||
addStreamProxy(params).then((res) => cb(res));
|
// addStreamProxy(params).then((res) => cb(res));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,7 +310,7 @@ function doPlayer(nodeData: any, index: number = 0) {
|
|||||||
console.log('index=', index);
|
console.log('index=', index);
|
||||||
if (mpegts.isSupported()) {
|
if (mpegts.isSupported()) {
|
||||||
streamProxy(nodeData, (res: AddStreamProxyResult) => {
|
streamProxy(nodeData, (res: AddStreamProxyResult) => {
|
||||||
const url = res.flv;
|
const url = res.wsFlv;
|
||||||
// 将url 绑定到 nodeData
|
// 将url 绑定到 nodeData
|
||||||
nodeData.url = url;
|
nodeData.url = url;
|
||||||
closePlayer(index);
|
closePlayer(index);
|
||||||
|
@@ -92,10 +92,6 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
field: 'createTime',
|
field: 'createTime',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '创建人',
|
|
||||||
field: 'createBy',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
|
@@ -5,7 +5,7 @@ import { Descriptions, DescriptionsItem, Image, Tag } from 'ant-design-vue';
|
|||||||
import { queryAlarmEventAttachmentsList } from '#/api/sis/alarmEventAttachments';
|
import { queryAlarmEventAttachmentsList } from '#/api/sis/alarmEventAttachments';
|
||||||
import type { AlarmEventAttachmentsVO } from '#/api/sis/alarmEventAttachments/model';
|
import type { AlarmEventAttachmentsVO } from '#/api/sis/alarmEventAttachments/model';
|
||||||
import { fallImg } from './data';
|
import { fallImg } from './data';
|
||||||
import { alarmEventProcessList } from '#/api/sis/alarmEventProcess';
|
import {alarmEventProcessList, queryResult} from '#/api/sis/alarmEventProcess';
|
||||||
import type { AlarmEventProcessVO } from '#/api/sis/alarmEventProcess/model';
|
import type { AlarmEventProcessVO } from '#/api/sis/alarmEventProcess/model';
|
||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
@@ -34,6 +34,8 @@ async function handleOpenChange(open: boolean) {
|
|||||||
}
|
}
|
||||||
// 加载事件附件信息
|
// 加载事件附件信息
|
||||||
currFiles.value = await queryAlarmEventAttachmentsList(id);
|
currFiles.value = await queryAlarmEventAttachmentsList(id);
|
||||||
|
const d = await queryResult(id)
|
||||||
|
console.log(d)
|
||||||
// 加载处理流程
|
// 加载处理流程
|
||||||
loadProcessList();
|
loadProcessList();
|
||||||
modalApi.modalLoading(false);
|
modalApi.modalLoading(false);
|
||||||
@@ -123,7 +125,7 @@ function loadProcessList() {
|
|||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
|
||||||
<DescriptionsItem label="处理时间" :span="2">
|
<DescriptionsItem label="处理时间" :span="2">
|
||||||
{{ warningDetail.processingTime || '-' }}
|
{{ warningDetail.solveTime || '-' }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
|
||||||
<DescriptionsItem :span="1" label="附件信息">
|
<DescriptionsItem :span="1" label="附件信息">
|
||||||
|
@@ -92,10 +92,6 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
field: 'createTime',
|
field: 'createTime',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '创建人',
|
|
||||||
field: 'createBy',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
|
@@ -113,18 +113,18 @@ function loadProcessList() {
|
|||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
|
||||||
<DescriptionsItem label="处理状态">
|
<DescriptionsItem label="处理状态">
|
||||||
<Tag>
|
<Tag color="processing">
|
||||||
{{ warningDetail.stateName }}
|
{{ warningDetail.stateName }}
|
||||||
</Tag>
|
</Tag>
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
|
||||||
<DescriptionsItem label="处理情况" :span="2">
|
<!-- <DescriptionsItem label="处理情况" :span="2">
|
||||||
{{ warningDetail.processingDetails || '-' }}
|
{{ warningDetail.processingDetails || '-' }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
|
||||||
<DescriptionsItem label="处理时间" :span="2">
|
<DescriptionsItem label="处理时间" :span="2">
|
||||||
{{ warningDetail.processingTime || '-' }}
|
{{ warningDetail.processingTime || '-' }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>-->
|
||||||
|
|
||||||
<DescriptionsItem :span="1" label="附件信息">
|
<DescriptionsItem :span="1" label="附件信息">
|
||||||
<div class="file-box">
|
<div class="file-box">
|
||||||
|
@@ -93,10 +93,6 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
field: 'createTime',
|
field: 'createTime',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '处理人',
|
|
||||||
field: 'solveName',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
|
@@ -113,19 +113,11 @@ function loadProcessList() {
|
|||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
|
||||||
<DescriptionsItem label="处理状态">
|
<DescriptionsItem label="处理状态">
|
||||||
<Tag>
|
<Tag color="success">
|
||||||
{{ warningDetail.stateName }}
|
{{ warningDetail.stateName }}
|
||||||
</Tag>
|
</Tag>
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
|
||||||
<DescriptionsItem label="处理情况" :span="2">
|
|
||||||
{{ warningDetail.processingDetails || '-' }}
|
|
||||||
</DescriptionsItem>
|
|
||||||
|
|
||||||
<DescriptionsItem label="处理时间" :span="2">
|
|
||||||
{{ warningDetail.processingTime || '-' }}
|
|
||||||
</DescriptionsItem>
|
|
||||||
|
|
||||||
<DescriptionsItem :span="1" label="附件信息">
|
<DescriptionsItem :span="1" label="附件信息">
|
||||||
<div class="file-box">
|
<div class="file-box">
|
||||||
<div class="img-box" v-for="item in currFiles">
|
<div class="img-box" v-for="item in currFiles">
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
演示站专用目录 可直接删除该目录
|
|
@@ -1,26 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
import { MarkdownPreviewer, Page } from '@vben/common-ui';
|
|
||||||
|
|
||||||
import { Spin } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import changelog from '../../../../../../CHANGELOG.md?raw';
|
|
||||||
|
|
||||||
const content = ref(changelog);
|
|
||||||
|
|
||||||
const loading = ref(true);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page :auto-content-height="true">
|
|
||||||
<Spin :spinning="loading" tip="加载markdown中...">
|
|
||||||
<MarkdownPreviewer
|
|
||||||
v-model:value="content"
|
|
||||||
height="100%"
|
|
||||||
class="min-h-[50vh]"
|
|
||||||
@mounted="loading = false"
|
|
||||||
/>
|
|
||||||
</Spin>
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -1,27 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { MenuOption } from '#/api/system/menu/model';
|
|
||||||
|
|
||||||
import { roleMenuTreeSelect } from '#/api/system/menu';
|
|
||||||
import { MenuSelectTable } from '#/components/tree';
|
|
||||||
import { Page } from '@vben/common-ui';
|
|
||||||
import { onMounted, ref, shallowRef } from 'vue';
|
|
||||||
|
|
||||||
const checkedKeys = ref<number[]>([]);
|
|
||||||
const menus = shallowRef<MenuOption[]>([]);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
const resp = await roleMenuTreeSelect(3);
|
|
||||||
menus.value = resp.menus;
|
|
||||||
checkedKeys.value = resp.checkedKeys;
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page :auto-content-height="true">
|
|
||||||
<MenuSelectTable
|
|
||||||
:menus="menus"
|
|
||||||
v-model:checked-keys="checkedKeys"
|
|
||||||
:association="true"
|
|
||||||
/>
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -1,17 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
|
|
||||||
import { JsonPreview, Page } from '@vben/common-ui';
|
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const query = route.query;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page>
|
|
||||||
<div class="bg-background rounded-lg p-4">
|
|
||||||
<span>当前参数:</span>
|
|
||||||
<JsonPreview :data="query" />
|
|
||||||
</div>
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -1,26 +0,0 @@
|
|||||||
import { requestClient } from '#/api/request';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/system/sse/list',
|
|
||||||
send = '/system/sse/send',
|
|
||||||
sendAll = '/system/sse/sendAll',
|
|
||||||
status = '/system/sse/status',
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sseStatus() {
|
|
||||||
return requestClient.get<boolean>(Api.status);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sseSendAll(message: string) {
|
|
||||||
return requestClient.postWithMsg<void>(`${Api.sendAll}?message=${message}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sseSendByUserId(userId: string, message: string) {
|
|
||||||
return requestClient.postWithMsg<void>(
|
|
||||||
`${Api.send}/${userId}?message=${message}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sseList() {
|
|
||||||
return requestClient.get<any>(Api.list);
|
|
||||||
}
|
|
@@ -1,103 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
|
||||||
|
|
||||||
import { Space } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
import { sseList } from './api';
|
|
||||||
import sendMsgModal from './send-msg-modal.vue';
|
|
||||||
|
|
||||||
const gridOptions: VxeGridProps = {
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '用户ID',
|
|
||||||
field: 'userId',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '用户账号',
|
|
||||||
field: 'userName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '用户昵称',
|
|
||||||
field: 'nickName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '用户部门',
|
|
||||||
field: 'deptName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'action',
|
|
||||||
fixed: 'right',
|
|
||||||
slots: { default: 'action' },
|
|
||||||
title: '操作',
|
|
||||||
resizable: false,
|
|
||||||
width: 'auto',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
height: 'auto',
|
|
||||||
keepSource: true,
|
|
||||||
pagerConfig: {},
|
|
||||||
proxyConfig: {
|
|
||||||
ajax: {
|
|
||||||
query: async () => {
|
|
||||||
const list = await sseList();
|
|
||||||
return {
|
|
||||||
rows: list,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rowConfig: {
|
|
||||||
isHover: false,
|
|
||||||
keyField: 'userId',
|
|
||||||
height: 48,
|
|
||||||
},
|
|
||||||
id: 'sse-index',
|
|
||||||
};
|
|
||||||
|
|
||||||
const [BasicTable] = useVbenVxeGrid({
|
|
||||||
gridOptions,
|
|
||||||
});
|
|
||||||
|
|
||||||
const [SendMsgModal, modalApi] = useVbenModal({
|
|
||||||
connectedComponent: sendMsgModal,
|
|
||||||
});
|
|
||||||
|
|
||||||
function handleSendAll() {
|
|
||||||
modalApi.setData({});
|
|
||||||
modalApi.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSendSingle(userId: string) {
|
|
||||||
modalApi.setData({ userId });
|
|
||||||
modalApi.open();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page
|
|
||||||
:auto-content-height="true"
|
|
||||||
description="这这里可以进行[Server-sent events]测试 非官方功能"
|
|
||||||
title="SSE测试"
|
|
||||||
>
|
|
||||||
<BasicTable>
|
|
||||||
<template #toolbar-actions>
|
|
||||||
<span class="pl-[7px] text-[16px]">在线用户列表</span>
|
|
||||||
</template>
|
|
||||||
<template #toolbar-tools>
|
|
||||||
<Space>
|
|
||||||
<a-button @click="handleSendAll">发送全体消息</a-button>
|
|
||||||
</Space>
|
|
||||||
</template>
|
|
||||||
<template #action="{ row }">
|
|
||||||
<ghost-button @click="handleSendSingle(row.userId)">
|
|
||||||
发送消息
|
|
||||||
</ghost-button>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<SendMsgModal />
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -1,77 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { computed, ref } from 'vue';
|
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
|
||||||
|
|
||||||
import { sseSendAll, sseSendByUserId } from './api';
|
|
||||||
|
|
||||||
const currentUserId = ref<string | undefined>(undefined);
|
|
||||||
const title = computed(() => {
|
|
||||||
return currentUserId.value ? '发送指定消息' : '发送全体消息';
|
|
||||||
});
|
|
||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
|
||||||
onConfirm: handleSubmit,
|
|
||||||
onOpenChange: (isOpen) => {
|
|
||||||
if (!isOpen) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const data = modalApi.getData() as { userId: string | undefined };
|
|
||||||
currentUserId.value = data.userId;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [BasicForm, formApi] = useVbenForm({
|
|
||||||
layout: 'vertical',
|
|
||||||
commonConfig: {
|
|
||||||
formItemClass: 'col-span-2',
|
|
||||||
componentProps: {
|
|
||||||
class: 'w-full',
|
|
||||||
},
|
|
||||||
labelWidth: 80,
|
|
||||||
},
|
|
||||||
schema: [
|
|
||||||
{
|
|
||||||
component: 'Textarea',
|
|
||||||
label: '消息内容',
|
|
||||||
fieldName: 'content',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
showDefaultActions: false,
|
|
||||||
wrapperClass: 'grid-cols-2',
|
|
||||||
});
|
|
||||||
|
|
||||||
async function handleSubmit() {
|
|
||||||
try {
|
|
||||||
modalApi.modalLoading(true);
|
|
||||||
|
|
||||||
const { valid } = await formApi.validate();
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const { content } = await formApi.getValues();
|
|
||||||
|
|
||||||
await (currentUserId.value
|
|
||||||
? sseSendByUserId(currentUserId.value, content)
|
|
||||||
: sseSendAll(content));
|
|
||||||
modalApi.close();
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
} finally {
|
|
||||||
modalApi.modalLoading(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<BasicModal
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
:fullscreen-button="false"
|
|
||||||
:title="title"
|
|
||||||
>
|
|
||||||
<BasicForm />
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
@@ -1,24 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
import { Page } from '@vben/common-ui';
|
|
||||||
|
|
||||||
import { Switch } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import { Tinymce } from '#/components/tinymce';
|
|
||||||
|
|
||||||
const readonly = ref(false);
|
|
||||||
const content = ref('');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page title="Tinymce富文本">
|
|
||||||
<div class="flex flex-col gap-[16px]">
|
|
||||||
<div class="flex items-center gap-[16px]">
|
|
||||||
<span>禁用</span>
|
|
||||||
<Switch v-model:checked="readonly" />
|
|
||||||
</div>
|
|
||||||
<Tinymce v-model="content" :height="800" :disabled="readonly" />
|
|
||||||
</div>
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -1,32 +0,0 @@
|
|||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
export function useImageType() {
|
|
||||||
const imageListTypes = ['text', 'picture', 'picture-card'] as const;
|
|
||||||
const imageListOptions = imageListTypes.map((str) => ({
|
|
||||||
label: str,
|
|
||||||
value: str,
|
|
||||||
}));
|
|
||||||
|
|
||||||
const currentImageListType =
|
|
||||||
ref<(typeof imageListTypes)[number]>('picture-card');
|
|
||||||
|
|
||||||
return {
|
|
||||||
imageListOptions,
|
|
||||||
currentImageListType,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function useFileType() {
|
|
||||||
const fileListTypes = ['text', 'picture'] as const;
|
|
||||||
const fileListOptions = fileListTypes.map((str) => ({
|
|
||||||
label: str,
|
|
||||||
value: str,
|
|
||||||
}));
|
|
||||||
|
|
||||||
const currentFileListType = ref<(typeof fileListTypes)[number]>('picture');
|
|
||||||
|
|
||||||
return {
|
|
||||||
fileListOptions,
|
|
||||||
currentFileListType,
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,236 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { UploadFile } from 'ant-design-vue/es/upload/interface';
|
|
||||||
|
|
||||||
import type { CustomGetter } from '#/components/upload/src/props';
|
|
||||||
|
|
||||||
import { h, ref } from 'vue';
|
|
||||||
|
|
||||||
import { CodeMirror, Page, useVbenModal } from '@vben/common-ui';
|
|
||||||
|
|
||||||
import { useClipboard } from '@vueuse/core';
|
|
||||||
import { Alert, Card, Modal, RadioGroup, Switch } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import { FileUpload, ImageUpload } from '#/components/upload';
|
|
||||||
|
|
||||||
import { useFileType, useImageType } from './hook';
|
|
||||||
import sql from './insert.sql?raw';
|
|
||||||
import uploadModal from './upload-modal.vue';
|
|
||||||
|
|
||||||
const singleImageId = ref('1905537674682916865');
|
|
||||||
const singleFileId = ref('1905191167882518529');
|
|
||||||
const multipleImageId = ref<string[]>(['1905537674682916865']);
|
|
||||||
const multipleFileId = ref<string[]>(['1905191167882518529']);
|
|
||||||
|
|
||||||
function handlePreview(file: UploadFile) {
|
|
||||||
Modal.info({
|
|
||||||
content: h('div', { class: 'break-all' }, JSON.stringify(file, null, 2)),
|
|
||||||
maskClosable: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function customAccept(accept: string) {
|
|
||||||
return accept
|
|
||||||
.split(',')
|
|
||||||
.map((str) => str.toUpperCase())
|
|
||||||
.join(',');
|
|
||||||
}
|
|
||||||
|
|
||||||
const showComponent = ref(true);
|
|
||||||
|
|
||||||
const { imageListOptions, currentImageListType } = useImageType();
|
|
||||||
const { fileListOptions, currentFileListType } = useFileType();
|
|
||||||
|
|
||||||
const customName: CustomGetter<string> = (cb) => {
|
|
||||||
if (cb.type === 'info') {
|
|
||||||
return `加上自定义前缀显示 - ${cb.response.originalName.toUpperCase()}`;
|
|
||||||
}
|
|
||||||
return `加上自定义前缀显示 - ${cb.response.fileName.toUpperCase()}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
const customThumbnailUrl: CustomGetter<undefined> = () => {
|
|
||||||
return 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp';
|
|
||||||
};
|
|
||||||
|
|
||||||
const { copy } = useClipboard({ legacy: true });
|
|
||||||
|
|
||||||
const animationEnable = ref(false);
|
|
||||||
|
|
||||||
const [UploadModal, uploadModalApi] = useVbenModal({
|
|
||||||
connectedComponent: uploadModal,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page>
|
|
||||||
<Card class="mb-2" title="提示" size="small">
|
|
||||||
本地想体验可以导入这个sql(mysql的 其他的自行处理或者手动从菜单添加)
|
|
||||||
<a-button size="small" @click="copy(sql)">复制</a-button>
|
|
||||||
<CodeMirror class="mt-2" v-model="sql" language="sql" readonly />
|
|
||||||
</Card>
|
|
||||||
<div class="grid grid-cols-2 gap-4">
|
|
||||||
<Card title="表单上传">
|
|
||||||
<a-button @click="uploadModalApi.open()">打开</a-button>
|
|
||||||
<UploadModal />
|
|
||||||
</Card>
|
|
||||||
<Card title="单上传, 会绑定为string" size="small">
|
|
||||||
<ImageUpload v-model:value="singleImageId" />
|
|
||||||
当前绑定值: {{ singleImageId }}
|
|
||||||
|
|
||||||
<FileUpload class="mt-6" v-model:value="singleFileId" />
|
|
||||||
当前绑定值: {{ singleFileId }}
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="多上传, maxCount参数控制(开启深度监听)" size="small">
|
|
||||||
<ImageUpload
|
|
||||||
v-model:value="multipleImageId"
|
|
||||||
:max-count="3"
|
|
||||||
:deep-watch="true"
|
|
||||||
/>
|
|
||||||
当前绑定值: {{ multipleImageId }}
|
|
||||||
|
|
||||||
<FileUpload
|
|
||||||
class="mt-6"
|
|
||||||
v-model:value="multipleFileId"
|
|
||||||
:max-count="3"
|
|
||||||
:deep-watch="true"
|
|
||||||
/>
|
|
||||||
当前绑定值: {{ multipleFileId }}
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="文件自定义预览逻辑" size="small">
|
|
||||||
<Alert
|
|
||||||
message="你可以自定义预览逻辑, 比如改为下载, 回调参数为文件信息"
|
|
||||||
class="my-2"
|
|
||||||
/>
|
|
||||||
<FileUpload
|
|
||||||
v-model:value="multipleFileId"
|
|
||||||
:max-count="3"
|
|
||||||
:preview="handlePreview"
|
|
||||||
:help-message="false"
|
|
||||||
/>
|
|
||||||
<ImageUpload
|
|
||||||
class="mt-6"
|
|
||||||
v-model:value="multipleImageId"
|
|
||||||
:max-count="3"
|
|
||||||
:preview="handlePreview"
|
|
||||||
:help-message="false"
|
|
||||||
/>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="文件/图片拖拽上传" size="small">
|
|
||||||
<FileUpload
|
|
||||||
v-model:value="multipleFileId"
|
|
||||||
:max-count="3"
|
|
||||||
:enable-drag-upload="true"
|
|
||||||
/>
|
|
||||||
<ImageUpload
|
|
||||||
class="mt-6"
|
|
||||||
v-model:value="multipleImageId"
|
|
||||||
:enable-drag-upload="true"
|
|
||||||
:max-count="6"
|
|
||||||
/>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="禁用上传" size="small">
|
|
||||||
<ImageUpload :disabled="true" :max-count="3" :help-message="false" />
|
|
||||||
<FileUpload
|
|
||||||
class="mt-6"
|
|
||||||
:disabled="true"
|
|
||||||
:max-count="3"
|
|
||||||
:help-message="false"
|
|
||||||
/>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="文件夹上传/自定义helpMessage" size="small">
|
|
||||||
<FileUpload
|
|
||||||
v-model:value="multipleFileId"
|
|
||||||
:max-count="3"
|
|
||||||
:directory="true"
|
|
||||||
accept="*"
|
|
||||||
>
|
|
||||||
<template #helpMessage="slotProps">
|
|
||||||
<div class="mt-2 font-semibold text-green-500">
|
|
||||||
自定义helpMessage: {{ JSON.stringify(slotProps) }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</FileUpload>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="自定义accept显示" size="small">
|
|
||||||
<ImageUpload
|
|
||||||
v-model:value="singleImageId"
|
|
||||||
:accept-format="customAccept"
|
|
||||||
/>
|
|
||||||
<ImageUpload
|
|
||||||
class="mt-6"
|
|
||||||
v-model:value="singleImageId"
|
|
||||||
accept-format="自定义显示允许的文件类型"
|
|
||||||
/>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="默认在unMounted会取消上传" size="small">
|
|
||||||
<div>将开发者工具调整网络为3G 切换挂载/卸载 可见请求在卸载被取消</div>
|
|
||||||
挂载/卸载组件: <Switch v-model:checked="showComponent" />
|
|
||||||
<FileUpload v-if="showComponent" v-model:value="singleFileId" />
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="图片: listType控制上传样式" size="small">
|
|
||||||
<RadioGroup
|
|
||||||
v-model:value="currentImageListType"
|
|
||||||
:options="imageListOptions"
|
|
||||||
button-style="solid"
|
|
||||||
option-type="button"
|
|
||||||
/>
|
|
||||||
<ImageUpload
|
|
||||||
class="mt-2"
|
|
||||||
v-model:value="singleImageId"
|
|
||||||
:list-type="currentImageListType"
|
|
||||||
/>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="文件: listType控制上传样式" size="small">
|
|
||||||
<div class="mb-2 text-red-500">
|
|
||||||
注意文件上传不支持`picture-card`类型
|
|
||||||
</div>
|
|
||||||
<div class="mb-2 text-red-500">
|
|
||||||
注意不要中途切换list-type(应该仅作为初始化属性使用) 会导致样式计算问题
|
|
||||||
helpMessage和文件会重叠
|
|
||||||
</div>
|
|
||||||
<RadioGroup
|
|
||||||
v-model:value="currentFileListType"
|
|
||||||
:options="fileListOptions"
|
|
||||||
button-style="solid"
|
|
||||||
option-type="button"
|
|
||||||
/>
|
|
||||||
<FileUpload
|
|
||||||
class="mt-2"
|
|
||||||
v-model:value="singleFileId"
|
|
||||||
:list-type="currentFileListType"
|
|
||||||
/>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="自定义缩略图和文件名" size="small">
|
|
||||||
<FileUpload
|
|
||||||
v-model:value="multipleFileId"
|
|
||||||
:max-count="5"
|
|
||||||
list-type="picture"
|
|
||||||
:custom-filename="customName"
|
|
||||||
:custom-thumb-url="customThumbnailUrl"
|
|
||||||
/>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title="图片上传的动画效果" size="small">
|
|
||||||
<div class="my-2">
|
|
||||||
是否启用
|
|
||||||
<span class="font-semibold">list-type: picture-card</span> 的动画效果:
|
|
||||||
<Switch v-model:checked="animationEnable" />
|
|
||||||
</div>
|
|
||||||
<ImageUpload
|
|
||||||
v-model:value="singleImageId"
|
|
||||||
:with-animation="animationEnable"
|
|
||||||
/>
|
|
||||||
当前绑定值: {{ singleImageId }}
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -1 +0,0 @@
|
|||||||
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1905430203187712002, '文件上传Demo', 0, 1000, 'upload_test', '演示使用自行删除/upload/index', NULL, 1, 0, 'C', '0', '0', NULL, '#', 103, 1, '2025-03-28 09:22:16', 1, '2025-03-28 09:22:16', '');
|
|
@@ -1,70 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { h } from 'vue';
|
|
||||||
|
|
||||||
import { JsonPreview, useVbenModal } from '@vben/common-ui';
|
|
||||||
|
|
||||||
import { Modal, Space } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
|
||||||
|
|
||||||
const [BasicForm, formApi] = useVbenForm({
|
|
||||||
layout: 'vertical',
|
|
||||||
schema: [
|
|
||||||
{
|
|
||||||
label: '图片上传多图',
|
|
||||||
component: 'ImageUpload',
|
|
||||||
fieldName: 'ossIds',
|
|
||||||
componentProps: {
|
|
||||||
maxCount: 3,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '图片上传单图',
|
|
||||||
component: 'ImageUpload',
|
|
||||||
fieldName: 'ossId',
|
|
||||||
componentProps: {
|
|
||||||
maxCount: 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
showDefaultActions: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
async function getValues() {
|
|
||||||
try {
|
|
||||||
const v = await formApi.getValues();
|
|
||||||
console.log(v);
|
|
||||||
|
|
||||||
Modal.info({
|
|
||||||
content: () => h(JsonPreview, { data: v }),
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleAssign() {
|
|
||||||
const ids = ['1908761290673315841', '1907738568539332610'];
|
|
||||||
await formApi.setValues({
|
|
||||||
ossIds: ids,
|
|
||||||
ossId: ids[0],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const [BasicModal] = useVbenModal({
|
|
||||||
title: '上传',
|
|
||||||
footer: false,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<BasicModal>
|
|
||||||
<div class="flex flex-col">
|
|
||||||
<Space>
|
|
||||||
<a-button @click="handleAssign">赋值</a-button>
|
|
||||||
<a-button @click="getValues">获取值</a-button>
|
|
||||||
</Space>
|
|
||||||
<BasicForm />
|
|
||||||
</div>
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
@@ -1,32 +0,0 @@
|
|||||||
import { requestClient } from '#/api/request';
|
|
||||||
|
|
||||||
export interface Temp {
|
|
||||||
name: string;
|
|
||||||
value: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function visitList() {
|
|
||||||
return requestClient.get<Temp[]>('/monitor/logininfor/visitsMap');
|
|
||||||
}
|
|
||||||
|
|
||||||
export function deviceInfoList() {
|
|
||||||
return requestClient.get<Temp[]>('/monitor/logininfor/deviceInfoList');
|
|
||||||
}
|
|
||||||
|
|
||||||
export function browserInfoList() {
|
|
||||||
return requestClient.get<Temp[]>('/monitor/logininfor/browserInfoList');
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ispInfoList() {
|
|
||||||
return requestClient.get<Temp[]>('/monitor/logininfor/ispInfoList');
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface LoginLineResp {
|
|
||||||
date: string[];
|
|
||||||
fail: number[];
|
|
||||||
success: number[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export function loginLine() {
|
|
||||||
return requestClient.get<LoginLineResp>('/monitor/logininfor/loginLine');
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
|||||||
<script lang="ts" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
import { Tabs } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import Browser from './pages/browser.vue';
|
|
||||||
import Device from './pages/device.vue';
|
|
||||||
import Isp from './pages/isp.vue';
|
|
||||||
import LoginLine from './pages/loginLine.vue';
|
|
||||||
import VisitMap from './pages/map.vue';
|
|
||||||
|
|
||||||
const TabPane = Tabs.TabPane;
|
|
||||||
|
|
||||||
const activeKey = ref<number>(1);
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<div class="pt-[16px]">
|
|
||||||
<Tabs v-model:activeKey="activeKey" class="h-full" tab-position="left">
|
|
||||||
<TabPane :key="1" tab="访问量数据"> <VisitMap /> </TabPane>
|
|
||||||
<TabPane :key="2" tab="使用设备"><Device /></TabPane>
|
|
||||||
<TabPane :key="3" tab="使用浏览器"><Browser /></TabPane>
|
|
||||||
<TabPane :key="4" tab="登录量"><LoginLine /></TabPane>
|
|
||||||
<TabPane :key="5" tab="运营商占比"><Isp /></TabPane>
|
|
||||||
</Tabs>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
@@ -1,62 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { EChartsOption } from 'echarts';
|
|
||||||
|
|
||||||
// import * as echarts from 'echarts';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
|
|
||||||
import {
|
|
||||||
EchartsUI,
|
|
||||||
type EchartsUIType,
|
|
||||||
useEcharts,
|
|
||||||
} from '@vben/plugins/echarts';
|
|
||||||
|
|
||||||
import { browserInfoList } from '../api';
|
|
||||||
|
|
||||||
defineOptions({ name: 'Browser' });
|
|
||||||
|
|
||||||
const browserRef = ref<EchartsUIType>();
|
|
||||||
const { renderEcharts } = useEcharts(browserRef);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
const data = await browserInfoList();
|
|
||||||
const options: EChartsOption = {
|
|
||||||
legend: {
|
|
||||||
left: 'left',
|
|
||||||
orient: 'vertical',
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data,
|
|
||||||
emphasis: {
|
|
||||||
itemStyle: {
|
|
||||||
shadowBlur: 10,
|
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
|
||||||
shadowOffsetX: 0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// 百分比
|
|
||||||
label: {
|
|
||||||
formatter: '{b}: {c} - ({d}%)', // 自定义显示格式(b:name, c:value, d:百分比)
|
|
||||||
show: true,
|
|
||||||
},
|
|
||||||
radius: '50%',
|
|
||||||
type: 'pie',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
title: {
|
|
||||||
left: 'center',
|
|
||||||
text: '使用浏览器占比',
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
renderEcharts(options);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<EchartsUI ref="browserRef" height="720px" width="100%" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
@@ -1,62 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { EChartsOption } from 'echarts';
|
|
||||||
|
|
||||||
// import * as echarts from 'echarts';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
|
|
||||||
import {
|
|
||||||
EchartsUI,
|
|
||||||
type EchartsUIType,
|
|
||||||
useEcharts,
|
|
||||||
} from '@vben/plugins/echarts';
|
|
||||||
|
|
||||||
import { deviceInfoList } from '../api';
|
|
||||||
|
|
||||||
defineOptions({ name: 'Device' });
|
|
||||||
|
|
||||||
const deviceRef = ref<EchartsUIType>();
|
|
||||||
const { renderEcharts } = useEcharts(deviceRef);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
const data = await deviceInfoList();
|
|
||||||
const options: EChartsOption = {
|
|
||||||
legend: {
|
|
||||||
left: 'left',
|
|
||||||
orient: 'vertical',
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data,
|
|
||||||
emphasis: {
|
|
||||||
itemStyle: {
|
|
||||||
shadowBlur: 10,
|
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
|
||||||
shadowOffsetX: 0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// 百分比
|
|
||||||
label: {
|
|
||||||
formatter: '{b}: {c} - ({d}%)', // 自定义显示格式(b:name, c:value, d:百分比)
|
|
||||||
show: true,
|
|
||||||
},
|
|
||||||
radius: '50%',
|
|
||||||
type: 'pie',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
title: {
|
|
||||||
left: 'center',
|
|
||||||
text: '使用设备占比',
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
renderEcharts(options);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<EchartsUI ref="deviceRef" height="720px" width="100%" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
@@ -1,62 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { EChartsOption } from 'echarts';
|
|
||||||
|
|
||||||
// import * as echarts from 'echarts';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
|
|
||||||
import {
|
|
||||||
EchartsUI,
|
|
||||||
type EchartsUIType,
|
|
||||||
useEcharts,
|
|
||||||
} from '@vben/plugins/echarts';
|
|
||||||
|
|
||||||
import { ispInfoList } from '../api';
|
|
||||||
|
|
||||||
defineOptions({ name: 'Isp' });
|
|
||||||
|
|
||||||
const ispRef = ref<EchartsUIType>();
|
|
||||||
const { renderEcharts } = useEcharts(ispRef);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
const data = await ispInfoList();
|
|
||||||
const options: EChartsOption = {
|
|
||||||
legend: {
|
|
||||||
left: 'left',
|
|
||||||
orient: 'vertical',
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data,
|
|
||||||
emphasis: {
|
|
||||||
itemStyle: {
|
|
||||||
shadowBlur: 10,
|
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
|
||||||
shadowOffsetX: 0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// 百分比
|
|
||||||
label: {
|
|
||||||
formatter: '{b}: {c} - ({d}%)', // 自定义显示格式(b:name, c:value, d:百分比)
|
|
||||||
show: true,
|
|
||||||
},
|
|
||||||
radius: '50%',
|
|
||||||
type: 'pie',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
title: {
|
|
||||||
left: 'center',
|
|
||||||
text: '网络运营商占比',
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
renderEcharts(options);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<EchartsUI ref="ispRef" height="720px" width="100%" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
@@ -1,83 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { EChartsOption } from 'echarts';
|
|
||||||
|
|
||||||
// import * as echarts from 'echarts';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
|
|
||||||
import {
|
|
||||||
EchartsUI,
|
|
||||||
type EchartsUIType,
|
|
||||||
useEcharts,
|
|
||||||
} from '@vben/plugins/echarts';
|
|
||||||
|
|
||||||
import { loginLine } from '../api';
|
|
||||||
|
|
||||||
defineOptions({ name: 'LoginLine' });
|
|
||||||
|
|
||||||
const loginLineRef = ref<EchartsUIType>();
|
|
||||||
const { renderEcharts } = useEcharts(loginLineRef);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
const data = await loginLine();
|
|
||||||
console.log(data);
|
|
||||||
const options: EChartsOption = {
|
|
||||||
legend: {},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data: data.success,
|
|
||||||
itemStyle: {
|
|
||||||
color: '#3399CC',
|
|
||||||
},
|
|
||||||
lineStyle: {
|
|
||||||
color: '#3399CC',
|
|
||||||
},
|
|
||||||
name: '登录成功',
|
|
||||||
type: 'line',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
data: data.fail,
|
|
||||||
itemStyle: {
|
|
||||||
color: '#CC6633',
|
|
||||||
},
|
|
||||||
lineStyle: {
|
|
||||||
color: '#CC6633',
|
|
||||||
},
|
|
||||||
name: '登录失败',
|
|
||||||
type: 'line',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
title: {
|
|
||||||
text: '近一月登录量统计',
|
|
||||||
},
|
|
||||||
toolbox: {
|
|
||||||
feature: {
|
|
||||||
dataView: { readOnly: true },
|
|
||||||
dataZoom: {
|
|
||||||
yAxisIndex: 'none',
|
|
||||||
},
|
|
||||||
magicType: { type: ['line', 'bar'] },
|
|
||||||
saveAsImage: {},
|
|
||||||
},
|
|
||||||
show: true,
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
boundaryGap: false,
|
|
||||||
data: data.date,
|
|
||||||
type: 'category',
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
renderEcharts(options);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<EchartsUI ref="loginLineRef" height="720px" width="100%" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
@@ -1,111 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { EChartsOption } from 'echarts';
|
|
||||||
|
|
||||||
// import * as echarts from 'echarts';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
|
|
||||||
import {
|
|
||||||
EchartsUI,
|
|
||||||
type EchartsUIType,
|
|
||||||
useEcharts,
|
|
||||||
} from '@vben/plugins/echarts';
|
|
||||||
|
|
||||||
import * as echarts from 'echarts/core';
|
|
||||||
|
|
||||||
import { type Temp, visitList } from '../api';
|
|
||||||
import * as chinaMap from '../china.json';
|
|
||||||
|
|
||||||
defineOptions({ name: 'VisitMap' });
|
|
||||||
|
|
||||||
const mapRef = ref<EchartsUIType>();
|
|
||||||
const { renderEcharts } = useEcharts(mapRef);
|
|
||||||
|
|
||||||
function transformData(data: Temp[]) {
|
|
||||||
const nameList: string[] = chinaMap.features.map(
|
|
||||||
(item) => item.properties.name,
|
|
||||||
);
|
|
||||||
// eslint-disable-next-line unicorn/prefer-set-has
|
|
||||||
const dataNameList: string[] = data.map((item) => item.name);
|
|
||||||
// 差集
|
|
||||||
const diff = nameList.filter(
|
|
||||||
(item) => !dataNameList.includes(item) && item.trim() !== '',
|
|
||||||
);
|
|
||||||
diff.forEach((name) => {
|
|
||||||
data.push({
|
|
||||||
name,
|
|
||||||
value: 0,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
echarts.registerMap('china', chinaMap as any);
|
|
||||||
const data = await visitList();
|
|
||||||
transformData(data);
|
|
||||||
const max = Math.max.apply(
|
|
||||||
null,
|
|
||||||
data.map((item) => item.value),
|
|
||||||
);
|
|
||||||
const options: EChartsOption = {
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data,
|
|
||||||
emphasis: {
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
// formatter: '{b}\n{c}',
|
|
||||||
formatter: '{c}',
|
|
||||||
position: 'inside',
|
|
||||||
show: true,
|
|
||||||
},
|
|
||||||
map: 'china',
|
|
||||||
roam: true,
|
|
||||||
// 由于缩放 这里加上偏移
|
|
||||||
top: 200,
|
|
||||||
type: 'map',
|
|
||||||
zoom: 1.5,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
title: {
|
|
||||||
left: 'right',
|
|
||||||
text: '用户访问量数据',
|
|
||||||
},
|
|
||||||
toolbox: {
|
|
||||||
feature: {
|
|
||||||
dataView: { readOnly: true },
|
|
||||||
saveAsImage: {},
|
|
||||||
},
|
|
||||||
// orient: 'vertical',
|
|
||||||
left: 'left',
|
|
||||||
show: true,
|
|
||||||
top: 'top',
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
formatter: '{b}<br/>{c}',
|
|
||||||
showDelay: 0,
|
|
||||||
transitionDuration: 0.2,
|
|
||||||
trigger: 'item',
|
|
||||||
},
|
|
||||||
visualMap: {
|
|
||||||
calculable: true,
|
|
||||||
inRange: {
|
|
||||||
color: ['#ffffff', '#00FF66', '#00CCFF', '#CC6600'],
|
|
||||||
},
|
|
||||||
left: 'left',
|
|
||||||
max,
|
|
||||||
min: 0,
|
|
||||||
text: ['最高', '最低'],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
renderEcharts(options);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<EchartsUI ref="mapRef" height="720px" width="100%" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
@@ -1,229 +0,0 @@
|
|||||||
<script setup lang="tsx">
|
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
import { nextTick, onMounted } from 'vue';
|
|
||||||
|
|
||||||
import { JsonPreview } from '@vben/common-ui';
|
|
||||||
import { getPopupContainer } from '@vben/utils';
|
|
||||||
|
|
||||||
import {
|
|
||||||
Button,
|
|
||||||
Input,
|
|
||||||
InputNumber,
|
|
||||||
message,
|
|
||||||
Modal,
|
|
||||||
Select,
|
|
||||||
Space,
|
|
||||||
} from 'ant-design-vue';
|
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
const gridOptions: VxeGridProps = {
|
|
||||||
editConfig: {
|
|
||||||
// 触发编辑的方式
|
|
||||||
trigger: 'click',
|
|
||||||
// 触发编辑的模式
|
|
||||||
mode: 'row',
|
|
||||||
showStatus: true,
|
|
||||||
},
|
|
||||||
border: true,
|
|
||||||
rowConfig: {
|
|
||||||
drag: true,
|
|
||||||
},
|
|
||||||
checkboxConfig: {},
|
|
||||||
editRules: {
|
|
||||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
|
||||||
age: [
|
|
||||||
{ required: true, message: '请输入年龄', trigger: 'blur' },
|
|
||||||
{ min: 0, max: 200, message: '年龄必须为1-200' },
|
|
||||||
],
|
|
||||||
job: [{ required: true, message: '请选择工作', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
type: 'checkbox',
|
|
||||||
width: 60,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dragSort: true,
|
|
||||||
title: '排序',
|
|
||||||
width: 60,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'name',
|
|
||||||
title: '姓名',
|
|
||||||
align: 'left',
|
|
||||||
editRender: {},
|
|
||||||
slots: {
|
|
||||||
default: ({ row }) => {
|
|
||||||
if (!row.name) {
|
|
||||||
return <span class="text-red-500">未填写</span>;
|
|
||||||
}
|
|
||||||
return <span>{row.name}</span>;
|
|
||||||
},
|
|
||||||
edit: ({ row }) => {
|
|
||||||
return <Input placeholder={'请输入'} v-model:value={row.name} />;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'age',
|
|
||||||
title: '年龄',
|
|
||||||
align: 'left',
|
|
||||||
editRender: {},
|
|
||||||
slots: {
|
|
||||||
default: ({ row }) => {
|
|
||||||
if (!row.age) {
|
|
||||||
return <span class="text-red-500">未填写</span>;
|
|
||||||
}
|
|
||||||
return <span>{row.age}</span>;
|
|
||||||
},
|
|
||||||
edit: ({ row }) => {
|
|
||||||
return (
|
|
||||||
<InputNumber
|
|
||||||
class="w-full"
|
|
||||||
placeholder={'请输入'}
|
|
||||||
v-model:value={row.age}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: '工作',
|
|
||||||
title: 'job',
|
|
||||||
align: 'left',
|
|
||||||
editRender: {},
|
|
||||||
slots: {
|
|
||||||
default: ({ row }) => {
|
|
||||||
if (!row.job) {
|
|
||||||
return <span class="text-red-500">未选择</span>;
|
|
||||||
}
|
|
||||||
return <span>{row.job}</span>;
|
|
||||||
},
|
|
||||||
edit: ({ row }) => {
|
|
||||||
const options = ['前端佬', '后端佬', '组长'].map((item) => ({
|
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
}));
|
|
||||||
return (
|
|
||||||
<Select
|
|
||||||
class="w-full"
|
|
||||||
getPopupContainer={getPopupContainer}
|
|
||||||
options={options}
|
|
||||||
placeholder={'请选择'}
|
|
||||||
v-model:value={row.job}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'action',
|
|
||||||
title: '操作',
|
|
||||||
width: 100,
|
|
||||||
slots: {
|
|
||||||
default: ({ $table, row }) => {
|
|
||||||
function handleDelete() {
|
|
||||||
$table.remove(row);
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<Button danger={true} onClick={handleDelete} size={'small'}>
|
|
||||||
删除
|
|
||||||
</Button>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
height: 'auto',
|
|
||||||
keepSource: true,
|
|
||||||
pagerConfig: {
|
|
||||||
enabled: false,
|
|
||||||
},
|
|
||||||
proxyConfig: {
|
|
||||||
enabled: false,
|
|
||||||
},
|
|
||||||
toolbarConfig: {
|
|
||||||
enabled: false,
|
|
||||||
},
|
|
||||||
showOverflow: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
|
||||||
gridOptions,
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
const data = [
|
|
||||||
{
|
|
||||||
name: '张三',
|
|
||||||
age: 18,
|
|
||||||
job: '前端佬',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '李四',
|
|
||||||
age: 19,
|
|
||||||
job: '后端佬',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '王五',
|
|
||||||
age: 20,
|
|
||||||
job: '组长',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
await nextTick();
|
|
||||||
await tableApi.grid.loadData(data);
|
|
||||||
});
|
|
||||||
async function handleAdd() {
|
|
||||||
const record = { name: '', age: undefined, job: undefined };
|
|
||||||
const { row: newRow } = await tableApi.grid.insert(record);
|
|
||||||
await tableApi.grid.setEditCell(newRow, 'name');
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleRemove() {
|
|
||||||
await tableApi.grid.removeCheckboxRow();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleValidate() {
|
|
||||||
const result = await tableApi.grid.validate(true);
|
|
||||||
if (result) {
|
|
||||||
message.error('校验失败');
|
|
||||||
} else {
|
|
||||||
message.success('校验成功');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getData() {
|
|
||||||
const data = tableApi.grid.getTableData();
|
|
||||||
const { fullData } = data;
|
|
||||||
console.log(fullData);
|
|
||||||
Modal.info({
|
|
||||||
title: '提示',
|
|
||||||
content: (
|
|
||||||
<div class="max-h-[350px] overflow-y-auto">
|
|
||||||
<JsonPreview data={fullData} />
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<BasicTable>
|
|
||||||
<template #toolbar-tools>
|
|
||||||
<Space>
|
|
||||||
<a-button @click="getData">获取表格数据</a-button>
|
|
||||||
<a-button @click="handleValidate">校验</a-button>
|
|
||||||
<a-button danger @click="handleRemove"> 删除勾选 </a-button>
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
v-access:code="['system:config:add']"
|
|
||||||
@click="handleAdd"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.add') }}
|
|
||||||
</a-button>
|
|
||||||
</Space>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</template>
|
|
@@ -1,17 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { Page } from '@vben/common-ui';
|
|
||||||
|
|
||||||
import { Card } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import EditTable from './edit-table.vue';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page>
|
|
||||||
<div class="flex flex-col gap-4">
|
|
||||||
<Card title="可编辑表格" size="small">
|
|
||||||
<EditTable class="h-[500px]" />
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
File diff suppressed because one or more lines are too long
@@ -1,23 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { Page } from '@vben/common-ui';
|
|
||||||
|
|
||||||
import { Image } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import wechatGroupImg from './img-base64.txt?raw';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Page>
|
|
||||||
<div class="flex w-[360px] flex-col gap-2">
|
|
||||||
<!-- <Alert :show-icon="true" message="人数已满,需要手动拉人" type="info" /> -->
|
|
||||||
<div>
|
|
||||||
<Image
|
|
||||||
:preview="false"
|
|
||||||
:src="wechatGroupImg"
|
|
||||||
:width="240"
|
|
||||||
class="pointer-events-none select-none"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Page>
|
|
||||||
</template>
|
|
@@ -27,8 +27,7 @@ export default defineConfig(async () => {
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: 'http://127.0.0.1:8080',
|
target: 'http://localhost:8080',
|
||||||
// target: 'http://183.230.235.66:11010/api',
|
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user