mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-22 21:22:33 +08:00
:fix 移动端密钥维护不能脱敏
This commit is contained in:
parent
6114c3d6c5
commit
116b4389a0
@ -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
|
||||
|
@ -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(() => {
|
||||
|
@ -3,11 +3,12 @@
|
||||
<el-card class="layout-padding-auto">
|
||||
<el-row v-show="showSearch" class="mb8">
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="ml2">
|
||||
<el-button formDialogRef icon="search" type="primary" @click="getDataList">
|
||||
{{ $t('common.queryBtn') }}
|
||||
@ -19,64 +20,66 @@
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button formDialogRef icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'app_social_details_add'">
|
||||
v-auth="'app_social_details_add'">
|
||||
{{ $t('common.addBtn') }}
|
||||
</el-button>
|
||||
<el-button formDialogRef icon="Download" type="primary" class="ml10" @click="exportExcel">
|
||||
{{ $t('common.exportBtn') }}
|
||||
</el-button>
|
||||
<el-button formDialogRef :disabled="multiple" icon="Delete" type="primary" class="ml10"
|
||||
v-auth="'app_social_details_del'" @click="handleDelete(undefined)">
|
||||
v-auth="'app_social_details_del'" @click="handleDelete(undefined)">
|
||||
{{ $t('common.delBtn') }}
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" class="ml10" style="float: right;margin-right: 20px"
|
||||
@queryTable="getDataList"></right-toolbar>
|
||||
@queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
</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 prop="type" :label="t('appsocial.type')" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="app_social_type" :value="scope.row.type"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" :label="t('appsocial.remark')" show-overflow-tooltip/>
|
||||
<el-table-column prop="appId" :label="t('appsocial.appId')" show-overflow-tooltip/>
|
||||
<el-table-column prop="appSecret" :label="t('appsocial.appSecret')" show-overflow-tooltip/>
|
||||
<el-table-column prop="createTime" :label="t('appsocial.createTime')" show-overflow-tooltip/>
|
||||
@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 prop="type" :label="t('appsocial.type')" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="app_social_type" :value="scope.row.type"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" :label="t('appsocial.remark')" show-overflow-tooltip/>
|
||||
<el-table-column prop="appId" :label="t('appsocial.appId')" show-overflow-tooltip/>
|
||||
<el-table-column prop="appSecret" :label="t('appsocial.appSecret')" show-overflow-tooltip/>
|
||||
<el-table-column prop="createTime" :label="t('appsocial.createTime')" show-overflow-tooltip/>
|
||||
<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>
|
||||
$t('common.delBtn')
|
||||
}}
|
||||
</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
|
||||
})
|
||||
@ -133,13 +136,13 @@ const handleDelete = (row: any) => {
|
||||
}
|
||||
|
||||
useMessageBox().confirm(t('common.delConfirmText') + row.id)
|
||||
.then(() => {
|
||||
delObj(row.id).then(() => {
|
||||
getDataList();
|
||||
useMessage().success(t('common.delSuccessText'));
|
||||
}).catch((err: any) => {
|
||||
useMessage().error(err.msg)
|
||||
.then(() => {
|
||||
delObj(row.id).then(() => {
|
||||
getDataList();
|
||||
useMessage().success(t('common.delSuccessText'));
|
||||
}).catch((err: any) => {
|
||||
useMessage().error(err.msg)
|
||||
})
|
||||
})
|
||||
})
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user