Parcourir la source

bug修复,权限管理

zouzs il y a 1 semaine
Parent
commit
8d6a8db0bd

+ 2 - 2
src/api/utils.ts

@@ -1,9 +1,9 @@
 export const baseUrlApi = (url: string) =>
   process.env.NODE_ENV === "development"
     ? `/api/${url}`
-    : `http://127.0.0.1:3000/${url}`;
+    : `http://192.168.1.168:20000/${url}`;
 
 export const interfaceUrlApi = (url: string) =>
   process.env.NODE_ENV === "development"
     ? `/api/inPlatfrom/${url}`
-    : `http://127.0.0.1:3000/${url}`;
+    : `http://192.168.1.168:20000/${url}`;

+ 1 - 1
src/components/ExportView/index.vue

@@ -309,8 +309,8 @@ const handleExport = async () => {
 <style scoped>
 .dialog-footer {
   display: flex;
-  justify-content: flex-end;
   gap: 12px;
+  justify-content: flex-end;
 }
 
 :deep(.el-form-item__label) {

+ 1 - 2
src/main.ts

@@ -63,8 +63,7 @@ getPlatformConfig(app).then(async config => {
   app.use(router);
   await router.isReady();
   injectResponsiveStorage(app, config);
-  app.use(MotionPlugin).use(useElementPlus).use(Table);
-  // .use(PureDescriptions)
+  app.use(MotionPlugin).use(useElementPlus).use(Table).use(PureDescriptions);
   // .use(useEcharts);
   app.mount("#app");
 });

+ 1 - 2
src/router/index.ts

@@ -22,8 +22,7 @@ import {
   findRouteByPath,
   handleAliveRoute,
   formatTwoStageRoutes,
-  formatFlatteningRoutes,
-  addPathMatch
+  formatFlatteningRoutes
 } from "./utils";
 import {
   type Router,

+ 9 - 27
src/views/ipAccount/ipAccountInterface.vue

@@ -42,21 +42,17 @@
       @confirm="handleSubmit"
       @close="handleClose"
     />
-    <PlusDialog v-model="detailsVisible" title="密钥" width="400">
+    <PlusDialog
+      v-model="detailsVisible"
+      :hasFooter="false"
+      title="密钥"
+      width="400"
+    >
       <PlusDescriptions
         :column="24"
         :columns="descriptionsColumns"
         :data="descriptionsData"
       />
-      <template #footer>
-        <el-button
-          size="small"
-          type="primary"
-          @click="handleCopy(descriptionsData)"
-        >
-          一键复制
-        </el-button>
-      </template>
     </PlusDialog>
   </div>
 </template>
@@ -84,15 +80,13 @@ import {
   getIpInterfaceOptionList
 } from "@/api/system/ipInterface";
 import { isString } from "@pureadmin/utils";
-import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
-import { useRouter, useRoute } from "vue-router";
+import { useRoute } from "vue-router";
 
 defineOptions({
   name: "IpAccountIndex"
 });
 
 const route = useRoute();
-const router = useRouter();
 
 onMounted(() => {
   getInterfaceOptions();
@@ -418,6 +412,7 @@ const descriptionsColumns: PlusColumn[] = [
   {
     label: "token",
     prop: "token",
+    valueType: "copy",
     descriptionsItemProps: {
       span: 24,
       className: "break-all"
@@ -426,6 +421,7 @@ const descriptionsColumns: PlusColumn[] = [
   {
     label: "secret",
     prop: "secret",
+    valueType: "copy",
     descriptionsItemProps: {
       span: 24,
       className: "break-all"
@@ -484,20 +480,6 @@ const handleClose = () => {
   console.log(dialogForm.value.formInstance);
 };
 
-const handleCopy = (params: any) => {
-  copy(JSON.stringify(params));
-  ElMessage.success("复制成功");
-};
-
-const copy = (text: string) => {
-  let input = document.createElement("input");
-  input.value = text;
-  document.body.appendChild(input);
-  input.select();
-  document.execCommand("Copy");
-  document.body.removeChild(input);
-};
-
 const { buttons } = useTable();
 
 buttons.value = [

+ 8 - 31
src/views/ipInterface/index.vue

@@ -39,21 +39,17 @@
       @confirm="handleSubmit"
       @close="handleClose"
     />
-    <PlusDialog v-model="detailsVisible" title="接口配置" width="500">
+    <PlusDialog
+      v-model="detailsVisible"
+      :hasFooter="false"
+      title="接口配置"
+      width="500"
+    >
       <PlusDescriptions
         :column="24"
         :columns="descriptionsColumns"
         :data="descriptionsData"
       />
-      <template #footer>
-        <el-button
-          size="small"
-          type="primary"
-          @click="handleCopy(descriptionsData)"
-        >
-          一键复制
-        </el-button>
-      </template>
     </PlusDialog>
   </div>
 </template>
@@ -72,9 +68,6 @@ import {
   PlusPageInstance,
   useTable
 } from "plus-pro-components";
-import { isString } from "@pureadmin/utils";
-import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
-import { useRouter } from "vue-router";
 import {
   addOrEditIpInterface,
   deleteIpInterface,
@@ -86,8 +79,6 @@ defineOptions({
   name: "IpInterfaceIndex"
 });
 
-const router = useRouter();
-
 const plusPageInstance = ref<PlusPageInstance | null>(null);
 
 const getList = async (query: Record<string, any>) => {
@@ -103,7 +94,7 @@ const refresh = () => {
   plusPageInstance.value?.getList();
 };
 
-const handleTableChange = (values: FieldValues) => {
+const handleTableChange = (values: any) => {
   console.log(values);
   ElMessageBox.confirm("确定修改此数据吗?", "提示", {
     confirmButtonText: "确定",
@@ -286,6 +277,7 @@ const descriptionsColumns: PlusColumn[] = [
   {
     label: "接口配置",
     prop: "interfaceConfig",
+    valueType: "copy",
     descriptionsItemProps: {
       span: 24,
       className: "break-all"
@@ -344,21 +336,6 @@ const handleClose = () => {
   console.log(dialogForm.value.formInstance);
 };
 
-const handleCopy = (params: any) => {
-  console.log(params);
-  copy(JSON.stringify(params.interfaceConfig));
-  ElMessage.success("复制成功");
-};
-
-const copy = (text: string) => {
-  let input = document.createElement("input");
-  input.value = text;
-  document.body.appendChild(input);
-  input.select();
-  document.execCommand("Copy");
-  document.body.removeChild(input);
-};
-
 // 参数预期管理
 const normalizeParams = (params: Record<string, any>) => {
   return {

+ 10 - 10
src/views/login/index.vue

@@ -410,18 +410,18 @@ onMounted(() => {
 }
 
 .verify-code {
-  background: #d8d8d8;
-  border-radius: 5px;
-  line-height: 40px;
-  font-size: 16px;
-  text-align: center;
-  -moz-user-select: none;
-  -khtml-user-select: none;
-  user-select: none;
-  cursor: pointer;
+  float: right;
   width: 100%;
   height: 40px;
   margin-top: 1px;
-  float: right;
+  font-size: 16px;
+  line-height: 40px;
+  text-align: center;
+  cursor: pointer;
+  user-select: none;
+  user-select: none;
+  user-select: none;
+  background: #d8d8d8;
+  border-radius: 5px;
 }
 </style>