新增前端vue
This commit is contained in:
48
web-vue/packages/test/api/test/testData.ts
Normal file
48
web-vue/packages/test/api/test/testData.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* @author ThinkGem
|
||||
*/
|
||||
import { defHttp } from '@jeesite/core/utils/http/axios';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
||||
import { TestDataChild } from '@jeesite/test/api/test/testDataChild';
|
||||
|
||||
const { adminPath } = useGlobSetting();
|
||||
|
||||
export interface TestData extends BasicModel<TestData> {
|
||||
testInput?: string; // 单行文本
|
||||
testTextarea?: string; // 多行文本
|
||||
testSelect?: string; // 下拉框
|
||||
testSelectMultiple?: string; // 下拉多选
|
||||
testRadio?: string; // 单选框
|
||||
testCheckbox?: string; // 复选框
|
||||
testDate?: string; // 日期选择
|
||||
testDatetime?: string; // 日期时间
|
||||
testUser?: any; // 用户选择
|
||||
testOffice?: any; // 机构选择
|
||||
testAreaCode?: string; // 区域选择
|
||||
testAreaName?: string; // 区域名称
|
||||
testDataChildList?: TestDataChild[]; // 子表列表
|
||||
}
|
||||
|
||||
export const testDataList = (params?: TestData | any) =>
|
||||
defHttp.get<TestData>({ url: adminPath + '/test/testData/list', params });
|
||||
|
||||
export const testDataListData = (params?: TestData | any) =>
|
||||
defHttp.post<Page<TestData>>({ url: adminPath + '/test/testData/listData', params });
|
||||
|
||||
export const testDataForm = (params?: TestData | any) =>
|
||||
defHttp.get<TestData>({ url: adminPath + '/test/testData/form', params });
|
||||
|
||||
export const testDataSave = (params?: any, data?: TestData | any) =>
|
||||
defHttp.postJson<TestData>({ url: adminPath + '/test/testData/save', params, data });
|
||||
|
||||
export const testDataDisable = (params?: TestData | any) =>
|
||||
defHttp.get<TestData>({ url: adminPath + '/test/testData/disable', params });
|
||||
|
||||
export const testDataEnable = (params?: TestData | any) =>
|
||||
defHttp.get<TestData>({ url: adminPath + '/test/testData/enable', params });
|
||||
|
||||
export const testDataDelete = (params?: TestData | any) =>
|
||||
defHttp.get<TestData>({ url: adminPath + '/test/testData/delete', params });
|
||||
28
web-vue/packages/test/api/test/testDataChild.ts
Normal file
28
web-vue/packages/test/api/test/testDataChild.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* @author ThinkGem
|
||||
*/
|
||||
import { defHttp } from '@jeesite/core/utils/http/axios';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
||||
import { TestData } from '@jeesite/test/api/test/testData';
|
||||
|
||||
const { adminPath } = useGlobSetting();
|
||||
|
||||
export interface TestDataChild extends BasicModel<TestData> {
|
||||
testData?: TestData; // 父表对象
|
||||
testSort?: number; // 数据排序
|
||||
testInput?: string; // 单行文本
|
||||
testTextarea?: string; // 多行文本
|
||||
testSelect?: string; // 下拉框
|
||||
testSelectMultiple?: string; // 下拉多选
|
||||
testRadio?: string; // 单选框
|
||||
testCheckbox?: string; // 复选框
|
||||
testDate?: string; // 日期选择
|
||||
testDatetime?: string; // 日期时间
|
||||
testUser?: any; // 用户选择
|
||||
testOffice?: any; // 机构选择
|
||||
testAreaCode?: string; // 区域选择
|
||||
testAreaName?: string; // 区域名称
|
||||
}
|
||||
42
web-vue/packages/test/api/test/testTree.ts
Normal file
42
web-vue/packages/test/api/test/testTree.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* @author ThinkGem
|
||||
*/
|
||||
import { defHttp } from '@jeesite/core/utils/http/axios';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
import { TreeDataModel, TreeModel } from '@jeesite/core/api/model/baseModel';
|
||||
|
||||
const { adminPath } = useGlobSetting();
|
||||
|
||||
export interface TestTree extends TreeModel<TestTree> {
|
||||
treeCode?: string; // 节点编码
|
||||
treeName?: string; // 节点名称
|
||||
}
|
||||
|
||||
export const testTreeList = (params?: TestTree | any) =>
|
||||
defHttp.get<TestTree>({ url: adminPath + '/test/testTree/list', params });
|
||||
|
||||
export const testTreeListData = (params?: TestTree | any) =>
|
||||
defHttp.post<TestTree[]>({ url: adminPath + '/test/testTree/listData', params });
|
||||
|
||||
export const testTreeForm = (params?: TestTree | any) =>
|
||||
defHttp.get<TestTree>({ url: adminPath + '/test/testTree/form', params });
|
||||
|
||||
export const testTreeCreateNextNode = (params?: TestTree | any) =>
|
||||
defHttp.get<TestTree>({ url: adminPath + '/test/testTree/createNextNode', params });
|
||||
|
||||
export const testTreeSave = (params?: any, data?: TestTree | any) =>
|
||||
defHttp.postJson<TestTree>({ url: adminPath + '/test/testTree/save', params, data });
|
||||
|
||||
export const testTreeDisable = (params?: TestTree | any) =>
|
||||
defHttp.get<TestTree>({ url: adminPath + '/test/testTree/disable', params });
|
||||
|
||||
export const testTreeEnable = (params?: TestTree | any) =>
|
||||
defHttp.get<TestTree>({ url: adminPath + '/test/testTree/enable', params });
|
||||
|
||||
export const testTreeDelete = (params?: TestTree | any) =>
|
||||
defHttp.get<TestTree>({ url: adminPath + '/test/testTree/delete', params });
|
||||
|
||||
export const testTreeTreeData = (params?: any) =>
|
||||
defHttp.get<TreeDataModel[]>({ url: adminPath + '/test/testTree/treeData', params });
|
||||
Reference in New Issue
Block a user