diff --git a/farm.config.ts b/farm.config.ts
index e34d0ad..0e21653 100644
--- a/farm.config.ts
+++ b/farm.config.ts
@@ -4,7 +4,6 @@ import vueJsx from "@vitejs/plugin-vue-jsx";
import qiankun from "vite-plugin-qiankun";
import path from "path";
import less from "@farmfe/js-plugin-less";
-import yargsParser from "yargs-parser";
import Components from "unplugin-vue-components/vite";
import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
@@ -15,26 +14,7 @@ import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
// TEST: "test",
// };
-const argv = yargsParser(process.argv.slice(2));
-const env = process.env.NODE_ENV;
-console.log("argv", argv);
-console.log("env", env);
-
-// let base: string;
-// switch (argv.mode) {
-// case "staging":
-// case "test":
-// base = "https://custom-chart.shiyue.com/";
-// break;
-// case "production":
-// base = "https://custom-chart.shiyuegame.com/";
-// break;
-// default:
-// base = "http://localhost:8080/";
-// }
-// if (env === ENVS.DEVELOPMENT) base = "http://localhost:8080/";
-
-// console.log("base", base);
+// const env = process.env.NODE_ENV;
export default defineConfig({
plugins: [less()],
@@ -54,8 +34,7 @@ export default defineConfig({
],
server: {
cors: true,
- open: false,
- port: 8080,
+ open: true,
},
compilation: {
resolve: {
diff --git a/package.json b/package.json
index b3f2080..de12e5d 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
"@farmfe/js-plugin-less": "^1.12.1",
"@sy/y-code-chart": "^1.2.1",
"@vueuse/core": "^10.11.0",
- "ant-design-vue": "^4.1.2",
+ "ant-design-vue": "^4.2.6",
"axios": "^1.6.7",
"core-js": "^3.40.0",
"cross-env": "^7.0.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 024236c..6498c1c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -24,7 +24,7 @@ importers:
specifier: ^10.11.0
version: 10.11.1(vue@3.5.13(typescript@5.3.3))
ant-design-vue:
- specifier: ^4.1.2
+ specifier: ^4.2.6
version: 4.2.6(vue@3.5.13(typescript@5.3.3))
axios:
specifier: ^1.6.7
@@ -564,12 +564,14 @@ packages:
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
+ libc: [glibc]
'@farmfe/core-linux-x64-musl@1.6.6':
resolution: {integrity: sha512-h8FoBNbe5LoYZrq27JriaS6JJJHK9sc92jKOTrNes5u1qixw5GAPgMq4smq97koEkOwPaQfueQUTfa8pHiIg1Q==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
+ libc: [musl]
'@farmfe/core-win32-arm64-msvc@1.6.6':
resolution: {integrity: sha512-X4gIoSwbPmf0Lx0ZLC5dzcOm4DZR+4i+7u4sF3f7jb95GQuWR6vF1L6tk6IY5ftyaz8xFuFcDpd6WO2km+VMwQ==}
@@ -792,46 +794,55 @@ packages:
resolution: {integrity: sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==}
cpu: [arm]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-arm-musleabihf@4.28.0':
resolution: {integrity: sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==}
cpu: [arm]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-arm64-gnu@4.28.0':
resolution: {integrity: sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-arm64-musl@4.28.0':
resolution: {integrity: sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==}
cpu: [arm64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-powerpc64le-gnu@4.28.0':
resolution: {integrity: sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==}
cpu: [ppc64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-riscv64-gnu@4.28.0':
resolution: {integrity: sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==}
cpu: [riscv64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-s390x-gnu@4.28.0':
resolution: {integrity: sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==}
cpu: [s390x]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-x64-gnu@4.28.0':
resolution: {integrity: sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==}
cpu: [x64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-x64-musl@4.28.0':
resolution: {integrity: sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==}
cpu: [x64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-win32-arm64-msvc@4.28.0':
resolution: {integrity: sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==}
@@ -1691,18 +1702,21 @@ packages:
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
farm-plugin-replace-dirname-linux-arm64-musl@0.2.1:
resolution: {integrity: sha512-m3gH8ggczbRYTHZSNp3LjIQIcqhvDO4O78bxXc8O1ozKD8M47/YfQLyQV06M7H4rZ8s6XV3Bb1kAcRAASp3M5A==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
farm-plugin-replace-dirname-linux-x64-gnu@0.2.1:
resolution: {integrity: sha512-MehKkoM2RFw3sCnEu9nCbXKjxtC3hfTad0h/dC+Z8iEBcLEReVLoNzHWWUa6BxkxqDtB82/BWO/ObSUj/VUnwQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
+ libc: [glibc]
farm-plugin-replace-dirname-linux-x64-musl@0.2.1:
resolution: {integrity: sha512-o1qPZi16N/sHOteZYJVv6UmZFK3QKpVQrywk/4spJI0mPH9A9Y+G6iBE2Tqjb3d+1Hb6phr++EBJHZ2x1ajtGQ==}
diff --git a/src/App.vue b/src/App.vue
index 776301e..bf03e74 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/router/routes.ts b/src/router/routes.ts
index 5d46619..10135b1 100644
--- a/src/router/routes.ts
+++ b/src/router/routes.ts
@@ -103,7 +103,7 @@ const routeList: RouteType[] = [
path: "page-info",
name: "page-info",
component: () =>
- import("@/views/page-show-info/page-info/index,.vue"),
+ import("@/views/page-show-info/page-info/index.vue"),
meta: { title: "项目报表" },
isMenu: true,
children: [],
diff --git a/src/views/config-manage/module-cfg/config.ts b/src/views/config-manage/module-cfg/config.ts
index 6a299d5..0a1269f 100644
--- a/src/views/config-manage/module-cfg/config.ts
+++ b/src/views/config-manage/module-cfg/config.ts
@@ -1,36 +1,41 @@
export const moduleCfgCols = [
- { dataIndex: 'modular_id', title: '编号', align: 'center'},
- { dataIndex: 'modular_name', title: '数据来源名称', align: 'center'},
- { dataIndex: 'project_name', title: '项目名称', align: 'center'},
- { dataIndex: 'is_show', title: '展示状态', align: 'center'},
- { dataIndex: 'original_type_handle', title: '数据源类型', align: 'center'},
+ { dataIndex: "modular_id", title: "编号", align: "center" },
+ { dataIndex: "modular_name", title: "数据来源名称", align: "center" },
+ { dataIndex: "project_name", title: "项目名称", align: "center" },
+ { dataIndex: "is_show", title: "展示状态", align: "center" },
+ { dataIndex: "original_type_handle", title: "数据源类型", align: "center" },
// { dataIndex: 'sort', title: '排序', align: 'center'},
- { dataIndex: 'action', title: '操作', align: 'center'},
+ { dataIndex: "action", title: "操作", align: "center" },
];
export const viewCfgCols = [
- { dataIndex: 'field_name', title: '字段名称', align: 'center'},
- { dataIndex: 'field_title', title: '字段标题', align: 'center'},
- { dataIndex: 'field_numerical_name', title: '字段类型', align: 'center', width: 120},
- { dataIndex: 'show_type', title: '展示类型', align: 'center', width: 120},
- { dataIndex: 'field_type_name', title: '搜索类型', align: 'center'},
- { dataIndex: 'is_search', title: '是否可搜索', align: 'center'},
- { dataIndex: 'sort', title: '排序', align: 'center'},
- { dataIndex: 'belong_to_table', title: '所属表名称', align: 'center'},
- { dataIndex: 'is_other_database', title: '数据库特配', align: 'center'},
- { dataIndex: 'original_type', title: '数据源类型', align: 'center'},
- { dataIndex: 'original_sql', title: '数据源', align: 'center', width: 400},
- { dataIndex: 'action', title: '操作', align: 'center', width: 120},
+ { dataIndex: "field_name", title: "字段名称", align: "center" },
+ { dataIndex: "field_title", title: "字段标题", align: "center" },
+ {
+ dataIndex: "field_numerical_name",
+ title: "字段类型",
+ align: "center",
+ width: 120,
+ },
+ { dataIndex: "show_type", title: "展示类型", align: "center", width: 120 },
+ { dataIndex: "field_type_name", title: "搜索类型", align: "center" },
+ { dataIndex: "is_search", title: "是否可搜索", align: "center" },
+ { dataIndex: "sort", title: "排序", align: "center" },
+ { dataIndex: "belong_to_table", title: "所属表名称", align: "center" },
+ { dataIndex: "is_other_database", title: "数据库特配", align: "center" },
+ { dataIndex: "original_type", title: "数据源类型", align: "center" },
+ { dataIndex: "original_sql", title: "数据源", align: "center", width: 400 },
+ { dataIndex: "action", title: "操作", align: "center", width: 120 },
];
export const originalTypes = [
- { label: 'sql', value: 1 },
- { label: 'json', value: 2 },
-]
+ { label: "sql", value: 1 },
+ { label: "json", value: 2 },
+];
export const showTypeOpts = [
- { label: '文本', value: 'text' },
- { label: '图片', value: 'img' },
- { label: '链接', value: 'link' },
- { label: '富文本', value: 'richText' },
-]
+ { label: "文本", value: "text" },
+ { label: "图片", value: "img" },
+ { label: "链接", value: "link" },
+ { label: "富文本", value: "richText" },
+];
diff --git a/src/views/config-manage/module-cfg/index.vue b/src/views/config-manage/module-cfg/index.vue
index 5187ad0..7bd570c 100644
--- a/src/views/config-manage/module-cfg/index.vue
+++ b/src/views/config-manage/module-cfg/index.vue
@@ -10,7 +10,7 @@
@change="search"
/>
{
};
});
}
-
+
getAllCardsData();
}
})
@@ -302,7 +302,6 @@ const getAllCardsData = async () => {
};
diff --git a/vite.config.ts b/vite.config.ts
index 1b165a0..66af1e7 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,30 +1,30 @@
-import { fileURLToPath, URL } from 'node:url';
-import { defineConfig } from 'vite';
-import vue from '@vitejs/plugin-vue';
-import vueJsx from '@vitejs/plugin-vue-jsx';
-import Components from 'unplugin-vue-components/vite';
-import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
-import qiankun from 'vite-plugin-qiankun'
-import yargsParser from 'yargs-parser'
+import { fileURLToPath, URL } from "node:url";
+import { defineConfig } from "vite";
+import vue from "@vitejs/plugin-vue";
+import vueJsx from "@vitejs/plugin-vue-jsx";
+import Components from "unplugin-vue-components/vite";
+import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
+import qiankun from "vite-plugin-qiankun";
+import yargsParser from "yargs-parser";
-const argv = yargsParser(process.argv.slice(2))
+const argv = yargsParser(process.argv.slice(2));
-console.log(process.env.DEV_ENV)
+console.log(process.env.DEV_ENV);
-let base: string
+let base: string;
switch (argv.mode) {
- case 'staging':
- case 'test':
- base = 'https://custom-chart.shiyue.com/'
- break
- case 'production':
- base = 'https://custom-chart.shiyuegame.com/'
- break
+ case "staging":
+ case "test":
+ base = "https://custom-chart.shiyue.com/";
+ break;
+ case "production":
+ base = "https://custom-chart.shiyuegame.com/";
+ break;
default:
- base = 'http://localhost:8080/'
+ base = "http://localhost:8080/";
}
-if (process.env.DEV_ENV === 'development') {
- base = 'http://localhost:8080/'
+if (process.env.DEV_ENV === "development") {
+ base = "http://localhost:8080/";
}
// https://vitejs.dev/config/
@@ -33,9 +33,9 @@ export default defineConfig({
sourcemap: false,
rollupOptions: {
output: {
- assetFileNames: '[name]-ycode-[hash:8].[ext]',
- chunkFileNames: '[name]-ycode-[hash:8].js',
- entryFileNames: '[name]-ycode-[hash:8].js',
+ assetFileNames: "[name]-ycode-[hash:8].[ext]",
+ chunkFileNames: "[name]-ycode-[hash:8].js",
+ entryFileNames: "[name]-ycode-[hash:8].js",
},
},
},
@@ -44,7 +44,7 @@ export default defineConfig({
preprocessorOptions: {
less: {
modifyVars: {
- 'ant-prefix': 'ycode-ant',
+ "ant-prefix": "ycode-ant",
},
},
},
@@ -53,24 +53,31 @@ export default defineConfig({
vue(),
vueJsx(),
Components({
- resolvers: [AntDesignVueResolver({
- importStyle: 'less',
- })],
+ resolvers: [
+ AntDesignVueResolver({
+ importStyle: "less",
+ }),
+ ],
+ }),
+ qiankun("y-code-app", {
+ useDevMode: process.env.DEV_ENV === "development",
}),
- qiankun('y-code-app', { useDevMode: process.env.DEV_ENV === 'development' }),
],
resolve: {
alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url)),
+ "@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
base,
define: {
_BASE_HOST_: `'${base}'`,
},
+ optimizeDeps: {
+ force: true, // 强制重新预构建依赖
+ },
server: {
hmr: true,
- host: '0.0.0.0',
+ host: "0.0.0.0",
port: 8080,
},
});