瀏覽代碼

添加应用参数

zhaoke 3 年之前
父節點
當前提交
589307b27b

+ 3 - 1
src/api/login.js

@@ -5,6 +5,7 @@ export function GetCheckCode (params) {
     return request({
         url: '/api/fs4a/GetCheckCode/v1',
         method: 'post',
+        islogin: true
         // data: params
     })
 }
@@ -14,7 +15,8 @@ export function login (params) {
     return request({
         url: '/api/fs4a/Login/v1',
         method: 'post',
-        data: params
+        data: params,
+        islogin: true
     })
 }
 

+ 1 - 0
src/api/systemConfiguration.js

@@ -54,6 +54,7 @@ export function GetSystemSet (params) {
   return request({
     url: '/api/fs4a/GetSystemSet/v1',
     method: 'post',
+    islogin: true
     // data: params,
     // proxy: true
   })

+ 9 - 9
src/router/routes/routes-file-five.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-01-06 10:05:44
- * @LastEditTime: 2022-02-28 15:55:02
+ * @LastEditTime: 2022-02-28 21:31:43
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \src\router\routes\routes-file-five.js
@@ -9,19 +9,19 @@
 import Layout from '@/layout'
 
 const accountGroupRoutes = {
-  path: 'accountGroup',
+  path: '/accountGroup',
   component: Layout,
-  meta: { roles: ['group_menu'] },
+  meta: { roles: ['group_menu'], title: '账号组管理' },
   children: [
     {
-      path: 'accountGroup',
+      path: '/accountGroup',
       component: () => import('@/views/accountGroupManagement/index'),
       meta: {
         title: '账号组管理'
       },
       children: [
         {
-          path: 'accountGroup',
+          path: '/accountGroup',
           name: 'accountGroupHome',
           component: () => import('@/views/accountGroupManagement/components/accountGroupHome'),
           meta: {
@@ -52,12 +52,12 @@ const accountGroupRoutes = {
 }
 
 const accountRoutes = {
-  path: 'account',
+  path: '/account',
   component: Layout,
-  meta: { roles: ['account_menu'] },
+  meta: { roles: ['account_menu'], title: '账号管理' },
   children: [
     {
-      path: 'account',
+      path: '/account',
       name: '',
       component: () => import('@/views/accountManagement'),
       meta: {
@@ -65,7 +65,7 @@ const accountRoutes = {
       },
       children: [
         {
-          path: 'account',
+          path: '/account',
           name: 'accountHome',
           component: () => import('@/views/accountManagement/components/accountHome'),
           meta: {

+ 19 - 19
src/router/routes/routes-file-four.js

@@ -1,34 +1,34 @@
 /*
  * @Author: your name
  * @Date: 2022-01-06 10:05:44
- * @LastEditTime: 2022-02-28 16:01:19
+ * @LastEditTime: 2022-02-28 21:31:58
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \vue-admin-template\src\router\routes\routes-file-four.js
  */
 import Layout from '@/layout'
 
-const auditRoutes = {
-  path: '/audit',
-  component: Layout,
-  redirect: '/dashboard',
-  hidden: true,
-  children: [
-    {
-      path: '',
-      name: 'Audit',
-      component: () => import('@/views/audit'),
-      meta: { title: '审计管理' }
-    }
-  ]
-}
+// const auditRoutes = {
+//   path: '/audit',
+//   component: Layout,
+//   redirect: '/dashboard',
+//   hidden: true,
+//   children: [
+//     {
+//       path: '',
+//       name: 'Audit',
+//       component: () => import('@/views/audit'),
+//       meta: { title: '审计管理' }
+//     }
+//   ]
+// }
 
 const systemManagementRoutes = {
-  path: 'systemManagement',
+  path: '/systemManagement',
   component: Layout,
-  meta: { roles: ['system_menu'] },
+  meta: { roles: ['system_menu'], title: '系统管理' },
   children: [{
-    path: 'systemManagement',
+    path: '/systemManagement',
     name: 'systemManagement',
     component: () => import('@/views/systemManagement/index'),
     meta: {
@@ -79,6 +79,6 @@ const systemManagementRoutes = {
 }
 
 export default [
-  auditRoutes,
+  // auditRoutes,
   systemManagementRoutes
 ]

+ 10 - 10
src/router/routes/routes-file-one.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-10-21 09:31:21
- * @LastEditTime: 2022-02-28 15:50:41
+ * @LastEditTime: 2022-02-28 21:32:37
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \Foshan4A\src\router\routes\routes-file-one.js
@@ -13,7 +13,7 @@ const dashboardRoutes = {
   path: '/',
   component: Layout,
   redirect: '/dashboard',
-  meta: { roles: ['dashboard'] },
+  meta: { roles: ['dashboard'], title: '首页' },
   children: [{
     path: 'dashboard',
     name: 'Dashboard',
@@ -24,16 +24,16 @@ const dashboardRoutes = {
 
 //权限管理
 const authorityRoutes = {
-  path: 'authority',
+  path: '/authority',
   component: Layout,
-  meta: { roles: ['authority_menu'] },
+  meta: { roles: ['authority_menu'], title: '权限项管理', },
   children: [{
-    path: 'authority',
+    path: '/authority',
     component: () => import('@/views/authorityManagement/index'),
     meta: { title: '权限管理', icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' },
     children: [
       {
-        path: 'authority',
+        path: '/authority',
         name: 'AuthorityHome',
         component: () => import('@/views/authorityManagement/components/authorityHome'),
         meta: { title: '权限项管理', roles: ['authority_page'], icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' }
@@ -68,16 +68,16 @@ const authorityRoutes = {
 
 //角色管理
 const roleRoutes = {
-  path: 'role',
+  path: '/role',
   component: Layout,
-  meta: { roles: ['role_menu'] },
+  meta: { roles: ['role_menu'], title: '角色管理' },
   children: [{
-    path: 'role',
+    path: '/role',
     component: () => import('@/views/authorityManagement/components/authorityRole'),
     meta: { title: '角色管理', icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' },
     children: [
       {
-        path: 'role',
+        path: '/role',
         name: 'AuthorityRoleHome',
         component: () => import('@/views/authorityManagement/components/authorityRoleHome'),
         meta: { title: '角色管理', roles: ['role_page'], icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' }

+ 4 - 4
src/router/routes/routes-file-three.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-01-06 13:45:09
- * @LastEditTime: 2022-02-28 16:03:09
+ * @LastEditTime: 2022-02-28 21:32:55
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \Foshan4A3.0\src\router\routes\routes-file-two.js
@@ -17,12 +17,12 @@
 import Layout from '@/layout'
 
 const organizationRoutes = {
-  path: 'jobs',
+  path: '/jobs',
   component: Layout,
-  meta: { roles: ['job_menu'] },
+  meta: { roles: ['job_menu'], title: '岗位管理' },
   children: [
     {
-      path: 'jobs',
+      path: '/jobs',
       name: 'Jobs',
       component: () => import('@/views/jobsManagement/list.vue'),
       meta: { title: '岗位管理', roles: ['job_page'] }

+ 6 - 6
src/router/routes/routes-file-two.js

@@ -1,7 +1,7 @@
 /*
  * @Author: zk
  * @Date: 2022-01-06 13:45:09
- * @LastEditTime: 2022-02-28 16:04:59
+ * @LastEditTime: 2022-02-28 21:33:09
  * @LastEditors: Please set LastEditors
  * @Description: 组织管理路由
  * @FilePath: \Foshan4A3.0\src\router\routes\routes-file-two.js
@@ -9,18 +9,18 @@
 import Layout from '@/layout'
 
 const organizationRoutes = {
-  path: 'organization',
+  path: '/organization',
   component: Layout,
-  meta: { roles: ['organ_menu'] },
+  meta: { roles: ['organ_menu'], title: '组织管理' },
   children: [
     {
-      path: 'organization',
+      path: '/organization',
       name: 'Organization',
       component: () => import('@/views/organizationManagement/index'),
       meta: { title: '组织管理' },
       children: [
         {
-          path: 'organization',
+          path: '/organization',
           name: 'OrganizationHome',
           component: () => import('@/views/organizationManagement/components/organizationHome'),
           meta: { title: '组织管理', roles: ['organ_page'], icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' }
@@ -45,7 +45,7 @@ const organizationRoutes = {
 const staffRoutes = {
   path: 'staff',
   component: Layout,
-  meta: { roles: ['officer_menu'] },
+  meta: { roles: ['officer_menu'], title: '职员管理' },
   children: [
     {
       path: 'staff',

+ 7 - 12
src/utils/request.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-01-06 09:45:17
- * @LastEditTime: 2022-02-28 18:00:46
+ * @LastEditTime: 2022-02-28 22:50:39
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \vue-admin-template\src\utils\request.js
@@ -30,22 +30,17 @@ service.interceptors.request.use(
   config => {
     if (config.istoken) {
       config.headers['appSecret'] = PLATFROM_CONFIG.appSecret
-    }
-    // config.headers.common["content-type"] = "application/json"
-    if (config.data) {
-      config.data['OperatorId'] = getUserId()
-    }
-    if (getCodeToken() && !config.istoken) {
-      config.headers['code'] = getCodeToken()
-    }
-    // do something before request is sent
-    // config.headers['Content-Type'] = 'text/plain'
-    if (store.getters.token) {
+    } else if (getCodeToken() && !config.istoken && config.islogin) {
+      config.headers['token'] = getCodeToken()
+    } else if (store.getters.token) {
       // let each request carry token
       // ['X-Token'] is a custom headers key
       // please modify it according to the actual situation
       config.headers['Token'] = getToken()
     }
+    if (config.data) {
+      config.data['OperatorId'] = getUserId()
+    }
     return config
   },
   error => {

+ 91 - 37
src/views/authorityManagement/components/authorityAppAdd.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-29 09:18:04
- * @LastEditTime: 2022-01-07 15:41:31
+ * @LastEditTime: 2022-02-28 23:05:18
  * @LastEditors: Please set LastEditors
  * @Description: 新增/编辑应用
  * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\addApp.vue
@@ -20,49 +20,64 @@
         <el-form ref="form" class="form" :rules="rules" :model="form">
           <div class="flex">
             <el-form-item prop="name" label="应用名称">
-              <el-input
-                placeholder="请输入应用名称"
-                maxlength="32"
-                v-model="form.name"
-              ></el-input>
+              <el-input placeholder="请输入应用名称" maxlength="32" v-model="form.name"></el-input>
             </el-form-item>
-            <!-- <el-form-item label="APPID">
-              <el-input placeholder="请输入APPID" v-model="form.id"></el-input>
+            <el-form-item label="请求类型">
+              <el-select v-model="form.id" placeholder="请求类型">
+                <el-option label="get" :value="1"></el-option>
+                <el-option label="post" :value="2"></el-option>
+              </el-select>
+              <!-- <el-input placeholder="请输入APPID" v-model="form.id"></el-input> -->
+            </el-form-item>
+            <el-form-item label="参数类型">
+              <!-- <el-select v-model="form.app" placeholder="参数类型">
+                <el-option label="header" value="1"></el-option>
+                <el-option label="body" value="2"></el-option>
+              </el-select> -->
+              <el-input placeholder="请输入参数类型" v-model="form.app"></el-input>
             </el-form-item>
-            <el-form-item label="APPSECRET">
-              <el-input placeholder="请输入APPSECRET" v-model="form.app"></el-input>
-            </el-form-item> -->
           </div>
           <el-form-item class="url" prop="url" label="应用地址">
-            <el-input
-              placeholder="请输入应用地址"
-              maxlength="200"
-              v-model="form.url"
-            ></el-input>
+            <el-input placeholder="请输入应用地址" maxlength="200" v-model="form.url"></el-input>
           </el-form-item>
           <el-form-item class="content" prop="content" label="描述">
-            <el-input
-              type="textarea"
-              maxlength="200"
-              rows="3"
-              placeholder="请输入描述"
-              v-model="form.content"
-            ></el-input>
+            <el-input type="textarea" maxlength="200" rows="3" placeholder="请输入描述" v-model="form.content"></el-input>
           </el-form-item>
         </el-form>
+        <div class="addApp-form-title domain-title flex">
+          <div class="title">参数管理</div>
+          <div class="btn">
+            <el-button @click="addDomain" type="primary">新增</el-button>
+          </div>
+        </div>
+        <div class="addApp-form-content domain">
+          <el-form :model="dynamicValidateForm" ref="dynamicValidateForm" label-width="85px" class="demo-dynamic">
+            <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="domain.AppInputName"></el-input>
+                </el-form-item>
+                <el-form-item label="参数类型" :prop="'domains.' + index + '.type'">
+                  <el-input placeholder="请输入参数类型" v-model="domain.AppInputType"></el-input>
+                </el-form-item>
+                <el-form-item label="参数位置" :prop="'domains.' + index + '.place'">
+                  <el-input placeholder="请输入参数位置" v-model="domain.AppInputSite"></el-input>
+                </el-form-item>
+              </div>
+              <div>
+                <el-button size="small" type="danger" @click.prevent="removeDomain(domain)">删除</el-button>
+              </div>
+            </div>
+          </el-form>
+        </div>
       </div>
     </div>
     <!--上传logo-->
     <div class="addApp-upload">
-      <div class="flex">
+      <div class="flex-wrap">
         <div class="upload">
           <div class="title">上传Logo</div>
-          <el-upload
-            action="https://jsonplaceholder.typicode.com/posts/"
-            list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
-            :on-remove="handleRemove"
-          >
+          <el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
             <i class="el-icon-plus"></i>
           </el-upload>
         </div>
@@ -79,7 +94,7 @@
 import { SaveApp } from "@/api/apiAuthority";
 export default {
   name: "Addapp",
-  data() {
+  data () {
     return {
       form: {
         //应用表单
@@ -98,23 +113,33 @@ export default {
       type: null, //参数类型
       dialogImageUrl: "",
       dialogVisible: false,
+      dynamicValidateForm: {
+        domains: [{
+          AppInputName: '',
+          AppInputType: '',
+          AppInputSite: ''
+        }]
+      },
     };
   },
   methods: {
-    handleRemove(file, fileList) {
+    handleRemove (file, fileList) {
       console.log(file, fileList);
     },
-    handlePictureCardPreview(file) {
+    handlePictureCardPreview (file) {
       this.dialogImageUrl = file.url;
       this.dialogVisible = true;
     },
     // 新增应用
-    async saveApp() {
+    async saveApp () {
       try {
         const res = await SaveApp({
           AppName: this.form.name,
           AppDesc: this.form.content,
           AppUrl: this.form.url,
+          RequestType: this.form.id,
+          BodyType: this.form.app,
+          Inputs: this.dynamicValidateForm.domains
         });
         if (res.code === 0) {
           this.$message.success(res.message);
@@ -132,7 +157,7 @@ export default {
      * @param {*}
      * @return {*}
      */
-    onSubmit(formName) {
+    onSubmit (formName) {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           this.saveApp();
@@ -141,6 +166,19 @@ export default {
         }
       });
     },
+    removeDomain (item) {
+      var index = this.dynamicValidateForm.domains.indexOf(item)
+      if (index !== -1) {
+        this.dynamicValidateForm.domains.splice(index, 1)
+      }
+    },
+    addDomain () {
+      this.dynamicValidateForm.domains.push({
+        AppInputName: '',
+        AppInputType: '',
+        AppInputSite: ''
+      });
+    }
   },
 };
 </script>
@@ -150,7 +188,7 @@ export default {
   padding: 0 64px;
   padding-top: 32px;
   .addApp-form {
-    width: 920px;
+    flex: 1;
     background: #ffffff;
     box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
     border-radius: 16px;
@@ -197,9 +235,24 @@ export default {
         }
       }
     }
+    .domain {
+      ::v-deep .demo-dynamic {
+        .el-input__inner {
+          height: 32px;
+          line-height: 32px;
+        }
+        .el-button--danger {
+          position: relative;
+          top: 4px;
+        }
+      }
+    }
+    .domain-title {
+      margin-top: 56px;
+    }
   }
   .addApp-upload {
-    width: 425px;
+    width: 767px;
     background: #ffffff;
     box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
     border-radius: 16px;
@@ -224,6 +277,7 @@ export default {
       }
     }
     .preview {
+      margin-left: 40px;
       .box {
         width: 160px;
         height: 160px;

+ 96 - 50
src/views/authorityManagement/components/authorityAppEdit.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-29 09:18:04
- * @LastEditTime: 2022-01-07 15:48:47
+ * @LastEditTime: 2022-02-28 23:07:09
  * @LastEditors: Please set LastEditors
  * @Description: 新增/编辑应用
  * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\addApp.vue
@@ -30,57 +30,60 @@
         <el-form ref="form" class="form" :rules="rules" :model="form">
           <div class="flex">
             <el-form-item prop="name" label="应用名称">
-              <el-input
-                placeholder="请输入应用名称"
-                maxlength="32"
-                v-model="form.name"
-              ></el-input>
+              <el-input placeholder="请输入应用名称" maxlength="32" v-model="form.name"></el-input>
             </el-form-item>
-            <el-form-item label="APPID">
-              <el-input
-                placeholder="请输入APPID"
-                disabled
-                v-model="form.id"
-              ></el-input>
+            <el-form-item label="请求类型">
+              <el-select v-model="form.id" placeholder="请求类型">
+                <el-option label="get" :value="1"></el-option>
+                <el-option label="post" :value="2"></el-option>
+              </el-select>
+              <!-- <el-input placeholder="请输入APPID" disabled v-model="form.id"></el-input> -->
             </el-form-item>
-            <el-form-item label="APPSECRET">
-              <el-input
-                placeholder="请输入APPSECRET"
-                disabled
-                v-model="form.app"
-              ></el-input>
+            <el-form-item label="参数类型">
+              <el-input placeholder="请输入参数类型" v-model="form.app"></el-input>
             </el-form-item>
           </div>
           <el-form-item class="url" prop="url" label="应用地址">
-            <el-input
-              placeholder="请输入应用地址"
-              maxlength="200"
-              v-model="form.url"
-            ></el-input>
+            <el-input placeholder="请输入应用地址" maxlength="200" v-model="form.url"></el-input>
           </el-form-item>
           <el-form-item prop="content" class="content" label="描述">
-            <el-input
-              type="textarea"
-              maxlength="200"
-              rows="3"
-              placeholder="请输入描述"
-              v-model="form.content"
-            ></el-input>
+            <el-input type="textarea" maxlength="200" rows="3" placeholder="请输入描述" v-model="form.content"></el-input>
           </el-form-item>
         </el-form>
+        <div class="addApp-form-title domain-title flex">
+          <div class="title">参数管理</div>
+          <div class="btn">
+            <el-button @click="addDomain" type="primary">新增</el-button>
+          </div>
+        </div>
+        <div class="addApp-form-content domain">
+          <el-form :model="dynamicValidateForm" ref="dynamicValidateForm" label-width="85px" class="demo-dynamic">
+            <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="domain.AppInputName"></el-input>
+                </el-form-item>
+                <el-form-item label="参数类型" :prop="'domains.' + index + '.type'">
+                  <el-input placeholder="请输入参数类型" v-model="domain.AppInputType"></el-input>
+                </el-form-item>
+                <el-form-item label="参数位置" :prop="'domains.' + index + '.place'">
+                  <el-input placeholder="请输入参数位置" v-model="domain.AppInputSite"></el-input>
+                </el-form-item>
+              </div>
+              <div>
+                <el-button size="small" type="danger" @click.prevent="removeDomain(domain)">删除</el-button>
+              </div>
+            </div>
+          </el-form>
+        </div>
       </div>
     </div>
     <!--上传logo-->
     <div class="addApp-upload">
-      <div class="flex">
+      <div class="flex-wrap">
         <div class="upload">
           <div class="title">上传Logo</div>
-          <el-upload
-            action="https://jsonplaceholder.typicode.com/posts/"
-            list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
-            :on-remove="handleRemove"
-          >
+          <el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
             <i class="el-icon-plus"></i>
           </el-upload>
         </div>
@@ -102,7 +105,7 @@ import {
 } from "@/api/apiAuthority";
 export default {
   name: "Addapp",
-  data() {
+  data () {
     return {
       form: {
         //应用表单
@@ -122,36 +125,46 @@ export default {
       type: null, //参数类型
       dialogImageUrl: "",
       dialogVisible: false,
+      dynamicValidateForm: {
+        domains: [{
+          AppInputName: '',
+          AppInputType: '',
+          AppInputSite: ''
+        }]
+      },
     };
   },
-  created() {
+  created () {
     const { AuthId, Status } = this.$route.query;
     this.radio = Status;
     this.AppId = AuthId;
     this.getAppDetails(AuthId);
   },
   methods: {
-    handleRemove(file, fileList) {
+    handleRemove (file, fileList) {
       console.log(file, fileList);
     },
-    handlePictureCardPreview(file) {
+    handlePictureCardPreview (file) {
       this.dialogImageUrl = file.url;
       this.dialogVisible = true;
     },
     //获取应用详情
-    async getAppDetails(id) {
+    async getAppDetails (id) {
       try {
         const res = await GetAppDetails({
           AppId: id,
         });
         if (res.code === 0) {
-          const { AppName, AppShowId, AppShowSecret, AppDesc, AppUrl } =
+          const { AppName, AppShowId, AppShowSecret, AppDesc, AppUrl, Inputs, RequestType, BodyType } =
             res.returnData;
           this.form.name = AppName;
-          this.form.id = AppShowId;
-          this.form.app = AppShowSecret;
+          // this.form.id = AppShowId;
+          // this.form.app = AppShowSecret;
+          this.form.id = RequestType;
+          this.form.app = BodyType;
           this.form.content = AppDesc;
           this.form.url = AppUrl;
+          this.dynamicValidateForm.domains = Inputs;
         } else {
           this.$message.error(res.message);
         }
@@ -160,7 +173,7 @@ export default {
       }
     },
     //应用状态变更
-    async handleChange(val) {
+    async handleChange (val) {
       try {
         const res = await UpdateAppStatus({
           AppId: this.AppId,
@@ -176,13 +189,16 @@ export default {
       }
     },
     //应用状态变更
-    async editApp() {
+    async editApp () {
       try {
         const res = await EditApp({
           AppId: this.AppId,
           AppDesc: this.form.content,
           AppName: this.form.name,
           AppUrl: this.form.url,
+          RequestType: this.form.id,
+          BodyType: this.form.app,
+          Inputs: this.dynamicValidateForm.domains
         });
         if (res.code === 0) {
           this.$message.success(res.message);
@@ -196,7 +212,7 @@ export default {
       }
     },
     //应用删除
-    async deleteApp() {
+    async deleteApp () {
       try {
         const res = await DeleteApp({
           AppId: this.AppId,
@@ -213,6 +229,20 @@ export default {
         console.log("出错了", error);
       }
     },
+    removeDomain (item) {
+      var index = this.dynamicValidateForm.domains.indexOf(item)
+      if (index !== -1) {
+        this.dynamicValidateForm.domains.splice(index, 1)
+      }
+    },
+    addDomain () {
+      this.dynamicValidateForm.domains.push({
+        AppInputName: '',
+        AppInputType: '',
+        AppInputSite: '',
+        AppId: this.AppId
+      });
+    }
   },
 };
 </script>
@@ -222,7 +252,7 @@ export default {
   padding: 0 64px;
   padding-top: 32px;
   .addApp-form {
-    width: 920px;
+    flex: 1;
     background: #ffffff;
     box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
     border-radius: 16px;
@@ -269,9 +299,24 @@ export default {
         }
       }
     }
+    .domain {
+      ::v-deep .demo-dynamic {
+        .el-input__inner {
+          height: 32px;
+          line-height: 32px;
+        }
+        .el-button--danger {
+          position: relative;
+          top: 4px;
+        }
+      }
+    }
+    .domain-title {
+      margin-top: 56px;
+    }
   }
   .addApp-upload {
-    width: 425px;
+    width: 767px;
     background: #ffffff;
     box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
     border-radius: 16px;
@@ -296,6 +341,7 @@ export default {
       }
     }
     .preview {
+      margin-left: 40px;
       .box {
         width: 160px;
         height: 160px;

+ 12 - 42
src/views/dashboard/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-14 17:17:53
- * @LastEditTime: 2022-02-23 18:58:46
- * @LastEditors: your name
+ * @LastEditTime: 2022-02-28 21:42:44
+ * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \Foshan4A\src\views\dashboard\index.vue
 -->
@@ -28,7 +28,7 @@
       <div class="search flex-wrap">
         <div class="search-input flex-wrap r24">
           <el-select :style="inputFlag ? 'width:150px;':'width:200px;'" @change="handleChange" v-model="select" placeholder="功能菜单">
-            <el-option v-for="(item,index) in selectArr" :key="index" :label="item.name" :value="item.value"></el-option>
+            <el-option v-for="(item,index) in routes" :key="index" :label="item.meta.title" :value="item.path"></el-option>
           </el-select>
           <el-input v-show="inputFlag" :style="inputFlag ? 'width:330px;':'width:280px;'" placeholder="如需搜索,请输入" v-model="input" class="input-with-select">
           </el-input>
@@ -62,7 +62,7 @@ export default {
       inputFlag: false,
       //搜索信息
       selectArr: [
-         {
+        {
           id: 1,
           name: "账号管理",
           value: 1,
@@ -119,7 +119,12 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(['systemSet', 'UserType', 'UserId'])
+    ...mapGetters(['systemSet', 'UserType', 'UserId']),
+    routes () {
+      const arrs = this.$store.getters.permission_routes
+      const datas = arrs.filter(item => item.meta && item.meta.title != '首页')
+      return datas
+    }
   },
   created () {
     this.isPower()
@@ -128,43 +133,8 @@ export default {
   methods: {
     //搜索-跳转
     searchByLink () {
-      const num = this.select
-      switch (num) {
-        case 1:
-          this.$router.push({ path: '/account', query: { keyWords: this.input } });
-          break;
-        case 2:
-          this.$router.push({ path: '/accountGroup', query: { keyWords: this.input } });
-          break;
-        case 3:
-          this.$router.push({ path: '/authority', query: { keyWords: this.input } });
-          break;
-        case 4:
-          this.$router.push({ path: '/role', query: { keyWords: this.input } });
-          break;
-        case 5:
-          this.$router.push({ path: '/organization', query: { keyWords: this.input } });
-          break;
-        case 6:
-          this.$router.push({ path: '/jobs', query: { keyWords: this.input } });
-          break;
-        case 7:
-          this.$router.push({ path: '/staff', query: { keyWords: this.input } });
-
-          break;
-        case 8:
-          this.$router.push({ path: '/LoginPolicy', query: { keyWords: this.input } });
-          break;
-        case 9:
-          this.$router.push('/audit');
-          break;
-        case 10:
-          this.$router.push('/systemManagement');
-          break;
-        default:
-          this.$message.warning('请选择');
-          break;
-      }
+      const url = this.select
+      this.$router.push({ path: url, query: { keyWords: this.input } });
     },
     //获取接入系统信息
     async getOthSystem () {

+ 0 - 2
src/views/login/index.vue

@@ -163,13 +163,11 @@ export default {
                     }
                     this.$router.push({ path: this.redirect || "/" });
                   } else {
-                    console.log('datas')
                     this.loading = false;
                     this.$store.dispatch("user/logout");
                     this.$message.error('当前用户获取权限失败,请联系管理员');
                   }
                 }).catch(err => {
-                  console.log(err)
                   this.loading = false;
                   this.$store.dispatch("user/logout");
                   this.$message.error('当前用户获取权限失败,请联系管理员');