commit
680b0a449a
20 changed files with 2513 additions and 0 deletions
@ -0,0 +1,24 @@
|
||||
# Logs |
||||
logs |
||||
*.log |
||||
npm-debug.log* |
||||
yarn-debug.log* |
||||
yarn-error.log* |
||||
pnpm-debug.log* |
||||
lerna-debug.log* |
||||
|
||||
node_modules |
||||
dist |
||||
dist-ssr |
||||
*.local |
||||
|
||||
# Editor directories and files |
||||
.vscode/* |
||||
!.vscode/extensions.json |
||||
.idea |
||||
.DS_Store |
||||
*.suo |
||||
*.ntvs* |
||||
*.njsproj |
||||
*.sln |
||||
*.sw? |
@ -0,0 +1,3 @@
|
||||
{ |
||||
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] |
||||
} |
@ -0,0 +1,18 @@
|
||||
# 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) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). |
||||
|
||||
## Type Support For `.vue` Imports in TS |
||||
|
||||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types. |
||||
|
||||
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps: |
||||
|
||||
1. Disable the built-in TypeScript Extension |
||||
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette |
||||
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)` |
||||
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette. |
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8" /> |
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
||||
<title>登录</title> |
||||
</head> |
||||
<body> |
||||
<div id="app"></div> |
||||
<script type="module" src="/src/main.ts"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,23 @@
|
||||
{ |
||||
"name": "vite-project", |
||||
"private": true, |
||||
"version": "0.0.0", |
||||
"type": "module", |
||||
"scripts": { |
||||
"dev": "vite", |
||||
"build": "vue-tsc && vite build", |
||||
"preview": "vite preview" |
||||
}, |
||||
"dependencies": { |
||||
"vue": "^3.2.47", |
||||
"vue-router": "^4.2.0", |
||||
"vuex": "^4.1.0" |
||||
}, |
||||
"devDependencies": { |
||||
"@vitejs/plugin-vue": "^4.1.0", |
||||
"less": "^4.1.3", |
||||
"typescript": "^5.0.2", |
||||
"vite": "^4.3.2", |
||||
"vue-tsc": "^1.4.2" |
||||
} |
||||
} |
@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
<template> |
||||
<router-view></router-view> |
||||
</template> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
||||
<script lang="ts" setup> |
||||
|
||||
</script> |
||||
|
||||
|
||||
|
@ -0,0 +1,38 @@
|
||||
<script setup lang="ts"> |
||||
import { ref } from 'vue' |
||||
|
||||
defineProps<{ msg: string }>() |
||||
|
||||
const count = ref(0) |
||||
</script> |
||||
|
||||
<template> |
||||
<h1>{{ msg }}</h1> |
||||
|
||||
<div class="card"> |
||||
<button type="button" @click="count++">count is {{ count }}</button> |
||||
<p> |
||||
Edit |
||||
<code>components/HelloWorld.vue</code> to test HMR |
||||
</p> |
||||
</div> |
||||
|
||||
<p> |
||||
Check out |
||||
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank" |
||||
>create-vue</a |
||||
>, the official Vue + Vite starter |
||||
</p> |
||||
<p> |
||||
Install |
||||
<a href="https://github.com/vuejs/language-tools" target="_blank">Volar</a> |
||||
in your IDE for a better DX |
||||
</p> |
||||
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p> |
||||
</template> |
||||
|
||||
<style scoped> |
||||
.read-the-docs { |
||||
color: #888; |
||||
} |
||||
</style> |
@ -0,0 +1,5 @@
|
||||
import { createApp } from 'vue' |
||||
import './style.less' |
||||
import App from './App.vue' |
||||
import router from "./router/index"; |
||||
createApp(App).use(router).mount('#app') |
@ -0,0 +1,48 @@
|
||||
import axios from "axios"; |
||||
const token=sessionStorage.getItem("token") |
||||
const requst=axios.create({ |
||||
baseURL:"http://121.36.37.70:8906/", |
||||
timeout: 60000, // 请求超时时间毫秒
|
||||
withCredentials: true, // 异步请求携带cookie
|
||||
headers: { |
||||
// 设置后端需要的传参类型
|
||||
'Content-Type': 'application/json', |
||||
'Authorization': 'Bearer '+token, |
||||
'X-Requested-With': 'XMLHttpRequest', |
||||
}, |
||||
|
||||
}) |
||||
|
||||
// 添加请求拦截器
|
||||
requst.interceptors.request.use( |
||||
function (config) { |
||||
// 在发送请求之前做些什么
|
||||
return config |
||||
}, |
||||
function (error) { |
||||
// 对请求错误做些什么
|
||||
console.log(error) |
||||
return Promise.reject(error) |
||||
} |
||||
) |
||||
|
||||
// 添加响应拦截器
|
||||
requst.interceptors.response.use( |
||||
function (response) { |
||||
// console.log(response)
|
||||
// 2xx 范围内的状态码都会触发该函数。
|
||||
// 对响应数据做点什么
|
||||
// dataAxios 是 axios 返回数据中的 data
|
||||
const dataAxios = response.data |
||||
// 这个状态码是和后端约定的
|
||||
const code = dataAxios.reset |
||||
return dataAxios |
||||
}, |
||||
function (error) { |
||||
// 超出 2xx 范围的状态码都会触发该函数。
|
||||
// 对响应错误做点什么
|
||||
console.log(error) |
||||
return Promise.reject(error) |
||||
} |
||||
) |
||||
export default requst |
@ -0,0 +1,27 @@
|
||||
// 导入axios实例
|
||||
import httpRequest from "./index"; |
||||
|
||||
// 定义接口的传参
|
||||
interface UserInfoParam { |
||||
userNameOrEmailAddress: string; |
||||
password: string; |
||||
} |
||||
|
||||
// 获取用户信息
|
||||
export function apiGetToken(param: UserInfoParam) { |
||||
return httpRequest({ |
||||
url: "/api/TokenAuth/Authenticate", |
||||
method: "post", |
||||
data: param, |
||||
}); |
||||
} |
||||
|
||||
export function apiGetUserInfo() { |
||||
return httpRequest({ |
||||
url: "/api/services/app/Session/GetCurrentLoginInformations", |
||||
method: "get", |
||||
data: null, |
||||
}); |
||||
} |
||||
export default apiGetUserInfo; |
||||
apiGetToken; |
@ -0,0 +1,16 @@
|
||||
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"; |
||||
|
||||
const routes: RouteRecordRaw[] = [ |
||||
{ |
||||
path: "/login", |
||||
name: "login", |
||||
component: () => import("../viwe/login.vue"), |
||||
}, |
||||
|
||||
]; |
||||
const router = createRouter({ |
||||
routes, |
||||
history: createWebHistory(), |
||||
}); |
||||
|
||||
export default router; |
@ -0,0 +1,381 @@
|
||||
html, |
||||
body { |
||||
width: 100%; |
||||
height: 100%; |
||||
margin: 0 auto; |
||||
padding: 0; |
||||
overflow: hidden; |
||||
font-family: synormal !important; |
||||
} |
||||
|
||||
ul, |
||||
ol, |
||||
dl, |
||||
li, |
||||
dt, |
||||
dd, |
||||
p, |
||||
form, |
||||
input, |
||||
h1, |
||||
h2, |
||||
h3, |
||||
h4, |
||||
h5, |
||||
h6, |
||||
section, |
||||
article, |
||||
aside, |
||||
header, |
||||
footer, |
||||
nav, |
||||
figure, |
||||
time, |
||||
mark, |
||||
main, |
||||
canvas { |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
|
||||
b, |
||||
strong, |
||||
i, |
||||
em, |
||||
h1, |
||||
h2, |
||||
h3, |
||||
h4, |
||||
h5, |
||||
h6 { |
||||
font-weight: 500; |
||||
font-style: normal; |
||||
} |
||||
|
||||
img { |
||||
border: none; |
||||
} |
||||
|
||||
a { |
||||
text-decoration: none; |
||||
color: #000; |
||||
} |
||||
|
||||
ul, |
||||
ol, |
||||
li { |
||||
list-style: none; |
||||
// overflow-x: hidden; |
||||
} |
||||
|
||||
.clearfn:after { |
||||
content: ""; |
||||
clear: both; |
||||
display: block; |
||||
overflow: hidden; |
||||
height: 0; |
||||
visibility: hidden; |
||||
} |
||||
|
||||
//root标签 |
||||
app-root { |
||||
height: 100%; |
||||
} |
||||
|
||||
h1 { |
||||
font-size: 16px; |
||||
} |
||||
|
||||
//三维场景 |
||||
.dropDown { |
||||
border: 1px solid #23D9FF; |
||||
background: linear-gradient(180deg, #000D21 0%, #006E85 100%); |
||||
|
||||
li:hover { |
||||
background-color: transparent; |
||||
} |
||||
|
||||
li { |
||||
text-align: center; |
||||
} |
||||
|
||||
.ant-checkbox-wrapper { |
||||
color: #fff; |
||||
} |
||||
} |
||||
|
||||
.dropDownPlan { |
||||
background: linear-gradient(360deg, #000D21 0%, rgba(0, 59, 110, 0.8) 100%); |
||||
box-shadow: 0px 0px 6px #2399FF; |
||||
|
||||
li { |
||||
color: #fff; |
||||
} |
||||
} |
||||
|
||||
//任务弹窗 |
||||
.taskDialog { |
||||
|
||||
.ant-modal-header, |
||||
.ant-modal-content { |
||||
background: radial-gradient(circle, #004988 0%, #00122D 100%); |
||||
} |
||||
|
||||
.ant-modal-header, |
||||
.ant-modal-footer { |
||||
border: none; |
||||
} |
||||
|
||||
.ant-modal-title, |
||||
.ant-form-item-label>label, |
||||
.ant-input { |
||||
color: #C4E2FC; |
||||
} |
||||
|
||||
.ant-modal-footer .ant-btn:first-child { |
||||
color: #C4E2FC; |
||||
background: #000D21; |
||||
border: 1px solid #C4E2FC; |
||||
} |
||||
|
||||
.ant-modal-footer .ant-btn:last-child { |
||||
color: #C4E2FC; |
||||
background: rgba(0, 129, 255, 0.6); |
||||
border: 1px solid #36A2FF; |
||||
} |
||||
|
||||
.ant-input { |
||||
background: rgba(145, 204, 255, 0.41); |
||||
border: 1px solid #91CCFF; |
||||
} |
||||
|
||||
textarea { |
||||
resize: none; |
||||
outline: none; |
||||
} |
||||
} |
||||
|
||||
.baseInfoDialog { |
||||
height: 80%; |
||||
|
||||
.ant-modal-footer { |
||||
padding: 0; |
||||
} |
||||
|
||||
.ant-modal-body, |
||||
.ant-modal-content { |
||||
height: 100%; |
||||
background: radial-gradient(closest-side at 50% 55%, #004988 0%, #00122D 100%); |
||||
} |
||||
} |
||||
|
||||
.videoDialog { |
||||
height: 80%; |
||||
|
||||
.ant-modal-body, |
||||
.ant-modal-footer { |
||||
padding: 0; |
||||
} |
||||
|
||||
.ant-modal-body, |
||||
.ant-modal-content { |
||||
height: 100%; |
||||
} |
||||
|
||||
canvas { |
||||
width: 100%; |
||||
height: 100%; |
||||
border: none; |
||||
outline: none; |
||||
} |
||||
} |
||||
|
||||
#embed-host { |
||||
input { |
||||
color: #000; |
||||
} |
||||
} |
||||
|
||||
//bbl 内置color |
||||
#threeDimensional { |
||||
|
||||
//可展开面板 |
||||
#disposalPlan { |
||||
font-size: 15px; |
||||
|
||||
.ant-collapse-header { |
||||
width: 100%; |
||||
height: 35px; |
||||
line-height: 35px; |
||||
color: #23D9FF; |
||||
padding: 0px; |
||||
background: rgba(35, 153, 255, 0.41); |
||||
border: 1px solid rgba(35, 217, 255, 0.4); |
||||
} |
||||
|
||||
.ant-collapse { |
||||
background-color: transparent; |
||||
} |
||||
|
||||
.ant-collapse-content { |
||||
background-color: transparent; |
||||
width: 100% |
||||
} |
||||
} |
||||
|
||||
.ant-tree { |
||||
color: #C4E2FC; |
||||
} |
||||
|
||||
//tree |
||||
.ant-tree, |
||||
.ant-tree-node-content-wrapper:hover, |
||||
.ant-tree-node-content-wrapper.ant-tree-node-selected { |
||||
background-color: transparent; |
||||
} |
||||
|
||||
//tree |
||||
.ant-tree-node-content-wrapper { |
||||
width: 100%; |
||||
} |
||||
|
||||
//tree |
||||
|
||||
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector { |
||||
color: #fff; |
||||
} |
||||
|
||||
//select |
||||
.ant-select-single:not(.ant-select-customize-input) .ant-select-selector { |
||||
border: none; |
||||
border-radius: 0px; |
||||
} |
||||
|
||||
//select |
||||
|
||||
.ant-collapse, |
||||
.ant-collapse-item, |
||||
.ant-collapse-header, |
||||
.ant-collapse-content { |
||||
border-radius: 0px; |
||||
border: none; |
||||
} |
||||
|
||||
//可展开面板 |
||||
.ant-collapse-content { |
||||
background: rgba(0, 59, 110, 0.9); |
||||
color: #fff; |
||||
} |
||||
|
||||
//可展开面板 |
||||
.ant-collapse-content-box { |
||||
padding: 0; |
||||
} |
||||
|
||||
//可展开面板 |
||||
.ant-collapse-header { |
||||
//可展开面板 |
||||
// padding: 0 0 0 25px; |
||||
padding: 0; |
||||
padding-left: 5px; |
||||
height: 30px; |
||||
line-height: 28px; |
||||
background: linear-gradient(360deg, #000D21 0%, rgba(0, 59, 110, 0.8) 100%); |
||||
border: 1px solid rgba(35, 217, 255, 0.4); |
||||
color: #23D9FF; |
||||
|
||||
.ant-collapse-arrow { |
||||
left: 5px; |
||||
} |
||||
|
||||
//可展开面板 |
||||
} |
||||
|
||||
.ant-steps-dot .ant-steps-item-tail, |
||||
.ant-steps-dot.ant-steps-small .ant-steps-item-tail { |
||||
top: 15px; |
||||
} |
||||
|
||||
//步骤条 |
||||
|
||||
//滚动条样式 |
||||
::-webkit-scrollbar { |
||||
width: 5px; |
||||
} |
||||
|
||||
::-webkit-scrollbar-thumb { |
||||
background-image: linear-gradient(#2495f8, #1c73c2, #02233f, ); |
||||
} |
||||
|
||||
::-webkit-scrollbar-track { |
||||
background-color: #0d4070; |
||||
} |
||||
} |
||||
|
||||
#container { |
||||
flex: 1; |
||||
position: relative; |
||||
height: 46px; |
||||
overflow: hidden; |
||||
} |
||||
|
||||
#list-wrapper { |
||||
position: relative; |
||||
} |
||||
|
||||
ul { |
||||
list-style: none; |
||||
} |
||||
|
||||
.info { |
||||
flex: 1; |
||||
display: flex; |
||||
height: 46px; |
||||
line-height: 46px; |
||||
color: #fff; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
|
||||
.infoitem { |
||||
flex: 1; |
||||
display: flex; |
||||
align-items: center; |
||||
|
||||
img { |
||||
width: 40px; |
||||
} |
||||
|
||||
color: #fff; |
||||
} |
||||
|
||||
.btn { |
||||
color: #36A2FF; |
||||
|
||||
span { |
||||
cursor: pointer; |
||||
} |
||||
|
||||
span:nth-child(1) { |
||||
margin-right: 24px; |
||||
} |
||||
|
||||
span:nth-child(2) { |
||||
margin-right: 40px; |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
.spin { |
||||
background: rgb(134, 131, 131, 0.2); |
||||
position: absolute; |
||||
width: 100%; |
||||
height: 100%; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
z-index: 999; |
||||
left: 0; |
||||
top: 0; |
||||
} |
@ -0,0 +1,19 @@
|
||||
<template> |
||||
<div class="box"> |
||||
登录页 |
||||
</div> |
||||
</template> |
||||
<script lang="ts" setup> |
||||
import { onMounted } from "vue"; |
||||
|
||||
|
||||
onMounted(()=>{ |
||||
|
||||
}) |
||||
|
||||
</script> |
||||
<style lang="less" scoped> |
||||
.box { |
||||
color: black; |
||||
} |
||||
</style> |
@ -0,0 +1,25 @@
|
||||
{ |
||||
"compilerOptions": { |
||||
"target": "ES2020", |
||||
"useDefineForClassFields": true, |
||||
"module": "ESNext", |
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"], |
||||
"skipLibCheck": true, |
||||
|
||||
/* Bundler mode */ |
||||
"moduleResolution": "bundler", |
||||
"allowImportingTsExtensions": true, |
||||
"resolveJsonModule": true, |
||||
"isolatedModules": true, |
||||
"noEmit": true, |
||||
"jsx": "preserve", |
||||
|
||||
/* Linting */ |
||||
"strict": true, |
||||
"noUnusedLocals": true, |
||||
"noUnusedParameters": true, |
||||
"noFallthroughCasesInSwitch": true |
||||
}, |
||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], |
||||
"references": [{ "path": "./tsconfig.node.json" }] |
||||
} |
@ -0,0 +1,10 @@
|
||||
{ |
||||
"compilerOptions": { |
||||
"composite": true, |
||||
"skipLibCheck": true, |
||||
"module": "ESNext", |
||||
"moduleResolution": "bundler", |
||||
"allowSyntheticDefaultImports": true |
||||
}, |
||||
"include": ["vite.config.ts"] |
||||
} |
Loading…
Reference in new issue