优化 eps

This commit is contained in:
icssoa 2022-09-20 14:56:31 +08:00
parent d550e79293
commit 8ad9842954
5 changed files with 93 additions and 16 deletions

View File

@ -194,6 +194,13 @@ function createService({ list, service }: any) {
.map((e) => `${e}: boolean;`)
.join("\n")} };`
);
// 请求
t.push("\n");
t.push("/**\n");
t.push(" * 请求\n");
t.push(" */\n");
t.push(`request: Service['request']`);
}
t.push("}");

View File

@ -561,6 +561,10 @@ declare namespace Eps {
delete: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface ChatSession {
@ -614,6 +618,10 @@ declare namespace Eps {
delete: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface Test {
@ -667,6 +675,10 @@ declare namespace Eps {
delete: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface BaseComm {
@ -756,6 +768,10 @@ declare namespace Eps {
delete: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface BaseOpen {
@ -839,6 +855,10 @@ declare namespace Eps {
delete: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface BaseSysDepartment {
@ -898,6 +918,10 @@ declare namespace Eps {
page: boolean;
info: boolean;
};
/**
*
*/
request: Service["request"];
}
interface BaseSysLog {
@ -969,6 +993,10 @@ declare namespace Eps {
delete: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface BaseSysMenu {
@ -1022,6 +1050,10 @@ declare namespace Eps {
page: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface BaseSysParam {
@ -1081,6 +1113,10 @@ declare namespace Eps {
add: boolean;
list: boolean;
};
/**
*
*/
request: Service["request"];
}
interface BaseSysRole {
@ -1134,6 +1170,10 @@ declare namespace Eps {
page: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface BaseSysUser {
@ -1193,6 +1233,10 @@ declare namespace Eps {
page: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface DemoGoods {
@ -1246,6 +1290,10 @@ declare namespace Eps {
list: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface DictInfo {
@ -1305,6 +1353,10 @@ declare namespace Eps {
page: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface DictType {
@ -1358,6 +1410,10 @@ declare namespace Eps {
page: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface SpaceInfo {
@ -1411,6 +1467,10 @@ declare namespace Eps {
page: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface SpaceType {
@ -1464,6 +1524,10 @@ declare namespace Eps {
page: boolean;
add: boolean;
};
/**
*
*/
request: Service["request"];
}
interface TaskInfo {
@ -1541,6 +1605,10 @@ declare namespace Eps {
add: boolean;
list: boolean;
};
/**
*
*/
request: Service["request"];
}
type Service = {

View File

@ -1,6 +1,6 @@
{
"name": "front-next",
"version": "5.9.1",
"version": "5.9.2",
"scripts": {
"dev": "vite --host",
"build": "vite build",
@ -11,17 +11,16 @@
"dependencies": {
"@codemirror/lang-javascript": "^6.0.1",
"@codemirror/theme-one-dark": "^6.0.0",
"@cool-vue/crud": "^5.5.6",
"@cool-vue/crud": "^5.5.11",
"@element-plus/icons-vue": "^2.0.6",
"@vueuse/core": "^9.1.0",
"@wangeditor/editor": "^5.1.14",
"@wangeditor/editor-for-vue": "^5.1.12",
"add": "^2.0.6",
"axios": "^0.27.2",
"codemirror": "^6.0.1",
"core-js": "^3.23.5",
"echarts": "^5.3.3",
"element-plus": "^2.2.12",
"element-plus": "^2.2.17",
"file-saver": "^2.0.5",
"lodash-es": "^4.17.21",
"mitt": "^3.0.0",
@ -31,13 +30,12 @@
"quill": "^1.3.7",
"socket.io-client": "^4.5.1",
"store": "^2.0.12",
"vue": "^3.2.37",
"vue": "^3.2.39",
"vue-codemirror": "^6.0.1",
"vue-echarts": "^6.2.3",
"vue-router": "^4.1.2",
"vuedraggable": "^4.1.0",
"xlsx": "^0.18.5",
"yarn": "^1.22.19"
"xlsx": "^0.18.5"
},
"devDependencies": {
"@types/lodash-es": "^4.17.6",

View File

@ -17,6 +17,10 @@ const names = getNames(new BaseService());
export async function createEps() {
// 创建描述文件
function createDts(list: any[]) {
if (!isDev) {
return false;
}
function deep(v: any) {
for (const i in v) {
if (v[i].namespace) {
@ -67,7 +71,7 @@ export async function createEps() {
// 获取
async function getEps() {
if (isDev && config.test.eps) {
if (config.test.eps) {
await service
.request({
url: "/admin/base/open/eps"
@ -80,17 +84,15 @@ export async function createEps() {
.catch((err) => {
console.error("[Eps] 获取失败!", err.message);
});
} else {
set();
}
}
// 设置、创建
async function set(d: any) {
async function set(d?: any) {
const list: any[] = [];
if (!d) {
return false;
}
if (isArray(d)) {
d = { d };
}
@ -178,10 +180,8 @@ export async function createEps() {
// 缓存数据
Data.set("service", service);
if (isDev) {
createDts(list);
}
}
// 开发环境下使用接口 /eps 的数据,生产环境使用 eps.json
if (isDev) {

View File

@ -27,3 +27,7 @@
background-color: transparent;
}
}
.el-dialog {
--el-dialog-border-radius: 10px !important;
}