Forráskód Böngészése

Merge branch 'master' of http://120.26.64.82:3000/BFFE/Foshan4A4.0

zhaoke 3 éve
szülő
commit
c670e2bb80

+ 21 - 10
src/utils/validate.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-12-13 09:43:22
- * @LastEditTime: 2022-03-16 16:51:25
+ * @LastEditTime: 2022-03-17 09:41:18
  * @LastEditors: your name
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \Foshan4A2.0\src\utils\validate.js
@@ -45,16 +45,27 @@ export function translateDataToTreeAll(data, parentKey, parentIDKey) {
   let translator = (parent, children) => {
     parent.forEach((parent) => {
       parent.children = [];
-      children.forEach((current, index) => {
-        if (current[parentKey] === parent[parentIDKey]) {
-          const temp = JSON.parse(JSON.stringify(children));
-          temp.splice(index, 1);
-          translator([current], temp);
-          typeof parent.children !== "undefined"
-            ? parent.children.push(current)
-            : (parent.children = [current]);
+      // children.forEach((current, index) => {
+      //   if (current[parentKey] === parent[parentIDKey]) {
+      //     const temp = JSON.parse(JSON.stringify(children));
+      //     temp.splice(index, 1);
+      //     translator([current], temp);
+      //     typeof parent.children !== "undefined"
+      //       ? parent.children.push(current)
+      //       : (parent.children = [current]);
+      //   }
+      // });
+      for (let i = 0; i < children.length;) {
+        if (children[i][parentKey] === parent[parentIDKey]) {
+          const temp = children.splice(i, 1)
+          typeof parent.children !== 'undefined'
+            ? parent.children.push(...temp)
+            : (parent.children = temp)
+          translator(temp, children)
+        } else {
+          i++
         }
-      });
+      }
     });
   };
   translator(parent, children);

+ 2 - 2
src/views/accountGroupManagement/components/accountGroupHome.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-08 09:27:43
- * @LastEditTime: 2022-03-16 21:06:14
+ * @LastEditTime: 2022-03-17 09:46:23
  * @LastEditors: your name
  * @Description: 用户组管理
  * @FilePath: \Foshan4A2.0\src\views\accountGroupManagement\components\home.vue
@@ -391,7 +391,7 @@ export default {
     renderChange(data) {
       const { GroupId, flag } = data
       const Status = flag ? 1 : 0
-      this.handleChange(GroupId, Status, index)
+      this.handleChange(GroupId, Status)
     },
     // 下级切换状态
     async childrenRenderChange(data, index) {

+ 3 - 12
src/views/authorityManagement/components/authorityAppAdd.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-29 09:18:04
- * @LastEditTime: 2022-03-16 20:58:21
+ * @LastEditTime: 2022-03-17 09:59:57
  * @LastEditors: your name
  * @Description: 新增/编辑应用
  * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\addApp.vue
@@ -17,7 +17,7 @@
         </div>
       </div>
       <div class="addApp-form-content dialog-public-background">
-        <el-form ref="form" class="form" :rules="rules" :model="form">
+        <el-form ref="form" class="form" :rules="rules" :model="form" label-position="right" label-width="80px">
           <div class="flex">
             <el-form-item prop="name" label="应用名称">
               <el-input placeholder="请输入应用名称" v-model.trim="form.name"></el-input>
@@ -55,7 +55,7 @@
             <div class="flex" v-for="(domain, index) in dynamicValidateForm.domains" :key="index">
               <div class="flex-wrap">
                 <el-form-item label="参数名称" :prop="'domains.' + index + '.name'">
-                  <el-input v-model.trim="domain.AppInputName"></el-input>
+                  <el-input placeholder="请输入参数名称" v-model.trim="domain.AppInputName"></el-input>
                 </el-form-item>
                 <el-form-item label="参数类型" :prop="'domains.' + index + '.type'">
                   <el-input placeholder="请输入参数类型" v-model.trim="domain.AppInputType"></el-input>
@@ -217,19 +217,10 @@ export default {
     .addApp-form-content {
       margin-top: 40px;
       ::v-deep .form {
-        .el-form-item {
-          display: flex;
-        }
         .el-input__inner {
           height: 32px;
           line-height: 32px;
         }
-        .url {
-          margin-left: 10px;
-          .el-form-item__content {
-            width: calc(100% - 70px);
-          }
-        }
         .content {
           .el-form-item__content {
             flex: 1;

+ 3 - 12
src/views/authorityManagement/components/authorityAppEdit.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-29 09:18:04
- * @LastEditTime: 2022-03-16 20:58:20
+ * @LastEditTime: 2022-03-17 10:04:34
  * @LastEditors: your name
  * @Description: 新增/编辑应用
  * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\addApp.vue
@@ -27,7 +27,7 @@
         </div>
       </div>
       <div class="addApp-form-content dialog-public-background">
-        <el-form ref="form" class="form" :rules="rules" :model="form">
+        <el-form ref="form" class="form" :rules="rules" :model="form" label-position="right" label-width="80px">
           <div class="flex">
             <el-form-item prop="name" label="应用名称">
               <el-input placeholder="请输入应用名称" v-model.trim="form.name"></el-input>
@@ -61,7 +61,7 @@
             <div class="flex" v-for="(domain, index) in dynamicValidateForm.domains" :key="index">
               <div class="flex-wrap">
                 <el-form-item label="参数名称" :prop="'domains.' + index + '.name'">
-                  <el-input v-model.trim="domain.AppInputName"></el-input>
+                  <el-input placeholder="请输入参数名称" v-model.trim="domain.AppInputName"></el-input>
                 </el-form-item>
                 <el-form-item label="参数类型" :prop="'domains.' + index + '.type'">
                   <el-input placeholder="请输入参数类型" v-model.trim="domain.AppInputType"></el-input>
@@ -290,19 +290,10 @@ export default {
     .addApp-form-content {
       margin-top: 40px;
       ::v-deep .form {
-        .el-form-item {
-          display: flex;
-        }
         .el-input__inner {
           height: 32px;
           line-height: 32px;
         }
-        .url {
-          margin-left: 10px;
-          .el-form-item__content {
-            width: calc(100% - 70px);
-          }
-        }
         .content {
           .el-form-item__content {
             flex: 1;