fix(i18n模块): 修改部分i18n代码
This commit is contained in:
parent
7386ea2a94
commit
fba0fe8b77
@ -33,6 +33,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@arco-design/web-vue": "^2.44.7",
|
"@arco-design/web-vue": "^2.44.7",
|
||||||
"@vueuse/core": "^9.3.0",
|
"@vueuse/core": "^9.3.0",
|
||||||
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"arco-design-pro-vue": "^2.7.2",
|
"arco-design-pro-vue": "^2.7.2",
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"dayjs": "^1.11.5",
|
"dayjs": "^1.11.5",
|
||||||
@ -49,6 +50,7 @@
|
|||||||
"vue": "^3.2.40",
|
"vue": "^3.2.40",
|
||||||
"vue-echarts": "^6.2.3",
|
"vue-echarts": "^6.2.3",
|
||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.2.2",
|
||||||
|
"vue-quill-editor": "^3.0.6",
|
||||||
"vue-router": "^4.0.14",
|
"vue-router": "^4.0.14",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<icon-apps />
|
<icon-apps />
|
||||||
</a-breadcrumb-item>
|
</a-breadcrumb-item>
|
||||||
<a-breadcrumb-item v-for="item in items" :key="item">
|
<a-breadcrumb-item v-for="item in items" :key="item">
|
||||||
{{ $t(item) }}
|
{{ item }}
|
||||||
</a-breadcrumb-item>
|
</a-breadcrumb-item>
|
||||||
</a-breadcrumb>
|
</a-breadcrumb>
|
||||||
</template>
|
</template>
|
||||||
|
@ -25,6 +25,7 @@ export default {
|
|||||||
'menu.exception': '异常页',
|
'menu.exception': '异常页',
|
||||||
'menu.user': '个人中心',
|
'menu.user': '个人中心',
|
||||||
'menu.system': '系统管理',
|
'menu.system': '系统管理',
|
||||||
|
'menu.iot': '物联网管理',
|
||||||
'menu.role': '角色中心',
|
'menu.role': '角色中心',
|
||||||
'menu.customer': '用户中心',
|
'menu.customer': '用户中心',
|
||||||
'menu.ticket': '票据中心',
|
'menu.ticket': '票据中心',
|
||||||
|
@ -7,6 +7,7 @@ const DASHBOARD: AppRouteRecordRaw = {
|
|||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.dashboard',
|
locale: 'menu.dashboard',
|
||||||
|
title: '首页',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
icon: 'icon-dashboard', // 设置图标
|
icon: 'icon-dashboard', // 设置图标
|
||||||
order: 0, // 排序路由菜单项。如果设置该值,值越高,越靠前
|
order: 0, // 排序路由菜单项。如果设置该值,值越高,越靠前
|
||||||
@ -17,7 +18,7 @@ const DASHBOARD: AppRouteRecordRaw = {
|
|||||||
name: 'Workplace',
|
name: 'Workplace',
|
||||||
component: () => import('@/views/dashboard/workplace/index.vue'),
|
component: () => import('@/views/dashboard/workplace/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.dashboard.workplace',
|
title: '工作台',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['*'],
|
permissions: ['*'],
|
||||||
},
|
},
|
||||||
|
@ -27,11 +27,42 @@ const USER: AppRouteRecordRaw = {
|
|||||||
name: 'Setting',
|
name: 'Setting',
|
||||||
component: () => import('@/views/user/setting/index.vue'),
|
component: () => import('@/views/user/setting/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.user.setting',
|
title: '个人设置',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['*'],
|
permissions: ['*'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'bulletins',
|
||||||
|
name: 'Bulletins',
|
||||||
|
component: () => import('@/views/user/bulletins/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '公告通知',
|
||||||
|
requiresAuth: true,
|
||||||
|
permissions: ['*'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'messages',
|
||||||
|
name: 'Messages',
|
||||||
|
component: () => import('@/views/user/messages/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '消息通知',
|
||||||
|
requiresAuth: true,
|
||||||
|
permissions: ['*'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'details/:id',
|
||||||
|
name: 'Details',
|
||||||
|
component: () => import('@/views/user/bulletins/components/detail.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '公告详情',
|
||||||
|
requiresAuth: true,
|
||||||
|
showInMenu: false,
|
||||||
|
permissions: ['*'],
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,11 +35,4 @@ export default {
|
|||||||
'workplace.popularContent.video': 'video',
|
'workplace.popularContent.video': 'video',
|
||||||
'workplace.categoriesPercent': 'Categories Percent',
|
'workplace.categoriesPercent': 'Categories Percent',
|
||||||
'workplace.pecs': 'pecs',
|
'workplace.pecs': 'pecs',
|
||||||
|
|
||||||
'workplace.pass': 'pass',
|
|
||||||
'workplace.notPass': 'notPass',
|
|
||||||
'workplace.notAudit': 'notAudit',
|
|
||||||
'workplace.notFiled': 'notFiled',
|
|
||||||
'workplace.total': 'total',
|
|
||||||
'workplace.chart':' Ticket Chart'
|
|
||||||
};
|
};
|
||||||
|
@ -34,10 +34,4 @@ export default {
|
|||||||
'workplace.popularContent.video': '视频',
|
'workplace.popularContent.video': '视频',
|
||||||
'workplace.categoriesPercent': '内容类型占比',
|
'workplace.categoriesPercent': '内容类型占比',
|
||||||
'workplace.pecs': '个',
|
'workplace.pecs': '个',
|
||||||
'workplace.pass': '审核通过',
|
|
||||||
'workplace.notPass': '审核不通过',
|
|
||||||
'workplace.notAudit': '待审核',
|
|
||||||
'workplace.notFiled': '待提交',
|
|
||||||
'workplace.total': '票据总数',
|
|
||||||
'workplace.chart':'票据分析图'
|
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<Breadcrumb :items="['menu.exception', 'menu.exception.403']" />
|
<Breadcrumb :items="['403', '403']" />
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a-result
|
<a-result
|
||||||
class="result"
|
class="result"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<Breadcrumb :items="['menu.exception', 'menu.exception.404']" />
|
<Breadcrumb :items="['404', '404']" />
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a-result
|
<a-result
|
||||||
class="result"
|
class="result"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<Breadcrumb :items="['menu.exception', 'menu.exception.500']" />
|
<Breadcrumb :items="['500', '500']" />
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a-result
|
<a-result
|
||||||
class="result"
|
class="result"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<div class="logo-text">Hello Ticket!</div>
|
<div class="logo-text">Hello!</div>
|
||||||
</div>
|
</div>
|
||||||
<LoginBanner />
|
<LoginBanner />
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<Breadcrumb :items="['menu.system', 'menu.system.dept']" />
|
<Breadcrumb :items="['系统管理', '部门管理']" />
|
||||||
<a-card class="general-card" title=" ">
|
<a-card class="general-card" title=" ">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :flex="1">
|
<a-col :flex="1">
|
||||||
@ -175,7 +175,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, onMounted, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import useTableOption from '@/hooks/table-option';
|
import useTableOption from '@/hooks/table-option';
|
||||||
@ -287,7 +287,9 @@ const search = () => {
|
|||||||
} as unknown as any);
|
} as unknown as any);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
search();
|
search();
|
||||||
|
})
|
||||||
|
|
||||||
// 分页发生改变
|
// 分页发生改变
|
||||||
const onPageChange = (current: number) => {
|
const onPageChange = (current: number) => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<Breadcrumb :items="['menu.system', 'menu.system.permission']" />
|
<Breadcrumb :items="['系统管理', '权限管理']" />
|
||||||
<a-card class="general-card" :title="$t('menu.list.searchTable')">
|
<a-card class="general-card" :title="$t('menu.list.searchTable')">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :flex="1">
|
<a-col :flex="1">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- 面包屑 -->
|
<!-- 面包屑 -->
|
||||||
<Breadcrumb :items="['menu.system', 'menu.system.role']" />
|
<Breadcrumb :items="['系统管理', '角色管理']" />
|
||||||
<a-card class="general-card" title=" ">
|
<a-card class="general-card" title=" ">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :flex="1">
|
<a-col :flex="1">
|
||||||
@ -9,8 +9,8 @@
|
|||||||
label-align="right">
|
label-align="right">
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="title" :label="$t('searchTable.form.name')">
|
<a-form-item field="title" label="名称角色">
|
||||||
<a-input v-model="formModel.name" :placeholder="$t('searchTable.form.name.placeholder')"></a-input>
|
<a-input v-model="formModel.name" placeholder="请输入角色名称"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -23,13 +23,13 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<icon-search />
|
<icon-search />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('searchTable.form.search') }}
|
查询
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button @click="reset">
|
<a-button @click="reset">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<icon-refresh />
|
<icon-refresh />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('searchTable.form.reset') }}
|
重置
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -42,13 +42,13 @@
|
|||||||
</a-space>
|
</a-space>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12" style="display: flex; align-items: center; justify-content: end">
|
<a-col :span="12" style="display: flex; align-items: center; justify-content: end">
|
||||||
<a-tooltip :content="$t('searchTable.actions.refresh')">
|
<a-tooltip content='刷新'>
|
||||||
<div class="action-icon" @click="fetchData">
|
<div class="action-icon" @click="fetchData">
|
||||||
<icon-refresh size="18" />
|
<icon-refresh size="18" />
|
||||||
</div>
|
</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-dropdown @select="handleSelectDensity">
|
<a-dropdown @select="handleSelectDensity">
|
||||||
<a-tooltip :content="$t('searchTable.actions.density')">
|
<a-tooltip content="密度">
|
||||||
<div class="action-icon"><icon-line-height size="18" /></div>
|
<div class="action-icon"><icon-line-height size="18" /></div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -58,7 +58,7 @@
|
|||||||
</a-doption>
|
</a-doption>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
<a-tooltip :content="$t('searchTable.actions.columnSetting')">
|
<a-tooltip content="列设置">
|
||||||
<a-popover trigger="click" position="bl" @popup-visible-change="popupVisibleChange">
|
<a-popover trigger="click" position="bl" @popup-visible-change="popupVisibleChange">
|
||||||
<div class="action-icon"><icon-settings size="18" /></div>
|
<div class="action-icon"><icon-settings size="18" /></div>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -83,7 +83,7 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<!-- <a-table row-key="id" :loading="loading" :pagination="false" :columns="(cloneColumns as TableColumnData[])"
|
<a-table row-key="id" :loading="loading" :pagination="false" :columns="(cloneColumns as TableColumnData[])"
|
||||||
:data="renderData" :bordered="false" :size="size" style="margin-bottom: 40px" @page-change="onPageChange">
|
:data="renderData" :bordered="false" :size="size" style="margin-bottom: 40px" @page-change="onPageChange">
|
||||||
<template #index="{ rowIndex }">
|
<template #index="{ rowIndex }">
|
||||||
{{ rowIndex + 1 }}
|
{{ rowIndex + 1 }}
|
||||||
@ -97,16 +97,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #operations="{ record }">
|
<template #operations="{ record }">
|
||||||
<RoleEdit ref="editRef" :prem="record" :is-create="false" @refresh="fetchData" />
|
<RoleEdit ref="editRef" :prem="record" :is-create="false" @refresh="fetchData" />
|
||||||
<a-popconfirm :content="t('Confirm the deletion of this role')" type="error" @ok="handleDelete(record)">
|
<a-popconfirm content='确认删除此角色?' type="error" @ok="handleDelete(record)">
|
||||||
<a-button type="primary" size="small" status="danger" style="padding: 7px">
|
<a-button type="outline" size="small" status="danger" style="padding: 7px">
|
||||||
<template #icon><icon-delete /></template>
|
<template #icon><icon-delete /></template>
|
||||||
{{ $t('delete') }}
|
删除
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
</a-table> -->
|
</a-table>
|
||||||
<RoleTable :data="renderData" :pagination="pagination" :loading="loading" @pageChange="onPageChange"
|
|
||||||
:columns="(cloneColumns as TableColumnData[])" @search="search" />
|
|
||||||
<a-pagination style="float: right; position: relative; right: 1px; bottom: 25px" :total="pagination.total"
|
<a-pagination style="float: right; position: relative; right: 1px; bottom: 25px" :total="pagination.total"
|
||||||
:size="size" show-total show-jumper show-page-size @page-size-change="onSizeChange" @change="onPageChange" />
|
:size="size" show-total show-jumper show-page-size @page-size-change="onSizeChange" @change="onPageChange" />
|
||||||
</a-card>
|
</a-card>
|
||||||
@ -114,21 +112,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, onMounted, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { Pagination } from '@/types/global';
|
import { Pagination } from '@/types/global';
|
||||||
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
||||||
import { Message } from '@arco-design/web-vue';
|
|
||||||
import useTableOption from '@/hooks/table-option';
|
import useTableOption from '@/hooks/table-option';
|
||||||
// import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { useRoleStore } from '@/store';
|
import { useRoleStore } from '@/store';
|
||||||
import { RoleRecord } from '@/api/role';
|
import { RoleRecord } from '@/api/role';
|
||||||
|
import { Message } from '@arco-design/web-vue';
|
||||||
import RoleEdit from './components/role-edit.vue';
|
import RoleEdit from './components/role-edit.vue';
|
||||||
import RoleTable from './components/role-table.vue';
|
|
||||||
|
|
||||||
const { loading, setLoading } = useLoading(true);
|
const { loading, setLoading } = useLoading(true);
|
||||||
const { t } = useI18n();
|
|
||||||
const renderData = ref<RoleRecord[]>([]);
|
const renderData = ref<RoleRecord[]>([]);
|
||||||
const {
|
const {
|
||||||
cloneColumns,
|
cloneColumns,
|
||||||
@ -158,23 +153,23 @@ const pagination: Pagination = {
|
|||||||
// 表格头部
|
// 表格头部
|
||||||
const columns = computed<TableColumnData[]>(() => [
|
const columns = computed<TableColumnData[]>(() => [
|
||||||
{
|
{
|
||||||
title: t('roleTable.columns.index'),
|
title: '序号',
|
||||||
dataIndex: 'index',
|
dataIndex: 'index',
|
||||||
slotName: 'index',
|
slotName: 'index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('roleTable.columns.name'),
|
title: '名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
sortable: {
|
sortable: {
|
||||||
sortDirections: ['ascend', 'descend'],
|
sortDirections: ['ascend', 'descend'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('roleTable.columns.remark'),
|
title: '备注',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('roleTable.columns.createTime'),
|
title: '创建时间',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
slotName: 'createTime',
|
slotName: 'createTime',
|
||||||
sortable: {
|
sortable: {
|
||||||
@ -182,12 +177,12 @@ const columns = computed<TableColumnData[]>(() => [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('roleTable.columns.enabled'),
|
title: '是否启用',
|
||||||
dataIndex: 'enabled',
|
dataIndex: 'enabled',
|
||||||
slotName: 'enabled',
|
slotName: 'enabled',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('searchTable.columns.operations'),
|
title: '操作',
|
||||||
dataIndex: 'operations',
|
dataIndex: 'operations',
|
||||||
slotName: 'operations',
|
slotName: 'operations',
|
||||||
},
|
},
|
||||||
@ -217,7 +212,9 @@ const search = () => {
|
|||||||
} as unknown as any);
|
} as unknown as any);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
search();
|
search();
|
||||||
|
})
|
||||||
|
|
||||||
// 分页发生改变
|
// 分页发生改变
|
||||||
const onPageChange = (current: number) => {
|
const onPageChange = (current: number) => {
|
||||||
@ -238,38 +235,38 @@ const reset = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 是否启用
|
// 是否启用
|
||||||
// const enabledStatus = async (record: string) => {
|
const enabledStatus = async (record: string) => {
|
||||||
// record.enabled = !record.enabled;
|
record.enabled = !record.enabled;
|
||||||
// const res = await roleStore.enabledRole(record.id);
|
const res = await roleStore.enabledRole(record.id);
|
||||||
// if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
// Message.success({
|
Message.success({
|
||||||
// content: t('modify.status.sucess'),
|
content: '修改成功',
|
||||||
// duration: 3 * 1000,
|
duration: 3 * 1000,
|
||||||
// });
|
});
|
||||||
// } else {
|
} else {
|
||||||
// Message.error({
|
Message.error({
|
||||||
// content: t('modify.status.fail'),
|
content: '修改失败',
|
||||||
// duration: 3 * 1000,
|
duration: 3 * 1000,
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
// const handleDelete = async (record: RoleRecord) => {
|
const handleDelete = async (record: RoleRecord) => {
|
||||||
// const res = await roleStore.removeRole(record.id);
|
const res = await roleStore.removeRole(record.id);
|
||||||
// if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
// Message.success({
|
Message.success({
|
||||||
// content: t('delete.role.sucess'),
|
content: '删除成功',
|
||||||
// duration: 5 * 1000,
|
duration: 5 * 1000,
|
||||||
// });
|
});
|
||||||
// search();
|
search();
|
||||||
// } else {
|
} else {
|
||||||
// Message.error({
|
Message.error({
|
||||||
// content: t('delete.role.fail'),
|
content: '删除失败',
|
||||||
// duration: 3 * 1000,
|
duration: 3 * 1000,
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
|
|
||||||
watch(() => columns.value, deepClone, { deep: true, immediate: true });
|
watch(() => columns.value, deepClone, { deep: true, immediate: true });
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<Breadcrumb :items="['menu.system', 'menu.system.user']" />
|
<Breadcrumb :items="['系统管理', '用户管理']" />
|
||||||
<a-card class="general-card" title=" ">
|
<a-card class="general-card" title=" ">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :flex="1">
|
<a-col :flex="1">
|
||||||
@ -191,12 +191,12 @@
|
|||||||
:is-create="false"
|
:is-create="false"
|
||||||
@refresh="fetchData"
|
@refresh="fetchData"
|
||||||
/>
|
/>
|
||||||
<Userc
|
<!-- <Userc-->
|
||||||
ref="editUserRef"
|
<!-- ref="editUserRef"-->
|
||||||
:user="record"
|
<!-- :user="record"-->
|
||||||
:is-create="false"
|
<!-- :is-create="false"-->
|
||||||
@refresh="search"
|
<!-- @refresh="search"-->
|
||||||
/>
|
<!-- />-->
|
||||||
<!-- <a-popconfirm
|
<!-- <a-popconfirm
|
||||||
content="确认删除此用户?"
|
content="确认删除此用户?"
|
||||||
type="error"
|
type="error"
|
||||||
@ -223,7 +223,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, onMounted, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { UserRecord, UserParams } from '@/api/user';
|
import { UserRecord, UserParams } from '@/api/user';
|
||||||
@ -269,7 +269,7 @@ const pagination: Pagination = {
|
|||||||
page: 1,
|
page: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
current: 1,
|
current: 1,
|
||||||
total: null,
|
total: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = computed<TableColumnData[]>(() => [
|
const columns = computed<TableColumnData[]>(() => [
|
||||||
@ -392,7 +392,9 @@ const onSizeChange = (size: number) => {
|
|||||||
search();
|
search();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
search();
|
search();
|
||||||
|
})
|
||||||
|
|
||||||
// 重置
|
// 重置
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
|
@ -43,13 +43,13 @@
|
|||||||
:rules="[
|
:rules="[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('userSetting.form.error.nickname.required'),
|
message: '请输入昵称',
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<a-input
|
<a-input
|
||||||
v-model="formData.nickName"
|
v-model="formData.nickName"
|
||||||
:placeholder="$t('userSetting.basicInfo.placeholder.nickname')"
|
placeholder='请输入昵称'
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import type { FileItem } from '@arco-design/web-vue/es/upload/interfaces';
|
import type { FileItem } from '@arco-design/web-vue/es/upload/interfaces';
|
||||||
import { useUserStore, useTicketStore } from '@/store';
|
import { useUserStore} from '@/store';
|
||||||
import userIcon from '@/assets/images/user-circle.png';
|
import userIcon from '@/assets/images/user-circle.png';
|
||||||
import type { DescData } from '@arco-design/web-vue/es/descriptions/interface';
|
import type { DescData } from '@arco-design/web-vue/es/descriptions/interface';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
@ -58,7 +58,7 @@ import { selfUpdate } from '@/api/user';
|
|||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const ticketStore = useTicketStore();
|
// const ticketStore = useTicketStore();
|
||||||
|
|
||||||
const file = {
|
const file = {
|
||||||
uid: '-2',
|
uid: '-2',
|
||||||
@ -89,22 +89,6 @@ const fileList = ref<FileItem[]>([file]);
|
|||||||
const Onchange = async (option: any) => {
|
const Onchange = async (option: any) => {
|
||||||
const FormDatas = new FormData();
|
const FormDatas = new FormData();
|
||||||
FormDatas.append('file', option.fileItem.file);
|
FormDatas.append('file', option.fileItem.file);
|
||||||
const res = await ticketStore.uploadFile(FormDatas);
|
|
||||||
if (res.status === 200) {
|
|
||||||
Message.success({
|
|
||||||
content: t('upload.sucess'),
|
|
||||||
duration: 3 * 1000,
|
|
||||||
});
|
|
||||||
res.data.name = res.data.fileName;
|
|
||||||
fileList.value.push(res.data);
|
|
||||||
await selfUpdate({ avatar: res.data.id });
|
|
||||||
await userStore.info();
|
|
||||||
} else {
|
|
||||||
Message.error({
|
|
||||||
content: t('upload.fail'),
|
|
||||||
duration: 3 * 1000,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<Breadcrumb :items="['menu.user', 'menu.user.setting']" />
|
<Breadcrumb :items="['个人中心', '个人设置']" />
|
||||||
<a-row style="margin-bottom: 16px">
|
<a-row style="margin-bottom: 16px">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<UserPanel />
|
<UserPanel />
|
||||||
|
Loading…
Reference in New Issue
Block a user