:fix 移动端密钥维护不能脱敏

This commit is contained in:
lbw 2023-02-14 13:16:18 +08:00
parent 6114c3d6c5
commit 116b4389a0
3 changed files with 55 additions and 44 deletions

View File

@ -13,7 +13,7 @@ import { onMounted, reactive, ref, unref } from "vue";
const emit = defineEmits(['search', 'nodeClick'])
const props = defineProps({
const { placeholder, props, query, loading } = defineProps({
props: {
type: Object,
default: () => {
@ -40,7 +40,7 @@ const props = defineProps({
const state = reactive({
List: [],
localLoading: props.loading
localLoading: loading
})
@ -51,9 +51,9 @@ const handleNodeClick = (item: any) => {
}
const getDeptTree = () => {
if (props.query instanceof Function) {
if (query instanceof Function) {
state.localLoading = true
const result = props.query(unref(searchName))
const result = query(unref(searchName))
if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
result.then((r: any) => {
state.List = r.data

View File

@ -111,6 +111,14 @@ const onSubmit = () => {
return false
}
if (form.appSecret && form.appSecret.indexOf("******") >= 0) {
form.appSecret = ''
}
if (form.appId && form.appId.indexOf("******") >= 0) {
form.appId = ''
}
//
if (form.id) {
putObj(form).then(() => {

View File

@ -5,7 +5,8 @@
<el-form :model="state.queryForm" ref="queryRef" :inline="true">
<el-form-item :label="t('appsocial.type')" prop="type" class="ml2">
<el-select v-model="state.queryForm.type" :placeholder="t('appsocial.inputTypeTip')">
<el-option :label="item.label" :value="item.value" v-for="(item, index) in app_social_type" :key="index"></el-option>
<el-option :label="item.label" :value="item.value" v-for="(item, index) in app_social_type"
:key="index"></el-option>
</el-select>
</el-form-item>
<el-form-item class="ml2">
@ -35,8 +36,8 @@
</el-row>
<el-table :data="state.dataList" v-loading="state.loading" style="width: 100%"
@selection-change="handleSelectionChange" @sort-change="sortChangeHandle">
<el-table-column type="selection" width="60" align="center" />
<el-table-column type="index" :label="t('appsocial.index')" width="80" />
<el-table-column type="selection" width="60" align="center"/>
<el-table-column type="index" :label="t('appsocial.index')" width="80"/>
<el-table-column prop="type" :label="t('appsocial.type')" show-overflow-tooltip>
<template #default="scope">
<dict-tag :options="app_social_type" :value="scope.row.type"></dict-tag>
@ -49,34 +50,36 @@
<el-table-column :label="$t('common.action')" width="150">
<template #default="scope">
<el-button text type="primary" v-auth="'app_social_details_edit'"
@click="formDialogRef.openDialog(scope.row.id)">{{ $t('common.editBtn') }}</el-button>
@click="formDialogRef.openDialog(scope.row.id)">{{ $t('common.editBtn') }}
</el-button>
<el-button text type="primary" v-auth="'app_social_details_del'" @click="handleDelete(scope.row)">{{
$t('common.delBtn')
}}</el-button>
}}
</el-button>
</template>
</el-table-column>
</el-table>
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination"/>
</el-card>
<!-- 编辑新增 -->
<form-dialog ref="formDialogRef" @refresh="getDataList()" />
<form-dialog ref="formDialogRef" @refresh="getDataList()"/>
</div>
</template>
<script setup lang="ts" name="systemAppSocialDetails">
import { BasicTableProps, useTable } from "/@/hooks/table";
import { fetchList, delObj } from "/@/api/app/appsocial";
import { useMessage, useMessageBox } from "/@/hooks/message";
import { useDict } from '/@/hooks/dict';
import { useI18n } from "vue-i18n";
import {BasicTableProps, useTable} from "/@/hooks/table";
import {fetchList, delObj} from "/@/api/app/appsocial";
import {useMessage, useMessageBox} from "/@/hooks/message";
import {useDict} from '/@/hooks/dict';
import {useI18n} from "vue-i18n";
//
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
const { t } = useI18n()
const {t} = useI18n()
//
const { app_social_type } = useDict('app_social_type')
const {app_social_type} = useDict('app_social_type')
//
const formDialogRef = ref()
//
@ -88,7 +91,7 @@ const multiple = ref(true)
const state: BasicTableProps = reactive<BasicTableProps>({
queryForm: {
type:''
type: ''
},
pageList: fetchList
})