diff --git a/.env.development b/.env.development index bd4879f..bab718f 100644 --- a/.env.development +++ b/.env.development @@ -2,4 +2,6 @@ NODE_ENV = 'development' # 本地环境接口地址(/api/index.ts文件中使用) -VITE_API_URL = '/api' +# VITE_API_URL = 'http://192.168.34.122:6688' + +VITE_API_URL = 'http://139.9.66.234:6688' diff --git a/src/api/config/servicePort.ts b/src/api/config/servicePort.ts index e7f3cca..2541f5b 100644 --- a/src/api/config/servicePort.ts +++ b/src/api/config/servicePort.ts @@ -1,3 +1,3 @@ // * 后端微服务端口名 -export const PORT1 = "http://139.9.66.234:6688"; -export const PORT2 = "http://192.168.34.122:6688"; +export const PORT1 = "http://192.168.34.122:6688"; +export const PORT2 = "http://139.9.66.234:6688"; diff --git a/src/api/modules/jxjview.ts b/src/api/modules/jxjview.ts index 11a5161..df60246 100644 --- a/src/api/modules/jxjview.ts +++ b/src/api/modules/jxjview.ts @@ -1,8 +1,10 @@ // import { ResPage, User } from "@/api/interface/index"; import { ResPage, User } from "@/api/types/common"; -import { PORT1 } from "@/api/config/servicePort"; +// import { PORT1 } from "@/api/config/servicePort"; import http from "@/api"; +const PORT1 = import.meta.env.VITE_API_URL; + /** * @name 用户管理模块 */ @@ -65,7 +67,7 @@ export const getDictionaryList = (params: User.ReqUserParams) => { // 查询detail export const getDictionaryDetail = (params: User.ReqUserParams) => { - return http.post>(PORT1 + `/xmgl/systemDictData/page`, params); + return http.post>(PORT1 + `/xmgl/systemDictData/page`, params); }; // 查询字典 export const getDicList = (params: User.ReqUserParams) => { @@ -75,7 +77,7 @@ export const getDicList = (params: User.ReqUserParams) => { export const addDictionary = (params: FormData) => { return http.post(PORT1 + `/xmgl/systemDictType/add`, params); }; - +// 字典类型新增 export const addDiaDictionary = (params: FormData) => { return http.post(PORT1 + `/xmgl/systemDictData/add`, params); }; @@ -85,6 +87,10 @@ export const editDictionary = (params: { id: string }) => { return http.post(PORT1 + `/xmgl/systemDictType/edit`, params); }; +// 字典数据的编辑用户 +export const editDiaDictionary = (params: { id: string }) => { + return http.post(PORT1 + `/xmgl/systemDictData/edit`, params); +}; // * 删除用户 export const deleteDictionary = (params: { id: number }) => { return http.post(PORT1 + `/xmgl/systemDictType/delete`, params); @@ -95,7 +101,7 @@ export const deleteDia = (params: { id: number }) => { return http.post(PORT1 + `/xmgl/systemDictData/delete`, params); }; -// app管理 +// app管理 !!!!!!!!!!!!!!!!!!!!! export const getAppList = (params: User.ReqUserParams) => { return http.post>(PORT1 + `/xmgl/appVersion/page`, params); }; @@ -137,11 +143,11 @@ export const deleteMunu = (params: { id: number }) => { return http.post(PORT1 + `/xmgl/baseModule/delete`, params); }; // 删除系统菜单信息 -export const deletesysMenu = (params: { menuId: number }) => { +export const deletesysMenu = (params: { menuId: number | string }) => { return http.post(PORT1 + `/xmgl/baseMenu/delete`, params); }; // 菜单管理的表格查询 -export const menuList = (params: { moduleId: string }) => { +export const menuList = (params: { moduleId: string | number }) => { return http.post>(PORT1 + `/xmgl/baseMenu/list`, params); }; // 获取菜单下所有操作 点击按钮管理的table diff --git a/src/api/modules/login.ts b/src/api/modules/login.ts index 0b6a65d..5417ed8 100644 --- a/src/api/modules/login.ts +++ b/src/api/modules/login.ts @@ -1,5 +1,5 @@ import { Login } from "@/api/interface/index"; -import { PORT1 } from "@/api/config/servicePort"; +// import { PORT1 } from "@/api/config/servicePort"; import DynamicRouter from "@/assets/json/dynamicRouter.json"; import AuthButtons from "@/assets/json/authButtons.json"; import qs from "qs"; @@ -9,6 +9,9 @@ import http from "@/api"; * @name 登录模块 */ // * 用户登录 + +const PORT1 = import.meta.env.VITE_API_URL; + export const loginApi = (params: Login.ReqLoginForm) => { return http.post(PORT1 + `/xmgl/systemUser/login`, params, { headers: { noLoading: true } }); // 正常 post json 请求 ==> application/json return http.post(PORT1 + `/xmgl/systemUser/login`, params, { headers: { noLoading: true } }); // 控制当前请求不显示 loading diff --git a/src/assets/iconfont/iconfont.scss b/src/assets/iconfont/iconfont.scss index 37cc3d3..8502b1b 100644 --- a/src/assets/iconfont/iconfont.scss +++ b/src/assets/iconfont/iconfont.scss @@ -11,7 +11,9 @@ cursor: pointer; } .icon-xiaoxi::before { - font-size: 21.2px; + font-size: 14px; + // width: 12px; + // height: 14px; content: "\e61f"; } .icon-zhuti::before { diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index d4143d4..3ca41c8 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -86,7 +86,7 @@ v-model="form[item.prop]" :disabled="item.disabled" :min="1" - :max="10" + :max="999" size="large" controls-position="right" :style="{ width: item.width + 'px' }" @@ -255,5 +255,8 @@ onMounted(() => { :deep(.el-select--large) { width: 100%; } + :deep(.el-input-number--large) { + width: 100%; + } } diff --git a/src/components/ProTable/index.vue b/src/components/ProTable/index.vue index e670775..9a81b58 100644 --- a/src/components/ProTable/index.vue +++ b/src/components/ProTable/index.vue @@ -30,14 +30,8 @@ - + + --> @@ -64,7 +64,7 @@ const proTable = ref(); const handleAddItem = () => { mode.value = "add"; visible.value = true; - title.value = "新增"; + title.value = "新增配置"; formData.value = reactive({}); }; @@ -72,16 +72,17 @@ const handleAddItem = () => { function handleEditItem(index: string, row: any) { mode.value = "edit"; visible.value = true; - title.value = "编辑"; + title.value = "编辑配置"; formData.value = reactive(row); } // 表格配置项 const columns: ColumnProps[] = [ - { - prop: "configId", - label: "序号" - }, + // { + // prop: "configId", + // label: "序号" + // }, + { type: "index", label: "序号", width: 80 }, { prop: "configKey", label: "配置名称", diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index 021cf32..017757b 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -107,6 +107,8 @@ const projectLogon = () => { }; onMounted(() => { + console.log(import.meta.env.VITE_API_URL); + // 监听enter事件(调用登录) document.onkeydown = (e: any) => { e = window.event || e; diff --git a/vite.config.ts b/vite.config.ts index 492094a..c8a52dc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -43,7 +43,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { // 跨域代理配置 proxy: { "/api": { - target: "http://139.9.66.234:6688", // easymock + target: viteEnv.VITE_API_URL, // easymock // target: "https://www.fastmock.site/mock/f81e8333c1a9276214bcdbc170d9e0a0", // fastmock changeOrigin: true, rewrite: path => path.replace(/^\/api/, "")