优化 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;`) .map((e) => `${e}: boolean;`)
.join("\n")} };` .join("\n")} };`
); );
// 请求
t.push("\n");
t.push("/**\n");
t.push(" * 请求\n");
t.push(" */\n");
t.push(`request: Service['request']`);
} }
t.push("}"); t.push("}");

View File

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

View File

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

View File

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

View File

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