diff --git a/.env.development b/.env.development index fbfaaf5..8932f51 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,9 @@ # 开发环境的环境变量(命名必须以 VITE_ 开头) ## 后端接口地址(如果解决跨域问题采用反向代理就只需写相对路径) -VITE_BASE_URL = /api/v1 +## VITE_BASE_URL = /api/v1 + +VITE_BASE_URL = http://localhost:8000 ## 开发环境域名和静态资源公共路径(一般 / 或 ./ 都可以) VITE_PUBLIC_PATH = / diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..22cdf9b --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..c745792 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/v3-admin-vite.iml b/.idea/v3-admin-vite.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/v3-admin-vite.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/common/apis/tables/diceke/DicekeMiningrecord.ts b/src/common/apis/tables/diceke/DicekeMiningrecord.ts new file mode 100644 index 0000000..fd0fdc7 --- /dev/null +++ b/src/common/apis/tables/diceke/DicekeMiningrecord.ts @@ -0,0 +1,34 @@ +import { request } from "@/http/axios" + +/** 查 */ +export function findAllMiningrecord() { + return request({ + url: "/dicekeMiningrecord/findAllMiningrecord", + method: "get" + }) +} + +/** 删 */ +export function deletedicekeMiningrecord(recordID: number) { + return request({ + url: `/dicekeMiningrecord/deletedicekeMiningrecord/${recordID}`, + method: "delete" + }) +} + +/** 根据id查平盘信息 */ +export function finddicekeMiningrecordById(id: number) { + return request({ + url: `/dicekeMiningrecord/finddicekeMiningrecordById/${id}`, + method: "get" + }) +} + +/** 修改盘信息 */ +export function updatedicekeMiningrecord(dicekeMiningrecordform: any) { + return request({ + url: `/dicekeMiningrecord/updatedicekeMiningrecord`, + method: "post", + data: dicekeMiningrecordform + }) +} diff --git a/src/common/apis/tables/diceke/plateArea.ts b/src/common/apis/tables/diceke/plateArea.ts new file mode 100644 index 0000000..54ea9dd --- /dev/null +++ b/src/common/apis/tables/diceke/plateArea.ts @@ -0,0 +1,34 @@ +import { request } from "@/http/axios" + +/** 查 */ +export function findAllPlateArea() { + return request({ + url: "/dicekePlatearea/findAllPlateArea", + method: "get" + }) +} + +/** 删 */ +export function deletePlateArea(id: number) { + return request({ + url: `/dicekePlatearea/deletePlateArea/${id}`, + method: "delete" + }) +} + +/** 根据id查平盘信息 */ +export function findPlateAreaById(id: number) { + return request({ + url: `/dicekePlatearea/findPlateAreaById/${id}`, + method: "get" + }) +} + +/** 修改盘信息 */ +export function updatePlateAreaApi(plateAreaform: any) { + return request({ + url: `/dicekePlatearea/updatePlateArea`, + method: "post", + data: plateAreaform + }) +} diff --git a/src/common/apis/tables/diceke/shovel.ts b/src/common/apis/tables/diceke/shovel.ts new file mode 100644 index 0000000..50fd7f2 --- /dev/null +++ b/src/common/apis/tables/diceke/shovel.ts @@ -0,0 +1,34 @@ +import { request } from "@/http/axios" + +/** 查 */ +export function findAllshovel() { + return request({ + url: "/dicekeShovel/findAllShovel", + method: "get" + }) +} + +/** 删 */ +export function deleteTableDataApi(id: number) { + return request({ + url: `/dicekeShovel/deleteShovel/${id}`, + method: "delete" + }) +} + +/** 根据id查询电铲信息 */ +export function findShovelById(id: number) { + return request({ + url: `/dicekeShovel/findShovelById/${id}`, + method: "get" + }) +} + +/** 修改电铲信息 */ +export function updateshovelApi(shovelform: any) { + return request({ + url: `/dicekeShovel/updateShovel`, + method: "post", + data: shovelform + }) +} diff --git a/src/common/apis/tables/index.ts b/src/common/apis/tables/index.ts index c6f29f4..fdea5ae 100644 --- a/src/common/apis/tables/index.ts +++ b/src/common/apis/tables/index.ts @@ -30,8 +30,17 @@ export function updateTableDataApi(data: Tables.CreateOrUpdateTableRequestData) /** 查 */ export function getTableDataApi(params: Tables.TableRequestData) { return request({ - url: "tables", + url: "findAll", + // url: "tables", method: "get", params }) } +/** 查 */ +export function getTableData() { + return request({ + url: "renshi/renyuanjiegou/findAll", + // url: "tables", + method: "get" + }) +} diff --git a/src/common/assets/images/layouts/img.png b/src/common/assets/images/layouts/img.png new file mode 100644 index 0000000..40c9837 Binary files /dev/null and b/src/common/assets/images/layouts/img.png differ diff --git a/src/common/assets/images/layouts/login_background.jpg b/src/common/assets/images/layouts/login_background.jpg new file mode 100644 index 0000000..23c5d5a Binary files /dev/null and b/src/common/assets/images/layouts/login_background.jpg differ diff --git a/src/common/assets/images/layouts/logo_text-3.png b/src/common/assets/images/layouts/logo_text-3.png new file mode 100644 index 0000000..7b1532c Binary files /dev/null and b/src/common/assets/images/layouts/logo_text-3.png differ diff --git a/src/http/axios.ts b/src/http/axios.ts index a186324..84b0b4e 100644 --- a/src/http/axios.ts +++ b/src/http/axios.ts @@ -37,7 +37,7 @@ function createInstance() { return Promise.reject(new Error("非本系统的接口")) } switch (code) { - case 0: + case 20000: // 本系统采用 code === 0 来表示没有业务错误 return apiData case 401: diff --git a/src/pages/demo/diceke/DicekeMiningrecord.vue b/src/pages/demo/diceke/DicekeMiningrecord.vue new file mode 100644 index 0000000..ac2a8f3 --- /dev/null +++ b/src/pages/demo/diceke/DicekeMiningrecord.vue @@ -0,0 +1,137 @@ + + + diff --git a/src/pages/demo/diceke/PlateArea.vue b/src/pages/demo/diceke/PlateArea.vue new file mode 100644 index 0000000..01d6fe7 --- /dev/null +++ b/src/pages/demo/diceke/PlateArea.vue @@ -0,0 +1,122 @@ + + + diff --git a/src/pages/demo/diceke/shovel.vue b/src/pages/demo/diceke/shovel.vue new file mode 100644 index 0000000..fe9537e --- /dev/null +++ b/src/pages/demo/diceke/shovel.vue @@ -0,0 +1,129 @@ + + + diff --git a/src/pages/demo/rsgl/rsgl.vue b/src/pages/demo/rsgl/rsgl.vue new file mode 100644 index 0000000..3d4f1dd --- /dev/null +++ b/src/pages/demo/rsgl/rsgl.vue @@ -0,0 +1,134 @@ + + + diff --git a/src/pages/login/apis/index.ts b/src/pages/login/apis/index.ts index 3c559a3..b119ceb 100644 --- a/src/pages/login/apis/index.ts +++ b/src/pages/login/apis/index.ts @@ -4,7 +4,7 @@ import { request } from "@/http/axios" /** 获取登录验证码 */ export function getCaptchaApi() { return request({ - url: "auth/captcha", + url: "users/captcha", method: "get" }) } @@ -12,7 +12,7 @@ export function getCaptchaApi() { /** 登录并返回 Token */ export function loginApi(data: Auth.LoginRequestData) { return request({ - url: "auth/login", + url: "users/login", method: "post", data }) diff --git a/src/pages/login/apis/type.ts b/src/pages/login/apis/type.ts index 86c0e2e..bf1e482 100644 --- a/src/pages/login/apis/type.ts +++ b/src/pages/login/apis/type.ts @@ -1,10 +1,8 @@ export interface LoginRequestData { /** admin 或 editor */ - username: "admin" | "editor" + username: "" /** 密码 */ password: string - /** 验证码 */ - code: string } export type CaptchaResponseData = ApiResponseData diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 5434835..1a8cb42 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -4,8 +4,8 @@ import type { LoginRequestData } from "./apis/type" import { useSettingsStore } from "@/pinia/stores/settings" import { useUserStore } from "@/pinia/stores/user" import ThemeSwitch from "@@/components/ThemeSwitch/index.vue" -import { Key, Loading, Lock, Picture, User } from "@element-plus/icons-vue" -import { getCaptchaApi, loginApi } from "./apis" +import { Lock, User } from "@element-plus/icons-vue" +import { loginApi } from "./apis" import Owl from "./components/Owl.vue" import { useFocus } from "./composables/useFocus" @@ -23,14 +23,10 @@ const loginFormRef = ref(null) /** 登录按钮 Loading */ const loading = ref(false) -/** 验证码图片 URL */ -const codeUrl = ref("") - /** 登录表单数据 */ const loginFormData: LoginRequestData = reactive({ username: "admin", - password: "12345678", - code: "" + password: "12345678" }) /** 登录表单校验规则 */ @@ -56,31 +52,16 @@ function handleLogin() { } loading.value = true loginApi(loginFormData).then(({ data }) => { + console.log(data) userStore.setToken(data.token) router.push("/") }).catch(() => { - createCode() loginFormData.password = "" }).finally(() => { loading.value = false }) }) } - -/** 创建验证码 */ -function createCode() { - // 清空已输入的验证码 - loginFormData.code = "" - // 清空验证图片 - codeUrl.value = "" - // 获取验证码图片 - getCaptchaApi().then((res) => { - codeUrl.value = res.data - }) -} - -// 初始化验证码 -createCode()