Browse Source

HHFKJ授权账号配置

刘琳琳 1 week ago
parent
commit
e617051ac5
3 changed files with 280 additions and 5 deletions
  1. 10 0
      src/api/accountAuth.js
  2. 217 3
      src/views/dashboard/UpdateModule.vue
  3. 53 2
      src/views/dashboard/index.vue

+ 10 - 0
src/api/accountAuth.js

@@ -205,3 +205,13 @@ export function getAccountHHFaceSystemConfigList() {
   })
 }
 
+/**
+ * 枚举列表-合并
+ * @returns {*}
+ */
+export function getAuthConfigAllList() {
+  return request({
+    url: `/api/v1/auth/account/enum/common/list`,
+    method: 'post'
+  })
+}

+ 217 - 3
src/views/dashboard/UpdateModule.vue

@@ -180,7 +180,7 @@
         </el-checkbox-group>
       </div>
     </div>
-    <div class="auth-card">
+    <div class="auth-card" style="margin-bottom: 20px">
       <div style="height: 40px;line-height: 40px;display: flex;align-items: center">
         <span style="color: #333333;margin-right: 20px;font-weight: bold">HHArome权限配置</span><el-switch v-model="form.hhAromeSwitch" @change="switchChange" />
       </div>
@@ -248,6 +248,93 @@
         </el-checkbox-group>
       </div>
     </div>
+    <div class="auth-card" style="margin-bottom: 20px">
+      <div style="height: 40px;line-height: 40px;display: flex;align-items: center">
+        <span style="color: #333333;margin-right: 20px;font-weight: bold">访客机权限配置</span><el-switch v-model="form.fkjSwitch" @change="switchHHFaceChange" />
+      </div>
+      <div :style="[{maxHeight: !form.fkjSwitch ? '0px' : '1260px',transition: 'max-height 0.6s linear'}]">
+        <div style="height: 40px;line-height: 40px">
+          <span class="secondary_head">使用配置</span><el-checkbox v-model="hhFkjEnumConfig.useInfo.checkAll" class="selectAll_item" :indeterminate="hhFkjEnumConfig.useInfo.isIndeterminate" @change="handleCheckAllChange('hhFkjEnumConfig.useInfo', $event)">全选</el-checkbox>
+        </div>
+        <el-checkbox-group v-model="hhFkjEnumConfig.useInfo.checkedIdList" style="padding: 0 10px;display: flex;flex-direction:row;flex-wrap: wrap" @change="handleCheckedChange('hhFkjEnumConfig.useInfo', $event)">
+          <div v-for="dItem in hhFkjEnumConfig.useInfo.checkList" :key="dItem.code" style="display: flex;align-items: flex-start;padding: 5px">
+            <el-checkbox :label="dItem.code">
+              <span class="auth-checked-span">{{ dItem.desc }}</span>
+            </el-checkbox>
+          </div>
+        </el-checkbox-group>
+        <div style="height: 40px;line-height: 40px">
+          <span class="secondary_head">采集配置</span><el-checkbox v-model="hhFkjEnumConfig.collectInfo.checkAll" class="selectAll_item" :indeterminate="hhFkjEnumConfig.collectInfo.isIndeterminate" @change="handleCheckAllChange('hhFkjEnumConfig.collectInfo', $event)">全选</el-checkbox>
+        </div>
+        <el-checkbox-group v-model="hhFkjEnumConfig.collectInfo.checkedIdList" style="padding: 0 10px;display: flex;flex-direction:row;flex-wrap: wrap" @change="handleCheckedChange('hhFkjEnumConfig.collectInfo', $event)">
+          <div v-for="dItem in hhFkjEnumConfig.collectInfo.checkList" :key="dItem.code" style="display: flex;align-items: flex-start;padding: 5px">
+            <el-checkbox :label="dItem.code">
+              <span class="auth-checked-span">{{ dItem.desc }}</span>
+            </el-checkbox>
+          </div>
+        </el-checkbox-group>
+        <div style="height: 40px;line-height: 40px">
+          <span class="secondary_head">查询地址配置</span><el-checkbox v-model="hhFkjEnumConfig.queryAddressInfo.checkAll" class="selectAll_item" :indeterminate="hhFkjEnumConfig.queryAddressInfo.isIndeterminate" @change="handleCheckAllChange('hhFkjEnumConfig.queryAddressInfo', $event)">全选</el-checkbox>
+        </div>
+        <el-checkbox-group v-model="hhFkjEnumConfig.queryAddressInfo.checkedIdList" style="padding: 0 10px;display: flex;flex-direction:row;flex-wrap: wrap" @change="handleCheckedChange('hhFkjEnumConfig.queryAddressInfo', $event)">
+          <div v-for="dItem in hhFkjEnumConfig.queryAddressInfo.checkList" :key="dItem.code" style="display: flex;align-items: flex-start;padding: 5px">
+            <el-checkbox :label="dItem.code">
+              <span class="auth-checked-span">{{ dItem.desc }}</span>
+            </el-checkbox>
+          </div>
+        </el-checkbox-group>
+        <div style="height: 40px;line-height: 40px">
+          <span class="secondary_head">推送地址配置</span><el-checkbox v-model="hhFkjEnumConfig.pushInfo.checkAll" class="selectAll_item" :indeterminate="hhFkjEnumConfig.pushInfo.isIndeterminate" @change="handleCheckAllChange('hhFkjEnumConfig.pushInfo', $event)">全选</el-checkbox>
+        </div>
+        <el-checkbox-group v-model="hhFkjEnumConfig.pushInfo.checkedIdList" style="padding: 0 10px;display: flex;flex-direction:row;flex-wrap: wrap" @change="handleCheckedChange('hhFkjEnumConfig.pushInfo', $event)">
+          <div v-for="dItem in hhFkjEnumConfig.pushInfo.checkList" :key="dItem.code" style="display: flex;align-items: flex-start;padding: 5px">
+            <el-checkbox :label="dItem.code">
+              <span class="auth-checked-span">{{ dItem.desc }}</span>
+            </el-checkbox>
+          </div>
+        </el-checkbox-group>
+        <div style="height: 40px;line-height: 40px">
+          <span class="secondary_head">功能配置</span><el-checkbox v-model="hhFkjEnumConfig.funcInfo.checkAll" class="selectAll_item" :indeterminate="hhFkjEnumConfig.funcInfo.isIndeterminate" @change="handleCheckAllChange('hhFkjEnumConfig.funcInfo', $event)">全选</el-checkbox>
+        </div>
+        <el-checkbox-group v-model="hhFkjEnumConfig.funcInfo.checkedIdList" style="padding: 0 10px;display: flex;flex-direction:row;flex-wrap: wrap" @change="handleCheckedChange('hhFkjEnumConfig.funcInfo', $event)">
+          <div v-for="dItem in hhFkjEnumConfig.funcInfo.checkList" :key="dItem.code" style="display: flex;align-items: flex-start;padding: 5px">
+            <el-checkbox :label="dItem.code">
+              <span class="auth-checked-span">{{ dItem.desc }}</span>
+            </el-checkbox>
+          </div>
+        </el-checkbox-group>
+        <div style="height: 40px;line-height: 40px">
+          <span class="secondary_head">超时时长配置(秒)</span><el-checkbox v-model="hhFkjEnumConfig.timeoutDurationInfo.checkAll" class="selectAll_item" :indeterminate="hhFkjEnumConfig.timeoutDurationInfo.isIndeterminate" @change="handleCheckAllChange('hhFkjEnumConfig.timeoutDurationInfo', $event)">全选</el-checkbox>
+        </div>
+        <el-checkbox-group v-model="hhFkjEnumConfig.timeoutDurationInfo.checkedIdList" style="padding: 0 10px;display: flex;flex-direction:row;flex-wrap: wrap" @change="handleCheckedChange('hhFkjEnumConfig.timeoutDurationInfo', $event)">
+          <div v-for="dItem in hhFkjEnumConfig.timeoutDurationInfo.checkList" :key="dItem.code" style="display: flex;align-items: flex-start;padding: 5px">
+            <el-checkbox :label="dItem.code">
+              <span class="auth-checked-span">{{ dItem.desc }}</span>
+            </el-checkbox>
+          </div>
+        </el-checkbox-group>
+        <div style="height: 40px;line-height: 40px">
+          <span class="secondary_head">语音配置</span><el-checkbox v-model="hhFkjEnumConfig.voiceInfo.checkAll" class="selectAll_item" :indeterminate="hhFkjEnumConfig.voiceInfo.isIndeterminate" @change="handleCheckAllChange('hhFkjEnumConfig.voiceInfo', $event)">全选</el-checkbox>
+        </div>
+        <el-checkbox-group v-model="hhFkjEnumConfig.voiceInfo.checkedIdList" style="padding: 0 10px;display: flex;flex-direction:row;flex-wrap: wrap" @change="handleCheckedChange('hhFkjEnumConfig.voiceInfo', $event)">
+          <div v-for="dItem in hhFkjEnumConfig.voiceInfo.checkList" :key="dItem.code" style="display: flex;align-items: flex-start;padding: 5px">
+            <el-checkbox :label="dItem.code">
+              <span class="auth-checked-span">{{ dItem.desc }}</span>
+            </el-checkbox>
+          </div>
+        </el-checkbox-group>
+        <div style="height: 40px;line-height: 40px">
+          <span class="secondary_head">系统配置</span><el-checkbox v-model="hhFkjEnumConfig.sysInfo.checkAll" class="selectAll_item" :indeterminate="hhFkjEnumConfig.sysInfo.isIndeterminate" @change="handleCheckAllChange('hhFkjEnumConfig.sysInfo', $event)">全选</el-checkbox>
+        </div>
+        <el-checkbox-group v-model="hhFkjEnumConfig.sysInfo.checkedIdList" style="padding: 0 10px;display: flex;flex-direction:row;flex-wrap: wrap" @change="handleCheckedChange('hhFkjEnumConfig.sysInfo', $event)">
+          <div v-for="dItem in hhFkjEnumConfig.sysInfo.checkList" :key="dItem.code" style="display: flex;align-items: flex-start;padding: 5px">
+            <el-checkbox :label="dItem.code">
+              <span class="auth-checked-span">{{ dItem.desc }}</span>
+            </el-checkbox>
+          </div>
+        </el-checkbox-group>
+      </div>
+    </div>
     <div class="card-footer">
       <el-button style="width: 120px" @click="cancel"> 取消 </el-button>
       <el-button type="primary" style="width: 120px" :loading="submitLoading" @click="submit">
@@ -300,9 +387,17 @@ export default {
       type: Array,
       default: () => []
     },
+    hhAromeEnum: {
+      type: Object,
+      default: () => {}
+    },
     hhFaceEnum: {
       type: Object,
       default: () => {}
+    },
+    hhFkjEnum: {
+      type: Object,
+      default: () => {}
     }
   },
   data() {
@@ -313,7 +408,8 @@ export default {
         password: null, // 手机号
         purchaserId: null, // 购买方公司名称
         hhAromeSwitch: false, // HHArome权限配置
-        hhFaceSwitch: false // HHFace权限配置
+        hhFaceSwitch: false, // HHFace权限配置
+        fkjSwitch: false // HHFkj权限配置
       },
       rules: {
         name: [
@@ -386,6 +482,43 @@ export default {
         checkedIdList: [],
         checkList: []
       },
+      /**
+       * HHArome权限配置
+       */
+      hhAromeEnumConfig: {
+        // 设备基本信息配置枚举
+        deviceInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: [],
+          merchantPortalList: [],
+          userLibList: [],
+          merchantPortalId: [],
+          userLibId: []
+        },
+        // 推送地址配置枚举
+        pushInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        },
+        // 系统配置枚举
+        systemInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        },
+        // 使用配置枚举
+        useTimeInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        }
+      },
       /**
        * HHFace权限配置
        */
@@ -457,6 +590,67 @@ export default {
           checkedIdList: [],
           checkList: []
         }
+      },
+      /**
+       * HHFkjEnum权限配置
+       */
+      hhFkjEnumConfig: {
+        // 采集配置枚举
+        collectInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        },
+        // 功能配置枚举
+        funcInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        },
+        // 推送地址配置
+        pushInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        },
+        // 查询地址配置枚举
+        queryAddressInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        },
+        // 系统配置枚举
+        sysInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        },
+        // 超时时长配置枚举
+        timeoutDurationInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        },
+        // 使用配置枚举
+        useInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        },
+        // 语音配置枚举
+        voiceInfo: {
+          checkAll: false,
+          isIndeterminate: false,
+          checkedIdList: [],
+          checkList: []
+        }
       }
     }
   },
@@ -505,6 +699,15 @@ export default {
         this.pushInfo.checkList = newVal
       }
     },
+    hhAromeEnum: {
+      deep: true,
+      handler(newVal, oldVal) {
+        Object.keys(newVal).forEach(nItem => {
+          console.log('hhAromeEnum', nItem, this.hhAromeEnum[nItem], nItem.replace('List', ''))
+          this.hhAromeEnumConfig[nItem.replace('List', '')].checkList = this.hhAromeEnum[nItem]
+        })
+      }
+    },
     hhFaceEnum: {
       deep: true,
       handler(newVal, oldVal) {
@@ -513,6 +716,15 @@ export default {
           this.hhFaceEnumConfig[nItem.replace('List', '')].checkList = this.hhFaceEnum[nItem]
         })
       }
+    },
+    hhFkjEnum: {
+      deep: true,
+      handler(newVal, oldVal) {
+        Object.keys(newVal).forEach(nItem => {
+          console.log('hhFkjEnum', nItem, this.hhFkjEnum[nItem], nItem.replace('List', ''))
+          this.hhFkjEnumConfig[nItem.replace('List', '')].checkList = this.hhFkjEnum[nItem]
+        })
+      }
     }
   },
   methods: {
@@ -532,7 +744,8 @@ export default {
             password: '', // 密码
             purchaserId: (obj.purchaserId),
             hhAromeSwitch: obj.hhAromeSwitch,
-            hhFaceSwitch: obj.hhFaceSwitch
+            hhFaceSwitch: obj.hhFaceSwitch,
+            fkjSwitch: obj.fkjSwitch
           }
           const checkIdArr = [];
           (obj.deviceConfig || []).forEach(v => {
@@ -763,6 +976,7 @@ export default {
             pushConfig: this.pushInfo.checkedIdList || [],
 
             hhFaceSwitch: this.form.hhFaceSwitch,
+            fkjSwitch: this.form.fkjSwitch,
             hhfaceUseConfig: this.hhFaceEnumConfig.useInfo.checkedIdList || [],
             hhfaceFaceConfig: this.hhFaceEnumConfig.alipayFaceInfo.checkedIdList || [],
             hhfaceFaceConfigTenantIds: this.hhFaceEnumConfig.alipayFaceInfo.merchantPortalId || [],

+ 53 - 2
src/views/dashboard/index.vue

@@ -164,6 +164,8 @@
       :auth-type-list="authTypeList"
       :push-info-list="pushInfoList"
       :hh-face-enum="hhFaceEnum"
+      :hh-arome-enum="hhAromeEnum"
+      :hh-fkj-enum="hhFkjEnum"
       :user-lib-list="userLibList"
       @success="modalSuccess"
       @cancel="operationStatus = false"
@@ -189,7 +191,7 @@ import {
   getAccountHHFaceResultConfigList, getAccountHHFaceSystemConfigList,
   getAccountHHFaceThirdConfigList,
   getAccountHHFaceUseConfigList,
-  getAccountList,
+  getAccountList, getAuthConfigAllList,
   getList
 } from '@/api/accountAuth'
 import { getUserLibList } from '@/api/userlib'
@@ -218,6 +220,13 @@ export default {
       useTimeInfoList: [], // 使用配置枚举
       pushInfoList: [], // 推送地址配置枚举
       authTypeList: [], // 设备基本信息配置枚举
+
+      hhAromeEnum: {
+        deviceInfoList: [], // 设备基本信息配置枚举
+        pushInfoList: [], // 推送地址配置枚举
+        systemInfoList: [], // 系统配置枚举
+        useTimeInfoList: [] // 使用配置枚举
+      },
       hhFaceEnum: {
         useInfoList: [], // 使用配置枚举
         alipayFaceInfoList: [], // 支付宝人脸采集配置
@@ -229,6 +238,16 @@ export default {
         funcInfoList: [], // 功能配置枚举
         sysInfoList: [] // 系统配置枚举
       },
+      hhFkjEnum: {
+        collectInfoList: [], // 采集配置枚举
+        funcInfoList: [], // 功能配置枚举
+        pushInfoList: [], // 推送配置枚举
+        queryAddressInfoList: [], // 查询地址配置枚举
+        sysInfoList: [], // 系统配置枚举
+        timeoutDurationInfoList: [], // 超时时长配置枚举
+        useInfoList: [], // 使用配置枚举
+        voiceInfoList: [] // 语音配置枚举
+      },
       operationStatus: false,
       permissionList: [
         {
@@ -271,10 +290,11 @@ export default {
       const hhFaceFuncAxios = await getAccountHHFaceFuncConfigList()
       const hhFaceSysAxios = await getAccountHHFaceSystemConfigList()
       const userLibAxios = await getUserLibList()
+      const authConfigAxios = await getAuthConfigAllList()
       await Promise.all([
         purchaserAxios, merchantAxios, ampeAxios, accountAxios, hhAromeSysAxios, hhAromeUseAxios,
         hhAromePushAxios, hhAromeAuthAxios, hhFaceUseAxios, hhFaceFaceAxios, hhFaceCollectAxios, hhFaceThirdAxios,
-        hhFaceResultAxios, hhFaceHardwareAxios, hhFacePushAxios, hhFaceFuncAxios, hhFaceSysAxios, userLibAxios
+        hhFaceResultAxios, hhFaceHardwareAxios, hhFacePushAxios, hhFaceFuncAxios, hhFaceSysAxios, userLibAxios, authConfigAxios
       ]).then(res => {
         const purchaserAxiosRes = res[0]
         this.buyList = purchaserAxiosRes.data
@@ -337,6 +357,37 @@ export default {
             code: v.id
           }
         })
+        const authConfigAxiosRes = res[18]?.data || {}
+        this.hhAromeEnum.deviceInfoList = authConfigAxiosRes?.queryModuleTypeList?.list || [] // HHArome_设备基本信息配置枚举
+        this.hhAromeEnum.pushInfoList = authConfigAxiosRes?.queryPushConfigList?.list || [] // HHArome_推送地址配置枚举
+        this.hhAromeEnum.systemInfoList = authConfigAxiosRes?.querySystemConfigList?.list || [] // HHArome_系统配置枚举
+        this.hhAromeEnum.useTimeInfoList = authConfigAxiosRes?.queryUseConfigList?.list || [] // HHArome_使用配置枚举
+
+        this.hhFaceEnum.useInfoList = authConfigAxiosRes?.queryHhFaceUseConfigList?.list || [] // HHFace_使用配置枚举
+        this.hhFaceEnum.alipayFaceInfoList = (authConfigAxiosRes?.queryHhfaceFaceConfigList?.list || []).map(v => {
+          return {
+            ...v,
+            listField: v.code == 'TENANT' ? 'merchantPortal' : v.code == 'USER_LIB' ? 'userLib' : ''
+          }
+        }) // HHFace_支付宝人脸采集配置枚举
+        this.hhFaceEnum.collectInfoList = authConfigAxiosRes?.queryHhfaceCollectConfigList?.list || [] // HHFace_采集配置枚举
+        this.hhFaceEnum.thirdInfoList = authConfigAxiosRes?.queryHhFaceThirdConfigList?.list || [] // HHFace_三方接口配置枚举
+        this.hhFaceEnum.resultInfoList = authConfigAxiosRes?.queryHhfaceResultConfigList?.list || [] // HHFace_结果页配置枚举
+        this.hhFaceEnum.hardwareInfoList = authConfigAxiosRes?.queryHhfaceHardwareConfigList?.list || [] // HHFace_硬件配置枚举
+        this.hhFaceEnum.pushInfoList = authConfigAxiosRes?.queryHhfacePushConfigList?.list || [] // HHFace_推送配置枚举
+        this.hhFaceEnum.funcInfoList = authConfigAxiosRes?.queryHhfaceFuncConfigList?.list || [] // HHFace_功能配置枚举
+        this.hhFaceEnum.sysInfoList = authConfigAxiosRes?.queryHhfaceSystemConfigList?.list || [] // HHFace_系统配置枚举
+
+        this.hhFkjEnum.collectInfoList = authConfigAxiosRes?.fkjCollectConfigList?.list || [] // 访客机_采集配置枚举
+        this.hhFkjEnum.funcInfoList = authConfigAxiosRes?.fkjFuncConfigList?.list || [] // 访客机_功能配置枚举
+        this.hhFkjEnum.pushInfoList = authConfigAxiosRes?.fkjPushConfigList?.list || [] // 访客机_推送配置枚举
+        this.hhFkjEnum.queryAddressInfoList = authConfigAxiosRes?.fkjQueryAddressConfigList?.list || [] // 访客机_查询地址配置枚举
+        this.hhFkjEnum.sysInfoList = authConfigAxiosRes?.fkjSystemConfigList?.list || [] // 访客机_系统配置枚举
+        this.hhFkjEnum.timeoutDurationInfoList = authConfigAxiosRes?.fkjTimeoutDurationConfigList?.list || [] // 访客机_超时时长配置枚举
+        this.hhFkjEnum.useInfoList = authConfigAxiosRes?.fkjUseConfigList?.list || [] // 访客机_使用配置枚举
+        this.hhFkjEnum.voiceInfoList = authConfigAxiosRes?.fkjVoiceConfigList?.list || [] // 访客机_语音配置枚举
+
+        console.log('authConfigAxiosRes', authConfigAxiosRes)
       }).finally(() => {
         this.enumLoading = false
       })