forked from admin/deShanXiao
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e8ab5389af |
@@ -1 +0,0 @@
|
||||
555
|
||||
@@ -1 +1,24 @@
|
||||
555
|
||||
require("module-alias/register"); // 别名加载
|
||||
|
||||
import express from "express";
|
||||
import bodyParser from "body-parser";
|
||||
import routerIndex from "./src/router/index";
|
||||
import { createConnection } from "typeorm";
|
||||
import cors from "cors";
|
||||
|
||||
const app = express();
|
||||
const port = 8101;
|
||||
createConnection().then(() => {
|
||||
console.log("数据库连接成功!");
|
||||
app.listen(port, () => {
|
||||
console.log(`开始监听${port}了`);
|
||||
});
|
||||
});
|
||||
|
||||
app.use(bodyParser.urlencoded({ extended: true })); // 进行url解码
|
||||
app.use(bodyParser.json());
|
||||
|
||||
app.use(cors());
|
||||
|
||||
// 匹配接口路由
|
||||
app.use("/", routerIndex);
|
||||
|
||||
7473
backEnd/package-lock.json
generated
7473
backEnd/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
27
backEnd/tsconfig.json
Normal file
27
backEnd/tsconfig.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["es5", "es6", "ES2022"],
|
||||
"paths": {
|
||||
"router/*": ["./src/router/*"],
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
"baseUrl": "./",
|
||||
"declaration": true, // 是否生成.d.ts文件
|
||||
"declarationDir": "./types", // .d.ts文件输出路径
|
||||
"target": "ES5", // 编译目标
|
||||
"module": "CommonJS",
|
||||
// "strict": true,
|
||||
"moduleResolution": "Node",
|
||||
"outDir": "./build",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true, // 用于指定是否启用实验性的装饰器特性
|
||||
"sourceMap": false,
|
||||
// "resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true, // 用于允许从没有默认导出的模块中默认导入
|
||||
"esModuleInterop": true, //是否允许export=导出,import from导入
|
||||
},
|
||||
// "ts-node": {
|
||||
// "esm": true
|
||||
// },
|
||||
"include": ["src/**/*", "index.ts"]
|
||||
}
|
||||
@@ -1 +1,22 @@
|
||||
555
|
||||
import path from "path";
|
||||
|
||||
module.exports = {
|
||||
entry: "./index.ts",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: "ts-loader",
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".js"],
|
||||
},
|
||||
output: {
|
||||
filename: "index.js",
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
},
|
||||
target: "node",
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
555
|
||||
VITE_API_BASE_URL = "http://localhost:8101"
|
||||
@@ -1 +1 @@
|
||||
555
|
||||
VITE_API_BASE_URL = "http://106.52.204.157/api"
|
||||
26
frontEnd/.gitignore
vendored
26
frontEnd/.gitignore
vendored
@@ -1 +1,25 @@
|
||||
555
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.vscode
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
16
frontEnd/README.md
Normal file
16
frontEnd/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Vue 3 + TypeScript + Vite
|
||||
|
||||
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
|
||||
|
||||
## Type Support For `.vue` Imports in TS
|
||||
|
||||
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
|
||||
|
||||
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
|
||||
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
|
||||
|
||||
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).
|
||||
@@ -1 +1,17 @@
|
||||
555
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="./index.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>德孝善延伸服务系统</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<!-- <script src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_29405_22.fc87eeefd2303d03e310328c39223ebb.js"></script> -->
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
4232
frontEnd/package-lock.json
generated
Normal file
4232
frontEnd/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
39
frontEnd/package.json
Normal file
39
frontEnd/package.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "basesystemforvue3",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.0.10",
|
||||
"axios": "^1.6.0",
|
||||
"dayjs": "^1.11.5",
|
||||
"echarts": "^5.4.3",
|
||||
"element-china-area-data": "^6.1.0",
|
||||
"element-plus": "^2.8.7",
|
||||
"exceljs": "^4.4.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"html2canvas": "^1.4.1",
|
||||
"js-md5": "^0.8.3",
|
||||
"pinia": "^2.0.22",
|
||||
"print-js": "^1.6.0",
|
||||
"vue": "^3.2.37",
|
||||
"vue-json-excel3": "^1.0.29",
|
||||
"vue-router": "^4.1.5",
|
||||
"vue3-print-nb": "^0.1.4",
|
||||
"xlsx": "^0.20.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/file-saver": "^2.0.7",
|
||||
"@types/node": "^18.8.0",
|
||||
"@vitejs/plugin-vue": "^3.1.0",
|
||||
"sass": "^1.79.3",
|
||||
"typescript": "^4.6.4",
|
||||
"vite": "^3.2.11",
|
||||
"vue-tsc": "^0.40.4"
|
||||
}
|
||||
}
|
||||
@@ -1 +1,14 @@
|
||||
-1 OR 5*5=25 --
|
||||
<template>
|
||||
<div class="view-content">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
<style scoped>
|
||||
.view-content {
|
||||
min-height: 100vh;
|
||||
min-width: 100vw;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
23
frontEnd/tsconfig.json
Normal file
23
frontEnd/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"types": ["element-plus/global"],
|
||||
"sourceMap": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/routers/index.js"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
9
frontEnd/tsconfig.node.json
Normal file
9
frontEnd/tsconfig.node.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
25
frontEnd/vite.config.ts
Normal file
25
frontEnd/vite.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { join } from "path";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": join(__dirname, "/src"),
|
||||
},
|
||||
extensions: [".js", ".vue"],
|
||||
},
|
||||
server: {
|
||||
host: true,
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
api: "modern",
|
||||
silenceDeprecations: ["legacy-js-api"],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user